--- a/src/ap/ubus.c +++ b/src/ap/ubus.c @@ -762,6 +762,7 @@ hostapd_switch_chan(struct ubus_context struct blob_attr *tb[__CSA_MAX]; struct hostapd_data *hapd = get_hapd_from_object(obj); struct csa_settings css; + int i; blobmsg_parse(csa_policy, __CSA_MAX, tb, blob_data(msg), blob_len(msg)); @@ -787,8 +788,10 @@ hostapd_switch_chan(struct ubus_context SET_CSA_SETTING(CSA_BLOCK_TX, block_tx, bool); - if (hostapd_switch_channel(hapd, &css) != 0) - return UBUS_STATUS_NOT_SUPPORTED; + for (i = 0; i < hapd->iface->num_bss; i++) { + if (hostapd_switch_channel(hapd->iface->bss[i], &css) != 0) + return UBUS_STATUS_NOT_SUPPORTED; + } hostapd_ubus_handle_channel_switch_event(hapd->iface,HOSTAPD_UBUS_HIGH_INTERFERENCE, css.freq_params.freq);