aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/eeprom_def.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/eeprom_def.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/eeprom_def.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c
index 5bfa031545f..da96a78f996 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom_def.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c
@@ -206,7 +206,7 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah)
206 pModal->antCtrlChain[i] = integer; 206 pModal->antCtrlChain[i] = integer;
207 } 207 }
208 208
209 for (i = 0; i < AR5416_EEPROM_MODAL_SPURS; i++) { 209 for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) {
210 word = swab16(pModal->spurChans[i].spurChan); 210 word = swab16(pModal->spurChans[i].spurChan);
211 pModal->spurChans[i].spurChan = word; 211 pModal->spurChans[i].spurChan = word;
212 } 212 }
@@ -616,7 +616,7 @@ static void ath9k_hw_get_def_gain_boundaries_pdadcs(struct ath_hw *ah,
616 int16_t minDelta = 0; 616 int16_t minDelta = 0;
617 struct chan_centers centers; 617 struct chan_centers centers;
618 618
619 memset(&minPwrT4, 0, AR9287_NUM_PD_GAINS); 619 memset(&minPwrT4, 0, AR5416_NUM_PD_GAINS);
620 ath9k_hw_get_channel_centers(ah, chan, &centers); 620 ath9k_hw_get_channel_centers(ah, chan, &centers);
621 621
622 for (numPiers = 0; numPiers < availPiers; numPiers++) { 622 for (numPiers = 0; numPiers < availPiers; numPiers++) {
@@ -685,7 +685,7 @@ static void ath9k_hw_get_def_gain_boundaries_pdadcs(struct ath_hw *ah,
685 (u16)((maxPwrT4[i] + minPwrT4[i + 1]) / 4); 685 (u16)((maxPwrT4[i] + minPwrT4[i + 1]) / 4);
686 686
687 pPdGainBoundaries[i] = 687 pPdGainBoundaries[i] =
688 min((u16)AR5416_MAX_RATE_POWER, pPdGainBoundaries[i]); 688 min((u16)MAX_RATE_POWER, pPdGainBoundaries[i]);
689 689
690 if ((i == 0) && !AR_SREV_5416_20_OR_LATER(ah)) { 690 if ((i == 0) && !AR_SREV_5416_20_OR_LATER(ah)) {
691 minDelta = pPdGainBoundaries[0] - 23; 691 minDelta = pPdGainBoundaries[0] - 23;
@@ -782,7 +782,7 @@ static int16_t ath9k_change_gain_boundary_setting(struct ath_hw *ah,
782 /* Because of a hardware limitation, ensure the gain boundary 782 /* Because of a hardware limitation, ensure the gain boundary
783 * is not larger than (63 - overlap) 783 * is not larger than (63 - overlap)
784 */ 784 */
785 gb_limit = (u16)(AR5416_MAX_RATE_POWER - pdGainOverlap_t2); 785 gb_limit = (u16)(MAX_RATE_POWER - pdGainOverlap_t2);
786 786
787 for (k = 0; k < numXpdGain; k++) 787 for (k = 0; k < numXpdGain; k++)
788 gb[k] = (u16)min(gb_limit, gb[k]); 788 gb[k] = (u16)min(gb_limit, gb[k]);
@@ -1001,9 +1001,9 @@ static void ath9k_hw_set_def_power_per_rate_table(struct ath_hw *ah,
1001 1001
1002 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah); 1002 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
1003 struct ar5416_eeprom_def *pEepData = &ah->eeprom.def; 1003 struct ar5416_eeprom_def *pEepData = &ah->eeprom.def;
1004 u16 twiceMaxEdgePower = AR5416_MAX_RATE_POWER; 1004 u16 twiceMaxEdgePower = MAX_RATE_POWER;
1005 static const u16 tpScaleReductionTable[5] = 1005 static const u16 tpScaleReductionTable[5] =
1006 { 0, 3, 6, 9, AR5416_MAX_RATE_POWER }; 1006 { 0, 3, 6, 9, MAX_RATE_POWER };
1007 1007
1008 int i; 1008 int i;
1009 int16_t twiceLargestAntenna; 1009 int16_t twiceLargestAntenna;
@@ -1148,7 +1148,7 @@ static void ath9k_hw_set_def_power_per_rate_table(struct ath_hw *ah,
1148 1148
1149 if (ah->eep_ops->get_eeprom_ver(ah) == 14 && 1149 if (ah->eep_ops->get_eeprom_ver(ah) == 14 &&
1150 ah->eep_ops->get_eeprom_rev(ah) <= 2) 1150 ah->eep_ops->get_eeprom_rev(ah) <= 2)
1151 twiceMaxEdgePower = AR5416_MAX_RATE_POWER; 1151 twiceMaxEdgePower = MAX_RATE_POWER;
1152 1152
1153 for (i = 0; (i < AR5416_NUM_CTLS) && pEepData->ctlIndex[i]; i++) { 1153 for (i = 0; (i < AR5416_NUM_CTLS) && pEepData->ctlIndex[i]; i++) {
1154 if ((((cfgCtl & ~CTL_MODE_M) | 1154 if ((((cfgCtl & ~CTL_MODE_M) |
@@ -1293,8 +1293,8 @@ static void ath9k_hw_def_set_txpower(struct ath_hw *ah,
1293 regulatory->max_power_level = 0; 1293 regulatory->max_power_level = 0;
1294 for (i = 0; i < ARRAY_SIZE(ratesArray); i++) { 1294 for (i = 0; i < ARRAY_SIZE(ratesArray); i++) {
1295 ratesArray[i] = (int16_t)(txPowerIndexOffset + ratesArray[i]); 1295 ratesArray[i] = (int16_t)(txPowerIndexOffset + ratesArray[i]);
1296 if (ratesArray[i] > AR5416_MAX_RATE_POWER) 1296 if (ratesArray[i] > MAX_RATE_POWER)
1297 ratesArray[i] = AR5416_MAX_RATE_POWER; 1297 ratesArray[i] = MAX_RATE_POWER;
1298 if (ratesArray[i] > regulatory->max_power_level) 1298 if (ratesArray[i] > regulatory->max_power_level)
1299 regulatory->max_power_level = ratesArray[i]; 1299 regulatory->max_power_level = ratesArray[i];
1300 } 1300 }