aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/hw.c
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vasanth@atheros.com>2009-01-02 05:05:46 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:46 -0500
commitc97c92d92715ea4ea2d7cf00957e8a014439bdd8 (patch)
treea55e53c304358ebe9987fe73c69ec7ad4b885fe3 /drivers/net/wireless/ath9k/hw.c
parent7d969204882882585336b0fa19ad4587d8fb15a2 (diff)
ath9k: Enable Bluetooth Coexistence support
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/hw.c')
-rw-r--r--drivers/net/wireless/ath9k/hw.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath9k/hw.c b/drivers/net/wireless/ath9k/hw.c
index 19144caa7977..3c026e6b2453 100644
--- a/drivers/net/wireless/ath9k/hw.c
+++ b/drivers/net/wireless/ath9k/hw.c
@@ -3341,6 +3341,12 @@ bool ath9k_hw_fill_cap_info(struct ath_hal *ah)
3341 pCap->num_antcfg_2ghz = 3341 pCap->num_antcfg_2ghz =
3342 ath9k_hw_get_num_ant_config(ah, ATH9K_HAL_FREQ_BAND_2GHZ); 3342 ath9k_hw_get_num_ant_config(ah, ATH9K_HAL_FREQ_BAND_2GHZ);
3343 3343
3344 if (AR_SREV_9280_10_OR_LATER(ah)) {
3345 pCap->hw_caps |= ATH9K_HW_CAP_BT_COEX;
3346 ah->ah_btactive_gpio = 6;
3347 ah->ah_wlanactive_gpio = 5;
3348 }
3349
3344 return true; 3350 return true;
3345} 3351}
3346 3352
@@ -3836,3 +3842,30 @@ void ath9k_hw_set11nmac2040(struct ath_hal *ah, enum ath9k_ht_macmode mode)
3836 3842
3837 REG_WRITE(ah, AR_2040_MODE, macmode); 3843 REG_WRITE(ah, AR_2040_MODE, macmode);
3838} 3844}
3845
3846/***************************/
3847/* Bluetooth Coexistence */
3848/***************************/
3849
3850void ath9k_hw_btcoex_enable(struct ath_hal *ah)
3851{
3852 /* connect bt_active to baseband */
3853 REG_CLR_BIT(ah, AR_GPIO_INPUT_EN_VAL,
3854 (AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_DEF |
3855 AR_GPIO_INPUT_EN_VAL_BT_FREQUENCY_DEF));
3856
3857 REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL,
3858 AR_GPIO_INPUT_EN_VAL_BT_ACTIVE_BB);
3859
3860 /* Set input mux for bt_active to gpio pin */
3861 REG_RMW_FIELD(ah, AR_GPIO_INPUT_MUX1,
3862 AR_GPIO_INPUT_MUX1_BT_ACTIVE,
3863 ah->ah_btactive_gpio);
3864
3865 /* Configure the desired gpio port for input */
3866 ath9k_hw_cfg_gpio_input(ah, ah->ah_btactive_gpio);
3867
3868 /* Configure the desired GPIO port for TX_FRAME output */
3869 ath9k_hw_cfg_output(ah, ah->ah_wlanactive_gpio,
3870 AR_GPIO_OUTPUT_MUX_AS_TX_FRAME);
3871}