linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com
Subject: Re: [PATCH v2 2/4] ath9k_hw: clean up tx power handling
Date: Mon, 19 Sep 2011 22:50:03 +0200	[thread overview]
Message-ID: <4E77AAFB.1080805@openwrt.org> (raw)
In-Reply-To: <CAB=NE6XvanRQ6Yje_qHhkfzbLmZn9o5Q+5y1NobJwCyuMLFEvg@mail.gmail.com>

On 2011-09-19 10:41 PM, Luis R. Rodriguez wrote:
> On Mon, Sep 19, 2011 at 10:38 AM, Felix Fietkau<nbd@openwrt.org>  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.
Why keep it? All it does is subtract something from the max regulatory 
power level, so it does not make any sense to keep this crap duplicated 
in all the the eeprom files.
If we ever do need it (which I doubt), it needs to be added in a 
different place anyway.

- Felix

  reply	other threads:[~2011-09-19 20:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-19 17:38 [PATCH v2 1/4] ath9k_hw: make ath9k_hw_set_interrupts use ah->imask by default Felix Fietkau
2011-09-19 17:38 ` [PATCH v2 2/4] ath9k_hw: clean up tx power handling Felix Fietkau
2011-09-19 17:38   ` [PATCH v2 3/4] ath: remove ath_regulatory::current_rd_ext Felix Fietkau
2011-09-19 17:38     ` [PATCH v2 4/4] ath9k_hw: remove EEP_REG_1 Felix Fietkau
2011-09-19 18:18     ` [PATCH v2 3/4] ath: remove ath_regulatory::current_rd_ext Luis R. Rodriguez
2011-09-19 18:29       ` Felix Fietkau
2011-09-19 18:43         ` Luis R. Rodriguez
2011-09-19 18:56           ` Felix Fietkau
2011-09-19 18:58             ` Luis R. Rodriguez
2011-09-19 19:03               ` Felix Fietkau
2011-09-19 20:29                 ` John W. Linville
2011-09-19 18:30   ` [PATCH v2 2/4] ath9k_hw: clean up tx power handling Felix Fietkau
2011-09-19 20:41   ` Luis R. Rodriguez
2011-09-19 20:50     ` Felix Fietkau [this message]
2011-09-19 21:14       ` Luis R. Rodriguez
2011-09-19 21:21         ` Felix Fietkau
2011-09-19 21:45           ` Luis R. Rodriguez
2011-09-19 21:54             ` Luis R. Rodriguez
2011-09-19 22:04               ` Felix Fietkau
2011-09-19 22:12                 ` Luis R. Rodriguez
2011-09-19 22:13                   ` Luis R. Rodriguez
2011-09-19 22:22                     ` Felix Fietkau
2011-09-20  2:45                       ` Adrian Chadd
2011-09-19 22:02             ` Felix Fietkau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E77AAFB.1080805@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mcgrof@qca.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).