aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEyal Shapira <eyal@wizery.com>2012-10-28 18:18:06 +0200
committerEyal Shapira <eyal@wizery.com>2012-10-29 11:14:08 +0200
commit022c2f963b43baa3fb3f71839c2ff601d0e86424 (patch)
treec79f2511cd206a45329f3c74465eddf3ce861e86
parenta54d554ff1495c6989edc093a468b69666564124 (diff)
downloadexternal_wpa_supplicant_8_ti-022c2f963b43baa3fb3f71839c2ff601d0e86424.zip
external_wpa_supplicant_8_ti-022c2f963b43baa3fb3f71839c2ff601d0e86424.tar.gz
external_wpa_supplicant_8_ti-022c2f963b43baa3fb3f71839c2ff601d0e86424.tar.bz2
Avoid normal scans before sched scan if max_scan_ssids=1 (UPSTREAM)
In the case of max_scan_ssids=1 we may fallback to normal scan if there's a single scan_ssid network. However the normal scan can't add a wildcard SSID to the ssid list as it's limited to a single entry. This delays getting broadcast scan results. Always prefer to do a sched scan in such a case. Signed-off-by: Eyal Shapira <eyal@wizery.com>
-rw-r--r--wpa_supplicant/scan.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index 66fd60d..e50dcfc 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -888,6 +888,7 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s)
need_ssids++;
if (wpa_s->normal_scans < 3 &&
+ wpa_s->max_scan_ssids > 1 &&
(need_ssids <= wpa_s->max_scan_ssids ||
wpa_s->max_scan_ssids >= (int) max_sched_scan_ssids)) {
/*
@@ -896,6 +897,10 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s)
* user space sleep more. We do this only if the normal scan
* has functionality that is suitable for this or if the
* sched_scan does not have better support for multiple SSIDs.
+ * max_scan_ssids=1 is a special case where we'd like to avoid
+ * using normal scan as wpa_supplicant_scan handles this case
+ * differently and doesn't add a wildcard SSID so broadcast scan
+ * results would be delayed.
*/
wpa_dbg(wpa_s, MSG_DEBUG, "Use normal scan instead of "
"sched_scan for initial scans (normal_scans=%d)",