]> git.karo-electronics.de Git - linux-beck.git/commitdiff
wil6210: Reorder reset preparation sequence
authorVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Mon, 28 Jan 2013 16:31:05 +0000 (18:31 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 30 Jan 2013 20:07:16 +0000 (15:07 -0500)
Disable interrupts first to prevent spurious WMI events arrival

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/wil6210/main.c

index 4c1533088fe5145bf3ef115a1fc7ffb3cb76fe04..aa598f37899bc500963e27c7ea467a9fff675af6 100644 (file)
@@ -250,13 +250,13 @@ int wil_reset(struct wil6210_priv *wil)
        cancel_work_sync(&wil->disconnect_worker);
        wil6210_disconnect(wil, NULL);
 
+       wil6210_disable_irq(wil);
+       wil->status = 0;
+
        wmi_event_flush(wil);
 
-       flush_workqueue(wil->wmi_wq);
        flush_workqueue(wil->wmi_wq_conn);
-
-       wil6210_disable_irq(wil);
-       wil->status = 0;
+       flush_workqueue(wil->wmi_wq);
 
        /* TODO: put MAC in reset */
        wil_target_reset(wil);