aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/scan.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2017-02-25 17:15:24 (GMT)
committerJouni Malinen <j@w1.fi>2017-02-26 10:05:40 (GMT)
commit88a447556e4d36f5390a78f508cbe9a3497145bf (patch)
tree260d1cc380ce2f8f6dbdf60b2be432c1ef09d2cb /wpa_supplicant/scan.c
parentd02989f2e454d4494276026c830d0eaf2d4eeeb9 (diff)
downloadhostap-88a447556e4d36f5390a78f508cbe9a3497145bf.zip
hostap-88a447556e4d36f5390a78f508cbe9a3497145bf.tar.gz
hostap-88a447556e4d36f5390a78f508cbe9a3497145bf.tar.bz2
Fix SELECT_NETWORK freq parameter
This functionality was originally added in commit 204c9ac4eed9f0ad69497f2efcd0d095dfd6e61c ('Extend select_network command with freq= to reduce scan time') re-using wpa_s->manual_scan_freqs and MANUAL_SCAN_REQ. That got broken when commit 35d403096eb63c787bd736dd8ba0902c34398fa8 ('Set NORMAL_SCAN_REQ on SELECT_NETWORK/ENABLE_NETWORK') started overriding wpa_s->scan_req for SELECT_NETWORK. Fix this by adding a new scan frequency list specifically for SELECT_NETWORK so that this does not need to depend on any specific wpa_s->scan_req value. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/scan.c')
-rw-r--r--wpa_supplicant/scan.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index 3a100cd..f3ff4cd 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -1018,6 +1018,13 @@ ssid_list_set:
wpa_s->manual_scan_freqs = NULL;
}
+ if (params.freqs == NULL && wpa_s->select_network_scan_freqs) {
+ wpa_dbg(wpa_s, MSG_DEBUG,
+ "Limit select_network scan to specified channels");
+ params.freqs = wpa_s->select_network_scan_freqs;
+ wpa_s->select_network_scan_freqs = NULL;
+ }
+
if (params.freqs == NULL && wpa_s->next_scan_freqs) {
wpa_dbg(wpa_s, MSG_DEBUG, "Optimize scan based on previously "
"generated frequency list");