From bc32555de9efac9bd9b75c7b05166984cf1c45bc Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Mon, 7 Feb 2022 09:56:20 +0100
Subject: [PATCH 6/8] hostapd: add multiple_bssid rnr_beacon he_co_locate ema
 options

Signed-off-by: John Crispin <john@phrozen.org>
---
 package/network/services/hostapd/files/hostapd.sh | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
index a56bc69562..209ae3dc46 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -123,6 +123,8 @@ hostapd_common_add_device_config() {
 
 	config_add_int airtime_mode
 
+	config_add_boolean multiple_bssid rnr_beacon he_co_locate ema
+
 	hostapd_add_log_config
 }
 
@@ -134,7 +136,8 @@ hostapd_prepare_device_config() {
 
 	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
+		rts_threshold beacon_rate rssi_reject_assoc_rssi rssi_ignore_probe_request maxassoc \
+		multiple_bssid he_co_locate rnr_beacon ema
 
 	hostapd_set_log_options base_cfg
 
@@ -144,6 +147,10 @@ hostapd_prepare_device_config() {
 	set_default legacy_rates 0
 	set_default airtime_mode 0
 	set_default cell_density 0
+	set_default he_co_locate 0
+	set_default rnr_beacon 0
+	set_default multiple_bssid 0
+	set_default ema 0
 
 	[ -n "$country" ] && {
 		append base_cfg "country_code=$country" "$N"
@@ -236,6 +243,10 @@ hostapd_prepare_device_config() {
 	append base_cfg "dtim_period=$dtim_period" "$N"
 	[ "$airtime_mode" -gt 0 ] && append base_cfg "airtime_mode=$airtime_mode" "$N"
 	[ -n "$maxassoc" ] && append base_cfg "iface_max_num_sta=$maxassoc" "$N"
+	[ "$rnr_beacon" -gt 0 ] && append base_cfg "rnr_beacon=$rnr_beacon" "$N"
+	[ "$he_co_locate" -gt 0 ] && append base_cfg "he_co_locate=$he_co_locate" "$N"
+	[ "$multiple_bssid" -gt 0 ] && append base_cfg "multiple_bssid=$multiple_bssid" "$N"
+	[ "$ema" -gt 0 ] && append base_cfg "ema=$ema" "$N"
 
 	json_get_values opts hostapd_options
 	for val in $opts; do
-- 
2.25.1

