diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-06-12 00:33:59 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-14 15:39:32 -0400 |
commit | 4935250ac14d9aac7d98411bdead2e33a9fadeac (patch) | |
tree | d8f61d8413cd8ec5f08312118e0f6e19be9407f8 /drivers/net/wireless | |
parent | ab33449895a6690a3e5fcfa8391fdeb1be65c320 (diff) |
ath9k_hw: add support for parsing PA predistortion related EEPROM fields
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_eeprom.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 1 |
5 files changed, 18 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index 23eb60ea5455..343c9a427acb 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | |||
@@ -67,6 +67,7 @@ static const struct ar9300_eeprom ar9300_default = { | |||
67 | * bit2 - enable fastClock - enabled | 67 | * bit2 - enable fastClock - enabled |
68 | * bit3 - enable doubling - enabled | 68 | * bit3 - enable doubling - enabled |
69 | * bit4 - enable internal regulator - disabled | 69 | * bit4 - enable internal regulator - disabled |
70 | * bit5 - enable pa predistortion - disabled | ||
70 | */ | 71 | */ |
71 | .miscConfiguration = 0, /* bit0 - turn down drivestrength */ | 72 | .miscConfiguration = 0, /* bit0 - turn down drivestrength */ |
72 | .eepromWriteEnableGpio = 3, | 73 | .eepromWriteEnableGpio = 3, |
@@ -129,9 +130,11 @@ static const struct ar9300_eeprom ar9300_default = { | |||
129 | .txEndToRxOn = 0x2, | 130 | .txEndToRxOn = 0x2, |
130 | .txFrameToXpaOn = 0xe, | 131 | .txFrameToXpaOn = 0xe, |
131 | .thresh62 = 28, | 132 | .thresh62 = 28, |
132 | .futureModal = { /* [32] */ | 133 | .papdRateMaskHt20 = LE32(0x80c080), |
134 | .papdRateMaskHt40 = LE32(0x80c080), | ||
135 | .futureModal = { | ||
133 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 136 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
134 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 | 137 | 0, 0, 0, 0, 0, 0, 0, 0 |
135 | }, | 138 | }, |
136 | }, | 139 | }, |
137 | .calFreqPier2G = { | 140 | .calFreqPier2G = { |
@@ -326,9 +329,11 @@ static const struct ar9300_eeprom ar9300_default = { | |||
326 | .txEndToRxOn = 0x2, | 329 | .txEndToRxOn = 0x2, |
327 | .txFrameToXpaOn = 0xe, | 330 | .txFrameToXpaOn = 0xe, |
328 | .thresh62 = 28, | 331 | .thresh62 = 28, |
332 | .papdRateMaskHt20 = LE32(0xf0e0e0), | ||
333 | .papdRateMaskHt40 = LE32(0xf0e0e0), | ||
329 | .futureModal = { | 334 | .futureModal = { |
330 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 335 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
331 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 | 336 | 0, 0, 0, 0, 0, 0, 0, 0 |
332 | }, | 337 | }, |
333 | }, | 338 | }, |
334 | .calFreqPier5G = { | 339 | .calFreqPier5G = { |
@@ -644,6 +649,8 @@ static u32 ath9k_hw_ar9300_get_eeprom(struct ath_hw *ah, | |||
644 | return (pBase->featureEnable & 0x10) >> 4; | 649 | return (pBase->featureEnable & 0x10) >> 4; |
645 | case EEP_SWREG: | 650 | case EEP_SWREG: |
646 | return le32_to_cpu(pBase->swreg); | 651 | return le32_to_cpu(pBase->swreg); |
652 | case EEP_PAPRD: | ||
653 | return !!(pBase->featureEnable & BIT(5)); | ||
647 | default: | 654 | default: |
648 | return 0; | 655 | return 0; |
649 | } | 656 | } |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h index 23fb353c3bba..3c533bb983c7 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h | |||
@@ -234,7 +234,9 @@ struct ar9300_modal_eep_header { | |||
234 | u8 txEndToRxOn; | 234 | u8 txEndToRxOn; |
235 | u8 txFrameToXpaOn; | 235 | u8 txFrameToXpaOn; |
236 | u8 thresh62; | 236 | u8 thresh62; |
237 | u8 futureModal[32]; | 237 | __le32 papdRateMaskHt20; |
238 | __le32 papdRateMaskHt40; | ||
239 | u8 futureModal[24]; | ||
238 | } __packed; | 240 | } __packed; |
239 | 241 | ||
240 | struct ar9300_cal_data_per_freq_op_loop { | 242 | struct ar9300_cal_data_per_freq_op_loop { |
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.h b/drivers/net/wireless/ath/ath9k/eeprom.h index 7da7d73c0847..bdd8aa054b80 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom.h +++ b/drivers/net/wireless/ath/ath9k/eeprom.h | |||
@@ -263,7 +263,8 @@ enum eeprom_param { | |||
263 | EEP_PWR_TABLE_OFFSET, | 263 | EEP_PWR_TABLE_OFFSET, |
264 | EEP_DRIVE_STRENGTH, | 264 | EEP_DRIVE_STRENGTH, |
265 | EEP_INTERNAL_REGULATOR, | 265 | EEP_INTERNAL_REGULATOR, |
266 | EEP_SWREG | 266 | EEP_SWREG, |
267 | EEP_PAPRD, | ||
267 | }; | 268 | }; |
268 | 269 | ||
269 | enum ar5416_rates { | 270 | enum ar5416_rates { |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 83e04613f785..5a2e72aaf490 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -2235,6 +2235,8 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah) | |||
2235 | pCap->rx_status_len = sizeof(struct ar9003_rxs); | 2235 | pCap->rx_status_len = sizeof(struct ar9003_rxs); |
2236 | pCap->tx_desc_len = sizeof(struct ar9003_txc); | 2236 | pCap->tx_desc_len = sizeof(struct ar9003_txc); |
2237 | pCap->txs_len = sizeof(struct ar9003_txs); | 2237 | pCap->txs_len = sizeof(struct ar9003_txs); |
2238 | if (ah->eep_ops->get_eeprom(ah, EEP_PAPRD)) | ||
2239 | pCap->hw_caps |= ATH9K_HW_CAP_PAPRD; | ||
2238 | } else { | 2240 | } else { |
2239 | pCap->tx_desc_len = sizeof(struct ath_desc); | 2241 | pCap->tx_desc_len = sizeof(struct ath_desc); |
2240 | if (AR_SREV_9280_20(ah) && | 2242 | if (AR_SREV_9280_20(ah) && |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index 09dd7be549a0..9d092168855b 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -200,6 +200,7 @@ enum ath9k_hw_caps { | |||
200 | ATH9K_HW_CAP_LDPC = BIT(19), | 200 | ATH9K_HW_CAP_LDPC = BIT(19), |
201 | ATH9K_HW_CAP_FASTCLOCK = BIT(20), | 201 | ATH9K_HW_CAP_FASTCLOCK = BIT(20), |
202 | ATH9K_HW_CAP_SGI_20 = BIT(21), | 202 | ATH9K_HW_CAP_SGI_20 = BIT(21), |
203 | ATH9K_HW_CAP_PAPRD = BIT(22), | ||
203 | }; | 204 | }; |
204 | 205 | ||
205 | enum ath9k_capability_type { | 206 | enum ath9k_capability_type { |