This is a replacement for the bss based function, which cannot be used for MLO.
Signed-off-by: Felix Fietkau <[email protected]>
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: {}