mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: connac: use waitqueue for runtime-pm
Simplify the code using a wait_queue_head_t instead of a completion to wait the chip is fully awake in mt76_connac_pm_wake routine Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
0562380659
commit
acfa78df57
+1
-1
@@ -508,7 +508,7 @@ void mt7615_init_device(struct mt7615_dev *dev)
|
||||
INIT_WORK(&dev->pm.wake_work, mt7615_pm_wake_work);
|
||||
spin_lock_init(&dev->pm.wake.lock);
|
||||
mutex_init(&dev->pm.mutex);
|
||||
init_completion(&dev->pm.wake_cmpl);
|
||||
init_waitqueue_head(&dev->pm.wait);
|
||||
spin_lock_init(&dev->pm.txq_lock);
|
||||
set_bit(MT76_STATE_PM, &dev->mphy.state);
|
||||
INIT_DELAYED_WORK(&dev->mphy.mac_work, mt7615_mac_work);
|
||||
|
||||
+1
-1
@@ -1919,7 +1919,7 @@ void mt7615_pm_wake_work(struct work_struct *work)
|
||||
}
|
||||
|
||||
ieee80211_wake_queues(mphy->hw);
|
||||
complete_all(&dev->pm.wake_cmpl);
|
||||
wake_up(&dev->pm.wait);
|
||||
}
|
||||
|
||||
void mt7615_pm_power_save_work(struct work_struct *work)
|
||||
|
||||
Reference in New Issue
Block a user