From patchwork Fri May 17 09:50:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 1936365 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=VcZuIU+5; 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=KYR6xKe8; 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 4Vgj0Q1724z20dj for ; Fri, 17 May 2024 19:51:32 +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=MHrHlWs8fy+8ltm9we5CqdviWtQfOwXfMQGIKGgydi4=; b=VcZuIU+5VZVpCp gpbNjaPSYqala9uP7hqeYie+S7NVwa0LUUKp7Lbyk/exG2FcWKonvsYTSb27EUPxdNrfX1gO2Q+uw q7MdpT4g5is/z1rytAAyxQYOLEDFzxj7IlXxfSFpg8telt2YQWo6wBsvTar9rwJ5QaU5wbeqSaMKC YNFDqZ7E5rXOBXJwyKxuq9OLJ+5anlggfH8y5g1w2bMSLNR3bDzviQhA+C2E/XMGzJ8UuHqdc1d3u EkI+h7ulT8TFv+UJSes7e7kEqtShga6YeaEgX3PtqjDRpCnx+qap7VUGSPPRnbCDJ0YhSN5OAqXvR RCeI6I5l5dfVu8ffVw+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7uEt-00000007Pz2-0z9x; Fri, 17 May 2024 09:50:59 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7uEk-00000007Pu8-2uOX for hostap@lists.infradead.org; Fri, 17 May 2024 09:50:55 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 6567461884; Fri, 17 May 2024 09:50:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 692B5C2BD11; Fri, 17 May 2024 09:50:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715939449; bh=qwP0iIGk99kYLbK3z8K2LNaJmioY6/GB1ONHJdWscqE=; h=From:To:Cc:Subject:Date:From; b=KYR6xKe8rKv4hSW9LaKRt0jFOKZ+vksLnX1iGqhe9uGwCNkBYBEIFJXaAHXRljiTW 5GXdtn68a/VZqMjuq32cIRrYYakSATYaQzSxy050PXFcbJnecYXMo0IwyTyWJ+SP9l Ak3lg1eUzCHHPJINCWdY4QuykBaKVE2sjls9W849aukRCCaLx8NW9oLSJAat6429TK +j4GcwI1oaPCxl11nqb0FGB17mYobA4tSN+tX+Xz3Xe4FZ6TPJcb2aFAxyH6or4NLy 1QqolDJesG8LxtI97pKmoSCT1P6Gc5/GrkmyG3haPSXfaM9BFROkaHQ33XH6keCG5X Spg9WhOPgOKDQ== 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, chaitanya.mgit@gmail.com Subject: [PATCH v7 0/4] Introduce Automated Frequency Coordination (AFC) support Date: Fri, 17 May 2024 11:50:24 +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-20240517_025050_985058_F943655F X-CRM114-Status: GOOD ( 12.43 ) 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:4641:c500: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_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 -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's 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 v6: - do not run acs in hostapd_afc_handle_request() if the configured channel is available in the AFC list from the coordinator - fix possible crash in hostap_afc_disable_channels() - add more debug log in hostapd_afc_parse_reply() 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 | 1078 +++++++++++++++++++++++++++++++++++++++++ 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, 2119 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