]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: mac80211: fix STA link removal during link removal
authorJohannes Berg <johannes.berg@intel.com>
Wed, 18 Mar 2026 17:06:22 +0000 (18:06 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 19 Mar 2026 08:06:49 +0000 (09:06 +0100)
ieee80211_sta_free_link() only frees the link and doesn't
unhash it, so it can't be used here. Instead this needs
to use ieee80211_sta_remove_link(), which unhashes it. An
argument against it was that it also calls the driver and
that already happened, but calls to the driver removing a
link that's already removed are suppressed, so that's not
actually an issue. Use it to fix the hashtable.

Reported-and-tested-by: Jouni Malinen <j@w1.fi>
Fixes: 84674b03d8bf ("wifi: mac80211: Remove deleted sta links in ieee80211_ml_reconf_work()")
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20260318180622.9240067117e9.I45fb2b7f04d75e48d2f3e9c6650ef9f54a314f5b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c

index f279bdb03aca5ae0b6670ae32c19160870dfe032..0cd8d07bf668987027727c1fa6557c7afaa7dfef 100644 (file)
@@ -7119,7 +7119,7 @@ static void ieee80211_ml_reconf_work(struct wiphy *wiphy,
 
                for_each_set_bit(link_id, &removed_links,
                                 IEEE80211_MLD_MAX_NUM_LINKS)
-                       ieee80211_sta_free_link(sta, link_id);
+                       ieee80211_sta_remove_link(sta, link_id);
        }
 
        new_dormant_links = sdata->vif.dormant_links & ~sdata->u.mgd.removed_links;