blob: d2f9cdd4ff439721fdc9b0ebd1502ccb3121ef6c [file] [log] [blame]
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index f524940..37f919b 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -142,9 +142,6 @@ mac80211_hostapd_setup_base() {
json_get_values ht_capab_list ht_capab tx_burst
json_get_values channel_list channels
- [ "$auto_channel" = 0 ] && [ -z "$channel_list" ] && \
- channel_list="$channel"
-
[ "$min_tx_power" -gt 0 ] && append base_cfg "min_tx_power=$min_tx_power"
set_default noscan 0
diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
index 6aa46b0..5551835 100644
--- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
@@ -132,6 +132,13 @@ get_band_defaults() {
mode_band="$band"
channel="$chan"
htmode="$mode"
+ if [ "$band" = "6g" ]
+ then
+ encryption=sae
+ key=12345678
+ else
+ encryption=none
+ fi
done
}
@@ -157,6 +164,8 @@ detect_mac80211() {
channel=""
htmode=""
ht_capab=""
+ encryption=""
+ key=""
get_band_defaults "$dev"
@@ -181,8 +190,11 @@ detect_mac80211() {
set wireless.default_radio${devidx}.network=lan
set wireless.default_radio${devidx}.mode=ap
set wireless.default_radio${devidx}.ssid=OpenWrt
- set wireless.default_radio${devidx}.encryption=none
+ set wireless.default_radio${devidx}.encryption=${encryption}
EOF
+ [ -n "$key" ] && {
+ uci -q set wireless.default_radio${devidx}.key=${key}
+ }
uci -q commit wireless
devidx=$(($devidx + 1))
--
2.36.1