[PATCH 1/2] Skip scan if already scanning

Dmitry Shmidt dimitrysh
Tue Nov 12 12:40:04 PST 2013


Signed-off-by: Dmitry Shmidt <dimitrysh at google.com>
---
 wpa_supplicant/scan.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index 019b86c..96c127b 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -567,6 +567,11 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
 		return;
 	}
 
+	if (wpa_s->scanning) {
+		wpa_dbg(wpa_s, MSG_DEBUG, "Skip scan - already scanning");
+		return;
+	}
+
 	if (!wpa_supplicant_enabled_networks(wpa_s) &&
 	    wpa_s->scan_req == NORMAL_SCAN_REQ) {
 		wpa_dbg(wpa_s, MSG_DEBUG, "No enabled networks - do not scan");
-- 
1.8.4.1




More information about the Hostap mailing list