OSDN Git Service

wil6210: fix sequence for scan-abort during reset
authorHamad Kadmany <qca_hkadmany@qca.qualcomm.com>
Thu, 4 May 2017 19:37:57 +0000 (22:37 +0300)
committerMaya Erez <merez@codeaurora.org>
Thu, 4 May 2017 19:38:13 +0000 (22:38 +0300)
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.

Change-Id: Ia9b74143b45ae3c83a36a7c2f18b16794e5a2c57
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>
Git-commit: 82e9f646555442d63e47155171592ee790275ea3
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
Signed-off-by: Maya Erez <merez@codeaurora.org>
drivers/net/wireless/ath/wil6210/main.c

index fca8acf..a44753c 100644 (file)
@@ -950,15 +950,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);