Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f7c8677 authored by Hamad Kadmany's avatar Hamad Kadmany Committed by Hamad Kadmany
Browse files

wil6210: Do no schedule firmware recovery during reset flow



During reset flow, ignore firmware errors detected prior
to the actual hardware reset as the recovery flow would
make additional unnecessary reset.

Change-Id: I1d0d8e8e4cb0e260958f719c8384478750599071
Signed-off-by: default avatarHamad Kadmany <qca_hkadmany@qca.qualcomm.com>
Signed-off-by: default avatarVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
Git-commit: f13e0630826f961732f3192282a6c249bb6208c1
Git-repo: https://github.com/kvalo/ath.git


Signed-off-by: default avatarHamad Kadmany <hkadmany@codeaurora.org>
parent fafef5de
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -767,6 +767,8 @@ int wil_reset(struct wil6210_priv *wil, bool load_fw)
	if (wil->hw_version == HW_VER_UNKNOWN)
		return -ENODEV;

	set_bit(wil_status_resetting, wil->status);

	cancel_work_sync(&wil->disconnect_worker);
	wil6210_disconnect(wil, NULL, WLAN_REASON_DEAUTH_LEAVING, false);
	wil_bcast_fini(wil);
@@ -853,6 +855,12 @@ int wil_reset(struct wil6210_priv *wil, bool load_fw)
void wil_fw_error_recovery(struct wil6210_priv *wil)
{
	wil_dbg_misc(wil, "starting fw error recovery\n");

	if (test_bit(wil_status_resetting, wil->status)) {
		wil_info(wil, "Reset already in progress\n");
		return;
	}

	wil->recovery_state = fw_recovery_pending;
	schedule_work(&wil->fw_error_worker);
}
+1 −0
Original line number Diff line number Diff line
@@ -409,6 +409,7 @@ enum { /* for wil6210_priv.status */
	wil_status_reset_done,
	wil_status_irqen, /* FIXME: interrupts enabled - for debug */
	wil_status_napi_en, /* NAPI enabled protected by wil->mutex */
	wil_status_resetting, /* reset in progress */
	wil_status_last /* keep last */
};