]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
HE: Disable TXOP duration-based RTS if he_rts_threshold is not set
authorJohn Crispin <john@phrozen.org>
Tue, 16 Apr 2019 12:33:58 +0000 (14:33 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 25 Apr 2019 08:43:59 +0000 (11:43 +0300)
IEEE P802.11ax/D4.0 9.4.2.243 "HE Operation element" indicates that the
special value 1023 in the TXOP Duration RTS Threshold field is used to
indicate that TXOP duration-based RTS is disabled. Use that value as the
default instead of the previously used value 0 which would really mean
threshold of 0 usec. Furthermore, the previous implementation did not
allow values larger than 255 to be used for this field while the field
is actually 10 bits in size.

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
src/ap/ap_config.c
src/ap/ap_config.h

index 07b818eb36b8dbf6f03100bbfbbc4278f865731d..2ace6023a2a0c5de6823ce17c678a1ea8415693a 100644 (file)
@@ -236,6 +236,11 @@ 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 >>
+               HE_OPERATION_RTS_THRESHOLD_OFFSET;
+#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. */
index 19eda67e131d0a3d3c2df9df582465e90c306e3e..84b6b786fbf36e624e2cfc6d179b77c13bd38cd9 100644 (file)
@@ -737,7 +737,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;
 };
 
 /**