@@ -5345,8 +5345,22 @@ static void ath10k_stop(struct ieee80211_hw *hw)
mutex_lock(&ar->conf_mutex);
if (ar->state != ATH10K_STATE_OFF) {
- if (!ar->hw_rfkill_on)
- ath10k_halt(ar);
+ if (!ar->hw_rfkill_on) {
+ /* If the current driver state is RESTARTING but not yet
+ * fully RESTARTED because of incoming suspend event,
+ * then ath11k_halt is already called via
+ * ath10k_core_restart and should not be called here.
+ */
+ if (ar->state != ATH10K_STATE_RESTARTING)
+ ath10k_halt(ar);
+ else
+ /* Suspending here, because when in RESTARTING
+ * state, ath11k_core_stop skips
+ * ath10k_wait_for_suspend.
+ */
+ ath10k_wait_for_suspend(ar,
+ WMI_PDEV_SUSPEND_AND_DISABLE_INTR);
+ }
ar->state = ATH10K_STATE_OFF;
}
mutex_unlock(&ar->conf_mutex);