developer | 20d6771 | 2022-03-02 14:09:32 +0800 | [diff] [blame] | 1 | diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh |
developer | ad3184f | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 2 | index f524940..37f919b 100644 |
developer | 20d6771 | 2022-03-02 14:09:32 +0800 | [diff] [blame] | 3 | --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh |
| 4 | +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh |
developer | ad3184f | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 5 | @@ -142,9 +142,6 @@ mac80211_hostapd_setup_base() { |
developer | 20d6771 | 2022-03-02 14:09:32 +0800 | [diff] [blame] | 6 | 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 | - |
developer | 9b3248d | 2022-07-06 00:44:05 +0800 | [diff] [blame] | 12 | [ "$min_tx_power" -gt 0 ] && append base_cfg "min_tx_power=$min_tx_power" |
developer | 20d6771 | 2022-03-02 14:09:32 +0800 | [diff] [blame] | 13 | |
developer | 9b3248d | 2022-07-06 00:44:05 +0800 | [diff] [blame] | 14 | set_default noscan 0 |
developer | 9b3248d | 2022-07-06 00:44:05 +0800 | [diff] [blame] | 15 | diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh |
| 16 | index 6aa46b0..5551835 100644 |
developer | e2597ba | 2022-06-24 13:09:16 +0800 | [diff] [blame] | 17 | --- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh |
| 18 | +++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh |
developer | 9b3248d | 2022-07-06 00:44:05 +0800 | [diff] [blame] | 19 | @@ -132,6 +132,13 @@ get_band_defaults() { |
developer | e2597ba | 2022-06-24 13:09:16 +0800 | [diff] [blame] | 20 | 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 | |
developer | 9b3248d | 2022-07-06 00:44:05 +0800 | [diff] [blame] | 33 | @@ -157,6 +164,8 @@ detect_mac80211() { |
developer | e2597ba | 2022-06-24 13:09:16 +0800 | [diff] [blame] | 34 | channel="" |
| 35 | htmode="" |
| 36 | ht_capab="" |
| 37 | + encryption="" |
| 38 | + key="" |
| 39 | |
| 40 | get_band_defaults "$dev" |
| 41 | |
developer | 9b3248d | 2022-07-06 00:44:05 +0800 | [diff] [blame] | 42 | @@ -181,8 +190,11 @@ detect_mac80211() { |
developer | e2597ba | 2022-06-24 13:09:16 +0800 | [diff] [blame] | 43 | 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)) |
developer | 20d6771 | 2022-03-02 14:09:32 +0800 | [diff] [blame] | 55 | -- |
developer | 9b3248d | 2022-07-06 00:44:05 +0800 | [diff] [blame] | 56 | 2.36.1 |
developer | 20d6771 | 2022-03-02 14:09:32 +0800 | [diff] [blame] | 57 | |