aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-12-26 15:53:20 (GMT)
committerJouni Malinen <j@w1.fi>2013-12-26 16:48:52 (GMT)
commit1cd93ff743e4362e8e84be59fc6af567faa5ac5d (patch)
tree4d27b1a5424917d12527cf53c8f656ef4cef1dfd /wpa_supplicant
parentdc3906cb2dc869cd1cb106c9440632c5177aee51 (diff)
downloadhostap-1cd93ff743e4362e8e84be59fc6af567faa5ac5d.zip
hostap-1cd93ff743e4362e8e84be59fc6af567faa5ac5d.tar.gz
hostap-1cd93ff743e4362e8e84be59fc6af567faa5ac5d.tar.bz2
Reschedule own scan request if an externally started one is in progress
This avoids some unnecessary attempts to request the driver to start a scan while it is still busy with the scan operation that was started by an external program. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/scan.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index a40c5b6..899d2a9 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -508,6 +508,17 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
return;
}
+ if (wpa_s->external_scan_running) {
+ struct os_reltime now, diff;
+ os_get_reltime(&now);
+ os_reltime_sub(&now, &wpa_s->scan_start_time, &diff);
+ if (diff.sec < 30) {
+ wpa_dbg(wpa_s, MSG_DEBUG, "Externally triggered scan running - Reschedule the incoming scan req");
+ wpa_supplicant_req_scan(wpa_s, 1, 0);
+ 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");