diff --git a/mt7921/mac.c b/mt7921/mac.c index defef349..0744f6e4 100644 --- a/mt7921/mac.c +++ b/mt7921/mac.c @@ -1553,6 +1553,14 @@ void mt7921_pm_power_save_work(struct work_struct *work) dev->fw_assert) goto out; + if (mutex_is_locked(&dev->mt76.mutex)) + /* if mt76 mutex is held we should not put the device + * to sleep since we are currently accessing device + * register map. We need to wait for the next power_save + * trigger. + */ + goto out; + if (time_is_after_jiffies(dev->pm.last_activity + delta)) { delta = dev->pm.last_activity + delta - jiffies; goto out;