aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/eeprom_4k.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-07-11 06:48:39 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-07-12 16:05:37 -0400
commit601e0cb165e65dc185b31fe7ebd2c0169ea47306 (patch)
treee587bc1ec2b9b90816c783ad00be1762760aa532 /drivers/net/wireless/ath/ath9k/eeprom_4k.c
parente796643eaf0889c346e6b69c5afe777c327b1919 (diff)
ath9k_hw: fix antenna diversity on AR9285
On AR9285, the antenna switch configuration register uses more than just 16 bits. Because of an arbitrary mask applied to the EEPROM value that stores this configuration, diversity was broken in some cases, leading to a significant degradation in signal strength. Fix this by changing the callback to return a 32 bit value and remove the arbitrary mask. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/eeprom_4k.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/eeprom_4k.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_4k.c b/drivers/net/wireless/ath/ath9k/eeprom_4k.c
index e25a2abbf56..afafc4d4b8f 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c
@@ -1150,13 +1150,13 @@ static void ath9k_hw_4k_set_board_values(struct ath_hw *ah,
1150 } 1150 }
1151} 1151}
1152 1152
1153static u16 ath9k_hw_4k_get_eeprom_antenna_cfg(struct ath_hw *ah, 1153static u32 ath9k_hw_4k_get_eeprom_antenna_cfg(struct ath_hw *ah,
1154 struct ath9k_channel *chan) 1154 struct ath9k_channel *chan)
1155{ 1155{
1156 struct ar5416_eeprom_4k *eep = &ah->eeprom.map4k; 1156 struct ar5416_eeprom_4k *eep = &ah->eeprom.map4k;
1157 struct modal_eep_4k_header *pModal = &eep->modalHeader; 1157 struct modal_eep_4k_header *pModal = &eep->modalHeader;
1158 1158
1159 return pModal->antCtrlCommon & 0xFFFF; 1159 return pModal->antCtrlCommon;
1160} 1160}
1161 1161
1162static u8 ath9k_hw_4k_get_num_ant_config(struct ath_hw *ah, 1162static u8 ath9k_hw_4k_get_num_ant_config(struct ath_hw *ah,