Commit 1794d7ab authored by Johannes Berg's avatar Johannes Berg
Browse files

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: 0762bdd3 ("wifi: mt76: mt7996: rework mt7996_mac_sta_rc_work to support MLO")
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 90c80211
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2334,7 +2334,6 @@ void mt7996_mac_sta_rc_work(struct work_struct *work)

		changed = msta_link->changed;
		msta_link->changed = 0;
		spin_unlock_bh(&dev->mt76.sta_poll_lock);

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

		spin_unlock_bh(&dev->mt76.sta_poll_lock);

		link = (struct mt7996_vif_link *)mlink;

		if (changed & (IEEE80211_RC_SUPP_RATES_CHANGED |