From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Markus Theil <markus.theil@tu-ilmenau.de>
Cc: nbd@nbd.name, linux-wireless@vger.kernel.org,
lorenzo.bianconi@redhat.com
Subject: Re: [PATCH v6 2/5] mt76: mt76x02: split beaconing
Date: Thu, 21 Nov 2019 13:58:43 +0100 [thread overview]
Message-ID: <20191121125842.GB13833@redhat.com> (raw)
In-Reply-To: <91b706b5-68b4-9679-a209-872f326de937@tu-ilmenau.de>
On Wed, Nov 20, 2019 at 11:27:55PM +0100, Markus Theil wrote:
> >> - }
> >> -
> >> - for (i = bcn_idx; i < ARRAY_SIZE(dev->beacons); i++) {
> >> - if (!(dev->beacon_data_mask & BIT(i)))
> >> - break;
> >> -
> >> - __mt76x02_mac_set_beacon(dev, i, NULL);
> >> - }
> >>
> >> mt76_rmw_field(dev, MT_MAC_BSSID_DW1, MT_MAC_BSSID_DW1_MBEACON_N,
> >> bcn_idx - 1);
> >> +
> >> + mt76_wr(dev, MT_BCN_BYPASS_MASK, 0xff00 | ~dev->beacon_data_mask);
> > I'm not sure if this is correct for multi bss.
> >
> > In MT7620 manual BCM_BAYPASS_MASK is described as below:
> >
> > "
> > Directly bypasses the Tx Beacon frame with the specified
> > Beacon number. Bit0=Nth Beacon, bit1=(N- 1)th Beacon,... etc.
> > N is the number of Beacons defined in the MULTI_BCN_NUM field in the
> > MAC_BSSID_DW1(offset: 0x1014) register.
> > 0: Disable
> > 1: Enable
> > "
> >
> > Assuming manual is correct (it could be wrong) bypass mask should be
> > calculated differently.
> >
> > Stanislaw
> >
> I tested the updated code with my usb nic and an mbss with 2 ap vifs.
> Both beacons were transmitted. Maybe the manual is wrong in this place.
If MAC_BSSID_DW1_MBEACON_N is set to 1 (2 beacons) according to manual
bit0 is for second beacon slot and bit1 is for first beacon slot.
Those bits are both marked at once, so no problem will happen.
Problem may happen when you remove first vif/beacon. Then you will
have bit1 marked in ->beacon_data_mask . But bit0 will be expect
in BCM_BAYPASS_MASK by hardware (when MAC_BSSID_DW1_MBEACON_N=0)
This scenarios can be extended to more vifs. So if you no longer
use bcn_idx and use vif_idx directly to point beacon slot/address.
(ie. before for vif_idx 0,4,6, bcn_idx were 0,1,2 now there
will be 0,4,6). You need to specify 7 (8 beacons) in
MT_MAC_BSSID_DW1_MBEACON_N, and set bypass mask accordingly.
For example:
mt76_rmw_field(dev, MT_MAC_BSSID_DW1, MT_MAC_BSSID_DW1_MBEACON_N, 7);
mask = 0;
for (i = 0; i < 8; i++)
if (dev->beacons[i])
mask |= BIT(7 - i);
mt76_wr(dev, MT_BCN_BYPASS_MASK, 0xff00 | ~mask);
But again, this have to be tested. Ideally on mmio hardware which
support more bssid's or on usb hardware with temporally increased
num of bss limitation.
Stanislaw
next prev parent reply other threads:[~2019-11-21 12:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-19 15:47 [PATCH v6 0/5] mt76: channel switch support for USB devices Markus Theil
2019-11-19 15:47 ` [PATCH v6 1/5] mt76: mt76x02: ommit beacon slot clearing Markus Theil
2019-11-19 15:47 ` [PATCH v6 2/5] mt76: mt76x02: split beaconing Markus Theil
2019-11-20 9:28 ` Stanislaw Gruszka
2019-11-20 22:27 ` Markus Theil
2019-11-21 12:58 ` Stanislaw Gruszka [this message]
2019-11-21 15:11 ` Markus Theil
2019-11-19 15:47 ` [PATCH v6 3/5] mt76: mt76x02: remove a copy call for usb speedup Markus Theil
2019-11-19 15:47 ` [PATCH v6 4/5] mt76: speed up usb bulk copy Markus Theil
2019-11-19 15:47 ` [PATCH v6 5/5] mt76: mt76x02: add channel switch support for usb interfaces 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=20191121125842.GB13833@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 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.