Commit 3778a17a authored by Miri Korenblit's avatar Miri Korenblit Committed by Johannes Berg
parent c4fe1c84
...@@ -828,7 +828,7 @@ int iwl_run_init_mvm_ucode(struct iwl_mvm *mvm) ...@@ -828,7 +828,7 @@ int iwl_run_init_mvm_ucode(struct iwl_mvm *mvm)
iwl_remove_notification(&mvm->notif_wait, &calib_wait); iwl_remove_notification(&mvm->notif_wait, &calib_wait);
out: out:
mvm->rfkill_safe_init_done = false; mvm->rfkill_safe_init_done = false;
if (iwlmvm_mod_params.init_dbg && !mvm->nvm_data) { if (!mvm->nvm_data) {
/* we want to debug INIT and we have no NVM - fake */ /* we want to debug INIT and we have no NVM - fake */
mvm->nvm_data = kzalloc(sizeof(struct iwl_nvm_data) + mvm->nvm_data = kzalloc(sizeof(struct iwl_nvm_data) +
sizeof(struct ieee80211_channel) + sizeof(struct ieee80211_channel) +
...@@ -1357,9 +1357,6 @@ static int iwl_mvm_load_rt_fw(struct iwl_mvm *mvm) ...@@ -1357,9 +1357,6 @@ static int iwl_mvm_load_rt_fw(struct iwl_mvm *mvm)
if (ret) { if (ret) {
IWL_ERR(mvm, "Failed to run INIT ucode: %d\n", ret); IWL_ERR(mvm, "Failed to run INIT ucode: %d\n", ret);
if (iwlmvm_mod_params.init_dbg)
return 0;
return ret; return ret;
} }
...@@ -1598,7 +1595,6 @@ int iwl_mvm_up(struct iwl_mvm *mvm) ...@@ -1598,7 +1595,6 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
IWL_DEBUG_INFO(mvm, "RT uCode started.\n"); IWL_DEBUG_INFO(mvm, "RT uCode started.\n");
return 0; return 0;
error: error:
if (!iwlmvm_mod_params.init_dbg || !ret)
iwl_mvm_stop_device(mvm); iwl_mvm_stop_device(mvm);
return ret; return ret;
} }
......
...@@ -83,14 +83,9 @@ extern const struct ieee80211_ops iwl_mvm_mld_hw_ops; ...@@ -83,14 +83,9 @@ extern const struct ieee80211_ops iwl_mvm_mld_hw_ops;
/** /**
* struct iwl_mvm_mod_params - module parameters for iwlmvm * struct iwl_mvm_mod_params - module parameters for iwlmvm
* @init_dbg: if true, then the NIC won't be stopped if the INIT fw asserted.
* We will register to mac80211 to have testmode working. The NIC must not
* be up'ed after the INIT fw asserted. This is useful to be able to use
* proprietary tools over testmode to debug the INIT fw.
* @power_scheme: one of enum iwl_power_scheme * @power_scheme: one of enum iwl_power_scheme
*/ */
struct iwl_mvm_mod_params { struct iwl_mvm_mod_params {
bool init_dbg;
int power_scheme; int power_scheme;
}; };
extern struct iwl_mvm_mod_params iwlmvm_mod_params; extern struct iwl_mvm_mod_params iwlmvm_mod_params;
......
...@@ -41,12 +41,8 @@ static const struct iwl_op_mode_ops iwl_mvm_ops_mq; ...@@ -41,12 +41,8 @@ static const struct iwl_op_mode_ops iwl_mvm_ops_mq;
struct iwl_mvm_mod_params iwlmvm_mod_params = { struct iwl_mvm_mod_params iwlmvm_mod_params = {
.power_scheme = IWL_POWER_SCHEME_BPS, .power_scheme = IWL_POWER_SCHEME_BPS,
/* rest of fields are 0 by default */
}; };
module_param_named(init_dbg, iwlmvm_mod_params.init_dbg, bool, 0444);
MODULE_PARM_DESC(init_dbg,
"set to true to debug an ASSERT in INIT fw (default: false");
module_param_named(power_scheme, iwlmvm_mod_params.power_scheme, int, 0444); module_param_named(power_scheme, iwlmvm_mod_params.power_scheme, int, 0444);
MODULE_PARM_DESC(power_scheme, MODULE_PARM_DESC(power_scheme,
"power management scheme: 1-active, 2-balanced, 3-low power, default: 2"); "power management scheme: 1-active, 2-balanced, 3-low power, default: 2");
...@@ -864,7 +860,6 @@ static int iwl_mvm_start_get_nvm(struct iwl_mvm *mvm) ...@@ -864,7 +860,6 @@ static int iwl_mvm_start_get_nvm(struct iwl_mvm *mvm)
ret = iwl_mvm_init_mcc(mvm); ret = iwl_mvm_init_mcc(mvm);
} }
if (!iwlmvm_mod_params.init_dbg || !ret)
iwl_mvm_stop_device(mvm); iwl_mvm_stop_device(mvm);
mutex_unlock(&mvm->mutex); mutex_unlock(&mvm->mutex);
...@@ -1500,8 +1495,6 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, ...@@ -1500,8 +1495,6 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
iwl_fw_flush_dumps(&mvm->fwrt); iwl_fw_flush_dumps(&mvm->fwrt);
iwl_fw_runtime_free(&mvm->fwrt); iwl_fw_runtime_free(&mvm->fwrt);
if (iwlmvm_mod_params.init_dbg)
return op_mode;
iwl_phy_db_free(mvm->phy_db); iwl_phy_db_free(mvm->phy_db);
kfree(mvm->scan_cmd); kfree(mvm->scan_cmd);
iwl_trans_op_mode_leave(trans); iwl_trans_op_mode_leave(trans);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment