From patchwork Fri Jan 11 11:02:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siva Mullati X-Patchwork-Id: 1023902 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZoXJVKrS"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43cL465VDDz9s9h for ; Sun, 13 Jan 2019 00:21:56 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=bouTwyWTwkaSJr5E3l7b/cm6YrIRrE5EXm+Z75m+TUs=; b=ZoX JVKrSqJQaVGyXKt+ghGO0g3G/WI+979beGZYqPqWDzRtvOoNrQ37Ub+pttjWZ68K7og2Lo+vFeKCm FjStV5nODJyWuRtx5RRgjthbsgEZd3PHa6NTPFlwNHBM8rPAbvx4oO+Hq0fTPeL0/24YbTGOOd5X1 zfKE44FQWA5G2utXQZ9p9aROYb0KETuprJ9ncmY1IK7s2WGd863eqg1b1oldDxaBvwqyMswPdFAkI ood1MA2ai1Kn61BG88FzL3v+eDbsJfD3rqtqnXF6DZufMSkIL3qQx0+HgzuhC2L35RfhMxgYtWNqZ lqhu2dDzvfjH1VGMZQRm5dVQ2wQVjaw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1giJEL-0005nu-2L; Sat, 12 Jan 2019 13:21:41 +0000 Received: from mga12.intel.com ([192.55.52.136]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ghuaO-0005rH-Jx for hostap@lists.infradead.org; Fri, 11 Jan 2019 11:02:51 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jan 2019 03:02:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,465,1539673200"; d="scan'208";a="133666299" Received: from inlubt0043.iind.intel.com ([10.223.47.124]) by fmsmga002.fm.intel.com with ESMTP; 11 Jan 2019 03:02:46 -0800 From: Siva Mullati To: hostap@lists.infradead.org Subject: [PATCH] HE: Changes in HE operation definitions and configurations Date: Fri, 11 Jan 2019 16:32:36 +0530 Message-Id: <20190111110236.9612-1-siva.mullati@intel.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190111_030248_686135_FBA8B8E3 X-CRM114-Status: GOOD ( 15.08 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [192.55.52.136 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record X-Mailman-Approved-At: Sat, 12 Jan 2019 05:21:39 -0800 X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Siva Mullati MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Replace the way HE Operation elements are defined Replace the way HE Capab is configured in hostapd.conf and add more configuration paramters. Signed-off-by: Siva Mullati --- hostapd/config_file.c | 63 +++++++++++++++++++++++++++++++++----- hostapd/hostapd.conf | 35 ++++++++++++++++----- src/ap/ap_config.h | 12 +------- src/ap/ieee802_11_he.c | 73 ++++++++++++++++++++++++++++++++------------ src/common/ieee802_11_defs.h | 52 +++++++++++++++++++------------ 5 files changed, 169 insertions(+), 66 deletions(-) diff --git a/hostapd/config_file.c b/hostapd/config_file.c index 75bd4915a..d6e51eecd 100755 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -3733,14 +3733,61 @@ static int hostapd_config_fill(struct hostapd_config *conf, } else if (os_strcmp(buf, "he_ppe_th_ppet8_for_nss4_for_ru3") == 0) { conf->he_capab.he_ppe_thresholds[HE_PPE_CAP12_IDX] |= set_he_cap(atoi(pos), HE_PPE_CAP12_PPET8_FOR_NSS4_FOR_RU3); - } else if (os_strcmp(buf, "he_bss_color") == 0) { - conf->he_op.he_bss_color = 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) { - 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_operation_bss_color") == 0) { + conf->he_oper.bss_color_info = atoi(pos); + } else if (os_strcmp(buf, "he_operation_default_pe_duration") == 0) { + conf->he_oper.he_oper_params[HE_OPERATION_CAP0_IDX] |= + set_he_cap(atoi(pos), HE_OPERATION_CAP0_DEFAULT_PE_DURATION); + } else if (os_strcmp(buf, "he_operation_twt_required") == 0) { + conf->he_oper.he_oper_params[HE_OPERATION_CAP0_IDX] |= + set_he_cap(atoi(pos), HE_OPERATION_CAP0_TWT_REQUIRED); + } else if (os_strcmp(buf, "he_operation_txop_dur_rts_th") == 0) { + conf->he_oper.he_oper_params[HE_OPERATION_CAP0_IDX] |= + set_he_cap(atoi(pos), HE_OPERATION_CAP0_TXOP_DUR_RTS_TH); + conf->he_oper.he_oper_params[HE_OPERATION_CAP1_IDX] |= + set_he_cap(atoi(pos) >> 4, HE_OPERATION_CAP1_TXOP_DUR_RTS_TH); + } else if (os_strcmp(buf, "he_operation_er_su_disable") == 0) { + conf->he_oper.he_oper_params[HE_OPERATION_CAP2_IDX] |= + set_he_cap(atoi(pos), HE_OPERATION_CAP2_ER_SU_DISABLE); + } else if (os_strcmp(buf, "he_operation_partial_bss_color") == 0) { + conf->he_oper.bss_color_info |= + set_he_cap(atoi(pos), HE_OPERATION_PARTIAL_BSS_COLOR); + } else if (os_strcmp(buf, "he_operation_vht_oper_info_present") == 0) { + conf->he_oper.he_oper_params[HE_OPERATION_CAP1_IDX] |= + set_he_cap(atoi(pos), HE_OPERATION_CAP1_VHT_OPER_INFO_PRESENT); + } else if (os_strcmp(buf, "he_operation_bss_color_disabled") == 0) { + conf->he_oper.bss_color_info |= + set_he_cap(atoi(pos), HE_OPERATION_BSS_COLOR_DISABLED); + } else if (os_strcmp(buf, "he_operation_max_mcs_for_1ss") == 0) { + conf->he_oper.he_mcs_nss_set[0] |= + set_he_cap(atoi(pos), HE_MCS_NSS_FOR_1SS); + } else if (os_strcmp(buf, "he_operation_max_mcs_for_2ss") == 0) { + conf->he_oper.he_mcs_nss_set[0] |= + set_he_cap(atoi(pos), HE_MCS_NSS_FOR_2SS); + } else if (os_strcmp(buf, "he_operation_max_mcs_for_3ss") == 0) { + conf->he_oper.he_mcs_nss_set[0] |= + set_he_cap(atoi(pos), HE_MCS_NSS_FOR_3SS); + } else if (os_strcmp(buf, "he_operation_max_mcs_for_4ss") == 0) { + conf->he_oper.he_mcs_nss_set[0] |= + set_he_cap(atoi(pos), HE_MCS_NSS_FOR_4SS); + } else if (os_strcmp(buf, "he_operation_max_mcs_for_5ss") == 0) { + conf->he_oper.he_mcs_nss_set[1] |= + set_he_cap(atoi(pos), HE_MCS_NSS_FOR_5SS); + } else if (os_strcmp(buf, "he_operation_max_mcs_for_6ss") == 0) { + conf->he_oper.he_mcs_nss_set[1] |= + set_he_cap(atoi(pos), HE_MCS_NSS_FOR_6SS); + } else if (os_strcmp(buf, "he_operation_max_mcs_for_7ss") == 0) { + conf->he_oper.he_mcs_nss_set[1] |= + set_he_cap(atoi(pos), HE_MCS_NSS_FOR_7SS); + } else if (os_strcmp(buf, "he_operation_max_mcs_for_8ss") == 0) { + conf->he_oper.he_mcs_nss_set[1] |= + set_he_cap(atoi(pos), HE_MCS_NSS_FOR_8SS); + } else if (os_strcmp(buf, "he_operation_vht_channel_width") == 0) { + conf->he_oper.vht_op_info_chwidth = atoi(pos); + } else if (os_strcmp(buf, "he_operation_vht_channel_center_seg0") == 0) { + conf->he_oper.vht_op_info_chan_center_freq_seg0_idx = atoi(pos); + } else if (os_strcmp(buf, "he_operation_vht_channel_center_seg1") == 0) { + conf->he_oper.vht_op_info_chan_center_freq_seg1_idx = 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 f94671ca9..e5fa77c48 100755 --- a/hostapd/hostapd.conf +++ b/hostapd/hostapd.conf @@ -884,24 +884,43 @@ wmm_ac_vo_acm=0 #he_ppe_th_ppet8_for_nss4_for_ru2=7 #he_ppe_th_ppet8_for_nss4_for_ru3=7 -# he_bss_color: BSS color +#he_operation_bss_color: BSS color # 0 = no BSS color (default) # unsigned integer = BSS color -#he_bss_color=0 +#he_operation_bss_color=0 -#he_default_pe_duration: The duration of PE field in an HE PPDU in us +#he_operation_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 +#he_operation_default_pe_duration=0 -#he_twt_required: Whether TWT is required +#he_operation_twt_required: Whether TWT is required # 0 = not required (default) # 1 = required -#he_twt_required=0 +#he_operation_twt_required=0 -#he_rts_threshold: Duration of STA transmission +#he_operation_txop_dur_rts_th: Duration of STA transmission # 0 = not set (default) # unsigned integer = duration in units of 16 us -#he_rts_threshold=0 +#he_operation_txop_dur_rts_th=0 + +# The Max HE-MCS For n SS subfield (where n = 1, ..., 8) is encoded as follows: +# 0 indicates support for HE-MCS 0-7 for n spatial streams +# 1 indicates support for HE-MCS 0-9 for n spatial streams +# 2 indicates support for HE-MCS 0-11 for n spatial streams +# 3 indicates that n spatial streams is not supported for HE PPDUs +#he_operation_max_mcs_for_2ss=0 +#he_operation_max_mcs_for_3ss=0 +#he_operation_max_mcs_for_4ss=0 +#he_operation_max_mcs_for_5ss=0 +#he_operation_max_mcs_for_6ss=0 +#he_operation_max_mcs_for_7ss=0 +#he_operation_max_mcs_for_8ss=0 + +# VHT Operation Information +#he_operation_vht_oper_info_present=1 +#he_operation_vht_channel_width=1 +#he_operation_vht_channel_center_seg0=42 +#he_operation_vht_channel_center_seg1=50 #he_mu_edca_qos_info_param_count #he_mu_edca_qos_info_q_ack diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h index 84082e37e..fd1bb8491 100755 --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h @@ -704,16 +704,6 @@ struct hostapd_bss_config { }; /** - * struct he_operation - HE operation - */ -struct he_operation { - u8 he_bss_color; - u8 he_default_pe_duration; - u8 he_twt_required; - u8 he_rts_threshold; -}; - -/** * struct hostapd_config - Per-radio interface configuration */ struct hostapd_config { @@ -833,7 +823,7 @@ struct hostapd_config { int ieee80211ax; #ifdef CONFIG_IEEE80211AX struct ieee80211_he_capabilities he_capab; - struct he_operation he_op; + struct ieee80211_he_operation he_oper; struct ieee80211_he_mu_edca_parameter_set he_mu_edca; #endif /* CONFIG_IEEE80211AX */ diff --git a/src/ap/ieee802_11_he.c b/src/ap/ieee802_11_he.c index 68ce77e03..a03c23be4 100755 --- a/src/ap/ieee802_11_he.c +++ b/src/ap/ieee802_11_he.c @@ -82,41 +82,74 @@ u8 * hostapd_eid_he_operation(struct hostapd_data *hapd, u8 *eid) { struct ieee80211_he_operation *oper; u8 *pos = eid; + u8 *he_oper; if (!hapd->iface->current_mode) return eid; - *pos++ = WLAN_EID_EXTENSION; - *pos++ = 1 + sizeof(struct ieee80211_he_operation); - *pos++ = WLAN_EID_EXT_HE_OPERATION; - - oper = (struct ieee80211_he_operation *) pos; - os_memset(oper, 0, sizeof(*oper)); + u8 size = sizeof(oper->he_oper_params) + + sizeof(oper->bss_color_info) + + sizeof(oper->he_mcs_nss_set); + + if(hapd->iface->conf->he_oper.he_oper_params[HE_OPERATION_CAP1_IDX] & + HE_OPERATION_CAP1_VHT_OPER_INFO_PRESENT) { + size += sizeof(oper->vht_op_info_chwidth) + + sizeof(oper->vht_op_info_chan_center_freq_seg0_idx) + + sizeof(oper->vht_op_info_chan_center_freq_seg1_idx); + + hapd->iface->conf->he_oper.vht_op_info_chwidth = + hapd->iface->conf->vht_oper_chwidth; + hapd->iface->conf->he_oper.vht_op_info_chan_center_freq_seg0_idx = + hapd->iface->conf->vht_oper_centr_freq_seg0_idx; + hapd->iface->conf->he_oper.vht_op_info_chan_center_freq_seg1_idx = + hapd->iface->conf->vht_oper_centr_freq_seg1_idx; + } - if (hapd->iface->conf->he_op.he_bss_color) - oper->he_oper_params |= hapd->iface->conf->he_op.he_bss_color; + if(hapd->iface->conf->he_oper.he_oper_params[HE_OPERATION_CAP1_IDX] & + HE_OPERATION_CAP1_CO_LOCATED_BSS) + size += sizeof(oper->max_co_located_bssid_ind); - if (hapd->iface->conf->he_op.he_default_pe_duration) - oper->he_oper_params |= - (hapd->iface->conf->he_op.he_default_pe_duration << - HE_OPERATION_DFLT_PE_DURATION_OFFSET); + *pos++ = WLAN_EID_EXTENSION; + *pos++ = 1 + size; + *pos++ = WLAN_EID_EXT_HE_OPERATION; - if (hapd->iface->conf->he_op.he_twt_required) - oper->he_oper_params |= HE_OPERATION_TWT_REQUIRED; + he_oper = pos; + os_memset(he_oper, 0, size); + os_memcpy(he_oper, + &hapd->iface->conf->he_oper.he_oper_params, + sizeof(oper->he_oper_params)); + + he_oper = (u8 *) (he_oper + sizeof(oper->he_oper_params)); + *he_oper = hapd->iface->conf->he_oper.bss_color_info; + + he_oper = (u8 *) (he_oper + sizeof(oper->bss_color_info)); + os_memcpy(he_oper, + &hapd->iface->conf->he_oper.he_mcs_nss_set, + sizeof(oper->he_mcs_nss_set)); + + if(hapd->iface->conf->he_oper.he_oper_params[HE_OPERATION_CAP1_IDX] & + HE_OPERATION_CAP1_VHT_OPER_INFO_PRESENT) { + he_oper = (u8 *) (he_oper + sizeof(oper->he_mcs_nss_set)); + *he_oper++ = hapd->iface->conf->he_oper.vht_op_info_chwidth; + *he_oper++ = + hapd->iface->conf->he_oper.vht_op_info_chan_center_freq_seg0_idx; + *he_oper++ = + hapd->iface->conf->he_oper.vht_op_info_chan_center_freq_seg1_idx; + } - if (hapd->iface->conf->he_op.he_rts_threshold) - oper->he_oper_params |= - (hapd->iface->conf->he_op.he_rts_threshold << - HE_OPERATION_RTS_THRESHOLD_OFFSET); + if(hapd->iface->conf->he_oper.he_oper_params[HE_OPERATION_CAP1_IDX] & + HE_OPERATION_CAP1_CO_LOCATED_BSS) + *he_oper = hapd->iface->conf->he_oper.max_co_located_bssid_ind; - /* TODO: conditional MaxBSSID Indicator subfield */ + wpa_hexdump(MSG_DEBUG, "hostapd_eid_he_operation:", pos, size); - pos += sizeof(*oper); + pos += size; return pos; } + u8 * hostapd_eid_he_mu_edca_parameter_set(struct hostapd_data *hapd, u8 *eid) { struct ieee80211_he_mu_edca_parameter_set *edca; diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h index 809564dad..2d432a433 100755 --- a/src/common/ieee802_11_defs.h +++ b/src/common/ieee802_11_defs.h @@ -2114,13 +2114,13 @@ struct ieee80211_he_capabilities { } STRUCT_PACKED; struct ieee80211_he_operation { - u32 he_oper_params; /* HE Operation Parameters[3] and - * BSS Color Information[1] */ + u8 he_oper_params[3]; + u8 bss_color_info; u8 he_mcs_nss_set[2]; u8 vht_op_info_chwidth; u8 vht_op_info_chan_center_freq_seg0_idx; u8 vht_op_info_chan_center_freq_seg1_idx; - /* Followed by conditional MaxBSSID Indicator subfield (u8) */ + u8 max_co_located_bssid_ind; } STRUCT_PACKED; /* IEEE 802.11AX DRAFT VER 3.0 */ @@ -2334,22 +2334,36 @@ struct ieee80211_he_operation { /* B7: PPE PAD */ /* HE Operation defines */ -/* HE Operation Parameters and BSS Color Information fields */ -#define HE_OPERATION_BSS_COLOR_MASK ((u32) (BIT(0) | BIT(1) | \ - BIT(2) | BIT(3) | \ - BIT(4) | BIT(5))) -#define HE_OPERATION_PARTIAL_BSS_COLOR ((u32) BIT(6)) -#define HE_OPERATION_BSS_COLOR_DISABLED ((u32) BIT(7)) -#define HE_OPERATION_DFLT_PE_DURATION_MASK ((u32) (BIT(8) | BIT(9) | \ - BIT(10))) -#define HE_OPERATION_DFLT_PE_DURATION_OFFSET 8 -#define HE_OPERATION_TWT_REQUIRED ((u32) BIT(11)) -#define HE_OPERATION_RTS_THRESHOLD_MASK ((u32) (BIT(12) | BIT(13) | \ - BIT(14) | BIT(15) | \ - BIT(16) | BIT(17) | \ - BIT(18) | BIT(19) | \ - BIT(20) | BIT(21))) -#define HE_OPERATION_RTS_THRESHOLD_OFFSET 12 +/* HE Operation Parameters */ +#define HE_OPERATION_CAP0_IDX 0 +#define HE_OPERATION_CAP0_DEFAULT_PE_DURATION ((u8) (BIT(0) | BIT(1) | BIT(2))) +#define HE_OPERATION_CAP0_TWT_REQUIRED ((u8) (BIT(3))) +#define HE_OPERATION_CAP0_TXOP_DUR_RTS_TH ((u8) (BIT(4) | BIT(5) | \ + BIT(6) | BIT(7))) +#define HE_OPERATION_CAP1_IDX 1 +#define HE_OPERATION_CAP1_TXOP_DUR_RTS_TH ((u8) (BIT(0) | BIT(1) | \ + BIT(2) | BIT(3) | BIT(4) | BIT(5))) +#define HE_OPERATION_CAP1_VHT_OPER_INFO_PRESENT ((u8) BIT(6)) +#define HE_OPERATION_CAP1_CO_LOCATED_BSS ((u8) BIT(7)) +#define HE_OPERATION_CAP2_IDX 2 +#define HE_OPERATION_CAP2_ER_SU_DISABLE ((u8) BIT(0)) /* B16 */ +/* B17 ...B23 Reserved */ + +/* HE BSS Color Information field defines */ +#define HE_OPERATION_BSS_COLOR ((u8) (BIT(0) | BIT(1) | \ + BIT(2) | BIT(3) | BIT(4) | BIT(5))) +#define HE_OPERATION_PARTIAL_BSS_COLOR ((u8) BIT(6)) +#define HE_OPERATION_BSS_COLOR_DISABLED ((u8) BIT(7)) + +/* HE MCS and NSS set defines */ +#define HE_MCS_NSS_FOR_1SS ((u8) (BIT(0) | BIT(1))) +#define HE_MCS_NSS_FOR_2SS ((u8) (BIT(2) | BIT(3))) +#define HE_MCS_NSS_FOR_3SS ((u8) (BIT(4) | BIT(5))) +#define HE_MCS_NSS_FOR_4SS ((u8) (BIT(6) | BIT(7))) +#define HE_MCS_NSS_FOR_5SS ((u8) (BIT(0) | BIT(1))) +#define HE_MCS_NSS_FOR_6SS ((u8) (BIT(2) | BIT(3))) +#define HE_MCS_NSS_FOR_7SS ((u8) (BIT(4) | BIT(5))) +#define HE_MCS_NSS_FOR_8SS ((u8) (BIT(6) | BIT(7))) struct ieee80211_he_mu_edca_parameter_set { u8 he_qos_info;