static int hostapd_ctrl_iface_disable_mld(struct hostapd_iface *iface)
{
unsigned int i;
- struct hostapd_iface *first_iface = NULL;
if (!iface || !iface->bss[0]->conf->mld_ap) {
wpa_printf(MSG_ERROR,
if (!hostapd_is_ml_partner(h_hapd, iface->bss[0]))
continue;
- if (hostapd_mld_is_first_bss(h_hapd)) {
- first_iface = h_iface;
- continue;
- }
hostapd_disable_iface_bss(iface);
}
- if (first_iface)
- hostapd_disable_iface_bss(first_iface);
-
/* Then, fully disable interfaces */
-
for (i = 0; i < iface->interfaces->count; ++i) {
struct hostapd_iface *h_iface = iface->interfaces->iface[i];
struct hostapd_data *h_hapd = h_iface->bss[0];
- if (!hostapd_is_ml_partner(h_hapd, iface->bss[0]) ||
- hostapd_mld_is_first_bss(h_hapd))
+ if (!hostapd_is_ml_partner(h_hapd, iface->bss[0]))
continue;
if (hostapd_disable_iface(h_iface)) {
}
}
- if (first_iface && hostapd_disable_iface(first_iface)) {
- wpa_printf(MSG_ERROR, "Disabling AP MLD failed");
- return -1;
- }
-
return 0;
}
return -1;
}
-#ifdef CONFIG_IEEE80211BE
- if (hapd_iface->bss[0]->conf->mld_ap &&
- hostapd_mld_is_first_bss((hapd_iface->bss[0]))) {
- /* Do not allow mld_first_bss disabling before other BSSs */
- for (j = 0; j < hapd_iface->interfaces->count; ++j) {
- struct hostapd_iface *h_iface =
- hapd_iface->interfaces->iface[j];
- struct hostapd_data *h_hapd = h_iface->bss[0];
-
- if (!hostapd_is_ml_partner(h_hapd,
- hapd_iface->bss[0]) ||
- h_iface == hapd_iface)
- continue;
-
- if (h_iface->state != HAPD_IFACE_DISABLED) {
- wpa_printf(MSG_INFO,
- "Do not allow disable mld_first_bss first");
- return -1;
- }
- }
- }
-#endif /* CONFIG_IEEE80211BE */
-
wpa_msg(hapd_iface->bss[0]->msg_ctx, MSG_INFO, AP_EVENT_DISABLED);
driver = hapd_iface->bss[0]->driver;
drv_priv = hapd_iface->bss[0]->drv_priv;