]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP MLD: Cancel ap_sta_assoc_timeout for partner links
authorChenming Huang <quic_chenhuan@quicinc.com>
Thu, 13 Feb 2025 03:38:39 +0000 (09:08 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 13 Feb 2025 11:38:44 +0000 (13:38 +0200)
An earlier commit implements a timeout handler to remove unassociated
sta entries. For AP MLD, when a non-AP MLD is associated, the timeout
handler needs to be removed in its partner links, too. The check for
WLAN_STA_ASSOC is supposed to skip such cases in ap_sta_assoc_timeout(),
but it is better to cancel this timeout altogether from all links.

Fixes: 07ee3e8b0eb4 ("Remove STA entries if association is not completed in 60 seconds")
Signed-off-by: Chenming Huang <quic_chenhuan@quicinc.com>
src/ap/hostapd.c

index 0227b8512d08c1f1277ec93b7315960af30e8ab3..3c5653a41f7aaf813e640705669c474abb9f7fe1 100644 (file)
@@ -4089,6 +4089,22 @@ void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
 
        ap_sta_clear_disconnect_timeouts(hapd, sta);
        ap_sta_clear_assoc_timeout(hapd, sta);
+
+#ifdef CONFIG_IEEE80211BE
+       if (ap_sta_is_mld(hapd, sta)) {
+               struct hostapd_data *bss;
+               struct sta_info *lsta;
+
+               for_each_mld_link(bss, hapd) {
+                       if (bss == hapd)
+                               continue;
+                       lsta = ap_get_sta(bss, sta->addr);
+                       if (lsta)
+                               ap_sta_clear_assoc_timeout(bss, lsta);
+               }
+       }
+#endif /* CONFIG_IEEE80211BE */
+
        sta->post_csa_sa_query = 0;
 
 #ifdef CONFIG_P2P