DFS: Clear cac_started when AP is disabled

When AP is started on a DFS channel and DFS is offloaded to the driver,
AP setup will be separated to two stages. In the first stage, hostapd
will set frequency and initialize BSS, then waits the driver CAC to
complete. Once CAC done, in the second stage,
hostapd_setup_interface_complete() will be called again from a callback
to continue AP/channel setup.

But the driver will fail to restart AP if it is disabled/reenabled
during a driver CAC procedure because some steps such as setting
freq/beacon in the first stage are skipped due to cac_started not
cleared when the AP is disabled.

Avoid this by clearing cac_started when the AP is disabled.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Qiwei Cai 2022-12-14 14:56:14 +08:00 committed by Jouni Malinen
parent 3df42cf3c7
commit c46351d10e

View file

@ -559,6 +559,7 @@ void hostapd_cleanup_iface_partial(struct hostapd_iface *iface)
iface->current_rates = NULL;
os_free(iface->basic_rates);
iface->basic_rates = NULL;
iface->cac_started = 0;
ap_list_deinit(iface);
sta_track_deinit(iface);
airtime_policy_update_deinit(iface);