[PATCH 2/5] HE: set field to 1023 if no he_rts_threshold is set in the configuration

John Crispin john at phrozen.org
Tue Apr 16 05:33:58 PDT 2019


"9.4.2.243 HE Operation element" states that when no RTS threshold is
set, the field should be set to 1023. Add this value as the default.

Signed-off-by: Shashidhar Lakkavalli <slakkavalli at datto.com>
Signed-off-by: John Crispin <john at phrozen.org>
---
 src/ap/ap_config.c | 4 ++++
 src/ap/ap_config.h | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
index e640e9984..920d8cb2c 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -236,6 +236,10 @@ struct hostapd_config * hostapd_config_defaults(void)
 	conf->acs_num_scans = 5;
 #endif /* CONFIG_ACS */
 
+#ifdef CONFIG_IEEE80211AX
+	conf->he_op.he_rts_threshold = HE_OPERATION_RTS_THRESHOLD_MASK;
+#endif /* CONFIG_IEEE80211AX */
+
 	/* The third octet of the country string uses an ASCII space character
 	 * by default to indicate that the regulations encompass all
 	 * environments for the current frequency band in the country. */
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
index 509677a45..82d17cbf4 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -727,7 +727,7 @@ struct he_operation {
 	u8 he_bss_color;
 	u8 he_default_pe_duration;
 	u8 he_twt_required;
-	u8 he_rts_threshold;
+	u16 he_rts_threshold;
 };
 
 /**
-- 
2.11.0




More information about the Hostap mailing list