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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ilan Peer <ilan.peer@xxxxxxxxx>

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@xxxxxxxxx>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@xxxxxxxxx>
---
 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


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux