brcmfmac with a big-endian host

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
ReDe_673566
Level 1
Level 1
Welcome!

Hello,

We are running brcmfmac with a big-endian host (powerpc).

The attached patch enables basic operation (firmware load, association, some network traffic), but the driver eventually enters into an infinite loop with I_DE (descriptor protocol error) set in intstatus. This is with kernel v5.9, bcm4343w and firmware 7.45.98.97, which run without issues with a little-endian host.

The following sequence repeats (log file is attached):

brcmfmac: brcmf_sdiod_oob_irqhandler OOB intr triggered

brcmfmac: brcmf_sdio_intr_rstatus intstatus=0x00c01040

brcmutil: RxHdr:

00000000: 00 00 00 00 00 00 00 00 00 00 00 00 ............

brcmfmac: brcmf_sdio_readframes processed 0 frames

loop.png

There must be another instance of a missing endian conversion that causes this descriptor protocol error, correct? Any suggestions on where to look? I'll review the patches from the fmac driver realease v5.4.18-2020_0925 that are not in upstream, but nothing jumps out at first glance.

Thank you,

Remi

0 Likes
1 Solution
GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

Some of the parameters are set by the driver in little endian. For instance, in cfg80211.c, the following code statement has been written:

/* data sent to dongle has to be little endian */

*(__le32 *)buf = cpu_to_le32(WL_BSS_INFO_MAX);

err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BSS_INFO,

     buf, WL_BSS_INFO_MAX);

You can check for cpu_to_le32() for little endian and be32_to_cpu() for big endian.

Also a side note, we have not tested the FMAC driver for kernel v5.9.

View solution in original post

0 Likes
1 Reply
GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

Some of the parameters are set by the driver in little endian. For instance, in cfg80211.c, the following code statement has been written:

/* data sent to dongle has to be little endian */

*(__le32 *)buf = cpu_to_le32(WL_BSS_INFO_MAX);

err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BSS_INFO,

     buf, WL_BSS_INFO_MAX);

You can check for cpu_to_le32() for little endian and be32_to_cpu() for big endian.

Also a side note, we have not tested the FMAC driver for kernel v5.9.

0 Likes