wifi: mt76: mt7925: cancel mlo_pm_work on stop

mt7925 queues mlo_pm_work with a 5 second delay during multi-link
power-save setup and never cancels it on the stop path. If the device is
torn down inside that window, the work outlives the teardown and its timer
fires afterwards, trying to queue onto the workqueue that is already gone:

  workqueue: cannot queue mt7925_mlo_pm_work [mt7925_common] on wq phy0
  WARNING: kernel/workqueue.c:2283 at __queue_work+0x59/0xa0, CPU#1: swapper/1/0
   call_timer_fn+0x2a/0x140
   __run_timers+0x203/0x330
   run_timer_softirq+0x86/0xf0

mt7921 already has its own stop callback, so add one for mt7925 that
cancels the work before calling mt792x_stop(). mt7925_ops backs both the
PCIe and USB drivers, so this covers both.

Fixes: 276a56883257 ("wifi: mt76: mt7925: update the power-saving flow")
Cc: [email protected]
Tested-by: Traockl <[email protected]>
Signed-off-by: Devin Wittmayer <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Devin Wittmayer
2026-07-21 15:34:31 +02:00
committed by Felix Fietkau
parent 29d3554195
commit c28c7e50b4
+10 -1
View File
@@ -2519,10 +2519,19 @@ static void mt7925_sta_pre_rcu_remove(struct ieee80211_hw *hw,
mutex_unlock(&dev->mutex); mutex_unlock(&dev->mutex);
} }
static void mt7925_stop(struct ieee80211_hw *hw, bool suspend)
{
struct mt792x_dev *dev = mt792x_hw_dev(hw);
cancel_delayed_work_sync(&dev->mlo_pm_work);
mt792x_stop(hw, suspend);
}
const struct ieee80211_ops mt7925_ops = { const struct ieee80211_ops mt7925_ops = {
.tx = mt792x_tx, .tx = mt792x_tx,
.start = mt7925_start, .start = mt7925_start,
.stop = mt792x_stop, .stop = mt7925_stop,
.add_interface = mt7925_add_interface, .add_interface = mt7925_add_interface,
.remove_interface = mt792x_remove_interface, .remove_interface = mt792x_remove_interface,
.config = mt7925_config, .config = mt7925_config,