Linux brcm80211 wireless device drivers
 help / color / mirror / Atom feed
From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: Johannes Berg <johannes@sipsolutions.net>,
	Gokul Sivakumar <gokulkumar.sivakumar@infineon.com>
Cc: linux-wireless@vger.kernel.org, brcm80211@lists.linux.dev,
	wlan-kernel-dev-list@infineon.com, Jouni Malinen <j@w1.fi>
Subject: Re: [PATCH] brcmfmac: support AP isolation to restrict reachability between stations
Date: Tue, 29 Apr 2025 10:22:19 +0200	[thread overview]
Message-ID: <dca65ca5-56ee-4082-b5c7-68e49435c06c@broadcom.com> (raw)
In-Reply-To: <09f9a8700163a509846418354235bd3b84e8d532.camel@sipsolutions.net>

On 4/26/2025 10:37 AM, Johannes Berg wrote:
> On Sat, 2025-04-26 at 13:21 +0530, Gokul Sivakumar wrote:
>> IMHO, In CFG80211, if we introduce a bitmap to track which BSS Parameter
>> is changed by the userspace in the SET_BSS operation and then used this
>> bitmap while handling the request, then the WLAN Driver would reject the
>> operation with "EOPTNOTSUPP", instead of doing AP Isolation, because it
>> does not support setting the other BSS params in the request.
> 
> Not necessarily?
> 
>> For Example, considering hostapd (iwd doesn't support SET BSS operation)
>> if the user only enabled the config file param "ap_isolate", but didn't
>> explicitly set "preamble", hostapd would implicitly set default value
>> (0 - LONG_PREAMBLE) in the preamble param while sending the SET_BSS
>> operation request to CFG80211.
> 
> But presumably that's still the default value in the driver too?
> 
> Hostapd could also be fixed too, to not change it if not requested.

To me this raises the question as to when this SET_BSS primitive should 
be used. As I recall one of the goals of nl80211 was to get rid of doing 
individual configuration change like we had in wext which even sometimes 
required specific order to get what we want. So why are these parameters 
not in the START_AP primitive (actually the P2P parameter are). Some of 
the parameters are probably implicit as they are represented in the 
beacon data passed in START_AP. The ap_isolate however is not expressed 
in the beacon afaik.

When all parameters would be handled by START_AP what would be the need 
for SET_BSS. I think it would be to modify the parameters for a BSS that 
is active, ie. beaconing, and possibly serving client STAs. However, 
this is where I get a bit confused. There is also a SET_BEACON primitive 
which looks like it supports a similar scenario.

>> CFG80211 would then mark the bit corresponding to the SHORT_PREAMBLE BSS
>> param as "changed" in the bitmap. WLAN Driver on receiving this SET_BSS
>> request, would then have to reject the entire operation without enabling
>> the user requested "ap_isolation" param, because of the preamble param
>> that is not even explicitly requested by the user.
> 
> Or the driver can accept short-preamble setting, and reject it only if
> it's set to short-preamble, rather than long-preamble.
> 
>> However, for other AP BSS Parammeters, we don't have the corresponding
>> NL80211 feature flags.
> 
> Uh such a long time ago :) I don't remember why we had these. Given the
> above do we need new ones? We can I guess, but I'm not sure it's needed
> even if we change hostapd - if we do change it then it can just set only
> the ones that were set in the config file?

The drivers that implement .change_bss() today have a relaxed policy. If 
we add restrictions in .change_bss() for brcmfmac that means from 
user-space perspective the API is not driver agnostic. Restricting the 
.change_bss() in the other drivers will likely cause user-space 
regression. So there should be a capability exchange between driver and 
user-space. My idea here is to have the driver add a nested attribute in 
NL80211_CMD_GET_WIPHY listing the bss parameters supported. Probably can 
use the same attribute as flag in NL80211_CMD_SET_BSS to indicate 
user-space does handle the bss parameter support info from the driver. 
Will try to get something implemented to see how that goes.

Regards,
Arend

  reply	other threads:[~2025-04-29  8:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23 17:51 [PATCH] brcmfmac: support AP isolation to restrict reachability between stations Gokul Sivakumar
2025-04-23 22:15 ` Johannes Berg
2025-04-24  9:50   ` Arend van Spriel
2025-04-24 10:22     ` Johannes Berg
2025-04-24 11:36       ` Arend van Spriel
2025-04-24 11:46         ` Johannes Berg
2025-04-24 12:16           ` Arend van Spriel
2025-04-26  7:51             ` Gokul Sivakumar
2025-04-26  8:37               ` Johannes Berg
2025-04-29  8:22                 ` Arend van Spriel [this message]
2025-04-30  9:56                   ` Johannes Berg

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=dca65ca5-56ee-4082-b5c7-68e49435c06c@broadcom.com \
    --to=arend.vanspriel@broadcom.com \
    --cc=brcm80211@lists.linux.dev \
    --cc=gokulkumar.sivakumar@infineon.com \
    --cc=j@w1.fi \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=wlan-kernel-dev-list@infineon.com \
    /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