diff options
author | Lior David <qca_liord@qca.qualcomm.com> | 2016-01-24 15:36:49 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2016-02-27 17:37:19 (GMT) |
commit | ba307f8528b1242c931a57feb21cd30286126916 (patch) | |
tree | 9d937c5b64b80849c935660908c178845846687f /wpa_supplicant/dbus | |
parent | e04019737e9987137bec9034f2f9684c70275cd3 (diff) | |
download | hostap-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/dbus')
-rw-r--r-- | wpa_supplicant/dbus/dbus_new.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c index 91a1511..d74630e 100644 --- a/wpa_supplicant/dbus/dbus_new.c +++ b/wpa_supplicant/dbus/dbus_new.c @@ -1207,7 +1207,7 @@ static int match_group_where_peer_is_client(struct p2p_group *group, cfg->ssid_len); if (wpa_s_go != NULL && wpa_s_go == data->wpa_s) { wpas_dbus_signal_peer_groups_changed( - data->wpa_s->parent, data->info->p2p_device_addr); + data->wpa_s->p2pdev, data->info->p2p_device_addr); return 0; } @@ -1224,7 +1224,7 @@ static void signal_peer_groups_changed(struct p2p_peer_info *info, wpa_s_go = wpas_get_p2p_client_iface(data->wpa_s, info->p2p_device_addr); if (wpa_s_go != NULL && wpa_s_go == data->wpa_s) { - wpas_dbus_signal_peer_groups_changed(data->wpa_s->parent, + wpas_dbus_signal_peer_groups_changed(data->wpa_s->p2pdev, info->p2p_device_addr); return; } |