From c1e43c36b466cab8a2097d78d387dbf27894c583 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 2 Oct 2024 17:39:59 +0200 Subject: [PATCH] wifi-scripts: add better defaults for 6 GHz interop Indicate stationary AP and set default 6G regulatory power type to indoor Signed-off-by: Felix Fietkau --- .../config/wifi-scripts/files/lib/netifd/hostapd.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh b/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh index 32b9d9d082..9ffb46593a 100644 --- a/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh +++ b/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh @@ -120,6 +120,8 @@ hostapd_common_add_device_config() { config_add_int rssi_reject_assoc_rssi config_add_int rssi_ignore_probe_request config_add_int maxassoc + config_add_int reg_power_type + config_add_boolean stationary_ap config_add_string acs_chan_bias config_add_array hostapd_options @@ -139,7 +141,7 @@ hostapd_prepare_device_config() { json_get_vars country country3 country_ie beacon_int:100 doth require_mode legacy_rates \ acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density \ rts_threshold beacon_rate rssi_reject_assoc_rssi rssi_ignore_probe_request maxassoc \ - mbssid:0 + mbssid:0 band reg_power_type stationary_ap hostapd_set_log_options base_cfg @@ -242,6 +244,14 @@ hostapd_prepare_device_config() { [ -n "$maxassoc" ] && append base_cfg "iface_max_num_sta=$maxassoc" "$N" [ "$mbssid" -gt 0 ] && [ "$mbssid" -le 2 ] && append base_cfg "mbssid=$mbssid" "$N" + [ "$band" = "6g" ] && { + set_default reg_power_type 0 + append base_cfg "he_6ghz_reg_pwr_type=$reg_power_type" "$N" + } + + set_default stationary_ap 1 + append base_cfg "stationary_ap=$stationary_ap" "$N" + json_get_values opts hostapd_options for val in $opts; do append base_cfg "$val" "$N"