aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-09-13 18:03:14 -0700
committerDmitry Shmidt <dimitrysh@google.com>2012-09-14 12:54:35 -0700
commit043a5a9d2586bf379a3f3e811c8c64d92050e131 (patch)
tree37f8988b986d01e0c7ab14020fa130e203222744 /wpa_supplicant
parentdc7b71324df9788e194745e8ab9386a4619a623a (diff)
downloadexternal_wpa_supplicant_8-043a5a9d2586bf379a3f3e811c8c64d92050e131.zip
external_wpa_supplicant_8-043a5a9d2586bf379a3f3e811c8c64d92050e131.tar.gz
external_wpa_supplicant_8-043a5a9d2586bf379a3f3e811c8c64d92050e131.tar.bz2
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 <j@w1.fi>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/p2p_supplicant.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 1b26ddf..f8db14e 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -201,10 +201,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;