AP: Fix 6 GHz AP setup after disable-enable

Once ACS picks a channel, iface->freq and iface->conf->channel are
updated. So, AP comes up in the last operating channel when 'ENABLED'
after 'DISABLED' though ACS is configured.

But this will fail for 6 GHz APs since configured_fixed_chan_to_freq()
checks if iface->conf->channel is filled or not irrespective of ACS
configuration, and the checks inside configured_fixed_chan_to_freq()
fail the AP setup. Fix this by clearing iface->freq and
iface->conf->channel in AP setup for ACS configuration.

Fixes: bb781c763f ("AP: Populate iface->freq before starting AP")
Signed-off-by: Pooventhiran G <quic_pooventh@quicinc.com>
This commit is contained in:
Pooventhiran G 2023-02-23 22:13:50 +05:30 committed by Jouni Malinen
parent a34b8477a7
commit 4e86692ff1

View file

@ -1784,6 +1784,11 @@ static int setup_interface2(struct hostapd_iface *iface)
} else {
int ret;
if (iface->conf->acs) {
iface->freq = 0;
iface->conf->channel = 0;
}
ret = configured_fixed_chan_to_freq(iface);
if (ret < 0)
goto fail;