[RFC PATCH] mac80211: use auto channel list by default

Hauke Mehrtens hauke at hauke-m.de
Sun May 2 23:23:46 BST 2021


This change removes setting the channels property by default to the
channel property if nothing else is specified.

When hostapd detects a DFS alarm and it has to switch channels allow
hostapd to switch to any channel in the frequency band if channels
property is not specified.
When we set channels to the same channel as the channel variable it will
not switch channel, the interface will be deactivated and hostapd writes
this error message:

Wed Feb 10 17:24:48 2021 daemon.notice hostapd: wlan1: DFS-NOP-FINISHED freq=5640 ht_enabled=0 chan_offset=0 chan_width=0 cf1=5640 cf2=0
Wed Feb 10 17:24:48 2021 daemon.notice hostapd: wlan1: interface state DFS->DFS
Wed Feb 10 17:24:48 2021 daemon.notice hostapd: wlan1: DFS-CAC-START freq=5580 chan=116 sec_chan=1, width=0, seg0=122, seg1=0, cac_time=60s
Wed Feb 10 17:24:48 2021 daemon.err hostapd: 20/40 MHz: center segment 0 (=122) and center freq 1 (=5590) not in sync
Wed Feb 10 17:24:48 2021 daemon.err hostapd: Can't set freq params
Wed Feb 10 17:24:48 2021 daemon.err hostapd: DFS start_dfs_cac() failed, -1

With this patch hostapd will switch to any other channel and continue
operating there when it received a DFS event. When the channels property
was set nothing changes.

Revert "mac80211: create channel list for fixed channel operation"

This reverts commit cfd2f3bf6f4825b66e9a4ca9cba7c65b93eb89c7.

Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 92c56afd24fd..d6be2ed76c36 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -111,9 +111,6 @@ mac80211_hostapd_setup_base() {
 	json_get_values ht_capab_list ht_capab tx_burst
 	json_get_values channel_list channels
 
-	[ "$auto_channel" = 0 ] && [ -z "$channel_list" ] && \
-		channel_list="$channel"
-
 	set_default noscan 0
 
 	[ "$noscan" -gt 0 ] && hostapd_noscan=1
-- 
2.30.2




More information about the openwrt-devel mailing list