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.

WL1273 driver issue

Hi !

We are bringing up our OMAP4 platform using WL1273 and Android 2.3 (Gingerbread release L27.G.3).
We faced some problems while loading WLAN kernel module (tiwlan_drv.ko) after tapping 
(Settings->Wireless & network->Wi-Fi).

Android log:

TIWLAN: driver init
TI WiLink 1283 SDIO: Driver loaded
D/Tethering( 1441): tiwlan0 is not a tetherable iface, ignoring
hPlatform_Wlan_Hardware_Init: timeout waiting for wifi device init
TIWLAN: hPlatform_initInterrupt() bad param drv->irq=0 handle_add=0xbf0013c0 !!!
wlanDrvIf_Create(): Failed to register interrupt handler!
E/Tethering( 1441): attempting to remove unknown iface (tiwlan0), ignoring
wlanDrvIf_Create: Fail, rc = -22
E/WifiService( 1441): Failed to load Wi-Fi driver.

As you can see drv->irq=0. But in platform configuration WLAN_IRQ is set to 605:

static struct wl12xx_platform_data omap4_panda_wlan_data __initdata = {
.irq = WLAN_IRQ,
.board_ref_clock = WL12XX_REFCLOCK_26,
.board_tcxo_clock = 1,
};

Module tiwlan_drv.ko is compiled as presented in 
http://www.omappedia.org/wiki/PandaBoard_L27.12.1-P2_Release_Notes:
cd $YOUR_PATH/L27.12.1-P2/wlan/wl1283/platforms/os/linux
export KERNEL_DIR=$YOUR_PATH/L27.12.1-P2/kernel/android-2.6.35
make clean
make TNETW=1273

Could you please tell us what is a connection between kernel module (tiwlan_drv.ko) 
and a staticly compiled in kernel part of WLAN driver ?
From where are the parameters like irq number taken ?
Do you have a detailed diagram of the structure of WLAN driver ?

Best regards,
Luke
  • Luke,

    When you work with a WLAN package which uses tiwlan_drv.ko the ref clock as well as the irq are all taken for the ini file (tiwlan_drv.ini) in the file system and not from the platfrom data structure in the board file.

    The platfrom data structure in the board file is used only when you work with nlcp.

    Best Regards,

    Eyal Reizer

  • Dear Luke,

    Please let me know if you are using a custom built platform based on OMAP4 or Blaze/Panda (OMAP4 Refernce Platforms)?

    For WiFi to work on L27.G.3 release on OMAP4 platform, the CONFIG_TIWLAN_SDIO flag is needed in kernel .config. Please check if this flag is enabled.

    From the log - hPlatform_Wlan_Hardware_Init: timeout waiting for wifi device init – it seems that WiFi probe is failing and it may be due to WLAN_EN and WLAN_IRQ not set correctly. Please update the correct GPIO numbers based on your platform in kernel/arch/arm/mach-omap2/board-4430sdp-wifi.h and not in wl12xx_platform_data omap4_panda_wlan_data structure.

    Please also verify that kernel/ arch/arm/mach-omap2/board-4430sdp-wifi.c is being used for compilation.

    Please refer to http://www.omappedia.org/wiki/L27.G.3_OMAP4_GingerBread_Release_Notes for L27.G.3 WiFi build (Use make TNETW=1273 to build WiFi driver for WL1273 device).

    Regards,
    Naveen

  • Hello,

    We have only tiwlan.ini file, not tiwlan_drv.ini

    And there (tiwlan.ini) is no entries about irq nor enable pins, could you please tell us what we should add to this file to configure pin numbers ?

    In platform data and in kernel/arch/arm/mach-omap2/board-4430sdp-wifi.h all pin numbers are set correctly

    File kernel/arch/arm/mach-omap2/board-4430sdp-wifi is included in compilation

    We still have problem with  drv->irq=0

    Best regards,

    Luke

  • Luke,

    The tiwlan.ini doesn't have the information about the irq or WLAN_EN pins. That needs to be configured in kernel/arch/arm/mach-omap2/board-4430sdp-wifi.h which you mentioned as already done.

    Can you please confirm if the CONFIG_TIWLAN_SDIO flag is defined in kernel .config. Please check if this flag is enabled.

    Regards,

    Naveen

  • Hi Naveen, 

    I am working on http://omappedia.org/wiki/L27.G.5_OMAP4_GingerBread_Release_Notes on Panda ES, I am having issue with the wifi module. I am using the firmware provided in the http://omappedia.org/wiki/PandaBoard_L27.12.1-P2_Release_Notes#X-loader_Source 

    The wifi module on the board is TiWi-BLE and building the source following way.

    cd $MYDROID/hardware/ti/wlan/wl1283/platforms/os/linux
    export KERNEL_DIR=${YOUR_PATH}/kernel/android-2.6.35
    make ARCH=arm TNETW=1283 <HERE I USED 1273>
    cd $MYDROID/hardware/ti/wlan/wl1283_softAP/platforms/os/linux
    export KERNEL_DIR=${YOUR_PATH}/kernel/android-2.6.35
    make ARCH=arm TNETW=1283 <HERE I USED 1273>
    Issue:
    When I go to settings and then turn wifi, it is showingin "turning On" and then after a couple of seconds showing "turning off" and it is never turning off.
    dmeg:

    IWLAN: driver init
    TI WiLink 1283 SDIO: Driver loaded
    wifi_probe: got wlan irq 213
    wifi_probe: got wlan irq trigger falling flag
    sdp4430_wifi_set_carddetect: 0
    sdp4430_wifi_set_carddetect: Nobody to notify
    sdp4430_wifi_reset: 1
    sdp4430_wifi_power: 0
    TIWLAN: 1366.198232: pInitParams->RoamingScanning_2_4G_enable 0
    sdp4430_wifi_power: 1
    sdp4430_wifi_power: 0
    sdp4430_wifi_power: 1
    sdp4430_wifi_reset: 0
    sdp4430_wifi_set_carddetect: 1
    sdp4430_wifi_set_carddetect: Nobody to notify
    hPlatform_DevicePowerOn: timeout waiting for sdio init
    sdioAdapt_ConnectBus(): Block-Size should be bigger than SYNC_ASYNC_LENGTH_THRESH!!
    CPU1: Booted secondary processor
    TIWLAN: 1376.078481: tiwlan: 10 sec os_SignalObjectWait timeout- Raise Hang Event
    TIWLAN: 1376.086049: **TI_WLAN:HANG EVENT**
    !!!The timeout cmd is 35808
    !!!The timeout priv cmd is 8460832
    ADDRCONF(NETDEV_UP): tiwlan0: link is not ready
    TIWLAN: ioctl 0x8b36 is disabled in state 0
    TIWLAN: ioctl 0x8b06 is disabled in state 0
    TIWLAN: ioctl 0x8b0b is disabled in state 0
    TIWLAN: ioctl 0x8b07 is disabled in state 0
    TIWLAN: cmd 0x800508 is disabled in state 0
    TIWLAN: ioctl 0x8b32 is disabled in state 0
    TIWLAN: ioctl 0x8b34 is disabled in state 0
    TIWLAN: ioctl 0x8b34 is disabled in state 0
    TIWLAN: ioctl 0x8b34 is disabled in state 0
    TIWLAN: ioctl 0x8b34 is disabled in state 0
    TIWLAN: ioctl 0x8b32 is disabled in state 0
    TIWLAN: ioctl 0x8b32 is disabled in state 0
    TIWLAN: ioctl 0x8b36 is disabled in state 0
    TIWLAN: cmd 0x800508 is disabled in state 0
    TIWLAN: ioctl 0x8b0b is disabled in state 0
    TIWLAN: ioctl 0x8b19 is disabled in state 0
    TIWLAN: cmd 0x8021505 is disabled in state 0
    TIWLAN: cmd 0x800632 is disabled in state 0
    TIWLAN: cmd 0x800632 is disabled in state 0
    TIWLAN: cmd 0x880080d is disabled in state 0
    TIWLAN: ioctl 0x8b32 is disabled in state 0
    TIWLAN: ioctl 0x8b32 is disabled in state 0
    TIWLAN: ioctl 0x8b32 is disabled in state 0
    TIWLAN: ioctl 0x8b07 is disabled in state 0
    init: no such service 'dhcpcd_tiwlan0'
    TIWLAN: 1409.541371: tiwlan: 10 sec os_SignalObjectWait timeout- Raise Hang Event
    TIWLAN: 1409.548940: **TI_WLAN:HANG EVENT**
    !!!The timeout cmd is 35808
    !!!The timeout priv cmd is 8460835
    TIWLAN: 1409.568776: cmdHndlr_InsertCommand : eeba7bb4 dequeued

    What can be the reason for this issue.

    Thanks.

  • Vamsi,

    I would suggest you to refer to http://www.omappedia.org/wiki/PandaBoard_L27.12.1-P2_Release_Notes. There is a prebuilt binary package - http://www.omappedia.org/wiki/PandaBoard_L27.12.1-P2_Release_Notes#Prebuilt_binaries. Please try that first. This package (Gingerbread Pre-Built "DRAFT" Release Package) also contains kernel patches to enable BT and WiFi in Kernel for Panda board. I suspect that those changes might be missing in L27.G.5 release that you are using, so you need to apply/port those patches to L27.G.5.

    Thanks,

    Naveen

  • Hi Naveen, 

    Wifi is working with  http://www.omappedia.org/wiki/PandaBoard_L27.12.1-P2_Release_Notes but it is giving the issue with this source http://omappedia.org/wiki/L27.G.5_OMAP4_GingerBread_Release_Notes. Presently i want make wifi work with the G.5 source.

    Thanks.

  • Vamsi,

    The default configuration for L27.G.5 release is Blaze board and for Panada board we need to make changes in GPIO (WLAN_ENABLE), MMC clocks etc. Those changes needs to be done in kernel of L27.G.5. For this please refer to this package - http://www.omappedia.org/wiki/PandaBoard_L27.12.1-P2_Release_Notes#Prebuilt_binaries. Specifically you need the changes from following patches.

    0007-OMAP4-WLAN-Add-WLAN-PowerEnable-GPIO-for-Panda.pacth
    0008-CONFIG_WIFI_CONTROL_FUNC-for-MACH_OMAP4_PANDA.patch
    0011-arch-arm-mach-omap2-board-omap4panda.c-Disable-power.patch
    0010-arch-arm-mach-omap2-hsmmc.c-Change-the-clock-speed-f.patch

    Regards,

    Naveen

  • Thanks Naveen, I will try and update you.

  • Hi Naveen, 

    I have cross checked the patch, we have all these patches applied, like gpio settings and mmc pad muxing.

    Thanks