wifi: mt76: mt7915: fix sta poll list corruption on hw restart

When ieee80211_restart_hw is called, all interfaces and stations are
recreated. This can lead to corruption in the sta poll list, since
existing entries were not removed before their private data is reset.

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2024-10-17 12:32:27 +02:00
parent 7398c10239
commit 325eb4b419
+5
View File
@@ -1468,6 +1468,11 @@ mt7915_mac_full_reset(struct mt7915_dev *dev)
if (i == 10)
dev_err(dev->mt76.dev, "chip full reset failed\n");
spin_lock_bh(&dev->mt76.sta_poll_lock);
while (!list_empty(&dev->mt76.sta_poll_list))
list_del_init(dev->mt76.sta_poll_list.next);
spin_unlock_bh(&dev->mt76.sta_poll_lock);
ieee80211_restart_hw(mt76_hw(dev));
if (ext_phy)
ieee80211_restart_hw(ext_phy->hw);