summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/sdio.c
diff options
context:
space:
mode:
authorChilam Ng <chilamng@qca.qualcomm.com>2011-10-05 10:12:52 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2011-11-11 12:50:55 +0200
commitaa6cffc1a275a9369ca83e13cebc4b09e4f23954 (patch)
tree0fa8abbe88ae3d64f00e797326263d6dcde78835 /drivers/net/wireless/ath/ath6kl/sdio.c
parent4533d901a4a78542544b91ad620fffd3307ade04 (diff)
downloadlinux-stable-aa6cffc1a275a9369ca83e13cebc4b09e4f23954.tar.gz
linux-stable-aa6cffc1a275a9369ca83e13cebc4b09e4f23954.tar.bz2
linux-stable-aa6cffc1a275a9369ca83e13cebc4b09e4f23954.zip
ath6kl: make sure WLAN power save is enabled during suspend
Power save is enabled during ath6kl init. But when user space disables power save, the system will go into suspend with power save disabled. The ath6kl driver will now explicitly enable power save prior to entering suspend and restore its previous setting upon resume Signed-off-by: Chilam Ng <chilamng@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.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c
index 7695c2974d2c..9b8ee1f53787 100644
--- a/drivers/net/wireless/ath/ath6kl/sdio.c
+++ b/drivers/net/wireless/ath/ath6kl/sdio.c
@@ -743,6 +743,18 @@ static int ath6kl_sdio_suspend(struct ath6kl *ar)
return 0;
}
+static int ath6kl_sdio_resume(struct ath6kl *ar)
+{
+ if (ar->wmi->pwr_mode != ar->wmi->saved_pwr_mode) {
+ if (ath6kl_wmi_powermode_cmd(ar->wmi,
+ ar->wmi->saved_pwr_mode) != 0)
+ ath6kl_warn("ath6kl_sdio_resume: "
+ "wmi_powermode_cmd failed\n");
+ }
+
+ return 0;
+}
+
static const struct ath6kl_hif_ops ath6kl_sdio_ops = {
.read_write_sync = ath6kl_sdio_read_write_sync,
.write_async = ath6kl_sdio_write_async,
@@ -754,6 +766,7 @@ static const struct ath6kl_hif_ops ath6kl_sdio_ops = {
.scat_req_rw = ath6kl_sdio_async_rw_scatter,
.cleanup_scatter = ath6kl_sdio_cleanup_scatter,
.suspend = ath6kl_sdio_suspend,
+ .resume = ath6kl_sdio_resume,
};
static int ath6kl_sdio_probe(struct sdio_func *func,