Message ID | 1607708150-21066-2-git-send-email-kvalo@codeaurora.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 34fb81e4eb924f73f0b0428c6c8fd3b2b44c518c |
Delegated to: | Kalle Valo |
Headers | show |
Series | ath11k: suspend support for QCA6390 PCI | expand |
Kalle Valo <kvalo@codeaurora.org> wrote: > MHI suspend and resume isn't hooked in ath11k yet, so hook these > functions needed for suspend support. > > Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 > > Signed-off-by: Carl Huang <cjhuang@codeaurora.org> > Signed-off-by: Kalle Valo <kvalo@codeaurora.org> 10 patches applied to ath-next branch of ath.git, thanks. 34fb81e4eb92 ath11k: mhi: hook suspend and resume fa5917e44ee8 ath11k: hif: implement suspend and resume functions f6fa37a4928f ath11k: pci: read select_window register to ensure write is finished d50370c953bc ath11k: htc: remove unused struct ath11k_htc_ops 8733d835ec43 ath11k: htc: implement suspend handling 840c36fa727a ath11k: dp: stop rx pktlog before suspend 2151ffde188a ath11k: set credit_update flag for flow controlled ep only 79802b13a492 ath11k: implement WoW enable and wakeup commands d578ec2a0d5c ath11k: hif: add ce irq enable and disable functions d1b0c33850d2 ath11k: implement suspend for QCA6390 PCI devices
diff --git a/drivers/net/wireless/ath/ath11k/mhi.c b/drivers/net/wireless/ath/ath11k/mhi.c index 4cf093718888..72aa39afc04c 100644 --- a/drivers/net/wireless/ath/ath11k/mhi.c +++ b/drivers/net/wireless/ath/ath11k/mhi.c @@ -418,8 +418,10 @@ static int ath11k_mhi_set_state(struct ath11k_pci *ab_pci, ret = 0; break; case ATH11K_MHI_SUSPEND: + ret = mhi_pm_suspend(ab_pci->mhi_ctrl); break; case ATH11K_MHI_RESUME: + ret = mhi_pm_resume(ab_pci->mhi_ctrl); break; case ATH11K_MHI_TRIGGER_RDDM: ret = mhi_force_rddm_mode(ab_pci->mhi_ctrl); @@ -470,3 +472,12 @@ void ath11k_mhi_stop(struct ath11k_pci *ab_pci) ath11k_mhi_set_state(ab_pci, ATH11K_MHI_DEINIT); } +void ath11k_mhi_suspend(struct ath11k_pci *ab_pci) +{ + ath11k_mhi_set_state(ab_pci, ATH11K_MHI_SUSPEND); +} + +void ath11k_mhi_resume(struct ath11k_pci *ab_pci) +{ + ath11k_mhi_set_state(ab_pci, ATH11K_MHI_RESUME); +} diff --git a/drivers/net/wireless/ath/ath11k/mhi.h b/drivers/net/wireless/ath/ath11k/mhi.h index a7fd5e201d18..488dada5d31c 100644 --- a/drivers/net/wireless/ath/ath11k/mhi.h +++ b/drivers/net/wireless/ath/ath11k/mhi.h @@ -36,4 +36,7 @@ void ath11k_mhi_unregister(struct ath11k_pci *ar_pci); void ath11k_mhi_set_mhictrl_reset(struct ath11k_base *ab); void ath11k_mhi_clear_vector(struct ath11k_base *ab); +void ath11k_mhi_suspend(struct ath11k_pci *ar_pci); +void ath11k_mhi_resume(struct ath11k_pci *ar_pci); + #endif