]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP MLD: Do not schedule disconnection on BSS TM Request link removal
authorJouni Malinen <j@w1.fi>
Sat, 16 Dec 2023 17:44:16 +0000 (19:44 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 16 Dec 2023 17:46:41 +0000 (19:46 +0200)
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 <j@w1.fi>
src/ap/wnm_ap.c

index e833b5895b9323268bb3d21a1011569db8d0d244..b5ce1d5ee688abb860e8e1dae4b752b0c11692db 100644 (file)
@@ -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);
        }