I've got a Linksys WRT32X running OpenWRT 19.07.2. It's a UK model and according to Linksys is capable of up to channel 140 at 160 Hz width. I'm located in Belgium, but I believe the legal frequency channels still follow the same legislation. However, when I try to change to any channel higher than 48 the WiFi adapter gets disabled.
Here's a snippet of what I think are the relevant logs:
Sun Apr 19 11:36:31 2020 daemon.notice hostapd: wlan0: interface state HT_SCAN->DFS
Sun Apr 19 11:36:31 2020 daemon.notice hostapd: wlan0: DFS-CAC-START freq=5660 chan=132 sec_chan=1, width=0, seg0=134, seg1=0, cac_time=60s
Sun Apr 19 11:36:31 2020 daemon.err hostapd: DFS start_dfs_cac() failed, -1
Sun Apr 19 11:36:31 2020 daemon.err hostapd: Interface initialization failed
Sun Apr 19 11:36:31 2020 daemon.notice hostapd: wlan0: interface state DFS->DISABLED
Sun Apr 19 11:36:31 2020 daemon.notice hostapd: wlan0: AP-DISABLED
Sun Apr 19 11:36:31 2020 daemon.notice hostapd: wlan0: interface state DISABLED->DISABLED
Sun Apr 19 11:36:31 2020 daemon.notice hostapd: wlan0: AP-DISABLED
Sun Apr 19 11:36:31 2020 daemon.notice hostapd: wlan0: CTRL-EVENT-TERMINATING
Sun Apr 19 11:36:31 2020 daemon.err hostapd: hostapd_free_hapd_data: Interface wlan0 wasn't started
Sun Apr 19 11:36:31 2020 daemon.notice hostapd: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
I'm not sure what this exactly means. Is DFS something I need to enable manually? Or is there something wrong with my hardware?
I found this older thread that seems to be the same issue but there wasn't any resolution.
DFS is said to be one of the weak points of mwlwifi, which probably won't get fixed anymore. Yes, it works on paper, but the DFS algorithms are way too sensitive and flag unrelated noise as DFS events - and off you are (apparently it also doesn't recover too gracefully).
I found this github discussion talking about issues with the mwlwifi driver. It's way beyond my current understanding as a curious novice user.
It looks like various people have implemented fixes for this driver, but that these fixes have not (and likely will not) been merged into the master branch.
And if I understand correctly the OEM mwlwifi driver for WRT32X-UK works with the DFS channels.
Is it possible for me to somehow use the original OEM driver with OpenWRT or even to install one of these drivers discussed in the github page without building my own package?
the DFS algorithms (on mwlwifi) are way too sensitive and flag unrelated noise as DFS events
Let's not guess, let's ask the OP for the system log (show all the lines about hostapd and +/- 1 minute near them). It would clearly show all DFS events. E.g. on my TP-Link Archer C7 v2 (with ath10k), it looks like this:
Sun Apr 19 13:34:43 2020 daemon.err hostapd: Configuration file: /var/run/hostapd-phy0.conf
Sun Apr 19 13:34:45 2020 kern.warn kernel: [1543051.510204] ath10k_pci 0000:00:00.0: 10.1 wmi init: vdevs: 16 peers: 127 tid: 256
Sun Apr 19 13:34:45 2020 kern.info kernel: [1543051.527845] ath10k_pci 0000:00:00.0: wmi print 'P 128 V 8 T 410'
Sun Apr 19 13:34:45 2020 kern.info kernel: [1543051.534163] ath10k_pci 0000:00:00.0: wmi print 'msdu-desc: 1424 sw-crypt: 0 ct-sta: 0'
Sun Apr 19 13:34:45 2020 kern.info kernel: [1543051.542507] ath10k_pci 0000:00:00.0: wmi print 'alloc rem: 20920 iram: 26344'
Sun Apr 19 13:34:45 2020 kern.warn kernel: [1543051.611219] ath10k_pci 0000:00:00.0: pdev param 0 not supported by firmware
Sun Apr 19 13:34:45 2020 kern.info kernel: [1543051.626790] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Sun Apr 19 13:34:45 2020 kern.info kernel: [1543051.660735] br-lan: port 2(wlan0) entered blocking state
Sun Apr 19 13:34:45 2020 kern.info kernel: [1543051.666383] br-lan: port 2(wlan0) entered disabled state
Sun Apr 19 13:34:45 2020 kern.info kernel: [1543051.672204] device wlan0 entered promiscuous mode
Sun Apr 19 13:34:45 2020 daemon.notice hostapd: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Sun Apr 19 13:34:45 2020 daemon.notice hostapd: wlan0: interface state COUNTRY_UPDATE->HT_SCAN
Sun Apr 19 13:34:46 2020 daemon.notice hostapd: wlan0: interface state HT_SCAN->DFS
Sun Apr 19 13:34:46 2020 daemon.notice hostapd: wlan0: DFS-CAC-START freq=5280 chan=56 sec_chan=-1, width=1, seg0=58, seg1=0, cac_time=60s
Sun Apr 19 13:35:47 2020 daemon.notice hostapd: wlan0: DFS-CAC-COMPLETED success=1 freq=5280 ht_enabled=0 chan_offset=0 chan_width=3 cf1=5290 cf2=0
Sun Apr 19 13:35:47 2020 daemon.err hostapd: Using interface wlan0 with hwaddr e8:de:27:f6:28:d5 and ssid "t503"
Sun Apr 19 13:35:47 2020 kern.info kernel: [1543113.255855] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Sun Apr 19 13:35:47 2020 kern.info kernel: [1543113.262756] br-lan: port 2(wlan0) entered blocking state
Sun Apr 19 13:35:47 2020 kern.info kernel: [1543113.268372] br-lan: port 2(wlan0) entered forwarding state
Sun Apr 19 13:35:47 2020 daemon.notice hostapd: wlan0: interface state DFS->ENABLED
Sun Apr 19 13:35:47 2020 daemon.notice hostapd: wlan0: AP-ENABLED
Sun Apr 19 13:35:47 2020 daemon.notice netifd: Network device 'wlan0' link is up
Oh, and I forgot: DFS is incompatible with the "Allow legacy 802.11b rates" advanced setting which is on by default.
Reboot the router with the current (non-working) settings in effect, except channel (set it to 56) and bandwidth (set it to 80 MHz). If it still says "DFS start_dfs_cac() failed, -1", well, nothing can be done.