aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Cunningham <joel.cunningham@me.com>2016-12-19 20:22:53 (GMT)
committerJouni Malinen <j@w1.fi>2016-12-21 10:42:20 (GMT)
commit9187b13adb899dac1e8ab062844a84480dfc3bcc (patch)
treeb40736c4150bf17320a298bcd8dcf4dbe94d3ed7
parent969e5250914e627ffb704966f93d2e7cc986ea20 (diff)
downloadhostap-9187b13adb899dac1e8ab062844a84480dfc3bcc.zip
hostap-9187b13adb899dac1e8ab062844a84480dfc3bcc.tar.gz
hostap-9187b13adb899dac1e8ab062844a84480dfc3bcc.tar.bz2
wpa_supplicant: Add BSS CURRENT control interface command
This commit extends the BSS commands to include "BSS CURRENT" as a way to get the current BSS without having to walk the BSS list matching against BSSID+SSID returned from the STATUS command. This returns the BSS stored in wpa_s->current_bss. Signed-off-by: Joel Cunningham <joel.cunningham@me.com>
-rw-r--r--wpa_supplicant/ctrl_iface.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 624e894..fc6fbdb 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -4650,6 +4650,8 @@ static int wpa_supplicant_ctrl_iface_bss(struct wpa_supplicant *wpa_s,
bss = dl_list_entry(next, struct wpa_bss,
list_id);
}
+ } else if (os_strncmp(cmd, "CURRENT", 7) == 0) {
+ bss = wpa_s->current_bss;
#ifdef CONFIG_P2P
} else if (os_strncmp(cmd, "p2p_dev_addr=", 13) == 0) {
if (hwaddr_aton(cmd + 13, bssid) == 0)