From nobody Tue Jan 07 18:18:24 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 4YSK6m5lZGz5jj60; Tue, 07 Jan 2025 18:18:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YSK6m50VRz4lbr; Tue, 7 Jan 2025 18:18:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736273904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xVZH8ZUljoZDyb/Pyy23l76yYfiLNzmdcgW47Vzi3BU=; b=UKihHsCqF0/CmsTSP4szCMzEiTvw/YsV2HIRyrI7TAjY28qNz3cUt77KRaFh+f61oi8BAB oSJ/gVcPlz9olgjqDvzKxZQ9PDpoaXDNeyJQfIhj4MjP6kZxVIcvjSmp/mikAEnHuSwag4 0ui94fMHtGdMl7o4rbfySPIYjzmd2+XoQQVmG+11Oayjj7ODQPmCSBeoexkvAAt1BiFt6R 7O4+QH2+XyQ3HTg0DGs8Fmh1UnXaWx3Ie4OEVqLE5KbaYEljcknOOW2RllOtXAIuWbK5+Y oxnrqAFBsetIN7T+ZaTQWiI66zl+55eWoOmtLg/RzGVFlp4PllJFwG038JWAnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736273904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xVZH8ZUljoZDyb/Pyy23l76yYfiLNzmdcgW47Vzi3BU=; b=l8jbw9YbJXA7bq8bcgGab/fi2QD030Tf7izggo7BbiICCw+a1x0bmaHKbZoMHZfyEz4ewq eygOQvfONroL8XdcsvcmD5J/mTQPeRyumdY0ex9jDvtMlrZNoV2qzCOND4XhZVN/WnmrJ1 TylDQ44tmrX2eGIf9uDcoCu+FDB4qkCOB8bRJYPRxorL2nn165uHiuDiXxIfFF3wWN5W2V VBVRbnMqXbT4VzbaCuJI06dp21ZHZfNQPtsLYN55jcLP49qXoMvQrXjm92iGYqMjlpP6km 2FZmZlxWXVLacWcwdaW7fduopuL9gFZOMuJsWKWkpes0g8RA5wamOh6yjQUZgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736273904; a=rsa-sha256; cv=none; b=OO6LaAFisTDnzBLeXZpcYP3dmDNFw9q/RsfnyKR51n9vV8MPHy41ggaXNl9F1j8mwIogY1 ZXtZEJQm5nm1rnlXOlG9pFAcTVNdHbC9H0Tv+1mjXd42jIhPb/J1t4owxa1hPZC2yMFOW6 HQvMXgJJ8mK+p1lRj6a17gdzXeejaCELhKDleF6z+HpwXXtjSqgOT77MYOkL+YHC300hds s8D/URE4T/h5uVl6tkb5FmMG6CBIGnIBLUldcyJhOQ1tlQ58eOBj2j4dP4z3vQe5IvIl4m jkXZjlNs61WiW8TSWei5n+awdQRXbXjsUxRKGcBXjnwISOc3xN32IkaY3xSchg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YSK6m4TPMz5lF; Tue, 07 Jan 2025 18:18:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 507IIO9a030835; Tue, 7 Jan 2025 18:18:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 507IIOGA030832; Tue, 7 Jan 2025 18:18:24 GMT (envelope-from git) Date: Tue, 7 Jan 2025 18:18:24 GMT Message-Id: <202501071818.507IIOGA030832@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 5fdc4824a5e2 - main - net80211: (v)ht: use macros at hand 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=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5fdc4824a5e2646a07c0638eca9f5c81b0b85fd5 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5fdc4824a5e2646a07c0638eca9f5c81b0b85fd5 commit 5fdc4824a5e2646a07c0638eca9f5c81b0b85fd5 Author: Bjoern A. Zeeb AuthorDate: 2025-01-04 08:06:58 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-01-07 18:17:35 +0000 net80211: (v)ht: use macros at hand Rather than duplicating the manual logic here and leaving a comment, use the self-explanatory macros we already have. No functional changes intended. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D48359 --- sys/net80211/ieee80211_ht.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index e2506c1e0ce0..2ec5ffb1a2af 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -1934,9 +1934,7 @@ ieee80211_vht_get_vhtflags(struct ieee80211_node *ni, uint32_t htflags) vhtflags = 0; if (ni->ni_flags & IEEE80211_NODE_VHT && vap->iv_vht_flags & IEEE80211_FVHT_VHT) { if ((ni->ni_vht_chanwidth == IEEE80211_VHT_CHANWIDTH_160MHZ) && - /* XXX 2 means "160MHz and 80+80MHz", 1 means "160MHz" */ - (_IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, - IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) >= 1) && + IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ(vap->iv_vht_cap.vht_cap_info) && (vap->iv_vht_flags & IEEE80211_FVHT_USEVHT160)) { vhtflags = IEEE80211_CHAN_VHT160; /* Mirror the HT40 flags */ @@ -1946,9 +1944,7 @@ ieee80211_vht_get_vhtflags(struct ieee80211_node *ni, uint32_t htflags) vhtflags |= IEEE80211_CHAN_HT40D; } } else if ((ni->ni_vht_chanwidth == IEEE80211_VHT_CHANWIDTH_80P80MHZ) && - /* XXX 2 means "160MHz and 80+80MHz" */ - (_IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, - IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK) == 2) && + IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160_80P80MHZ(vap->iv_vht_cap.vht_cap_info) && (vap->iv_vht_flags & IEEE80211_FVHT_USEVHT80P80)) { vhtflags = IEEE80211_CHAN_VHT80P80; /* Mirror the HT40 flags */