* [ath9k-devel] [PATCH v3] ath10k: move suspend/resume exports to core.c file
@ 2013-04-18 11:15 Bartosz Markowski
2013-04-22 8:18 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Bartosz Markowski @ 2013-04-18 11:15 UTC (permalink / raw)
To: ath9k-devel
Signed-off-by: Bartosz Markowski <bartosz.markowski@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 8cbdc04..0e6fd15 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -657,6 +657,31 @@ void ath10k_core_unregister(struct ath10k *ar)
}
EXPORT_SYMBOL(ath10k_core_unregister);
+#if defined(CONFIG_PM_SLEEP)
+int ath10k_core_target_suspend(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_core_target_suspend);
+
+int ath10k_core_target_resume(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_core_target_resume);
+#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 f47b2a0..60958ba 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -369,4 +369,7 @@ void ath10k_core_destroy(struct ath10k *ar);
int ath10k_core_register(struct ath10k *ar);
void ath10k_core_unregister(struct ath10k *ar);
+int ath10k_core_target_suspend(struct ath10k *ar);
+int ath10k_core_target_resume(struct ath10k *ar);
+
#endif /* _CORE_H_ */
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index e4024ef..89d00d7 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -2431,7 +2431,7 @@ static int ath10k_pci_suspend(struct device *device)
if (!ar_pci)
return -ENODEV;
- if (!ath10k_wmi_pdev_suspend_target(ar)) {
+ if (!ath10k_core_target_suspend(ar)) {
left = wait_event_interruptible_timeout(ar->event_queue,
ar->is_target_paused == true,
1 * HZ);
@@ -2501,9 +2501,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_core_target_resume(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 1a5dda6..7bf4e15 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -1231,19 +1231,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__);
@@ -1252,7 +1246,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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [ath9k-devel] [PATCH v3] ath10k: move suspend/resume exports to core.c file
2013-04-18 11:15 [ath9k-devel] [PATCH v3] ath10k: move suspend/resume exports to core.c file Bartosz Markowski
@ 2013-04-22 8:18 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2013-04-22 8:18 UTC (permalink / raw)
To: ath9k-devel
Bartosz Markowski <bartosz.markowski@tieto.com> writes:
> Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Thanks, patch 1 applied.
--
Kalle Valo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-22 8:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-18 11:15 [ath9k-devel] [PATCH v3] ath10k: move suspend/resume exports to core.c file Bartosz Markowski
2013-04-22 8:18 ` Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.