Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH mt76-next 01/20] wifi: mt76: mt7925: free the vif links when all links go
@ 2026-11-20 17:44 Felix Fietkau
  2026-11-20 17:44 ` [PATCH mt76-next 02/20] wifi: mt76: mt7925: free removed vif links after an RCU grace period Felix Fietkau
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: Felix Fietkau @ 2026-11-20 17:44 UTC (permalink / raw)
  To: linux-wireless

mac80211 clears vif->valid_links before it calls drv_change_vif_links()
to remove all links of an interface. For an interface without valid
links, mt792x_vif_to_link() and mt792x_sta_to_link() return the
embedded default link, so mt7925_change_vif_links() takes every removed
link for the default link. The other links thus leak at each
disassociation of an MLO station that has an active link other than
the default link.

Look the removed links up in the link arrays of the driver, which do
not depend on vif->valid_links.

Fixes: 69acd6d910b0 ("wifi: mt76: mt7925: add mt7925_change_vif_links")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 drivers/net/wireless/mediatek/mt76/mt7925/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index d7b359930b3c..d892434de54c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -2496,8 +2496,8 @@ mt7925_change_vif_links(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 	mt792x_mutex_acquire(dev);
 
 	for_each_set_bit(link_id, &rem, IEEE80211_MLD_MAX_NUM_LINKS) {
-		mconf = mt792x_vif_to_link(mvif, link_id);
-		mlink = mt792x_sta_to_link(&mvif->sta, link_id);
+		mconf = mt76_dereference(mvif->link_conf[link_id], &dev->mt76);
+		mlink = mt76_dereference(mvif->sta.link[link_id], &dev->mt76);
 
 		if (!mconf || !mlink)
 			continue;
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2026-11-20 17:45 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20 17:44 [PATCH mt76-next 01/20] wifi: mt76: mt7925: free the vif links when all links go Felix Fietkau
2026-11-20 17:44 ` [PATCH mt76-next 02/20] wifi: mt76: mt7925: free removed vif links after an RCU grace period Felix Fietkau
2026-11-20 17:44 ` [PATCH mt76-next 03/20] wifi: mt76: remove a replayed station from the driver before the add Felix Fietkau
2026-11-20 17:44 ` [PATCH mt76-next 04/20] wifi: mt76: mt7925: run the reset link replay under the wiphy lock Felix Fietkau
2026-11-20 17:44 ` [PATCH mt76-next 05/20] wifi: mt76: mt7925: take the mutex before the link_info_changed lookup Felix Fietkau
2026-11-20 17:44 ` [PATCH mt76-next 06/20] wifi: mt76: mt7925: hold the mutex for the link lookup in conf_tx Felix Fietkau
2026-11-20 17:44 ` [PATCH mt76-next 07/20] wifi: mt76: mt7925: skip a polled link without a station Felix Fietkau
2026-11-20 17:44 ` [PATCH mt76-next 08/20] wifi: mt76: mt7925: skip a link without a link conf in the MLO PS update Felix Fietkau
2026-11-20 17:44 ` [PATCH mt76-next 09/20] wifi: mt76: mt7925: restore the beacon filter when monitor mode ends Felix Fietkau
2026-11-20 17:44 ` [PATCH mt76-next 10/20] wifi: mt76: usb: do not park the TX worker again under MT76_RESET Felix Fietkau
2026-11-20 17:44 ` [PATCH mt76-next 11/20] wifi: mt76: mt7925: keep the default link in the active links Felix Fietkau
2026-11-20 17:44 ` [PATCH mt76-next 12/20] wifi: mt76: mt7925: read the monitor state under the mutex for deep sleep Felix Fietkau
2026-11-20 17:44 ` [PATCH mt76-next 13/20] wifi: mt76: clear roc_link before the ROC link is freed Felix Fietkau
2026-11-20 17:44 ` [PATCH mt76-next 14/20] wifi: mt76: mt792x: handle all interfaces of a channel context Felix Fietkau
2026-11-20 17:44 ` [PATCH mt76-next 15/20] wifi: mt76: mt792x: set up the sniffer when a monitor gets its channel Felix Fietkau
2026-11-20 17:44 ` [PATCH mt76-next 16/20] wifi: mt76: buffer Disassociation frames for stations in power save Felix Fietkau
2026-11-20 17:44 ` [PATCH mt76-next 17/20] wifi: mt76: mt7921: read the monitor state under the mutex for deep sleep Felix Fietkau
2026-11-20 17:44 ` [PATCH mt76-next 18/20] wifi: mt76: mt7925: wake the device to unassign a channel context Felix Fietkau
2026-11-20 17:44 ` [PATCH mt76-next 19/20] wifi: mt76: mt7996: keep the firmware log settings across a reload Felix Fietkau
2026-11-20 17:44 ` [PATCH mt76-next 20/20] wifi: mt76: mt7915: " Felix Fietkau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox