aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/sme.c
diff options
context:
space:
mode:
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/sme.c
parente04019737e9987137bec9034f2f9684c70275cd3 (diff)
downloadhostap-ba307f8528b1242c931a57feb21cd30286126916.zip
hostap-ba307f8528b1242c931a57feb21cd30286126916.tar.gz
hostap-ba307f8528b1242c931a57feb21cd30286126916.tar.bz2
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/sme.c')
-rw-r--r--wpa_supplicant/sme.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index f09534d..a6ace1a 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -1009,8 +1009,8 @@ void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode,
if (wpa_s->current_ssid && wpa_s->current_ssid->p2p_group)
params.p2p = 1;
- if (wpa_s->parent->set_sta_uapsd)
- params.uapsd = wpa_s->parent->sta_uapsd;
+ if (wpa_s->p2pdev->set_sta_uapsd)
+ params.uapsd = wpa_s->p2pdev->sta_uapsd;
else
params.uapsd = -1;