From def12bef91a34818fa8ab9c0eb0342b677ae2fd7 Mon Sep 17 00:00:00 2001 From: YN Chen Date: Fri, 24 Dec 2021 16:32:49 +0800 Subject: [PATCH] mt76: mt7921: forbid the doze mode when coredump is in progress 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 Signed-off-by: Sean Wang Signed-off-by: YN Chen Signed-off-by: Felix Fietkau --- mt7921/mac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mt7921/mac.c b/mt7921/mac.c index ec10f95a..b2b88130 100644 --- a/mt7921/mac.c +++ b/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)) {