validate() converts the country alias to country_code and deletes country
before setup_phy() runs, so the iw reg set branch tested a null
config.country and never ran, leaving wdev-only radios (adhoc/mesh/monitor)
on the world regdomain. Use config.country_code.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
config.channel = +config.channel;
config.frequency = get_channel_frequency(config.band, config.channel);
- if (config.country) {
- log(`Setting country code to ${config.country}`);
- system(`iw reg set ${config.country}`);
+ if (config.country_code) {
+ log(`Setting country code to ${config.country_code}`);
+ system(`iw reg set ${config.country_code}`);
}
set_default(config, 'rxantenna', 0xffffffff);