All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mohammed Shafi <mshajakhan@atheros.com>
To: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: "linville@tuxdriver.com" <linville@tuxdriver.com>,
	Mohammed Shafi <mshajakhan@atheros.com>,
	Luis Rodriguez <Luis.Rodriguez@Atheros.com>
Subject: Re: [RFC] ath9k: make use of get_paprd_scale_factor helper
Date: Fri, 27 May 2011 20:40:13 +0530	[thread overview]
Message-ID: <4DDFBED5.7030508@atheros.com> (raw)
In-Reply-To: <1306508895-22960-1-git-send-email-mshajakhan@atheros.com>

On Friday 27 May 2011 08:38 PM, Mohammed Shajakhan wrote:
> From: Mohammed Shafi Shajakhan<mshajakhan@atheros.com>
>
> Signed-off-by: Mohammed Shafi Shajakhan<mshajakhan@atheros.com>
> ---
>   drivers/net/wireless/ath/ath9k/ar9003_paprd.c |   18 +++---------------
>   1 files changed, 3 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
> index e4d6a87..4985a81 100644
> --- a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
> +++ b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
> @@ -46,11 +46,10 @@ EXPORT_SYMBOL(ar9003_paprd_enable);
>
>   static int ar9003_get_training_power_2g(struct ath_hw *ah)
>   {
> -	struct ar9300_eeprom *eep =&ah->eeprom.ar9300_eep;
> -	struct ar9300_modal_eep_header *hdr =&eep->modalHeader2G;
> +	struct ath9k_channel *chan = ah->curchan;
>   	unsigned int power, scale, delta;
>
> -	scale = MS(le32_to_cpu(hdr->papdRateMaskHt20), AR9300_PAPRD_SCALE_1);
> +	scale = ar9003_get_paprd_scale_factor(ah, chan);
>   	power = REG_READ_FIELD(ah, AR_PHY_POWERTX_RATE5,
>   			       AR_PHY_POWERTX_RATE5_POWERTXHT20_0);
>
> @@ -67,21 +66,10 @@ static int ar9003_get_training_power_2g(struct ath_hw *ah)
>   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(le32_to_cpu(hdr->papdRateMaskHt20),
> -			   AR9300_PAPRD_SCALE_1);
> -	else if (chan->channel>= 5400)
> -		scale = MS(le32_to_cpu(hdr->papdRateMaskHt40),
> -			   AR9300_PAPRD_SCALE_2);
> -	else
> -		scale = MS(le32_to_cpu(hdr->papdRateMaskHt40),
> -			   AR9300_PAPRD_SCALE_1);
> -
> +	scale = ar9003_get_paprd_scale_factor(ah, chan);
>   	if (IS_CHAN_HT40(chan))
>   		power = REG_READ_FIELD(ah, AR_PHY_POWERTX_RATE8,
>   			AR_PHY_POWERTX_RATE8_POWERTXHT40_5);

currently sending it as an RFC as there are some issues in PAPRD and I 
doubt fixing may cause merge conflicts

-- 
thanks,
shafi

      reply	other threads:[~2011-05-27 15:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-27 15:08 [RFC] ath9k: make use of get_paprd_scale_factor helper Mohammed Shafi Shajakhan
2011-05-27 15:10 ` Mohammed Shafi [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=4DDFBED5.7030508@atheros.com \
    --to=mshajakhan@atheros.com \
    --cc=Luis.Rodriguez@Atheros.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.