schema: add support for autonomous channel select

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2021-07-08 08:39:28 +02:00
parent 17b574d78f
commit 40d2509481
4 changed files with 25 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ set usteer.@usteer[-1].min_connect_snr={{ wifi_steering.required_probe_snr }}
set usteer.@usteer[-1].roam_scan_snr={{ wifi_steering.required_roam_snr }}
set usteer.@usteer[-1].load_kick_enabled={{ b(wifi_steering.load_kick_threshold) }}
set usteer.@usteer[-1].load_kick_threshold={{ wifi_steering.load_kick_threshold }}
set usteer.@usteer[-1].autochannel={{ b(wifi_steering.auto_channel) }}
{% for (let ssid in ssids): %}
add_list usteer.@usteer[-1].ssid_list={{ ssid.name }}
{% endfor %}

View File

@@ -39,3 +39,9 @@ properties:
Minimum channel load (%) before kicking clients
type: integer
default: 0
auto-channel:
description:
Allow multiple instances of the steering daemon to coordinate the best channel
usage amongst eachother.
type: boolean
default: false

View File

@@ -4298,6 +4298,20 @@ function instantiateServiceWifiSteering(location, value, errors) {
obj.load_kick_threshold = 0;
}
function parseAutoChannel(location, value, errors) {
if (type(value) != "bool")
push(errors, [ location, "must be of type boolean" ]);
return value;
}
if (exists(value, "auto-channel")) {
obj.auto_channel = parseAutoChannel(location + "/auto-channel", value["auto-channel"], errors);
}
else {
obj.auto_channel = false;
}
return obj;
}

View File

@@ -1637,6 +1637,10 @@
"load-kick-threshold": {
"type": "integer",
"default": 0
},
"auto-channel": {
"type": "boolean",
"default": false
}
}
},