HE: Extend BSS color support
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>
This commit is contained in:
parent
458162a271
commit
0cb39f4fd5
6 changed files with 19 additions and 5 deletions
|
@ -3474,7 +3474,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
||||||
} else if (os_strcmp(buf, "he_mu_beamformer") == 0) {
|
} else if (os_strcmp(buf, "he_mu_beamformer") == 0) {
|
||||||
conf->he_phy_capab.he_mu_beamformer = atoi(pos);
|
conf->he_phy_capab.he_mu_beamformer = atoi(pos);
|
||||||
} else if (os_strcmp(buf, "he_bss_color") == 0) {
|
} 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) {
|
} else if (os_strcmp(buf, "he_default_pe_duration") == 0) {
|
||||||
conf->he_op.he_default_pe_duration = atoi(pos);
|
conf->he_op.he_default_pe_duration = atoi(pos);
|
||||||
} else if (os_strcmp(buf, "he_twt_required") == 0) {
|
} else if (os_strcmp(buf, "he_twt_required") == 0) {
|
||||||
|
|
|
@ -806,6 +806,9 @@ wmm_ac_vo_acm=0
|
||||||
# he_bss_color: BSS color (1-63)
|
# he_bss_color: BSS color (1-63)
|
||||||
#he_bss_color=1
|
#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
|
#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
|
# Possible values are 0 us (default), 4 us, 8 us, 12 us, and 16 us
|
||||||
#he_default_pe_duration=0
|
#he_default_pe_duration=0
|
||||||
|
|
|
@ -251,6 +251,9 @@ struct hostapd_config * hostapd_config_defaults(void)
|
||||||
HE_OPERATION_RTS_THRESHOLD_OFFSET;
|
HE_OPERATION_RTS_THRESHOLD_OFFSET;
|
||||||
/* Set default basic MCS/NSS set to single stream MCS 0-7 */
|
/* 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_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 */
|
#endif /* CONFIG_IEEE80211AX */
|
||||||
|
|
||||||
/* The third octet of the country string uses an ASCII space character
|
/* The third octet of the country string uses an ASCII space character
|
||||||
|
|
|
@ -854,6 +854,8 @@ struct he_phy_capabilities_info {
|
||||||
*/
|
*/
|
||||||
struct he_operation {
|
struct he_operation {
|
||||||
u8 he_bss_color;
|
u8 he_bss_color;
|
||||||
|
u8 he_bss_color_disabled;
|
||||||
|
u8 he_bss_color_partial;
|
||||||
u8 he_default_pe_duration;
|
u8 he_default_pe_duration;
|
||||||
u8 he_twt_required;
|
u8 he_twt_required;
|
||||||
u16 he_rts_threshold;
|
u16 he_rts_threshold;
|
||||||
|
|
|
@ -192,9 +192,12 @@ u8 * hostapd_eid_he_operation(struct hostapd_data *hapd, u8 *eid)
|
||||||
params |= (hapd->iface->conf->he_op.he_rts_threshold <<
|
params |= (hapd->iface->conf->he_op.he_rts_threshold <<
|
||||||
HE_OPERATION_RTS_THRESHOLD_OFFSET);
|
HE_OPERATION_RTS_THRESHOLD_OFFSET);
|
||||||
|
|
||||||
if (hapd->iface->conf->he_op.he_bss_color)
|
if (hapd->iface->conf->he_op.he_bss_color_disabled)
|
||||||
params |= (hapd->iface->conf->he_op.he_bss_color <<
|
params |= HE_OPERATION_BSS_COLOR_DISABLED;
|
||||||
HE_OPERATION_BSS_COLOR_OFFSET);
|
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 */
|
/* HE minimum required basic MCS and NSS for STAs */
|
||||||
oper->he_mcs_nss_set =
|
oper->he_mcs_nss_set =
|
||||||
|
|
|
@ -2198,7 +2198,7 @@ struct ieee80211_spatial_reuse {
|
||||||
#define HE_OPERATION_BSS_COLOR_MASK ((u32) (BIT(24) | BIT(25) | \
|
#define HE_OPERATION_BSS_COLOR_MASK ((u32) (BIT(24) | BIT(25) | \
|
||||||
BIT(26) | BIT(27) | \
|
BIT(26) | BIT(27) | \
|
||||||
BIT(28) | BIT(29)))
|
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_DISABLED ((u32) BIT(31))
|
||||||
#define HE_OPERATION_BSS_COLOR_OFFSET 24
|
#define HE_OPERATION_BSS_COLOR_OFFSET 24
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue