From nobody Fri Jul 29 15:15:14 2022 X-Original-To: dev-commits-src-all@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 4LvWKZ4rYHz4XT2x; Fri, 29 Jul 2022 15:15:14 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LvWKZ4KgWz3MQb; Fri, 29 Jul 2022 15:15:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659107714; 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=Ll5kuGeRJT9Gk4A9bdoBad3TX0/hmxZXwVFqTP237ds=; b=oyRqTDXEvuD++t1uNOA2oAdfbKTVYBsFsL8+xhFWc//2QWbvuH1ozDEhL3wcP7BI8Ocn6q 9e0IykAb0LUX4VwSyVjgelY1Nb2cbLJusIp6CEhiTCIvn9FS0DvWtQxg+JYwZd1i3KpLMy YifgdhfOX5Q7/0yXgtciIrnVKMtA12fCjSDv5kPMFlFgWU/v4iIi08CtB1h6yVfZboPc7f OMwtTg9WcMSHHHDAbwKmQ9ssmskEhyMhKyAlb9U7c+Gf+kU4uTMy2Hhmb953pdMfSAgYN2 w8y0apvxhEPr5g5LabgQGXMeluSevVu7yWJ6rahkZ+k753a41bOunzhuh3gujQ== 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 4LvWKZ3MHCzfxL; Fri, 29 Jul 2022 15:15:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26TFFEIi037684; Fri, 29 Jul 2022 15:15:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26TFFEnr037683; Fri, 29 Jul 2022 15:15:14 GMT (envelope-from git) Date: Fri, 29 Jul 2022 15:15:14 GMT Message-Id: <202207291515.26TFFEnr037683@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: dc32c7133921 - main - net80211: VHT correct check/option in ieee80211_vht_adjust_channel() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: dc32c7133921a34f3144a4b5fc4f7c1f6cddbd1f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659107714; 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=Ll5kuGeRJT9Gk4A9bdoBad3TX0/hmxZXwVFqTP237ds=; b=w++EdLE8Xwx/S/qewb1E0TStHqIB0SIvjauSgeT3HOBBGk2tIQNtnIcUXt7dig/T0CHNhT 68iNb+xurNMob0akehs19c2s/ELNlQ/SKUgGAgpLxPERPCht+zcedZD04U0bA9E4maqC0j nGbLvALuRwtJA1/YGDRywuHFkQQjTHi5u34kTFT+hyZBqgI8QX+cCbsuJAtKWDsQIoX4xt NEo5PPvAnrUQRaLQdpBTbSCCY8Vi8mbChqu0WgjZOTRKwS48lz9wUAH5wadbwm9uAUViEk rrXGa8WBLjVU7CaHipDRujHkXpCkyG8THveA65xZFS9hx4dcLFyeVK9OioPiCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659107714; a=rsa-sha256; cv=none; b=DmOgjTNskOppMmNmPY90ClTN+VN7GA9WnjG4btUgG81zqiiA+vkb5ymxHPYL4d+xmVvvBv M6+RPhAYz7ksOigHwbT67BqeHKJuGvZhJib403Alwb1YtlQV5Dqhi2/cntc9TTOu7OJYVj WOjFM4ercCp+xsfr6DpSO/v2Ef9YD3N21zJcZKqJgd/9SPne5DpNUxuxh+2Pr1+G04/aDw Sz6YsmMOa3skaKnXGsbAo1VXtLGyC37vc5cjgkXCIMCEP/ZFEhy9begcu2KZE2t+UUCcek u0l9n3HIAWpLJpO0GDHcFvai67Ef7GqafFSIlglOcQ+PPYCC4j13J0t1qykMjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=dc32c7133921a34f3144a4b5fc4f7c1f6cddbd1f commit dc32c7133921a34f3144a4b5fc4f7c1f6cddbd1f Author: Bjoern A. Zeeb AuthorDate: 2022-07-29 00:12:34 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-07-29 15:10:45 +0000 net80211: VHT correct check/option in ieee80211_vht_adjust_channel() In ieee80211_vht_adjust_channel() we have to check for all possible IEEE80211_FVHT_VHT* options using the mask rather than just checking for IEEE80211_FVHT_VHT; ieee80211_vhtchanflags() (contrary to its HT counterpart) only returns the "highest" flag nor or-ing them together with the base flag. For the moment this seems to make sense as with more width options we'd add a pyramid. Later on, in the same function when we get VHT160 actually go and look for VHT160 and not VHT80. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D35977 --- sys/net80211/ieee80211_vht.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/net80211/ieee80211_vht.c b/sys/net80211/ieee80211_vht.c index b023c6de6e95..b4eb901f0f13 100644 --- a/sys/net80211/ieee80211_vht.c +++ b/sys/net80211/ieee80211_vht.c @@ -797,7 +797,7 @@ ieee80211_vht_adjust_channel(struct ieee80211com *ic, struct ieee80211_channel *c; /* First case - handle channel demotion - if VHT isn't set */ - if ((flags & IEEE80211_FVHT_VHT) == 0) { + if ((flags & IEEE80211_FVHT_MASK) == 0) { #if 0 printf("%s: demoting channel %d/0x%08x\n", __func__, chan->ic_ieee, chan->ic_flags); @@ -819,10 +819,9 @@ ieee80211_vht_adjust_channel(struct ieee80211com *ic, * Note: we don't clear the HT flags, these are the hints * for HT40U/HT40D when selecting VHT40 or larger channels. */ - /* Start with VHT80 */ c = NULL; if ((c == NULL) && (flags & IEEE80211_FVHT_USEVHT160)) - c = findvhtchan(ic, chan, IEEE80211_CHAN_VHT80); + c = findvhtchan(ic, chan, IEEE80211_CHAN_VHT160); if ((c == NULL) && (flags & IEEE80211_FVHT_USEVHT80P80)) c = findvhtchan(ic, chan, IEEE80211_CHAN_VHT80P80);