Linux wireless drivers development
 help / color / mirror / Atom feed
From: Vasanthakumar Thiagarajan <vasanth@atheros.com>
To: Felix Fietkau <nbd@openwrt.org>
Cc: Vasanth Thiagarajan <Vasanth.Thiagarajan@Atheros.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"linville@tuxdriver.com" <linville@tuxdriver.com>,
	Luis Rodriguez <Luis.Rodriguez@Atheros.com>
Subject: Re: [PATCH 5/7] ath9k_hw: fix PA predistortion training power selection
Date: Mon, 13 Dec 2010 12:56:04 +0530	[thread overview]
Message-ID: <20101213072604.GB13721@vasanth-laptop> (raw)
In-Reply-To: <4D05C8EF.6030603@openwrt.org>

On Mon, Dec 13, 2010 at 12:49:11PM +0530, Felix Fietkau wrote:
> On 2010-12-13 7:02 AM, Vasanthakumar Thiagarajan wrote:
> > On Sun, Dec 12, 2010 at 07:04:35PM +0530, Felix Fietkau wrote:
> >> The EEPROM contains scale factors for the tx power, which define
> >> the range of allowable difference between target power and training
> >> power. If the difference is too big, PA predistortion cannot be used.
> >> For 2.4 GHz there is only one scale factor, for 5 GHz there are
> >> three, depending on the specific frequency range.
> >> 
> >> Signed-off-by: Felix Fietkau <nbd@openwrt.org>
> >> ---
> >>  drivers/net/wireless/ath/ath9k/ar9003_eeprom.c |    8 ++
> >>  drivers/net/wireless/ath/ath9k/ar9003_paprd.c  |   99 ++++++++++++++++++++----
> >>  drivers/net/wireless/ath/ath9k/ar9003_phy.h    |    8 ++
> >>  drivers/net/wireless/ath/ath9k/hw.h            |    2 +
> >>  drivers/net/wireless/ath/ath9k/main.c          |    4 +-
> >>  5 files changed, 104 insertions(+), 17 deletions(-)

> >> +static int get_streams(int mask)
> >> +{
> >> +	return !!(mask & BIT(0)) + !!(mask & BIT(1)) + !!(mask & BIT(2));
> >> +}
> > ah->caps.max_txchains can be used instead of this function.
> No, it cannot. I need the number of active chains, not the number of
> chains that the hardware is capable of using.

Ah, right.
> 
> >> +
> >> +static int ar9003_get_training_power_5g(struct ath_hw *ah)
> >> +{
> >> +	struct ath_common *common = ath9k_hw_common(ah);
> >> +	struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep;
> >> +	struct ar9300_modal_eep_header *hdr = &eep->modalHeader5G;
> >> +	struct ath9k_channel *chan = ah->curchan;
> >> +	unsigned int power, scale, delta;
> >> +
> >> +	if (chan->channel >= 5700)
> >> +		scale = MS(hdr->papdRateMaskHt20, AR9300_PAPRD_SCALE_1);
> >> +	else if (chan->channel >= 5400)
> >> +		scale = MS(hdr->papdRateMaskHt40, AR9300_PAPRD_SCALE_2);
> >> +	else
> >> +		scale = MS(hdr->papdRateMaskHt40, AR9300_PAPRD_SCALE_1);
> > 
> > A helper function would be nice to get the paprd scale factor which
> > will also be used to disable paprd for particular rates. Anyway, i'm
> > doing changes to disable paprd based on scale factor and tx power,
> > i'll add a helper in my series.
> OK.

seems like it is missing endian conversion for big endian platform ?.

Vasanth

      reply	other threads:[~2010-12-13  7:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-12 13:34 [PATCH 1/7] ath9k_hw: initialize ah->slottime Felix Fietkau
2010-12-12 13:34 ` [PATCH 2/7] ath9k_hw: fix the slot time setting for long distance links Felix Fietkau
2010-12-12 13:34   ` [PATCH 3/7] ath9k: fix PA predistortion thermal measurement handling Felix Fietkau
2010-12-12 13:34     ` [PATCH 4/7] ath9k_hw: fix the PA predistortion rate mask Felix Fietkau
2010-12-12 13:34       ` [PATCH 5/7] ath9k_hw: fix PA predistortion training power selection Felix Fietkau
2010-12-12 13:34         ` [PATCH 6/7] ath9k_hw: update AR9003 initvals for improved radar detection Felix Fietkau
2010-12-12 13:34           ` [PATCH 7/7] ath9k_hw: update AR9003 initvals to improve carrier leak calibration/correction Felix Fietkau
2010-12-13  6:02         ` [PATCH 5/7] ath9k_hw: fix PA predistortion training power selection Vasanthakumar Thiagarajan
2010-12-13  7:19           ` Felix Fietkau
2010-12-13  7:26             ` Vasanthakumar Thiagarajan [this message]

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=20101213072604.GB13721@vasanth-laptop \
    --to=vasanth@atheros.com \
    --cc=Luis.Rodriguez@Atheros.com \
    --cc=Vasanth.Thiagarajan@Atheros.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=nbd@openwrt.org \
    /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