Re: [PATCH] wifi: brcmfmac: configure SAE PWE method for external SAE AP

Arend van Spriel <[email protected]> Sun, 2 Aug 2026 10:39:05 +0200
Newsgroups dev.linux.lists.brcm80211,org.kernel.vger.linux-kernel,org.kernel.vger.linux-wireless
Message-ID <[email protected]>
On Wed, 29 Jul 2026 00:34:08 -0500, Bogdan Nicolae wrote:
> When bringing up a WPA3-SAE SoftAP with external (user space) SAE, the
> driver never told the firmware which SAE Password Element (PWE) method to
> accept. The firmware was observed to corrupt its heap over time due to
> this omission, leading to firmware trap (data abort in heap allocator).
>
> Parse the beacon IEs on start_ap() and set the extsae_pwe iovar
> accordingly: 2 when the RSNX IE advertises H2E, 1 when an H2E-only
> membership selector is present, 0 otherwise. This matches the behaviour
> of the upstream/vendor driver and only applies to SAE-capable APs when
> external SAE is supported.
>
> Signed-off-by: Bogdan Nicolae <[email protected]>
> ---
>  .../broadcom/brcm80211/brcmfmac/cfg80211.c    | 75 +++++++++++++++++++
>  1 file changed, 75 insertions(+)

As discussed the extsae_pwe iovar is vendor specific so the fix needs to
be gated on the CYW vendor. The cleanest approach would be to add a fwvid
hook (following the pattern of set_sae_password in brcmfmac/cyw/) so
brcmf_parse_configure_sae_pwe() is only invoked for CYW chipsets.

[...]

> +#define BSS_MEMBERSHIP_SELECTOR_SAE_H2E_ONLY 123

This is already defined as BSS_MEMBERSHIP_SELECTOR_SAE_H2E in
<linux/ieee80211.h>. Please reuse the existing constant.

[...]

Regards,
Arend