diff options
author | Luciano Coelho <luciano.coelho@intel.com> | 2014-08-20 10:21:07 +0300 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-09-14 12:56:38 +0300 |
commit | a26d4e7b096d85eeea0ce08950744e2887cb46fa (patch) | |
tree | 2e7a25b4f26fe59c709737816d5191a52308656c /drivers | |
parent | bc44886d2645bb4c0422db09f67661638eacc3d1 (diff) |
iwlwifi: mvm: fail temp test enabling if the ucode is not loaded
If the ucode is not loaded, don't allow the temperature test to be
started, but allow it to be changed or stopped if already running.
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/debugfs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/iwlwifi/mvm/debugfs.c index d98ee109c5e..85eb847c749 100644 --- a/drivers/net/wireless/iwlwifi/mvm/debugfs.c +++ b/drivers/net/wireless/iwlwifi/mvm/debugfs.c @@ -288,6 +288,9 @@ static ssize_t iwl_dbgfs_set_nic_temperature_write(struct iwl_mvm *mvm, { int temperature; + if (!mvm->ucode_loaded && !mvm->temperature_test) + return -EIO; + if (kstrtoint(buf, 10, &temperature)) return -EINVAL; /* not a legal temperature */ |