wifi: mt76: mt7921: get rid of the false positive reset
authorSean Wang <sean.wang@mediatek.com>
Sun, 14 Aug 2022 23:37:14 +0000 (07:37 +0800)
committerFelix Fietkau <nbd@nbd.name>
Thu, 15 Sep 2022 10:54:02 +0000 (12:54 +0200)
False positive reset would be possibly triggered by those commands we
applied in suspend with HZ MCU timeout, especially it happened when we
enabled kernel log in pm core to diagnose how much time we spend in each
driver during suspend procedure. So we enlarge the value and align the MCU
timeout as other commands we did to reduce the false positive reset.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7921/pci_mcu.c
drivers/net/wireless/mediatek/mt76/mt7921/sdio_mcu.c
drivers/net/wireless/mediatek/mt76/mt7921/usb.c

index 5efda69..6456853 100644 (file)
@@ -30,12 +30,7 @@ mt7921_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
        if (ret)
                return ret;
 
-       if (cmd == MCU_UNI_CMD(HIF_CTRL) ||
-           cmd == MCU_UNI_CMD(SUSPEND) ||
-           cmd == MCU_UNI_CMD(OFFLOAD))
-               mdev->mcu.timeout = HZ;
-       else
-               mdev->mcu.timeout = 3 * HZ;
+       mdev->mcu.timeout = 3 * HZ;
 
        if (cmd == MCU_CMD(FW_SCATTER))
                txq = MT_MCUQ_FWDL;
index e038d74..5c14897 100644 (file)
@@ -33,12 +33,7 @@ mt7921s_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
        if (ret)
                return ret;
 
-       if (cmd == MCU_UNI_CMD(HIF_CTRL) ||
-           cmd == MCU_UNI_CMD(SUSPEND) ||
-           cmd == MCU_UNI_CMD(OFFLOAD))
-               mdev->mcu.timeout = HZ;
-       else
-               mdev->mcu.timeout = 3 * HZ;
+       mdev->mcu.timeout = 3 * HZ;
 
        if (cmd == MCU_CMD(FW_SCATTER))
                type = MT7921_SDIO_FWDL;
index 07fbe26..29c0ee3 100644 (file)
@@ -106,12 +106,7 @@ mt7921u_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
        if (ret)
                return ret;
 
-       if (cmd == MCU_UNI_CMD(HIF_CTRL) ||
-           cmd == MCU_UNI_CMD(SUSPEND) ||
-           cmd == MCU_UNI_CMD(OFFLOAD))
-               mdev->mcu.timeout = HZ;
-       else
-               mdev->mcu.timeout = 3 * HZ;
+       mdev->mcu.timeout = 3 * HZ;
 
        if (cmd != MCU_CMD(FW_SCATTER))
                ep = MT_EP_OUT_INBAND_CMD;