summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens2025-12-28 22:03:32 +0000
committerHauke Mehrtens2025-12-30 13:43:08 +0000
commit01a87f4bd0cdbfc84bbc172920e865c1600f7a45 (patch)
treee9c06649ce7e18a1330f3f3eabb02778adf48d6b
parented836b1a9d86777cc37fa5b3765aea8b5addd876 (diff)
downloadopenwrt-01a87f4bd0cdbfc84bbc172920e865c1600f7a45.tar.gz
wifi-scripts: use OWE + country for 6GHz
Wifi on the 6GHz band does not support open networks, configure owe by default. 6GHz wifi also needs a country code, configure a broken country code '00' by default to hint the user to change it. Link: https://github.com/openwrt/openwrt/pull/21313 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--package/network/config/wifi-scripts/files/lib/wifi/mac80211.uc10
1 files changed, 8 insertions, 2 deletions
diff --git a/package/network/config/wifi-scripts/files/lib/wifi/mac80211.uc b/package/network/config/wifi-scripts/files/lib/wifi/mac80211.uc
index 0b81fd65ec..187a823a0e 100644
--- a/package/network/config/wifi-scripts/files/lib/wifi/mac80211.uc
+++ b/package/network/config/wifi-scripts/files/lib/wifi/mac80211.uc
@@ -78,7 +78,13 @@ for (let phy_name, phy in board.wlan) {
band_name = lc(band_name);
- let country, defaults, num_global_macaddr;
+ let country, encryption, defaults, num_global_macaddr;
+ if (band_name == '6g') {
+ country = '00';
+ encryption = 'owe';
+ } else {
+ encryption = 'open';
+ }
if (board.wlan.defaults) {
defaults = board.wlan.defaults.ssids?.[band_name]?.ssid ? board.wlan.defaults.ssids?.[band_name] : board.wlan.defaults.ssids?.all;
country = board.wlan.defaults.country;
@@ -105,7 +111,7 @@ set ${si}.device='${name}'
set ${si}.network='lan'
set ${si}.mode='ap'
set ${si}.ssid='${defaults?.ssid || "OpenWrt"}'
-set ${si}.encryption='${defaults?.encryption || "none"}'
+set ${si}.encryption='${defaults?.encryption || encryption}'
set ${si}.key='${defaults?.key || ""}'
`);