diff options
| author | Felix Fietkau | 2025-09-29 11:40:08 +0000 |
|---|---|---|
| committer | Felix Fietkau | 2025-09-29 11:41:06 +0000 |
| commit | 0f56141c6c779a1a74c3cab14ff872d5288a01f6 (patch) | |
| tree | 947d1ee78a0f180c3a313bf628cc1a8ea5383fd0 | |
| parent | 75ca6bafd614efd1427a979d28d551af775b8e5d (diff) | |
| download | openwrt-0f56141c6c779a1a74c3cab14ff872d5288a01f6.tar.gz | |
hostapd: add new ubus method for performig channel switch
This is a replacement for the bss based function, which cannot be used for MLO.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
| -rw-r--r-- | package/network/services/hostapd/files/hostapd.uc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/package/network/services/hostapd/files/hostapd.uc b/package/network/services/hostapd/files/hostapd.uc index 30be818c69..1ec2bb6945 100644 --- a/package/network/services/hostapd/files/hostapd.uc +++ b/package/network/services/hostapd/files/hostapd.uc @@ -1210,6 +1210,34 @@ let main_obj = { return ret; } }, + switch_channel: { + args: { + phy: "", + radio: 0, + csa_count: 0, + sec_channel: 0, + oper_chwidth: 0, + frequency: 0, + center_freq1: 0, + center_freq2: 0, + }, + call: function(req) { + let phy = phy_name(req.args.phy, req.args.radio); + if (!req.args.frequency || !phy) + return libubus.STATUS_INVALID_ARGUMENT; + + let iface = hostapd.interfaces[phy]; + if (!iface) + return libubus.STATUS_NOT_FOUND; + + req.args.csa_count ??= 10; + let ret = iface.switch_channel(req.args); + if (!ret) + return libubus.STATUS_UNKNOWN_ERROR; + + return 0; + }, + }, mld_set: { args: { config: {} |