mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 03:24:19 +02:00
wifi: iwlwifi: mld: stop hw if mcc_init fails
iwl_mld_run_fw_init_sequence used to be the last thing done in iwl_mld_load_fw, and if it failed, it called iwl_trans_stop_hw. Now we also have there iwl_mld_init_mcc, and it can fail. In that case, we need to undo what we did so far, which is basically only iwl_trans_stop_device. Do that. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20250423091408.ba06d972a57b.I317fb7b10ed8a688a0d92c5d99de8765d8044b10@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
092e9ca61f
commit
fab65a1a6c
|
|
@ -238,22 +238,17 @@ static int iwl_mld_load_fw_wait_alive(struct iwl_mld *mld)
|
|||
iwl_fw_dbg_error_collect(&mld->fwrt,
|
||||
FW_DBG_TRIGGER_ALIVE_TIMEOUT);
|
||||
iwl_mld_print_alive_notif_timeout(mld);
|
||||
goto alive_failure;
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!alive_valid) {
|
||||
IWL_ERR(mld, "Loaded firmware is not valid!\n");
|
||||
ret = -EIO;
|
||||
goto alive_failure;
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
iwl_trans_fw_alive(mld->trans, 0);
|
||||
|
||||
return 0;
|
||||
|
||||
alive_failure:
|
||||
iwl_trans_stop_device(mld->trans);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int iwl_mld_run_fw_init_sequence(struct iwl_mld *mld)
|
||||
|
|
@ -279,7 +274,7 @@ static int iwl_mld_run_fw_init_sequence(struct iwl_mld *mld)
|
|||
&mld->fw->ucode_capa);
|
||||
if (ret) {
|
||||
IWL_ERR(mld, "Timeout waiting for PNVM load %d\n", ret);
|
||||
goto init_failure;
|
||||
return ret;
|
||||
}
|
||||
|
||||
iwl_dbg_tlv_time_point(&mld->fwrt, IWL_FW_INI_TIME_POINT_AFTER_ALIVE,
|
||||
|
|
@ -297,21 +292,17 @@ static int iwl_mld_run_fw_init_sequence(struct iwl_mld *mld)
|
|||
if (ret) {
|
||||
IWL_ERR(mld, "Failed to send init config command: %d\n", ret);
|
||||
iwl_remove_notification(&mld->notif_wait, &init_wait);
|
||||
goto init_failure;
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = iwl_wait_notification(&mld->notif_wait, &init_wait,
|
||||
MLD_INIT_COMPLETE_TIMEOUT);
|
||||
if (ret) {
|
||||
IWL_ERR(mld, "Failed to get INIT_COMPLETE %d\n", ret);
|
||||
goto init_failure;
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
init_failure:
|
||||
iwl_trans_stop_device(mld->trans);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int iwl_mld_load_fw(struct iwl_mld *mld)
|
||||
|
|
@ -326,15 +317,18 @@ int iwl_mld_load_fw(struct iwl_mld *mld)
|
|||
|
||||
ret = iwl_mld_run_fw_init_sequence(mld);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto err;
|
||||
|
||||
ret = iwl_mld_init_mcc(mld);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto err;
|
||||
|
||||
mld->fw_status.running = true;
|
||||
|
||||
return 0;
|
||||
err:
|
||||
iwl_trans_stop_device(mld->trans);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void iwl_mld_stop_fw(struct iwl_mld *mld)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user