diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c index 10cb186f1..23cc52a28 100644 --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c @@ -2715,6 +2715,7 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface, settings.freq_params.center_freq1); /* Perform CAC and switch channel */ + iface->is_ch_switch_dfs = true; hostapd_switch_channel_fallback(iface, &settings.freq_params); return 0; } diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c index f8cb6432d..07bbf29de 100644 --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -2074,10 +2074,11 @@ static int setup_interface2(struct hostapd_iface *iface) } else { int ret; - if (iface->conf->acs) { + if (iface->conf->acs && !iface->is_ch_switch_dfs) { iface->freq = 0; iface->conf->channel = 0; } + iface->is_ch_switch_dfs = false; ret = configured_fixed_chan_to_freq(iface); if (ret < 0) @@ -3140,6 +3141,7 @@ struct hostapd_iface * hostapd_init(struct hapd_interfaces *interfaces, hostapd_bss_setup_multi_link(hapd, interfaces); } + hapd_iface->is_ch_switch_dfs = false; return hapd_iface; fail: diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h index 0c38bb53d..85f8975fa 100644 --- a/src/ap/hostapd.h +++ b/src/ap/hostapd.h @@ -705,6 +705,8 @@ struct hostapd_iface { /* Configured freq of interface is NO_IR */ bool is_no_ir; + + bool is_ch_switch_dfs; /* Channel switch from ACS to DFS */ }; /* hostapd.c */