On my device setting channel to auto sets channel=acs_survey in the generated hostapd-phyX.conf.
https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf
# If CONFIG_ACS build option is enabled, the channel can be selected
# automatically at run time by setting channel=acs_survey or channel=0, both of
# which will enable the ACS survey based algorithm.
You can verify the ACS algorithm in the log output from hostapd.
logread | grep hostapd | grep ACS
daemon.notice hostapd: ACS: Automatic channel selection started, this may take a bit
daemon.notice hostapd: wlan0: interface state COUNTRY_UPDATE->ACS
daemon.notice hostapd: wlan0: ACS-STARTED
daemon.notice hostapd: ACS: Automatic channel selection started, this may take a bit
daemon.notice hostapd: wlan1: interface state COUNTRY_UPDATE->ACS
daemon.notice hostapd: wlan1: ACS-STARTED
daemon.notice hostapd: wlan1: ACS-COMPLETED freq=2437 channel=6
daemon.notice hostapd: wlan1: interface state ACS->ENABLED
daemon.notice hostapd: wlan0: ACS-COMPLETED freq=5260 channel=52
daemon.notice hostapd: wlan0: interface state ACS->HT_SCAN
There are also other options supported, like:
acs_chan_bias, acs_exclude_dfs, chanlist
# acs_chan_bias is a space-separated list of <channel>:<bias> pairs. It can be
# used to increase (or decrease) the likelihood of a specific channel to be
# selected by the ACS algorithm. The total interference factor for each channel
# gets multiplied by the specified bias value before finding the channel with
# the lowest value. In other words, values between 0.0 and 1.0 can be used to
# make a channel more likely to be picked while values larger than 1.0 make the
# specified channel less likely to be picked. This can be used, e.g., to prefer
# the commonly used 2.4 GHz band channels 1, 6, and 11 (which is the default
# behavior on 2.4 GHz band if no acs_chan_bias parameter is specified).
#
# Defaults:
#acs_num_scans=5
#acs_chan_bias=1:0.8 6:0.8 11:0.8
But actually, I don't understand this option.
The total interference factor for each channel gets multiplied by the specified bias value. The total interference factor for each channel gets multiplied by the specified bias value before finding the channel with the lowest value
So it would make more sense if the bias value would be negative.
# Exclude DFS channels from ACS
# This option can be used to exclude all DFS channels from the ACS channel list
# in cases where the driver supports DFS channels.
#acs_exclude_dfs=1
# Channel list restriction. This option allows hostapd to select one of the
# provided channels when a channel should be automatically selected.
# Channel list can be provided as range using hyphen ('-') or individual
# channels can be specified by space (' ') separated values
# Default: all channels allowed in selected hw_mode
#chanlist=100 104 108 112 116
#chanlist=1 6 11-13
chanlist = channels in openwrt wifi config.
acs_exclude_dfs doesn't work on my device because the driver doesn't report DFS channels (correctly), I guess.
And chanlist/channels work better for me than acs_chan_bias.
option channels '1 6 11'
vs
option acs_chan_bias '1:0.8 6:0.8 11:0.8'
If your surrounding WiFis use a 4 Channel plan, like 1-5-9-13
It's better to use:
option channels '1 5 9 13'
or
option acs_chan_bias '1:0.8 5:0.8 9:0.8 13:0.8',
I guess.
I think, its also better to use chanlist/channels because acs_chan_bias allows hostapd to choose channels other channels then 1,6,11/1,5,9,13.
So maybe your wifi radio ends up using channel 3, which will cause (side-channel) interference for channels 1-6.
See this graphic here from cisco (3 channels plan):
4 Channels plan:
But most likely you will end up using the 3 channels plan because most devices are defaulting to it, even in Europe.
If you are setting up a wifi on large area where no other rogue WiFis are around you can of course deploy a 4 channels plan.