aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wpa_supplicant/p2p_supplicant.c5
-rw-r--r--wpa_supplicant/scan.c8
2 files changed, 7 insertions, 6 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 2cd2e8e..76f50c7 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -5346,12 +5346,7 @@ unsigned int wpas_p2p_search_delay(struct wpa_supplicant *wpa_s)
rn2 = ifs->driver->get_radio_name(ifs->drv_priv);
if (!rn2 || os_strcmp(rn, rn2) != 0)
continue;
-#ifdef ANDROID_P2P
- /* We need not delay the p2p_scan if STA is already connected */
- if (ifs->wpa_state > WPA_SCANNING && ifs->wpa_state < WPA_COMPLETED) {
-#else
if (ifs->wpa_state > WPA_SCANNING) {
-#endif
wpa_dbg(wpa_s, MSG_DEBUG, "P2P: Use %u ms search "
"delay due to concurrent operation on "
"interface %s",
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index f088da1..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");