From: Chaya Rachel Ivgi Date: Sun, 9 Jul 2017 13:35:14 +0000 (+0300) Subject: iwlwifi: mvm: set the default cTDP budget X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=944eafc255500102b69940f425eb073bfab933db;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git iwlwifi: mvm: set the default cTDP budget In case there is no value received from BIOS for cTDP budget, the default should be 2000 mWatt. Signed-off-by: Chaya Rachel Ivgi Signed-off-by: Luca Coelho --- diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index ac782383443e..0099050f6e2b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -1173,7 +1173,12 @@ int iwl_mvm_up(struct iwl_mvm *mvm) } /* TODO: read the budget from BIOS / Platform NVM */ - if (iwl_mvm_is_ctdp_supported(mvm) && mvm->cooling_dev.cur_state > 0) { + + /* + * In case there is no budget from BIOS / Platform NVM the default + * budget should be 2000mW (cooling state 0). + */ + if (iwl_mvm_is_ctdp_supported(mvm)) { ret = iwl_mvm_ctdp_command(mvm, CTDP_CMD_OPERATION_START, mvm->cooling_dev.cur_state); if (ret)