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/WL1837MOD: WL1837 5GHz DFS Radar Detection and Channel Switch for Japan DFS Compliance Testing

Part Number: WL1837MOD
Other Parts Discussed in Thread: WL1837, AM5728

Tool/software: Linux

We are in the midst of 5GHz compliance testing with our product. Specifically the Japan DFS Radar portion.

The product is built on the TI Arago Linux 4.4.41 Kernel, using the TI AM5728 SoC and TI WL1837 Wilink Radio.

I have thoroughly read TI's wiki for DFS Testing found here:

http://processors.wiki.ti.com/index.php/WiLink8_Feature_Guide/AP_DFS_Master

The problem we are facing seems to be that the radio acknowledges a Radar pulse on the same channel on which it is currently operating and commands a switch ( as it should ), however, the compliance lab claims that it never actually changes channel.

When the radar event occurs, and Linux claims that the channel switch has happened, I used the Linux "iw dev wlan1 info" command to read back the channel that the radio thinks it is in. It returns the new channel that it claimed to switch to due to the radar pulse detection.

So, it seems the driver and Linux think that the channel has been switched appropriately, but the physical radio has not switched channels.

I noticed in the Linux journal only one potential issue "nl80211: Drv Event 110 (NL80211_CMD_UNKNOWN) received for wlan1":

 DFS will switch to a new channel 38
 wlan1: DFS-NEW-CHANNEL freq=5190 chan=38 sec_chan=0
 nl80211: Channel switch request (cs_count=5 block_tx=1 freq=5190 width=20 cf1=5190 cf2=0)
   * freq=5190
   * vht_enabled=0
   * ht_enabled=0
 DFS waiting channel switch event
 nl80211: Event message available
 nl80211: Drv Event 110 (NL80211_CMD_UNKNOWN) received for wlan1
 wlan1: nl80211: Ignored unknown event (cmd=110)
 nl80211: Event message available
 nl80211: Drv Event 88 (NL80211_CMD_CH_SWITCH_NOTIFY) received for wlan1
 nl80211: Channel switch event
 nl80211: Channel type: 0
 wlan1: Event CH_SWITCH (39) received
 wlan1: IEEE 802.11 driver had channel switch: freq=5190, ht=0, offset=0, width=0 (20 MHz (no HT)), cf1=5190, cf2=0
 nl80211: Set beacon (beacon_set=1)

How can I determine what is wrong and how to fix it? Thank you very much for the support.

More information:

I initiate a channel switch by introducing a radar pulse on the current channel with the following command:

echo 136 > /sys/kernel/debug/ieee80211/phy0/wlcore/wl18xx/radar_detection

I lowered the backoff time with the following command when the board boots:

modprobe cfg80211 ieee80211_regdom=JP dfs_nop_time_ms=60000 dfs_cac_time_ms=10000

Normal course of events:

nl80211: beacon_ies - hexdump(len=10): 7f 08 04 00 00 00 00 00 00 40
nl80211: proberesp_ies - hexdump(len=10): 7f 08 04 00 00 00 00 00 00 40
nl80211: assocresp_ies - hexdump(len=10): 7f 08 04 00 00 00 00 00 00 40
Jun 17 04:40:48 flk-ti-am57xx hostapd[2011]: wlan1: IEEE 802.11 driver had channel switch: freq=5190, ht=0, offset=0, width=0 (20 MHz (no HT)), cf1=5190, cf2=0
wlan1: AP-CSA-FINISHED freq=5190 dfs=0
...
nl80211: Event message available
nl80211: Drv Event 94 (NL80211_CMD_RADAR_DETECT) received for wlan1
nl80211: DFS event on freq 5680 MHz, ht: 0, offset: 0, width: 0, cf1: 5680MHz, cf2: 0MHz
wlan1: Event DFS_NOP_FINISHED (45) received
DFS NOP finished on 5680 MHz
wlan1: DFS-NOP-FINISHED freq=5680 ht_enabled=0 chan_offset=0 chan_width=0 cf1=5680 cf2=0
DFS freq: 5680MHz, n_chans: 1
set_dfs_state 0x100 for 5680 MHz

Reading back channel after switch complete:

root@device:/usr/bin# iw dev wlan1 info
Interface wlan1
    ifindex 13
    wdev 0x2
    addr 3c:a3:08:a8:9f:44
    ssid DefaultHotSpot
    type AP
    wiphy 0
    channel 8 (5040 MHz), width: 20 MHz (no HT), center1: 5040 MHz

Total Log:

-- Logs begin at Sun 2018-06-17 04:36:42 UTC. --
 DFS freq: 5680MHz, n_chans: 1
 set_dfs_state 0x200 for 5680 MHz
 checking our: 136, radar: 136
 overlapped: 1
 hostapd_dfs_start_channel_switch called (CAC active: no, CSA active: no)
 DFS: Selecting random channel
 DFS new chan checking 1 channels
 Adding channel: 8
 Adding channel: 12
 Adding channel: 16
 Adding channel: 36
 Adding channel: 38
 Adding channel: 40
 Adding channel: 42
 Adding channel: 44
 Adding channel: 46
 Adding channel: 48
 DFS new chan checking 1 channels
 Adding channel: 8
 Adding channel: 12
 Adding channel: 16
 Adding channel: 36
 Selected ch. #38
 DFS will switch to a new channel 38
 wlan1: DFS-NEW-CHANNEL freq=5190 chan=38 sec_chan=0
 nl80211: Channel switch request (cs_count=5 block_tx=1 freq=5190 width=20 cf1=5190 cf2=0)
   * freq=5190
   * vht_enabled=0
   * ht_enabled=0
 DFS waiting channel switch event
 nl80211: Event message available
 nl80211: Drv Event 110 (NL80211_CMD_UNKNOWN) received for wlan1
 wlan1: nl80211: Ignored unknown event (cmd=110)
 nl80211: Event message available
 nl80211: Drv Event 88 (NL80211_CMD_CH_SWITCH_NOTIFY) received for wlan1
 nl80211: Channel switch event
 nl80211: Channel type: 0
 wlan1: Event CH_SWITCH (39) received
 wlan1: IEEE 802.11 driver had channel switch: freq=5190, ht=0, offset=0, width=0 (20 MHz (no HT)), cf1=5190, cf2=0
 nl80211: Set beacon (beacon_set=1)
 nl80211: Beacon head - hexdump(len=76): 80 00 00 00 ff ff ff ff ff ff 3c a3 08 a8 9f 44 3c a3 08 a8 9f 44 00 00 00 00 00 00 00 00 00 00 64 00 11 00 00 19 46 6c 75 6b 65 43 72 65 65 64 2d 44 65 66 61 75 6c 74 48 6f 74 53 70 6f 74 01 08 8c 12 98 24 b0 48 60 6c 03 01 26
 nl80211: Beacon tail - hexdump(len=118): 07 1e 4a 50 20 08 03 17 24 01 14 26 01 14 28 01 14 2a 01 14 2c 01 14 2e 01 14 30 05 14 64 0b 17 30 14 01 00 00 0f ac 02 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00 dd 1a 00 50 f2 01 01 00 00 50 f2 02 02 00 00 50 f2 04 00 50 f2 02 01 00 00 50 f2 02 7f 08 04 00 00 00 00 00 00 40 dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
 nl80211: ifindex=7
 nl80211: beacon_int=100
 nl80211: dtim_period=2
 nl80211: ssid - hexdump_ascii(len=25):
      65 65 64 2d 44 65 66 61 75   DefaultHotSpot
   * beacon_int=100
 nl80211: proberesp (offload) - hexdump(len=194): 50 00 00 00 00 00 00 00 00 00 3c a3 08 a8 9f 44 3c a3 08 a8 9f 44 00 00 00 00 00 00 00 00 00 00 64 00 11 00 00 19 46 6c 75 6b 65 43 72 65 65 64 2d 44 65 66 61 75 6c 74 48 6f 74 53 70 6f 74 01 08 8c 12 98 24 b0 48 60 6c 03 01 26 07 1e 4a 50 20 08 03 17 24 01 14 26 01 14 28 01 14 2a 01 14 2c 01 14 2e 01 14 30 05 14 64 0b 17 30 14 01 00 00 0f ac 02 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00 dd 1a 00 50 f2 01 01 00 00 50 f2 02 02 00 00 50 f2 04 00 50 f2 02 01 00 00 50 f2 02 7f 08 04 00 00 00 00 00 00 40 dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
 nl80211: hidden SSID not in use
 nl80211: privacy=1
 nl80211: auth_algs=0x1
 nl80211: wpa_version=0x3
 nl80211: key_mgmt_suites=0x2
 nl80211: pairwise_ciphers=0x18
 nl80211: group_cipher=0x8
 nl80211: SMPS mode - off
 nl80211: beacon_ies - hexdump(len=10): 7f 08 04 00 00 00 00 00 00 40
 nl80211: proberesp_ies - hexdump(len=10): 7f 08 04 00 00 00 00 00 00 40
 nl80211: assocresp_ies - hexdump(len=10): 7f 08 04 00 00 00 00 00 00 40
Jun 17 04:40:48 device hostapd[2011]: wlan1: IEEE 802.11 driver had channel switch: freq=5190, ht=0, offset=0, width=0 (20 MHz (no HT)), cf1=5190, cf2=0
 wlan1: AP-CSA-FINISHED freq=5190 dfs=0

Thanks for the support.

  • Hi,

    What is the wilink firmware version that you are using?
    Can you make sure you are on the latest one?

    git.ti.com/.../master

    It should be:
    FW 8.9.0.0.78 or at least FW 8.9.0.0.76

    Best Regards,
    Eyal
  • Hi,

    Linux is reporting:
    [ 4294.937766] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
    [ 4297.230614] wlcore: PHY firmware version: Rev 8.2.0.0.237
    [ 4297.426972] wlcore: firmware booted (Rev 8.9.0.0.70)

    Seems possibly too old?

    I will try the new one - thanks,

    Phil
  • Hi,

    I just tested with the following firmware version:

    It behaved differently with a kernel backtrace immediately triggered when the radar pulse was tested on the command line - is this normal? Thanks:

    Jul 10 09:47:47 test[939]: Selected ch. #48
    Jul 10 09:47:47 test[939]: DFS will switch to a new channel 48
    Jul 10 09:47:47 test[939]: wlan1: DFS-NEW-CHANNEL freq=5240 chan=48 sec_chan=0
    Jul 10 09:47:47 test[939]: nl80211: Channel switch request (cs_count=5 block_tx=1 freq=5240 width=20 cf1=5240 cf2=0)
    Jul 10 09:47:47 test[939]:   * freq=5240
    Jul 10 09:47:47 test[939]:   * vht_enabled=0
    Jul 10 09:47:47 test[939]:   * ht_enabled=0
    Jul 10 09:47:47 test[939]: DFS waiting channel switch event
    Jul 10 09:47:47 test[939]: nl80211: Event message available
    Jul 10 09:47:47 test[939]: nl80211: Drv Event 110 (NL80211_CMD_UNKNOWN) received for wlan1
    Jul 10 09:47:47 test[939]: wlan1: nl80211: Ignored unknown event (cmd=110)
    Jul 10 09:47:47 kernel: wlcore: ERROR SW watchdog interrupt received! starting recovery.
    Jul 10 09:47:47 kernel: ------------[ cut here ]------------
    Jul 10 09:47:47 kernel: WARNING: CPU: 0 PID: 1420 at /home/test/am57xx/build/tmp-external-linaro-toolchain/work-shared/am57xx-phycore-rdk/kernel-source/drivers/net/wireless/ti/wlcore/main.c:813 wl12xx_queue_recovery_work.part.8+0x60/0x64 [wlcore]()
    Jul 10 09:47:47 kernel: Modules linked in: wl18xx wlcore mac80211 cfg80211 cmac arc4 hci_uart bluetooth rpmsg_rpc virtio_rpmsg_bus omapdrm drm_kms_helper drm syscopyarea sysfillrect sysimgblt fb_sys_fops encoder_tpd12s015 connector_hdmi panel_dpi omapdss omapdss_base pruss omap_wdt ti_vpe ti_vip ti_sc ti_csc ti_vpdma videobuf2_dma_contig v4l2_mem2mem videobuf2_memops videobuf2_v4l2 videobuf2_core rtc_omap test_ti_mt9p031 aptina_pll test_mir_hp v4l2_common videodev pwm_tiehrpwm wlcore_sdio rtc_palmas spi_omap2_mcspi media omap_remoteproc remoteproc virtio virtio_ring uio_pdrv_genirq uio cryptodev(O) autofs4 rtc_m41t80 [last unloaded: cfg80211]
    Jul 10 09:47:47 kernel: CPU: 0 PID: 1420 Comm: irq/154-wl18xx Tainted: G           O    4.4.41 #1
    Jul 10 09:47:47 kernel: Hardware name: Generic DRA74X (Flattened Device Tree)
    Jul 10 09:47:47 kernel: Backtrace: 
    Jul 10 09:47:47 kernel: [<c00130e4>] (dump_backtrace) from [<c00132e0>] (show_stack+0x18/0x1c)
    Jul 10 09:47:47 kernel:  r7:bf5bffdc r6:60000013 r5:00000000 r4:c0740db4
    Jul 10 09:47:47 kernel: [<c00132c8>] (show_stack) from [<c027b8cc>] (dump_stack+0x8c/0xa0)
    Jul 10 09:47:47 kernel: [<c027b840>] (dump_stack) from [<c0032990>] (warn_slowpath_common+0x88/0xb8)
    Jul 10 09:47:47 kernel:  r7:bf5bffdc r6:0000032d r5:00000009 r4:00000000
    Jul 10 09:47:47 kernel: [<c0032908>] (warn_slowpath_common) from [<c0032a64>] (warn_slowpath_null+0x24/0x2c)
    Jul 10 09:47:47 kernel:  r8:ed0feee0 r7:ed0fed3c r6:ed0fed54 r5:ed0fed24 r4:ed0fed00
    Jul 10 09:47:47 kernel: [<c0032a40>] (warn_slowpath_null) from [<bf5bffdc>] (wl12xx_queue_recovery_work.part.8+0x60/0x64 [wlcore])
    Jul 10 09:47:47 kernel: [<bf5bff7c>] (wl12xx_queue_recovery_work.part.8 [wlcore]) from [<bf5c0274>] (wlcore_irq+0x16c/0x170 [wlcore])
    Jul 10 09:47:47 kernel:  r5:ed0fed24 r4:ed0fed00
    Jul 10 09:47:47 kernel: [<bf5c0108>] (wlcore_irq [wlcore]) from [<c007f160>] (irq_thread_fn+0x24/0x5c)
    Jul 10 09:47:47 kernel:  r9:d3d0cb80 r8:eea4b000 r7:00000001 r6:00000000 r5:eea4b000 r4:d3d0cb80
    Jul 10 09:47:47 kernel: [<c007f13c>] (irq_thread_fn) from [<c007f468>] (irq_thread+0x140/0x1f8)
    Jul 10 09:47:47 kernel:  r7:00000001 r6:00000000 r5:d3d0cba4 r4:d3e5e000
    Jul 10 09:47:47 kernel: [<c007f328>] (irq_thread) from [<c004da50>] (kthread+0xe4/0xfc)
    Jul 10 09:47:47 kernel:  r10:00000000 r9:00000000 r8:00000000 r7:c007f328 r6:d3d0cb80 r5:d3d0cbc0
    Jul 10 09:47:47 kernel:  r4:00000000
    Jul 10 09:47:47 kernel: [<c004d96c>] (kthread) from [<c000fac8>] (ret_from_fork+0x14/0x2c)
    Jul 10 09:47:47 kernel:  r7:00000000 r6:00000000 r5:c004d96c r4:d3d0cbc0
    Jul 10 09:47:47 kernel: ---[ end trace 47d2c9d13e4fcf1b ]---
    Jul 10 09:47:47 kernel: wlcore: Hardware recovery in progress. FW ver: Rev 8.9.0.0.78
    Jul 10 09:47:47 kernel: wlcore: pc: 0x12678, hint_sts: 0x00000000 count: 1
    Jul 10 09:47:47 kernel: wlcore: down
    Jul 10 09:47:47 kernel: ieee80211 phy0: Hardware restart was requested
    Jul 10 09:47:47 kernel: wlcore: PHY firmware version: Rev 8.2.0.0.242
    Jul 10 09:47:47 kernel: wlcore: firmware booted (Rev 8.9.0.0.78)

  • Hi,

    Seems like the problem is that you are not using the latest drivers as well.

    Your product is based on a 4.4.41 linux kernel, right?

    What you would need to do is update all components (driver, hostap) as well.

    For this you would need to use our build script for building the latest drivers, from our latest R8.7_SP3 release with your kernel as you need updated mac80211 and driver modules as well as make sure that you have a recent wpa_supplicant/hostap packages.

    Please refer to the following wiki for updating:

    Best Regards,

    Eyal

  • Actually, before you start updating everything.
    We don’t support channel 38. I wonder why it was chosen as a candidate for switch….

    Best Regards,
    Eyal
  • Hi,

    Any update on this one?
    Should we still keep it open?

    BR,
    eyal
  • Updating the Firmware Resolved this issue. Thank you for the support.