From patchwork Tue May 14 12:05:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 1934997 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=r0RaxRaw; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=ufDcAFge; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vdw7m5ZtPz1ymw for ; Tue, 14 May 2024 22:06:44 +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: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:In-Reply-To:References: List-Owner; bh=EVhTy+zoJ5payA7Gvjo7MU69/wahegqSeZYDR0hrzyc=; b=r0RaxRawwjoiDT eC/f+l40ekH7wwx36Ui23TnC9BoADvn24ZgncUx3kK3/sVzG9M4qlhv0kg2Y4GIJn3mJtjgE/Awjp NTHtQXUEXIHlryyGNt2iFCmhIqrCBowFk7BSIgYSl97rPrJCD/dRVG0hDcnfs05+Xb7Ay9fwelRhn Pc/u0Zm8OEgoN3fVZJMScKybcCOvpABT/HzaeLvShZUqB+aZ3+ck5V+I/3NUuXYNAMZKEGsZ2f0fs JyE46KvyP0342B9E8oQQi2agUGbHpyNT0s4l520yTO1B3YRVbOd8UBbkYhpbU9O3WhwVx++m/5U4L zzBjaL5kMhuOZh85zFlQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s6qv2-0000000FoG8-2WLb; Tue, 14 May 2024 12:06:08 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s6quz-0000000FoF8-20k3 for hostap@lists.infradead.org; Tue, 14 May 2024 12:06:06 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 82758CE122C; Tue, 14 May 2024 12:06:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBE9EC2BD10; Tue, 14 May 2024 12:05:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715688361; bh=uiAU/gpRfUrB9vk6CAgfEmgcVRx0icgGz3JAmVhHtDs=; h=From:To:Cc:Subject:Date:From; b=ufDcAFgeW1jMH60eoN7WEazgVvBGFER0gdlaCGnjMV43sjtBHvZP89NsaKkzNEuzp XXiDEWyqdSuQrZKQQypChlO486VWLO2M+majh4FZusQYXCAyC5TIBpXMZxTYmmjfl3 zm3j9gbYTlVXA4sr8BgWI23J56Q5MGaqEsvC63Gdq6vwX4YuWf+p+AvgsJB3TPuAGy XzpaTDOC3wzBE4lqbcRyePDUipRWEnTTNo9tLSF+KwIvKrkKXRZy3l/wNrOKcgBs/i B+Om90r57ZJ9ioo+W37M1x9aGFPNlcw/MJ6Izbv4HJUYOEr8nbfJU8GvlxpXGHo1Pj bz8e2qZk4s6LQ== From: Lorenzo Bianconi To: hostap@lists.infradead.org Cc: lorenzo.bianconi83@gmail.com, j@w1.fi, ryder.lee@mediatek.com, evelyn.tsai@mediatek.com, nbd@nbd.name, allen.ye@mediatek.com Subject: [PATCH v6 0/4] Introduce Automated Frequency Coordination (AFC) support Date: Tue, 14 May 2024 14:05:44 +0200 Message-ID: X-Mailer: git-send-email 2.45.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240514_050605_717153_2D6C69D7 X-CRM114-Status: GOOD ( 11.00 ) X-Spam-Score: -3.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: Introduce Automated Frequency Coordination (AFC) support for UNII-5 and UNII-7 6GHz bands. Update Transmit Power Envelope (TPE) IE according to the reply from AFC coordinator on UNII-5 or UNII-7 6GHz [...] Content analysis details: (-3.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 [2604:1380:40e1:4800:0:0:0:1 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -1.0 DKIMWL_WL_HIGH DKIMwl.org - High trust sender 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 Introduce Automated Frequency Coordination (AFC) support for UNII-5 and UNII-7 6GHz bands. Update Transmit Power Envelope (TPE) IE according to the reply from AFC coordinator on UNII-5 or UNII-7 6GHz bands. AFCD and AFC hostapd client are tested with AFC DUT Test Harness [0]. Changes since v5: -rebased on top of hostapd main branch Changes since v4: - fix curl header parsing - increase afc buffer size - fix afc-reply.txt - add some more error logging - add sanity check for some afc config file data Changes since v3: - fix compilation errors when IEEE80211_AX is not enabled - fix a leftover crash stopping the interface - make sure rx buffer is null-terminated Changes since v2: - multiple fixes testing with AFC DUT Test Harness Changes since v1: - use unix socket instead of a tcp one Changes since rfc: - move curl connection to a dedicated afc daemon Lorenzo Bianconi (4): hostapd: afcd: add AFC daemon support hostapd: export hostapd_is_usable_chans utility routine hostapd: ap: add AFC client support hostapd: update TPE IE according to AFC afc/.gitignore | 1 + afc/Makefile | 31 ++ afc/afc-reply.txt | 219 +++++++++ afc/afcd.c | 305 ++++++++++++ hostapd/Makefile | 8 + hostapd/config_file.c | 261 +++++++++++ hostapd/defconfig | 3 + hostapd/hostapd.conf | 42 ++ src/ap/afc.c | 1033 +++++++++++++++++++++++++++++++++++++++++ src/ap/ap_config.c | 16 + src/ap/ap_config.h | 47 ++ src/ap/hostapd.c | 16 + src/ap/hostapd.h | 54 +++ src/ap/hw_features.c | 4 +- src/ap/hw_features.h | 6 + src/ap/ieee802_11.c | 47 +- 16 files changed, 2074 insertions(+), 19 deletions(-) create mode 100644 afc/.gitignore create mode 100644 afc/Makefile create mode 100644 afc/afc-reply.txt create mode 100644 afc/afcd.c create mode 100644 src/ap/afc.c