From: Luciano Coelho Date: Wed, 20 Aug 2014 14:58:20 +0000 (+0300) Subject: iwlwifi: mvm: don't run automatic checks if CT was caused by debugfs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=efc36dbd5a0cbfbf0da0a6fa8e1c246bb78dab76;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git iwlwifi: mvm: don't run automatic checks if CT was caused by debugfs If we're manually testing the CT kill functionality via debugfs, we shouldn't schedule the work to recheck the temperature after the ct_kill_duration period has passed. Signed-off-by: Luciano Coelho Reviewed-by: Johannes Berg Signed-off-by: Emmanuel Grumbach --- diff --git a/drivers/net/wireless/iwlwifi/mvm/tt.c b/drivers/net/wireless/iwlwifi/mvm/tt.c index d31603cbb17d..4c22c0a09237 100644 --- a/drivers/net/wireless/iwlwifi/mvm/tt.c +++ b/drivers/net/wireless/iwlwifi/mvm/tt.c @@ -319,8 +319,14 @@ static void iwl_mvm_enter_ctkill(struct iwl_mvm *mvm) IWL_ERR(mvm, "Enter CT Kill\n"); iwl_mvm_set_hw_ctkill_state(mvm, true); - schedule_delayed_work(&mvm->thermal_throttle.ct_kill_exit, - round_jiffies_relative(duration * HZ)); + + /* Don't schedule an exit work if we're in test mode, since + * the temperature will not change unless we manually set it + * again (or disable testing). + */ + if (!mvm->temperature_test) + schedule_delayed_work(&mvm->thermal_throttle.ct_kill_exit, + round_jiffies_relative(duration * HZ)); } static void iwl_mvm_exit_ctkill(struct iwl_mvm *mvm)