]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
HE: Extend BSS color support
authorJohn Crispin <john@phrozen.org>
Tue, 4 Feb 2020 08:04:54 +0000 (09:04 +0100)
committerJouni Malinen <j@w1.fi>
Sun, 16 Feb 2020 10:32:17 +0000 (12:32 +0200)
The HE Operation field for BSS color consists of a disabled, a partial,
and 6 color bits. The original commit adding support for BSS color
considered this to be a u8. This commit changes this to the actual
bits/values.

This adds an explicit config parameter for the partial bit. The disabled
is set to 0 implicitly if a bss_color is defined.

Interoperability testing showed that stations will require a BSS color
to be set even if the feature is disabled. Hence the default color is 1
when none is defined inside the config file.

Signed-off-by: John Crispin <john@phrozen.org>
hostapd/config_file.c
hostapd/hostapd.conf
src/ap/ap_config.c
src/ap/ap_config.h
src/ap/ieee802_11_he.c
src/common/ieee802_11_defs.h

index 0169b989d7978acfd4996305a6344d897ff614a4..602c4a2b9176c846326d1ee57137f6e04f436fe4 100644 (file)
@@ -3474,7 +3474,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
        } else if (os_strcmp(buf, "he_mu_beamformer") == 0) {
                conf->he_phy_capab.he_mu_beamformer = atoi(pos);
        } else if (os_strcmp(buf, "he_bss_color") == 0) {
-               conf->he_op.he_bss_color = atoi(pos);
+               conf->he_op.he_bss_color = atoi(pos) & 0x3f;
+               conf->he_op.he_bss_color_disabled = 0;
+       } else if (os_strcmp(buf, "he_bss_color_partial") == 0) {
+               conf->he_op.he_bss_color_partial = atoi(pos);
        } else if (os_strcmp(buf, "he_default_pe_duration") == 0) {
                conf->he_op.he_default_pe_duration = atoi(pos);
        } else if (os_strcmp(buf, "he_twt_required") == 0) {
index f55925afd755c7a683b9bfcdb44ba9cd25cc795e..eaffed4e66586b70a2e1a577fa7255d6475a1990 100644 (file)
@@ -806,6 +806,9 @@ wmm_ac_vo_acm=0
 # he_bss_color: BSS color (1-63)
 #he_bss_color=1
 
+# he_bss_color_partial: BSS color AID equation
+#he_bss_color_partial=0
+
 #he_default_pe_duration: The duration of PE field in an HE PPDU in us
 # Possible values are 0 us (default), 4 us, 8 us, 12 us, and 16 us
 #he_default_pe_duration=0
index d4d098b38c84b4715ae99154dbfeadb93230c4b8..b462116af8675cf53da5c63a63e9bfa6619c9537 100644 (file)
@@ -251,6 +251,9 @@ struct hostapd_config * hostapd_config_defaults(void)
                HE_OPERATION_RTS_THRESHOLD_OFFSET;
        /* Set default basic MCS/NSS set to single stream MCS 0-7 */
        conf->he_op.he_basic_mcs_nss_set = 0xfffc;
+       conf->he_op.he_bss_color_disabled = 1;
+       conf->he_op.he_bss_color_partial = 0;
+       conf->he_op.he_bss_color = 1;
 #endif /* CONFIG_IEEE80211AX */
 
        /* The third octet of the country string uses an ASCII space character
index f321017e88cf5736faf456577eaa61454f346448..e603605b176787a18b568728b64096cae2deeaa7 100644 (file)
@@ -854,6 +854,8 @@ struct he_phy_capabilities_info {
  */
 struct he_operation {
        u8 he_bss_color;
+       u8 he_bss_color_disabled;
+       u8 he_bss_color_partial;
        u8 he_default_pe_duration;
        u8 he_twt_required;
        u16 he_rts_threshold;
index 3e22ce412b642f383f64a7541a8457a07a90132d..31cf8d786ce41c1d066d3ea2f9f372cb6f8ee937 100644 (file)
@@ -192,9 +192,12 @@ u8 * hostapd_eid_he_operation(struct hostapd_data *hapd, u8 *eid)
                params |= (hapd->iface->conf->he_op.he_rts_threshold <<
                           HE_OPERATION_RTS_THRESHOLD_OFFSET);
 
-       if (hapd->iface->conf->he_op.he_bss_color)
-               params |= (hapd->iface->conf->he_op.he_bss_color <<
-                          HE_OPERATION_BSS_COLOR_OFFSET);
+       if (hapd->iface->conf->he_op.he_bss_color_disabled)
+               params |= HE_OPERATION_BSS_COLOR_DISABLED;
+       if (hapd->iface->conf->he_op.he_bss_color_partial)
+               params |= HE_OPERATION_BSS_COLOR_PARTIAL;
+       params |= hapd->iface->conf->he_op.he_bss_color <<
+               HE_OPERATION_BSS_COLOR_OFFSET;
 
        /* HE minimum required basic MCS and NSS for STAs */
        oper->he_mcs_nss_set =
index ad4ef1a332f3d936b832cc98feca562279db82e1..748106a9c4bf60b6159b246df5ffb817c5c41d64 100644 (file)
@@ -2198,7 +2198,7 @@ struct ieee80211_spatial_reuse {
 #define HE_OPERATION_BSS_COLOR_MASK            ((u32) (BIT(24) | BIT(25) | \
                                                        BIT(26) | BIT(27) | \
                                                        BIT(28) | BIT(29)))
-#define HE_OPERATION_PARTIAL_BSS_COLOR         ((u32) BIT(30))
+#define HE_OPERATION_BSS_COLOR_PARTIAL         ((u32) BIT(30))
 #define HE_OPERATION_BSS_COLOR_DISABLED                ((u32) BIT(31))
 #define HE_OPERATION_BSS_COLOR_OFFSET          24