diff options
author | Johannes Berg <johannes.berg@intel.com> | 2024-01-29 22:04:56 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-02-08 17:00:42 +0300 |
commit | b1344b1399daec9aca62bd0b2ea94874f5b8e126 (patch) | |
tree | a4d722f1907e0cec628da7e5bdaf6e04594898fb /include | |
parent | b82730bf57b54803ab94abbfd8c4422a7081886d (diff) | |
download | linux-b1344b1399daec9aca62bd0b2ea94874f5b8e126.tar.xz |
wifi: mac80211: add/use ieee80211_get_sn()
This will also be useful for MLO duplicate multicast
detection, but add it already here and use it in one
place that trivially converts.
Link: https://msgid.link/20240129200456.f0ff49c80006.I850d2785ab1640e56e262d3ad7343b87f6962552@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ieee80211.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index d9d2c1253157..b9367d5f04c4 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h @@ -9,7 +9,7 @@ * Copyright (c) 2006, Michael Wu <flamingice@sourmilk.net> * Copyright (c) 2013 - 2014 Intel Mobile Communications GmbH * Copyright (c) 2016 - 2017 Intel Deutschland GmbH - * Copyright (c) 2018 - 2023 Intel Corporation + * Copyright (c) 2018 - 2024 Intel Corporation */ #ifndef LINUX_IEEE80211_H @@ -808,6 +808,11 @@ static inline bool ieee80211_is_frag(struct ieee80211_hdr *hdr) hdr->seq_ctrl & cpu_to_le16(IEEE80211_SCTL_FRAG); } +static inline u16 ieee80211_get_sn(struct ieee80211_hdr *hdr) +{ + return le16_get_bits(hdr->seq_ctrl, IEEE80211_SCTL_SEQ); +} + struct ieee80211s_hdr { u8 flags; u8 ttl; |