From a698d6c85fcd424dcb3f92e3495c00a51608bde3 Mon Sep 17 00:00:00 2001 From: Andrei Otcheretianski Date: Thu, 2 Jul 2015 10:45:03 +0300 Subject: [PATCH] P2PS: Use wpas_p2p_create_iface() to check if dedicated iface is needed Call wpas_p2p_create_iface() instead of just checking p2p_no_group_iface config value. Not doing so, resulted in an incorrect behavior when the driver sets WPA_DRIVER_FLAGS_DEDICATED_P2P_DEVICE flag. Signed-off-by: Andrei Otcheretianski Reviewed-by: Ilan Peer --- wpa_supplicant/p2p_supplicant.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index b9ebd380f..aeaa11461 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -606,7 +606,7 @@ static u8 p2ps_group_capability(void *ctx, u8 incoming, u8 role) */ go_wpa_s = wpas_p2p_get_go_group(wpa_s); persistent_go = wpas_p2p_get_persistent_go(wpa_s); - p2p_no_group_iface = wpa_s->conf->p2p_no_group_iface; + p2p_no_group_iface = !wpas_p2p_create_iface(wpa_s); wpa_printf(MSG_DEBUG, "P2P: GO(iface)=%p persistent(ssid)=%p", go_wpa_s, persistent_go); @@ -3742,7 +3742,7 @@ static void wpas_p2ps_prov_complete(void *ctx, u8 status, const u8 *dev, if (!go_wpa_s) { wpa_s->global->pending_p2ps_group = 1; - if (wpa_s->conf->p2p_no_group_iface) + if (!wpas_p2p_create_iface(wpa_s)) go_ifname = wpa_s->ifname; else if (wpa_s->pending_interface_name[0]) go_ifname = wpa_s->pending_interface_name;