In order to avoid synchronization issues between wake and ps works,
cancel ps_work in mt76_connac_pm_wake routine
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
clear_bit(MT76_STATE_PM, &mphy->state);
out:
- dev->pm.last_activity = jiffies;
mutex_unlock(&dev->pm.mutex);
return err;
if (!mt76_is_mmio(dev))
return 0;
+ cancel_delayed_work_sync(&pm->ps_work);
if (!test_bit(MT76_STATE_PM, &phy->state))
return 0;
clear_bit(MT76_STATE_PM, &mphy->state);
out:
- dev->pm.last_activity = jiffies;
mutex_unlock(&dev->pm.mutex);
if (err)