net80211 / LinuxKPI: 802.11: add Control Trigger Subframe information

Add definitions related to 802.11ax Control Trigger frame format
needed for rtw89.

MFC after:	3 days
This commit is contained in:
Bjoern A. Zeeb 2022-06-17 22:55:13 +00:00
parent 1e70163c50
commit 4c3684ef5c
2 changed files with 39 additions and 0 deletions

View File

@ -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 */

View File

@ -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