From patchwork Fri May 17 09:50:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 1936363 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=MpuVmxSH; 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=mW1anw4j; 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 4Vgj0Q0LMJz20dg 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: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=oKM26MLNq4Sqw74mqondfrqNgbQqwGN2ozwWGSf8ZFQ=; b=MpuVmxSHnAXoQ1 Soh4r5/Lr9TrmZeQ/HuudcKecsGY0hak87EWBjeN1BQY5erK/OQMyXY9mm/GNiGepb7vtp006XEAj LmH0LfLgezUsLf/HX/S0rqhR4Uuyx8z7a2UCx3zG7BJfpQ9lOQdyt18/INmzMrw9B4wyjHDnSHeUX KNGcZ3GqoOakKsLCT18vulNVdWD66czc50lp4Imt9pihPXwOy4neJSBTwGE421umRr0p0LFlmGDCP AGYD9Divwokg7027n0wKikVgMjKZanOpL3TVVt+EDP35L9vVS3VUOQy2+2whTqwdmSWjzU8B9Yl3s ao45yt9PZLCF7TwIwzSQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7uF1-00000007Q4J-1Wai; Fri, 17 May 2024 09:51:07 +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 1s7uEo-00000007PxF-0uQx for hostap@lists.infradead.org; Fri, 17 May 2024 09:51:02 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id A274261982; Fri, 17 May 2024 09:50:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5CB3C32786; Fri, 17 May 2024 09:50:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715939453; bh=o811aR09+CnBkQqKFMfrK/URsRqpzDiIyHha22rPr0o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mW1anw4j2tLN/38zVfAxN0rO9qHXfyHRZ3fSxgEkVED/VagTW2/HW7nw2WBubPLaa Ytojb+wkPHcIt5tZ/iViNd9flzjRJ+5czlGoDzT0uAR/TXVrJ2Ek2O9IfmAj1f0TeH uU0TFIsnPGAShzcBJ0nbfrf9K1C7Xixmz47QLwdvLYOltM2qRR9V5E6BXnH4IQU0/+ Jq1eEho6Kgg0cLcwcsha3CaTbx2f7vnuR2MjSfWe4b+QTD19H5pGAsGEWQWvBAEpd2 bL2mAuNmt3mr6bKjt1fTOa4NWmtm2iQvQmc9IQv5Q47nwwidDm1+u1uM7KcbmYMHOg PMQ/EU77QcQkQ== 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 2/4] hostapd: export hostapd_is_usable_chans utility routine Date: Fri, 17 May 2024 11:50:26 +0200 Message-ID: <0b2ea38c48cccf4b15779b50354b4fb992f793ad.1715939295.git.lorenzo@kernel.org> X-Mailer: git-send-email 2.45.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240517_025054_875089_464A0779 X-CRM114-Status: GOOD ( 10.29 ) 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: This is a preliminary patch to introduce AFC support. Tested-by: Felix Fietkau Tested-by: Allen Ye Tested-by: Krishna Chaitanya Signed-off-by: Lorenzo Bianconi --- src [...] 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 This is a preliminary patch to introduce AFC support. Tested-by: Felix Fietkau Tested-by: Allen Ye Tested-by: Krishna Chaitanya Signed-off-by: Lorenzo Bianconi --- src/ap/hw_features.c | 2 +- src/ap/hw_features.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c index c4556603d..85e67080d 100644 --- a/src/ap/hw_features.c +++ b/src/ap/hw_features.c @@ -1008,7 +1008,7 @@ static bool hostapd_is_usable_punct_bitmap(struct hostapd_iface *iface) * 0 = not usable * -1 = not currently usable due to 6 GHz NO-IR */ -static int hostapd_is_usable_chans(struct hostapd_iface *iface) +int hostapd_is_usable_chans(struct hostapd_iface *iface) { int secondary_freq; struct hostapd_channel_data *pri_chan; diff --git a/src/ap/hw_features.h b/src/ap/hw_features.h index c682c6d20..eeffb1abd 100644 --- a/src/ap/hw_features.h +++ b/src/ap/hw_features.h @@ -30,6 +30,7 @@ void hostapd_stop_setup_timers(struct hostapd_iface *iface); int hostapd_hw_skip_mode(struct hostapd_iface *iface, struct hostapd_hw_modes *mode); int hostapd_determine_mode(struct hostapd_iface *iface); +int hostapd_is_usable_chans(struct hostapd_iface *iface); #else /* NEED_AP_MLME */ static inline void hostapd_free_hw_features(struct hostapd_hw_modes *hw_features, @@ -103,6 +104,11 @@ static inline int hostapd_determine_mode(struct hostapd_iface *iface) return 0; } +static inline int hostapd_is_usable_chans(struct hostapd_iface *iface) +{ + return 1; +} + #endif /* NEED_AP_MLME */ #endif /* HW_FEATURES_H */