ath10k: don't enable interrupts for the diagnostic window
authorKalle Valo <kvalo@qca.qualcomm.com>
Wed, 24 Sep 2014 11:16:46 +0000 (14:16 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 26 Sep 2014 10:35:19 +0000 (13:35 +0300)
The diagnostic window (CE7) uses polling and is not initiliased to retrieve
interrupts so disable interrupts altogether for CE7. Otherwise ath10k crashes
when using the diagnostic window while the firmware is running due to NULL
dereference and polling reads timeout.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/ce.c

index 101cadb..09ef03e 100644 (file)
@@ -817,7 +817,10 @@ void ath10k_ce_enable_interrupts(struct ath10k *ar)
        struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
        int ce_id;
 
        struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
        int ce_id;
 
-       for (ce_id = 0; ce_id < CE_COUNT; ce_id++)
+       /* Skip the last copy engine, CE7 the diagnostic window, as that
+        * uses polling and isn't initialized for interrupts.
+        */
+       for (ce_id = 0; ce_id < CE_COUNT - 1; ce_id++)
                ath10k_ce_per_engine_handler_adjust(&ar_pci->ce_states[ce_id]);
 }
 
                ath10k_ce_per_engine_handler_adjust(&ar_pci->ce_states[ce_id]);
 }