aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface.c
diff options
context:
space:
mode:
authorAvraham Stern <avraham.stern@intel.com>2016-02-15 14:53:43 (GMT)
committerJouni Malinen <j@w1.fi>2016-02-22 17:53:04 (GMT)
commit9a493fab7302f0cfebf1fa5526a167bf1b80677c (patch)
tree5be65f3b652347991764258d7c25a52622cb6d5b /wpa_supplicant/ctrl_iface.c
parent84d1c0fd5a5d49a29feae6327f6dbd75dd8a251e (diff)
downloadhostap-9a493fab7302f0cfebf1fa5526a167bf1b80677c.zip
hostap-9a493fab7302f0cfebf1fa5526a167bf1b80677c.tar.gz
hostap-9a493fab7302f0cfebf1fa5526a167bf1b80677c.tar.bz2
WNM: Add candidate list to BSS transition query
Add an option to configure a candidate list to BSS transition query ("list" as the second argument to WNM_BSS_QUERY). The candidate list is built from the available scan results. If no updated scan results (< 10 sec) are available, the command fails. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Diffstat (limited to 'wpa_supplicant/ctrl_iface.c')
-rw-r--r--wpa_supplicant/ctrl_iface.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 1960ebc..2ce6127 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -6724,14 +6724,27 @@ static int wpas_ctrl_iface_wnm_sleep(struct wpa_supplicant *wpa_s, char *cmd)
static int wpas_ctrl_iface_wnm_bss_query(struct wpa_supplicant *wpa_s, char *cmd)
{
- int query_reason;
+ int query_reason, list = 0;
query_reason = atoi(cmd);
- wpa_printf(MSG_DEBUG, "CTRL_IFACE: WNM_BSS_QUERY query_reason=%d",
- query_reason);
+ cmd = os_strchr(cmd, ' ');
+ if (cmd) {
+ cmd++;
+ if (os_strncmp(cmd, "list", 4) == 0) {
+ list = 1;
+ } else {
+ wpa_printf(MSG_DEBUG, "WNM Query: Invalid option %s",
+ cmd);
+ return -1;
+ }
+ }
+
+ wpa_printf(MSG_DEBUG,
+ "CTRL_IFACE: WNM_BSS_QUERY query_reason=%d%s",
+ query_reason, list ? " candidate list" : "");
- return wnm_send_bss_transition_mgmt_query(wpa_s, query_reason);
+ return wnm_send_bss_transition_mgmt_query(wpa_s, query_reason, list);
}
#endif /* CONFIG_WNM */