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.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c
index 548dac2f6a96..cda6a94d6cc9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-power.c
+++ b/drivers/net/wireless/iwlwifi/iwl-power.c
@@ -318,10 +318,7 @@ int iwl_power_update_mode(struct iwl_priv *priv, bool force)
318 update_chains = priv->chain_noise_data.state == IWL_CHAIN_NOISE_DONE || 318 update_chains = priv->chain_noise_data.state == IWL_CHAIN_NOISE_DONE ||
319 priv->chain_noise_data.state == IWL_CHAIN_NOISE_ALIVE; 319 priv->chain_noise_data.state == IWL_CHAIN_NOISE_ALIVE;
320 320
321 if (priv->vif) 321 dtimper = priv->hw->conf.ps_dtim_period ?: 1;
322 dtimper = priv->hw->conf.ps_dtim_period;
323 else
324 dtimper = 1;
325 322
326 if (priv->cfg->broken_powersave) 323 if (priv->cfg->broken_powersave)
327 iwl_power_sleep_cam_cmd(priv, &cmd); 324 iwl_power_sleep_cam_cmd(priv, &cmd);
@@ -384,10 +381,10 @@ EXPORT_SYMBOL(iwl_ht_enabled);
384 381
385bool iwl_within_ct_kill_margin(struct iwl_priv *priv) 382bool iwl_within_ct_kill_margin(struct iwl_priv *priv)
386{ 383{
387 s32 temp = priv->temperature; /* degrees CELSIUS except 4965 */ 384 s32 temp = priv->temperature; /* degrees CELSIUS except specified */
388 bool within_margin = false; 385 bool within_margin = false;
389 386
390 if ((priv->hw_rev & CSR_HW_REV_TYPE_MSK) == CSR_HW_REV_TYPE_4965) 387 if (priv->cfg->temperature_kelvin)
391 temp = KELVIN_TO_CELSIUS(priv->temperature); 388 temp = KELVIN_TO_CELSIUS(priv->temperature);
392 389
393 if (!priv->thermal_throttle.advanced_tt) 390 if (!priv->thermal_throttle.advanced_tt)
@@ -840,12 +837,12 @@ EXPORT_SYMBOL(iwl_tt_exit_ct_kill);
840static void iwl_bg_tt_work(struct work_struct *work) 837static void iwl_bg_tt_work(struct work_struct *work)
841{ 838{
842 struct iwl_priv *priv = container_of(work, struct iwl_priv, tt_work); 839 struct iwl_priv *priv = container_of(work, struct iwl_priv, tt_work);
843 s32 temp = priv->temperature; /* degrees CELSIUS except 4965 */ 840 s32 temp = priv->temperature; /* degrees CELSIUS except specified */
844 841
845 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 842 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
846 return; 843 return;
847 844
848 if ((priv->hw_rev & CSR_HW_REV_TYPE_MSK) == CSR_HW_REV_TYPE_4965) 845 if (priv->cfg->temperature_kelvin)
849 temp = KELVIN_TO_CELSIUS(priv->temperature); 846 temp = KELVIN_TO_CELSIUS(priv->temperature);
850 847
851 if (!priv->thermal_throttle.advanced_tt) 848 if (!priv->thermal_throttle.advanced_tt)
@@ -875,7 +872,7 @@ void iwl_tt_initialize(struct iwl_priv *priv)
875 int size = sizeof(struct iwl_tt_trans) * (IWL_TI_STATE_MAX - 1); 872 int size = sizeof(struct iwl_tt_trans) * (IWL_TI_STATE_MAX - 1);
876 struct iwl_tt_trans *transaction; 873 struct iwl_tt_trans *transaction;
877 874
878 IWL_DEBUG_POWER(priv, "Initialize Thermal Throttling \n"); 875 IWL_DEBUG_POWER(priv, "Initialize Thermal Throttling\n");
879 876
880 memset(tt, 0, sizeof(struct iwl_tt_mgmt)); 877 memset(tt, 0, sizeof(struct iwl_tt_mgmt));
881 878