From: Raja Mani <rmani@xxxxxxxxxxxxxxxx> suspend_cutpower was introduced to force cut power mode when system goes to suspend state. Now, generic module parameter is required to specify suspend mode including DEEP SLEEP and WOW while doing insmod. Renaming existing module parameter variable suspend_cutpower would be sufficient to meet this requirement. suspend_mode can take any one of three suspend state, 1) cut power 2) deep sleep 3) wow For invalid value other than above mode, cut power mode will be selected. To avoid externing mod parameter suspend_mode, new variable ar->suspend_mode is added to have copy of mod param variable and will be in sdio.c in the following patches. Signed-off-by: Raja Mani <rmani@xxxxxxxxxxxxxxxx> --- drivers/net/wireless/ath/ath6kl/core.h | 1 + drivers/net/wireless/ath/ath6kl/init.c | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index c095faf..be61fc3 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h @@ -590,6 +590,7 @@ struct ath6kl { } hw; u16 conf_flags; + u8 suspend_mode; wait_queue_head_t event_wq; struct ath6kl_mbox_info mbox_info; diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c index a481b6a..feff095 100644 --- a/drivers/net/wireless/ath/ath6kl/init.c +++ b/drivers/net/wireless/ath/ath6kl/init.c @@ -27,12 +27,12 @@ unsigned int debug_mask; static unsigned int testmode; -static bool suspend_cutpower; +static unsigned char suspend_mode; static unsigned int uart_debug; module_param(debug_mask, uint, 0644); module_param(testmode, uint, 0644); -module_param(suspend_cutpower, bool, 0444); +module_param(suspend_mode, byte, 0644); module_param(uart_debug, uint, 0644); static const struct ath6kl_hw hw_list[] = { @@ -1676,8 +1676,11 @@ int ath6kl_core_init(struct ath6kl *ar) ar->conf_flags = ATH6KL_CONF_IGNORE_ERP_BARKER | ATH6KL_CONF_ENABLE_11N | ATH6KL_CONF_ENABLE_TX_BURST; - if (suspend_cutpower) - ar->conf_flags |= ATH6KL_CONF_SUSPEND_CUTPOWER; + if (suspend_mode < WLAN_POWER_STATE_CUT_PWR || + suspend_mode > WLAN_POWER_STATE_WOW) + ar->suspend_mode = WLAN_POWER_STATE_CUT_PWR; + else + ar->suspend_mode = suspend_mode; ar->wiphy->flags |= WIPHY_FLAG_SUPPORTS_FW_ROAM | WIPHY_FLAG_HAVE_AP_SME | -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html