diff options
author | Rajkumar Manoharan <rmanohar@qca.qualcomm.com> | 2012-04-19 09:43:52 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-23 15:35:30 -0400 |
commit | 0466e2547d05a9ae8d49afc67a3851d034a528f8 (patch) | |
tree | 5437895999d3d44092135cd8346f7b41f7c54b90 | |
parent | ed2578cd24d033dcaa046b7324e91215ae1fdd8d (diff) |
ath9k_hw: remove ATH_BTCOEX_CFG_MCI
AR9462 uses modified version of 3-Wire hw scheme for btcoex.
MCI itself is not a separate hw scheme but it aids to manage
multiple bt profiles. In ar9462, bt priority traffic is identified
by the number of bt profile types instead of gpio. So that this
patch removes MCI hw scheme.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/btcoex.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/btcoex.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/gpio.c | 21 |
3 files changed, 17 insertions, 19 deletions
diff --git a/drivers/net/wireless/ath/ath9k/btcoex.c b/drivers/net/wireless/ath/ath9k/btcoex.c index ec3271993411..1ca6da80d4ad 100644 --- a/drivers/net/wireless/ath/ath9k/btcoex.c +++ b/drivers/net/wireless/ath/ath9k/btcoex.c | |||
@@ -108,9 +108,7 @@ void ath9k_hw_btcoex_init_scheme(struct ath_hw *ah) | |||
108 | return; | 108 | return; |
109 | } | 109 | } |
110 | 110 | ||
111 | if (AR_SREV_9462(ah)) { | 111 | if (AR_SREV_9300_20_OR_LATER(ah)) { |
112 | btcoex_hw->scheme = ATH_BTCOEX_CFG_MCI; | ||
113 | } else if (AR_SREV_9300_20_OR_LATER(ah)) { | ||
114 | btcoex_hw->scheme = ATH_BTCOEX_CFG_3WIRE; | 112 | btcoex_hw->scheme = ATH_BTCOEX_CFG_3WIRE; |
115 | btcoex_hw->btactive_gpio = ATH_BTACTIVE_GPIO_9300; | 113 | btcoex_hw->btactive_gpio = ATH_BTACTIVE_GPIO_9300; |
116 | btcoex_hw->wlanactive_gpio = ATH_WLANACTIVE_GPIO_9300; | 114 | btcoex_hw->wlanactive_gpio = ATH_WLANACTIVE_GPIO_9300; |
@@ -284,11 +282,12 @@ void ath9k_hw_btcoex_enable(struct ath_hw *ah) | |||
284 | ath9k_hw_btcoex_enable_2wire(ah); | 282 | ath9k_hw_btcoex_enable_2wire(ah); |
285 | break; | 283 | break; |
286 | case ATH_BTCOEX_CFG_3WIRE: | 284 | case ATH_BTCOEX_CFG_3WIRE: |
285 | if (AR_SREV_9462(ah)) { | ||
286 | ath9k_hw_btcoex_enable_mci(ah); | ||
287 | return; | ||
288 | } | ||
287 | ath9k_hw_btcoex_enable_3wire(ah); | 289 | ath9k_hw_btcoex_enable_3wire(ah); |
288 | break; | 290 | break; |
289 | case ATH_BTCOEX_CFG_MCI: | ||
290 | ath9k_hw_btcoex_enable_mci(ah); | ||
291 | return; | ||
292 | } | 291 | } |
293 | 292 | ||
294 | REG_RMW(ah, AR_GPIO_PDPU, | 293 | REG_RMW(ah, AR_GPIO_PDPU, |
@@ -305,11 +304,12 @@ void ath9k_hw_btcoex_disable(struct ath_hw *ah) | |||
305 | int i; | 304 | int i; |
306 | 305 | ||
307 | btcoex_hw->enabled = false; | 306 | btcoex_hw->enabled = false; |
308 | if (btcoex_hw->scheme == ATH_BTCOEX_CFG_MCI) { | 307 | if (AR_SREV_9462(ah)) { |
309 | ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_NONE); | 308 | ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_NONE); |
310 | for (i = 0; i < AR9300_NUM_BT_WEIGHTS; i++) | 309 | for (i = 0; i < AR9300_NUM_BT_WEIGHTS; i++) |
311 | REG_WRITE(ah, AR_MCI_COEX_WL_WEIGHTS(i), | 310 | REG_WRITE(ah, AR_MCI_COEX_WL_WEIGHTS(i), |
312 | btcoex_hw->wlan_weight[i]); | 311 | btcoex_hw->wlan_weight[i]); |
312 | return; | ||
313 | } | 313 | } |
314 | ath9k_hw_set_gpio(ah, btcoex_hw->wlanactive_gpio, 0); | 314 | ath9k_hw_set_gpio(ah, btcoex_hw->wlanactive_gpio, 0); |
315 | 315 | ||
diff --git a/drivers/net/wireless/ath/ath9k/btcoex.h b/drivers/net/wireless/ath/ath9k/btcoex.h index 8f93aef4414f..3a1e1cfabd5e 100644 --- a/drivers/net/wireless/ath/ath9k/btcoex.h +++ b/drivers/net/wireless/ath/ath9k/btcoex.h | |||
@@ -51,7 +51,6 @@ enum ath_btcoex_scheme { | |||
51 | ATH_BTCOEX_CFG_NONE, | 51 | ATH_BTCOEX_CFG_NONE, |
52 | ATH_BTCOEX_CFG_2WIRE, | 52 | ATH_BTCOEX_CFG_2WIRE, |
53 | ATH_BTCOEX_CFG_3WIRE, | 53 | ATH_BTCOEX_CFG_3WIRE, |
54 | ATH_BTCOEX_CFG_MCI, | ||
55 | }; | 54 | }; |
56 | 55 | ||
57 | struct ath9k_hw_mci { | 56 | struct ath9k_hw_mci { |
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c index dd10f4ac03ef..281a9af0f1b6 100644 --- a/drivers/net/wireless/ath/ath9k/gpio.c +++ b/drivers/net/wireless/ath/ath9k/gpio.c | |||
@@ -365,7 +365,7 @@ void ath9k_stop_btcoex(struct ath_softc *sc) | |||
365 | ath9k_hw_btcoex_disable(ah); | 365 | ath9k_hw_btcoex_disable(ah); |
366 | if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_3WIRE) | 366 | if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_3WIRE) |
367 | ath9k_btcoex_timer_pause(sc); | 367 | ath9k_btcoex_timer_pause(sc); |
368 | if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_MCI) | 368 | if (AR_SREV_9462(ah)) |
369 | ath_mci_flush_profile(&sc->btcoex.mci); | 369 | ath_mci_flush_profile(&sc->btcoex.mci); |
370 | } | 370 | } |
371 | } | 371 | } |
@@ -376,7 +376,7 @@ void ath9k_deinit_btcoex(struct ath_softc *sc) | |||
376 | ath9k_hw_get_btcoex_scheme(sc->sc_ah) == ATH_BTCOEX_CFG_3WIRE) | 376 | ath9k_hw_get_btcoex_scheme(sc->sc_ah) == ATH_BTCOEX_CFG_3WIRE) |
377 | ath_gen_timer_free(sc->sc_ah, sc->btcoex.no_stomp_timer); | 377 | ath_gen_timer_free(sc->sc_ah, sc->btcoex.no_stomp_timer); |
378 | 378 | ||
379 | if (ath9k_hw_get_btcoex_scheme(sc->sc_ah) == ATH_BTCOEX_CFG_MCI) | 379 | if (AR_SREV_9462(sc->sc_ah)) |
380 | ath_mci_cleanup(sc); | 380 | ath_mci_cleanup(sc); |
381 | } | 381 | } |
382 | 382 | ||
@@ -402,17 +402,16 @@ int ath9k_init_btcoex(struct ath_softc *sc) | |||
402 | txq = sc->tx.txq_map[WME_AC_BE]; | 402 | txq = sc->tx.txq_map[WME_AC_BE]; |
403 | ath9k_hw_init_btcoex_hw(sc->sc_ah, txq->axq_qnum); | 403 | ath9k_hw_init_btcoex_hw(sc->sc_ah, txq->axq_qnum); |
404 | sc->btcoex.bt_stomp_type = ATH_BTCOEX_STOMP_LOW; | 404 | sc->btcoex.bt_stomp_type = ATH_BTCOEX_STOMP_LOW; |
405 | break; | 405 | if (AR_SREV_9462(ah)) { |
406 | case ATH_BTCOEX_CFG_MCI: | 406 | sc->btcoex.duty_cycle = ATH_BTCOEX_DEF_DUTY_CYCLE; |
407 | sc->btcoex.bt_stomp_type = ATH_BTCOEX_STOMP_LOW; | 407 | INIT_LIST_HEAD(&sc->btcoex.mci.info); |
408 | sc->btcoex.duty_cycle = ATH_BTCOEX_DEF_DUTY_CYCLE; | ||
409 | INIT_LIST_HEAD(&sc->btcoex.mci.info); | ||
410 | 408 | ||
411 | r = ath_mci_setup(sc); | 409 | r = ath_mci_setup(sc); |
412 | if (r) | 410 | if (r) |
413 | return r; | 411 | return r; |
414 | 412 | ||
415 | ath9k_hw_btcoex_init_mci(ah); | 413 | ath9k_hw_btcoex_init_mci(ah); |
414 | } | ||
416 | 415 | ||
417 | break; | 416 | break; |
418 | default: | 417 | default: |