aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi/common/include/net
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2022-01-09 18:08:47 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2022-01-09 18:08:47 +0000
commit51b461b3db33b7cd7cbc62c9206568321f7298ad (patch)
tree42d748f2ba0baf157b7dad30efbaf3271f9c8773 /sys/compat/linuxkpi/common/include/net
parente0ab0ff104cb0e817d47a1a2a235f915ec1a31f4 (diff)
downloadsrc-51b461b3db33b7cd7cbc62c9206568321f7298ad.tar.gz
src-51b461b3db33b7cd7cbc62c9206568321f7298ad.zip
LinuxKPI: 802.11 update compat code for driver updates
Add more (dummy in case of HE) defines, structs, functions and another mac80211 function pointer needed to update and support recent drivers. MFC after: 3 days
Diffstat (limited to 'sys/compat/linuxkpi/common/include/net')
-rw-r--r--sys/compat/linuxkpi/common/include/net/cfg80211.h56
-rw-r--r--sys/compat/linuxkpi/common/include/net/mac80211.h19
2 files changed, 69 insertions, 6 deletions
diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h
index edecf9bed8a2..d0de3ec95086 100644
--- a/sys/compat/linuxkpi/common/include/net/cfg80211.h
+++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2020-2021 The FreeBSD Foundation
- * Copyright (c) 2021 Bjoern A. Zeeb
+ * Copyright (c) 2021-2022 Bjoern A. Zeeb
*
* This software was developed by Björn Zeeb under sponsorship from
* the FreeBSD Foundation.
@@ -122,6 +122,7 @@ struct cfg80211_bitrate_mask {
uint64_t legacy; /* XXX? */
uint8_t ht_mcs[16]; /* XXX? */
uint16_t vht_mcs[16]; /* XXX? */
+ uint16_t he_mcs[16]; /* XXX? */
uint8_t gi; /* NL80211_TXRATE_FORCE_LGI enum? */
} control[NUM_NL80211_BANDS];
};
@@ -315,6 +316,28 @@ struct cfg80211_pmsr_result {
struct cfg80211_pmsr_ftm_result ftm;
};
+struct cfg80211_sar_freq_ranges {
+ uint32_t start_freq;
+ uint32_t end_freq;
+};
+
+struct cfg80211_sar_sub_specs {
+ uint32_t freq_range_index;
+ int power;
+};
+
+struct cfg80211_sar_specs {
+ enum nl80211_sar_type type;
+ uint32_t num_sub_specs;
+ struct cfg80211_sar_sub_specs sub_specs[];
+};
+
+struct cfg80211_sar_capa {
+ enum nl80211_sar_type type;
+ uint32_t num_freq_ranges;
+ const struct cfg80211_sar_freq_ranges *freq_ranges;
+};
+
struct cfg80211_ssid {
int ssid_len;
uint8_t ssid[IEEE80211_MAX_SSID_LEN];
@@ -600,18 +623,21 @@ struct linuxkpi_ieee80211_regdomain {
#define IEEE80211_HE_MAC_CAP2_BSR 0x4
#define IEEE80211_HE_MAC_CAP2_LINK_ADAPTATION 0x8
#define IEEE80211_HE_MAC_CAP2_BCAST_TWT 0x10
+#define IEEE80211_HE_MAC_CAP2_ALL_ACK 0x20
#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2 0x1
#define IEEE80211_HE_MAC_CAP3_OMI_CONTROL 0x2
#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_1 0x10
-#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3 0x20
-#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK 0x30
+#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2 0x20
+#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3 0x40
+#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK 0x70
#define IEEE80211_HE_MAC_CAP3_RX_CTRL_FRAME_TO_MULTIBSS 0x80
#define IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU 0x1
#define IEEE80211_HE_MAC_CAP4_BQR 0x2
#define IEEE80211_HE_MAC_CAP4_MULTI_TID_AGG_TX_QOS_B39 0x4
#define IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU 0x8
+#define IEEE80211_HE_MAC_CAP4_OPS 0x10
#define IEEE80211_HE_MAC_CAP5_HE_DYNAMIC_SM_PS 0x1
#define IEEE80211_HE_MAC_CAP5_HT_VHT_TRIG_FRAME_RX 0x2
@@ -633,35 +659,51 @@ struct linuxkpi_ieee80211_regdomain {
#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G 0x1
#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G 0x2
#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G 0x4
+#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G 0x8
#define IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A 0x1
#define IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD 0x2
#define IEEE80211_HE_PHY_CAP1_MIDAMBLE_RX_TX_MAX_NSTS 0x4
#define IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK 0x8
+#define IEEE80211_HE_PHY_CAP1_HE_LTF_AND_GI_FOR_HE_PPDUS_0_8US 0x10
#define IEEE80211_HE_PHY_CAP2_MIDAMBLE_RX_TX_MAX_NSTS 0x1
#define IEEE80211_HE_PHY_CAP2_NDP_4x_LTF_AND_3_2US 0x2
#define IEEE80211_HE_PHY_CAP2_STBC_TX_UNDER_80MHZ 0x4
#define IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ 0x8
+#define IEEE80211_HE_PHY_CAP2_DOPPLER_TX 0x10
#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_MASK 0x1
#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_NO_DCM 0x2
#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_NO_DCM 0x4
#define IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_1 0x8
#define IEEE80211_HE_PHY_CAP3_DCM_MAX_TX_NSS_1 0x10
+#define IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER 0x20
+#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_16_QAM 0x40
+#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_16_QAM 0x80
+#define IEEE80211_HE_PHY_CAP3_DCM_MAX_TX_NSS_2 0x100
+#define IEEE80211_HE_PHY_CAP3_RX_PARTIAL_BW_SU_IN_20MHZ_MU 0x200
#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_8 0x1
#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_8 0x2
#define IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE 0x4
+#define IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER 0x8
+#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_4 0x10
#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_2 0x1
#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_2 0x2
+#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK 0x4
+#define IEEE80211_HE_PHY_CAP5_NG16_MU_FEEDBACK 0x8
+#define IEEE80211_HE_PHY_CAP5_NG16_SU_FEEDBACK 0x10
#define IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT 0x1
#define IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB 0x2
#define IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMER_FB 0x4
-#define IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB 0x10
+#define IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB 0x8
#define IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMING_PARTIAL_BW_FB 0x20
+#define IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_42_SU 0x40
+#define IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_75_MU 0x80
+#define IEEE80211_HE_PHY_CAP6_PARTIAL_BW_EXT_RANGE 0x80
#define IEEE80211_HE_PHY_CAP7_HE_SU_MU_PPDU_4XLTF_AND_08_US_GI 0x1
#define IEEE80211_HE_PHY_CAP7_MAX_NC_1 0x2
@@ -677,6 +719,8 @@ struct linuxkpi_ieee80211_regdomain {
#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_2x996 0x8
#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_242 0x10
#define IEEE80211_HE_PHY_CAP8_HE_ER_SU_PPDU_4XLTF_AND_08_US_GI 0x20
+#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_996 0x40
+#define IEEE80211_HE_PHY_CAP8_HE_ER_SU_1XLTF_AND_08_US_GI 0x80
#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_0US 0x1
#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_16US 0x2
@@ -688,6 +732,7 @@ struct linuxkpi_ieee80211_regdomain {
#define IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_NON_COMP_SIGB 0x80
#define IEEE80211_HE_PHY_CAP9_RX_1024_QAM_LESS_THAN_242_TONE_RU 0x100
#define IEEE80211_HE_PHY_CAP9_TX_1024_QAM_LESS_THAN_242_TONE_RU 0x200
+#define IEEE80211_HE_PHY_CAP9_LONGER_THAN_16_SIGB_OFDM_SYM 0x400
#define IEEE80211_HE_PHY_CAP10_HE_MU_M1RU_MAX_LTF 0x1
@@ -850,6 +895,7 @@ struct wiphy {
/* XXX TODO */
const struct cfg80211_pmsr_capabilities *pmsr_capa;
+ const struct cfg80211_sar_capa *sar_capa;
const struct wiphy_iftype_ext_capab *iftype_ext_capab;
const struct linuxkpi_ieee80211_regdomain *regd;
char fw_version[64]; /* XXX TODO */
@@ -1144,7 +1190,7 @@ regulatory_set_wiphy_regd(struct wiphy *wiphy,
}
static __inline int
-regulatory_hint(struct wiphy *wiphy, uint8_t *alpha2)
+regulatory_hint(struct wiphy *wiphy, const uint8_t *alpha2)
{
TODO();
return (-ENXIO);
diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h
index ffba78be2fed..15ad25cf3a19 100644
--- a/sys/compat/linuxkpi/common/include/net/mac80211.h
+++ b/sys/compat/linuxkpi/common/include/net/mac80211.h
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2020-2021 The FreeBSD Foundation
- * Copyright (c) 2020-2021 Bjoern A. Zeeb
+ * Copyright (c) 2020-2022 Bjoern A. Zeeb
*
* This software was developed by Björn Zeeb under sponsorship from
* the FreeBSD Foundation.
@@ -95,6 +95,7 @@ enum ieee80211_bss_changed {
BSS_CHANGED_PS = BIT(16),
BSS_CHANGED_QOS = BIT(17),
BSS_CHANGED_TXPOWER = BIT(18),
+ BSS_CHANGED_HE_BSS_COLOR = BIT(19),
};
/* 802.11 Figure 9-256 Suite selector format. [OUI(3), SUITE TYPE(1)] */
@@ -457,6 +458,7 @@ struct ieee80211_rx_status {
#define RATE_INFO_BW_160 0x08
#define RATE_INFO_BW_HE_RU 0x10
u8 encoding;
+#define RX_ENC_LEGACY 0x00
#define RX_ENC_HE 0x01
#define RX_ENC_HT 0x02
#define RX_ENC_VHT 0x04
@@ -782,6 +784,8 @@ struct ieee80211_ops {
int (*join_ibss)(struct ieee80211_hw *, struct ieee80211_vif *);
void (*leave_ibss)(struct ieee80211_hw *, struct ieee80211_vif *);
+ int (*set_sar_specs)(struct ieee80211_hw *, const struct cfg80211_sar_specs *);
+
/* XXX TODO: get_et_sset_count, get_et_stats, get_et_strings */
};
@@ -1830,6 +1834,13 @@ ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb)
ieee80211_tx_status(hw, skb);
}
+static __inline void
+ieee80211_tx_status_ni(struct ieee80211_hw *hw, struct sk_buff *skb)
+{
+ IMPROVE();
+ ieee80211_tx_status(hw, skb);
+}
+
static __inline int
ieee80211_start_tx_ba_session(struct ieee80211_sta *sta, uint8_t tid, int x)
{
@@ -1972,6 +1983,12 @@ ieee80211_txq_schedule_start(struct ieee80211_hw *hw, uint32_t ac)
}
static __inline void
+ieee80211_schedule_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq)
+{
+ TODO();
+}
+
+static __inline void
ieee80211_beacon_set_cntdwn(struct ieee80211_vif *vif, u8 counter)
{
TODO();