wifi: mac80211: Remove deleted sta links in ieee80211_ml_reconf_work()

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>
This commit is contained in:
Lorenzo Bianconi 2026-03-09 09:28:28 +01:00 committed by Johannes Berg
parent 8bca522588
commit 84674b03d8

View 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,