The acs_exclude_dfs parameter is documented as a way to exclude DFS channels when performing ACS without disabling DFS altogether. The problem is this parameter is only enforced when ACS is offloaded to the driver (WPA_DRIVER_FLAGS_ACS_OFFLOAD). So from now on, lets also check acs_exclude_dfs in our ACS implementation to exclude channels marked with radar detection. Signed-off-by: Nicolas Escande <nico.escande@xxxxxxxxx> --- src/ap/acs.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ap/acs.c b/src/ap/acs.c index ef665052c..e2ac1d0d3 100644 --- a/src/ap/acs.c +++ b/src/ap/acs.c @@ -541,6 +541,10 @@ static void acs_survey_mode_interference_factor( if (!acs_usable_chan(chan)) continue; + if ((chan->flag & HOSTAPD_CHAN_RADAR) && + iface->conf->acs_exclude_dfs) + continue; + if (!is_in_chanlist(iface, chan)) continue; @@ -671,6 +675,10 @@ acs_find_ideal_chan_mode(struct hostapd_iface *iface, if (!chan_pri_allowed(chan)) continue; + if ((chan->flag & HOSTAPD_CHAN_RADAR) && + iface->conf->acs_exclude_dfs) + continue; + if (!is_in_chanlist(iface, chan)) continue; @@ -1045,7 +1053,9 @@ static int * acs_request_scan_add_freqs(struct hostapd_iface *iface, for (i = 0; i < mode->num_channels; i++) { chan = &mode->channels[i]; - if (chan->flag & HOSTAPD_CHAN_DISABLED) + if (chan->flag & HOSTAPD_CHAN_DISABLED || + ((chan->flag & HOSTAPD_CHAN_RADAR) && + iface->conf->acs_exclude_dfs)) continue; if (!is_in_chanlist(iface, chan)) -- 2.35.1 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap