aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'wpa_supplicant/scan.c')
-rw-r--r--wpa_supplicant/scan.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index d8b3139..8c548b3 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -453,7 +453,13 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED);
return;
}
-
+#ifdef ANDROID
+ if (wpa_s->scanning) {
+ /* If we are already in scanning state, we shall ignore this new scan request*/
+ wpa_dbg(wpa_s, MSG_DEBUG, "Skip scan - already scanning");
+ return;
+ }
+#endif
if (!wpa_supplicant_enabled_networks(wpa_s) &&
!wpa_s->scan_req) {
wpa_dbg(wpa_s, MSG_DEBUG, "No enabled networks - do not scan");
@@ -691,7 +697,7 @@ scan:
if (ret) {
wpa_msg(wpa_s, MSG_WARNING, "Failed to initiate AP scan");
#ifdef ANDROID_P2P
- /* Restore back the wpa_s->scan_req if we failed the scan becoz of any reason */
+ /* Restore back the wpa_s->scan_req if we failed the scan because of any reason */
wpa_msg(wpa_s, MSG_DEBUG, "Restoring back the wpa_s->scan_req "
"to the original value %d", scan_req);
wpa_s->scan_req = scan_req;