iwlwifi: mvm: set the default cTDP budget
authorChaya Rachel Ivgi <chaya.rachel.ivgi@intel.com>
Sun, 9 Jul 2017 13:35:14 +0000 (16:35 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 9 Aug 2017 06:35:16 +0000 (09:35 +0300)
In case there is no value received from BIOS
for cTDP budget, the default should be 2000 mWatt.

Signed-off-by: Chaya Rachel Ivgi <chaya.rachel.ivgi@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/fw.c

index ac782383443e1035a64a8a674dc0e65148132cb6..0099050f6e2b66c1774d57b7176f35a184ef0f31 100644 (file)
@@ -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)