summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau2025-09-28 18:55:57 +0000
committerFelix Fietkau2025-09-29 10:37:02 +0000
commit80d73707b04a46e109b27907c8997068f94e26f4 (patch)
treed8755bf4e8132b9fc91da177733ffbb27bada788
parenta30daf8a0b3f3c25a46320f5e7932d01c63301ef (diff)
downloadopenwrt-80d73707b04a46e109b27907c8997068f94e26f4.tar.gz
hostapd: fix an AP+STA corner case on MLO APs
Bring up AP interfaces, even if no frequency update was provided. Fixes bringup when a MLO STA on the same radios connects to fewer links than available, or to a non-MLD AP. Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--package/network/services/hostapd/files/hostapd.uc28
-rw-r--r--package/network/services/hostapd/src/src/ap/ucode.c4
2 files changed, 16 insertions, 16 deletions
diff --git a/package/network/services/hostapd/files/hostapd.uc b/package/network/services/hostapd/files/hostapd.uc
index 2679fb1ee1..c4ebfdd9a1 100644
--- a/package/network/services/hostapd/files/hostapd.uc
+++ b/package/network/services/hostapd/files/hostapd.uc
@@ -1166,20 +1166,22 @@ let main_obj = {
return 0;
}
- if (!req.args.frequency)
- return libubus.STATUS_INVALID_ARGUMENT;
-
- let freq_info = iface_freq_info(iface, config, req.args);
- if (!freq_info)
- return libubus.STATUS_UNKNOWN_ERROR;
-
- let ret;
- if (req.args.csa) {
- freq_info.csa_count = req.args.csa_count ?? 10;
- ret = iface.switch_channel(freq_info);
- } else {
- ret = iface.start(freq_info);
+ let freq_info;
+ if (req.args.frequency) {
+ freq_info = iface_freq_info(iface, config, req.args);
+ if (!freq_info)
+ return libubus.STATUS_UNKNOWN_ERROR;
+
+ if (req.args.csa) {
+ freq_info.csa_count = req.args.csa_count ?? 10;
+ let ret = iface.switch_channel(freq_info);
+ if (!ret)
+ return libubus.STATUS_UNKNOWN_ERROR;
+ return 0;
+ }
}
+
+ let ret = iface.start(freq_info);
if (!ret)
return libubus.STATUS_UNKNOWN_ERROR;
diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c
index ecd7203590..cca487c356 100644
--- a/package/network/services/hostapd/src/src/ap/ucode.c
+++ b/package/network/services/hostapd/src/src/ap/ucode.c
@@ -582,10 +582,8 @@ uc_hostapd_iface_start(uc_vm_t *vm, size_t nargs)
if (!iface)
return NULL;
- if (!info) {
- iface->freq = 0;
+ if (!info)
goto out;
- }
if (ucv_type(info) != UC_OBJECT)
return NULL;