ath9k: MCI state machine based on MCI interrupt
RFC 17/18 ath9k: MCI state machine based on MCI interrupt
From: Mohammed Shafi Shajakhan <[email protected]>
Signed-off-by Mohammed Shafi Shajakhan <[email protected]>
--- drivers/net/wireless/ath/ath9k/hw.c | 4 +- drivers/net/wireless/ath/ath9k/init.c | 11 + drivers/net/wireless/ath/ath9k/main.c | 3 + drivers/net/wireless/ath/ath9k/mci.c | 341 +++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath9k/mci.h | 1 + 5 files changed, 359 insertions(+), 1 deletions(-)
drivers/net/wireless/ath/ath9k/hw.c +3 -1
@@ -2397,7 +2397,9 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah) pCap->hw_caps |=ATH9K_HW_CAP_4KB_SPLITTRANS ;if (common->btcoex_enabled) { -if (AR_SREV_9300_20_OR_LATER (ah)) { +if (AR_SREV_9462 (ah)) + btcoex_hw->scheme =ATH_BTCOEX_CFG_MCI ; +else if (AR_SREV_9300_20_OR_LATER (ah)) { btcoex_hw->scheme =ATH_BTCOEX_CFG_3WIRE ; btcoex_hw->btactive_gpio =ATH_BTACTIVE_GPIO_9300 ; btcoex_hw->wlanactive_gpio =ATH_WLANACTIVE_GPIO_9300 ;
drivers/net/wireless/ath/ath9k/init.c +11 -0
@@ -425,8 +425,16 @@ static int ath9k_init_btcoex(struct ath_softc *sc) txq = sc->tx.txq_map[WME_AC_BE ];ath9k_hw_init_btcoex_hw (sc->sc_ah, txq->axq_qnum); sc->btcoex.bt_stomp_type =ATH_BTCOEX_STOMP_LOW ; +break ; +case ATH_BTCOEX_CFG_MCI : + sc->btcoex.bt_stomp_type =ATH_BTCOEX_STOMP_LOW ; sc->btcoex.duty_cycle =ATH_BTCOEX_DEF_DUTY_CYCLE ;INIT_LIST_HEAD (&sc->btcoex.mci.info); + + r =ath_mci_setup (sc); +if (r) +return r; +if (sc->sc_ah->caps.hw_caps &ATH9K_HW_CAP_MCI ) { ah->btcoex_hw.mci.ready = false; ah->btcoex_hw.mci.bt_state =0 ;
@@ -861,6 +869,9 @@ static void ath9k_deinit_softc(struct ath_softc *sc) sc->sc_ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE)ath_gen_timer_free (sc->sc_ah, sc->btcoex.no_stomp_timer); +if (sc->sc_ah->btcoex_hw.scheme ==ATH_BTCOEX_CFG_MCI ) +ath_mci_cleanup (sc); +for (i =0 ; i <ATH9K_NUM_TX_QUEUES ; i++)if (ATH_TXQ_SETUP (sc, i))ath_tx_cleanupq (sc, &sc->tx.txq[i]);
drivers/net/wireless/ath/ath9k/main.c +3 -0
@@ -742,6 +742,9 @@ void ath9k_tasklet(unsigned long data)if (status &ATH9K_INT_GENTIMER )ath_gen_timer_isr (sc->sc_ah); +if (status &ATH9K_INT_MCI ) +ath_mci_intr (sc); + out:/* re-enable hardware interrupt */ ath9k_hw_enable_interrupts (ah);
drivers/net/wireless/ath/ath9k/mci.c +341 -0
356 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/mci.h +1 -0
@@ -134,4 +134,5 @@ void ath_mci_process_status(struct ath_softc *sc, struct ath_mci_profile_status *status);int ath_mci_setup (struct ath_softc *sc);void ath_mci_cleanup (struct ath_softc *sc); +void ath_mci_intr (struct ath_softc *sc);#endif
Signature · 1 line
1.7.0.4