Skip to content

Commit

Permalink
ath9k: Fix ref power interpolation logic for AR9287 chipsets.
Browse files Browse the repository at this point in the history
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Vivek Natarajan authored and John W. Linville committed Aug 20, 2009
1 parent 08fc5c1 commit d4fe5af
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions drivers/net/wireless/ath/ath9k/eeprom_9287.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,6 @@ static void ar9287_eeprom_get_tx_gain_index(struct ath_hw *ah,
u8 *pCalChans, u16 availPiers,
int8_t *pPwr)
{
u8 pcdac, i = 0;
u16 idxL = 0, idxR = 0, numPiers;
bool match;
struct chan_centers centers;
Expand All @@ -392,17 +391,12 @@ static void ar9287_eeprom_get_tx_gain_index(struct ath_hw *ah,
&idxL, &idxR);

if (match) {
pcdac = pRawDatasetOpLoop[idxL].pcdac[0][0];
*pPwr = pRawDatasetOpLoop[idxL].pwrPdg[0][0];
*pPwr = (int8_t) pRawDatasetOpLoop[idxL].pwrPdg[0][0];
} else {
pcdac = pRawDatasetOpLoop[idxR].pcdac[0][0];
*pPwr = (pRawDatasetOpLoop[idxL].pwrPdg[0][0] +
pRawDatasetOpLoop[idxR].pwrPdg[0][0])/2;
*pPwr = ((int8_t) pRawDatasetOpLoop[idxL].pwrPdg[0][0] +
(int8_t) pRawDatasetOpLoop[idxR].pwrPdg[0][0])/2;
}

while ((pcdac > ah->originalGain[i]) &&
(i < (AR9280_TX_GAIN_TABLE_SIZE - 1)))
i++;
}

static void ar9287_eeprom_olpc_set_pdadcs(struct ath_hw *ah,
Expand Down

0 comments on commit d4fe5af

Please sign in to comment.