MBO: Add MBO IE to BSS Transition Management Response frame
When rejecting a BSS Transition Management Request frame, add MBO IE to the BSS Transition Management Response frame to specify the transition rejection reason. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Avraham Stern <avraham.stern@intel.com>
This commit is contained in:
parent
dd5999084e
commit
c8082d2b6a
3 changed files with 25 additions and 0 deletions
|
@ -716,3 +716,17 @@ fail:
|
|||
wpa_printf(MSG_DEBUG, "MBO IE parsing failed (id=%u len=%u left=%zu)",
|
||||
id, elen, len);
|
||||
}
|
||||
|
||||
|
||||
size_t wpas_mbo_ie_bss_trans_reject(struct wpa_supplicant *wpa_s, u8 *pos,
|
||||
size_t len,
|
||||
enum mbo_transition_reject_reason reason)
|
||||
{
|
||||
u8 reject_attr[3];
|
||||
|
||||
reject_attr[0] = MBO_ATTR_ID_TRANSITION_REJECT_REASON;
|
||||
reject_attr[1] = 1;
|
||||
reject_attr[2] = reason;
|
||||
|
||||
return mbo_add_ie(pos, len, reject_attr, sizeof(reject_attr));
|
||||
}
|
||||
|
|
|
@ -620,6 +620,14 @@ static void wnm_send_bss_transition_mgmt_resp(
|
|||
pos += ETH_ALEN;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MBO
|
||||
if (status != WNM_BSS_TM_ACCEPT) {
|
||||
pos += wpas_mbo_ie_bss_trans_reject(
|
||||
wpa_s, pos, buf + sizeof(buf) - pos,
|
||||
MBO_TRANSITION_REJECT_REASON_UNSPECIFIED);
|
||||
}
|
||||
#endif /* CONFIG_MBO */
|
||||
|
||||
len = pos - (u8 *) &mgmt->u.action.category;
|
||||
|
||||
res = wpa_drv_send_action(wpa_s, wpa_s->assoc_freq, 0, wpa_s->bssid,
|
||||
|
|
|
@ -1164,6 +1164,9 @@ int wpas_mbo_supp_op_class_ie(struct wpa_supplicant *wpa_s, int freq, u8 *pos,
|
|||
size_t len);
|
||||
void wpas_mbo_ie_trans_req(struct wpa_supplicant *wpa_s, const u8 *ie,
|
||||
size_t len);
|
||||
size_t wpas_mbo_ie_bss_trans_reject(struct wpa_supplicant *wpa_s, u8 *pos,
|
||||
size_t len,
|
||||
enum mbo_transition_reject_reason reason);
|
||||
|
||||
/**
|
||||
* wpa_supplicant_ctrl_iface_ctrl_rsp_handle - Handle a control response
|
||||
|
|
Loading…
Reference in a new issue