From owner-dev-commits-src-all@freebsd.org Mon Jun 21 08:06:37 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 92E8664275A; Mon, 21 Jun 2021 08:06:37 +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 4G7hv11k3Pz4d1R; Mon, 21 Jun 2021 08:06:37 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 248A719AAD; Mon, 21 Jun 2021 08:06:37 +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 15L86b9C049866; Mon, 21 Jun 2021 08:06:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15L86buZ049865; Mon, 21 Jun 2021 08:06:37 GMT (envelope-from git) Date: Mon, 21 Jun 2021 08:06:37 GMT Message-Id: <202106210806.15L86buZ049865@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 7544c1d20d8b - main - rtwn: make sure to not write in upper bits of txdseq MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7544c1d20d8b7127ed3511edeb94e01d328daebb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2021 08:06:37 -0000 The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=7544c1d20d8b7127ed3511edeb94e01d328daebb commit 7544c1d20d8b7127ed3511edeb94e01d328daebb Author: Andriy Gapon AuthorDate: 2021-06-21 08:05:04 +0000 Commit: Andriy Gapon CommitDate: 2021-06-21 08:05:04 +0000 rtwn: make sure to not write in upper bits of txdseq ni_txseqs is kept as 16-bit counter, but we need to trim the upper four bits as they may have special meanings for the firmware / hardware. For instance, bit 15 enables hardware / firmware generation of sequence numbers that overrides sequence numbers programmed by the driver. Reviewed by: adrian MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30814 --- sys/dev/rtwn/rtl8192c/r92c_tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/rtwn/rtl8192c/r92c_tx.c b/sys/dev/rtwn/rtl8192c/r92c_tx.c index ab2d05635358..b01731ba29ed 100644 --- a/sys/dev/rtwn/rtl8192c/r92c_tx.c +++ b/sys/dev/rtwn/rtl8192c/r92c_tx.c @@ -335,7 +335,7 @@ r92c_fill_tx_desc(struct rtwn_softc *sc, struct ieee80211_node *ni, uint16_t seqno; if (m->m_flags & M_AMPDU_MPDU) { - seqno = ni->ni_txseqs[tid]; + seqno = ni->ni_txseqs[tid] % IEEE80211_SEQ_RANGE; ni->ni_txseqs[tid]++; } else seqno = M_SEQNO_GET(m) % IEEE80211_SEQ_RANGE;