From: Jouni Malinen Date: Fri, 14 Sep 2012 01:03:14 +0000 (-0700) Subject: P2P: Check all interfaces for pending scan for p2p_scan failures X-Git-Tag: hostap_2_0~223 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58d3760e7e7dc623a702cc712fd282710ff5ce40;p=thirdparty%2Fhostap.git P2P: Check all interfaces for pending scan for p2p_scan failures Driver could reject the new scan based on any virtual interface running a concurrent scan. As such, mark the pending scan callback for P2P based on any interfaces instead of just the one used for the p2p_scan operation. Signed-hostap: Jouni Malinen --- diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 5d837c301..8542b91f7 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -189,10 +189,13 @@ static int wpas_p2p_scan(void *ctx, enum p2p_scan_type type, int freq, wpabuf_free(ies); if (ret) { - if (wpa_s->scanning || - wpa_s->scan_res_handler == wpas_p2p_scan_res_handler) { - wpa_s->global->p2p_cb_on_scan_complete = 1; - ret = 1; + for (ifs = wpa_s->global->ifaces; ifs; ifs = ifs->next) { + if (ifs->scanning || + ifs->scan_res_handler == wpas_p2p_scan_res_handler) { + wpa_s->global->p2p_cb_on_scan_complete = 1; + ret = 1; + break; + } } } else wpa_s->scan_res_handler = wpas_p2p_scan_res_handler;