From: Leon Yen <leon.yen@mediatek.com>
To: <nbd@nbd.name>, <lorenzo@kernel.org>
Cc: <linux-wireless@vger.kernel.org>,
<linux-mediatek@lists.infradead.org>, <deren.wu@mediatek.com>,
<sean.wang@mediatek.com>, <mingyen.hsieh@mediatek.com>,
<michael.lo@mediatek.com>, <allan.wang@mediatek.com>,
<quan.zhou@mediatek.com>, <sarick.jiang@mediatek.com>,
<ryder.lee@mediatek.com>, <shayne.chen@mediatek.com>,
<leon.yen@mediatek.com>
Subject: [PATCH] wifi: mt76: mt7925: Skip scan process during suspend.
Date: Mon, 12 Jan 2026 19:40:07 +0800 [thread overview]
Message-ID: <20260112114007.2115873-1-leon.yen@mediatek.com> (raw)
From: Michael Lo <michael.lo@mediatek.com>
We are experiencing command timeouts because an upper layer triggers
an unexpected scan while the system/device is in suspend.
The upper layer should not initiate scans until the NIC has fully resumed.
We want to prevent scans during suspend and avoid timeouts without harming
power management or user experience.
Signed-off-by: Michael Lo <michael.lo@mediatek.com>
---
drivers/net/wireless/mediatek/mt76/mt7925/main.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index 2d358a96640c..38474cd2c38d 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -1323,10 +1323,18 @@ void mt7925_mlo_pm_work(struct work_struct *work)
void mt7925_scan_work(struct work_struct *work)
{
struct mt792x_phy *phy;
+ struct mt792x_dev *dev;
+ struct mt76_connac_pm *pm;
phy = (struct mt792x_phy *)container_of(work, struct mt792x_phy,
scan_work.work);
+ dev = phy->dev;
+ pm = &dev->pm;
+
+ if (pm->suspended)
+ return;
+
while (true) {
struct sk_buff *skb;
struct tlv *tlv;
--
2.45.2
reply other threads:[~2026-01-12 11:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260112114007.2115873-1-leon.yen@mediatek.com \
--to=leon.yen@mediatek.com \
--cc=allan.wang@mediatek.com \
--cc=deren.wu@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=michael.lo@mediatek.com \
--cc=mingyen.hsieh@mediatek.com \
--cc=nbd@nbd.name \
--cc=quan.zhou@mediatek.com \
--cc=ryder.lee@mediatek.com \
--cc=sarick.jiang@mediatek.com \
--cc=sean.wang@mediatek.com \
--cc=shayne.chen@mediatek.com \
/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