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.

Linux/WL1835MOD: Wake on WLAN is not working as supposed

Part Number: WL1835MOD
Other Parts Discussed in Thread: WL1271, WL1835

Tool/software: Linux

Hi,

I have a beaglebone black wireless and I wanted to setup wake on wlan. Unfortunately I was not successful.

Firstly I have downloaded and installed 05.01.00.11 linux SDK.

I created my sd card via create_card.sh script.

I booted from uSD and here's my uname:

Linux am335x-evm 4.14.67-gd315a9bb00 #1 PREEMPT Sat Oct 6 03:26:15 UTC 2018 armv7l GNU/Linux

When I connect to wifi network and setup wowlan like this:

iw phy0 wowlan enable patterns 38:D2:69:D4:16:37:-:-:-:-:-:-:08:00:45:-:-:-:-:-:-:-:-:11:-:-:-:-:-:-:C0:A8:64:0A:-:-:00:09:-:-:-:-:ff:ff:ff:ff:ff:ff:38:D2:69:D4:16:37:38:D2:69:D4:16:37


I can enter to standby mode via:

echo standby > /sys/power/state


Unfortunately it wakes up on any packet and not only on magic packet.

If I enter to suspend state via:

echo mem > /sys/power/state


it doesn't react on any packet and its sometimes possible to wakeup only by key press. But when its pressed I got following errors or it sleeps forever:

root@am335x-evm:~# echo mem > /sys/power/state
[  109.342546] PM: suspend entry (deep)
[  109.346197] PM: Syncing filesystems ... done.
[  109.471395] Freezing user space processes ... (elapsed 0.002 seconds) done.
[  109.480741] OOM killer disabled.
[  109.484154] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[  109.493586] Suspending console(s) (use no_console_suspend to debug)
[  109.512500] queueing ieee80211 work while going to suspend
[  109.512646] queueing ieee80211 work while going to suspend
[  109.639752] pm33xx pm33xx: PM: Successfully put all powerdomains to target state
[  109.639752] PM: Wakeup source UART
[  109.710312] ------------[ cut here ]------------
[  109.710396] WARNING: CPU: 0 PID: 808 at /oe/bld/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work-shared/am335x-evm/kernel-source/drivers/net/wireless/ti/wlcore/sdio.c:100 wl12xx_sdio_raw_read+0xbc/0x13c [wlcore_sdio]
[  109.710406] Modules linked in: pvrsrvkm(O) arc4 pru_rproc wl18xx pruss_intc wlcore mac80211 cfg80211 pruss usb_f_acm u_serial usb_f_ecm musb_dsps phy_am335x phy_am335x_control musb_hdrc phy_generic g_multi usb_f_mass_storage usb_f_rndis u_ether libcomposite udc_core snd_soc_simple_card snd_soc_simple_card_utils wkup_m3_rproc pm33xx wkup_m3_ipc omap_aes_driver remoteproc crypto_engine omap_crypto omap_sham ti_emif_sram pruss_soc_bus wlcore_sdio at24 rtc_omap musb_am335x omap_wdt sch_fq_codel uio_module_drv(O) uio ftdi_sio usbserial usbcore usb_common cryptodev(O)
[  109.710739] CPU: 0 PID: 808 Comm: kworker/u2:10 Tainted: G           O    4.14.67-gd315a9bb00 #1
[  109.710748] Hardware name: Generic AM33XX (Flattened Device Tree)
[  109.710795] Workqueue: events_unbound async_run_entry_fn
[  109.710807] Backtrace:
[  109.710865] [<c010ba48>] (dump_backtrace) from [<c010bd2c>] (show_stack+0x18/0x1c)
[  109.710888]  r7:00000009 r6:00000000 r5:bf0c2ad0 r4:00000000
[  109.710933] [<c010bd14>] (show_stack) from [<c082e668>] (dump_stack+0x24/0x28)
[  109.711054] [<c082e644>] (dump_stack) from [<c0128af4>] (__warn+0xe8/0x100)
[  109.711082] [<c0128a0c>] (__warn) from [<c0128bc4>] (warn_slowpath_null+0x28/0x30)
[  109.711109]  r9:00000000 r8:000000ec r7:da9a5610 r6:da9cb100 r5:000050f8 r4:dc61ba00
[  109.711147] [<c0128b9c>] (warn_slowpath_null) from [<bf0c1420>] (wl12xx_sdio_raw_read+0xbc/0x13c [wlcore_sdio])
[  109.711503] [<bf0c1364>] (wl12xx_sdio_raw_read [wlcore_sdio]) from [<bf2f73ac>] (wlcore_irq_locked+0x108/0x760 [wlcore])
[  109.711530]  r9:0000002c r8:dafb6420 r7:dafb6d38 r6:dabcdb40 r5:dafb6d00 r4:bf0c1364
[  109.711851] [<bf2f72a4>] (wlcore_irq_locked [wlcore]) from [<bf2fc960>] (wl1271_op_resume+0x250/0x2c8 [wlcore])
[  109.711877]  r10:00000001 r9:00000000 r8:dafb6420 r7:dafb6d38 r6:bf317cc0 r5:dafb6d00
[  109.711886]  r4:00000000
[  109.712643] [<bf2fc710>] (wl1271_op_resume [wlcore]) from [<bf2ad708>] (ieee80211_reconfig+0x54/0xcd0 [mac80211])
[  109.712669]  r9:00000000 r8:dafb6420 r7:dafb6258 r6:bf232640 r5:00000000 r4:dafb6420
[  109.713314] [<bf2ad6b4>] (ieee80211_reconfig [mac80211]) from [<bf299790>] (ieee80211_resume+0x60/0x68 [mac80211])
[  109.713340]  r10:c0d15280 r9:00000000 r8:00000000 r7:dafb6258 r6:bf232640 r5:dafb6258
[  109.713349]  r4:dafb6420
[  109.714080] [<bf299730>] (ieee80211_resume [mac80211]) from [<bf232690>] (wiphy_resume+0x50/0x60 [cfg80211])
[  109.714095]  r5:dafb6258 r4:bf299730
[  109.714356] [<bf232640>] (wiphy_resume [cfg80211]) from [<c0552634>] (dpm_run_callback+0x44/0xdc)
[  109.714370]  r5:dafb6258 r4:c0d52dec
[  109.714397] [<c05525f0>] (dpm_run_callback) from [<c0552cb8>] (device_resume+0xd4/0x278)
[  109.714421]  r9:00000000 r8:dafb628c r7:00000010 r6:00000000 r5:dafb6258 r4:00000001
[  109.714447] [<c0552be4>] (device_resume) from [<c0552e80>] (async_resume+0x24/0x4c)
[  109.714472]  r9:00000000 r8:dc005000 r7:00000000 r6:dabaeec0 r5:dafb6258 r4:c0d8973c
[  109.714505] [<c0552e5c>] (async_resume) from [<c01491b4>] (async_run_entry_fn+0x4c/0x144)
[  109.714518]  r5:c0d4fb60 r4:dabaeed0
[  109.714547] [<c0149168>] (async_run_entry_fn) from [<c013fcfc>] (process_one_work+0x1f8/0x444)
[  109.714566]  r7:00000000 r6:dc004100 r5:d6c10000 r4:dabaeed0
[  109.714589] [<c013fb04>] (process_one_work) from [<c013ffcc>] (worker_thread+0x84/0x680)
[  109.714614]  r10:c0d15280 r9:00000088 r8:dc005014 r7:ffffe000 r6:d6c10018 r5:dc005000
[  109.714623]  r4:d6c10000
[  109.714655] [<c013ff48>] (worker_thread) from [<c0145d4c>] (kthread+0x15c/0x164)
[  109.714679]  r10:d6c1de8c r9:c013ff48 r8:d6c10000 r7:d6be6000 r6:00000000 r5:dae0b400
[  109.714689]  r4:dae0b3c0
[  109.714721] [<c0145bf0>] (kthread) from [<c0107e08>] (ret_from_fork+0x14/0x2c)
[  109.714745]  r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0145bf0
[  109.714754]  r4:dae0b400
[  109.714766] ---[ end trace d7e36d7da0bee8c6 ]---
[  109.714794] wl1271_sdio mmc2:0001:2: sdio read failed (-110)
[  109.714806] ------------[ cut here ]------------


Any idea what can be wrong?

Thanks.

  • Hi,
    Please check if following wowlan patch is applied to the driver . If not , pls apply and re-test. :
    git.ti.com/.../8cbba968049bbb8c52220b1f07489265dce993cb

    Thanks,
    Saurabh
  • Hi,
    no change. I found out that sometimes even standard standby or mem sleep doesn't work after restart. It hangs up in sleep and keyboard is not reacting.
    I verified and this is happening with original image as well.
  • Hi,
    Can you confirm SDIO has 'keep-power-in-suspend' defined in dts file and that WLAN IRQ is mapped to Host GPIO capable of waking up the host from suspend ?

    Thanks ,
    Saurabh
  • Hi,

    I would say so.

    Here's the part of the am335x-boneblack-wireless.dts defined in repository here: git.ti.com/.../am335x-boneblack-wireless.dts

    &mmc3 {
    dmas = <&edma_xbar 12 0 1
    &edma_xbar 13 0 2>;
    dma-names = "tx", "rx";
    status = "okay";
    vmmc-supply = <&wlan_en_reg>;
    bus-width = <4>;
    non-removable;
    cap-power-off-card;
    ti,needs-special-hs-handling;
    keep-power-in-suspend;
    pinctrl-names = "default";
    pinctrl-0 = <&mmc3_pins &wl18xx_pins>;

    #address-cells = <1>;
    #size-cells = <0>;
    wlcore: wlcore@2 {
    compatible = "ti,wl1835";
    reg = <2>;
    interrupt-parent = <&gpio0>;
    interrupts = <29 IRQ_TYPE_EDGE_RISING>;
    };
    };
  • Just one idea, can have some impact that it boots up from sd card and not from eMMC?
  • Hi,
    What about the WLAN IRQ ?- pls check the datasheet to make sure it maps to wakeable IO

    Saurabh
  • wl18xx_pins: pinmux_wl18xx_pins {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x92c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gmii1_txclk.gpio3_9 WL_EN */
    AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7) /* rmii1_refclk.gpio0_29 WL_IRQ */
    AM33XX_IOPAD(0x930, PIN_OUTPUT_PULLUP | MUX_MODE7) /* gmii1_rxclk.gpio3_10 LS_BUF_EN */

    According beaglebone refernce the gpio bank 0 should be used for wakeup . So it should be ok
  • can you check if wilink8 is 'active' when system goes in suspend mode - irrespective of wowlan ? can you probe wlan_en in suspend mode and make sure it's high ?
  • I am not sure. I was not able to find a GPIO3_9 pin on beaglebone pin header. Another option is to use JTAG and read pin from JTAG right?
    Unfortunately I don't have JTAG established. If really needed it will take some time to order and solder on bone.

    Let me know how I can effectively read WLAN_EN pin.

    THanks.
  • You will need to solder and probe the pin. what happens to wlan0 interface when system goes in suspend mode ? Do you always see the error initially reported when system resumes ? keep wowlan disabled for these tests . Thanks
  • I can only see LED for WL and BT. I don't know whether its controlled via WLAN_EN. Unfortunately I have no other idea how to access WLAN_EN value.

    When wowlan is disabled, echo mem > /sys/power/state seems to work quite well. WL LED is turned off in suspend state. It can wake up on keyboard (UART) event and LED turn on again.

    The above mentioned error trace is visible only during wakeup when wowlan is enabled. In that case is visible every time. When I put device to sleep, WL LED is turned off.
  • This is compelte error trace. I realized that some part was missing in my post above.
    root@am335x-evm:~# iw phy0 wowlan show
    WoWLAN is enabled:
    * wake up on special any trigger
    root@am335x-evm:~# ech[ 67.541635] NOHZ: local_softirq_pending 40
    [ 67.545825] NOHZ: local_softirq_pending 40
    o mem > /sys/power/state
    [ 73.352761] PM: suspend entry (deep)
    [ 73.356411] PM: Syncing filesystems ... done.
    [ 73.411670] Freezing user space processes ... (elapsed 0.001 seconds) done.
    [ 73.420720] OOM killer disabled.
    [ 73.424313] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
    [ 73.433562] Suspending console(s) (use no_console_suspend to debug)
    [ 73.452652] queueing ieee80211 work while going to suspend
    [ 73.579876] pm33xx pm33xx: PM: Successfully put all powerdomains to target state
    [ 73.579876] PM: Wakeup source UART
    [ 73.623014] ------------[ cut here ]------------
    [ 73.623094] WARNING: CPU: 0 PID: 5 at drivers/net/wireless/ti/wlcore/sdio.c:145 wl12xx_sdio_raw_write+0xb8/0x13c [wlcore_sdio]
    [ 73.623104] Modules linked in: usb_f_acm u_serial usb_f_ecm g_multi usb_f_mass_storage usb_f_rndis u_ether libcomposite pvrsrvkm(O) arc4 wl18xx pru_rproc wlcore pruss_intc mac80211 cfg80211 pruss musb_dsps musb_hdrc phy_am335x udc_core phy_generic phy_am335x_control snd_soc_simple_card snd_soc_simple_card_utils pm33xx wkup_m3_ipc wkup_m3_rproc remoteproc omap_aes_driver crypto_engine omap_crypto omap_sham ti_emif_sram pruss_soc_bus wlcore_sdio rtc_omap at24 musb_am335x omap_wdt sch_fq_codel uio_module_drv(O) uio ftdi_sio usbserial usbcore usb_common cryptodev(O)
    [ 73.623424] CPU: 0 PID: 5 Comm: kworker/u2:0 Tainted: G O 4.14.67-54512-gd315a9b-dirty #3
    [ 73.623434] Hardware name: Generic AM33XX (Flattened Device Tree)
    [ 73.623480] Workqueue: events_unbound async_run_entry_fn
    [ 73.623494] Backtrace:
    [ 73.623553] [<c010ba60>] (dump_backtrace) from [<c010bd30>] (show_stack+0x18/0x1c)
    [ 73.623576] r7:00000009 r6:00000000 r5:bf0c1ad0 r4:00000000
    [ 73.623617] [<c010bd18>] (show_stack) from [<c082a750>] (dump_stack+0x24/0x28)
    [ 73.623653] [<c082a72c>] (dump_stack) from [<c0128b48>] (__warn+0xe8/0x100)
    [ 73.623680] [<c0128a60>] (__warn) from [<c0128c18>] (warn_slowpath_null+0x28/0x30)
    [ 73.623706] r9:00000000 r8:00000004 r7:dae830c0 r6:da8fd210 r5:0001fffc r4:dc623800
    [ 73.623743] [<c0128bf0>] (warn_slowpath_null) from [<bf0c02dc>] (wl12xx_sdio_raw_write+0xb8/0x13c [wlcore_sdio])
    [ 73.624088] [<bf0c0224>] (wl12xx_sdio_raw_write [wlcore_sdio]) from [<bf2de188>] (wl1271_ps_elp_wakeup+0x1a0/0x260 [wlcore])
    [ 73.624115] r9:bf2efcc0 r8:00000001 r7:ffffa78f r6:00000000 r5:c0d16380 r4:da92cd00
    [ 73.624427] [<bf2ddfe8>] (wl1271_ps_elp_wakeup [wlcore]) from [<bf2d15ac>] (wlcore_irq_locked+0x54/0x738 [wlcore])
    [ 73.624453] r10:da92cd00 r9:bf1f3660 r8:da92c420 r7:da92cd38 r6:00000000 r5:da92cd00
    [ 73.624463] r4:bf2efcc0
    [ 73.624752] [<bf2d1558>] (wlcore_irq_locked [wlcore]) from [<bf2d59cc>] (wl1271_op_resume+0x254/0x2c8 [wlcore])
    [ 73.624779] r10:dc005014 r9:bf1f3660 r8:da92c420 r7:da92cd38 r6:00000000 r5:da92cd00
    [ 73.624788] r4:bf2efcc0
    [ 73.625504] [<bf2d5778>] (wl1271_op_resume [wlcore]) from [<bf26f10c>] (ieee80211_reconfig+0x31c/0xcf0 [mac80211])
    [ 73.625530] r9:bf1f3660 r8:da92c420 r7:00000000 r6:00000000 r5:00000000 r4:da92c420
    [ 73.626138] [<bf26edf0>] (ieee80211_reconfig [mac80211]) from [<bf25bce8>] (ieee80211_resume+0x60/0x70 [mac80211])
    [ 73.626165] r10:dc005014 r9:bf1f3660 r8:da92c258 r7:00000000 r6:00000000 r5:da92c258
    [ 73.626174] r4:da92c420
    [ 73.626858] [<bf25bc88>] (ieee80211_resume [mac80211]) from [<bf1f36b0>] (wiphy_resume+0x50/0x60 [cfg80211])
    [ 73.626873] r5:da92c258 r4:bf25bc88
    [ 73.627112] [<bf1f3660>] (wiphy_resume [cfg80211]) from [<c054e2f8>] (dpm_run_callback+0x40/0xe4)
    [ 73.627126] r5:da92c258 r4:c0d52dac
    [ 73.627153] [<c054e2b8>] (dpm_run_callback) from [<c054e964>] (device_resume+0xb0/0x278)
    [ 73.627178] r9:00000001 r8:da92c28c r7:00000000 r6:00000010 r5:da92c258 r4:00000001
    [ 73.627204] [<c054e8b4>] (device_resume) from [<c054eb50>] (async_resume+0x24/0x4c)
    [ 73.627229] r9:00000000 r8:dc005000 r7:dc004100 r6:d6a6cec0 r5:da92c258 r4:c0d89740
    [ 73.627262] [<c054eb2c>] (async_resume) from [<c0149120>] (async_run_entry_fn+0x4c/0x144)
    [ 73.627276] r5:c0d4fb20 r4:d6a6ced0
    [ 73.627306] [<c01490d4>] (async_run_entry_fn) from [<c013fc58>] (process_one_work+0x144/0x440)
    [ 73.627326] r7:dc004100 r6:00000000 r5:dc031280 r4:d6a6ced0
    [ 73.627349] [<c013fb14>] (process_one_work) from [<c013ffc0>] (worker_thread+0x6c/0x63c)
    [ 73.627376] r10:dc005014 r9:c0d16380 r8:00000088 r7:dc060000 r6:dc031298 r5:dc005000
    [ 73.627385] r4:dc031280
    [ 73.627417] [<c013ff54>] (worker_thread) from [<c0145e80>] (kthread+0x130/0x160)
    [ 73.627443] r10:dc04fe84 r9:dc030758 r8:dc031280 r7:dc060000 r6:dc030680 r5:00000000
    [ 73.627452] r4:dc030740
    [ 73.627485] [<c0145d50>] (kthread) from [<c0107da8>] (ret_from_fork+0x14/0x2c)
    [ 73.627509] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0145d50
    [ 73.627518] r4:dc030680
    [ 73.627530] ---[ end trace 888e7b374fbfa5af ]---
    [ 73.627561] wl1271_sdio mmc2:0001:2: sdio write failed (-110)
    [ 73.627573] ------------[ cut here ]------------
    [ 73.627813] WARNING: CPU: 0 PID: 5 at drivers/net/wireless/ti/wlcore/main.c:797 wl12xx_queue_recovery_work.part.10+0x6c/0x70 [wlcore]
    [ 73.627820] Modules linked in: usb_f_acm u_serial usb_f_ecm g_multi usb_f_mass_storage usb_f_rndis u_ether libcomposite pvrsrvkm(O) arc4 wl18xx pru_rproc wlcore pruss_intc mac80211 cfg80211 pruss musb_dsps musb_hdrc phy_am335x udc_core phy_generic phy_am335x_control snd_soc_simple_card snd_soc_simple_card_utils pm33xx wkup_m3_ipc wkup_m3_rproc remoteproc omap_aes_driver crypto_engine omap_crypto omap_sham ti_emif_sram pruss_soc_bus wlcore_sdio rtc_omap at24 musb_am335x omap_wdt sch_fq_codel uio_module_drv(O) uio ftdi_sio usbserial usbcore usb_common cryptodev(O)
    [ 73.628117] CPU: 0 PID: 5 Comm: kworker/u2:0 Tainted: G W O 4.14.67-54512-gd315a9b-dirty #3
    [ 73.628126] Hardware name: Generic AM33XX (Flattened Device Tree)
    [ 73.628154] Workqueue: events_unbound async_run_entry_fn
    [ 73.628166] Backtrace:
    [ 73.628210] [<c010ba60>] (dump_backtrace) from [<c010bd30>] (show_stack+0x18/0x1c)
    [ 73.628230] r7:00000009 r6:00000000 r5:bf2e8544 r4:00000000
    [ 73.628265] [<c010bd18>] (show_stack) from [<c082a750>] (dump_stack+0x24/0x28)
    [ 73.628298] [<c082a72c>] (dump_stack) from [<c0128b48>] (__warn+0xe8/0x100)
    [ 73.628325] [<c0128a60>] (__warn) from [<c0128c18>] (warn_slowpath_null+0x28/0x30)
    [ 73.628350] r9:bf2efcc0 r8:00000001 r7:ffffa78f r6:00000000 r5:c0d16380 r4:da92cd00
    [ 73.628531] [<c0128bf0>] (warn_slowpath_null) from [<bf2d1cfc>] (wl12xx_queue_recovery_work.part.10+0x6c/0x70 [wlcore])
    [ 73.628826] [<bf2d1c90>] (wl12xx_queue_recovery_work.part.10 [wlcore]) from [<bf2d4218>] (wl12xx_queue_recovery_work+0x1c/0x20 [wlcore])
    [ 73.628840] r5:c0d16380 r4:da92cd00
    [ 73.629133] [<bf2d41fc>] (wl12xx_queue_recovery_work [wlcore]) from [<bf2de108>] (wl1271_ps_elp_wakeup+0x120/0x260 [wlcore])
    [ 73.629425] [<bf2ddfe8>] (wl1271_ps_elp_wakeup [wlcore]) from [<bf2d15ac>] (wlcore_irq_locked+0x54/0x738 [wlcore])
    [ 73.629452] r10:da92cd00 r9:bf1f3660 r8:da92c420 r7:da92cd38 r6:00000000 r5:da92cd00
    [ 73.629461] r4:bf2efcc0
    [ 73.629748] [<bf2d1558>] (wlcore_irq_locked [wlcore]) from [<bf2d59cc>] (wl1271_op_resume+0x254/0x2c8 [wlcore])
    [ 73.629774] r10:dc005014 r9:bf1f3660 r8:da92c420 r7:da92cd38 r6:00000000 r5:da92cd00
    [ 73.629783] r4:bf2efcc0
    [ 73.630313] [<bf2d5778>] (wl1271_op_resume [wlcore]) from [<bf26f10c>] (ieee80211_reconfig+0x31c/0xcf0 [mac80211])
    [ 73.630339] r9:bf1f3660 r8:da92c420 r7:00000000 r6:00000000 r5:00000000 r4:da92c420
    [ 73.630916] [<bf26edf0>] (ieee80211_reconfig [mac80211]) from [<bf25bce8>] (ieee80211_resume+0x60/0x70 [mac80211])
    [ 73.630942] r10:dc005014 r9:bf1f3660 r8:da92c258 r7:00000000 r6:00000000 r5:da92c258
    [ 73.630951] r4:da92c420
    [ 73.631499] [<bf25bc88>] (ieee80211_resume [mac80211]) from [<bf1f36b0>] (wiphy_resume+0x50/0x60 [cfg80211])
    [ 73.631665] r5:da92c258 r4:bf25bc88
    [ 73.631920] [<bf1f3660>] (wiphy_resume [cfg80211]) from [<c054e2f8>] (dpm_run_callback+0x40/0xe4)
    [ 73.631935] r5:da92c258 r4:c0d52dac
    [ 73.631962] [<c054e2b8>] (dpm_run_callback) from [<c054e964>] (device_resume+0xb0/0x278)
    [ 73.631987] r9:00000001 r8:da92c28c r7:00000000 r6:00000010 r5:da92c258 r4:00000001
    [ 73.632014] [<c054e8b4>] (device_resume) from [<c054eb50>] (async_resume+0x24/0x4c)
    [ 73.632039] r9:00000000 r8:dc005000 r7:dc004100 r6:d6a6cec0 r5:da92c258 r4:c0d89740
    [ 73.632069] [<c054eb2c>] (async_resume) from [<c0149120>] (async_run_entry_fn+0x4c/0x144)
    [ 73.632083] r5:c0d4fb20 r4:d6a6ced0
    [ 73.632110] [<c01490d4>] (async_run_entry_fn) from [<c013fc58>] (process_one_work+0x144/0x440)
    [ 73.632130] r7:dc004100 r6:00000000 r5:dc031280 r4:d6a6ced0
    [ 73.632153] [<c013fb14>] (process_one_work) from [<c013ffc0>] (worker_thread+0x6c/0x63c)
    [ 73.632179] r10:dc005014 r9:c0d16380 r8:00000088 r7:dc060000 r6:dc031298 r5:dc005000
    [ 73.632188] r4:dc031280
    [ 73.632216] [<c013ff54>] (worker_thread) from [<c0145e80>] (kthread+0x130/0x160)
    [ 73.632241] r10:dc04fe84 r9:dc030758 r8:dc031280 r7:dc060000 r6:dc030680 r5:00000000
    [ 73.632250] r4:dc030740
    [ 73.632279] [<c0145d50>] (kthread) from [<c0107da8>] (ret_from_fork+0x14/0x2c)
    [ 73.632303] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0145d50
    [ 73.632312] r4:dc030680
    [ 73.632324] ---[ end trace 888e7b374fbfa5b0 ]---
    [ 73.632461] wlcore: WARNING CONFIGURE command NOK
    [ 73.632473] wlcore: WARNING acx default rx filter enable failed: -5
    [ 73.632486] wlcore: WARNING CONFIGURE command NOK
    [ 73.632495] wlcore: WARNING could not set wake up conditions: -5
    [ 73.632504] wlcore: ERROR resume: wake up conditions failed: -5
    [ 73.632515] wlcore: WARNING CONFIGURE command NOK
    [ 73.632523] wlcore: WARNING acx interrupt notify setting failed: -5
    [ 73.632577] wlcore: Hardware recovery in progress. FW ver: Rev 8.9.0.0.76
    [ 73.632625] wlcore: down
    [ 73.660033] ieee80211 phy0: Hardware restart was requested
    [ 74.600997] OOM killer enabled.
    [ 74.604181] Restarting tasks ... done.
    [ 74.691777] PM: suspend exit
    root@am335x-evm:~# [ 74.785364] mmc0: Problem switching card into high-speed mode!
    [ 75.092596] wlcore: PHY firmware version: Rev 8.2.0.0.240
    [ 75.199254] wlcore: firmware booted (Rev 8.9.0.0.76)
    [ 75.245380] wlcore: Association completed.
    [ 145.847007] NET: Registered protocol family 15
    [ 146.140872] Initializing XFRM netlink socket
    [ 146.271401] NOHZ: local_softirq_pending 202
    [ 146.581412] NOHZ: local_softirq_pending 40
  • HI,
    Normally these LEDs are tied to enable IOs. - so I would assume WLAN LED is tied to WLAN_EN pin - although you need to check the schematics to confirm . Can you try disabling ELP mode and checking :

    iw wlan0 set power_save off
    echo 0 > /sys/kernel/debug/ieee80211/phy0/wlcore/sleep_auth

    Saurabh
  • I have executed two commands you mentioned and then put device to wowlan and sleep. Result is same issue.
  • Hi, any more hints I could try?
  • Petr,
    I believe you mentioned there is LED on board that is turned ON when WiFi is enabled. Is this LED ON when system goes to suspend mode ?

    Thanks
    Saurabh
  • Hi,

    during suspend to ram (echo mem) is turned off. During suspend to standby (echo standby) is turned on.
  • Hi , are you running echo mem for your testing ? Thanks
  • Hi , For your testing are you running echo mem ? Thanks
  • yes,

    echo mem > /sys/power/state
  • Petr,
    This is the reason why WiLink8 is crashing since WAN_EN gets de-asserted which shuts down WiLink8 WiFi ip

    Saurabh
  • Hi,

    that makes sense but how to keep it alive?

    I tried to change
    AM33XX_IOPAD(0x92c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gmii1_txclk.gpio3_9 WL_EN */
    to
    AM33XX_IOPAD(0x92c, PIN_OUTPUT_PULLUP | MUX_MODE7) /* gmii1_txclk.gpio3_9 WL_EN */
    but with no effect.
  • Hi,
    Pls check if GPIO tied to WLAN_EN is losing its state in suspend state .

    Thanks
    Saurabh
  • Hi,

    I assume it is losing its state. As was discussed above, this pin is not accessible but its directly connected to the LED. And if wowlan is activated and suspend (echo mem > /sys/power/state) is called I can see led going off.

    Therefore I suppose gpio pin with WLAN_EN is deasserted.
  • Hi,
    were you able to make progress on this and troubleshoot why WLAN_EN is getting de-asserted .

    Saurabh
  • Hi,
    no I am still waiting for resolution :-(
  • Petr,
    I believe there was follow up on this issue over emails. Let us know if you are able to get it working

    Thanks
    Saurabh
  • Hi,
    no success yet. It seems that beaglebone black wireless has HW limitations as far as I understood.

    Via email I was trying to solve little bit different issue of beaglebone black and stream unlimited wifi cape. But even here without success.
  • Hi Petr,
    It is imperative for WLAN_EN to hold its state in suspend state for WoWLAN to work. I will go ahead and close this thread since this issue seems to be h/w related . If needed, you may open a new thread for the other issue.

    Thanks
    Saurabh