Re: brcmfmac disconnects when iwd scans

Denis Kenzior <[email protected]> Wed, 23 Apr 2025 09:42:18 -0500
Newsgroups dev.linux.lists.iwd
Message-ID <[email protected]>
Hi Keith,

On 4/22/25 8:00 PM, KeithG wrote:
> I ran into this a while back and James came up with a few patches that
> I have been using to keep it from restarting the AP0 interface.
> [PATCH 1/3] station: remove scan subsets for dbus scans
> [PATCH 2/3] eap: fix compile issue on ARM/GCC 12
> [PATCH 3/3] scan: use ifindex and only active scans

Likely this is the fix.  Passive scans take too long to remain off-channel.

> 
> These no longer seem to work with current builds of iwd from git. I am
> running iwd 3.6.r10.g4ded663e. My kernel is 6.12.20. The firmware is:
> [    3.496006] brcmfmac: brcmf_fw_alloc_request: using
> brcm/brcmfmac43455-sdio for chip BCM4345/6
> [    3.839254] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6
> wl0: Oct 28 2024 23:27:00 version 7.45.286 (be70ab3 CY) FWID
> 01-95efe7fa
> 
> I get the same response with the firmware that ships with RPiOS,
> 7.45.265 as well. I am building a fresh kernel to be able to get iwmon
> data and should be able to do so tomorrow.
> 
> This flakiness of ap0 happens regardless if I use iwd or hostap to
> bring up ap0. When I use hostapd, I use this to bring up the
> interface:
> 
> iw dev wlan0 interface add ap0 type __ap
> ip link set dev ap0 address d8:3a:dd:60:a3:cg
> systemctl start hostapd
> systemctl start dnsmasq
> ip addr add 192.168.5.1/24 broadcast 192.168.5.255 dev ap0
> 
> With this, I can have the ap0 up and can scan on wlan0 with the single
> brcmfmac card. If I use wpa_supplicant, ap0 does not go down when
> wpa_supplicant scans for ssids.
> iw wlan0 scan

This uses an active scan.  See what happens with
'iw wlan0 scan passive'

> It is only with iwd that the network goes down when iwd scans for ssids.
> iwctl station wlan0 scan

iwd uses active scans when connected or if the hardware is capable of 
anonymizing the active scan.   Otherwise it uses a passive scan.

Regards,
-Denis