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.

Backporting and interrupt problems with WL1271 driver in linux

Other Parts Discussed in Thread: WL1271

Hello,

I'm new to this theme of linux and wireless lan. I'm trying to get a working WLAN connection on our board.

We use a Freescale Vybrid CPU with a attached WL1271 chip from Jorjin. We're on linux kernel version 3.0.35 and use buildroot as root file system.

Without using compat-wireless driver modules I'm loading the compiled modules of the native linux drivers into the modules path of our buildroot. than I'm building with buildroot our root-file-system. When I'm loading the drivers on our board, the driver loads the firmware "6.1.5.50.74". than I'm able to connect to a WLAN or open a WLAN. 

With this I had to make a workaround to reset the WL1271 when the firmware stucked and I couldn't get Interrupts. So I reset it and loaded the firmware again and it works.

Since this firmware seems to be very old and also does't work with the calibrator tool I try to use the compat-wireless driver of compat-wireless-3.4-rc3-1. I'm not sure if I have build them correctly.

I selected the wl12xx driver in compat-wireless.../scripts and exported KLIB to my buildroot/output/target (rootfs) and KLIB_BUILD to my kernel sources. After I've done "make" and "make install-modules" I got the modules in my buildroot-target-system in the modules folder. I also switched cfg80211 to build as modules in kernels menuconfig. The compat wireless has build a cfg80211.ko, mac80211.ko, compat.ko, and wl12xx.ko and wl12xx_sdio.ko. I hope this is right so far?

With this newer driver I could load a newer firmware (6.3.5.0.98). Now I can use calibrator tool. But I have also some problems with it. But the most annoying thing is that I cannot connect to a WLAN. I think wpa_supplicant makes problems here. After I load the driver I can assign IP and HW addr to the wlan0 IF. and when I want to run wpa_supplicant the firmware stucks somewere and the driver waits for Interrupts. 

I probed the interrupt line to the cpu and noticed, when the phy stucks I get no Interrupts anymore.

If I start calibrator plt calibrate, and start it once again it cannot load FW or get in PLT mode. so I have to rebbot the system again. Than the wl1271 gets the WLAN_EN signal toggled and reboots.

I don't know what I can do to get this WLAN running. 

Does somebody had the same problems? Whats with the compat drivers? Did I build them correctly?

With kind regards 

Andi

  • Hi,

    I tried another wpa_supplicant run.

    See the log please. It seems that the wl1271 gets connected to my "TestWLAN" AP (bold). But something ist getting wrong here and I cannot figure out what it is. 

    # wpa_supplicant -Dnl80211 -iwlan0 -c /etc/wpa_supplicant.conf
    Successfully initialized wpa_supplicant
    rfkill: Cannot open RFKILL control device
    wlan0: SME: Trying to authenticate with 10:fe:ed:b2:28:a0 (SSID='TestWLAN' freq=2437 MHz)
    wlan0: Trying to associate with 10:fe:ed:b2:28:a0 (SSID='TestWLAN' freq=2437 MHz)
    wl12xx: ERROR command complete timeout
    ------------[ cut here ]------------
    WARNING: at /home/zeiler/data_zeiler/Workspace/sandbox/backports/compat-wireless-3.4-rc3-1/drivers/net/wireless/wl12xx/cmd.c:108 wl1271_cmd_send+0x324/0x358 [wl12xx]()
    Modules linked in: wl12xx_sdio wl12xx mac80211 cfg80211 compat
    Backtrace:
    [<8002fa30>] (dump_backtrace+0x0/0x108) from [<80391674>] (dump_stack+0x18/0x1c)
    r6:7f06f458 r5:00000009 r4:00000000 r3:600f0013
    [<8039165c>] (dump_stack+0x0/0x1c) from [<8004016c>] (warn_slowpath_common+0x54/0x6c)
    [<80040118>] (warn_slowpath_common+0x0/0x6c) from [<800401a8>] (warn_slowpath_null+0x24/0x2c)
    r8:00000096 r7:00000000 r6:863a5320 r5:ffffff92 r4:863b16a0
    r3:00000009
    [<80040184>] (warn_slowpath_null+0x0/0x2c) from [<7f06f458>] (wl1271_cmd_send+0x324/0x358 [wl12xx])
    [<7f06f134>] (wl1271_cmd_send+0x0/0x358 [wl12xx]) from [<7f070608>] (wl1271_cmd_configure+0x2c/0x54 [wl12xx])
    [<7f0705dc>] (wl1271_cmd_configure+0x0/0x54 [wl12xx]) from [<7f0764a4>] (wl1271_acx_set_ht_capabilities+0x94/0xc8 [wl12xx])
    r5:86031ca2 r4:863a5320
    [<7f076410>] (wl1271_acx_set_ht_capabilities+0x0/0xc8 [wl12xx]) from [<7f06d1f4>] (wl1271_op_bss_info_changed+0xa3c/0xb68 [wl12xx])
    r8:00000000 r7:862a9830 r6:862a98b4 r5:863b16a0 r4:862a9828
    r3:000000ff
    [<7f06c7b8>] (wl1271_op_bss_info_changed+0x0/0xb68 [wl12xx]) from [<7f02f3b4>] (ieee80211_bss_info_change_notify+0x164/0x17c [mac80211])
    [<7f02f250>] (ieee80211_bss_info_change_notify+0x0/0x17c [mac80211]) from [<7f057b10>] (ieee80211_assoc_success+0x3b8/0x560 [mac80211])
    r7:863b0ae0 r6:863b10d0 r5:862a978c r4:862a93c0
    [<7f057758>] (ieee80211_assoc_success+0x0/0x560 [mac80211]) from [<7f04dcf4>] (ieee80211_sta_rx_notify+0x1f0/0x250 [mac80211])
    [<7f04db24>] (ieee80211_sta_rx_notify+0x20/0x250 [mac80211]) from [<7f04e1d0>] (ieee80211_sta_rx_queued_mgmt+0x408/0x51c [mac80211])
    [<7f04ddc8>] (ieee80211_sta_rx_queued_mgmt+0x0/0x51c [mac80211]) from [<7f039bfc>] (ieee80211_iface_work+0x208/0x2a8 [mac80211])
    [<7f0399f4>] (ieee80211_iface_work+0x0/0x2a8 [mac80211]) from [<80052554>] (process_one_work+0x1e0/0x344)
    [<80052374>] (process_one_work+0x0/0x344) from [<800528a0>] (worker_thread+0x1b4/0x2e0)
    [<800526ec>] (worker_thread+0x0/0x2e0) from [<80056f48>] (kthread+0x90/0x9c)
    [<80056eb8>] (kthread+0x0/0x9c) from [<80042f04>] (do_exit+0x0/0x5f8)
    r6:80042f04 r5:80056eb8 r4:86025efc
    ---[ end trace 2a2c36281570eb0b ]---
    wl12xx: WARNING CONFIGURE command NOK
    wl12xx: WARNING acx ht capabilities setting failed: -110
    wl12xx: WARNING Set ht cap false failed -110
    wl12xx: Reading FW panic log
    ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
    wlan0: Associated with 10:fe:ed:b2:28:a0
    wl12xx: ERROR command complete timeout
    ------------[ cut here ]------------
    WARNING: at /home/zeiler/data_zeiler/Workspace/sandbox/backports/compat-wireless-3.4-rc3-1/drivers/net/wireless/wl12xx/cmd.c:108 wl1271_cmd_send+0x324/0x358 [wl12xx]()
    Modules linked in: wl12xx_sdio wl12xx mac80211 cfg80211 compat
    Backtrace:
    [<8002fa30>] (dump_backtrace+0x0/0x108) from [<80391674>] (dump_stack+0x18/0x1c)
    r6:7f06f458 r5:00000009 r4:00000000 r3:60000013
    [<8039165c>] (dump_stack+0x0/0x1c) from [<8004016c>] (warn_slowpath_common+0x54/0x6c)
    [<80040118>] (warn_slowpath_common+0x0/0x6c) from [<800401a8>] (warn_slowpath_null+0x24/0x2c)
    r8:00000094 r7:00000000 r6:863a5320 r5:ffffff92 r4:863b16a0
    r3:00000009
    [<80040184>] (warn_slowpath_null+0x0/0x2c) from [<7f06f458>] (wl1271_cmd_send+0x324/0x358 [wl12xx])
    [<7f06f134>] (wl1271_cmd_send+0x0/0x358 [wl12xx]) from [<7f071778>] (wl12xx_cmd_stop_fwlog+0x58/0x8c [wl12xx])
    [<7f071720>] (wl12xx_cmd_stop_fwlog+0x0/0x8c [wl12xx]) from [<7f06e054>] (wl1271_recovery_work+0xc0/0x318 [wl12xx])
    r5:863b188c r4:8643ca00
    [<7f06df94>] (wl1271_recovery_work+0x0/0x318 [wl12xx]) from [<80052554>] (process_one_work+0x1e0/0x344)
    [<80052374>] (process_one_work+0x0/0x344) from [<800528a0>] (worker_thread+0x1b4/0x2e0)
    [<800526ec>] (worker_thread+0x0/0x2e0) from [<80056f48>] (kthread+0x90/0x9c)
    [<80056eb8>] (kthread+0x0/0x9c) from [<80042f04>] (do_exit+0x0/0x5f8)
    r6:80042f04 r5:80056eb8 r4:86025efc
    ---[ end trace 2a2c36281570eb0c ]---
    wl12xx: ERROR failed to send stop firmware logger command
    wl12xx: Hardware recovery in progress. FW ver: Rev 6.3.5.0.98 pc: 0x9a16
    wl12xx: down
    ieee80211 phy0: Hardware restart was requested
    wl12xx: ERROR timeout waiting for the hardware to complete initialization
    wlan0: Authentication with 10:fe:ed:b2:28:a0 timed out.
    wl12xx: ERROR timeout waiting for the hardware to complete initialization
    wl12xx: ERROR timeout waiting for the hardware to complete initialization
    wl12xx: ERROR firmware boot failed despite 3 retries
    ------------[ cut here ]------------
    WARNING: at /home/zeiler/data_zeiler/Workspace/sandbox/backports/compat-wireless-3.4-rc3-1/net/mac80211/util.c:1254 ieee80211_reconfig+0x294/0x5f0 [mac80211]()
    Modules linked in: wl12xx_sdio wl12xx mac80211 cfg80211 compat
    Backtrace:
    [<8002fa30>] (dump_backtrace+0x0/0x108) from [<80391674>] (dump_stack+0x18/0x1c)
    r6:7f04a1b8 r5:00000009 r4:00000000 r3:60000013
    [<8039165c>] (dump_stack+0x0/0x1c) from [<8004016c>] (warn_slowpath_common+0x54/0x6c)
    [<80040118>] (warn_slowpath_common+0x0/0x6c) from [<800401a8>] (warn_slowpath_null+0x24/0x2c)
    r8:863b0c24 r7:863b10c8 r6:863f3000 r5:862a93c0 r4:863b0ae0
    r3:00000009
    [<80040184>] (warn_slowpath_null+0x0/0x2c) from [<7f04a1b8>] (ieee80211_reconfig+0x294/0x5f0 [mac80211])
    [<7f049f24>] (ieee80211_reconfig+0x0/0x5f0 [mac80211]) from [<7f02ee70>] (ieee80211_restart_work+0x64/0x90 [mac80211])
    [<7f02ee0c>] (ieee80211_restart_work+0x0/0x90 [mac80211]) from [<80052554>] (process_one_work+0x1e0/0x344)
    r6:80494e1c r5:863b1248 r4:860ce300 r3:60000013
    [<80052374>] (process_one_work+0x0/0x344) from [<800528a0>] (worker_thread+0x1b4/0x2e0)
    [<800526ec>] (worker_thread+0x0/0x2e0) from [<80056f48>] (kthread+0x90/0x9c)
    [<80056eb8>] (kthread+0x0/0x9c) from [<80042f04>] (do_exit+0x0/0x5f8)
    r6:80042f04 r5:80056eb8 r4:8602fef4
    ---[ end trace 2a2c36281570eb0d ]---
    ------------[ cut here ]------------
    WARNING: at /home/zeiler/data_zeiler/Workspace/sandbox/backports/compat-wireless-3.4-rc3-1/net/mac80211/util.c:1254 ieee80211_reconfig+0x294/0x5f0 [mac80211]()
    Modules linked in: wl12xx_sdio wl12xx mac80211 cfg80211 compat
    Backtrace:
    [<8002fa30>] (dump_backtrace+0x0/0x108) from [<80391674>] (dump_stack+0x18/0x1c)
    r6:7f04a1b8 r5:00000009 r4:00000000 r3:60000013
    [<8039165c>] (dump_stack+0x0/0x1c) from [<8004016c>] (warn_slowpath_common+0x54/0x6c)
    [<80040118>] (warn_slowpath_common+0x0/0x6c) from [<800401a8>] (warn_slowpath_null+0x24/0x2c)
    r8:863b0c24 r7:863b10c8 r6:863f3000 r5:862a93c0 r4:863b0ae0
    r3:00000009
    [<80040184>] (warn_slowpath_null+0x0/0x2c) from [<7f04a1b8>] (ieee80211_reconfig+0x294/0x5f0 [mac80211])
    [<7f049f24>] (ieee80211_reconfig+0x0/0x5f0 [mac80211]) from [<7f02ee70>] (ieee80211_restart_work+0x64/0x90 [mac80211])
    [<7f02ee0c>] (ieee80211_restart_work+0x0/0x90 [mac80211]) from [<80052554>] (process_one_work+0x1e0/0x344)
    r6:80494e1c r5:863b1248 r4:860ce300 r3:60000013
    [<80052374>] (process_one_work+0x0/0x344) from [<800528a0>] (worker_thread+0x1b4/0x2e0)
    [<800526ec>] (worker_thread+0x0/0x2e0) from [<80056f48>] (kthread+0x90/0x9c)
    [<80056eb8>] (kthread+0x0/0x9c) from [<80042f04>] (do_exit+0x0/0x5f8)
    r6:80042f04 r5:80056eb8 r4:8602fef4
    ---[ end trace 2a2c36281570eb0e ]---
    wlan0: CTRL-EVENT-DISCONNECTED bssid=10:fe:ed:b2:28:a0 reason=3 locally_generated=1
    cfg80211: Calling CRDA to update world regulatory domain
    wlan0: Failed to initiate AP scan
    wlan0: Failed to initiate AP scan
    wlan0: Failed to initiate AP scan
    wlan0: Failed to initiate AP scan
    wlan0: Failed to initiate AP scan
    wlan0: Failed to initiate AP scan
    wlan0: Failed to initiate AP scan
    wlan0: Failed to initiate AP scan
    wlan0: Failed to initiate AP scan
    wlan0: Failed to initiate AP scan
    wlan0: Failed to initiate AP scan
    wlan0: Failed to initiate AP scan
    wlan0: Failed to initiate AP scan
    wlan0: Failed to initiate AP scan
    wlan0: CTRL-EVENT-TERMINATING

    With kind regards.

    Andi

  • Hi Andi,

    Looks like your driver/firmware are not the latest. Can you sync your code from the latest available from: https://github.com/TI-OpenLink ? You will have the compat-wireless also here.

    Regards,

    Gigi Joseph.

  • Hi Gigi,

    thanks for reply. I will try to compile that version.

    Thank you.

    kind regards

    Andi

  • Hello again ;),

    can you tell me please which package do I need from this TI-OpenLink ?

    Is it fine if I just get the compat-wireless.git? 

    I also tried to build drivers from git://github.com/TI-ECS/build-utilites.git .

    Compilation was succesful but I hat a few problems. It was like this build changed something in my buildroot system.

    Also, I couldn't find the firmware files in my /lib/firmware/ti-connectivity/ -folder. The main positive change with this was that the driver has loaded a newer firmware.

    Can someone tell me please the relation between the linux drivers and the firmwares of the wl1271? It is extremly confusing. Whats the newest firmware now?

    Kind regards 

    Andi

  • Hi Andi,

    You need to checkout the latest from wl12xx.git, compat.git, compat-wireless.git & ti-utils.git.

    Define GIT_TREE (point to "wl12xx" folder) & GIT_COMPAT_TREE(point to "compat" folder)

    Define KLIB,KLIB_BUILD,ARCH,CROSS_COMPILE

    Goto "compat-wireless" folder, and: 

        Run ./scripts/admin-update.sh

        Run ./scripts/driver-select wl12xx

        make

    This will generate the kos that needs to be inserted. The firmware bin file can be found in "ti-utils" folder.

    Regards,

    Gigi Joseph.

  • Hello,

    I'd tried the TI-OpenLink compat-drivers now. After I made admin-update.sh I got many fails when this script made patches. Some patches where already been applied and the script stopped then. I renamed the involved patch-files so that patches which were not applied could be applied. After that, I could run scripts/driver-select wl12xx and make.

    Now I'm getting errors from header files. Here's a log:

    In file included from /home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/include/net/mac80211.h:21:0,
    from /home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/net/mac80211/main.c:11:
    /home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/include/net/cfg80211.h:431:27: error: field 'hidden_ssid' has incomplete type
    /home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/include/net/cfg80211.h:866:18: error: field 'queue' has incomplete type
    /home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/include/net/cfg80211.h:1336:9: error: 'NL80211_KEK_LEN' undeclared here (not in a function)
    /home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/include/net/cfg80211.h:1337:9: error: 'NL80211_KCK_LEN' undeclared here (not in a function)
    /home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/include/net/cfg80211.h:1338:16: error: 'NL80211_REPLAY_CTR_LEN' undeclared here (not in a function)
    /home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/include/net/cfg80211.h:1719:24: warning: 'enum nl80211_tdls_operation' declared inside parameter list [enabled by default]
    /home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/include/net/cfg80211.h:1719:24: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
    /home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/net/mac80211/main.c: In function 'ieee80211_alloc_hw':
    /home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/net/mac80211/main.c:580:6: error: 'NL80211_FEATURE_HT_IBSS' undeclared (first use in this function)
    /home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/net/mac80211/main.c:580:6: note: each undeclared identifier is reported only once for each function it appears in
    /home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/net/mac80211/main.c:583:22: error: 'NL80211_FEATURE_AP_CH_SWITCH' undeclared (first use in this function)
    make[3]: *** [/home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/net/mac80211/main.o] Fehler 1
    make[2]: *** [/home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/net/mac80211] Fehler 2
    make[1]: *** [_module_/home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless] Fehler 2
    make[1]: Leaving directory `/home/zeiler/data_zeiler/Workspace/fsvybrid/linux/linux-3.0.15-f+s-vybrid'

    Is it because I couldn't apply some patches? I looked at some patches and they were already applied in some files.

    Can someone tell me where the problem is? 

    I also exported the Environment Vars.

    Kind regards

    Andi

  • Hello,

    I tried the drivers from https://github.com/dickychiang/compat-wireless-r5 and they work now. So I can perform calibration and connect to a wlan. But there is still a problem. When I do ifconfig wlan0 down and then up, the firmware (or something else) stucks somewhere. So I get this :

    # ifconfig wlan0 down
    cfg80211: Calling CRDA to update world regulatory domain
    wl12xx: down
    wl12xx: open_count=0, add=0, current_fw=1
    # ifconfig wlan0 up
    wl12xx: open_count=0, add=1, current_fw=0
    wl12xx: state: 0
    wl12xx: ERROR timeout waiting for the hardware to complete initialization
    wl12xx: ERROR timeout waiting for the hardware to complete initialization
    wl12xx: ERROR timeout waiting for the hardware to complete initialization
    wl12xx: ERROR firmware boot failed despite 3 retries
    ifconfig: SIOCSIFFLAGS: Invalid argument

    Why is this coming? In our old driver I made a workaround for this. I restarted the wl1271 chip and then it loaded the firmware again. Is there a possible workaround or something else for this problem? This also ocurs if I make calibrator plt calibrate two times. The first command is ok. The second one brings this problem.

    When I probe the driver I get:

    # modprobe wl12xx
    cfg80211: Calling CRDA to update world regulatory domain
    wl12xx: driver version: R5_SP1_Maintenance_Release
    wl12xx: compilation time: Sat Jan 25 11:20:59 2014
    # modprobe wl12xx_sdio
    wl12xx: loaded

    # ifconfig wlan0 10.0.0.253 netmask 255.255.255.0 up
    wl12xx: open_count=0, add=1, current_fw=0
    wl12xx: state: 0
    wl12xx: firmware booted (Rev 6.3.5.0.98)
    ADDRCONF(NETDEV_UP): wlan0: link is not ready

    Kind regards

    Andi

  • Hi Andi,

    I am not familiar with the git link that you provided... 

    Meanwhile, I think I could recreate what you saw with the TI-OpenLink compat-wireless build issues. It seems that you are referring to the wl8 version of the compat-wireless.

    Can you please do a git rebase to the "ol_R5.SP7.01" tag and see if you can build the source (without any modification on top) ?

    Regards,

    Gigi Joseph.

  • Hello,

    it's still not working. 

    I'm getting:

    $ make
    make -C /home/zeiler/data_zeiler/Workspace/fsvybrid/linux/linux-3.0.15-f+s-vybrid M=/home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless modules
    make[1]: Entering directory `/home/zeiler/data_zeiler/Workspace/fsvybrid/linux/linux-3.0.15-f+s-vybrid'
    CC [M] /home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/compat/main.o
    /home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/compat/main.c:2:27: fatal error: compat-2.6.34.h: No such file or directory
    compilation terminated.
    make[3]: *** [/home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/compat/main.o] Fehler 1
    make[2]: *** [/home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/compat] Fehler 2
    make[1]: *** [_module_/home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless] Fehler 2
    make[1]: Leaving directory `/home/zeiler/data_zeiler/Workspace/fsvybrid/linux/linux-3.0.15-f+s-vybrid'
    make: *** [modules] Fehler 2

    Does it search the include file in my linux-kernel library? I don't have compat headers in there.

    But its in the compat-wireless/include path.

    Kind regards

    Andi

  • Ok this problem I fixed by adding linux/ into the header define in this main.c file.

    Now I'm getting:

    make -C /home/zeiler/data_zeiler/Workspace/fsvybrid/linux/linux-3.0.15-f+s-vybrid M=/home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless modules
    make[1]: Entering directory `/home/zeiler/data_zeiler/Workspace/fsvybrid/linux/linux-3.0.15-f+s-vybrid'
    CC [M] /home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/compat/main.o
    /home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/compat/main.c:9:2: error: #error "You need a COMPAT_BASE"
    /home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/compat/main.c:24:28: error: 'COMPAT_BASE' undeclared here (not in a function)
    /home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/compat/main.c: In function 'backport_init':
    /home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/compat/main.c:55:2: error: implicit declaration of function 'backport_init_mmc_pm_flags' [-Werror=implicit-function-declaration]
    cc1: some warnings being treated as errors
    make[3]: *** [/home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/compat/main.o] Fehler 1
    make[2]: *** [/home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless/compat] Fehler 2
    make[1]: *** [_module_/home/zeiler/data_zeiler/Workspace/sandbox/TI-OpenLink-compat-wireless/compat-wireless] Fehler 2
    make[1]: Leaving directory `/home/zeiler/data_zeiler/Workspace/fsvybrid/linux/linux-3.0.15-f+s-vybrid'
    make: *** [modules] Fehler 2

    What should I export to COMPAT_BASE? ist it the compat directory ??

  • Hi Andi,

    I just did a build, and I did not find any problem...

    Are you resetting to "ol_R5.SP7.01" tag for all the compat, compat-wireless & wl12xx gits?

    Also, please look at http://processors.wiki.ti.com/index.php/WL18xx_WiFi_Build_Process and see if you can use the script?

    Regards,

    Gigi Joseph.

  • Hi,

    I tried it again. I cloned the gits and made a git reset to ol_R5.SP7.01. This worked.

    But when I run the script/admin-update.sh in compat-wireless, I get the following failure:

    Applying backport patch: patches/collateral-evolutions/network/0003-netdev-needed_headroom_tailroom.patch
    patching file net/mac80211/iface.c
    Hunk #1 FAILED at 1518.
    Hunk #2 FAILED at 1526.
    2 out of 2 hunks FAILED -- saving rejects to file net/mac80211/iface.c.rej
    patching file drivers/net/wireless/orinoco/main.c
    Patching patches/collateral-evolutions/network/0003-netdev-needed_headroom_tailroom.patch failed, update it

    I did not change anything in the structure. Just run this script.

    I don't know what this wl18xx script is doing. Why can't I just build the drivers with the exported Paths? And where can I find a useful documentation? I even did not know that I had to reset the git!!!

    Kind regards

    Andi

  • Hi,

    I tried again with the OpenLink drivers and I could build the driver. For this I had to do a git reset --hard ol_R5.SP3.05

    Except for bluetooth the driver modules could be build successfully. The only thing I had to do was to disable CONFIG_BT, etc in the config.mk. Compiler stucked when building BT. Then I copied the modules into my Buildroot fs and started the kernel. Modules could be linked in and I can do calibration and WLAN connection. 

    But I FW is stucking anyway. I reseted also the ti-utils.git to ol_R5.SP3.05. I got :

    HEAD is now at e6dcb89 update firmwares: SR: X.3.10.0.132

    Do I have to copy the firmware-files in ti-utils.git manually to my Buildroot FS? 

    The Firmware which was loaded was the old one: 6.3.5.0.98

    I read somewhere that this driver version has FW 6.3.10.0.136

    How can I disable the BT-Builds? 

    Kind regards

    Andi

  • Hi Andi,

    You have to manually copy the firmware from ti-utils to your fs. BT module did not build for me, but I think you can discard/ignore it.

    Regards,

    Gigi Joseph.

  • Hi,

    thanks for reply.

    How can I turn it off? In my Kernels menuconfig I turned BT off. For this build I changed the config.mk. Is it possible to discard this by script? 

    And another question. When I do a "make install-moduels" the all modules will be installed in my rootfs. And so, the BT drivers and etc too. But I just want the 80211 stack and the wl12xx modules.

    How can I do that?

  • Hi Andi,

    Its very unusual.

    In my Makefile,

    obj-$(CONFIG_COMPAT_BLUETOOTH) += net/bluetooth/
    obj-$(CONFIG_COMPAT_BLUETOOTH_MODULES) += drivers/bluetooth/

    This means the BT drivers will be built if CONFIG_COMPAT_BLUETOOTH & CONFIG_COMPAT_BLUETOOTH_MODULES are enabled.

    In my config.mk,

    ifeq ($(CONFIG_BT),y)
    # we'll ignore compiling bluetooth
    else
    # CONFIG_COMPAT_BLUETOOTH=y
    # CONFIG_COMPAT_BLUETOOTH_MODULES=m
    endif

    See that the CONFIG_COMPAT_XXX are all commented. So in my case, the BT modules are not built. 

    So to disable Bluetooth build, you can either enable "CONFIG_BT" in your kernel menuconfig, or leave the CONFIG_COMPAT_BLUETOOTH as commented. Then, please do a "make clean modules"

    Regards,

    Gigi Joseph. 

     

  • Hi Joseph,

    thanks for reply.

    I had done the whole thing a bit diffrent now.

    In your wiki there was a software release entry : processors.wiki.ti.com/index.php/WL127x_Software_Releases

    So I resetted git to R5.S4.01 which was released in june 25th 2013. So I think this should be a new driver for wl1271!! Compilation worked and BT was not build. So everything worked fine. Now I have a good working driver for my platform.

    The only problem is still when ifdown / ifup the interface. So I selected the reset-routine from my mach-file and added a call in boot.c in wl1271_boot_run_firmware:

    if (loop > INIT_LOOP) {
            wl1271_error("timeout waiting for the hardware to "
                     "complete initialization");
    /**/printk("%s - resetting chip...\n",__func__);
            if(wl->set_power)
                wl->set_power(1);
                
            ret = -EIO;
            goto out;
        }

    my mach-files reset routine:

    static int wl12xx_set_power(bool enable)
    {
        if(enable)
        {
            /*  switch/reset WLAN on */
            gpio_set_value(MVF600_PTB28_WL12XX_EN, 1);
            mdelay(11);            /* min 10ms */
            gpio_set_value(MVF600_PTB28_WL12XX_EN, 0);
            udelay(80);            /* min 64us */
            gpio_set_value(MVF600_PTB28_WL12XX_EN, 1);
            mdelay(20);            /* wait some time for wlan chip to get ready */
        }
        return 0;
    }

    /* Support for TI WL12xx WLAN chips via SDIO card */
    static struct wl12xx_platform_data wlan_data  __initdata = {
        .set_power = wl12xx_set_power,
        .irq = gpio_to_irq(MVF600_PTB26_WL12XX_IRQ),
        /* internal ref clock is 38.4 MHz (XTAL) */
        .board_ref_clock = WL12XX_REFCLOCK_38_XTAL,
    };

    so now when FW stucks somewhere again after ifdown or anything else, the chip will get resetted and FW can be booted again. So I dont have to reboot my system everytime. I Think the chip is in sleep mode and can't wake up again?? Very obscure!!

    I copied the FW-Files from ti-utils to my buildroot system. Now driver works acceptable.

    Thanks!!

    Kind regards

    Andi

  • Hi Andi,

    I believe this new query is same as another one you posted. Lets track that.

    http://e2e.ti.com/support/low_power_rf/f/307/t/317996.aspx

    Regards,

    Gigi Joseph.