aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface.c
diff options
context:
space:
mode:
authorAvraham Stern <avraham.stern@intel.com>2017-03-08 12:37:40 (GMT)
committerJouni Malinen <j@w1.fi>2017-03-11 08:47:28 (GMT)
commit15ab61eda0217a4761d1a9bb85c6d525c775bcbd (patch)
tree936cb4d77142b30befd02c6d0c8ec7bc20ae5d67 /wpa_supplicant/ctrl_iface.c
parente044a9d1e0b23c1d8193065469983374505acaf2 (diff)
downloadhostap-15ab61eda0217a4761d1a9bb85c6d525c775bcbd.zip
hostap-15ab61eda0217a4761d1a9bb85c6d525c775bcbd.tar.gz
hostap-15ab61eda0217a4761d1a9bb85c6d525c775bcbd.tar.bz2
WNM: Add option to configure candidates for BTM query candidate list
Add a mechanism to configure the candidates for BTM query candidate list manually. This can be used to verify AP behavior for various candidates preferences. usage: wnm_bss_query <reason> [neighbor=<BSSID>,<BSSID information>, <operating class>,<channel number>, <PHY type>[,<hexdump of optional subelements>]] Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Diffstat (limited to 'wpa_supplicant/ctrl_iface.c')
-rw-r--r--wpa_supplicant/ctrl_iface.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 08348d2..95cae13 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -7157,26 +7157,25 @@ 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, list = 0;
+ char *btm_candidates = NULL;
query_reason = atoi(cmd);
cmd = os_strchr(cmd, ' ');
if (cmd) {
- cmd++;
- if (os_strncmp(cmd, "list", 4) == 0) {
+ if (os_strncmp(cmd, " list", 5) == 0)
list = 1;
- } else {
- wpa_printf(MSG_DEBUG, "WNM Query: Invalid option %s",
- cmd);
- return -1;
- }
+ else
+ btm_candidates = cmd;
}
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, list);
+ return wnm_send_bss_transition_mgmt_query(wpa_s, query_reason,
+ btm_candidates,
+ list);
}
#endif /* CONFIG_WNM */