aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_priv.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-12-03 16:27:16 (GMT)
committerJouni Malinen <j@w1.fi>2016-12-03 16:27:16 (GMT)
commit865081c307a20a156f26a2162cff2bfb4685c942 (patch)
treea9ced632e3285f69490c2d4b717ec5db706d1fa6 /wpa_supplicant/wpa_priv.c
parentda818ee5e981fcb9048ef1467c9a66e937eabd38 (diff)
downloadhostap-865081c307a20a156f26a2162cff2bfb4685c942.zip
hostap-865081c307a20a156f26a2162cff2bfb4685c942.tar.gz
hostap-865081c307a20a156f26a2162cff2bfb4685c942.tar.bz2
privsep: Support frequency list for scan requests
Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/wpa_priv.c')
-rw-r--r--wpa_supplicant/wpa_priv.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_priv.c b/wpa_supplicant/wpa_priv.c
index 61d43a6..9b81fc1 100644
--- a/wpa_supplicant/wpa_priv.c
+++ b/wpa_supplicant/wpa_priv.c
@@ -139,6 +139,7 @@ static void wpa_priv_cmd_scan(struct wpa_priv_interface *iface,
struct wpa_driver_scan_params params;
struct privsep_cmd_scan *scan;
unsigned int i;
+ int freqs[PRIVSEP_MAX_SCAN_FREQS + 1];
if (iface->drv_priv == NULL)
return;
@@ -161,6 +162,17 @@ static void wpa_priv_cmd_scan(struct wpa_priv_interface *iface,
params.ssids[i].ssid_len = scan->ssid_lens[i];
}
+ if (scan->num_freqs > PRIVSEP_MAX_SCAN_FREQS) {
+ wpa_printf(MSG_DEBUG, "Invalid scan request (num_freqs)");
+ return;
+ }
+ if (scan->num_freqs) {
+ for (i = 0; i < scan->num_freqs; i++)
+ freqs[i] = scan->freqs[i];
+ freqs[i] = 0;
+ params.freqs = freqs;
+ }
+
if (iface->driver->scan2)
iface->driver->scan2(iface->drv_priv, &params);
}