Search Linux Wireless

Re: [RFC/RFT 1/4] mt76x02: configure basic rates and fallback on STA mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 08, 2018 at 03:58:29PM +0100, Lorenzo Bianconi wrote:
> > For STA mode configure legacy basic rates according to info
> > mac80211 provides to us, as well as follback registers, which
> > are setup in vendor driver under CONFIG_STA_SUPPORT .
> > For LB_FBK_CFG1 register use values from vendor driver, which
> > are different for mt76x0 and mt76x2 .
> >
> > Signed-off-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx>
> > ---
> >  drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> >
> > diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
> > index 87ce6a51fb05..2be4b527477f 100644
> > --- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
> > +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
> > @@ -678,6 +678,18 @@ void mt76x02_bss_info_changed(struct ieee80211_hw *hw,
> >                 tasklet_enable(&dev->pre_tbtt_tasklet);
> >         }
> >
> > +       if (changed & BSS_CHANGED_BASIC_RATES &&
> > +           vif->type == NL80211_IFTYPE_STATION) {
> > +               mt76_wr(dev, MT_LEGACY_BASIC_RATE, info->basic_rates);
> > +               mt76_wr(dev, MT_VHT_HT_FBK_CFG0, 0x65432100);
> > +               mt76_wr(dev, MT_VHT_HT_FBK_CFG1, 0xedcba980);
> > +               mt76_wr(dev, MT_LG_FBK_CFG0, 0xedcba988);
> > +               if (is_mt76x2(dev))
> > +                       mt76_wr(dev, MT_LG_FBK_CFG1, 0x87872100);
> > +               else
> > +                       mt76_wr(dev, MT_LG_FBK_CFG1, 0x00872100);
> > +       }
> > +
> 
> since these values are constant, why not put them init_vals?

I wanted them to be used only in STA mode like vendor driver does.
However if we will have AP+STA , we still will configure them,
so better to configure them anyway and put in init_vals .

Thanks
Stanislaw




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux