From: John Crispin Date: Mon, 20 May 2019 07:55:04 +0000 (+0200) Subject: HE: Make the basic NSS/MCS configurable X-Git-Tag: hostap_2_9~232 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fhostap.git;a=commitdiff_plain;h=4f3f33804abc2d7a282306c22fbbdb4abe731944 HE: Make the basic NSS/MCS configurable Add a config option to allow setting a custom Basic NSS/MCS set. As a default we use single stream HE-MCS 0-7. Signed-off-by: Shashidhar Lakkavalli Signed-off-by: John Crispin --- diff --git a/hostapd/config_file.c b/hostapd/config_file.c index 9c0194e58..c236cf4ee 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -3508,6 +3508,8 @@ static int hostapd_config_fill(struct hostapd_config *conf, conf->he_op.he_twt_required = atoi(pos); } else if (os_strcmp(buf, "he_rts_threshold") == 0) { conf->he_op.he_rts_threshold = atoi(pos); + } else if (os_strcmp(buf, "he_basic_mcs_nss_set") == 0) { + conf->he_op.he_basic_mcs_nss_set = atoi(pos); } else if (os_strcmp(buf, "he_mu_edca_qos_info_param_count") == 0) { conf->he_mu_edca.he_qos_info |= set_he_cap(atoi(pos), HE_QOS_INFO_EDCA_PARAM_SET_COUNT); diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf index cf646031f..124288614 100644 --- a/hostapd/hostapd.conf +++ b/hostapd/hostapd.conf @@ -804,6 +804,12 @@ wmm_ac_vo_acm=0 #he_oper_centr_freq_seg0_idx #he_oper_centr_freq_seg1_idx +#he_basic_mcs_nss_set: Basic NSS/MCS set +# 16-bit combination of 2-bit values of Max HE-MCS For 1..8 SS; each 2-bit +# value having following meaning: +# 0 = HE-MCS 0-7, 1 = HE-MCS 0-9, 2 = HE-MCS 0-11, 3 = not supported +#he_basic_mcs_nss_set + #he_mu_edca_qos_info_param_count #he_mu_edca_qos_info_q_ack #he_mu_edca_qos_info_queue_request=1 diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c index 09ab3727a..eecd215af 100644 --- a/src/ap/ap_config.c +++ b/src/ap/ap_config.c @@ -240,6 +240,8 @@ struct hostapd_config * hostapd_config_defaults(void) #ifdef CONFIG_IEEE80211AX conf->he_op.he_rts_threshold = HE_OPERATION_RTS_THRESHOLD_MASK >> 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; #endif /* CONFIG_IEEE80211AX */ /* The third octet of the country string uses an ASCII space character diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h index f6d8d5a87..30c4b65aa 100644 --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h @@ -750,6 +750,7 @@ struct he_operation { u8 he_default_pe_duration; u8 he_twt_required; u16 he_rts_threshold; + u16 he_basic_mcs_nss_set; }; /** diff --git a/src/ap/ieee802_11_he.c b/src/ap/ieee802_11_he.c index 066a032c0..ba22a174a 100644 --- a/src/ap/ieee802_11_he.c +++ b/src/ap/ieee802_11_he.c @@ -157,6 +157,10 @@ u8 * hostapd_eid_he_operation(struct hostapd_data *hapd, u8 *eid) 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 = + host_to_le16(hapd->iface->conf->he_op.he_basic_mcs_nss_set); + /* TODO: conditional MaxBSSID Indicator subfield */ oper->he_oper_params = host_to_le32(params); diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h index e6ffc1030..b0aa913bb 100644 --- a/src/common/ieee802_11_defs.h +++ b/src/common/ieee802_11_defs.h @@ -2115,7 +2115,7 @@ struct ieee80211_he_capabilities { struct ieee80211_he_operation { le32 he_oper_params; /* HE Operation Parameters[3] and * BSS Color Information[1] */ - u8 he_mcs_nss_set[2]; + le16 he_mcs_nss_set; u8 vht_op_info_chwidth; u8 vht_op_info_chan_center_freq_seg0_idx; u8 vht_op_info_chan_center_freq_seg1_idx;