From patchwork Sun Dec 9 09:27:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: ctrl_iface: check for ongoing sched_scan on SCAN command Date: Sat, 08 Dec 2012 23:27:36 -0000 From: Arik Nemtsov X-Patchwork-Id: 204692 Message-Id: <1355045256-19990-1-git-send-email-arik@wizery.com> To: hostap@lists.shmoo.com From: Eliad Peller The first "if" in the SCAN command handling didn't check properly for sched_scan, causing the sched_scan and scan to run concurrently, instead of cancelling the ongoing sched scan (which is handled by the "else if" later). Signed-hostap: Eliad Peller --- wpa_supplicant/ctrl_iface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 5bfa890..82d05fd 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -5079,7 +5079,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s, if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED) reply_len = -1; else { - if (!wpa_s->scanning && + if (!wpa_s->sched_scanning && !wpa_s->scanning && ((wpa_s->wpa_state <= WPA_SCANNING) || (wpa_s->wpa_state == WPA_COMPLETED))) { wpa_s->normal_scans = 0;