LinuxKPI: update 802.11 headers

Add new defines, struct members, and (stub) functions needed for an
updated iwlwifi.  Most of the defines are for rfkill or HE.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
This commit is contained in:
Bjoern A. Zeeb 2022-02-22 22:57:31 +00:00
parent a3e07b6ef3
commit d875aa1587
4 changed files with 58 additions and 8 deletions

View File

@ -67,6 +67,7 @@ struct ieee80211_mmie_16 {
#define IEEE80211_MAX_AMPDU_BUF_HT 0x40
#define IEEE80211_MAX_AMPDU_BUF 256 /* for HE? */
#define IEEE80211_MAX_AMPDU_BUF_HE 256
#define IEEE80211_MAX_FRAME_LEN 2352
#define IEEE80211_MAX_DATA_LEN (2300 + IEEE80211_CRC_LEN)
@ -170,6 +171,7 @@ enum ieee80211_min_mpdu_start_spacing {
#define IEEE80211_PPE_THRES_NSS_MASK 2 /* TODO FIXME ax? */
#define IEEE80211_PPE_THRES_RU_INDEX_BITMASK_POS 3 /* TODO FIXME ax? */
#define IEEE80211_PPE_THRES_RU_INDEX_BITMASK_MASK 8 /* TODO FIXME ax? */
#define IEEE80211_HE_PPE_THRES_INFO_HEADER_SIZE 16 /* TODO FIXME ax? */
#define IEEE80211_HT_OP_MODE_PROTECTION 0x03 /* MASK */
#define IEEE80211_HT_OP_MODE_PROTECTION_NONE 0x00
@ -309,6 +311,7 @@ enum ieee80211_sta_rx_bw {
IEEE80211_STA_RX_BW_40,
IEEE80211_STA_RX_BW_80,
IEEE80211_STA_RX_BW_160,
IEEE80211_STA_RX_BW_320,
};
enum ieee80211_tx_info_flags {

View File

@ -89,6 +89,7 @@ enum nl80211_scan_flags {
NL80211_SCAN_FLAG_RANDOM_ADDR = BIT(3),
NL80211_SCAN_FLAG_COLOCATED_6GHZ = BIT(4),
NL80211_SCAN_FLAG_RANDOM_SN = BIT(5),
NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP = BIT(6),
};
#define NL80211_MAX_SUPP_REG_RULES 512 /* TODO FIXME, random */

View File

@ -56,6 +56,10 @@ extern int debug_80211;
#define IMPROVE(...) if (debug_80211 & D80211_IMPROVE) \
printf("%s:%d: XXX LKPI80211 IMPROVE\n", __func__, __LINE__)
enum rfkill_hard_block_reasons {
RFKILL_HARD_BLOCK_NOT_OWNER = BIT(0),
};
#define WIPHY_PARAM_FRAG_THRESHOLD __LINE__ /* TODO FIXME brcmfmac */
#define WIPHY_PARAM_RETRY_LONG __LINE__ /* TODO FIXME brcmfmac */
#define WIPHY_PARAM_RETRY_SHORT __LINE__ /* TODO FIXME brcmfmac */
@ -693,8 +697,11 @@ struct linuxkpi_ieee80211_regdomain {
#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_CAP3_DCM_MAX_TX_NSS_2 0x10
#define IEEE80211_HE_PHY_CAP3_RX_PARTIAL_BW_SU_IN_20MHZ_MU 0x20
#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_BPSK 0x40
#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_BPSK 0x80
#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_MASK 0x80
#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_8 0x1
#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_8 0x2
@ -739,12 +746,13 @@ struct linuxkpi_ieee80211_regdomain {
#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_8US 0x4
#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_MASK 0x8
#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_RESERVED 0x10
#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_POS 0x0
#define IEEE80211_HE_PHY_CAP9_NON_TRIGGERED_CQI_FEEDBACK 0x20
#define IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_COMP_SIGB 0x40
#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_CAP9_RX_FULL_BW_SU_USING_MU_WITH_COMP_SIGB 0x4
#define IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_NON_COMP_SIGB 0x8
#define IEEE80211_HE_PHY_CAP9_RX_1024_QAM_LESS_THAN_242_TONE_RU 0x10
#define IEEE80211_HE_PHY_CAP9_TX_1024_QAM_LESS_THAN_242_TONE_RU 0x20
#define IEEE80211_HE_PHY_CAP9_LONGER_THAN_16_SIGB_OFDM_SYM 0x40
#define IEEE80211_HE_PHY_CAP10_HE_MU_M1RU_MAX_LTF 0x1
@ -952,7 +960,7 @@ struct wiphy {
int max_ap_assoc_sta, probe_resp_offload, software_iftypes;
int bss_select_support, max_num_pmkids, retry_long, retry_short, signal_type;
int max_data_retry_count;
int tx_queue_len;
int tx_queue_len, rfkill;
unsigned long ext_features[BITS_TO_LONGS(NUM_NL80211_EXT_FEATURES)];
struct dentry *debugfsdir;
@ -1081,8 +1089,34 @@ wiphy_dereference(struct wiphy *wiphy,
return (NULL);
}
static __inline void
wiphy_lock(struct wiphy *wiphy)
{
TODO();
}
static __inline void
wiphy_unlock(struct wiphy *wiphy)
{
TODO();
}
static __inline void
wiphy_rfkill_set_hw_state_reason(struct wiphy *wiphy, bool blocked,
enum rfkill_hard_block_reasons reason)
{
TODO();
}
/* -------------------------------------------------------------------------- */
static __inline bool
rfkill_blocked(int rfkill) /* argument type? */
{
TODO();
return (false);
}
static __inline int
reg_query_regdb_wmm(uint8_t *alpha2, uint32_t center_freq,
struct ieee80211_reg_rule *rule)
@ -1569,6 +1603,12 @@ get_random_mask_addr(uint8_t *dst, const uint8_t *addr, const uint8_t *mask)
dst[i] = (dst[i] & ~(mask[i])) | (addr[i] & mask[i]);
}
static __inline void
cfg80211_shutdown_all_interfaces(struct wiphy *wiphy)
{
TODO();
}
#ifndef LINUXKPI_NET80211
#define ieee80211_channel linuxkpi_ieee80211_channel
#define ieee80211_regdomain linuxkpi_ieee80211_regdomain

View File

@ -2083,6 +2083,12 @@ ieee80211_disconnect(struct ieee80211_vif *vif, bool _x)
TODO();
}
static __inline void
ieee80211_channel_switch_disconnect(struct ieee80211_vif *vif, bool _x)
{
TODO();
}
static __inline const struct ieee80211_sta_he_cap *
ieee80211_get_he_iftype_cap(const struct ieee80211_supported_band *band,
enum nl80211_iftype type)