From patchwork Tue Apr 16 16:16:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 1924301 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=JwHQClc3; 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=RAhIQWp2; 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 4VJq286cmqz1yZC for ; Wed, 17 Apr 2024 02:17:36 +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=WvZ6Rc0xIbq5XEHvnBM4xExweasO+bN2lrGDiCwvEng=; b=JwHQClc3ouiwnD ld76FCpiR4QzLZKZut8gmnFnqUkReuJXB7m8RJGO9OuInsGar4G3zWMmYLsOayYRr2YzqpINe1VzP RYU56AaM2BGKXft+gQUrG561L4Fwp3sJgEF4aRtcJYwyiwRNP5yezj4F3qAtQdLJAknu2LkIckpy1 4pUJ6iZZ6ywleUV7zbmvSb+aU079l+fAU0BppcT683AIxVQWDi+dnk2a7NMnGM4as3/o6j87P0fXw 1zWfejYMXcmOWZpPXnXbUrOtMdkt3ezuGyGJg7aPBOUh1JJOvu9zNHf/XDHWXCV/6bGNb+3uu96WF N6aq94yfMWNJke6PWpPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwlUa-0000000Cxxq-0qCM; Tue, 16 Apr 2024 16:17:08 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwlUX-0000000Cxwi-1rkS for hostap@lists.infradead.org; Tue, 16 Apr 2024 16:17:06 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id D89D861230; Tue, 16 Apr 2024 16:17:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E81CC113CE; Tue, 16 Apr 2024 16:17:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713284224; bh=8BSjP7PYksfIykHUsDBeTEtdJ6m0CpH5FlvFl4ENPyk=; h=From:To:Cc:Subject:Date:From; b=RAhIQWp2TKRQDsXamcQ24aPRPoYzmm6PNo8WMipObr+xDBBhC9LOzeV/nDrunO9rp 0jxKnpZNFASwvK/QU+AUO3CtA+fg71ycyw0fIIowYNs3iW6DM0vQiV4YyVVjqTSs7Y Dpolo/Vr3Lfsif5mkHx4VHOuEoF+eLS7eTxpvK4YIXuVsotw4HWjPdbukBSxOH2QKM BB1QFugycGHIWTU8XTf1Z9TxVltRaeYOuyrv0zn+bAp7bBGIsuqzAsxvGvIcgwHnnu 6r/zaIe8KRlRCU4dVoTluq9rTKY5fuHKDwjJHxSrQB7uk3fSmFBS4W9a6rM70CfPDg lrjnFqIRJtA3g== From: Lorenzo Bianconi To: hostap@lists.infradead.org Cc: j@w1.fi, lorenzo.bianconi83@gmail.com, ryder.lee@mediatek.com, evelyn.tsai@mediatek.com, nbd@nbd.name, allen.ye@mediatek.com, jesus.manzano@galgus.ai, chaitanya.mgit@gmail.com Subject: [PATCH v5 0/4] Introduce Automated Frequency Coordination (AFC) support Date: Tue, 16 Apr 2024 18:16:51 +0200 Message-ID: X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240416_091705_556251_91BA3756 X-CRM114-Status: GOOD ( 10.26 ) X-Spam-Score: -7.0 (-------) 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: (-7.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [139.178.84.217 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_EF Message has a valid DKIM or DK signature from envelope-from 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 -1.8 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 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 | 306 ++++++++++++ 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, 2075 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