From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless@vger.kernel.org
Cc: Lorenzo Bianconi <lorenzo@kernel.org>,
Johannes Berg <johannes.berg@intel.com>, Jouni Malinen <j@w1.fi>
Subject: [PATCH wireless-next] wifi: mac80211: fix STA link removal during link removal
Date: Wed, 18 Mar 2026 18:06:22 +0100 [thread overview]
Message-ID: <20260318180622.9240067117e9.I45fb2b7f04d75e48d2f3e9c6650ef9f54a314f5b@changeid> (raw)
From: Johannes Berg <johannes.berg@intel.com>
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()")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/mlme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index f279bdb03aca..0cd8d07bf668 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -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;
--
2.53.0
next reply other threads:[~2026-03-18 17:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 17:06 Johannes Berg [this message]
2026-03-18 17:24 ` [PATCH wireless-next] wifi: mac80211: fix STA link removal during link removal Lorenzo Bianconi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260318180622.9240067117e9.I45fb2b7f04d75e48d2f3e9c6650ef9f54a314f5b@changeid \
--to=johannes@sipsolutions.net \
--cc=j@w1.fi \
--cc=johannes.berg@intel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox