mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 05:55:44 +02:00
wifi: mt76: Move mt76_abort_scan out of mt76_reset_device()
Move mt76_abort_scan routine out of mt76_reset_device() in order to
avoid a possible deadlock since mt76_reset_device routine is running
with mt76 mutex help and mt76_abort_scan_complete() can grab mt76 mutex
in some cases.
Fixes: b36d556102 ("wifi: mt76: abort scan/roc on hw restart")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Tested-by: Ben Greear <greearb@candelatech.com>
Link: https://patch.msgid.link/20251114-mt76-fix-missing-mtx-v1-3-259ebf11f654@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
a84b172cca
commit
6aaaaeacf1
|
|
@ -850,8 +850,6 @@ void mt76_reset_device(struct mt76_dev *dev)
|
|||
}
|
||||
rcu_read_unlock();
|
||||
|
||||
mt76_abort_scan(dev);
|
||||
|
||||
INIT_LIST_HEAD(&dev->wcid_list);
|
||||
INIT_LIST_HEAD(&dev->sta_poll_list);
|
||||
dev->vif_mask = 0;
|
||||
|
|
|
|||
|
|
@ -1451,6 +1451,8 @@ mt7915_mac_full_reset(struct mt7915_dev *dev)
|
|||
if (ext_phy)
|
||||
cancel_delayed_work_sync(&ext_phy->mac_work);
|
||||
|
||||
mt76_abort_scan(&dev->mt76);
|
||||
|
||||
mutex_lock(&dev->mt76.mutex);
|
||||
for (i = 0; i < 10; i++) {
|
||||
if (!mt7915_mac_restart(dev))
|
||||
|
|
|
|||
|
|
@ -2451,6 +2451,8 @@ mt7996_mac_full_reset(struct mt7996_dev *dev)
|
|||
mt7996_for_each_phy(dev, phy)
|
||||
cancel_delayed_work_sync(&phy->mt76->mac_work);
|
||||
|
||||
mt76_abort_scan(&dev->mt76);
|
||||
|
||||
mutex_lock(&dev->mt76.mutex);
|
||||
for (i = 0; i < 10; i++) {
|
||||
if (!mt7996_mac_restart(dev))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user