* brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
@ 2023-11-11 16:48 Stefan Wahren
2023-11-11 17:25 ` Arend Van Spriel
0 siblings, 1 reply; 41+ messages in thread
From: Stefan Wahren @ 2023-11-11 16:48 UTC (permalink / raw)
To: Arend van Spriel, Franky Lin, Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
Hi,
almost one year ago, i reported [1] about annoying log messages from
brcmfmac. After commit "wifi: brcmfmac: avoid handling disabled channels
for survey dump" [2] the periodic messages disappeared, which is great.
Unfortunately there is a different scenario, which still trigger them at
least on the Raspberry Pi 3B+ (arm/multi_v7_defconfig). I tested Linux
6.3, 6.6 and recent mainline.
Used firmware:
Firmware: BCM4345/6 wl0: Jan 4 2021 19:56:29 version 7.45.229 (617f1f5
CY) FWID 01-2dbd9d2e
Scenario:
- start Raspberry Pi 3B+ with graphical interface
- wpa_supplicant successful connects automatically to WPA2 network
- disconnect from WPA2 network (no brcmfmac error messages until now)
- re-connect successfully to WPA2 network again (trigger error messages
once)
Example output from current mainline:
[ 87.449903] brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail,
reason -52
[ 87.559928] brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail,
reason -52
[ 87.669940] brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail,
reason -52
[ 87.779964] brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail,
reason -52
[ 89.539921] brcmfmac: brcmf_set_channel: set chanspec 0xd090 fail,
reason -52
[ 89.540316] brcmfmac: brcmf_set_channel: set chanspec 0xd095 fail,
reason -52
[ 89.540653] brcmfmac: brcmf_set_channel: set chanspec 0xd099 fail,
reason -52
[ 89.540985] brcmfmac: brcmf_set_channel: set chanspec 0xd09d fail,
reason -52
[ 89.541326] brcmfmac: brcmf_set_channel: set chanspec 0xd0a1 fail,
reason -52
[ 89.541662] brcmfmac: brcmf_set_channel: set chanspec 0xd0a5 fail,
reason -52
Best regards
[1] -
https://lore.kernel.org/linux-wireless/2635fd4f-dfa0-1d87-058b-e455cee96750@i2se.com/
[2] -
https://lore.kernel.org/linux-wireless/2635fd4f-dfa0-1d87-058b-e455cee96750@i2se.com/
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2023-11-11 16:48 brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2 Stefan Wahren
@ 2023-11-11 17:25 ` Arend Van Spriel
2023-11-11 18:29 ` Stefan Wahren
0 siblings, 1 reply; 41+ messages in thread
From: Arend Van Spriel @ 2023-11-11 17:25 UTC (permalink / raw)
To: Stefan Wahren, Arend van Spriel, Franky Lin, Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
[-- Attachment #1: Type: text/plain, Size: 2155 bytes --]
On November 11, 2023 5:48:46 PM Stefan Wahren <wahrenst@gmx.net> wrote:
> Hi,
>
> almost one year ago, i reported [1] about annoying log messages from
> brcmfmac. After commit "wifi: brcmfmac: avoid handling disabled channels
> for survey dump" [2] the periodic messages disappeared, which is great.
>
> Unfortunately there is a different scenario, which still trigger them at
> least on the Raspberry Pi 3B+ (arm/multi_v7_defconfig). I tested Linux
> 6.3, 6.6 and recent mainline.
>
> Used firmware:
> Firmware: BCM4345/6 wl0: Jan 4 2021 19:56:29 version 7.45.229 (617f1f5
> CY) FWID 01-2dbd9d2e
>
> Scenario:
> - start Raspberry Pi 3B+ with graphical interface
> - wpa_supplicant successful connects automatically to WPA2 network
> - disconnect from WPA2 network (no brcmfmac error messages until now)
> - re-connect successfully to WPA2 network again (trigger error messages
> once)
>
> Example output from current mainline:
> [ 87.449903] brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail,
> reason -52
> [ 87.559928] brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail,
> reason -52
> [ 87.669940] brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail,
> reason -52
> [ 87.779964] brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail,
> reason -52
> [ 89.539921] brcmfmac: brcmf_set_channel: set chanspec 0xd090 fail,
> reason -52
> [ 89.540316] brcmfmac: brcmf_set_channel: set chanspec 0xd095 fail,
> reason -52
> [ 89.540653] brcmfmac: brcmf_set_channel: set chanspec 0xd099 fail,
> reason -52
> [ 89.540985] brcmfmac: brcmf_set_channel: set chanspec 0xd09d fail,
> reason -52
> [ 89.541326] brcmfmac: brcmf_set_channel: set chanspec 0xd0a1 fail,
> reason -52
> [ 89.541662] brcmfmac: brcmf_set_channel: set chanspec 0xd0a5 fail,
> reason -52
Again look like these are disabled channels. At least chanspec 0xd022 is 5G
channel 34. You say you get this only once so not every 60 seconds?
Regards,
Arend
> Best regards
>
> [1] -
> https://lore.kernel.org/linux-wireless/2635fd4f-dfa0-1d87-058b-e455cee96750@i2se.com/
> [2] -
> https://lore.kernel.org/linux-wireless/2635fd4f-dfa0-1d87-058b-e455cee96750@i2se.com/
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4219 bytes --]
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2023-11-11 17:25 ` Arend Van Spriel
@ 2023-11-11 18:29 ` Stefan Wahren
2023-11-11 20:30 ` Stefan Wahren
0 siblings, 1 reply; 41+ messages in thread
From: Stefan Wahren @ 2023-11-11 18:29 UTC (permalink / raw)
To: Arend Van Spriel, Arend van Spriel, Franky Lin, Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
Am 11.11.23 um 18:25 schrieb Arend Van Spriel:
> On November 11, 2023 5:48:46 PM Stefan Wahren <wahrenst@gmx.net> wrote:
>
>> Hi,
>>
>> almost one year ago, i reported [1] about annoying log messages from
>> brcmfmac. After commit "wifi: brcmfmac: avoid handling disabled channels
>> for survey dump" [2] the periodic messages disappeared, which is great.
>>
>> Unfortunately there is a different scenario, which still trigger them at
>> least on the Raspberry Pi 3B+ (arm/multi_v7_defconfig). I tested Linux
>> 6.3, 6.6 and recent mainline.
>>
>> Used firmware:
>> Firmware: BCM4345/6 wl0: Jan 4 2021 19:56:29 version 7.45.229 (617f1f5
>> CY) FWID 01-2dbd9d2e
>>
>> Scenario:
>> - start Raspberry Pi 3B+ with graphical interface
>> - wpa_supplicant successful connects automatically to WPA2 network
>> - disconnect from WPA2 network (no brcmfmac error messages until now)
>> - re-connect successfully to WPA2 network again (trigger error messages
>> once)
>>
>> Example output from current mainline:
>> [ 87.449903] brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail,
>> reason -52
>> [ 87.559928] brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail,
>> reason -52
>> [ 87.669940] brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail,
>> reason -52
>> [ 87.779964] brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail,
>> reason -52
>> [ 89.539921] brcmfmac: brcmf_set_channel: set chanspec 0xd090 fail,
>> reason -52
>> [ 89.540316] brcmfmac: brcmf_set_channel: set chanspec 0xd095 fail,
>> reason -52
>> [ 89.540653] brcmfmac: brcmf_set_channel: set chanspec 0xd099 fail,
>> reason -52
>> [ 89.540985] brcmfmac: brcmf_set_channel: set chanspec 0xd09d fail,
>> reason -52
>> [ 89.541326] brcmfmac: brcmf_set_channel: set chanspec 0xd0a1 fail,
>> reason -52
>> [ 89.541662] brcmfmac: brcmf_set_channel: set chanspec 0xd0a5 fail,
>> reason -52
>
> Again look like these are disabled channels. At least chanspec 0xd022
> is 5G channel 34. You say you get this only once so not every 60 seconds?
I get this everytime i trigger a reconnect to the wifi network, so not
periodically (checked that). Strangely the initial automatic connect
doesn't trigger this errors.
Regards
>
> Regards,
> Arend
>
>> Best regards
>>
>> [1] -
>> https://lore.kernel.org/linux-wireless/2635fd4f-dfa0-1d87-058b-e455cee96750@i2se.com/
>>
>> [2] -
>> https://lore.kernel.org/linux-wireless/2635fd4f-dfa0-1d87-058b-e455cee96750@i2se.com/
>>
>
>
>
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2023-11-11 18:29 ` Stefan Wahren
@ 2023-11-11 20:30 ` Stefan Wahren
2023-11-13 9:11 ` Arend van Spriel
0 siblings, 1 reply; 41+ messages in thread
From: Stefan Wahren @ 2023-11-11 20:30 UTC (permalink / raw)
To: Arend Van Spriel, Arend van Spriel, Franky Lin, Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
Am 11.11.23 um 19:29 schrieb Stefan Wahren:
>
> Am 11.11.23 um 18:25 schrieb Arend Van Spriel:
>> On November 11, 2023 5:48:46 PM Stefan Wahren <wahrenst@gmx.net> wrote:
>>
>>
>> Again look like these are disabled channels. At least chanspec 0xd022
>> is 5G channel 34. You say you get this only once so not every 60
>> seconds?
> I get this everytime i trigger a reconnect to the wifi network, so not
> periodically (checked that). Strangely the initial automatic connect
> doesn't trigger this errors.
I additionally placed a WARN_ON_ONCE after the error log and enabled the
firmware error log of brcmf_fil_cmd_data(). Maybe this helps.
Here is the output after the first reconnect:
[ 98.820098] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 98.820135] ------------[ cut here ]------------
[ 98.820145] WARNING: CPU: 3 PID: 469 at
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:8073
brcmf_cfg80211_dump_survey+0x330/0x348 [brcmfmac]
[ 98.820256] Modules linked in: aes_arm aes_generic cmac brcmfmac_wcc
vc4 brcmfmac snd_soc_hdmi_codec brcmutil snd_soc_core sha256_generic
ac97_bus libsha256 snd_pcm_dmaengine sha256_arm snd_pcm cfg80211
hci_uart snd_timer btbcm snd bluetooth soundcore onboard_usb_hub
drm_dma_helper ecdh_generic ecc libaes raspberrypi_hwmon bcm2835_thermal
microchip lan78xx crc32_arm_ce
[ 98.820459] CPU: 3 PID: 469 Comm: wpa_supplicant Not tainted
6.6.0-15494-g6bc986ab839c-dirty #136
[ 98.820476] Hardware name: BCM2835
[ 98.820495] unwind_backtrace from show_stack+0x10/0x14
[ 98.820534] show_stack from dump_stack_lvl+0x40/0x4c
[ 98.820564] dump_stack_lvl from __warn+0x7c/0x124
[ 98.820600] __warn from warn_slowpath_fmt+0x170/0x178
[ 98.820636] warn_slowpath_fmt from
brcmf_cfg80211_dump_survey+0x330/0x348 [brcmfmac]
[ 98.820749] brcmf_cfg80211_dump_survey [brcmfmac] from
nl80211_dump_survey+0x174/0x2bc [cfg80211]
[ 98.821014] nl80211_dump_survey [cfg80211] from genl_dumpit+0x38/0x74
[ 98.821185] genl_dumpit from netlink_dump+0x158/0x334
[ 98.821211] netlink_dump from __netlink_dump_start+0x1bc/0x27c
[ 98.821234] __netlink_dump_start from genl_rcv_msg+0x148/0x358
[ 98.821259] genl_rcv_msg from netlink_rcv_skb+0xb4/0x10c
[ 98.821285] netlink_rcv_skb from genl_rcv+0x24/0x34
[ 98.821310] genl_rcv from netlink_unicast+0x1f4/0x2d0
[ 98.821336] netlink_unicast from netlink_sendmsg+0x1cc/0x454
[ 98.821361] netlink_sendmsg from ____sys_sendmsg+0xa0/0x26c
[ 98.821393] ____sys_sendmsg from ___sys_sendmsg+0x68/0x94
[ 98.821428] ___sys_sendmsg from sys_sendmsg+0x4c/0x88
[ 98.821466] sys_sendmsg from ret_fast_syscall+0x0/0x54
[ 98.821495] Exception stack(0xf10f9fa8 to 0xf10f9ff0)
[ 98.821512] 9fa0: 00247210 00247628 00000004
bed3d8c8 00000000 00000000
[ 98.821530] 9fc0: 00247210 00247628 00247198 00000128 b6f32000
bed3d994 00000001 00000004
[ 98.821543] 9fe0: 0000006c bed3d880 b6f175bc b6a7a970
[ 98.821554] ---[ end trace 0000000000000000 ]---
[ 98.821566] brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail,
reason -52
[ 98.930254] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 98.930287] brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail,
reason -52
[ 99.040104] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 99.040134] brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail,
reason -52
[ 99.150242] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 99.150279] brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail,
reason -52
[ 100.910174] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 100.910211] brcmfmac: brcmf_set_channel: set chanspec 0xd090 fail,
reason -52
[ 115.670205] net_ratelimit: 10 callbacks suppressed
[ 115.670232] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 115.670259] brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail,
reason -52
[ 115.780284] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 115.780313] brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail,
reason -52
[ 115.890261] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 115.890296] brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail,
reason -52
[ 116.000283] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 116.000313] brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail,
reason -52
[ 117.760217] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 117.760253] brcmfmac: brcmf_set_channel: set chanspec 0xd090 fail,
reason -52
>
> Regards
>>
>> Regards,
>> Arend
>>
>>> Best regards
>>>
>>> [1] -
>>> https://lore.kernel.org/linux-wireless/2635fd4f-dfa0-1d87-058b-e455cee96750@i2se.com/
>>>
>>> [2] -
>>> https://lore.kernel.org/linux-wireless/2635fd4f-dfa0-1d87-058b-e455cee96750@i2se.com/
>>>
>>
>>
>>
>
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2023-11-11 20:30 ` Stefan Wahren
@ 2023-11-13 9:11 ` Arend van Spriel
2023-11-13 21:02 ` Stefan Wahren
0 siblings, 1 reply; 41+ messages in thread
From: Arend van Spriel @ 2023-11-13 9:11 UTC (permalink / raw)
To: Stefan Wahren, Arend van Spriel, Franky Lin, Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
[-- Attachment #1: Type: text/plain, Size: 5465 bytes --]
On 11/11/2023 9:30 PM, Stefan Wahren wrote:
> Am 11.11.23 um 19:29 schrieb Stefan Wahren:
>>
>> Am 11.11.23 um 18:25 schrieb Arend Van Spriel:
>>> On November 11, 2023 5:48:46 PM Stefan Wahren <wahrenst@gmx.net> wrote:
>>>
>>>
>>> Again look like these are disabled channels. At least chanspec 0xd022
>>> is 5G channel 34. You say you get this only once so not every 60
>>> seconds?
>> I get this everytime i trigger a reconnect to the wifi network, so not
>> periodically (checked that). Strangely the initial automatic connect
>> doesn't trigger this errors.
> I additionally placed a WARN_ON_ONCE after the error log and enabled the
> firmware error log of brcmf_fil_cmd_data(). Maybe this helps.
It does a bit. At least it shows this is happening with the dump_survey
(again). I don't really understand why though. It implies the channel is
not disabled, but unclear why. The channel flags are changed in
brcmf_construct_chaninfo() so we probably should focus debug on that
function.
Regards,
Arend
> Here is the output after the first reconnect:
>
> [ 98.820098] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
> [ 98.820135] ------------[ cut here ]------------
> [ 98.820145] WARNING: CPU: 3 PID: 469 at
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:8073
> brcmf_cfg80211_dump_survey+0x330/0x348 [brcmfmac]
> [ 98.820256] Modules linked in: aes_arm aes_generic cmac brcmfmac_wcc
> vc4 brcmfmac snd_soc_hdmi_codec brcmutil snd_soc_core sha256_generic
> ac97_bus libsha256 snd_pcm_dmaengine sha256_arm snd_pcm cfg80211
> hci_uart snd_timer btbcm snd bluetooth soundcore onboard_usb_hub
> drm_dma_helper ecdh_generic ecc libaes raspberrypi_hwmon bcm2835_thermal
> microchip lan78xx crc32_arm_ce
> [ 98.820459] CPU: 3 PID: 469 Comm: wpa_supplicant Not tainted
> 6.6.0-15494-g6bc986ab839c-dirty #136
> [ 98.820476] Hardware name: BCM2835
> [ 98.820495] unwind_backtrace from show_stack+0x10/0x14
> [ 98.820534] show_stack from dump_stack_lvl+0x40/0x4c
> [ 98.820564] dump_stack_lvl from __warn+0x7c/0x124
> [ 98.820600] __warn from warn_slowpath_fmt+0x170/0x178
> [ 98.820636] warn_slowpath_fmt from
> brcmf_cfg80211_dump_survey+0x330/0x348 [brcmfmac]
> [ 98.820749] brcmf_cfg80211_dump_survey [brcmfmac] from
> nl80211_dump_survey+0x174/0x2bc [cfg80211]
> [ 98.821014] nl80211_dump_survey [cfg80211] from genl_dumpit+0x38/0x74
> [ 98.821185] genl_dumpit from netlink_dump+0x158/0x334
> [ 98.821211] netlink_dump from __netlink_dump_start+0x1bc/0x27c
> [ 98.821234] __netlink_dump_start from genl_rcv_msg+0x148/0x358
> [ 98.821259] genl_rcv_msg from netlink_rcv_skb+0xb4/0x10c
> [ 98.821285] netlink_rcv_skb from genl_rcv+0x24/0x34
> [ 98.821310] genl_rcv from netlink_unicast+0x1f4/0x2d0
> [ 98.821336] netlink_unicast from netlink_sendmsg+0x1cc/0x454
> [ 98.821361] netlink_sendmsg from ____sys_sendmsg+0xa0/0x26c
> [ 98.821393] ____sys_sendmsg from ___sys_sendmsg+0x68/0x94
> [ 98.821428] ___sys_sendmsg from sys_sendmsg+0x4c/0x88
> [ 98.821466] sys_sendmsg from ret_fast_syscall+0x0/0x54
> [ 98.821495] Exception stack(0xf10f9fa8 to 0xf10f9ff0)
> [ 98.821512] 9fa0: 00247210 00247628 00000004
> bed3d8c8 00000000 00000000
> [ 98.821530] 9fc0: 00247210 00247628 00247198 00000128 b6f32000
> bed3d994 00000001 00000004
> [ 98.821543] 9fe0: 0000006c bed3d880 b6f175bc b6a7a970
> [ 98.821554] ---[ end trace 0000000000000000 ]---
> [ 98.821566] brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail,
> reason -52
> [ 98.930254] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
> [ 98.930287] brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail,
> reason -52
> [ 99.040104] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
> [ 99.040134] brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail,
> reason -52
> [ 99.150242] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
> [ 99.150279] brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail,
> reason -52
> [ 100.910174] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
> [ 100.910211] brcmfmac: brcmf_set_channel: set chanspec 0xd090 fail,
> reason -52
> [ 115.670205] net_ratelimit: 10 callbacks suppressed
> [ 115.670232] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
> [ 115.670259] brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail,
> reason -52
> [ 115.780284] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
> [ 115.780313] brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail,
> reason -52
> [ 115.890261] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
> [ 115.890296] brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail,
> reason -52
> [ 116.000283] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
> [ 116.000313] brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail,
> reason -52
> [ 117.760217] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
> [ 117.760253] brcmfmac: brcmf_set_channel: set chanspec 0xd090 fail,
> reason -52
>
>>
>> Regards
>>>
>>> Regards,
>>> Arend
>>>
>>>> Best regards
>>>>
>>>> [1] -
>>>> https://lore.kernel.org/linux-wireless/2635fd4f-dfa0-1d87-058b-e455cee96750@i2se.com/
>>>>
>>>> [2] -
>>>> https://lore.kernel.org/linux-wireless/2635fd4f-dfa0-1d87-058b-e455cee96750@i2se.com/
>>>>
>>>
>>>
>>>
>>
>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4219 bytes --]
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2023-11-13 9:11 ` Arend van Spriel
@ 2023-11-13 21:02 ` Stefan Wahren
2023-11-14 20:09 ` Stefan Wahren
2023-11-15 9:34 ` Arend van Spriel
0 siblings, 2 replies; 41+ messages in thread
From: Stefan Wahren @ 2023-11-13 21:02 UTC (permalink / raw)
To: Arend van Spriel, Arend van Spriel, Franky Lin, Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
Hi Arend,
Am 13.11.23 um 10:11 schrieb Arend van Spriel:
> On 11/11/2023 9:30 PM, Stefan Wahren wrote:
>> Am 11.11.23 um 19:29 schrieb Stefan Wahren:
>>>
>>> Am 11.11.23 um 18:25 schrieb Arend Van Spriel:
>>>> On November 11, 2023 5:48:46 PM Stefan Wahren <wahrenst@gmx.net>
>>>> wrote:
>>>>
>>>>
>>>> Again look like these are disabled channels. At least chanspec 0xd022
>>>> is 5G channel 34. You say you get this only once so not every 60
>>>> seconds?
>>> I get this everytime i trigger a reconnect to the wifi network, so not
>>> periodically (checked that). Strangely the initial automatic connect
>>> doesn't trigger this errors.
>> I additionally placed a WARN_ON_ONCE after the error log and enabled the
>> firmware error log of brcmf_fil_cmd_data(). Maybe this helps.
>
> It does a bit. At least it shows this is happening with the
> dump_survey (again). I don't really understand why though. It implies
> the channel is not disabled, but unclear why. The channel flags are
> changed in brcmf_construct_chaninfo() so we probably should focus
> debug on that function.
>
i placed a pr_err at the start of brcmf_construct_chaninfo and another
pr_err into the for loop before the "if (channel->orig_flags &
IEEE80211_CHAN_DISABLED) continue".
pr_err("%s: Ch num %d, chanspec 0x%x, orig_flags: %x.\n", __func__,
ch.control_ch_num, ch.chspec, channel->orig_flags);
It seems that brcmf_construct_chaninfo is called two times, but the
results are different. I could find 0xd090 in the first run, but not in
second. The other chanspecs doesn't seem to occur in both runs. No idea
what's going on here.
[ 8.351658] brcmfmac mmc1:0001:1: Direct firmware load for
brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.bin failed with error -2
[ 8.489232] Bluetooth: hci0: BCM4345C0 'brcm/BCM4345C0.hcd' Patch
[ 8.625414] Console: switching to colour dummy device 80x30
[ 8.642319] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4])
[ 8.653613] vc4-drm soc:gpu: bound 3f902000.hdmi (ops vc4_hdmi_ops [vc4])
[ 8.653821] vc4-drm soc:gpu: bound 3f806000.vec (ops vc4_vec_ops [vc4])
[ 8.653996] vc4-drm soc:gpu: bound 3f004000.txp (ops vc4_txp_ops [vc4])
[ 8.654136] vc4-drm soc:gpu: bound 3f206000.pixelvalve (ops vc4_crtc_ops
[vc4])
[ 8.654267] vc4-drm soc:gpu: bound 3f207000.pixelvalve (ops vc4_crtc_ops
[vc4])
[ 8.654391] vc4-drm soc:gpu: bound 3f807000.pixelvalve (ops vc4_crtc_ops
[vc4])
[ 8.654501] vc4-drm soc:gpu: bound 3fc00000.v3d (ops vc4_v3d_ops [vc4])
[ 8.666654] [drm] Initialized vc4 0.0.0 20140616 for soc:gpu on minor 0
[ 8.762647] Console: switching to colour frame buffer device 240x75
[ 8.789693] vc4-drm soc:gpu: [drm] fb0: vc4drmfb frame buffer device
[ 8.798837] hub 1-1:1.0: USB hub found
[ 8.798915] hub 1-1:1.0: 4 ports detected
[ 8.806659] brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob
available (err=-2)
[ 8.807056] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0:
Jan 4 2021 19:56:29 version 7.45.229 (617f1f5 CY) FWID 01-2dbd9d2e
[ 8.811603] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-23)
[ 8.814671] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-23)
[ 8.815718] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-4)
[ 8.817080] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-23)
[ 8.817657] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-23)
[ 8.820140] brcmfmac: brcmf_construct_chaninfo called
[ 8.824102] brcmfmac: brcmf_construct_chaninfo: Ch num 1, chanspec
0x1001, orig_flags: 80180.
[ 8.824589] brcmfmac: brcmf_construct_chaninfo: Ch num 2, chanspec
0x1002, orig_flags: 80180.
[ 8.825044] brcmfmac: brcmf_construct_chaninfo: Ch num 3, chanspec
0x1003, orig_flags: 80180.
[ 8.825593] brcmfmac: brcmf_construct_chaninfo: Ch num 4, chanspec
0x1004, orig_flags: 80180.
[ 8.830446] brcmfmac: brcmf_construct_chaninfo: Ch num 5, chanspec
0x1005, orig_flags: 80180.
[ 8.830944] brcmfmac: brcmf_construct_chaninfo: Ch num 6, chanspec
0x1006, orig_flags: 80180.
[ 8.832712] brcmfmac: brcmf_construct_chaninfo: Ch num 7, chanspec
0x1007, orig_flags: 80180.
[ 8.833176] brcmfmac: brcmf_construct_chaninfo: Ch num 8, chanspec
0x1008, orig_flags: 80180.
[ 8.834938] brcmfmac: brcmf_construct_chaninfo: Ch num 9, chanspec
0x1009, orig_flags: 80180.
[ 8.835485] brcmfmac: brcmf_construct_chaninfo: Ch num 10, chanspec
0x100a, orig_flags: 80180.
[ 8.835945] brcmfmac: brcmf_construct_chaninfo: Ch num 11, chanspec
0x100b, orig_flags: 80180.
[ 8.836390] brcmfmac: brcmf_construct_chaninfo: Ch num 36, chanspec
0xd024, orig_flags: 80000.
[ 8.836890] brcmfmac: brcmf_construct_chaninfo: Ch num 40, chanspec
0xd028, orig_flags: 80000.
[ 8.837322] brcmfmac: brcmf_construct_chaninfo: Ch num 44, chanspec
0xd02c, orig_flags: 80000.
[ 8.837758] brcmfmac: brcmf_construct_chaninfo: Ch num 48, chanspec
0xd030, orig_flags: 80000.
[ 8.839545] brcmfmac: brcmf_construct_chaninfo: Ch num 52, chanspec
0xd034, orig_flags: 80000.
[ 8.840026] brcmfmac: brcmf_construct_chaninfo: Ch num 56, chanspec
0xd038, orig_flags: 80000.
[ 8.840451] brcmfmac: brcmf_construct_chaninfo: Ch num 60, chanspec
0xd03c, orig_flags: 80000.
[ 8.840878] brcmfmac: brcmf_construct_chaninfo: Ch num 64, chanspec
0xd040, orig_flags: 80000.
[ 8.842799] brcmfmac: brcmf_construct_chaninfo: Ch num 100, chanspec
0xd064, orig_flags: 80000.
[ 8.843391] brcmfmac: brcmf_construct_chaninfo: Ch num 104, chanspec
0xd068, orig_flags: 80000.
[ 8.843802] brcmfmac: brcmf_construct_chaninfo: Ch num 108, chanspec
0xd06c, orig_flags: 80000.
[ 8.844183] brcmfmac: brcmf_construct_chaninfo: Ch num 112, chanspec
0xd070, orig_flags: 80000.
[ 8.844660] brcmfmac: brcmf_construct_chaninfo: Ch num 116, chanspec
0xd074, orig_flags: 80000.
[ 8.845042] brcmfmac: brcmf_construct_chaninfo: Ch num 120, chanspec
0xd078, orig_flags: 80000.
[ 8.845428] brcmfmac: brcmf_construct_chaninfo: Ch num 124, chanspec
0xd07c, orig_flags: 80000.
[ 8.845858] brcmfmac: brcmf_construct_chaninfo: Ch num 128, chanspec
0xd080, orig_flags: 80000.
[ 8.846277] brcmfmac: brcmf_construct_chaninfo: Ch num 132, chanspec
0xd084, orig_flags: 80000.
[ 8.846692] brcmfmac: brcmf_construct_chaninfo: Ch num 136, chanspec
0xd088, orig_flags: 80000.
[ 8.847096] brcmfmac: brcmf_construct_chaninfo: Ch num 140, chanspec
0xd08c, orig_flags: 80000.
[ 8.847475] brcmfmac: brcmf_construct_chaninfo: Ch num 144, chanspec
0xd090, orig_flags: 80000.
[ 8.856025] brcmfmac: brcmf_construct_chaninfo: Ch num 149, chanspec
0xd095, orig_flags: 80000.
[ 8.857794] brcmfmac: brcmf_construct_chaninfo: Ch num 153, chanspec
0xd099, orig_flags: 80000.
[ 8.858937] brcmfmac: brcmf_construct_chaninfo: Ch num 157, chanspec
0xd09d, orig_flags: 80000.
[ 8.859632] brcmfmac: brcmf_construct_chaninfo: Ch num 161, chanspec
0xd0a1, orig_flags: 80000.
[ 8.860063] brcmfmac: brcmf_construct_chaninfo: Ch num 165, chanspec
0xd0a5, orig_flags: 80000.
[ 8.860484] brcmfmac: brcmf_construct_chaninfo: Ch num 40, chanspec
0xd926, orig_flags: 80000.
[ 8.860497] brcmfmac: brcmf_construct_chaninfo: Ch num 48, chanspec
0xd92e, orig_flags: 80000.
[ 8.860503] brcmfmac: brcmf_construct_chaninfo: Ch num 56, chanspec
0xd936, orig_flags: 80000.
[ 8.860509] brcmfmac: brcmf_construct_chaninfo: Ch num 64, chanspec
0xd93e, orig_flags: 80000.
[ 8.860515] brcmfmac: brcmf_construct_chaninfo: Ch num 104, chanspec
0xd966, orig_flags: 80000.
[ 8.860520] brcmfmac: brcmf_construct_chaninfo: Ch num 112, chanspec
0xd96e, orig_flags: 80000.
[ 8.860526] brcmfmac: brcmf_construct_chaninfo: Ch num 120, chanspec
0xd976, orig_flags: 80000.
[ 8.860531] brcmfmac: brcmf_construct_chaninfo: Ch num 128, chanspec
0xd97e, orig_flags: 80000.
[ 8.860537] brcmfmac: brcmf_construct_chaninfo: Ch num 136, chanspec
0xd986, orig_flags: 80000.
[ 8.860543] brcmfmac: brcmf_construct_chaninfo: Ch num 144, chanspec
0xd98e, orig_flags: 80000.
[ 8.860548] brcmfmac: brcmf_construct_chaninfo: Ch num 153, chanspec
0xd997, orig_flags: 80000.
[ 8.860554] brcmfmac: brcmf_construct_chaninfo: Ch num 161, chanspec
0xd99f, orig_flags: 80000.
[ 8.860560] brcmfmac: brcmf_construct_chaninfo: Ch num 36, chanspec
0xd826, orig_flags: 80000.
[ 8.860565] brcmfmac: brcmf_construct_chaninfo: Ch num 44, chanspec
0xd82e, orig_flags: 80000.
[ 8.860570] brcmfmac: brcmf_construct_chaninfo: Ch num 52, chanspec
0xd836, orig_flags: 80000.
[ 8.860593] brcmfmac: brcmf_construct_chaninfo: Ch num 60, chanspec
0xd83e, orig_flags: 80000.
[ 8.860599] brcmfmac: brcmf_construct_chaninfo: Ch num 100, chanspec
0xd866, orig_flags: 80000.
[ 8.860604] brcmfmac: brcmf_construct_chaninfo: Ch num 108, chanspec
0xd86e, orig_flags: 80000.
[ 8.860610] brcmfmac: brcmf_construct_chaninfo: Ch num 116, chanspec
0xd876, orig_flags: 80000.
[ 8.860615] brcmfmac: brcmf_construct_chaninfo: Ch num 124, chanspec
0xd87e, orig_flags: 80000.
[ 8.860621] brcmfmac: brcmf_construct_chaninfo: Ch num 132, chanspec
0xd886, orig_flags: 80000.
[ 8.860626] brcmfmac: brcmf_construct_chaninfo: Ch num 140, chanspec
0xd88e, orig_flags: 80000.
[ 8.860632] brcmfmac: brcmf_construct_chaninfo: Ch num 149, chanspec
0xd897, orig_flags: 80000.
[ 8.860638] brcmfmac: brcmf_construct_chaninfo: Ch num 157, chanspec
0xd89f, orig_flags: 80000.
[ 8.860658] brcmfmac: brcmf_construct_chaninfo: Ch num 36, chanspec
0xe02a, orig_flags: 80000.
[ 8.860667] brcmfmac: brcmf_construct_chaninfo: Ch num 52, chanspec
0xe03a, orig_flags: 80000.
[ 8.860673] brcmfmac: brcmf_construct_chaninfo: Ch num 100, chanspec
0xe06a, orig_flags: 80000.
[ 8.860678] brcmfmac: brcmf_construct_chaninfo: Ch num 116, chanspec
0xe07a, orig_flags: 80000.
[ 8.860685] brcmfmac: brcmf_construct_chaninfo: Ch num 132, chanspec
0xe08a, orig_flags: 80000.
[ 8.860691] brcmfmac: brcmf_construct_chaninfo: Ch num 149, chanspec
0xe09b, orig_flags: 80000.
[ 8.860696] brcmfmac: brcmf_construct_chaninfo: Ch num 40, chanspec
0xe12a, orig_flags: 80000.
[ 8.860702] brcmfmac: brcmf_construct_chaninfo: Ch num 56, chanspec
0xe13a, orig_flags: 80000.
[ 8.860707] brcmfmac: brcmf_construct_chaninfo: Ch num 104, chanspec
0xe16a, orig_flags: 80000.
[ 8.860713] brcmfmac: brcmf_construct_chaninfo: Ch num 120, chanspec
0xe17a, orig_flags: 80000.
[ 8.860718] brcmfmac: brcmf_construct_chaninfo: Ch num 136, chanspec
0xe18a, orig_flags: 80000.
[ 8.860724] brcmfmac: brcmf_construct_chaninfo: Ch num 153, chanspec
0xe19b, orig_flags: 80000.
[ 8.860729] brcmfmac: brcmf_construct_chaninfo: Ch num 44, chanspec
0xe22a, orig_flags: 80000.
[ 8.860735] brcmfmac: brcmf_construct_chaninfo: Ch num 60, chanspec
0xe23a, orig_flags: 80000.
[ 8.860740] brcmfmac: brcmf_construct_chaninfo: Ch num 108, chanspec
0xe26a, orig_flags: 80000.
[ 8.860745] brcmfmac: brcmf_construct_chaninfo: Ch num 124, chanspec
0xe27a, orig_flags: 80000.
[ 8.860755] brcmfmac: brcmf_construct_chaninfo: Ch num 140, chanspec
0xe28a, orig_flags: 80000.
[ 8.860760] brcmfmac: brcmf_construct_chaninfo: Ch num 157, chanspec
0xe29b, orig_flags: 80000.
[ 8.860766] brcmfmac: brcmf_construct_chaninfo: Ch num 48, chanspec
0xe32a, orig_flags: 80000.
[ 8.860771] brcmfmac: brcmf_construct_chaninfo: Ch num 64, chanspec
0xe33a, orig_flags: 80000.
[ 8.860776] brcmfmac: brcmf_construct_chaninfo: Ch num 112, chanspec
0xe36a, orig_flags: 80000.
[ 8.860782] brcmfmac: brcmf_construct_chaninfo: Ch num 128, chanspec
0xe37a, orig_flags: 80000.
[ 8.860787] brcmfmac: brcmf_construct_chaninfo: Ch num 144, chanspec
0xe38a, orig_flags: 80000.
[ 8.860795] brcmfmac: brcmf_construct_chaninfo: Ch num 161, chanspec
0xe39b, orig_flags: 80000.
[ 8.861554] onboard-usb-hub 3f980000.usb:usb-port@1: supply vdd not
found, using dummy regulator
[ 8.868702] onboard-usb-hub 3f980000.usb:usb-port@1:usb-port@1: supply
vdd not found, using dummy regulator
[ 8.891096] hub 1-1:1.0: USB hub found
[ 8.891187] hub 1-1:1.0: 4 ports detected
[ 8.896919] onboard-usb-hub 3f980000.usb:usb-port@1:usb-port@1: supply
vdd not found, using dummy regulator
[ 9.208425] usb 1-1.1: new high-speed USB device number 7 using dwc2
[ 9.339358] hub 1-1.1:1.0: USB hub found
[ 9.339475] hub 1-1.1:1.0: 3 ports detected
[ 9.438390] usb 1-1.3: new low-speed USB device number 8 using dwc2
[ 9.519198] Bluetooth: hci0: BCM: features 0x2f
[ 9.520993] Bluetooth: hci0: BCM43455 37.4MHz Raspberry Pi 3+
[ 9.521000] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0342
[ 9.595589] input: HID 046a:0011 as
/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:046A:0011.0003/input/input2
[ 9.658786] hid-generic 0003:046A:0011.0003: input: USB HID v1.11
Keyboard [HID 046a:0011] on usb-3f980000.usb-1.3/input0
[ 9.678424] usb 1-1.1.2: new low-speed USB device number 9 using dwc2
[ 9.816709] input: PixArt Microsoft USB Optical Mouse as
/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/0003:045E:00CB.0004/input/input3
[ 9.817000] hid-generic 0003:045E:00CB.0004: input: USB HID v1.11 Mouse
[PixArt Microsoft USB Optical Mouse] on usb-3f980000.usb-1.1.2/input0
[ 10.128368] usb 1-1.1.1: new high-speed USB device number 10 using dwc2
[ 10.534399] lan78xx 1-1.1.1:1.0 (unnamed net_device) (uninitialized):
No External EEPROM. Setting MAC Speed
[ 12.358759] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-23)
[ 12.475324] Adding 102396k swap on /var/swap. Priority:-2 extents:1
across:102396k SS
[ 12.534653] brcmfmac: brcmf_construct_chaninfo called
[ 12.538461] brcmfmac: brcmf_construct_chaninfo: Ch num 1, chanspec
0x1001, orig_flags: 80180.
[ 12.539514] brcmfmac: brcmf_construct_chaninfo: Ch num 2, chanspec
0x1002, orig_flags: 80180.
[ 12.539967] brcmfmac: brcmf_construct_chaninfo: Ch num 3, chanspec
0x1003, orig_flags: 80180.
[ 12.540446] brcmfmac: brcmf_construct_chaninfo: Ch num 4, chanspec
0x1004, orig_flags: 80180.
[ 12.540979] brcmfmac: brcmf_construct_chaninfo: Ch num 5, chanspec
0x1005, orig_flags: 80180.
[ 12.541417] brcmfmac: brcmf_construct_chaninfo: Ch num 6, chanspec
0x1006, orig_flags: 80180.
[ 12.541807] brcmfmac: brcmf_construct_chaninfo: Ch num 7, chanspec
0x1007, orig_flags: 80180.
[ 12.542184] brcmfmac: brcmf_construct_chaninfo: Ch num 8, chanspec
0x1008, orig_flags: 80180.
[ 12.542572] brcmfmac: brcmf_construct_chaninfo: Ch num 9, chanspec
0x1009, orig_flags: 80180.
[ 12.548876] brcmfmac: brcmf_construct_chaninfo: Ch num 10, chanspec
0x100a, orig_flags: 80180.
[ 12.549333] brcmfmac: brcmf_construct_chaninfo: Ch num 11, chanspec
0x100b, orig_flags: 80180.
[ 12.550512] brcmfmac: brcmf_construct_chaninfo: Ch num 12, chanspec
0x100c, orig_flags: 80180.
[ 12.550953] brcmfmac: brcmf_construct_chaninfo: Ch num 13, chanspec
0x100d, orig_flags: 80180.
[ 12.554027] brcmfmac: brcmf_construct_chaninfo: Ch num 5, chanspec
0x1903, orig_flags: 80180.
[ 12.554055] brcmfmac: brcmf_construct_chaninfo: Ch num 6, chanspec
0x1904, orig_flags: 80180.
[ 12.554060] brcmfmac: brcmf_construct_chaninfo: Ch num 7, chanspec
0x1905, orig_flags: 80180.
[ 12.554064] brcmfmac: brcmf_construct_chaninfo: Ch num 8, chanspec
0x1906, orig_flags: 80180.
[ 12.554068] brcmfmac: brcmf_construct_chaninfo: Ch num 9, chanspec
0x1907, orig_flags: 80180.
[ 12.554073] brcmfmac: brcmf_construct_chaninfo: Ch num 10, chanspec
0x1908, orig_flags: 80180.
[ 12.554078] brcmfmac: brcmf_construct_chaninfo: Ch num 11, chanspec
0x1909, orig_flags: 80180.
[ 12.554083] brcmfmac: brcmf_construct_chaninfo: Ch num 12, chanspec
0x190a, orig_flags: 80180.
[ 12.554087] brcmfmac: brcmf_construct_chaninfo: Ch num 13, chanspec
0x190b, orig_flags: 80180.
[ 12.554091] brcmfmac: brcmf_construct_chaninfo: Ch num 1, chanspec
0x1803, orig_flags: 80180.
[ 12.554095] brcmfmac: brcmf_construct_chaninfo: Ch num 2, chanspec
0x1804, orig_flags: 80180.
[ 12.554099] brcmfmac: brcmf_construct_chaninfo: Ch num 3, chanspec
0x1805, orig_flags: 80180.
[ 12.554104] brcmfmac: brcmf_construct_chaninfo: Ch num 4, chanspec
0x1806, orig_flags: 80180.
[ 12.554108] brcmfmac: brcmf_construct_chaninfo: Ch num 5, chanspec
0x1807, orig_flags: 80180.
[ 12.554113] brcmfmac: brcmf_construct_chaninfo: Ch num 6, chanspec
0x1808, orig_flags: 80180.
[ 12.554118] brcmfmac: brcmf_construct_chaninfo: Ch num 7, chanspec
0x1809, orig_flags: 80180.
[ 12.554122] brcmfmac: brcmf_construct_chaninfo: Ch num 8, chanspec
0x180a, orig_flags: 80180.
[ 12.554126] brcmfmac: brcmf_construct_chaninfo: Ch num 9, chanspec
0x180b, orig_flags: 80180.
[ 12.554131] brcmfmac: brcmf_construct_chaninfo: Ch num 36, chanspec
0xd024, orig_flags: 80000.
[ 12.554794] brcmfmac: brcmf_construct_chaninfo: Ch num 40, chanspec
0xd028, orig_flags: 80000.
[ 12.555338] brcmfmac: brcmf_construct_chaninfo: Ch num 44, chanspec
0xd02c, orig_flags: 80000.
[ 12.555859] brcmfmac: brcmf_construct_chaninfo: Ch num 48, chanspec
0xd030, orig_flags: 80000.
[ 12.556366] brcmfmac: brcmf_construct_chaninfo: Ch num 52, chanspec
0xd034, orig_flags: 80000.
[ 12.556904] brcmfmac: brcmf_construct_chaninfo: Ch num 56, chanspec
0xd038, orig_flags: 80000.
[ 12.557437] brcmfmac: brcmf_construct_chaninfo: Ch num 60, chanspec
0xd03c, orig_flags: 80000.
[ 12.557946] brcmfmac: brcmf_construct_chaninfo: Ch num 64, chanspec
0xd040, orig_flags: 80000.
[ 12.558511] brcmfmac: brcmf_construct_chaninfo: Ch num 100, chanspec
0xd064, orig_flags: 80000.
[ 12.562331] brcmfmac: brcmf_construct_chaninfo: Ch num 104, chanspec
0xd068, orig_flags: 80000.
[ 12.562838] brcmfmac: brcmf_construct_chaninfo: Ch num 108, chanspec
0xd06c, orig_flags: 80000.
[ 12.564164] brcmfmac: brcmf_construct_chaninfo: Ch num 112, chanspec
0xd070, orig_flags: 80000.
[ 12.564634] brcmfmac: brcmf_construct_chaninfo: Ch num 116, chanspec
0xd074, orig_flags: 80000.
[ 12.565152] brcmfmac: brcmf_construct_chaninfo: Ch num 120, chanspec
0xd078, orig_flags: 80000.
[ 12.567545] brcmfmac: brcmf_construct_chaninfo: Ch num 124, chanspec
0xd07c, orig_flags: 80000.
[ 12.568093] brcmfmac: brcmf_construct_chaninfo: Ch num 128, chanspec
0xd080, orig_flags: 80000.
[ 12.570298] brcmfmac: brcmf_construct_chaninfo: Ch num 132, chanspec
0xd084, orig_flags: 80000.
[ 12.571631] brcmfmac: brcmf_construct_chaninfo: Ch num 136, chanspec
0xd088, orig_flags: 80000.
[ 12.575890] brcmfmac: brcmf_construct_chaninfo: Ch num 140, chanspec
0xd08c, orig_flags: 80000.
[ 12.576378] brcmfmac: brcmf_construct_chaninfo: Ch num 40, chanspec
0xd926, orig_flags: 80000.
[ 12.576393] brcmfmac: brcmf_construct_chaninfo: Ch num 48, chanspec
0xd92e, orig_flags: 80000.
[ 12.576399] brcmfmac: brcmf_construct_chaninfo: Ch num 56, chanspec
0xd936, orig_flags: 80000.
[ 12.576405] brcmfmac: brcmf_construct_chaninfo: Ch num 64, chanspec
0xd93e, orig_flags: 80000.
[ 12.576412] brcmfmac: brcmf_construct_chaninfo: Ch num 104, chanspec
0xd966, orig_flags: 80000.
[ 12.576418] brcmfmac: brcmf_construct_chaninfo: Ch num 112, chanspec
0xd96e, orig_flags: 80000.
[ 12.576424] brcmfmac: brcmf_construct_chaninfo: Ch num 120, chanspec
0xd976, orig_flags: 80000.
[ 12.576434] brcmfmac: brcmf_construct_chaninfo: Ch num 128, chanspec
0xd97e, orig_flags: 80000.
[ 12.576440] brcmfmac: brcmf_construct_chaninfo: Ch num 136, chanspec
0xd986, orig_flags: 80000.
[ 12.576446] brcmfmac: brcmf_construct_chaninfo: Ch num 36, chanspec
0xd826, orig_flags: 80000.
[ 12.576452] brcmfmac: brcmf_construct_chaninfo: Ch num 44, chanspec
0xd82e, orig_flags: 80000.
[ 12.576458] brcmfmac: brcmf_construct_chaninfo: Ch num 52, chanspec
0xd836, orig_flags: 80000.
[ 12.576464] brcmfmac: brcmf_construct_chaninfo: Ch num 60, chanspec
0xd83e, orig_flags: 80000.
[ 12.576470] brcmfmac: brcmf_construct_chaninfo: Ch num 100, chanspec
0xd866, orig_flags: 80000.
[ 12.576476] brcmfmac: brcmf_construct_chaninfo: Ch num 108, chanspec
0xd86e, orig_flags: 80000.
[ 12.576482] brcmfmac: brcmf_construct_chaninfo: Ch num 116, chanspec
0xd876, orig_flags: 80000.
[ 12.576487] brcmfmac: brcmf_construct_chaninfo: Ch num 124, chanspec
0xd87e, orig_flags: 80000.
[ 12.576493] brcmfmac: brcmf_construct_chaninfo: Ch num 132, chanspec
0xd886, orig_flags: 80000.
[ 12.576499] brcmfmac: brcmf_construct_chaninfo: Ch num 36, chanspec
0xe02a, orig_flags: 80000.
[ 12.576505] brcmfmac: brcmf_construct_chaninfo: Ch num 52, chanspec
0xe03a, orig_flags: 80000.
[ 12.576511] brcmfmac: brcmf_construct_chaninfo: Ch num 100, chanspec
0xe06a, orig_flags: 80000.
[ 12.576517] brcmfmac: brcmf_construct_chaninfo: Ch num 116, chanspec
0xe07a, orig_flags: 80000.
[ 12.576522] brcmfmac: brcmf_construct_chaninfo: Ch num 40, chanspec
0xe12a, orig_flags: 80000.
[ 12.576528] brcmfmac: brcmf_construct_chaninfo: Ch num 56, chanspec
0xe13a, orig_flags: 80000.
[ 12.576534] brcmfmac: brcmf_construct_chaninfo: Ch num 104, chanspec
0xe16a, orig_flags: 80000.
[ 12.576540] brcmfmac: brcmf_construct_chaninfo: Ch num 120, chanspec
0xe17a, orig_flags: 80000.
[ 12.576546] brcmfmac: brcmf_construct_chaninfo: Ch num 44, chanspec
0xe22a, orig_flags: 80000.
[ 12.576554] brcmfmac: brcmf_construct_chaninfo: Ch num 60, chanspec
0xe23a, orig_flags: 80000.
[ 12.576560] brcmfmac: brcmf_construct_chaninfo: Ch num 108, chanspec
0xe26a, orig_flags: 80000.
[ 12.576566] brcmfmac: brcmf_construct_chaninfo: Ch num 124, chanspec
0xe27a, orig_flags: 80000.
[ 12.576572] brcmfmac: brcmf_construct_chaninfo: Ch num 48, chanspec
0xe32a, orig_flags: 80000.
[ 12.576578] brcmfmac: brcmf_construct_chaninfo: Ch num 64, chanspec
0xe33a, orig_flags: 80000.
[ 12.576584] brcmfmac: brcmf_construct_chaninfo: Ch num 112, chanspec
0xe36a, orig_flags: 80000.
[ 12.576590] brcmfmac: brcmf_construct_chaninfo: Ch num 128, chanspec
0xe37a, orig_flags: 80000.
[ 12.954647] Bluetooth: MGMT ver 1.22
[ 13.068104] lan78xx 1-1.1.1:1.0 eth0: Link is Down
[ 22.651995] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-23)
[ 115.162918] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-23)
[ 150.177646] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 150.177681] ------------[ cut here ]------------
[ 150.177691] WARNING: CPU: 2 PID: 466 at
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:8077
brcmf_cfg80211_dump_survey+0x330/0x348 [brcmfmac]
[ 150.177802] Modules linked in: aes_arm aes_generic cmac brcmfmac_wcc
vc4 snd_soc_hdmi_codec brcmfmac snd_soc_core crc32_arm_ce brcmutil
ac97_bus snd_pcm_dmaengine snd_pcm sha256_generic libsha256 sha256_arm
snd_timer hci_uart cfg80211 snd btbcm soundcore bluetooth
onboard_usb_hub drm_dma_helper ecdh_generic ecc libaes raspberrypi_hwmon
bcm2835_thermal microchip lan78xx
[ 150.178002] CPU: 2 PID: 466 Comm: wpa_supplicant Not tainted
6.6.0-15494-g6bc986ab839c-dirty #139
[ 150.178020] Hardware name: BCM2835
[ 150.178039] unwind_backtrace from show_stack+0x10/0x14
[ 150.178077] show_stack from dump_stack_lvl+0x40/0x4c
[ 150.178106] dump_stack_lvl from __warn+0x7c/0x124
[ 150.178142] __warn from warn_slowpath_fmt+0x170/0x178
[ 150.178178] warn_slowpath_fmt from
brcmf_cfg80211_dump_survey+0x330/0x348 [brcmfmac]
[ 150.178290] brcmf_cfg80211_dump_survey [brcmfmac] from
nl80211_dump_survey+0x174/0x2bc [cfg80211]
[ 150.178543] nl80211_dump_survey [cfg80211] from genl_dumpit+0x38/0x74
[ 150.178714] genl_dumpit from netlink_dump+0x158/0x334
[ 150.178739] netlink_dump from __netlink_dump_start+0x1bc/0x27c
[ 150.178762] __netlink_dump_start from genl_rcv_msg+0x148/0x358
[ 150.178788] genl_rcv_msg from netlink_rcv_skb+0xb4/0x10c
[ 150.178814] netlink_rcv_skb from genl_rcv+0x24/0x34
[ 150.178838] genl_rcv from netlink_unicast+0x1f4/0x2d0
[ 150.178864] netlink_unicast from netlink_sendmsg+0x1cc/0x454
[ 150.178888] netlink_sendmsg from ____sys_sendmsg+0xa0/0x26c
[ 150.178921] ____sys_sendmsg from ___sys_sendmsg+0x68/0x94
[ 150.178956] ___sys_sendmsg from sys_sendmsg+0x4c/0x88
[ 150.178993] sys_sendmsg from ret_fast_syscall+0x0/0x54
[ 150.179022] Exception stack(0xf0c59fa8 to 0xf0c59ff0)
[ 150.179039] 9fa0: 00247210 00265500 00000004 befbd8c8 00000000 00000000
[ 150.179057] 9fc0: 00247210 00265500 00247198 00000128 b6f5f000
befbd994 00000001 00000004
[ 150.179070] 9fe0: 0000006c befbd880 b6f445bc b6aa7970
[ 150.179082] ---[ end trace 0000000000000000 ]---
[ 150.179093] brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail,
reason -52
[ 150.287764] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 150.287792] brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail,
reason -52
[ 150.397629] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 150.397663] brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail,
reason -52
[ 150.507731] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 150.507760] brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail,
reason -52
[ 152.267615] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 152.267652] brcmfmac: brcmf_set_channel: set chanspec 0xd090 fail,
reason -52
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2023-11-13 21:02 ` Stefan Wahren
@ 2023-11-14 20:09 ` Stefan Wahren
2023-11-15 9:34 ` Arend van Spriel
1 sibling, 0 replies; 41+ messages in thread
From: Stefan Wahren @ 2023-11-14 20:09 UTC (permalink / raw)
To: Arend van Spriel, Arend van Spriel, Franky Lin, Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
Hi Arend,
Am 13.11.23 um 22:02 schrieb Stefan Wahren:
> Hi Arend,
>
> Am 13.11.23 um 10:11 schrieb Arend van Spriel:
>> On 11/11/2023 9:30 PM, Stefan Wahren wrote:
>>> Am 11.11.23 um 19:29 schrieb Stefan Wahren:
>>>>
>>>> Am 11.11.23 um 18:25 schrieb Arend Van Spriel:
>>>>> On November 11, 2023 5:48:46 PM Stefan Wahren <wahrenst@gmx.net>
>>>>> wrote:
>>>>>
>>>>>
>>>>> Again look like these are disabled channels. At least chanspec 0xd022
>>>>> is 5G channel 34. You say you get this only once so not every 60
>>>>> seconds?
>>>> I get this everytime i trigger a reconnect to the wifi network, so not
>>>> periodically (checked that). Strangely the initial automatic connect
>>>> doesn't trigger this errors.
>>> I additionally placed a WARN_ON_ONCE after the error log and enabled
>>> the
>>> firmware error log of brcmf_fil_cmd_data(). Maybe this helps.
>>
>> It does a bit. At least it shows this is happening with the
>> dump_survey (again). I don't really understand why though. It implies
>> the channel is not disabled, but unclear why. The channel flags are
>> changed in brcmf_construct_chaninfo() so we probably should focus
>> debug on that function.
>>
>
here are more traces. I placed a warning everytime channelspec 0xd090 is
encoded or decoded. I hope this helps. As you can see below most of them
are triggered periodically by wpa_supplicant.
[ 8.975943] ------------[ cut here ]------------
[ 8.975964] WARNING: CPU: 0 PID: 65 at
drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c:242
brcmu_d11ac_decchspec+0x1ac/0x304 [brcmutil]
[ 8.975997] brcmu_d11ac_decchspec called chnum 144 + control 144 =
chanspec 0xd090
[ 8.976004] Modules linked in: brcmfmac_wcc crc32_arm_ce vc4 brcmfmac
snd_soc_hdmi_codec brcmutil snd_soc_core sha256_generic libsha256
sha256_arm ac97_bus hci_uart snd_pcm_dmaengine cfg80211 snd_pcm btbcm
snd_timer bluetooth snd soundcore ecdh_generic drm_dma_helper ecc
onboard_usb_hub(+) libaes raspberrypi_hwmon bcm2835_thermal microchip
lan78xx
[ 8.976113] CPU: 0 PID: 65 Comm: kworker/0:2 Not tainted
6.6.0-15494-g6bc986ab839c-dirty #139
[ 8.976121] Hardware name: BCM2835
[ 8.976126] Workqueue: events request_firmware_work_func
[ 8.976152] unwind_backtrace from show_stack+0x10/0x14
[ 8.976169] show_stack from dump_stack_lvl+0x40/0x4c
[ 8.976185] dump_stack_lvl from __warn+0x7c/0x124
[ 8.976203] __warn from warn_slowpath_fmt+0x110/0x178
[ 8.976219] warn_slowpath_fmt from brcmu_d11ac_decchspec+0x1ac/0x304
[brcmutil]
[ 8.976247] brcmu_d11ac_decchspec [brcmutil] from
brcmf_setup_wiphybands+0x224/0x900 [brcmfmac]
[ 8.976307] brcmf_setup_wiphybands [brcmfmac] from
brcmf_cfg80211_attach+0xa44/0x13c8 [brcmfmac]
[ 8.976375] brcmf_cfg80211_attach [brcmfmac] from
brcmf_attach+0x184/0x4a4 [brcmfmac]
[ 8.976442] brcmf_attach [brcmfmac] from
brcmf_sdio_firmware_callback+0x788/0x930 [brcmfmac]
[ 8.976508] brcmf_sdio_firmware_callback [brcmfmac] from
brcmf_fw_request_done+0x160/0x180 [brcmfmac]
[ 8.976574] brcmf_fw_request_done [brcmfmac] from
request_firmware_work_func+0x4c/0x88
[ 8.976617] request_firmware_work_func from process_one_work+0x168/0x374
[ 8.976632] process_one_work from worker_thread+0x29c/0x4e8
[ 8.976642] worker_thread from kthread+0xe0/0xfc
[ 8.976657] kthread from ret_from_fork+0x14/0x28
[ 8.976670] Exception stack(0xf147dfb0 to 0xf147dff8)
[ 8.976677] dfa0: 00000000
00000000 00000000 00000000
[ 8.976684] dfc0: 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000
[ 8.976691] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 8.976696] ---[ end trace 0000000000000000 ]---
[ 8.976703] ------------[ cut here ]------------
[ 8.976706] WARNING: CPU: 0 PID: 65 at
drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c:97
brcmu_d11ac_encchspec+0x114/0x120 [brcmutil]
[ 8.976721] brcmu_d11ac_encchspec called chanspec 0xd090 = chnum 144
[ 8.976726] Modules linked in: brcmfmac_wcc crc32_arm_ce vc4 brcmfmac
snd_soc_hdmi_codec brcmutil snd_soc_core sha256_generic libsha256
sha256_arm ac97_bus hci_uart snd_pcm_dmaengine cfg80211 snd_pcm btbcm
snd_timer bluetooth snd soundcore ecdh_generic drm_dma_helper ecc
onboard_usb_hub(+) libaes raspberrypi_hwmon bcm2835_thermal microchip
lan78xx
[ 8.976802] CPU: 0 PID: 65 Comm: kworker/0:2 Tainted: G W
6.6.0-15494-g6bc986ab839c-dirty #139
[ 8.976809] Hardware name: BCM2835
[ 8.976813] Workqueue: events request_firmware_work_func
[ 8.976824] unwind_backtrace from show_stack+0x10/0x14
[ 8.976837] show_stack from dump_stack_lvl+0x40/0x4c
[ 8.976849] dump_stack_lvl from __warn+0x7c/0x124
[ 8.976864] __warn from warn_slowpath_fmt+0x110/0x178
[ 8.976880] warn_slowpath_fmt from brcmu_d11ac_encchspec+0x114/0x120
[brcmutil]
[ 8.976898] brcmu_d11ac_encchspec [brcmutil] from
brcmf_setup_wiphybands+0x56c/0x900 [brcmfmac]
[ 8.976943] brcmf_setup_wiphybands [brcmfmac] from
brcmf_cfg80211_attach+0xa44/0x13c8 [brcmfmac]
[ 8.977010] brcmf_cfg80211_attach [brcmfmac] from
brcmf_attach+0x184/0x4a4 [brcmfmac]
[ 8.977076] brcmf_attach [brcmfmac] from
brcmf_sdio_firmware_callback+0x788/0x930 [brcmfmac]
[ 8.977143] brcmf_sdio_firmware_callback [brcmfmac] from
brcmf_fw_request_done+0x160/0x180 [brcmfmac]
[ 8.977209] brcmf_fw_request_done [brcmfmac] from
request_firmware_work_func+0x4c/0x88
[ 8.977251] request_firmware_work_func from process_one_work+0x168/0x374
[ 8.977263] process_one_work from worker_thread+0x29c/0x4e8
[ 8.977272] worker_thread from kthread+0xe0/0xfc
[ 8.977285] kthread from ret_from_fork+0x14/0x28
[ 8.977298] Exception stack(0xf147dfb0 to 0xf147dff8)
[ 8.977304] dfa0: 00000000
00000000 00000000 00000000
[ 8.977311] dfc0: 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000
[ 8.977318] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 8.977323] ---[ end trace 0000000000000000 ]---
[ 9.088758] hub 1-1:1.0: USB hub found
[ 9.088869] hub 1-1:1.0: 4 ports detected
[ 9.092510] onboard-usb-hub 3f980000.usb:usb-port@1: supply vdd not
found, using dummy regulator
[ 9.096491] onboard-usb-hub 3f980000.usb:usb-port@1:usb-port@1:
supply vdd not found, using dummy regulator
[ 9.400501] hub 1-1:1.0: USB hub found
[ 9.400604] hub 1-1:1.0: 4 ports detected
[ 9.410719] onboard-usb-hub 3f980000.usb:usb-port@1:usb-port@1:
supply vdd not found, using dummy regulator
[ 9.679050] Bluetooth: hci0: BCM: features 0x2f
[ 9.680875] Bluetooth: hci0: BCM43455 37.4MHz Raspberry Pi 3+
[ 9.680892] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0342
[ 9.718250] usb 1-1.1: new high-speed USB device number 7 using dwc2
[ 9.849052] hub 1-1.1:1.0: USB hub found
[ 9.849181] hub 1-1.1:1.0: 3 ports detected
[ 9.948228] usb 1-1.3: new low-speed USB device number 8 using dwc2
[ 10.086630] input: PixArt Microsoft USB Optical Mouse as
/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:045E:00CB.0003/input/input2
[ 10.086801] hid-generic 0003:045E:00CB.0003: input: USB HID v1.11
Mouse [PixArt Microsoft USB Optical Mouse] on usb-3f980000.usb-1.3/input0
[ 10.178204] usb 1-1.1.2: new low-speed USB device number 9 using dwc2
[ 10.330533] input: HID 046a:0011 as
/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/0003:046A:0011.0004/input/input3
[ 10.398633] hid-generic 0003:046A:0011.0004: input: USB HID v1.11
Keyboard [HID 046a:0011] on usb-3f980000.usb-1.1.2/input0
[ 10.698223] usb 1-1.1.1: new high-speed USB device number 10 using dwc2
[ 11.094825] lan78xx 1-1.1.1:1.0 (unnamed net_device) (uninitialized):
No External EEPROM. Setting MAC Speed
[ 12.498318] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-23)
[ 12.660488] Adding 102396k swap on /var/swap. Priority:-2 extents:1
across:102396k SS
[ 12.697733] brcmfmac: brcmf_construct_chaninfo called
[ 13.152186] Bluetooth: MGMT ver 1.22
[ 13.282983] lan78xx 1-1.1.1:1.0 eth0: Link is Down
[ 24.316057] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-23)
[ 91.455424] ------------[ cut here ]------------
[ 91.455449] WARNING: CPU: 2 PID: 466 at
drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c:97
brcmu_d11ac_encchspec+0x114/0x120 [brcmutil]
[ 91.455503] brcmu_d11ac_encchspec called chanspec 0xd090 = chnum 144
[ 91.455516] Modules linked in: aes_arm aes_generic cmac brcmfmac_wcc
crc32_arm_ce vc4 brcmfmac snd_soc_hdmi_codec brcmutil snd_soc_core
sha256_generic libsha256 sha256_arm ac97_bus hci_uart snd_pcm_dmaengine
cfg80211 snd_pcm btbcm snd_timer bluetooth snd soundcore ecdh_generic
drm_dma_helper ecc onboard_usb_hub libaes raspberrypi_hwmon
bcm2835_thermal microchip lan78xx
[ 91.455717] CPU: 2 PID: 466 Comm: wpa_supplicant Tainted: G
W 6.6.0-15494-g6bc986ab839c-dirty #139
[ 91.455734] Hardware name: BCM2835
[ 91.455750] unwind_backtrace from show_stack+0x10/0x14
[ 91.455786] show_stack from dump_stack_lvl+0x40/0x4c
[ 91.455817] dump_stack_lvl from __warn+0x7c/0x124
[ 91.455851] __warn from warn_slowpath_fmt+0x110/0x178
[ 91.455887] warn_slowpath_fmt from brcmu_d11ac_encchspec+0x114/0x120
[brcmutil]
[ 91.455931] brcmu_d11ac_encchspec [brcmutil] from
brcmf_run_escan+0x12c/0x370 [brcmfmac]
[ 91.456041] brcmf_run_escan [brcmfmac] from brcmf_do_escan+0x60/0xa8
[brcmfmac]
[ 91.456197] brcmf_do_escan [brcmfmac] from
brcmf_cfg80211_scan+0x10c/0x210 [brcmfmac]
[ 91.456351] brcmf_cfg80211_scan [brcmfmac] from
cfg80211_scan+0x14c/0x268 [cfg80211]
[ 91.456613] cfg80211_scan [cfg80211] from
nl80211_trigger_scan+0x304/0x630 [cfg80211]
[ 91.456916] nl80211_trigger_scan [cfg80211] from
genl_rcv_msg+0x240/0x358
[ 91.457086] genl_rcv_msg from netlink_rcv_skb+0xb4/0x10c
[ 91.457113] netlink_rcv_skb from genl_rcv+0x24/0x34
[ 91.457138] genl_rcv from netlink_unicast+0x1f4/0x2d0
[ 91.457163] netlink_unicast from netlink_sendmsg+0x1cc/0x454
[ 91.457188] netlink_sendmsg from ____sys_sendmsg+0xa0/0x26c
[ 91.457221] ____sys_sendmsg from ___sys_sendmsg+0x68/0x94
[ 91.457256] ___sys_sendmsg from sys_sendmsg+0x4c/0x88
[ 91.457293] sys_sendmsg from ret_fast_syscall+0x0/0x54
[ 91.457322] Exception stack(0xf111dfa8 to 0xf111dff0)
[ 91.457340] dfa0: 00247210 0026f770 00000004
bea179c8 00000000 00000000
[ 91.457357] dfc0: 00247210 0026f770 00247198 00000128 b6ef1000
00000000 00000001 00000004
[ 91.457370] dfe0: 0000006c bea17980 b6ed65bc b6a39970
[ 91.457382] ---[ end trace 0000000000000000 ]---
[ 123.538108] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-23)
[ 145.284330] ------------[ cut here ]------------
[ 145.284347] WARNING: CPU: 3 PID: 466 at
drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c:97
brcmu_d11ac_encchspec+0x114/0x120 [brcmutil]
[ 145.284376] brcmu_d11ac_encchspec called chanspec 0xd090 = chnum 144
[ 145.284383] Modules linked in: aes_arm aes_generic cmac brcmfmac_wcc
crc32_arm_ce vc4 brcmfmac snd_soc_hdmi_codec brcmutil snd_soc_core
sha256_generic libsha256 sha256_arm ac97_bus hci_uart snd_pcm_dmaengine
cfg80211 snd_pcm btbcm snd_timer bluetooth snd soundcore ecdh_generic
drm_dma_helper ecc onboard_usb_hub libaes raspberrypi_hwmon
bcm2835_thermal microchip lan78xx
[ 145.284479] CPU: 3 PID: 466 Comm: wpa_supplicant Tainted: G
W 6.6.0-15494-g6bc986ab839c-dirty #139
[ 145.284487] Hardware name: BCM2835
[ 145.284495] unwind_backtrace from show_stack+0x10/0x14
[ 145.284515] show_stack from dump_stack_lvl+0x40/0x4c
[ 145.284531] dump_stack_lvl from __warn+0x7c/0x124
[ 145.284547] __warn from warn_slowpath_fmt+0x110/0x178
[ 145.284563] warn_slowpath_fmt from brcmu_d11ac_encchspec+0x114/0x120
[brcmutil]
[ 145.284582] brcmu_d11ac_encchspec [brcmutil] from
brcmf_run_escan+0x12c/0x370 [brcmfmac]
[ 145.284636] brcmf_run_escan [brcmfmac] from brcmf_do_escan+0x60/0xa8
[brcmfmac]
[ 145.284703] brcmf_do_escan [brcmfmac] from
brcmf_cfg80211_scan+0x10c/0x210 [brcmfmac]
[ 145.284769] brcmf_cfg80211_scan [brcmfmac] from
cfg80211_scan+0x14c/0x268 [cfg80211]
[ 145.284992] cfg80211_scan [cfg80211] from
nl80211_trigger_scan+0x304/0x630 [cfg80211]
[ 145.285294] nl80211_trigger_scan [cfg80211] from
genl_rcv_msg+0x240/0x358
[ 145.285467] genl_rcv_msg from netlink_rcv_skb+0xb4/0x10c
[ 145.285494] netlink_rcv_skb from genl_rcv+0x24/0x34
[ 145.285519] genl_rcv from netlink_unicast+0x1f4/0x2d0
[ 145.285545] netlink_unicast from netlink_sendmsg+0x1cc/0x454
[ 145.285569] netlink_sendmsg from ____sys_sendmsg+0xa0/0x26c
[ 145.285601] ____sys_sendmsg from ___sys_sendmsg+0x68/0x94
[ 145.285637] ___sys_sendmsg from sys_sendmsg+0x4c/0x88
[ 145.285674] sys_sendmsg from ret_fast_syscall+0x0/0x54
[ 145.285703] Exception stack(0xf111dfa8 to 0xf111dff0)
[ 145.285721] dfa0: 00247210 00272f60 00000004
bea179c8 00000000 00000000
[ 145.285738] dfc0: 00247210 00272f60 00247198 00000128 b6ef1000
00000000 00000001 00000004
[ 145.285752] dfe0: 0000006c bea17980 b6ed65bc b6a39970
[ 145.285776] ---[ end trace 0000000000000000 ]---
[ 149.309644] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 149.309682] ------------[ cut here ]------------
[ 149.309693] WARNING: CPU: 3 PID: 466 at
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:8077
brcmf_cfg80211_dump_survey+0x330/0x348 [brcmfmac]
[ 149.309804] Modules linked in: aes_arm aes_generic cmac brcmfmac_wcc
crc32_arm_ce vc4 brcmfmac snd_soc_hdmi_codec brcmutil snd_soc_core
sha256_generic libsha256 sha256_arm ac97_bus hci_uart snd_pcm_dmaengine
cfg80211 snd_pcm btbcm snd_timer bluetooth snd soundcore ecdh_generic
drm_dma_helper ecc onboard_usb_hub libaes raspberrypi_hwmon
bcm2835_thermal microchip lan78xx
[ 149.310007] CPU: 3 PID: 466 Comm: wpa_supplicant Tainted: G
W 6.6.0-15494-g6bc986ab839c-dirty #139
[ 149.310025] Hardware name: BCM2835
[ 149.310041] unwind_backtrace from show_stack+0x10/0x14
[ 149.310079] show_stack from dump_stack_lvl+0x40/0x4c
[ 149.310109] dump_stack_lvl from __warn+0x7c/0x124
[ 149.310144] __warn from warn_slowpath_fmt+0x170/0x178
[ 149.310181] warn_slowpath_fmt from
brcmf_cfg80211_dump_survey+0x330/0x348 [brcmfmac]
[ 149.310284] brcmf_cfg80211_dump_survey [brcmfmac] from
nl80211_dump_survey+0x174/0x2bc [cfg80211]
[ 149.310559] nl80211_dump_survey [cfg80211] from genl_dumpit+0x38/0x74
[ 149.310731] genl_dumpit from netlink_dump+0x158/0x334
[ 149.310756] netlink_dump from __netlink_dump_start+0x1bc/0x27c
[ 149.310780] __netlink_dump_start from genl_rcv_msg+0x148/0x358
[ 149.310805] genl_rcv_msg from netlink_rcv_skb+0xb4/0x10c
[ 149.310831] netlink_rcv_skb from genl_rcv+0x24/0x34
[ 149.310856] genl_rcv from netlink_unicast+0x1f4/0x2d0
[ 149.310882] netlink_unicast from netlink_sendmsg+0x1cc/0x454
[ 149.310908] netlink_sendmsg from ____sys_sendmsg+0xa0/0x26c
[ 149.310939] ____sys_sendmsg from ___sys_sendmsg+0x68/0x94
[ 149.310975] ___sys_sendmsg from sys_sendmsg+0x4c/0x88
[ 149.311013] sys_sendmsg from ret_fast_syscall+0x0/0x54
[ 149.311043] Exception stack(0xf111dfa8 to 0xf111dff0)
[ 149.311062] dfa0: 00247210 00274eb0 00000004
bea168c8 00000000 00000000
[ 149.311079] dfc0: 00247210 00274eb0 00247198 00000128 b6ef1000
bea16994 00000001 00000004
[ 149.311094] dfe0: 0000006c bea16880 b6ed65bc b6a39970
[ 149.311105] ---[ end trace 0000000000000000 ]---
[ 149.311115] brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail,
reason -52
[ 149.419712] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 149.419741] brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail,
reason -52
[ 149.529708] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 149.529738] brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail,
reason -52
[ 149.639725] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 149.639754] brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail,
reason -52
[ 151.399302] ------------[ cut here ]------------
[ 151.399327] WARNING: CPU: 3 PID: 466 at
drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c:97
brcmu_d11ac_encchspec+0x114/0x120 [brcmutil]
[ 151.399380] brcmu_d11ac_encchspec called chanspec 0xd090 = chnum 144
[ 151.399392] Modules linked in: aes_arm aes_generic cmac brcmfmac_wcc
crc32_arm_ce vc4 brcmfmac snd_soc_hdmi_codec brcmutil snd_soc_core
sha256_generic libsha256 sha256_arm ac97_bus hci_uart snd_pcm_dmaengine
cfg80211 snd_pcm btbcm snd_timer bluetooth snd soundcore ecdh_generic
drm_dma_helper ecc onboard_usb_hub libaes raspberrypi_hwmon
bcm2835_thermal microchip lan78xx
[ 151.399596] CPU: 3 PID: 466 Comm: wpa_supplicant Tainted: G
W 6.6.0-15494-g6bc986ab839c-dirty #139
[ 151.399613] Hardware name: BCM2835
[ 151.399629] unwind_backtrace from show_stack+0x10/0x14
[ 151.399666] show_stack from dump_stack_lvl+0x40/0x4c
[ 151.399697] dump_stack_lvl from __warn+0x7c/0x124
[ 151.399732] __warn from warn_slowpath_fmt+0x110/0x178
[ 151.399768] warn_slowpath_fmt from brcmu_d11ac_encchspec+0x114/0x120
[brcmutil]
[ 151.399813] brcmu_d11ac_encchspec [brcmutil] from
brcmf_cfg80211_dump_survey+0xe8/0x348 [brcmfmac]
[ 151.399925] brcmf_cfg80211_dump_survey [brcmfmac] from
nl80211_dump_survey+0x174/0x2bc [cfg80211]
[ 151.400191] nl80211_dump_survey [cfg80211] from genl_dumpit+0x38/0x74
[ 151.400361] genl_dumpit from netlink_dump+0x158/0x334
[ 151.400386] netlink_dump from __netlink_dump_start+0x1bc/0x27c
[ 151.400410] __netlink_dump_start from genl_rcv_msg+0x148/0x358
[ 151.400435] genl_rcv_msg from netlink_rcv_skb+0xb4/0x10c
[ 151.400461] netlink_rcv_skb from genl_rcv+0x24/0x34
[ 151.400486] genl_rcv from netlink_unicast+0x1f4/0x2d0
[ 151.400512] netlink_unicast from netlink_sendmsg+0x1cc/0x454
[ 151.400537] netlink_sendmsg from ____sys_sendmsg+0xa0/0x26c
[ 151.400569] ____sys_sendmsg from ___sys_sendmsg+0x68/0x94
[ 151.400605] ___sys_sendmsg from sys_sendmsg+0x4c/0x88
[ 151.400642] sys_sendmsg from ret_fast_syscall+0x0/0x54
[ 151.400671] Exception stack(0xf111dfa8 to 0xf111dff0)
[ 151.400689] dfa0: 00247210 00274eb0 00000004
bea168c8 00000000 00000000
[ 151.400706] dfc0: 00247210 00274eb0 00247198 00000128 b6ef1000
bea16994 00000001 00000004
[ 151.400720] dfe0: 0000006c bea16880 b6ed65bc b6a39970
[ 151.400731] ---[ end trace 0000000000000000 ]---
[ 151.401108] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 151.401128] brcmfmac: brcmf_set_channel: set chanspec 0xd090 fail,
reason -52
[ 151.503492] ------------[ cut here ]------------
[ 151.503514] WARNING: CPU: 3 PID: 466 at
drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c:97
brcmu_d11ac_encchspec+0x114/0x120 [brcmutil]
[ 151.503544] brcmu_d11ac_encchspec called chanspec 0xd090 = chnum 144
[ 151.503549] Modules linked in: aes_arm aes_generic cmac brcmfmac_wcc
crc32_arm_ce vc4 brcmfmac snd_soc_hdmi_codec brcmutil snd_soc_core
sha256_generic libsha256 sha256_arm ac97_bus hci_uart snd_pcm_dmaengine
cfg80211 snd_pcm btbcm snd_timer bluetooth snd soundcore ecdh_generic
drm_dma_helper ecc onboard_usb_hub libaes raspberrypi_hwmon
bcm2835_thermal microchip lan78xx
[ 151.503648] CPU: 3 PID: 466 Comm: wpa_supplicant Tainted: G
W 6.6.0-15494-g6bc986ab839c-dirty #139
[ 151.503656] Hardware name: BCM2835
[ 151.503665] unwind_backtrace from show_stack+0x10/0x14
[ 151.503685] show_stack from dump_stack_lvl+0x40/0x4c
[ 151.503701] dump_stack_lvl from __warn+0x7c/0x124
[ 151.503717] __warn from warn_slowpath_fmt+0x110/0x178
[ 151.503732] warn_slowpath_fmt from brcmu_d11ac_encchspec+0x114/0x120
[brcmutil]
[ 151.503753] brcmu_d11ac_encchspec [brcmutil] from
brcmf_run_escan+0x12c/0x370 [brcmfmac]
[ 151.503811] brcmf_run_escan [brcmfmac] from brcmf_do_escan+0x60/0xa8
[brcmfmac]
[ 151.503879] brcmf_do_escan [brcmfmac] from
brcmf_cfg80211_scan+0x10c/0x210 [brcmfmac]
[ 151.503946] brcmf_cfg80211_scan [brcmfmac] from
cfg80211_scan+0x14c/0x268 [cfg80211]
[ 151.504092] cfg80211_scan [cfg80211] from
nl80211_trigger_scan+0x304/0x630 [cfg80211]
[ 151.504222] nl80211_trigger_scan [cfg80211] from
genl_rcv_msg+0x240/0x358
[ 151.504297] genl_rcv_msg from netlink_rcv_skb+0xb4/0x10c
[ 151.504308] netlink_rcv_skb from genl_rcv+0x24/0x34
[ 151.504319] genl_rcv from netlink_unicast+0x1f4/0x2d0
[ 151.504330] netlink_unicast from netlink_sendmsg+0x1cc/0x454
[ 151.504341] netlink_sendmsg from ____sys_sendmsg+0xa0/0x26c
[ 151.504357] ____sys_sendmsg from ___sys_sendmsg+0x68/0x94
[ 151.504372] ___sys_sendmsg from sys_sendmsg+0x4c/0x88
[ 151.504388] sys_sendmsg from ret_fast_syscall+0x0/0x54
[ 151.504403] Exception stack(0xf111dfa8 to 0xf111dff0)
[ 151.504411] dfa0: 00247210 00274eb0 00000004
bea179c8 00000000 00000000
[ 151.504418] dfc0: 00247210 00274eb0 00247198 00000128 b6ef1000
00000000 00000001 00000004
[ 151.504424] dfe0: 0000006c bea17980 b6ed65bc b6a39970
[ 151.504431] ---[ end trace 0000000000000000 ]---
[ 211.470819] ------------[ cut here ]------------
[ 211.470844] WARNING: CPU: 3 PID: 466 at
drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c:97
brcmu_d11ac_encchspec+0x114/0x120 [brcmutil]
[ 211.470897] brcmu_d11ac_encchspec called chanspec 0xd090 = chnum 144
[ 211.470909] Modules linked in: aes_arm aes_generic cmac brcmfmac_wcc
crc32_arm_ce vc4 brcmfmac snd_soc_hdmi_codec brcmutil snd_soc_core
sha256_generic libsha256 sha256_arm ac97_bus hci_uart snd_pcm_dmaengine
cfg80211 snd_pcm btbcm snd_timer bluetooth snd soundcore ecdh_generic
drm_dma_helper ecc onboard_usb_hub libaes raspberrypi_hwmon
bcm2835_thermal microchip lan78xx
[ 211.471110] CPU: 3 PID: 466 Comm: wpa_supplicant Tainted: G
W 6.6.0-15494-g6bc986ab839c-dirty #139
[ 211.471127] Hardware name: BCM2835
[ 211.471142] unwind_backtrace from show_stack+0x10/0x14
[ 211.471179] show_stack from dump_stack_lvl+0x40/0x4c
[ 211.471210] dump_stack_lvl from __warn+0x7c/0x124
[ 211.471244] __warn from warn_slowpath_fmt+0x110/0x178
[ 211.471280] warn_slowpath_fmt from brcmu_d11ac_encchspec+0x114/0x120
[brcmutil]
[ 211.471324] brcmu_d11ac_encchspec [brcmutil] from
brcmf_run_escan+0x12c/0x370 [brcmfmac]
[ 211.471440] brcmf_run_escan [brcmfmac] from brcmf_do_escan+0x60/0xa8
[brcmfmac]
[ 211.471594] brcmf_do_escan [brcmfmac] from
brcmf_cfg80211_scan+0x10c/0x210 [brcmfmac]
[ 211.471749] brcmf_cfg80211_scan [brcmfmac] from
cfg80211_scan+0x14c/0x268 [cfg80211]
[ 211.472012] cfg80211_scan [cfg80211] from
nl80211_trigger_scan+0x304/0x630 [cfg80211]
[ 211.472321] nl80211_trigger_scan [cfg80211] from
genl_rcv_msg+0x240/0x358
[ 211.472490] genl_rcv_msg from netlink_rcv_skb+0xb4/0x10c
[ 211.472517] netlink_rcv_skb from genl_rcv+0x24/0x34
[ 211.472542] genl_rcv from netlink_unicast+0x1f4/0x2d0
[ 211.472567] netlink_unicast from netlink_sendmsg+0x1cc/0x454
[ 211.472591] netlink_sendmsg from ____sys_sendmsg+0xa0/0x26c
[ 211.472624] ____sys_sendmsg from ___sys_sendmsg+0x68/0x94
[ 211.472660] ___sys_sendmsg from sys_sendmsg+0x4c/0x88
[ 211.472697] sys_sendmsg from ret_fast_syscall+0x0/0x54
[ 211.472727] Exception stack(0xf111dfa8 to 0xf111dff0)
[ 211.472744] dfa0: 00247210 0026a638 00000004
bea179c8 00000000 00000000
[ 211.472762] dfc0: 00247210 0026a638 00247198 00000128 b6ef1000
00000000 00000001 00000004
[ 211.472776] dfe0: 0000006c bea17980 b6ed65bc b6a39970
[ 211.472787] ---[ end trace 0000000000000000 ]---
[ 271.474968] ------------[ cut here ]------------
[ 271.474991] WARNING: CPU: 3 PID: 466 at
drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c:97
brcmu_d11ac_encchspec+0x114/0x120 [brcmutil]
[ 271.475044] brcmu_d11ac_encchspec called chanspec 0xd090 = chnum 144
[ 271.475057] Modules linked in: aes_arm aes_generic cmac brcmfmac_wcc
crc32_arm_ce vc4 brcmfmac snd_soc_hdmi_codec brcmutil snd_soc_core
sha256_generic libsha256 sha256_arm ac97_bus hci_uart snd_pcm_dmaengine
cfg80211 snd_pcm btbcm snd_timer bluetooth snd soundcore ecdh_generic
drm_dma_helper ecc onboard_usb_hub libaes raspberrypi_hwmon
bcm2835_thermal microchip lan78xx
[ 271.475258] CPU: 3 PID: 466 Comm: wpa_supplicant Tainted: G
W 6.6.0-15494-g6bc986ab839c-dirty #139
[ 271.475276] Hardware name: BCM2835
[ 271.475292] unwind_backtrace from show_stack+0x10/0x14
[ 271.475327] show_stack from dump_stack_lvl+0x40/0x4c
[ 271.475357] dump_stack_lvl from __warn+0x7c/0x124
[ 271.475393] __warn from warn_slowpath_fmt+0x110/0x178
[ 271.475429] warn_slowpath_fmt from brcmu_d11ac_encchspec+0x114/0x120
[brcmutil]
[ 271.475473] brcmu_d11ac_encchspec [brcmutil] from
brcmf_run_escan+0x12c/0x370 [brcmfmac]
[ 271.475588] brcmf_run_escan [brcmfmac] from brcmf_do_escan+0x60/0xa8
[brcmfmac]
[ 271.475742] brcmf_do_escan [brcmfmac] from
brcmf_cfg80211_scan+0x10c/0x210 [brcmfmac]
[ 271.475895] brcmf_cfg80211_scan [brcmfmac] from
cfg80211_scan+0x14c/0x268 [cfg80211]
[ 271.476158] cfg80211_scan [cfg80211] from
nl80211_trigger_scan+0x304/0x630 [cfg80211]
[ 271.476461] nl80211_trigger_scan [cfg80211] from
genl_rcv_msg+0x240/0x358
[ 271.476630] genl_rcv_msg from netlink_rcv_skb+0xb4/0x10c
[ 271.476658] netlink_rcv_skb from genl_rcv+0x24/0x34
[ 271.476683] genl_rcv from netlink_unicast+0x1f4/0x2d0
[ 271.476708] netlink_unicast from netlink_sendmsg+0x1cc/0x454
[ 271.476733] netlink_sendmsg from ____sys_sendmsg+0xa0/0x26c
[ 271.476765] ____sys_sendmsg from ___sys_sendmsg+0x68/0x94
[ 271.476800] ___sys_sendmsg from sys_sendmsg+0x4c/0x88
[ 271.476837] sys_sendmsg from ret_fast_syscall+0x0/0x54
[ 271.476866] Exception stack(0xf111dfa8 to 0xf111dff0)
[ 271.476884] dfa0: 00247210 0026b968 00000004
bea179c8 00000000 00000000
[ 271.476901] dfc0: 00247210 0026b968 00247198 00000128 b6ef1000
00000000 00000001 00000004
[ 271.476914] dfe0: 0000006c bea17980 b6ed65bc b6a39970
[ 271.476926] ---[ end trace 0000000000000000 ]---
[ 331.477561] ------------[ cut here ]------------
[ 331.477586] WARNING: CPU: 0 PID: 466 at
drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c:97
brcmu_d11ac_encchspec+0x114/0x120 [brcmutil]
[ 331.477640] brcmu_d11ac_encchspec called chanspec 0xd090 = chnum 144
[ 331.477658] Modules linked in: aes_arm aes_generic cmac brcmfmac_wcc
crc32_arm_ce vc4 brcmfmac snd_soc_hdmi_codec brcmutil snd_soc_core
sha256_generic libsha256 sha256_arm ac97_bus hci_uart snd_pcm_dmaengine
cfg80211 snd_pcm btbcm snd_timer bluetooth snd soundcore ecdh_generic
drm_dma_helper ecc onboard_usb_hub libaes raspberrypi_hwmon
bcm2835_thermal microchip lan78xx
[ 331.477866] CPU: 0 PID: 466 Comm: wpa_supplicant Tainted: G
W 6.6.0-15494-g6bc986ab839c-dirty #139
[ 331.477883] Hardware name: BCM2835
[ 331.477898] unwind_backtrace from show_stack+0x10/0x14
[ 331.477935] show_stack from dump_stack_lvl+0x40/0x4c
[ 331.477964] dump_stack_lvl from __warn+0x7c/0x124
[ 331.477999] __warn from warn_slowpath_fmt+0x110/0x178
[ 331.478035] warn_slowpath_fmt from brcmu_d11ac_encchspec+0x114/0x120
[brcmutil]
[ 331.478080] brcmu_d11ac_encchspec [brcmutil] from
brcmf_run_escan+0x12c/0x370 [brcmfmac]
[ 331.478191] brcmf_run_escan [brcmfmac] from brcmf_do_escan+0x60/0xa8
[brcmfmac]
[ 331.478347] brcmf_do_escan [brcmfmac] from
brcmf_cfg80211_scan+0x10c/0x210 [brcmfmac]
[ 331.478501] brcmf_cfg80211_scan [brcmfmac] from
cfg80211_scan+0x14c/0x268 [cfg80211]
[ 331.478755] cfg80211_scan [cfg80211] from
nl80211_trigger_scan+0x304/0x630 [cfg80211]
[ 331.479058] nl80211_trigger_scan [cfg80211] from
genl_rcv_msg+0x240/0x358
[ 331.479228] genl_rcv_msg from netlink_rcv_skb+0xb4/0x10c
[ 331.479256] netlink_rcv_skb from genl_rcv+0x24/0x34
[ 331.479280] genl_rcv from netlink_unicast+0x1f4/0x2d0
[ 331.479305] netlink_unicast from netlink_sendmsg+0x1cc/0x454
[ 331.479330] netlink_sendmsg from ____sys_sendmsg+0xa0/0x26c
[ 331.479363] ____sys_sendmsg from ___sys_sendmsg+0x68/0x94
[ 331.479398] ___sys_sendmsg from sys_sendmsg+0x4c/0x88
[ 331.479435] sys_sendmsg from ret_fast_syscall+0x0/0x54
[ 331.479464] Exception stack(0xf111dfa8 to 0xf111dff0)
[ 331.479481] dfa0: 00247210 002763b8 00000004
bea179c8 00000000 00000000
[ 331.479498] dfc0: 00247210 002763b8 00247198 00000128 b6ef1000
00000000 00000001 00000004
[ 331.479512] dfe0: 0000006c bea17980 b6ed65bc b6a39970
[ 331.479548] ---[ end trace 0000000000000000 ]---
[ 391.479034] ------------[ cut here ]------------
[ 391.479056] WARNING: CPU: 0 PID: 466 at
drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c:97
brcmu_d11ac_encchspec+0x114/0x120 [brcmutil]
[ 391.479102] brcmu_d11ac_encchspec called chanspec 0xd090 = chnum 144
[ 391.479113] Modules linked in: aes_arm aes_generic cmac brcmfmac_wcc
crc32_arm_ce vc4 brcmfmac snd_soc_hdmi_codec brcmutil snd_soc_core
sha256_generic libsha256 sha256_arm ac97_bus hci_uart snd_pcm_dmaengine
cfg80211 snd_pcm btbcm snd_timer bluetooth snd soundcore ecdh_generic
drm_dma_helper ecc onboard_usb_hub libaes raspberrypi_hwmon
bcm2835_thermal microchip lan78xx
[ 391.479301] CPU: 0 PID: 466 Comm: wpa_supplicant Tainted: G
W 6.6.0-15494-g6bc986ab839c-dirty #139
[ 391.479316] Hardware name: BCM2835
[ 391.479331] unwind_backtrace from show_stack+0x10/0x14
[ 391.479362] show_stack from dump_stack_lvl+0x40/0x4c
[ 391.479389] dump_stack_lvl from __warn+0x7c/0x124
[ 391.479419] __warn from warn_slowpath_fmt+0x110/0x178
[ 391.479450] warn_slowpath_fmt from brcmu_d11ac_encchspec+0x114/0x120
[brcmutil]
[ 391.479489] brcmu_d11ac_encchspec [brcmutil] from
brcmf_run_escan+0x12c/0x370 [brcmfmac]
[ 391.479586] brcmf_run_escan [brcmfmac] from brcmf_do_escan+0x60/0xa8
[brcmfmac]
[ 391.479718] brcmf_do_escan [brcmfmac] from
brcmf_cfg80211_scan+0x10c/0x210 [brcmfmac]
[ 391.479850] brcmf_cfg80211_scan [brcmfmac] from
cfg80211_scan+0x14c/0x268 [cfg80211]
[ 391.480070] cfg80211_scan [cfg80211] from
nl80211_trigger_scan+0x304/0x630 [cfg80211]
[ 391.480332] nl80211_trigger_scan [cfg80211] from
genl_rcv_msg+0x240/0x358
[ 391.480478] genl_rcv_msg from netlink_rcv_skb+0xb4/0x10c
[ 391.480501] netlink_rcv_skb from genl_rcv+0x24/0x34
[ 391.480523] genl_rcv from netlink_unicast+0x1f4/0x2d0
[ 391.480545] netlink_unicast from netlink_sendmsg+0x1cc/0x454
[ 391.480566] netlink_sendmsg from ____sys_sendmsg+0xa0/0x26c
[ 391.480593] ____sys_sendmsg from ___sys_sendmsg+0x68/0x94
[ 391.480623] ___sys_sendmsg from sys_sendmsg+0x4c/0x88
[ 391.480655] sys_sendmsg from ret_fast_syscall+0x0/0x54
[ 391.480681] Exception stack(0xf111dfa8 to 0xf111dff0)
[ 391.480696] dfa0: 00247210 00247628 00000004
bea179c8 00000000 00000000
[ 391.480711] dfc0: 00247210 00247628 00247198 00000128 b6ef1000
00000000 00000001 00000004
[ 391.480723] dfe0: 0000006c bea17980 b6ed65bc b6a39970
[ 391.480755] ---[ end trace 0000000000000000 ]---
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2023-11-13 21:02 ` Stefan Wahren
2023-11-14 20:09 ` Stefan Wahren
@ 2023-11-15 9:34 ` Arend van Spriel
2023-11-15 18:35 ` Stefan Wahren
1 sibling, 1 reply; 41+ messages in thread
From: Arend van Spriel @ 2023-11-15 9:34 UTC (permalink / raw)
To: Stefan Wahren, Arend van Spriel, Franky Lin, Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
[-- Attachment #1: Type: text/plain, Size: 1853 bytes --]
On 11/13/2023 10:02 PM, Stefan Wahren wrote:
> Hi Arend,
>
> Am 13.11.23 um 10:11 schrieb Arend van Spriel:
>> On 11/11/2023 9:30 PM, Stefan Wahren wrote:
>>> Am 11.11.23 um 19:29 schrieb Stefan Wahren:
>>>>
>>>> Am 11.11.23 um 18:25 schrieb Arend Van Spriel:
>>>>> On November 11, 2023 5:48:46 PM Stefan Wahren <wahrenst@gmx.net>
>>>>> wrote:
>>>>>
>>>>>
>>>>> Again look like these are disabled channels. At least chanspec 0xd022
>>>>> is 5G channel 34. You say you get this only once so not every 60
>>>>> seconds?
>>>> I get this everytime i trigger a reconnect to the wifi network, so not
>>>> periodically (checked that). Strangely the initial automatic connect
>>>> doesn't trigger this errors.
>>> I additionally placed a WARN_ON_ONCE after the error log and enabled the
>>> firmware error log of brcmf_fil_cmd_data(). Maybe this helps.
>>
>> It does a bit. At least it shows this is happening with the
>> dump_survey (again). I don't really understand why though. It implies
>> the channel is not disabled, but unclear why. The channel flags are
>> changed in brcmf_construct_chaninfo() so we probably should focus
>> debug on that function.
>>
>
> i placed a pr_err at the start of brcmf_construct_chaninfo and another
> pr_err into the for loop before the "if (channel->orig_flags &
> IEEE80211_CHAN_DISABLED) continue".
>
> pr_err("%s: Ch num %d, chanspec 0x%x, orig_flags: %x.\n", __func__,
> ch.control_ch_num, ch.chspec, channel->orig_flags);
>
> It seems that brcmf_construct_chaninfo is called two times, but the
> results are different. I could find 0xd090 in the first run, but not in
> second. The other chanspecs doesn't seem to occur in both runs. No idea
> what's going on here.
Can you print all wiphy band channels before exiting
brcmf_construct_chaninfo() and print both channel->orig_flags and
channel->flags?
Gr. AvS
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4219 bytes --]
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2023-11-15 9:34 ` Arend van Spriel
@ 2023-11-15 18:35 ` Stefan Wahren
2023-11-15 20:09 ` Arend van Spriel
0 siblings, 1 reply; 41+ messages in thread
From: Stefan Wahren @ 2023-11-15 18:35 UTC (permalink / raw)
To: Arend van Spriel, Arend van Spriel, Franky Lin, Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
Am 15.11.23 um 10:34 schrieb Arend van Spriel:
> On 11/13/2023 10:02 PM, Stefan Wahren wrote:
>> Hi Arend,
>>
>> Am 13.11.23 um 10:11 schrieb Arend van Spriel:
>>> On 11/11/2023 9:30 PM, Stefan Wahren wrote:
>>>> Am 11.11.23 um 19:29 schrieb Stefan Wahren:
>>>>>
>>>>> Am 11.11.23 um 18:25 schrieb Arend Van Spriel:
>>>>>> On November 11, 2023 5:48:46 PM Stefan Wahren <wahrenst@gmx.net>
>>>>>> wrote:
>>>>>>
>>>>>>
>>>>>> Again look like these are disabled channels. At least chanspec
>>>>>> 0xd022
>>>>>> is 5G channel 34. You say you get this only once so not every 60
>>>>>> seconds?
>>>>> I get this everytime i trigger a reconnect to the wifi network, so
>>>>> not
>>>>> periodically (checked that). Strangely the initial automatic connect
>>>>> doesn't trigger this errors.
>>>> I additionally placed a WARN_ON_ONCE after the error log and
>>>> enabled the
>>>> firmware error log of brcmf_fil_cmd_data(). Maybe this helps.
>>>
>>> It does a bit. At least it shows this is happening with the
>>> dump_survey (again). I don't really understand why though. It implies
>>> the channel is not disabled, but unclear why. The channel flags are
>>> changed in brcmf_construct_chaninfo() so we probably should focus
>>> debug on that function.
>>>
>>
>> i placed a pr_err at the start of brcmf_construct_chaninfo and another
>> pr_err into the for loop before the "if (channel->orig_flags &
>> IEEE80211_CHAN_DISABLED) continue".
>>
>> pr_err("%s: Ch num %d, chanspec 0x%x, orig_flags: %x.\n", __func__,
>> ch.control_ch_num, ch.chspec, channel->orig_flags);
>>
>> It seems that brcmf_construct_chaninfo is called two times, but the
>> results are different. I could find 0xd090 in the first run, but not in
>> second. The other chanspecs doesn't seem to occur in both runs. No idea
>> what's going on here.
>
> Can you print all wiphy band channels before exiting
> brcmf_construct_chaninfo() and print both channel->orig_flags and
> channel->flags?
Sure. It seems that in the first call of brcmf_construct_chaninfo the
channel 144 is not disabled, but in the second.
[ 8.746495] brcmfmac: brcmf_construct_chaninfo called
[ 8.785752] brcmfmac: 2 GHz: 0: hw_value 1: orig_flags: 00080180,
flags 000001b0
[ 8.785777] brcmfmac: 2 GHz: 1: hw_value 2: orig_flags: 00080180,
flags 000001b0
[ 8.785783] brcmfmac: 2 GHz: 2: hw_value 3: orig_flags: 00080180,
flags 000001b0
[ 8.785789] brcmfmac: 2 GHz: 3: hw_value 4: orig_flags: 00080180,
flags 000001b0
[ 8.785794] brcmfmac: 2 GHz: 4: hw_value 5: orig_flags: 00080180,
flags 000001b0
[ 8.785800] brcmfmac: 2 GHz: 5: hw_value 6: orig_flags: 00080180,
flags 000001b0
[ 8.785806] brcmfmac: 2 GHz: 6: hw_value 7: orig_flags: 00080180,
flags 000001b0
[ 8.785811] brcmfmac: 2 GHz: 7: hw_value 8: orig_flags: 00080180,
flags 000001b0
[ 8.785817] brcmfmac: 2 GHz: 8: hw_value 9: orig_flags: 00080180,
flags 000001b0
[ 8.785823] brcmfmac: 2 GHz: 9: hw_value 10: orig_flags: 00080180,
flags 000001b0
[ 8.785828] brcmfmac: 2 GHz: 10: hw_value 11: orig_flags: 00080180,
flags 000001b0
[ 8.785834] brcmfmac: 2 GHz: 11: hw_value 12: orig_flags: 00080180,
flags 00000001
[ 8.785839] brcmfmac: 2 GHz: 12: hw_value 13: orig_flags: 00080180,
flags 00000001
[ 8.785845] brcmfmac: 2 GHz: 13: hw_value 14: orig_flags: 000801b0,
flags 00000001
[ 8.785850] brcmfmac: 5 GHz: 0: hw_value 34: orig_flags: 00080000,
flags 00000001
[ 8.785856] brcmfmac: 5 GHz: 1: hw_value 36: orig_flags: 00080000,
flags 00000120
[ 8.785861] brcmfmac: 5 GHz: 2: hw_value 38: orig_flags: 00080000,
flags 00000001
[ 8.785867] brcmfmac: 5 GHz: 3: hw_value 40: orig_flags: 00080000,
flags 00000110
[ 8.785872] brcmfmac: 5 GHz: 4: hw_value 42: orig_flags: 00080000,
flags 00000001
[ 8.785877] brcmfmac: 5 GHz: 5: hw_value 44: orig_flags: 00080000,
flags 00000120
[ 8.785882] brcmfmac: 5 GHz: 6: hw_value 46: orig_flags: 00080000,
flags 00000001
[ 8.785888] brcmfmac: 5 GHz: 7: hw_value 48: orig_flags: 00080000,
flags 00000110
[ 8.785893] brcmfmac: 5 GHz: 8: hw_value 52: orig_flags: 00080000,
flags 0000012a
[ 8.785899] brcmfmac: 5 GHz: 9: hw_value 56: orig_flags: 00080000,
flags 0000011a
[ 8.785904] brcmfmac: 5 GHz: 10: hw_value 60: orig_flags: 00080000,
flags 0000012a
[ 8.785909] brcmfmac: 5 GHz: 11: hw_value 64: orig_flags: 00080000,
flags 0000011a
[ 8.785914] brcmfmac: 5 GHz: 12: hw_value 100: orig_flags: 00080000,
flags 0000012a
[ 8.785920] brcmfmac: 5 GHz: 13: hw_value 104: orig_flags: 00080000,
flags 0000011a
[ 8.785926] brcmfmac: 5 GHz: 14: hw_value 108: orig_flags: 00080000,
flags 0000012a
[ 8.785931] brcmfmac: 5 GHz: 15: hw_value 112: orig_flags: 00080000,
flags 0000011a
[ 8.785937] brcmfmac: 5 GHz: 16: hw_value 116: orig_flags: 00080000,
flags 0000012a
[ 8.785942] brcmfmac: 5 GHz: 17: hw_value 120: orig_flags: 00080000,
flags 0000011a
[ 8.785947] brcmfmac: 5 GHz: 18: hw_value 124: orig_flags: 00080000,
flags 0000012a
[ 8.785953] brcmfmac: 5 GHz: 19: hw_value 128: orig_flags: 00080000,
flags 0000011a
[ 8.785958] brcmfmac: 5 GHz: 20: hw_value 132: orig_flags: 00080000,
flags 0000012a
[ 8.785963] brcmfmac: 5 GHz: 21: hw_value 136: orig_flags: 00080000,
flags 0000011a
[ 8.785968] brcmfmac: 5 GHz: 22: hw_value 140: orig_flags: 00080000,
flags 0000012a
[ 8.785974] brcmfmac: 5 GHz: 23: hw_value 144: orig_flags: 00080000,
flags 0000011a
[ 8.785980] brcmfmac: 5 GHz: 24: hw_value 149: orig_flags: 00080000,
flags 00000120
[ 8.785985] brcmfmac: 5 GHz: 25: hw_value 153: orig_flags: 00080000,
flags 00000110
[ 8.785991] brcmfmac: 5 GHz: 26: hw_value 157: orig_flags: 00080000,
flags 00000120
[ 8.785996] brcmfmac: 5 GHz: 27: hw_value 161: orig_flags: 00080000,
flags 00000110
[ 8.786001] brcmfmac: 5 GHz: 28: hw_value 165: orig_flags: 00080000,
flags 000001b0
[ 8.788704] hub 1-1:1.0: USB hub found
[ 8.788821] hub 1-1:1.0: 4 ports detected
[ 8.791957] onboard-usb-hub 3f980000.usb:usb-port@1: supply vdd not
found, using dummy regulator
[ 8.793702] hub 1-1:1.0: USB hub found
[ 8.793771] hub 1-1:1.0: 4 ports detected
[ 8.802200] onboard-usb-hub 3f980000.usb:usb-port@1:usb-port@1:
supply vdd not found, using dummy regulator
[ 9.118321] usb 1-1.1: new high-speed USB device number 7 using dwc2
[ 9.259037] hub 1-1.1:1.0: USB hub found
[ 9.259172] hub 1-1.1:1.0: 3 ports detected
[ 9.358264] usb 1-1.3: new low-speed USB device number 8 using dwc2
[ 9.448978] Bluetooth: hci0: BCM: features 0x2f
[ 9.450779] Bluetooth: hci0: BCM43455 37.4MHz Raspberry Pi 3+
[ 9.450787] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0342
[ 9.516274] input: HID 046a:0011 as
/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:046A:0011.0003/input/input2
[ 9.581849] hid-generic 0003:046A:0011.0003: input: USB HID v1.11
Keyboard [HID 046a:0011] on usb-3f980000.usb-1.3/input0
[ 9.588292] usb 1-1.1.2: new low-speed USB device number 9 using dwc2
[ 9.726779] input: PixArt Microsoft USB Optical Mouse as
/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/0003:045E:00CB.0004/input/input3
[ 9.727131] hid-generic 0003:045E:00CB.0004: input: USB HID v1.11
Mouse [PixArt Microsoft USB Optical Mouse] on usb-3f980000.usb-1.1.2/input0
[ 10.038321] usb 1-1.1.1: new high-speed USB device number 10 using dwc2
[ 10.445710] lan78xx 1-1.1.1:1.0 (unnamed net_device) (uninitialized):
No External EEPROM. Setting MAC Speed
[ 12.311539] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-23)
[ 12.453863] brcmfmac: brcmf_construct_chaninfo called
[ 12.490762] brcmfmac: 2 GHz: 0: hw_value 1: orig_flags: 00080180,
flags 000001a0
[ 12.490789] brcmfmac: 2 GHz: 1: hw_value 2: orig_flags: 00080180,
flags 000001a0
[ 12.490796] brcmfmac: 2 GHz: 2: hw_value 3: orig_flags: 00080180,
flags 000001a0
[ 12.490803] brcmfmac: 2 GHz: 3: hw_value 4: orig_flags: 00080180,
flags 000001a0
[ 12.490810] brcmfmac: 2 GHz: 4: hw_value 5: orig_flags: 00080180,
flags 00000180
[ 12.490817] brcmfmac: 2 GHz: 5: hw_value 6: orig_flags: 00080180,
flags 00000180
[ 12.490823] brcmfmac: 2 GHz: 6: hw_value 7: orig_flags: 00080180,
flags 00000180
[ 12.490830] brcmfmac: 2 GHz: 7: hw_value 8: orig_flags: 00080180,
flags 00000180
[ 12.490837] brcmfmac: 2 GHz: 8: hw_value 9: orig_flags: 00080180,
flags 00000180
[ 12.490843] brcmfmac: 2 GHz: 9: hw_value 10: orig_flags: 00080180,
flags 00000190
[ 12.490850] brcmfmac: 2 GHz: 10: hw_value 11: orig_flags: 00080180,
flags 00000190
[ 12.490857] brcmfmac: 2 GHz: 11: hw_value 12: orig_flags: 00080180,
flags 00000190
[ 12.490864] brcmfmac: 2 GHz: 12: hw_value 13: orig_flags: 00080180,
flags 00000190
[ 12.490870] brcmfmac: 2 GHz: 13: hw_value 14: orig_flags: 000801b0,
flags 00000001
[ 12.490877] brcmfmac: 5 GHz: 0: hw_value 34: orig_flags: 00080000,
flags 00000001
[ 12.490884] brcmfmac: 5 GHz: 1: hw_value 36: orig_flags: 00080000,
flags 00000120
[ 12.490891] brcmfmac: 5 GHz: 2: hw_value 38: orig_flags: 00080000,
flags 00000001
[ 12.490897] brcmfmac: 5 GHz: 3: hw_value 40: orig_flags: 00080000,
flags 00000110
[ 12.490904] brcmfmac: 5 GHz: 4: hw_value 42: orig_flags: 00080000,
flags 00000001
[ 12.490910] brcmfmac: 5 GHz: 5: hw_value 44: orig_flags: 00080000,
flags 00000120
[ 12.490918] brcmfmac: 5 GHz: 6: hw_value 46: orig_flags: 00080000,
flags 00000001
[ 12.490924] brcmfmac: 5 GHz: 7: hw_value 48: orig_flags: 00080000,
flags 00000110
[ 12.490931] brcmfmac: 5 GHz: 8: hw_value 52: orig_flags: 00080000,
flags 0000012a
[ 12.490937] brcmfmac: 5 GHz: 9: hw_value 56: orig_flags: 00080000,
flags 0000011a
[ 12.490944] brcmfmac: 5 GHz: 10: hw_value 60: orig_flags: 00080000,
flags 0000012a
[ 12.490951] brcmfmac: 5 GHz: 11: hw_value 64: orig_flags: 00080000,
flags 0000011a
[ 12.490957] brcmfmac: 5 GHz: 12: hw_value 100: orig_flags: 00080000,
flags 0000012a
[ 12.490964] brcmfmac: 5 GHz: 13: hw_value 104: orig_flags: 00080000,
flags 0000011a
[ 12.490971] brcmfmac: 5 GHz: 14: hw_value 108: orig_flags: 00080000,
flags 0000012a
[ 12.490978] brcmfmac: 5 GHz: 15: hw_value 112: orig_flags: 00080000,
flags 0000011a
[ 12.490984] brcmfmac: 5 GHz: 16: hw_value 116: orig_flags: 00080000,
flags 0000012a
[ 12.490991] brcmfmac: 5 GHz: 17: hw_value 120: orig_flags: 00080000,
flags 0000011a
[ 12.490997] brcmfmac: 5 GHz: 18: hw_value 124: orig_flags: 00080000,
flags 0000012a
[ 12.491004] brcmfmac: 5 GHz: 19: hw_value 128: orig_flags: 00080000,
flags 0000011a
[ 12.491011] brcmfmac: 5 GHz: 20: hw_value 132: orig_flags: 00080000,
flags 000001aa
[ 12.491017] brcmfmac: 5 GHz: 21: hw_value 136: orig_flags: 00080000,
flags 0000019a
[ 12.491024] brcmfmac: 5 GHz: 22: hw_value 140: orig_flags: 00080000,
flags 000001ba
[ 12.491031] brcmfmac: 5 GHz: 23: hw_value 144: orig_flags: 00080000,
flags 00000001
[ 12.491038] brcmfmac: 5 GHz: 24: hw_value 149: orig_flags: 00080000,
flags 00000001
[ 12.491044] brcmfmac: 5 GHz: 25: hw_value 153: orig_flags: 00080000,
flags 00000001
[ 12.491051] brcmfmac: 5 GHz: 26: hw_value 157: orig_flags: 00080000,
flags 00000001
[ 12.491057] brcmfmac: 5 GHz: 27: hw_value 161: orig_flags: 00080000,
flags 00000001
[ 12.491064] brcmfmac: 5 GHz: 28: hw_value 165: orig_flags: 00080000,
flags 00000001
>
>
> Gr. AvS
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2023-11-15 18:35 ` Stefan Wahren
@ 2023-11-15 20:09 ` Arend van Spriel
2023-11-18 11:43 ` Stefan Wahren
0 siblings, 1 reply; 41+ messages in thread
From: Arend van Spriel @ 2023-11-15 20:09 UTC (permalink / raw)
To: Stefan Wahren, Arend van Spriel, Franky Lin, Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
[-- Attachment #1: Type: text/plain, Size: 2784 bytes --]
On 11/15/2023 7:35 PM, Stefan Wahren wrote:
> Am 15.11.23 um 10:34 schrieb Arend van Spriel:
>> On 11/13/2023 10:02 PM, Stefan Wahren wrote:
>>> Hi Arend,
>>>
>>> Am 13.11.23 um 10:11 schrieb Arend van Spriel:
>>>> On 11/11/2023 9:30 PM, Stefan Wahren wrote:
>>>>> Am 11.11.23 um 19:29 schrieb Stefan Wahren:
>>>>>>
>>>>>> Am 11.11.23 um 18:25 schrieb Arend Van Spriel:
>>>>>>> On November 11, 2023 5:48:46 PM Stefan Wahren <wahrenst@gmx.net>
>>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>> Again look like these are disabled channels. At least chanspec
>>>>>>> 0xd022
>>>>>>> is 5G channel 34. You say you get this only once so not every 60
>>>>>>> seconds?
>>>>>> I get this everytime i trigger a reconnect to the wifi network, so
>>>>>> not
>>>>>> periodically (checked that). Strangely the initial automatic connect
>>>>>> doesn't trigger this errors.
>>>>> I additionally placed a WARN_ON_ONCE after the error log and
>>>>> enabled the
>>>>> firmware error log of brcmf_fil_cmd_data(). Maybe this helps.
>>>>
>>>> It does a bit. At least it shows this is happening with the
>>>> dump_survey (again). I don't really understand why though. It implies
>>>> the channel is not disabled, but unclear why. The channel flags are
>>>> changed in brcmf_construct_chaninfo() so we probably should focus
>>>> debug on that function.
>>>>
>>>
>>> i placed a pr_err at the start of brcmf_construct_chaninfo and another
>>> pr_err into the for loop before the "if (channel->orig_flags &
>>> IEEE80211_CHAN_DISABLED) continue".
>>>
>>> pr_err("%s: Ch num %d, chanspec 0x%x, orig_flags: %x.\n", __func__,
>>> ch.control_ch_num, ch.chspec, channel->orig_flags);
>>>
>>> It seems that brcmf_construct_chaninfo is called two times, but the
>>> results are different. I could find 0xd090 in the first run, but not in
>>> second. The other chanspecs doesn't seem to occur in both runs. No idea
>>> what's going on here.
>>
>> Can you print all wiphy band channels before exiting
>> brcmf_construct_chaninfo() and print both channel->orig_flags and
>> channel->flags?
>
> Sure. It seems that in the first call of brcmf_construct_chaninfo the
> channel 144 is not disabled, but in the second.
I am a bit confused. So the chanspec as mentioned in this email subject
is no longer observed, but you still see failure in brcmf_set_channel()
for other chanspecs?
brcmf_construct_chaninfo() is called from brcmf_setup_wiphybands() and
that function is called in two places:
1) brcmf_cfg80211_attach(): right after wiphy_register()
2) brcmf_cfg80211_reg_notifier()
Can we figure out if brcmf_cfg80211_reg_notifier() is indeed invoked on
your platform and what country is being configured. If the country is
indeed changed than it can be expected that some channels are disabled
or enabled.
Regards,
Arend
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4219 bytes --]
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2023-11-15 20:09 ` Arend van Spriel
@ 2023-11-18 11:43 ` Stefan Wahren
2023-12-21 17:47 ` Arend Van Spriel
0 siblings, 1 reply; 41+ messages in thread
From: Stefan Wahren @ 2023-11-18 11:43 UTC (permalink / raw)
To: Arend van Spriel, Arend van Spriel, Franky Lin, Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
Hi Arend,
Am 15.11.23 um 21:09 schrieb Arend van Spriel:
> On 11/15/2023 7:35 PM, Stefan Wahren wrote:
>> Am 15.11.23 um 10:34 schrieb Arend van Spriel:
>>> On 11/13/2023 10:02 PM, Stefan Wahren wrote:
>>>> Hi Arend,
>>>>
>>>> Am 13.11.23 um 10:11 schrieb Arend van Spriel:
>>>>> On 11/11/2023 9:30 PM, Stefan Wahren wrote:
>>>>>> Am 11.11.23 um 19:29 schrieb Stefan Wahren:
>>>>>>>
>>>>>>> Am 11.11.23 um 18:25 schrieb Arend Van Spriel:
>>>>>>>> On November 11, 2023 5:48:46 PM Stefan Wahren <wahrenst@gmx.net>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> Again look like these are disabled channels. At least chanspec
>>>>>>>> 0xd022
>>>>>>>> is 5G channel 34. You say you get this only once so not every 60
>>>>>>>> seconds?
>>>>>>> I get this everytime i trigger a reconnect to the wifi network, so
>>>>>>> not
>>>>>>> periodically (checked that). Strangely the initial automatic
>>>>>>> connect
>>>>>>> doesn't trigger this errors.
>>>>>> I additionally placed a WARN_ON_ONCE after the error log and
>>>>>> enabled the
>>>>>> firmware error log of brcmf_fil_cmd_data(). Maybe this helps.
>>>>>
>>>>> It does a bit. At least it shows this is happening with the
>>>>> dump_survey (again). I don't really understand why though. It implies
>>>>> the channel is not disabled, but unclear why. The channel flags are
>>>>> changed in brcmf_construct_chaninfo() so we probably should focus
>>>>> debug on that function.
>>>>>
>>>>
>>>> i placed a pr_err at the start of brcmf_construct_chaninfo and another
>>>> pr_err into the for loop before the "if (channel->orig_flags &
>>>> IEEE80211_CHAN_DISABLED) continue".
>>>>
>>>> pr_err("%s: Ch num %d, chanspec 0x%x, orig_flags: %x.\n", __func__,
>>>> ch.control_ch_num, ch.chspec, channel->orig_flags);
>>>>
>>>> It seems that brcmf_construct_chaninfo is called two times, but the
>>>> results are different. I could find 0xd090 in the first run, but
>>>> not in
>>>> second. The other chanspecs doesn't seem to occur in both runs. No
>>>> idea
>>>> what's going on here.
>>>
>>> Can you print all wiphy band channels before exiting
>>> brcmf_construct_chaninfo() and print both channel->orig_flags and
>>> channel->flags?
>>
>> Sure. It seems that in the first call of brcmf_construct_chaninfo the
>> channel 144 is not disabled, but in the second.
>
> I am a bit confused. So the chanspec as mentioned in this email
> subject is no longer observed, but you still see failure in
> brcmf_set_channel() for other chanspecs?
before we dive deeper into this let me summarize my observations from
the beginning. From my understanding the errors are triggered for the 5
GHz channels 34, 38, 42, 46, 144 (chanspec: 0xd022, 0xd026, 0xd02a,
0xd090). So i would focus my observations on those.
As you said that the channel flags are set in brcmf_construct_chaninfo()
i dump them, here is the output of the first call:
[ 8.785850] brcmfmac: 5 GHz: 0: hw_value 34: orig_flags: 00080000,
flags 00000001
[ 8.785861] brcmfmac: 5 GHz: 2: hw_value 38: orig_flags: 00080000,
flags 00000001
[ 8.785872] brcmfmac: 5 GHz: 4: hw_value 42: orig_flags: 00080000,
flags 00000001
[ 8.785882] brcmfmac: 5 GHz: 6: hw_value 46: orig_flags: 00080000,
flags 00000001
[ 8.785974] brcmfmac: 5 GHz: 23: hw_value 144: orig_flags: 00080000,
flags 0000011a
All of them except 144 are disabled via flags. Btw wpa_supplicant is
configured to country DE within the configuration.
The second and last time brcmf_construct_chaninfo() is called is a few
seconds later during boot, we get the following:
[ 12.490877] brcmfmac: 5 GHz: 0: hw_value 34: orig_flags: 00080000,
flags 00000001
[ 12.490891] brcmfmac: 5 GHz: 2: hw_value 38: orig_flags: 00080000,
flags 00000001
[ 12.490904] brcmfmac: 5 GHz: 4: hw_value 42: orig_flags: 00080000,
flags 00000001
[ 12.490918] brcmfmac: 5 GHz: 6: hw_value 46: orig_flags: 00080000,
flags 00000001
[ 12.491031] brcmfmac: 5 GHz: 23: hw_value 144: orig_flags: 00080000,
flags 00000001
Now all of them are disabled via flags.
So after that i trigger the reconnect to the same 5 GHz network as
before. brcmf_construct_chaninfo is never called again, but at the time
brcmf_set_channel is called the flags for these channels are completely
different:
[ 90.010002] brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail,
reason -52
[ 90.010017] brcmfmac: hw_value 34, orig_flags: 00080000, flags 00080220
[ 90.120007] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 90.120038] brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail,
reason -52
[ 90.120053] brcmfmac: hw_value 38, orig_flags: 00080000, flags 00080200
[ 90.230029] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 90.230058] brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail,
reason -52
[ 90.230073] brcmfmac: hw_value 42, orig_flags: 00080000, flags 00080200
[ 90.340042] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 90.340071] brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail,
reason -52
[ 90.340086] brcmfmac: hw_value 46, orig_flags: 00080000, flags 00080210
[ 92.100073] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
[ 92.100110] brcmfmac: brcmf_set_channel: set chanspec 0xd090 fail,
reason -52
[ 92.100126] brcmfmac: hw_value 144, orig_flags: 00080000, flags 00080118
Where does these new flags come from? It's clear that these doesn't come
from brcmf_construct_chaninfo(). So what manipulates the flags
afterwards? Shouldn't brcmf_construct_chaninfo() called on reconnect?
Best regards
>
> brcmf_construct_chaninfo() is called from brcmf_setup_wiphybands() and
> that function is called in two places:
>
> 1) brcmf_cfg80211_attach(): right after wiphy_register()
> 2) brcmf_cfg80211_reg_notifier()
>
> Can we figure out if brcmf_cfg80211_reg_notifier() is indeed invoked
> on your platform and what country is being configured. If the country
> is indeed changed than it can be expected that some channels are
> disabled or enabled.
>
> Regards,
> Arend
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2023-11-18 11:43 ` Stefan Wahren
@ 2023-12-21 17:47 ` Arend Van Spriel
2023-12-21 17:50 ` Arend Van Spriel
2023-12-21 18:40 ` Stefan Wahren
0 siblings, 2 replies; 41+ messages in thread
From: Arend Van Spriel @ 2023-12-21 17:47 UTC (permalink / raw)
To: Stefan Wahren, Arend van Spriel, Franky Lin, Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
[-- Attachment #1: Type: text/plain, Size: 6574 bytes --]
On November 18, 2023 12:43:24 PM Stefan Wahren <wahrenst@gmx.net> wrote:
> Hi Arend,
>
> Am 15.11.23 um 21:09 schrieb Arend van Spriel:
>> On 11/15/2023 7:35 PM, Stefan Wahren wrote:
>>> Am 15.11.23 um 10:34 schrieb Arend van Spriel:
>>>> On 11/13/2023 10:02 PM, Stefan Wahren wrote:
>>>>> Hi Arend,
>>>>>
>>>>> Am 13.11.23 um 10:11 schrieb Arend van Spriel:
>>>>>> On 11/11/2023 9:30 PM, Stefan Wahren wrote:
>>>>>>> Am 11.11.23 um 19:29 schrieb Stefan Wahren:
>>>>>>>>
>>>>>>>> Am 11.11.23 um 18:25 schrieb Arend Van Spriel:
>>>>>>>>> On November 11, 2023 5:48:46 PM Stefan Wahren <wahrenst@gmx.net>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Again look like these are disabled channels. At least chanspec
>>>>>>>>> 0xd022
>>>>>>>>> is 5G channel 34. You say you get this only once so not every 60
>>>>>>>>> seconds?
>>>>>>>> I get this everytime i trigger a reconnect to the wifi network, so
>>>>>>>> not
>>>>>>>> periodically (checked that). Strangely the initial automatic
>>>>>>>> connect
>>>>>>>> doesn't trigger this errors.
>>>>>>> I additionally placed a WARN_ON_ONCE after the error log and
>>>>>>> enabled the
>>>>>>> firmware error log of brcmf_fil_cmd_data(). Maybe this helps.
>>>>>>
>>>>>> It does a bit. At least it shows this is happening with the
>>>>>> dump_survey (again). I don't really understand why though. It implies
>>>>>> the channel is not disabled, but unclear why. The channel flags are
>>>>>> changed in brcmf_construct_chaninfo() so we probably should focus
>>>>>> debug on that function.
>>>>>
>>>>> i placed a pr_err at the start of brcmf_construct_chaninfo and another
>>>>> pr_err into the for loop before the "if (channel->orig_flags &
>>>>> IEEE80211_CHAN_DISABLED) continue".
>>>>>
>>>>> pr_err("%s: Ch num %d, chanspec 0x%x, orig_flags: %x.\n", __func__,
>>>>> ch.control_ch_num, ch.chspec, channel->orig_flags);
>>>>>
>>>>> It seems that brcmf_construct_chaninfo is called two times, but the
>>>>> results are different. I could find 0xd090 in the first run, but
>>>>> not in
>>>>> second. The other chanspecs doesn't seem to occur in both runs. No
>>>>> idea
>>>>> what's going on here.
>>>>
>>>> Can you print all wiphy band channels before exiting
>>>> brcmf_construct_chaninfo() and print both channel->orig_flags and
>>>> channel->flags?
>>>
>>> Sure. It seems that in the first call of brcmf_construct_chaninfo the
>>> channel 144 is not disabled, but in the second.
>>
>> I am a bit confused. So the chanspec as mentioned in this email
>> subject is no longer observed, but you still see failure in
>> brcmf_set_channel() for other chanspecs?
>
> before we dive deeper into this let me summarize my observations from
> the beginning. From my understanding the errors are triggered for the 5
> GHz channels 34, 38, 42, 46, 144 (chanspec: 0xd022, 0xd026, 0xd02a,
> 0xd090). So i would focus my observations on those.
>
> As you said that the channel flags are set in brcmf_construct_chaninfo()
> i dump them, here is the output of the first call:
>
> [ 8.785850] brcmfmac: 5 GHz: 0: hw_value 34: orig_flags: 00080000,
> flags 00000001
> [ 8.785861] brcmfmac: 5 GHz: 2: hw_value 38: orig_flags: 00080000,
> flags 00000001
> [ 8.785872] brcmfmac: 5 GHz: 4: hw_value 42: orig_flags: 00080000,
> flags 00000001
> [ 8.785882] brcmfmac: 5 GHz: 6: hw_value 46: orig_flags: 00080000,
> flags 00000001
> [ 8.785974] brcmfmac: 5 GHz: 23: hw_value 144: orig_flags: 00080000,
> flags 0000011a
>
> All of them except 144 are disabled via flags. Btw wpa_supplicant is
> configured to country DE within the configuration.
>
> The second and last time brcmf_construct_chaninfo() is called is a few
> seconds later during boot, we get the following:
>
> [ 12.490877] brcmfmac: 5 GHz: 0: hw_value 34: orig_flags: 00080000,
> flags 00000001
> [ 12.490891] brcmfmac: 5 GHz: 2: hw_value 38: orig_flags: 00080000,
> flags 00000001
> [ 12.490904] brcmfmac: 5 GHz: 4: hw_value 42: orig_flags: 00080000,
> flags 00000001
> [ 12.490918] brcmfmac: 5 GHz: 6: hw_value 46: orig_flags: 00080000,
> flags 00000001
> [ 12.491031] brcmfmac: 5 GHz: 23: hw_value 144: orig_flags: 00080000,
> flags 00000001
>
> Now all of them are disabled via flags.
>
> So after that i trigger the reconnect to the same 5 GHz network as
> before. brcmf_construct_chaninfo is never called again, but at the time
> brcmf_set_channel is called the flags for these channels are completely
> different:
>
> [ 90.010002] brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail,
> reason -52
> [ 90.010017] brcmfmac: hw_value 34, orig_flags: 00080000, flags 00080220
> [ 90.120007] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
> [ 90.120038] brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail,
> reason -52
> [ 90.120053] brcmfmac: hw_value 38, orig_flags: 00080000, flags 00080200
> [ 90.230029] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
> [ 90.230058] brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail,
> reason -52
> [ 90.230073] brcmfmac: hw_value 42, orig_flags: 00080000, flags 00080200
> [ 90.340042] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
> [ 90.340071] brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail,
> reason -52
> [ 90.340086] brcmfmac: hw_value 46, orig_flags: 00080000, flags 00080210
> [ 92.100073] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
> [ 92.100110] brcmfmac: brcmf_set_channel: set chanspec 0xd090 fail,
> reason -52
> [ 92.100126] brcmfmac: hw_value 144, orig_flags: 00080000, flags 00080118
>
> Where does these new flags come from? It's clear that these doesn't come
> from brcmf_construct_chaninfo(). So what manipulates the flags
> afterwards? Shouldn't brcmf_construct_chaninfo() called on reconnect?
I suspect it is not the driver, but net/wireless/reg.c. Could you define
DEBUG in top of that file and build cfg80211.ko with that. Or if you have
CONFIG_DYNAMIC_DEBUG enable debug prints for reg.c through sysfs [1]
Regards,
Arend
[1] https://www.kernel.org/doc/html/v4.14/admin-guide/dynamic-debug-howto.html
>
> Best regards
>
>>
>> brcmf_construct_chaninfo() is called from brcmf_setup_wiphybands() and
>> that function is called in two places:
>>
>> 1) brcmf_cfg80211_attach(): right after wiphy_register()
>> 2) brcmf_cfg80211_reg_notifier()
>>
>> Can we figure out if brcmf_cfg80211_reg_notifier() is indeed invoked
>> on your platform and what country is being configured. If the country
>> is indeed changed than it can be expected that some channels are
>> disabled or enabled.
>>
>> Regards,
>> Arend
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4219 bytes --]
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2023-12-21 17:47 ` Arend Van Spriel
@ 2023-12-21 17:50 ` Arend Van Spriel
2023-12-21 18:40 ` Stefan Wahren
1 sibling, 0 replies; 41+ messages in thread
From: Arend Van Spriel @ 2023-12-21 17:50 UTC (permalink / raw)
To: Stefan Wahren, Arend van Spriel, Franky Lin, Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
[-- Attachment #1: Type: text/plain, Size: 6858 bytes --]
On December 21, 2023 6:47:53 PM Arend Van Spriel
<arend.vanspriel@broadcom.com> wrote:
> On November 18, 2023 12:43:24 PM Stefan Wahren <wahrenst@gmx.net> wrote:
>
>> Hi Arend,
>>
>> Am 15.11.23 um 21:09 schrieb Arend van Spriel:
>>> On 11/15/2023 7:35 PM, Stefan Wahren wrote:
>>>> Am 15.11.23 um 10:34 schrieb Arend van Spriel:
>>>>> On 11/13/2023 10:02 PM, Stefan Wahren wrote:
>>>>>> Hi Arend,
>>>>>>
>>>>>> Am 13.11.23 um 10:11 schrieb Arend van Spriel:
>>>>>>> On 11/11/2023 9:30 PM, Stefan Wahren wrote:
>>>>>>>> Am 11.11.23 um 19:29 schrieb Stefan Wahren:
>>>>>>>>>
>>>>>>>>> Am 11.11.23 um 18:25 schrieb Arend Van Spriel:
>>>>>>>>>> On November 11, 2023 5:48:46 PM Stefan Wahren <wahrenst@gmx.net>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Again look like these are disabled channels. At least chanspec
>>>>>>>>>> 0xd022
>>>>>>>>>> is 5G channel 34. You say you get this only once so not every 60
>>>>>>>>>> seconds?
>>>>>>>>> I get this everytime i trigger a reconnect to the wifi network, so
>>>>>>>>> not
>>>>>>>>> periodically (checked that). Strangely the initial automatic
>>>>>>>>> connect
>>>>>>>>> doesn't trigger this errors.
>>>>>>>> I additionally placed a WARN_ON_ONCE after the error log and
>>>>>>>> enabled the
>>>>>>>> firmware error log of brcmf_fil_cmd_data(). Maybe this helps.
>>>>>>>
>>>>>>> It does a bit. At least it shows this is happening with the
>>>>>>> dump_survey (again). I don't really understand why though. It implies
>>>>>>> the channel is not disabled, but unclear why. The channel flags are
>>>>>>> changed in brcmf_construct_chaninfo() so we probably should focus
>>>>>>> debug on that function.
>>>>>>
>>>>>> i placed a pr_err at the start of brcmf_construct_chaninfo and another
>>>>>> pr_err into the for loop before the "if (channel->orig_flags &
>>>>>> IEEE80211_CHAN_DISABLED) continue".
>>>>>>
>>>>>> pr_err("%s: Ch num %d, chanspec 0x%x, orig_flags: %x.\n", __func__,
>>>>>> ch.control_ch_num, ch.chspec, channel->orig_flags);
>>>>>>
>>>>>> It seems that brcmf_construct_chaninfo is called two times, but the
>>>>>> results are different. I could find 0xd090 in the first run, but
>>>>>> not in
>>>>>> second. The other chanspecs doesn't seem to occur in both runs. No
>>>>>> idea
>>>>>> what's going on here.
>>>>>
>>>>> Can you print all wiphy band channels before exiting
>>>>> brcmf_construct_chaninfo() and print both channel->orig_flags and
>>>>> channel->flags?
>>>>
>>>> Sure. It seems that in the first call of brcmf_construct_chaninfo the
>>>> channel 144 is not disabled, but in the second.
>>>
>>> I am a bit confused. So the chanspec as mentioned in this email
>>> subject is no longer observed, but you still see failure in
>>> brcmf_set_channel() for other chanspecs?
>>
>> before we dive deeper into this let me summarize my observations from
>> the beginning. From my understanding the errors are triggered for the 5
>> GHz channels 34, 38, 42, 46, 144 (chanspec: 0xd022, 0xd026, 0xd02a,
>> 0xd090). So i would focus my observations on those.
>>
>> As you said that the channel flags are set in brcmf_construct_chaninfo()
>> i dump them, here is the output of the first call:
>>
>> [ 8.785850] brcmfmac: 5 GHz: 0: hw_value 34: orig_flags: 00080000,
>> flags 00000001
>> [ 8.785861] brcmfmac: 5 GHz: 2: hw_value 38: orig_flags: 00080000,
>> flags 00000001
>> [ 8.785872] brcmfmac: 5 GHz: 4: hw_value 42: orig_flags: 00080000,
>> flags 00000001
>> [ 8.785882] brcmfmac: 5 GHz: 6: hw_value 46: orig_flags: 00080000,
>> flags 00000001
>> [ 8.785974] brcmfmac: 5 GHz: 23: hw_value 144: orig_flags: 00080000,
>> flags 0000011a
>>
>> All of them except 144 are disabled via flags. Btw wpa_supplicant is
>> configured to country DE within the configuration.
>>
>> The second and last time brcmf_construct_chaninfo() is called is a few
>> seconds later during boot, we get the following:
>>
>> [ 12.490877] brcmfmac: 5 GHz: 0: hw_value 34: orig_flags: 00080000,
>> flags 00000001
>> [ 12.490891] brcmfmac: 5 GHz: 2: hw_value 38: orig_flags: 00080000,
>> flags 00000001
>> [ 12.490904] brcmfmac: 5 GHz: 4: hw_value 42: orig_flags: 00080000,
>> flags 00000001
>> [ 12.490918] brcmfmac: 5 GHz: 6: hw_value 46: orig_flags: 00080000,
>> flags 00000001
>> [ 12.491031] brcmfmac: 5 GHz: 23: hw_value 144: orig_flags: 00080000,
>> flags 00000001
>>
>> Now all of them are disabled via flags.
>>
>> So after that i trigger the reconnect to the same 5 GHz network as
>> before. brcmf_construct_chaninfo is never called again, but at the time
>> brcmf_set_channel is called the flags for these channels are completely
>> different:
>>
>> [ 90.010002] brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail,
>> reason -52
>> [ 90.010017] brcmfmac: hw_value 34, orig_flags: 00080000, flags 00080220
>> [ 90.120007] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
>> [ 90.120038] brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail,
>> reason -52
>> [ 90.120053] brcmfmac: hw_value 38, orig_flags: 00080000, flags 00080200
>> [ 90.230029] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
>> [ 90.230058] brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail,
>> reason -52
>> [ 90.230073] brcmfmac: hw_value 42, orig_flags: 00080000, flags 00080200
>> [ 90.340042] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
>> [ 90.340071] brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail,
>> reason -52
>> [ 90.340086] brcmfmac: hw_value 46, orig_flags: 00080000, flags 00080210
>> [ 92.100073] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
>> [ 92.100110] brcmfmac: brcmf_set_channel: set chanspec 0xd090 fail,
>> reason -52
>> [ 92.100126] brcmfmac: hw_value 144, orig_flags: 00080000, flags 00080118
>>
>> Where does these new flags come from? It's clear that these doesn't come
>> from brcmf_construct_chaninfo(). So what manipulates the flags
>> afterwards? Shouldn't brcmf_construct_chaninfo() called on reconnect?
>
> I suspect it is not the driver, but net/wireless/reg.c. Could you define
> DEBUG in top of that file and build cfg80211.ko with that. Or if you have
> CONFIG_DYNAMIC_DEBUG enable debug prints for reg.c through sysfs [1]
Sorry, it's done through debugfs.
>
> Regards,
> Arend
>
> [1] https://www.kernel.org/doc/html/v4.14/admin-guide/dynamic-debug-howto.html
>
>>
>> Best regards
>>
>>>
>>> brcmf_construct_chaninfo() is called from brcmf_setup_wiphybands() and
>>> that function is called in two places:
>>>
>>> 1) brcmf_cfg80211_attach(): right after wiphy_register()
>>> 2) brcmf_cfg80211_reg_notifier()
>>>
>>> Can we figure out if brcmf_cfg80211_reg_notifier() is indeed invoked
>>> on your platform and what country is being configured. If the country
>>> is indeed changed than it can be expected that some channels are
>>> disabled or enabled.
>>>
>>> Regards,
>>> Arend
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4219 bytes --]
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2023-12-21 17:47 ` Arend Van Spriel
2023-12-21 17:50 ` Arend Van Spriel
@ 2023-12-21 18:40 ` Stefan Wahren
2023-12-22 15:18 ` Arend Van Spriel
1 sibling, 1 reply; 41+ messages in thread
From: Stefan Wahren @ 2023-12-21 18:40 UTC (permalink / raw)
To: Arend Van Spriel, Arend van Spriel, Franky Lin, Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
Hi Arend,
Am 21.12.23 um 18:47 schrieb Arend Van Spriel:
>
>
> On November 18, 2023 12:43:24 PM Stefan Wahren <wahrenst@gmx.net> wrote:
>
>> Hi Arend,
>>
>> Am 15.11.23 um 21:09 schrieb Arend van Spriel:
>>> On 11/15/2023 7:35 PM, Stefan Wahren wrote:
>>>> Am 15.11.23 um 10:34 schrieb Arend van Spriel:
>>>>> On 11/13/2023 10:02 PM, Stefan Wahren wrote:
>>>>>> Hi Arend,
>>>>>>
>>>>>> Am 13.11.23 um 10:11 schrieb Arend van Spriel:
>>>>>>> On 11/11/2023 9:30 PM, Stefan Wahren wrote:
>>>>>>>> Am 11.11.23 um 19:29 schrieb Stefan Wahren:
>>>>>>>>>
>>>>>>>>> Am 11.11.23 um 18:25 schrieb Arend Van Spriel:
>>>>>>>>>> On November 11, 2023 5:48:46 PM Stefan Wahren <wahrenst@gmx.net>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Again look like these are disabled channels. At least chanspec
>>>>>>>>>> 0xd022
>>>>>>>>>> is 5G channel 34. You say you get this only once so not every 60
>>>>>>>>>> seconds?
>>>>>>>>> I get this everytime i trigger a reconnect to the wifi
>>>>>>>>> network, so
>>>>>>>>> not
>>>>>>>>> periodically (checked that). Strangely the initial automatic
>>>>>>>>> connect
>>>>>>>>> doesn't trigger this errors.
>>>>>>>> I additionally placed a WARN_ON_ONCE after the error log and
>>>>>>>> enabled the
>>>>>>>> firmware error log of brcmf_fil_cmd_data(). Maybe this helps.
>>>>>>>
>>>>>>> It does a bit. At least it shows this is happening with the
>>>>>>> dump_survey (again). I don't really understand why though. It
>>>>>>> implies
>>>>>>> the channel is not disabled, but unclear why. The channel flags are
>>>>>>> changed in brcmf_construct_chaninfo() so we probably should focus
>>>>>>> debug on that function.
>>>>>>
>>>>>> i placed a pr_err at the start of brcmf_construct_chaninfo and
>>>>>> another
>>>>>> pr_err into the for loop before the "if (channel->orig_flags &
>>>>>> IEEE80211_CHAN_DISABLED) continue".
>>>>>>
>>>>>> pr_err("%s: Ch num %d, chanspec 0x%x, orig_flags: %x.\n", __func__,
>>>>>> ch.control_ch_num, ch.chspec, channel->orig_flags);
>>>>>>
>>>>>> It seems that brcmf_construct_chaninfo is called two times, but the
>>>>>> results are different. I could find 0xd090 in the first run, but
>>>>>> not in
>>>>>> second. The other chanspecs doesn't seem to occur in both runs. No
>>>>>> idea
>>>>>> what's going on here.
>>>>>
>>>>> Can you print all wiphy band channels before exiting
>>>>> brcmf_construct_chaninfo() and print both channel->orig_flags and
>>>>> channel->flags?
>>>>
>>>> Sure. It seems that in the first call of brcmf_construct_chaninfo the
>>>> channel 144 is not disabled, but in the second.
>>>
>>> I am a bit confused. So the chanspec as mentioned in this email
>>> subject is no longer observed, but you still see failure in
>>> brcmf_set_channel() for other chanspecs?
>>
>> before we dive deeper into this let me summarize my observations from
>> the beginning. From my understanding the errors are triggered for the 5
>> GHz channels 34, 38, 42, 46, 144 (chanspec: 0xd022, 0xd026, 0xd02a,
>> 0xd090). So i would focus my observations on those.
>>
>> As you said that the channel flags are set in brcmf_construct_chaninfo()
>> i dump them, here is the output of the first call:
>>
>> [ 8.785850] brcmfmac: 5 GHz: 0: hw_value 34: orig_flags: 00080000,
>> flags 00000001
>> [ 8.785861] brcmfmac: 5 GHz: 2: hw_value 38: orig_flags: 00080000,
>> flags 00000001
>> [ 8.785872] brcmfmac: 5 GHz: 4: hw_value 42: orig_flags: 00080000,
>> flags 00000001
>> [ 8.785882] brcmfmac: 5 GHz: 6: hw_value 46: orig_flags: 00080000,
>> flags 00000001
>> [ 8.785974] brcmfmac: 5 GHz: 23: hw_value 144: orig_flags: 00080000,
>> flags 0000011a
>>
>> All of them except 144 are disabled via flags. Btw wpa_supplicant is
>> configured to country DE within the configuration.
>>
>> The second and last time brcmf_construct_chaninfo() is called is a few
>> seconds later during boot, we get the following:
>>
>> [ 12.490877] brcmfmac: 5 GHz: 0: hw_value 34: orig_flags: 00080000,
>> flags 00000001
>> [ 12.490891] brcmfmac: 5 GHz: 2: hw_value 38: orig_flags: 00080000,
>> flags 00000001
>> [ 12.490904] brcmfmac: 5 GHz: 4: hw_value 42: orig_flags: 00080000,
>> flags 00000001
>> [ 12.490918] brcmfmac: 5 GHz: 6: hw_value 46: orig_flags: 00080000,
>> flags 00000001
>> [ 12.491031] brcmfmac: 5 GHz: 23: hw_value 144: orig_flags: 00080000,
>> flags 00000001
>>
>> Now all of them are disabled via flags.
>>
>> So after that i trigger the reconnect to the same 5 GHz network as
>> before. brcmf_construct_chaninfo is never called again, but at the time
>> brcmf_set_channel is called the flags for these channels are completely
>> different:
>>
>> [ 90.010002] brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail,
>> reason -52
>> [ 90.010017] brcmfmac: hw_value 34, orig_flags: 00080000, flags
>> 00080220
>> [ 90.120007] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
>> [ 90.120038] brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail,
>> reason -52
>> [ 90.120053] brcmfmac: hw_value 38, orig_flags: 00080000, flags
>> 00080200
>> [ 90.230029] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
>> [ 90.230058] brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail,
>> reason -52
>> [ 90.230073] brcmfmac: hw_value 42, orig_flags: 00080000, flags
>> 00080200
>> [ 90.340042] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
>> [ 90.340071] brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail,
>> reason -52
>> [ 90.340086] brcmfmac: hw_value 46, orig_flags: 00080000, flags
>> 00080210
>> [ 92.100073] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
>> [ 92.100110] brcmfmac: brcmf_set_channel: set chanspec 0xd090 fail,
>> reason -52
>> [ 92.100126] brcmfmac: hw_value 144, orig_flags: 00080000, flags
>> 00080118
>>
>> Where does these new flags come from? It's clear that these doesn't come
>> from brcmf_construct_chaninfo(). So what manipulates the flags
>> afterwards? Shouldn't brcmf_construct_chaninfo() called on reconnect?
>
> I suspect it is not the driver, but net/wireless/reg.c. Could you
> define DEBUG in top of that file and build cfg80211.ko with that. Or
> if you have CONFIG_DYNAMIC_DEBUG enable debug prints for reg.c through
> sysfs [1]
>
Sure, this is a more recent Linux 6.7 and the disconnect is at uptime
~316s followed by the reconnect:
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 6.7.0-rc6-00022-g55cb5f43689d-dirty
(stefanw@stefanw-SCHENKER) (arm-linux-gnueabihf-gcc (GCC) 11.3.1
20220604 [releases/gcc-11 revision
591c0f4b92548e3ae2e8173f4f93984b1c7f62bb], GNU ld
(Linaro_Binutils-2022.06) 2.37.20220122) #175 SMP Thu Dec 21 19:15:10
CET 2023
[ 0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7),
cr=10c5383d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing
instruction cache
[ 0.000000] OF: fdt: Machine model: Raspberry Pi 3 Model B Plus Rev 1.3
...
[ 9.538797] cfg80211: Loading compiled-in X.509 certificates for
regulatory database
[ 9.699412] usb 1-1.3: USB disconnect, device number 4
[ 9.716116] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 9.760066] brcmfmac: brcmf_fw_alloc_request: using
brcm/brcmfmac43455-sdio for chip BCM4345/6
[ 9.770023] cfg80211: loaded regulatory.db is malformed or signature
is missing/invalid
[ 9.770047] cfg80211: Restoring regulatory settings
[ 9.770057] cfg80211: Kicking the queue
[ 9.770078] cfg80211: Calling CRDA to update world regulatory domain
[ 9.801533] Console: switching to colour dummy device 80x30
[ 9.813535] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4])
[ 9.816895] vc4-drm soc:gpu: bound 3f902000.hdmi (ops vc4_hdmi_ops [vc4])
[ 9.817106] vc4-drm soc:gpu: bound 3f806000.vec (ops vc4_vec_ops [vc4])
[ 9.817282] vc4-drm soc:gpu: bound 3f004000.txp (ops vc4_txp_ops [vc4])
[ 9.817413] vc4-drm soc:gpu: bound 3f206000.pixelvalve (ops
vc4_crtc_ops [vc4])
[ 9.817538] vc4-drm soc:gpu: bound 3f207000.pixelvalve (ops
vc4_crtc_ops [vc4])
[ 9.817745] vc4-drm soc:gpu: bound 3f807000.pixelvalve (ops
vc4_crtc_ops [vc4])
[ 9.817864] vc4-drm soc:gpu: bound 3fc00000.v3d (ops vc4_v3d_ops [vc4])
[ 9.823689] Bluetooth: hci0: BCM: chip id 107
[ 9.825669] Bluetooth: hci0: BCM: features 0x2f
[ 9.826383] [drm] Initialized vc4 0.0.0 20140616 for soc:gpu on minor 0
[ 9.827278] Bluetooth: hci0: BCM4345C0
[ 9.827291] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0000
[ 9.869190] Bluetooth: hci0: BCM4345C0
'brcm/BCM4345C0.raspberrypi,3-model-b-plus.hcd' Patch
[ 9.915063] Console: switching to colour frame buffer device 240x75
[ 9.944429] vc4-drm soc:gpu: [drm] fb0: vc4drmfb frame buffer device
[ 9.958353] hub 1-1:1.0: USB hub found
[ 9.958412] hub 1-1:1.0: 4 ports detected
[ 9.992604] onboard-usb-hub 3f980000.usb:usb-port@1: supply vdd not
found, using dummy regulator
[ 9.994313] onboard-usb-hub 3f980000.usb:usb-port@1:usb-port@1:
supply vdd not found, using dummy regulator
[ 9.995590] hub 1-1:1.0: USB hub found
[ 9.995690] hub 1-1:1.0: 4 ports detected
[ 9.998640] onboard-usb-hub 3f980000.usb:usb-port@1:usb-port@1:
supply vdd not found, using dummy regulator
[ 10.086053] usbcore: registered new interface driver lan78xx
[ 10.094129] brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob
available (err=-2)
[ 10.098005] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0:
Nov 1 2021 00:37:25 version 7.45.241 (1a2f2fa CY) FWID 01-703fd60
[ 10.135643] cfg80211: Ignoring regulatory request set by core since
the driver uses its own custom regulatory domain
[ 10.307704] usb 1-1.1: new high-speed USB device number 7 using dwc2
[ 10.452108] hub 1-1.1:1.0: USB hub found
[ 10.452310] hub 1-1.1:1.0: 3 ports detected
[ 10.557660] usb 1-1.3: new low-speed USB device number 8 using dwc2
[ 10.726697] input: PixArt Microsoft USB Optical Mouse as
/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:045E:00CB.0003/input/input2
[ 10.727785] hid-generic 0003:045E:00CB.0003: input: USB HID v1.11
Mouse [PixArt Microsoft USB Optical Mouse] on usb-3f980000.usb-1.3/input0
[ 10.797638] usb 1-1.1.2: new low-speed USB device number 9 using dwc2
[ 10.957069] input: HID 046a:0011 as
/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/0003:046A:0011.0004/input/input3
[ 11.019525] hid-generic 0003:046A:0011.0004: input: USB HID v1.11
Keyboard [HID 046a:0011] on usb-3f980000.usb-1.1.2/input0
[ 11.048402] Bluetooth: hci0: BCM: features 0x2f
[ 11.050164] Bluetooth: hci0: BCM43455 37.4MHz Raspberry Pi 3+-0190
[ 11.050178] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0382
[ 11.324175] usb 1-1.1.1: new high-speed USB device number 10 using dwc2
[ 11.714298] lan78xx 1-1.1.1:1.0 (unnamed net_device) (uninitialized):
No External EEPROM. Setting MAC Speed
[ 11.854291] cfg80211: Pending regulatory request, waiting for it to
be processed...
[ 12.099129] cfg80211: Ignoring regulatory request set by core since
the driver uses its own custom regulatory domain
[ 12.099161] cfg80211: World regulatory domain updated:
[ 12.099168] cfg80211: DFS Master region: unset
[ 12.099174] cfg80211: (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp), (dfs_cac_time)
[ 12.099189] cfg80211: (755000 KHz - 928000 KHz @ 2000 KHz), (N/A,
2000 mBm), (N/A)
[ 12.099201] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz),
(N/A, 2000 mBm), (N/A)
[ 12.099213] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000
KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 12.099224] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz),
(N/A, 2000 mBm), (N/A)
[ 12.099235] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz,
160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 12.099248] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz,
160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 12.099259] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz),
(N/A, 2000 mBm), (0 s)
[ 12.099269] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz),
(N/A, 2000 mBm), (N/A)
[ 12.099280] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz),
(N/A, 0 mBm), (N/A)
[ 12.101316] cfg80211: Calling CRDA for country: DE
[ 12.125129] cfg80211: Disabling freq 2484.000 MHz
[ 12.176440] cfg80211: Regulatory domain changed to country: DE
[ 12.176459] cfg80211: DFS Master region: ETSI
[ 12.176464] cfg80211: (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp), (dfs_cac_time)
[ 12.176473] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz),
(N/A, 2000 mBm), (N/A)
[ 12.176487] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz,
200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
[ 12.176496] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz,
200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 12.176504] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz),
(N/A, 2698 mBm), (0 s)
[ 12.176512] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz),
(N/A, 1397 mBm), (N/A)
[ 12.176521] cfg80211: (5945000 KHz - 6425000 KHz @ 160000 KHz,
480000 KHz AUTO), (N/A, 2301 mBm), (N/A)
[ 12.176529] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz),
(N/A, 4000 mBm), (N/A)
[ 13.893866] Adding 102396k swap on /var/swap. Priority:-2 extents:1
across:102396k SS
[ 14.530323] lan78xx 1-1.1.1:1.0 eth0: Link is Down
[ 14.641536] Bluetooth: MGMT ver 1.22
[ 14.689962] NET: Registered PF_ALG protocol family
[ 14.744513] cryptd: max_cpu_qlen set to 1000
[ 16.791666] cfg80211: Found new beacon on frequency: 5180.000 MHz (Ch
36) on phy0
[ 16.791716] cfg80211: Found new beacon on frequency: 5220.000 MHz (Ch
44) on phy0
[ 20.481971] cfg80211: Calling CRDA for country: DE
[ 20.501082] cfg80211: Disabling freq 2484.000 MHz
[ 20.501465] cfg80211: Regulatory domain changed to country: DE
[ 20.501471] cfg80211: DFS Master region: ETSI
[ 20.501475] cfg80211: (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp), (dfs_cac_time)
[ 20.501490] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz),
(N/A, 2000 mBm), (N/A)
[ 20.501497] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz,
200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
[ 20.501504] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz,
200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 20.501511] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz),
(N/A, 2698 mBm), (0 s)
[ 20.501517] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz),
(N/A, 1397 mBm), (N/A)
[ 20.501524] cfg80211: (5945000 KHz - 6425000 KHz @ 160000 KHz,
480000 KHz AUTO), (N/A, 2301 mBm), (N/A)
[ 20.501531] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz),
(N/A, 4000 mBm), (N/A)
[ 46.174010] systemd-journald[125]: Failed to set ACL on
/var/log/journal/0b443a02fdd340c68f8aac17d2e5ebf8/user-1000.journal,
ignoring: Operation not supported
[ 84.956286] cfg80211: Verifying active interfaces after reg change
[ 128.323869] cfg80211: Found new beacon on frequency: 2472.000 MHz (Ch
13) on phy0
[ 192.477390] cfg80211: Verifying active interfaces after reg change
[ 316.329988] cfg80211: All devices are disconnected, going to restore
regulatory settings
[ 316.330038] cfg80211: Restoring regulatory settings while preserving
user preference for: DE
[ 316.330063] cfg80211: Ignoring regulatory request set by core since
the driver uses its own custom regulatory domain
[ 316.330088] cfg80211: World regulatory domain updated:
[ 316.330097] cfg80211: DFS Master region: unset
[ 316.330104] cfg80211: (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp), (dfs_cac_time)
[ 316.330120] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (600
mBi, 2000 mBm), (N/A)
[ 316.330140] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000
KHz AUTO), (600 mBi, 2000 mBm), (N/A)
[ 316.330156] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (600
mBi, 2000 mBm), (N/A)
[ 316.330172] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz,
160000 KHz AUTO), (600 mBi, 2000 mBm), (N/A)
[ 316.330190] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz,
160000 KHz AUTO), (600 mBi, 2000 mBm), (0 s)
[ 316.330206] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz),
(600 mBi, 2000 mBm), (0 s)
[ 316.330222] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (600
mBi, 2000 mBm), (N/A)
[ 316.330238] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz),
(N/A, 0 mBm), (N/A)
[ 316.330307] cfg80211: Disabling freq 2484.000 MHz
[ 316.340457] cfg80211: Regulatory domain changed to country: DE
[ 316.340487] cfg80211: DFS Master region: ETSI
[ 316.340495] cfg80211: (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp), (dfs_cac_time)
[ 316.340511] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz),
(N/A, 2000 mBm), (N/A)
[ 316.340529] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz,
200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
[ 316.340547] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz,
200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 316.340563] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz),
(N/A, 2698 mBm), (0 s)
[ 316.340577] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz),
(N/A, 1397 mBm), (N/A)
[ 316.340592] cfg80211: (5945000 KHz - 6425000 KHz @ 160000 KHz,
480000 KHz AUTO), (N/A, 2301 mBm), (N/A)
[ 316.340607] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz),
(N/A, 4000 mBm), (N/A)
[ 316.340643] cfg80211: Kicking the queue
[ 331.276421] cfg80211: Found new beacon on frequency: 5180.000 MHz (Ch
36) on phy0
[ 331.276494] cfg80211: Found new beacon on frequency: 5220.000 MHz (Ch
44) on phy0
[ 331.276562] cfg80211: Found new beacon on frequency: 2472.000 MHz (Ch
13) on phy0
[ 332.729896] brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail,
reason -52
[ 332.840008] brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail,
reason -52
[ 332.949910] brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail,
reason -52
[ 333.059802] brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail,
reason -52
[ 334.819896] brcmfmac: brcmf_set_channel: set chanspec 0xd090 fail,
reason -52
[ 334.820318] brcmfmac: brcmf_set_channel: set chanspec 0xd095 fail,
reason -52
[ 334.820719] brcmfmac: brcmf_set_channel: set chanspec 0xd099 fail,
reason -52
[ 334.821120] brcmfmac: brcmf_set_channel: set chanspec 0xd09d fail,
reason -52
[ 334.821521] brcmfmac: brcmf_set_channel: set chanspec 0xd0a1 fail,
reason -52
[ 334.821922] brcmfmac: brcmf_set_channel: set chanspec 0xd0a5 fail,
reason -52
[ 334.956787] cfg80211: Calling CRDA for country: DE
[ 334.990709] cfg80211: Disabling freq 2484.000 MHz
[ 334.991199] cfg80211: Regulatory domain changed to country: DE
[ 334.991212] cfg80211: DFS Master region: ETSI
[ 334.991218] cfg80211: (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp), (dfs_cac_time)
[ 334.991236] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz),
(N/A, 2000 mBm), (N/A)
[ 334.991249] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz,
200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
[ 334.991261] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz,
200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 334.991273] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz),
(N/A, 2698 mBm), (0 s)
[ 334.991284] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz),
(N/A, 1397 mBm), (N/A)
[ 334.991296] cfg80211: (5945000 KHz - 6425000 KHz @ 160000 KHz,
480000 KHz AUTO), (N/A, 2301 mBm), (N/A)
[ 334.991307] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz),
(N/A, 4000 mBm), (N/A)
[ 397.278378] cfg80211: Verifying active interfaces after reg change
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2023-12-21 18:40 ` Stefan Wahren
@ 2023-12-22 15:18 ` Arend Van Spriel
2023-12-22 15:28 ` Arend Van Spriel
0 siblings, 1 reply; 41+ messages in thread
From: Arend Van Spriel @ 2023-12-22 15:18 UTC (permalink / raw)
To: Stefan Wahren, Arend van Spriel, Franky Lin, Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
[-- Attachment #1: Type: text/plain, Size: 20881 bytes --]
On December 21, 2023 7:40:46 PM Stefan Wahren <wahrenst@gmx.net> wrote:
> Hi Arend,
>
> Am 21.12.23 um 18:47 schrieb Arend Van Spriel:
>>
>>
>> On November 18, 2023 12:43:24 PM Stefan Wahren <wahrenst@gmx.net> wrote:
>>
>>> Hi Arend,
>>>
>>> Am 15.11.23 um 21:09 schrieb Arend van Spriel:
>>>> On 11/15/2023 7:35 PM, Stefan Wahren wrote:
>>>>> Am 15.11.23 um 10:34 schrieb Arend van Spriel:
>>>>>> On 11/13/2023 10:02 PM, Stefan Wahren wrote:
>>>>>>> Hi Arend,
>>>>>>>
>>>>>>> Am 13.11.23 um 10:11 schrieb Arend van Spriel:
>>>>>>>> On 11/11/2023 9:30 PM, Stefan Wahren wrote:
>>>>>>>>> Am 11.11.23 um 19:29 schrieb Stefan Wahren:
>>>>>>>>>>
>>>>>>>>>> Am 11.11.23 um 18:25 schrieb Arend Van Spriel:
>>>>>>>>>>> On November 11, 2023 5:48:46 PM Stefan Wahren <wahrenst@gmx.net>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Again look like these are disabled channels. At least chanspec
>>>>>>>>>>> 0xd022
>>>>>>>>>>> is 5G channel 34. You say you get this only once so not every 60
>>>>>>>>>>> seconds?
>>>>>>>>>> I get this everytime i trigger a reconnect to the wifi
>>>>>>>>>> network, so
>>>>>>>>>> not
>>>>>>>>>> periodically (checked that). Strangely the initial automatic
>>>>>>>>>> connect
>>>>>>>>>> doesn't trigger this errors.
>>>>>>>>> I additionally placed a WARN_ON_ONCE after the error log and
>>>>>>>>> enabled the
>>>>>>>>> firmware error log of brcmf_fil_cmd_data(). Maybe this helps.
>>>>>>>>
>>>>>>>> It does a bit. At least it shows this is happening with the
>>>>>>>> dump_survey (again). I don't really understand why though. It
>>>>>>>> implies
>>>>>>>> the channel is not disabled, but unclear why. The channel flags are
>>>>>>>> changed in brcmf_construct_chaninfo() so we probably should focus
>>>>>>>> debug on that function.
>>>>>>>
>>>>>>> i placed a pr_err at the start of brcmf_construct_chaninfo and
>>>>>>> another
>>>>>>> pr_err into the for loop before the "if (channel->orig_flags &
>>>>>>> IEEE80211_CHAN_DISABLED) continue".
>>>>>>>
>>>>>>> pr_err("%s: Ch num %d, chanspec 0x%x, orig_flags: %x.\n", __func__,
>>>>>>> ch.control_ch_num, ch.chspec, channel->orig_flags);
>>>>>>>
>>>>>>> It seems that brcmf_construct_chaninfo is called two times, but the
>>>>>>> results are different. I could find 0xd090 in the first run, but
>>>>>>> not in
>>>>>>> second. The other chanspecs doesn't seem to occur in both runs. No
>>>>>>> idea
>>>>>>> what's going on here.
>>>>>>
>>>>>> Can you print all wiphy band channels before exiting
>>>>>> brcmf_construct_chaninfo() and print both channel->orig_flags and
>>>>>> channel->flags?
>>>>>
>>>>> Sure. It seems that in the first call of brcmf_construct_chaninfo the
>>>>> channel 144 is not disabled, but in the second.
>>>>
>>>> I am a bit confused. So the chanspec as mentioned in this email
>>>> subject is no longer observed, but you still see failure in
>>>> brcmf_set_channel() for other chanspecs?
>>>
>>> before we dive deeper into this let me summarize my observations from
>>> the beginning. From my understanding the errors are triggered for the 5
>>> GHz channels 34, 38, 42, 46, 144 (chanspec: 0xd022, 0xd026, 0xd02a,
>>> 0xd090). So i would focus my observations on those.
>>>
>>> As you said that the channel flags are set in brcmf_construct_chaninfo()
>>> i dump them, here is the output of the first call:
>>>
>>> [ 8.785850] brcmfmac: 5 GHz: 0: hw_value 34: orig_flags: 00080000,
>>> flags 00000001
>>> [ 8.785861] brcmfmac: 5 GHz: 2: hw_value 38: orig_flags: 00080000,
>>> flags 00000001
>>> [ 8.785872] brcmfmac: 5 GHz: 4: hw_value 42: orig_flags: 00080000,
>>> flags 00000001
>>> [ 8.785882] brcmfmac: 5 GHz: 6: hw_value 46: orig_flags: 00080000,
>>> flags 00000001
>>> [ 8.785974] brcmfmac: 5 GHz: 23: hw_value 144: orig_flags: 00080000,
>>> flags 0000011a
>>>
>>> All of them except 144 are disabled via flags. Btw wpa_supplicant is
>>> configured to country DE within the configuration.
>>>
>>> The second and last time brcmf_construct_chaninfo() is called is a few
>>> seconds later during boot, we get the following:
>>>
>>> [ 12.490877] brcmfmac: 5 GHz: 0: hw_value 34: orig_flags: 00080000,
>>> flags 00000001
>>> [ 12.490891] brcmfmac: 5 GHz: 2: hw_value 38: orig_flags: 00080000,
>>> flags 00000001
>>> [ 12.490904] brcmfmac: 5 GHz: 4: hw_value 42: orig_flags: 00080000,
>>> flags 00000001
>>> [ 12.490918] brcmfmac: 5 GHz: 6: hw_value 46: orig_flags: 00080000,
>>> flags 00000001
>>> [ 12.491031] brcmfmac: 5 GHz: 23: hw_value 144: orig_flags: 00080000,
>>> flags 00000001
>>>
>>> Now all of them are disabled via flags.
>>>
>>> So after that i trigger the reconnect to the same 5 GHz network as
>>> before. brcmf_construct_chaninfo is never called again, but at the time
>>> brcmf_set_channel is called the flags for these channels are completely
>>> different:
>>>
>>> [ 90.010002] brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail,
>>> reason -52
>>> [ 90.010017] brcmfmac: hw_value 34, orig_flags: 00080000, flags
>>> 00080220
>>> [ 90.120007] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
>>> [ 90.120038] brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail,
>>> reason -52
>>> [ 90.120053] brcmfmac: hw_value 38, orig_flags: 00080000, flags
>>> 00080200
>>> [ 90.230029] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
>>> [ 90.230058] brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail,
>>> reason -52
>>> [ 90.230073] brcmfmac: hw_value 42, orig_flags: 00080000, flags
>>> 00080200
>>> [ 90.340042] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
>>> [ 90.340071] brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail,
>>> reason -52
>>> [ 90.340086] brcmfmac: hw_value 46, orig_flags: 00080000, flags
>>> 00080210
>>> [ 92.100073] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
>>> [ 92.100110] brcmfmac: brcmf_set_channel: set chanspec 0xd090 fail,
>>> reason -52
>>> [ 92.100126] brcmfmac: hw_value 144, orig_flags: 00080000, flags
>>> 00080118
>>>
>>> Where does these new flags come from? It's clear that these doesn't come
>>> from brcmf_construct_chaninfo(). So what manipulates the flags
>>> afterwards? Shouldn't brcmf_construct_chaninfo() called on reconnect?
>>
>> I suspect it is not the driver, but net/wireless/reg.c. Could you
>> define DEBUG in top of that file and build cfg80211.ko with that. Or
>> if you have CONFIG_DYNAMIC_DEBUG enable debug prints for reg.c through
>> sysfs [1]
> Sure, this is a more recent Linux 6.7 and the disconnect is at uptime
> ~316s followed by the reconnect:
>
> [ 0.000000] Booting Linux on physical CPU 0x0
> [ 0.000000] Linux version 6.7.0-rc6-00022-g55cb5f43689d-dirty
> (stefanw@stefanw-SCHENKER) (arm-linux-gnueabihf-gcc (GCC) 11.3.1
> 20220604 [releases/gcc-11 revision
> 591c0f4b92548e3ae2e8173f4f93984b1c7f62bb], GNU ld
> (Linaro_Binutils-2022.06) 2.37.20220122) #175 SMP Thu Dec 21 19:15:10
> CET 2023
> [ 0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7),
> cr=10c5383d
> [ 0.000000] CPU: div instructions available: patching division code
> [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing
> instruction cache
> [ 0.000000] OF: fdt: Machine model: Raspberry Pi 3 Model B Plus Rev 1.3
> ...
> [ 9.538797] cfg80211: Loading compiled-in X.509 certificates for
> regulatory database
> [ 9.699412] usb 1-1.3: USB disconnect, device number 4
> [ 9.716116] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
> [ 9.760066] brcmfmac: brcmf_fw_alloc_request: using
> brcm/brcmfmac43455-sdio for chip BCM4345/6
> [ 9.770023] cfg80211: loaded regulatory.db is malformed or signature
> is missing/invalid
> [ 9.770047] cfg80211: Restoring regulatory settings
> [ 9.770057] cfg80211: Kicking the queue
> [ 9.770078] cfg80211: Calling CRDA to update world regulatory domain
> [ 9.801533] Console: switching to colour dummy device 80x30
> [ 9.813535] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4])
> [ 9.816895] vc4-drm soc:gpu: bound 3f902000.hdmi (ops vc4_hdmi_ops [vc4])
> [ 9.817106] vc4-drm soc:gpu: bound 3f806000.vec (ops vc4_vec_ops [vc4])
> [ 9.817282] vc4-drm soc:gpu: bound 3f004000.txp (ops vc4_txp_ops [vc4])
> [ 9.817413] vc4-drm soc:gpu: bound 3f206000.pixelvalve (ops
> vc4_crtc_ops [vc4])
> [ 9.817538] vc4-drm soc:gpu: bound 3f207000.pixelvalve (ops
> vc4_crtc_ops [vc4])
> [ 9.817745] vc4-drm soc:gpu: bound 3f807000.pixelvalve (ops
> vc4_crtc_ops [vc4])
> [ 9.817864] vc4-drm soc:gpu: bound 3fc00000.v3d (ops vc4_v3d_ops [vc4])
> [ 9.823689] Bluetooth: hci0: BCM: chip id 107
> [ 9.825669] Bluetooth: hci0: BCM: features 0x2f
> [ 9.826383] [drm] Initialized vc4 0.0.0 20140616 for soc:gpu on minor 0
> [ 9.827278] Bluetooth: hci0: BCM4345C0
> [ 9.827291] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0000
> [ 9.869190] Bluetooth: hci0: BCM4345C0
> 'brcm/BCM4345C0.raspberrypi,3-model-b-plus.hcd' Patch
> [ 9.915063] Console: switching to colour frame buffer device 240x75
> [ 9.944429] vc4-drm soc:gpu: [drm] fb0: vc4drmfb frame buffer device
> [ 9.958353] hub 1-1:1.0: USB hub found
> [ 9.958412] hub 1-1:1.0: 4 ports detected
> [ 9.992604] onboard-usb-hub 3f980000.usb:usb-port@1: supply vdd not
> found, using dummy regulator
> [ 9.994313] onboard-usb-hub 3f980000.usb:usb-port@1:usb-port@1:
> supply vdd not found, using dummy regulator
> [ 9.995590] hub 1-1:1.0: USB hub found
> [ 9.995690] hub 1-1:1.0: 4 ports detected
> [ 9.998640] onboard-usb-hub 3f980000.usb:usb-port@1:usb-port@1:
> supply vdd not found, using dummy regulator
> [ 10.086053] usbcore: registered new interface driver lan78xx
> [ 10.094129] brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob
> available (err=-2)
> [ 10.098005] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0:
> Nov 1 2021 00:37:25 version 7.45.241 (1a2f2fa CY) FWID 01-703fd60
> [ 10.135643] cfg80211: Ignoring regulatory request set by core since
> the driver uses its own custom regulatory domain
> [ 10.307704] usb 1-1.1: new high-speed USB device number 7 using dwc2
> [ 10.452108] hub 1-1.1:1.0: USB hub found
> [ 10.452310] hub 1-1.1:1.0: 3 ports detected
> [ 10.557660] usb 1-1.3: new low-speed USB device number 8 using dwc2
> [ 10.726697] input: PixArt Microsoft USB Optical Mouse as
> /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:045E:00CB.0003/input/input2
> [ 10.727785] hid-generic 0003:045E:00CB.0003: input: USB HID v1.11
> Mouse [PixArt Microsoft USB Optical Mouse] on usb-3f980000.usb-1.3/input0
> [ 10.797638] usb 1-1.1.2: new low-speed USB device number 9 using dwc2
> [ 10.957069] input: HID 046a:0011 as
> /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/0003:046A:0011.0004/input/input3
> [ 11.019525] hid-generic 0003:046A:0011.0004: input: USB HID v1.11
> Keyboard [HID 046a:0011] on usb-3f980000.usb-1.1.2/input0
> [ 11.048402] Bluetooth: hci0: BCM: features 0x2f
> [ 11.050164] Bluetooth: hci0: BCM43455 37.4MHz Raspberry Pi 3+-0190
> [ 11.050178] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0382
> [ 11.324175] usb 1-1.1.1: new high-speed USB device number 10 using dwc2
> [ 11.714298] lan78xx 1-1.1.1:1.0 (unnamed net_device) (uninitialized):
> No External EEPROM. Setting MAC Speed
> [ 11.854291] cfg80211: Pending regulatory request, waiting for it to
> be processed...
> [ 12.099129] cfg80211: Ignoring regulatory request set by core since
> the driver uses its own custom regulatory domain
> [ 12.099161] cfg80211: World regulatory domain updated:
> [ 12.099168] cfg80211: DFS Master region: unset
> [ 12.099174] cfg80211: (start_freq - end_freq @ bandwidth),
> (max_antenna_gain, max_eirp), (dfs_cac_time)
> [ 12.099189] cfg80211: (755000 KHz - 928000 KHz @ 2000 KHz), (N/A,
> 2000 mBm), (N/A)
> [ 12.099201] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz),
> (N/A, 2000 mBm), (N/A)
> [ 12.099213] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000
> KHz AUTO), (N/A, 2000 mBm), (N/A)
> [ 12.099224] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz),
> (N/A, 2000 mBm), (N/A)
> [ 12.099235] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz,
> 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
> [ 12.099248] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz,
> 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
> [ 12.099259] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz),
> (N/A, 2000 mBm), (0 s)
> [ 12.099269] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz),
> (N/A, 2000 mBm), (N/A)
> [ 12.099280] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz),
> (N/A, 0 mBm), (N/A)
> [ 12.101316] cfg80211: Calling CRDA for country: DE
> [ 12.125129] cfg80211: Disabling freq 2484.000 MHz
> [ 12.176440] cfg80211: Regulatory domain changed to country: DE
> [ 12.176459] cfg80211: DFS Master region: ETSI
> [ 12.176464] cfg80211: (start_freq - end_freq @ bandwidth),
> (max_antenna_gain, max_eirp), (dfs_cac_time)
> [ 12.176473] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz),
> (N/A, 2000 mBm), (N/A)
> [ 12.176487] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz,
> 200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
> [ 12.176496] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz,
> 200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
> [ 12.176504] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz),
> (N/A, 2698 mBm), (0 s)
> [ 12.176512] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz),
> (N/A, 1397 mBm), (N/A)
> [ 12.176521] cfg80211: (5945000 KHz - 6425000 KHz @ 160000 KHz,
> 480000 KHz AUTO), (N/A, 2301 mBm), (N/A)
> [ 12.176529] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz),
> (N/A, 4000 mBm), (N/A)
> [ 13.893866] Adding 102396k swap on /var/swap. Priority:-2 extents:1
> across:102396k SS
> [ 14.530323] lan78xx 1-1.1.1:1.0 eth0: Link is Down
> [ 14.641536] Bluetooth: MGMT ver 1.22
> [ 14.689962] NET: Registered PF_ALG protocol family
> [ 14.744513] cryptd: max_cpu_qlen set to 1000
> [ 16.791666] cfg80211: Found new beacon on frequency: 5180.000 MHz (Ch
> 36) on phy0
> [ 16.791716] cfg80211: Found new beacon on frequency: 5220.000 MHz (Ch
> 44) on phy0
> [ 20.481971] cfg80211: Calling CRDA for country: DE
> [ 20.501082] cfg80211: Disabling freq 2484.000 MHz
> [ 20.501465] cfg80211: Regulatory domain changed to country: DE
> [ 20.501471] cfg80211: DFS Master region: ETSI
> [ 20.501475] cfg80211: (start_freq - end_freq @ bandwidth),
> (max_antenna_gain, max_eirp), (dfs_cac_time)
> [ 20.501490] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz),
> (N/A, 2000 mBm), (N/A)
> [ 20.501497] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz,
> 200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
> [ 20.501504] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz,
> 200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
> [ 20.501511] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz),
> (N/A, 2698 mBm), (0 s)
> [ 20.501517] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz),
> (N/A, 1397 mBm), (N/A)
> [ 20.501524] cfg80211: (5945000 KHz - 6425000 KHz @ 160000 KHz,
> 480000 KHz AUTO), (N/A, 2301 mBm), (N/A)
> [ 20.501531] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz),
> (N/A, 4000 mBm), (N/A)
> [ 46.174010] systemd-journald[125]: Failed to set ACL on
> /var/log/journal/0b443a02fdd340c68f8aac17d2e5ebf8/user-1000.journal,
> ignoring: Operation not supported
> [ 84.956286] cfg80211: Verifying active interfaces after reg change
> [ 128.323869] cfg80211: Found new beacon on frequency: 2472.000 MHz (Ch
> 13) on phy0
> [ 192.477390] cfg80211: Verifying active interfaces after reg change
> [ 316.329988] cfg80211: All devices are disconnected, going to restore
> regulatory settings
Ok. So here the disconnect happens...
> [ 316.330038] cfg80211: Restoring regulatory settings while preserving
> user preference for: DE
> [ 316.330063] cfg80211: Ignoring regulatory request set by core since
> the driver uses its own custom regulatory domain
> [ 316.330088] cfg80211: World regulatory domain updated:
> [ 316.330097] cfg80211: DFS Master region: unset
> [ 316.330104] cfg80211: (start_freq - end_freq @ bandwidth),
> (max_antenna_gain, max_eirp), (dfs_cac_time)
> [ 316.330120] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (600
> mBi, 2000 mBm), (N/A)
> [ 316.330140] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000
> KHz AUTO), (600 mBi, 2000 mBm), (N/A)
> [ 316.330156] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (600
> mBi, 2000 mBm), (N/A)
> [ 316.330172] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz,
> 160000 KHz AUTO), (600 mBi, 2000 mBm), (N/A)
> [ 316.330190] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz,
> 160000 KHz AUTO), (600 mBi, 2000 mBm), (0 s)
> [ 316.330206] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz),
> (600 mBi, 2000 mBm), (0 s)
> [ 316.330222] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (600
> mBi, 2000 mBm), (N/A)
> [ 316.330238] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz),
> (N/A, 0 mBm), (N/A)
> [ 316.330307] cfg80211: Disabling freq 2484.000 MHz
> [ 316.340457] cfg80211: Regulatory domain changed to country: DE
> [ 316.340487] cfg80211: DFS Master region: ETSI
> [ 316.340495] cfg80211: (start_freq - end_freq @ bandwidth),
> (max_antenna_gain, max_eirp), (dfs_cac_time)
> [ 316.340511] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz),
> (N/A, 2000 mBm), (N/A)
> [ 316.340529] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz,
> 200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
> [ 316.340547] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz,
> 200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
> [ 316.340563] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz),
> (N/A, 2698 mBm), (0 s)
> [ 316.340577] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz),
> (N/A, 1397 mBm), (N/A)
> [ 316.340592] cfg80211: (5945000 KHz - 6425000 KHz @ 160000 KHz,
> 480000 KHz AUTO), (N/A, 2301 mBm), (N/A)
> [ 316.340607] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz),
> (N/A, 4000 mBm), (N/A)
> [ 316.340643] cfg80211: Kicking the queue
> [ 331.276421] cfg80211: Found new beacon on frequency: 5180.000 MHz (Ch
> 36) on phy0
> [ 331.276494] cfg80211: Found new beacon on frequency: 5220.000 MHz (Ch
> 44) on phy0
> [ 331.276562] cfg80211: Found new beacon on frequency: 2472.000 MHz (Ch
> 13) on phy0
> [ 332.729896] brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail,
> reason -52
> [ 332.840008] brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail,
> reason -52
> [ 332.949910] brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail,
> reason -52
> [ 333.059802] brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail,
> reason -52
> [ 334.819896] brcmfmac: brcmf_set_channel: set chanspec 0xd090 fail,
> reason -52
> [ 334.820318] brcmfmac: brcmf_set_channel: set chanspec 0xd095 fail,
> reason -52
> [ 334.820719] brcmfmac: brcmf_set_channel: set chanspec 0xd099 fail,
> reason -52
> [ 334.821120] brcmfmac: brcmf_set_channel: set chanspec 0xd09d fail,
> reason -52
> [ 334.821521] brcmfmac: brcmf_set_channel: set chanspec 0xd0a1 fail,
> reason -52
> [ 334.821922] brcmfmac: brcmf_set_channel: set chanspec 0xd0a5 fail,
> reason -52
Do you know if this happens before or after the reconnect has completed?
You could enable CONN debug level in brcmfmac to determine that.
> [ 334.956787] cfg80211: Calling CRDA for country: DE
I guess this message is a bit stale and there is no crda user-mode helper.
> [ 334.990709] cfg80211: Disabling freq 2484.000 MHz
So 2GHz channel 14 gets disabled here probably due to country change to DE.
Not learned a whole lot more from this test round except that reg.c is
active during the reconnect so I suggest to zoom in there. Especially
around the "restoring" message.
Regards,
Arend
> [ 334.991199] cfg80211: Regulatory domain changed to country: DE
> [ 334.991212] cfg80211: DFS Master region: ETSI
> [ 334.991218] cfg80211: (start_freq - end_freq @ bandwidth),
> (max_antenna_gain, max_eirp), (dfs_cac_time)
> [ 334.991236] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz),
> (N/A, 2000 mBm), (N/A)
> [ 334.991249] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz,
> 200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
> [ 334.991261] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz,
> 200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
> [ 334.991273] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz),
> (N/A, 2698 mBm), (0 s)
> [ 334.991284] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz),
> (N/A, 1397 mBm), (N/A)
> [ 334.991296] cfg80211: (5945000 KHz - 6425000 KHz @ 160000 KHz,
> 480000 KHz AUTO), (N/A, 2301 mBm), (N/A)
> [ 334.991307] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz),
> (N/A, 4000 mBm), (N/A)
> [ 397.278378] cfg80211: Verifying active interfaces after reg change
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4219 bytes --]
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2023-12-22 15:18 ` Arend Van Spriel
@ 2023-12-22 15:28 ` Arend Van Spriel
2023-12-26 19:27 ` Stefan Wahren
0 siblings, 1 reply; 41+ messages in thread
From: Arend Van Spriel @ 2023-12-22 15:28 UTC (permalink / raw)
To: Stefan Wahren, Arend van Spriel, Franky Lin, Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
[-- Attachment #1: Type: text/plain, Size: 21667 bytes --]
On December 22, 2023 4:18:19 PM Arend Van Spriel
<arend.vanspriel@broadcom.com> wrote:
> On December 21, 2023 7:40:46 PM Stefan Wahren <wahrenst@gmx.net> wrote:
>
>> Hi Arend,
>>
>> Am 21.12.23 um 18:47 schrieb Arend Van Spriel:
>>>
>>>
>>> On November 18, 2023 12:43:24 PM Stefan Wahren <wahrenst@gmx.net> wrote:
>>>
>>>> Hi Arend,
>>>>
>>>> Am 15.11.23 um 21:09 schrieb Arend van Spriel:
>>>>> On 11/15/2023 7:35 PM, Stefan Wahren wrote:
>>>>>> Am 15.11.23 um 10:34 schrieb Arend van Spriel:
>>>>>>> On 11/13/2023 10:02 PM, Stefan Wahren wrote:
>>>>>>>> Hi Arend,
>>>>>>>>
>>>>>>>> Am 13.11.23 um 10:11 schrieb Arend van Spriel:
>>>>>>>>> On 11/11/2023 9:30 PM, Stefan Wahren wrote:
>>>>>>>>>> Am 11.11.23 um 19:29 schrieb Stefan Wahren:
>>>>>>>>>>>
>>>>>>>>>>> Am 11.11.23 um 18:25 schrieb Arend Van Spriel:
>>>>>>>>>>>> On November 11, 2023 5:48:46 PM Stefan Wahren <wahrenst@gmx.net>
>>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Again look like these are disabled channels. At least chanspec
>>>>>>>>>>>> 0xd022
>>>>>>>>>>>> is 5G channel 34. You say you get this only once so not every 60
>>>>>>>>>>>> seconds?
>>>>>>>>>>> I get this everytime i trigger a reconnect to the wifi
>>>>>>>>>>> network, so
>>>>>>>>>>> not
>>>>>>>>>>> periodically (checked that). Strangely the initial automatic
>>>>>>>>>>> connect
>>>>>>>>>>> doesn't trigger this errors.
>>>>>>>>>> I additionally placed a WARN_ON_ONCE after the error log and
>>>>>>>>>> enabled the
>>>>>>>>>> firmware error log of brcmf_fil_cmd_data(). Maybe this helps.
>>>>>>>>>
>>>>>>>>> It does a bit. At least it shows this is happening with the
>>>>>>>>> dump_survey (again). I don't really understand why though. It
>>>>>>>>> implies
>>>>>>>>> the channel is not disabled, but unclear why. The channel flags are
>>>>>>>>> changed in brcmf_construct_chaninfo() so we probably should focus
>>>>>>>>> debug on that function.
>>>>>>>>
>>>>>>>> i placed a pr_err at the start of brcmf_construct_chaninfo and
>>>>>>>> another
>>>>>>>> pr_err into the for loop before the "if (channel->orig_flags &
>>>>>>>> IEEE80211_CHAN_DISABLED) continue".
>>>>>>>>
>>>>>>>> pr_err("%s: Ch num %d, chanspec 0x%x, orig_flags: %x.\n", __func__,
>>>>>>>> ch.control_ch_num, ch.chspec, channel->orig_flags);
>>>>>>>>
>>>>>>>> It seems that brcmf_construct_chaninfo is called two times, but the
>>>>>>>> results are different. I could find 0xd090 in the first run, but
>>>>>>>> not in
>>>>>>>> second. The other chanspecs doesn't seem to occur in both runs. No
>>>>>>>> idea
>>>>>>>> what's going on here.
>>>>>>>
>>>>>>> Can you print all wiphy band channels before exiting
>>>>>>> brcmf_construct_chaninfo() and print both channel->orig_flags and
>>>>>>> channel->flags?
>>>>>>
>>>>>> Sure. It seems that in the first call of brcmf_construct_chaninfo the
>>>>>> channel 144 is not disabled, but in the second.
>>>>>
>>>>> I am a bit confused. So the chanspec as mentioned in this email
>>>>> subject is no longer observed, but you still see failure in
>>>>> brcmf_set_channel() for other chanspecs?
>>>>
>>>> before we dive deeper into this let me summarize my observations from
>>>> the beginning. From my understanding the errors are triggered for the 5
>>>> GHz channels 34, 38, 42, 46, 144 (chanspec: 0xd022, 0xd026, 0xd02a,
>>>> 0xd090). So i would focus my observations on those.
>>>>
>>>> As you said that the channel flags are set in brcmf_construct_chaninfo()
>>>> i dump them, here is the output of the first call:
>>>>
>>>> [ 8.785850] brcmfmac: 5 GHz: 0: hw_value 34: orig_flags: 00080000,
>>>> flags 00000001
>>>> [ 8.785861] brcmfmac: 5 GHz: 2: hw_value 38: orig_flags: 00080000,
>>>> flags 00000001
>>>> [ 8.785872] brcmfmac: 5 GHz: 4: hw_value 42: orig_flags: 00080000,
>>>> flags 00000001
>>>> [ 8.785882] brcmfmac: 5 GHz: 6: hw_value 46: orig_flags: 00080000,
>>>> flags 00000001
>>>> [ 8.785974] brcmfmac: 5 GHz: 23: hw_value 144: orig_flags: 00080000,
>>>> flags 0000011a
>>>>
>>>> All of them except 144 are disabled via flags. Btw wpa_supplicant is
>>>> configured to country DE within the configuration.
>>>>
>>>> The second and last time brcmf_construct_chaninfo() is called is a few
>>>> seconds later during boot, we get the following:
>>>>
>>>> [ 12.490877] brcmfmac: 5 GHz: 0: hw_value 34: orig_flags: 00080000,
>>>> flags 00000001
>>>> [ 12.490891] brcmfmac: 5 GHz: 2: hw_value 38: orig_flags: 00080000,
>>>> flags 00000001
>>>> [ 12.490904] brcmfmac: 5 GHz: 4: hw_value 42: orig_flags: 00080000,
>>>> flags 00000001
>>>> [ 12.490918] brcmfmac: 5 GHz: 6: hw_value 46: orig_flags: 00080000,
>>>> flags 00000001
>>>> [ 12.491031] brcmfmac: 5 GHz: 23: hw_value 144: orig_flags: 00080000,
>>>> flags 00000001
>>>>
>>>> Now all of them are disabled via flags.
>>>>
>>>> So after that i trigger the reconnect to the same 5 GHz network as
>>>> before. brcmf_construct_chaninfo is never called again, but at the time
>>>> brcmf_set_channel is called the flags for these channels are completely
>>>> different:
>>>>
>>>> [ 90.010002] brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail,
>>>> reason -52
>>>> [ 90.010017] brcmfmac: hw_value 34, orig_flags: 00080000, flags
>>>> 00080220
>>>> [ 90.120007] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
>>>> [ 90.120038] brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail,
>>>> reason -52
>>>> [ 90.120053] brcmfmac: hw_value 38, orig_flags: 00080000, flags
>>>> 00080200
>>>> [ 90.230029] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
>>>> [ 90.230058] brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail,
>>>> reason -52
>>>> [ 90.230073] brcmfmac: hw_value 42, orig_flags: 00080000, flags
>>>> 00080200
>>>> [ 90.340042] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
>>>> [ 90.340071] brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail,
>>>> reason -52
>>>> [ 90.340086] brcmfmac: hw_value 46, orig_flags: 00080000, flags
>>>> 00080210
>>>> [ 92.100073] ieee80211 phy0: brcmf_fil_cmd_data: Firmware error: (-20)
>>>> [ 92.100110] brcmfmac: brcmf_set_channel: set chanspec 0xd090 fail,
>>>> reason -52
>>>> [ 92.100126] brcmfmac: hw_value 144, orig_flags: 00080000, flags
>>>> 00080118
>>>>
>>>> Where does these new flags come from? It's clear that these doesn't come
>>>> from brcmf_construct_chaninfo(). So what manipulates the flags
>>>> afterwards? Shouldn't brcmf_construct_chaninfo() called on reconnect?
>>>
>>> I suspect it is not the driver, but net/wireless/reg.c. Could you
>>> define DEBUG in top of that file and build cfg80211.ko with that. Or
>>> if you have CONFIG_DYNAMIC_DEBUG enable debug prints for reg.c through
>>> sysfs [1]
>> Sure, this is a more recent Linux 6.7 and the disconnect is at uptime
>> ~316s followed by the reconnect:
>>
>> [ 0.000000] Booting Linux on physical CPU 0x0
>> [ 0.000000] Linux version 6.7.0-rc6-00022-g55cb5f43689d-dirty
>> (stefanw@stefanw-SCHENKER) (arm-linux-gnueabihf-gcc (GCC) 11.3.1
>> 20220604 [releases/gcc-11 revision
>> 591c0f4b92548e3ae2e8173f4f93984b1c7f62bb], GNU ld
>> (Linaro_Binutils-2022.06) 2.37.20220122) #175 SMP Thu Dec 21 19:15:10
>> CET 2023
>> [ 0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7),
>> cr=10c5383d
>> [ 0.000000] CPU: div instructions available: patching division code
>> [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing
>> instruction cache
>> [ 0.000000] OF: fdt: Machine model: Raspberry Pi 3 Model B Plus Rev 1.3
>> ...
>> [ 9.538797] cfg80211: Loading compiled-in X.509 certificates for
>> regulatory database
>> [ 9.699412] usb 1-1.3: USB disconnect, device number 4
>> [ 9.716116] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
>> [ 9.760066] brcmfmac: brcmf_fw_alloc_request: using
>> brcm/brcmfmac43455-sdio for chip BCM4345/6
>> [ 9.770023] cfg80211: loaded regulatory.db is malformed or signature
>> is missing/invalid
>> [ 9.770047] cfg80211: Restoring regulatory settings
>> [ 9.770057] cfg80211: Kicking the queue
>> [ 9.770078] cfg80211: Calling CRDA to update world regulatory domain
>> [ 9.801533] Console: switching to colour dummy device 80x30
>> [ 9.813535] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4])
>> [ 9.816895] vc4-drm soc:gpu: bound 3f902000.hdmi (ops vc4_hdmi_ops [vc4])
>> [ 9.817106] vc4-drm soc:gpu: bound 3f806000.vec (ops vc4_vec_ops [vc4])
>> [ 9.817282] vc4-drm soc:gpu: bound 3f004000.txp (ops vc4_txp_ops [vc4])
>> [ 9.817413] vc4-drm soc:gpu: bound 3f206000.pixelvalve (ops
>> vc4_crtc_ops [vc4])
>> [ 9.817538] vc4-drm soc:gpu: bound 3f207000.pixelvalve (ops
>> vc4_crtc_ops [vc4])
>> [ 9.817745] vc4-drm soc:gpu: bound 3f807000.pixelvalve (ops
>> vc4_crtc_ops [vc4])
>> [ 9.817864] vc4-drm soc:gpu: bound 3fc00000.v3d (ops vc4_v3d_ops [vc4])
>> [ 9.823689] Bluetooth: hci0: BCM: chip id 107
>> [ 9.825669] Bluetooth: hci0: BCM: features 0x2f
>> [ 9.826383] [drm] Initialized vc4 0.0.0 20140616 for soc:gpu on minor 0
>> [ 9.827278] Bluetooth: hci0: BCM4345C0
>> [ 9.827291] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0000
>> [ 9.869190] Bluetooth: hci0: BCM4345C0
>> 'brcm/BCM4345C0.raspberrypi,3-model-b-plus.hcd' Patch
>> [ 9.915063] Console: switching to colour frame buffer device 240x75
>> [ 9.944429] vc4-drm soc:gpu: [drm] fb0: vc4drmfb frame buffer device
>> [ 9.958353] hub 1-1:1.0: USB hub found
>> [ 9.958412] hub 1-1:1.0: 4 ports detected
>> [ 9.992604] onboard-usb-hub 3f980000.usb:usb-port@1: supply vdd not
>> found, using dummy regulator
>> [ 9.994313] onboard-usb-hub 3f980000.usb:usb-port@1:usb-port@1:
>> supply vdd not found, using dummy regulator
>> [ 9.995590] hub 1-1:1.0: USB hub found
>> [ 9.995690] hub 1-1:1.0: 4 ports detected
>> [ 9.998640] onboard-usb-hub 3f980000.usb:usb-port@1:usb-port@1:
>> supply vdd not found, using dummy regulator
>> [ 10.086053] usbcore: registered new interface driver lan78xx
>> [ 10.094129] brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob
>> available (err=-2)
>> [ 10.098005] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0:
>> Nov 1 2021 00:37:25 version 7.45.241 (1a2f2fa CY) FWID 01-703fd60
>> [ 10.135643] cfg80211: Ignoring regulatory request set by core since
>> the driver uses its own custom regulatory domain
>> [ 10.307704] usb 1-1.1: new high-speed USB device number 7 using dwc2
>> [ 10.452108] hub 1-1.1:1.0: USB hub found
>> [ 10.452310] hub 1-1.1:1.0: 3 ports detected
>> [ 10.557660] usb 1-1.3: new low-speed USB device number 8 using dwc2
>> [ 10.726697] input: PixArt Microsoft USB Optical Mouse as
>> /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:045E:00CB.0003/input/input2
>> [ 10.727785] hid-generic 0003:045E:00CB.0003: input: USB HID v1.11
>> Mouse [PixArt Microsoft USB Optical Mouse] on usb-3f980000.usb-1.3/input0
>> [ 10.797638] usb 1-1.1.2: new low-speed USB device number 9 using dwc2
>> [ 10.957069] input: HID 046a:0011 as
>> /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/0003:046A:0011.0004/input/input3
>> [ 11.019525] hid-generic 0003:046A:0011.0004: input: USB HID v1.11
>> Keyboard [HID 046a:0011] on usb-3f980000.usb-1.1.2/input0
>> [ 11.048402] Bluetooth: hci0: BCM: features 0x2f
>> [ 11.050164] Bluetooth: hci0: BCM43455 37.4MHz Raspberry Pi 3+-0190
>> [ 11.050178] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0382
>> [ 11.324175] usb 1-1.1.1: new high-speed USB device number 10 using dwc2
>> [ 11.714298] lan78xx 1-1.1.1:1.0 (unnamed net_device) (uninitialized):
>> No External EEPROM. Setting MAC Speed
>> [ 11.854291] cfg80211: Pending regulatory request, waiting for it to
>> be processed...
>> [ 12.099129] cfg80211: Ignoring regulatory request set by core since
>> the driver uses its own custom regulatory domain
>> [ 12.099161] cfg80211: World regulatory domain updated:
>> [ 12.099168] cfg80211: DFS Master region: unset
>> [ 12.099174] cfg80211: (start_freq - end_freq @ bandwidth),
>> (max_antenna_gain, max_eirp), (dfs_cac_time)
>> [ 12.099189] cfg80211: (755000 KHz - 928000 KHz @ 2000 KHz), (N/A,
>> 2000 mBm), (N/A)
>> [ 12.099201] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz),
>> (N/A, 2000 mBm), (N/A)
>> [ 12.099213] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000
>> KHz AUTO), (N/A, 2000 mBm), (N/A)
>> [ 12.099224] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz),
>> (N/A, 2000 mBm), (N/A)
>> [ 12.099235] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz,
>> 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
>> [ 12.099248] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz,
>> 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
>> [ 12.099259] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz),
>> (N/A, 2000 mBm), (0 s)
>> [ 12.099269] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz),
>> (N/A, 2000 mBm), (N/A)
>> [ 12.099280] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz),
>> (N/A, 0 mBm), (N/A)
>> [ 12.101316] cfg80211: Calling CRDA for country: DE
>> [ 12.125129] cfg80211: Disabling freq 2484.000 MHz
>> [ 12.176440] cfg80211: Regulatory domain changed to country: DE
>> [ 12.176459] cfg80211: DFS Master region: ETSI
>> [ 12.176464] cfg80211: (start_freq - end_freq @ bandwidth),
>> (max_antenna_gain, max_eirp), (dfs_cac_time)
>> [ 12.176473] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz),
>> (N/A, 2000 mBm), (N/A)
>> [ 12.176487] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz,
>> 200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
>> [ 12.176496] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz,
>> 200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
>> [ 12.176504] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz),
>> (N/A, 2698 mBm), (0 s)
>> [ 12.176512] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz),
>> (N/A, 1397 mBm), (N/A)
>> [ 12.176521] cfg80211: (5945000 KHz - 6425000 KHz @ 160000 KHz,
>> 480000 KHz AUTO), (N/A, 2301 mBm), (N/A)
>> [ 12.176529] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz),
>> (N/A, 4000 mBm), (N/A)
>> [ 13.893866] Adding 102396k swap on /var/swap. Priority:-2 extents:1
>> across:102396k SS
>> [ 14.530323] lan78xx 1-1.1.1:1.0 eth0: Link is Down
>> [ 14.641536] Bluetooth: MGMT ver 1.22
>> [ 14.689962] NET: Registered PF_ALG protocol family
>> [ 14.744513] cryptd: max_cpu_qlen set to 1000
>> [ 16.791666] cfg80211: Found new beacon on frequency: 5180.000 MHz (Ch
>> 36) on phy0
>> [ 16.791716] cfg80211: Found new beacon on frequency: 5220.000 MHz (Ch
>> 44) on phy0
>> [ 20.481971] cfg80211: Calling CRDA for country: DE
>> [ 20.501082] cfg80211: Disabling freq 2484.000 MHz
>> [ 20.501465] cfg80211: Regulatory domain changed to country: DE
>> [ 20.501471] cfg80211: DFS Master region: ETSI
>> [ 20.501475] cfg80211: (start_freq - end_freq @ bandwidth),
>> (max_antenna_gain, max_eirp), (dfs_cac_time)
>> [ 20.501490] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz),
>> (N/A, 2000 mBm), (N/A)
>> [ 20.501497] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz,
>> 200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
>> [ 20.501504] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz,
>> 200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
>> [ 20.501511] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz),
>> (N/A, 2698 mBm), (0 s)
>> [ 20.501517] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz),
>> (N/A, 1397 mBm), (N/A)
>> [ 20.501524] cfg80211: (5945000 KHz - 6425000 KHz @ 160000 KHz,
>> 480000 KHz AUTO), (N/A, 2301 mBm), (N/A)
>> [ 20.501531] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz),
>> (N/A, 4000 mBm), (N/A)
>> [ 46.174010] systemd-journald[125]: Failed to set ACL on
>> /var/log/journal/0b443a02fdd340c68f8aac17d2e5ebf8/user-1000.journal,
>> ignoring: Operation not supported
>> [ 84.956286] cfg80211: Verifying active interfaces after reg change
>> [ 128.323869] cfg80211: Found new beacon on frequency: 2472.000 MHz (Ch
>> 13) on phy0
>> [ 192.477390] cfg80211: Verifying active interfaces after reg change
>> [ 316.329988] cfg80211: All devices are disconnected, going to restore
>> regulatory settings
>
> Ok. So here the disconnect happens...
>
>> [ 316.330038] cfg80211: Restoring regulatory settings while preserving
>> user preference for: DE
>> [ 316.330063] cfg80211: Ignoring regulatory request set by core since
>> the driver uses its own custom regulatory domain
>> [ 316.330088] cfg80211: World regulatory domain updated:
>> [ 316.330097] cfg80211: DFS Master region: unset
>> [ 316.330104] cfg80211: (start_freq - end_freq @ bandwidth),
>> (max_antenna_gain, max_eirp), (dfs_cac_time)
>> [ 316.330120] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (600
>> mBi, 2000 mBm), (N/A)
>> [ 316.330140] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000
>> KHz AUTO), (600 mBi, 2000 mBm), (N/A)
>> [ 316.330156] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (600
>> mBi, 2000 mBm), (N/A)
>> [ 316.330172] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz,
>> 160000 KHz AUTO), (600 mBi, 2000 mBm), (N/A)
>> [ 316.330190] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz,
>> 160000 KHz AUTO), (600 mBi, 2000 mBm), (0 s)
>> [ 316.330206] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz),
>> (600 mBi, 2000 mBm), (0 s)
>> [ 316.330222] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (600
>> mBi, 2000 mBm), (N/A)
>> [ 316.330238] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz),
>> (N/A, 0 mBm), (N/A)
>> [ 316.330307] cfg80211: Disabling freq 2484.000 MHz
>> [ 316.340457] cfg80211: Regulatory domain changed to country: DE
>> [ 316.340487] cfg80211: DFS Master region: ETSI
>> [ 316.340495] cfg80211: (start_freq - end_freq @ bandwidth),
>> (max_antenna_gain, max_eirp), (dfs_cac_time)
>> [ 316.340511] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz),
>> (N/A, 2000 mBm), (N/A)
>> [ 316.340529] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz,
>> 200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
>> [ 316.340547] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz,
>> 200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
>> [ 316.340563] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz),
>> (N/A, 2698 mBm), (0 s)
>> [ 316.340577] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz),
>> (N/A, 1397 mBm), (N/A)
>> [ 316.340592] cfg80211: (5945000 KHz - 6425000 KHz @ 160000 KHz,
>> 480000 KHz AUTO), (N/A, 2301 mBm), (N/A)
>> [ 316.340607] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz),
>> (N/A, 4000 mBm), (N/A)
>> [ 316.340643] cfg80211: Kicking the queue
>> [ 331.276421] cfg80211: Found new beacon on frequency: 5180.000 MHz (Ch
>> 36) on phy0
>> [ 331.276494] cfg80211: Found new beacon on frequency: 5220.000 MHz (Ch
>> 44) on phy0
>> [ 331.276562] cfg80211: Found new beacon on frequency: 2472.000 MHz (Ch
>> 13) on phy0
>> [ 332.729896] brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail,
>> reason -52
>> [ 332.840008] brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail,
>> reason -52
>> [ 332.949910] brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail,
>> reason -52
>> [ 333.059802] brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail,
>> reason -52
>> [ 334.819896] brcmfmac: brcmf_set_channel: set chanspec 0xd090 fail,
>> reason -52
>> [ 334.820318] brcmfmac: brcmf_set_channel: set chanspec 0xd095 fail,
>> reason -52
>> [ 334.820719] brcmfmac: brcmf_set_channel: set chanspec 0xd099 fail,
>> reason -52
>> [ 334.821120] brcmfmac: brcmf_set_channel: set chanspec 0xd09d fail,
>> reason -52
>> [ 334.821521] brcmfmac: brcmf_set_channel: set chanspec 0xd0a1 fail,
>> reason -52
>> [ 334.821922] brcmfmac: brcmf_set_channel: set chanspec 0xd0a5 fail,
>> reason -52
>
> Do you know if this happens before or after the reconnect has completed?
> You could enable CONN debug level in brcmfmac to determine that.
>
>> [ 334.956787] cfg80211: Calling CRDA for country: DE
>
> I guess this message is a bit stale and there is no crda user-mode helper.
>
>> [ 334.990709] cfg80211: Disabling freq 2484.000 MHz
>
> So 2GHz channel 14 gets disabled here probably due to country change to DE.
>
> Not learned a whole lot more from this test round except that reg.c is
> active during the reconnect so I suggest to zoom in there. Especially
> around the "restoring" message.
I wonder whether we end up in restore_custom_reg_settings() which does:
chan->flags = chan->orig_flags;
for each channel. That would re-enable those channels. Have you always seen
this or at certain kernel update or wpa_supplicant maybe?
Regards,
Arend
>
> Regards,
> Arend
>
>> [ 334.991199] cfg80211: Regulatory domain changed to country: DE
>> [ 334.991212] cfg80211: DFS Master region: ETSI
>> [ 334.991218] cfg80211: (start_freq - end_freq @ bandwidth),
>> (max_antenna_gain, max_eirp), (dfs_cac_time)
>> [ 334.991236] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz),
>> (N/A, 2000 mBm), (N/A)
>> [ 334.991249] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz,
>> 200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
>> [ 334.991261] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz,
>> 200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
>> [ 334.991273] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz),
>> (N/A, 2698 mBm), (0 s)
>> [ 334.991284] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz),
>> (N/A, 1397 mBm), (N/A)
>> [ 334.991296] cfg80211: (5945000 KHz - 6425000 KHz @ 160000 KHz,
>> 480000 KHz AUTO), (N/A, 2301 mBm), (N/A)
>> [ 334.991307] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz),
>> (N/A, 4000 mBm), (N/A)
>> [ 397.278378] cfg80211: Verifying active interfaces after reg change
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4219 bytes --]
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2023-12-22 15:28 ` Arend Van Spriel
@ 2023-12-26 19:27 ` Stefan Wahren
2024-01-16 14:09 ` Johannes Berg
0 siblings, 1 reply; 41+ messages in thread
From: Stefan Wahren @ 2023-12-26 19:27 UTC (permalink / raw)
To: Arend Van Spriel, Arend van Spriel, Franky Lin, Hante Meuleman,
Johannes Berg
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
Hi Arend,
[add Johannes]
Am 22.12.23 um 16:28 schrieb Arend Van Spriel:
>
>
> On December 22, 2023 4:18:19 PM Arend Van Spriel
> <arend.vanspriel@broadcom.com> wrote:
>
>> On December 21, 2023 7:40:46 PM Stefan Wahren <wahrenst@gmx.net> wrote:
>>
>> Do you know if this happens before or after the reconnect has completed?
>> You could enable CONN debug level in brcmfmac to determine that.
before the reconnect
>>
>>> [ 334.956787] cfg80211: Calling CRDA for country: DE
>>
>> I guess this message is a bit stale and there is no crda user-mode
>> helper.
>>
>>> [ 334.990709] cfg80211: Disabling freq 2484.000 MHz
>>
>> So 2GHz channel 14 gets disabled here probably due to country change
>> to DE.
>>
>> Not learned a whole lot more from this test round except that reg.c is
>> active during the reconnect so I suggest to zoom in there. Especially
>> around the "restoring" message.
>
> I wonder whether we end up in restore_custom_reg_settings() which does:
>
> chan->flags = chan->orig_flags;
>
> for each channel. That would re-enable those channels.
Bingo
This caused the problem. Since brcmf_construct_chaninfo() is only called
once and only changes the flags but never orig_flags, the information
about disabled channels get lost (logs are focused on hw_value 34):
[ 10.294909] cfg80211: Loading compiled-in X.509 certificates for
regulatory database
[ 10.717262] brcmfmac: brcmf_fw_alloc_request: using
brcm/brcmfmac43455-sdio for chip BCM4345/6
[ 10.718408] cfg80211: loaded regulatory.db is malformed or signature
is missing/invalid
[ 10.718427] cfg80211: Restoring regulatory settings
[ 10.718435] cfg80211: Kicking the queue
[ 10.718452] cfg80211: Calling CRDA to update world regulatory domain
[ 10.948418] brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob
available (err=-2)
[ 10.948764] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0:
Nov 1 2021 00:37:25 version 7.45.241 (1a2f2fa CY) FWID 01-703fd60
[ 10.982088] cfg80211: handle_channel_custom: hw_value 34, orig_flags:
00000000, flags 00000000
[ 10.982346] cfg80211: Ignoring regulatory request set by core since
the driver uses its own custom regulatory domain
The channel 34 has been disabled by brcmf_construct_chaninfo():
[ 11.025681] brcmfmac: brcmf_construct_chaninfo: hw_value 34,
orig_flags: 00080000, flags 00000001
[ 13.045508] cfg80211: Pending regulatory request, waiting for it to
be processed...
[ 13.237669] cfg80211: Ignoring regulatory request set by core since
the driver uses its own custom regulatory domain
[ 13.237692] cfg80211: World regulatory domain updated:
[ 13.237696] cfg80211: DFS Master region: unset
[ 13.237701] cfg80211: (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp), (dfs_cac_time)
[ 13.237709] cfg80211: (755000 KHz - 928000 KHz @ 2000 KHz), (N/A,
2000 mBm), (N/A)
[ 13.237717] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz),
(N/A, 2000 mBm), (N/A)
[ 13.237726] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000
KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 13.237734] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz),
(N/A, 2000 mBm), (N/A)
[ 13.237742] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz,
160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 13.237750] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz,
160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 13.237758] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz),
(N/A, 2000 mBm), (0 s)
[ 13.237765] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz),
(N/A, 2000 mBm), (N/A)
[ 13.237772] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz),
(N/A, 0 mBm), (N/A)
[ 13.237814] cfg80211: Calling CRDA for country: DE
[ 13.262648] cfg80211: Disabling freq 2484.000 MHz
[ 13.262687] cfg80211: handle_channel: hw_value 34, orig_flags:
00080000, flags 00000001
[ 13.262696] cfg80211: handle_channel_single_rule: hw_value 34,
orig_flags: 00080000, flags 00000001
[ 13.359105] brcmfmac: brcmf_construct_chaninfo: hw_value 34,
orig_flags: 00080000, flags 00000001
[ 13.360210] cfg80211: Regulatory domain changed to country: DE
[ 13.360231] cfg80211: DFS Master region: ETSI
[ 13.360235] cfg80211: (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp), (dfs_cac_time)
[ 13.360246] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz),
(N/A, 2000 mBm), (N/A)
[ 13.360256] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz,
200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
[ 13.360265] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz,
200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 13.360281] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz),
(N/A, 2698 mBm), (0 s)
[ 13.360289] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz),
(N/A, 1397 mBm), (N/A)
[ 13.360296] cfg80211: (5945000 KHz - 6425000 KHz @ 160000 KHz,
480000 KHz AUTO), (N/A, 2301 mBm), (N/A)
[ 13.360303] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz),
(N/A, 4000 mBm), (N/A)
[ 17.172301] cfg80211: Found new beacon on frequency: 5180.000 MHz (Ch
36) on phy0
[ 17.172326] cfg80211: Found new beacon on frequency: 5220.000 MHz (Ch
44) on phy0
[ 20.800666] cfg80211: Calling CRDA for country: DE
[ 20.834453] cfg80211: Disabling freq 2484.000 MHz
[ 20.834487] cfg80211: handle_channel: hw_value 34, orig_flags:
00080000, flags 00000001
[ 20.834503] cfg80211: handle_channel_single_rule: hw_value 34,
orig_flags: 00080000, flags 00000001
[ 20.835045] cfg80211: Regulatory domain changed to country: DE
[ 20.835057] cfg80211: DFS Master region: ETSI
[ 20.835063] cfg80211: (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp), (dfs_cac_time)
[ 20.835075] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz),
(N/A, 2000 mBm), (N/A)
[ 20.835095] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz,
200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
[ 20.835109] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz,
200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 20.835122] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz),
(N/A, 2698 mBm), (0 s)
[ 20.835135] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz),
(N/A, 1397 mBm), (N/A)
[ 20.835148] cfg80211: (5945000 KHz - 6425000 KHz @ 160000 KHz,
480000 KHz AUTO), (N/A, 2301 mBm), (N/A)
[ 20.835160] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz),
(N/A, 4000 mBm), (N/A)
[ 84.952323] cfg80211: Verifying active interfaces after reg change
[ 344.070588] cfg80211: All devices are disconnected, going to restore
regulatory settings
[ 344.070619] cfg80211: Restoring regulatory settings while preserving
user preference for: DE
Dump after restore_custom_reg_settings() is finished (channel 34 is
re-enabled):
[ 344.070639] cfg80211: restore_custom_reg_settings: hw_value 34,
orig_flags: 00080000, flags 00080000
[ 344.070660] cfg80211: Ignoring regulatory request set by core since
the driver uses its own custom regulatory domain
[ 344.070675] cfg80211: World regulatory domain updated:
[ 344.070684] cfg80211: DFS Master region: unset
[ 344.070692] cfg80211: (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp), (dfs_cac_time)
[ 344.070706] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (600
mBi, 2000 mBm), (N/A)
[ 344.070724] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000
KHz AUTO), (600 mBi, 2000 mBm), (N/A)
[ 344.070741] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (600
mBi, 2000 mBm), (N/A)
[ 344.070758] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz,
160000 KHz AUTO), (600 mBi, 2000 mBm), (N/A)
[ 344.070775] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz,
160000 KHz AUTO), (600 mBi, 2000 mBm), (0 s)
[ 344.070792] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz),
(600 mBi, 2000 mBm), (0 s)
[ 344.070808] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (600
mBi, 2000 mBm), (N/A)
[ 344.070824] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz),
(N/A, 0 mBm), (N/A)
[ 344.070881] cfg80211: Disabling freq 2484.000 MHz
[ 344.070893] cfg80211: handle_channel: hw_value 34, orig_flags:
00080000, flags 00080000
[ 344.070916] cfg80211: handle_channel_single_rule: hw_value 34,
orig_flags: 00080000, flags 00080000
[ 344.071487] cfg80211: Regulatory domain changed to country: DE
[ 344.071499] cfg80211: DFS Master region: ETSI
[ 344.071506] cfg80211: (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp), (dfs_cac_time)
[ 344.071519] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz),
(N/A, 2000 mBm), (N/A)
[ 344.071536] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz,
200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
[ 344.071552] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz,
200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 344.071567] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz),
(N/A, 2698 mBm), (0 s)
[ 344.071582] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz),
(N/A, 1397 mBm), (N/A)
[ 344.071597] cfg80211: (5945000 KHz - 6425000 KHz @ 160000 KHz,
480000 KHz AUTO), (N/A, 2301 mBm), (N/A)
[ 344.071611] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz),
(N/A, 4000 mBm), (N/A)
[ 344.071634] cfg80211: Kicking the queue
[ 344.745318] cfg80211: Found new beacon on frequency: 5180.000 MHz (Ch
36) on phy0
[ 344.745369] cfg80211: Found new beacon on frequency: 5220.000 MHz (Ch
44) on phy0
[ 346.174985] brcmfmac: set chanspec 0xd022 fail, reason -52
[ 346.175018] brcmfmac: hw_value 34, orig_flags: 00080000, flags 00080220
> Have you always seen this or at certain kernel update or
> wpa_supplicant maybe?
As written in the initial message i've tested Linux 6.3, 6.6 and 6.7-rc6
with wpa_supplicant 2.9 so far and saw this issue in these cases.
How far should i go?
I modified brcmf_construct_chaninfo() to store the
IEEE80211_CHAN_DISABLED flag within orig_flags in case the flags had it.
This avoid the issue. Not sure this is the proper solution.
Best regards
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2023-12-26 19:27 ` Stefan Wahren
@ 2024-01-16 14:09 ` Johannes Berg
2024-01-16 18:29 ` Arend Van Spriel
0 siblings, 1 reply; 41+ messages in thread
From: Johannes Berg @ 2024-01-16 14:09 UTC (permalink / raw)
To: Stefan Wahren, Arend Van Spriel, Arend van Spriel, Franky Lin,
Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
On Tue, 2023-12-26 at 20:27 +0100, Stefan Wahren wrote:
> Hi Arend,
>
> [add Johannes]
Sorry this fell through, Intel address ...
Was there a specific question you had?
> > > > [ 334.956787] cfg80211: Calling CRDA for country: DE
> > >
> > > I guess this message is a bit stale and there is no crda user-mode
> > > helper.
It may still try to call it, but I guess nothing will happen.
> > >
> > > > [ 334.990709] cfg80211: Disabling freq 2484.000 MHz
> > >
> > > So 2GHz channel 14 gets disabled here probably due to country change
> > > to DE.
> > >
> > > Not learned a whole lot more from this test round except that reg.c is
> > > active during the reconnect so I suggest to zoom in there. Especially
> > > around the "restoring" message.
> >
> > I wonder whether we end up in restore_custom_reg_settings() which does:
> >
> > chan->flags = chan->orig_flags;
> >
> > for each channel. That would re-enable those channels.
> Bingo
>
> This caused the problem. Since brcmf_construct_chaninfo() is only called
> once and only changes the flags but never orig_flags, the information
> about disabled channels get lost (logs are focused on hw_value 34):
>
> [ 10.294909] cfg80211: Loading compiled-in X.509 certificates for
> regulatory database
> [ 10.717262] brcmfmac: brcmf_fw_alloc_request: using
> brcm/brcmfmac43455-sdio for chip BCM4345/6
> [ 10.718408] cfg80211: loaded regulatory.db is malformed or signature
> is missing/invalid
> [ 10.718427] cfg80211: Restoring regulatory settings
> [ 10.718435] cfg80211: Kicking the queue
> [ 10.718452] cfg80211: Calling CRDA to update world regulatory domain
> [ 10.948418] brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob
> available (err=-2)
> [ 10.948764] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0:
> Nov 1 2021 00:37:25 version 7.45.241 (1a2f2fa CY) FWID 01-703fd60
> [ 10.982088] cfg80211: handle_channel_custom: hw_value 34, orig_flags:
> 00000000, flags 00000000
> [ 10.982346] cfg80211: Ignoring regulatory request set by core since
> the driver uses its own custom regulatory domain
>
> The channel 34 has been disabled by brcmf_construct_chaninfo():
> [ 11.025681] brcmfmac: brcmf_construct_chaninfo: hw_value 34,
> orig_flags: 00080000, flags 00000001
> [ 13.045508] cfg80211: Pending regulatory request, waiting for it to
> be processed...
> [ 13.237669] cfg80211: Ignoring regulatory request set by core since
> the driver uses its own custom regulatory domain
> [ 13.237692] cfg80211: World regulatory domain updated:
> [ 13.237696] cfg80211: DFS Master region: unset
> [ 13.237701] cfg80211: (start_freq - end_freq @ bandwidth),
> (max_antenna_gain, max_eirp), (dfs_cac_time)
> [ 13.237709] cfg80211: (755000 KHz - 928000 KHz @ 2000 KHz), (N/A,
> 2000 mBm), (N/A)
> [ 13.237717] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz),
> (N/A, 2000 mBm), (N/A)
> [ 13.237726] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000
> KHz AUTO), (N/A, 2000 mBm), (N/A)
> [ 13.237734] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz),
> (N/A, 2000 mBm), (N/A)
> [ 13.237742] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz,
> 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
> [ 13.237750] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz,
> 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
> [ 13.237758] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz),
> (N/A, 2000 mBm), (0 s)
> [ 13.237765] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz),
> (N/A, 2000 mBm), (N/A)
> [ 13.237772] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz),
> (N/A, 0 mBm), (N/A)
> [ 13.237814] cfg80211: Calling CRDA for country: DE
> [ 13.262648] cfg80211: Disabling freq 2484.000 MHz
> [ 13.262687] cfg80211: handle_channel: hw_value 34, orig_flags:
> 00080000, flags 00000001
> [ 13.262696] cfg80211: handle_channel_single_rule: hw_value 34,
> orig_flags: 00080000, flags 00000001
> [ 13.359105] brcmfmac: brcmf_construct_chaninfo: hw_value 34,
> orig_flags: 00080000, flags 00000001
> [ 13.360210] cfg80211: Regulatory domain changed to country: DE
> [ 13.360231] cfg80211: DFS Master region: ETSI
> [ 13.360235] cfg80211: (start_freq - end_freq @ bandwidth),
> (max_antenna_gain, max_eirp), (dfs_cac_time)
> [ 13.360246] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz),
> (N/A, 2000 mBm), (N/A)
> [ 13.360256] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz,
> 200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
> [ 13.360265] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz,
> 200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
> [ 13.360281] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz),
> (N/A, 2698 mBm), (0 s)
> [ 13.360289] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz),
> (N/A, 1397 mBm), (N/A)
> [ 13.360296] cfg80211: (5945000 KHz - 6425000 KHz @ 160000 KHz,
> 480000 KHz AUTO), (N/A, 2301 mBm), (N/A)
> [ 13.360303] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz),
> (N/A, 4000 mBm), (N/A)
> [ 17.172301] cfg80211: Found new beacon on frequency: 5180.000 MHz (Ch
> 36) on phy0
> [ 17.172326] cfg80211: Found new beacon on frequency: 5220.000 MHz (Ch
> 44) on phy0
> [ 20.800666] cfg80211: Calling CRDA for country: DE
> [ 20.834453] cfg80211: Disabling freq 2484.000 MHz
> [ 20.834487] cfg80211: handle_channel: hw_value 34, orig_flags:
> 00080000, flags 00000001
> [ 20.834503] cfg80211: handle_channel_single_rule: hw_value 34,
> orig_flags: 00080000, flags 00000001
> [ 20.835045] cfg80211: Regulatory domain changed to country: DE
> [ 20.835057] cfg80211: DFS Master region: ETSI
> [ 20.835063] cfg80211: (start_freq - end_freq @ bandwidth),
> (max_antenna_gain, max_eirp), (dfs_cac_time)
> [ 20.835075] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz),
> (N/A, 2000 mBm), (N/A)
> [ 20.835095] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz,
> 200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
> [ 20.835109] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz,
> 200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
> [ 20.835122] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz),
> (N/A, 2698 mBm), (0 s)
> [ 20.835135] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz),
> (N/A, 1397 mBm), (N/A)
> [ 20.835148] cfg80211: (5945000 KHz - 6425000 KHz @ 160000 KHz,
> 480000 KHz AUTO), (N/A, 2301 mBm), (N/A)
> [ 20.835160] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz),
> (N/A, 4000 mBm), (N/A)
> [ 84.952323] cfg80211: Verifying active interfaces after reg change
> [ 344.070588] cfg80211: All devices are disconnected, going to restore
> regulatory settings
> [ 344.070619] cfg80211: Restoring regulatory settings while preserving
> user preference for: DE
>
> Dump after restore_custom_reg_settings() is finished (channel 34 is
> re-enabled):
> [ 344.070639] cfg80211: restore_custom_reg_settings: hw_value 34,
> orig_flags: 00080000, flags 00080000
> [ 344.070660] cfg80211: Ignoring regulatory request set by core since
> the driver uses its own custom regulatory domain
> [ 344.070675] cfg80211: World regulatory domain updated:
> [ 344.070684] cfg80211: DFS Master region: unset
> [ 344.070692] cfg80211: (start_freq - end_freq @ bandwidth),
> (max_antenna_gain, max_eirp), (dfs_cac_time)
> [ 344.070706] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (600
> mBi, 2000 mBm), (N/A)
> [ 344.070724] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000
> KHz AUTO), (600 mBi, 2000 mBm), (N/A)
> [ 344.070741] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (600
> mBi, 2000 mBm), (N/A)
> [ 344.070758] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz,
> 160000 KHz AUTO), (600 mBi, 2000 mBm), (N/A)
> [ 344.070775] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz,
> 160000 KHz AUTO), (600 mBi, 2000 mBm), (0 s)
> [ 344.070792] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz),
> (600 mBi, 2000 mBm), (0 s)
> [ 344.070808] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (600
> mBi, 2000 mBm), (N/A)
> [ 344.070824] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz),
> (N/A, 0 mBm), (N/A)
> [ 344.070881] cfg80211: Disabling freq 2484.000 MHz
> [ 344.070893] cfg80211: handle_channel: hw_value 34, orig_flags:
> 00080000, flags 00080000
> [ 344.070916] cfg80211: handle_channel_single_rule: hw_value 34,
> orig_flags: 00080000, flags 00080000
> [ 344.071487] cfg80211: Regulatory domain changed to country: DE
> [ 344.071499] cfg80211: DFS Master region: ETSI
> [ 344.071506] cfg80211: (start_freq - end_freq @ bandwidth),
> (max_antenna_gain, max_eirp), (dfs_cac_time)
> [ 344.071519] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz),
> (N/A, 2000 mBm), (N/A)
> [ 344.071536] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz,
> 200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
> [ 344.071552] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz,
> 200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
> [ 344.071567] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz),
> (N/A, 2698 mBm), (0 s)
> [ 344.071582] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz),
> (N/A, 1397 mBm), (N/A)
> [ 344.071597] cfg80211: (5945000 KHz - 6425000 KHz @ 160000 KHz,
> 480000 KHz AUTO), (N/A, 2301 mBm), (N/A)
> [ 344.071611] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz),
> (N/A, 4000 mBm), (N/A)
> [ 344.071634] cfg80211: Kicking the queue
> [ 344.745318] cfg80211: Found new beacon on frequency: 5180.000 MHz (Ch
> 36) on phy0
> [ 344.745369] cfg80211: Found new beacon on frequency: 5220.000 MHz (Ch
> 44) on phy0
> [ 346.174985] brcmfmac: set chanspec 0xd022 fail, reason -52
> [ 346.175018] brcmfmac: hw_value 34, orig_flags: 00080000, flags 00080220
> > Have you always seen this or at certain kernel update or
> > wpa_supplicant maybe?
> As written in the initial message i've tested Linux 6.3, 6.6 and 6.7-rc6
> with wpa_supplicant 2.9 so far and saw this issue in these cases.
>
> How far should i go?
>
> I modified brcmf_construct_chaninfo() to store the
> IEEE80211_CHAN_DISABLED flag within orig_flags in case the flags had it.
> This avoid the issue. Not sure this is the proper solution.
>
orig_flags are from when the wiphy is registered - does the driver only
set up proper flags after that?
johannes
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-01-16 14:09 ` Johannes Berg
@ 2024-01-16 18:29 ` Arend Van Spriel
2024-02-13 10:15 ` Johannes Berg
0 siblings, 1 reply; 41+ messages in thread
From: Arend Van Spriel @ 2024-01-16 18:29 UTC (permalink / raw)
To: Johannes Berg, Stefan Wahren, Arend van Spriel, Franky Lin,
Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
[-- Attachment #1: Type: text/plain, Size: 10862 bytes --]
On January 16, 2024 3:09:45 PM Johannes Berg <johannes@sipsolutions.net> wrote:
> On Tue, 2023-12-26 at 20:27 +0100, Stefan Wahren wrote:
>> Hi Arend,
>>
>> [add Johannes]
>
> Sorry this fell through, Intel address ...
>
> Was there a specific question you had?
>
>>>>> [ 334.956787] cfg80211: Calling CRDA for country: DE
>>>>
>>>> I guess this message is a bit stale and there is no crda user-mode
>>>> helper.
>
> It may still try to call it, but I guess nothing will happen.
>
>>>>
>>>>> [ 334.990709] cfg80211: Disabling freq 2484.000 MHz
>>>>
>>>> So 2GHz channel 14 gets disabled here probably due to country change
>>>> to DE.
>>>>
>>>> Not learned a whole lot more from this test round except that reg.c is
>>>> active during the reconnect so I suggest to zoom in there. Especially
>>>> around the "restoring" message.
>>>
>>> I wonder whether we end up in restore_custom_reg_settings() which does:
>>>
>>> chan->flags = chan->orig_flags;
>>>
>>> for each channel. That would re-enable those channels.
>> Bingo
>>
>> This caused the problem. Since brcmf_construct_chaninfo() is only called
>> once and only changes the flags but never orig_flags, the information
>> about disabled channels get lost (logs are focused on hw_value 34):
>>
>> [ 10.294909] cfg80211: Loading compiled-in X.509 certificates for
>> regulatory database
>> [ 10.717262] brcmfmac: brcmf_fw_alloc_request: using
>> brcm/brcmfmac43455-sdio for chip BCM4345/6
>> [ 10.718408] cfg80211: loaded regulatory.db is malformed or signature
>> is missing/invalid
>> [ 10.718427] cfg80211: Restoring regulatory settings
>> [ 10.718435] cfg80211: Kicking the queue
>> [ 10.718452] cfg80211: Calling CRDA to update world regulatory domain
>> [ 10.948418] brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob
>> available (err=-2)
>> [ 10.948764] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0:
>> Nov 1 2021 00:37:25 version 7.45.241 (1a2f2fa CY) FWID 01-703fd60
>> [ 10.982088] cfg80211: handle_channel_custom: hw_value 34, orig_flags:
>> 00000000, flags 00000000
>> [ 10.982346] cfg80211: Ignoring regulatory request set by core since
>> the driver uses its own custom regulatory domain
>>
>> The channel 34 has been disabled by brcmf_construct_chaninfo():
>> [ 11.025681] brcmfmac: brcmf_construct_chaninfo: hw_value 34,
>> orig_flags: 00080000, flags 00000001
>> [ 13.045508] cfg80211: Pending regulatory request, waiting for it to
>> be processed...
>> [ 13.237669] cfg80211: Ignoring regulatory request set by core since
>> the driver uses its own custom regulatory domain
>> [ 13.237692] cfg80211: World regulatory domain updated:
>> [ 13.237696] cfg80211: DFS Master region: unset
>> [ 13.237701] cfg80211: (start_freq - end_freq @ bandwidth),
>> (max_antenna_gain, max_eirp), (dfs_cac_time)
>> [ 13.237709] cfg80211: (755000 KHz - 928000 KHz @ 2000 KHz), (N/A,
>> 2000 mBm), (N/A)
>> [ 13.237717] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz),
>> (N/A, 2000 mBm), (N/A)
>> [ 13.237726] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000
>> KHz AUTO), (N/A, 2000 mBm), (N/A)
>> [ 13.237734] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz),
>> (N/A, 2000 mBm), (N/A)
>> [ 13.237742] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz,
>> 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
>> [ 13.237750] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz,
>> 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
>> [ 13.237758] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz),
>> (N/A, 2000 mBm), (0 s)
>> [ 13.237765] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz),
>> (N/A, 2000 mBm), (N/A)
>> [ 13.237772] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz),
>> (N/A, 0 mBm), (N/A)
>> [ 13.237814] cfg80211: Calling CRDA for country: DE
>> [ 13.262648] cfg80211: Disabling freq 2484.000 MHz
>> [ 13.262687] cfg80211: handle_channel: hw_value 34, orig_flags:
>> 00080000, flags 00000001
>> [ 13.262696] cfg80211: handle_channel_single_rule: hw_value 34,
>> orig_flags: 00080000, flags 00000001
>> [ 13.359105] brcmfmac: brcmf_construct_chaninfo: hw_value 34,
>> orig_flags: 00080000, flags 00000001
>> [ 13.360210] cfg80211: Regulatory domain changed to country: DE
>> [ 13.360231] cfg80211: DFS Master region: ETSI
>> [ 13.360235] cfg80211: (start_freq - end_freq @ bandwidth),
>> (max_antenna_gain, max_eirp), (dfs_cac_time)
>> [ 13.360246] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz),
>> (N/A, 2000 mBm), (N/A)
>> [ 13.360256] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz,
>> 200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
>> [ 13.360265] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz,
>> 200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
>> [ 13.360281] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz),
>> (N/A, 2698 mBm), (0 s)
>> [ 13.360289] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz),
>> (N/A, 1397 mBm), (N/A)
>> [ 13.360296] cfg80211: (5945000 KHz - 6425000 KHz @ 160000 KHz,
>> 480000 KHz AUTO), (N/A, 2301 mBm), (N/A)
>> [ 13.360303] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz),
>> (N/A, 4000 mBm), (N/A)
>> [ 17.172301] cfg80211: Found new beacon on frequency: 5180.000 MHz (Ch
>> 36) on phy0
>> [ 17.172326] cfg80211: Found new beacon on frequency: 5220.000 MHz (Ch
>> 44) on phy0
>> [ 20.800666] cfg80211: Calling CRDA for country: DE
>> [ 20.834453] cfg80211: Disabling freq 2484.000 MHz
>> [ 20.834487] cfg80211: handle_channel: hw_value 34, orig_flags:
>> 00080000, flags 00000001
>> [ 20.834503] cfg80211: handle_channel_single_rule: hw_value 34,
>> orig_flags: 00080000, flags 00000001
>> [ 20.835045] cfg80211: Regulatory domain changed to country: DE
>> [ 20.835057] cfg80211: DFS Master region: ETSI
>> [ 20.835063] cfg80211: (start_freq - end_freq @ bandwidth),
>> (max_antenna_gain, max_eirp), (dfs_cac_time)
>> [ 20.835075] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz),
>> (N/A, 2000 mBm), (N/A)
>> [ 20.835095] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz,
>> 200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
>> [ 20.835109] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz,
>> 200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
>> [ 20.835122] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz),
>> (N/A, 2698 mBm), (0 s)
>> [ 20.835135] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz),
>> (N/A, 1397 mBm), (N/A)
>> [ 20.835148] cfg80211: (5945000 KHz - 6425000 KHz @ 160000 KHz,
>> 480000 KHz AUTO), (N/A, 2301 mBm), (N/A)
>> [ 20.835160] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz),
>> (N/A, 4000 mBm), (N/A)
>> [ 84.952323] cfg80211: Verifying active interfaces after reg change
>> [ 344.070588] cfg80211: All devices are disconnected, going to restore
>> regulatory settings
>> [ 344.070619] cfg80211: Restoring regulatory settings while preserving
>> user preference for: DE
>>
>> Dump after restore_custom_reg_settings() is finished (channel 34 is
>> re-enabled):
>> [ 344.070639] cfg80211: restore_custom_reg_settings: hw_value 34,
>> orig_flags: 00080000, flags 00080000
>> [ 344.070660] cfg80211: Ignoring regulatory request set by core since
>> the driver uses its own custom regulatory domain
>> [ 344.070675] cfg80211: World regulatory domain updated:
>> [ 344.070684] cfg80211: DFS Master region: unset
>> [ 344.070692] cfg80211: (start_freq - end_freq @ bandwidth),
>> (max_antenna_gain, max_eirp), (dfs_cac_time)
>> [ 344.070706] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (600
>> mBi, 2000 mBm), (N/A)
>> [ 344.070724] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000
>> KHz AUTO), (600 mBi, 2000 mBm), (N/A)
>> [ 344.070741] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (600
>> mBi, 2000 mBm), (N/A)
>> [ 344.070758] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz,
>> 160000 KHz AUTO), (600 mBi, 2000 mBm), (N/A)
>> [ 344.070775] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz,
>> 160000 KHz AUTO), (600 mBi, 2000 mBm), (0 s)
>> [ 344.070792] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz),
>> (600 mBi, 2000 mBm), (0 s)
>> [ 344.070808] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (600
>> mBi, 2000 mBm), (N/A)
>> [ 344.070824] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz),
>> (N/A, 0 mBm), (N/A)
>> [ 344.070881] cfg80211: Disabling freq 2484.000 MHz
>> [ 344.070893] cfg80211: handle_channel: hw_value 34, orig_flags:
>> 00080000, flags 00080000
>> [ 344.070916] cfg80211: handle_channel_single_rule: hw_value 34,
>> orig_flags: 00080000, flags 00080000
>> [ 344.071487] cfg80211: Regulatory domain changed to country: DE
>> [ 344.071499] cfg80211: DFS Master region: ETSI
>> [ 344.071506] cfg80211: (start_freq - end_freq @ bandwidth),
>> (max_antenna_gain, max_eirp), (dfs_cac_time)
>> [ 344.071519] cfg80211: (2400000 KHz - 2483500 KHz @ 40000 KHz),
>> (N/A, 2000 mBm), (N/A)
>> [ 344.071536] cfg80211: (5150000 KHz - 5250000 KHz @ 80000 KHz,
>> 200000 KHz AUTO), (N/A, 2301 mBm), (N/A)
>> [ 344.071552] cfg80211: (5250000 KHz - 5350000 KHz @ 80000 KHz,
>> 200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
>> [ 344.071567] cfg80211: (5470000 KHz - 5725000 KHz @ 160000 KHz),
>> (N/A, 2698 mBm), (0 s)
>> [ 344.071582] cfg80211: (5725000 KHz - 5875000 KHz @ 80000 KHz),
>> (N/A, 1397 mBm), (N/A)
>> [ 344.071597] cfg80211: (5945000 KHz - 6425000 KHz @ 160000 KHz,
>> 480000 KHz AUTO), (N/A, 2301 mBm), (N/A)
>> [ 344.071611] cfg80211: (57000000 KHz - 66000000 KHz @ 2160000 KHz),
>> (N/A, 4000 mBm), (N/A)
>> [ 344.071634] cfg80211: Kicking the queue
>> [ 344.745318] cfg80211: Found new beacon on frequency: 5180.000 MHz (Ch
>> 36) on phy0
>> [ 344.745369] cfg80211: Found new beacon on frequency: 5220.000 MHz (Ch
>> 44) on phy0
>> [ 346.174985] brcmfmac: set chanspec 0xd022 fail, reason -52
>> [ 346.175018] brcmfmac: hw_value 34, orig_flags: 00080000, flags 00080220
>>> Have you always seen this or at certain kernel update or
>>> wpa_supplicant maybe?
>> As written in the initial message i've tested Linux 6.3, 6.6 and 6.7-rc6
>> with wpa_supplicant 2.9 so far and saw this issue in these cases.
>>
>> How far should i go?
>>
>> I modified brcmf_construct_chaninfo() to store the
>> IEEE80211_CHAN_DISABLED flag within orig_flags in case the flags had it.
>> This avoid the issue. Not sure this is the proper solution.
>
> orig_flags are from when the wiphy is registered - does the driver only
> set up proper flags after that?
Long time ago we discussed about this. So brcmfmac provides a superset of
channels during wiphy_register() and none of them are disabled as they
could never be enabled. After that the driver may disable a subset as it
syncs with the device. I think we used strict custom reg flag, but that
seems to have gone. Could that have the result Stefan is observing?
Regards,
Arend
> johannes
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4219 bytes --]
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-01-16 18:29 ` Arend Van Spriel
@ 2024-02-13 10:15 ` Johannes Berg
2024-07-15 7:54 ` Arend van Spriel
0 siblings, 1 reply; 41+ messages in thread
From: Johannes Berg @ 2024-02-13 10:15 UTC (permalink / raw)
To: Arend Van Spriel, Stefan Wahren, Arend van Spriel, Franky Lin,
Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
On Tue, 2024-01-16 at 19:29 +0100, Arend Van Spriel wrote:
> > >
> > > I modified brcmf_construct_chaninfo() to store the
> > > IEEE80211_CHAN_DISABLED flag within orig_flags in case the flags had it.
> > > This avoid the issue. Not sure this is the proper solution.
> >
> > orig_flags are from when the wiphy is registered - does the driver only
> > set up proper flags after that?
>
> Long time ago we discussed about this. So brcmfmac provides a superset of
> channels during wiphy_register() and none of them are disabled as they
> could never be enabled. After that the driver may disable a subset as it
> syncs with the device. I think we used strict custom reg flag, but that
> seems to have gone. Could that have the result Stefan is observing?
>
All this confuses me way more than it should, I guess.
We do still have REGULATORY_STRICT_REG, no? And that sets even
orig_flags:
if (lr->initiator == NL80211_REGDOM_SET_BY_DRIVER &&
request_wiphy && request_wiphy == wiphy &&
request_wiphy->regulatory_flags & REGULATORY_STRICT_REG) {
/*
* This guarantees the driver's requested regulatory domain
* will always be used as a base for further regulatory
* settings
*/
chan->flags = chan->orig_flags =
map_regdom_flags(reg_rule->flags) | bw_flags;
But brcmf_construct_chaninfo() looks a bit more like it really should be
setting a custom regulatory with all the channels listed, a bit like
what iwlwifi/mvm does, with REGULATORY_WIPHY_SELF_MANAGED?
Maybe we should start from the beginning: what does this actually
_want_?
johannes
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-02-13 10:15 ` Johannes Berg
@ 2024-07-15 7:54 ` Arend van Spriel
2024-08-28 12:56 ` Johannes Berg
0 siblings, 1 reply; 41+ messages in thread
From: Arend van Spriel @ 2024-07-15 7:54 UTC (permalink / raw)
To: Johannes Berg, Stefan Wahren, Arend van Spriel, Franky Lin,
Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
[-- Attachment #1: Type: text/plain, Size: 2218 bytes --]
On 2/13/2024 11:15 AM, Johannes Berg wrote:
> On Tue, 2024-01-16 at 19:29 +0100, Arend Van Spriel wrote:
>>>>
>>>> I modified brcmf_construct_chaninfo() to store the
>>>> IEEE80211_CHAN_DISABLED flag within orig_flags in case the flags had it.
>>>> This avoid the issue. Not sure this is the proper solution.
>>>
>>> orig_flags are from when the wiphy is registered - does the driver only
>>> set up proper flags after that?
>>
>> Long time ago we discussed about this. So brcmfmac provides a superset of
>> channels during wiphy_register() and none of them are disabled as they
>> could never be enabled. After that the driver may disable a subset as it
>> syncs with the device. I think we used strict custom reg flag, but that
>> seems to have gone. Could that have the result Stefan is observing?
>>
>
> All this confuses me way more than it should, I guess.
>
> We do still have REGULATORY_STRICT_REG, no? And that sets even
> orig_flags:
>
> if (lr->initiator == NL80211_REGDOM_SET_BY_DRIVER &&
> request_wiphy && request_wiphy == wiphy &&
> request_wiphy->regulatory_flags & REGULATORY_STRICT_REG) {
> /*
> * This guarantees the driver's requested regulatory domain
> * will always be used as a base for further regulatory
> * settings
> */
> chan->flags = chan->orig_flags =
> map_regdom_flags(reg_rule->flags) | bw_flags;
>
>
> But brcmf_construct_chaninfo() looks a bit more like it really should be
> setting a custom regulatory with all the channels listed, a bit like
> what iwlwifi/mvm does, with REGULATORY_WIPHY_SELF_MANAGED?
>
> Maybe we should start from the beginning: what does this actually
> _want_?
Picking up this trail [1] after a long time (sorry). So the firmware has
its own regulatory database. So upon connecting to an AP the firmware
can change its country setting based on the country element the AP uses.
In the driver we want to update the set of enabled channels. Maybe this
is more or less what iwlwifi does?
Regards,
Arend
[1]
https://lore.kernel.org/all/d9c9336a-6314-4de9-aead-8b865bb30f05@gmx.net/
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4219 bytes --]
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-07-15 7:54 ` Arend van Spriel
@ 2024-08-28 12:56 ` Johannes Berg
2024-11-20 9:17 ` Renjaya Raga Zenta
0 siblings, 1 reply; 41+ messages in thread
From: Johannes Berg @ 2024-08-28 12:56 UTC (permalink / raw)
To: Arend van Spriel, Stefan Wahren, Arend van Spriel, Franky Lin,
Hante Meuleman
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
Hector Martin, Kalle Valo
On Mon, 2024-07-15 at 09:54 +0200, Arend van Spriel wrote:
> On 2/13/2024 11:15 AM, Johannes Berg wrote:
> > On Tue, 2024-01-16 at 19:29 +0100, Arend Van Spriel wrote:
> > > > >
> > > > > I modified brcmf_construct_chaninfo() to store the
> > > > > IEEE80211_CHAN_DISABLED flag within orig_flags in case the flags had it.
> > > > > This avoid the issue. Not sure this is the proper solution.
> > > >
> > > > orig_flags are from when the wiphy is registered - does the driver only
> > > > set up proper flags after that?
> > >
> > > Long time ago we discussed about this. So brcmfmac provides a superset of
> > > channels during wiphy_register() and none of them are disabled as they
> > > could never be enabled. After that the driver may disable a subset as it
> > > syncs with the device. I think we used strict custom reg flag, but that
> > > seems to have gone. Could that have the result Stefan is observing?
> > >
> >
> > All this confuses me way more than it should, I guess.
> >
> > We do still have REGULATORY_STRICT_REG, no? And that sets even
> > orig_flags:
> >
> > if (lr->initiator == NL80211_REGDOM_SET_BY_DRIVER &&
> > request_wiphy && request_wiphy == wiphy &&
> > request_wiphy->regulatory_flags & REGULATORY_STRICT_REG) {
> > /*
> > * This guarantees the driver's requested regulatory domain
> > * will always be used as a base for further regulatory
> > * settings
> > */
> > chan->flags = chan->orig_flags =
> > map_regdom_flags(reg_rule->flags) | bw_flags;
> >
> >
> > But brcmf_construct_chaninfo() looks a bit more like it really should be
> > setting a custom regulatory with all the channels listed, a bit like
> > what iwlwifi/mvm does, with REGULATORY_WIPHY_SELF_MANAGED?
> >
> > Maybe we should start from the beginning: what does this actually
> > _want_?
>
> Picking up this trail [1] after a long time (sorry).
Hah, same here.
> So the firmware has
> its own regulatory database. So upon connecting to an AP the firmware
> can change its country setting based on the country element the AP uses.
> In the driver we want to update the set of enabled channels. Maybe this
> is more or less what iwlwifi does?
More or less, yes. In iwlwifi it doesn't necessarily change when you
connect, but whatever, you get an event from FW when it changes, with
all the data, and then we build a custom reg domain to update the wiphy
with.
johannes
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-08-28 12:56 ` Johannes Berg
@ 2024-11-20 9:17 ` Renjaya Raga Zenta
2024-11-23 9:54 ` Arend Van Spriel
0 siblings, 1 reply; 41+ messages in thread
From: Renjaya Raga Zenta @ 2024-11-20 9:17 UTC (permalink / raw)
To: johannes
Cc: SHA-cyfmac-dev-list, arend.vanspriel, aspriel,
brcm80211-dev-list.pdl, franky.lin, hante.meuleman, kvalo,
linux-wireless, marcan, wahrenst
Hi,
I've been observing this issue for a couple of days. I added pr_err (before and after) to debug this to find the culprit
who change the flags from 0x0001 to 0x80020. Please see below. I used Raspberry Pi 5 with kernel 6.6.51.
I think the flags are actually changed:
1) to 0x80000 in cfg80211.handle_channel_single_rule, then
2) to 0x80020 in cfg80211.reg_process_ht_flags_channel.
/* initial boot */
[ 3.114181] cfg80211: handle_channel_custom: before hw_value: 0x0c, orig_flags: 0x0000, flags: 0x0000
[ 3.123453] cfg80211: handle_channel_custom: after hw_value: 0x0c, orig_flags: 0x0000, flags: 0x80180
[ 3.132813] cfg80211: handle_channel_custom: before hw_value: 0x0d, orig_flags: 0x0000, flags: 0x0000
[ 3.142074] cfg80211: handle_channel_custom: after hw_value: 0x0d, orig_flags: 0x0000, flags: 0x80180
[ 3.151421] cfg80211: handle_channel_custom: before hw_value: 0x0e, orig_flags: 0x0000, flags: 0x0000
[ 3.160681] cfg80211: handle_channel_custom: after hw_value: 0x0e, orig_flags: 0x0000, flags: 0x801b0
[ 3.170030] cfg80211: handle_channel_custom: before hw_value: 0x22, orig_flags: 0x0000, flags: 0x0000
[ 3.179291] cfg80211: handle_channel_custom: after hw_value: 0x22, orig_flags: 0x0000, flags: 0x80000
[ 3.188638] cfg80211: handle_channel_custom: before hw_value: 0x24, orig_flags: 0x0000, flags: 0x0000
[ 3.197897] cfg80211: handle_channel_custom: after hw_value: 0x24, orig_flags: 0x0000, flags: 0x80000
[ 3.207245] cfg80211: handle_channel_custom: before hw_value: 0x26, orig_flags: 0x0000, flags: 0x0000
[ 3.216512] cfg80211: handle_channel_custom: after hw_value: 0x26, orig_flags: 0x0000, flags: 0x80000
[ 3.225955] cfg80211: handle_channel_single_rule: before hw_value: 0x22, orig_flags: 0x80000, flags: 0x80000
[ 3.235837] cfg80211: handle_channel_single_rule: after hw_value: 0x22, orig_flags: 0x80000, flags: 0x80000
[ 3.235841] cfg80211: handle_channel_single_rule: before hw_value: 0x24, orig_flags: 0x80000, flags: 0x80000
[ 3.235843] cfg80211: handle_channel_single_rule: after hw_value: 0x24, orig_flags: 0x80000, flags: 0x80000
[ 3.265464] cfg80211: handle_channel_single_rule: before hw_value: 0x26, orig_flags: 0x80000, flags: 0x80000
[ 3.275338] cfg80211: handle_channel_single_rule: after hw_value: 0x26, orig_flags: 0x80000, flags: 0x80000
[ 3.285218] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x0c, orig_flags: 0x80180, flags: 0x80181
[ 3.295270] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x0d, orig_flags: 0x80180, flags: 0x80181
[ 3.305318] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x0e, orig_flags: 0x801b0, flags: 0x801b1
[ 3.305320] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x22, orig_flags: 0x80000, flags: 0x80000
[ 3.305323] cfg80211: reg_process_ht_flags_channel: after hw_value: 0x22, orig_flags: 0x80000, flags: 0x80020
[ 3.335460] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x24, orig_flags: 0x80000, flags: 0x80000
[ 3.335462] cfg80211: reg_process_ht_flags_channel: after hw_value: 0x24, orig_flags: 0x80000, flags: 0x80020
[ 3.335463] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x26, orig_flags: 0x80000, flags: 0x80000
[ 3.335465] cfg80211: reg_process_ht_flags_channel: after hw_value: 0x26, orig_flags: 0x80000, flags: 0x80000
[ 3.406614] brcmfmac: brcmf_construct_chaninfo: hw_value: 0x0c, orig_flags: 0x80180, flags: 0x0001
[ 3.415666] brcmfmac: brcmf_construct_chaninfo: hw_value: 0x0d, orig_flags: 0x80180, flags: 0x0001
[ 3.424668] brcmfmac: brcmf_construct_chaninfo: hw_value: 0x0e, orig_flags: 0x801b0, flags: 0x0001
[ 3.433669] brcmfmac: brcmf_construct_chaninfo: hw_value: 0x22, orig_flags: 0x80000, flags: 0x0001
[ 3.442668] brcmfmac: brcmf_construct_chaninfo: hw_value: 0x24, orig_flags: 0x80000, flags: 0x0120
[ 3.451667] brcmfmac: brcmf_construct_chaninfo: hw_value: 0x26, orig_flags: 0x80000, flags: 0x0001
[ 3.464673] brcmfmac: brcmf_setup_wiphybands: hw_value: 0x0c, orig_flags: 0x80180, flags: 0x0001
[ 3.473504] brcmfmac: brcmf_setup_wiphybands: hw_value: 0x0d, orig_flags: 0x80180, flags: 0x0001
[ 3.482336] brcmfmac: brcmf_setup_wiphybands: hw_value: 0x0e, orig_flags: 0x801b0, flags: 0x0001
[ 3.491162] brcmfmac: brcmf_setup_wiphybands: hw_value: 0x22, orig_flags: 0x80000, flags: 0x0001
[ 3.499988] brcmfmac: brcmf_setup_wiphybands: hw_value: 0x24, orig_flags: 0x80000, flags: 0x0120
[ 3.508812] brcmfmac: brcmf_setup_wiphybands: hw_value: 0x26, orig_flags: 0x80000, flags: 0x0001
/* wpa_supplicant connect, the flags are changed here */
[ 10.493324] cfg80211: handle_channel_single_rule: before hw_value: 0x22, orig_flags: 0x80000, flags: 0x0001
[ 10.503174] cfg80211: handle_channel_single_rule: after hw_value: 0x22, orig_flags: 0x80000, flags: 0x80000
[ 10.513094] cfg80211: handle_channel_single_rule: before hw_value: 0x24, orig_flags: 0x80000, flags: 0x0120
[ 10.522898] cfg80211: handle_channel_single_rule: after hw_value: 0x24, orig_flags: 0x80000, flags: 0x80000
[ 10.532785] cfg80211: handle_channel_single_rule: before hw_value: 0x26, orig_flags: 0x80000, flags: 0x0001
[ 10.542601] cfg80211: handle_channel_single_rule: after hw_value: 0x26, orig_flags: 0x80000, flags: 0x80000
[ 10.552496] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x0c, orig_flags: 0x80180, flags: 0x0001
[ 10.562479] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x0d, orig_flags: 0x80180, flags: 0x0001
[ 10.572453] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x0e, orig_flags: 0x801b0, flags: 0x0001
[ 10.582438] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x22, orig_flags: 0x80000, flags: 0x80000
[ 10.592498] cfg80211: reg_process_ht_flags_channel: after hw_value: 0x22, orig_flags: 0x80000, flags: 0x80020
[ 10.602557] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x24, orig_flags: 0x80000, flags: 0x80000
[ 10.612624] cfg80211: reg_process_ht_flags_channel: after hw_value: 0x24, orig_flags: 0x80000, flags: 0x80020
[ 10.622683] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x26, orig_flags: 0x80000, flags: 0x80000
[ 10.632740] cfg80211: reg_process_ht_flags_channel: after hw_value: 0x26, orig_flags: 0x80000, flags: 0x80000
/* wpa_supplicant disconnect */
[ 78.902910] cfg80211: handle_channel_single_rule: before hw_value: 0x22, orig_flags: 0x80000, flags: 0x80000
[ 78.912850] cfg80211: handle_channel_single_rule: after hw_value: 0x22, orig_flags: 0x80000, flags: 0x80000
[ 78.922781] cfg80211: handle_channel_single_rule: before hw_value: 0x24, orig_flags: 0x80000, flags: 0x80000
[ 78.932705] cfg80211: handle_channel_single_rule: after hw_value: 0x24, orig_flags: 0x80000, flags: 0x80000
[ 78.942623] cfg80211: handle_channel_single_rule: before hw_value: 0x26, orig_flags: 0x80000, flags: 0x80000
[ 78.952518] cfg80211: handle_channel_single_rule: after hw_value: 0x26, orig_flags: 0x80000, flags: 0x80000
[ 78.962433] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x0c, orig_flags: 0x80180, flags: 0x80181
[ 78.972500] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x0d, orig_flags: 0x80180, flags: 0x80181
[ 78.982563] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x0e, orig_flags: 0x801b0, flags: 0x801b1
[ 78.992623] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x22, orig_flags: 0x80000, flags: 0x80000
[ 79.002694] cfg80211: reg_process_ht_flags_channel: after hw_value: 0x22, orig_flags: 0x80000, flags: 0x80020
[ 79.012765] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x24, orig_flags: 0x80000, flags: 0x80000
[ 79.022835] cfg80211: reg_process_ht_flags_channel: after hw_value: 0x24, orig_flags: 0x80000, flags: 0x80020
[ 79.032891] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x26, orig_flags: 0x80000, flags: 0x80000
[ 79.042969] cfg80211: reg_process_ht_flags_channel: after hw_value: 0x26, orig_flags: 0x80000, flags: 0x80000
/* wpa_supplicant re-connect */
[ 156.971916] brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail, reason -52
[ 157.087904] brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail, reason -52
[ 157.199928] brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail, reason -52
[ 157.310944] brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail, reason -52
[ 159.774209] cfg80211: handle_channel_single_rule: before hw_value: 0x22, orig_flags: 0x80000, flags: 0x80020
[ 159.784166] cfg80211: handle_channel_single_rule: after hw_value: 0x22, orig_flags: 0x80000, flags: 0x80000
[ 159.794073] cfg80211: handle_channel_single_rule: before hw_value: 0x24, orig_flags: 0x80000, flags: 0x80020
[ 159.803977] cfg80211: handle_channel_single_rule: after hw_value: 0x24, orig_flags: 0x80000, flags: 0x80000
[ 159.813887] cfg80211: handle_channel_single_rule: before hw_value: 0x26, orig_flags: 0x80000, flags: 0x80000
[ 159.823792] cfg80211: handle_channel_single_rule: after hw_value: 0x26, orig_flags: 0x80000, flags: 0x80000
[ 159.833689] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x0c, orig_flags: 0x80180, flags: 0x801b1
[ 159.843751] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x0d, orig_flags: 0x80180, flags: 0x801b1
[ 159.853814] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x0e, orig_flags: 0x801b0, flags: 0x801b1
[ 159.863889] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x22, orig_flags: 0x80000, flags: 0x80000
[ 159.873958] cfg80211: reg_process_ht_flags_channel: after hw_value: 0x22, orig_flags: 0x80000, flags: 0x80020
[ 159.884038] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x24, orig_flags: 0x80000, flags: 0x80000
[ 159.894100] cfg80211: reg_process_ht_flags_channel: after hw_value: 0x24, orig_flags: 0x80000, flags: 0x80020
[ 159.904187] cfg80211: reg_process_ht_flags_channel: before hw_value: 0x26, orig_flags: 0x80000, flags: 0x80000
[ 159.914248] cfg80211: reg_process_ht_flags_channel: after hw_value: 0x26, orig_flags: 0x80000, flags: 0x80000
Is there any workaround for this or is this behavior expected?
Regards.
Renjaya
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-11-20 9:17 ` Renjaya Raga Zenta
@ 2024-11-23 9:54 ` Arend Van Spriel
2024-11-25 6:49 ` Renjaya Raga Zenta
0 siblings, 1 reply; 41+ messages in thread
From: Arend Van Spriel @ 2024-11-23 9:54 UTC (permalink / raw)
To: Renjaya Raga Zenta, johannes
Cc: SHA-cyfmac-dev-list, aspriel, brcm80211-dev-list.pdl, franky.lin,
hante.meuleman, kvalo, linux-wireless, marcan, wahrenst
On November 20, 2024 10:17:35 AM Renjaya Raga Zenta
<renjaya.zenta@formulatrix.com> wrote:
> Hi,
>
> I've been observing this issue for a couple of days. I added pr_err (before
> and after) to debug this to find the culprit
> who change the flags from 0x0001 to 0x80020. Please see below. I used
> Raspberry Pi 5 with kernel 6.6.51.
This was reported earlier by Stefan Wahren, but the thread ran dry.
So what changed a couple of days ago? System upgrade?
Regards,
Arend
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-11-23 9:54 ` Arend Van Spriel
@ 2024-11-25 6:49 ` Renjaya Raga Zenta
2024-11-25 11:37 ` Stefan Wahren
0 siblings, 1 reply; 41+ messages in thread
From: Renjaya Raga Zenta @ 2024-11-25 6:49 UTC (permalink / raw)
To: arend.vanspriel
Cc: SHA-cyfmac-dev-list, aspriel, brcm80211-dev-list.pdl, franky.lin,
hante.meuleman, johannes, kvalo, linux-wireless, marcan,
renjaya.zenta, wahrenst
On 11/23/24 4:54 PM, Arend Van Spriel wrote:
> This was reported earlier by Stefan Wahren, but the thread ran dry.
Yes, I've read the whole thread. I guess what I've found is similar
to what Stefan found. Those channels are disabled by the driver in
brcmf_construct_chaninfo() but are re-enabled in reg.c.
I see there hasn't been any conclusion yet, so I just bumped this thread.
Stefan did a workaround by modifying brcmf_construct_chaninfo() to store
the IEEE80211_CHAN_DISABLED flag within orig_flags in case the flags had
it. I see no further ACK, so I think that's not the proper solution.
> So what changed a couple of days ago? System upgrade?
Well, I use the latest OS from Raspberry Pi, it still uses 6.6.51. I guess
there is no significant changes from what Stefan tried.
Regards,
Renjaya
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-11-25 6:49 ` Renjaya Raga Zenta
@ 2024-11-25 11:37 ` Stefan Wahren
2025-07-17 9:29 ` Pragyansh Chaturvedi
0 siblings, 1 reply; 41+ messages in thread
From: Stefan Wahren @ 2024-11-25 11:37 UTC (permalink / raw)
To: Renjaya Raga Zenta, arend.vanspriel
Cc: SHA-cyfmac-dev-list, aspriel, brcm80211-dev-list.pdl, franky.lin,
hante.meuleman, johannes, kvalo, linux-wireless, marcan
Am 25.11.24 um 07:49 schrieb Renjaya Raga Zenta:
> On 11/23/24 4:54 PM, Arend Van Spriel wrote:
>
>> This was reported earlier by Stefan Wahren, but the thread ran dry.
> Yes, I've read the whole thread. I guess what I've found is similar
> to what Stefan found. Those channels are disabled by the driver in
> brcmf_construct_chaninfo() but are re-enabled in reg.c.
>
> I see there hasn't been any conclusion yet, so I just bumped this thread.
>
> Stefan did a workaround by modifying brcmf_construct_chaninfo() to store
> the IEEE80211_CHAN_DISABLED flag within orig_flags in case the flags had
> it. I see no further ACK, so I think that's not the proper solution.
Unfortunately I'm don't have much Wifi knowledge & time to push this
further. So I'm would be happy, if someone take care of about this
annoyance.
>> So what changed a couple of days ago? System upgrade?
> Well, I use the latest OS from Raspberry Pi, it still uses 6.6.51. I guess
> there is no significant changes from what Stefan tried.
I think it should be mentioned, there is no usable Raspberry Pi 5
support in Mainline yet. So the mention version is a vendor kernel tree.
Regards
>
> Regards,
> Renjaya
^ permalink raw reply [flat|nested] 41+ messages in thread
* brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
@ 2024-12-01 21:55 KeithG
2024-12-02 4:21 ` Renjaya Raga Zenta
2024-12-02 17:36 ` Arend Van Spriel
0 siblings, 2 replies; 41+ messages in thread
From: KeithG @ 2024-12-01 21:55 UTC (permalink / raw)
To: linux-wireless, Arend Van Spriel
This floods the journal of my Pi ev ery 6 seconds:
Dec 01 15:51:30 pi5 kernel: brcmfmac: brcmf_set_channel: set chanspec
0xd022 fail, reason -52
Dec 01 15:51:31 pi5 kernel: brcmfmac: brcmf_set_channel: set chanspec
0xd026 fail, reason -52
Dec 01 15:51:31 pi5 kernel: brcmfmac: brcmf_set_channel: set chanspec
0xd02a fail, reason -52
Dec 01 15:51:31 pi5 kernel: brcmfmac: brcmf_set_channel: set chanspec
0xd02e fail, reason -52
Is there something that can be done? Is there something I can help
with to fix this? I can test on multiple Pis, but cannot actually code
anything. Is this going to wait for the new infineon driver
development? The latest kernel where this has been seen is:
Linux pi5 6.6.62+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.62-1+rpt1
(2024-11-25) aarch64 GNU/Linux
Keith
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-12-01 21:55 KeithG
@ 2024-12-02 4:21 ` Renjaya Raga Zenta
2024-12-02 14:23 ` KeithG
2024-12-02 17:36 ` Arend Van Spriel
1 sibling, 1 reply; 41+ messages in thread
From: Renjaya Raga Zenta @ 2024-12-02 4:21 UTC (permalink / raw)
To: ys3al35l; +Cc: arend.vanspriel, linux-wireless
I believe those errors are not fatal but I still hope this can be fixed
in the kernel (or firmware? (or wpa_supplicant?)).
Fortunately, you can disable DUMP_OBSS feature to disable dump_survey
which triggers those error messages.
See: https://github.com/raspberrypi/linux/issues/6049#issuecomment-2485431104
Regards,
Renjaya
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-12-02 4:21 ` Renjaya Raga Zenta
@ 2024-12-02 14:23 ` KeithG
2024-12-02 20:27 ` Arend van Spriel
0 siblings, 1 reply; 41+ messages in thread
From: KeithG @ 2024-12-02 14:23 UTC (permalink / raw)
To: Renjaya Raga Zenta; +Cc: arend.vanspriel, linux-wireless
Renjaya,
Thanks! I am assuming this is done by setting a flag in the driver?
Can you detail what that is, exactly?
Keith
On Sun, Dec 1, 2024 at 10:21 PM Renjaya Raga Zenta
<renjaya.zenta@formulatrix.com> wrote:
>
> I believe those errors are not fatal but I still hope this can be fixed
> in the kernel (or firmware? (or wpa_supplicant?)).
>
> Fortunately, you can disable DUMP_OBSS feature to disable dump_survey
> which triggers those error messages.
>
> See: https://github.com/raspberrypi/linux/issues/6049#issuecomment-2485431104
>
> Regards,
> Renjaya
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-12-01 21:55 KeithG
2024-12-02 4:21 ` Renjaya Raga Zenta
@ 2024-12-02 17:36 ` Arend Van Spriel
2024-12-02 23:49 ` KeithG
1 sibling, 1 reply; 41+ messages in thread
From: Arend Van Spriel @ 2024-12-02 17:36 UTC (permalink / raw)
To: KeithG, linux-wireless
On December 1, 2024 10:55:26 PM KeithG <ys3al35l@gmail.com> wrote:
> This floods the journal of my Pi ev ery 6 seconds:
> Dec 01 15:51:30 pi5 kernel: brcmfmac: brcmf_set_channel: set chanspec
> 0xd022 fail, reason -52
> Dec 01 15:51:31 pi5 kernel: brcmfmac: brcmf_set_channel: set chanspec
> 0xd026 fail, reason -52
> Dec 01 15:51:31 pi5 kernel: brcmfmac: brcmf_set_channel: set chanspec
> 0xd02a fail, reason -52
> Dec 01 15:51:31 pi5 kernel: brcmfmac: brcmf_set_channel: set chanspec
> 0xd02e fail, reason -52
>
> Is there something that can be done? Is there something I can help
> with to fix this? I can test on multiple Pis, but cannot actually code
> anything. Is this going to wait for the new infineon driver
> development? The latest kernel where this has been seen is:
> Linux pi5 6.6.62+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.62-1+rpt1
> (2024-11-25) aarch64 GNU/Linux
You can build and test patches? Is it only those specific channels as
listed above? Those are pre -802.11b allowed in Japan. I don't think any of
the brcmfmac devices actually support those channels.
Regards,
Arend
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-12-02 14:23 ` KeithG
@ 2024-12-02 20:27 ` Arend van Spriel
0 siblings, 0 replies; 41+ messages in thread
From: Arend van Spriel @ 2024-12-02 20:27 UTC (permalink / raw)
To: KeithG, Renjaya Raga Zenta; +Cc: linux-wireless
On 12/2/2024 3:23 PM, KeithG wrote:
> Renjaya,
>
> Thanks! I am assuming this is done by setting a flag in the driver?
> Can you detail what that is, exactly?
You can pass module parameter 'feature_disable=0x200000' provided
DUMP_OBSS feature id is 21.
Regards,
Arend
> Keith
>
> On Sun, Dec 1, 2024 at 10:21 PM Renjaya Raga Zenta
> <renjaya.zenta@formulatrix.com> wrote:
>>
>> I believe those errors are not fatal but I still hope this can be fixed
>> in the kernel (or firmware? (or wpa_supplicant?)).
>>
>> Fortunately, you can disable DUMP_OBSS feature to disable dump_survey
>> which triggers those error messages.
>>
>> See: https://github.com/raspberrypi/linux/issues/6049#issuecomment-2485431104
>>
>> Regards,
>> Renjaya
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-12-02 17:36 ` Arend Van Spriel
@ 2024-12-02 23:49 ` KeithG
2024-12-05 0:54 ` KeithG
0 siblings, 1 reply; 41+ messages in thread
From: KeithG @ 2024-12-02 23:49 UTC (permalink / raw)
To: Arend Van Spriel; +Cc: linux-wireless
Arend,
Yes, I can build and test patches.
I will build a current kernel version tonight and will then be able to
add any patches you may develop to address this issue.
If I may ask, could you also patch the WPA3 External_Auth
functionality as well? I can test patches to that as well.
Regards,
Keith
On Mon, Dec 2, 2024 at 11:36 AM Arend Van Spriel
<arend.vanspriel@broadcom.com> wrote:
>
> On December 1, 2024 10:55:26 PM KeithG <ys3al35l@gmail.com> wrote:
>
> > This floods the journal of my Pi ev ery 6 seconds:
> > Dec 01 15:51:30 pi5 kernel: brcmfmac: brcmf_set_channel: set chanspec
> > 0xd022 fail, reason -52
> > Dec 01 15:51:31 pi5 kernel: brcmfmac: brcmf_set_channel: set chanspec
> > 0xd026 fail, reason -52
> > Dec 01 15:51:31 pi5 kernel: brcmfmac: brcmf_set_channel: set chanspec
> > 0xd02a fail, reason -52
> > Dec 01 15:51:31 pi5 kernel: brcmfmac: brcmf_set_channel: set chanspec
> > 0xd02e fail, reason -52
> >
> > Is there something that can be done? Is there something I can help
> > with to fix this? I can test on multiple Pis, but cannot actually code
> > anything. Is this going to wait for the new infineon driver
> > development? The latest kernel where this has been seen is:
> > Linux pi5 6.6.62+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.62-1+rpt1
> > (2024-11-25) aarch64 GNU/Linux
>
> You can build and test patches? Is it only those specific channels as
> listed above? Those are pre -802.11b allowed in Japan. I don't think any of
> the brcmfmac devices actually support those channels.
>
> Regards,
> Arend
>
>
>
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-12-02 23:49 ` KeithG
@ 2024-12-05 0:54 ` KeithG
2024-12-05 13:10 ` Arend van Spriel
0 siblings, 1 reply; 41+ messages in thread
From: KeithG @ 2024-12-05 0:54 UTC (permalink / raw)
To: Arend Van Spriel; +Cc: linux-wireless
On Mon, Dec 2, 2024 at 5:49 PM KeithG <ys3al35l@gmail.com> wrote:
>
> Arend,
>
> Yes, I can build and test patches.
>
> I will build a current kernel version tonight and will then be able to
> add any patches you may develop to address this issue.
>
> If I may ask, could you also patch the WPA3 External_Auth
> functionality as well? I can test patches to that as well.
>
> Regards,
>
> Keith
>
> On Mon, Dec 2, 2024 at 11:36 AM Arend Van Spriel
> <arend.vanspriel@broadcom.com> wrote:
> >
> > On December 1, 2024 10:55:26 PM KeithG <ys3al35l@gmail.com> wrote:
> >
> > > This floods the journal of my Pi ev ery 6 seconds:
> > > Dec 01 15:51:30 pi5 kernel: brcmfmac: brcmf_set_channel: set chanspec
> > > 0xd022 fail, reason -52
> > > Dec 01 15:51:31 pi5 kernel: brcmfmac: brcmf_set_channel: set chanspec
> > > 0xd026 fail, reason -52
> > > Dec 01 15:51:31 pi5 kernel: brcmfmac: brcmf_set_channel: set chanspec
> > > 0xd02a fail, reason -52
> > > Dec 01 15:51:31 pi5 kernel: brcmfmac: brcmf_set_channel: set chanspec
> > > 0xd02e fail, reason -52
> > >
> > > Is there something that can be done? Is there something I can help
> > > with to fix this? I can test on multiple Pis, but cannot actually code
> > > anything. Is this going to wait for the new infineon driver
> > > development? The latest kernel where this has been seen is:
> > > Linux pi5 6.6.62+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.62-1+rpt1
> > > (2024-11-25) aarch64 GNU/Linux
> >
> > You can build and test patches? Is it only those specific channels as
> > listed above? Those are pre -802.11b allowed in Japan. I don't think any of
> > the brcmfmac devices actually support those channels.
> >
> > Regards,
> > Arend
> >
> >
> >
I built a fresh kernel and can build and test brcmfmac driver mods on
my Pis. Awaiting further instructions.
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-12-05 0:54 ` KeithG
@ 2024-12-05 13:10 ` Arend van Spriel
2024-12-06 6:53 ` Renjaya Raga Zenta
0 siblings, 1 reply; 41+ messages in thread
From: Arend van Spriel @ 2024-12-05 13:10 UTC (permalink / raw)
To: KeithG; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1905 bytes --]
On 12/5/2024 1:54 AM, KeithG wrote:
> On Mon, Dec 2, 2024 at 5:49 PM KeithG <ys3al35l@gmail.com> wrote:
>>
>> Arend,
>>
>> Yes, I can build and test patches.
>>
>> I will build a current kernel version tonight and will then be able to
>> add any patches you may develop to address this issue.
>>
>> If I may ask, could you also patch the WPA3 External_Auth
>> functionality as well? I can test patches to that as well.
>>
>> Regards,
>>
>> Keith
>>
>> On Mon, Dec 2, 2024 at 11:36 AM Arend Van Spriel
>> <arend.vanspriel@broadcom.com> wrote:
>>>
>>> On December 1, 2024 10:55:26 PM KeithG <ys3al35l@gmail.com> wrote:
>>>
>>>> This floods the journal of my Pi ev ery 6 seconds:
>>>> Dec 01 15:51:30 pi5 kernel: brcmfmac: brcmf_set_channel: set chanspec
>>>> 0xd022 fail, reason -52
>>>> Dec 01 15:51:31 pi5 kernel: brcmfmac: brcmf_set_channel: set chanspec
>>>> 0xd026 fail, reason -52
>>>> Dec 01 15:51:31 pi5 kernel: brcmfmac: brcmf_set_channel: set chanspec
>>>> 0xd02a fail, reason -52
>>>> Dec 01 15:51:31 pi5 kernel: brcmfmac: brcmf_set_channel: set chanspec
>>>> 0xd02e fail, reason -52
>>>>
>>>> Is there something that can be done? Is there something I can help
>>>> with to fix this? I can test on multiple Pis, but cannot actually code
>>>> anything. Is this going to wait for the new infineon driver
>>>> development? The latest kernel where this has been seen is:
>>>> Linux pi5 6.6.62+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.62-1+rpt1
>>>> (2024-11-25) aarch64 GNU/Linux
>>>
>>> You can build and test patches? Is it only those specific channels as
>>> listed above? Those are pre -802.11b allowed in Japan. I don't think any of
>>> the brcmfmac devices actually support those channels.
>>>
>>> Regards,
>>> Arend
>>>
>>>
>>>
> I built a fresh kernel and can build and test brcmfmac driver mods on
> my Pis. Awaiting further instructions.
Can you try the patch attached?
Regards,
Arend
[-- Attachment #2: 0001-wifi-brcmfmac-remove-old-802.11a-channels-for-Japan.patch --]
[-- Type: text/plain, Size: 1573 bytes --]
From 599ffec16339e23e565127be5df8b8e4bfc76439 Mon Sep 17 00:00:00 2001
From: Arend van Spriel <arend.vanspriel@broadcom.com>
Date: Thu, 5 Dec 2024 14:01:36 +0100
Subject: [PATCH] wifi: brcmfmac: remove old 802.11a channels for Japan
Channels 34, 38, etc. were channels allowed for unlicensed use in
Japan in the 802.11a era. These channels are causing (quite) a bit
of spam in the kernel log. Also the wireless-regdb does not contain
these anymore so let's get rid of them.
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 2a90bb24ba77..dbadb3f85eb3 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -186,8 +186,7 @@ static struct ieee80211_channel __wl_2ghz_channels[] = {
};
static struct ieee80211_channel __wl_5ghz_channels[] = {
- CHAN5G(34), CHAN5G(36), CHAN5G(38), CHAN5G(40), CHAN5G(42),
- CHAN5G(44), CHAN5G(46), CHAN5G(48), CHAN5G(52), CHAN5G(56),
+ CHAN5G(36), CHAN5G(40), CHAN5G(44), CHAN5G(48), CHAN5G(52), CHAN5G(56),
CHAN5G(60), CHAN5G(64), CHAN5G(100), CHAN5G(104), CHAN5G(108),
CHAN5G(112), CHAN5G(116), CHAN5G(120), CHAN5G(124), CHAN5G(128),
CHAN5G(132), CHAN5G(136), CHAN5G(140), CHAN5G(144), CHAN5G(149),
base-commit: ffc253263a1375a65fa6c9f62a893e9767fbebfa
--
2.32.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-12-05 13:10 ` Arend van Spriel
@ 2024-12-06 6:53 ` Renjaya Raga Zenta
2024-12-06 7:36 ` Arend Van Spriel
0 siblings, 1 reply; 41+ messages in thread
From: Renjaya Raga Zenta @ 2024-12-06 6:53 UTC (permalink / raw)
To: arend.vanspriel; +Cc: linux-wireless, ys3al35l
On Thu, 5 Dec 2024 14:10:51 +0100 Arend Van Spriel wrote:
> Can you try the patch attached?
I've just tried this in 6.6, obviously the errors disappear. Tested with
DUMP_OBSS enabled.
Will this also land to stable?
Regards,
Renjaya
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-12-06 6:53 ` Renjaya Raga Zenta
@ 2024-12-06 7:36 ` Arend Van Spriel
2024-12-06 13:28 ` KeithG
0 siblings, 1 reply; 41+ messages in thread
From: Arend Van Spriel @ 2024-12-06 7:36 UTC (permalink / raw)
To: Renjaya Raga Zenta; +Cc: linux-wireless, ys3al35l
On December 6, 2024 7:53:28 AM Renjaya Raga Zenta
<renjaya.zenta@formulatrix.com> wrote:
> On Thu, 5 Dec 2024 14:10:51 +0100 Arend Van Spriel wrote:
>> Can you try the patch attached?
>
> I've just tried this in 6.6, obviously the errors disappear. Tested with
> DUMP_OBSS enabled.
Thanks, Renjaya
It was the pragmatic fix. There still seems a potential issue in how
brcmfmac provides the channels to cfg80211.
> Will this also land to stable?
I have not formally submitted it to linux-wireless. I will add the
appropriate tags for stable.
Regards,
Arend
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-12-06 7:36 ` Arend Van Spriel
@ 2024-12-06 13:28 ` KeithG
2024-12-06 14:17 ` Arend Van Spriel
0 siblings, 1 reply; 41+ messages in thread
From: KeithG @ 2024-12-06 13:28 UTC (permalink / raw)
To: Arend Van Spriel; +Cc: Renjaya Raga Zenta, linux-wireless
I built the kernel and got this:
root@jackrune(rw):~# uname -a
Linux jackrune 6.6.63-v8+ #3 SMP PREEMPT Tue Dec 3 10:09:16 CST 2024
aarch64 GNU/Linux
I must've done something wrong, though, as I get this:
Dec 06 07:08:10 jackrune kernel: ------------[ cut here ]------------
Dec 06 07:08:10 jackrune kernel: WARNING: CPU: 0 PID: 42 at
net/wireless/nl80211.c:3822 nl80211_send_chandef+0x188/0x1a0
[cfg80211]
Dec 06 07:08:10 jackrune kernel: Modules linked in: brcmfmac_wcc
binfmt_misc brcmfmac brcmutil cfg80211 hci_uart bcm2835_codec(C) btbcm
bluetooth bcm2>
Dec 06 07:08:10 jackrune kernel: CPU: 0 PID: 42 Comm: kworker/0:2
Tainted: G C 6.6.63-v8+ #3
Dec 06 07:08:10 jackrune kernel: Hardware name: Raspberry Pi 3 Model B
Plus Rev 1.3 (DT)
Dec 06 07:08:10 jackrune kernel: Workqueue: events request_firmware_work_func
Dec 06 07:08:10 jackrune kernel: pstate: 40000005 (nZcv daif -PAN -UAO
-TCO -DIT -SSBS BTYPE=--)
Dec 06 07:08:10 jackrune kernel: pc : nl80211_send_chandef+0x188/0x1a0
[cfg80211]
Dec 06 07:08:10 jackrune kernel: lr : nl80211_send_chandef+0x3c/0x1a0 [cfg80211]
Dec 06 07:08:10 jackrune kernel: sp : ffffffc08048b710
Dec 06 07:08:10 jackrune kernel: x29: ffffffc08048b710 x28:
ffffff80045e1014 x27: ffffffec8b872308
Dec 06 07:08:10 jackrune kernel: x26: ffffffecf2a4d870 x25:
ffffffecf26b5008 x24: ffffffc08048bb68
Dec 06 07:08:10 jackrune kernel: x23: ffffffc08048b7d8 x22:
ffffff8007b48000 x21: ffffff8004c8b000
Dec 06 07:08:10 jackrune kernel: x20: ffffff8003e27d00 x19:
ffffffc08048b7d8 x18: 0000000000000000
Dec 06 07:08:10 jackrune kernel: x17: ffffff93456ad000 x16:
ffffffecf2119150 x15: 0000000000000000
Dec 06 07:08:10 jackrune kernel: x14: 0000000000000000 x13:
0000000000636570 x12: 730000d022000000
Dec 06 07:08:10 jackrune kernel: x11: 0000000000000097 x10:
0000000000001a60 x9 : ffffffec8b88656c
Dec 06 07:08:10 jackrune kernel: x8 : ffffff8007b48528 x7 :
ffffff8007b48528 x6 : 00000000000003e8
Dec 06 07:08:10 jackrune kernel: x5 : ffffff800591fe40 x4 :
0000000000000000 x3 : 000000000058e1e8
Dec 06 07:08:10 jackrune kernel: x2 : ffffff8001fd0000 x1 :
0000000000000000 x0 : 0000000000000000
Dec 06 07:08:10 jackrune kernel: Call trace:
Dec 06 07:08:10 jackrune kernel: nl80211_send_chandef+0x188/0x1a0 [cfg80211]
Dec 06 07:08:10 jackrune kernel: nl80211_send_iface+0x72c/0x7c8 [cfg80211]
Dec 06 07:08:10 jackrune kernel: nl80211_notify_iface+0x60/0xd8 [cfg80211]
Dec 06 07:08:10 jackrune kernel: cfg80211_register_wdev+0x9c/0x118 [cfg80211]
Dec 06 07:08:10 jackrune kernel:
cfg80211_netdev_notifier_call+0xf4/0x558 [cfg80211]
Dec 06 07:08:10 jackrune kernel: notifier_call_chain+0x78/0x148
Dec 06 07:08:10 jackrune kernel: raw_notifier_call_chain+0x20/0x38
Dec 06 07:08:10 jackrune kernel: call_netdevice_notifiers_info+0x60/0xb8
Dec 06 07:08:10 jackrune kernel: register_netdevice+0x5ac/0x698
Dec 06 07:08:10 jackrune kernel: register_netdev+0x2c/0x58
Dec 06 07:08:10 jackrune kernel: brcmf_net_attach+0x134/0x178 [brcmfmac]
Dec 06 07:08:10 jackrune kernel: brcmf_attach+0x238/0x4e8 [brcmfmac]
Dec 06 07:08:10 jackrune kernel:
brcmf_sdio_firmware_callback+0x7fc/0x960 [brcmfmac]
Dec 06 07:08:10 jackrune kernel: brcmf_fw_request_done+0x150/0x198 [brcmfmac]
Dec 06 07:08:10 jackrune kernel:
brcmf_fw_request_done_alt_path+0xa0/0xf8 [brcmfmac]
Dec 06 07:08:10 jackrune kernel: request_firmware_work_func+0x58/0xb0
Dec 06 07:08:10 jackrune kernel: process_one_work+0x148/0x3b8
Dec 06 07:08:10 jackrune kernel: worker_thread+0x32c/0x450
Dec 06 07:08:10 jackrune kernel: kthread+0x11c/0x128
Dec 06 07:08:10 jackrune kernel: ret_from_fork+0x10/0x20
Dec 06 07:08:10 jackrune kernel: ---[ end trace 0000000000000000 ]---
and this:
Dec 06 07:19:17 jackrune kernel: ------------[ cut here ]------------
Dec 06 07:19:17 jackrune kernel: WARNING: CPU: 3 PID: 332 at
net/wireless/nl80211.c:3822 nl80211_send_chandef+0x188/0x1a0
[cfg80211]
Dec 06 07:19:17 jackrune kernel: Modules linked in: ghash_generic
ghash_ce gf128mul gcm ccm 8021q algif_aead crypto_null garp stp llc
ctr iptable_nat >
Dec 06 07:19:17 jackrune kernel: CPU: 3 PID: 332 Comm: iwd Tainted: G
WC 6.6.63-v8+ #3
Dec 06 07:19:17 jackrune kernel: Hardware name: Raspberry Pi 3 Model B
Plus Rev 1.3 (DT)
Dec 06 07:19:17 jackrune kernel: pstate: 40000005 (nZcv daif -PAN -UAO
-TCO -DIT -SSBS BTYPE=--)
Dec 06 07:19:17 jackrune kernel: pc : nl80211_send_chandef+0x188/0x1a0
[cfg80211]
Dec 06 07:19:17 jackrune kernel: lr : nl80211_send_chandef+0x3c/0x1a0 [cfg80211]
Dec 06 07:19:17 jackrune kernel: sp : ffffffc080a93650
Dec 06 07:19:17 jackrune kernel: x29: ffffffc080a93650 x28:
ffffff8005961ed4 x27: ffffff800ad3eb58
Dec 06 07:19:17 jackrune kernel: x26: ffffff8007b48810 x25:
ffffffec8b8ea838 x24: ffffffffffffffff
Dec 06 07:19:17 jackrune kernel: x23: ffffffc080a93718 x22:
ffffff8007b48000 x21: ffffff8004c8b000
Dec 06 07:19:17 jackrune kernel: x20: ffffff8008bae400 x19:
ffffffc080a93718 x18: 0000000000000000
Dec 06 07:19:17 jackrune kernel: x17: ffffff9345707000 x16:
ffffffecf2119150 x15: 0000000000000000
Dec 06 07:19:17 jackrune kernel: x14: 009009f090d000c6 x13:
0000000000636570 x12: 730000d022000000
Dec 06 07:19:17 jackrune kernel: x11: 000000000000013a x10:
0000000000001a60 x9 : ffffffec8b88656c
Dec 06 07:19:17 jackrune kernel: x8 : ffffff8007b48528 x7 :
ffffff8007b48528 x6 : 00000000000003e8
Dec 06 07:19:17 jackrune kernel: x5 : ffffff800591fe40 x4 :
0000000000000000 x3 : 000000000058e1e8
Dec 06 07:19:17 jackrune kernel: x2 : ffffff800643dc40 x1 :
0000000000000000 x0 : 0000000000000000
Dec 06 07:19:17 jackrune kernel: Call trace:
Dec 06 07:19:17 jackrune kernel: nl80211_send_chandef+0x188/0x1a0 [cfg80211]
Dec 06 07:19:17 jackrune kernel: nl80211_send_iface+0x72c/0x7c8 [cfg80211]
Dec 06 07:19:17 jackrune kernel: nl80211_dump_interface+0x10c/0x200 [cfg80211]
Dec 06 07:19:17 jackrune kernel: genl_dumpit+0x48/0xd8
Dec 06 07:19:17 jackrune kernel: netlink_dump+0x130/0x330
Dec 06 07:19:17 jackrune kernel: __netlink_dump_start+0x258/0x348
Dec 06 07:19:17 jackrune kernel: genl_family_rcv_msg_dumpit+0x90/0x120
Dec 06 07:19:17 jackrune kernel: genl_rcv_msg+0x128/0x298
Dec 06 07:19:17 jackrune kernel: netlink_rcv_skb+0x64/0x138
Dec 06 07:19:17 jackrune kernel: genl_rcv+0x40/0x60
Dec 06 07:19:17 jackrune kernel: netlink_unicast+0x2fc/0x370
Dec 06 07:19:17 jackrune kernel: netlink_sendmsg+0x1c4/0x448
Dec 06 07:19:17 jackrune kernel: __sock_sendmsg+0x64/0xc0
Dec 06 07:19:17 jackrune kernel: __sys_sendto+0x114/0x178
Dec 06 07:19:17 jackrune kernel: __arm64_sys_sendto+0x30/0x48
Dec 06 07:19:17 jackrune kernel: invoke_syscall+0x50/0x128
Dec 06 07:19:17 jackrune kernel: el0_svc_common.constprop.0+0xc8/0xf0
Dec 06 07:19:17 jackrune kernel: do_el0_svc+0x24/0x38
Dec 06 07:19:17 jackrune kernel: el0_svc+0x38/0xd0
Dec 06 07:19:17 jackrune kernel: el0t_64_sync_handler+0x100/0x130
Dec 06 07:19:17 jackrune kernel: el0t_64_sync+0x190/0x198
Dec 06 07:19:17 jackrune kernel: ---[ end trace 0000000000000000 ]---
I'll start over and try it again and see how far I get.
On Fri, Dec 6, 2024 at 1:36 AM Arend Van Spriel
<arend.vanspriel@broadcom.com> wrote:
>
> On December 6, 2024 7:53:28 AM Renjaya Raga Zenta
> <renjaya.zenta@formulatrix.com> wrote:
>
> > On Thu, 5 Dec 2024 14:10:51 +0100 Arend Van Spriel wrote:
> >> Can you try the patch attached?
> >
> > I've just tried this in 6.6, obviously the errors disappear. Tested with
> > DUMP_OBSS enabled.
>
> Thanks, Renjaya
>
> It was the pragmatic fix. There still seems a potential issue in how
> brcmfmac provides the channels to cfg80211.
>
> > Will this also land to stable?
>
> I have not formally submitted it to linux-wireless. I will add the
> appropriate tags for stable.
>
> Regards,
> Arend
>
>
>
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-12-06 13:28 ` KeithG
@ 2024-12-06 14:17 ` Arend Van Spriel
2024-12-07 4:44 ` KeithG
0 siblings, 1 reply; 41+ messages in thread
From: Arend Van Spriel @ 2024-12-06 14:17 UTC (permalink / raw)
To: KeithG; +Cc: Renjaya Raga Zenta, linux-wireless
On December 6, 2024 2:29:06 PM KeithG <ys3al35l@gmail.com> wrote:
> I built the kernel and got this:
> root@jackrune(rw):~# uname -a
> Linux jackrune 6.6.63-v8+ #3 SMP PREEMPT Tue Dec 3 10:09:16 CST 2024
> aarch64 GNU/Linux
>
> I must've done something wrong, though, as I get this:
> Dec 06 07:08:10 jackrune kernel: ------------[ cut here ]------------
> Dec 06 07:08:10 jackrune kernel: WARNING: CPU: 0 PID: 42 at
> net/wireless/nl80211.c:3822 nl80211_send_chandef+0x188/0x1a0
> [cfg80211]
The warning originates from here:
int nl80211_send_chandef(struct sk_buff *msg, const struct
cfg80211_chan_def *chandef)
{
if (WARN_ON(!cfg80211_chandef_valid(chandef)))
return -EINVAL;
Let me know if next round goes better/same/worse.
Regards,
Arend
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-12-06 14:17 ` Arend Van Spriel
@ 2024-12-07 4:44 ` KeithG
2024-12-31 17:00 ` KeithG
0 siblings, 1 reply; 41+ messages in thread
From: KeithG @ 2024-12-07 4:44 UTC (permalink / raw)
To: Arend Van Spriel; +Cc: Renjaya Raga Zenta, linux-wireless
On Fri, Dec 6, 2024 at 8:17 AM Arend Van Spriel
<arend.vanspriel@broadcom.com> wrote:
>
> On December 6, 2024 2:29:06 PM KeithG <ys3al35l@gmail.com> wrote:
>
> > I built the kernel and got this:
> > root@jackrune(rw):~# uname -a
> > Linux jackrune 6.6.63-v8+ #3 SMP PREEMPT Tue Dec 3 10:09:16 CST 2024
> > aarch64 GNU/Linux
> >
> > I must've done something wrong, though, as I get this:
> > Dec 06 07:08:10 jackrune kernel: ------------[ cut here ]------------
> > Dec 06 07:08:10 jackrune kernel: WARNING: CPU: 0 PID: 42 at
> > net/wireless/nl80211.c:3822 nl80211_send_chandef+0x188/0x1a0
> > [cfg80211]
>
> The warning originates from here:
>
> int nl80211_send_chandef(struct sk_buff *msg, const struct
> cfg80211_chan_def *chandef)
> {
> if (WARN_ON(!cfg80211_chandef_valid(chandef)))
> return -EINVAL;
>
> Let me know if next round goes better/same/worse.
>
> Regards,
> Arend
>
>
I re-built the kernel clean (w/o the patch) and I get the fail message:
Dec 06 22:38:24 jackrune kernel: brcmfmac: brcmf_set_channel: set
chanspec 0x100c fail, reason -52
Dec 06 22:38:24 jackrune kernel: brcmfmac: brcmf_set_channel: set
chanspec 0x100d fail, reason -52
Dec 06 22:38:24 jackrune kernel: brcmfmac: brcmf_set_channel: set
chanspec 0x100e fail, reason -52
Dec 06 22:38:24 jackrune kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd022 fail, reason -52
Dec 06 22:38:24 jackrune kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd026 fail, reason -52
Dec 06 22:38:24 jackrune kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd02a fail, reason -52
Dec 06 22:38:24 jackrune kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd02e fail, reason -52
When I re-build with the patch, I get the kernel panic
Is there a revised patch?
Keith
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-12-07 4:44 ` KeithG
@ 2024-12-31 17:00 ` KeithG
0 siblings, 0 replies; 41+ messages in thread
From: KeithG @ 2024-12-31 17:00 UTC (permalink / raw)
To: Arend Van Spriel; +Cc: Renjaya Raga Zenta, linux-wireless
On Fri, Dec 6, 2024 at 10:44 PM KeithG <ys3al35l@gmail.com> wrote:
>
> On Fri, Dec 6, 2024 at 8:17 AM Arend Van Spriel
> <arend.vanspriel@broadcom.com> wrote:
> >
> > On December 6, 2024 2:29:06 PM KeithG <ys3al35l@gmail.com> wrote:
> >
> > > I built the kernel and got this:
> > > root@jackrune(rw):~# uname -a
> > > Linux jackrune 6.6.63-v8+ #3 SMP PREEMPT Tue Dec 3 10:09:16 CST 2024
> > > aarch64 GNU/Linux
> > >
> > > I must've done something wrong, though, as I get this:
> > > Dec 06 07:08:10 jackrune kernel: ------------[ cut here ]------------
> > > Dec 06 07:08:10 jackrune kernel: WARNING: CPU: 0 PID: 42 at
> > > net/wireless/nl80211.c:3822 nl80211_send_chandef+0x188/0x1a0
> > > [cfg80211]
> >
> > The warning originates from here:
> >
> > int nl80211_send_chandef(struct sk_buff *msg, const struct
> > cfg80211_chan_def *chandef)
> > {
> > if (WARN_ON(!cfg80211_chandef_valid(chandef)))
> > return -EINVAL;
> >
> > Let me know if next round goes better/same/worse.
> >
> > Regards,
> > Arend
> >
> >
> I re-built the kernel clean (w/o the patch) and I get the fail message:
> Dec 06 22:38:24 jackrune kernel: brcmfmac: brcmf_set_channel: set
> chanspec 0x100c fail, reason -52
> Dec 06 22:38:24 jackrune kernel: brcmfmac: brcmf_set_channel: set
> chanspec 0x100d fail, reason -52
> Dec 06 22:38:24 jackrune kernel: brcmfmac: brcmf_set_channel: set
> chanspec 0x100e fail, reason -52
> Dec 06 22:38:24 jackrune kernel: brcmfmac: brcmf_set_channel: set
> chanspec 0xd022 fail, reason -52
> Dec 06 22:38:24 jackrune kernel: brcmfmac: brcmf_set_channel: set
> chanspec 0xd026 fail, reason -52
> Dec 06 22:38:24 jackrune kernel: brcmfmac: brcmf_set_channel: set
> chanspec 0xd02a fail, reason -52
> Dec 06 22:38:24 jackrune kernel: brcmfmac: brcmf_set_channel: set
> chanspec 0xd02e fail, reason -52
> When I re-build with the patch, I get the kernel panic
> Is there a revised patch?
> Keith
With the newest brcmfmax firmware and teh kernel patch to make WPA3
work on the Pis, I get lost of this in the journal:
Dec 30 23:20:25 runeaudio kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd022 fail, reason -52
Dec 30 23:20:25 runeaudio kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd026 fail, reason -52
Dec 30 23:20:25 runeaudio kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd02a fail, reason -52
Dec 30 23:20:25 runeaudio kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd02e fail, reason -52
Dec 30 23:20:26 runeaudio kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd034 fail, reason -52
Dec 30 23:20:26 runeaudio kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd038 fail, reason -52
Dec 30 23:20:26 runeaudio kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd03c fail, reason -52
Dec 30 23:20:26 runeaudio kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd040 fail, reason -52
Dec 30 23:20:26 runeaudio kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd064 fail, reason -52
Dec 30 23:20:26 runeaudio kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd068 fail, reason -52
Dec 30 23:20:26 runeaudio kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd06c fail, reason -52
Dec 30 23:20:26 runeaudio kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd070 fail, reason -52
Dec 30 23:20:26 runeaudio kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd074 fail, reason -52
Dec 30 23:20:26 runeaudio kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd078 fail, reason -52
Dec 30 23:20:26 runeaudio kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd07c fail, reason -52
Dec 30 23:20:26 runeaudio kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd080 fail, reason -52
Dec 30 23:20:26 runeaudio kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd084 fail, reason -52
Dec 30 23:20:26 runeaudio kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd088 fail, reason -52
Dec 30 23:20:26 runeaudio kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd08c fail, reason -52
Dec 30 23:20:26 runeaudio kernel: brcmfmac: brcmf_set_channel: set
chanspec 0xd090 fail, reason -52
I tried the line in /etc/modprobe.d/brcmfmac.conf
brcmfmac feature_disable=0x200000
but do not know what to do with the rest of these. The messages repeat
over and over and fill the log.
it does not seem to affect the function of the wlan as I can still
connect to APs
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2
2024-11-25 11:37 ` Stefan Wahren
@ 2025-07-17 9:29 ` Pragyansh Chaturvedi
0 siblings, 0 replies; 41+ messages in thread
From: Pragyansh Chaturvedi @ 2025-07-17 9:29 UTC (permalink / raw)
To: Stefan Wahren, Renjaya Raga Zenta, arend.vanspriel
Cc: SHA-cyfmac-dev-list, aspriel, brcm80211-dev-list.pdl, franky.lin,
hante.meuleman, johannes, kvalo, linux-wireless, marcan
I investigated this bug some time ago. I didn't do a git bisect as it
takes forever to compile again and again, but I used GDB over SWD to
debug this on a Raspberry Pi 5.
https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2063365 -
specifically the 8th, 9th and 10th comment.
The regdom flags set in brcmf_setup_wiphybands (which happens during
startup) get wiped off by restore_custom_reg_settings and the
corresponding orig_flags contain outdated/invalid data. During a new
disconnect-reconnect cycle, these flags retain their invalid data from
orig_flags.
I have suggested 2 possible fixes (not patches) and I am not sure what
the tradeoffs would be in both of those cases. One possible fix is
changing the orig_flags for the channels at the end of
brcmf_setup_wiphybands (which I don't think is a neat idea), the other
is to call brcmf_setup_wiphybands during every disconnect - reconnect cycle.
I think any of these fixes is better than the current suggested
workaround of turning of DUMP_OBSS feature. I think my findings will
help fix this. Please suggest which of these approaches would be a more
appropriate fix, or feel free to suggest a better approach.
Regards
Pragyansh
On 11/25/24 17:07, Stefan Wahren wrote:
> Am 25.11.24 um 07:49 schrieb Renjaya Raga Zenta:
>> On 11/23/24 4:54 PM, Arend Van Spriel wrote:
>>
>>> This was reported earlier by Stefan Wahren, but the thread ran dry.
>> Yes, I've read the whole thread. I guess what I've found is similar
>> to what Stefan found. Those channels are disabled by the driver in
>> brcmf_construct_chaninfo() but are re-enabled in reg.c.
>>
>> I see there hasn't been any conclusion yet, so I just bumped this
>> thread.
>>
>> Stefan did a workaround by modifying brcmf_construct_chaninfo() to store
>> the IEEE80211_CHAN_DISABLED flag within orig_flags in case the flags had
>> it. I see no further ACK, so I think that's not the proper solution.
> Unfortunately I'm don't have much Wifi knowledge & time to push this
> further. So I'm would be happy, if someone take care of about this
> annoyance.
>>> So what changed a couple of days ago? System upgrade?
>> Well, I use the latest OS from Raspberry Pi, it still uses 6.6.51. I
>> guess
>> there is no significant changes from what Stefan tried.
> I think it should be mentioned, there is no usable Raspberry Pi 5
> support in Mainline yet. So the mention version is a vendor kernel tree.
>
> Regards
>>
>> Regards,
>> Renjaya
>
>
^ permalink raw reply [flat|nested] 41+ messages in thread
end of thread, other threads:[~2025-07-17 9:30 UTC | newest]
Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-11 16:48 brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2 Stefan Wahren
2023-11-11 17:25 ` Arend Van Spriel
2023-11-11 18:29 ` Stefan Wahren
2023-11-11 20:30 ` Stefan Wahren
2023-11-13 9:11 ` Arend van Spriel
2023-11-13 21:02 ` Stefan Wahren
2023-11-14 20:09 ` Stefan Wahren
2023-11-15 9:34 ` Arend van Spriel
2023-11-15 18:35 ` Stefan Wahren
2023-11-15 20:09 ` Arend van Spriel
2023-11-18 11:43 ` Stefan Wahren
2023-12-21 17:47 ` Arend Van Spriel
2023-12-21 17:50 ` Arend Van Spriel
2023-12-21 18:40 ` Stefan Wahren
2023-12-22 15:18 ` Arend Van Spriel
2023-12-22 15:28 ` Arend Van Spriel
2023-12-26 19:27 ` Stefan Wahren
2024-01-16 14:09 ` Johannes Berg
2024-01-16 18:29 ` Arend Van Spriel
2024-02-13 10:15 ` Johannes Berg
2024-07-15 7:54 ` Arend van Spriel
2024-08-28 12:56 ` Johannes Berg
2024-11-20 9:17 ` Renjaya Raga Zenta
2024-11-23 9:54 ` Arend Van Spriel
2024-11-25 6:49 ` Renjaya Raga Zenta
2024-11-25 11:37 ` Stefan Wahren
2025-07-17 9:29 ` Pragyansh Chaturvedi
-- strict thread matches above, loose matches on Subject: below --
2024-12-01 21:55 KeithG
2024-12-02 4:21 ` Renjaya Raga Zenta
2024-12-02 14:23 ` KeithG
2024-12-02 20:27 ` Arend van Spriel
2024-12-02 17:36 ` Arend Van Spriel
2024-12-02 23:49 ` KeithG
2024-12-05 0:54 ` KeithG
2024-12-05 13:10 ` Arend van Spriel
2024-12-06 6:53 ` Renjaya Raga Zenta
2024-12-06 7:36 ` Arend Van Spriel
2024-12-06 13:28 ` KeithG
2024-12-06 14:17 ` Arend Van Spriel
2024-12-07 4:44 ` KeithG
2024-12-31 17:00 ` KeithG
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).