blob: d2f9cdd4ff439721fdc9b0ebd1502ccb3121ef6c [file] [log] [blame]
developer20d67712022-03-02 14:09:32 +08001diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
developerad3184f2022-08-30 13:15:07 +08002index f524940..37f919b 100644
developer20d67712022-03-02 14:09:32 +08003--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
4+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
developerad3184f2022-08-30 13:15:07 +08005@@ -142,9 +142,6 @@ mac80211_hostapd_setup_base() {
developer20d67712022-03-02 14:09:32 +08006 json_get_values ht_capab_list ht_capab tx_burst
7 json_get_values channel_list channels
8
9- [ "$auto_channel" = 0 ] && [ -z "$channel_list" ] && \
10- channel_list="$channel"
11-
developer9b3248d2022-07-06 00:44:05 +080012 [ "$min_tx_power" -gt 0 ] && append base_cfg "min_tx_power=$min_tx_power"
developer20d67712022-03-02 14:09:32 +080013
developer9b3248d2022-07-06 00:44:05 +080014 set_default noscan 0
developer9b3248d2022-07-06 00:44:05 +080015diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
16index 6aa46b0..5551835 100644
developere2597ba2022-06-24 13:09:16 +080017--- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh
18+++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
developer9b3248d2022-07-06 00:44:05 +080019@@ -132,6 +132,13 @@ get_band_defaults() {
developere2597ba2022-06-24 13:09:16 +080020 mode_band="$band"
21 channel="$chan"
22 htmode="$mode"
23+ if [ "$band" = "6g" ]
24+ then
25+ encryption=sae
26+ key=12345678
27+ else
28+ encryption=none
29+ fi
30 done
31 }
32
developer9b3248d2022-07-06 00:44:05 +080033@@ -157,6 +164,8 @@ detect_mac80211() {
developere2597ba2022-06-24 13:09:16 +080034 channel=""
35 htmode=""
36 ht_capab=""
37+ encryption=""
38+ key=""
39
40 get_band_defaults "$dev"
41
developer9b3248d2022-07-06 00:44:05 +080042@@ -181,8 +190,11 @@ detect_mac80211() {
developere2597ba2022-06-24 13:09:16 +080043 set wireless.default_radio${devidx}.network=lan
44 set wireless.default_radio${devidx}.mode=ap
45 set wireless.default_radio${devidx}.ssid=OpenWrt
46- set wireless.default_radio${devidx}.encryption=none
47+ set wireless.default_radio${devidx}.encryption=${encryption}
48 EOF
49+ [ -n "$key" ] && {
50+ uci -q set wireless.default_radio${devidx}.key=${key}
51+ }
52 uci -q commit wireless
53
54 devidx=$(($devidx + 1))
developer20d67712022-03-02 14:09:32 +080055--
developer9b3248d2022-07-06 00:44:05 +0800562.36.1
developer20d67712022-03-02 14:09:32 +080057