Message ID | 20230522193412.658666-17-andrei.otcheretianski@intel.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) Authentication-Results: legolas.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=2Vu2aiDo; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=BqMgCUoY; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QQ73N595nz20PS for <incoming@patchwork.ozlabs.org>; Tue, 23 May 2023 05:36:00 +1000 (AEST) 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:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aLrgAYxXdKnUsP6TAfgwwOTpvWlOPHcqWq17s0hP4s8=; b=2Vu2aiDo3abE/6 mYM6drTGx0RCthaM3YoqIROEOnzs7Av9HN9scYyMt3hbdO0oFA1436zYY3GU0Df3ca+ic6XGsO6qm kb9I0t0vYOx143yWGOasiAnXlaLuW1VJcFQ+ChlKDGhmGWY1QCx2opm/gCv8AcOX6FTc80azOo/Hf 1/jqnfb+LAcnPFKOuiapU0Cx68arN63S3+Dag9c6hAWYhDg0d83ip2rZuNhqXh0LPNtY+UqRaqxJF grFKKajzM68sGQrim/Ubyy/qRbPUphuRr/3pX6FcR9FeoLUM9zhTJM8XtHTEyS7bzA7KUcQ3MGAJ8 6QXYAZqxrOR05Z6Ib7Og==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q1BJK-007hri-1C; Mon, 22 May 2023 19:35:14 +0000 Received: from mga04.intel.com ([192.55.52.120]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q1BJ9-007hZy-0l for hostap@lists.infradead.org; Mon, 22 May 2023 19:35:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684784103; x=1716320103; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UdGvvn2zUrldXJwxxfksKYC7G32irJy/2BDXIBNNHwE=; b=BqMgCUoYnjOO7khG8hUCDBdf0v4E8IOux84MmE9jTD9xQg4RKbc10Z+j AWx5w6QTrYzJquvkPoowPpkpMv1NzJRTQ5EsgNKKVyuvzigj9vV/Q9atQ Log7u0ZbmTqQXuo1Ht8xXR+D1HSPYZ4YRgS8Nxkt2xQhUVIE0Ic99Fg3q LUbeiHg/ysMm3zgu5m+7lA7kYnFaYsyxe/Xtrkzp/4y7Hvm//9jqR13NL LJaGqkyAFuNHSyV/ibPlR38eFbSH/zcXSrNF0pjaS3ZoK8QdP4KuRbPFV 8/pUmKFOCCKj0qxvNVqgftYroOS+dFCjh1+tJi4AQWXRCwnbH2MOcTUp7 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10718"; a="351869145" X-IronPort-AV: E=Sophos;i="6.00,184,1681196400"; d="scan'208";a="351869145" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2023 12:35:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10718"; a="827809153" X-IronPort-AV: E=Sophos;i="6.00,184,1681196400"; d="scan'208";a="827809153" Received: from ghorst-mobl3.ger.corp.intel.com (HELO aotchere-desk.intel.com) ([10.254.149.56]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2023 12:35:01 -0700 From: Andrei Otcheretianski <andrei.otcheretianski@intel.com> To: hostap@lists.infradead.org Cc: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Subject: [PATCH v2 16/44] AP: Support AID allocation for MLD Date: Mon, 22 May 2023 22:33:44 +0300 Message-Id: <20230522193412.658666-17-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230522193412.658666-1-andrei.otcheretianski@intel.com> References: <20230522193412.658666-1-andrei.otcheretianski@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230522_123503_360934_E95350B4 X-CRM114-Status: GOOD ( 14.23 ) X-Spam-Score: -2.7 (--) 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: Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> --- src/ap/ieee802_11.c | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index 7495c04d04..1cc42ea83c 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -3252,6 +3252,43 @@ static u8 hostapd_max_bssid_indica [...] Content analysis details: (-2.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.120 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender 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 -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <hostap.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/hostap>, <mailto:hostap-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/hostap/> List-Post: <mailto:hostap@lists.infradead.org> List-Help: <mailto:hostap-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/hostap>, <mailto:hostap-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Hostap" <hostap-bounces@lists.infradead.org> Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
Add basic MLO support for AP
|
expand
|
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index 7495c04d04..1cc42ea83c 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -3252,6 +3252,43 @@ static u8 hostapd_max_bssid_indicator(struct hostapd_data *hapd) } +static u32 hostapd_get_aid_word(struct hostapd_data *hapd, + struct sta_info *sta, int i) +{ +#ifdef CONFIG_IEEE80211BE + u32 aid_word = 0; + + /* For MLD case, don't use AID's from other links */ + if (hapd->conf->mld_ap) { + int j; + + for (j = 0; j < MAX_NUM_MLD_LINKS; j++) { + struct hostapd_data *link_bss; + + if (!sta->mld_info.links[j].valid) + continue; + + link_bss = hostapd_mld_get_link_bss(hapd, j); + if (!link_bss) { + /* This shouldn't happen, just skip */ + wpa_printf(MSG_ERROR, + "Failed to get link BSS for AID"); + continue; + } + + aid_word |= link_bss->sta_aid[i]; + } + + return aid_word; + } else { + return hapd->sta_aid[i]; + } +#else + return hapd->sta_aid[i]; +#endif +} + + int hostapd_get_aid(struct hostapd_data *hapd, struct sta_info *sta) { int i, j = 32, aid; @@ -3266,10 +3303,12 @@ int hostapd_get_aid(struct hostapd_data *hapd, struct sta_info *sta) return -1; for (i = 0; i < AID_WORDS; i++) { - if (hapd->sta_aid[i] == (u32) -1) + u32 aid_word = hostapd_get_aid_word(hapd, sta, i); + + if (aid_word == (u32) -1) continue; for (j = 0; j < 32; j++) { - if (!(hapd->sta_aid[i] & BIT(j))) + if (!(aid_word & BIT(j))) break; } if (j < 32)
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> --- src/ap/ieee802_11.c | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-)