]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: mac80211: Remove deleted sta links in ieee80211_ml_reconf_work()
authorLorenzo Bianconi <lorenzo@kernel.org>
Mon, 9 Mar 2026 08:28:28 +0000 (09:28 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 13 Mar 2026 06:13:46 +0000 (07:13 +0100)
Delete stale station links announced in the reconfiguration IE
transmitted by the AP in the beacon frames.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20260309-mac80211-reconf-remove-sta-link-v2-1-1582aac720c6@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c

index 479bb76ec114321cd9bbb5c44bb71f95bba797de..f279bdb03aca5ae0b6670ae32c19160870dfe032 100644 (file)
@@ -7076,6 +7076,7 @@ static void ieee80211_ml_reconf_work(struct wiphy *wiphy,
                container_of(work, struct ieee80211_sub_if_data,
                             u.mgd.ml_reconf_work.work);
        u16 new_valid_links, new_active_links, new_dormant_links;
+       struct sta_info *sta;
        int ret;
 
        if (!sdata->u.mgd.removed_links)
@@ -7111,6 +7112,16 @@ static void ieee80211_ml_reconf_work(struct wiphy *wiphy,
                }
        }
 
+       sta = sta_info_get(sdata, sdata->vif.cfg.ap_addr);
+       if (sta) {
+               unsigned long removed_links = sdata->u.mgd.removed_links;
+               unsigned int link_id;
+
+               for_each_set_bit(link_id, &removed_links,
+                                IEEE80211_MLD_MAX_NUM_LINKS)
+                       ieee80211_sta_free_link(sta, link_id);
+       }
+
        new_dormant_links = sdata->vif.dormant_links & ~sdata->u.mgd.removed_links;
 
        ret = ieee80211_vif_set_links(sdata, new_valid_links,