summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath11k/pci.c
diff options
context:
space:
mode:
authorCarl Huang <cjhuang@codeaurora.org>2020-12-11 20:35:42 +0300
committerKalle Valo <kvalo@codeaurora.org>2020-12-12 07:41:19 +0300
commitfa5917e44ee888732bba5294a9a22c1d54cce393 (patch)
tree27ea4a7748b110c48e1b01d9ae3e249492bad060 /drivers/net/wireless/ath/ath11k/pci.c
parent34fb81e4eb924f73f0b0428c6c8fd3b2b44c518c (diff)
downloadlinux-fa5917e44ee888732bba5294a9a22c1d54cce393.tar.xz
ath11k: hif: implement suspend and resume functions
For suspend support add suspend and resume to HIF layer. These ops are optional and, for example, AHB bus driver does not need to implement these. 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> Link: https://lore.kernel.org/r/1607708150-21066-3-git-send-email-kvalo@codeaurora.org
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/pci.c')
-rw-r--r--drivers/net/wireless/ath/ath11k/pci.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath11k/pci.c b/drivers/net/wireless/ath/ath11k/pci.c
index 818e37c32a85..770cefd53290 100644
--- a/drivers/net/wireless/ath/ath11k/pci.c
+++ b/drivers/net/wireless/ath/ath11k/pci.c
@@ -913,6 +913,24 @@ static void ath11k_pci_power_down(struct ath11k_base *ab)
ath11k_pci_sw_reset(ab_pci->ab, false);
}
+static int ath11k_pci_hif_suspend(struct ath11k_base *ab)
+{
+ struct ath11k_pci *ar_pci = ath11k_pci_priv(ab);
+
+ ath11k_mhi_suspend(ar_pci);
+
+ return 0;
+}
+
+static int ath11k_pci_hif_resume(struct ath11k_base *ab)
+{
+ struct ath11k_pci *ar_pci = ath11k_pci_priv(ab);
+
+ ath11k_mhi_resume(ar_pci);
+
+ return 0;
+}
+
static void ath11k_pci_kill_tasklets(struct ath11k_base *ab)
{
int i;
@@ -997,6 +1015,8 @@ static const struct ath11k_hif_ops ath11k_pci_hif_ops = {
.write32 = ath11k_pci_write32,
.power_down = ath11k_pci_power_down,
.power_up = ath11k_pci_power_up,
+ .suspend = ath11k_pci_hif_suspend,
+ .resume = ath11k_pci_hif_resume,
.irq_enable = ath11k_pci_ext_irq_enable,
.irq_disable = ath11k_pci_ext_irq_disable,
.get_msi_address = ath11k_pci_get_msi_address,