Skip to content

Commit 01a87f4

Browse files
committed
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: openwrt/openwrt#21313 Signed-off-by: Hauke Mehrtens <[email protected]>
1 parent ed836b1 commit 01a87f4

File tree

1 file changed

+8
-2
lines changed
  • package/network/config/wifi-scripts/files/lib/wifi

1 file changed

+8
-2
lines changed

package/network/config/wifi-scripts/files/lib/wifi/mac80211.uc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,13 @@ for (let phy_name, phy in board.wlan) {
7878

7979
band_name = lc(band_name);
8080

81-
let country, defaults, num_global_macaddr;
81+
let country, encryption, defaults, num_global_macaddr;
82+
if (band_name == '6g') {
83+
country = '00';
84+
encryption = 'owe';
85+
} else {
86+
encryption = 'open';
87+
}
8288
if (board.wlan.defaults) {
8389
defaults = board.wlan.defaults.ssids?.[band_name]?.ssid ? board.wlan.defaults.ssids?.[band_name] : board.wlan.defaults.ssids?.all;
8490
country = board.wlan.defaults.country;
@@ -105,7 +111,7 @@ set ${si}.device='${name}'
105111
set ${si}.network='lan'
106112
set ${si}.mode='ap'
107113
set ${si}.ssid='${defaults?.ssid || "OpenWrt"}'
108-
set ${si}.encryption='${defaults?.encryption || "none"}'
114+
set ${si}.encryption='${defaults?.encryption || encryption}'
109115
set ${si}.key='${defaults?.key || ""}'
110116

111117
`);

0 commit comments

Comments
 (0)