On Mon, Sep 19, 2011 at 10:38 AM, Felix Fietkau <nbd@xxxxxxxxxxx> wrote: > @@ -986,21 +995,15 @@ static void ath9k_hw_set_def_power_per_rate_table(struct ath_hw *ah, > struct ath9k_channel *chan, > int16_t *ratesArray, > u16 cfgCtl, > - u16 AntennaReduction, > - u16 twiceMaxRegulatoryPower, > + u16 antenna_reduction, > u16 powerLimit) > { > #define REDUCE_SCALED_POWER_BY_TWO_CHAIN 6 /* 10*log10(2)*2 */ > #define REDUCE_SCALED_POWER_BY_THREE_CHAIN 9 /* 10*log10(3)*2 */ > > - struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah); > struct ar5416_eeprom_def *pEepData = &ah->eeprom.def; > u16 twiceMaxEdgePower = MAX_RATE_POWER; > - static const u16 tpScaleReductionTable[5] = > - { 0, 3, 6, 9, MAX_RATE_POWER }; > - > int i; > - int16_t twiceLargestAntenna; > struct cal_ctl_data *rep; > struct cal_target_power_leg targetPowerOfdm, targetPowerCck = { > 0, { 0, 0, 0, 0} > @@ -1012,7 +1015,7 @@ static void ath9k_hw_set_def_power_per_rate_table(struct ath_hw *ah, > struct cal_target_power_ht targetPowerHt20, targetPowerHt40 = { > 0, {0, 0, 0, 0} > }; > - u16 scaledPower = 0, minCtlPower, maxRegAllowedPower; > + u16 scaledPower = 0, minCtlPower; > static const u16 ctlModesFor11a[] = { > CTL_11A, CTL_5GHT20, CTL_11A_EXT, CTL_5GHT40 > }; Although we do not use the reg->tp_scale I see no log which explains that it will not, I'm reviewing TPC right now and we do need to support it but its unclear to me yet if we are doing everything correctly in mac80211 / cfg80211 for it. As far as I can see the tp_scale stuff is used only if the default is not set, but as you noted its always set to the default. I am trying to review the internal code to see under what cases this changes but its hard to review. Although I'd like to see this removed I'd prefer to treat this separately from the cleanup you are doing, which I do find highly valuable. Luis ��.n��������+%������w��{.n�����{���zW����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f