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

Commit 216a1836 authored by Michal Kazior's avatar Michal Kazior Committed by Kalle Valo
Browse files

ath10k: skip suspending when recovering



It doesn't make much sense to even try suspending
the device when recovering. Recovering means the
device is unresponsive and waiting for suspend
procedure means taking a 3 second timeout waiting
for tx credits.

This speeds up firmware recovery significantly.

Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 7710cd2e
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -680,8 +680,8 @@ static void ath10k_core_restart(struct work_struct *work)


	switch (ar->state) {
	switch (ar->state) {
	case ATH10K_STATE_ON:
	case ATH10K_STATE_ON:
		ath10k_halt(ar);
		ar->state = ATH10K_STATE_RESTARTING;
		ar->state = ATH10K_STATE_RESTARTING;
		ath10k_halt(ar);
		ieee80211_restart_hw(ar->hw);
		ieee80211_restart_hw(ar->hw);
		break;
		break;
	case ATH10K_STATE_OFF:
	case ATH10K_STATE_OFF:
@@ -908,7 +908,9 @@ void ath10k_core_stop(struct ath10k *ar)
	lockdep_assert_held(&ar->conf_mutex);
	lockdep_assert_held(&ar->conf_mutex);


	/* try to suspend target */
	/* try to suspend target */
	if (ar->state != ATH10K_STATE_RESTARTING)
		ath10k_wait_for_suspend(ar, WMI_PDEV_SUSPEND_AND_DISABLE_INTR);
		ath10k_wait_for_suspend(ar, WMI_PDEV_SUSPEND_AND_DISABLE_INTR);

	ath10k_debug_stop(ar);
	ath10k_debug_stop(ar);
	ath10k_htc_stop(&ar->htc);
	ath10k_htc_stop(&ar->htc);
	ath10k_htt_detach(&ar->htt);
	ath10k_htt_detach(&ar->htt);