if (iface->cac_started) {
wpa_printf(MSG_DEBUG,
"CAC is in progress - switching channel without CSA");
- return hostapd_force_channel_switch(iface, settings);
+ return hostapd_force_channel_switch(iface, &settings);
}
for (i = 0; i < iface->num_bss; i++) {
int hostapd_force_channel_switch(struct hostapd_iface *iface,
- struct csa_settings settings)
+ struct csa_settings *settings)
{
int ret = 0;
- if (!settings.freq_params.channel) {
+ if (!settings->freq_params.channel) {
/* Check if the new channel is supported */
- settings.freq_params.channel = hostapd_hw_get_channel(
- iface->bss[0], settings.freq_params.freq);
- if (!settings.freq_params.channel)
+ settings->freq_params.channel = hostapd_hw_get_channel(
+ iface->bss[0], settings->freq_params.freq);
+ if (!settings->freq_params.channel)
return -1;
}
return ret;
}
- hostapd_chan_switch_config(iface->bss[0], &settings.freq_params);
+ hostapd_chan_switch_config(iface->bss[0], &settings->freq_params);
ret = hostapd_change_config_freq(iface->bss[0], iface->conf,
- &settings.freq_params, NULL);
+ &settings->freq_params, NULL);
if (ret) {
wpa_printf(MSG_DEBUG,
"Failed to set the new channel in config");
int hostapd_switch_channel(struct hostapd_data *hapd,
struct csa_settings *settings);
int hostapd_force_channel_switch(struct hostapd_iface *iface,
- struct csa_settings settings);
+ struct csa_settings *settings);
void
hostapd_switch_channel_fallback(struct hostapd_iface *iface,
const struct hostapd_freq_params *freq_params);