summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/sdio.c
diff options
context:
space:
mode:
authorRaja Mani <rmani@qca.qualcomm.com>2011-11-07 22:52:46 +0200
committerKalle Valo <kvalo@qca.qualcomm.com>2011-11-11 13:00:00 +0200
commitd7c44e0ba5003c22a9ff3545fc2f51eaca8a95b1 (patch)
treee9ca5bfa99970e3e0457d133b7ce145e1152913c /drivers/net/wireless/ath/ath6kl/sdio.c
parent524441e3a7cadf12acbb409ad733d783ba1da459 (diff)
downloadlinux-d7c44e0ba5003c22a9ff3545fc2f51eaca8a95b1.tar.bz2
ath6kl: Invoke WOW suspend/resume calls during PM operation
Link ath6kl's wow suspend/resume functions with the actual suspend/resume path. WOW mode is selected when the host sdio controller supports both MMC_PM_KEEP_POWER and MMC_PM_WAKE_SDIO_IRQ capabilities. kvalo: also adds a missing break in ath6kl_cfg80211_resume(), luckily it didn't have any effect on functionality. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/sdio.c')
-rw-r--r--drivers/net/wireless/ath/ath6kl/sdio.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c
index b576b7667b6d..0586b3b3ab54 100644
--- a/drivers/net/wireless/ath/ath6kl/sdio.c
+++ b/drivers/net/wireless/ath/ath6kl/sdio.c
@@ -798,6 +798,23 @@ static int ath6kl_sdio_suspend(struct ath6kl *ar, struct cfg80211_wowlan *wow)
return ret;
}
+ if ((flags & MMC_PM_WAKE_SDIO_IRQ) && wow) {
+ /*
+ * The host sdio controller is capable of keep power and
+ * sdio irq wake up at this point. It's fine to continue
+ * wow suspend operation.
+ */
+ ret = ath6kl_cfg80211_suspend(ar, ATH6KL_CFG_SUSPEND_WOW, wow);
+ if (ret)
+ return ret;
+
+ ret = sdio_set_host_pm_flags(func, MMC_PM_WAKE_SDIO_IRQ);
+ if (ret)
+ ath6kl_err("set sdio wake irq flag failed: %d\n", ret);
+
+ return ret;
+ }
+
return ath6kl_cfg80211_suspend(ar, ATH6KL_CFG_SUSPEND_DEEPSLEEP, NULL);
}
@@ -820,6 +837,9 @@ static int ath6kl_sdio_resume(struct ath6kl *ar)
case ATH6KL_STATE_DEEPSLEEP:
break;
+
+ case ATH6KL_STATE_WOW:
+ break;
}
ath6kl_cfg80211_resume(ar);