diff options
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r-- | wpa_supplicant/events.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index fdcbcc2..6e9d7ba 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -854,7 +854,12 @@ static void wpa_supplicant_req_new_scan(struct wpa_supplicant *wpa_s, * we don't wait timeout seconds before transitioning * to INACTIVE state. */ + wpa_dbg(wpa_s, MSG_DEBUG, "Short-circuit new scan request " + "since there are no enabled networks"); wpa_supplicant_set_state(wpa_s, WPA_INACTIVE); +#ifdef CONFIG_P2P + wpa_s->sta_scan_pending = 0; +#endif /* CONFIG_P2P */ return; } wpa_supplicant_req_scan(wpa_s, timeout_sec, timeout_usec); @@ -1059,7 +1064,8 @@ static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s, #ifdef CONFIG_P2P if (wpa_s->global->p2p_cb_on_scan_complete && !wpa_s->global->p2p_disabled && - wpa_s->global->p2p != NULL && !wpa_s->sta_scan_pending) { + wpa_s->global->p2p != NULL && !wpa_s->sta_scan_pending && + !wpa_s->scan_res_handler) { wpa_s->global->p2p_cb_on_scan_complete = 0; if (p2p_other_scan_completed(wpa_s->global->p2p) == 1) { wpa_dbg(wpa_s, MSG_DEBUG, "P2P: Pending P2P operation " |