diff options
author | Vivek Natarajan <vivek.natraj@gmail.com> | 2009-08-14 02:02:04 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-20 11:35:52 -0400 |
commit | d4fe5afa006bf308962877c4768c4e60d37a3da2 (patch) | |
tree | a54d6c52f98ccceae9eeb70f7859fe4b1748f8f1 /drivers/net/wireless/ath/ath9k/eeprom_9287.c | |
parent | 08fc5c1ba026de0904aeeba9785f95f6603d58f7 (diff) |
ath9k: Fix ref power interpolation logic for AR9287 chipsets.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/eeprom_9287.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom_9287.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_9287.c b/drivers/net/wireless/ath/ath9k/eeprom_9287.c index aeb7f484b6e..959097927ee 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c | |||
@@ -374,7 +374,6 @@ static void ar9287_eeprom_get_tx_gain_index(struct ath_hw *ah, | |||
374 | u8 *pCalChans, u16 availPiers, | 374 | u8 *pCalChans, u16 availPiers, |
375 | int8_t *pPwr) | 375 | int8_t *pPwr) |
376 | { | 376 | { |
377 | u8 pcdac, i = 0; | ||
378 | u16 idxL = 0, idxR = 0, numPiers; | 377 | u16 idxL = 0, idxR = 0, numPiers; |
379 | bool match; | 378 | bool match; |
380 | struct chan_centers centers; | 379 | struct chan_centers centers; |
@@ -392,17 +391,12 @@ static void ar9287_eeprom_get_tx_gain_index(struct ath_hw *ah, | |||
392 | &idxL, &idxR); | 391 | &idxL, &idxR); |
393 | 392 | ||
394 | if (match) { | 393 | if (match) { |
395 | pcdac = pRawDatasetOpLoop[idxL].pcdac[0][0]; | 394 | *pPwr = (int8_t) pRawDatasetOpLoop[idxL].pwrPdg[0][0]; |
396 | *pPwr = pRawDatasetOpLoop[idxL].pwrPdg[0][0]; | ||
397 | } else { | 395 | } else { |
398 | pcdac = pRawDatasetOpLoop[idxR].pcdac[0][0]; | 396 | *pPwr = ((int8_t) pRawDatasetOpLoop[idxL].pwrPdg[0][0] + |
399 | *pPwr = (pRawDatasetOpLoop[idxL].pwrPdg[0][0] + | 397 | (int8_t) pRawDatasetOpLoop[idxR].pwrPdg[0][0])/2; |
400 | pRawDatasetOpLoop[idxR].pwrPdg[0][0])/2; | ||
401 | } | 398 | } |
402 | 399 | ||
403 | while ((pcdac > ah->originalGain[i]) && | ||
404 | (i < (AR9280_TX_GAIN_TABLE_SIZE - 1))) | ||
405 | i++; | ||
406 | } | 400 | } |
407 | 401 | ||
408 | static void ar9287_eeprom_olpc_set_pdadcs(struct ath_hw *ah, | 402 | static void ar9287_eeprom_olpc_set_pdadcs(struct ath_hw *ah, |