2022-06-13 09:29:06

by Arend van Spriel

[permalink] [raw]
Subject: Re: brcmfmac

On 6/12/2022 5:49 PM, Hranislav Milenkovic wrote:
> Hi Arend,
> I fouded your e-mail here
> https://wireless.wiki.kernel.org/en/users/drivers/brcm80211
> <https://wireless.wiki.kernel.org/en/users/drivers/brcm80211>
> I have netgear R8000 with brcm 43602 wifi chip. I am using ddwrt with
> experimental build. There are 2 versions of build, normal with dhd and
> experimental with brvmfmac driver
> https://dd-wrt.com/support/other-downloads/?path=betas%2F2022%2F06-10-2022-r49139%2Fnetgear-r8000%2F
> <https://dd-wrt.com/support/other-downloads/?path=betas%2F2022%2F06-10-2022-r49139%2Fnetgear-r8000%2F>
> Router crashes sometimes and I emailed ddwrt devs with crashlog... but
> they told me
>
> "there is nothing to fix. its a firmware error. broadcom does not
> provide support for these firmwares . I cannot fix the firmware error
> for that chipset. its a binary. we can only seek for a newer firmware
> binary somewhere in the wild..."

Looked at the log and ddwrt devs are mistaken. In the log it shows:

Jun 12 13:26:00 109.198.5.214 logger : calling done start_checkhostapd
Jun 12 13:26:07 109.198.5.214 kernel [ 4743.815344] ieee80211 phy2:
brcmf_fil_cmd_data: Firmware error: (-23) cmd 262
Jun 12 13:27:04 109.198.5.214 kernel [ 4800.660849] Unable to handle
kernel NULL pointer dereference at virtual address 00000058

So there is a command failing in firmware with error -23, but this is
harmless. The NULL pointer dereference is a driver crash. Can you build
the kernel with CONFIG_DEBUG_INFO and provide me with the brcmfmac
kernel module, ie. brcmfmac.ko?

Regards,
Arend


Attachments:
smime.p7s (4.12 kB)
S/MIME Cryptographic Signature

2022-06-14 08:43:18

by Arend van Spriel

[permalink] [raw]
Subject: Re: brcmfmac

On 6/13/2022 11:19 AM, Arend van Spriel wrote:
> On 6/12/2022 5:49 PM, Hranislav Milenkovic wrote:
>> Hi Arend,
>> I fouded your e-mail here
>> https://wireless.wiki.kernel.org/en/users/drivers/brcm80211
>> <https://wireless.wiki.kernel.org/en/users/drivers/brcm80211>
>> I have netgear R8000 with brcm 43602 wifi chip. I am using ddwrt with
>> experimental build. There are 2 versions of build, normal with dhd and
>> experimental with brvmfmac driver
>> https://dd-wrt.com/support/other-downloads/?path=betas%2F2022%2F06-10-2022-r49139%2Fnetgear-r8000%2F
>> <https://dd-wrt.com/support/other-downloads/?path=betas%2F2022%2F06-10-2022-r49139%2Fnetgear-r8000%2F>
>>
>> Router crashes sometimes and I emailed ddwrt devs with crashlog... but
>> they told me
>>
>> "there is nothing to fix. its a firmware error. broadcom does not
>> provide support for these firmwares . I cannot fix the firmware error
>> for that chipset. its a binary. we can only seek for a newer firmware
>> binary somewhere in the wild..."
>
> Looked at the log and ddwrt devs are mistaken. In the log it shows:
>
>  Jun 12 13:26:00 109.198.5.214 logger : calling done start_checkhostapd
>  Jun 12 13:26:07 109.198.5.214 kernel [ 4743.815344] ieee80211 phy2:
> brcmf_fil_cmd_data: Firmware error:  (-23) cmd 262
>  Jun 12 13:27:04 109.198.5.214 kernel [ 4800.660849] Unable to handle
> kernel NULL pointer dereference at virtual address 00000058
>
> So there is a command failing in firmware with error -23, but this is
> harmless. The NULL pointer dereference is a driver crash. Can you build
> the kernel with CONFIG_DEBUG_INFO and provide me with the brcmfmac
> kernel module, ie. brcmfmac.ko?

Hi Sebastian,

I heared from Hranislav that you have a modified version of brcmfmac so
it would not help me to get a .ko with debug info from you. So decided
to ask you directly. I doubt you modified much in flowring.c. Not sure
about fweh.c, but these are the two source files I am interested in.
Also I am not scared to look at the ARM assembly so anything you can
throw at me would work.

Regards,
Arend


Attachments:
smime.p7s (4.12 kB)
S/MIME Cryptographic Signature

2022-06-15 09:07:10

by Sebastian Gottschall

[permalink] [raw]
Subject: Re: brcmfmac


Am 14.06.2022 um 10:41 schrieb Arend van Spriel:
> On 6/13/2022 11:19 AM, Arend van Spriel wrote:
>> On 6/12/2022 5:49 PM, Hranislav Milenkovic wrote:
>>> Hi Arend,
>>> I fouded your e-mail here
>>> https://wireless.wiki.kernel.org/en/users/drivers/brcm80211
>>> <https://wireless.wiki.kernel.org/en/users/drivers/brcm80211>
>>> I have netgear R8000 with brcm 43602 wifi chip. I am using ddwrt
>>> with experimental build. There are 2 versions of build, normal with
>>> dhd and experimental with brvmfmac driver
>>> https://dd-wrt.com/support/other-downloads/?path=betas%2F2022%2F06-10-2022-r49139%2Fnetgear-r8000%2F
>>> <https://dd-wrt.com/support/other-downloads/?path=betas%2F2022%2F06-10-2022-r49139%2Fnetgear-r8000%2F>
>>>
>>> Router crashes sometimes and I emailed ddwrt devs with crashlog...
>>> but they told me
>>>
>>> "there is nothing to fix. its a firmware error. broadcom does not
>>> provide support for these firmwares . I cannot fix the firmware
>>> error for that chipset. its a binary. we can only seek for a newer
>>> firmware binary somewhere in the wild..."
>>
>> Looked at the log and ddwrt devs are mistaken. In the log it shows:
>>
>>   Jun 12 13:26:00 109.198.5.214 logger : calling done start_checkhostapd
>>   Jun 12 13:26:07 109.198.5.214 kernel [ 4743.815344] ieee80211 phy2:
>> brcmf_fil_cmd_data: Firmware error:  (-23) cmd 262
>>   Jun 12 13:27:04 109.198.5.214 kernel [ 4800.660849] Unable to
>> handle kernel NULL pointer dereference at virtual address 00000058
>>
>> So there is a command failing in firmware with error -23, but this is
>> harmless. The NULL pointer dereference is a driver crash. Can you
>> build the kernel with CONFIG_DEBUG_INFO and provide me with the
>> brcmfmac kernel module, ie. brcmfmac.ko?
>
> Hi Sebastian,
>
> I heared from Hranislav that you have a modified version of brcmfmac
> so it would not help me to get a .ko with debug info from you. So
> decided to ask you directly. I doubt you modified much in flowring.c.
> Not sure about fweh.c, but these are the two source files I am
> interested in. Also I am not scared to look at the ARM assembly so
> anything you can throw at me would work.
i did not modify much in flowring. nothing in fact. i added some
features like airtime reporting and noise reporting in the generic code.
so just all the cosmetic things i need for my firmware. some are might
be also usefull for merging to upstream. but some of this code might be
too ugly for it.
you can find the sources here
https://github.com/mirror/dd-wrt/tree/master/src/router/mac80211/drivers/net/wireless/broadcom/brcm80211/brcmfmac
the issue hranislav is reporting seems also only to affect bcm43602
chipsets. but not 4366 for instance. or at least i have never seen it.
another thing is that i use customized firmwares for airtime reporting
etc. you can find them also here

https://github.com/mirror/dd-wrt/tree/master/src/router/mac80211/ath10k-firmware-38eeda3ae6f90fde5546bdd48ee4ff3090f238c0/brcm


Sebastian

>
> Regards,
> Arend