aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-06-21 05:23:27 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-06-22 16:09:50 -0400
commita208db944142db1700c6676dc724454213986bed (patch)
treec4c54862f8bb3c0b50a2e318a91ced3ff0362051 /drivers/net
parent172805ad46b78717a738ca5c7908c68f0326d3a9 (diff)
ath9k: initialize tx gain table for AR9330
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_hw.c48
1 files changed, 44 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_hw.c b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
index dc0ad4a21d52..264a7eae822e 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
@@ -328,7 +328,17 @@ static void ar9003_tx_gain_table_apply(struct ath_hw *ah)
328 switch (ar9003_hw_get_tx_gain_idx(ah)) { 328 switch (ar9003_hw_get_tx_gain_idx(ah)) {
329 case 0: 329 case 0:
330 default: 330 default:
331 if (AR_SREV_9340(ah)) 331 if (AR_SREV_9330_12(ah))
332 INIT_INI_ARRAY(&ah->iniModesTxGain,
333 ar9331_modes_lowest_ob_db_tx_gain_1p2,
334 ARRAY_SIZE(ar9331_modes_lowest_ob_db_tx_gain_1p2),
335 5);
336 else if (AR_SREV_9330_11(ah))
337 INIT_INI_ARRAY(&ah->iniModesTxGain,
338 ar9331_modes_lowest_ob_db_tx_gain_1p1,
339 ARRAY_SIZE(ar9331_modes_lowest_ob_db_tx_gain_1p1),
340 5);
341 else if (AR_SREV_9340(ah))
332 INIT_INI_ARRAY(&ah->iniModesTxGain, 342 INIT_INI_ARRAY(&ah->iniModesTxGain,
333 ar9340Modes_lowest_ob_db_tx_gain_table_1p0, 343 ar9340Modes_lowest_ob_db_tx_gain_table_1p0,
334 ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0), 344 ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0),
@@ -345,7 +355,17 @@ static void ar9003_tx_gain_table_apply(struct ath_hw *ah)
345 5); 355 5);
346 break; 356 break;
347 case 1: 357 case 1:
348 if (AR_SREV_9340(ah)) 358 if (AR_SREV_9330_12(ah))
359 INIT_INI_ARRAY(&ah->iniModesTxGain,
360 ar9331_modes_high_ob_db_tx_gain_1p2,
361 ARRAY_SIZE(ar9331_modes_high_ob_db_tx_gain_1p2),
362 5);
363 else if (AR_SREV_9330_11(ah))
364 INIT_INI_ARRAY(&ah->iniModesTxGain,
365 ar9331_modes_high_ob_db_tx_gain_1p1,
366 ARRAY_SIZE(ar9331_modes_high_ob_db_tx_gain_1p1),
367 5);
368 else if (AR_SREV_9340(ah))
349 INIT_INI_ARRAY(&ah->iniModesTxGain, 369 INIT_INI_ARRAY(&ah->iniModesTxGain,
350 ar9340Modes_lowest_ob_db_tx_gain_table_1p0, 370 ar9340Modes_lowest_ob_db_tx_gain_table_1p0,
351 ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0), 371 ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0),
@@ -362,7 +382,17 @@ static void ar9003_tx_gain_table_apply(struct ath_hw *ah)
362 5); 382 5);
363 break; 383 break;
364 case 2: 384 case 2:
365 if (AR_SREV_9340(ah)) 385 if (AR_SREV_9330_12(ah))
386 INIT_INI_ARRAY(&ah->iniModesTxGain,
387 ar9331_modes_low_ob_db_tx_gain_1p2,
388 ARRAY_SIZE(ar9331_modes_low_ob_db_tx_gain_1p2),
389 5);
390 else if (AR_SREV_9330_11(ah))
391 INIT_INI_ARRAY(&ah->iniModesTxGain,
392 ar9331_modes_low_ob_db_tx_gain_1p1,
393 ARRAY_SIZE(ar9331_modes_low_ob_db_tx_gain_1p1),
394 5);
395 else if (AR_SREV_9340(ah))
366 INIT_INI_ARRAY(&ah->iniModesTxGain, 396 INIT_INI_ARRAY(&ah->iniModesTxGain,
367 ar9340Modes_lowest_ob_db_tx_gain_table_1p0, 397 ar9340Modes_lowest_ob_db_tx_gain_table_1p0,
368 ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0), 398 ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0),
@@ -379,7 +409,17 @@ static void ar9003_tx_gain_table_apply(struct ath_hw *ah)
379 5); 409 5);
380 break; 410 break;
381 case 3: 411 case 3:
382 if (AR_SREV_9340(ah)) 412 if (AR_SREV_9330_12(ah))
413 INIT_INI_ARRAY(&ah->iniModesTxGain,
414 ar9331_modes_high_power_tx_gain_1p2,
415 ARRAY_SIZE(ar9331_modes_high_power_tx_gain_1p2),
416 5);
417 else if (AR_SREV_9330_11(ah))
418 INIT_INI_ARRAY(&ah->iniModesTxGain,
419 ar9331_modes_high_power_tx_gain_1p1,
420 ARRAY_SIZE(ar9331_modes_high_power_tx_gain_1p1),
421 5);
422 else if (AR_SREV_9340(ah))
383 INIT_INI_ARRAY(&ah->iniModesTxGain, 423 INIT_INI_ARRAY(&ah->iniModesTxGain,
384 ar9340Modes_lowest_ob_db_tx_gain_table_1p0, 424 ar9340Modes_lowest_ob_db_tx_gain_table_1p0,
385 ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0), 425 ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0),