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:
Lorenzo Bianconi
2021-04-21 13:49:02 +02:00
committed by Felix Fietkau
parent 0562380659
commit acfa78df57
6 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -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
View File
@@ -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)