[PATCH 6/8] WNM: Handle BTM request with "Link Removal Imminent"

Andrei Otcheretianski andrei.otcheretianski at intel.com
Wed Dec 13 06:04:10 PST 2023


From: Ilan Peer <ilan.peer at intel.com>

Based on Draft P802.11be_D3.0, when a station is non-AP MLD with more
then one link and "Link Removal Imminent" is set, the "Disassociation
Imminent" and "BSS Termination Included" can be ignored, as the station
will not be disassociated.

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
 src/common/ieee802_11_defs.h | 11 ++++++-----
 wpa_supplicant/wnm_sta.c     | 14 ++++++++++++++
 2 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h
index cd33f6a8f5..2d865e639c 100644
--- a/src/common/ieee802_11_defs.h
+++ b/src/common/ieee802_11_defs.h
@@ -1880,11 +1880,12 @@ enum wnm_action {
 };
 
 /* IEEE 802.11v - BSS Transition Management Request - Request Mode */
-#define WNM_BSS_TM_REQ_PREF_CAND_LIST_INCLUDED BIT(0)
-#define WNM_BSS_TM_REQ_ABRIDGED BIT(1)
-#define WNM_BSS_TM_REQ_DISASSOC_IMMINENT BIT(2)
-#define WNM_BSS_TM_REQ_BSS_TERMINATION_INCLUDED BIT(3)
-#define WNM_BSS_TM_REQ_ESS_DISASSOC_IMMINENT BIT(4)
+#define WNM_BSS_TM_REQ_PREF_CAND_LIST_INCLUDED   BIT(0)
+#define WNM_BSS_TM_REQ_ABRIDGED                  BIT(1)
+#define WNM_BSS_TM_REQ_DISASSOC_IMMINENT         BIT(2)
+#define WNM_BSS_TM_REQ_BSS_TERMINATION_INCLUDED  BIT(3)
+#define WNM_BSS_TM_REQ_ESS_DISASSOC_IMMINENT     BIT(4)
+#define WNM_BSS_TM_REQ_LINK_REMOVAL_IMMINENT     BIT(5)
 
 /* IEEE Std 802.11-2012 - Table 8-253 */
 enum bss_trans_mgmt_status_code {
diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c
index 493821b37f..bcbd8c04c9 100644
--- a/wpa_supplicant/wnm_sta.c
+++ b/wpa_supplicant/wnm_sta.c
@@ -1479,6 +1479,20 @@ static void ieee802_11_rx_bss_trans_mgmt_req(struct wpa_supplicant *wpa_s,
 	}
 #endif /* CONFIG_MBO && CONFIG_TESTING_OPTIONS */
 
+	/*
+	 * Based on Draft P802.11be_D3.0, when a station is non-AP MLD with more
+	 * then one link and "link removal imminent" is set, the below flags can
+	 * be ignored, as the station will not be disassociated.
+	 */
+	if ((wpa_s->valid_links & (wpa_s->valid_links - 1)) != 0 &&
+	    wpa_s->wnm_mode & WNM_BSS_TM_REQ_LINK_REMOVAL_IMMINENT &&
+	    (wpa_s->wnm_mode & WNM_BSS_TM_REQ_DISASSOC_IMMINENT ||
+	     wpa_s->wnm_mode & WNM_BSS_TM_REQ_BSS_TERMINATION_INCLUDED)) {
+		wpa_printf(MSG_INFO,
+			   "WNM: BTM request for single MLO link. ignore");
+		return;
+	}
+
 	pos += 5;
 
 	if (wpa_s->wnm_mode & WNM_BSS_TM_REQ_BSS_TERMINATION_INCLUDED) {
-- 
2.38.1




More information about the Hostap mailing list