mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: cancel reset and rc work on device unregister
Both drivers cancelled dump_work on unregister but left reset_work and
rc_work to be flushed only by destroy_workqueue() in mt76_free_device(),
which runs after the hw is unregistered and the hardware stopped. A
reset_work that fires in that window calls ieee80211_restart_hw() and
re-arms mac_work on an unregistered hw, and rc_work touches station state
being torn down. Cancel both up front, alongside dump_work.
Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets")
Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -1358,6 +1358,8 @@ free_phy2:
|
||||
void mt7915_unregister_device(struct mt7915_dev *dev)
|
||||
{
|
||||
cancel_work_sync(&dev->dump_work);
|
||||
cancel_work_sync(&dev->reset_work);
|
||||
cancel_work_sync(&dev->rc_work);
|
||||
mt7915_unregister_ext_phy(dev);
|
||||
mt7915_coredump_unregister(dev);
|
||||
mt7915_unregister_thermal(&dev->phy);
|
||||
|
||||
@@ -1822,6 +1822,8 @@ void mt7996_unregister_device(struct mt7996_dev *dev)
|
||||
{
|
||||
cancel_work_sync(&dev->dump_work);
|
||||
cancel_work_sync(&dev->wed_rro.work);
|
||||
cancel_work_sync(&dev->reset_work);
|
||||
cancel_work_sync(&dev->rc_work);
|
||||
mt7996_unregister_phy(mt7996_phy3(dev));
|
||||
mt7996_unregister_phy(mt7996_phy2(dev));
|
||||
mt7996_unregister_thermal(&dev->phy);
|
||||
|
||||
Reference in New Issue
Block a user