aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/mbo.c
diff options
context:
space:
mode:
authorKanchanapally, Vidyullatha <vkanchan@qti.qualcomm.com>2017-03-06 11:46:00 (GMT)
committerJouni Malinen <j@w1.fi>2017-03-06 22:34:14 (GMT)
commitaf8bc24da37c340e17417317d7d97f1ea2ef0dc3 (patch)
tree9a5598d82f2e69eef3d3eff4659ba734c92d8890 /wpa_supplicant/mbo.c
parent3ab484928a892d806a2c1349606eed47a8eccd40 (diff)
downloadhostap-af8bc24da37c340e17417317d7d97f1ea2ef0dc3.zip
hostap-af8bc24da37c340e17417317d7d97f1ea2ef0dc3.tar.gz
hostap-af8bc24da37c340e17417317d7d97f1ea2ef0dc3.tar.bz2
MBO: Add support for transition reject reason code
Add support for rejecting a BSS transition request using MBO reject reason codes. A candidate is selected or rejected based on whether it is found acceptable by both wpa_supplicant and the driver. Also accept any candidate meeting a certain threshold if disassoc imminent is set in BTM Request frame. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/mbo.c')
-rw-r--r--wpa_supplicant/mbo.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/wpa_supplicant/mbo.c b/wpa_supplicant/mbo.c
index 3edfd27..5488f44 100644
--- a/wpa_supplicant/mbo.c
+++ b/wpa_supplicant/mbo.c
@@ -382,7 +382,7 @@ void wpas_mbo_scan_ie(struct wpa_supplicant *wpa_s, struct wpabuf *ie)
void wpas_mbo_ie_trans_req(struct wpa_supplicant *wpa_s, const u8 *mbo_ie,
size_t len)
{
- const u8 *pos, *cell_pref = NULL, *reason = NULL;
+ const u8 *pos, *cell_pref = NULL;
u8 id, elen;
u16 disallowed_sec = 0;
@@ -417,7 +417,8 @@ void wpas_mbo_ie_trans_req(struct wpa_supplicant *wpa_s, const u8 *mbo_ie,
if (elen != 1)
goto fail;
- reason = pos;
+ wpa_s->wnm_mbo_trans_reason_present = 1;
+ wpa_s->wnm_mbo_transition_reason = *pos;
break;
case MBO_ATTR_ID_ASSOC_RETRY_DELAY:
if (elen != 2)
@@ -460,9 +461,9 @@ void wpas_mbo_ie_trans_req(struct wpa_supplicant *wpa_s, const u8 *mbo_ie,
wpa_msg(wpa_s, MSG_INFO, MBO_CELL_PREFERENCE "preference=%u",
*cell_pref);
- if (reason)
+ if (wpa_s->wnm_mbo_trans_reason_present)
wpa_msg(wpa_s, MSG_INFO, MBO_TRANSITION_REASON "reason=%u",
- *reason);
+ wpa_s->wnm_mbo_transition_reason);
if (disallowed_sec && wpa_s->current_bss)
wpa_bss_tmp_disallow(wpa_s, wpa_s->current_bss->bssid,