summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorVivek Natarajan <vivek.natraj@gmail.com>2009-08-14 08:02:04 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-08-20 17:35:52 +0200
commitd4fe5afa006bf308962877c4768c4e60d37a3da2 (patch)
treea54d6c52f98ccceae9eeb70f7859fe4b1748f8f1 /drivers/net/wireless/ath
parentath9k: Enable LEDs for AR9287 chipsets. (diff)
downloadlinux-d4fe5afa006bf308962877c4768c4e60d37a3da2.tar.xz
linux-d4fe5afa006bf308962877c4768c4e60d37a3da2.zip
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')
-rw-r--r--drivers/net/wireless/ath/ath9k/eeprom_9287.c12
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 aeb7f484b6e1..959097927eee 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,
u8 *pCalChans, u16 availPiers,
int8_t *pPwr)
{
- u8 pcdac, i = 0;
u16 idxL = 0, idxR = 0, numPiers;
bool match;
struct chan_centers centers;
@@ -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,