diff options
author | Vasanthakumar Thiagarajan <vasanth@atheros.com> | 2011-04-19 09:59:06 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-25 14:50:09 -0400 |
commit | d7fd52a80f9537970da1f80d785cac67375c05df (patch) | |
tree | 861a17fd29f009c9e3c15f696ea035d17e4b9e77 | |
parent | 070c4d509b1edcd0b8a40177a02e4302416c56d7 (diff) |
ath9k_hw: Initialize tx and rx gain table from initvals.h for ar9340
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_hw.c | 42 |
1 files changed, 36 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_hw.c b/drivers/net/wireless/ath/ath9k/ar9003_hw.c index 37af7216a1a2..a55eddbb2589 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c | |||
@@ -220,7 +220,12 @@ static void ar9003_tx_gain_table_apply(struct ath_hw *ah) | |||
220 | switch (ar9003_hw_get_tx_gain_idx(ah)) { | 220 | switch (ar9003_hw_get_tx_gain_idx(ah)) { |
221 | case 0: | 221 | case 0: |
222 | default: | 222 | default: |
223 | if (AR_SREV_9485_11(ah)) | 223 | if (AR_SREV_9340(ah)) |
224 | INIT_INI_ARRAY(&ah->iniModesTxGain, | ||
225 | ar9340Modes_lowest_ob_db_tx_gain_table_1p0, | ||
226 | ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0), | ||
227 | 5); | ||
228 | else if (AR_SREV_9485_11(ah)) | ||
224 | INIT_INI_ARRAY(&ah->iniModesTxGain, | 229 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
225 | ar9485_modes_lowest_ob_db_tx_gain_1_1, | 230 | ar9485_modes_lowest_ob_db_tx_gain_1_1, |
226 | ARRAY_SIZE(ar9485_modes_lowest_ob_db_tx_gain_1_1), | 231 | ARRAY_SIZE(ar9485_modes_lowest_ob_db_tx_gain_1_1), |
@@ -232,7 +237,12 @@ static void ar9003_tx_gain_table_apply(struct ath_hw *ah) | |||
232 | 5); | 237 | 5); |
233 | break; | 238 | break; |
234 | case 1: | 239 | case 1: |
235 | if (AR_SREV_9485_11(ah)) | 240 | if (AR_SREV_9340(ah)) |
241 | INIT_INI_ARRAY(&ah->iniModesTxGain, | ||
242 | ar9340Modes_lowest_ob_db_tx_gain_table_1p0, | ||
243 | ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0), | ||
244 | 5); | ||
245 | else if (AR_SREV_9485_11(ah)) | ||
236 | INIT_INI_ARRAY(&ah->iniModesTxGain, | 246 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
237 | ar9485Modes_high_ob_db_tx_gain_1_1, | 247 | ar9485Modes_high_ob_db_tx_gain_1_1, |
238 | ARRAY_SIZE(ar9485Modes_high_ob_db_tx_gain_1_1), | 248 | ARRAY_SIZE(ar9485Modes_high_ob_db_tx_gain_1_1), |
@@ -244,7 +254,12 @@ static void ar9003_tx_gain_table_apply(struct ath_hw *ah) | |||
244 | 5); | 254 | 5); |
245 | break; | 255 | break; |
246 | case 2: | 256 | case 2: |
247 | if (AR_SREV_9485_11(ah)) | 257 | if (AR_SREV_9340(ah)) |
258 | INIT_INI_ARRAY(&ah->iniModesTxGain, | ||
259 | ar9340Modes_lowest_ob_db_tx_gain_table_1p0, | ||
260 | ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0), | ||
261 | 5); | ||
262 | else if (AR_SREV_9485_11(ah)) | ||
248 | INIT_INI_ARRAY(&ah->iniModesTxGain, | 263 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
249 | ar9485Modes_low_ob_db_tx_gain_1_1, | 264 | ar9485Modes_low_ob_db_tx_gain_1_1, |
250 | ARRAY_SIZE(ar9485Modes_low_ob_db_tx_gain_1_1), | 265 | ARRAY_SIZE(ar9485Modes_low_ob_db_tx_gain_1_1), |
@@ -256,7 +271,12 @@ static void ar9003_tx_gain_table_apply(struct ath_hw *ah) | |||
256 | 5); | 271 | 5); |
257 | break; | 272 | break; |
258 | case 3: | 273 | case 3: |
259 | if (AR_SREV_9485_11(ah)) | 274 | if (AR_SREV_9340(ah)) |
275 | INIT_INI_ARRAY(&ah->iniModesTxGain, | ||
276 | ar9340Modes_lowest_ob_db_tx_gain_table_1p0, | ||
277 | ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0), | ||
278 | 5); | ||
279 | else if (AR_SREV_9485_11(ah)) | ||
260 | INIT_INI_ARRAY(&ah->iniModesTxGain, | 280 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
261 | ar9485Modes_high_power_tx_gain_1_1, | 281 | ar9485Modes_high_power_tx_gain_1_1, |
262 | ARRAY_SIZE(ar9485Modes_high_power_tx_gain_1_1), | 282 | ARRAY_SIZE(ar9485Modes_high_power_tx_gain_1_1), |
@@ -275,7 +295,12 @@ static void ar9003_rx_gain_table_apply(struct ath_hw *ah) | |||
275 | switch (ar9003_hw_get_rx_gain_idx(ah)) { | 295 | switch (ar9003_hw_get_rx_gain_idx(ah)) { |
276 | case 0: | 296 | case 0: |
277 | default: | 297 | default: |
278 | if (AR_SREV_9485_11(ah)) | 298 | if (AR_SREV_9340(ah)) |
299 | INIT_INI_ARRAY(&ah->iniModesRxGain, | ||
300 | ar9340Common_rx_gain_table_1p0, | ||
301 | ARRAY_SIZE(ar9340Common_rx_gain_table_1p0), | ||
302 | 2); | ||
303 | else if (AR_SREV_9485_11(ah)) | ||
279 | INIT_INI_ARRAY(&ah->iniModesRxGain, | 304 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
280 | ar9485Common_wo_xlna_rx_gain_1_1, | 305 | ar9485Common_wo_xlna_rx_gain_1_1, |
281 | ARRAY_SIZE(ar9485Common_wo_xlna_rx_gain_1_1), | 306 | ARRAY_SIZE(ar9485Common_wo_xlna_rx_gain_1_1), |
@@ -287,7 +312,12 @@ static void ar9003_rx_gain_table_apply(struct ath_hw *ah) | |||
287 | 2); | 312 | 2); |
288 | break; | 313 | break; |
289 | case 1: | 314 | case 1: |
290 | if (AR_SREV_9485_11(ah)) | 315 | if (AR_SREV_9340(ah)) |
316 | INIT_INI_ARRAY(&ah->iniModesRxGain, | ||
317 | ar9340Common_wo_xlna_rx_gain_table_1p0, | ||
318 | ARRAY_SIZE(ar9340Common_wo_xlna_rx_gain_table_1p0), | ||
319 | 2); | ||
320 | else if (AR_SREV_9485_11(ah)) | ||
291 | INIT_INI_ARRAY(&ah->iniModesRxGain, | 321 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
292 | ar9485Common_wo_xlna_rx_gain_1_1, | 322 | ar9485Common_wo_xlna_rx_gain_1_1, |
293 | ARRAY_SIZE(ar9485Common_wo_xlna_rx_gain_1_1), | 323 | ARRAY_SIZE(ar9485Common_wo_xlna_rx_gain_1_1), |