summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
diff options
context:
space:
mode:
authorLiad Kaufman <liad.kaufman@intel.com>2017-11-23 10:29:04 +0200
committerLuca Coelho <luciano.coelho@intel.com>2017-12-05 21:01:43 +0200
commitf4744258f5e8d5a478a5acb89c58cf1eddc0550f (patch)
treeacc72778f618ecfff0b89a7c5f1abdbcaad04bd1 /drivers/net/wireless/intel/iwlwifi/mvm/fw.c
parent6fef00d5eeb9e4e5620e395d0e68f5de28a7c646 (diff)
iwlwifi: mvm: make init_dbg effective only on failure
If FW loads without a problem, leaving init_dbg on can cause a confusion, since the user won't necessarily remember it is still turned on, and there are flows in which everything continues as usual, only without stopping the device after INIT, even if there is no FW assert. On 22000 HW, for instance, this causes a warning, since the paging is getting initialized twice. Solve the issue by making this module param effective only if the FW indeed asserts during INIT. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/fw.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/fw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 3019ed9bccd2..0920be637b57 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -923,11 +923,11 @@ static int iwl_mvm_load_rt_fw(struct iwl_mvm *mvm)
ret = iwl_run_init_mvm_ucode(mvm, false);
- if (iwlmvm_mod_params.init_dbg)
- return 0;
-
if (ret) {
IWL_ERR(mvm, "Failed to run INIT ucode: %d\n", ret);
+
+ if (iwlmvm_mod_params.init_dbg)
+ return 0;
return ret;
}
@@ -1111,7 +1111,7 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
IWL_DEBUG_INFO(mvm, "RT uCode started.\n");
return 0;
error:
- if (!iwlmvm_mod_params.init_dbg)
+ if (!iwlmvm_mod_params.init_dbg || !ret)
iwl_mvm_stop_device(mvm);
return ret;
}