]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WNM: Disassociate STA only when Link Removal Imminent is 0 in BTM Request frame
authorYuvarani V <yuvarani@qti.qualcomm.com>
Sun, 1 Jun 2025 17:18:08 +0000 (22:48 +0530)
committerJouni Malinen <j@w1.fi>
Sat, 7 Jun 2025 13:41:16 +0000 (16:41 +0300)
When BSS Transition Management (BTM) Request frame is sent by an AP MLD
with disassociation timer set, it is expected to arm disassociation
timer for the STA and eventually disassociate it once the timer expires.

The current code avoids this by assuming that the ML association is not
being terminated and only the link is being removed. However, link
removal is scheduled only when Link Removal Imminent field is set in BTM
request, as per IEEE P802.11be/D7.0 - 9.6.13.9 (BSS Transition
Management Request frame format). If the Link Removal Imminent field in
the Request Mode field is set to 1, the BSS Termination Included field
indicates that the BSS, whose AP transmits this BSS Transition
Management Request frame, is shutting down. In this case, the STA
associated with the AP or the non-AP MLD that has set up only this link
will be disassociated and the non-AP MLD that has set up more than this
link remains associated to the AP MLD with the remaining setup link(s).

Hence, schedule disassociation for STA unless Link Removal Imminent bit
is set to 1 in the BTM Request frame.

Signed-off-by: Yuvarani V <yuvarani@qti.qualcomm.com>
src/ap/wnm_ap.c

index af8cccaefcdeff381c405f5c3b6c9ab2e224c045..4f53569610710d01b5d734f0a64a3ec0bbd0c1e7 100644 (file)
@@ -1030,7 +1030,13 @@ int wnm_send_bss_tm_req(struct hostapd_data *hapd, struct sta_info *sta,
 
        if (disassoc_timer) {
 #ifdef CONFIG_IEEE80211BE
-               if (ap_sta_is_mld(hapd, sta)) {
+               /* Link removal is scheduled only when the Link Removal Imminent
+                * field is set to 1 in BTM as per IEEE P802.11be/D7.0,
+                * 9.6.13.9 (BSS Transition Management Request frame format);
+                * else schedule full disconnection.
+                */
+               if (ap_sta_is_mld(hapd, sta) &&
+                   (req_mode & WNM_BSS_TM_REQ_LINK_REMOVAL_IMMINENT)) {
                        int i;
                        unsigned int links = 0;