linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Felix Fietkau <nbd@nbd.name>
Cc: Markus Theil <markus.theil@tu-ilmenau.de>,
	linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com
Subject: Re: [PATCH v8 2/6] mt76: mt76x02: split beaconing
Date: Tue, 26 Nov 2019 11:44:54 +0100	[thread overview]
Message-ID: <20191126104453.GA7944@redhat.com> (raw)
In-Reply-To: <40c52ae5-85d8-8a65-2b4b-1a52bf1b73ab@nbd.name>

On Mon, Nov 25, 2019 at 06:12:56PM +0100, Felix Fietkau wrote:
> On 2019-11-25 17:59, Stanislaw Gruszka wrote:
> > On Mon, Nov 25, 2019 at 03:07:59PM +0100, Markus Theil wrote:
> >> On 11/25/19 2:00 PM, Stanislaw Gruszka wrote:
> >> > On Thu, Nov 21, 2019 at 06:59:57PM +0100, Markus Theil wrote:
> >> >> +void mt76x02_mac_set_beacon_finish(struct mt76x02_dev *dev)
> >> >> +{
> >> >> +	mt76_wr(dev, MT_BCN_BYPASS_MASK,
> >> >> +		0xff00 | ~bitrev8(dev->beacon_data_mask));
> >> > Since you arrange beacon slots continues starting from 0
> >> > (i.e. 0,1,2 instead of "random" vif_idx values like 0,4,6),
> >> > I think it would make sense to keep
> >> > MT_MAC_BSSID_DW1_MBEACON_N = bcn_idx - 1 and set mask unchanged.
> >> >
> >> > But no strong opinion here, code with bitrev8 looks fine too.
> >> I'd like to keep the bitrev8 code, as it saves a copy over usb for usb
> >> devices, if MT_MAC_BSSID_DW_BEACON_N is kept constant.
> >> bitrev8 should be a rather cheap operation compared to a copy over some
> >> form of bus.
> > 
> > This make sense. I tested the code on MT7630E and after adding missed
> > write_txwi function, it works fine. So I think bitrev8 code is ok.
> I find the use of bitrev8/ffz a bit convoluted. If I understand the code
> right, wouldn't it be equivalent to keeping beacon_data_count instead of
> beacon_data_mask and doing:
> mt76_wr(dev, MT_BCN_BYPASS_MASK,
> 	0xffff & ~((1 << dev->beacon_data_count) - 1));

If we want to keep constatn MT_MAC_BSSID_DW1_MBEACON_N=7 , I think
correct formula would be:

0xff00 | ~(0xff00 >> dev->beacon_data_count)

Anyway something simpler than bitrev8 can be used to calculate
bypass mask.

Stanislaw 


  parent reply	other threads:[~2019-11-26 10:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21 17:59 [PATCH v8 0/6] mt76: channel switch support for USB devices Markus Theil
2019-11-21 17:59 ` [PATCH v8 1/6] mt76: mt76x02: ommit beacon slot clearing Markus Theil
2019-11-21 17:59 ` [PATCH v8 2/6] mt76: mt76x02: split beaconing Markus Theil
2019-11-25 13:00   ` Stanislaw Gruszka
2019-11-25 14:07     ` Markus Theil
2019-11-25 16:59       ` Stanislaw Gruszka
2019-11-25 17:12         ` Felix Fietkau
2019-11-25 17:32           ` Stanislaw Gruszka
2019-11-26 10:44           ` Stanislaw Gruszka [this message]
2019-11-21 17:59 ` [PATCH v8 3/6] mt76: mt76x02: add check for invalid vif idx Markus Theil
2019-11-24  3:30   ` kbuild test robot
2019-11-21 17:59 ` [PATCH v8 4/6] mt76: mt76x02: remove a copy call for usb speedup Markus Theil
2019-11-25 12:49   ` Stanislaw Gruszka
2019-11-21 18:00 ` [PATCH v8 5/6] mt76: speed up usb bulk copy Markus Theil
2019-11-21 18:00 ` [PATCH v8 6/6] mt76: mt76x02: add channel switch support for usb interfaces Markus Theil
2019-11-25 13:04   ` Stanislaw Gruszka
2019-11-25 14:51     ` Markus Theil
2019-11-25 15:32       ` Markus Theil
2019-11-25 17:02         ` Stanislaw Gruszka
2019-11-25 18:30           ` Markus Theil
2019-11-25 18:40             ` Markus Theil

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=20191126104453.GA7944@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=markus.theil@tu-ilmenau.de \
    --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).