aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel
diff options
context:
space:
mode:
authorLuca Coelho <luciano.coelho@intel.com>2016-09-14 04:54:36 -0400
committerLuca Coelho <luciano.coelho@intel.com>2016-09-22 16:25:36 -0400
commit75cfe338b8a6fadaa28879a969047554701a7589 (patch)
tree8a3c6b2afc36d17a74450722f3fb9cc75c00e363 /drivers/net/wireless/intel
parentcc2f41f84fdc68074e228397247acd32ad06440a (diff)
iwlwifi: mvm: bail out if CTDP start operation fails
We were assigning the return value of iwl_mvm_ctdp_command() to a variable, but never checking it. If this command fails, we should not allow the interface up process to proceed, since it is potentially dangerous to ignore thermal management requirements. Fixes: commit 5c89e7bc557e ("iwlwifi: mvm: add registration to cooling device") Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/fw.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 8f10780808f6..897412057d1f 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -1233,9 +1233,12 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
1233 } 1233 }
1234 1234
1235 /* TODO: read the budget from BIOS / Platform NVM */ 1235 /* TODO: read the budget from BIOS / Platform NVM */
1236 if (iwl_mvm_is_ctdp_supported(mvm) && mvm->cooling_dev.cur_state > 0) 1236 if (iwl_mvm_is_ctdp_supported(mvm) && mvm->cooling_dev.cur_state > 0) {
1237 ret = iwl_mvm_ctdp_command(mvm, CTDP_CMD_OPERATION_START, 1237 ret = iwl_mvm_ctdp_command(mvm, CTDP_CMD_OPERATION_START,
1238 mvm->cooling_dev.cur_state); 1238 mvm->cooling_dev.cur_state);
1239 if (ret)
1240 goto error;
1241 }
1239#else 1242#else
1240 /* Initialize tx backoffs to the minimal possible */ 1243 /* Initialize tx backoffs to the minimal possible */
1241 iwl_mvm_tt_tx_backoff(mvm, 0); 1244 iwl_mvm_tt_tx_backoff(mvm, 0);