aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/gpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/gpio.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/gpio.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c
index ef23624518b5..1ca2ca54f0e1 100644
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
@@ -245,7 +245,7 @@ static void ath_btcoex_no_stomp_timer(void *arg)
245 ath9k_ps_restore(sc); 245 ath9k_ps_restore(sc);
246} 246}
247 247
248int ath_init_btcoex_timer(struct ath_softc *sc) 248static int ath_init_btcoex_timer(struct ath_softc *sc)
249{ 249{
250 struct ath_btcoex *btcoex = &sc->btcoex; 250 struct ath_btcoex *btcoex = &sc->btcoex;
251 251
@@ -318,6 +318,35 @@ void ath9k_btcoex_timer_pause(struct ath_softc *sc)
318 btcoex->hw_timer_enabled = false; 318 btcoex->hw_timer_enabled = false;
319} 319}
320 320
321void ath9k_start_btcoex(struct ath_softc *sc)
322{
323 struct ath_hw *ah = sc->sc_ah;
324
325 if ((ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE) &&
326 !ah->btcoex_hw.enabled) {
327 if (!(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_MCI))
328 ath9k_hw_btcoex_set_weight(ah, AR_BT_COEX_WGHT,
329 AR_STOMP_LOW_WLAN_WGHT);
330 ath9k_hw_btcoex_enable(ah);
331
332 if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_3WIRE)
333 ath9k_btcoex_timer_resume(sc);
334 }
335}
336
337void ath9k_stop_btcoex(struct ath_softc *sc)
338{
339 struct ath_hw *ah = sc->sc_ah;
340
341 if (ah->btcoex_hw.enabled &&
342 ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE) {
343 ath9k_hw_btcoex_disable(ah);
344 if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_3WIRE)
345 ath9k_btcoex_timer_pause(sc);
346 ath_mci_flush_profile(&sc->btcoex.mci);
347 }
348}
349
321void ath9k_deinit_btcoex(struct ath_softc *sc) 350void ath9k_deinit_btcoex(struct ath_softc *sc)
322{ 351{
323 if ((sc->btcoex.no_stomp_timer) && 352 if ((sc->btcoex.no_stomp_timer) &&