]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: mt76: mt7925: Skip scan process during suspend.
authorMichael Lo <michael.lo@mediatek.com>
Mon, 12 Jan 2026 11:40:07 +0000 (19:40 +0800)
committerFelix Fietkau <nbd@nbd.name>
Mon, 23 Mar 2026 09:23:01 +0000 (09:23 +0000)
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>
Link: https://patch.msgid.link/20260112114007.2115873-1-leon.yen@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7925/main.c

index a0a4307652d2c908ce52dc9a87441824be9828ce..4220db3f721603e9526dd224f8df9d9a2166d71a 100644 (file)
@@ -1327,10 +1327,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;