xref: /freebsd-src/sys/compat/linuxkpi/common/include/net/cfg80211.h (revision 95a7aa8009877ca95d81967f9af568ef832bb565)
16b4cac81SBjoern A. Zeeb /*-
2ac1d519cSBjoern A. Zeeb  * Copyright (c) 2020-2024 The FreeBSD Foundation
351b461b3SBjoern A. Zeeb  * Copyright (c) 2021-2022 Bjoern A. Zeeb
46b4cac81SBjoern A. Zeeb  *
56b4cac81SBjoern A. Zeeb  * This software was developed by Björn Zeeb under sponsorship from
66b4cac81SBjoern A. Zeeb  * the FreeBSD Foundation.
76b4cac81SBjoern A. Zeeb  *
86b4cac81SBjoern A. Zeeb  * Redistribution and use in source and binary forms, with or without
96b4cac81SBjoern A. Zeeb  * modification, are permitted provided that the following conditions
106b4cac81SBjoern A. Zeeb  * are met:
116b4cac81SBjoern A. Zeeb  * 1. Redistributions of source code must retain the above copyright
126b4cac81SBjoern A. Zeeb  *    notice, this list of conditions and the following disclaimer.
136b4cac81SBjoern A. Zeeb  * 2. Redistributions in binary form must reproduce the above copyright
146b4cac81SBjoern A. Zeeb  *    notice, this list of conditions and the following disclaimer in the
156b4cac81SBjoern A. Zeeb  *    documentation and/or other materials provided with the distribution.
166b4cac81SBjoern A. Zeeb  *
176b4cac81SBjoern A. Zeeb  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
186b4cac81SBjoern A. Zeeb  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
196b4cac81SBjoern A. Zeeb  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
206b4cac81SBjoern A. Zeeb  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
216b4cac81SBjoern A. Zeeb  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
226b4cac81SBjoern A. Zeeb  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
236b4cac81SBjoern A. Zeeb  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
246b4cac81SBjoern A. Zeeb  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
256b4cac81SBjoern A. Zeeb  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
266b4cac81SBjoern A. Zeeb  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
276b4cac81SBjoern A. Zeeb  * SUCH DAMAGE.
286b4cac81SBjoern A. Zeeb  */
296b4cac81SBjoern A. Zeeb 
306b4cac81SBjoern A. Zeeb #ifndef	_LINUXKPI_NET_CFG80211_H
316b4cac81SBjoern A. Zeeb #define	_LINUXKPI_NET_CFG80211_H
326b4cac81SBjoern A. Zeeb 
336b4cac81SBjoern A. Zeeb #include <linux/types.h>
346b4cac81SBjoern A. Zeeb #include <linux/nl80211.h>
356b4cac81SBjoern A. Zeeb #include <linux/ieee80211.h>
36*95a7aa80SBjoern A. Zeeb #include <linux/mutex.h>
376b4cac81SBjoern A. Zeeb #include <linux/if_ether.h>
382e183d99SBjoern A. Zeeb #include <linux/ethtool.h>
396b4cac81SBjoern A. Zeeb #include <linux/device.h>
406b4cac81SBjoern A. Zeeb #include <linux/netdevice.h>
416b4cac81SBjoern A. Zeeb #include <linux/random.h>
426b4cac81SBjoern A. Zeeb #include <linux/skbuff.h>
43ac1d519cSBjoern A. Zeeb #include <linux/timer.h>
44ac1d519cSBjoern A. Zeeb #include <linux/workqueue.h>
452e183d99SBjoern A. Zeeb #include <net/regulatory.h>
466b4cac81SBjoern A. Zeeb 
476b4cac81SBjoern A. Zeeb /* linux_80211.c */
489d9ba2b7SBjoern A. Zeeb extern int linuxkpi_debug_80211;
496b4cac81SBjoern A. Zeeb #ifndef	D80211_TODO
506b4cac81SBjoern A. Zeeb #define	D80211_TODO		0x1
516b4cac81SBjoern A. Zeeb #endif
526b4cac81SBjoern A. Zeeb #ifndef	D80211_IMPROVE
536b4cac81SBjoern A. Zeeb #define	D80211_IMPROVE		0x2
546b4cac81SBjoern A. Zeeb #endif
55ac1d519cSBjoern A. Zeeb #define	TODO(fmt, ...)		if (linuxkpi_debug_80211 & D80211_TODO)	\
56ac1d519cSBjoern A. Zeeb     printf("%s:%d: XXX LKPI80211 TODO " fmt "\n",  __func__, __LINE__, ##__VA_ARGS__)
579d9ba2b7SBjoern A. Zeeb #define	IMPROVE(...)	if (linuxkpi_debug_80211 & D80211_IMPROVE)	\
586b4cac81SBjoern A. Zeeb     printf("%s:%d: XXX LKPI80211 IMPROVE\n", __func__, __LINE__)
596b4cac81SBjoern A. Zeeb 
60d875aa15SBjoern A. Zeeb enum rfkill_hard_block_reasons {
61d875aa15SBjoern A. Zeeb 	RFKILL_HARD_BLOCK_NOT_OWNER		= BIT(0),
62d875aa15SBjoern A. Zeeb };
63d875aa15SBjoern A. Zeeb 
646b4cac81SBjoern A. Zeeb #define	WIPHY_PARAM_FRAG_THRESHOLD			__LINE__ /* TODO FIXME brcmfmac */
656b4cac81SBjoern A. Zeeb #define	WIPHY_PARAM_RETRY_LONG				__LINE__ /* TODO FIXME brcmfmac */
666b4cac81SBjoern A. Zeeb #define	WIPHY_PARAM_RETRY_SHORT				__LINE__ /* TODO FIXME brcmfmac */
676b4cac81SBjoern A. Zeeb #define	WIPHY_PARAM_RTS_THRESHOLD			__LINE__ /* TODO FIXME brcmfmac */
686b4cac81SBjoern A. Zeeb 
696b4cac81SBjoern A. Zeeb #define	CFG80211_SIGNAL_TYPE_MBM			__LINE__ /* TODO FIXME brcmfmac */
706b4cac81SBjoern A. Zeeb 
716b4cac81SBjoern A. Zeeb #define	UPDATE_ASSOC_IES	1
726b4cac81SBjoern A. Zeeb 
736b4cac81SBjoern A. Zeeb #define	IEEE80211_MAX_CHAINS	4		/* net80211: IEEE80211_MAX_CHAINS copied */
746b4cac81SBjoern A. Zeeb 
756b4cac81SBjoern A. Zeeb enum cfg80211_rate_info_flags {
76adff403fSBjoern A. Zeeb 	RATE_INFO_FLAGS_MCS		= BIT(0),
77adff403fSBjoern A. Zeeb 	RATE_INFO_FLAGS_VHT_MCS		= BIT(1),
78adff403fSBjoern A. Zeeb 	RATE_INFO_FLAGS_SHORT_GI	= BIT(2),
79adff403fSBjoern A. Zeeb 	RATE_INFO_FLAGS_HE_MCS		= BIT(4),
80adff403fSBjoern A. Zeeb 	RATE_INFO_FLAGS_EHT_MCS		= BIT(7),
81800aa9cdSBjoern A. Zeeb 	/* Max 8 bits as used in struct rate_info. */
826b4cac81SBjoern A. Zeeb };
836b4cac81SBjoern A. Zeeb 
846b4cac81SBjoern A. Zeeb extern const uint8_t rfc1042_header[6];
85b0f73768SBjoern A. Zeeb extern const uint8_t bridge_tunnel_header[6];
866b4cac81SBjoern A. Zeeb 
872e183d99SBjoern A. Zeeb enum ieee80211_privacy {
882e183d99SBjoern A. Zeeb 	IEEE80211_PRIVACY_ANY,
892e183d99SBjoern A. Zeeb };
902e183d99SBjoern A. Zeeb 
912e183d99SBjoern A. Zeeb enum ieee80211_bss_type {
922e183d99SBjoern A. Zeeb 	IEEE80211_BSS_TYPE_ANY,
932e183d99SBjoern A. Zeeb };
942e183d99SBjoern A. Zeeb 
952e183d99SBjoern A. Zeeb enum cfg80211_bss_frame_type {
966b4cac81SBjoern A. Zeeb 	CFG80211_BSS_FTYPE_UNKNOWN,
972e183d99SBjoern A. Zeeb 	CFG80211_BSS_FTYPE_BEACON,
982e183d99SBjoern A. Zeeb 	CFG80211_BSS_FTYPE_PRESP,
996b4cac81SBjoern A. Zeeb };
1006b4cac81SBjoern A. Zeeb 
1016b4cac81SBjoern A. Zeeb enum ieee80211_channel_flags {
102d7ce88aaSBjoern A. Zeeb 	IEEE80211_CHAN_DISABLED			= BIT(0),
103d7ce88aaSBjoern A. Zeeb 	IEEE80211_CHAN_INDOOR_ONLY		= BIT(1),
104d7ce88aaSBjoern A. Zeeb 	IEEE80211_CHAN_IR_CONCURRENT		= BIT(2),
105d7ce88aaSBjoern A. Zeeb 	IEEE80211_CHAN_RADAR			= BIT(3),
106d7ce88aaSBjoern A. Zeeb 	IEEE80211_CHAN_NO_IR			= BIT(4),
107d7ce88aaSBjoern A. Zeeb 	IEEE80211_CHAN_NO_HT40MINUS		= BIT(5),
108d7ce88aaSBjoern A. Zeeb 	IEEE80211_CHAN_NO_HT40PLUS		= BIT(6),
109d7ce88aaSBjoern A. Zeeb 	IEEE80211_CHAN_NO_80MHZ			= BIT(7),
110d7ce88aaSBjoern A. Zeeb 	IEEE80211_CHAN_NO_160MHZ		= BIT(8),
1112e183d99SBjoern A. Zeeb 	IEEE80211_CHAN_NO_OFDM			= BIT(9),
112ac1d519cSBjoern A. Zeeb 	IEEE80211_CHAN_NO_6GHZ_VLP_CLIENT	= BIT(10),
113ac1d519cSBjoern A. Zeeb 	IEEE80211_CHAN_NO_6GHZ_AFC_CLIENT	= BIT(11),
114ac1d519cSBjoern A. Zeeb 	IEEE80211_CHAN_PSD			= BIT(12),
115ac1d519cSBjoern A. Zeeb 	IEEE80211_CHAN_ALLOW_6GHZ_VLP_AP	= BIT(13),
116ac1d519cSBjoern A. Zeeb 	IEEE80211_CHAN_CAN_MONITOR		= BIT(14),
1176b4cac81SBjoern A. Zeeb };
1186b4cac81SBjoern A. Zeeb #define	IEEE80211_CHAN_NO_HT40	(IEEE80211_CHAN_NO_HT40MINUS|IEEE80211_CHAN_NO_HT40PLUS)
1196b4cac81SBjoern A. Zeeb 
1206b4cac81SBjoern A. Zeeb struct ieee80211_txrx_stypes {
1216b4cac81SBjoern A. Zeeb 	uint16_t	tx;
1226b4cac81SBjoern A. Zeeb 	uint16_t	rx;
1236b4cac81SBjoern A. Zeeb };
1246b4cac81SBjoern A. Zeeb 
1256b4cac81SBjoern A. Zeeb /* XXX net80211 has an ieee80211_channel as well. */
1266b4cac81SBjoern A. Zeeb struct linuxkpi_ieee80211_channel {
1276b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
1286b4cac81SBjoern A. Zeeb 	uint32_t				hw_value;	/* ic_ieee */
1296b4cac81SBjoern A. Zeeb 	uint32_t				center_freq;	/* ic_freq */
1306b4cac81SBjoern A. Zeeb 	enum ieee80211_channel_flags		flags;		/* ic_flags */
1316b4cac81SBjoern A. Zeeb 	enum nl80211_band			band;
1326b4cac81SBjoern A. Zeeb 	int8_t					max_power;	/* ic_maxpower */
1336b4cac81SBjoern A. Zeeb 	bool					beacon_found;
1346b4cac81SBjoern A. Zeeb 	int     max_antenna_gain, max_reg_power;
1356b4cac81SBjoern A. Zeeb 	int     orig_flags;
1362e183d99SBjoern A. Zeeb 	int	dfs_cac_ms, dfs_state;
137b0f73768SBjoern A. Zeeb 	int	orig_mpwr;
1386b4cac81SBjoern A. Zeeb };
1396b4cac81SBjoern A. Zeeb 
1406b4cac81SBjoern A. Zeeb struct cfg80211_bitrate_mask {
1416b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
1426b4cac81SBjoern A. Zeeb 	struct {
143800aa9cdSBjoern A. Zeeb 		uint32_t			legacy;
1442e183d99SBjoern A. Zeeb 		uint8_t				ht_mcs[IEEE80211_HT_MCS_MASK_LEN];
145800aa9cdSBjoern A. Zeeb 		uint16_t			vht_mcs[8];
146800aa9cdSBjoern A. Zeeb 		uint16_t			he_mcs[8];
1472e183d99SBjoern A. Zeeb 		enum nl80211_txrate_gi		gi;
148b0f73768SBjoern A. Zeeb 		enum nl80211_he_gi		he_gi;
149800aa9cdSBjoern A. Zeeb 		uint8_t				he_ltf;		/* XXX enum? */
1506b4cac81SBjoern A. Zeeb 	} control[NUM_NL80211_BANDS];
1516b4cac81SBjoern A. Zeeb };
1526b4cac81SBjoern A. Zeeb 
153b0f73768SBjoern A. Zeeb enum rate_info_bw {
154b0f73768SBjoern A. Zeeb 	RATE_INFO_BW_20		= 0,
155b0f73768SBjoern A. Zeeb 	RATE_INFO_BW_5,
156b0f73768SBjoern A. Zeeb 	RATE_INFO_BW_10,
157b0f73768SBjoern A. Zeeb 	RATE_INFO_BW_40,
158b0f73768SBjoern A. Zeeb 	RATE_INFO_BW_80,
159b0f73768SBjoern A. Zeeb 	RATE_INFO_BW_160,
160b0f73768SBjoern A. Zeeb 	RATE_INFO_BW_HE_RU,
161adff403fSBjoern A. Zeeb 	RATE_INFO_BW_320,
162adff403fSBjoern A. Zeeb 	RATE_INFO_BW_EHT_RU,
163b0f73768SBjoern A. Zeeb };
164b0f73768SBjoern A. Zeeb 
1656b4cac81SBjoern A. Zeeb struct rate_info {
166800aa9cdSBjoern A. Zeeb 	uint8_t					flags;			/* enum cfg80211_rate_info_flags */
167800aa9cdSBjoern A. Zeeb 	uint8_t					bw;
168800aa9cdSBjoern A. Zeeb 	uint16_t				legacy;
169800aa9cdSBjoern A. Zeeb 	uint8_t					mcs;
170800aa9cdSBjoern A. Zeeb 	uint8_t					nss;
171800aa9cdSBjoern A. Zeeb 	uint8_t					he_dcm;
172800aa9cdSBjoern A. Zeeb 	uint8_t					he_gi;
173800aa9cdSBjoern A. Zeeb 	uint8_t					he_ru_alloc;
174adff403fSBjoern A. Zeeb 	uint8_t					eht_gi;
1756b4cac81SBjoern A. Zeeb };
1766b4cac81SBjoern A. Zeeb 
1776b4cac81SBjoern A. Zeeb struct ieee80211_rate {
1786b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
1796b4cac81SBjoern A. Zeeb 	uint32_t		bitrate;
1806b4cac81SBjoern A. Zeeb 	uint32_t		hw_value;
1816b4cac81SBjoern A. Zeeb 	uint32_t		hw_value_short;
1826b4cac81SBjoern A. Zeeb 	uint32_t		flags;
1836b4cac81SBjoern A. Zeeb };
1846b4cac81SBjoern A. Zeeb 
1856b4cac81SBjoern A. Zeeb struct ieee80211_sta_ht_cap {
1866b4cac81SBjoern A. Zeeb 	bool					ht_supported;
18705e640dcSBjoern A. Zeeb 	uint8_t					ampdu_density;
18805e640dcSBjoern A. Zeeb 	uint8_t					ampdu_factor;
1896b4cac81SBjoern A. Zeeb 	uint16_t				cap;
190b0f73768SBjoern A. Zeeb 	struct ieee80211_mcs_info		mcs;
1916b4cac81SBjoern A. Zeeb };
1926b4cac81SBjoern A. Zeeb 
1936b4cac81SBjoern A. Zeeb /* XXX net80211 calls these IEEE80211_VHTCAP_* */
1946b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895	0x00000000	/* IEEE80211_VHTCAP_MAX_MPDU_LENGTH_3895 */
1956b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991	0x00000001	/* IEEE80211_VHTCAP_MAX_MPDU_LENGTH_7991 */
1966b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454	0x00000002	/* IEEE80211_VHTCAP_MAX_MPDU_LENGTH_11454 */
1976b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_MAX_MPDU_MASK		0x00000003	/* IEEE80211_VHTCAP_MAX_MPDU_MASK */
1986b4cac81SBjoern A. Zeeb 
1996b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ		(IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_160MHZ << IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK_S)
2002e183d99SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ	(IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_160_80P80MHZ << IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK_S)
2012e183d99SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK	0x0000000c	/* IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK */
2026b4cac81SBjoern A. Zeeb 
2036b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_RXLDPC		0x00000010	/* IEEE80211_VHTCAP_RXLDPC */
2046b4cac81SBjoern A. Zeeb 
2056b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_SHORT_GI_80		0x00000020	/* IEEE80211_VHTCAP_SHORT_GI_80 */
2066b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_SHORT_GI_160		0x00000040	/* IEEE80211_VHTCAP_SHORT_GI_160 */
2076b4cac81SBjoern A. Zeeb 
2086b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_TXSTBC		0x00000080	/* IEEE80211_VHTCAP_TXSTBC */
2096b4cac81SBjoern A. Zeeb 
2106b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_RXSTBC_1		0x00000100	/* IEEE80211_VHTCAP_RXSTBC_1 */
2116b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_RXSTBC_MASK		0x00000700	/* IEEE80211_VHTCAP_RXSTBC_MASK */
2126b4cac81SBjoern A. Zeeb 
2136b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE	0x00000800	/* IEEE80211_VHTCAP_SU_BEAMFORMER_CAPABLE */
2146b4cac81SBjoern A. Zeeb 
2156b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE	0x00001000	/* IEEE80211_VHTCAP_SU_BEAMFORMEE_CAPABLE */
2166b4cac81SBjoern A. Zeeb 
2176b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE	0x00080000	/* IEEE80211_VHTCAP_MU_BEAMFORMER_CAPABLE */
2186b4cac81SBjoern A. Zeeb 
2196b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE	0x00100000	/* IEEE80211_VHTCAP_MU_BEAMFORMEE_CAPABLE */
2206b4cac81SBjoern A. Zeeb 
2216b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT		13	/* IEEE80211_VHTCAP_BEAMFORMEE_STS_SHIFT */
2222e183d99SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_BEAMFORMEE_STS_MASK		(7 << IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT)	/* IEEE80211_VHTCAP_BEAMFORMEE_STS_MASK */
2236b4cac81SBjoern A. Zeeb 
2246b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_HTC_VHT		0x00400000	/* IEEE80211_VHTCAP_HTC_VHT */
2256b4cac81SBjoern A. Zeeb 
2266b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN	0x10000000	/* IEEE80211_VHTCAP_RX_ANTENNA_PATTERN */
2276b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN	0x20000000	/* IEEE80211_VHTCAP_TX_ANTENNA_PATTERN */
2286b4cac81SBjoern A. Zeeb 
2296b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB	0x0c000000	/* IEEE80211_VHTCAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB */
2306b4cac81SBjoern A. Zeeb 
2316b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_SHIFT	16	/* IEEE80211_VHTCAP_SOUNDING_DIMENSIONS_SHIFT */
2326b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK		\
2336b4cac81SBjoern A. Zeeb 	(7 << IEEE80211_VHTCAP_SOUNDING_DIMENSIONS_SHIFT)	/* IEEE80211_VHTCAP_SOUNDING_DIMENSIONS_MASK */
2346b4cac81SBjoern A. Zeeb 
2356b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT	23	/* IEEE80211_VHTCAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT */
2366b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK	\
2376b4cac81SBjoern A. Zeeb 	(7 << IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT)	/* IEEE80211_VHTCAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK */
2386b4cac81SBjoern A. Zeeb 
239adff403fSBjoern A. Zeeb #define	IEEE80211_VHT_CAP_EXT_NSS_BW_MASK	0xc0000000
2402e183d99SBjoern A. Zeeb 
2416b4cac81SBjoern A. Zeeb struct ieee80211_sta_vht_cap {
2426b4cac81SBjoern A. Zeeb 		/* TODO FIXME */
2436b4cac81SBjoern A. Zeeb 	bool				vht_supported;
2446b4cac81SBjoern A. Zeeb 	uint32_t			cap;
245800aa9cdSBjoern A. Zeeb 	struct ieee80211_vht_mcs_info	vht_mcs;
2466b4cac81SBjoern A. Zeeb };
2476b4cac81SBjoern A. Zeeb 
248b0f73768SBjoern A. Zeeb enum ieee80211_vht_opmode {
249b0f73768SBjoern A. Zeeb 	IEEE80211_OPMODE_NOTIF_RX_NSS_SHIFT	= 4,
250b0f73768SBjoern A. Zeeb };
251b0f73768SBjoern A. Zeeb 
2526b4cac81SBjoern A. Zeeb struct cfg80211_connect_resp_params {
2536b4cac81SBjoern A. Zeeb 		/* XXX TODO */
2546b4cac81SBjoern A. Zeeb 	uint8_t				*bssid;
2556b4cac81SBjoern A. Zeeb 	const uint8_t			*req_ie;
2566b4cac81SBjoern A. Zeeb 	const uint8_t			*resp_ie;
2576b4cac81SBjoern A. Zeeb 	uint32_t			req_ie_len;
2586b4cac81SBjoern A. Zeeb 	uint32_t			resp_ie_len;
2596b4cac81SBjoern A. Zeeb 	int	status;
2606b4cac81SBjoern A. Zeeb };
2616b4cac81SBjoern A. Zeeb 
2626b4cac81SBjoern A. Zeeb struct cfg80211_inform_bss {
2636b4cac81SBjoern A. Zeeb 		/* XXX TODO */
2646b4cac81SBjoern A. Zeeb 	int     boottime_ns, scan_width, signal;
2656b4cac81SBjoern A. Zeeb 	struct linuxkpi_ieee80211_channel	*chan;
2666b4cac81SBjoern A. Zeeb };
2676b4cac81SBjoern A. Zeeb 
2686b4cac81SBjoern A. Zeeb struct cfg80211_roam_info {
2696b4cac81SBjoern A. Zeeb 		/* XXX TODO */
2706b4cac81SBjoern A. Zeeb 	uint8_t				*bssid;
2716b4cac81SBjoern A. Zeeb 	const uint8_t			*req_ie;
2726b4cac81SBjoern A. Zeeb 	const uint8_t			*resp_ie;
2736b4cac81SBjoern A. Zeeb 	uint32_t			req_ie_len;
2746b4cac81SBjoern A. Zeeb 	uint32_t			resp_ie_len;
2756b4cac81SBjoern A. Zeeb 	struct linuxkpi_ieee80211_channel	*channel;
2766b4cac81SBjoern A. Zeeb };
2776b4cac81SBjoern A. Zeeb 
2786b4cac81SBjoern A. Zeeb struct cfg80211_bss_ies {
2796b4cac81SBjoern A. Zeeb 	uint8_t				*data;
280a3baca22SBjoern A. Zeeb 	size_t				len;
2816b4cac81SBjoern A. Zeeb };
2826b4cac81SBjoern A. Zeeb 
2836b4cac81SBjoern A. Zeeb struct cfg80211_bss {
2846b4cac81SBjoern A. Zeeb 		/* XXX TODO */
2856b4cac81SBjoern A. Zeeb 	struct cfg80211_bss_ies		*ies;
286ac1d519cSBjoern A. Zeeb 	struct cfg80211_bss_ies		*beacon_ies;
287ac1d519cSBjoern A. Zeeb 
288ac1d519cSBjoern A. Zeeb 	int32_t				signal;
2896b4cac81SBjoern A. Zeeb };
2906b4cac81SBjoern A. Zeeb 
2916b4cac81SBjoern A. Zeeb struct cfg80211_chan_def {
2926b4cac81SBjoern A. Zeeb 		/* XXX TODO */
2936b4cac81SBjoern A. Zeeb 	struct linuxkpi_ieee80211_channel	*chan;
2946b4cac81SBjoern A. Zeeb 	enum nl80211_chan_width		width;
2956b4cac81SBjoern A. Zeeb 	uint32_t			center_freq1;
2966b4cac81SBjoern A. Zeeb 	uint32_t			center_freq2;
297ac1d519cSBjoern A. Zeeb 	uint16_t			punctured;
2986b4cac81SBjoern A. Zeeb };
2996b4cac81SBjoern A. Zeeb 
3006b4cac81SBjoern A. Zeeb struct cfg80211_ftm_responder_stats {
3016b4cac81SBjoern A. Zeeb 		/* XXX TODO */
3026b4cac81SBjoern A. Zeeb 	int	asap_num, failed_num, filled, non_asap_num, out_of_window_triggers_num, partial_num, reschedule_requests_num, success_num, total_duration_ms, unknown_triggers_num;
3036b4cac81SBjoern A. Zeeb };
3046b4cac81SBjoern A. Zeeb 
3056b4cac81SBjoern A. Zeeb struct cfg80211_pmsr_capabilities {
3066b4cac81SBjoern A. Zeeb 		/* XXX TODO */
3076b4cac81SBjoern A. Zeeb 	int	max_peers, randomize_mac_addr, report_ap_tsf;
3086b4cac81SBjoern A. Zeeb 	struct {
3096b4cac81SBjoern A. Zeeb 		int	 asap, bandwidths, max_bursts_exponent, max_ftms_per_burst, non_asap, non_trigger_based, preambles, request_civicloc, request_lci, supported, trigger_based;
3106b4cac81SBjoern A. Zeeb 	} ftm;
3116b4cac81SBjoern A. Zeeb };
3126b4cac81SBjoern A. Zeeb 
3136b4cac81SBjoern A. Zeeb struct cfg80211_pmsr_ftm_request {
3146b4cac81SBjoern A. Zeeb 		/* XXX TODO */
3156b4cac81SBjoern A. Zeeb 	int     asap, burst_period, ftmr_retries, ftms_per_burst, non_trigger_based, num_bursts_exp, request_civicloc, request_lci, trigger_based;
3166b4cac81SBjoern A. Zeeb 	uint8_t					bss_color;
3176b4cac81SBjoern A. Zeeb 	bool					lmr_feedback;
3186b4cac81SBjoern A. Zeeb };
3196b4cac81SBjoern A. Zeeb 
3206b4cac81SBjoern A. Zeeb struct cfg80211_pmsr_request_peer {
3216b4cac81SBjoern A. Zeeb 		/* XXX TODO */
3226b4cac81SBjoern A. Zeeb 	struct cfg80211_chan_def		chandef;
3236b4cac81SBjoern A. Zeeb 	struct cfg80211_pmsr_ftm_request	ftm;
3246b4cac81SBjoern A. Zeeb 	uint8_t					addr[ETH_ALEN];
3256b4cac81SBjoern A. Zeeb 	int	report_ap_tsf;
3266b4cac81SBjoern A. Zeeb };
3276b4cac81SBjoern A. Zeeb 
3286b4cac81SBjoern A. Zeeb struct cfg80211_pmsr_request {
3296b4cac81SBjoern A. Zeeb 		/* XXX TODO */
3306b4cac81SBjoern A. Zeeb 	int	cookie, n_peers, timeout;
3316b4cac81SBjoern A. Zeeb 	uint8_t					mac_addr[ETH_ALEN], mac_addr_mask[ETH_ALEN];
3326b4cac81SBjoern A. Zeeb 	struct cfg80211_pmsr_request_peer	peers[];
3336b4cac81SBjoern A. Zeeb };
3346b4cac81SBjoern A. Zeeb 
3356b4cac81SBjoern A. Zeeb struct cfg80211_pmsr_ftm_result {
3366b4cac81SBjoern A. Zeeb 		/* XXX TODO */
3376b4cac81SBjoern A. Zeeb 	int	burst_index, busy_retry_time, failure_reason;
3386b4cac81SBjoern A. Zeeb 	int	num_ftmr_successes, rssi_avg, rssi_avg_valid, rssi_spread, rssi_spread_valid, rtt_avg, rtt_avg_valid, rtt_spread, rtt_spread_valid, rtt_variance, rtt_variance_valid;
3396b4cac81SBjoern A. Zeeb 	uint8_t					*lci;
3406b4cac81SBjoern A. Zeeb 	uint8_t					*civicloc;
3416b4cac81SBjoern A. Zeeb 	int					lci_len;
3426b4cac81SBjoern A. Zeeb 	int					civicloc_len;
3436b4cac81SBjoern A. Zeeb };
3446b4cac81SBjoern A. Zeeb 
3456b4cac81SBjoern A. Zeeb struct cfg80211_pmsr_result {
3466b4cac81SBjoern A. Zeeb 		/* XXX TODO */
3476b4cac81SBjoern A. Zeeb 	int	ap_tsf, ap_tsf_valid, final, host_time, status, type;
3486b4cac81SBjoern A. Zeeb 	uint8_t					addr[ETH_ALEN];
3496b4cac81SBjoern A. Zeeb 	struct cfg80211_pmsr_ftm_result		ftm;
3506b4cac81SBjoern A. Zeeb };
3516b4cac81SBjoern A. Zeeb 
35251b461b3SBjoern A. Zeeb struct cfg80211_sar_freq_ranges {
35351b461b3SBjoern A. Zeeb 	uint32_t				start_freq;
35451b461b3SBjoern A. Zeeb 	uint32_t				end_freq;
35551b461b3SBjoern A. Zeeb };
35651b461b3SBjoern A. Zeeb 
35751b461b3SBjoern A. Zeeb struct cfg80211_sar_sub_specs {
35851b461b3SBjoern A. Zeeb 	uint32_t				freq_range_index;
35951b461b3SBjoern A. Zeeb 	int					power;
36051b461b3SBjoern A. Zeeb };
36151b461b3SBjoern A. Zeeb 
36251b461b3SBjoern A. Zeeb struct cfg80211_sar_specs {
36351b461b3SBjoern A. Zeeb 	enum nl80211_sar_type			type;
36451b461b3SBjoern A. Zeeb 	uint32_t				num_sub_specs;
36551b461b3SBjoern A. Zeeb 	struct cfg80211_sar_sub_specs		sub_specs[];
36651b461b3SBjoern A. Zeeb };
36751b461b3SBjoern A. Zeeb 
36851b461b3SBjoern A. Zeeb struct cfg80211_sar_capa {
36951b461b3SBjoern A. Zeeb 	enum nl80211_sar_type			type;
37051b461b3SBjoern A. Zeeb 	uint32_t				num_freq_ranges;
37151b461b3SBjoern A. Zeeb 	const struct cfg80211_sar_freq_ranges	*freq_ranges;
37251b461b3SBjoern A. Zeeb };
37351b461b3SBjoern A. Zeeb 
3746b4cac81SBjoern A. Zeeb struct cfg80211_ssid {
3756b4cac81SBjoern A. Zeeb 	int	ssid_len;
3766b4cac81SBjoern A. Zeeb 	uint8_t	ssid[IEEE80211_MAX_SSID_LEN];
3776b4cac81SBjoern A. Zeeb };
3786b4cac81SBjoern A. Zeeb 
3796b4cac81SBjoern A. Zeeb struct cfg80211_scan_6ghz_params {
3806b4cac81SBjoern A. Zeeb 	/* XXX TODO */
3816b4cac81SBjoern A. Zeeb 	uint8_t				*bssid;
382adff403fSBjoern A. Zeeb 	int	channel_idx, psc_no_listen, short_ssid, short_ssid_valid, unsolicited_probe, psd_20;
3836b4cac81SBjoern A. Zeeb };
3846b4cac81SBjoern A. Zeeb 
3856b4cac81SBjoern A. Zeeb struct cfg80211_match_set {
3866b4cac81SBjoern A. Zeeb 	uint8_t					bssid[ETH_ALEN];
3876b4cac81SBjoern A. Zeeb 	struct cfg80211_ssid	ssid;
3886b4cac81SBjoern A. Zeeb 	int			rssi_thold;
3896b4cac81SBjoern A. Zeeb };
3906b4cac81SBjoern A. Zeeb 
3916b4cac81SBjoern A. Zeeb struct cfg80211_scan_request {
3926b4cac81SBjoern A. Zeeb 		/* XXX TODO */
3936b4cac81SBjoern A. Zeeb 	bool					no_cck;
3946b4cac81SBjoern A. Zeeb 	bool					scan_6ghz;
395ac1d519cSBjoern A. Zeeb 	bool					duration_mandatory;
396ac1d519cSBjoern A. Zeeb 	int8_t					tsf_report_link_id;
397ac1d519cSBjoern A. Zeeb 	uint16_t				duration;
398ac1d519cSBjoern A. Zeeb 	uint32_t				flags;
3996b4cac81SBjoern A. Zeeb 	struct wireless_dev			*wdev;
4006b4cac81SBjoern A. Zeeb 	struct wiphy				*wiphy;
401ac1d519cSBjoern A. Zeeb 	uint64_t				scan_start;
402ac1d519cSBjoern A. Zeeb 	uint32_t				rates[NUM_NL80211_BANDS];
4036b4cac81SBjoern A. Zeeb 	int					ie_len;
4046b4cac81SBjoern A. Zeeb 	uint8_t					*ie;
4056b4cac81SBjoern A. Zeeb 	uint8_t					mac_addr[ETH_ALEN], mac_addr_mask[ETH_ALEN];
406b0f73768SBjoern A. Zeeb 	uint8_t					bssid[ETH_ALEN];
4076b4cac81SBjoern A. Zeeb 	int					n_ssids;
4086b4cac81SBjoern A. Zeeb 	int					n_6ghz_params;
4096b4cac81SBjoern A. Zeeb 	int					n_channels;
4106b4cac81SBjoern A. Zeeb 	struct cfg80211_ssid			*ssids;
4116b4cac81SBjoern A. Zeeb 	struct cfg80211_scan_6ghz_params 	*scan_6ghz_params;
4126b4cac81SBjoern A. Zeeb 	struct linuxkpi_ieee80211_channel	*channels[0];
4136b4cac81SBjoern A. Zeeb };
4146b4cac81SBjoern A. Zeeb 
4156b4cac81SBjoern A. Zeeb struct cfg80211_sched_scan_plan {
4166b4cac81SBjoern A. Zeeb 		/* XXX TODO */
4176b4cac81SBjoern A. Zeeb 	int	interval, iterations;
4186b4cac81SBjoern A. Zeeb };
4196b4cac81SBjoern A. Zeeb 
4206b4cac81SBjoern A. Zeeb struct cfg80211_sched_scan_request {
4216b4cac81SBjoern A. Zeeb 		/* XXX TODO */
4226b4cac81SBjoern A. Zeeb 	int	delay, flags;
4236b4cac81SBjoern A. Zeeb 	uint8_t					mac_addr[ETH_ALEN], mac_addr_mask[ETH_ALEN];
4246b4cac81SBjoern A. Zeeb 	uint64_t				reqid;
4256b4cac81SBjoern A. Zeeb 	int					n_match_sets;
4266b4cac81SBjoern A. Zeeb 	int					n_scan_plans;
4276b4cac81SBjoern A. Zeeb 	int					n_ssids;
4286b4cac81SBjoern A. Zeeb 	int					n_channels;
429b0f73768SBjoern A. Zeeb 	int					ie_len;
430b0f73768SBjoern A. Zeeb 	uint8_t					*ie;
4316b4cac81SBjoern A. Zeeb 	struct cfg80211_match_set		*match_sets;
4326b4cac81SBjoern A. Zeeb 	struct cfg80211_sched_scan_plan		*scan_plans;
4336b4cac81SBjoern A. Zeeb 	struct cfg80211_ssid			*ssids;
4346b4cac81SBjoern A. Zeeb 	struct linuxkpi_ieee80211_channel	*channels[0];
4356b4cac81SBjoern A. Zeeb };
4366b4cac81SBjoern A. Zeeb 
4376b4cac81SBjoern A. Zeeb struct cfg80211_scan_info {
4386b4cac81SBjoern A. Zeeb 	uint64_t				scan_start_tsf;
4396b4cac81SBjoern A. Zeeb 	uint8_t					tsf_bssid[ETH_ALEN];
4406b4cac81SBjoern A. Zeeb 	bool					aborted;
4416b4cac81SBjoern A. Zeeb };
4426b4cac81SBjoern A. Zeeb 
4436b4cac81SBjoern A. Zeeb struct cfg80211_beacon_data {
4446b4cac81SBjoern A. Zeeb 	/* XXX TODO */
4456b4cac81SBjoern A. Zeeb 	const uint8_t				*head;
4466b4cac81SBjoern A. Zeeb 	const uint8_t				*tail;
4476b4cac81SBjoern A. Zeeb 	uint32_t				head_len;
4486b4cac81SBjoern A. Zeeb 	uint32_t				tail_len;
4496b4cac81SBjoern A. Zeeb 	const uint8_t				*proberesp_ies;
4506b4cac81SBjoern A. Zeeb 	const uint8_t				*assocresp_ies;
4516b4cac81SBjoern A. Zeeb 	uint32_t				proberesp_ies_len;
4526b4cac81SBjoern A. Zeeb 	uint32_t				assocresp_ies_len;
4536b4cac81SBjoern A. Zeeb };
4546b4cac81SBjoern A. Zeeb 
4556b4cac81SBjoern A. Zeeb struct cfg80211_ap_settings {
4566b4cac81SBjoern A. Zeeb 	/* XXX TODO */
4576b4cac81SBjoern A. Zeeb 	int     auth_type, beacon_interval, dtim_period, hidden_ssid, inactivity_timeout;
4586b4cac81SBjoern A. Zeeb 	const uint8_t				*ssid;
4596b4cac81SBjoern A. Zeeb 	size_t					ssid_len;
4606b4cac81SBjoern A. Zeeb 	struct cfg80211_beacon_data		beacon;
4616b4cac81SBjoern A. Zeeb 	struct cfg80211_chan_def		chandef;
4626b4cac81SBjoern A. Zeeb };
4636b4cac81SBjoern A. Zeeb 
4646b4cac81SBjoern A. Zeeb struct cfg80211_bss_selection {
4656b4cac81SBjoern A. Zeeb 	/* XXX TODO */
4666b4cac81SBjoern A. Zeeb 	enum nl80211_bss_select_attr		behaviour;
4676b4cac81SBjoern A. Zeeb 	union {
4686b4cac81SBjoern A. Zeeb 		enum nl80211_band		band_pref;
4696b4cac81SBjoern A. Zeeb 		struct {
4706b4cac81SBjoern A. Zeeb 			enum nl80211_band	band;
4716b4cac81SBjoern A. Zeeb 			uint8_t			delta;
4726b4cac81SBjoern A. Zeeb 		} adjust;
4736b4cac81SBjoern A. Zeeb 	} param;
4746b4cac81SBjoern A. Zeeb };
4756b4cac81SBjoern A. Zeeb 
4766b4cac81SBjoern A. Zeeb struct cfg80211_crypto {		/* XXX made up name */
4776b4cac81SBjoern A. Zeeb 	/* XXX TODO */
4786b4cac81SBjoern A. Zeeb 	enum nl80211_wpa_versions		wpa_versions;
4796b4cac81SBjoern A. Zeeb 	uint32_t				cipher_group;	/* WLAN_CIPHER_SUITE_* */
4806b4cac81SBjoern A. Zeeb 	uint32_t				*akm_suites;
4816b4cac81SBjoern A. Zeeb 	uint32_t				*ciphers_pairwise;
4826b4cac81SBjoern A. Zeeb 	const uint8_t				*sae_pwd;
4836b4cac81SBjoern A. Zeeb 	const uint8_t				*psk;
4846b4cac81SBjoern A. Zeeb 	int					n_akm_suites;
4856b4cac81SBjoern A. Zeeb 	int					n_ciphers_pairwise;
4866b4cac81SBjoern A. Zeeb 	int					sae_pwd_len;
4876b4cac81SBjoern A. Zeeb };
4886b4cac81SBjoern A. Zeeb 
4896b4cac81SBjoern A. Zeeb struct cfg80211_connect_params {
4906b4cac81SBjoern A. Zeeb 	/* XXX TODO */
4916b4cac81SBjoern A. Zeeb 	struct linuxkpi_ieee80211_channel	*channel;
4926b4cac81SBjoern A. Zeeb 	uint8_t					*bssid;
4936b4cac81SBjoern A. Zeeb 	const uint8_t				*ie;
4946b4cac81SBjoern A. Zeeb 	const uint8_t				*ssid;
4956b4cac81SBjoern A. Zeeb 	uint32_t				ie_len;
4966b4cac81SBjoern A. Zeeb 	uint32_t				ssid_len;
4976b4cac81SBjoern A. Zeeb 	const void				*key;
4986b4cac81SBjoern A. Zeeb 	uint32_t				key_len;
4996b4cac81SBjoern A. Zeeb 	int     auth_type, key_idx, privacy, want_1x;
5006b4cac81SBjoern A. Zeeb 	struct cfg80211_bss_selection		bss_select;
5016b4cac81SBjoern A. Zeeb 	struct cfg80211_crypto			crypto;
5026b4cac81SBjoern A. Zeeb };
5036b4cac81SBjoern A. Zeeb 
5046b4cac81SBjoern A. Zeeb enum bss_param_flags {		/* Used as bitflags. XXX FIXME values? */
5056b4cac81SBjoern A. Zeeb 	BSS_PARAM_FLAGS_CTS_PROT	= 0x01,
5066b4cac81SBjoern A. Zeeb 	BSS_PARAM_FLAGS_SHORT_PREAMBLE	= 0x02,
5076b4cac81SBjoern A. Zeeb 	BSS_PARAM_FLAGS_SHORT_SLOT_TIME = 0x04,
5086b4cac81SBjoern A. Zeeb };
5096b4cac81SBjoern A. Zeeb 
5106b4cac81SBjoern A. Zeeb struct cfg80211_ibss_params {
5116b4cac81SBjoern A. Zeeb 	/* XXX TODO */
5126b4cac81SBjoern A. Zeeb 	int     basic_rates, beacon_interval;
5136b4cac81SBjoern A. Zeeb 	int	channel_fixed, ie, ie_len, privacy;
5146b4cac81SBjoern A. Zeeb 	int	dtim_period;
5156b4cac81SBjoern A. Zeeb 	uint8_t					*ssid;
5166b4cac81SBjoern A. Zeeb 	uint8_t					*bssid;
5176b4cac81SBjoern A. Zeeb 	int					ssid_len;
5186b4cac81SBjoern A. Zeeb 	struct cfg80211_chan_def		chandef;
5196b4cac81SBjoern A. Zeeb 	enum bss_param_flags			flags;
5206b4cac81SBjoern A. Zeeb };
5216b4cac81SBjoern A. Zeeb 
5226b4cac81SBjoern A. Zeeb struct cfg80211_mgmt_tx_params {
5236b4cac81SBjoern A. Zeeb 	/* XXX TODO */
5246b4cac81SBjoern A. Zeeb 	struct linuxkpi_ieee80211_channel	*chan;
5256b4cac81SBjoern A. Zeeb 	const uint8_t				*buf;
5266b4cac81SBjoern A. Zeeb 	size_t					len;
5276b4cac81SBjoern A. Zeeb 	int	wait;
5286b4cac81SBjoern A. Zeeb };
5296b4cac81SBjoern A. Zeeb 
5306b4cac81SBjoern A. Zeeb struct cfg80211_pmk_conf {
5316b4cac81SBjoern A. Zeeb 	/* XXX TODO */
5326b4cac81SBjoern A. Zeeb 	const uint8_t			*pmk;
5336b4cac81SBjoern A. Zeeb 	uint8_t				pmk_len;
5346b4cac81SBjoern A. Zeeb };
5356b4cac81SBjoern A. Zeeb 
5366b4cac81SBjoern A. Zeeb struct cfg80211_pmksa {
5376b4cac81SBjoern A. Zeeb 	/* XXX TODO */
5386b4cac81SBjoern A. Zeeb 	const uint8_t			*bssid;
5396b4cac81SBjoern A. Zeeb 	const uint8_t			*pmkid;
5406b4cac81SBjoern A. Zeeb };
5416b4cac81SBjoern A. Zeeb 
5426b4cac81SBjoern A. Zeeb struct station_del_parameters {
5436b4cac81SBjoern A. Zeeb 	/* XXX TODO */
5446b4cac81SBjoern A. Zeeb 	const uint8_t				*mac;
5456b4cac81SBjoern A. Zeeb 	uint32_t				reason_code;	/* elsewhere uint16_t? */
5466b4cac81SBjoern A. Zeeb };
5476b4cac81SBjoern A. Zeeb 
5486b4cac81SBjoern A. Zeeb struct station_info {
5496b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
5506b4cac81SBjoern A. Zeeb 	int     assoc_req_ies_len, connected_time;
5516b4cac81SBjoern A. Zeeb 	int	generation, inactive_time, rx_bytes, rx_dropped_misc, rx_packets, signal, tx_bytes, tx_packets;
5526b4cac81SBjoern A. Zeeb 	int     filled, rx_beacon, rx_beacon_signal_avg, signal_avg;
5531d70218eSBjoern A. Zeeb 	int	rx_duration, tx_duration, tx_failed, tx_retries;
554adff403fSBjoern A. Zeeb 	int	ack_signal, avg_ack_signal;
5556b4cac81SBjoern A. Zeeb 
5566b4cac81SBjoern A. Zeeb 	int					chains;
5576b4cac81SBjoern A. Zeeb 	uint8_t					chain_signal[IEEE80211_MAX_CHAINS];
5586b4cac81SBjoern A. Zeeb 	uint8_t					chain_signal_avg[IEEE80211_MAX_CHAINS];
5596b4cac81SBjoern A. Zeeb 
5606b4cac81SBjoern A. Zeeb 	uint8_t					*assoc_req_ies;
5616b4cac81SBjoern A. Zeeb 	struct rate_info			rxrate;
5626b4cac81SBjoern A. Zeeb 	struct rate_info			txrate;
5636b4cac81SBjoern A. Zeeb 	struct cfg80211_ibss_params		bss_param;
5646b4cac81SBjoern A. Zeeb 	struct nl80211_sta_flag_update		sta_flags;
5656b4cac81SBjoern A. Zeeb };
5666b4cac81SBjoern A. Zeeb 
5676b4cac81SBjoern A. Zeeb struct station_parameters {
5686b4cac81SBjoern A. Zeeb 	/* XXX TODO */
5696b4cac81SBjoern A. Zeeb 	int     sta_flags_mask, sta_flags_set;
5706b4cac81SBjoern A. Zeeb };
5716b4cac81SBjoern A. Zeeb 
5726b4cac81SBjoern A. Zeeb struct key_params {
5736b4cac81SBjoern A. Zeeb 	/* XXX TODO */
5746b4cac81SBjoern A. Zeeb 	const uint8_t	*key;
5756b4cac81SBjoern A. Zeeb 	const uint8_t	*seq;
5766b4cac81SBjoern A. Zeeb 	int		key_len;
5776b4cac81SBjoern A. Zeeb 	int		seq_len;
5786b4cac81SBjoern A. Zeeb 	uint32_t	cipher;			/* WLAN_CIPHER_SUITE_* */
5796b4cac81SBjoern A. Zeeb };
5806b4cac81SBjoern A. Zeeb 
5816b4cac81SBjoern A. Zeeb struct mgmt_frame_regs {
5826b4cac81SBjoern A. Zeeb 	/* XXX TODO */
5836b4cac81SBjoern A. Zeeb 	int	interface_stypes;
5846b4cac81SBjoern A. Zeeb };
5856b4cac81SBjoern A. Zeeb 
5866b4cac81SBjoern A. Zeeb struct vif_params {
5876b4cac81SBjoern A. Zeeb 	/* XXX TODO */
5886b4cac81SBjoern A. Zeeb 	uint8_t			macaddr[ETH_ALEN];
5896b4cac81SBjoern A. Zeeb };
5906b4cac81SBjoern A. Zeeb 
5916b4cac81SBjoern A. Zeeb /* That the world needs so many different structs for this is amazing. */
5926b4cac81SBjoern A. Zeeb struct mac_address {
5936b4cac81SBjoern A. Zeeb 	uint8_t	addr[ETH_ALEN];
5946b4cac81SBjoern A. Zeeb };
5956b4cac81SBjoern A. Zeeb 
5966b4cac81SBjoern A. Zeeb struct ieee80211_reg_rule {
5976b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
5986b4cac81SBjoern A. Zeeb 	uint32_t	flags;
599f02e2115SBjoern A. Zeeb 	int	dfs_cac_ms;
6006b4cac81SBjoern A. Zeeb 	struct freq_range {
6016b4cac81SBjoern A. Zeeb 		int	start_freq_khz;
6026b4cac81SBjoern A. Zeeb 		int	end_freq_khz;
6036b4cac81SBjoern A. Zeeb 		int	max_bandwidth_khz;
6046b4cac81SBjoern A. Zeeb 	} freq_range;
6056b4cac81SBjoern A. Zeeb 	struct power_rule {
6066b4cac81SBjoern A. Zeeb 		int	max_antenna_gain;
6076b4cac81SBjoern A. Zeeb 		int	max_eirp;
6086b4cac81SBjoern A. Zeeb 	} power_rule;
6096b4cac81SBjoern A. Zeeb };
6106b4cac81SBjoern A. Zeeb 
6116b4cac81SBjoern A. Zeeb struct linuxkpi_ieee80211_regdomain {
6126b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
6136b4cac81SBjoern A. Zeeb 	uint8_t					alpha2[2];
6142e183d99SBjoern A. Zeeb 	int	dfs_region;
6156b4cac81SBjoern A. Zeeb 	int					n_reg_rules;
6166b4cac81SBjoern A. Zeeb 	struct ieee80211_reg_rule		reg_rules[];
6176b4cac81SBjoern A. Zeeb };
6186b4cac81SBjoern A. Zeeb 
6196b4cac81SBjoern A. Zeeb /* XXX-BZ this are insensible values probably ... */
6206b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP0_HTC_HE			0x1
6216b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP0_TWT_REQ			0x2
622b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP0_TWT_RES			0x4
6236b4cac81SBjoern A. Zeeb 
6246b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP1_LINK_ADAPTATION		0x1
6256b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_8	0x2
6266b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_16US	0x4
627b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_MASK	0x8
6286b4cac81SBjoern A. Zeeb 
6296b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP2_32BIT_BA_BITMAP		0x1
6306b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP2_ACK_EN			0x2
6316b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP2_BSR			0x4
6326b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP2_LINK_ADAPTATION		0x8
6336b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP2_BCAST_TWT			0x10
63451b461b3SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP2_ALL_ACK			0x20
635b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP2_MU_CASCADING		0x40
636b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP2_TRS			0x80
6376b4cac81SBjoern A. Zeeb 
63851117ed1SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP3_OMI_CONTROL		0x02
63951117ed1SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP3_OFDMA_RA			0x04
64051117ed1SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_1	0x08
64151117ed1SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2	0x10
64251117ed1SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3	0x18
64351117ed1SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK	0x18
64451117ed1SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP3_FLEX_TWT_SCHED		0x40
6456b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP3_RX_CTRL_FRAME_TO_MULTIBSS	0x80
6466b4cac81SBjoern A. Zeeb 
6476b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU		0x1
6486b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP4_BQR			0x2
6496b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP4_MULTI_TID_AGG_TX_QOS_B39	0x4
6506b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU		0x8
65151b461b3SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP4_OPS			0x10
652b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP4_BSRP_BQRP_A_MPDU_AGG	0x20
6536b4cac81SBjoern A. Zeeb 
6546b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP5_HE_DYNAMIC_SM_PS		0x1
6556b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP5_HT_VHT_TRIG_FRAME_RX	0x2
6566b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B40	0x4
6576b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B41	0x8
6586b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP5_UL_2x996_TONE_RU		0x10
659b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP5_OM_CTRL_UL_MU_DATA_DIS_RX	0x20
660b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP5_PUNCTURED_SOUNDING	0x40
661b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECTIVE_TRANSMISSION	0x80
6626b4cac81SBjoern A. Zeeb 
6636b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MCS_NOT_SUPPORTED			0x0
6646b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MCS_SUPPORT_0_7			0x1
6656b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MCS_SUPPORT_0_9			0x2
6666b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MCS_SUPPORT_0_11			0x4
6676b4cac81SBjoern A. Zeeb 
6686b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_6GHZ_CAP_TX_ANTPAT_CONS		0x01
6696b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_6GHZ_CAP_RX_ANTPAT_CONS		0x02
6706b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START		0x04
6716b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_6GHZ_CAP_MAX_MPDU_LEN		0x08
6726b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP		0x10
673b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_6GHZ_CAP_SM_PS			0x20
6746b4cac81SBjoern A. Zeeb 
6756b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G		0x1
6766b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G	0x2
6776b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G		0x4
67851b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G	0x8
679b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_RU_MAPPING_IN_2G	0x10
680b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_RU_MAPPING_IN_5G	0x20
681b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_MASK			0x40
682adff403fSBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_MASK_ALL		0xff
6836b4cac81SBjoern A. Zeeb 
6846b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A		0x1
6856b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD	0x2
6866b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP1_MIDAMBLE_RX_TX_MAX_NSTS	0x4
6876b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK	0x8
68851b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP1_HE_LTF_AND_GI_FOR_HE_PPDUS_0_8US	0x10
6896b4cac81SBjoern A. Zeeb 
6906b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP2_MIDAMBLE_RX_TX_MAX_NSTS	0x1
6916b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP2_NDP_4x_LTF_AND_3_2US	0x2
6926b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP2_STBC_TX_UNDER_80MHZ	0x4
6936b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ	0x8
69451b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP2_DOPPLER_TX		0x10
695b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP2_UL_MU_PARTIAL_MU_MIMO	0x20
696b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO	0x40
6976b4cac81SBjoern A. Zeeb 
6986b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_MASK	0x1
6996b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_NO_DCM	0x2
7006b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_NO_DCM	0x4
7016b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_1		0x8
7026b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_TX_NSS_1		0x10
70351b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER		0x20
70451b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_16_QAM	0x40
70551b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_16_QAM	0x80
706d875aa15SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_TX_NSS_2		0x10
707d875aa15SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_RX_PARTIAL_BW_SU_IN_20MHZ_MU	0x20
708d875aa15SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_BPSK	0x40
709d875aa15SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_BPSK	0x80
710d875aa15SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_MASK	0x80
711b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_QPSK	0x80
712b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_QPSK	0x80
713b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_2		0x80
7146b4cac81SBjoern A. Zeeb 
7156b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_8	0x1
7166b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_8	0x2
7176b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE			0x4
71851b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER			0x8
71951b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_4	0x10
720b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_4	0x20
721b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_MASK	0x40
722b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_MASK	0x80
7236b4cac81SBjoern A. Zeeb 
7246b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_2	0x1
7256b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_2	0x2
72651b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK	0x4
72751b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP5_NG16_MU_FEEDBACK				0x8
72851b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP5_NG16_SU_FEEDBACK				0x10
729b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_MASK	0x20
7306b4cac81SBjoern A. Zeeb 
7316b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT	0x1
7326b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB	0x2
7336b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMER_FB	0x4
73451b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB	0x8
7356b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMING_PARTIAL_BW_FB	0x20
73651b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_42_SU	0x40
73751b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_75_MU	0x80
73851b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP6_PARTIAL_BW_EXT_RANGE	0x80
739b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP6_TRIG_CQI_FB		0x80
740b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP6_PARTIAL_BANDWIDTH_DL_MUMIMO	0x80
7416b4cac81SBjoern A. Zeeb 
7426b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP7_HE_SU_MU_PPDU_4XLTF_AND_08_US_GI	0x1
7436b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP7_MAX_NC_1				0x2
7446b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP7_MAX_NC_2				0x4
7456b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP7_MAX_NC_MASK			0x6
7466b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR		0x8
7476b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP		0x10
7486b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP7_STBC_RX_ABOVE_80MHZ		0x20
749b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP7_STBC_TX_ABOVE_80MHZ		0x40
750b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP7_PSR_BASED_SR			0x80
7516b4cac81SBjoern A. Zeeb 
7526b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP8_20MHZ_IN_160MHZ_HE_PPDU		0x1
7536b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP8_20MHZ_IN_40MHZ_HE_PPDU_IN_2G	0x2
7546b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP8_80MHZ_IN_160MHZ_HE_PPDU		0x4
755b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_242			0x8
756b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_484			0x10
757b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_996			0x18
758b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_2x996			0x20
759b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_MASK			0x28
760b0f73768SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP8_HE_ER_SU_PPDU_4XLTF_AND_08_US_GI	0x40
76151b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP8_HE_ER_SU_1XLTF_AND_08_US_GI	0x80
7626b4cac81SBjoern A. Zeeb 
763e2008091SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_0US		0x1
764e2008091SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_16US		0x2
765e2008091SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_8US		0x4
766e2008091SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_MASK		0x8
767e2008091SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_RESERVED	0x10
768d875aa15SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_POS		0x0
7696b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_NON_TRIGGERED_CQI_FEEDBACK	0x20
770d875aa15SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_COMP_SIGB	0x4
771d875aa15SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_NON_COMP_SIGB	0x8
772d875aa15SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_RX_1024_QAM_LESS_THAN_242_TONE_RU	0x10
773d875aa15SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_TX_1024_QAM_LESS_THAN_242_TONE_RU	0x20
774d875aa15SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_LONGER_THAN_16_SIGB_OFDM_SYM	0x40
7756b4cac81SBjoern A. Zeeb 
7766b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP10_HE_MU_M1RU_MAX_LTF		0x1
7776b4cac81SBjoern A. Zeeb 
7781d70218eSBjoern A. Zeeb #define	IEEE80211_HE_OPERATION_BSS_COLOR_DISABLED		0x1
7791d70218eSBjoern A. Zeeb #define	IEEE80211_HE_OPERATION_BSS_COLOR_OFFSET			0x2
780adff403fSBjoern A. Zeeb #define	IEEE80211_HE_OPERATION_ER_SU_DISABLE			0x4
7811d70218eSBjoern A. Zeeb 
7821d70218eSBjoern A. Zeeb #define	IEEE80211_HE_SPR_HESIGA_SR_VAL15_ALLOWED		0x01
7831d70218eSBjoern A. Zeeb #define	IEEE80211_HE_SPR_NON_SRG_OBSS_PD_SR_DISALLOWED		0x02
7841d70218eSBjoern A. Zeeb #define	IEEE80211_HE_SPR_NON_SRG_OFFSET_PRESENT			0x04
7851d70218eSBjoern A. Zeeb #define	IEEE80211_HE_SPR_SRG_INFORMATION_PRESENT		0x08
7861d70218eSBjoern A. Zeeb 
787adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_MAC_CAP0_EPCS_PRIO_ACCESS			0x01
788adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_MAC_CAP0_MAX_MPDU_LEN_11454		0x02
789adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_MAC_CAP0_MAX_MPDU_LEN_MASK		0x03
790adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_MAC_CAP0_OM_CONTROL			0x04
791adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_MAC_CAP0_TRIG_TXOP_SHARING_MODE1		0x05
792adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_MAC_CAP0_TRIG_TXOP_SHARING_MODE2		0x06
793adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_MAC_CAP0_MAX_MPDU_LEN_7991		0x07
794ac1d519cSBjoern A. Zeeb #define	IEEE80211_EHT_MAC_CAP0_SCS_TRAFFIC_DESC			0x08
795adff403fSBjoern A. Zeeb 
796adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_MAC_CAP1_MAX_AMPDU_LEN_MASK		0x01
797adff403fSBjoern A. Zeeb 
798adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_MCS_NSS_RX				0x01
799adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_MCS_NSS_TX				0x02
800adff403fSBjoern A. Zeeb 
801adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP0_242_TONE_RU_GT20MHZ		0x01
802adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP0_320MHZ_IN_6GHZ			0x02
803adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP0_BEAMFORMEE_SS_80MHZ_MASK		0x03
804adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP0_NDP_4_EHT_LFT_32_GI		0x04
805adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP0_PARTIAL_BW_UL_MU_MIMO		0x05
806adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMEE			0x06
807adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMER			0x07
808adff403fSBjoern A. Zeeb 
809adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP1_BEAMFORMEE_SS_160MHZ_MASK	0x01
810adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP1_BEAMFORMEE_SS_320MHZ_MASK	0x02
811adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP1_BEAMFORMEE_SS_80MHZ_MASK		0x03
812adff403fSBjoern A. Zeeb 
813adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP2_SOUNDING_DIM_80MHZ_MASK		0x01
814adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP2_SOUNDING_DIM_160MHZ_MASK		0x02
815adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP2_SOUNDING_DIM_320MHZ_MASK		0x03
816adff403fSBjoern A. Zeeb 
817adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP3_CODEBOOK_4_2_SU_FDBK		0x01
818adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP3_CODEBOOK_7_5_MU_FDBK		0x02
819adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP3_NG_16_MU_FEEDBACK		0x03
820adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP3_NG_16_SU_FEEDBACK		0x04
821adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP3_TRIG_CQI_FDBK			0x05
822adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP3_TRIG_MU_BF_PART_BW_FDBK		0x06
823adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP3_TRIG_SU_BF_FDBK			0x07
824adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP3_SOUNDING_DIM_320MHZ_MASK		0x08
825adff403fSBjoern A. Zeeb 
826adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP4_EHT_MU_PPDU_4_EHT_LTF_08_GI	0x01
827adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP4_PART_BW_DL_MU_MIMO		0x02
828adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP4_POWER_BOOST_FACT_SUPP		0x03
829adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP4_MAX_NC_MASK			0x04
830adff403fSBjoern A. Zeeb 
831adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP5_COMMON_NOMINAL_PKT_PAD_0US	0x01
832adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP5_COMMON_NOMINAL_PKT_PAD_16US	0x02
833adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP5_COMMON_NOMINAL_PKT_PAD_20US	0x03
834adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP5_COMMON_NOMINAL_PKT_PAD_8US	0x04
835adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP5_COMMON_NOMINAL_PKT_PAD_MASK	0x05
836adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP5_NON_TRIG_CQI_FEEDBACK		0x06
837adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP5_PPE_THRESHOLD_PRESENT		0x07
838adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP5_RX_LESS_242_TONE_RU_SUPP		0x08
839adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP5_TX_LESS_242_TONE_RU_SUPP		0x09
840adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP5_MAX_NUM_SUPP_EHT_LTF_MASK	0x0a
841adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP5_SUPP_EXTRA_EHT_LTF		0x0b
842adff403fSBjoern A. Zeeb 
843adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP6_EHT_DUP_6GHZ_SUPP		0x01
844adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP6_MCS15_SUPP_MASK			0x02
845adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP6_MAX_NUM_SUPP_EHT_LTF_MASK	0x03
846adff403fSBjoern A. Zeeb 
847adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_80MHZ		0x01
848adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_160MHZ		0x02
849adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_320MHZ		0x03
850adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP7_NON_OFDMA_UL_MU_MIMO_80MHZ	0x04
851adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP7_NON_OFDMA_UL_MU_MIMO_160MHZ	0x05
852adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP7_NON_OFDMA_UL_MU_MIMO_320MHZ	0x06
853adff403fSBjoern A. Zeeb 
854adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP8_RX_1024QAM_WIDER_BW_DL_OFDMA	0x01
855adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PHY_CAP8_RX_4096QAM_WIDER_BW_DL_OFDMA	0x02
856adff403fSBjoern A. Zeeb 
857adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PPE_THRES_INFO_HEADER_SIZE		0x01
858adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PPE_THRES_NSS_MASK			0x02
859adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PPE_THRES_RU_INDEX_BITMASK_MASK		0x03
860adff403fSBjoern A. Zeeb #define	IEEE80211_EHT_PPE_THRES_INFO_PPET_SIZE			0x04
861adff403fSBjoern A. Zeeb 
862adff403fSBjoern A. Zeeb #define	IEEE80211_EML_CAP_EMLSR_SUPP				0x01
863adff403fSBjoern A. Zeeb #define	IEEE80211_EML_CAP_TRANSITION_TIMEOUT			0x02
864adff403fSBjoern A. Zeeb #define	IEEE80211_EML_CAP_TRANSITION_TIMEOUT_128TU		0x04
865adff403fSBjoern A. Zeeb #define	IEEE80211_EML_CAP_EMLSR_PADDING_DELAY			0x08
866adff403fSBjoern A. Zeeb #define	IEEE80211_EML_CAP_EMLSR_PADDING_DELAY_32US		0x10
867adff403fSBjoern A. Zeeb #define	IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY		0x20
868adff403fSBjoern A. Zeeb #define	IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_64US		0x40
869adff403fSBjoern A. Zeeb 
8706b4cac81SBjoern A. Zeeb #define	VENDOR_CMD_RAW_DATA	(void *)(uintptr_t)(-ENOENT)
8716b4cac81SBjoern A. Zeeb 
8726b4cac81SBjoern A. Zeeb struct ieee80211_he_cap_elem {
8736b4cac81SBjoern A. Zeeb 	u8 mac_cap_info[6];
8746b4cac81SBjoern A. Zeeb 	u8 phy_cap_info[11];
8756b4cac81SBjoern A. Zeeb } __packed;
8766b4cac81SBjoern A. Zeeb 
8776b4cac81SBjoern A. Zeeb struct ieee80211_he_mcs_nss_supp {
8786b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
8796b4cac81SBjoern A. Zeeb 	uint32_t	rx_mcs_80;
8806b4cac81SBjoern A. Zeeb 	uint32_t	tx_mcs_80;
8816b4cac81SBjoern A. Zeeb 	uint32_t	rx_mcs_160;
8826b4cac81SBjoern A. Zeeb 	uint32_t	tx_mcs_160;
8836b4cac81SBjoern A. Zeeb 	uint32_t	rx_mcs_80p80;
8846b4cac81SBjoern A. Zeeb 	uint32_t	tx_mcs_80p80;
8856b4cac81SBjoern A. Zeeb };
8866b4cac81SBjoern A. Zeeb 
8876b4cac81SBjoern A. Zeeb #define	IEEE80211_STA_HE_CAP_PPE_THRES_MAX	32
8886b4cac81SBjoern A. Zeeb struct ieee80211_sta_he_cap {
8896b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
8906b4cac81SBjoern A. Zeeb 	int					has_he;
8916b4cac81SBjoern A. Zeeb 	struct ieee80211_he_cap_elem		he_cap_elem;
8926b4cac81SBjoern A. Zeeb 	struct ieee80211_he_mcs_nss_supp	he_mcs_nss_supp;
8936b4cac81SBjoern A. Zeeb 	uint8_t					ppe_thres[IEEE80211_STA_HE_CAP_PPE_THRES_MAX];
8946b4cac81SBjoern A. Zeeb };
8956b4cac81SBjoern A. Zeeb 
896b0f73768SBjoern A. Zeeb struct cfg80211_he_bss_color {
897b0f73768SBjoern A. Zeeb 	int	color, enabled;
898b0f73768SBjoern A. Zeeb };
899b0f73768SBjoern A. Zeeb 
900b0f73768SBjoern A. Zeeb struct ieee80211_he_obss_pd {
901b0f73768SBjoern A. Zeeb 	bool					enable;
902f02e2115SBjoern A. Zeeb 	uint8_t					min_offset;
903f02e2115SBjoern A. Zeeb 	uint8_t					max_offset;
904f02e2115SBjoern A. Zeeb 	uint8_t					non_srg_max_offset;
905f02e2115SBjoern A. Zeeb 	uint8_t					sr_ctrl;
9061d70218eSBjoern A. Zeeb 	uint8_t					bss_color_bitmap[8];
9071d70218eSBjoern A. Zeeb 	uint8_t					partial_bssid_bitmap[8];
908b0f73768SBjoern A. Zeeb };
909b0f73768SBjoern A. Zeeb 
9106b4cac81SBjoern A. Zeeb struct ieee80211_sta_he_6ghz_capa {
9116b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
9126b4cac81SBjoern A. Zeeb 	int	capa;
9136b4cac81SBjoern A. Zeeb };
9146b4cac81SBjoern A. Zeeb 
915adff403fSBjoern A. Zeeb struct ieee80211_eht_mcs_nss_supp_20mhz_only {
916ac1d519cSBjoern A. Zeeb 	union {
917ac1d519cSBjoern A. Zeeb 		struct {
918adff403fSBjoern A. Zeeb 			uint8_t				rx_tx_mcs7_max_nss;
919adff403fSBjoern A. Zeeb 			uint8_t				rx_tx_mcs9_max_nss;
920adff403fSBjoern A. Zeeb 			uint8_t				rx_tx_mcs11_max_nss;
921adff403fSBjoern A. Zeeb 			uint8_t				rx_tx_mcs13_max_nss;
922adff403fSBjoern A. Zeeb 		};
923ac1d519cSBjoern A. Zeeb 		uint8_t					rx_tx_max_nss[4];
924ac1d519cSBjoern A. Zeeb 	};
925ac1d519cSBjoern A. Zeeb };
926adff403fSBjoern A. Zeeb 
927adff403fSBjoern A. Zeeb struct ieee80211_eht_mcs_nss_supp_bw {
928ac1d519cSBjoern A. Zeeb 	union {
929ac1d519cSBjoern A. Zeeb 		struct {
930adff403fSBjoern A. Zeeb 			uint8_t				rx_tx_mcs9_max_nss;
931adff403fSBjoern A. Zeeb 			uint8_t				rx_tx_mcs11_max_nss;
932adff403fSBjoern A. Zeeb 			uint8_t				rx_tx_mcs13_max_nss;
933adff403fSBjoern A. Zeeb 		};
934ac1d519cSBjoern A. Zeeb 		uint8_t					rx_tx_max_nss[3];
935ac1d519cSBjoern A. Zeeb 	};
936ac1d519cSBjoern A. Zeeb };
937adff403fSBjoern A. Zeeb 
938adff403fSBjoern A. Zeeb struct ieee80211_eht_cap_elem_fixed {
939adff403fSBjoern A. Zeeb 	uint8_t					mac_cap_info[2];
940adff403fSBjoern A. Zeeb 	uint8_t					phy_cap_info[9];
941adff403fSBjoern A. Zeeb };
942adff403fSBjoern A. Zeeb 
943adff403fSBjoern A. Zeeb struct ieee80211_eht_mcs_nss_supp {
944adff403fSBjoern A. Zeeb 	/* TODO FIXME */
945adff403fSBjoern A. Zeeb 	/* Can only have either or... */
946adff403fSBjoern A. Zeeb 	union {
947adff403fSBjoern A. Zeeb 		struct ieee80211_eht_mcs_nss_supp_20mhz_only		only_20mhz;
948adff403fSBjoern A. Zeeb 		struct {
949adff403fSBjoern A. Zeeb 			struct ieee80211_eht_mcs_nss_supp_bw		_80;
950adff403fSBjoern A. Zeeb 			struct ieee80211_eht_mcs_nss_supp_bw		_160;
951adff403fSBjoern A. Zeeb 			struct ieee80211_eht_mcs_nss_supp_bw		_320;
952adff403fSBjoern A. Zeeb 		} bw;
953adff403fSBjoern A. Zeeb 	};
954adff403fSBjoern A. Zeeb };
955adff403fSBjoern A. Zeeb 
956adff403fSBjoern A. Zeeb #define	IEEE80211_STA_EHT_PPE_THRES_MAX		32
957adff403fSBjoern A. Zeeb struct ieee80211_sta_eht_cap {
958adff403fSBjoern A. Zeeb 	bool					has_eht;
959adff403fSBjoern A. Zeeb 	struct ieee80211_eht_cap_elem_fixed	eht_cap_elem;
960adff403fSBjoern A. Zeeb 	struct ieee80211_eht_mcs_nss_supp	eht_mcs_nss_supp;
961adff403fSBjoern A. Zeeb 	uint8_t					eht_ppe_thres[IEEE80211_STA_EHT_PPE_THRES_MAX];
962adff403fSBjoern A. Zeeb };
963adff403fSBjoern A. Zeeb 
9646b4cac81SBjoern A. Zeeb struct ieee80211_sband_iftype_data {
9656b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
9666b4cac81SBjoern A. Zeeb 	enum nl80211_iftype			types_mask;
9676b4cac81SBjoern A. Zeeb 	struct ieee80211_sta_he_cap		he_cap;
9686b4cac81SBjoern A. Zeeb 	struct ieee80211_sta_he_6ghz_capa	he_6ghz_capa;
969adff403fSBjoern A. Zeeb 	struct ieee80211_sta_eht_cap		eht_cap;
9706b4cac81SBjoern A. Zeeb 	struct {
9716b4cac81SBjoern A. Zeeb 		const uint8_t			*data;
9726b4cac81SBjoern A. Zeeb 		size_t				len;
9736b4cac81SBjoern A. Zeeb 	} vendor_elems;
9746b4cac81SBjoern A. Zeeb };
9756b4cac81SBjoern A. Zeeb 
9766b4cac81SBjoern A. Zeeb struct ieee80211_supported_band {
9776b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
9786b4cac81SBjoern A. Zeeb 	struct linuxkpi_ieee80211_channel	*channels;
9796b4cac81SBjoern A. Zeeb 	struct ieee80211_rate			*bitrates;
9806b4cac81SBjoern A. Zeeb 	struct ieee80211_sband_iftype_data	*iftype_data;
9816b4cac81SBjoern A. Zeeb 	int					n_channels;
9826b4cac81SBjoern A. Zeeb 	int					n_bitrates;
9836b4cac81SBjoern A. Zeeb 	int					n_iftype_data;
9846b4cac81SBjoern A. Zeeb 	enum nl80211_band			band;
9856b4cac81SBjoern A. Zeeb 	struct ieee80211_sta_ht_cap		ht_cap;
9866b4cac81SBjoern A. Zeeb 	struct ieee80211_sta_vht_cap		vht_cap;
9876b4cac81SBjoern A. Zeeb };
9886b4cac81SBjoern A. Zeeb 
9896b4cac81SBjoern A. Zeeb struct cfg80211_pkt_pattern {
9906b4cac81SBjoern A. Zeeb 	/* XXX TODO */
9916b4cac81SBjoern A. Zeeb 	uint8_t					*mask;
9926b4cac81SBjoern A. Zeeb 	uint8_t					*pattern;
9936b4cac81SBjoern A. Zeeb 	int					pattern_len;
9946b4cac81SBjoern A. Zeeb 	int					pkt_offset;
9956b4cac81SBjoern A. Zeeb };
9966b4cac81SBjoern A. Zeeb 
997800aa9cdSBjoern A. Zeeb struct cfg80211_wowlan_nd_match {
998800aa9cdSBjoern A. Zeeb 	/* XXX TODO */
999800aa9cdSBjoern A. Zeeb 	struct cfg80211_ssid		ssid;
1000800aa9cdSBjoern A. Zeeb 	int				n_channels;
1001800aa9cdSBjoern A. Zeeb 	uint32_t			channels[0];	/* freq! = ieee80211_channel_to_frequency() */
1002800aa9cdSBjoern A. Zeeb };
1003800aa9cdSBjoern A. Zeeb 
1004800aa9cdSBjoern A. Zeeb struct cfg80211_wowlan_nd_info {
1005800aa9cdSBjoern A. Zeeb 	/* XXX TODO */
1006800aa9cdSBjoern A. Zeeb 	int				n_matches;
1007800aa9cdSBjoern A. Zeeb 	struct cfg80211_wowlan_nd_match	*matches[0];
1008800aa9cdSBjoern A. Zeeb };
1009800aa9cdSBjoern A. Zeeb 
1010800aa9cdSBjoern A. Zeeb enum wiphy_wowlan_support_flags {
1011800aa9cdSBjoern A. Zeeb 	WIPHY_WOWLAN_DISCONNECT,
1012800aa9cdSBjoern A. Zeeb 	WIPHY_WOWLAN_GTK_REKEY_FAILURE,
1013800aa9cdSBjoern A. Zeeb 	WIPHY_WOWLAN_MAGIC_PKT,
1014800aa9cdSBjoern A. Zeeb 	WIPHY_WOWLAN_SUPPORTS_GTK_REKEY,
1015800aa9cdSBjoern A. Zeeb 	WIPHY_WOWLAN_NET_DETECT,
1016800aa9cdSBjoern A. Zeeb };
1017800aa9cdSBjoern A. Zeeb 
1018800aa9cdSBjoern A. Zeeb struct wiphy_wowlan_support {
1019800aa9cdSBjoern A. Zeeb 	/* XXX TODO */
1020800aa9cdSBjoern A. Zeeb 	enum wiphy_wowlan_support_flags		flags;
1021800aa9cdSBjoern A. Zeeb 	int	max_nd_match_sets, max_pkt_offset, n_patterns, pattern_max_len, pattern_min_len;
1022800aa9cdSBjoern A. Zeeb };
1023800aa9cdSBjoern A. Zeeb 
1024800aa9cdSBjoern A. Zeeb struct cfg80211_wowlan_wakeup {
1025800aa9cdSBjoern A. Zeeb 	/* XXX TODO */
1026800aa9cdSBjoern A. Zeeb 	uint16_t				pattern_idx;
1027800aa9cdSBjoern A. Zeeb 	bool					disconnect;
1028800aa9cdSBjoern A. Zeeb 	bool					eap_identity_req;
1029800aa9cdSBjoern A. Zeeb 	bool					four_way_handshake;
1030800aa9cdSBjoern A. Zeeb 	bool					gtk_rekey_failure;
1031800aa9cdSBjoern A. Zeeb 	bool					magic_pkt;
1032800aa9cdSBjoern A. Zeeb 	bool					rfkill_release;
1033800aa9cdSBjoern A. Zeeb 	bool					tcp_connlost;
1034800aa9cdSBjoern A. Zeeb 	bool					tcp_nomoretokens;
1035800aa9cdSBjoern A. Zeeb 	bool					tcp_match;
1036800aa9cdSBjoern A. Zeeb 	bool					packet_80211;
1037800aa9cdSBjoern A. Zeeb 	struct cfg80211_wowlan_nd_info		*net_detect;
1038800aa9cdSBjoern A. Zeeb 	uint8_t					*packet;
1039800aa9cdSBjoern A. Zeeb 	uint16_t				packet_len;
1040800aa9cdSBjoern A. Zeeb 	uint16_t				packet_present_len;
1041800aa9cdSBjoern A. Zeeb };
1042800aa9cdSBjoern A. Zeeb 
10436b4cac81SBjoern A. Zeeb struct cfg80211_wowlan {
10446b4cac81SBjoern A. Zeeb 	/* XXX TODO */
10456b4cac81SBjoern A. Zeeb 	int	disconnect, gtk_rekey_failure, magic_pkt;
1046800aa9cdSBjoern A. Zeeb 	int	eap_identity_req, four_way_handshake, rfkill_release, tcp, any;
10476b4cac81SBjoern A. Zeeb 	int					n_patterns;
10486b4cac81SBjoern A. Zeeb 	struct cfg80211_sched_scan_request	*nd_config;
10496b4cac81SBjoern A. Zeeb 	struct cfg80211_pkt_pattern		*patterns;
10506b4cac81SBjoern A. Zeeb };
10516b4cac81SBjoern A. Zeeb 
10526b4cac81SBjoern A. Zeeb struct cfg80211_gtk_rekey_data {
10536b4cac81SBjoern A. Zeeb 	/* XXX TODO */
1054800aa9cdSBjoern A. Zeeb 	const uint8_t				*kck, *kek, *replay_ctr;
1055800aa9cdSBjoern A. Zeeb 	uint32_t				akm;
1056800aa9cdSBjoern A. Zeeb 	uint8_t					kck_len, kek_len;
10576b4cac81SBjoern A. Zeeb };
10586b4cac81SBjoern A. Zeeb 
10592e183d99SBjoern A. Zeeb struct cfg80211_tid_cfg {
10602e183d99SBjoern A. Zeeb 	/* XXX TODO */
1061adff403fSBjoern A. Zeeb 	int	mask, noack, retry_long, rtscts, tids, amsdu, ampdu;
10622e183d99SBjoern A. Zeeb 	enum nl80211_tx_rate_setting		txrate_type;
10632e183d99SBjoern A. Zeeb 	struct cfg80211_bitrate_mask		txrate_mask;
10642e183d99SBjoern A. Zeeb };
10652e183d99SBjoern A. Zeeb 
10662e183d99SBjoern A. Zeeb struct cfg80211_tid_config {
10672e183d99SBjoern A. Zeeb 	/* XXX TODO */
10682e183d99SBjoern A. Zeeb 	int	n_tid_conf;
10692e183d99SBjoern A. Zeeb 	struct cfg80211_tid_cfg			tid_conf[0];
10702e183d99SBjoern A. Zeeb };
10712e183d99SBjoern A. Zeeb 
10726b4cac81SBjoern A. Zeeb struct ieee80211_iface_limit {
10736b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
10746b4cac81SBjoern A. Zeeb 	int		max, types;
10756b4cac81SBjoern A. Zeeb };
10766b4cac81SBjoern A. Zeeb 
10776b4cac81SBjoern A. Zeeb struct ieee80211_iface_combination {
10786b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
10796b4cac81SBjoern A. Zeeb 	const struct ieee80211_iface_limit	*limits;
10806b4cac81SBjoern A. Zeeb 	int					n_limits;
10816b4cac81SBjoern A. Zeeb 	int		max_interfaces, num_different_channels;
10826b4cac81SBjoern A. Zeeb 	int		beacon_int_infra_match, beacon_int_min_gcd;
1083b0f73768SBjoern A. Zeeb 	int		radar_detect_widths;
10846b4cac81SBjoern A. Zeeb };
10856b4cac81SBjoern A. Zeeb 
10866b4cac81SBjoern A. Zeeb struct iface_combination_params {
10876b4cac81SBjoern A. Zeeb 	int num_different_channels;
10886b4cac81SBjoern A. Zeeb 	int iftype_num[NUM_NL80211_IFTYPES];
10896b4cac81SBjoern A. Zeeb };
10906b4cac81SBjoern A. Zeeb 
10916b4cac81SBjoern A. Zeeb struct regulatory_request {
10926b4cac81SBjoern A. Zeeb 		/* XXX TODO */
10936b4cac81SBjoern A. Zeeb 	uint8_t					alpha2[2];
1094a3baca22SBjoern A. Zeeb 	enum environment_cap			country_ie_env;
10956b4cac81SBjoern A. Zeeb 	int	initiator, dfs_region;
10961d70218eSBjoern A. Zeeb 	int	user_reg_hint_type;
10976b4cac81SBjoern A. Zeeb };
10986b4cac81SBjoern A. Zeeb 
1099adff403fSBjoern A. Zeeb struct cfg80211_set_hw_timestamp {
1100adff403fSBjoern A. Zeeb 	const uint8_t				*macaddr;
1101adff403fSBjoern A. Zeeb 	bool					enable;
1102adff403fSBjoern A. Zeeb };
1103adff403fSBjoern A. Zeeb 
11046b4cac81SBjoern A. Zeeb enum wiphy_vendor_cmd_need_flags {
11056b4cac81SBjoern A. Zeeb 	WIPHY_VENDOR_CMD_NEED_NETDEV		= 0x01,
11066b4cac81SBjoern A. Zeeb 	WIPHY_VENDOR_CMD_NEED_RUNNING		= 0x02,
11076b4cac81SBjoern A. Zeeb 	WIPHY_VENDOR_CMD_NEED_WDEV		= 0x04,
11086b4cac81SBjoern A. Zeeb };
11096b4cac81SBjoern A. Zeeb 
11106b4cac81SBjoern A. Zeeb struct wiphy_vendor_command {
11116b4cac81SBjoern A. Zeeb 	struct {
11126b4cac81SBjoern A. Zeeb 		uint32_t	vendor_id;
11136b4cac81SBjoern A. Zeeb 		uint32_t	subcmd;
11146b4cac81SBjoern A. Zeeb 	};
11156b4cac81SBjoern A. Zeeb 	uint32_t		flags;
11166b4cac81SBjoern A. Zeeb 	void			*policy;
11176b4cac81SBjoern A. Zeeb 	int (*doit)(struct wiphy *, struct wireless_dev *, const void *, int);
11186b4cac81SBjoern A. Zeeb };
11196b4cac81SBjoern A. Zeeb 
11206b4cac81SBjoern A. Zeeb struct wiphy_iftype_ext_capab {
11216b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
11226b4cac81SBjoern A. Zeeb 	enum nl80211_iftype			iftype;
11236b4cac81SBjoern A. Zeeb 	const uint8_t				*extended_capabilities;
11246b4cac81SBjoern A. Zeeb 	const uint8_t				*extended_capabilities_mask;
11256b4cac81SBjoern A. Zeeb 	uint8_t					extended_capabilities_len;
1126adff403fSBjoern A. Zeeb 	uint16_t				eml_capabilities;
1127ac1d519cSBjoern A. Zeeb 	uint16_t				mld_capa_and_ops;
11286b4cac81SBjoern A. Zeeb };
11296b4cac81SBjoern A. Zeeb 
11302e183d99SBjoern A. Zeeb struct tid_config_support {
11312e183d99SBjoern A. Zeeb 	/* TODO FIXME */
11322e183d99SBjoern A. Zeeb 	uint64_t				vif;	/* enum nl80211_tid_cfg_attr */
11332e183d99SBjoern A. Zeeb 	uint64_t		 		peer;	/* enum nl80211_tid_cfg_attr */
11342e183d99SBjoern A. Zeeb };
11352e183d99SBjoern A. Zeeb 
11366b4cac81SBjoern A. Zeeb enum cfg80211_regulatory {
11376b4cac81SBjoern A. Zeeb 	REGULATORY_CUSTOM_REG			= BIT(0),
11386b4cac81SBjoern A. Zeeb 	REGULATORY_STRICT_REG			= BIT(1),
11396b4cac81SBjoern A. Zeeb 	REGULATORY_DISABLE_BEACON_HINTS		= BIT(2),
11406b4cac81SBjoern A. Zeeb 	REGULATORY_ENABLE_RELAX_NO_IR		= BIT(3),
11416b4cac81SBjoern A. Zeeb 	REGULATORY_WIPHY_SELF_MANAGED		= BIT(4),
11426b4cac81SBjoern A. Zeeb 	REGULATORY_COUNTRY_IE_IGNORE		= BIT(5),
11432e183d99SBjoern A. Zeeb 	REGULATORY_COUNTRY_IE_FOLLOW_POWER	= BIT(6),
11446b4cac81SBjoern A. Zeeb };
11456b4cac81SBjoern A. Zeeb 
1146b0f73768SBjoern A. Zeeb enum wiphy_flags {
1147b0f73768SBjoern A. Zeeb 	WIPHY_FLAG_AP_UAPSD			= BIT(0),
1148b0f73768SBjoern A. Zeeb 	WIPHY_FLAG_HAS_CHANNEL_SWITCH		= BIT(1),
1149b0f73768SBjoern A. Zeeb 	WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL	= BIT(2),
1150b0f73768SBjoern A. Zeeb 	WIPHY_FLAG_HAVE_AP_SME			= BIT(3),
1151b0f73768SBjoern A. Zeeb 	WIPHY_FLAG_IBSS_RSN			= BIT(4),
1152b0f73768SBjoern A. Zeeb 	WIPHY_FLAG_NETNS_OK			= BIT(5),
1153b0f73768SBjoern A. Zeeb 	WIPHY_FLAG_OFFCHAN_TX			= BIT(6),
1154b0f73768SBjoern A. Zeeb 	WIPHY_FLAG_PS_ON_BY_DEFAULT		= BIT(7),
1155b0f73768SBjoern A. Zeeb 	WIPHY_FLAG_SPLIT_SCAN_6GHZ		= BIT(8),
1156b0f73768SBjoern A. Zeeb 	WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK		= BIT(9),
1157b0f73768SBjoern A. Zeeb 	WIPHY_FLAG_SUPPORTS_FW_ROAM		= BIT(10),
1158b0f73768SBjoern A. Zeeb 	WIPHY_FLAG_SUPPORTS_TDLS		= BIT(11),
1159b0f73768SBjoern A. Zeeb 	WIPHY_FLAG_TDLS_EXTERNAL_SETUP		= BIT(12),
1160b0f73768SBjoern A. Zeeb 	WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD	= BIT(13),
1161b0f73768SBjoern A. Zeeb 	WIPHY_FLAG_4ADDR_AP			= BIT(14),
1162b0f73768SBjoern A. Zeeb 	WIPHY_FLAG_4ADDR_STATION		= BIT(15),
1163adff403fSBjoern A. Zeeb 	WIPHY_FLAG_SUPPORTS_MLO			= BIT(16),
1164ac1d519cSBjoern A. Zeeb 	WIPHY_FLAG_DISABLE_WEXT			= BIT(17),
1165ac1d519cSBjoern A. Zeeb };
1166ac1d519cSBjoern A. Zeeb 
1167ac1d519cSBjoern A. Zeeb struct wiphy_work;
1168ac1d519cSBjoern A. Zeeb typedef void (*wiphy_work_fn)(struct wiphy *, struct wiphy_work *);
1169ac1d519cSBjoern A. Zeeb struct wiphy_work {
1170ac1d519cSBjoern A. Zeeb 	struct list_head			entry;
1171ac1d519cSBjoern A. Zeeb 	wiphy_work_fn				fn;
1172ac1d519cSBjoern A. Zeeb };
1173ac1d519cSBjoern A. Zeeb struct wiphy_delayed_work {
1174ac1d519cSBjoern A. Zeeb 	struct wiphy_work			work;
1175ac1d519cSBjoern A. Zeeb 	struct wiphy				*wiphy;
1176ac1d519cSBjoern A. Zeeb 	struct timer_list			timer;
1177b0f73768SBjoern A. Zeeb };
11786b4cac81SBjoern A. Zeeb 
11796b4cac81SBjoern A. Zeeb struct wiphy {
1180ac1d519cSBjoern A. Zeeb 	struct mutex				mtx;
11816b4cac81SBjoern A. Zeeb 	struct device				*dev;
11826b4cac81SBjoern A. Zeeb 	struct mac_address			*addresses;
11836b4cac81SBjoern A. Zeeb 	int					n_addresses;
11846b4cac81SBjoern A. Zeeb 	uint32_t				flags;
11856b4cac81SBjoern A. Zeeb 	struct ieee80211_supported_band		*bands[NUM_NL80211_BANDS];
11866b4cac81SBjoern A. Zeeb 	uint8_t					perm_addr[ETH_ALEN];
1187800aa9cdSBjoern A. Zeeb 	uint16_t				max_scan_ie_len;
11886b4cac81SBjoern A. Zeeb 
11896b4cac81SBjoern A. Zeeb 	/* XXX TODO */
11906b4cac81SBjoern A. Zeeb 	const struct cfg80211_pmsr_capabilities	*pmsr_capa;
119151b461b3SBjoern A. Zeeb 	const struct cfg80211_sar_capa		*sar_capa;
11926b4cac81SBjoern A. Zeeb 	const struct wiphy_iftype_ext_capab	*iftype_ext_capab;
11936b4cac81SBjoern A. Zeeb 	const struct linuxkpi_ieee80211_regdomain *regd;
11942e183d99SBjoern A. Zeeb 	char					fw_version[ETHTOOL_FWVERS_LEN];
11956b4cac81SBjoern A. Zeeb 	const struct ieee80211_iface_combination *iface_combinations;
11966b4cac81SBjoern A. Zeeb 	const uint32_t				*cipher_suites;
11976b4cac81SBjoern A. Zeeb 	int					n_iface_combinations;
11986b4cac81SBjoern A. Zeeb 	int					n_cipher_suites;
11996b4cac81SBjoern A. Zeeb 	void(*reg_notifier)(struct wiphy *, struct regulatory_request *);
12006b4cac81SBjoern A. Zeeb 	enum cfg80211_regulatory		regulatory_flags;
12016b4cac81SBjoern A. Zeeb 	int					n_vendor_commands;
12026b4cac81SBjoern A. Zeeb 	const struct wiphy_vendor_command	*vendor_commands;
12036b4cac81SBjoern A. Zeeb 	const struct ieee80211_txrx_stypes	*mgmt_stypes;
12046b4cac81SBjoern A. Zeeb 	uint32_t				rts_threshold;
12056b4cac81SBjoern A. Zeeb 	uint32_t				frag_threshold;
12062e183d99SBjoern A. Zeeb 	struct tid_config_support		tid_config_support;
1207a3baca22SBjoern A. Zeeb 	uint8_t					available_antennas_rx;
1208a3baca22SBjoern A. Zeeb 	uint8_t					available_antennas_tx;
12096b4cac81SBjoern A. Zeeb 
12106b4cac81SBjoern A. Zeeb 	int	features, hw_version;
1211800aa9cdSBjoern A. Zeeb 	int	interface_modes, max_match_sets, max_remain_on_channel_duration, max_scan_ssids, max_sched_scan_ie_len, max_sched_scan_plan_interval, max_sched_scan_plan_iterations, max_sched_scan_plans, max_sched_scan_reqs, max_sched_scan_ssids;
12126b4cac81SBjoern A. Zeeb 	int	num_iftype_ext_capab;
12136b4cac81SBjoern A. Zeeb 	int	max_ap_assoc_sta, probe_resp_offload, software_iftypes;
12146b4cac81SBjoern A. Zeeb 	int     bss_select_support, max_num_pmkids, retry_long, retry_short, signal_type;
12152e183d99SBjoern A. Zeeb 	int	max_data_retry_count;
1216d875aa15SBjoern A. Zeeb 	int     tx_queue_len, rfkill;
1217b0f73768SBjoern A. Zeeb 	int	mbssid_max_interfaces;
1218adff403fSBjoern A. Zeeb 	int	hw_timestamp_max_peers;
1219adff403fSBjoern A. Zeeb 	int	ema_max_profile_periodicity;
12206b4cac81SBjoern A. Zeeb 
12216b4cac81SBjoern A. Zeeb 	unsigned long				ext_features[BITS_TO_LONGS(NUM_NL80211_EXT_FEATURES)];
12226b4cac81SBjoern A. Zeeb 	struct dentry				*debugfsdir;
12236b4cac81SBjoern A. Zeeb 	struct cfg80211_wowlan_support		*wowlan;
12246b4cac81SBjoern A. Zeeb 	/* Lower layer (driver/mac80211) specific data. */
12256b4cac81SBjoern A. Zeeb 	/* Must stay last. */
12266b4cac81SBjoern A. Zeeb 	uint8_t					priv[0] __aligned(CACHE_LINE_SIZE);
12276b4cac81SBjoern A. Zeeb };
12286b4cac81SBjoern A. Zeeb 
1229ac1d519cSBjoern A. Zeeb #define	lockdep_assert_wiphy(wiphy)					\
1230ac1d519cSBjoern A. Zeeb     lockdep_assert_held(&(wiphy)->mtx)
1231ac1d519cSBjoern A. Zeeb 
12326b4cac81SBjoern A. Zeeb struct wireless_dev {
12336b4cac81SBjoern A. Zeeb 		/* XXX TODO, like ic? */
12346b4cac81SBjoern A. Zeeb 	int		iftype;
12356b4cac81SBjoern A. Zeeb 	int     address;
12366b4cac81SBjoern A. Zeeb 	struct net_device			*netdev;
12376b4cac81SBjoern A. Zeeb 	struct wiphy				*wiphy;
12386b4cac81SBjoern A. Zeeb };
12396b4cac81SBjoern A. Zeeb 
12406b4cac81SBjoern A. Zeeb struct cfg80211_ops {
12416b4cac81SBjoern A. Zeeb 	/* XXX TODO */
12426b4cac81SBjoern A. Zeeb 	struct wireless_dev *(*add_virtual_intf)(struct wiphy *, const char *, unsigned char, enum nl80211_iftype, struct vif_params *);
12436b4cac81SBjoern A. Zeeb 	int (*del_virtual_intf)(struct wiphy *,  struct wireless_dev *);
12446b4cac81SBjoern A. Zeeb 	s32 (*change_virtual_intf)(struct wiphy *,  struct net_device *, enum nl80211_iftype, struct vif_params *);
12456b4cac81SBjoern A. Zeeb 	s32 (*scan)(struct wiphy *,  struct cfg80211_scan_request *);
12466b4cac81SBjoern A. Zeeb 	s32 (*set_wiphy_params)(struct wiphy *,  u32);
12476b4cac81SBjoern A. Zeeb 	s32 (*join_ibss)(struct wiphy *,  struct net_device *, struct cfg80211_ibss_params *);
12486b4cac81SBjoern A. Zeeb 	s32 (*leave_ibss)(struct wiphy *,  struct net_device *);
12496b4cac81SBjoern A. Zeeb 	s32 (*get_station)(struct wiphy *, struct net_device *, const u8 *, struct station_info *);
12506b4cac81SBjoern A. Zeeb 	int (*dump_station)(struct wiphy *,  struct net_device *, int,  u8 *,  struct station_info *);
12516b4cac81SBjoern A. Zeeb 	s32 (*set_tx_power)(struct wiphy *,  struct wireless_dev *, enum nl80211_tx_power_setting,  s32);
12526b4cac81SBjoern A. Zeeb 	s32 (*get_tx_power)(struct wiphy *,  struct wireless_dev *, s32 *);
12536b4cac81SBjoern A. Zeeb 	s32 (*add_key)(struct wiphy *,  struct net_device *, u8,  bool,  const u8 *, struct key_params *);
12546b4cac81SBjoern A. Zeeb 	s32 (*del_key)(struct wiphy *,  struct net_device *, u8,  bool,  const u8 *);
12556b4cac81SBjoern A. Zeeb 	s32 (*get_key)(struct wiphy *,  struct net_device *,  u8, bool,  const u8 *,  void *, void(*)(void *, struct key_params *));
12566b4cac81SBjoern A. Zeeb 	s32 (*set_default_key)(struct wiphy *,  struct net_device *, u8,  bool,  bool);
12576b4cac81SBjoern A. Zeeb 	s32 (*set_default_mgmt_key)(struct wiphy *, struct net_device *,  u8);
12586b4cac81SBjoern A. Zeeb 	s32 (*set_power_mgmt)(struct wiphy *,  struct net_device *, bool,  s32);
12596b4cac81SBjoern A. Zeeb 	s32 (*connect)(struct wiphy *,  struct net_device *, struct cfg80211_connect_params *);
12606b4cac81SBjoern A. Zeeb 	s32 (*disconnect)(struct wiphy *,  struct net_device *, u16);
12616b4cac81SBjoern A. Zeeb 	s32 (*suspend)(struct wiphy *, struct cfg80211_wowlan *);
12626b4cac81SBjoern A. Zeeb 	s32 (*resume)(struct wiphy *);
12636b4cac81SBjoern A. Zeeb 	s32 (*set_pmksa)(struct wiphy *, struct net_device *, struct cfg80211_pmksa *);
12646b4cac81SBjoern A. Zeeb 	s32 (*del_pmksa)(struct wiphy *, struct net_device *, struct cfg80211_pmksa *);
12656b4cac81SBjoern A. Zeeb 	s32 (*flush_pmksa)(struct wiphy *,  struct net_device *);
12666b4cac81SBjoern A. Zeeb 	s32 (*start_ap)(struct wiphy *,  struct net_device *, struct cfg80211_ap_settings *);
12676b4cac81SBjoern A. Zeeb 	int (*stop_ap)(struct wiphy *,  struct net_device *);
12686b4cac81SBjoern A. Zeeb 	s32 (*change_beacon)(struct wiphy *,  struct net_device *, struct cfg80211_beacon_data *);
12696b4cac81SBjoern A. Zeeb 	int (*del_station)(struct wiphy *,  struct net_device *, struct station_del_parameters *);
12706b4cac81SBjoern A. Zeeb 	int (*change_station)(struct wiphy *,  struct net_device *, const u8 *,  struct station_parameters *);
12716b4cac81SBjoern A. Zeeb 	int (*sched_scan_start)(struct wiphy *, struct net_device *, struct cfg80211_sched_scan_request *);
12726b4cac81SBjoern A. Zeeb 	int (*sched_scan_stop)(struct wiphy *, struct net_device *,  u64);
12736b4cac81SBjoern A. Zeeb 	void (*update_mgmt_frame_registrations)(struct wiphy *, struct wireless_dev *, struct mgmt_frame_regs *);
12746b4cac81SBjoern A. Zeeb 	int (*mgmt_tx)(struct wiphy *,  struct wireless_dev *, struct cfg80211_mgmt_tx_params *,  u64 *);
12756b4cac81SBjoern A. Zeeb 	int (*cancel_remain_on_channel)(struct wiphy *, struct wireless_dev *, u64);
12766b4cac81SBjoern A. Zeeb 	int (*get_channel)(struct wiphy *, struct wireless_dev *, struct cfg80211_chan_def *);
12776b4cac81SBjoern A. Zeeb 	int (*crit_proto_start)(struct wiphy *, struct wireless_dev *, enum nl80211_crit_proto_id, u16);
12786b4cac81SBjoern A. Zeeb 	void (*crit_proto_stop)(struct wiphy *, struct wireless_dev *);
12796b4cac81SBjoern A. Zeeb 	int (*tdls_oper)(struct wiphy *, struct net_device *,  const u8 *, enum nl80211_tdls_operation);
12806b4cac81SBjoern A. Zeeb 	int (*update_connect_params)(struct wiphy *, struct net_device *, struct cfg80211_connect_params *, u32);
12816b4cac81SBjoern A. Zeeb 	int (*set_pmk)(struct wiphy *,  struct net_device *, const struct cfg80211_pmk_conf *);
12826b4cac81SBjoern A. Zeeb 	int (*del_pmk)(struct wiphy *,  struct net_device *, const u8 *);
12836b4cac81SBjoern A. Zeeb 	int (*remain_on_channel)(struct wiphy *,  struct wireless_dev *, struct linuxkpi_ieee80211_channel *, unsigned int,  u64 *);
12846b4cac81SBjoern A. Zeeb 	int (*start_p2p_device)(struct wiphy *,  struct wireless_dev *);
12856b4cac81SBjoern A. Zeeb 	void (*stop_p2p_device)(struct wiphy *,  struct wireless_dev *);
12866b4cac81SBjoern A. Zeeb };
12876b4cac81SBjoern A. Zeeb 
12886b4cac81SBjoern A. Zeeb 
12896b4cac81SBjoern A. Zeeb /* -------------------------------------------------------------------------- */
12906b4cac81SBjoern A. Zeeb 
12916b4cac81SBjoern A. Zeeb /* linux_80211.c */
12926b4cac81SBjoern A. Zeeb 
12936b4cac81SBjoern A. Zeeb struct wiphy *linuxkpi_wiphy_new(const struct cfg80211_ops *, size_t);
12946b4cac81SBjoern A. Zeeb void linuxkpi_wiphy_free(struct wiphy *wiphy);
12956b4cac81SBjoern A. Zeeb 
1296ac1d519cSBjoern A. Zeeb void linuxkpi_wiphy_work_queue(struct wiphy *, struct wiphy_work *);
1297ac1d519cSBjoern A. Zeeb void linuxkpi_wiphy_work_cancel(struct wiphy *, struct wiphy_work *);
1298ac1d519cSBjoern A. Zeeb void linuxkpi_wiphy_work_flush(struct wiphy *, struct wiphy_work *);
1299ac1d519cSBjoern A. Zeeb void lkpi_wiphy_delayed_work_timer(struct timer_list *);
1300ac1d519cSBjoern A. Zeeb void linuxkpi_wiphy_delayed_work_queue(struct wiphy *,
1301ac1d519cSBjoern A. Zeeb     struct wiphy_delayed_work *, unsigned long);
1302ac1d519cSBjoern A. Zeeb void linuxkpi_wiphy_delayed_work_cancel(struct wiphy *,
1303ac1d519cSBjoern A. Zeeb     struct wiphy_delayed_work *);
1304ac1d519cSBjoern A. Zeeb 
13056b4cac81SBjoern A. Zeeb int linuxkpi_regulatory_set_wiphy_regd_sync(struct wiphy *wiphy,
13066b4cac81SBjoern A. Zeeb     struct linuxkpi_ieee80211_regdomain *regd);
13076b4cac81SBjoern A. Zeeb uint32_t linuxkpi_ieee80211_channel_to_frequency(uint32_t, enum nl80211_band);
13086b4cac81SBjoern A. Zeeb uint32_t linuxkpi_ieee80211_frequency_to_channel(uint32_t, uint32_t);
13092e183d99SBjoern A. Zeeb struct linuxkpi_ieee80211_channel *
13102e183d99SBjoern A. Zeeb     linuxkpi_ieee80211_get_channel(struct wiphy *, uint32_t);
13115edde07cSBjoern A. Zeeb struct cfg80211_bss *linuxkpi_cfg80211_get_bss(struct wiphy *,
13125edde07cSBjoern A. Zeeb     struct linuxkpi_ieee80211_channel *, const uint8_t *,
13135edde07cSBjoern A. Zeeb     const uint8_t *, size_t, enum ieee80211_bss_type, enum ieee80211_privacy);
13145edde07cSBjoern A. Zeeb void linuxkpi_cfg80211_put_bss(struct wiphy *, struct cfg80211_bss *);
1315b0f73768SBjoern A. Zeeb void linuxkpi_cfg80211_bss_flush(struct wiphy *);
1316673d62fcSBjoern A. Zeeb struct linuxkpi_ieee80211_regdomain *
1317673d62fcSBjoern A. Zeeb     lkpi_get_linuxkpi_ieee80211_regdomain(size_t);
13186b4cac81SBjoern A. Zeeb 
13196b4cac81SBjoern A. Zeeb /* -------------------------------------------------------------------------- */
13206b4cac81SBjoern A. Zeeb 
13216b4cac81SBjoern A. Zeeb static __inline struct wiphy *
13226b4cac81SBjoern A. Zeeb wiphy_new(const struct cfg80211_ops *ops, size_t priv_len)
13236b4cac81SBjoern A. Zeeb {
13246b4cac81SBjoern A. Zeeb 
13256b4cac81SBjoern A. Zeeb 	return (linuxkpi_wiphy_new(ops, priv_len));
13266b4cac81SBjoern A. Zeeb }
13276b4cac81SBjoern A. Zeeb 
13286b4cac81SBjoern A. Zeeb static __inline void
13296b4cac81SBjoern A. Zeeb wiphy_free(struct wiphy *wiphy)
13306b4cac81SBjoern A. Zeeb {
13316b4cac81SBjoern A. Zeeb 
13326b4cac81SBjoern A. Zeeb 	linuxkpi_wiphy_free(wiphy);
13336b4cac81SBjoern A. Zeeb }
13346b4cac81SBjoern A. Zeeb 
13356b4cac81SBjoern A. Zeeb static __inline void *
13366b4cac81SBjoern A. Zeeb wiphy_priv(struct wiphy *wiphy)
13376b4cac81SBjoern A. Zeeb {
13386b4cac81SBjoern A. Zeeb 
13396b4cac81SBjoern A. Zeeb 	return (wiphy->priv);
13406b4cac81SBjoern A. Zeeb }
13416b4cac81SBjoern A. Zeeb 
13426b4cac81SBjoern A. Zeeb static __inline void
13436b4cac81SBjoern A. Zeeb set_wiphy_dev(struct wiphy *wiphy, struct device *dev)
13446b4cac81SBjoern A. Zeeb {
13456b4cac81SBjoern A. Zeeb 
13466b4cac81SBjoern A. Zeeb 	wiphy->dev = dev;
13476b4cac81SBjoern A. Zeeb }
13486b4cac81SBjoern A. Zeeb 
13496b4cac81SBjoern A. Zeeb static __inline struct device *
13506b4cac81SBjoern A. Zeeb wiphy_dev(struct wiphy *wiphy)
13516b4cac81SBjoern A. Zeeb {
13526b4cac81SBjoern A. Zeeb 
13536b4cac81SBjoern A. Zeeb 	return (wiphy->dev);
13546b4cac81SBjoern A. Zeeb }
13556b4cac81SBjoern A. Zeeb 
1356ac1d519cSBjoern A. Zeeb #define	wiphy_dereference(wiphy, p)					\
1357ac1d519cSBjoern A. Zeeb     rcu_dereference_check(p, lockdep_is_held(&(wiphy)->mtx))
13586b4cac81SBjoern A. Zeeb 
1359d875aa15SBjoern A. Zeeb static __inline void
1360d875aa15SBjoern A. Zeeb wiphy_lock(struct wiphy *wiphy)
1361d875aa15SBjoern A. Zeeb {
1362*95a7aa80SBjoern A. Zeeb 	mutex_lock(&wiphy->mtx);
1363d875aa15SBjoern A. Zeeb }
1364d875aa15SBjoern A. Zeeb 
1365d875aa15SBjoern A. Zeeb static __inline void
1366d875aa15SBjoern A. Zeeb wiphy_unlock(struct wiphy *wiphy)
1367d875aa15SBjoern A. Zeeb {
1368*95a7aa80SBjoern A. Zeeb 	mutex_unlock(&wiphy->mtx);
1369d875aa15SBjoern A. Zeeb }
1370d875aa15SBjoern A. Zeeb 
1371d875aa15SBjoern A. Zeeb static __inline void
1372d875aa15SBjoern A. Zeeb wiphy_rfkill_set_hw_state_reason(struct wiphy *wiphy, bool blocked,
1373d875aa15SBjoern A. Zeeb     enum rfkill_hard_block_reasons reason)
1374d875aa15SBjoern A. Zeeb {
1375d875aa15SBjoern A. Zeeb 	TODO();
1376d875aa15SBjoern A. Zeeb }
1377d875aa15SBjoern A. Zeeb 
13786b4cac81SBjoern A. Zeeb /* -------------------------------------------------------------------------- */
13796b4cac81SBjoern A. Zeeb 
13805edde07cSBjoern A. Zeeb static inline struct cfg80211_bss *
13815edde07cSBjoern A. Zeeb cfg80211_get_bss(struct wiphy *wiphy, struct linuxkpi_ieee80211_channel *chan,
13825edde07cSBjoern A. Zeeb     const uint8_t *bssid, const uint8_t *ssid, size_t ssid_len,
13835edde07cSBjoern A. Zeeb     enum ieee80211_bss_type bss_type, enum ieee80211_privacy privacy)
13845edde07cSBjoern A. Zeeb {
13855edde07cSBjoern A. Zeeb 
13865edde07cSBjoern A. Zeeb 	return (linuxkpi_cfg80211_get_bss(wiphy, chan, bssid, ssid, ssid_len,
13875edde07cSBjoern A. Zeeb 	    bss_type, privacy));
13885edde07cSBjoern A. Zeeb }
13895edde07cSBjoern A. Zeeb 
13905edde07cSBjoern A. Zeeb static inline void
13915edde07cSBjoern A. Zeeb cfg80211_put_bss(struct wiphy *wiphy, struct cfg80211_bss *bss)
13925edde07cSBjoern A. Zeeb {
13935edde07cSBjoern A. Zeeb 
13945edde07cSBjoern A. Zeeb 	linuxkpi_cfg80211_put_bss(wiphy, bss);
13955edde07cSBjoern A. Zeeb }
13965edde07cSBjoern A. Zeeb 
13975edde07cSBjoern A. Zeeb static inline void
13985edde07cSBjoern A. Zeeb cfg80211_bss_flush(struct wiphy *wiphy)
13995edde07cSBjoern A. Zeeb {
14005edde07cSBjoern A. Zeeb 
14015edde07cSBjoern A. Zeeb 	linuxkpi_cfg80211_bss_flush(wiphy);
14025edde07cSBjoern A. Zeeb }
14035edde07cSBjoern A. Zeeb 
14045edde07cSBjoern A. Zeeb /* -------------------------------------------------------------------------- */
14055edde07cSBjoern A. Zeeb 
1406d875aa15SBjoern A. Zeeb static __inline bool
1407d875aa15SBjoern A. Zeeb rfkill_blocked(int rfkill)		/* argument type? */
1408d875aa15SBjoern A. Zeeb {
1409d875aa15SBjoern A. Zeeb 	TODO();
1410d875aa15SBjoern A. Zeeb 	return (false);
1411d875aa15SBjoern A. Zeeb }
1412d875aa15SBjoern A. Zeeb 
141305d6f4d6SBjoern A. Zeeb static __inline bool
141405d6f4d6SBjoern A. Zeeb rfkill_soft_blocked(int rfkill)
141505d6f4d6SBjoern A. Zeeb {
141605d6f4d6SBjoern A. Zeeb 	TODO();
141705d6f4d6SBjoern A. Zeeb 	return (false);
141805d6f4d6SBjoern A. Zeeb }
141905d6f4d6SBjoern A. Zeeb 
14206b4cac81SBjoern A. Zeeb static __inline int
14216b4cac81SBjoern A. Zeeb reg_query_regdb_wmm(uint8_t *alpha2, uint32_t center_freq,
14226b4cac81SBjoern A. Zeeb     struct ieee80211_reg_rule *rule)
14236b4cac81SBjoern A. Zeeb {
14246b4cac81SBjoern A. Zeeb 
14256b4cac81SBjoern A. Zeeb 	/* ETSI has special rules. FreeBSD regdb needs to learn about them. */
14266b4cac81SBjoern A. Zeeb 	TODO();
14276b4cac81SBjoern A. Zeeb 
14286b4cac81SBjoern A. Zeeb 	return (-ENXIO);
14296b4cac81SBjoern A. Zeeb }
14306b4cac81SBjoern A. Zeeb 
14316b4cac81SBjoern A. Zeeb static __inline const u8 *
14326b4cac81SBjoern A. Zeeb cfg80211_find_ie_match(uint32_t f, const u8 *ies, size_t ies_len,
14336b4cac81SBjoern A. Zeeb     const u8 *match, int x, int y)
14346b4cac81SBjoern A. Zeeb {
14356b4cac81SBjoern A. Zeeb 	TODO();
14366b4cac81SBjoern A. Zeeb 	return (NULL);
14376b4cac81SBjoern A. Zeeb }
14386b4cac81SBjoern A. Zeeb 
14396b4cac81SBjoern A. Zeeb static __inline const u8 *
1440b0f73768SBjoern A. Zeeb cfg80211_find_ie(uint8_t eid, const uint8_t *ie, uint32_t ielen)
14416b4cac81SBjoern A. Zeeb {
14426b4cac81SBjoern A. Zeeb 	TODO();
14436b4cac81SBjoern A. Zeeb 	return (NULL);
14446b4cac81SBjoern A. Zeeb }
14456b4cac81SBjoern A. Zeeb 
14466b4cac81SBjoern A. Zeeb static __inline void
14476b4cac81SBjoern A. Zeeb cfg80211_pmsr_complete(struct wireless_dev *wdev,
14486b4cac81SBjoern A. Zeeb     struct cfg80211_pmsr_request *req, gfp_t gfp)
14496b4cac81SBjoern A. Zeeb {
14506b4cac81SBjoern A. Zeeb 	TODO();
14516b4cac81SBjoern A. Zeeb }
14526b4cac81SBjoern A. Zeeb 
14536b4cac81SBjoern A. Zeeb static __inline void
14546b4cac81SBjoern A. Zeeb cfg80211_pmsr_report(struct wireless_dev *wdev,
14556b4cac81SBjoern A. Zeeb     struct cfg80211_pmsr_request *req,
14566b4cac81SBjoern A. Zeeb     struct cfg80211_pmsr_result *result, gfp_t gfp)
14576b4cac81SBjoern A. Zeeb {
14586b4cac81SBjoern A. Zeeb 	TODO();
14596b4cac81SBjoern A. Zeeb }
14606b4cac81SBjoern A. Zeeb 
14616b4cac81SBjoern A. Zeeb static __inline void
14626b4cac81SBjoern A. Zeeb cfg80211_chandef_create(struct cfg80211_chan_def *chandef,
14636b4cac81SBjoern A. Zeeb     struct linuxkpi_ieee80211_channel *chan, enum nl80211_chan_flags chan_flag)
14646b4cac81SBjoern A. Zeeb {
14656b4cac81SBjoern A. Zeeb 
14666b4cac81SBjoern A. Zeeb 	KASSERT(chandef != NULL, ("%s: chandef is NULL\n", __func__));
14676b4cac81SBjoern A. Zeeb 	KASSERT(chan != NULL, ("%s: chan is NULL\n", __func__));
14686b4cac81SBjoern A. Zeeb 
14694a07abdeSBjoern A. Zeeb 	memset(chandef, 0, sizeof(*chandef));
14706b4cac81SBjoern A. Zeeb 	chandef->chan = chan;
14716b4cac81SBjoern A. Zeeb 	chandef->center_freq2 = 0;	/* Set here and only overwrite if needed. */
14726b4cac81SBjoern A. Zeeb 
14736b4cac81SBjoern A. Zeeb 	switch (chan_flag) {
14746b4cac81SBjoern A. Zeeb 	case NL80211_CHAN_NO_HT:
14756b4cac81SBjoern A. Zeeb 		chandef->width = NL80211_CHAN_WIDTH_20_NOHT;
14766b4cac81SBjoern A. Zeeb 		chandef->center_freq1 = chan->center_freq;
14776b4cac81SBjoern A. Zeeb 		break;
14786b4cac81SBjoern A. Zeeb 	default:
1479800aa9cdSBjoern A. Zeeb 		IMPROVE("Also depends on our manual settings");
1480b0f73768SBjoern A. Zeeb 		if (chan->flags & IEEE80211_CHAN_NO_HT40)
14816b4cac81SBjoern A. Zeeb 			chandef->width = NL80211_CHAN_WIDTH_20;
1482b0f73768SBjoern A. Zeeb 		else if (chan->flags & IEEE80211_CHAN_NO_80MHZ)
1483b0f73768SBjoern A. Zeeb 			chandef->width = NL80211_CHAN_WIDTH_40;
1484b0f73768SBjoern A. Zeeb 		else if (chan->flags & IEEE80211_CHAN_NO_160MHZ)
1485b0f73768SBjoern A. Zeeb 			chandef->width = NL80211_CHAN_WIDTH_80;
1486b0f73768SBjoern A. Zeeb 		else {
1487b0f73768SBjoern A. Zeeb 			chandef->width = NL80211_CHAN_WIDTH_160;
1488b0f73768SBjoern A. Zeeb 			IMPROVE("80P80 and 320 ...");
1489b0f73768SBjoern A. Zeeb 		}
14906b4cac81SBjoern A. Zeeb 		chandef->center_freq1 = chan->center_freq;
14916b4cac81SBjoern A. Zeeb 		break;
14926b4cac81SBjoern A. Zeeb 	};
14936b4cac81SBjoern A. Zeeb }
14946b4cac81SBjoern A. Zeeb 
14956b4cac81SBjoern A. Zeeb static __inline void
14966b4cac81SBjoern A. Zeeb cfg80211_bss_iter(struct wiphy *wiphy, struct cfg80211_chan_def *chandef,
14976b4cac81SBjoern A. Zeeb     void (*iterfunc)(struct wiphy *, struct cfg80211_bss *, void *), void *data)
14986b4cac81SBjoern A. Zeeb {
14996b4cac81SBjoern A. Zeeb 	TODO();
15006b4cac81SBjoern A. Zeeb }
15016b4cac81SBjoern A. Zeeb 
15026b4cac81SBjoern A. Zeeb struct element {
15036b4cac81SBjoern A. Zeeb 	uint8_t					id;
15046b4cac81SBjoern A. Zeeb 	uint8_t					datalen;
15056b4cac81SBjoern A. Zeeb 	uint8_t					data[0];
1506b0f73768SBjoern A. Zeeb } __packed;
15076b4cac81SBjoern A. Zeeb 
15085db817d8SBjoern A. Zeeb static inline const struct element *
15095db817d8SBjoern A. Zeeb lkpi_cfg80211_find_elem_pattern(enum ieee80211_eid eid,
15105db817d8SBjoern A. Zeeb     const uint8_t *data, size_t len, uint8_t *pattern, size_t plen)
15116b4cac81SBjoern A. Zeeb {
15125db817d8SBjoern A. Zeeb 	const struct element *elem;
15135db817d8SBjoern A. Zeeb 	const uint8_t *p;
15145db817d8SBjoern A. Zeeb 	size_t ielen;
15155db817d8SBjoern A. Zeeb 
15165db817d8SBjoern A. Zeeb 	p = data;
15175db817d8SBjoern A. Zeeb 	elem = (const struct element *)p;
15185db817d8SBjoern A. Zeeb 	ielen = len;
15195db817d8SBjoern A. Zeeb 	while (elem != NULL && ielen > 1) {
15205db817d8SBjoern A. Zeeb 		if ((2 + elem->datalen) > ielen)
15215db817d8SBjoern A. Zeeb 			/* Element overruns our memory. */
15226b4cac81SBjoern A. Zeeb 			return (NULL);
15235db817d8SBjoern A. Zeeb 		if (elem->id == eid) {
15245db817d8SBjoern A. Zeeb 			if (pattern == NULL)
15255db817d8SBjoern A. Zeeb 				return (elem);
15265db817d8SBjoern A. Zeeb 			if (elem->datalen >= plen &&
15275db817d8SBjoern A. Zeeb 			    memcmp(elem->data, pattern, plen) == 0)
15285db817d8SBjoern A. Zeeb 				return (elem);
15295db817d8SBjoern A. Zeeb 		}
15305db817d8SBjoern A. Zeeb 		ielen -= 2 + elem->datalen;
15315db817d8SBjoern A. Zeeb 		p += 2 + elem->datalen;
15325db817d8SBjoern A. Zeeb 		elem = (const struct element *)p;
15335db817d8SBjoern A. Zeeb 	}
15345db817d8SBjoern A. Zeeb 
15355db817d8SBjoern A. Zeeb 	return (NULL);
15365db817d8SBjoern A. Zeeb }
15375db817d8SBjoern A. Zeeb 
15385db817d8SBjoern A. Zeeb static inline const struct element *
15395db817d8SBjoern A. Zeeb cfg80211_find_elem(enum ieee80211_eid eid, const uint8_t *data, size_t len)
15405db817d8SBjoern A. Zeeb {
15415db817d8SBjoern A. Zeeb 
15425db817d8SBjoern A. Zeeb 	return (lkpi_cfg80211_find_elem_pattern(eid, data, len, NULL, 0));
15435db817d8SBjoern A. Zeeb }
15445db817d8SBjoern A. Zeeb 
15455db817d8SBjoern A. Zeeb static inline const struct element *
15465db817d8SBjoern A. Zeeb ieee80211_bss_get_elem(struct cfg80211_bss *bss, uint32_t eid)
15475db817d8SBjoern A. Zeeb {
15485db817d8SBjoern A. Zeeb 
15495db817d8SBjoern A. Zeeb 	if (bss->ies == NULL)
15505db817d8SBjoern A. Zeeb 		return (NULL);
15515db817d8SBjoern A. Zeeb 	return (cfg80211_find_elem(eid, bss->ies->data, bss->ies->len));
15525db817d8SBjoern A. Zeeb }
15535db817d8SBjoern A. Zeeb 
15545db817d8SBjoern A. Zeeb static inline const uint8_t *
15555db817d8SBjoern A. Zeeb ieee80211_bss_get_ie(struct cfg80211_bss *bss, uint32_t eid)
15565db817d8SBjoern A. Zeeb {
15575db817d8SBjoern A. Zeeb 
15585db817d8SBjoern A. Zeeb 	return ((const uint8_t *)ieee80211_bss_get_elem(bss, eid));
15595db817d8SBjoern A. Zeeb }
15605db817d8SBjoern A. Zeeb 
15615db817d8SBjoern A. Zeeb static inline uint8_t *
15625db817d8SBjoern A. Zeeb cfg80211_find_vendor_ie(unsigned int oui, int oui_type,
15635db817d8SBjoern A. Zeeb     uint8_t *data, size_t len)
15645db817d8SBjoern A. Zeeb {
15655db817d8SBjoern A. Zeeb 	const struct element *elem;
15665db817d8SBjoern A. Zeeb 	uint8_t pattern[4] = { oui << 16, oui << 8, oui, oui_type };
15675db817d8SBjoern A. Zeeb 	uint8_t plen = 4;		/* >= 3? oui_type always part of this? */
15685db817d8SBjoern A. Zeeb 	IMPROVE("plen currently always incl. oui_type");
15695db817d8SBjoern A. Zeeb 
15705db817d8SBjoern A. Zeeb 	elem = lkpi_cfg80211_find_elem_pattern(IEEE80211_ELEMID_VENDOR,
15715db817d8SBjoern A. Zeeb 	    data, len, pattern, plen);
15725db817d8SBjoern A. Zeeb 	if (elem == NULL)
15735db817d8SBjoern A. Zeeb 		return (NULL);
15745db817d8SBjoern A. Zeeb 	return (__DECONST(uint8_t *, elem));
15756b4cac81SBjoern A. Zeeb }
15766b4cac81SBjoern A. Zeeb 
15776b4cac81SBjoern A. Zeeb static __inline uint32_t
15786b4cac81SBjoern A. Zeeb cfg80211_calculate_bitrate(struct rate_info *rate)
15796b4cac81SBjoern A. Zeeb {
15806b4cac81SBjoern A. Zeeb 	TODO();
15816b4cac81SBjoern A. Zeeb 	return (-1);
15826b4cac81SBjoern A. Zeeb }
15836b4cac81SBjoern A. Zeeb 
15846b4cac81SBjoern A. Zeeb static __inline uint32_t
15856b4cac81SBjoern A. Zeeb ieee80211_channel_to_frequency(uint32_t channel, enum nl80211_band band)
15866b4cac81SBjoern A. Zeeb {
15876b4cac81SBjoern A. Zeeb 
15886b4cac81SBjoern A. Zeeb 	return (linuxkpi_ieee80211_channel_to_frequency(channel, band));
15896b4cac81SBjoern A. Zeeb }
15906b4cac81SBjoern A. Zeeb 
15916b4cac81SBjoern A. Zeeb static __inline uint32_t
15926b4cac81SBjoern A. Zeeb ieee80211_frequency_to_channel(uint32_t freq)
15936b4cac81SBjoern A. Zeeb {
15946b4cac81SBjoern A. Zeeb 
15956b4cac81SBjoern A. Zeeb 	return (linuxkpi_ieee80211_frequency_to_channel(freq, 0));
15966b4cac81SBjoern A. Zeeb }
15976b4cac81SBjoern A. Zeeb 
15986b4cac81SBjoern A. Zeeb static __inline int
15996b4cac81SBjoern A. Zeeb regulatory_set_wiphy_regd_sync(struct wiphy *wiphy,
16006b4cac81SBjoern A. Zeeb     struct linuxkpi_ieee80211_regdomain *regd)
16016b4cac81SBjoern A. Zeeb {
16026b4cac81SBjoern A. Zeeb 	IMPROVE();
16036b4cac81SBjoern A. Zeeb 	return (linuxkpi_regulatory_set_wiphy_regd_sync(wiphy, regd));
16046b4cac81SBjoern A. Zeeb }
16056b4cac81SBjoern A. Zeeb 
16066b4cac81SBjoern A. Zeeb static __inline int
16076b4cac81SBjoern A. Zeeb regulatory_set_wiphy_regd_sync_rtnl(struct wiphy *wiphy,
16086b4cac81SBjoern A. Zeeb     struct linuxkpi_ieee80211_regdomain *regd)
16096b4cac81SBjoern A. Zeeb {
16106b4cac81SBjoern A. Zeeb 
16116b4cac81SBjoern A. Zeeb 	IMPROVE();
16126b4cac81SBjoern A. Zeeb 	return (linuxkpi_regulatory_set_wiphy_regd_sync(wiphy, regd));
16136b4cac81SBjoern A. Zeeb }
16146b4cac81SBjoern A. Zeeb 
16156b4cac81SBjoern A. Zeeb static __inline int
16166b4cac81SBjoern A. Zeeb regulatory_set_wiphy_regd(struct wiphy *wiphy,
16176b4cac81SBjoern A. Zeeb     struct linuxkpi_ieee80211_regdomain *regd)
16186b4cac81SBjoern A. Zeeb {
16196b4cac81SBjoern A. Zeeb 
16206b4cac81SBjoern A. Zeeb 	IMPROVE();
16216b4cac81SBjoern A. Zeeb 	if (regd == NULL)
16226b4cac81SBjoern A. Zeeb 		return (EINVAL);
16236b4cac81SBjoern A. Zeeb 
16246b4cac81SBjoern A. Zeeb 	/* XXX-BZ wild guessing here based on brcmfmac. */
16256b4cac81SBjoern A. Zeeb 	if (wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED)
16266b4cac81SBjoern A. Zeeb 		wiphy->regd = regd;
16276b4cac81SBjoern A. Zeeb 	else
16286b4cac81SBjoern A. Zeeb 		return (EPERM);
16296b4cac81SBjoern A. Zeeb 
16306b4cac81SBjoern A. Zeeb 	/* XXX FIXME, do we have to do anything with reg_notifier? */
16316b4cac81SBjoern A. Zeeb 	return (0);
16326b4cac81SBjoern A. Zeeb }
16336b4cac81SBjoern A. Zeeb 
16346b4cac81SBjoern A. Zeeb static __inline int
163551b461b3SBjoern A. Zeeb regulatory_hint(struct wiphy *wiphy, const uint8_t *alpha2)
16366b4cac81SBjoern A. Zeeb {
1637673d62fcSBjoern A. Zeeb 	struct linuxkpi_ieee80211_regdomain *regd;
1638673d62fcSBjoern A. Zeeb 
1639673d62fcSBjoern A. Zeeb 	if (wiphy->regd != NULL)
1640673d62fcSBjoern A. Zeeb 		return (-EBUSY);
1641673d62fcSBjoern A. Zeeb 
1642673d62fcSBjoern A. Zeeb 	regd = lkpi_get_linuxkpi_ieee80211_regdomain(0);
1643673d62fcSBjoern A. Zeeb 	if (regd == NULL)
1644673d62fcSBjoern A. Zeeb 		return (-ENOMEM);
1645673d62fcSBjoern A. Zeeb 
1646673d62fcSBjoern A. Zeeb 	regd->alpha2[0] = alpha2[0];
1647673d62fcSBjoern A. Zeeb 	regd->alpha2[1] = alpha2[1];
1648673d62fcSBjoern A. Zeeb 	wiphy->regd = regd;
1649673d62fcSBjoern A. Zeeb 
1650673d62fcSBjoern A. Zeeb 	IMPROVE("are there flags who is managing? update net8011?");
1651673d62fcSBjoern A. Zeeb 
1652673d62fcSBjoern A. Zeeb 	return (0);
16536b4cac81SBjoern A. Zeeb }
16546b4cac81SBjoern A. Zeeb 
16552e183d99SBjoern A. Zeeb static __inline const char *
16562e183d99SBjoern A. Zeeb reg_initiator_name(enum nl80211_reg_initiator initiator)
16572e183d99SBjoern A. Zeeb {
16582e183d99SBjoern A. Zeeb 	TODO();
16592e183d99SBjoern A. Zeeb 	return (NULL);
16602e183d99SBjoern A. Zeeb }
16612e183d99SBjoern A. Zeeb 
16626b4cac81SBjoern A. Zeeb static __inline struct linuxkpi_ieee80211_regdomain *
16636b4cac81SBjoern A. Zeeb rtnl_dereference(const struct linuxkpi_ieee80211_regdomain *regd)
16646b4cac81SBjoern A. Zeeb {
16656b4cac81SBjoern A. Zeeb 	TODO();
16666b4cac81SBjoern A. Zeeb 	return (NULL);
16676b4cac81SBjoern A. Zeeb }
16686b4cac81SBjoern A. Zeeb 
16696b4cac81SBjoern A. Zeeb static __inline struct ieee80211_reg_rule *
16706b4cac81SBjoern A. Zeeb freq_reg_info(struct wiphy *wiphy, uint32_t center_freq)
16716b4cac81SBjoern A. Zeeb {
16726b4cac81SBjoern A. Zeeb 	TODO();
16736b4cac81SBjoern A. Zeeb 	return (NULL);
16746b4cac81SBjoern A. Zeeb }
16756b4cac81SBjoern A. Zeeb 
16766b4cac81SBjoern A. Zeeb static __inline void
16776b4cac81SBjoern A. Zeeb wiphy_apply_custom_regulatory(struct wiphy *wiphy,
16786b4cac81SBjoern A. Zeeb     const struct linuxkpi_ieee80211_regdomain *regd)
16796b4cac81SBjoern A. Zeeb {
16806b4cac81SBjoern A. Zeeb 	TODO();
16816b4cac81SBjoern A. Zeeb }
16826b4cac81SBjoern A. Zeeb 
16836b4cac81SBjoern A. Zeeb static __inline char *
16846b4cac81SBjoern A. Zeeb wiphy_name(struct wiphy *wiphy)
16856b4cac81SBjoern A. Zeeb {
16866b4cac81SBjoern A. Zeeb 	if (wiphy != NULL && wiphy->dev != NULL)
16876b4cac81SBjoern A. Zeeb 		return dev_name(wiphy->dev);
16882e183d99SBjoern A. Zeeb 	else {
16892e183d99SBjoern A. Zeeb 		IMPROVE("wlanNA");
16906b4cac81SBjoern A. Zeeb 		return ("wlanNA");
16916b4cac81SBjoern A. Zeeb 	}
16922e183d99SBjoern A. Zeeb }
16936b4cac81SBjoern A. Zeeb 
16946b4cac81SBjoern A. Zeeb static __inline void
16956b4cac81SBjoern A. Zeeb wiphy_read_of_freq_limits(struct wiphy *wiphy)
16966b4cac81SBjoern A. Zeeb {
16976b4cac81SBjoern A. Zeeb #ifdef FDT
16986b4cac81SBjoern A. Zeeb 	TODO();
16996b4cac81SBjoern A. Zeeb #endif
17006b4cac81SBjoern A. Zeeb }
17016b4cac81SBjoern A. Zeeb 
17026b4cac81SBjoern A. Zeeb static __inline void
17036b4cac81SBjoern A. Zeeb wiphy_ext_feature_set(struct wiphy *wiphy, enum nl80211_ext_feature ef)
17046b4cac81SBjoern A. Zeeb {
17056b4cac81SBjoern A. Zeeb 
17066b4cac81SBjoern A. Zeeb 	set_bit(ef, wiphy->ext_features);
17076b4cac81SBjoern A. Zeeb }
17086b4cac81SBjoern A. Zeeb 
1709ac1d519cSBjoern A. Zeeb static inline bool
1710ac1d519cSBjoern A. Zeeb wiphy_ext_feature_isset(struct wiphy *wiphy, enum nl80211_ext_feature ef)
1711ac1d519cSBjoern A. Zeeb {
1712ac1d519cSBjoern A. Zeeb 	return (test_bit(ef, wiphy->ext_features));
1713ac1d519cSBjoern A. Zeeb }
1714ac1d519cSBjoern A. Zeeb 
17156b4cac81SBjoern A. Zeeb static __inline void *
17166b4cac81SBjoern A. Zeeb wiphy_net(struct wiphy *wiphy)
17176b4cac81SBjoern A. Zeeb {
17186b4cac81SBjoern A. Zeeb 	TODO();
17196b4cac81SBjoern A. Zeeb 	return (NULL);	/* XXX passed to dev_net_set() */
17206b4cac81SBjoern A. Zeeb }
17216b4cac81SBjoern A. Zeeb 
17226b4cac81SBjoern A. Zeeb static __inline int
17236b4cac81SBjoern A. Zeeb wiphy_register(struct wiphy *wiphy)
17246b4cac81SBjoern A. Zeeb {
17256b4cac81SBjoern A. Zeeb 	TODO();
17266b4cac81SBjoern A. Zeeb 	return (0);
17276b4cac81SBjoern A. Zeeb }
17286b4cac81SBjoern A. Zeeb 
17296b4cac81SBjoern A. Zeeb static __inline void
17306b4cac81SBjoern A. Zeeb wiphy_unregister(struct wiphy *wiphy)
17316b4cac81SBjoern A. Zeeb {
17326b4cac81SBjoern A. Zeeb 	TODO();
17336b4cac81SBjoern A. Zeeb }
17346b4cac81SBjoern A. Zeeb 
17356b4cac81SBjoern A. Zeeb static __inline void
17366b4cac81SBjoern A. Zeeb wiphy_warn(struct wiphy *wiphy, const char *fmt, ...)
17376b4cac81SBjoern A. Zeeb {
17386b4cac81SBjoern A. Zeeb 	TODO();
17396b4cac81SBjoern A. Zeeb }
17406b4cac81SBjoern A. Zeeb 
17416b4cac81SBjoern A. Zeeb static __inline int
17426b4cac81SBjoern A. Zeeb cfg80211_check_combinations(struct wiphy *wiphy,
17436b4cac81SBjoern A. Zeeb     struct iface_combination_params *params)
17446b4cac81SBjoern A. Zeeb {
17456b4cac81SBjoern A. Zeeb 	TODO();
17466b4cac81SBjoern A. Zeeb 	return (-ENOENT);
17476b4cac81SBjoern A. Zeeb }
17486b4cac81SBjoern A. Zeeb 
17496b4cac81SBjoern A. Zeeb static __inline uint8_t
17506b4cac81SBjoern A. Zeeb cfg80211_classify8021d(struct sk_buff *skb, void *p)
17516b4cac81SBjoern A. Zeeb {
17526b4cac81SBjoern A. Zeeb 	TODO();
17536b4cac81SBjoern A. Zeeb 	return (0);
17546b4cac81SBjoern A. Zeeb }
17556b4cac81SBjoern A. Zeeb 
17566b4cac81SBjoern A. Zeeb static __inline void
17576b4cac81SBjoern A. Zeeb cfg80211_connect_done(struct net_device *ndev,
17586b4cac81SBjoern A. Zeeb     struct cfg80211_connect_resp_params *conn_params, gfp_t gfp)
17596b4cac81SBjoern A. Zeeb {
17606b4cac81SBjoern A. Zeeb 	TODO();
17616b4cac81SBjoern A. Zeeb }
17626b4cac81SBjoern A. Zeeb 
17636b4cac81SBjoern A. Zeeb static __inline void
17646b4cac81SBjoern A. Zeeb cfg80211_crit_proto_stopped(struct wireless_dev *wdev, gfp_t gfp)
17656b4cac81SBjoern A. Zeeb {
17666b4cac81SBjoern A. Zeeb 	TODO();
17676b4cac81SBjoern A. Zeeb }
17686b4cac81SBjoern A. Zeeb 
17696b4cac81SBjoern A. Zeeb static __inline void
17706b4cac81SBjoern A. Zeeb cfg80211_disconnected(struct net_device *ndev, uint16_t reason,
17716b4cac81SBjoern A. Zeeb     void *p, int x, bool locally_generated, gfp_t gfp)
17726b4cac81SBjoern A. Zeeb {
17736b4cac81SBjoern A. Zeeb 	TODO();
17746b4cac81SBjoern A. Zeeb }
17756b4cac81SBjoern A. Zeeb 
17766b4cac81SBjoern A. Zeeb static __inline int
17776b4cac81SBjoern A. Zeeb cfg80211_get_p2p_attr(const u8 *ie, u32 ie_len,
17786b4cac81SBjoern A. Zeeb     enum ieee80211_p2p_attr_ids attr, u8 *p, size_t p_len)
17796b4cac81SBjoern A. Zeeb {
17806b4cac81SBjoern A. Zeeb 	TODO();
17816b4cac81SBjoern A. Zeeb 	return (-1);
17826b4cac81SBjoern A. Zeeb }
17836b4cac81SBjoern A. Zeeb 
17846b4cac81SBjoern A. Zeeb static __inline void
17856b4cac81SBjoern A. Zeeb cfg80211_ibss_joined(struct net_device *ndev, const uint8_t *addr,
17866b4cac81SBjoern A. Zeeb     struct linuxkpi_ieee80211_channel *chan, gfp_t gfp)
17876b4cac81SBjoern A. Zeeb {
17886b4cac81SBjoern A. Zeeb 	TODO();
17896b4cac81SBjoern A. Zeeb }
17906b4cac81SBjoern A. Zeeb 
17916b4cac81SBjoern A. Zeeb static __inline struct cfg80211_bss *
17926b4cac81SBjoern A. Zeeb cfg80211_inform_bss(struct wiphy *wiphy,
17936b4cac81SBjoern A. Zeeb     struct linuxkpi_ieee80211_channel *channel,
17942e183d99SBjoern A. Zeeb     enum cfg80211_bss_frame_type bss_ftype, const uint8_t *bss, int _x,
17956b4cac81SBjoern A. Zeeb     uint16_t cap, uint16_t intvl, const uint8_t *ie, size_t ie_len,
17966b4cac81SBjoern A. Zeeb     int signal, gfp_t gfp)
17976b4cac81SBjoern A. Zeeb {
17986b4cac81SBjoern A. Zeeb 	TODO();
17996b4cac81SBjoern A. Zeeb 	return (NULL);
18006b4cac81SBjoern A. Zeeb }
18016b4cac81SBjoern A. Zeeb 
18026b4cac81SBjoern A. Zeeb static __inline struct cfg80211_bss *
18036b4cac81SBjoern A. Zeeb cfg80211_inform_bss_data(struct wiphy *wiphy,
18046b4cac81SBjoern A. Zeeb     struct cfg80211_inform_bss *bss_data,
18052e183d99SBjoern A. Zeeb     enum cfg80211_bss_frame_type bss_ftype, const uint8_t *bss, int _x,
18066b4cac81SBjoern A. Zeeb     uint16_t cap, uint16_t intvl, const uint8_t *ie, size_t ie_len, gfp_t gfp)
18076b4cac81SBjoern A. Zeeb {
18086b4cac81SBjoern A. Zeeb 	TODO();
18096b4cac81SBjoern A. Zeeb 	return (NULL);
18106b4cac81SBjoern A. Zeeb }
18116b4cac81SBjoern A. Zeeb 
18126b4cac81SBjoern A. Zeeb static __inline void
18136b4cac81SBjoern A. Zeeb cfg80211_mgmt_tx_status(struct wireless_dev *wdev, uint64_t cookie,
18146b4cac81SBjoern A. Zeeb     const u8 *buf, size_t len, bool ack, gfp_t gfp)
18156b4cac81SBjoern A. Zeeb {
18166b4cac81SBjoern A. Zeeb 	TODO();
18176b4cac81SBjoern A. Zeeb }
18186b4cac81SBjoern A. Zeeb 
18196b4cac81SBjoern A. Zeeb static __inline void
18206b4cac81SBjoern A. Zeeb cfg80211_michael_mic_failure(struct net_device *ndev, const uint8_t *addr,
18216b4cac81SBjoern A. Zeeb     enum nl80211_key_type key_type, int _x, void *p, gfp_t gfp)
18226b4cac81SBjoern A. Zeeb {
18236b4cac81SBjoern A. Zeeb 	TODO();
18246b4cac81SBjoern A. Zeeb }
18256b4cac81SBjoern A. Zeeb 
18266b4cac81SBjoern A. Zeeb static __inline void
18276b4cac81SBjoern A. Zeeb cfg80211_new_sta(struct net_device *ndev, const uint8_t *addr,
18286b4cac81SBjoern A. Zeeb     struct station_info *sinfo, gfp_t gfp)
18296b4cac81SBjoern A. Zeeb {
18306b4cac81SBjoern A. Zeeb 	TODO();
18316b4cac81SBjoern A. Zeeb }
18326b4cac81SBjoern A. Zeeb 
18336b4cac81SBjoern A. Zeeb static __inline void
18346b4cac81SBjoern A. Zeeb cfg80211_del_sta(struct net_device *ndev, const uint8_t *addr, gfp_t gfp)
18356b4cac81SBjoern A. Zeeb {
18366b4cac81SBjoern A. Zeeb 	TODO();
18376b4cac81SBjoern A. Zeeb }
18386b4cac81SBjoern A. Zeeb 
18396b4cac81SBjoern A. Zeeb static __inline void
18406b4cac81SBjoern A. Zeeb cfg80211_port_authorized(struct net_device *ndev, const uint8_t *bssid,
18416b4cac81SBjoern A. Zeeb     gfp_t gfp)
18426b4cac81SBjoern A. Zeeb {
18436b4cac81SBjoern A. Zeeb 	TODO();
18446b4cac81SBjoern A. Zeeb }
18456b4cac81SBjoern A. Zeeb 
18466b4cac81SBjoern A. Zeeb static __inline void
18476b4cac81SBjoern A. Zeeb cfg80211_ready_on_channel(struct wireless_dev *wdev, uint64_t cookie,
18486b4cac81SBjoern A. Zeeb     struct linuxkpi_ieee80211_channel *channel, unsigned int duration,
18496b4cac81SBjoern A. Zeeb     gfp_t gfp)
18506b4cac81SBjoern A. Zeeb {
18516b4cac81SBjoern A. Zeeb 	TODO();
18526b4cac81SBjoern A. Zeeb }
18536b4cac81SBjoern A. Zeeb 
18546b4cac81SBjoern A. Zeeb static __inline void
18556b4cac81SBjoern A. Zeeb cfg80211_remain_on_channel_expired(struct wireless_dev *wdev,
18566b4cac81SBjoern A. Zeeb     uint64_t cookie, struct linuxkpi_ieee80211_channel *channel, gfp_t gfp)
18576b4cac81SBjoern A. Zeeb {
18586b4cac81SBjoern A. Zeeb 	TODO();
18596b4cac81SBjoern A. Zeeb }
18606b4cac81SBjoern A. Zeeb 
18616b4cac81SBjoern A. Zeeb static __inline void
18626b4cac81SBjoern A. Zeeb cfg80211_report_wowlan_wakeup(void)
18636b4cac81SBjoern A. Zeeb {
18646b4cac81SBjoern A. Zeeb 	TODO();
18656b4cac81SBjoern A. Zeeb }
18666b4cac81SBjoern A. Zeeb 
18676b4cac81SBjoern A. Zeeb static __inline void
18686b4cac81SBjoern A. Zeeb cfg80211_roamed(struct net_device *ndev, struct cfg80211_roam_info *roam_info,
18696b4cac81SBjoern A. Zeeb     gfp_t gfp)
18706b4cac81SBjoern A. Zeeb {
18716b4cac81SBjoern A. Zeeb 	TODO();
18726b4cac81SBjoern A. Zeeb }
18736b4cac81SBjoern A. Zeeb 
18746b4cac81SBjoern A. Zeeb static __inline void
18756b4cac81SBjoern A. Zeeb cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int _x,
18766b4cac81SBjoern A. Zeeb     uint8_t *p, size_t p_len, int _x2)
18776b4cac81SBjoern A. Zeeb {
18786b4cac81SBjoern A. Zeeb 	TODO();
18796b4cac81SBjoern A. Zeeb }
18806b4cac81SBjoern A. Zeeb 
18816b4cac81SBjoern A. Zeeb static __inline void
18826b4cac81SBjoern A. Zeeb cfg80211_scan_done(struct cfg80211_scan_request *scan_request,
18836b4cac81SBjoern A. Zeeb     struct cfg80211_scan_info *info)
18846b4cac81SBjoern A. Zeeb {
18856b4cac81SBjoern A. Zeeb 	TODO();
18866b4cac81SBjoern A. Zeeb }
18876b4cac81SBjoern A. Zeeb 
18886b4cac81SBjoern A. Zeeb static __inline void
18896b4cac81SBjoern A. Zeeb cfg80211_sched_scan_results(struct wiphy *wiphy, uint64_t reqid)
18906b4cac81SBjoern A. Zeeb {
18916b4cac81SBjoern A. Zeeb 	TODO();
18926b4cac81SBjoern A. Zeeb }
18936b4cac81SBjoern A. Zeeb 
18946b4cac81SBjoern A. Zeeb static __inline void
18956b4cac81SBjoern A. Zeeb cfg80211_sched_scan_stopped(struct wiphy *wiphy, int _x)
18966b4cac81SBjoern A. Zeeb {
18976b4cac81SBjoern A. Zeeb 	TODO();
18986b4cac81SBjoern A. Zeeb }
18996b4cac81SBjoern A. Zeeb 
19006b4cac81SBjoern A. Zeeb static __inline void
19016b4cac81SBjoern A. Zeeb cfg80211_unregister_wdev(struct wireless_dev *wdev)
19026b4cac81SBjoern A. Zeeb {
19036b4cac81SBjoern A. Zeeb 	TODO();
19046b4cac81SBjoern A. Zeeb }
19056b4cac81SBjoern A. Zeeb 
19066b4cac81SBjoern A. Zeeb static __inline struct sk_buff *
19076b4cac81SBjoern A. Zeeb cfg80211_vendor_cmd_alloc_reply_skb(struct wiphy *wiphy, unsigned int len)
19086b4cac81SBjoern A. Zeeb {
19096b4cac81SBjoern A. Zeeb 	TODO();
19106b4cac81SBjoern A. Zeeb 	return (NULL);
19116b4cac81SBjoern A. Zeeb }
19126b4cac81SBjoern A. Zeeb 
19136b4cac81SBjoern A. Zeeb static __inline int
19146b4cac81SBjoern A. Zeeb cfg80211_vendor_cmd_reply(struct sk_buff *skb)
19156b4cac81SBjoern A. Zeeb {
19166b4cac81SBjoern A. Zeeb 	TODO();
19176b4cac81SBjoern A. Zeeb 	return (-ENXIO);
19186b4cac81SBjoern A. Zeeb }
19196b4cac81SBjoern A. Zeeb 
19206b4cac81SBjoern A. Zeeb static __inline struct linuxkpi_ieee80211_channel *
19216b4cac81SBjoern A. Zeeb ieee80211_get_channel(struct wiphy *wiphy, uint32_t freq)
19226b4cac81SBjoern A. Zeeb {
19232e183d99SBjoern A. Zeeb 
19242e183d99SBjoern A. Zeeb 	return (linuxkpi_ieee80211_get_channel(wiphy, freq));
19256b4cac81SBjoern A. Zeeb }
19266b4cac81SBjoern A. Zeeb 
192733911994SBjoern A. Zeeb static inline size_t
19286b4cac81SBjoern A. Zeeb ieee80211_get_hdrlen_from_skb(struct sk_buff *skb)
19296b4cac81SBjoern A. Zeeb {
193033911994SBjoern A. Zeeb 	const struct ieee80211_hdr *hdr;
193133911994SBjoern A. Zeeb 	size_t len;
19326b4cac81SBjoern A. Zeeb 
193333911994SBjoern A. Zeeb 	if (skb->len < 10)	/* sizeof(ieee80211_frame_[ack,cts]) */
193433911994SBjoern A. Zeeb 		return (0);
193533911994SBjoern A. Zeeb 
193633911994SBjoern A. Zeeb 	hdr = (const struct ieee80211_hdr *)skb->data;
193733911994SBjoern A. Zeeb 	len = ieee80211_hdrlen(hdr->frame_control);
193833911994SBjoern A. Zeeb 
193933911994SBjoern A. Zeeb 	/* If larger than what is in the skb return. */
194033911994SBjoern A. Zeeb 	if (len > skb->len)
194133911994SBjoern A. Zeeb 		return (0);
194233911994SBjoern A. Zeeb 
194333911994SBjoern A. Zeeb 	return (len);
19446b4cac81SBjoern A. Zeeb }
19456b4cac81SBjoern A. Zeeb 
19466b4cac81SBjoern A. Zeeb static __inline bool
19476b4cac81SBjoern A. Zeeb cfg80211_channel_is_psc(struct linuxkpi_ieee80211_channel *channel)
19486b4cac81SBjoern A. Zeeb {
19496b4cac81SBjoern A. Zeeb 
19506b4cac81SBjoern A. Zeeb 	/* Only 6Ghz. */
19516b4cac81SBjoern A. Zeeb 	if (channel->band != NL80211_BAND_6GHZ)
19526b4cac81SBjoern A. Zeeb 		return (false);
19536b4cac81SBjoern A. Zeeb 
19546b4cac81SBjoern A. Zeeb 	TODO();
19556b4cac81SBjoern A. Zeeb 	return (false);
19566b4cac81SBjoern A. Zeeb }
19576b4cac81SBjoern A. Zeeb 
195813d87d92SBjoern A. Zeeb static inline int
19592e183d99SBjoern A. Zeeb cfg80211_get_ies_channel_number(const uint8_t *ie, size_t len,
19602e183d99SBjoern A. Zeeb     enum nl80211_band band, enum cfg80211_bss_frame_type ftype)
19612e183d99SBjoern A. Zeeb {
196213d87d92SBjoern A. Zeeb 	const struct element *elem;
19632e183d99SBjoern A. Zeeb 
196413d87d92SBjoern A. Zeeb 	switch (band) {
196513d87d92SBjoern A. Zeeb 	case NL80211_BAND_6GHZ:
19662e183d99SBjoern A. Zeeb 		TODO();
196713d87d92SBjoern A. Zeeb 		break;
196813d87d92SBjoern A. Zeeb 	case NL80211_BAND_5GHZ:
196913d87d92SBjoern A. Zeeb 	case NL80211_BAND_2GHZ:
197013d87d92SBjoern A. Zeeb 		/* DSPARAMS has the channel number. */
197113d87d92SBjoern A. Zeeb 		elem = cfg80211_find_elem(IEEE80211_ELEMID_DSPARMS, ie, len);
197213d87d92SBjoern A. Zeeb 		if (elem != NULL && elem->datalen == 1)
197313d87d92SBjoern A. Zeeb 			return (elem->data[0]);
197413d87d92SBjoern A. Zeeb 		/* HTINFO has the primary center channel. */
197513d87d92SBjoern A. Zeeb 		elem = cfg80211_find_elem(IEEE80211_ELEMID_HTINFO, ie, len);
197613d87d92SBjoern A. Zeeb 		if (elem != NULL &&
197713d87d92SBjoern A. Zeeb 		    elem->datalen >= (sizeof(struct ieee80211_ie_htinfo) - 2)) {
197813d87d92SBjoern A. Zeeb 			const struct ieee80211_ie_htinfo *htinfo;
197913d87d92SBjoern A. Zeeb 			htinfo = (const struct ieee80211_ie_htinfo *)elem;
198013d87d92SBjoern A. Zeeb 			return (htinfo->hi_ctrlchannel);
198113d87d92SBjoern A. Zeeb 		}
198213d87d92SBjoern A. Zeeb 		/* What else? */
198313d87d92SBjoern A. Zeeb 		break;
198413d87d92SBjoern A. Zeeb 	default:
198513d87d92SBjoern A. Zeeb 		IMPROVE("Unsupported");
198613d87d92SBjoern A. Zeeb 		break;
198713d87d92SBjoern A. Zeeb 	}
19882e183d99SBjoern A. Zeeb 	return (-1);
19892e183d99SBjoern A. Zeeb }
19906b4cac81SBjoern A. Zeeb 
19916b4cac81SBjoern A. Zeeb /* Used for scanning at least. */
19926b4cac81SBjoern A. Zeeb static __inline void
19936b4cac81SBjoern A. Zeeb get_random_mask_addr(uint8_t *dst, const uint8_t *addr, const uint8_t *mask)
19946b4cac81SBjoern A. Zeeb {
19956b4cac81SBjoern A. Zeeb 	int i;
19966b4cac81SBjoern A. Zeeb 
19976b4cac81SBjoern A. Zeeb 	/* Get a completely random address and then overlay what we want. */
19986b4cac81SBjoern A. Zeeb 	get_random_bytes(dst, ETH_ALEN);
19996b4cac81SBjoern A. Zeeb 	for (i = 0; i < ETH_ALEN; i++)
20006b4cac81SBjoern A. Zeeb 		dst[i] = (dst[i] & ~(mask[i])) | (addr[i] & mask[i]);
20016b4cac81SBjoern A. Zeeb }
20026b4cac81SBjoern A. Zeeb 
2003d875aa15SBjoern A. Zeeb static __inline void
2004d875aa15SBjoern A. Zeeb cfg80211_shutdown_all_interfaces(struct wiphy *wiphy)
2005d875aa15SBjoern A. Zeeb {
2006d875aa15SBjoern A. Zeeb 	TODO();
2007d875aa15SBjoern A. Zeeb }
2008d875aa15SBjoern A. Zeeb 
2009b0f73768SBjoern A. Zeeb static __inline bool
2010b0f73768SBjoern A. Zeeb cfg80211_reg_can_beacon(struct wiphy *wiphy, struct cfg80211_chan_def *chandef,
2011b0f73768SBjoern A. Zeeb     enum nl80211_iftype iftype)
2012b0f73768SBjoern A. Zeeb {
2013b0f73768SBjoern A. Zeeb 	TODO();
2014b0f73768SBjoern A. Zeeb 	return (false);
2015b0f73768SBjoern A. Zeeb }
2016b0f73768SBjoern A. Zeeb 
2017b0f73768SBjoern A. Zeeb static __inline void
2018b0f73768SBjoern A. Zeeb cfg80211_background_radar_event(struct wiphy *wiphy,
2019b0f73768SBjoern A. Zeeb     struct cfg80211_chan_def *chandef, gfp_t gfp)
2020b0f73768SBjoern A. Zeeb {
2021b0f73768SBjoern A. Zeeb 	TODO();
2022b0f73768SBjoern A. Zeeb }
2023b0f73768SBjoern A. Zeeb 
2024b0f73768SBjoern A. Zeeb static __inline const u8 *
2025adff403fSBjoern A. Zeeb cfg80211_find_ext_ie(uint8_t eid, const uint8_t *p, size_t len)
2026b0f73768SBjoern A. Zeeb {
2027b0f73768SBjoern A. Zeeb 	TODO();
2028b0f73768SBjoern A. Zeeb 	return (NULL);
2029b0f73768SBjoern A. Zeeb }
2030b0f73768SBjoern A. Zeeb 
2031b0f73768SBjoern A. Zeeb static __inline bool
2032b0f73768SBjoern A. Zeeb cfg80211_chandef_valid(const struct cfg80211_chan_def *chandef)
2033b0f73768SBjoern A. Zeeb {
2034b0f73768SBjoern A. Zeeb 	TODO();
2035b0f73768SBjoern A. Zeeb 	return (false);
2036b0f73768SBjoern A. Zeeb }
2037b0f73768SBjoern A. Zeeb 
2038ac1d519cSBjoern A. Zeeb static __inline bool
2039ac1d519cSBjoern A. Zeeb cfg80211_chandef_dfs_usable(struct wiphy *wiphy, const struct cfg80211_chan_def *chandef)
2040ac1d519cSBjoern A. Zeeb {
2041ac1d519cSBjoern A. Zeeb 	TODO();
2042ac1d519cSBjoern A. Zeeb 	return (false);
2043ac1d519cSBjoern A. Zeeb }
2044ac1d519cSBjoern A. Zeeb 
2045ac1d519cSBjoern A. Zeeb static __inline unsigned int
2046ac1d519cSBjoern A. Zeeb cfg80211_chandef_dfs_cac_time(struct wiphy *wiphy, const struct cfg80211_chan_def *chandef)
2047ac1d519cSBjoern A. Zeeb {
2048ac1d519cSBjoern A. Zeeb 	TODO();
2049ac1d519cSBjoern A. Zeeb 	return (0);
2050ac1d519cSBjoern A. Zeeb }
2051ac1d519cSBjoern A. Zeeb 
2052ac1d519cSBjoern A. Zeeb static inline void
2053ac1d519cSBjoern A. Zeeb _ieee80211_set_sband_iftype_data(struct ieee80211_supported_band *band,
2054ac1d519cSBjoern A. Zeeb     struct ieee80211_sband_iftype_data *iftype_data, size_t nitems)
2055ac1d519cSBjoern A. Zeeb {
2056ac1d519cSBjoern A. Zeeb 	band->iftype_data = iftype_data;
2057ac1d519cSBjoern A. Zeeb 	band->n_iftype_data = nitems;
2058ac1d519cSBjoern A. Zeeb }
2059ac1d519cSBjoern A. Zeeb 
2060ac1d519cSBjoern A. Zeeb static inline const struct ieee80211_sband_iftype_data *
2061ac1d519cSBjoern A. Zeeb ieee80211_get_sband_iftype_data(const struct ieee80211_supported_band *band,
2062ac1d519cSBjoern A. Zeeb     enum nl80211_iftype iftype)
2063ac1d519cSBjoern A. Zeeb {
2064ac1d519cSBjoern A. Zeeb 	const struct ieee80211_sband_iftype_data *iftype_data;
2065ac1d519cSBjoern A. Zeeb 	int i;
2066ac1d519cSBjoern A. Zeeb 
2067ac1d519cSBjoern A. Zeeb 	for (i = 0; i < band->n_iftype_data; i++) {
2068ac1d519cSBjoern A. Zeeb 		iftype_data = (const void *)&band->iftype_data[i];
2069ac1d519cSBjoern A. Zeeb 		if (iftype_data->types_mask & BIT(iftype))
2070ac1d519cSBjoern A. Zeeb 			return (iftype_data);
2071ac1d519cSBjoern A. Zeeb 	}
2072ac1d519cSBjoern A. Zeeb 
2073ac1d519cSBjoern A. Zeeb 	return (NULL);
2074ac1d519cSBjoern A. Zeeb }
2075ac1d519cSBjoern A. Zeeb 
2076adff403fSBjoern A. Zeeb static __inline const struct ieee80211_sta_eht_cap *
2077adff403fSBjoern A. Zeeb ieee80211_get_eht_iftype_cap(const struct ieee80211_supported_band *band,
2078adff403fSBjoern A. Zeeb     enum nl80211_iftype iftype)
2079adff403fSBjoern A. Zeeb {
2080adff403fSBjoern A. Zeeb 	TODO();
2081adff403fSBjoern A. Zeeb 	return (NULL);
2082adff403fSBjoern A. Zeeb }
2083adff403fSBjoern A. Zeeb 
2084ac1d519cSBjoern A. Zeeb static inline bool
2085ac1d519cSBjoern A. Zeeb cfg80211_ssid_eq(struct cfg80211_ssid *ssid1, struct cfg80211_ssid *ssid2)
2086ac1d519cSBjoern A. Zeeb {
2087ac1d519cSBjoern A. Zeeb 	int error;
2088ac1d519cSBjoern A. Zeeb 
2089ac1d519cSBjoern A. Zeeb 	if (ssid1 == NULL || ssid2 == NULL)	/* Can we KASSERT this? */
2090ac1d519cSBjoern A. Zeeb 		return (false);
2091ac1d519cSBjoern A. Zeeb 
2092ac1d519cSBjoern A. Zeeb 	if (ssid1->ssid_len != ssid2->ssid_len)
2093ac1d519cSBjoern A. Zeeb 		return (false);
2094ac1d519cSBjoern A. Zeeb 	error = memcmp(ssid1->ssid, ssid2->ssid, ssid2->ssid_len);
2095ac1d519cSBjoern A. Zeeb 	if (error != 0)
2096ac1d519cSBjoern A. Zeeb 		return (false);
2097ac1d519cSBjoern A. Zeeb 	return (true);
2098ac1d519cSBjoern A. Zeeb }
2099ac1d519cSBjoern A. Zeeb 
2100ac1d519cSBjoern A. Zeeb static inline void
2101ac1d519cSBjoern A. Zeeb cfg80211_rx_unprot_mlme_mgmt(struct net_device *ndev, const uint8_t *hdr,
2102ac1d519cSBjoern A. Zeeb     uint32_t len)
2103ac1d519cSBjoern A. Zeeb {
2104ac1d519cSBjoern A. Zeeb 	TODO();
2105ac1d519cSBjoern A. Zeeb }
2106ac1d519cSBjoern A. Zeeb 
2107ac1d519cSBjoern A. Zeeb static inline const struct wiphy_iftype_ext_capab *
2108ac1d519cSBjoern A. Zeeb cfg80211_get_iftype_ext_capa(struct wiphy *wiphy, enum nl80211_iftype iftype)
2109ac1d519cSBjoern A. Zeeb {
2110ac1d519cSBjoern A. Zeeb 
2111ac1d519cSBjoern A. Zeeb 	TODO();
2112ac1d519cSBjoern A. Zeeb 	return (NULL);
2113ac1d519cSBjoern A. Zeeb }
2114ac1d519cSBjoern A. Zeeb 
2115ac1d519cSBjoern A. Zeeb static inline int
2116ac1d519cSBjoern A. Zeeb nl80211_chan_width_to_mhz(enum nl80211_chan_width width)
2117ac1d519cSBjoern A. Zeeb {
2118ac1d519cSBjoern A. Zeeb 	switch (width) {
2119ac1d519cSBjoern A. Zeeb 	case NL80211_CHAN_WIDTH_5:
2120ac1d519cSBjoern A. Zeeb 		return (5);
2121ac1d519cSBjoern A. Zeeb 		break;
2122ac1d519cSBjoern A. Zeeb 	case NL80211_CHAN_WIDTH_10:
2123ac1d519cSBjoern A. Zeeb 		return (10);
2124ac1d519cSBjoern A. Zeeb 		break;
2125ac1d519cSBjoern A. Zeeb 	case NL80211_CHAN_WIDTH_20_NOHT:
2126ac1d519cSBjoern A. Zeeb 	case NL80211_CHAN_WIDTH_20:
2127ac1d519cSBjoern A. Zeeb 		return (20);
2128ac1d519cSBjoern A. Zeeb 		break;
2129ac1d519cSBjoern A. Zeeb 	case NL80211_CHAN_WIDTH_40:
2130ac1d519cSBjoern A. Zeeb 		return (40);
2131ac1d519cSBjoern A. Zeeb 		break;
2132ac1d519cSBjoern A. Zeeb 	case NL80211_CHAN_WIDTH_80:
2133ac1d519cSBjoern A. Zeeb 	case NL80211_CHAN_WIDTH_80P80:
2134ac1d519cSBjoern A. Zeeb 		return (80);
2135ac1d519cSBjoern A. Zeeb 		break;
2136ac1d519cSBjoern A. Zeeb 	case NL80211_CHAN_WIDTH_160:
2137ac1d519cSBjoern A. Zeeb 		return (160);
2138ac1d519cSBjoern A. Zeeb 		break;
2139ac1d519cSBjoern A. Zeeb 	case NL80211_CHAN_WIDTH_320:
2140ac1d519cSBjoern A. Zeeb 		return (320);
2141ac1d519cSBjoern A. Zeeb 		break;
2142ac1d519cSBjoern A. Zeeb 	}
2143ac1d519cSBjoern A. Zeeb }
2144ac1d519cSBjoern A. Zeeb 
2145ac1d519cSBjoern A. Zeeb /* -------------------------------------------------------------------------- */
2146ac1d519cSBjoern A. Zeeb 
2147ac1d519cSBjoern A. Zeeb static inline void
2148ac1d519cSBjoern A. Zeeb wiphy_work_init(struct wiphy_work *wwk, wiphy_work_fn fn)
2149ac1d519cSBjoern A. Zeeb {
2150ac1d519cSBjoern A. Zeeb 	INIT_LIST_HEAD(&wwk->entry);
2151ac1d519cSBjoern A. Zeeb 	wwk->fn = fn;
2152ac1d519cSBjoern A. Zeeb }
2153ac1d519cSBjoern A. Zeeb 
2154ac1d519cSBjoern A. Zeeb static inline void
2155ac1d519cSBjoern A. Zeeb wiphy_work_queue(struct wiphy *wiphy, struct wiphy_work *wwk)
2156ac1d519cSBjoern A. Zeeb {
2157ac1d519cSBjoern A. Zeeb 	linuxkpi_wiphy_work_queue(wiphy, wwk);
2158ac1d519cSBjoern A. Zeeb }
2159ac1d519cSBjoern A. Zeeb 
2160ac1d519cSBjoern A. Zeeb static inline void
2161ac1d519cSBjoern A. Zeeb wiphy_work_cancel(struct wiphy *wiphy, struct wiphy_work *wwk)
2162ac1d519cSBjoern A. Zeeb {
2163ac1d519cSBjoern A. Zeeb 	linuxkpi_wiphy_work_cancel(wiphy, wwk);
2164ac1d519cSBjoern A. Zeeb }
2165ac1d519cSBjoern A. Zeeb 
2166ac1d519cSBjoern A. Zeeb static inline void
2167ac1d519cSBjoern A. Zeeb wiphy_work_flush(struct wiphy *wiphy, struct wiphy_work *wwk)
2168ac1d519cSBjoern A. Zeeb {
2169ac1d519cSBjoern A. Zeeb 	linuxkpi_wiphy_work_flush(wiphy, wwk);
2170ac1d519cSBjoern A. Zeeb }
2171ac1d519cSBjoern A. Zeeb 
2172ac1d519cSBjoern A. Zeeb static inline void
2173ac1d519cSBjoern A. Zeeb wiphy_delayed_work_init(struct wiphy_delayed_work *wdwk, wiphy_work_fn fn)
2174ac1d519cSBjoern A. Zeeb {
2175ac1d519cSBjoern A. Zeeb 	wiphy_work_init(&wdwk->work, fn);
2176ac1d519cSBjoern A. Zeeb 	timer_setup(&wdwk->timer, lkpi_wiphy_delayed_work_timer, 0);
2177ac1d519cSBjoern A. Zeeb }
2178ac1d519cSBjoern A. Zeeb 
2179ac1d519cSBjoern A. Zeeb static inline void
2180ac1d519cSBjoern A. Zeeb wiphy_delayed_work_queue(struct wiphy *wiphy, struct wiphy_delayed_work *wdwk,
2181ac1d519cSBjoern A. Zeeb     unsigned long delay)
2182ac1d519cSBjoern A. Zeeb {
2183ac1d519cSBjoern A. Zeeb 	linuxkpi_wiphy_delayed_work_queue(wiphy, wdwk, delay);
2184ac1d519cSBjoern A. Zeeb }
2185ac1d519cSBjoern A. Zeeb 
2186ac1d519cSBjoern A. Zeeb static inline void
2187ac1d519cSBjoern A. Zeeb wiphy_delayed_work_cancel(struct wiphy *wiphy, struct wiphy_delayed_work *wdwk)
2188ac1d519cSBjoern A. Zeeb {
2189ac1d519cSBjoern A. Zeeb 	linuxkpi_wiphy_delayed_work_cancel(wiphy, wdwk);
2190ac1d519cSBjoern A. Zeeb }
2191ac1d519cSBjoern A. Zeeb 
2192ac1d519cSBjoern A. Zeeb /* -------------------------------------------------------------------------- */
2193ac1d519cSBjoern A. Zeeb 
2194ac1d519cSBjoern A. Zeeb #define	wiphy_err(_wiphy, _fmt, ...)					\
2195ac1d519cSBjoern A. Zeeb     dev_err((_wiphy)->dev, _fmt, __VA_ARGS__)
2196b0f73768SBjoern A. Zeeb #define	wiphy_info(wiphy, fmt, ...)					\
2197ac1d519cSBjoern A. Zeeb     dev_info(&(wiphy)->dev, fmt, ##__VA_ARGS__)
2198ac1d519cSBjoern A. Zeeb #define	wiphy_info_once(wiphy, fmt, ...)				\
2199ac1d519cSBjoern A. Zeeb     dev_info_once(&(wiphy)->dev, fmt, ##__VA_ARGS__)
2200b0f73768SBjoern A. Zeeb 
22016b4cac81SBjoern A. Zeeb #ifndef LINUXKPI_NET80211
22026b4cac81SBjoern A. Zeeb #define	ieee80211_channel		linuxkpi_ieee80211_channel
22036b4cac81SBjoern A. Zeeb #define	ieee80211_regdomain		linuxkpi_ieee80211_regdomain
22046b4cac81SBjoern A. Zeeb #endif
22056b4cac81SBjoern A. Zeeb 
2206800aa9cdSBjoern A. Zeeb #include <net/mac80211.h>
2207800aa9cdSBjoern A. Zeeb 
22086b4cac81SBjoern A. Zeeb #endif	/* _LINUXKPI_NET_CFG80211_H */
2209