From: Felix Fietkau Date: Fri, 10 Jul 2026 12:53:29 +0000 (+0200) Subject: wifi-scripts: use country_code for iw reg set in setup_phy X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56d466a75d112f481eecaccc3632b33f1b7b48dc;p=thirdparty%2Fopenwrt.git wifi-scripts: use country_code for iw reg set in setup_phy 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 --- diff --git a/package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh b/package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh index 5d3a99c7fc5..a0aeed487ae 100755 --- a/package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh +++ b/package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh @@ -70,9 +70,9 @@ function setup_phy(phy, config, data) { 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);