aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface.c
diff options
context:
space:
mode:
authorAshwini Patil <c_apati@qti.qualcomm.com>2017-05-11 07:52:00 (GMT)
committerJouni Malinen <j@w1.fi>2017-07-04 23:02:32 (GMT)
commit267fc0dd336e8406891e552912a79bf7272ca2e6 (patch)
treed230adb977e90ee6f54888e01b3f4bfa0d251823 /wpa_supplicant/ctrl_iface.c
parent854d0de3d7c3205d272e2ce2035f1cc16ac99f7e (diff)
downloadhostap-267fc0dd336e8406891e552912a79bf7272ca2e6.zip
hostap-267fc0dd336e8406891e552912a79bf7272ca2e6.tar.gz
hostap-267fc0dd336e8406891e552912a79bf7272ca2e6.tar.bz2
Add wpa_supplicant ctrl iface support to scan for a specific BSSID
Add support to scan for a specific BSSID through the wpa_supplicant control interface. Usage: wpa_cli scan bssid=ab:bc:cd:de:ef:12 Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/ctrl_iface.c')
-rw-r--r--wpa_supplicant/ctrl_iface.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 710489d..5bd9d08 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -7991,6 +7991,19 @@ static void wpas_ctrl_scan(struct wpa_supplicant *wpa_s, char *params,
goto done;
}
+ pos = os_strstr(params, "bssid=");
+ if (pos) {
+ u8 bssid[ETH_ALEN];
+
+ pos += 6;
+ if (hwaddr_aton(pos, bssid)) {
+ wpa_printf(MSG_ERROR, "Invalid BSSID %s", pos);
+ *reply_len = -1;
+ goto done;
+ }
+ os_memcpy(wpa_s->next_scan_bssid, bssid, ETH_ALEN);
+ }
+
pos = params;
while (pos && *pos != '\0') {
if (os_strncmp(pos, "ssid ", 5) == 0) {