2021-12-24 08:32:59

by Sean Wang

[permalink] [raw]
Subject: [PATCH 1/2] mt76: mt7921e: make dev->fw_assert usage consistent

From: Sean Wang <[email protected]>

Clear dev->fw_assert flag in mt7921s to be consistent with mt7921s driver.

Signed-off-by: Sean Wang <[email protected]>
---
drivers/net/wireless/mediatek/mt76/mt7921/pci_mac.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/pci_mac.c b/drivers/net/wireless/mediatek/mt76/mt7921/pci_mac.c
index 85286cc9add1..a63ef5de5115 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/pci_mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/pci_mac.c
@@ -314,6 +314,7 @@ int mt7921e_mac_reset(struct mt7921_dev *dev)
}
local_bh_enable();

+ dev->fw_assert = false;
clear_bit(MT76_MCU_RESET, &dev->mphy.state);

mt76_wr(dev, MT_WFDMA0_HOST_INT_ENA,
--
2.25.1



2021-12-24 08:33:05

by Sean Wang

[permalink] [raw]
Subject: [PATCH 2/2] mt76: mt7921: forbid the doze mode when coredump is in progress

From: YN Chen <[email protected]>

We forbid the doze mode while the collecting core dump is going because
that doesn't make sense and the firmware possibly stays in the abnormal
state where cannot handle the doze request from the driver anymore until
the WiFi reset procedure is completed.

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: YN Chen <[email protected]>
---
drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
index ec10f95a4649..b2b88130ea8d 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
@@ -1548,7 +1548,8 @@ void mt7921_pm_power_save_work(struct work_struct *work)

delta = dev->pm.idle_timeout;
if (test_bit(MT76_HW_SCANNING, &mphy->state) ||
- test_bit(MT76_HW_SCHED_SCANNING, &mphy->state))
+ test_bit(MT76_HW_SCHED_SCANNING, &mphy->state) ||
+ dev->fw_assert)
goto out;

if (time_is_after_jiffies(dev->pm.last_activity + delta)) {
--
2.25.1