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>
This commit is contained in:
Jouni Malinen 2012-09-13 18:03:14 -07:00
parent e665ca9a8d
commit 58d3760e7e

View file

@ -189,10 +189,13 @@ static int wpas_p2p_scan(void *ctx, enum p2p_scan_type type, int freq,
wpabuf_free(ies); wpabuf_free(ies);
if (ret) { if (ret) {
if (wpa_s->scanning || for (ifs = wpa_s->global->ifaces; ifs; ifs = ifs->next) {
wpa_s->scan_res_handler == wpas_p2p_scan_res_handler) { if (ifs->scanning ||
wpa_s->global->p2p_cb_on_scan_complete = 1; ifs->scan_res_handler == wpas_p2p_scan_res_handler) {
ret = 1; wpa_s->global->p2p_cb_on_scan_complete = 1;
ret = 1;
break;
}
} }
} else } else
wpa_s->scan_res_handler = wpas_p2p_scan_res_handler; wpa_s->scan_res_handler = wpas_p2p_scan_res_handler;