Signed-off-by: Bartosz Markowski <bartosz.markow...@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.c |   25 +++++++++++++++++++++++++
 drivers/net/wireless/ath/ath10k/core.h |    3 +++
 drivers/net/wireless/ath/ath10k/pci.c  |    6 +++---
 drivers/net/wireless/ath/ath10k/wmi.c  |    7 -------
 4 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c 
b/drivers/net/wireless/ath/ath10k/core.c
index 213c851..a1c4312 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -663,6 +663,31 @@ void ath10k_core_unregister(struct ath10k *ar)
 }
 EXPORT_SYMBOL(ath10k_core_unregister);
 
+#if defined(CONFIG_PM_SLEEP)
+int ath10k_pdev_suspend_target(struct ath10k *ar) {
+       int ret;
+
+       ath10k_dbg(ATH10K_DBG_CORE, "%s: called", __func__);
+
+       ret = ath10k_wmi_pdev_suspend_target(ar);
+
+       return ret;
+}
+EXPORT_SYMBOL(ath10k_pdev_suspend_target);
+
+int ath10k_pdev_resume_target(struct ath10k *ar) {
+
+       int ret;
+
+       ath10k_dbg(ATH10K_DBG_CORE, "%s: called", __func__);
+
+       ret = ath10k_wmi_pdev_resume_target(ar);
+
+       return ret;
+}
+EXPORT_SYMBOL(ath10k_pdev_resume_target);
+#endif
+
 MODULE_AUTHOR("Qualcomm Atheros");
 MODULE_DESCRIPTION("Core module for AR9888 PCIe devices.");
 MODULE_LICENSE("Dual BSD/GPL");
diff --git a/drivers/net/wireless/ath/ath10k/core.h 
b/drivers/net/wireless/ath/ath10k/core.h
index 193ac31..00cf53a 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -370,5 +370,8 @@ void ath10k_core_destroy(struct ath10k *ar);
 int ath10k_core_register(struct ath10k *ar);
 void ath10k_core_unregister(struct ath10k *ar);
 
+int ath10k_pdev_suspend_target(struct ath10k *ar);
+int ath10k_pdev_resume_target(struct ath10k *ar);
+
 void ath10k_remain_on_channel_reset(unsigned long ptr);
 #endif /* _CORE_H_ */
diff --git a/drivers/net/wireless/ath/ath10k/pci.c 
b/drivers/net/wireless/ath/ath10k/pci.c
index ce77f9f..2f141fea 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -2420,7 +2420,7 @@ static int ath10k_pci_suspend(struct device *device)
        if (!ar_pci)
                return -ENODEV;
 
-       if (!ath10k_wmi_pdev_suspend_target(ar)) {
+       if (!ath10k_pdev_suspend_target(ar)) {
                left = wait_event_interruptible_timeout(ar->event_queue,
                                        ar->is_target_paused == true,
                                        1 * HZ);
@@ -2490,9 +2490,9 @@ static int ath10k_pci_resume(struct device *device)
                        pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
        }
 
-       ret = ath10k_wmi_pdev_resume_target(ar);
+       ret = ath10k_pdev_resume_target(ar);
        if (ret)
-               ath10k_warn("ath10k_wmi_pdev_resume_target: %d\n", ret);
+               ath10k_warn("target resume failed: %d\n", ret);
 
        return ret;
 }
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c 
b/drivers/net/wireless/ath/ath10k/wmi.c
index 08ad148..9a2bfab 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -1229,19 +1229,13 @@ int ath10k_wmi_pdev_suspend_target(struct ath10k *ar)
        cmd = (void *)skb->data;
        cmd->suspend_opt = WMI_PDEV_SUSPEND;
 
-       ath10k_dbg(ATH10K_DBG_WMI, "%s: called", __func__);
-
        return ath10k_wmi_cmd_send(ar, skb, WMI_PDEV_SUSPEND_CMDID);
 }
-EXPORT_SYMBOL(ath10k_wmi_pdev_suspend_target);
-
 
 int ath10k_wmi_pdev_resume_target(struct ath10k *ar)
 {
        struct sk_buff *skb;
 
-       ath10k_dbg(ATH10K_DBG_WMI, "%s: called", __func__);
-
        skb = ath10k_wmi_alloc_skb(0);
        if (skb == NULL) {
                ath10k_warn("%s: ath10k_wmi_alloc_skb() failed\n", __func__);
@@ -1250,7 +1244,6 @@ int ath10k_wmi_pdev_resume_target(struct ath10k *ar)
 
        return ath10k_wmi_cmd_send(ar, skb, WMI_PDEV_RESUME_CMDID);
 }
-EXPORT_SYMBOL(ath10k_wmi_pdev_resume_target);
 #endif /* CONFIG_PM_SLEEP */
 
 int ath10k_wmi_pdev_set_param(struct ath10k *ar, enum wmi_pdev_param id,
-- 
1.7.10

_______________________________________________
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Reply via email to