When the CHAN_SWITCH command is executed during multi BSSID case (say
BSS1, BSS2, and BSS3), if one of the BSS is disabled (say BSS2), the
CHAN_SWITCH command returns an error in BSS2 and does not proceed to the
next BSS (BSS3).
The CHAN_SWITCH command handler iterates over all configured BSSs and
attempts to send the switch_channel to each one. However, if any one of
the BSSs fails, the entire command is aborted and returns a failure.
Continue the iteration even if one BSS is failing to make sure the
configuration is applied to other BSSs.
Signed-off-by: Haribabu Krishnasamy <quic_hkr@quicinc.com>
unsigned int i;
int bandwidth;
u8 chan;
+ unsigned int num_err = 0;
+ int err = 0;
ret = hostapd_parse_csa_settings(pos, &settings);
if (ret)
hostapd_chan_switch_config(iface->bss[i],
&settings.freq_params);
- ret = hostapd_switch_channel(iface->bss[i], &settings);
- if (ret) {
- /* FIX: What do we do if CSA fails in the middle of
- * submitting multi-BSS CSA requests? */
- return ret;
+ err = hostapd_switch_channel(iface->bss[i], &settings);
+ if (err) {
+ ret = err;
+ num_err++;
}
}
- return 0;
+ return (iface->num_bss == num_err) ? ret : 0;
#else /* NEED_AP_MLME */
return -1;
#endif /* NEED_AP_MLME */
struct csa_settings csa_settings;
u8 new_vht_oper_chwidth;
unsigned int i;
+ unsigned int num_err = 0;
wpa_printf(MSG_DEBUG, "DFS will switch to a new channel %d", channel);
wpa_msg(iface->bss[0]->msg_ctx, MSG_INFO, DFS_EVENT_NEW_CHANNEL
for (i = 0; i < iface->num_bss; i++) {
err = hostapd_switch_channel(iface->bss[i], &csa_settings);
if (err)
- break;
+ num_err++;
}
- if (err) {
+ if (num_err == iface->num_bss) {
wpa_printf(MSG_WARNING,
"DFS failed to schedule CSA (%d) - trying fallback",
err);