[SOLVED] imx8mp + mwifiex (nxp89xx firmware) crashing on manual scanning

wifi driver crashes on manual scan with wpa_supplicant

module: verdin imx8mp v1.1A
linux: d6880bf83a40d75a683697183611a95c8ab7a7c5 (toradex_5.15-2.2.x-imx)
mwifiex: 1.0 (16.92.21.p84)
wpa_supplicant: 2.10

crash:

bash root@imbox:~# wpa_cli scan Selected interface 'mlan0'[ 796.613480] ieee80211 phy0: sched scan stop!'SCAN' command timed out. root@imbox:~# [ 806.800264] mwifiex_sdio mmc0:0001:1: mwifiex_cmd_timeout_func: Timeout cmd id = 0x6b, act = 0x1 [ 806.809095] mwifiex_sdio mmc0:0001:1: num_data_h2c_failure = 0 [ 806.814947] mwifiex_sdio mmc0:0001:1: num_cmd_h2c_failure = 0 [ 806.820724] mwifiex_sdio mmc0:0001:1: is_cmd_timedout = 1 [ 806.826163] mwifiex_sdio mmc0:0001:1: num_tx_timeout = 0 [ 806.831501] mwifiex_sdio mmc0:0001:1: last_cmd_index = 2 [ 806.836835] mwifiex_sdio mmc0:0001:1: last_cmd_id: 07 01 6b 00 6b 00 07 01 07 01 [ 806.844269] mwifiex_sdio mmc0:0001:1: last_cmd_act: 00 00 01 00 01 00 00 00 00 00 [ 806.851774] mwifiex_sdio mmc0:0001:1: last_cmd_resp_index = 1 [ 806.857548] mwifiex_sdio mmc0:0001:1: last_cmd_resp_id: 07 81 6b 80 07 81 07 81 07 81 [ 806.865396] mwifiex_sdio mmc0:0001:1: last_event_index = 4 [ 806.870896] mwifiex_sdio mmc0:0001:1: last_event: 58 00 58 00 0b 00 0a 00 65 00 [ 806.878225] mwifiex_sdio mmc0:0001:1: data_sent=0 cmd_sent=1 [ 806.883900] mwifiex_sdio mmc0:0001:1: ps_mode=1 ps_state=0 [ 806.890041] mwifiex_sdio mmc0:0001:1: ===mwifiex driverinfo dump start=== [ 806.890197] mwifiex_sdio mmc0:0001:1: PREP_CMD: FW is in bad state [ 806.896912] mwifiex_sdio mmc0:0001:1: info: MWIFIEX VERSION: mwifiex 1.0 (16.92.21.p84) [ 806.903074] mwifiex_sdio mmc0:0001:1: Ignore scan. Card removed or firmware in bad state [ 806.903080] mwifiex_sdio mmc0:0001:1: scan failed: -14 [ 806.924527] mwifiex_sdio mmc0:0001:1: SDIO register dump start [ 806.931313] mwifiex_sdio mmc0:0001:1: SDIO Func0 (0x0-0x9): 43 03 02 02 03 00 00 02 03 00 [ 806.939769] mwifiex_sdio mmc0:0001:1: SDIO Func1 (0x10-0x17): 00 00 00 00 00 00 00 80 [ 806.947956] mwifiex_sdio mmc0:0001:1: SDIO Func1: (0x8) c3 (0x58) 00 (0x5c) 48 (0x5d) 00 (0x60) 07 (0x61) 0c (0x62) 00 (0x64) 00 (0x65) 00 (0x66) 00 (0x68) 00 (0x69) 00 (0x6a) 00 [ 806.964171] mwifiex_sdio mmc0:0001:1: SDIO Func1 (0xe8-0xf2): dc fe d5 00 7f 00 00 25 24 14 70 [ 807.074564] mwifiex_sdio mmc0:0001:1: SDIO Func1 (0xe8-0xf2): dc fe e5 00 8b 00 00 25 24 14 70 [ 807.083309] mwifiex_sdio mmc0:0001:1: SDIO register dump end [ 807.089027] mwifiex_sdio mmc0:0001:1: ===mwifiex driverinfo dump end=== [ 807.095719] mwifiex_sdio mmc0:0001:1: == mwifiex firmware dump start == [ 807.124672] mwifiex_sdio mmc0:0001:1: Fail to pull ctrl_data [ 807.130377] mwifiex_sdio mmc0:0001:1: firmware dump failed [ 807.135889] mwifiex_sdio mmc0:0001:1: == mwifiex dump information to /sys/class/devcoredump start [ 807.144928] mwifiex_sdio mmc0:0001:1: == mwifiex dump information to /sys/class/devcoredump end [ 807.153706] mwifiex_sdio mmc0:0001:1: PREP_CMD: FW is in bad state [ 807.160087] mwifiex_sdio mmc0:0001:1: info: shutdown mwifiex... [ 807.166705] mwifiex_sdio mmc0:0001:1: PREP_CMD: card is removed [ 807.173317] mwifiex_sdio mmc0:0001:1: PREP_CMD: card is removed [ 807.284874] mwifiex_sdio mmc0:0001:1: WLAN FW already running! Skip FW dnld [ 807.291877] mwifiex_sdio mmc0:0001:1: WLAN FW is activeroot@imbox:~# [ 817.552685] mwifiex_sdio mmc0:0001:1: mwifiex_cmd_timeout_func: Timeout cmd id = 0xa9, act = 0x0 [ 817.561514] mwifiex_sdio mmc0:0001:1: num_data_h2c_failure = 0 [ 817.567381] mwifiex_sdio mmc0:0001:1: num_cmd_h2c_failure = 0 [ 817.573148] mwifiex_sdio mmc0:0001:1: is_cmd_timedout = 1 [ 817.578564] mwifiex_sdio mmc0:0001:1: num_tx_timeout = 0 [ 817.583895] mwifiex_sdio mmc0:0001:1: last_cmd_index = 3 [ 817.589224] mwifiex_sdio mmc0:0001:1: last_cmd_id: 07 01 6b 00 6b 00 a9 00 07 01 [ 817.596632] mwifiex_sdio mmc0:0001:1: last_cmd_act: 00 00 01 00 01 00 00 00 00 00 [ 817.604127] mwifiex_sdio mmc0:0001:1: last_cmd_resp_index = 1 [ 817.609884] mwifiex_sdio mmc0:0001:1: last_cmd_resp_id: 07 81 6b 80 07 81 07 81 07 81 [ 817.617729] mwifiex_sdio mmc0:0001:1: last_event_index = 0 [ 817.623230] mwifiex_sdio mmc0:0001:1: last_event: 0b 00 58 00 0b 00 0a 00 65 00 [ 817.630554] mwifiex_sdio mmc0:0001:1: data_sent=0 cmd_sent=0 [ 817.636224] mwifiex_sdio mmc0:0001:1: ps_mode=0 ps_state=0 [ 817.642115] mwifiex_sdio mmc0:0001:1: info: _mwifiex_fw_dpc: unregister device

as mentioned in other topics:

found a configuration on wpa_supplicant source

`

 * disable_scan_offload - Disable automatic offloading of scan requests
 *
 * By default, %wpa_supplicant tries to offload scanning if the driver
 * indicates support for this (sched_scan). This configuration
 * parameter can be used to disable this offloading mechanism.
 */
int disable_scan_offload; 

`

by setting this to 1 in the config file, the manual scans work normally.
If there is a scan going on already, FAIL-BUSY is returned

1 Like

Hi @gabrielssanches ,

Thanks for marking the solution.

Have a good day!

Best Regards
Kevin

Hi. May i ask how exactly you set this configuration parameter?

Hello @qojote,

May I ask you to open a new thread for this question?
Not sure if it is related to the question you asked on here?

Best regards
Collin

Hi. Yes. I already opened up a new topic on this issue. BR