|
@@ -564,9 +564,6 @@ static void ath9k_hw_set_ar9287_power_per_rate_table(struct ath_hw *ah,
|
|
|
(((cfgCtl & ~CTL_MODE_M) | (pCtlMode[ctlMode] & CTL_MODE_M)) == \
|
|
|
((pEepData->ctlIndex[i] & CTL_MODE_M) | SD_NO_CTL))
|
|
|
|
|
|
-#define REDUCE_SCALED_POWER_BY_TWO_CHAIN 6 /* 10*log10(2)*2 */
|
|
|
-#define REDUCE_SCALED_POWER_BY_THREE_CHAIN 10 /* 10*log10(3)*2 */
|
|
|
-
|
|
|
u16 twiceMaxEdgePower;
|
|
|
int i;
|
|
|
struct cal_ctl_data_ar9287 *rep;
|
|
@@ -591,29 +588,8 @@ static void ath9k_hw_set_ar9287_power_per_rate_table(struct ath_hw *ah,
|
|
|
tx_chainmask = ah->txchainmask;
|
|
|
|
|
|
ath9k_hw_get_channel_centers(ah, chan, ¢ers);
|
|
|
- scaledPower = powerLimit - antenna_reduction;
|
|
|
-
|
|
|
- /*
|
|
|
- * Reduce scaled Power by number of chains active
|
|
|
- * to get the per chain tx power level.
|
|
|
- */
|
|
|
- switch (ar5416_get_ntxchains(tx_chainmask)) {
|
|
|
- case 1:
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- if (scaledPower > REDUCE_SCALED_POWER_BY_TWO_CHAIN)
|
|
|
- scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN;
|
|
|
- else
|
|
|
- scaledPower = 0;
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- if (scaledPower > REDUCE_SCALED_POWER_BY_THREE_CHAIN)
|
|
|
- scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN;
|
|
|
- else
|
|
|
- scaledPower = 0;
|
|
|
- break;
|
|
|
- }
|
|
|
- scaledPower = max((u16)0, scaledPower);
|
|
|
+ scaledPower = ath9k_hw_get_scaled_power(ah, powerLimit,
|
|
|
+ antenna_reduction);
|
|
|
|
|
|
/*
|
|
|
* Get TX power from EEPROM.
|
|
@@ -786,8 +762,6 @@ static void ath9k_hw_set_ar9287_power_per_rate_table(struct ath_hw *ah,
|
|
|
|
|
|
#undef CMP_CTL
|
|
|
#undef CMP_NO_CTL
|
|
|
-#undef REDUCE_SCALED_POWER_BY_TWO_CHAIN
|
|
|
-#undef REDUCE_SCALED_POWER_BY_THREE_CHAIN
|
|
|
}
|
|
|
|
|
|
static void ath9k_hw_ar9287_set_txpower(struct ath_hw *ah,
|