aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-power.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-power.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-power.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c
index 970c514623b9..565e57e48be8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-power.c
+++ b/drivers/net/wireless/iwlwifi/iwl-power.c
@@ -358,9 +358,15 @@ static void iwl_power_build_cmd(struct iwl_priv *priv,
358 iwl_static_sleep_cmd(priv, cmd, 358 iwl_static_sleep_cmd(priv, cmd,
359 priv->power_data.debug_sleep_level_override, 359 priv->power_data.debug_sleep_level_override,
360 dtimper); 360 dtimper);
361 else if (iwlagn_mod_params.no_sleep_autoadjust) 361 else if (iwlagn_mod_params.no_sleep_autoadjust) {
362 iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_1, dtimper); 362 if (iwlagn_mod_params.power_level > IWL_POWER_INDEX_1 &&
363 else 363 iwlagn_mod_params.power_level <= IWL_POWER_INDEX_5)
364 iwl_static_sleep_cmd(priv, cmd,
365 iwlagn_mod_params.power_level, dtimper);
366 else
367 iwl_static_sleep_cmd(priv, cmd,
368 IWL_POWER_INDEX_1, dtimper);
369 } else
364 iwl_power_fill_sleep_cmd(priv, cmd, 370 iwl_power_fill_sleep_cmd(priv, cmd,
365 priv->hw->conf.dynamic_ps_timeout, 371 priv->hw->conf.dynamic_ps_timeout,
366 priv->hw->conf.max_sleep_period); 372 priv->hw->conf.max_sleep_period);