From: Yuvarani V Date: Sun, 1 Jun 2025 17:18:08 +0000 (+0530) Subject: WNM: Disassociate STA only when Link Removal Imminent is 0 in BTM Request frame X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e8fa9551a813aaaaacff4a3408800a58fc03abc;p=thirdparty%2Fhostap.git WNM: Disassociate STA only when Link Removal Imminent is 0 in BTM Request frame 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 --- diff --git a/src/ap/wnm_ap.c b/src/ap/wnm_ap.c index af8cccaef..4f5356961 100644 --- a/src/ap/wnm_ap.c +++ b/src/ap/wnm_ap.c @@ -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;