summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/btcoex.c
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vasanth@atheros.com>2009-08-26 15:38:46 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2009-08-28 18:40:49 (GMT)
commitf14462c6661c6b9e91d436f7ab66b35ed52ea703 (patch)
tree9127982bad569b7798ca8d038b5a6e38e1acca40 /drivers/net/wireless/ath/ath9k/btcoex.c
parent42cc41edf24b75fc6c37c99aed6e85455687e080 (diff)
downloadlinux-fsl-qoriq-f14462c6661c6b9e91d436f7ab66b35ed52ea703.tar.xz
ath9k: Move btcoex related data to a separate struct
Also define macros for wlanactive and btactive (5 & 6) gpios. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/btcoex.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/btcoex.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/btcoex.c b/drivers/net/wireless/ath/ath9k/btcoex.c
index abaf92d..9f19cd1 100644
--- a/drivers/net/wireless/ath/ath9k/btcoex.c
+++ b/drivers/net/wireless/ath/ath9k/btcoex.c
@@ -18,6 +18,8 @@
void ath9k_hw_btcoex_init(struct ath_hw *ah)
{
+ struct ath_btcoex_info *btcoex_info = &ah->ah_sc->btcoex_info;
+
/* connect bt_active to baseband */
REG_CLR_BIT(ah, AR_GPIO_INPUT_EN_VAL,
(AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_DEF |
@@ -29,16 +31,18 @@ void ath9k_hw_btcoex_init(struct ath_hw *ah)
/* Set input mux for bt_active to gpio pin */
REG_RMW_FIELD(ah, AR_GPIO_INPUT_MUX1,
AR_GPIO_INPUT_MUX1_BT_ACTIVE,
- ah->btactive_gpio);
+ btcoex_info->btactive_gpio);
/* Configure the desired gpio port for input */
- ath9k_hw_cfg_gpio_input(ah, ah->btactive_gpio);
+ ath9k_hw_cfg_gpio_input(ah, btcoex_info->btactive_gpio);
}
void ath9k_hw_btcoex_enable(struct ath_hw *ah)
{
+ struct ath_btcoex_info *btcoex_info = &ah->ah_sc->btcoex_info;
+
/* Configure the desired GPIO port for TX_FRAME output */
- ath9k_hw_cfg_output(ah, ah->wlanactive_gpio,
+ ath9k_hw_cfg_output(ah, btcoex_info->wlanactive_gpio,
AR_GPIO_OUTPUT_MUX_AS_TX_FRAME);
ah->ah_sc->sc_flags |= SC_OP_BTCOEX_ENABLED;
@@ -46,9 +50,11 @@ void ath9k_hw_btcoex_enable(struct ath_hw *ah)
void ath9k_hw_btcoex_disable(struct ath_hw *ah)
{
- ath9k_hw_set_gpio(ah, ah->wlanactive_gpio, 0);
+ struct ath_btcoex_info *btcoex_info = &ah->ah_sc->btcoex_info;
+
+ ath9k_hw_set_gpio(ah, btcoex_info->wlanactive_gpio, 0);
- ath9k_hw_cfg_output(ah, ah->wlanactive_gpio,
+ ath9k_hw_cfg_output(ah, btcoex_info->wlanactive_gpio,
AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
ah->ah_sc->sc_flags &= ~SC_OP_BTCOEX_ENABLED;