All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
To: Felix Fietkau <nbd@openwrt.org>
Cc: <linville@tuxdriver.com>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 4/5] ath9k_hw: fix tx gain table index for AR953x
Date: Tue, 24 Jun 2014 22:25:16 +0530	[thread overview]
Message-ID: <20140624165514.GA13362@qca.qualcomm.com> (raw)
In-Reply-To: <53A968C4.1020302@openwrt.org>

On Tue, Jun 24, 2014 at 02:02:12PM +0200, Felix Fietkau wrote:
> On 2014-06-24 13:37, Rajkumar Manoharan wrote:
> > Fix tx gain table index on fast channel change for AR953x.
> > 
> > Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
> > ---
> >  drivers/net/wireless/ath/ath9k/ar9003_phy.c | 14 ++++++++++----
> >  1 file changed, 10 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
> > index 8927fc3..1ef17e1 100644
> > --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
> > +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
> > @@ -1552,12 +1552,15 @@ static int ar9003_hw_fast_chan_change(struct ath_hw *ah,
> >  				      u8 *ini_reloaded)
> >  {
> >  	unsigned int regWrites = 0;
> > -	u32 modesIndex;
> > +	u32 modesIndex, txgain_index = 0;
> >  
> > -	if (IS_CHAN_5GHZ(chan))
> > +	if (IS_CHAN_5GHZ(chan)) {
> >  		modesIndex = IS_CHAN_HT40(chan) ? 2 : 1;
> > -	else
> > +	} else {
> > +		if (AR_SREV_9531(ah))
> > +			txgain_index = 1;
> >  		modesIndex = IS_CHAN_HT40(chan) ? 3 : 4;
> > +	}
> 
> How about putting this here:
> 	if (AR_SREV_9531(ah))
> 		txgain_index = 1;
> 	else
> 		txgain_index = modesIndex;
> 
> >  
> >  	if (modesIndex == ah->modes_index) {
> >  		*ini_reloaded = false;
> > @@ -1573,7 +1576,10 @@ static int ar9003_hw_fast_chan_change(struct ath_hw *ah,
> >  		ar9003_hw_prog_ini(ah, &ah->ini_radio_post_sys2ant,
> >  				   modesIndex);
> >  
> > -	REG_WRITE_ARRAY(&ah->iniModesTxGain, modesIndex, regWrites);
> > +	if (AR_SREV_9531(ah))
> > +		REG_WRITE_ARRAY(&ah->iniModesTxGain, txgain_index, regWrites);
> > +	else
> > +		REG_WRITE_ARRAY(&ah->iniModesTxGain, modesIndex, regWrites);
> And then we can change this part to always use txgain_index instead of
> modesIndex, without the extra SREV check.
>
Completely agree. That looks neat. Let me upload v2 set.

-Rajkumar

  reply	other threads:[~2014-06-24 16:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24 11:37 [PATCH 1/5] ath9k_hw: update CCK loop coefficients for AR953x 1.0 Rajkumar Manoharan
2014-06-24 11:37 ` [PATCH 2/5] ath9k_hw: Add QCA953x 2.0 initvals Rajkumar Manoharan
2014-06-24 11:37 ` [PATCH 3/5] ath9k_hw: fix XPABIASLEVEL settings for AR9531 Rajkumar Manoharan
2014-06-24 11:37 ` [PATCH 4/5] ath9k_hw: fix tx gain table index for AR953x Rajkumar Manoharan
2014-06-24 12:02   ` Felix Fietkau
2014-06-24 16:55     ` Rajkumar Manoharan [this message]
2014-06-24 11:37 ` [PATCH 5/5] ath9k_hw: Fix pll2_divfrac " Rajkumar Manoharan

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=20140624165514.GA13362@qca.qualcomm.com \
    --to=rmanohar@qti.qualcomm.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 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.