[PATCH 13/19] wifi: mt76: mt7925: make WCID cleanup unconditional in sta_remove_links()
Sean Wang
sean.wang at kernel.org
Fri Mar 6 15:22:32 PST 2026
From: Sean Wang <sean.wang at mediatek.com>
Drop the dead pri_link check in mt7925_mac_sta_remove_links() and
perform WCID cleanup unconditionally.
mlink->pri_link is already cleared before the test, making the branch
ineffective. This matches the actual teardown behaviour and simplifies
the remove path.
No functional change intended.
Signed-off-by: Sean Wang <sean.wang at mediatek.com>
---
drivers/net/wireless/mediatek/mt76/mt7925/main.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index 151dc79f7c12..584d989fb4e8 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -1221,10 +1221,8 @@ mt7925_mac_sta_remove_links(struct mt792x_dev *dev, struct ieee80211_vif *vif,
mlink->sta = NULL;
mlink->pri_link = NULL;
- if (link_sta != mlink->pri_link) {
- mt76_wcid_cleanup(mdev, wcid);
- mt76_wcid_mask_clear(mdev->wcid_mask, wcid->idx);
- }
+ mt76_wcid_cleanup(mdev, wcid);
+ mt76_wcid_mask_clear(mdev->wcid_mask, wcid->idx);
if (msta->deflink_id == link_id)
msta->deflink_id = IEEE80211_LINK_UNSPECIFIED;
--
2.43.0
More information about the Linux-mediatek
mailing list