aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface.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/ctrl_iface.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/ctrl_iface.c')
-rw-r--r--wpa_supplicant/ctrl_iface.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index ad7922a..14dcdcd 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -2984,9 +2984,8 @@ static int wpa_supplicant_ctrl_iface_select_network(
if (pos) {
int *freqs = freq_range_to_channel_list(wpa_s, pos + 6);
if (freqs) {
- wpa_s->scan_req = MANUAL_SCAN_REQ;
- os_free(wpa_s->manual_scan_freqs);
- wpa_s->manual_scan_freqs = freqs;
+ os_free(wpa_s->select_network_scan_freqs);
+ wpa_s->select_network_scan_freqs = freqs;
}
}
@@ -7601,6 +7600,8 @@ static void wpa_supplicant_ctrl_iface_flush(struct wpa_supplicant *wpa_s)
wpa_s->disconnected = 0;
os_free(wpa_s->next_scan_freqs);
wpa_s->next_scan_freqs = NULL;
+ os_free(wpa_s->select_network_scan_freqs);
+ wpa_s->select_network_scan_freqs = NULL;
wpa_bss_flush(wpa_s);
if (!dl_list_empty(&wpa_s->bss)) {