git: 9a7cd8c9c346 - stable/13 - LinuxKPI: 802.11: add more header compat bits

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Mon, 17 Oct 2022 20:41:26 UTC
The branch stable/13 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=9a7cd8c9c346b9056358f7e843a4650b4e616f39

commit 9a7cd8c9c346b9056358f7e843a4650b4e616f39
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2022-09-21 17:12:48 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2022-10-17 20:37:02 +0000

    LinuxKPI: 802.11: add more header compat bits
    
    First part adding more bits in order to synch up drivers to the same
    level and enable a new ones.
    
    (cherry picked from commit f02e21159b2e7ab0d75905742f74ae5798bea122)
---
 sys/compat/linuxkpi/common/include/linux/ieee80211.h | 10 ++++++++++
 sys/compat/linuxkpi/common/include/linux/nl80211.h   |  7 +++++++
 sys/compat/linuxkpi/common/include/net/cfg80211.h    |  7 +++++++
 sys/compat/linuxkpi/common/include/net/mac80211.h    |  9 +++++++++
 4 files changed, 33 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h
index 9c65b4045cbe..5a29137d0510 100644
--- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h
+++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h
@@ -424,6 +424,16 @@ struct ieee80211_hdr_3addr {	/* net80211::ieee80211_frame */
 	__le16		seq_ctrl;
 };
 
+struct ieee80211_qos_hdr {	/* net80211:ieee80211_qosframe */
+        __le16		frame_control;
+        __le16		duration_id;
+	uint8_t		addr1[ETH_ALEN];
+	uint8_t		addr2[ETH_ALEN];
+	uint8_t		addr3[ETH_ALEN];
+	__le16		seq_ctrl;
+	__le16		qos_ctrl;
+};
+
 struct ieee80211_vendor_ie {
 };
 
diff --git a/sys/compat/linuxkpi/common/include/linux/nl80211.h b/sys/compat/linuxkpi/common/include/linux/nl80211.h
index c4c46fbd90cb..f8de2eedf1b7 100644
--- a/sys/compat/linuxkpi/common/include/linux/nl80211.h
+++ b/sys/compat/linuxkpi/common/include/linux/nl80211.h
@@ -321,6 +321,12 @@ enum nl80211_he_gi {
 	NL80211_RATE_INFO_HE_GI_3_2,
 };
 
+enum nl80211_he_ltf {
+	NL80211_RATE_INFO_HE_1XLTF,
+	NL80211_RATE_INFO_HE_2XLTF,
+	NL80211_RATE_INFO_HE_4XLTF,
+};
+
 enum nl80211_dfs_regions {
 	NL80211_DFS_UNSET,
 	NL80211_DFS_FCC,
@@ -333,6 +339,7 @@ enum nl80211_sar_type {
 };
 
 #define	NL80211_VHT_NSS_MAX			8
+#define	NL80211_HE_NSS_MAX			8
 
 enum nl80211_tid_cfg_attr {
 	NL80211_TID_CONFIG_ATTR_NOACK,
diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h
index 89b7af916573..7995f633256f 100644
--- a/sys/compat/linuxkpi/common/include/net/cfg80211.h
+++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h
@@ -576,6 +576,7 @@ struct mac_address {
 struct ieee80211_reg_rule {
 	/* TODO FIXME */
 	uint32_t	flags;
+	int	dfs_cac_ms;
 	struct freq_range {
 		int	start_freq_khz;
 		int	end_freq_khz;
@@ -787,6 +788,12 @@ struct cfg80211_he_bss_color {
 
 struct ieee80211_he_obss_pd {
 	bool					enable;
+	uint8_t					min_offset;
+	uint8_t					max_offset;
+	uint8_t					non_srg_max_offset;
+	uint8_t					bss_color_bitmap;
+	uint8_t					partial_bssid_bitmap;
+	uint8_t					sr_ctrl;
 };
 
 struct ieee80211_sta_he_6ghz_capa {
diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h
index 33379900b625..1dfc4d7506f6 100644
--- a/sys/compat/linuxkpi/common/include/net/mac80211.h
+++ b/sys/compat/linuxkpi/common/include/net/mac80211.h
@@ -809,6 +809,8 @@ struct ieee80211_low_level_stats {
 
 enum ieee80211_offload_flags {
 	IEEE80211_OFFLOAD_ENCAP_4ADDR,
+	IEEE80211_OFFLOAD_ENCAP_ENABLED,
+	IEEE80211_OFFLOAD_DECAP_ENABLED,
 };
 
 struct ieee80211_ops {
@@ -2429,6 +2431,13 @@ ieee80211_report_wowlan_wakeup(struct ieee80211_vif *vif,
         return;
 }
 
+static __inline void
+ieeee80211_obss_color_collision_notify(struct ieee80211_vif *vif,
+    uint64_t obss_color_bitmap)
+{
+	TODO();
+}
+
 #define	ieee80211_send_bar(_v, _r, _t, _s)				\
     linuxkpi_ieee80211_send_bar(_v, _r, _t, _s)