Date: Wed, 4 May 2022 15:18:11 GMT From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: d5e65e74ebe7 - stable/13 - LinuxKPI: 802.11 ieee80211_sn_sub() fix Message-ID: <202205041518.244FIBNu020247@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d5e65e74ebe77b4c1aecd30b985562587f15d581 commit d5e65e74ebe77b4c1aecd30b985562587f15d581 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2022-04-25 11:35:57 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202205041518.244FIBNu020247>