Commit 80b99932 authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by John W. Linville

ath9k_hw: shift code for AR9280 OLC temp comp

We're bailing out on the alternative code path so remove the
else branch.
Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent becdbc54
...@@ -711,25 +711,24 @@ static void ath9k_olc_temp_compensation(struct ath_hw *ah) ...@@ -711,25 +711,24 @@ static void ath9k_olc_temp_compensation(struct ath_hw *ah)
rddata = REG_READ(ah, AR_PHY_TX_PWRCTRL4); rddata = REG_READ(ah, AR_PHY_TX_PWRCTRL4);
currPDADC = MS(rddata, AR_PHY_TX_PWRCTRL_PD_AVG_OUT); currPDADC = MS(rddata, AR_PHY_TX_PWRCTRL_PD_AVG_OUT);
if (ah->initPDADC == 0 || currPDADC == 0) { if (ah->initPDADC == 0 || currPDADC == 0)
return; return;
} else {
if (ah->eep_ops->get_eeprom(ah, EEP_DAC_HPWR_5G)) if (ah->eep_ops->get_eeprom(ah, EEP_DAC_HPWR_5G))
delta = (currPDADC - ah->initPDADC + 4) / 8; delta = (currPDADC - ah->initPDADC + 4) / 8;
else else
delta = (currPDADC - ah->initPDADC + 5) / 10; delta = (currPDADC - ah->initPDADC + 5) / 10;
if (delta != ah->PDADCdelta) { if (delta != ah->PDADCdelta) {
ah->PDADCdelta = delta; ah->PDADCdelta = delta;
for (i = 1; i < AR9280_TX_GAIN_TABLE_SIZE; i++) { for (i = 1; i < AR9280_TX_GAIN_TABLE_SIZE; i++) {
regval = ah->originalGain[i] - delta; regval = ah->originalGain[i] - delta;
if (regval < 0) if (regval < 0)
regval = 0; regval = 0;
REG_RMW_FIELD(ah, REG_RMW_FIELD(ah,
AR_PHY_TX_GAIN_TBL1 + i * 4, AR_PHY_TX_GAIN_TBL1 + i * 4,
AR_PHY_TX_GAIN, regval); AR_PHY_TX_GAIN, regval);
}
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment