All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alvin =?unknown-8bit?q?=C5=A0ipraga?= <ALSI@bang-olufsen.dk>
To: iwd@lists.01.org
Subject: Re: [PATCH 6/6] station: disable roaming logic for auto-roaming cards
Date: Thu, 11 Mar 2021 00:16:31 +0000	[thread overview]
Message-ID: <3f944297-a534-7aaf-0f94-9a27c3d27647@bang-olufsen.dk> (raw)
In-Reply-To: <03cb5e401c98ac6387b0a81b8b5f49cd98be9dc2.camel@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 5096 bytes --]

Hi both,

On 3/10/21 10:48 PM, James Prestwood wrote:
> On Wed, 2021-03-10 at 15:27 -0600, Denis Kenzior wrote:
>> Hi James,
>>
>>>> Hmm, isn't this completely opposite to the intent of adding this
>>>> capability to
>>>> brcmfmac?
>>>
>>> Unless there is a way to disable FW roaming we cannot allow station
>>> to roam
>>
>> Hm, why not?  Isn't the worst case that we run our roam logic as
>> well?  In
>> theory we could set the CQM threshold to be more aggressive and
>> attempt roams
>> before the firmware does...
> 
> Yes worst case is we get the CQM event, do a roam scan, and try to
> roam. Then the FW decides its going to roam and CMD_ROAM comes in
> during our own roam. I have no idea what that would even mean, I
> suspect ultimately we would just get disconnected.
> 
> I could try grabbing Alvins patches and trying this. If we could roam
> prior to the FW that should work. The problem is we have literally no
> idea when or how the FW is going to roam. On these cards it really
> seems like the intent is to let the hardware do it on its own. Maybe
> Alvin's patches actually change the threshold in the FW?

Roam offload is enabled by default in brcmfmac, but it can be disabled 
by setting the module parameter roamoff=1. Note this stands for "roam 
(offload) off" - not "roam off(load)" - so 1 means that the firmware 
will not roam autonomously. Anyway, in that case the driver will not set 
the WIPHY_FLAG_SUPPORTS_FW_ROAM flag:

drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:
7180	if (!ifp->drvr->settings->roamoff)
7181		wiphy->flags |= WIPHY_FLAG_SUPPORTS_FW_ROAM;

So from that perspective, I think James' patch looks perfectly fine. I 
have not tested it though.

>>> based on CQM events. We don't have any control when the FW roams so
>>> for cards
>>> like this I figured it was needed to disable this roaming logic.
>>>
>>> I've only tested this on my single brcmfmac card, which definitely
>>> will not work
>>
>> What fails?
> 
> So as things stand now we get CMD_ROAM and then we just sit there and
> don't do anything. This results in the 4-way timing out and a
> disconnect.

Yes, this was what I experienced when the firmware roamed by itself. 
Since we rely on iwd to handle the 4-Way Handshake, I instead worked on 
getting roaming to work with roam offload disabled. But I didn't think 
to go back and submit some iwd patches to handle the original failure 
case - my bad.

> 
>>
>>> right if station reacts to CQM events. Plus station cannot even do
>>> FT on these
>>> cards anyways.
>>
>> Sure, and FT is a bit tricky.  But FT is not the only way to roam...

Right, and I naively hoped that I might be able to get FT roaming to 
work too. The latest news I have from our hardware vendor is that - in 
theory - the chip firmware supports sending reassoc/auth frames, but I 
have not received any documentation yet. As it stands, brcmfmac does not 
implement the relevant cfg80211 ops, so one must settle for non-FT 
roaming if one wishes to use iwd. That would change with the incoming 
support for 4-Way Handshake offload in iwd, in which case both things 
can be offloaded to the firmware.

Personally I am a bit distrustful of the firmware, so it seemed like a 
better use of my time to rest control of the entire roaming process away 
from the firmware and into the supplicant. The lack of FT support is 
disappointing though, so perhaps I should have just worked on 4-Way 
Handshake offload support for iwd instead. I'm not working on the FT 
stuff these days but I'll follow up when I have some time.

>>> Maybe Alvin has some insight to this?
>>>
>>
>> Yeah, I'm actually curious why we haven't heard of any
>> NL80211_CMD_ROAM related
>> issues ?  I believe I remember Alvin reporting that iwd was working
>> fine on his
>> brcmfmac hardware + cqm reporting enabled kernel...
> 
> Yeah not sure on this one. I guess we just need to make a policy
> decision here. If we always want to roam ourselves then we need a way
> to prevent the FW from roaming. If we want to allow both we need to
> disable our roaming logic for cards that do it on their own. Allowing
> FW roaming plus our own roaming logic just seems like a logic
> nightmare.

The simple answer is that it never worked for me until I disabled 
roaming in the firmware (roamoff=1).

I agree with James when he says that enabling roaming in both supplicant 
and firmware is going to be a nightmare. I also don't think that the 
vendors have tested this use-case to begin with. The firmware actually 
has a number of variables that can be configured via the proprietary 
`wl` command line tool to set roaming thresholds and things like that. 
But the kernel patch I sent doesn't have anything to do with that - it 
is purely for RSSI monitoring.

Sadly I think there are some philosophical compromises that one has to 
make when dealing with fullmac chips/drivers on Linux, at least with the 
way things are right now...

> 
>>
>> Regards,
>> -Denis
> 

  reply	other threads:[~2021-03-11  0:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10 20:27 [PATCH 1/6] netdev: use NL80211_STA_INFO_SIGNAL rather than average James Prestwood
2021-03-10 20:27 ` [PATCH 2/6] scan: allow 'faked' scan_bss results James Prestwood
2021-03-10 22:25   ` Denis Kenzior
2021-03-10 20:27 ` [PATCH 3/6] nl80211util: add WIPHY_FREQ to parse_attrs support James Prestwood
2021-03-10 21:08   ` Denis Kenzior
2021-03-10 20:27 ` [PATCH 4/6] netdev: station: support full mac roaming James Prestwood
2021-03-10 20:27 ` [PATCH 5/6] wiphy: parse NL80211_ATTR_ROAM_SUPPORT flag James Prestwood
2021-03-10 20:27 ` [PATCH 6/6] station: disable roaming logic for auto-roaming cards James Prestwood
2021-03-10 21:01   ` Denis Kenzior
2021-03-10 21:15     ` James Prestwood
2021-03-10 21:27       ` Denis Kenzior
2021-03-10 21:48         ` James Prestwood
2021-03-11  0:16           ` Alvin =?unknown-8bit?q?=C5=A0ipraga?= [this message]
2021-03-11  2:36             ` Denis Kenzior
2021-03-11 11:06               ` Alvin =?unknown-8bit?q?=C5=A0ipraga?=
2021-03-11 17:32                 ` James Prestwood
2021-03-11 18:18                   ` KeithG
2021-03-11 18:45                     ` James Prestwood
2021-03-11 19:02                   ` Alvin =?unknown-8bit?q?=C5=A0ipraga?=
2021-03-10 21:12 ` [PATCH 1/6] netdev: use NL80211_STA_INFO_SIGNAL rather than average Denis Kenzior
2021-03-10 21:16   ` James Prestwood

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=3f944297-a534-7aaf-0f94-9a27c3d27647@bang-olufsen.dk \
    --to=alsi@bang-olufsen.dk \
    --cc=iwd@lists.01.org \
    /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.