From nobody Wed May 04 15:18:11 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 843181AB15A8; Wed, 4 May 2022 15:18:11 +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 4KtgSg3GhSz3sDT; Wed, 4 May 2022 15:18:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651677491; 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=+ZM896aQy27lmijC58DztAjKUZI3eUcSemCP6ib8P70=; b=AHMnrl4xbeI7RiyG95B3tSPoOaYdtWY6xBJF9VFZURSj7CptF2iZKElZ+ajeGF0THLtSvR yBTncyKWXevrX+V0XmN9JUZ9KR2LU33xPkRhdEO0ra05DdH8+MHGuxXOgcCugKuFSbDcRO uOCEqrEfY6NorGvOQZ4rSKQyiGwuVyDKVEtIjCRKeWr6Lgdc5+IlODcp5HpsMQpwv5TTfs 6bsUIZ9WBZ58b+lerwSjmrLhAdbOZQKex7pwefvChQIh1nCdkb82Pf0OrsJ84TijPGjsWq ItnhXAT0Yux0v1uR4QqLWITvGuGd/fSpXlixbq2oYr1fbrjJq9d/GQLDpcfSyA== 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 4FF971544B; Wed, 4 May 2022 15:18:11 +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 244FIB0J020248; Wed, 4 May 2022 15:18:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 244FIBNu020247; Wed, 4 May 2022 15:18:11 GMT (envelope-from git) Date: Wed, 4 May 2022 15:18:11 GMT Message-Id: <202205041518.244FIBNu020247@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: d5e65e74ebe7 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: d5e65e74ebe77b4c1aecd30b985562587f15d581 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651677491; 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=+ZM896aQy27lmijC58DztAjKUZI3eUcSemCP6ib8P70=; b=SlhoCVCN6+ieQWuB006gqsK0us1KJM5r7nXOmSEsu1uEItZeeRY7BRcznw1IvetswPwmbQ wxC5WQpnzf83xDy/JA6E9LW69uhpjxRvq5e05JbRpttYxcKDYTG8pencVhYcWBqQFjNW4S slNM/g1iT0Wg+b2ESC9g7zHMdcW4bF7JfOV674vESb2ScogjxmpZIxaC1dwvm8BUf/aSKr eYOULLzs5Ag0KM9UmLuPNaBdClLO02T+GeDyPn2Bzxt8jEah0M/U0J4uC1TflTL86pPrtM x0eE07CHGYKJrvopuXtHAas8QkKlTQedggPirR44Q00MDjRMxXQamaJGJyCcyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651677491; a=rsa-sha256; cv=none; b=FEFAYfLKjbDaKiREY99WQiVs8dNohvQtYHs3+oHGmqC8pJFK2H36dZBUcceGzaQ5b35oDJ qk8kwhamQvV5HznVUYwu+ch2GUGjJq2+y8xzhGlJ4kjjnGflzl+AriEvqnIm8uzce80+FW VBhcJMNCTAVLqkUJr+sgY83TsRucaxYXeHToYXfmisWlwcfir36z17vYXiDbzCcskkm2Gi gS1PuwS92I8pMinv3a3S6UJFwa/V6TnrijcXSLJTXK5q22yd9/QyTLxR+51p08uBZ0phol y4q+1UxaMrR94K5DH7zllLnqEM93rUYsplcoZoEoGw0WhIsPX00LdgxwZcxzoA== 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=d5e65e74ebe77b4c1aecd30b985562587f15d581 commit d5e65e74ebe77b4c1aecd30b985562587f15d581 Author: Bjoern A. Zeeb AuthorDate: 2022-04-25 11:35:57 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-05-04 13:12:54 +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) Sponsored by: The FreeBSD Foundation (cherry picked from commit b3e7f403a509c1e643ef14d95562f5d7e329d77e) --- 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 601c240ee553..c62ab1fbaa72 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