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.

System dead when turn off WIFI

Other Parts Discussed in Thread: WL1271

Hi There,

    We face a difficult problem about system dead when turn off WIFI. And we try to work out with some days but failed. So please give me a hand.

 

    It is the same in Freescale iMX51 platform(Android2.3.4/kernel2.6.35.3) or in Samsung smdkv210 platform(Android2.3.4/kernel2.6.35.7). They are all MID without phone function. When turn off WIFI, kernel just only print wlanDrvIf_Release and die. But the right Log should be wlanDrvIf_Release
wlanDrvIf_Stop
sdioDrv_DisconnectBus
hPlatform_DevicePowerOff
wifi_set_power
wifi_sdio_detect_card
mmc1: Card removed and resetting controller.
mmc1: card 0001 removed
hPlatform_Wlan_Hardware_DeInit
hPlatform_freeInterrupt
TI WiLink 1271 SDIO Driver unloaded
platformDrv_exit
wifi_remove
set_plat_data
TI WLAN: driver unloaded

 

    So could you show me the code flow chart between Log wlanDrvIf_Release and wlanDrvIf_Stop ? And How to turn on the Log control for more LOG ? Or is there some better suggestion ?

    Thanks very much for your help!

Albin

  • Hi all,

           I was the person who found this BUG. 

           Sometimes kernel just only print “wlanDrvIf_Releaseand die ,  and sometimes it would print as follow :

    [ 2088.815296] wlanDrvIf_Release
    [ 2089.846538] BUG: spinlock bad magic on CPU#0, /1073951288
    [ 2089.850467]  lock: 40083258, .magic: 00000023, .owner: <none>/-1, .owner_cpu: 1073801336
    [ 2089.858552] [<c003b58c>] (unwind_backtrace+0x0/0xf8) from [<c04e3d78>] (dump_stack+0x20/0x24)
    [ 2089.867025] [<c04e3d78>] (dump_stack+0x20/0x24) from [<c022cb0c>] (spin_bug+0x90/0xa4)
    [ 2089.874908] [<c022cb0c>] (spin_bug+0x90/0xa4) from [<c022cc54>] (do_raw_spin_lock+0x2c/0x168)
    [ 2089.883402] [<c022cc54>] (do_raw_spin_lock+0x2c/0x168) from [<c04e7268>] (_raw_spin_lock_irqsave+0x38/0x40)
    [ 2089.893110] [<c04e7268>] (_raw_spin_lock_irqsave+0x38/0x40) from [<c0226430>] (__down_read_trylock+0x1c/0x5c)
    [ 2089.902989] [<c0226430>] (__down_read_trylock+0x1c/0x5c) from [<c008a248>] (down_read_trylock+0x18/0x1c)
    [ 2089.912430] [<c008a248>] (down_read_trylock+0x18/0x1c) from [<c003c5bc>] (do_page_fault+0x74/0x204)
    [ 2089.921440] [<c003c5bc>] (do_page_fault+0x74/0x204) from [<c003c814>] (do_translation_fault+0x2c/0xa8)
    [ 2089.930713] [<c003c814>] (do_translation_fault+0x2c/0xa8) from [<c0034314>] (do_DataAbort+0x44/0xa8)
    [ 2089.939812] [<c0034314>] (do_DataAbort+0x44/0xa8) from [<c0034aec>] (__dabt_svc+0x4c/0x60)

    Where does the BUG come from?

    Thanks / Jason

  • Hi

    I don’t have the Android source code however as far as driver concerns it is similar to the Linux release, and I am referring to the legacy driver since I think that that is the code base you are working with (if not then please let me know which release you are using)

    wlanDrvIf_Release() is part of the network stack interface as defined in

    static struct net_device_ops wlanDrvIf_Ops =

    {

        .ndo_open = wlanDrvIf_Open,

        .ndo_stop = wlanDrvIf_Release,

        .ndo_start_xmit = wlanDrvIf_XmitDummy,

        .ndo_get_stats = wlanDrvIf_NetGetStat,

    };

     int wlanDrvIf_Release (struct net_device *dev)

    {

        WLAN_OS_REPORT(("wlanDrvIf_Release()\n"));

     

        /* Disable network interface queue */

        netif_stop_queue (dev);

        return 0;

    }

     wlanDrvIf_Stop() can be called by the Driver when the driver is entering suspend mode or when the system decide to release the driver.

    As for the crush you get from wlanDrvIf_Release() it looks like it is in the network stack since it is probably from  netif_stop_queue()

    Regards,

    Eyal

  • Hi Eyal,

            Thanks very much for your kind help !   

    We use the 'wl1271' chip, and the driver version is :

    TIWLAN: 399.922449: Driver Version  : WiLink_Driver_6.1.0.0.144
    TIWLAN: 399.928214: Firmware Version: Rev 6.1.0.0.335
    TIWLAN: 399.933155: Station ID      : 08-00-28-22-56-46

    Is there the newer code base driver of WL1271 ? 

    By the way, our custom want  WL1271 to support two new functions of Sotf-AP and WIFI P2P  for Android4.0.   Is there a driver version to support them ? If not, any suggestion to enable these functions ?

    Thanks again for your help!

    Jason

  • Hi Jason,

    The WLAN driver that you are using is based on our Legacy driver which does not supports new features such as Access Point and WiFi direct.

    In order to support that we have a newer Driver architecture that is based on Open Source driver, we have it as part as our platforms offering (AM18x, AM37x and AM335x Platforms) however the support is on Linux.

    For Android based releases,  will forward that request to our Marketing and they will respond in that thread soon.

    Regards,

    Eyal

  • Hi Eyal,

           (1)  How can I get the driver code of WL1271 that is based on Open Source driver,  being refered to by you above ? Although the support is on Linux, I should try to move it on Android.  So are there some documents for this ? If possible, send them to my e-mail:jiansheng.liu@sim.com

          (2)  The  name of the WLAN driver that we are using is 'L25.INC3.3' when we get it from TI.  Do you have a newer driver version basing on  Legacy driver ? Please give me if yes.

          (3) We can't solve it althought  finding the reason of the bug "System dead when turn off WIFI".  When turn off wifi, system dies because it executes "rmmod".  After turn on wifi,  more exactly is after "ifconfig tiwlan0 up", it will die when executing "lsmod" or "rmmod" or "cat /proc/module".  Before "ifconfig tiwlan0 up", it is OK when executing everything, even executing "insmod tiwlan_drv.ko" and "./tiwlan_loader".  What is wrong? and How to solve it?

    Thanks very much!

    Jason

  • Jason,

    The WL1271 Driver integrated into our upcoming Android 4.0 Release for AM335x and AM37x Platform does support Soft AP and WiFi Direct features.

    However, twe don't have plans for integrating or testing these features at the ANdroid Framework level.

    Adnan

  • Hi Eyal,

          I am sorry to trouble you again !   How can I get the wl12xx wlan driver base on NLCP for Android2.3 or Android2.2 ?   Are there some  UserGuide for NLCP architecture that is based on Open Source driver ?  

         I really hope that you have the WIFI driver supporting Soft-AP for Android2.2 or Android2.3.

         Thanks very much!

        Jason

  • Hi Jason,

    Please search in http://omappedia.org/wiki/Main_Page

    Regards,

    Eyal