ath10k: flush hif buffers before recovery
authorMichal Kazior <michal.kazior@tieto.com>
Fri, 22 Aug 2014 12:33:18 +0000 (14:33 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Mon, 25 Aug 2014 08:32:28 +0000 (11:32 +0300)
Transport buffers weren't flushed and processed
before queueing hw recovery request to mac80211.

This could in theory result in an unwanted htt/wmi
rx events being processed while mac80211 recovers
the device and possibly interfere or even crash
the system.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/core.c

index 23ba32175fcc6eddd0340eeb5bcc41c81fc61472..157dcf906f2939204472f66acaebbab093bfbcc2 100644 (file)
@@ -665,6 +665,7 @@ static void ath10k_core_restart(struct work_struct *work)
        switch (ar->state) {
        case ATH10K_STATE_ON:
                ar->state = ATH10K_STATE_RESTARTING;
+               ath10k_hif_stop(ar);
                ath10k_scan_finish(ar);
                ieee80211_restart_hw(ar->hw);
                break;