diff options
author | Luciano Coelho <luciano.coelho@intel.com> | 2014-12-15 07:15:15 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-12-28 13:00:15 -0500 |
commit | 19789abbe5dcd9ac1730b6acf04f2bddfeadefce (patch) | |
tree | 882124cefe7b75e3c09ab9f02a08fcc59868ad69 | |
parent | 435da2ce52365d7d7c0056786eca2464d70e90a5 (diff) |
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>
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/tt.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/tt.c b/drivers/net/wireless/iwlwifi/mvm/tt.c index 2b1e61fac34a..ba615ad2176c 100644 --- a/drivers/net/wireless/iwlwifi/mvm/tt.c +++ b/drivers/net/wireless/iwlwifi/mvm/tt.c | |||
@@ -69,6 +69,7 @@ | |||
69 | 69 | ||
70 | static void iwl_mvm_enter_ctkill(struct iwl_mvm *mvm) | 70 | static void iwl_mvm_enter_ctkill(struct iwl_mvm *mvm) |
71 | { | 71 | { |
72 | struct iwl_mvm_tt_mgmt *tt = &mvm->thermal_throttle; | ||
72 | u32 duration = mvm->thermal_throttle.params->ct_kill_duration; | 73 | u32 duration = mvm->thermal_throttle.params->ct_kill_duration; |
73 | 74 | ||
74 | if (test_bit(IWL_MVM_STATUS_HW_CTKILL, &mvm->status)) | 75 | if (test_bit(IWL_MVM_STATUS_HW_CTKILL, &mvm->status)) |
@@ -77,12 +78,15 @@ static void iwl_mvm_enter_ctkill(struct iwl_mvm *mvm) | |||
77 | IWL_ERR(mvm, "Enter CT Kill\n"); | 78 | IWL_ERR(mvm, "Enter CT Kill\n"); |
78 | iwl_mvm_set_hw_ctkill_state(mvm, true); | 79 | iwl_mvm_set_hw_ctkill_state(mvm, true); |
79 | 80 | ||
81 | tt->throttle = false; | ||
82 | tt->dynamic_smps = false; | ||
83 | |||
80 | /* Don't schedule an exit work if we're in test mode, since | 84 | /* Don't schedule an exit work if we're in test mode, since |
81 | * the temperature will not change unless we manually set it | 85 | * the temperature will not change unless we manually set it |
82 | * again (or disable testing). | 86 | * again (or disable testing). |
83 | */ | 87 | */ |
84 | if (!mvm->temperature_test) | 88 | if (!mvm->temperature_test) |
85 | schedule_delayed_work(&mvm->thermal_throttle.ct_kill_exit, | 89 | schedule_delayed_work(&tt->ct_kill_exit, |
86 | round_jiffies_relative(duration * HZ)); | 90 | round_jiffies_relative(duration * HZ)); |
87 | } | 91 | } |
88 | 92 | ||
@@ -452,6 +456,7 @@ void iwl_mvm_tt_initialize(struct iwl_mvm *mvm, u32 min_backoff) | |||
452 | tt->params = &iwl7000_tt_params; | 456 | tt->params = &iwl7000_tt_params; |
453 | 457 | ||
454 | tt->throttle = false; | 458 | tt->throttle = false; |
459 | tt->dynamic_smps = false; | ||
455 | tt->min_backoff = min_backoff; | 460 | tt->min_backoff = min_backoff; |
456 | INIT_DELAYED_WORK(&tt->ct_kill_exit, check_exit_ctkill); | 461 | INIT_DELAYED_WORK(&tt->ct_kill_exit, check_exit_ctkill); |
457 | } | 462 | } |