aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorKalle Valo <kvalo@qca.qualcomm.com>2011-11-03 06:18:31 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2011-11-11 05:59:58 -0500
commit8277de15efb00a4796fb05824a28c20c3894256c (patch)
treee5804334918fa98b4d80e275a1879f37166e1086 /drivers/net/wireless/ath
parentcf97fa9fdf145bff2a0117d2ead4a92b132f69f6 (diff)
ath6kl: add suspend_cutpower module parameter
This is to force ath6kl to power off hardware during suspend even if sdio support keep power. This is needed, for example, when sdio controller is buggy or maximum powersaving is desired. Usage: insmod ath6kl.ko suspend_cutpower=1 Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath6kl/core.h1
-rw-r--r--drivers/net/wireless/ath/ath6kl/init.c5
-rw-r--r--drivers/net/wireless/ath/ath6kl/sdio.c3
3 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h
index f301c32a2dd8..c30642e9795d 100644
--- a/drivers/net/wireless/ath/ath6kl/core.h
+++ b/drivers/net/wireless/ath/ath6kl/core.h
@@ -166,6 +166,7 @@ struct ath6kl_fw_ie {
166#define ATH6KL_CONF_IGNORE_PS_FAIL_EVT_IN_SCAN BIT(1) 166#define ATH6KL_CONF_IGNORE_PS_FAIL_EVT_IN_SCAN BIT(1)
167#define ATH6KL_CONF_ENABLE_11N BIT(2) 167#define ATH6KL_CONF_ENABLE_11N BIT(2)
168#define ATH6KL_CONF_ENABLE_TX_BURST BIT(3) 168#define ATH6KL_CONF_ENABLE_TX_BURST BIT(3)
169#define ATH6KL_CONF_SUSPEND_CUTPOWER BIT(4)
169 170
170enum wlan_low_pwr_state { 171enum wlan_low_pwr_state {
171 WLAN_POWER_STATE_ON, 172 WLAN_POWER_STATE_ON,
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c
index abc1d8ea7f5f..57529acb9144 100644
--- a/drivers/net/wireless/ath/ath6kl/init.c
+++ b/drivers/net/wireless/ath/ath6kl/init.c
@@ -27,9 +27,11 @@
27 27
28unsigned int debug_mask; 28unsigned int debug_mask;
29static unsigned int testmode; 29static unsigned int testmode;
30static bool suspend_cutpower;
30 31
31module_param(debug_mask, uint, 0644); 32module_param(debug_mask, uint, 0644);
32module_param(testmode, uint, 0644); 33module_param(testmode, uint, 0644);
34module_param(suspend_cutpower, bool, 0444);
33 35
34/* 36/*
35 * Include definitions here that can be used to tune the WLAN module 37 * Include definitions here that can be used to tune the WLAN module
@@ -1596,6 +1598,9 @@ int ath6kl_core_init(struct ath6kl *ar)
1596 ar->conf_flags = ATH6KL_CONF_IGNORE_ERP_BARKER | 1598 ar->conf_flags = ATH6KL_CONF_IGNORE_ERP_BARKER |
1597 ATH6KL_CONF_ENABLE_11N | ATH6KL_CONF_ENABLE_TX_BURST; 1599 ATH6KL_CONF_ENABLE_11N | ATH6KL_CONF_ENABLE_TX_BURST;
1598 1600
1601 if (suspend_cutpower)
1602 ar->conf_flags |= ATH6KL_CONF_SUSPEND_CUTPOWER;
1603
1599 ar->wiphy->flags |= WIPHY_FLAG_SUPPORTS_FW_ROAM | 1604 ar->wiphy->flags |= WIPHY_FLAG_SUPPORTS_FW_ROAM |
1600 WIPHY_FLAG_HAVE_AP_SME; 1605 WIPHY_FLAG_HAVE_AP_SME;
1601 1606
diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c
index ccb888b41c46..a026daef2375 100644
--- a/drivers/net/wireless/ath/ath6kl/sdio.c
+++ b/drivers/net/wireless/ath/ath6kl/sdio.c
@@ -784,7 +784,8 @@ static int ath6kl_sdio_suspend(struct ath6kl *ar)
784 784
785 ath6kl_dbg(ATH6KL_DBG_SUSPEND, "sdio suspend pm_caps 0x%x\n", flags); 785 ath6kl_dbg(ATH6KL_DBG_SUSPEND, "sdio suspend pm_caps 0x%x\n", flags);
786 786
787 if (!(flags & MMC_PM_KEEP_POWER)) { 787 if (!(flags & MMC_PM_KEEP_POWER) ||
788 (ar->conf_flags & ATH6KL_CONF_SUSPEND_CUTPOWER)) {
788 /* as host doesn't support keep power we need to cut power */ 789 /* as host doesn't support keep power we need to cut power */
789 return ath6kl_cfg80211_suspend(ar, ATH6KL_CFG_SUSPEND_CUTPOWER); 790 return ath6kl_cfg80211_suspend(ar, ATH6KL_CFG_SUSPEND_CUTPOWER);
790 } 791 }