diff options
author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2023-01-31 16:36:24 +0000 |
---|---|---|
committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2023-02-23 19:32:41 +0000 |
commit | 811e79336e963ada4db550e40def2d77b6753f8a (patch) | |
tree | c9512c48471b042cbfe590b8b5b08ebc3e43c16d | |
parent | 47ff90e57ef3a2e9ad39133d558064ef490e42c0 (diff) | |
download | src-811e79336e963ada4db550e40def2d77b6753f8a.tar.gz src-811e79336e963ada4db550e40def2d77b6753f8a.zip |
LinuxKPI: 802.11: implement ieee80211_is_pspoll()
Implement ieee80211_is_pspoll() and move it up to the set of implemented
ieee80211_is_*() functions.
There are no further changes (git diff just looks weird).
Sponsored by: The FreeBSD Foundation
Approved by: re (cperciva)
(cherry picked from commit ff76cbc81d57ffc4bbc9bc20fd22325b2a8c2028)
(cherry picked from commit 2336248a8ba9763ad38074db40f32e117edd86f5)
(cherry picked from commit 16dc23caf17f8ffa21e365a1f2fe1a72d7fecbe8)
-rw-r--r-- | sys/compat/linuxkpi/common/include/net/mac80211.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 2b3f6b8e3ab1..b7c6c2d37b90 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1342,29 +1342,33 @@ ieee80211_is_any_nullfunc(__le16 fc) return (ieee80211_is_nullfunc(fc) || ieee80211_is_qos_nullfunc(fc)); } -static __inline bool -ieee80211_vif_is_mesh(struct ieee80211_vif *vif) +static inline bool +ieee80211_is_pspoll(__le16 fc) { - TODO(); - return (false); + __le16 v; + + fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); + v = htole16(IEEE80211_FC0_SUBTYPE_PS_POLL | IEEE80211_FC0_TYPE_CTL); + + return (fc == v); } static __inline bool -ieee80211_is_frag(struct ieee80211_hdr *hdr) +ieee80211_vif_is_mesh(struct ieee80211_vif *vif) { TODO(); return (false); } static __inline bool -ieee80211_is_first_frag(__le16 fc) +ieee80211_is_frag(struct ieee80211_hdr *hdr) { TODO(); return (false); } static __inline bool -ieee80211_is_pspoll(__le16 fc) +ieee80211_is_first_frag(__le16 fc) { TODO(); return (false); |