From nobody Mon Apr 25 11:38:59 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 2F27219976DE; Mon, 25 Apr 2022 11:39:00 +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 4Kn31w0py4z4Wlm; Mon, 25 Apr 2022 11:39:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650886740; 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=6vZbOiigGoLQFM/cAbJMRffDyrvdbuS8nzx5snFx4cE=; b=XnSHL7uwfUQUPZIgpoKvS6K/rsiF/fT+Spg9F509s6Z3S3ELCx2ziJWjwndkS8LtM1PQFJ 2lIFp3DDliCmMjTRhFJfz9Htduog+YUwCAWgANFdlrxTx0gHvaACghqLodwl6PgvGXUxY+ HZ2BXwhwBQHx4dfdGldGpJm8T5y54VrokBbh5vIOctqJR3eMWiJ8kmSDgDekBdoEapQQFd lz0Hpnj3Xle6+lnDM04ke/UQLqZa09zAAPQsbZ5dYYK4vbU7HHdoEGlgBF+U/IFSwFVcxn rTiuBfNNmkdjLMTKZrP8nWdIpGxurxxs2fbct7eHyWq0KnB4R/9otIX2wXzubQ== 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 E8EC319BC6; Mon, 25 Apr 2022 11:38:59 +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 23PBcxth002441; Mon, 25 Apr 2022 11:38:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23PBcxAB002440; Mon, 25 Apr 2022 11:38:59 GMT (envelope-from git) Date: Mon, 25 Apr 2022 11:38:59 GMT Message-Id: <202204251138.23PBcxAB002440@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: b3e7f403a509 - main - LinuxKPI: 802.11 ieee80211_sn_sub() fix 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: b3e7f403a509c1e643ef14d95562f5d7e329d77e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650886740; 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=6vZbOiigGoLQFM/cAbJMRffDyrvdbuS8nzx5snFx4cE=; b=Lo+MIRfu8lAfkqi34p4rbIh2tX80aWEmnO2H04AGgwzrNvnIisq6OtiESEh4Susd8YGmBa V6mzRROKR9c4/sH1aYZdwb71i6vyu80rGcUi21hXaNqvx1rzTAfnrN2KJ8ojr82XmK6+sA oKrEbMlSANw2B/yFSLE1o17fxeCsSoIsZ0H595g/9yuDGJQNBrBHks4hJrXeQPuu2XKiG6 lLIvl1Ab0HRf4rSaGGvzDOmEHoEwD62QBBZKh24aFbWwnI5Wa/sB2PXlJLab5tj8OPGTNs xERe3xoofePAvrqobaEzT3pguP4lUtqyn9o7IbDvtirZW1yaI+vmq7TY9ygxQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650886740; a=rsa-sha256; cv=none; b=ZiNeR+FQ+nyVVIg1uV85SGG9MG9cqM5ZZMbNxVEncf/7JKkx3uP+euQHfNoOdWUnYvafzq 4ATz9AGZPXHUcBSpx7jU+yZinnBrSxtZzjFCPBmQRqvaOO6OGZwa8Nf5E93RD2mr8cZ2ab hjiddEhai+9SiKhKZ6RVv3CTOXwieY+1bAqq9e1OPb+x09/DJsdrUEqhEYqJ3K3uAvR1po 4+8QYya6YDCkHiNfgHhvtiRupMqLhb8eYGb8FwSh/NM2L1jBtNQFWRxyQdgUGBSYoT75Q7 NL8PAJtU4kCq9LleGu5QmfKcCCkvkx2HphvCbHPq+X7hxWluyH4y1WaAUotzMw== 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=b3e7f403a509c1e643ef14d95562f5d7e329d77e commit b3e7f403a509c1e643ef14d95562f5d7e329d77e Author: Bjoern A. Zeeb AuthorDate: 2022-04-25 11:35:57 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-04-25 11:35:57 +0000 LinuxKPI: 802.11 ieee80211_sn_sub() fix In ieee80211_sn_sub() we need to shift the mask before applying it. This fixes the logic from 978f25e840fe4975f243e6077a764842f0e9d3eb. Reported by: J.R. Oldroyd (fbsd opal.com) MFC after: 3 days Sponsored by: The FreeBSD Foundation --- sys/compat/linuxkpi/common/include/net/mac80211.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index dcb104947305..b1ce4c2ff2b9 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1691,7 +1691,8 @@ static __inline uint16_t ieee80211_sn_sub(uint16_t sa, uint16_t sb) { - return ((sa - sb) & IEEE80211_SEQ_SEQ_MASK); + return ((sa - sb) & + (IEEE80211_SEQ_SEQ_MASK >> IEEE80211_SEQ_SEQ_SHIFT)); } static __inline void