[openwrt/openwrt] hostapd: make country3 option configurable

LEDE Commits lede-commits at lists.infradead.org
Mon Jun 21 22:04:26 PDT 2021


aparcar pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/9f09c1936a4a13b67fcba632f7ca02331f685359

commit 9f09c1936a4a13b67fcba632f7ca02331f685359
Author: Timo Sigurdsson <public_timo.s at silentcreek.de>
AuthorDate: Tue Jun 15 23:08:56 2021 +0200

    hostapd: make country3 option configurable
    
    The country3 option in hostapd.conf allows the third octet of the country
    string to be set. It can be used e.g. to indicate indoor or outdoor use (see
    hostapd.conf for further details). Make this option configurable but optional
    in OpenWrt.
    
    Signed-off-by: Timo Sigurdsson <public_timo.s at silentcreek.de>
---
 package/network/services/hostapd/files/hostapd.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
index 8a6c904c58..060199fa0c 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -93,7 +93,7 @@ hostapd_common_add_device_config() {
 	config_add_array supported_rates
 	config_add_string beacon_rate
 
-	config_add_string country
+	config_add_string country country3
 	config_add_boolean country_ie doth
 	config_add_boolean spectrum_mgmt_required
 	config_add_int local_pwr_constraint
@@ -119,7 +119,7 @@ hostapd_prepare_device_config() {
 
 	local base_cfg=
 
-	json_get_vars country country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \
+	json_get_vars country country3 country_ie beacon_int:100 dtim_period:2 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
 
@@ -134,6 +134,7 @@ hostapd_prepare_device_config() {
 
 	[ -n "$country" ] && {
 		append base_cfg "country_code=$country" "$N"
+		[ -n "$country3" ] && append base_cfg "country3=$country3" "$N"
 
 		[ "$country_ie" -gt 0 ] && {
 			append base_cfg "ieee80211d=1" "$N"



More information about the lede-commits mailing list