From: Devin Wittmayer <lucid_duck@justthetip.ca>
To: stable@vger.kernel.org
Cc: Felix Fietkau <nbd@nbd.name>,
Wentao Guan <guanwentao@uniontech.com>,
linux-wireless@vger.kernel.org
Subject: [PATCH 7.2.y 1/2] wifi: mt76: mt7925: cancel mlo_pm_work on stop
Date: Wed, 9 Sep 2026 20:11:05 -0700 [thread overview]
Message-ID: <20260910031106.25906-6-lucid_duck@justthetip.ca> (raw)
In-Reply-To: <20260910031106.25906-1-lucid_duck@justthetip.ca>
From: Devin Wittmayer <lucid_duck@justthetip.ca>
commit 81faf578320df2dfc682a96baa6e85851dd68b6f upstream.
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().
Fixes: 276a56883257 ("wifi: mt76: mt7925: update the power-saving flow")
Cc: stable@vger.kernel.org
Tested-by: Traockl <281473483+Traockl@users.noreply.github.com>
Signed-off-by: Devin Wittmayer <lucid_duck@justthetip.ca>
---
Backport note: the upstream message ends "mt7925_ops backs both the PCIe
and USB drivers, so this covers both." That is wrong and I said so on the
list on 28 July. mt7925u_probe() replaces the stop callback with its own,
so this reaches PCIe only. I dropped the sentence instead of carrying it
into three more trees. The USB gap is a separate fix, not yet sent.
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index 2b6cc8e..61c9c30 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -2484,10 +2484,19 @@ static void mt7925_channel_switch_rx_beacon(struct ieee80211_hw *hw,
}
}
+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 = {
.tx = mt792x_tx,
.start = mt7925_start,
- .stop = mt792x_stop,
+ .stop = mt7925_stop,
.add_interface = mt7925_add_interface,
.remove_interface = mt792x_remove_interface,
.config = mt7925_config,
next prev parent reply other threads:[~2026-09-10 3:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 3:11 [PATCH 0/6] wifi: mt76: mt7925: cancel mlo_pm_work at teardown Devin Wittmayer
2026-09-10 3:11 ` [PATCH 6.18.y 1/2] wifi: mt76: mt7925: cancel mlo_pm_work on stop Devin Wittmayer
2026-09-10 3:11 ` [PATCH 6.18.y 2/2] wifi: mt76: mt7925: cancel pending mlo_pm_work Devin Wittmayer
2026-09-10 3:11 ` [PATCH 7.1.y 1/2] wifi: mt76: mt7925: cancel mlo_pm_work on stop Devin Wittmayer
2026-09-10 3:11 ` [PATCH 7.1.y 2/2] wifi: mt76: mt7925: cancel pending mlo_pm_work Devin Wittmayer
2026-09-10 3:11 ` Devin Wittmayer [this message]
2026-09-10 3:11 ` [PATCH 7.2.y " Devin Wittmayer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260910031106.25906-6-lucid_duck@justthetip.ca \
--to=lucid_duck@justthetip.ca \
--cc=guanwentao@uniontech.com \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@nbd.name \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox