aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/power.c
diff options
context:
space:
mode:
authorAlexander Bondar <alexander.bondar@intel.com>2013-03-05 07:01:27 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-04-03 16:49:16 -0400
commite16cf7ec6ffbcf96ef3c322b76ff90c2611254d9 (patch)
treea0b038df72154372cf42f301ccb3981c4ef31e35 /drivers/net/wireless/iwlwifi/mvm/power.c
parent9a6130485ec929a97eaef3f55aa40055a9c6b2b3 (diff)
iwlwifi: mvm: set keepalive period regardless of PM state
The firmware starts sending nulldata frames for keepalive immediately after association, regardless of power management state. The driver thus needs to configure keep alive period unconditionally. Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/power.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/power.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/power.c b/drivers/net/wireless/iwlwifi/mvm/power.c
index 0c0771361951..6e7e06a2b9c1 100644
--- a/drivers/net/wireless/iwlwifi/mvm/power.c
+++ b/drivers/net/wireless/iwlwifi/mvm/power.c
@@ -86,6 +86,13 @@ static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm,
86 int keep_alive; 86 int keep_alive;
87 bool radar_detect = false; 87 bool radar_detect = false;
88 88
89 /*
90 * Regardless of power management state the driver must set
91 * keep alive period. FW will use it for sending keep alive NDPs
92 * immediately after association.
93 */
94 cmd->keep_alive_seconds = POWER_KEEP_ALIVE_PERIOD_SEC;
95
89 if ((iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_CAM) || 96 if ((iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_CAM) ||
90 !iwlwifi_mod_params.power_save) 97 !iwlwifi_mod_params.power_save)
91 return; 98 return;
@@ -117,9 +124,8 @@ static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm,
117 /* Check that keep alive period is at least 3 * DTIM */ 124 /* Check that keep alive period is at least 3 * DTIM */
118 dtimper_msec = dtimper * vif->bss_conf.beacon_int; 125 dtimper_msec = dtimper * vif->bss_conf.beacon_int;
119 keep_alive = max_t(int, 3 * dtimper_msec, 126 keep_alive = max_t(int, 3 * dtimper_msec,
120 MSEC_PER_SEC * POWER_KEEP_ALIVE_PERIOD_SEC); 127 MSEC_PER_SEC * cmd->keep_alive_seconds);
121 keep_alive = DIV_ROUND_UP(keep_alive, MSEC_PER_SEC); 128 keep_alive = DIV_ROUND_UP(keep_alive, MSEC_PER_SEC);
122
123 cmd->keep_alive_seconds = keep_alive; 129 cmd->keep_alive_seconds = keep_alive;
124 130
125 if (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_LP) { 131 if (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_LP) {