diff options
| author | Hauke Mehrtens | 2025-12-28 22:03:32 +0000 |
|---|---|---|
| committer | Hauke Mehrtens | 2025-12-30 13:46:05 +0000 |
| commit | 1818f4fbceca41ccb68d679ad546fa65a0e9bc25 (patch) | |
| tree | 35b19211945ffa54f76d6e7fab29268ab86b1cf4 | |
| parent | ff713d3d9e39d148e60cc411b47d4f88b204ae30 (diff) | |
| download | openwrt-1818f4fbceca41ccb68d679ad546fa65a0e9bc25.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>
(cherry picked from commit 01a87f4bd0cdbfc84bbc172920e865c1600f7a45)
| -rw-r--r-- | package/network/config/wifi-scripts/files/lib/wifi/mac80211.uc | 10 |
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 e82525e247..34a7269778 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 || ""}' `); |