From nobody Wed Jan 15 23:42:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YYMxH5VtCz5kqfd; Wed, 15 Jan 2025 23:42:43 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YYMxH2j0hz3tMq; Wed, 15 Jan 2025 23:42:43 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736984563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=eoLtTdjnufATvhJYJxoRAfrDbOZjCTinDzISFDiqxSM=; b=dohVRh+3w8NU31flCfLpjMEbQe5moJ1fcMHXgW2YjmKMS2fSRh/6zHaNJvog41/uUG9MUX 2DDRRozB5zDwQuJ36bdUq/ja+yTdF38+1c51aB5VOafbZvQsKJHkqNqjh0wFWUsj8xevr6 L6BV7kRTiLAuuBAcn0VJ+skBa0nAtrp1D9D/b7C9AJK9BpinA/BYtbLatLEjMAEKBt0oO5 hB+5SZfX2zusqE+7/03+eEBF0Cq5bbMJ8w9eG5b98ncfBfu1zMjUHalK7xNqPsUYUEaNds Qq8PbWXTzX3S8z6z2mDQ0CvdKcLZLTERLPPvacTmQ/Uf7XTvJiaFF4hcLis4pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736984563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=eoLtTdjnufATvhJYJxoRAfrDbOZjCTinDzISFDiqxSM=; b=fRVoloPptmlI7nW+UOdZrSkLdHolanrtMS6SS2tub9b7+ezYwwj2MG4PBfT9Ze75q7qCck tuYOtch8xzC5ih0XFxOgrxiM8APZd7GQZbrPR3W2SwN/euCVHRaYeXAuSwgq60ppyi/zOi VRKGkho9fy4hA+Y6Fn3NRdansdbenyyLiN48sldAs0MOa4Y6K+DWnpBfHRhNYlJinMYD82 ZBde3hiIVl4ZHbiZl3eJ+Bij4+Z7ObJ6Fe1Gae4ovPckZfd0d8MWVahdeOyYJdAmhvU5He U9KASB/V7+LWH3jemu+2zx12kbP2FGgP13oArFdP75HfeDLmN5zQr6NIhJj3Cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736984563; a=rsa-sha256; cv=none; b=yHaPukb9fs9DJeQarV77ZH8HZb4Rn0f57s3PsWnccUCGb/Duj0t1xKvd+JuFC9bgWzcP5l zIYX+jK+ULaLnMhr3n+J5VlWIYPvQbewWkoW3xb/lza4xUuyyjJ2Li1KGye48si0R4Cex5 jfiTjAKpbDE3p/mkMb5sqKc/kqALlYIRAqUSa0LFHC+SsId8fyCpnWh6RTBhkFDzWw6f54 KQWce7w18f4UhzyaR+LIzyUNvCEIdy4bpurZ9D3UGDZOxSN3XcdxfPzIhbxT3k1NuU+BJo szL1rPalq8uj0b3VQU2QjuQmdutNwMyb1xvTjiNyf3cvW84z2fnwwHDTpJSxCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E6" (verified OK)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4YYMxH1MGBzDmM; Wed, 15 Jan 2025 23:42:43 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id ED34FA64806; Wed, 15 Jan 2025 23:42:34 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 5BA0B2D029DD; Wed, 15 Jan 2025 23:42:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id tNhGCLRD-IhK; Wed, 15 Jan 2025 23:42:40 +0000 (UTC) Received: from strong-aiccu0.sbone.de (strong-aiccu0.sbone.de [IPv6:fde9:577b:c1a9:f491::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 155682D029D8; Wed, 15 Jan 2025 23:42:39 +0000 (UTC) Date: Wed, 15 Jan 2025 23:42:39 +0000 (UTC) From: "Bjoern A. Zeeb" To: Adrian Chadd cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 912a05670ed9 - main - net80211: add helper functions for VHT transmit In-Reply-To: <202501090059.5090xBuW075394@gitrepo.freebsd.org> Message-ID: <4n262snp-q102-67q2-7q11-7qp1qp7rnn25@SerrOFQ.bet> References: <202501090059.5090xBuW075394@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Thu, 9 Jan 2025, Adrian Chadd wrote: > The branch main has been updated by adrian: > > URL: https://cgit.FreeBSD.org/src/commit/?id=912a05670ed9545a1d1b010eedafb819e14eb1b8 > > commit 912a05670ed9545a1d1b010eedafb819e14eb1b8 > Author: Adrian Chadd > AuthorDate: 2024-12-16 02:29:33 +0000 > Commit: Adrian Chadd > CommitDate: 2025-01-09 00:51:51 +0000 > > net80211: add helper functions for VHT transmit > > * Add static helper functions for VHT TX for 20MHz, 40MHz and 80MHz. > * Add a public function to check if the given VHT width is available > for transmit. > > Differential Revision: https://reviews.freebsd.org/D48101 > --- > sys/net80211/ieee80211_vht.c | 137 +++++++++++++++++++++++++++++++++++++++++++ > sys/net80211/ieee80211_vht.h | 4 ++ > 2 files changed, 141 insertions(+) > > diff --git a/sys/net80211/ieee80211_vht.c b/sys/net80211/ieee80211_vht.c > index a05beb91216f..82879f90c67b 100644 > --- a/sys/net80211/ieee80211_vht.c > +++ b/sys/net80211/ieee80211_vht.c > @@ -873,3 +873,140 @@ ieee80211_vht_get_vhtinfo_ie(struct ieee80211_node *ni, > +bool > +ieee80211_vht_check_tx_bw(const struct ieee80211_node *ni, > + enum ieee80211_sta_rx_bw bw) > +{ > + > + switch (bw) { > + case IEEE80211_STA_RX_BW_20: > + return (ieee80211_vht_check_tx_vht(ni)); > + case IEEE80211_STA_RX_BW_40: > + return (ieee80211_vht_check_tx_vht40(ni)); > + case IEEE80211_STA_RX_BW_80: > + return (ieee80211_vht_check_tx_vht80(ni)); > + case IEEE80211_STA_RX_BW_160: > + return (ieee80211_vht_check_tx_vht160(ni)); > + case IEEE80211_STA_RX_BW_320: > + return (false); > + default: > + return (false); > + } You should be able to remove the default case and that'll mean we'll get compiler errors if we add another BW fields in the future and don't handle it ("check this place and implement it" warnings for free). /bz -- Bjoern A. Zeeb r15:7