wifi-scripts: emit frequency and STA-channel markers in hostapd config
Emit #frequency (the target channel frequency, already computed during phy setup) and #channel_owned_by_sta (set when a co-located STA/mesh/adhoc on the same band dictates the runtime channel) into the generated config. The hostapd daemon uses these to decide whether a channel change can be applied via CSA instead of a full restart. Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
247595eac1
commit
b0d8ab4fef
2 changed files with 5 additions and 0 deletions
|
|
@ -256,6 +256,7 @@ function setup() {
|
|||
// fallthrough
|
||||
case 'sta':
|
||||
data.ap_start_disabled = true;
|
||||
data.channel_follow = true;
|
||||
let config = supplicant.generate(supplicant_data, data, v);
|
||||
if (mode == "mesh")
|
||||
config_add_mesh_params(config, v.config);
|
||||
|
|
|
|||
|
|
@ -589,6 +589,10 @@ export function setup(data) {
|
|||
append('\n#num_global_macaddr', data.config.num_global_macaddr);
|
||||
if (data.config.macaddr_base)
|
||||
append('\n#macaddr_base', data.config.macaddr_base);
|
||||
if (data.config.frequency)
|
||||
append('\n#frequency', data.config.frequency);
|
||||
if (data.channel_follow)
|
||||
append('\n#channel_follow', 1);
|
||||
|
||||
let has_ap;
|
||||
for (let k, interface in data.interfaces) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue