From 7a873c81eecf4dc20ca93623e0e7ec031f729a36 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 16 Dec 2023 19:44:16 +0200 Subject: [PATCH] AP MLD: Do not schedule disconnection on BSS TM Request link removal If the BSS TM Request for imminent BSS temoval is for a non-AP MLD that has multiple affiliated links, do not schedule full disconnection since other links remain associated. Signed-off-by: Jouni Malinen --- src/ap/wnm_ap.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/ap/wnm_ap.c b/src/ap/wnm_ap.c index e833b5895..b5ce1d5ee 100644 --- a/src/ap/wnm_ap.c +++ b/src/ap/wnm_ap.c @@ -1029,6 +1029,26 @@ int wnm_send_bss_tm_req(struct hostapd_data *hapd, struct sta_info *sta, os_free(buf); if (disassoc_timer) { +#ifdef CONFIG_IEEE80211BE + if (hapd->conf->mld_ap && sta->mld_info.mld_sta) { + int i; + unsigned int links = 0; + + for (i = 0; i < MAX_NUM_MLD_LINKS; i++) { + if (sta->mld_info.links[i].valid) + links++; + } + + if (links > 1) { + wpa_printf(MSG_DEBUG, + "WNM: Only terminating one link - other links remains associated for " + MACSTR, + MAC2STR(sta->mld_info.common_info.mld_addr)); + return 0; + } + } +#endif /* CONFIG_IEEE80211BE */ + /* send disassociation frame after time-out */ set_disassoc_timer(hapd, sta, disassoc_timer); }