aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2012-06-04 06:57:19 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-06-06 15:20:24 -0400
commite270e776a0985511146555e79edbe53539809adb (patch)
tree572a64737379ed58f0a6b8944e1ffa64c6750fd7
parentd09f5f4cfb9f4c6aa8c18ea522e824660d4096d7 (diff)
ath9k: Setup MCI interrupts properly
MCI interrupts have to be enabled only when BTCOEX is actually in use. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c3
-rw-r--r--drivers/net/wireless/ath/ath9k/mci.c11
-rw-r--r--drivers/net/wireless/ath/ath9k/mci.h11
3 files changed, 22 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index cfbcc047c61e..3809fc8ec8a4 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1045,8 +1045,7 @@ static int ath9k_start(struct ieee80211_hw *hw)
1045 if (ah->caps.hw_caps & ATH9K_HW_CAP_HT) 1045 if (ah->caps.hw_caps & ATH9K_HW_CAP_HT)
1046 ah->imask |= ATH9K_INT_CST; 1046 ah->imask |= ATH9K_INT_CST;
1047 1047
1048 if (ah->caps.hw_caps & ATH9K_HW_CAP_MCI) 1048 ath_mci_enable(sc);
1049 ah->imask |= ATH9K_INT_MCI;
1050 1049
1051 sc->sc_flags &= ~SC_OP_INVALID; 1050 sc->sc_flags &= ~SC_OP_INVALID;
1052 sc->sc_ah->is_monitoring = false; 1051 sc->sc_ah->is_monitoring = false;
diff --git a/drivers/net/wireless/ath/ath9k/mci.c b/drivers/net/wireless/ath/ath9k/mci.c
index 29fe52d69973..7b553f6a97b1 100644
--- a/drivers/net/wireless/ath/ath9k/mci.c
+++ b/drivers/net/wireless/ath/ath9k/mci.c
@@ -538,3 +538,14 @@ void ath_mci_intr(struct ath_softc *sc)
538 mci_int &= ~(AR_MCI_INTERRUPT_RX_INVALID_HDR | 538 mci_int &= ~(AR_MCI_INTERRUPT_RX_INVALID_HDR |
539 AR_MCI_INTERRUPT_CONT_INFO_TIMEOUT); 539 AR_MCI_INTERRUPT_CONT_INFO_TIMEOUT);
540} 540}
541
542void ath_mci_enable(struct ath_softc *sc)
543{
544 struct ath_common *common = ath9k_hw_common(sc->sc_ah);
545
546 if (!common->btcoex_enabled)
547 return;
548
549 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_MCI)
550 sc->sc_ah->imask |= ATH9K_INT_MCI;
551}
diff --git a/drivers/net/wireless/ath/ath9k/mci.h b/drivers/net/wireless/ath/ath9k/mci.h
index c841444f53c2..fc14eea034eb 100644
--- a/drivers/net/wireless/ath/ath9k/mci.h
+++ b/drivers/net/wireless/ath/ath9k/mci.h
@@ -130,4 +130,13 @@ void ath_mci_flush_profile(struct ath_mci_profile *mci);
130int ath_mci_setup(struct ath_softc *sc); 130int ath_mci_setup(struct ath_softc *sc);
131void ath_mci_cleanup(struct ath_softc *sc); 131void ath_mci_cleanup(struct ath_softc *sc);
132void ath_mci_intr(struct ath_softc *sc); 132void ath_mci_intr(struct ath_softc *sc);
133#endif 133
134#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
135void ath_mci_enable(struct ath_softc *sc);
136#else
137static inline void ath_mci_enable(struct ath_softc *sc)
138{
139}
140#endif /* CONFIG_ATH9K_BTCOEX_SUPPORT */
141
142#endif /* MCI_H*/