From nobody Wed Sep 21 14:01:06 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 4MXg765gMsz4cXnY; Wed, 21 Sep 2022 14:01:06 +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 4MXg764vZHz47hn; Wed, 21 Sep 2022 14:01:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663768866; 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=glEFRLga0j/ToARDA/jA8ssgpFqNau1pE/X2N88WU9U=; b=JWqrgcucNHDpLcecQhKQJfoEmE7EaNrFQTmsvgEGxZjlxqrq04FoZx5NmWWrWs+DXUVDFW WVwg3Bg1jY+QIRTckAcrW1WHuNUFgc4+W0sUCVdDiREaURFRUPBdlu/uYj/pym7Nox03Zj vZ8aVuw1bRsyxfHLK6iDDrsd437PiJRqUOaLHaWS7KyFuaqNxLShgi1mdgVq5/M/zKR+9l ahUoAQpUN6ay7tt3VRbHWXWL+4Onnc4ER/U3KmmHW6hMdRJmwNC+w1os3lZeliZcLPt21p p1oDJ3B938NmB9t/gXtFMjCZjoDqQ6A1GZLeXhWG9GXc2OkreNiazK9wBwz98Q== 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 4MXg76411gz153C; Wed, 21 Sep 2022 14:01:06 +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 28LE16Vw099600; Wed, 21 Sep 2022 14:01:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28LE16VE099599; Wed, 21 Sep 2022 14:01:06 GMT (envelope-from git) Date: Wed, 21 Sep 2022 14:01:06 GMT Message-Id: <202209211401.28LE16VE099599@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 3463de63b3a0 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 3463de63b3a05edc1f6052e6a6da3889b28c17ca Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663768866; 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=glEFRLga0j/ToARDA/jA8ssgpFqNau1pE/X2N88WU9U=; b=N31MpphuNHSqVhwJ74Bbec3hx+uSQ+1M+EciNfDUxzmgvzLJBijfXLLxQo7Iwn2/x4SzT9 5j7Hl+P9DF0S2Iaxo4Mg4s5XJm/mAlN6cITIUWjH7hCGBo+PbT5blCn9sKIzaU106zoiK3 B5auF+NJ+z8nyXC/BQr1X41agjesUhPQReCzMt1eT+P5iiZ9WCuNAYG1YwIjFOWZ1D8riS G5ekLlg0NFabl3G/nRSrFwsYtlv1T0erlT+euYWHPPez1MXlBAJS0SEER50+i3yDeGzK2k YtRM5YdL1OxfwixlAn86ufYGh6F4UIi2I+7uvTg/SzR1VXPO/X56ZL8d0fJu4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663768866; a=rsa-sha256; cv=none; b=FKQDMtwTyhupyEtTGKD6dOE6s7EhnIvTZc8/GzLTIIG+32KUR4Bo28tc3xccwdxNn4cvhH QGMGheE5/5WzMDXHsb7+32S1xdk3FrBy9/2OnuKViZGDh1l31cx4TrzIFTTCAGIwcNX2EO uYPBtlwsh7FitBdFZW8k7+emn8bu790IZV1UCkZV55kx18EPR9h3qCdj8ZoI8nwFyhSnUv p4HVDogkhnq8JqVib7a3z0f4zfZEkK1wzBDqh4tKi1s5c2lZS+xr986Fo6WyXw7KPD5/dZ teMeZoaHZjPSBwOs5E0WpmHgc9o7xgEWDHO/+Izkc6Z4y/z8ThJ+wOOigwLxkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=3463de63b3a05edc1f6052e6a6da3889b28c17ca commit 3463de63b3a05edc1f6052e6a6da3889b28c17ca Author: Bjoern A. Zeeb AuthorDate: 2022-07-29 00:12:34 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-09-21 11:39:37 +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 Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D35977 (cherry picked from commit dc32c7133921a34f3144a4b5fc4f7c1f6cddbd1f) --- 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);