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>
This commit is contained in:
Felix Fietkau 2025-09-28 20:55:57 +02:00
parent a30daf8a0b
commit 80d73707b0
2 changed files with 15 additions and 15 deletions

View file

@ -1166,20 +1166,22 @@ let main_obj = {
return 0;
}
if (!req.args.frequency)
return libubus.STATUS_INVALID_ARGUMENT;
let freq_info;
if (req.args.frequency) {
freq_info = iface_freq_info(iface, config, req.args);
if (!freq_info)
return libubus.STATUS_UNKNOWN_ERROR;
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);
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;

View file

@ -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;