diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2013-06-10 04:19:38 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-25 17:07:29 -0400 |
commit | e9c25a407d5c75646eb258de1363dccc1fd3ab47 (patch) | |
tree | ab64ea03a562f2b547c57e37503f93d8e0ac9a85 /drivers/net/wireless/ath | |
parent | 0530bd4a6cc3c04d1e621299e05d2da2c99736c4 (diff) |
ath9k_hw: Assign default xlna config for AR9485
commit 30d5b709da23f4ab9836c7f66d2d2e780a69cf12 upstream.
For AR9485 boards with XLNA, the default gpio config
is not set correctly, fix this.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_phy.h | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index e6b92ff265fd..25b8bbbe74fe 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | |||
@@ -3563,14 +3563,18 @@ static void ar9003_hw_ant_ctrl_apply(struct ath_hw *ah, bool is2ghz) | |||
3563 | { | 3563 | { |
3564 | struct ath9k_hw_capabilities *pCap = &ah->caps; | 3564 | struct ath9k_hw_capabilities *pCap = &ah->caps; |
3565 | int chain; | 3565 | int chain; |
3566 | u32 regval; | 3566 | u32 regval, value; |
3567 | static const u32 switch_chain_reg[AR9300_MAX_CHAINS] = { | 3567 | static const u32 switch_chain_reg[AR9300_MAX_CHAINS] = { |
3568 | AR_PHY_SWITCH_CHAIN_0, | 3568 | AR_PHY_SWITCH_CHAIN_0, |
3569 | AR_PHY_SWITCH_CHAIN_1, | 3569 | AR_PHY_SWITCH_CHAIN_1, |
3570 | AR_PHY_SWITCH_CHAIN_2, | 3570 | AR_PHY_SWITCH_CHAIN_2, |
3571 | }; | 3571 | }; |
3572 | 3572 | ||
3573 | u32 value = ar9003_hw_ant_ctrl_common_get(ah, is2ghz); | 3573 | if (AR_SREV_9485(ah) && (ar9003_hw_get_rx_gain_idx(ah) == 0)) |
3574 | ath9k_hw_cfg_output(ah, AR9300_EXT_LNA_CTL_GPIO_AR9485, | ||
3575 | AR_GPIO_OUTPUT_MUX_AS_PCIE_ATTENTION_LED); | ||
3576 | |||
3577 | value = ar9003_hw_ant_ctrl_common_get(ah, is2ghz); | ||
3574 | 3578 | ||
3575 | if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) { | 3579 | if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) { |
3576 | REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM, | 3580 | REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM, |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.h b/drivers/net/wireless/ath/ath9k/ar9003_phy.h index e71774196c01..5013c731f9f6 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h | |||
@@ -351,6 +351,8 @@ | |||
351 | 351 | ||
352 | #define AR_PHY_CCA_NOM_VAL_9330_2GHZ -118 | 352 | #define AR_PHY_CCA_NOM_VAL_9330_2GHZ -118 |
353 | 353 | ||
354 | #define AR9300_EXT_LNA_CTL_GPIO_AR9485 9 | ||
355 | |||
354 | /* | 356 | /* |
355 | * AGC Field Definitions | 357 | * AGC Field Definitions |
356 | */ | 358 | */ |