summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorHamad Kadmany <qca_hkadmany@qca.qualcomm.com>2017-04-05 14:58:04 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2017-04-13 15:45:39 +0300
commit82e9f646555442d63e47155171592ee790275ea3 (patch)
tree7e48803fd93b1c10736b4ff48d548d8f08c3acc6 /drivers/net/wireless/ath
parent62ca0690cd495bb7c1414cdf0cf790c2922a1d79 (diff)
downloadlinux-82e9f646555442d63e47155171592ee790275ea3.tar.xz
wil6210: fix sequence for scan-abort during reset
Communication with FW must be done before wil->status is initialized in order to properly handle cases where communication with FW halts during reset sequence. Signed-off-by: Hamad Kadmany <qca_hkadmany@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/wil6210/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c
index c33cc4ad44c4..7e72096d738a 100644
--- a/drivers/net/wireless/ath/wil6210/main.c
+++ b/drivers/net/wireless/ath/wil6210/main.c
@@ -948,15 +948,15 @@ int wil_reset(struct wil6210_priv *wil, bool load_fw)
/* Disable device led before reset*/
wmi_led_cfg(wil, false);
+ mutex_lock(&wil->p2p_wdev_mutex);
+ wil_abort_scan(wil, false);
+ mutex_unlock(&wil->p2p_wdev_mutex);
+
/* prevent NAPI from being scheduled and prevent wmi commands */
mutex_lock(&wil->wmi_mutex);
bitmap_zero(wil->status, wil_status_last);
mutex_unlock(&wil->wmi_mutex);
- mutex_lock(&wil->p2p_wdev_mutex);
- wil_abort_scan(wil, false);
- mutex_unlock(&wil->p2p_wdev_mutex);
-
wil_mask_irq(wil);
wmi_event_flush(wil);