blob: a789d90a18551b6b9aad53c26a33fd16d35b35fe [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 27eecf3..0124d89 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -61,7 +61,8 @@ drv_mac80211_init_device_config() {
rx_stbc \
tx_stbc \
he_bss_color \
- he_spr_non_srg_obss_pd_max_offset
+ he_spr_non_srg_obss_pd_max_offset \
+ radar_background
config_add_boolean \
ldpc \
greenfield \
@@ -137,13 +138,10 @@ mac80211_hostapd_setup_base() {
[ -n "$acs_exclude_dfs" ] && [ "$acs_exclude_dfs" -gt 0 ] &&
append base_cfg "acs_exclude_dfs=1" "$N"
- json_get_vars noscan ht_coex
+ json_get_vars noscan ht_coex radar_background:0
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"
-
set_default noscan 0
[ "$noscan" -gt 0 ] && hostapd_noscan=1
@@ -413,9 +411,9 @@ mac80211_hostapd_setup_base() {
he_spr_non_srg_obss_pd_max_offset:1 \
he_bss_color
- he_phy_cap=$(iw phy "$phy" info | awk -F "[()]" '/HE PHY Capabilities/ { print $2 }' | head -1)
+ he_phy_cap=$(iw phy "$phy" info | grep "HE Iftypes: AP" -A 50 | awk -F "[()]" '/HE PHY Capabilities/ { print $2 }' | head -1)
he_phy_cap=${he_phy_cap:2}
- he_mac_cap=$(iw phy "$phy" info | awk -F "[()]" '/HE MAC Capabilities/ { print $2 }' | head -1)
+ he_mac_cap=$(iw phy "$phy" info | grep "HE Iftypes: AP" -A 50 | awk -F "[()]" '/HE MAC Capabilities/ { print $2 }' | head -1)
he_mac_cap=${he_mac_cap:2}
append base_cfg "ieee80211ax=1" "$N"
@@ -462,6 +460,8 @@ mac80211_hostapd_setup_base() {
append base_cfg "he_mu_edca_ac_vo_timer=255" "$N"
fi
+ append base_cfg "enable_background_radar=$radar_background" "$N"
+
hostapd_prepare_device_config "$hostapd_conf_file" nl80211
cat >> "$hostapd_conf_file" <<EOF
${channel:+channel=$channel}
--- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
@@ -132,6 +132,13 @@
mode_band="$band"
channel="$chan"
htmode="$mode"
+ if [ "$band" = "6g" ]
+ then
+ encryption=sae
+ key=12345678
+ else
+ encryption=none
+ fi
done
}
@@ -157,6 +164,8 @@
channel=""
htmode=""
ht_capab=""
+ encryption=""
+ key=""
get_band_defaults "$dev"
@@ -181,8 +190,11 @@
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.29.2