]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
hostapd: fix dealing with required interface restart in AP+STA mode
authorFelix Fietkau <nbd@nbd.name>
Sun, 1 Feb 2026 19:17:27 +0000 (19:17 +0000)
committerFelix Fietkau <nbd@nbd.name>
Sun, 1 Feb 2026 19:21:38 +0000 (20:21 +0100)
Ensure that the BSS start_disabled option is always cleared, so that
interfaces come up properly.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/services/hostapd/src/src/ap/ucode.c

index 435174ca5102ace51d701f7c172b7a143010e3eb..3867a07218633e010d6e1b0666eafd2771dac443 100644 (file)
@@ -671,6 +671,9 @@ out:
        if (conf->channel && !iface->freq)
                iface->freq = hostapd_hw_get_freq(iface->bss[0], conf->channel);
 
+       for (i = 0; i < iface->num_bss; i++)
+               iface->bss[i]->conf->start_disabled = 0;
+
        if (iface->state != HAPD_IFACE_ENABLED) {
                hostapd_enable_iface(iface);
                return ucv_boolean_new(true);
@@ -680,7 +683,6 @@ out:
                struct hostapd_data *hapd = iface->bss[i];
                int ret;
 
-               hapd->conf->start_disabled = 0;
                hostapd_set_freq(hapd, conf->hw_mode, iface->freq,
                                 conf->channel,
                                 conf->enable_edmg,