aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-12-13 08:40:53 +0100
committerJohn W. Linville <linville@tuxdriver.com>2010-12-13 15:23:33 -0500
commit1782352d4908c79d195b43e0c1b6b109e0d93d05 (patch)
treefeff3bddf7f505efa006d9a9892ab90f35c8b874 /drivers/net/wireless/ath/ath9k/ar9003_paprd.c
parentath9k: fix PA predistortion thermal measurement handling (diff)
downloadlinux-dev-1782352d4908c79d195b43e0c1b6b109e0d93d05.tar.xz
linux-dev-1782352d4908c79d195b43e0c1b6b109e0d93d05.zip
ath9k_hw: fix the PA predistortion rate mask
The EEPROM PAPRD rate mask fields only contain mask values for actual rates in the low 25 bits. The upper bits are reserved for tx power scale values. Add the proper mask definitions and use them before writing the values to the register. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ar9003_paprd.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_paprd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
index 74cff4365c43..cdca4c3265b9 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
@@ -52,8 +52,8 @@ static void ar9003_paprd_setup_single_table(struct ath_hw *ah)
else
hdr = &eep->modalHeader2G;
- am_mask = le32_to_cpu(hdr->papdRateMaskHt20);
- ht40_mask = le32_to_cpu(hdr->papdRateMaskHt40);
+ am_mask = le32_to_cpu(hdr->papdRateMaskHt20) & AR9300_PAPRD_RATE_MASK;
+ ht40_mask = le32_to_cpu(hdr->papdRateMaskHt40) & AR9300_PAPRD_RATE_MASK;
REG_RMW_FIELD(ah, AR_PHY_PAPRD_AM2AM, AR_PHY_PAPRD_AM2AM_MASK, am_mask);
REG_RMW_FIELD(ah, AR_PHY_PAPRD_AM2PM, AR_PHY_PAPRD_AM2PM_MASK, am_mask);