iwlwifi: mvm: clear tt values when entering CT-kill
Clear the thermal throttling values when entering CT-kill, since everything will be reinitialized anyway when we exit CT-kill. Additionally, clear the dynamic_smps value in the initialization funciton, for consistency. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
This commit is contained in:
parent
435da2ce52
commit
19789abbe5
|
@ -69,6 +69,7 @@
|
||||||
|
|
||||||
static void iwl_mvm_enter_ctkill(struct iwl_mvm *mvm)
|
static void iwl_mvm_enter_ctkill(struct iwl_mvm *mvm)
|
||||||
{
|
{
|
||||||
|
struct iwl_mvm_tt_mgmt *tt = &mvm->thermal_throttle;
|
||||||
u32 duration = mvm->thermal_throttle.params->ct_kill_duration;
|
u32 duration = mvm->thermal_throttle.params->ct_kill_duration;
|
||||||
|
|
||||||
if (test_bit(IWL_MVM_STATUS_HW_CTKILL, &mvm->status))
|
if (test_bit(IWL_MVM_STATUS_HW_CTKILL, &mvm->status))
|
||||||
|
@ -77,12 +78,15 @@ static void iwl_mvm_enter_ctkill(struct iwl_mvm *mvm)
|
||||||
IWL_ERR(mvm, "Enter CT Kill\n");
|
IWL_ERR(mvm, "Enter CT Kill\n");
|
||||||
iwl_mvm_set_hw_ctkill_state(mvm, true);
|
iwl_mvm_set_hw_ctkill_state(mvm, true);
|
||||||
|
|
||||||
|
tt->throttle = false;
|
||||||
|
tt->dynamic_smps = false;
|
||||||
|
|
||||||
/* Don't schedule an exit work if we're in test mode, since
|
/* Don't schedule an exit work if we're in test mode, since
|
||||||
* the temperature will not change unless we manually set it
|
* the temperature will not change unless we manually set it
|
||||||
* again (or disable testing).
|
* again (or disable testing).
|
||||||
*/
|
*/
|
||||||
if (!mvm->temperature_test)
|
if (!mvm->temperature_test)
|
||||||
schedule_delayed_work(&mvm->thermal_throttle.ct_kill_exit,
|
schedule_delayed_work(&tt->ct_kill_exit,
|
||||||
round_jiffies_relative(duration * HZ));
|
round_jiffies_relative(duration * HZ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -452,6 +456,7 @@ void iwl_mvm_tt_initialize(struct iwl_mvm *mvm, u32 min_backoff)
|
||||||
tt->params = &iwl7000_tt_params;
|
tt->params = &iwl7000_tt_params;
|
||||||
|
|
||||||
tt->throttle = false;
|
tt->throttle = false;
|
||||||
|
tt->dynamic_smps = false;
|
||||||
tt->min_backoff = min_backoff;
|
tt->min_backoff = min_backoff;
|
||||||
INIT_DELAYED_WORK(&tt->ct_kill_exit, check_exit_ctkill);
|
INIT_DELAYED_WORK(&tt->ct_kill_exit, check_exit_ctkill);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue