Date: Fri, 1 Jul 2022 14:57:45 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: 07bec0d40e07 - stable/13 - net80211 / LinuxKPI: 802.11: add Control Trigger Subframe information Message-ID: <202207011457.261Evjxq057918@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=07bec0d40e072070f8a9d82746ff60d53a08f1f9 commit 07bec0d40e072070f8a9d82746ff60d53a08f1f9 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2022-06-17 22:55:13 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2022-07-01 13:49:19 +0000 net80211 / LinuxKPI: 802.11: add Control Trigger Subframe information Add definitions related to 802.11ax Control Trigger frame format needed for rtw89. (cherry picked from commit 4c3684ef5cf239efeae8675787ac30247e70be8a) --- .../linuxkpi/common/include/linux/ieee80211.h | 38 ++++++++++++++++++++++ sys/net80211/ieee80211.h | 1 + 2 files changed, 39 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index c131a6c69495..dee8c385464c 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -475,6 +475,33 @@ enum ieee80211_status_code { WLAN_STATUS_AUTH_TIMEOUT = 16, /* REJECTED_SEQUENCE_TIMEOUT */ }; +/* 9.3.1.22 Trigger frame format; 80211ax-2021 */ +struct ieee80211_trigger { + __le16 frame_control; + __le16 duration_id; + uint8_t ra[ETH_ALEN]; + uint8_t ta[ETH_ALEN]; + __le64 common_info; /* 8+ really */ + uint8_t variable[]; +}; + +/* Table 9-29c-Trigger Type subfield encoding */ +enum { + IEEE80211_TRIGGER_TYPE_BASIC = 0x0, +#if 0 + /* Not seen yet. */ + BFRP = 0x1, + MU-BAR = 0x2, + MU-RTS = 0x3, + BSRP = 0x4, + GCR MU-BAR = 0x5, + BQRP = 0x6, + NFRP = 0x7, + /* 0x8..0xf reserved */ +#endif + IEEE80211_TRIGGER_TYPE_MASK = 0xf +}; + /* net80211: IEEE80211_IS_CTL() */ static __inline bool ieee80211_is_ctl(__le16 fc) @@ -565,4 +592,15 @@ ieee80211_hdrlen(__le16 fc) return (size); } +static inline bool +ieee80211_is_trigger(__le16 fc) +{ + __le16 v; + + fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); + v = htole16(IEEE80211_FC0_SUBTYPE_TRIGGER | IEEE80211_FC0_TYPE_CTL); + + return (fc == v); +} + #endif /* _LINUXKPI_LINUX_IEEE80211_H */ diff --git a/sys/net80211/ieee80211.h b/sys/net80211/ieee80211.h index 86ab1459cca9..0e53bc259a5d 100644 --- a/sys/net80211/ieee80211.h +++ b/sys/net80211/ieee80211.h @@ -139,6 +139,7 @@ struct ieee80211_qosframe_addr4 { #define IEEE80211_FC0_SUBTYPE_ACTION 0xd0 #define IEEE80211_FC0_SUBTYPE_ACTION_NOACK 0xe0 /* for TYPE_CTL */ +#define IEEE80211_FC0_SUBTYPE_TRIGGER 0x20 #define IEEE80211_FC0_SUBTYPE_CONTROL_WRAP 0x70 #define IEEE80211_FC0_SUBTYPE_BAR 0x80 #define IEEE80211_FC0_SUBTYPE_BA 0x90
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207011457.261Evjxq057918>