summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/core.c
diff options
context:
space:
mode:
authorRaja Mani <rmani@qca.qualcomm.com>2012-03-06 15:03:59 +0530
committerKalle Valo <kvalo@qca.qualcomm.com>2012-03-07 09:17:10 +0200
commit1e9a905d9afd289bf19f02092a56660c2bcc50db (patch)
tree59235ddee2fa32abdd39e414b58bdd3ffb0c123e /drivers/net/wireless/ath/ath6kl/core.c
parent068a4633bf42501db3ec934beff07cd50c1b7e9d (diff)
ath6kl: Add provision to define suspend policy in disconnected state.
It gives flexibility to the user to define suspend policy when the suspend mode is set to WOW and the device is in disconnected state at the time of suspend. New module parameter wow_mode is added to get the choice from the user. This parameter is valid only if the module parameter suspend_mode is set to WOW. To force WOW in connected state and cut power in disconnected state: suspend_mode=0x3 wow_mode=0x1 To force WOW in connected state and deep sleep in disconnected state (this is also the default wow_mode): suspend_mode=0x3 wow_mode=0x2 If there is no value specified to wow_mode during insmod, deep sleep mode will be tried in the disconnected state. kvalo: clarified commit log 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/core.c')
-rw-r--r--drivers/net/wireless/ath/ath6kl/core.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/core.c b/drivers/net/wireless/ath/ath6kl/core.c
index 84dd9786622f..bc3a41447b8e 100644
--- a/drivers/net/wireless/ath/ath6kl/core.c
+++ b/drivers/net/wireless/ath/ath6kl/core.c
@@ -27,12 +27,14 @@
unsigned int debug_mask;
static unsigned int suspend_mode;
+static unsigned int wow_mode;
static unsigned int uart_debug;
static unsigned int ath6kl_p2p;
static unsigned int testmode;
module_param(debug_mask, uint, 0644);
module_param(suspend_mode, uint, 0644);
+module_param(wow_mode, uint, 0644);
module_param(uart_debug, uint, 0644);
module_param(ath6kl_p2p, uint, 0644);
module_param(testmode, uint, 0644);
@@ -119,6 +121,13 @@ int ath6kl_core_init(struct ath6kl *ar)
else
ar->suspend_mode = 0;
+ if (suspend_mode == WLAN_POWER_STATE_WOW &&
+ (wow_mode == WLAN_POWER_STATE_CUT_PWR ||
+ wow_mode == WLAN_POWER_STATE_DEEP_SLEEP))
+ ar->wow_suspend_mode = wow_mode;
+ else
+ ar->wow_suspend_mode = 0;
+
if (uart_debug)
ar->conf_flags |= ATH6KL_CONF_UART_DEBUG;