aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-12-26 14:52:55 (GMT)
committerJouni Malinen <j@w1.fi>2013-12-26 16:27:48 (GMT)
commit88c2d4886062c5cd0fa6d03b7795c70abaf5324c (patch)
treefd797db4c63780396be04834905a3389fbb8629b /wpa_supplicant/ctrl_iface.c
parent3ae3ec2727808d0e57ad189fb536abb7e6f5a081 (diff)
downloadhostap-88c2d4886062c5cd0fa6d03b7795c70abaf5324c.zip
hostap-88c2d4886062c5cd0fa6d03b7795c70abaf5324c.tar.gz
hostap-88c2d4886062c5cd0fa6d03b7795c70abaf5324c.tar.bz2
Allow passive scan to be requested with SCAN passive=1
This allows external programs to request wpa_supplicant to execute a passive scan (i.e., do not send any Probe Request frames). Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/ctrl_iface.c')
-rw-r--r--wpa_supplicant/ctrl_iface.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index e424c6f..8518d4b 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -5263,6 +5263,8 @@ static void wpas_ctrl_scan(struct wpa_supplicant *wpa_s, char *params,
return;
}
+ wpa_s->manual_scan_passive = 0;
+
if (params) {
if (os_strncasecmp(params, "TYPE=ONLY", 9) == 0)
wpa_s->scan_res_handler = scan_only_handler;
@@ -5272,6 +5274,10 @@ static void wpas_ctrl_scan(struct wpa_supplicant *wpa_s, char *params,
*reply_len = -1;
return;
}
+
+ pos = os_strstr(params, "passive=");
+ if (pos)
+ wpa_s->manual_scan_passive = !!atoi(pos + 8);
} else {
os_free(wpa_s->manual_scan_freqs);
wpa_s->manual_scan_freqs = NULL;