From: Liad Kaufman Date: Tue, 21 Oct 2014 13:01:50 +0000 (+0200) Subject: iwlwifi: mvm: fix init_dbg flow to work as expected X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b93b1fe3b5323d5418b151dd620c4eb80270f683;p=linux-beck.git iwlwifi: mvm: fix init_dbg flow to work as expected Even if running the driver with param init_dbg=1 - on INIT image error - iwl_trans_stop_device() was still called. This patch fixes that and calls iwl_trans_stop_device() on INIT image failure only if init_dbg=0. Signed-off-by: Liad Kaufman Signed-off-by: Emmanuel Grumbach --- diff --git a/drivers/net/wireless/iwlwifi/mvm/ops.c b/drivers/net/wireless/iwlwifi/mvm/ops.c index bd52ecfabedb..8c5bdf9360f9 100644 --- a/drivers/net/wireless/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/iwlwifi/mvm/ops.c @@ -524,7 +524,8 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, mutex_lock(&mvm->mutex); err = iwl_run_init_mvm_ucode(mvm, true); - iwl_trans_stop_device(trans); + if (!err || !iwlmvm_mod_params.init_dbg) + iwl_trans_stop_device(trans); mutex_unlock(&mvm->mutex); /* returns 0 if successful, 1 if success but in rfkill */ if (err < 0 && !iwlmvm_mod_params.init_dbg) {