ath10k: move suspend/resume exports to core.c file
PATCH v3 1/1 ath10k: move suspend/resume exports to core.c file
Signed-off-by Bartosz Markowski <[email protected]>
--- 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(-)
drivers/net/wireless/ath/ath10k/core.c +25 -0
@@ -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" );
drivers/net/wireless/ath/ath10k/core.h +3 -0
@@ -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_ */
drivers/net/wireless/ath/ath10k/pci.c +3 -3
@@ -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; }
drivers/net/wireless/ath/ath10k/wmi.c +0 -7
@@ -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,
Signature · 1 line
1.7.10
PATCH v3 1/1 ath10k: move suspend/resume exports to core.c file
Quoted 1 line · Bartosz Markowski
Signed-off-by Bartosz Markowski <[email protected]>
Thanks, patch 1 applied.
Signature · 1 line
Kalle Valo