This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

"wlcore: ERROR command complete timeout" during wifi station reconnecting

Hello,

on our board we use WL18MODGI chip. If wifi is set as station everythings works well untill wifi AP is temporary down (cca >15s). During wifi station reconnecting kernel log reports (kernel 3.12.10):

wlcore: PHY firmware version: Rev 8.2.0.0.195
wlcore: firmware booted (Rev 8.8.0.0.13)
wlan0: authenticate with 54:4a:16:03:10:73
wlcore: ERROR command complete timeout
------------[ cut here ]------------
WARNING: CPU: 0 PID: 970 at drivers/net/wireless/ti/wlcore/main.c:802 wl12xx_queue_recovery_work.part.40+0x6c/0x70()
Modules linked in: wlcore_sdio [last unloaded: wlcore_sdio]
CPU: 0 PID: 970 Comm: wpa_supplicant Tainted: G        W    3.12.10+ #1
Backtrace: 
[<c00113f8>] (dump_backtrace+0x0/0x10c) from [<c00116d4>] (show_stack+0x18/0x1c)
 r6:c024ecec r5:00000009 r4:00000000 r3:00000000
[<c00116bc>] (show_stack+0x0/0x1c) from [<c042521c>] (dump_stack+0x24/0x28)
[<c04251f8>] (dump_stack+0x0/0x28) from [<c0030da8>] (warn_slowpath_common+0x78/0x90)
[<c0030d30>] (warn_slowpath_common+0x0/0x90) from [<c0030e64>] (warn_slowpath_null+0x24/0x2c)
 r8:000198fb r7:000000c8 r6:c05aa170 r5:00000096 r4:df400c00
[<c0030e40>] (warn_slowpath_null+0x0/0x2c) from [<c024ecec>] (wl12xx_queue_recovery_work.part.40+0x6c/0x70)
[<c024ec80>] (wl12xx_queue_recovery_work.part.40+0x0/0x70) from [<c0250854>] (wl12xx_queue_recovery_work+0x1c/0x20)
 r4:df400c00 r3:00000002
[<c0250838>] (wl12xx_queue_recovery_work+0x0/0x20) from [<c0252a80>] (wlcore_cmd_send_failsafe+0x80/0x4e8)
[<c0252a00>] (wlcore_cmd_send_failsafe+0x0/0x4e8) from [<c02538c8>] (wl12xx_cmd_role_start_sta+0x140/0x1ec)
[<c0253788>] (wl12xx_cmd_role_start_sta+0x0/0x1ec) from [<c025002c>] (wl1271_op_bss_info_changed+0xbd8/0xe7c)
 r9:00000000 r8:df49db00 r7:c05de0b0 r6:000000e0 r5:df400c00
r4:df49daf8
[<c024f454>] (wl1271_op_bss_info_changed+0x0/0xe7c) from [<c03f264c>] (ieee80211_bss_info_change_notify+0x98/0x118)
[<c03f25b4>] (ieee80211_bss_info_change_notify+0x0/0x118) from [<c041919c>] (ieee80211_prep_connection+0x384/0x7bc)
 r6:df49d420 r5:00000000 r4:48ff8276
[<c0418e18>] (ieee80211_prep_connection+0x0/0x7bc) from [<c041d564>] (ieee80211_mgd_auth+0x1f4/0x298)
[<c041d370>] (ieee80211_mgd_auth+0x0/0x298) from [<c0405be8>] (ieee80211_auth+0x18/0x1c)
 r8:df400100 r7:df49d428 r6:df49d000 r5:df400000 r4:00000000
[<c0405bd0>] (ieee80211_auth+0x0/0x1c) from [<c03e9264>] (cfg80211_mlme_auth+0x158/0x170)
[<c03e910c>] (cfg80211_mlme_auth+0x0/0x170) from [<c03e1304>] (nl80211_authenticate+0x284/0x2c8)
[<c03e1080>] (nl80211_authenticate+0x0/0x2c8) from [<c031e610>] (genl_rcv_msg+0x220/0x3bc)
[<c031e3f0>] (genl_rcv_msg+0x0/0x3bc) from [<c031daf4>] (netlink_rcv_skb+0xa8/0xc4)
[<c031da4c>] (netlink_rcv_skb+0x0/0xc4) from [<c031e3e0>] (genl_rcv+0x2c/0x3c)
 r6:df36f200 r5:df15fc80 r4:c05cac24 r3:00000001
[<c031e3b4>] (genl_rcv+0x0/0x3c) from [<c031d49c>] (netlink_unicast+0x138/0x1a8)
 r5:00000048 r4:df149200
[<c031d364>] (netlink_unicast+0x0/0x1a8) from [<c031d8ac>] (netlink_sendmsg+0x2e4/0x394)
 r8:00000000 r7:df36f200 r6:df6f1dd8 r5:00000000 r4:df6f1f5c
[<c031d5c8>] (netlink_sendmsg+0x0/0x394) from [<c02e1fa4>] (sock_sendmsg+0x90/0xb4)
[<c02e1f14>] (sock_sendmsg+0x0/0xb4) from [<c02e34ac>] (___sys_sendmsg.part.34+0x2c8/0x2d8)
 r4:df6f1f5c
[<c02e31e4>] (___sys_sendmsg.part.34+0x0/0x2d8) from [<c02e453c>] (__sys_sendmsg+0x54/0x84)
[<c02e44e8>] (__sys_sendmsg+0x0/0x84) from [<c02e457c>] (SyS_sendmsg+0x10/0x14)
 r6:bed429b4 r5:00f79da0 r4:00f78210
[<c02e456c>] (SyS_sendmsg+0x0/0x14) from [<c000e6e0>] (ret_fast_syscall+0x0/0x30)
---[ end trace 6c0ad5a2819eae6d ]---
wlcore: ERROR failed to initiate cmd role start sta
wlcore: WARNING cmd join failed -110
wlan0: failed to insert STA entry for the AP (error -16)

If wifi AP is down for less than 10s then station reconnects without any kernel errors.

Thanks
Jiri
  • hi , you are using very old version of wilink8 driver . i suggest you update to latest R8.7_SP1
    processors.wiki.ti.com/.../WL18xx_System_Build_Scripts

    Saurabh
  • Hi,

    thank you for reply. I am not successfull with building new driver for my linux 3.12.10. I launch cmd "./build_wl18xx.sh update R8.7_SP1" and it reports:

    Changing ROOTFS path to /home/jiri/work/build-utilites/rootfs
    Using user defined kernel
    Makefile was found. Kernel version was set to 3.12.10.
    ***** setting up workspace and building all *****
    ***** Using tag R8.7_SP1 *****
    Cloning into: kernel
    Cloning into: openssl
    Cloning into: libnl
    Cloning into: crda
    Cloning into: wireless_regdb
    Cloning into: driver
    Cloning into: hostap
    Cloning into: ti_utils
    Cloning into: fw_download
    Cloning into: scripts_download
    Cloning into: backports
    Cloning into: iw
    Cloning into: uim
    Cloning into: bt-firmware
    .....

    .....
    /home/jiri/work/build-utilites/src/compat_wireless/net/wireless/util.c:15:24: fatal error: linux/mpls.h: No such file or directory
    #include <linux/mpls.h>
    ^
    compilation terminated.


    This h-file is not present in linux 3.12.10.

    My set-env
    # if DEFAULT toolchain path is set toolchain will be downloaded to ./toolchain.
    export TOOLCHAIN_PATH=/opt/toolchain/gcc-conel-armv7-linux-gnueabi/bin

    # if DEFAULT path to root filesystem is set ./fs folder will be used.
    export ROOTFS=/home/jiri/work/build-utilites/rootfs

    #if DEFAULT kernel path is set - kernel will be downloaded (set branch to match kernel version)
    export KERNEL_PATH=/home/jiri/work/ltib-RBv3/rpm/RBv3/BUILD/linux

    # if KERNEL_VARIANT below is set the build script will look for kernel specific
    # patches under the patches directory:
    # - patches under the pathces/driver_patches/$KERNEL_VARIANT directory would be
    # applied during "modules" build.
    # - patches under the patches/kernel_patches/$/$KERNEL_VARIANT directory would
    # be applied to the kernel pointed by KERNEL_PATH in case the "patch_kernel"
    # command is used.
    # Note: the kernel is not built automatically after the patches are applied
    export KERNEL_VARIANT=DEFAULT

    export CROSS_COMPILE=armv7-linux-gnueabi-
    export ARCH=arm
    [ "$TOOLCHAIN_PATH" != "DEFAULT" ] && export PATH=$TOOLCHAIN_PATH:$PATH

    Regards,
    Jiri
  • hi , due to kernel incompatibility you might not be able use build scripts directly to update wilink 8 driver . this is a backport issue which you will need to resolve at your end .
    Saurabh
  • Hi,

    Could you give me some instructions how to solve it "on my end"? I thought that the build_script is able to manage build new driver version for 3.12 kernel....

    So new driver can be build only for kernel 4.x and higher?

    Thanks

    Jiri

  • hi ,
    for backports please consult: backports.wiki.kernel.org/.../integration
    backports uses source kernel ( downloaded by build script), target kernel (your kernel) and generates compatible code for compilation . You may look in src/backports ; src/compat_wrieless . backports should take care of any missing files. If you see any such issue try debugging it and see why backports didn't copy that file .

    Saurabh