aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wnm_sta.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/wnm_sta.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/wnm_sta.c')
-rw-r--r--wpa_supplicant/wnm_sta.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c
index 3bb3556..0dc41dc 100644
--- a/wpa_supplicant/wnm_sta.c
+++ b/wpa_supplicant/wnm_sta.c
@@ -1165,16 +1165,17 @@ static void ieee802_11_rx_bss_trans_mgmt_req(struct wpa_supplicant *wpa_s,
int wnm_send_bss_transition_mgmt_query(struct wpa_supplicant *wpa_s,
- u8 query_reason)
+ u8 query_reason, int cand_list)
{
- u8 buf[1000], *pos;
+ u8 buf[2000], *pos;
struct ieee80211_mgmt *mgmt;
size_t len;
int ret;
wpa_printf(MSG_DEBUG, "WNM: Send BSS Transition Management Query to "
- MACSTR " query_reason=%u",
- MAC2STR(wpa_s->bssid), query_reason);
+ MACSTR " query_reason=%u%s",
+ MAC2STR(wpa_s->bssid), query_reason,
+ cand_list ? " candidate list" : "");
mgmt = (struct ieee80211_mgmt *) buf;
os_memset(&buf, 0, sizeof(buf));
@@ -1189,6 +1190,9 @@ int wnm_send_bss_transition_mgmt_query(struct wpa_supplicant *wpa_s,
mgmt->u.action.u.bss_tm_query.query_reason = query_reason;
pos = mgmt->u.action.u.bss_tm_query.variable;
+ if (cand_list)
+ pos += wnm_add_cand_list(wpa_s, pos, buf + sizeof(buf) - pos);
+
len = pos - (u8 *) &mgmt->u.action.category;
ret = wpa_drv_send_action(wpa_s, wpa_s->assoc_freq, 0, wpa_s->bssid,