path: root/wpa_supplicant/wpa_supplicant_i.h
diff options
authorLior David <qca_liord@qca.qualcomm.com>2016-01-24 15:36:49 (GMT)
committerJouni Malinen <j@w1.fi>2016-02-27 17:37:19 (GMT)
commitba307f8528b1242c931a57feb21cd30286126916 (patch)
tree9d937c5b64b80849c935660908c178845846687f /wpa_supplicant/wpa_supplicant_i.h
parente04019737e9987137bec9034f2f9684c70275cd3 (diff)
P2P: Add a separate pointer to the P2P Device instance
In many places in the code there was a reference to wpa_s->parent to get from group interface to p2p_dev interface. These places can break if P2P_DEVICE interface would need to be used with the primary interface as the group interface, since the parent of the primary interface points to itself and not the p2p_dev interface. Fix this by adding a separate "p2pdev" pointer to wpa_supplicant, it will be the same as parent pointer in most cases but whenever the primary interface is used as a group interface, change it to point to the correct p2p_dev interface. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/wpa_supplicant_i.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
index 14a7245..1ec2cd8 100644
--- a/wpa_supplicant/wpa_supplicant_i.h
+++ b/wpa_supplicant/wpa_supplicant_i.h
@@ -453,6 +453,7 @@ struct wpa_supplicant {
struct wpa_radio *radio; /* shared radio context */
struct dl_list radio_list; /* list head: struct wpa_radio::ifaces */
struct wpa_supplicant *parent;
+ struct wpa_supplicant *p2pdev;
struct wpa_supplicant *next;
struct l2_packet_data *l2;
struct l2_packet_data *l2_br;