Skip to content

Commit 7ef4c79

Browse files
Quanzhoucennbd168
authored andcommitted
wifi: mt76: mt7925: Simplify HIF suspend handling to avoid suspend fail
System suspend failures may occur due to inappropriate handling of traffic not idle event by the WiFi driver. The WiFi firmware's traffic not idle indication does not need to be tied to suspend. Fix the flow to ensuring the system can suspend properly. Signed-off-by: Quan Zhou <quan.zhou@mediatek.com> Link: https://patch.msgid.link/34208c7280325f57a651363d339399eb1744d3b7.1740400998.git.quan.zhou@mediatek.com Signed-off-by: Felix Fietkau <nbd@nbd.name>
1 parent cdf8e08 commit 7ef4c79

File tree

1 file changed

+4
-8
lines changed
  • drivers/net/wireless/mediatek/mt76/mt7925

1 file changed

+4
-8
lines changed

drivers/net/wireless/mediatek/mt76/mt7925/mcu.c

+4-8
Original file line numberDiff line numberDiff line change
@@ -348,14 +348,10 @@ mt7925_mcu_handle_hif_ctrl_basic(struct mt792x_dev *dev, struct tlv *tlv)
348348
basic = (struct mt7925_mcu_hif_ctrl_basic_tlv *)tlv;
349349

350350
if (basic->hifsuspend) {
351-
if (basic->hif_tx_traffic_status == HIF_TRAFFIC_IDLE &&
352-
basic->hif_rx_traffic_status == HIF_TRAFFIC_IDLE)
353-
/* success */
354-
dev->hif_idle = true;
355-
else
356-
/* busy */
357-
/* invalid */
358-
dev->hif_idle = false;
351+
dev->hif_idle = true;
352+
if (!(basic->hif_tx_traffic_status == HIF_TRAFFIC_IDLE &&
353+
basic->hif_rx_traffic_status == HIF_TRAFFIC_IDLE))
354+
dev_info(dev->mt76.dev, "Hif traffic not idle.\n");
359355
} else {
360356
dev->hif_resumed = true;
361357
}

0 commit comments

Comments
 (0)