]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AOSP: Skip wpa_supplicant_scan if wpa_s->scanning
authorJouni Malinen <j@w1.fi>
Fri, 1 Nov 2013 10:44:52 +0000 (12:44 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 1 Nov 2013 14:36:19 +0000 (16:36 +0200)
This came in as a part of this commit:

commit 5887a9d552f3d9d612011daba073e076daab5b2a
Author: Dmitry Shmidt <dimitrysh@google.com>
Date:   Fri Sep 14 10:47:43 2012 -0700

    wpa_supplicant: Skip unnecessary scan attempts

    Change-Id: Ieea8843c0fcb063dbb1df56e5cdf3fbdd0590cd4
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
wpa_supplicant/scan.c

index 04e8fa6ca01ecdd765b15115a1e8061149605b4f..c526e46a4b4bce231256e4af64abf233b6279a3f 100644 (file)
@@ -565,7 +565,13 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
                wpas_p2p_continue_after_scan(wpa_s);
                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 == NORMAL_SCAN_REQ) {
                wpa_dbg(wpa_s, MSG_DEBUG, "No enabled networks - do not scan");