Skip to content

Commit 1794d7a

Browse files
committed
wifi: mt76: mt7996: fix locking in mt7996_mac_sta_rc_work()
The 'continue' statements need to be under spinlock, since the spinlock needs to be held as a loop invariant. Fixes: 0762bdd ("wifi: mt76: mt7996: rework mt7996_mac_sta_rc_work to support MLO") Signed-off-by: Johannes Berg <[email protected]>
1 parent 90c8021 commit 1794d7a

File tree

1 file changed

+2
-1
lines changed
  • drivers/net/wireless/mediatek/mt76/mt7996

1 file changed

+2
-1
lines changed

drivers/net/wireless/mediatek/mt76/mt7996/mac.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2334,7 +2334,6 @@ void mt7996_mac_sta_rc_work(struct work_struct *work)
23342334

23352335
changed = msta_link->changed;
23362336
msta_link->changed = 0;
2337-
spin_unlock_bh(&dev->mt76.sta_poll_lock);
23382337

23392338
sta = wcid_to_sta(&msta_link->wcid);
23402339
link_id = msta_link->wcid.link_id;
@@ -2354,6 +2353,8 @@ void mt7996_mac_sta_rc_work(struct work_struct *work)
23542353
if (!link_conf)
23552354
continue;
23562355

2356+
spin_unlock_bh(&dev->mt76.sta_poll_lock);
2357+
23572358
link = (struct mt7996_vif_link *)mlink;
23582359

23592360
if (changed & (IEEE80211_RC_SUPP_RATES_CHANGED |

0 commit comments

Comments
 (0)