diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-power.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-power.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c index 174a0f737214..8352265dbc4b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-power.c +++ b/drivers/net/wireless/iwlwifi/iwl-power.c | |||
@@ -37,13 +37,12 @@ | |||
37 | #include "iwl-eeprom.h" | 37 | #include "iwl-eeprom.h" |
38 | #include "iwl-dev.h" | 38 | #include "iwl-dev.h" |
39 | #include "iwl-agn.h" | 39 | #include "iwl-agn.h" |
40 | #include "iwl-core.h" | ||
41 | #include "iwl-io.h" | 40 | #include "iwl-io.h" |
42 | #include "iwl-commands.h" | 41 | #include "iwl-commands.h" |
43 | #include "iwl-debug.h" | 42 | #include "iwl-debug.h" |
44 | #include "iwl-power.h" | 43 | #include "iwl-power.h" |
45 | #include "iwl-trans.h" | 44 | #include "iwl-trans.h" |
46 | #include "iwl-shared.h" | 45 | #include "iwl-modparams.h" |
47 | 46 | ||
48 | /* | 47 | /* |
49 | * Setting power level allows the card to go to sleep when not busy. | 48 | * Setting power level allows the card to go to sleep when not busy. |
@@ -167,7 +166,7 @@ static void iwl_static_sleep_cmd(struct iwl_priv *priv, | |||
167 | u8 skip; | 166 | u8 skip; |
168 | u32 slp_itrvl; | 167 | u32 slp_itrvl; |
169 | 168 | ||
170 | if (cfg(priv)->adv_pm) { | 169 | if (priv->cfg->adv_pm) { |
171 | table = apm_range_2; | 170 | table = apm_range_2; |
172 | if (period <= IWL_DTIM_RANGE_1_MAX) | 171 | if (period <= IWL_DTIM_RANGE_1_MAX) |
173 | table = apm_range_1; | 172 | table = apm_range_1; |
@@ -215,13 +214,13 @@ static void iwl_static_sleep_cmd(struct iwl_priv *priv, | |||
215 | else | 214 | else |
216 | cmd->flags &= ~IWL_POWER_SLEEP_OVER_DTIM_MSK; | 215 | cmd->flags &= ~IWL_POWER_SLEEP_OVER_DTIM_MSK; |
217 | 216 | ||
218 | if (cfg(priv)->base_params->shadow_reg_enable) | 217 | if (priv->cfg->base_params->shadow_reg_enable) |
219 | cmd->flags |= IWL_POWER_SHADOW_REG_ENA; | 218 | cmd->flags |= IWL_POWER_SHADOW_REG_ENA; |
220 | else | 219 | else |
221 | cmd->flags &= ~IWL_POWER_SHADOW_REG_ENA; | 220 | cmd->flags &= ~IWL_POWER_SHADOW_REG_ENA; |
222 | 221 | ||
223 | if (iwl_advanced_bt_coexist(priv)) { | 222 | if (iwl_advanced_bt_coexist(priv)) { |
224 | if (!cfg(priv)->bt_params->bt_sco_disable) | 223 | if (!priv->cfg->bt_params->bt_sco_disable) |
225 | cmd->flags |= IWL_POWER_BT_SCO_ENA; | 224 | cmd->flags |= IWL_POWER_BT_SCO_ENA; |
226 | else | 225 | else |
227 | cmd->flags &= ~IWL_POWER_BT_SCO_ENA; | 226 | cmd->flags &= ~IWL_POWER_BT_SCO_ENA; |
@@ -295,7 +294,7 @@ static void iwl_power_build_cmd(struct iwl_priv *priv, | |||
295 | 294 | ||
296 | if (priv->wowlan) | 295 | if (priv->wowlan) |
297 | iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, dtimper); | 296 | iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, dtimper); |
298 | else if (!cfg(priv)->base_params->no_idle_support && | 297 | else if (!priv->cfg->base_params->no_idle_support && |
299 | priv->hw->conf.flags & IEEE80211_CONF_IDLE) | 298 | priv->hw->conf.flags & IEEE80211_CONF_IDLE) |
300 | iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, 20); | 299 | iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, 20); |
301 | else if (iwl_tt_is_low_power_state(priv)) { | 300 | else if (iwl_tt_is_low_power_state(priv)) { |
@@ -309,10 +308,10 @@ static void iwl_power_build_cmd(struct iwl_priv *priv, | |||
309 | priv->power_data.debug_sleep_level_override, | 308 | priv->power_data.debug_sleep_level_override, |
310 | dtimper); | 309 | dtimper); |
311 | else { | 310 | else { |
312 | if (iwlagn_mod_params.power_level > IWL_POWER_INDEX_1 && | 311 | if (iwlwifi_mod_params.power_level > IWL_POWER_INDEX_1 && |
313 | iwlagn_mod_params.power_level <= IWL_POWER_INDEX_5) | 312 | iwlwifi_mod_params.power_level <= IWL_POWER_INDEX_5) |
314 | iwl_static_sleep_cmd(priv, cmd, | 313 | iwl_static_sleep_cmd(priv, cmd, |
315 | iwlagn_mod_params.power_level, dtimper); | 314 | iwlwifi_mod_params.power_level, dtimper); |
316 | else | 315 | else |
317 | iwl_static_sleep_cmd(priv, cmd, | 316 | iwl_static_sleep_cmd(priv, cmd, |
318 | IWL_POWER_INDEX_1, dtimper); | 317 | IWL_POWER_INDEX_1, dtimper); |
@@ -378,7 +377,7 @@ int iwl_power_update_mode(struct iwl_priv *priv, bool force) | |||
378 | /* initialize to default */ | 377 | /* initialize to default */ |
379 | void iwl_power_initialize(struct iwl_priv *priv) | 378 | void iwl_power_initialize(struct iwl_priv *priv) |
380 | { | 379 | { |
381 | priv->power_data.bus_pm = trans(priv)->pm_support; | 380 | priv->power_data.bus_pm = priv->trans->pm_support; |
382 | 381 | ||
383 | priv->power_data.debug_sleep_level_override = -1; | 382 | priv->power_data.debug_sleep_level_override = -1; |
384 | 383 | ||