提交 a26d4e7b 编写于 作者: L Luciano Coelho 提交者: Emmanuel Grumbach

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: NLuciano Coelho <luciano.coelho@intel.com>
Reviewed-by: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
上级 bc44886d
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册