aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/calib.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2010-04-15 17:38:54 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-04-16 15:43:29 -0400
commit80b99932fd43ce3477fb2d952f12657963a2562d (patch)
tree3b4c4160045332fe66ac9c3770605603bce540b3 /drivers/net/wireless/ath/ath9k/calib.c
parentbecdbc542f3f3395138b45d7ae445886fa0feef7 (diff)
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: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/calib.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/calib.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
index e2c427b9ec62..5d61169de07b 100644
--- a/drivers/net/wireless/ath/ath9k/calib.c
+++ b/drivers/net/wireless/ath/ath9k/calib.c
@@ -711,25 +711,24 @@ static void ath9k_olc_temp_compensation(struct ath_hw *ah)
711 rddata = REG_READ(ah, AR_PHY_TX_PWRCTRL4); 711 rddata = REG_READ(ah, AR_PHY_TX_PWRCTRL4);
712 currPDADC = MS(rddata, AR_PHY_TX_PWRCTRL_PD_AVG_OUT); 712 currPDADC = MS(rddata, AR_PHY_TX_PWRCTRL_PD_AVG_OUT);
713 713
714 if (ah->initPDADC == 0 || currPDADC == 0) { 714 if (ah->initPDADC == 0 || currPDADC == 0)
715 return; 715 return;
716 } else { 716
717 if (ah->eep_ops->get_eeprom(ah, EEP_DAC_HPWR_5G)) 717 if (ah->eep_ops->get_eeprom(ah, EEP_DAC_HPWR_5G))
718 delta = (currPDADC - ah->initPDADC + 4) / 8; 718 delta = (currPDADC - ah->initPDADC + 4) / 8;
719 else 719 else
720 delta = (currPDADC - ah->initPDADC + 5) / 10; 720 delta = (currPDADC - ah->initPDADC + 5) / 10;
721 721
722 if (delta != ah->PDADCdelta) { 722 if (delta != ah->PDADCdelta) {
723 ah->PDADCdelta = delta; 723 ah->PDADCdelta = delta;
724 for (i = 1; i < AR9280_TX_GAIN_TABLE_SIZE; i++) { 724 for (i = 1; i < AR9280_TX_GAIN_TABLE_SIZE; i++) {
725 regval = ah->originalGain[i] - delta; 725 regval = ah->originalGain[i] - delta;
726 if (regval < 0) 726 if (regval < 0)
727 regval = 0; 727 regval = 0;
728 728
729 REG_RMW_FIELD(ah, 729 REG_RMW_FIELD(ah,
730 AR_PHY_TX_GAIN_TBL1 + i * 4, 730 AR_PHY_TX_GAIN_TBL1 + i * 4,
731 AR_PHY_TX_GAIN, regval); 731 AR_PHY_TX_GAIN, regval);
732 }
733 } 732 }
734 } 733 }
735 } 734 }