From nobody Sun Dec 08 21:03:05 2024 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 4Y5yBd5htrz5fCV5; Sun, 08 Dec 2024 21:03:05 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y5yBd58Qrz4Xl8; Sun, 8 Dec 2024 21:03:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733691785; 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=fZ+uSMHEhf9gAZAzJ++QGHxqcRteeh305SqyYDW1Dbk=; b=Wo3I235En83w3Mcd6VaOUYZfZhhaWHDCm5mgtdzXwoF03VgHAl+gGQTzCqpqvvUv+LH+GI OXTOaBDuY3G7inkljo8xraGW8SaeqMFkKolTpk5losx9z/2qAQDTDC6yWw0I1OqGqrfhnr KMYbwezj9C5ukk1F/uBbdAY301ZnSXIAyHvZxMxKiVUBXXMeuDnx0NoO4EKKUE9EPRhZwv mzjGVv2hBxmqjEcsXM6SBGYdUW2Xty9b6iZwWpKLG7z2huCQJ/Piw121Tdzwu7lQVO9OC7 FT6ykrWLfQs5wd1LCvKQzHxnsieHATWPWk3fxLyvIT3imG2WrPfQdV3V3N11sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733691785; 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=fZ+uSMHEhf9gAZAzJ++QGHxqcRteeh305SqyYDW1Dbk=; b=tzkwItfB5vtGbsoIe3S9aT0hkKOo6F/kIiC7+8sGaYmM3ITdX/xBf6xgNWwE+L5wxoYgkh nrnwvRH1+cHPJCVM3pTmbBos1bq9pE151BQhWx3CsKzBQT7Ekvn9rnQqglX80kdqIy++6j PTwIF5LC1dSEiOJJ0ZuX5/0UpA3AwsXIT+rNTf7VedL2Oa1U03TJUf2Qj4RiEYD+L8NIKB P27PAksScp0NJ0Jpmq6U8gh/4/VTCjF5iHqFi85a2EuYIQSMw02XWogVTQQXG/3tvbtWUs Hw4tb8brP6MbRmXVpDMIn3ea+dSzm5WBto83vAeADSAnz8moqYicsrv/dswXGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733691785; a=rsa-sha256; cv=none; b=ozh/D3+Uh8o83/fQYNI+QZdekGrnW4DA/tm1HErYVQQYIVurS7SwB3Lt8KIgO7Vb5Af3ib j2/Qi6ZbnSplmu+aKeIkP/vlneI6BXdvvN6NIYvjuXsn1px8OtWFbHYIrFAPQmg0kNpLqT +nZCU65R4jfsZK4U9E3qBZkak0STs0RppO+i9isUldEl0y9gfxvOJF3X3pB2zWvQ3H7m7l PLKVvnI3qCqtQenyJ82tpTR4OkMXXuPYaa1VCmk9lYo+jZXBbysQKYMfFEPdFAbYZRbg/r f0lsT72rq6C5YBGcTLNCZkF3zJRsFoxUj/IQQzAc7u8eFnNqn9kt1qdW65ycCg== 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 4Y5yBd4lyjz180X; Sun, 8 Dec 2024 21:03:05 +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 4B8L35Wb076692; Sun, 8 Dec 2024 21:03:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B8L35B5076689; Sun, 8 Dec 2024 21:03:05 GMT (envelope-from git) Date: Sun, 8 Dec 2024 21:03:05 GMT Message-Id: <202412082103.4B8L35B5076689@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: 30e8252353d9 - main - net80211: HT: check for feature support in ht_recv_action_ht_txchwidth() 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: 30e8252353d95cc77f787ef784942a551d3e0567 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=30e8252353d95cc77f787ef784942a551d3e0567 commit 30e8252353d95cc77f787ef784942a551d3e0567 Author: Bjoern A. Zeeb AuthorDate: 2024-12-01 20:16:19 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-12-08 21:01:40 +0000 net80211: HT: check for feature support in ht_recv_action_ht_txchwidth() ht_recv_action_ht_txchwidth() can blindly change the channel width to 40 Mhz whether or not that is supported. If 20/40 is not supported there is nothing to do as the channel width cannot change in that case. While here mark unused arguments with __unused. Sponosred by: The FreeBSD Foundation MFC adter: 3 days Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D47857 --- sys/net80211/ieee80211_ht.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index 293b5be20d32..e2506c1e0ce0 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -2595,11 +2595,15 @@ ht_recv_action_ba_delba(struct ieee80211_node *ni, static int ht_recv_action_ht_txchwidth(struct ieee80211_node *ni, - const struct ieee80211_frame *wh, - const uint8_t *frm, const uint8_t *efrm) + const struct ieee80211_frame *wh __unused, + const uint8_t *frm, const uint8_t *efrm __unused) { int chw; + /* If 20/40 is not supported the chw cannot change. */ + if ((ni->ni_htcap & IEEE80211_HTCAP_CHWIDTH40) == 0) + return (0); + chw = (frm[2] == IEEE80211_A_HT_TXCHWIDTH_2040) ? IEEE80211_STA_RX_BW_40 : IEEE80211_STA_RX_BW_20;