AnsweredAssumed Answered

proting wifi device driver problem

Question asked by fulin chen on Jun 3, 2016
Latest reply on Jun 8, 2017 by fulin chen

Dear Community,

Hardware Platform:

Processor: Freescale i.MX6Q

Memory: DDR3 4GB

Flash: 32GB Managed Nand

 

Software Platform:

Kernel: linux 4.1.15

BSP: imx_4.1.15_1.0.0_ga

 

i am proting ap6210 wifi module device driver, ap6210 looks like base bcm4343. in my dts file i add those:

   regulators {

        compatible = "simple-bus";

        #address-cells = <1>;

        #size-cells = <0>;

        wlreg_on: fixedregulator@100 {                           

            compatible = "regulator-fixed";                      

            regulator-min-microvolt = <5000000>;

            regulator-max-microvolt = <5000000>;

            regulator-name = "wlreg_on";

            gpio = <&gpio1 8 0>;

            startup-delay-us = <100>;

            enable-active-high;

        };

    };

    bcmdhd_wlan_0: bcmdhd_wlan@0 {

        compatible = "android,bcmdhd_wlan";

        wlreg_on-supply = <&wlreg_on>;

    };

 

&usdhc3 {

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_wifi>;

    bus-width = <4>;

    no-1-8-v;

    non-removable;

    cd-post;

    pm-ignore-notify;

    wifi-host;

    status = "okay";

};

 

        pinctrl_wifi: wifigrp {

            fsl,pins = <

                MX6QDL_PAD_SD3_CMD__SD3_CMD     0x17059

                MX6QDL_PAD_SD3_CLK__SD3_CLK     0x10059

                MX6QDL_PAD_SD3_DAT0__SD3_DATA0      0x17059

                MX6QDL_PAD_SD3_DAT1__SD3_DATA1      0x17059

                MX6QDL_PAD_SD3_DAT2__SD3_DATA2      0x17059

                MX6QDL_PAD_SD3_DAT3__SD3_DATA3      0x17059

                MX6QDL_PAD_GPIO_8__GPIO1_IO08       0x13069 /* WL_REG_ON */

            >;

        };

 

when i run this:

insmod /home/root/firmware/bcmdhd.ko "firmware_path=/home/root/firmware/wlan/fw_bcm40181a2.bin nvram_path=/home/root/firmware/wlan/nvram_ap6210.txt"

it shows some error as follows:

dhd_module_init in

Power-up adapter 'DHD generic adapter'

wifi_platform_bus_enumerate device present 1

mmc2: queuing unknown CIS tuple 0x80 (2 bytes)

mmc2: queuing unknown CIS tuple 0x80 (3 bytes)

mmc2: queuing unknown CIS tuple 0x80 (3 bytes)

mmc2: queuing unknown CIS tuple 0x80 (7 bytes)

mmc2: new high speed SDIO card at address 0001

F1 signature OK, socitype:0x1 chip:0xa962 rev:0x1 pkg:0x9

DHD: dongle ram size is set to 245760(orig 245760) at 0x0

wifi_platform_get_mac_addr

CFG80211-ERROR) wl_setup_wiphy : Registering Vendor80211)

wl_create_event_handler(): thread:wl_event_handler:332 started

CFG80211-ERROR) wl_event_handler : tsk Enter, tsk = 0xd708143c

dhd_attach(): thread:dhd_watchdog_thread:333 started

dhd_attach(): thread:dhd_dpc:334 started

dhd_deferred_work_init: work queue initialized

 

 

Dongle Host Driver, version 1.141.88 (r)

Compiled from

Register interface [wlan0]  MAC: 00:90:4c:11:22:33

 

 

CFG80211-ERROR) wl_event_handler : was terminated

wl_destroy_event_handler(): thread:wl_event_handler:332 terminated OK

dhd_prot_ioctl : bus is down. we have nothing to do

root@imx6qsabresd:~/firmware#

 

 

Dongle Host Driver, version 1.141.88 (r)

Compiled from

wl_android_wifi_on in

mmc2: queuing unknown CIS tuple 0x80 (2 bytes)

mmc2: queuing unknown CIS tuple 0x80 (3 bytes)

mmc2: queuing unknown CIS tuple 0x80 (3 bytes)

mmc2: queuing unknown CIS tuple 0x80 (7 bytes)

F1 signature OK, socitype:0x1 chip:0xa962 rev:0x1 pkg:0x9

DHD: dongle ram size is set to 245760(orig 245760) at 0x0

dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.

random: nonblocking pool is initialized

dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)

wifi_platform_get_mac_addr

Firmware up: op_mode=0x0005, MAC=94:a1:a2:5d:d1:6e

dhd_preinit_ioctls buf_key_b4_m4 set failed -23

Firmware version = wl0: Jul  5 2013 17:55:22 version 5.90.195.89.10 FWID 01-f4d31c13

dhd_preinit_ioctls wl ampdu_hostreorder failed -23

dhd_wlfc_init(): successfully enabled bdcv2 tlv signaling, 79

dhd_wlfc_init(): wlfc_mode=0x0, ret=-23

CFG80211-ERROR) wl_update_wiphybands : error reading vhtmode (-23)

wl_create_event_handler(): thread:wl_event_handler:344 started

CFG80211-ERROR) wl_event_handler : tsk Enter, tsk = 0xd708143c

skbuff: skb_under_panic: text:7f054774 len:12 put:12 head:d66b151c data:d66b1510 tail:0xd66b1514 end:0xd66b1514 dev:<NULL>

------------[ cut here ]------------

Kernel BUG at 805f08ac [verbose debug info unavailable]

Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM

Modules linked in: bcmdhd

CPU: 0 PID: 820 Comm: dhd_dpc Not tainted 4.1.15+gd5d7c02 #15

Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)

task: d6f22f80 ti: d6820000 task.ti: d6820000

PC is at skb_panic+0x60/0x64

LR is at skb_panic+0x60/0x64

pc : [<805f08ac>]    lr : [<805f08ac>]    psr: 600b0013

sp : d6821c98  ip : 00000000  fp : 00000001

r10: d6790000  r9 : 0000000c  r8 : d6d67460

r7 : 80832c84  r6 : d66b1510  r5 : d66b1514  r4 : 809f5cdc

r3 : 00000000  r2 : 00000000  r1 : 809b84a0  r0 : 0000007a

Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel

Control: 10c53c7d  Table: 6691404a  DAC: 00000015

Process dhd_dpc (pid: 820, stack limit = 0xd6820210)

Stack: (0xd6821c98 to 0xd6822000)

1c80:                                                       0000000c d66b151c

1ca0: d66b1510 d66b1514 d66b1514 809f5cdc 00000000 805f292c 00000000 d6d67400

1cc0: d66b1480 7f054774 00000000 00000002 00000000 d6821df8 0000004e 0000000c

1ce0: 00000000 00000000 00000000 d65e4080 7f075dd0 00000000 00000001 00000000

1d00: 00000200 d65e4080 d6821df4 80aeb5ea d6821df8 d65e4100 00000000 80ae52f8

1d20: 80ae8800 00000000 00000001 d603cc50 d6821d68 80ae8800 00000000 8005d014

1d40: 00008800 00000000 80aec6c0 d603cc40 00000000 00000400 00000000 00000001

1d60: 00000000 80aec100 00000000 00000000 00000000 00000000 00000400 00000000

1d80: 00000000 00000001 00000001 00000000 00000000 d603cb40 d603cc40 00000002

1da0: d8f9fc00 d6790000 00000201 00000000 00000001 80037c00 d6790000 00000000

1dc0: 00000001 d6d67400 d6821df8 d6d67460 00000000 d6790000 00000001 7f055260

1de0: 000000ff 00000014 18002000 7f075dd0 00000007 80aec594 d66b1480 ef6fe840

1e00: d60db488 d60db440 80aec6c0 d6f23228 80aec594 00000000 ef6fe800 8005e760

1e20: ef6fe8a8 ef6fe800 d6f23038 d6790000 00000201 00000000 00000000 80037c00

1e40: d6790000 00000000 00000000 7f0096f0 d6790000 7f04c5e4 d67939a0 a00b0093

1e60: 00000014 80796be8 00000014 80796f68 d6790000 a00b0013 d6793000 000007d0

1e80: d65e4100 7f00f378 7f075dd0 00000003 00000014 80796f68 7f075dd0 d6d67400

1ea0: 7f075dd0 7f07a684 00000000 d65e4100 00000000 00000000 00000014 7f0574cc

1ec0: 00000000 60010013 d67938bc 00000032 ffff9a9d d6793000 80b9c140 80ae8800

1ee0: 01000000 6ec16000 80b9c140 80052b38 d6793858 ffff9a9d 00000000 80796f68

1f00: d6793858 8007a8dc 00000000 a00b0093 d6790000 a00b0013 d6793000 d6790000

1f20: d67938a8 d67938e0 00000000 600b0013 d67938bc 00000000 00000000 7f00f528

1f40: d67938a8 00000001 00000000 00000000 d65e44c0 d67938a8 7f00f440 00000000

1f60: 00000000 8004ce08 00000000 00000000 d62fc678 d67938a8 00000000 00000000

1f80: d6821f80 d6821f80 00000000 00000000 d6821f90 d6821f90 d6821fac d65e44c0

1fa0: 8004cd2c 00000000 00000000 8000f528 00000000 00000000 00000000 00000000

1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 7f759811 7f759c11

[<805f08ac>] (skb_panic) from [<805f292c>] (skb_push+0x40/0x44)

[<805f292c>] (skb_push) from [<7f054774>] (dhdsdio_txpkt.constprop.8+0xdc/0xa60 [bcmdhd])

[<7f054774>] (dhdsdio_txpkt.constprop.8 [bcmdhd]) from [<7f055260>] (dhdsdio_sendfromq+0x168/0x3e4 [bcmdhd])

[<7f055260>] (dhdsdio_sendfromq [bcmdhd]) from [<7f0574cc>] (dhdsdio_dpc+0x2d4/0x1024 [bcmdhd])

[<7f0574cc>] (dhdsdio_dpc [bcmdhd]) from [<7f00f528>] (dhd_dpc_thread+0xe8/0x130 [bcmdhd])

[<7f00f528>] (dhd_dpc_thread [bcmdhd]) from [<8004ce08>] (kthread+0xdc/0xf4)

[<8004ce08>] (kthread) from [<8000f528>] (ret_from_fork+0x14/0x2c)

Code: e58de014 e58d500c e58dc010 eb06798d (e7f001f2)

---[ end trace f5a16a9b3eefbf7a ]---

 

 

root@imx6qsabresd:~/firmware# lsmod

Module                  Size  Used by

bcmdhd                638540  0

root@imx6qsabresd:~/firmware# ifconfig

eth0      Link encap:Ethernet  HWaddr CC:85:6C:04:E3:32 

          inet addr:192.168.0.106  Bcast:192.168.0.255  Mask:255.255.255.0

          inet6 addr: fe80::ce85:6cff:fe04:e332/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:315 errors:0 dropped:0 overruns:0 frame:0

          TX packets:31 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:35870 (35.0 KiB)  TX bytes:5743 (5.6 KiB)

 

 

lo        Link encap:Local Loopback 

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:65536  Metric:1

          RX packets:10 errors:0 dropped:0 overruns:0 frame:0

          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:700 (700.0 B)  TX bytes:700 (700.0 B)

 

 

wlan0     Link encap:Ethernet  HWaddr 94:A1:A2:5D:D1:6E 

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:879 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 B)  TX bytes:299862 (292.8 KiB)

 

what's wrong? can you help me?

 

old kernel is linux-3.0 runs well, attached its board file, please it. Do you need anything informathion? pls let me know.

Original Attachment has been moved to: board-mx6q_sabresd_piano.h.zip

Original Attachment has been moved to: board-mx6q_sabresd_piano.c.zip

Original Attachment has been moved to: imx6q-klsw.dts.zip

Original Attachment has been moved to: dmesg.log.zip

Outcomes