mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +02:00
wifi: mt76: mt7925: resolve link after acquiring mt76 mutex
mt792x_sta_to_link() uses rcu_dereference_protected() and therefore expects mt76.mutex to be held. Move the lookup after mt792x_mutex_acquire() to make the locking explicit and correct. Signed-off-by: Sean Wang <sean.wang@mediatek.com> Link: https://patch.msgid.link/20260306232238.2039675-12-sean.wang@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
cf9db836b1
commit
beec58f369
|
|
@ -1071,11 +1071,11 @@ static void mt7925_mac_link_sta_assoc(struct mt76_dev *mdev,
|
|||
struct mt792x_link_sta *mlink;
|
||||
struct mt792x_sta *msta;
|
||||
|
||||
mt792x_mutex_acquire(dev);
|
||||
|
||||
msta = (struct mt792x_sta *)link_sta->sta->drv_priv;
|
||||
mlink = mt792x_sta_to_link(msta, link_sta->link_id);
|
||||
|
||||
mt792x_mutex_acquire(dev);
|
||||
|
||||
if (ieee80211_vif_is_mld(vif)) {
|
||||
link_conf = mt792x_vif_to_bss_conf(vif, msta->deflink_id);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user