[RFC PATCH] mac80211: use auto channel list by default
David Bauer
mail at david-bauer.net
Mon May 3 00:14:52 BST 2021
Hi Hauke,
On 5/3/21 12:23 AM, Hauke Mehrtens wrote:
> 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.
This was exactly the behavior I've tried to fix. My expectation when
configuring a specific channel would be, that the radio does not switch to
an arbitrary channel when it is forced to do DFS. Especially as DFS channels
are required to be used when the AP is used Outdoors (At least in Germany /
ETSI).
When dynamic channel usage is desired, I'd expect the user to provide a chanlist
or use the "auto" channel.
Maybe this is something which is is flexible in how it can be interpreted, so I'm
open to find an alternative solution for that. ;)
> 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
Can you share your radio settings? I've tested this back when the patch was applied
and the radio reappeared after the NOP period.
Best
David
>
> 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
>
More information about the openwrt-devel
mailing list