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 | 9b3248d | 2022-07-06 00:44:05 +0800 | [diff] [blame] | 2 | index 5d6ca7c..cfe4243 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 | 9b3248d | 2022-07-06 00:44:05 +0800 | [diff] [blame] | 5 | @@ -141,9 +141,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 |
| 15 | @@ -420,9 +417,9 @@ mac80211_hostapd_setup_base() { |
developer | 20d6771 | 2022-03-02 14:09:32 +0800 | [diff] [blame] | 16 | he_spr_non_srg_obss_pd_max_offset:1 \ |
| 17 | he_bss_color |
| 18 | |
| 19 | - he_phy_cap=$(iw phy "$phy" info | awk -F "[()]" '/HE PHY Capabilities/ { print $2 }' | head -1) |
| 20 | + he_phy_cap=$(iw phy "$phy" info | grep "HE Iftypes: AP" -A 50 | awk -F "[()]" '/HE PHY Capabilities/ { print $2 }' | head -1) |
| 21 | he_phy_cap=${he_phy_cap:2} |
| 22 | - he_mac_cap=$(iw phy "$phy" info | awk -F "[()]" '/HE MAC Capabilities/ { print $2 }' | head -1) |
| 23 | + he_mac_cap=$(iw phy "$phy" info | grep "HE Iftypes: AP" -A 50 | awk -F "[()]" '/HE MAC Capabilities/ { print $2 }' | head -1) |
| 24 | he_mac_cap=${he_mac_cap:2} |
| 25 | |
| 26 | append base_cfg "ieee80211ax=1" "$N" |
developer | 9b3248d | 2022-07-06 00:44:05 +0800 | [diff] [blame] | 27 | diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh |
| 28 | index 6aa46b0..5551835 100644 |
developer | e2597ba | 2022-06-24 13:09:16 +0800 | [diff] [blame] | 29 | --- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh |
| 30 | +++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh |
developer | 9b3248d | 2022-07-06 00:44:05 +0800 | [diff] [blame] | 31 | @@ -132,6 +132,13 @@ get_band_defaults() { |
developer | e2597ba | 2022-06-24 13:09:16 +0800 | [diff] [blame] | 32 | mode_band="$band" |
| 33 | channel="$chan" |
| 34 | htmode="$mode" |
| 35 | + if [ "$band" = "6g" ] |
| 36 | + then |
| 37 | + encryption=sae |
| 38 | + key=12345678 |
| 39 | + else |
| 40 | + encryption=none |
| 41 | + fi |
| 42 | done |
| 43 | } |
| 44 | |
developer | 9b3248d | 2022-07-06 00:44:05 +0800 | [diff] [blame] | 45 | @@ -157,6 +164,8 @@ detect_mac80211() { |
developer | e2597ba | 2022-06-24 13:09:16 +0800 | [diff] [blame] | 46 | channel="" |
| 47 | htmode="" |
| 48 | ht_capab="" |
| 49 | + encryption="" |
| 50 | + key="" |
| 51 | |
| 52 | get_band_defaults "$dev" |
| 53 | |
developer | 9b3248d | 2022-07-06 00:44:05 +0800 | [diff] [blame] | 54 | @@ -181,8 +190,11 @@ detect_mac80211() { |
developer | e2597ba | 2022-06-24 13:09:16 +0800 | [diff] [blame] | 55 | set wireless.default_radio${devidx}.network=lan |
| 56 | set wireless.default_radio${devidx}.mode=ap |
| 57 | set wireless.default_radio${devidx}.ssid=OpenWrt |
| 58 | - set wireless.default_radio${devidx}.encryption=none |
| 59 | + set wireless.default_radio${devidx}.encryption=${encryption} |
| 60 | EOF |
| 61 | + [ -n "$key" ] && { |
| 62 | + uci -q set wireless.default_radio${devidx}.key=${key} |
| 63 | + } |
| 64 | uci -q commit wireless |
| 65 | |
| 66 | devidx=$(($devidx + 1)) |
developer | 20d6771 | 2022-03-02 14:09:32 +0800 | [diff] [blame] | 67 | -- |
developer | 9b3248d | 2022-07-06 00:44:05 +0800 | [diff] [blame] | 68 | 2.36.1 |
developer | 20d6771 | 2022-03-02 14:09:32 +0800 | [diff] [blame] | 69 | |