diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2012-02-22 02:10:27 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-27 14:06:34 -0500 |
commit | df198b172f7a14ecf7aefaadb3761c273600333e (patch) | |
tree | 1c2618700d7d5c7194b573fbb1dfee575e65eb99 /drivers/net/wireless/ath/ath9k/gpio.c | |
parent | 5908120fdc2aac0cb1be4059b40ec256d55934bc (diff) |
ath9k: Use proper start/stop routines for BTCOEX
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/gpio.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/gpio.c | 31 |
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 | ||
248 | int ath_init_btcoex_timer(struct ath_softc *sc) | 248 | static 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 | ||
321 | void 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 | |||
337 | void 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 | |||
321 | void ath9k_deinit_btcoex(struct ath_softc *sc) | 350 | void ath9k_deinit_btcoex(struct ath_softc *sc) |
322 | { | 351 | { |
323 | if ((sc->btcoex.no_stomp_timer) && | 352 | if ((sc->btcoex.no_stomp_timer) && |