]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Check all interfaces for pending scan for p2p_scan failures
authorJouni Malinen <j@w1.fi>
Fri, 14 Sep 2012 01:03:14 +0000 (18:03 -0700)
committerJouni Malinen <j@w1.fi>
Fri, 14 Sep 2012 01:03:14 +0000 (18:03 -0700)
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 <j@w1.fi>

wpa_supplicant/p2p_supplicant.c

index 5d837c301ee8c5cea2e22a8e63290c73aad52cc6..8542b91f7ec4105758edf0d8b49ee124cce37aa9 100644 (file)
@@ -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;