diff options
author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2022-04-25 11:35:57 +0000 |
---|---|---|
committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2022-04-25 11:35:57 +0000 |
commit | b3e7f403a509c1e643ef14d95562f5d7e329d77e (patch) | |
tree | 49205ebcdb390a2ced70146d4ab6994dd6494c43 /sys/compat/linuxkpi/common/include/net | |
parent | 128b9bf96cae36c33b45a4d418ff502497bbb834 (diff) | |
download | src-b3e7f403a509c1e643ef14d95562f5d7e329d77e.tar.gz src-b3e7f403a509c1e643ef14d95562f5d7e329d77e.zip |
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
Diffstat (limited to 'sys/compat/linuxkpi/common/include/net')
-rw-r--r-- | sys/compat/linuxkpi/common/include/net/mac80211.h | 3 |
1 files changed, 2 insertions, 1 deletions
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 |