From patchwork Wed Mar 2 22:26:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aloka Dixit X-Patchwork-Id: 1600121 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Y5pmX03H; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcdkim header.b=BPKzQWuP; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) 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=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K89X66DKCz9s1l for ; Thu, 3 Mar 2022 10:37:42 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=m2KzoOCYEvJCk91YHntvlAZs5Adrjan6nb7M8WKZGc0=; b=Y5pmX03H8AyVZn XCFuChHPaNFUfZaHUTF6pcBvAFjEtZX3hIZ21xhXzClBhAVVx/eVWV5Xh5LA16kt97Fj5dZ8CVjiA ynRcRvJxDuTyw8RtiTdGkk+YNXpi3B1yranaZvDop3ShyQ15/9hcZt7NqQpw8LkJOoMgDUCX9nt3y F/Dc1YY8rQ65N614AhLiKij5T3q9dfvrheOHaShYp0dsVvCSrrjzM3EI+ImoCWVUceoxFapU98G09 6qC0W3jWCvs8ig9Ca/QnpcfW5jBipZHA8Jp3a5s396UDk1Kccuxe+tiw06qJao412dM6cJaWXtvgH ETJRnhDCDgWmE4ZnTzfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPYWK-004iZx-TD; Wed, 02 Mar 2022 23:36:36 +0000 Received: from alexa-out.qualcomm.com ([129.46.98.28]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPXRB-004Yl7-N4 for hostap@lists.infradead.org; Wed, 02 Mar 2022 22:27:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1646260034; x=1677796034; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=OTpU8Sn2gMB1nbxtIW7TdKj9eDCVVxWflewxDlrmi7g=; b=BPKzQWuPxeytVeX91AoPBfohrxZ9SlVzVoumSCaVBwcc0KTDsl/MQwxI A5onj71qZpysOp2nmqdhLsMRPGr69wRAPO+Q1vUgTuR5vD+SOPZfNCriM i9c0ELpQVxrCW+QS736h6x4OdU9va88swwrBuMHuofG1CQ4LSXXWKQLcl A=; Received: from ironmsg08-lv.qualcomm.com ([10.47.202.152]) by alexa-out.qualcomm.com with ESMTP; 02 Mar 2022 14:27:06 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg08-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2022 14:27:06 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Wed, 2 Mar 2022 14:26:47 -0800 Received: from alokad-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Wed, 2 Mar 2022 14:26:46 -0800 From: Aloka Dixit To: , Subject: [PATCH 06/13] mbssid: add MBSSID configuration element Date: Wed, 2 Mar 2022 14:26:27 -0800 Message-ID: <20220302222634.22185-7-quic_alokad@quicinc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220302222634.22185-1-quic_alokad@quicinc.com> References: <20220302222634.22185-1-quic_alokad@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220302_142713_829989_CFAE2F97 X-CRM114-Status: GOOD ( 14.54 ) X-Spam-Score: -2.5 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Add data as per IEEE Std 802.11ax-2021 9.4.2.260 Multiple BSSID Configuration element when enhanced multiple BSSID advertisements (EMA) are enabled. This element informs the clients about the EMA prof [...] Content analysis details: (-2.5 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [129.46.98.28 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-Mailman-Approved-At: Wed, 02 Mar 2022 15:34:45 -0800 X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Add data as per IEEE Std 802.11ax-2021 9.4.2.260 Multiple BSSID Configuration element when enhanced multiple BSSID advertisements (EMA) are enabled. This element informs the clients about the EMA profile periodicity of the multiple BSSID set. Co-developed-by: John Crispin Signed-off-by: John Crispin Signed-off-by: Aloka Dixit --- src/ap/beacon.c | 35 +++++++++++++++++++++++------------ src/common/ieee802_11_defs.h | 1 + 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/ap/beacon.c b/src/ap/beacon.c index 3d45f4a69f2c..b2b2bfa8babe 100644 --- a/src/ap/beacon.c +++ b/src/ap/beacon.c @@ -428,8 +428,9 @@ static u8 * hostapd_eid_supported_op_classes(struct hostapd_data *hapd, u8 *eid) } -static void hostapd_set_mbssid_beacon(struct hostapd_data *hapd, - struct wpa_driver_ap_params *params) +static u8 * hostapd_set_mbssid_beacon(struct hostapd_data *hapd, + struct wpa_driver_ap_params *params, + u8 *eid) { struct hostapd_iface *iface = hapd->iface; struct hostapd_data *tx_bss; @@ -437,17 +438,17 @@ static void hostapd_set_mbssid_beacon(struct hostapd_data *hapd, u8 num_mbssid = 0, *end; if (!iface->conf->mbssid || iface->num_bss == 1) - return; + return eid; if (!iface->mbssid_max_interfaces) { wpa_printf(MSG_DEBUG, "MBSSID: Driver doesn't support multi-BSSID advertisements"); - return; + return eid; } else if (iface->num_bss > iface->mbssid_max_interfaces) { wpa_printf(MSG_DEBUG, "MBSSID: Driver supports maximum %u interfaces for multi-BSSID advertisements", iface->mbssid_max_interfaces); - return; + return eid; } tx_bss = hostapd_mbssid_get_tx_bss(hapd); @@ -460,26 +461,26 @@ static void hostapd_set_mbssid_beacon(struct hostapd_data *hapd, if (!iface->ema_max_periodicity) { wpa_printf(MSG_DEBUG, "MBSSID: Driver doesn't support enhanced multiple BSSID advertisements"); - return; + return eid; } if (num_mbssid > iface->ema_max_periodicity) { wpa_printf(MSG_DEBUG, "MBSSID: Driver supports maximum %u EMA profile periodicity", iface->ema_max_periodicity); - return; + return eid; } params->ema = 1; } if (hapd != tx_bss || !num_mbssid) - return; + return eid; params->mbssid_elem_count = num_mbssid; params->mbssid_elem = os_zalloc(len); if (!params->mbssid_elem) { wpa_printf(MSG_ERROR, "Memory allocation failed for multiple BSSID elements"); - return; + return eid; } params->mbssid_elem_offset = os_zalloc(params->mbssid_elem_count * @@ -489,7 +490,7 @@ static void hostapd_set_mbssid_beacon(struct hostapd_data *hapd, "MBSSID: Memory allocation failed for multiple BSSID element offsets"); os_free(params->mbssid_elem); params->mbssid_elem = NULL; - return; + return eid; } end = hostapd_eid_mbssid(tx_bss, params->mbssid_elem, @@ -498,7 +499,15 @@ static void hostapd_set_mbssid_beacon(struct hostapd_data *hapd, params->mbssid_elem_count, params->mbssid_elem_offset); params->mbssid_elem_len = end - params->mbssid_elem; - return; + + if (hapd->iconf->ema) { + *eid++ = WLAN_EID_EXTENSION; + *eid++ = 3; + *eid++ = WLAN_EID_EXT_MULTIPLE_BSSID_CONFIGURATION; + *eid++ = iface->num_bss; + *eid++ = params->mbssid_elem_count; + } + return eid; } @@ -1558,6 +1567,8 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd, } #endif /* CONFIG_IEEE80211AX */ + if (hapd->iconf->ema) + tail_len += 5; /* Multiple BSSID Configuration element */ tail_len += hostapd_eid_rnr_len(hapd, WLAN_FC_STYPE_BEACON); tail_len += hostapd_mbo_ie_len(hapd); tail_len += hostapd_eid_owe_trans_len(hapd); @@ -1643,7 +1654,7 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd, tailpos = hostapd_eid_supported_op_classes(hapd, tailpos); tailpos = hostapd_eid_ht_capabilities(hapd, tailpos); tailpos = hostapd_eid_ht_operation(hapd, tailpos); - hostapd_set_mbssid_beacon(hapd, params); + tailpos = hostapd_set_mbssid_beacon(hapd, params, tailpos); tailpos = hostapd_eid_ext_capab(hapd, tailpos); diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h index cd4d60a77d26..f0003655a002 100644 --- a/src/common/ieee802_11_defs.h +++ b/src/common/ieee802_11_defs.h @@ -480,6 +480,7 @@ #define WLAN_EID_EXT_HE_MU_EDCA_PARAMS 38 #define WLAN_EID_EXT_SPATIAL_REUSE 39 #define WLAN_EID_EXT_OCV_OCI 54 +#define WLAN_EID_EXT_MULTIPLE_BSSID_CONFIGURATION 55 #define WLAN_EID_EXT_SHORT_SSID_LIST 58 #define WLAN_EID_EXT_HE_6GHZ_BAND_CAP 59 #define WLAN_EID_EXT_EDMG_CAPABILITIES 61