ath9k: Process BTCOEX interrupts using a helper
authorSujith Manoharan <c_manoha@qca.qualcomm.com>
Wed, 22 Feb 2012 07:10:32 +0000 (12:40 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 27 Feb 2012 19:06:34 +0000 (14:06 -0500)
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ath9k.h
drivers/net/wireless/ath/ath9k/gpio.c
drivers/net/wireless/ath/ath9k/main.c

index 2ede8977406d38e9ec30b35ce30ee0f62d2cd5f3..acf53728894696a1e518ae7adcb5bd1aaadc2486 100644 (file)
@@ -460,6 +460,7 @@ void ath9k_start_btcoex(struct ath_softc *sc);
 void ath9k_stop_btcoex(struct ath_softc *sc);
 void ath9k_btcoex_timer_resume(struct ath_softc *sc);
 void ath9k_btcoex_timer_pause(struct ath_softc *sc);
+void ath9k_btcoex_handle_interrupt(struct ath_softc *sc, u32 status);
 
 /********************/
 /*   LED Control    */
index 1ca2ca54f0e1c870a88b664cc52aeae7c72e2184..a24aa679c69999fcc3b124a1d79e6d3d04fa9f1c 100644 (file)
@@ -318,6 +318,18 @@ void ath9k_btcoex_timer_pause(struct ath_softc *sc)
        btcoex->hw_timer_enabled = false;
 }
 
+void ath9k_btcoex_handle_interrupt(struct ath_softc *sc, u32 status)
+{
+       struct ath_hw *ah = sc->sc_ah;
+
+       if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_3WIRE)
+               if (status & ATH9K_INT_GENTIMER)
+                       ath_gen_timer_isr(sc->sc_ah);
+
+       if ((status & ATH9K_INT_MCI) && ATH9K_HW_CAP_MCI)
+               ath_mci_intr(sc);
+}
+
 void ath9k_start_btcoex(struct ath_softc *sc)
 {
        struct ath_hw *ah = sc->sc_ah;
index 82c36a918946ec0ea8de479bb952db331fe98853..02e95c8e7465539e0617a9bb0fb5e072cf377014 100644 (file)
@@ -735,12 +735,7 @@ void ath9k_tasklet(unsigned long data)
                        ath_tx_tasklet(sc);
        }
 
-       if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_3WIRE)
-               if (status & ATH9K_INT_GENTIMER)
-                       ath_gen_timer_isr(sc->sc_ah);
-
-       if ((status & ATH9K_INT_MCI) && ATH9K_HW_CAP_MCI)
-               ath_mci_intr(sc);
+       ath9k_btcoex_handle_interrupt(sc, status);
 
 out:
        /* re-enable hardware interrupt */