Commit 4f9b3aeb authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau
Browse files

mt76: connac: unschedule ps_work in mt76_connac_pm_wake



In order to avoid synchronization issues between wake and ps works,
cancel ps_work in mt76_connac_pm_wake routine

Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent db928f1a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -345,7 +345,6 @@ static int mt7615_mcu_lp_drv_pmctrl(struct mt7615_dev *dev)
	clear_bit(MT76_STATE_PM, &mphy->state);

out:
	dev->pm.last_activity = jiffies;
	mutex_unlock(&dev->pm.mutex);

	return err;
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ int mt76_connac_pm_wake(struct mt76_phy *phy, struct mt76_connac_pm *pm)
	if (!mt76_is_mmio(dev))
		return 0;

	cancel_delayed_work_sync(&pm->ps_work);
	if (!test_bit(MT76_STATE_PM, &phy->state))
		return 0;

+0 −1
Original line number Diff line number Diff line
@@ -1289,7 +1289,6 @@ int mt7921_mcu_drv_pmctrl(struct mt7921_dev *dev)
	clear_bit(MT76_STATE_PM, &mphy->state);

out:
	dev->pm.last_activity = jiffies;
	mutex_unlock(&dev->pm.mutex);

	if (err)