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>
// 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);
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) {