diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index daece5ff1..20ce8c1df 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -3944,13 +3944,20 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s, wpa_supplicant_deauthenticate(wpa_s, WLAN_REASON_DEAUTH_LEAVING); } else if (os_strcmp(buf, "SCAN") == 0) { - wpa_s->normal_scans = 0; if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED) reply_len = -1; else { if (!wpa_s->scanning && ((wpa_s->wpa_state <= WPA_SCANNING) || (wpa_s->wpa_state == WPA_COMPLETED))) { + wpa_s->normal_scans = 0; + wpa_s->scan_req = 2; + wpa_supplicant_req_scan(wpa_s, 0, 0); + } else if (wpa_s->sched_scanning) { + wpa_printf(MSG_DEBUG, "Stop ongoing " + "sched_scan to allow requested " + "full scan to proceed"); + wpa_supplicant_cancel_sched_scan(wpa_s); wpa_s->scan_req = 2; wpa_supplicant_req_scan(wpa_s, 0, 0); } else {