Forums - insmod wifi module failed

6 posts / 0 new
Last post
insmod wifi module failed
arnold0kang
Join Date: 4 May 19
Posts: 3
Posted: Sun, 2019-06-02 23:18

hi ,

  I download the QCA 9377 driver from website which is "QCA9377.LEA.3.0_QDN_r3000017.1" . I have build the driver and copy the firmware to my board. when i insmod the mdoule. something wrong. it seems that I miss some firmware. but these firmwre not exist in download package, and im not sure.   please help me .  thanks!

my env: 

  kernel: linux 4.9.37

  arch: arm

  

  the error log: 

     

Quote:
/udisk # insmod wlan.ko

wlan: loading driver v4.0.11.213V
hifDeviceInserted: Dumping clocks (50000000,100000000)
HIFDumpCCCR 0(43) 1(3) 2(0) 3(0) 4(0) 5(0) 6(0) 7(6) 8(17) 9(0) A(10) B(0) C(0) D(0) E(0) F(0) 10(0) 11(0) 12(1) 13(3) 14(7) 15(37) 16(3)
AR6000: Set async interrupt delay clock as 2.
R0: wlan: [234:E :HDD] hdd_apply_cfg_ini: Reg Parameter gRrmOperChanMax > allowed Maximum [8 > 7]. Enforcing Default= 4
R0: wlan: [234:E :HDD] hdd_apply_cfg_ini: Reg Parameter gRrmNonOperChanMax > allowed Maximum [8 > 7]. Enforcing Default= 4
R0: wlan: [234:E :HDD] Name = [gEnableHostapdEdcaLocal] Value = [0]
R0: wlan: [234:E :HDD] Name = [g_sta_change_cc_via_beacon] Value = [0]
R0: [insmod][01:18:14.694004]  wlan: [234:E :HDD] Name = [gEnableHostapdEdcaLocal] Value = [0]
R0: [insmod][01:18:14.702871]  wlan: [234:E :HDD] Name = [g_sta_change_cc_via_beacon] Value = [0]
AR6000: configuration opcode 3 is not used for Linux SDIO stack
NUM_DEV=1 FWMODE=0x2 FWSUBMODE=0x0 FWBR_BUF 0
ol_download_firmware: Using 0x1234 for the remainder of init
R0: [insmod][01:18:14.976617]  wlan: [234:E :VOS] __ol_transfer_bin_file: transferring file: otp30.bin size 25057 bytes done!
ol_download_firmware: chip_id:0x5020001 board_id:0x0
ar6k_wlan mmc2:0001:1: Direct firmware load for bdwlan30.b00 failed with error -2
__ol_transfer_bin_file: Failed to get bdwlan30.b00:-2
__ol_transfer_bin_file: Trying to load default bdwlan30.bin
Board extended Data download address: 0x0
R0: [insmod][01:18:15.051981]  wlan: [234:E :VOS] __ol_transfer_bin_file: transferring file: bdwlan30.bin size 8124 bytes done!
__ol_transfer_bin_file: Loading setup file epping30.bin
ar6k_wlan mmc2:0001:1: Direct firmware load for epping30.bin failed with error -2
__ol_transfer_bin_file: Failed to get epping30.bin:-2
R0: [insmod][01:18:15.416903]  wlan: [234:E :VOS] __ol_transfer_bin_file: transferring file: qwlan30.bin size 619364 bytes done!
+HTCCreate ..  HIF :c4d90000
HIF Interrupt processing is SYNC ONLY
AR6000: configuration opcode 7 is only used for RTOS systems, not Linux systems
AR6000: configuration opcode 5 is not used for Linux SDIO stack
-HTCCreate (0xc4342000)
R0: [insmod][01:18:15.451026]  wlan: [234:F :WDA] WMA --> wmi_unified_attach - success
ol_if_dfs_attach: called; ptr=c4009e68, radar_info=c5397954
R0: [insmod][01:18:15.465171]  wlan: [234:E :SAP] dfs_init_radar_filters[217]: Unknown dfs domain 0
+HWT
send_filled_buffers_to_user: Send Failed -3 drop_count = 1
Target Ready! : transmit resources : 3 size:1792, MaxMsgsPerHTCBundle = 32
HTC Service Index : 1 TX : 0x100 : alloc:3
HTC Service:0x0001, ULpipe:1 DLpipe:0 id:0 Ready
-HWT
MAILBOX SWAP Service is enabled!
is_full_reorder_offloaded? 0
HTC Service TX : 0x300 : allocation is zero!
HTCConnectService, host indicate support b2b bundle
HTCConnectService, firmware decide to disabled b2b bundle
HTC Service:0x0300, ULpipe:1 DLpipe:0 id:1 Ready
TXRX: page_divider 0x5, offset_filter 0x1f num elem 4800, ol desc num page 150, ol desc per page 32HTCConnectService, host indicate support b2b bundle
HTCConnectService, firmware decide to disabled b2b bundle
HTC Service:0x0100, ULpipe:3 DLpipe:2 id:2 Ready
R0: [insmod][01:18:15.559688]  wlan: [234:F :WDA] WMA --> wmi_unified_connect_htc_service - success
R0: [VosMCThread][01:18:15.568533]  wlan: [239:F :WDA] McThread: WNI_CFG_DNLD_REQ
HTC using TX credit flow control
__wmi_control_rx: WMI UNIFIED SERVICE AVAILABLE event
R0: [kworker/1:0][01:18:15.605088]  wlan: [15:F :WDA] WMA <-- WMI_SERVICE_AVAILABLE_EVENTID
__wmi_control_rx: WMI UNIFIED SERVICE READY event
R0: [kworker/1:0][01:18:15.617708]  wlan: [15:F :WDA] WMA <-- WMI_SERVICE_READY_EVENTID
R0: [kworker/1:0][01:18:15.625474]  wlan: [15:E :WDA] wma_rx_service_ready_event: Firmware build version : 00000017
R0: [kworker/1:0][01:18:15.635654]  wlan: [15:E :WDA] wma_rx_service_ready_event: Board version: 0.2201400a
R0: [kworker/1:0][01:18:15.645168]  wlan: [15:F :WDA] WMA --> WMI_INIT_CMDID
ol_target_failure: Loading/Unloading is in progress, ignore!
R0: [insmod][01:18:17.589981]  wlan: [234:F :WDA] wma_wait_for_ready_event: Timeout waiting for ready event from FW
R0: [insmod][01:18:17.600174]  wlan: [234:F :SYS] Failed to get ready event from target firmware
VOS ASSERT in vos_preStart Line 976
------------[ cut here ]------------
WARNING: CPU: 0 PID: 234 at /root/enforce_cam_v2/ec_driver/QCA9377.LEA.3.0_QDN_r3000017.1/fixce/AIO/build/../drivers/qcacld-new/CORE/VOSS/src/vos_api.c:976 vos_preStart+0x398/0x3a0 [wlan]
Modules linked in: wlan(O+) mac80211 cfg80211 g_mass_storage usb_f_mass_storage libcomposite
CPU: 0 PID: 234 Comm: insmod Tainted: G        W  O    4.9.37 #20
Hardware name: Generic DT based system
[<c010fdf0>] (unwind_backtrace) from [<c010b3d8>] (show_stack+0x10/0x14)
[<c010b3d8>] (show_stack) from [<c033007c>] (dump_stack+0x84/0x98)
[<c033007c>] (dump_stack) from [<c0118c00>] (__warn+0xe8/0x100)
[<c0118c00>] (__warn) from [<c0118cc8>] (warn_slowpath_null+0x20/0x28)
[<c0118cc8>] (warn_slowpath_null) from [<bf7e63e4>] (vos_preStart+0x398/0x3a0 [wlan])
[<bf7e63e4>] (vos_preStart [wlan]) from [<bf675c50>] (hdd_wlan_startup+0x75c/0x22fc [wlan])
[<bf675c50>] (hdd_wlan_startup [wlan]) from [<bf878ce0>] (ath_hif_sdio_probe+0x374/0x390 [wlan])
[<bf878ce0>] (ath_hif_sdio_probe [wlan]) from [<bf879c04>] (HIFSetMboxSleep+0x56c/0x808 [wlan])
[<bf879c04>] (HIFSetMboxSleep [wlan]) from [<bf87c5e4>] (hifDeviceInserted+0x468/0x9c8 [wlan])
[<bf87c5e4>] (hifDeviceInserted [wlan]) from [<c04744bc>] (sdio_bus_probe+0x108/0x11c)
[<c04744bc>] (sdio_bus_probe) from [<c03aff5c>] (driver_probe_device+0x204/0x2b0)
[<c03aff5c>] (driver_probe_device) from [<c03b00c0>] (__driver_attach+0xb8/0xbc)
[<c03b00c0>] (__driver_attach) from [<c03ae338>] (bus_for_each_dev+0x68/0x9c)
[<c03ae338>] (bus_for_each_dev) from [<c03af3d0>] (bus_add_driver+0x108/0x214)
[<c03af3d0>] (bus_add_driver) from [<c03b07e8>] (driver_register+0x78/0xf4)
[<c03b07e8>] (driver_register) from [<bf879360>] (HIFInit+0x84/0x118 [wlan])
[<bf879360>] (HIFInit [wlan]) from [<bf878688>] (hif_register_driver+0xac/0x124 [wlan])
[<bf878688>] (hif_register_driver [wlan]) from [<bf66860c>] (hdd_hif_register_driver+0x34/0xf8 [wlan])
[<bf66860c>] (hdd_hif_register_driver [wlan]) from [<bfae2118>] (init_module+0x118/0x1d4 [wlan])
[<bfae2118>] (init_module [wlan]) from [<c010173c>] (do_one_initcall+0x44/0x16c)
[<c010173c>] (do_one_initcall) from [<c0194f48>] (do_init_module+0x60/0x380)
[<c0194f48>] (do_init_module) from [<c0185be8>] (load_module+0x19ec/0x1fdc)
[<c0185be8>] (load_module) from [<c018632c>] (SyS_init_module+0x154/0x16c)
[<c018632c>] (SyS_init_module) from [<c0107400>] (ret_fast_syscall+0x0/0x3c)
---[ end trace 6c1aec9493298d16 ]---
R0: [insmod][01:18:17.865163]  wlan: [234:F :HDD] hdd_wlan_startup: vos_preStart failed
R0: [VosMCThread][01:18:17.872953]  wlan: [239:E :VOS] VosMCThread: MC Thread exiting!!!!
R0: [VosTlshimRxThre][01:18:17.880955]  wlan: [240:E :VOS] VosTlshimRxThread: Shutting down tl shim Tlshim rx thread
R0: [VosTlshimRxThre][01:18:17.891247]  wlan: [240:E :VOS] VosTlshimRxThread: Exiting VOSS Tlshim rx thread
R0: [insmod][01:18:17.904097]  wlan: [234:E :VOS] vos_get_context: Module ID 17 context is Null
R0: wlan: [234:F :HIF]  hdd_wlan_startup failed
ar6k_wlan: probe of mmc2:0001:1 failed with error -1
ath_hif_sdio: HIF (Atheros/multi-bss)
R0: wlan: [234:E :HDD] hdd_hif_register_driver: 17769: hdd_wlan_startup failed status:-11 jiffies_left:14000
R0: wlan: [234:F :HDD] hdd_driver_init: WLAN Driver Initialization failed
AR6000: Unregistering with the bus driver
AR6000: Unregistered!insmod: can't insert 'wlan.ko': No such device
 

  • Up0
  • Down0
ddeepakk Moderator
Join Date: 27 Jun 17
Posts: 41
Posted: Mon, 2019-06-03 05:28

Hi Paul,

Some of the firmware .bin files are not needed. Whichever are needed, they got downloaded successfully.

The real problem in your setup is related to SDIO. The transactions might be failing but it's not visible in dmesg logs.

R0: [insmod][01:18:17.589981]  wlan: [234:F :WDA] wma_wait_for_ready_event: Timeout waiting for ready event from FW
R0: [insmod][01:18:17.600174]  wlan: [234:F :SYS] Failed to get ready event from target firmware

Please enable SDIO logs and check what's going wrong.
 
Thanks.

 

  • Up0
  • Down0
arnold0kang
Join Date: 4 May 19
Posts: 3
Posted: Wed, 2019-06-05 00:28

hi , 

  thanks your reply. I think i get the real error. Unable to read HOST_INT_STATUS_ADDRESS register. can you give me some adivces?  when I install modules. the wlan.ko stopped. I have to press CTRL+C to interrupte it.

   /udisk/ko # insmod wlan.ko

wlan: loading out-of-tree module taints kernel.
wlan: loading driver v4.0.11.213V
hifDeviceInserted: Dumping clocks (50000000,50000000)
HIFDumpCCCR 0(43) 1(3) 2(0) 3(0) 4(0) 5(0) 6(0) 7(6) 8(17) 9(0) A(10) B(0) C(0) D(0) E(0) F(0) 10(0) 11(0) 12(1) 13(7) 14(7) 15(37) 16(1)
AR6000: Set async interrupt delay clock as 2.
R0: wlan: [115:E :HDD] hdd_apply_cfg_ini: Reg Parameter gRrmOperChanMax > allowed Maximum [8 > 7]. Enforcing Default= 4
R0: wlan: [115:E :HDD] hdd_apply_cfg_ini: Reg Parameter gRrmNonOperChanMax > allowed Maximum [8 > 7]. Enforcing Default= 4
R0: wlan: [115:E :HDD] Name = [gEnableHostapdEdcaLocal] Value = [0]
R0: wlan: [115:E :HDD] Name = [g_sta_change_cc_via_beacon] Value = [0]
R0: [insmod][01:53:02.113487]  wlan: [115:E :HDD] Name = [gEnableHostapdEdcaLocal] Value = [0]
R0: [insmod][01:53:02.122391]  wlan: [115:E :HDD] Name = [g_sta_change_cc_via_beacon] Value = [0]
AR6000: configuration opcode 3 is not used for Linux SDIO stack
NUM_DEV=1 FWMODE=0x2 FWSUBMODE=0x0 FWBR_BUF 0
ol_download_firmware: Using 0x1234 for the remainder of init
R0: [insmod][01:53:03.997106]  wlan: [115:E :VOS] __ol_transfer_bin_file: transferring file: utf30.bin size 372688 bytes done!
random: crng init done
^CUnable to read HOST_INT_STATUS_ADDRESS register
BMI : Unable to read response from device
Unable to read from the device
ol_download_firmware: chip_id:0x5020001 board_id:0x0
Unable to decrement the command credit count register
BMI : Unable to Send Message to device
Unable to read from the device
ar6k_wlan mmc2:0001:1: loading /lib/firmware/otp30.b00 failed with error -4
ar6k_wlan mmc2:0001:1: Direct firmware load for otp30.b00 failed with error -4
__ol_transfer_bin_file: Failed to get otp30.b00:-4
__ol_transfer_bin_file: Trying to load default otp30.bin
ar6k_wlan mmc2:0001:1: loading /lib/firmware/otp30.bin failed with error -4
ar6k_wlan mmc2:0001:1: Direct firmware load for otp30.bin failed with error -4
__ol_transfer_bin_file: Failed to get otp30.bin:-4
ol_download_firmware: Board Data Download Failed
R0: [insmod][01:53:28.185404]  wlan: [115:F :VOS] vos_open: BMI failed to download target
R0: [VosMCThread][01:53:28.193349]  wlan: [120:E :VOS] VosMCThread: MC Thread exiting!!!!
R0: [VosTlshimRxThre][01:53:28.201314]  wlan: [121:E :VOS] VosTlshimRxThread: Shutting down tl shim Tlshim rx thread
R0: [VosTlshimRxThre][01:53:28.211593]  wlan: [121:E :VOS] VosTlshimRxThread: Exiting VOSS Tlshim rx thread
R0: [insmod][01:53:28.223640]  wlan: [115:F :HDD] hdd_wlan_startup: vos_open failed
R0: wlan: [115:F :HIF]  hdd_wlan_startup failed
ar6k_wlan: probe of mmc2:0001:1 failed with error -1
ath_hif_sdio: HIF (Atheros/multi-bss)
R0: wlan: [115:E :HDD] hdd_hif_register_driver: 17769: hdd_wlan_startup failed status:-11 jiffies_left:14000
R0: wlan: [115:F :HDD] hdd_driver_init: WLAN Driver Initialization failed
AR6000: Unregistering with the bus driver
AR6000: Unregistered!
/udisk/ko #
 
  • Up0
  • Down0
ddeepakk Moderator
Join Date: 27 Jun 17
Posts: 41
Posted: Wed, 2019-06-05 04:58

Hi Arnold,

Which is the platform on which you are trying the card? Does it support SDIO 3.0?

Also, can you comment out  the line having "-DSDIO_3_0 \" in the qcacld-2.0/Kbuild file, build the driver and test with it?

 

The error you are seeing is most likely related to your interface , SDIO in this case. You may want to enable SD/MMC logs in your kernel to confirm. There is a better way to have the logs dynamically enabled. Here are the steps:

Enable "CONFIG_MMC_DEBUG" in kernel .config file and then rebuild the kernel.
If "CONFIG_DYNAMIC_DEBUG" is enabled in the kernel config, then simply run these 2 commands before you insmod wlan.ko. 

#echo -n 'module mmc_core +p' > /sys/kernel/debug/dynamic_debug/control 

#echo -n 'file sdio_irq.c +p' > /sys/kernel/debug/dynamic_debug/control 

 

Thanks.

  • Up0
  • Down0
arnold0kang
Join Date: 4 May 19
Posts: 3
Posted: Thu, 2019-06-06 08:08

hi  sir, 

  thanks for your reply. when i disable sdio 3.0. it still failed.   can you give me some advice again. thanks!

 

mmc2: req done (CMD53): 0: 00001000 00000000 00000000 00000000
mmc2:     4 bytes transferred: 0
mmc2: starting CMD53 arg 14100a04 flags 000001b5
mmc2:     blksz 4 blocks 1 flags 00000200 tsac 1000 ms nsac 0
mmc2: req done (CMD53): 0: 00001000 00000000 00000000 00000000
mmc2:     4 bytes transferred: 0
mmc2: starting CMD53 arg 14100a04 flags 000001b5
mmc2:     blksz 4 blocks 1 flags 00000200 tsac 1000 ms nsac 0
mmc2: req done (CMD53): 0: 00001000 00000000 00000000 00000000
mmc2:     4 bytes transferred: 0
mmc2: starting CMD53 arg 14100a04 flags 000001b5
mmc2:     blksz 4 blocks 1 flags 00000200 tsac 1000 ms nsac 0
mmc2: req done (CMD53): 0: 00001000 00000000 00000000 00000000
mmc2:     4 bytes transferred: 0
mmc2: starting CMD53 arg 14100a04 flags 000001b5
mmc2:     blksz 4 blocks 1 flags 00000200 tsac 1000 ms nsac 0
mmc2: req done (CMD53): 0: 00001000 00000000 00000000 00000000
mmc2:     4 bytes transferred: 0
mmc2: starting CMD53 arg 14100a04 flags 000001b5
mmc2:     blksz 4 blocks 1 flags 00000200 tsac 1000 ms nsac 0
mmc2: req done (CMD53): 0: 00001000 00000000 00000000 00000000
mmc2:     4 bytes transferred: 0
mmc2: starting CMD53 arg 14100a04 flags 000001b5
mmc2:     blksz 4 blocks 1 flags 00000200 tsac 1000 ms nsac 0
mmc2: req done (CMD53): 0: 00001000 00000000 00000000 00000000
mmc2:     4 bytes transferred: 0
mmc2: starting CMD53 arg 14100a04 flags 000001b5
mmc2:     blksz 4 blocks 1 flags 00000200 tsac 1000 ms nsac 0
mmc2: req done (CMD53): 0: 00001000 00000000 00000000 00000000
mmc2:     4 bytes transferred: 0
BMI Communication timeout - bmiBufferReceive FIFO empty
Unable to read Target Version from the device
R0: [insmod][18:29:37.120599]  wlan: [113:F :VOS] vos_open: BMI failed to download target
R0: [VosMCThread][18:29:37.128537]  wlan: [118:E :VOS] VosMCThread: MC Thread exiting!!!!
R0: [VosTlshimRxThre][18:29:37.136498]  wlan: [119:E :VOS] VosTlshimRxThread: Shutting down tl shim Tlshim rx thread
R0: [VosTlshimRxThre][18:29:37.146779]  wlan: [119:E :VOS] VosTlshimRxThread: Exiting VOSS Tlshim rx thread
R0: [insmod][18:29:37.158782]  wlan: [113:F :HDD] hdd_wlan_startup: vos_open failed
R0: wlan: [113:F :HIF]  hdd_wlan_startup failed
mmc2: starting CMD53 arg 9410d004 flags 000001b5
mmc2:     blksz 4 blocks 1 flags 00000100 tsac 1000 ms nsac 0
mmc2: req done (CMD53): 0: 00001000 00000000 00000000 00000000
mmc2:     4 bytes transferred: 0
SDIO: Disabling device mmc2:0001:1...
mmc2: starting CMD52 arg 00000400 flags 00000195
mmc2: req done (CMD52): 0: 00001002 00000000 00000000 00000000
mmc2: starting CMD52 arg 80000400 flags 00000195
mmc2: req done (CMD52): 0: 00001000 00000000 00000000 00000000
SDIO: Disabled device mmc2:0001:1
ar6k_wlan: probe of mmc2:0001:1 failed with error -1
ath_hif_sdio: HIF (Atheros/multi-bss)
R0: wlan: [113:E :HDD] hdd_hif_register_driver: 17769: hdd_wlan_startup failed status:-11 jiffies_left:14000
R0: wlan: [113:F :HDD] hdd_driver_init: WLAN Driver Initialization failed
AR6000: Unregistering with the bus driver
AR6000: Unregistered!
 

 

 

  • Up0
  • Down0
ddeepakk Moderator
Join Date: 27 Jun 17
Posts: 41
Posted: Mon, 2019-06-10 04:10

Hi Arnold,

Which Embedded platform are you using?

Such errors are due to SDIO clocks also. Could you please try below different clocks during driver load and let us know if any improvements:

#insmod wlan.ko mmcclock=X

mmcclock=12500000 means 12.5 MHz. You can change it to 5, 10, 12.5, 15, 20, 25, 50, 75 ... and see if you get better results. 

Thanks.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.