Skip to contentSkip to conversation

wifi: mt76: mt7925: Skip scan process during suspend.

PATCH New Leon Yen 1 participant 1 message Jan 12

Subsystems (2)
lore
Share & tools
lore

Leon Yen

author
#0 lore raw

PATCH 1/1 wifi: mt76: mt7925: Skip scan process during suspend.

From: Michael Lo <[email protected]>

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.

---
 drivers/net/wireless/mediatek/mt76/mt7925/main.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/net/wireless/mediatek/mt76/mt7925/main.c +8 -0
index 2d358a96640c..38474cd2c38d 100644
@@ -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;
Signature · 1 line
2.45.2