linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] brcmfmac: Add an error log for brcmf_sdiod_ramrw()
@ 2025-04-07  4:20 Wentao Liang
  2025-04-20 18:15 ` Cannot maintain an ap with brcmfmac KeithG
  2025-07-19 20:57 ` brcmfmac: Can not completely turn off AP (BCM43340/2) Ferry Toth
  0 siblings, 2 replies; 4+ messages in thread
From: Wentao Liang @ 2025-04-07  4:20 UTC (permalink / raw)
  To: arend.vanspriel, kvalo
  Cc: sebastian.reichel, erick.archer, megi, linux-wireless, brcm80211,
	brcm80211-dev-list.pdl, linux-kernel, Wentao Liang

The function brcmf_sdio_buscore_activate() calls the function
brcmf_sdiod_ramrw(), but does not check its return value. Log
the error message to prevent silent failure if the function fails.

Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index b1727f35217b..dd683c2582fb 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -3898,8 +3898,9 @@ static void brcmf_sdio_buscore_activate(void *ctx, struct brcmf_chip *chip,
 
 	if (rstvec)
 		/* Write reset vector to address 0 */
-		brcmf_sdiod_ramrw(sdiodev, true, 0, (void *)&rstvec,
-				  sizeof(rstvec));
+		if (brcmf_sdiod_ramrw(sdiodev, true, 0, (void *)&rstvec,
+				      sizeof(rstvec)) < 0)
+			brcmf_err("Fail to reset vector\n");
 }
 
 static u32 brcmf_sdio_buscore_read32(void *ctx, u32 addr)
-- 
2.42.0.windows.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Cannot maintain an ap with brcmfmac
  2025-04-07  4:20 [PATCH] brcmfmac: Add an error log for brcmf_sdiod_ramrw() Wentao Liang
@ 2025-04-20 18:15 ` KeithG
  2025-04-21  6:47   ` Arend Van Spriel
  2025-07-19 20:57 ` brcmfmac: Can not completely turn off AP (BCM43340/2) Ferry Toth
  1 sibling, 1 reply; 4+ messages in thread
From: KeithG @ 2025-04-20 18:15 UTC (permalink / raw)
  To: Arend Van Spriel
  Cc: linux-wireless, brcm80211, brcm80211-dev-list.pdl, linux-kernel

Group,

I do not really know what has changed, but I can no longer maintain an
ap runnning with brcmfmac on my Pis with the brcmfmac43455 chip. The
firmware is current (and ahead of what RPiOS ships):

[    3.472501] brcmfmac: F1 signature read @0x18000000=0x15264345
[    3.493274] brcmfmac: brcmf_fw_alloc_request: using
brcm/brcmfmac43455-sdio for chip BCM4345/6
[    3.494583] usbcore: registered new interface driver brcmfmac
[    3.900038] brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob
available (err=-2)
[    3.901161] 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 this with the default RPiOS verison of hostapd:
# hostapd -v
hostapd v2.10
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2022, Jouni Malinen <j@w1.fi> and contributors

And also with the one I built from source. The latest hostapd I could find.
The git repo it is built from is from here: https://w1.fi/hostapd/

# hostapd -v
hostapd v2.11-hostap_2_11+
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2024, Jouni Malinen <j@w1.fi> and contributors

My hostapd.conf is:
# cat /etc/hostapd/hostapd.conf
# interface and driver
interface=ap0
driver=nl80211

ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]

# WIFI-Config
ssid=TestAP
channel=6
hw_mode=g
wmm_enabled=1
macaddr_acl=0
auth_algs=1
max_num_sta=10

# WIFI authorization
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP
wpa_psk_radius=0
wpa_passphrase=secret123

If there is something wrong in my setup, let me know.

when I start hostapd with dnsmasq, an interface comes up and I can
connect. As soon as it connects, it disconnects:
Apr 20 12:57:39 pi4 systemd-networkd[181]: ap0: Gained carrier
Apr 20 12:57:39 pi4 dnsmasq[169728]: started, version 2.90 cachesize 150
Apr 20 12:57:39 pi4 dnsmasq[169728]: compile time options: IPv6
GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack
ipset nftset auth cryptohash DNSSEC loop-detect inotify dumpfile
Apr 20 12:57:39 pi4 dnsmasq[169728]: warning: interface ap0 does not
currently exist
Apr 20 12:57:39 pi4 dnsmasq-dhcp[169728]: DHCP, IP range 192.168.5.2
-- 192.168.5.254, lease time 1d
Apr 20 12:57:39 pi4 dnsmasq[169728]: reading /run/systemd/resolve/resolv.conf
Apr 20 12:57:39 pi4 dnsmasq[169728]: using nameserver 192.168.2.253#53
Apr 20 12:57:39 pi4 dnsmasq[169728]: read /etc/hosts - 8 names
Apr 20 12:57:39 pi4 hostapd[169681]: ap0: interface state UNINITIALIZED->ENABLED
Apr 20 12:57:39 pi4 hostapd[169681]: ap0: AP-ENABLED
Apr 20 12:57:39 pi4 resolvconf[169735]: Dropped protocol specifier
'.dnsmasq' from 'lo.dnsmasq'. Using 'lo' (ifindex=1).
Apr 20 12:57:39 pi4 resolvconf[169735]: Failed to set DNS
configuration: Link lo is loopback device.
Apr 20 12:57:39 pi4 systemd[1]: Started dnsmasq.service - dnsmasq - A
lightweight DHCP and caching DNS server.
Apr 20 12:57:40 pi4 kernel: brcmfmac: brcmf_cfg80211_set_power_mgmt:
power save disabled
Apr 20 12:57:48 pi4 kernel: ieee80211 phy0: brcmf_escan_timeout: timer expired
Apr 20 12:57:48 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
802.11: associated
Apr 20 12:57:48 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
802.11: associated
Apr 20 12:57:48 pi4 hostapd[169681]: ap0: AP-STA-CONNECTED 50:84:92:a6:7a:7a
Apr 20 12:57:48 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a
RADIUS: starting accounting session 4336779F2221A786
Apr 20 12:57:48 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a WPA:
pairwise key handshake completed (RSN)
Apr 20 12:57:48 pi4 hostapd[169681]: ap0: EAPOL-4WAY-HS-COMPLETED
50:84:92:a6:7a:7a
Apr 20 12:57:48 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a
RADIUS: starting accounting session 4336779F2221A786
Apr 20 12:57:48 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a WPA:
pairwise key handshake completed (RSN)
Apr 20 12:57:48 pi4 dnsmasq-dhcp[169728]: DHCPDISCOVER(ap0) 50:84:92:a6:7a:7a
Apr 20 12:57:48 pi4 dnsmasq-dhcp[169728]: DHCPOFFER(ap0) 192.168.5.214
50:84:92:a6:7a:7a
Apr 20 12:57:48 pi4 dnsmasq-dhcp[169728]: DHCPREQUEST(ap0)
192.168.5.214 50:84:92:a6:7a:7a
Apr 20 12:57:48 pi4 dnsmasq-dhcp[169728]: DHCPACK(ap0) 192.168.5.214
50:84:92:a6:7a:7a
Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
802.11: disassociated
Apr 20 12:57:52 pi4 hostapd[169681]: ap0: AP-STA-DISCONNECTED 50:84:92:a6:7a:7a
Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
802.11: disassociated
Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
802.11: disassociated
Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
802.11: disassociated
Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
802.11: disassociated
Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
802.11: disassociated
Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
802.11: associated
Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
802.11: associated
Apr 20 12:57:52 pi4 hostapd[169681]: ap0: AP-STA-CONNECTED 50:84:92:a6:7a:7a
Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a
RADIUS: starting accounting session 33CFF844DBBE630F
Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a WPA:
pairwise key handshake completed (RSN)
Apr 20 12:57:52 pi4 hostapd[169681]: ap0: EAPOL-4WAY-HS-COMPLETED
50:84:92:a6:7a:7a
Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a
RADIUS: starting accounting session 33CFF844DBBE630F
Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a WPA:
pairwise key handshake completed (RSN)
Apr 20 12:57:52 pi4 dnsmasq-dhcp[169728]: DHCPDISCOVER(ap0) 50:84:92:a6:7a:7a
Apr 20 12:57:52 pi4 dnsmasq-dhcp[169728]: DHCPOFFER(ap0) 192.168.5.214
50:84:92:a6:7a:7a
Apr 20 12:57:52 pi4 dnsmasq-dhcp[169728]: DHCPREQUEST(ap0)
192.168.5.214 50:84:92:a6:7a:7a
Apr 20 12:57:52 pi4 dnsmasq-dhcp[169728]: DHCPACK(ap0) 192.168.5.214
50:84:92:a6:7a:7a
Apr 20 12:57:57 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
802.11: disassociated
Apr 20 12:57:57 pi4 hostapd[169681]: ap0: AP-STA-DISCONNECTED 50:84:92:a6:7a:7a
Apr 20 12:57:57 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
802.11: disassociated
Apr 20 12:57:57 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
802.11: disassociated
Apr 20 12:57:57 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
802.11: disassociated
Apr 20 12:58:11 pi4 hostapd[169681]: ap0: interface state ENABLED->DISABLED
Apr 20 12:58:11 pi4 systemd[1]: Stopping hostapd.service - Hostapd
IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator...
Apr 20 12:58:11 pi4 hostapd[169681]: ap0: AP-DISABLED
Apr 20 12:58:11 pi4 hostapd[169681]: ap0: CTRL-EVENT-TERMINATING
Apr 20 12:58:11 pi4 hostapd[169681]: nl80211: deinit ifname=ap0
disabled_11b_rates=0
Apr 20 12:58:11 pi4 systemd-networkd[181]: ap0: Lost carrier
Apr 20 12:58:11 pi4 systemd[1]: hostapd.service: Deactivated successfully.
Apr 20 12:58:11 pi4 systemd[1]: Stopped hostapd.service - Hostapd IEEE
802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator.
Apr 20 12:58:12 pi4 systemd[1]: Stopping dnsmasq.service - dnsmasq - A
lightweight DHCP and caching DNS server...
Apr 20 12:58:12 pi4 resolvconf[170375]: Dropped protocol specifier
'.dnsmasq' from 'lo.dnsmasq'. Using 'lo' (ifindex=1).
Apr 20 12:58:12 pi4 resolvconf[170375]: Failed to revert interface
configuration: Link lo is loopback device.
Apr 20 12:58:12 pi4 dnsmasq[169728]: exiting on receipt of SIGTERM
Apr 20 12:58:12 pi4 systemd[1]: dnsmasq.service: Deactivated successfully.
Apr 20 12:58:12 pi4 systemd[1]: Stopped dnsmasq.service - dnsmasq - A
lightweight DHCP and caching DNS server.
Apr 20 12:58:12 pi4 systemd-networkd[181]: ap0: Link DOWN
Apr 20 12:58:12 pi4 kernel: ieee80211 phy0:
brcmf_cfg80211_get_channel: chanspec failed (-52)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Cannot maintain an ap with brcmfmac
  2025-04-20 18:15 ` Cannot maintain an ap with brcmfmac KeithG
@ 2025-04-21  6:47   ` Arend Van Spriel
  0 siblings, 0 replies; 4+ messages in thread
From: Arend Van Spriel @ 2025-04-21  6:47 UTC (permalink / raw)
  To: KeithG; +Cc: linux-wireless, brcm80211, brcm80211-dev-list.pdl, linux-kernel

On April 20, 2025 8:15:56 PM KeithG <ys3al35l@gmail.com> wrote:

> Group,
>
> I do not really know what has changed, but I

Can you try to find out?

> can no longer maintain an
> ap runnning with brcmfmac on my Pis with the brcmfmac43455 chip. The
> firmware is current (and ahead of what RPiOS ships):

Maybe you could try with what RPiOS ships.

> [    3.472501] brcmfmac: F1 signature read @0x18000000=0x15264345
> [    3.493274] brcmfmac: brcmf_fw_alloc_request: using
> brcm/brcmfmac43455-sdio for chip BCM4345/6
> [    3.494583] usbcore: registered new interface driver brcmfmac
> [    3.900038] brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob
> available (err=-2)
> [    3.901161] 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 this with the default RPiOS verison of hostapd:
> # hostapd -v
> hostapd v2.10
> User space daemon for IEEE 802.11 AP management,
> IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
> Copyright (c) 2002-2022, Jouni Malinen <j@w1.fi> and contributors
>
> And also with the one I built from source. The latest hostapd I could find.
> The git repo it is built from is from here: https://w1.fi/hostapd/
>
> # hostapd -v
> hostapd v2.11-hostap_2_11+
> User space daemon for IEEE 802.11 AP management,
> IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
> Copyright (c) 2002-2024, Jouni Malinen <j@w1.fi> and contributors
>
> My hostapd.conf is:
> # cat /etc/hostapd/hostapd.conf
> # interface and driver
> interface=ap0
> driver=nl80211
>
> ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
>
> # WIFI-Config
> ssid=TestAP
> channel=6
> hw_mode=g
> wmm_enabled=1
> macaddr_acl=0
> auth_algs=1
> max_num_sta=10
>
> # WIFI authorization
> wpa=2
> wpa_key_mgmt=WPA-PSK
> wpa_pairwise=TKIP CCMP
> rsn_pairwise=CCMP
> wpa_psk_radius=0
> wpa_passphrase=secret123
>
> If there is something wrong in my setup, let me know.

Hard to tell. The above looks okay, but no idea what your setup looks like.

> when I start hostapd with dnsmasq, an interface comes up and I can
> connect. As soon as it connects, it disconnects:
> Apr 20 12:57:39 pi4 systemd-networkd[181]: ap0: Gained carrier
> Apr 20 12:57:39 pi4 dnsmasq[169728]: started, version 2.90 cachesize 150
> Apr 20 12:57:39 pi4 dnsmasq[169728]: compile time options: IPv6
> GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack
> ipset nftset auth cryptohash DNSSEC loop-detect inotify dumpfile
> Apr 20 12:57:39 pi4 dnsmasq[169728]: warning: interface ap0 does not
> currently exist

So does this mean you run with two wifi interfaces, ie. wlan0 and ap0? Can 
you try with just only an AP interface?

> Apr 20 12:57:39 pi4 dnsmasq-dhcp[169728]: DHCP, IP range 192.168.5.2
> -- 192.168.5.254, lease time 1d
> Apr 20 12:57:39 pi4 dnsmasq[169728]: reading /run/systemd/resolve/resolv.conf
> Apr 20 12:57:39 pi4 dnsmasq[169728]: using nameserver 192.168.2.253#53
> Apr 20 12:57:39 pi4 dnsmasq[169728]: read /etc/hosts - 8 names
> Apr 20 12:57:39 pi4 hostapd[169681]: ap0: interface state 
> UNINITIALIZED->ENABLED
> Apr 20 12:57:39 pi4 hostapd[169681]: ap0: AP-ENABLED
> Apr 20 12:57:39 pi4 resolvconf[169735]: Dropped protocol specifier
> '.dnsmasq' from 'lo.dnsmasq'. Using 'lo' (ifindex=1).
> Apr 20 12:57:39 pi4 resolvconf[169735]: Failed to set DNS
> configuration: Link lo is loopback device.
> Apr 20 12:57:39 pi4 systemd[1]: Started dnsmasq.service - dnsmasq - A
> lightweight DHCP and caching DNS server.
> Apr 20 12:57:40 pi4 kernel: brcmfmac: brcmf_cfg80211_set_power_mgmt:
> power save disabled
> Apr 20 12:57:48 pi4 kernel: ieee80211 phy0: brcmf_escan_timeout: timer expired
> Apr 20 12:57:48 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: associated
> Apr 20 12:57:48 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: associated
> Apr 20 12:57:48 pi4 hostapd[169681]: ap0: AP-STA-CONNECTED 50:84:92:a6:7a:7a
> Apr 20 12:57:48 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a
> RADIUS: starting accounting session 4336779F2221A786
> Apr 20 12:57:48 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a WPA:
> pairwise key handshake completed (RSN)
> Apr 20 12:57:48 pi4 hostapd[169681]: ap0: EAPOL-4WAY-HS-COMPLETED
> 50:84:92:a6:7a:7a
> Apr 20 12:57:48 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a
> RADIUS: starting accounting session 4336779F2221A786
> Apr 20 12:57:48 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a WPA:
> pairwise key handshake completed (RSN)

So looks like connection and security are setup correctly...
> Apr 20 12:57:48 pi4 dnsmasq-dhcp[169728]: DHCPDISCOVER(ap0) 50:84:92:a6:7a:7a
> Apr 20 12:57:48 pi4 dnsmasq-dhcp[169728]: DHCPOFFER(ap0) 192.168.5.214
> 50:84:92:a6:7a:7a
> Apr 20 12:57:48 pi4 dnsmasq-dhcp[169728]: DHCPREQUEST(ap0)
> 192.168.5.214 50:84:92:a6:7a:7a
> Apr 20 12:57:48 pi4 dnsmasq-dhcp[169728]: DHCPACK(ap0) 192.168.5.214
> 50:84:92:a6:7a:7a

...and DHCP exchange is okay, which clearly indicated encrypted data 
connection is working.

> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: disassociated
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: AP-STA-DISCONNECTED 50:84:92:a6:7a:7a
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: disassociated
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: disassociated
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: disassociated
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: disassociated
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: disassociated

So not clear what triggers these disassociated events. Can you enable debug 
prints in brcmfmac, ie. use debug=0x100400? The levels are defined in 
debug.h [1]

> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: associated
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: associated
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: AP-STA-CONNECTED 50:84:92:a6:7a:7a
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a
> RADIUS: starting accounting session 33CFF844DBBE630F
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a WPA:
> pairwise key handshake completed (RSN)
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: EAPOL-4WAY-HS-COMPLETED
> 50:84:92:a6:7a:7a
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a
> RADIUS: starting accounting session 33CFF844DBBE630F
> Apr 20 12:57:52 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a WPA:
> pairwise key handshake completed (RSN)
> Apr 20 12:57:52 pi4 dnsmasq-dhcp[169728]: DHCPDISCOVER(ap0) 50:84:92:a6:7a:7a
> Apr 20 12:57:52 pi4 dnsmasq-dhcp[169728]: DHCPOFFER(ap0) 192.168.5.214
> 50:84:92:a6:7a:7a
> Apr 20 12:57:52 pi4 dnsmasq-dhcp[169728]: DHCPREQUEST(ap0)
> 192.168.5.214 50:84:92:a6:7a:7a
> Apr 20 12:57:52 pi4 dnsmasq-dhcp[169728]: DHCPACK(ap0) 192.168.5.214
> 50:84:92:a6:7a:7a
> Apr 20 12:57:57 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: disassociated
> Apr 20 12:57:57 pi4 hostapd[169681]: ap0: AP-STA-DISCONNECTED 50:84:92:a6:7a:7a
> Apr 20 12:57:57 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: disassociated
> Apr 20 12:57:57 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: disassociated
> Apr 20 12:57:57 pi4 hostapd[169681]: ap0: STA 50:84:92:a6:7a:7a IEEE
> 802.11: disassociated
> Apr 20 12:58:11 pi4 hostapd[169681]: ap0: interface state ENABLED->DISABLED
> Apr 20 12:58:11 pi4 systemd[1]: Stopping hostapd.service - Hostapd
> IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator...

Assuming it is stopped manually here. Correct?

Regards,
Arend

[1] 
https://elixir.bootlin.com/linux/v6.14.3/source/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h



^ permalink raw reply	[flat|nested] 4+ messages in thread

* brcmfmac: Can not completely turn off AP (BCM43340/2)
  2025-04-07  4:20 [PATCH] brcmfmac: Add an error log for brcmf_sdiod_ramrw() Wentao Liang
  2025-04-20 18:15 ` Cannot maintain an ap with brcmfmac KeithG
@ 2025-07-19 20:57 ` Ferry Toth
  1 sibling, 0 replies; 4+ messages in thread
From: Ferry Toth @ 2025-07-19 20:57 UTC (permalink / raw)
  To: Arend Van Spriel
  Cc: linux-wireless, brcm80211, brcm80211-dev-list.pdl, linux-kernel

Hi,

I have an Intel Edison board with BCM43340/2.

I am currently running 6.12.39-edison-acpi-preempt-rt which is mostly 
mainline with a Yocto 5.0.11 (scarthgap) user space.

When I turn on tethering (using connman) it seems to be working fine.

But when I turn off tethering, connman seems to be believe it is off, 
but I can still see the AP with my phone.

After this wifi is dead (can not scan, connect, tether on again, 
nothing) and connman believes wifi is not supported. The only way to get 
it working after this is reboot.

While AP is up I do see in the logs:

Jul 19 22:06:34 yuna kernel: brcmfmac: brcmf_fil_cmd_data Firmware 
error: BCME_UNSUPPORTED (-23)
Jul 19 22:06:34 yuna kernel: brcmfmac: brcmf_configure_arp_nd_offload 
failed to configure (0) ND offload err = -52

But maybe more importantly when tearing down I see:
...
Jul 19 22:07:23 yuna kernel: brcmfmac mmc2:0001:1 wlan0: left 
allmulticast mode
Jul 19 22:07:23 yuna kernel: brcmfmac mmc2:0001:1 wlan0: left 
promiscuous mode
...
Jul 19 22:07:23 yuna kernel: brcmfmac: brcmf_configure_arp_nd_offload 
successfully configured (1) ARP offload to 0x9
Jul 19 22:07:23 yuna kernel: brcmfmac: brcmf_fil_iovar_data_set ifidx=0, 
name=ndoe, len=4
...
Jul 19 22:07:23 yuna kernel: brcmfmac: brcmf_fil_cmd_data Firmware 
error: BCME_UNSUPPORTED (-23)
Jul 19 22:07:23 yuna kernel: brcmfmac: brcmf_configure_arp_nd_offload 
failed to configure (1) ND offload err = -52
...

This has regressed from some older kernels (it used to work fine) , but 
I don't know exactly when, since I hadn't been testing AP for a while.

Any ideas are welcome to debug this. Or any patches to try, I can build 
on current kernel (6.16-rc6) easily and capture logs.

Currently I am using:
echo 0x1006 > /sys/module/brcmfmac/parameters/debug
journalctl -k | grep -e brcm -e "000000" -e ieee > debug.log

Thanks
Ferry

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-19 20:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-07  4:20 [PATCH] brcmfmac: Add an error log for brcmf_sdiod_ramrw() Wentao Liang
2025-04-20 18:15 ` Cannot maintain an ap with brcmfmac KeithG
2025-04-21  6:47   ` Arend Van Spriel
2025-07-19 20:57 ` brcmfmac: Can not completely turn off AP (BCM43340/2) Ferry Toth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).