cancel
Showing results for 
Search instead for 
Did you mean: 

Wi-Fi Bluetooth for Linux

maku_2263101
New Contributor II

Hi,

We are seeing continues -110 failure commands from firmware.

From brcmfmac driver we are quering "rssi" command and the command is retirning -110 error.

Below is the sample error message.

[414152.320000] brcmfmac: brcmf_proto_bcdc_query_dcmd: brcmf_proto_bcdc_msg failed w/status -110

[414152.320000] brcmfmac: theatro_sub_event_handler: failed code -110

[414154.880000] brcmfmac: brcmf_proto_bcdc_query_dcmd: brcmf_proto_bcdc_msg failed w/status -110

[414154.880000] brcmfmac: theatro_get_rssi: failed code -110

[414157.440000] brcmfmac: brcmf_proto_bcdc_query_dcmd: brcmf_proto_bcdc_msg failed w/status -110

[414157.440000] brcmfmac: theatro_get_rssi: failed code -110

[414160.000000] brcmfmac: brcmf_proto_bcdc_query_dcmd: brcmf_proto_bcdc_msg failed w/status -110

[414160.000000] brcmfmac: theatro_sub_event_handler: failed code -110

[414160.800000] Debug var at START:1 0

[414160.950000] Debug var at STOP:0 1

[414162.560000] brcmfmac: brcmf_proto_bcdc_query_dcmd: brcmf_proto_bcdc_msg failed w/status -110

[414162.560000] brcmfmac: theatro_sub_event_handler: failed code -110

[414165.120000] brcmfmac: brcmf_proto_bcdc_query_dcmd: brcmf_proto_bcdc_msg failed w/status -110

wl ver:

     1.21 RC0.0

     wl0: May  2 2019 02:46:17 version 7.45.189 (r714228 CY) FWID 01-e1db26e2

Can you please help us in debugging this issue. Let us know if you need any more details.

Attaching the log file for your reference.

vinayakGauravS_31

0 Likes
1 Solution
VinayakS_26
Moderator
Moderator

Hi maku_3939256 ,

I can understand your concern over code changes which are proprietary.

Please do the following to capture more debug logs.

Compile the fmac module with the following flag enabled in the .config of the module

CPTCFG_BRCM_TRACING=y

CPTCFG_BRCMDBG=y

and kernel configs

CONFIG_BRCMDBG=y

CONFIG_DEBUG_FS=y

Once compiled,

enable logs tracing from printk using the following command

>>>echo 8 > /proc/sys/kernel/printk

Then insmod the fmac module with the following module param

>>>insmod brcmfmac.ko debug=${BRCMF_Message_Level}

/* message levels */

#define BRCMF_TRACE_VAL 0x00000002

#define BRCMF_INFO_VAL 0x00000004

#define BRCMF_DATA_VAL 0x00000008

#define BRCMF_CTL_VAL 0x00000010

#define BRCMF_TIMER_VAL 0x00000020

#define BRCMF_HDRS_VAL 0x00000040

#define BRCMF_BYTES_VAL 0x00000080

#define BRCMF_INTR_VAL 0x00000100

#define BRCMF_GLOM_VAL 0x00000200

#define BRCMF_EVENT_VAL 0x00000400

#define BRCMF_BTA_VAL 0x00000800

#define BRCMF_FIL_VAL 0x00001000

#define BRCMF_USB_VAL 0x00002000

#define BRCMF_SCAN_VAL 0x00004000

#define BRCMF_CONN_VAL 0x00008000

#define BRCMF_BCDC_VAL 0x00010000

#define BRCMF_SDIO_VAL 0x00020000

#define BRCMF_MSGBUF_VAL 0x00040000

#define BRCMF_PCIE_VAL 0x00080000

#define BRCMF_FWCON_VAL 0x00100000

#define BRCMF_ULP_VAL 0x00200000

    

The above defines are placed in debug.h(/v4.14.52-backports/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h)

Example for firmware logs

>>> insmod brcmfmac.ko debug=0x00100006

Regards,

VinayakS_26

View solution in original post

5 Replies
VinayakS_26
Moderator
Moderator

"From brcmfmac driver we are quering "rssi" command "

>> could you attach the code segment where you are passing the rssi command. Have you made a implementation of your own there in the  driver or are you using the wl command/(some other utility) to get the rssi information from the firmware.

Regards,

VinayakS_26

maku_3939256
New Contributor

Hi Vinayak,

We are using our own implementation to query RSSI from firmware.

Here is the code snippet for that:

static u8 theatro_get_rssi(struct brcmf_if *ifp)

{

  int32 rssi = 0;

  int ret = 0;

  ret = brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_RSSI, &rssi);

  if (ret) {

    brcmf_err("failed code %d\n",ret);

    return 0;

  }

  return (u8)((~(rssi) + 1));

}

0 Likes
VinayakS_26
Moderator
Moderator

Hi Manoj,

Thanks for the code snippet. If possible please attach the patched source file with the changes so that i could test it in my setup and try reproduce the issue that you are seeing in your setup.

Regards,

VinayakS_26

maku_3939256
New Contributor

Hi Vinayak,

Unfortunately we have many proprietary changes patched to the original source which I can't share for obvious reasons. Basically our code queries RSSI from firmware for every 1 second using the command I shared above.

Can you please share us some information like in what scenarios we might see timeout errors and is there a way we can collect logs to get more information that might help you/us in debugging.

I am trying to trim down our code to see if I can create a version that can be shared with you meanwhile.

Regards,

Rupesh.

0 Likes
VinayakS_26
Moderator
Moderator

Hi maku_3939256 ,

I can understand your concern over code changes which are proprietary.

Please do the following to capture more debug logs.

Compile the fmac module with the following flag enabled in the .config of the module

CPTCFG_BRCM_TRACING=y

CPTCFG_BRCMDBG=y

and kernel configs

CONFIG_BRCMDBG=y

CONFIG_DEBUG_FS=y

Once compiled,

enable logs tracing from printk using the following command

>>>echo 8 > /proc/sys/kernel/printk

Then insmod the fmac module with the following module param

>>>insmod brcmfmac.ko debug=${BRCMF_Message_Level}

/* message levels */

#define BRCMF_TRACE_VAL 0x00000002

#define BRCMF_INFO_VAL 0x00000004

#define BRCMF_DATA_VAL 0x00000008

#define BRCMF_CTL_VAL 0x00000010

#define BRCMF_TIMER_VAL 0x00000020

#define BRCMF_HDRS_VAL 0x00000040

#define BRCMF_BYTES_VAL 0x00000080

#define BRCMF_INTR_VAL 0x00000100

#define BRCMF_GLOM_VAL 0x00000200

#define BRCMF_EVENT_VAL 0x00000400

#define BRCMF_BTA_VAL 0x00000800

#define BRCMF_FIL_VAL 0x00001000

#define BRCMF_USB_VAL 0x00002000

#define BRCMF_SCAN_VAL 0x00004000

#define BRCMF_CONN_VAL 0x00008000

#define BRCMF_BCDC_VAL 0x00010000

#define BRCMF_SDIO_VAL 0x00020000

#define BRCMF_MSGBUF_VAL 0x00040000

#define BRCMF_PCIE_VAL 0x00080000

#define BRCMF_FWCON_VAL 0x00100000

#define BRCMF_ULP_VAL 0x00200000

    

The above defines are placed in debug.h(/v4.14.52-backports/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h)

Example for firmware logs

>>> insmod brcmfmac.ko debug=0x00100006

Regards,

VinayakS_26

View solution in original post