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>
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;