summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath10k/mac.c
diff options
context:
space:
mode:
authorMarek Puzyniak <marek.puzyniak@tieto.com>2014-02-10 17:14:24 +0100
committerKalle Valo <kvalo@qca.qualcomm.com>2014-02-13 17:24:17 +0200
commit00f5482bcd940c11b9b81e7c399fd5f4f6667bd0 (patch)
tree1209170c2d7692f5345fdb5a22bd5ce91037fa59 /drivers/net/wireless/ath/ath10k/mac.c
parent9042e17df8340247ebed9c67f4b64228f16b4c36 (diff)
ath10k: suspend hardware before reset
In case of warm reset target need to be suspended. Suspend function is extented to handle both cases with disabling interrupts and without disabling interrupts. Warm target reset requires suspend with all interrupts disabled. This patch depends on ath10k: fix device initialization routine Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/mac.c')
-rw-r--r--drivers/net/wireless/ath/ath10k/mac.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 3d905932b5a2..b2c65904449c 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3442,22 +3442,14 @@ static int ath10k_suspend(struct ieee80211_hw *hw,
mutex_lock(&ar->conf_mutex);
- reinit_completion(&ar->target_suspend);
-
- ret = ath10k_wmi_pdev_suspend_target(ar);
+ ret = ath10k_wait_for_suspend(ar, WMI_PDEV_SUSPEND);
if (ret) {
- ath10k_warn("could not suspend target (%d)\n", ret);
+ if (ret == -ETIMEDOUT)
+ goto resume;
ret = 1;
goto exit;
}
- ret = wait_for_completion_timeout(&ar->target_suspend, 1 * HZ);
-
- if (ret == 0) {
- ath10k_warn("suspend timed out - target pause event never came\n");
- goto resume;
- }
-
ret = ath10k_hif_suspend(ar);
if (ret) {
ath10k_warn("could not suspend hif (%d)\n", ret);