]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
HE: Make the basic NSS/MCS configurable
authorJohn Crispin <john@phrozen.org>
Mon, 20 May 2019 07:55:04 +0000 (09:55 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 27 May 2019 14:45:04 +0000 (17:45 +0300)
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 <slakkavalli@datto.com>
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 9c0194e586c839c1dd971f6b558f75a6616762a5..c236cf4ee125b86cabc2c77570dd1e8f470e0c40 100644 (file)
@@ -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);
index cf646031f738630cdcd56800d4bd773521a4e8cf..124288614bbbbffcfb03b4cdb093de7f22742225 100644 (file)
@@ -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
index 09ab3727a08966aeeb650ac1c0e22a164dcf2537..eecd215af278a3072d03427dd7d4cb74eedc1c48 100644 (file)
@@ -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
index f6d8d5a8717ffc4d862a2793ba3a9fce1d76692b..30c4b65aa8fda61a31bda72987dd7f00b1608878 100644 (file)
@@ -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;
 };
 
 /**
index 066a032c0f3978a214818efd343944219a7b57a0..ba22a174a3a31b01e8bd60d53545bd7ad71ed42e 100644 (file)
@@ -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);
index e6ffc1030f7b52edb478f51057071d953bff5f89..b0aa913bbc9a73d8a4ec21ed5ce496b28030cd6d 100644 (file)
@@ -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;