linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Cc: Felix Fietkau <nbd@nbd.name>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [RFC/RFT 1/4] mt76x02: configure basic rates and fallback on STA mode
Date: Thu, 8 Nov 2018 16:52:03 +0100	[thread overview]
Message-ID: <20181108155202.GA13621@redhat.com> (raw)
In-Reply-To: <CAJ0CqmXdvqdfQNXqxBmPn_t_EA7wg2hCd87rrwC+7N_y+8bh=g@mail.gmail.com>

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@redhat.com>
> > ---
> >  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


  reply	other threads:[~2018-11-08 15:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-08 14:47 [RFC/RFT 0/4] restore some old mt76x0u behaviour Stanislaw Gruszka
2018-11-08 14:47 ` [RFC/RFT 1/4] mt76x02: configure basic rates and fallback on STA mode Stanislaw Gruszka
2018-11-08 14:58   ` Lorenzo Bianconi
2018-11-08 15:52     ` Stanislaw Gruszka [this message]
2018-11-08 16:02       ` Felix Fietkau
2018-12-07 13:25         ` Stanislaw Gruszka
2018-11-08 14:47 ` [RFC/RFT 2/4] mt76x02: reserve wcid 0 for global traffic Stanislaw Gruszka
2018-11-08 15:01   ` Lorenzo Bianconi
2018-11-08 15:54     ` Stanislaw Gruszka
2018-11-08 16:05       ` Felix Fietkau
2018-11-08 14:47 ` [RFC/RFT 3/4] mt76x02: do not set protection on set_rts_threshold callback Stanislaw Gruszka
2018-11-09  9:23   ` Lorenzo Bianconi
2018-12-04 10:45     ` Stanislaw Gruszka
2018-12-04 11:50       ` Stanislaw Gruszka
2018-11-08 14:47 ` [RFC/RFT 4/4] mt76x02: set protection according to ht capabilities Stanislaw Gruszka
2018-11-09  9:29   ` Lorenzo Bianconi

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=20181108155202.GA13621@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=nbd@nbd.name \
    /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;
as well as URLs for NNTP newsgroup(s).