Hi

On Tue, Oct 09, 2018 at 02:27:22PM +0200, Daniel Golle wrote:
> On Tue, Oct 09, 2018 at 01:56:08PM +0200,  Gruszka wrote:
> > Register 66 was causing issues on RT6352 if set to the same value as
> > in MTK driver. With 1c reg value device was working fine in both HT20
> > and HT40 modes.
> 
> My guess is that this may change once we add proper TSSI which involes
> parts of AGC init as well. I suggest to add a comment in the code to
> reflect that.

I don't understand what you suggest, could you be more specific ?

> > diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c 
> > b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> > index 1a2bf6c49b82..3a04eaef8511 100644
> > --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> > +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> > @@ -3981,11 +3981,7 @@ static void rt2800_config_channel(struct rt2x00_dev 
> > *rt2x00dev,
> >             rt2800_bbp_write(rt2x00dev, 196, reg);
> >  
> >             /* AGC init */
> > -           if (rt2x00_rt(rt2x00dev, RT6352))
> > -                   reg = 0x04;
> > -           else
> > -                   reg = rf->channel <= 14 ? 0x1c : 0x24;
> > -
> > +           reg = rf->channel <= 14 ? 0x1c : 0x24;
> >             reg += 2 * rt2x00dev->lna_gain;
> 
> We can summerize the two lines into
>               reg = 0x1c + (2 * rt2x00dev->lna_gain);
> which is also what is was before introducing support for MT7620.

I think you mean

reg = (rf->channel <= 14 ? 0x1c : 0x24) + 2 * rt2x00dev->lna_gain; 

to do not break 5GHz support for RT5592.  I can change that in
separate patch, since this one in not technically wrong.

Thanks
Stanislaw

Reply via email to