xref: /freebsd/sys/compat/linuxkpi/common/include/net/cfg80211.h (revision 51b461b3db33b7cd7cbc62c9206568321f7298ad)
16b4cac81SBjoern A. Zeeb /*-
26b4cac81SBjoern A. Zeeb  * Copyright (c) 2020-2021 The FreeBSD Foundation
3*51b461b3SBjoern 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  * $FreeBSD$
306b4cac81SBjoern A. Zeeb  */
316b4cac81SBjoern A. Zeeb 
326b4cac81SBjoern A. Zeeb #ifndef	_LINUXKPI_NET_CFG80211_H
336b4cac81SBjoern A. Zeeb #define	_LINUXKPI_NET_CFG80211_H
346b4cac81SBjoern A. Zeeb 
356b4cac81SBjoern A. Zeeb #include <linux/types.h>
366b4cac81SBjoern A. Zeeb #include <linux/nl80211.h>
376b4cac81SBjoern A. Zeeb #include <linux/ieee80211.h>
386b4cac81SBjoern A. Zeeb #include <linux/if_ether.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>
436b4cac81SBjoern A. Zeeb 
446b4cac81SBjoern A. Zeeb /* linux_80211.c */
456b4cac81SBjoern A. Zeeb extern int debug_80211;
466b4cac81SBjoern A. Zeeb #ifndef	D80211_TODO
476b4cac81SBjoern A. Zeeb #define	D80211_TODO		0x1
486b4cac81SBjoern A. Zeeb #endif
496b4cac81SBjoern A. Zeeb #ifndef	D80211_IMPROVE
506b4cac81SBjoern A. Zeeb #define	D80211_IMPROVE		0x2
516b4cac81SBjoern A. Zeeb #endif
526b4cac81SBjoern A. Zeeb #define	TODO()		if (debug_80211 & D80211_TODO)			\
536b4cac81SBjoern A. Zeeb     printf("%s:%d: XXX LKPI80211 TODO\n", __func__, __LINE__)
546b4cac81SBjoern A. Zeeb #define	IMPROVE(...)	if (debug_80211 & D80211_IMPROVE)		\
556b4cac81SBjoern A. Zeeb     printf("%s:%d: XXX LKPI80211 IMPROVE\n", __func__, __LINE__)
566b4cac81SBjoern A. Zeeb 
576b4cac81SBjoern A. Zeeb #define	WIPHY_PARAM_FRAG_THRESHOLD			__LINE__ /* TODO FIXME brcmfmac */
586b4cac81SBjoern A. Zeeb #define	WIPHY_PARAM_RETRY_LONG				__LINE__ /* TODO FIXME brcmfmac */
596b4cac81SBjoern A. Zeeb #define	WIPHY_PARAM_RETRY_SHORT				__LINE__ /* TODO FIXME brcmfmac */
606b4cac81SBjoern A. Zeeb #define	WIPHY_PARAM_RTS_THRESHOLD			__LINE__ /* TODO FIXME brcmfmac */
616b4cac81SBjoern A. Zeeb 
626b4cac81SBjoern A. Zeeb #define	CFG80211_SIGNAL_TYPE_MBM			__LINE__ /* TODO FIXME brcmfmac */
636b4cac81SBjoern A. Zeeb 
646b4cac81SBjoern A. Zeeb #define	UPDATE_ASSOC_IES	1
656b4cac81SBjoern A. Zeeb 
666b4cac81SBjoern A. Zeeb #define	IEEE80211_MAX_CHAINS	4		/* net80211: IEEE80211_MAX_CHAINS copied */
676b4cac81SBjoern A. Zeeb 
686b4cac81SBjoern A. Zeeb enum cfg80211_rate_info_flags {
696b4cac81SBjoern A. Zeeb 	RATE_INFO_FLAGS_SHORT_GI	= BIT(0),
706b4cac81SBjoern A. Zeeb 	RATE_INFO_FLAGS_MCS		= BIT(1),
716b4cac81SBjoern A. Zeeb 	RATE_INFO_FLAGS_VHT_MCS		= BIT(2),
726b4cac81SBjoern A. Zeeb 	RATE_INFO_FLAGS_HE_MCS		= BIT(3),
736b4cac81SBjoern A. Zeeb };
746b4cac81SBjoern A. Zeeb 
756b4cac81SBjoern A. Zeeb extern const uint8_t rfc1042_header[6];
766b4cac81SBjoern A. Zeeb 
776b4cac81SBjoern A. Zeeb enum cfg80211_bss_ftypes {
786b4cac81SBjoern A. Zeeb 	CFG80211_BSS_FTYPE_UNKNOWN,
796b4cac81SBjoern A. Zeeb };
806b4cac81SBjoern A. Zeeb 
816b4cac81SBjoern A. Zeeb enum ieee80211_channel_flags {
826b4cac81SBjoern A. Zeeb 	IEEE80211_CHAN_DISABLED			= 1,
836b4cac81SBjoern A. Zeeb 	IEEE80211_CHAN_INDOOR_ONLY,
846b4cac81SBjoern A. Zeeb 	IEEE80211_CHAN_IR_CONCURRENT,
856b4cac81SBjoern A. Zeeb 	IEEE80211_CHAN_RADAR,
866b4cac81SBjoern A. Zeeb 	IEEE80211_CHAN_NO_IR,
876b4cac81SBjoern A. Zeeb 	IEEE80211_CHAN_NO_HT40MINUS,
886b4cac81SBjoern A. Zeeb 	IEEE80211_CHAN_NO_HT40PLUS,
896b4cac81SBjoern A. Zeeb 	IEEE80211_CHAN_NO_80MHZ,
906b4cac81SBjoern A. Zeeb 	IEEE80211_CHAN_NO_160MHZ,
916b4cac81SBjoern A. Zeeb };
926b4cac81SBjoern A. Zeeb #define	IEEE80211_CHAN_NO_HT40	(IEEE80211_CHAN_NO_HT40MINUS|IEEE80211_CHAN_NO_HT40PLUS)
936b4cac81SBjoern A. Zeeb 
946b4cac81SBjoern A. Zeeb struct ieee80211_txrx_stypes {
956b4cac81SBjoern A. Zeeb 	uint16_t	tx;
966b4cac81SBjoern A. Zeeb 	uint16_t	rx;
976b4cac81SBjoern A. Zeeb };
986b4cac81SBjoern A. Zeeb 
996b4cac81SBjoern A. Zeeb /* XXX net80211 has an ieee80211_channel as well. */
1006b4cac81SBjoern A. Zeeb struct linuxkpi_ieee80211_channel {
1016b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
1026b4cac81SBjoern A. Zeeb 	uint32_t				hw_value;	/* ic_ieee */
1036b4cac81SBjoern A. Zeeb 	uint32_t				center_freq;	/* ic_freq */
1046b4cac81SBjoern A. Zeeb 	enum ieee80211_channel_flags		flags;		/* ic_flags */
1056b4cac81SBjoern A. Zeeb 	enum nl80211_band			band;
1066b4cac81SBjoern A. Zeeb 	int8_t					max_power;	/* ic_maxpower */
1076b4cac81SBjoern A. Zeeb 	bool					beacon_found;
1086b4cac81SBjoern A. Zeeb 	int     max_antenna_gain, max_reg_power;
1096b4cac81SBjoern A. Zeeb 	int     orig_flags;
1106b4cac81SBjoern A. Zeeb };
1116b4cac81SBjoern A. Zeeb 
1126b4cac81SBjoern A. Zeeb enum ieee80211_vht_mcs_support {
1136b4cac81SBjoern A. Zeeb 	LKPI_IEEE80211_VHT_MCS_SUPPORT_0_7,
1146b4cac81SBjoern A. Zeeb 	LKPI_IEEE80211_VHT_MCS_SUPPORT_0_8,
1156b4cac81SBjoern A. Zeeb 	LKPI_IEEE80211_VHT_MCS_SUPPORT_0_9,
1166b4cac81SBjoern A. Zeeb };
1176b4cac81SBjoern A. Zeeb 
1186b4cac81SBjoern A. Zeeb struct cfg80211_bitrate_mask {
1196b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
1206b4cac81SBjoern A. Zeeb 	/* This is so weird but nothing else works out...*/
1216b4cac81SBjoern A. Zeeb 	struct {
1226b4cac81SBjoern A. Zeeb 		uint64_t	legacy;		/* XXX? */
1236b4cac81SBjoern A. Zeeb 		uint8_t		ht_mcs[16];	/* XXX? */
1246b4cac81SBjoern A. Zeeb 		uint16_t	vht_mcs[16];	/* XXX? */
125*51b461b3SBjoern A. Zeeb 		uint16_t	he_mcs[16];	/* XXX? */
1266b4cac81SBjoern A. Zeeb 		uint8_t		gi;		/* NL80211_TXRATE_FORCE_LGI enum? */
1276b4cac81SBjoern A. Zeeb 	} control[NUM_NL80211_BANDS];
1286b4cac81SBjoern A. Zeeb };
1296b4cac81SBjoern A. Zeeb 
1306b4cac81SBjoern A. Zeeb struct rate_info {
1316b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
1326b4cac81SBjoern A. Zeeb 	int	bw, flags, he_dcm, he_gi, he_ru_alloc, legacy, mcs, nss;
1336b4cac81SBjoern A. Zeeb };
1346b4cac81SBjoern A. Zeeb 
1356b4cac81SBjoern A. Zeeb struct ieee80211_rate {
1366b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
1376b4cac81SBjoern A. Zeeb 	uint32_t		bitrate;
1386b4cac81SBjoern A. Zeeb 	uint32_t		hw_value;
1396b4cac81SBjoern A. Zeeb 	uint32_t		hw_value_short;
1406b4cac81SBjoern A. Zeeb 	uint32_t		flags;
1416b4cac81SBjoern A. Zeeb };
1426b4cac81SBjoern A. Zeeb 
1436b4cac81SBjoern A. Zeeb /* XXX net80211 calls these IEEE80211_HTCAP_* */
1446b4cac81SBjoern A. Zeeb #define	IEEE80211_HT_CAP_LDPC_CODING		0x0001	/* IEEE80211_HTCAP_LDPC */
1456b4cac81SBjoern A. Zeeb #define	IEEE80211_HT_CAP_SUP_WIDTH_20_40	0x0002	/* IEEE80211_HTCAP_CHWIDTH40 */
1466b4cac81SBjoern A. Zeeb #define	IEEE80211_HT_CAP_GRN_FLD		0x0010	/* IEEE80211_HTCAP_GREENFIELD */
1476b4cac81SBjoern A. Zeeb #define	IEEE80211_HT_CAP_SGI_20			0x0020	/* IEEE80211_HTCAP_SHORTGI20 */
1486b4cac81SBjoern A. Zeeb #define	IEEE80211_HT_CAP_SGI_40			0x0040	/* IEEE80211_HTCAP_SHORTGI40 */
1496b4cac81SBjoern A. Zeeb #define	IEEE80211_HT_CAP_TX_STBC		0x0080	/* IEEE80211_HTCAP_TXSTBC */
1506b4cac81SBjoern A. Zeeb #define	IEEE80211_HT_CAP_RX_STBC		0x0100	/* IEEE80211_HTCAP_RXSTBC */
1516b4cac81SBjoern A. Zeeb #define	IEEE80211_HT_CAP_RX_STBC_SHIFT		8	/* IEEE80211_HTCAP_RXSTBC_S */
1526b4cac81SBjoern A. Zeeb #define	IEEE80211_HT_CAP_MAX_AMSDU		0x0800	/* IEEE80211_HTCAP_MAXAMSDU */
1536b4cac81SBjoern A. Zeeb #define	IEEE80211_HT_CAP_DSSSCCK40		0x1000	/* IEEE80211_HTCAP_DSSSCCK40 */
1546b4cac81SBjoern A. Zeeb 
1556b4cac81SBjoern A. Zeeb #define	IEEE80211_HT_MCS_TX_DEFINED		0x0001
1566b4cac81SBjoern A. Zeeb #define	IEEE80211_HT_MCS_TX_RX_DIFF		0x0002
1576b4cac81SBjoern A. Zeeb #define	IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT	2
1586b4cac81SBjoern A. Zeeb #define	IEEE80211_HT_MCS_RX_HIGHEST_MASK	0x3FF
1596b4cac81SBjoern A. Zeeb 
1606b4cac81SBjoern A. Zeeb struct ieee80211_sta_ht_cap {
1616b4cac81SBjoern A. Zeeb 		/* TODO FIXME */
1626b4cac81SBjoern A. Zeeb 	int	ampdu_density, ampdu_factor;
1636b4cac81SBjoern A. Zeeb 	bool		ht_supported;
1646b4cac81SBjoern A. Zeeb 	uint16_t	cap;
1656b4cac81SBjoern A. Zeeb 	struct mcs {
1666b4cac81SBjoern A. Zeeb 		uint16_t	rx_mask[16];	/* XXX ? > 4 (rtw88) */
1676b4cac81SBjoern A. Zeeb 		int		rx_highest;
1686b4cac81SBjoern A. Zeeb 		uint32_t	tx_params;
1696b4cac81SBjoern A. Zeeb 	} mcs;
1706b4cac81SBjoern A. Zeeb };
1716b4cac81SBjoern A. Zeeb 
1726b4cac81SBjoern A. Zeeb /* XXX net80211 calls these IEEE80211_VHTCAP_* */
1736b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895	0x00000000	/* IEEE80211_VHTCAP_MAX_MPDU_LENGTH_3895 */
1746b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991	0x00000001	/* IEEE80211_VHTCAP_MAX_MPDU_LENGTH_7991 */
1756b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454	0x00000002	/* IEEE80211_VHTCAP_MAX_MPDU_LENGTH_11454 */
1766b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_MAX_MPDU_MASK		0x00000003	/* IEEE80211_VHTCAP_MAX_MPDU_MASK */
1776b4cac81SBjoern A. Zeeb 
1786b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ	(IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_160MHZ << IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_MASK_S)
1796b4cac81SBjoern A. Zeeb 
1806b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_RXLDPC		0x00000010	/* IEEE80211_VHTCAP_RXLDPC */
1816b4cac81SBjoern A. Zeeb 
1826b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_SHORT_GI_80		0x00000020	/* IEEE80211_VHTCAP_SHORT_GI_80 */
1836b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_SHORT_GI_160		0x00000040	/* IEEE80211_VHTCAP_SHORT_GI_160 */
1846b4cac81SBjoern A. Zeeb 
1856b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_TXSTBC		0x00000080	/* IEEE80211_VHTCAP_TXSTBC */
1866b4cac81SBjoern A. Zeeb 
1876b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_RXSTBC_1		0x00000100	/* IEEE80211_VHTCAP_RXSTBC_1 */
1886b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_RXSTBC_MASK		0x00000700	/* IEEE80211_VHTCAP_RXSTBC_MASK */
1896b4cac81SBjoern A. Zeeb 
1906b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE	0x00000800	/* IEEE80211_VHTCAP_SU_BEAMFORMER_CAPABLE */
1916b4cac81SBjoern A. Zeeb 
1926b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE	0x00001000	/* IEEE80211_VHTCAP_SU_BEAMFORMEE_CAPABLE */
1936b4cac81SBjoern A. Zeeb 
1946b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE	0x00080000	/* IEEE80211_VHTCAP_MU_BEAMFORMER_CAPABLE */
1956b4cac81SBjoern A. Zeeb 
1966b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE	0x00100000	/* IEEE80211_VHTCAP_MU_BEAMFORMEE_CAPABLE */
1976b4cac81SBjoern A. Zeeb 
1986b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT		13	/* IEEE80211_VHTCAP_BEAMFORMEE_STS_SHIFT */
1996b4cac81SBjoern A. Zeeb 
2006b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_HTC_VHT		0x00400000	/* IEEE80211_VHTCAP_HTC_VHT */
2016b4cac81SBjoern A. Zeeb 
2026b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN	0x10000000	/* IEEE80211_VHTCAP_RX_ANTENNA_PATTERN */
2036b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN	0x20000000	/* IEEE80211_VHTCAP_TX_ANTENNA_PATTERN */
2046b4cac81SBjoern A. Zeeb 
2056b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB	0x0c000000	/* IEEE80211_VHTCAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB */
2066b4cac81SBjoern A. Zeeb 
2076b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_SHIFT	16	/* IEEE80211_VHTCAP_SOUNDING_DIMENSIONS_SHIFT */
2086b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK		\
2096b4cac81SBjoern A. Zeeb 	(7 << IEEE80211_VHTCAP_SOUNDING_DIMENSIONS_SHIFT)	/* IEEE80211_VHTCAP_SOUNDING_DIMENSIONS_MASK */
2106b4cac81SBjoern A. Zeeb 
2116b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT	23	/* IEEE80211_VHTCAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT */
2126b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK	\
2136b4cac81SBjoern A. Zeeb 	(7 << IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT)	/* IEEE80211_VHTCAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK */
2146b4cac81SBjoern A. Zeeb 
2156b4cac81SBjoern A. Zeeb struct ieee80211_sta_vht_cap {
2166b4cac81SBjoern A. Zeeb 		/* TODO FIXME */
2176b4cac81SBjoern A. Zeeb 	bool			vht_supported;
2186b4cac81SBjoern A. Zeeb 	uint32_t		cap;
2196b4cac81SBjoern A. Zeeb 	struct vht_mcs		vht_mcs;
2206b4cac81SBjoern A. Zeeb };
2216b4cac81SBjoern A. Zeeb 
2226b4cac81SBjoern A. Zeeb struct cfg80211_connect_resp_params {
2236b4cac81SBjoern A. Zeeb 		/* XXX TODO */
2246b4cac81SBjoern A. Zeeb 	uint8_t				*bssid;
2256b4cac81SBjoern A. Zeeb 	const uint8_t			*req_ie;
2266b4cac81SBjoern A. Zeeb 	const uint8_t			*resp_ie;
2276b4cac81SBjoern A. Zeeb 	uint32_t			req_ie_len;
2286b4cac81SBjoern A. Zeeb 	uint32_t			resp_ie_len;
2296b4cac81SBjoern A. Zeeb 	int	status;
2306b4cac81SBjoern A. Zeeb };
2316b4cac81SBjoern A. Zeeb 
2326b4cac81SBjoern A. Zeeb struct cfg80211_inform_bss {
2336b4cac81SBjoern A. Zeeb 		/* XXX TODO */
2346b4cac81SBjoern A. Zeeb 	int     boottime_ns, scan_width, signal;
2356b4cac81SBjoern A. Zeeb 	struct linuxkpi_ieee80211_channel	*chan;
2366b4cac81SBjoern A. Zeeb };
2376b4cac81SBjoern A. Zeeb 
2386b4cac81SBjoern A. Zeeb struct cfg80211_roam_info {
2396b4cac81SBjoern A. Zeeb 		/* XXX TODO */
2406b4cac81SBjoern A. Zeeb 	uint8_t				*bssid;
2416b4cac81SBjoern A. Zeeb 	const uint8_t			*req_ie;
2426b4cac81SBjoern A. Zeeb 	const uint8_t			*resp_ie;
2436b4cac81SBjoern A. Zeeb 	uint32_t			req_ie_len;
2446b4cac81SBjoern A. Zeeb 	uint32_t			resp_ie_len;
2456b4cac81SBjoern A. Zeeb 	struct linuxkpi_ieee80211_channel	*channel;
2466b4cac81SBjoern A. Zeeb };
2476b4cac81SBjoern A. Zeeb 
2486b4cac81SBjoern A. Zeeb struct cfg80211_bss_ies {
2496b4cac81SBjoern A. Zeeb 		/* XXX TODO, type is best guess. Fix if more info. */
2506b4cac81SBjoern A. Zeeb 	uint8_t				*data;
2516b4cac81SBjoern A. Zeeb 	int				len;
2526b4cac81SBjoern A. Zeeb };
2536b4cac81SBjoern A. Zeeb 
2546b4cac81SBjoern A. Zeeb struct cfg80211_bss {
2556b4cac81SBjoern A. Zeeb 		/* XXX TODO */
2566b4cac81SBjoern A. Zeeb 	struct cfg80211_bss_ies		*ies;
2576b4cac81SBjoern A. Zeeb };
2586b4cac81SBjoern A. Zeeb 
2596b4cac81SBjoern A. Zeeb struct cfg80211_chan_def {
2606b4cac81SBjoern A. Zeeb 		/* XXX TODO */
2616b4cac81SBjoern A. Zeeb 	struct linuxkpi_ieee80211_channel	*chan;
2626b4cac81SBjoern A. Zeeb 	enum nl80211_chan_width		width;
2636b4cac81SBjoern A. Zeeb 	uint32_t			center_freq1;
2646b4cac81SBjoern A. Zeeb 	uint32_t			center_freq2;
2656b4cac81SBjoern A. Zeeb };
2666b4cac81SBjoern A. Zeeb 
2676b4cac81SBjoern A. Zeeb struct cfg80211_ftm_responder_stats {
2686b4cac81SBjoern A. Zeeb 		/* XXX TODO */
2696b4cac81SBjoern 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;
2706b4cac81SBjoern A. Zeeb };
2716b4cac81SBjoern A. Zeeb 
2726b4cac81SBjoern A. Zeeb struct cfg80211_pmsr_capabilities {
2736b4cac81SBjoern A. Zeeb 		/* XXX TODO */
2746b4cac81SBjoern A. Zeeb 	int	max_peers, randomize_mac_addr, report_ap_tsf;
2756b4cac81SBjoern A. Zeeb 	struct {
2766b4cac81SBjoern 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;
2776b4cac81SBjoern A. Zeeb 	} ftm;
2786b4cac81SBjoern A. Zeeb };
2796b4cac81SBjoern A. Zeeb 
2806b4cac81SBjoern A. Zeeb struct cfg80211_pmsr_ftm_request {
2816b4cac81SBjoern A. Zeeb 		/* XXX TODO */
2826b4cac81SBjoern A. Zeeb 	int     asap, burst_period, ftmr_retries, ftms_per_burst, non_trigger_based, num_bursts_exp, request_civicloc, request_lci, trigger_based;
2836b4cac81SBjoern A. Zeeb 	uint8_t					bss_color;
2846b4cac81SBjoern A. Zeeb 	bool					lmr_feedback;
2856b4cac81SBjoern A. Zeeb };
2866b4cac81SBjoern A. Zeeb 
2876b4cac81SBjoern A. Zeeb struct cfg80211_pmsr_request_peer {
2886b4cac81SBjoern A. Zeeb 		/* XXX TODO */
2896b4cac81SBjoern A. Zeeb 	struct cfg80211_chan_def		chandef;
2906b4cac81SBjoern A. Zeeb 	struct cfg80211_pmsr_ftm_request	ftm;
2916b4cac81SBjoern A. Zeeb 	uint8_t					addr[ETH_ALEN];
2926b4cac81SBjoern A. Zeeb 	int	report_ap_tsf;
2936b4cac81SBjoern A. Zeeb };
2946b4cac81SBjoern A. Zeeb 
2956b4cac81SBjoern A. Zeeb struct cfg80211_pmsr_request {
2966b4cac81SBjoern A. Zeeb 		/* XXX TODO */
2976b4cac81SBjoern A. Zeeb 	int	cookie, n_peers, timeout;
2986b4cac81SBjoern A. Zeeb 	uint8_t					mac_addr[ETH_ALEN], mac_addr_mask[ETH_ALEN];
2996b4cac81SBjoern A. Zeeb 	struct cfg80211_pmsr_request_peer	peers[];
3006b4cac81SBjoern A. Zeeb };
3016b4cac81SBjoern A. Zeeb 
3026b4cac81SBjoern A. Zeeb struct cfg80211_pmsr_ftm_result {
3036b4cac81SBjoern A. Zeeb 		/* XXX TODO */
3046b4cac81SBjoern A. Zeeb 	int	burst_index, busy_retry_time, failure_reason;
3056b4cac81SBjoern 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;
3066b4cac81SBjoern A. Zeeb 	uint8_t					*lci;
3076b4cac81SBjoern A. Zeeb 	uint8_t					*civicloc;
3086b4cac81SBjoern A. Zeeb 	int					lci_len;
3096b4cac81SBjoern A. Zeeb 	int					civicloc_len;
3106b4cac81SBjoern A. Zeeb };
3116b4cac81SBjoern A. Zeeb 
3126b4cac81SBjoern A. Zeeb struct cfg80211_pmsr_result {
3136b4cac81SBjoern A. Zeeb 		/* XXX TODO */
3146b4cac81SBjoern A. Zeeb 	int	ap_tsf, ap_tsf_valid, final, host_time, status, type;
3156b4cac81SBjoern A. Zeeb 	uint8_t					addr[ETH_ALEN];
3166b4cac81SBjoern A. Zeeb 	struct cfg80211_pmsr_ftm_result		ftm;
3176b4cac81SBjoern A. Zeeb };
3186b4cac81SBjoern A. Zeeb 
319*51b461b3SBjoern A. Zeeb struct cfg80211_sar_freq_ranges {
320*51b461b3SBjoern A. Zeeb 	uint32_t				start_freq;
321*51b461b3SBjoern A. Zeeb 	uint32_t				end_freq;
322*51b461b3SBjoern A. Zeeb };
323*51b461b3SBjoern A. Zeeb 
324*51b461b3SBjoern A. Zeeb struct cfg80211_sar_sub_specs {
325*51b461b3SBjoern A. Zeeb 	uint32_t				freq_range_index;
326*51b461b3SBjoern A. Zeeb 	int					power;
327*51b461b3SBjoern A. Zeeb };
328*51b461b3SBjoern A. Zeeb 
329*51b461b3SBjoern A. Zeeb struct cfg80211_sar_specs {
330*51b461b3SBjoern A. Zeeb 	enum nl80211_sar_type			type;
331*51b461b3SBjoern A. Zeeb 	uint32_t				num_sub_specs;
332*51b461b3SBjoern A. Zeeb 	struct cfg80211_sar_sub_specs		sub_specs[];
333*51b461b3SBjoern A. Zeeb };
334*51b461b3SBjoern A. Zeeb 
335*51b461b3SBjoern A. Zeeb struct cfg80211_sar_capa {
336*51b461b3SBjoern A. Zeeb 	enum nl80211_sar_type			type;
337*51b461b3SBjoern A. Zeeb 	uint32_t				num_freq_ranges;
338*51b461b3SBjoern A. Zeeb 	const struct cfg80211_sar_freq_ranges	*freq_ranges;
339*51b461b3SBjoern A. Zeeb };
340*51b461b3SBjoern A. Zeeb 
3416b4cac81SBjoern A. Zeeb struct cfg80211_ssid {
3426b4cac81SBjoern A. Zeeb 	int	ssid_len;
3436b4cac81SBjoern A. Zeeb 	uint8_t	ssid[IEEE80211_MAX_SSID_LEN];
3446b4cac81SBjoern A. Zeeb };
3456b4cac81SBjoern A. Zeeb 
3466b4cac81SBjoern A. Zeeb struct cfg80211_scan_6ghz_params {
3476b4cac81SBjoern A. Zeeb 	/* XXX TODO */
3486b4cac81SBjoern A. Zeeb 	uint8_t				*bssid;
3496b4cac81SBjoern A. Zeeb 	int	channel_idx, psc_no_listen, short_ssid, short_ssid_valid, unsolicited_probe;
3506b4cac81SBjoern A. Zeeb };
3516b4cac81SBjoern A. Zeeb 
3526b4cac81SBjoern A. Zeeb struct cfg80211_match_set {
3536b4cac81SBjoern A. Zeeb 	uint8_t					bssid[ETH_ALEN];
3546b4cac81SBjoern A. Zeeb 	struct cfg80211_ssid	ssid;
3556b4cac81SBjoern A. Zeeb 	int			rssi_thold;
3566b4cac81SBjoern A. Zeeb };
3576b4cac81SBjoern A. Zeeb 
3586b4cac81SBjoern A. Zeeb struct cfg80211_scan_request {
3596b4cac81SBjoern A. Zeeb 		/* XXX TODO */
3606b4cac81SBjoern A. Zeeb 	int	duration, duration_mandatory, flags;
3616b4cac81SBjoern A. Zeeb 	bool					no_cck;
3626b4cac81SBjoern A. Zeeb 	bool					scan_6ghz;
3636b4cac81SBjoern A. Zeeb 	struct wireless_dev			*wdev;
3646b4cac81SBjoern A. Zeeb 	struct wiphy				*wiphy;
3656b4cac81SBjoern A. Zeeb 	int					ie_len;
3666b4cac81SBjoern A. Zeeb 	uint8_t					*ie;
3676b4cac81SBjoern A. Zeeb 	uint8_t					mac_addr[ETH_ALEN], mac_addr_mask[ETH_ALEN];
3686b4cac81SBjoern A. Zeeb 	int					n_ssids;
3696b4cac81SBjoern A. Zeeb 	int					n_6ghz_params;
3706b4cac81SBjoern A. Zeeb 	int					n_channels;
3716b4cac81SBjoern A. Zeeb 	struct cfg80211_ssid			*ssids;
3726b4cac81SBjoern A. Zeeb 	struct cfg80211_scan_6ghz_params 	*scan_6ghz_params;
3736b4cac81SBjoern A. Zeeb 	struct linuxkpi_ieee80211_channel	*channels[0];
3746b4cac81SBjoern A. Zeeb };
3756b4cac81SBjoern A. Zeeb 
3766b4cac81SBjoern A. Zeeb struct cfg80211_sched_scan_plan {
3776b4cac81SBjoern A. Zeeb 		/* XXX TODO */
3786b4cac81SBjoern A. Zeeb 	int	interval, iterations;
3796b4cac81SBjoern A. Zeeb };
3806b4cac81SBjoern A. Zeeb 
3816b4cac81SBjoern A. Zeeb struct cfg80211_sched_scan_request {
3826b4cac81SBjoern A. Zeeb 		/* XXX TODO */
3836b4cac81SBjoern A. Zeeb 	int	delay, flags;
3846b4cac81SBjoern A. Zeeb 	uint8_t					mac_addr[ETH_ALEN], mac_addr_mask[ETH_ALEN];
3856b4cac81SBjoern A. Zeeb 	uint64_t				reqid;
3866b4cac81SBjoern A. Zeeb 	int					n_match_sets;
3876b4cac81SBjoern A. Zeeb 	int					n_scan_plans;
3886b4cac81SBjoern A. Zeeb 	int					n_ssids;
3896b4cac81SBjoern A. Zeeb 	int					n_channels;
3906b4cac81SBjoern A. Zeeb 	struct cfg80211_match_set		*match_sets;
3916b4cac81SBjoern A. Zeeb 	struct cfg80211_sched_scan_plan		*scan_plans;
3926b4cac81SBjoern A. Zeeb 	struct cfg80211_ssid			*ssids;
3936b4cac81SBjoern A. Zeeb 	struct linuxkpi_ieee80211_channel	*channels[0];
3946b4cac81SBjoern A. Zeeb };
3956b4cac81SBjoern A. Zeeb 
3966b4cac81SBjoern A. Zeeb struct cfg80211_scan_info {
3976b4cac81SBjoern A. Zeeb 	uint64_t				scan_start_tsf;
3986b4cac81SBjoern A. Zeeb 	uint8_t					tsf_bssid[ETH_ALEN];
3996b4cac81SBjoern A. Zeeb 	bool					aborted;
4006b4cac81SBjoern A. Zeeb };
4016b4cac81SBjoern A. Zeeb 
4026b4cac81SBjoern A. Zeeb struct cfg80211_beacon_data {
4036b4cac81SBjoern A. Zeeb 	/* XXX TODO */
4046b4cac81SBjoern A. Zeeb 	const uint8_t				*head;
4056b4cac81SBjoern A. Zeeb 	const uint8_t				*tail;
4066b4cac81SBjoern A. Zeeb 	uint32_t				head_len;
4076b4cac81SBjoern A. Zeeb 	uint32_t				tail_len;
4086b4cac81SBjoern A. Zeeb 	const uint8_t				*proberesp_ies;
4096b4cac81SBjoern A. Zeeb 	const uint8_t				*assocresp_ies;
4106b4cac81SBjoern A. Zeeb 	uint32_t				proberesp_ies_len;
4116b4cac81SBjoern A. Zeeb 	uint32_t				assocresp_ies_len;
4126b4cac81SBjoern A. Zeeb };
4136b4cac81SBjoern A. Zeeb 
4146b4cac81SBjoern A. Zeeb struct cfg80211_ap_settings {
4156b4cac81SBjoern A. Zeeb 	/* XXX TODO */
4166b4cac81SBjoern A. Zeeb 	int     auth_type, beacon_interval, dtim_period, hidden_ssid, inactivity_timeout;
4176b4cac81SBjoern A. Zeeb 	const uint8_t				*ssid;
4186b4cac81SBjoern A. Zeeb 	size_t					ssid_len;
4196b4cac81SBjoern A. Zeeb 	struct cfg80211_beacon_data		beacon;
4206b4cac81SBjoern A. Zeeb 	struct cfg80211_chan_def		chandef;
4216b4cac81SBjoern A. Zeeb };
4226b4cac81SBjoern A. Zeeb 
4236b4cac81SBjoern A. Zeeb struct cfg80211_bss_selection {
4246b4cac81SBjoern A. Zeeb 	/* XXX TODO */
4256b4cac81SBjoern A. Zeeb 	enum nl80211_bss_select_attr		behaviour;
4266b4cac81SBjoern A. Zeeb 	union {
4276b4cac81SBjoern A. Zeeb 		enum nl80211_band		band_pref;
4286b4cac81SBjoern A. Zeeb 		struct {
4296b4cac81SBjoern A. Zeeb 			enum nl80211_band	band;
4306b4cac81SBjoern A. Zeeb 			uint8_t			delta;
4316b4cac81SBjoern A. Zeeb 		} adjust;
4326b4cac81SBjoern A. Zeeb 	} param;
4336b4cac81SBjoern A. Zeeb };
4346b4cac81SBjoern A. Zeeb 
4356b4cac81SBjoern A. Zeeb struct cfg80211_crypto {		/* XXX made up name */
4366b4cac81SBjoern A. Zeeb 	/* XXX TODO */
4376b4cac81SBjoern A. Zeeb 	enum nl80211_wpa_versions		wpa_versions;
4386b4cac81SBjoern A. Zeeb 	uint32_t				cipher_group;	/* WLAN_CIPHER_SUITE_* */
4396b4cac81SBjoern A. Zeeb 	uint32_t				*akm_suites;
4406b4cac81SBjoern A. Zeeb 	uint32_t				*ciphers_pairwise;
4416b4cac81SBjoern A. Zeeb 	const uint8_t				*sae_pwd;
4426b4cac81SBjoern A. Zeeb 	const uint8_t				*psk;
4436b4cac81SBjoern A. Zeeb 	int					n_akm_suites;
4446b4cac81SBjoern A. Zeeb 	int					n_ciphers_pairwise;
4456b4cac81SBjoern A. Zeeb 	int					sae_pwd_len;
4466b4cac81SBjoern A. Zeeb };
4476b4cac81SBjoern A. Zeeb 
4486b4cac81SBjoern A. Zeeb struct cfg80211_connect_params {
4496b4cac81SBjoern A. Zeeb 	/* XXX TODO */
4506b4cac81SBjoern A. Zeeb 	struct linuxkpi_ieee80211_channel	*channel;
4516b4cac81SBjoern A. Zeeb 	uint8_t					*bssid;
4526b4cac81SBjoern A. Zeeb 	const uint8_t				*ie;
4536b4cac81SBjoern A. Zeeb 	const uint8_t				*ssid;
4546b4cac81SBjoern A. Zeeb 	uint32_t				ie_len;
4556b4cac81SBjoern A. Zeeb 	uint32_t				ssid_len;
4566b4cac81SBjoern A. Zeeb 	const void				*key;
4576b4cac81SBjoern A. Zeeb 	uint32_t				key_len;
4586b4cac81SBjoern A. Zeeb 	int     auth_type, key_idx, privacy, want_1x;
4596b4cac81SBjoern A. Zeeb 	struct cfg80211_bss_selection		bss_select;
4606b4cac81SBjoern A. Zeeb 	struct cfg80211_crypto			crypto;
4616b4cac81SBjoern A. Zeeb };
4626b4cac81SBjoern A. Zeeb 
4636b4cac81SBjoern A. Zeeb enum bss_param_flags {		/* Used as bitflags. XXX FIXME values? */
4646b4cac81SBjoern A. Zeeb 	BSS_PARAM_FLAGS_CTS_PROT	= 0x01,
4656b4cac81SBjoern A. Zeeb 	BSS_PARAM_FLAGS_SHORT_PREAMBLE	= 0x02,
4666b4cac81SBjoern A. Zeeb 	BSS_PARAM_FLAGS_SHORT_SLOT_TIME = 0x04,
4676b4cac81SBjoern A. Zeeb };
4686b4cac81SBjoern A. Zeeb 
4696b4cac81SBjoern A. Zeeb struct cfg80211_ibss_params {
4706b4cac81SBjoern A. Zeeb 	/* XXX TODO */
4716b4cac81SBjoern A. Zeeb 	int     basic_rates, beacon_interval;
4726b4cac81SBjoern A. Zeeb 	int	channel_fixed, ie, ie_len, privacy;
4736b4cac81SBjoern A. Zeeb 	int	dtim_period;
4746b4cac81SBjoern A. Zeeb 	uint8_t					*ssid;
4756b4cac81SBjoern A. Zeeb 	uint8_t					*bssid;
4766b4cac81SBjoern A. Zeeb 	int					ssid_len;
4776b4cac81SBjoern A. Zeeb 	struct cfg80211_chan_def		chandef;
4786b4cac81SBjoern A. Zeeb 	enum bss_param_flags			flags;
4796b4cac81SBjoern A. Zeeb };
4806b4cac81SBjoern A. Zeeb 
4816b4cac81SBjoern A. Zeeb struct cfg80211_mgmt_tx_params {
4826b4cac81SBjoern A. Zeeb 	/* XXX TODO */
4836b4cac81SBjoern A. Zeeb 	struct linuxkpi_ieee80211_channel	*chan;
4846b4cac81SBjoern A. Zeeb 	const uint8_t				*buf;
4856b4cac81SBjoern A. Zeeb 	size_t					len;
4866b4cac81SBjoern A. Zeeb 	int	wait;
4876b4cac81SBjoern A. Zeeb };
4886b4cac81SBjoern A. Zeeb 
4896b4cac81SBjoern A. Zeeb struct cfg80211_pmk_conf {
4906b4cac81SBjoern A. Zeeb 	/* XXX TODO */
4916b4cac81SBjoern A. Zeeb 	const uint8_t			*pmk;
4926b4cac81SBjoern A. Zeeb 	uint8_t				pmk_len;
4936b4cac81SBjoern A. Zeeb };
4946b4cac81SBjoern A. Zeeb 
4956b4cac81SBjoern A. Zeeb struct cfg80211_pmksa {
4966b4cac81SBjoern A. Zeeb 	/* XXX TODO */
4976b4cac81SBjoern A. Zeeb 	const uint8_t			*bssid;
4986b4cac81SBjoern A. Zeeb 	const uint8_t			*pmkid;
4996b4cac81SBjoern A. Zeeb };
5006b4cac81SBjoern A. Zeeb 
5016b4cac81SBjoern A. Zeeb struct cfg80211_wowlan_nd_match {
5026b4cac81SBjoern A. Zeeb 	/* XXX TODO */
5036b4cac81SBjoern A. Zeeb 	struct cfg80211_ssid		ssid;
5046b4cac81SBjoern A. Zeeb 	int				n_channels;
5056b4cac81SBjoern A. Zeeb 	uint32_t			channels[0];	/* freq! = ieee80211_channel_to_frequency() */
5066b4cac81SBjoern A. Zeeb };
5076b4cac81SBjoern A. Zeeb 
5086b4cac81SBjoern A. Zeeb struct cfg80211_wowlan_nd_info {
5096b4cac81SBjoern A. Zeeb 	/* XXX TODO */
5106b4cac81SBjoern A. Zeeb 	int				n_matches;
5116b4cac81SBjoern A. Zeeb 	struct cfg80211_wowlan_nd_match	*matches[0];
5126b4cac81SBjoern A. Zeeb };
5136b4cac81SBjoern A. Zeeb 
5146b4cac81SBjoern A. Zeeb enum wiphy_wowlan_support_flags {
5156b4cac81SBjoern A. Zeeb 	WIPHY_WOWLAN_DISCONNECT,
5166b4cac81SBjoern A. Zeeb 	WIPHY_WOWLAN_GTK_REKEY_FAILURE,
5176b4cac81SBjoern A. Zeeb 	WIPHY_WOWLAN_MAGIC_PKT,
5186b4cac81SBjoern A. Zeeb 	WIPHY_WOWLAN_SUPPORTS_GTK_REKEY,
5196b4cac81SBjoern A. Zeeb 	WIPHY_WOWLAN_NET_DETECT,
5206b4cac81SBjoern A. Zeeb };
5216b4cac81SBjoern A. Zeeb 
5226b4cac81SBjoern A. Zeeb struct wiphy_wowlan_support {
5236b4cac81SBjoern A. Zeeb 	/* XXX TODO */
5246b4cac81SBjoern A. Zeeb 	enum wiphy_wowlan_support_flags		flags;
5256b4cac81SBjoern A. Zeeb 	int	max_nd_match_sets, max_pkt_offset, n_patterns, pattern_max_len, pattern_min_len;
5266b4cac81SBjoern A. Zeeb };
5276b4cac81SBjoern A. Zeeb 
5286b4cac81SBjoern A. Zeeb struct station_del_parameters {
5296b4cac81SBjoern A. Zeeb 	/* XXX TODO */
5306b4cac81SBjoern A. Zeeb 	const uint8_t				*mac;
5316b4cac81SBjoern A. Zeeb 	uint32_t				reason_code;	/* elsewhere uint16_t? */
5326b4cac81SBjoern A. Zeeb };
5336b4cac81SBjoern A. Zeeb 
5346b4cac81SBjoern A. Zeeb struct station_info {
5356b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
5366b4cac81SBjoern A. Zeeb 	int     assoc_req_ies_len, connected_time;
5376b4cac81SBjoern A. Zeeb 	int	generation, inactive_time, rx_bytes, rx_dropped_misc, rx_packets, signal, tx_bytes, tx_packets;
5386b4cac81SBjoern A. Zeeb 	int     filled, rx_beacon, rx_beacon_signal_avg, signal_avg;
5396b4cac81SBjoern A. Zeeb 	int	rx_duration, tx_failed, tx_retries;
5406b4cac81SBjoern A. Zeeb 
5416b4cac81SBjoern A. Zeeb 	int					chains;
5426b4cac81SBjoern A. Zeeb 	uint8_t					chain_signal[IEEE80211_MAX_CHAINS];
5436b4cac81SBjoern A. Zeeb 	uint8_t					chain_signal_avg[IEEE80211_MAX_CHAINS];
5446b4cac81SBjoern A. Zeeb 
5456b4cac81SBjoern A. Zeeb 	uint8_t					*assoc_req_ies;
5466b4cac81SBjoern A. Zeeb 	struct rate_info			rxrate;
5476b4cac81SBjoern A. Zeeb 	struct rate_info			txrate;
5486b4cac81SBjoern A. Zeeb 	struct cfg80211_ibss_params		bss_param;
5496b4cac81SBjoern A. Zeeb 	struct nl80211_sta_flag_update		sta_flags;
5506b4cac81SBjoern A. Zeeb };
5516b4cac81SBjoern A. Zeeb 
5526b4cac81SBjoern A. Zeeb struct station_parameters {
5536b4cac81SBjoern A. Zeeb 	/* XXX TODO */
5546b4cac81SBjoern A. Zeeb 	int     sta_flags_mask, sta_flags_set;
5556b4cac81SBjoern A. Zeeb };
5566b4cac81SBjoern A. Zeeb 
5576b4cac81SBjoern A. Zeeb struct key_params {
5586b4cac81SBjoern A. Zeeb 	/* XXX TODO */
5596b4cac81SBjoern A. Zeeb 	const uint8_t	*key;
5606b4cac81SBjoern A. Zeeb 	const uint8_t	*seq;
5616b4cac81SBjoern A. Zeeb 	int		key_len;
5626b4cac81SBjoern A. Zeeb 	int		seq_len;
5636b4cac81SBjoern A. Zeeb 	uint32_t	cipher;			/* WLAN_CIPHER_SUITE_* */
5646b4cac81SBjoern A. Zeeb };
5656b4cac81SBjoern A. Zeeb 
5666b4cac81SBjoern A. Zeeb struct mgmt_frame_regs {
5676b4cac81SBjoern A. Zeeb 	/* XXX TODO */
5686b4cac81SBjoern A. Zeeb 	int	interface_stypes;
5696b4cac81SBjoern A. Zeeb };
5706b4cac81SBjoern A. Zeeb 
5716b4cac81SBjoern A. Zeeb struct vif_params {
5726b4cac81SBjoern A. Zeeb 	/* XXX TODO */
5736b4cac81SBjoern A. Zeeb 	uint8_t			macaddr[ETH_ALEN];
5746b4cac81SBjoern A. Zeeb };
5756b4cac81SBjoern A. Zeeb 
5766b4cac81SBjoern A. Zeeb /* That the world needs so many different structs for this is amazing. */
5776b4cac81SBjoern A. Zeeb struct mac_address {
5786b4cac81SBjoern A. Zeeb 	uint8_t	addr[ETH_ALEN];
5796b4cac81SBjoern A. Zeeb };
5806b4cac81SBjoern A. Zeeb 
5816b4cac81SBjoern A. Zeeb #define	REG_RULE(_begin, _end, _bw, _gain, _eirp, _x)			\
5826b4cac81SBjoern A. Zeeb {									\
5836b4cac81SBjoern A. Zeeb 	.freq_range.start_freq_khz = (_begin) * 1000,			\
5846b4cac81SBjoern A. Zeeb 	.freq_range.end_freq_khz = (_end) * 1000,			\
5856b4cac81SBjoern A. Zeeb 	.freq_range.max_bandwidth_khz = (_bw) * 1000,			\
5866b4cac81SBjoern A. Zeeb 	.power_rule.max_antenna_gain = DBI_TO_MBI(_gain),		\
5876b4cac81SBjoern A. Zeeb 	.power_rule.max_eirp = DBM_TO_MBM(_eirp),			\
5886b4cac81SBjoern A. Zeeb 	.flags = (_x),				/* ? */			\
5896b4cac81SBjoern A. Zeeb 	/* XXX TODO FIXME */						\
5906b4cac81SBjoern A. Zeeb }
5916b4cac81SBjoern A. Zeeb 
5926b4cac81SBjoern A. Zeeb struct ieee80211_reg_rule {
5936b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
5946b4cac81SBjoern A. Zeeb 	uint32_t	flags;
5956b4cac81SBjoern A. Zeeb 	struct freq_range {
5966b4cac81SBjoern A. Zeeb 		int	start_freq_khz;
5976b4cac81SBjoern A. Zeeb 		int	end_freq_khz;
5986b4cac81SBjoern A. Zeeb 		int	max_bandwidth_khz;
5996b4cac81SBjoern A. Zeeb 	} freq_range;
6006b4cac81SBjoern A. Zeeb 	struct power_rule {
6016b4cac81SBjoern A. Zeeb 		int	max_antenna_gain;
6026b4cac81SBjoern A. Zeeb 		int	max_eirp;
6036b4cac81SBjoern A. Zeeb 	} power_rule;
6046b4cac81SBjoern A. Zeeb };
6056b4cac81SBjoern A. Zeeb 
6066b4cac81SBjoern A. Zeeb struct linuxkpi_ieee80211_regdomain {
6076b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
6086b4cac81SBjoern A. Zeeb 	uint8_t					alpha2[2];
6096b4cac81SBjoern A. Zeeb 	int					n_reg_rules;
6106b4cac81SBjoern A. Zeeb 	struct ieee80211_reg_rule		reg_rules[];
6116b4cac81SBjoern A. Zeeb };
6126b4cac81SBjoern A. Zeeb 
6136b4cac81SBjoern A. Zeeb /* XXX-BZ this are insensible values probably ... */
6146b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP0_HTC_HE			0x1
6156b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP0_TWT_REQ			0x2
6166b4cac81SBjoern A. Zeeb 
6176b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP1_LINK_ADAPTATION		0x1
6186b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_8	0x2
6196b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_16US	0x4
6206b4cac81SBjoern A. Zeeb 
6216b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP2_32BIT_BA_BITMAP		0x1
6226b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP2_ACK_EN			0x2
6236b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP2_BSR			0x4
6246b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP2_LINK_ADAPTATION		0x8
6256b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP2_BCAST_TWT			0x10
626*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP2_ALL_ACK			0x20
6276b4cac81SBjoern A. Zeeb 
6286b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2	0x1
6296b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP3_OMI_CONTROL		0x2
6306b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_1	0x10
631*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2	0x20
632*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3	0x40
633*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK	0x70
6346b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP3_RX_CTRL_FRAME_TO_MULTIBSS	0x80
6356b4cac81SBjoern A. Zeeb 
6366b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU		0x1
6376b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP4_BQR			0x2
6386b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP4_MULTI_TID_AGG_TX_QOS_B39	0x4
6396b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU		0x8
640*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP4_OPS			0x10
6416b4cac81SBjoern A. Zeeb 
6426b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP5_HE_DYNAMIC_SM_PS		0x1
6436b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP5_HT_VHT_TRIG_FRAME_RX	0x2
6446b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B40	0x4
6456b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B41	0x8
6466b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MAC_CAP5_UL_2x996_TONE_RU		0x10
6476b4cac81SBjoern A. Zeeb 
6486b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MCS_NOT_SUPPORTED			0x0
6496b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MCS_SUPPORT_0_7			0x1
6506b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MCS_SUPPORT_0_9			0x2
6516b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_MCS_SUPPORT_0_11			0x4
6526b4cac81SBjoern A. Zeeb 
6536b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_6GHZ_CAP_TX_ANTPAT_CONS		0x01
6546b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_6GHZ_CAP_RX_ANTPAT_CONS		0x02
6556b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START		0x04
6566b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_6GHZ_CAP_MAX_MPDU_LEN		0x08
6576b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP		0x10
6586b4cac81SBjoern A. Zeeb 
6596b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G		0x1
6606b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G	0x2
6616b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G		0x4
662*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G	0x8
6636b4cac81SBjoern A. Zeeb 
6646b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A		0x1
6656b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD	0x2
6666b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP1_MIDAMBLE_RX_TX_MAX_NSTS	0x4
6676b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK	0x8
668*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP1_HE_LTF_AND_GI_FOR_HE_PPDUS_0_8US	0x10
6696b4cac81SBjoern A. Zeeb 
6706b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP2_MIDAMBLE_RX_TX_MAX_NSTS	0x1
6716b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP2_NDP_4x_LTF_AND_3_2US	0x2
6726b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP2_STBC_TX_UNDER_80MHZ	0x4
6736b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ	0x8
674*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP2_DOPPLER_TX		0x10
6756b4cac81SBjoern A. Zeeb 
6766b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_MASK	0x1
6776b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_NO_DCM	0x2
6786b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_NO_DCM	0x4
6796b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_1		0x8
6806b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_TX_NSS_1		0x10
681*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER		0x20
682*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_16_QAM	0x40
683*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_16_QAM	0x80
684*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_DCM_MAX_TX_NSS_2		0x100
685*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP3_RX_PARTIAL_BW_SU_IN_20MHZ_MU	0x200
6866b4cac81SBjoern A. Zeeb 
6876b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_8	0x1
6886b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_8	0x2
6896b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE			0x4
690*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER			0x8
691*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_4	0x10
6926b4cac81SBjoern A. Zeeb 
6936b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_2	0x1
6946b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_2	0x2
695*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK	0x4
696*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP5_NG16_MU_FEEDBACK				0x8
697*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP5_NG16_SU_FEEDBACK				0x10
6986b4cac81SBjoern A. Zeeb 
6996b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT	0x1
7006b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB	0x2
7016b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMER_FB	0x4
702*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB	0x8
7036b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMING_PARTIAL_BW_FB	0x20
704*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_42_SU	0x40
705*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_75_MU	0x80
706*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP6_PARTIAL_BW_EXT_RANGE	0x80
7076b4cac81SBjoern A. Zeeb 
7086b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP7_HE_SU_MU_PPDU_4XLTF_AND_08_US_GI	0x1
7096b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP7_MAX_NC_1				0x2
7106b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP7_MAX_NC_2				0x4
7116b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP7_MAX_NC_MASK			0x6
7126b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR		0x8
7136b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP		0x10
7146b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP7_STBC_RX_ABOVE_80MHZ		0x20
7156b4cac81SBjoern A. Zeeb 
7166b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP8_20MHZ_IN_160MHZ_HE_PPDU		0x1
7176b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP8_20MHZ_IN_40MHZ_HE_PPDU_IN_2G	0x2
7186b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP8_80MHZ_IN_160MHZ_HE_PPDU		0x4
7196b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_2x996			0x8
7206b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_242			0x10
7216b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP8_HE_ER_SU_PPDU_4XLTF_AND_08_US_GI	0x20
722*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_996			0x40
723*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP8_HE_ER_SU_1XLTF_AND_08_US_GI	0x80
7246b4cac81SBjoern A. Zeeb 
725e2008091SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_0US		0x1
726e2008091SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_16US		0x2
727e2008091SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_8US		0x4
728e2008091SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_MASK		0x8
729e2008091SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_RESERVED	0x10
7306b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_NON_TRIGGERED_CQI_FEEDBACK	0x20
7316b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_COMP_SIGB	0x40
7326b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_NON_COMP_SIGB	0x80
7336b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_RX_1024_QAM_LESS_THAN_242_TONE_RU	0x100
7346b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_TX_1024_QAM_LESS_THAN_242_TONE_RU	0x200
735*51b461b3SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP9_LONGER_THAN_16_SIGB_OFDM_SYM	0x400
7366b4cac81SBjoern A. Zeeb 
7376b4cac81SBjoern A. Zeeb #define	IEEE80211_HE_PHY_CAP10_HE_MU_M1RU_MAX_LTF		0x1
7386b4cac81SBjoern A. Zeeb 
7396b4cac81SBjoern A. Zeeb #define	VENDOR_CMD_RAW_DATA	(void *)(uintptr_t)(-ENOENT)
7406b4cac81SBjoern A. Zeeb 
7416b4cac81SBjoern A. Zeeb struct ieee80211_he_cap_elem {
7426b4cac81SBjoern A. Zeeb 	u8 mac_cap_info[6];
7436b4cac81SBjoern A. Zeeb 	u8 phy_cap_info[11];
7446b4cac81SBjoern A. Zeeb } __packed;
7456b4cac81SBjoern A. Zeeb 
7466b4cac81SBjoern A. Zeeb struct ieee80211_he_mcs_nss_supp {
7476b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
7486b4cac81SBjoern A. Zeeb 	uint32_t	rx_mcs_80;
7496b4cac81SBjoern A. Zeeb 	uint32_t	tx_mcs_80;
7506b4cac81SBjoern A. Zeeb 	uint32_t	rx_mcs_160;
7516b4cac81SBjoern A. Zeeb 	uint32_t	tx_mcs_160;
7526b4cac81SBjoern A. Zeeb 	uint32_t	rx_mcs_80p80;
7536b4cac81SBjoern A. Zeeb 	uint32_t	tx_mcs_80p80;
7546b4cac81SBjoern A. Zeeb };
7556b4cac81SBjoern A. Zeeb 
7566b4cac81SBjoern A. Zeeb #define	IEEE80211_STA_HE_CAP_PPE_THRES_MAX	32
7576b4cac81SBjoern A. Zeeb struct ieee80211_sta_he_cap {
7586b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
7596b4cac81SBjoern A. Zeeb 	int					has_he;
7606b4cac81SBjoern A. Zeeb 	struct ieee80211_he_cap_elem		he_cap_elem;
7616b4cac81SBjoern A. Zeeb 	struct ieee80211_he_mcs_nss_supp	he_mcs_nss_supp;
7626b4cac81SBjoern A. Zeeb 	uint8_t					ppe_thres[IEEE80211_STA_HE_CAP_PPE_THRES_MAX];
7636b4cac81SBjoern A. Zeeb };
7646b4cac81SBjoern A. Zeeb 
7656b4cac81SBjoern A. Zeeb struct ieee80211_sta_he_6ghz_capa {
7666b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
7676b4cac81SBjoern A. Zeeb 	int	capa;
7686b4cac81SBjoern A. Zeeb };
7696b4cac81SBjoern A. Zeeb 
7706b4cac81SBjoern A. Zeeb struct ieee80211_sband_iftype_data {
7716b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
7726b4cac81SBjoern A. Zeeb 	enum nl80211_iftype			types_mask;
7736b4cac81SBjoern A. Zeeb 	struct ieee80211_sta_he_cap		he_cap;
7746b4cac81SBjoern A. Zeeb 	struct ieee80211_sta_he_6ghz_capa	he_6ghz_capa;
7756b4cac81SBjoern A. Zeeb 	struct {
7766b4cac81SBjoern A. Zeeb 		const uint8_t			*data;
7776b4cac81SBjoern A. Zeeb 		size_t				len;
7786b4cac81SBjoern A. Zeeb 	} vendor_elems;
7796b4cac81SBjoern A. Zeeb };
7806b4cac81SBjoern A. Zeeb 
7816b4cac81SBjoern A. Zeeb struct ieee80211_supported_band {
7826b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
7836b4cac81SBjoern A. Zeeb 	struct linuxkpi_ieee80211_channel		*channels;
7846b4cac81SBjoern A. Zeeb 	struct ieee80211_rate			*bitrates;
7856b4cac81SBjoern A. Zeeb 	struct ieee80211_sband_iftype_data	*iftype_data;
7866b4cac81SBjoern A. Zeeb 	int					n_channels;
7876b4cac81SBjoern A. Zeeb 	int					n_bitrates;
7886b4cac81SBjoern A. Zeeb 	int					n_iftype_data;
7896b4cac81SBjoern A. Zeeb 	enum nl80211_band			band;
7906b4cac81SBjoern A. Zeeb 	struct ieee80211_sta_ht_cap		ht_cap;
7916b4cac81SBjoern A. Zeeb 	struct ieee80211_sta_vht_cap		vht_cap;
7926b4cac81SBjoern A. Zeeb };
7936b4cac81SBjoern A. Zeeb 
7946b4cac81SBjoern A. Zeeb struct cfg80211_pkt_pattern {
7956b4cac81SBjoern A. Zeeb 	/* XXX TODO */
7966b4cac81SBjoern A. Zeeb 	uint8_t					*mask;
7976b4cac81SBjoern A. Zeeb 	uint8_t					*pattern;
7986b4cac81SBjoern A. Zeeb 	int					pattern_len;
7996b4cac81SBjoern A. Zeeb 	int					pkt_offset;
8006b4cac81SBjoern A. Zeeb };
8016b4cac81SBjoern A. Zeeb 
8026b4cac81SBjoern A. Zeeb struct cfg80211_wowlan {
8036b4cac81SBjoern A. Zeeb 	/* XXX TODO */
8046b4cac81SBjoern A. Zeeb 	int	disconnect, gtk_rekey_failure, magic_pkt;
8056b4cac81SBjoern A. Zeeb 	int					n_patterns;
8066b4cac81SBjoern A. Zeeb 	struct cfg80211_sched_scan_request	*nd_config;
8076b4cac81SBjoern A. Zeeb 	struct cfg80211_pkt_pattern		*patterns;
8086b4cac81SBjoern A. Zeeb };
8096b4cac81SBjoern A. Zeeb 
8106b4cac81SBjoern A. Zeeb struct cfg80211_gtk_rekey_data {
8116b4cac81SBjoern A. Zeeb 	/* XXX TODO */
8126b4cac81SBjoern A. Zeeb 	int     kck, kek, replay_ctr;
8136b4cac81SBjoern A. Zeeb };
8146b4cac81SBjoern A. Zeeb 
8156b4cac81SBjoern A. Zeeb struct ieee80211_iface_limit {
8166b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
8176b4cac81SBjoern A. Zeeb 	int		max, types;
8186b4cac81SBjoern A. Zeeb };
8196b4cac81SBjoern A. Zeeb 
8206b4cac81SBjoern A. Zeeb struct ieee80211_iface_combination {
8216b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
8226b4cac81SBjoern A. Zeeb 	const struct ieee80211_iface_limit	*limits;
8236b4cac81SBjoern A. Zeeb 	int					n_limits;
8246b4cac81SBjoern A. Zeeb 	int		max_interfaces, num_different_channels;
8256b4cac81SBjoern A. Zeeb 	int		beacon_int_infra_match, beacon_int_min_gcd;
8266b4cac81SBjoern A. Zeeb };
8276b4cac81SBjoern A. Zeeb 
8286b4cac81SBjoern A. Zeeb struct iface_combination_params {
8296b4cac81SBjoern A. Zeeb 	int num_different_channels;
8306b4cac81SBjoern A. Zeeb 	int iftype_num[NUM_NL80211_IFTYPES];
8316b4cac81SBjoern A. Zeeb };
8326b4cac81SBjoern A. Zeeb 
8336b4cac81SBjoern A. Zeeb struct regulatory_request {
8346b4cac81SBjoern A. Zeeb 		/* XXX TODO */
8356b4cac81SBjoern A. Zeeb 	uint8_t					alpha2[2];
8366b4cac81SBjoern A. Zeeb 	int	initiator, dfs_region;
8376b4cac81SBjoern A. Zeeb };
8386b4cac81SBjoern A. Zeeb 
8396b4cac81SBjoern A. Zeeb enum wiphy_vendor_cmd_need_flags {
8406b4cac81SBjoern A. Zeeb 	WIPHY_VENDOR_CMD_NEED_NETDEV		= 0x01,
8416b4cac81SBjoern A. Zeeb 	WIPHY_VENDOR_CMD_NEED_RUNNING		= 0x02,
8426b4cac81SBjoern A. Zeeb 	WIPHY_VENDOR_CMD_NEED_WDEV		= 0x04,
8436b4cac81SBjoern A. Zeeb };
8446b4cac81SBjoern A. Zeeb 
8456b4cac81SBjoern A. Zeeb struct wiphy_vendor_command {
8466b4cac81SBjoern A. Zeeb 	struct {
8476b4cac81SBjoern A. Zeeb 		uint32_t	vendor_id;
8486b4cac81SBjoern A. Zeeb 		uint32_t	subcmd;
8496b4cac81SBjoern A. Zeeb 	};
8506b4cac81SBjoern A. Zeeb 	uint32_t		flags;
8516b4cac81SBjoern A. Zeeb 	void			*policy;
8526b4cac81SBjoern A. Zeeb 	int (*doit)(struct wiphy *, struct wireless_dev *, const void *, int);
8536b4cac81SBjoern A. Zeeb };
8546b4cac81SBjoern A. Zeeb 
8556b4cac81SBjoern A. Zeeb struct wiphy_iftype_ext_capab {
8566b4cac81SBjoern A. Zeeb 	/* TODO FIXME */
8576b4cac81SBjoern A. Zeeb 	enum nl80211_iftype			iftype;
8586b4cac81SBjoern A. Zeeb 	const uint8_t				*extended_capabilities;
8596b4cac81SBjoern A. Zeeb 	const uint8_t				*extended_capabilities_mask;
8606b4cac81SBjoern A. Zeeb 	uint8_t					extended_capabilities_len;
8616b4cac81SBjoern A. Zeeb 
8626b4cac81SBjoern A. Zeeb };
8636b4cac81SBjoern A. Zeeb 
8646b4cac81SBjoern A. Zeeb enum cfg80211_regulatory {
8656b4cac81SBjoern A. Zeeb 	REGULATORY_CUSTOM_REG			= BIT(0),
8666b4cac81SBjoern A. Zeeb 	REGULATORY_STRICT_REG			= BIT(1),
8676b4cac81SBjoern A. Zeeb 	REGULATORY_DISABLE_BEACON_HINTS		= BIT(2),
8686b4cac81SBjoern A. Zeeb 	REGULATORY_ENABLE_RELAX_NO_IR		= BIT(3),
8696b4cac81SBjoern A. Zeeb 	REGULATORY_WIPHY_SELF_MANAGED		= BIT(4),
8706b4cac81SBjoern A. Zeeb 	REGULATORY_COUNTRY_IE_IGNORE		= BIT(5),
8716b4cac81SBjoern A. Zeeb };
8726b4cac81SBjoern A. Zeeb 
8736b4cac81SBjoern A. Zeeb #define	WIPHY_FLAG_AP_UAPSD			0x00000001
8746b4cac81SBjoern A. Zeeb #define	WIPHY_FLAG_HAS_CHANNEL_SWITCH		0x00000002
8756b4cac81SBjoern A. Zeeb #define	WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL	0x00000004
8766b4cac81SBjoern A. Zeeb #define	WIPHY_FLAG_HAVE_AP_SME			0x00000008
8776b4cac81SBjoern A. Zeeb #define	WIPHY_FLAG_IBSS_RSN			0x00000010
8786b4cac81SBjoern A. Zeeb #define	WIPHY_FLAG_NETNS_OK			0x00000020
8796b4cac81SBjoern A. Zeeb #define	WIPHY_FLAG_OFFCHAN_TX			0x00000040
8806b4cac81SBjoern A. Zeeb #define	WIPHY_FLAG_PS_ON_BY_DEFAULT		0x00000080
8816b4cac81SBjoern A. Zeeb #define	WIPHY_FLAG_SPLIT_SCAN_6GHZ		0x00000100
8826b4cac81SBjoern A. Zeeb #define	WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK		0x00000200
8836b4cac81SBjoern A. Zeeb #define	WIPHY_FLAG_SUPPORTS_FW_ROAM		0x00000400
8846b4cac81SBjoern A. Zeeb #define	WIPHY_FLAG_SUPPORTS_TDLS		0x00000800
8856b4cac81SBjoern A. Zeeb #define	WIPHY_FLAG_TDLS_EXTERNAL_SETUP		0x00001000
8866b4cac81SBjoern A. Zeeb 
8876b4cac81SBjoern A. Zeeb struct wiphy {
8886b4cac81SBjoern A. Zeeb 
8896b4cac81SBjoern A. Zeeb 	struct device				*dev;
8906b4cac81SBjoern A. Zeeb 	struct mac_address			*addresses;
8916b4cac81SBjoern A. Zeeb 	int					n_addresses;
8926b4cac81SBjoern A. Zeeb 	uint32_t				flags;
8936b4cac81SBjoern A. Zeeb 	struct ieee80211_supported_band		*bands[NUM_NL80211_BANDS];
8946b4cac81SBjoern A. Zeeb 	uint8_t					perm_addr[ETH_ALEN];
8956b4cac81SBjoern A. Zeeb 
8966b4cac81SBjoern A. Zeeb 	/* XXX TODO */
8976b4cac81SBjoern A. Zeeb 	const struct cfg80211_pmsr_capabilities	*pmsr_capa;
898*51b461b3SBjoern A. Zeeb 	const struct cfg80211_sar_capa		*sar_capa;
8996b4cac81SBjoern A. Zeeb 	const struct wiphy_iftype_ext_capab	*iftype_ext_capab;
9006b4cac81SBjoern A. Zeeb 	const struct linuxkpi_ieee80211_regdomain *regd;
9016b4cac81SBjoern A. Zeeb 	char					fw_version[64];		/* XXX TODO */
9026b4cac81SBjoern A. Zeeb 	const struct ieee80211_iface_combination *iface_combinations;
9036b4cac81SBjoern A. Zeeb 	const uint32_t				*cipher_suites;
9046b4cac81SBjoern A. Zeeb 	int					n_iface_combinations;
9056b4cac81SBjoern A. Zeeb 	int					n_cipher_suites;
9066b4cac81SBjoern A. Zeeb 	void(*reg_notifier)(struct wiphy *, struct regulatory_request *);
9076b4cac81SBjoern A. Zeeb 	enum cfg80211_regulatory		regulatory_flags;
9086b4cac81SBjoern A. Zeeb 	int					n_vendor_commands;
9096b4cac81SBjoern A. Zeeb 	const struct wiphy_vendor_command	*vendor_commands;
9106b4cac81SBjoern A. Zeeb 	const struct ieee80211_txrx_stypes	*mgmt_stypes;
9116b4cac81SBjoern A. Zeeb 	uint32_t				rts_threshold;
9126b4cac81SBjoern A. Zeeb 	uint32_t				frag_threshold;
9136b4cac81SBjoern A. Zeeb 
9146b4cac81SBjoern A. Zeeb 	int	available_antennas_rx, available_antennas_tx;
9156b4cac81SBjoern A. Zeeb 	int	features, hw_version;
9166b4cac81SBjoern A. Zeeb 	int	interface_modes, max_match_sets, max_remain_on_channel_duration, max_scan_ie_len, 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;
9176b4cac81SBjoern A. Zeeb 	int	num_iftype_ext_capab;
9186b4cac81SBjoern A. Zeeb 	int	max_ap_assoc_sta, probe_resp_offload, software_iftypes;
9196b4cac81SBjoern A. Zeeb 	int     bss_select_support, max_num_pmkids, retry_long, retry_short, signal_type;
9206b4cac81SBjoern A. Zeeb 
9216b4cac81SBjoern A. Zeeb 	unsigned long				ext_features[BITS_TO_LONGS(NUM_NL80211_EXT_FEATURES)];
9226b4cac81SBjoern A. Zeeb 	struct dentry				*debugfsdir;
9236b4cac81SBjoern A. Zeeb 	struct cfg80211_wowlan_support		*wowlan;
9246b4cac81SBjoern A. Zeeb 	/* Lower layer (driver/mac80211) specific data. */
9256b4cac81SBjoern A. Zeeb 	/* Must stay last. */
9266b4cac81SBjoern A. Zeeb 	uint8_t					priv[0] __aligned(CACHE_LINE_SIZE);
9276b4cac81SBjoern A. Zeeb };
9286b4cac81SBjoern A. Zeeb 
9296b4cac81SBjoern A. Zeeb struct wireless_dev {
9306b4cac81SBjoern A. Zeeb 		/* XXX TODO, like ic? */
9316b4cac81SBjoern A. Zeeb 	int		iftype;
9326b4cac81SBjoern A. Zeeb 	int     address;
9336b4cac81SBjoern A. Zeeb 	struct net_device			*netdev;
9346b4cac81SBjoern A. Zeeb 	struct wiphy				*wiphy;
9356b4cac81SBjoern A. Zeeb };
9366b4cac81SBjoern A. Zeeb 
9376b4cac81SBjoern A. Zeeb struct cfg80211_ops {
9386b4cac81SBjoern A. Zeeb 	/* XXX TODO */
9396b4cac81SBjoern A. Zeeb 	struct wireless_dev *(*add_virtual_intf)(struct wiphy *, const char *, unsigned char, enum nl80211_iftype, struct vif_params *);
9406b4cac81SBjoern A. Zeeb 	int (*del_virtual_intf)(struct wiphy *,  struct wireless_dev *);
9416b4cac81SBjoern A. Zeeb 	s32 (*change_virtual_intf)(struct wiphy *,  struct net_device *, enum nl80211_iftype, struct vif_params *);
9426b4cac81SBjoern A. Zeeb 	s32 (*scan)(struct wiphy *,  struct cfg80211_scan_request *);
9436b4cac81SBjoern A. Zeeb 	s32 (*set_wiphy_params)(struct wiphy *,  u32);
9446b4cac81SBjoern A. Zeeb 	s32 (*join_ibss)(struct wiphy *,  struct net_device *, struct cfg80211_ibss_params *);
9456b4cac81SBjoern A. Zeeb 	s32 (*leave_ibss)(struct wiphy *,  struct net_device *);
9466b4cac81SBjoern A. Zeeb 	s32 (*get_station)(struct wiphy *, struct net_device *, const u8 *, struct station_info *);
9476b4cac81SBjoern A. Zeeb 	int (*dump_station)(struct wiphy *,  struct net_device *, int,  u8 *,  struct station_info *);
9486b4cac81SBjoern A. Zeeb 	s32 (*set_tx_power)(struct wiphy *,  struct wireless_dev *, enum nl80211_tx_power_setting,  s32);
9496b4cac81SBjoern A. Zeeb 	s32 (*get_tx_power)(struct wiphy *,  struct wireless_dev *, s32 *);
9506b4cac81SBjoern A. Zeeb 	s32 (*add_key)(struct wiphy *,  struct net_device *, u8,  bool,  const u8 *, struct key_params *);
9516b4cac81SBjoern A. Zeeb 	s32 (*del_key)(struct wiphy *,  struct net_device *, u8,  bool,  const u8 *);
9526b4cac81SBjoern A. Zeeb 	s32 (*get_key)(struct wiphy *,  struct net_device *,  u8, bool,  const u8 *,  void *, void(*)(void *, struct key_params *));
9536b4cac81SBjoern A. Zeeb 	s32 (*set_default_key)(struct wiphy *,  struct net_device *, u8,  bool,  bool);
9546b4cac81SBjoern A. Zeeb 	s32 (*set_default_mgmt_key)(struct wiphy *, struct net_device *,  u8);
9556b4cac81SBjoern A. Zeeb 	s32 (*set_power_mgmt)(struct wiphy *,  struct net_device *, bool,  s32);
9566b4cac81SBjoern A. Zeeb 	s32 (*connect)(struct wiphy *,  struct net_device *, struct cfg80211_connect_params *);
9576b4cac81SBjoern A. Zeeb 	s32 (*disconnect)(struct wiphy *,  struct net_device *, u16);
9586b4cac81SBjoern A. Zeeb 	s32 (*suspend)(struct wiphy *, struct cfg80211_wowlan *);
9596b4cac81SBjoern A. Zeeb 	s32 (*resume)(struct wiphy *);
9606b4cac81SBjoern A. Zeeb 	s32 (*set_pmksa)(struct wiphy *, struct net_device *, struct cfg80211_pmksa *);
9616b4cac81SBjoern A. Zeeb 	s32 (*del_pmksa)(struct wiphy *, struct net_device *, struct cfg80211_pmksa *);
9626b4cac81SBjoern A. Zeeb 	s32 (*flush_pmksa)(struct wiphy *,  struct net_device *);
9636b4cac81SBjoern A. Zeeb 	s32 (*start_ap)(struct wiphy *,  struct net_device *, struct cfg80211_ap_settings *);
9646b4cac81SBjoern A. Zeeb 	int (*stop_ap)(struct wiphy *,  struct net_device *);
9656b4cac81SBjoern A. Zeeb 	s32 (*change_beacon)(struct wiphy *,  struct net_device *, struct cfg80211_beacon_data *);
9666b4cac81SBjoern A. Zeeb 	int (*del_station)(struct wiphy *,  struct net_device *, struct station_del_parameters *);
9676b4cac81SBjoern A. Zeeb 	int (*change_station)(struct wiphy *,  struct net_device *, const u8 *,  struct station_parameters *);
9686b4cac81SBjoern A. Zeeb 	int (*sched_scan_start)(struct wiphy *, struct net_device *, struct cfg80211_sched_scan_request *);
9696b4cac81SBjoern A. Zeeb 	int (*sched_scan_stop)(struct wiphy *, struct net_device *,  u64);
9706b4cac81SBjoern A. Zeeb 	void (*update_mgmt_frame_registrations)(struct wiphy *, struct wireless_dev *, struct mgmt_frame_regs *);
9716b4cac81SBjoern A. Zeeb 	int (*mgmt_tx)(struct wiphy *,  struct wireless_dev *, struct cfg80211_mgmt_tx_params *,  u64 *);
9726b4cac81SBjoern A. Zeeb 	int (*cancel_remain_on_channel)(struct wiphy *, struct wireless_dev *, u64);
9736b4cac81SBjoern A. Zeeb 	int (*get_channel)(struct wiphy *, struct wireless_dev *, struct cfg80211_chan_def *);
9746b4cac81SBjoern A. Zeeb 	int (*crit_proto_start)(struct wiphy *, struct wireless_dev *, enum nl80211_crit_proto_id, u16);
9756b4cac81SBjoern A. Zeeb 	void (*crit_proto_stop)(struct wiphy *, struct wireless_dev *);
9766b4cac81SBjoern A. Zeeb 	int (*tdls_oper)(struct wiphy *, struct net_device *,  const u8 *, enum nl80211_tdls_operation);
9776b4cac81SBjoern A. Zeeb 	int (*update_connect_params)(struct wiphy *, struct net_device *, struct cfg80211_connect_params *, u32);
9786b4cac81SBjoern A. Zeeb 	int (*set_pmk)(struct wiphy *,  struct net_device *, const struct cfg80211_pmk_conf *);
9796b4cac81SBjoern A. Zeeb 	int (*del_pmk)(struct wiphy *,  struct net_device *, const u8 *);
9806b4cac81SBjoern A. Zeeb 	int (*remain_on_channel)(struct wiphy *,  struct wireless_dev *, struct linuxkpi_ieee80211_channel *, unsigned int,  u64 *);
9816b4cac81SBjoern A. Zeeb 	int (*start_p2p_device)(struct wiphy *,  struct wireless_dev *);
9826b4cac81SBjoern A. Zeeb 	void (*stop_p2p_device)(struct wiphy *,  struct wireless_dev *);
9836b4cac81SBjoern A. Zeeb };
9846b4cac81SBjoern A. Zeeb 
9856b4cac81SBjoern A. Zeeb 
9866b4cac81SBjoern A. Zeeb /* -------------------------------------------------------------------------- */
9876b4cac81SBjoern A. Zeeb 
9886b4cac81SBjoern A. Zeeb /* linux_80211.c */
9896b4cac81SBjoern A. Zeeb 
9906b4cac81SBjoern A. Zeeb struct wiphy *linuxkpi_wiphy_new(const struct cfg80211_ops *, size_t);
9916b4cac81SBjoern A. Zeeb void linuxkpi_wiphy_free(struct wiphy *wiphy);
9926b4cac81SBjoern A. Zeeb 
9936b4cac81SBjoern A. Zeeb int linuxkpi_regulatory_set_wiphy_regd_sync(struct wiphy *wiphy,
9946b4cac81SBjoern A. Zeeb     struct linuxkpi_ieee80211_regdomain *regd);
9956b4cac81SBjoern A. Zeeb uint32_t linuxkpi_ieee80211_channel_to_frequency(uint32_t, enum nl80211_band);
9966b4cac81SBjoern A. Zeeb uint32_t linuxkpi_ieee80211_frequency_to_channel(uint32_t, uint32_t);
9976b4cac81SBjoern A. Zeeb 
9986b4cac81SBjoern A. Zeeb /* -------------------------------------------------------------------------- */
9996b4cac81SBjoern A. Zeeb 
10006b4cac81SBjoern A. Zeeb static __inline struct wiphy *
10016b4cac81SBjoern A. Zeeb wiphy_new(const struct cfg80211_ops *ops, size_t priv_len)
10026b4cac81SBjoern A. Zeeb {
10036b4cac81SBjoern A. Zeeb 
10046b4cac81SBjoern A. Zeeb 	return (linuxkpi_wiphy_new(ops, priv_len));
10056b4cac81SBjoern A. Zeeb }
10066b4cac81SBjoern A. Zeeb 
10076b4cac81SBjoern A. Zeeb static __inline void
10086b4cac81SBjoern A. Zeeb wiphy_free(struct wiphy *wiphy)
10096b4cac81SBjoern A. Zeeb {
10106b4cac81SBjoern A. Zeeb 
10116b4cac81SBjoern A. Zeeb 	linuxkpi_wiphy_free(wiphy);
10126b4cac81SBjoern A. Zeeb }
10136b4cac81SBjoern A. Zeeb 
10146b4cac81SBjoern A. Zeeb static __inline void *
10156b4cac81SBjoern A. Zeeb wiphy_priv(struct wiphy *wiphy)
10166b4cac81SBjoern A. Zeeb {
10176b4cac81SBjoern A. Zeeb 
10186b4cac81SBjoern A. Zeeb 	return (wiphy->priv);
10196b4cac81SBjoern A. Zeeb }
10206b4cac81SBjoern A. Zeeb 
10216b4cac81SBjoern A. Zeeb static __inline void
10226b4cac81SBjoern A. Zeeb set_wiphy_dev(struct wiphy *wiphy, struct device *dev)
10236b4cac81SBjoern A. Zeeb {
10246b4cac81SBjoern A. Zeeb 
10256b4cac81SBjoern A. Zeeb 	wiphy->dev = dev;
10266b4cac81SBjoern A. Zeeb }
10276b4cac81SBjoern A. Zeeb 
10286b4cac81SBjoern A. Zeeb static __inline struct device *
10296b4cac81SBjoern A. Zeeb wiphy_dev(struct wiphy *wiphy)
10306b4cac81SBjoern A. Zeeb {
10316b4cac81SBjoern A. Zeeb 
10326b4cac81SBjoern A. Zeeb 	return (wiphy->dev);
10336b4cac81SBjoern A. Zeeb }
10346b4cac81SBjoern A. Zeeb 
10356b4cac81SBjoern A. Zeeb #define	wiphy_err(_wiphy, _fmt, ...)					\
10366b4cac81SBjoern A. Zeeb     dev_err((_wiphy)->dev, _fmt, __VA_ARGS__)
10376b4cac81SBjoern A. Zeeb 
10386b4cac81SBjoern A. Zeeb static __inline const struct linuxkpi_ieee80211_regdomain *
10396b4cac81SBjoern A. Zeeb wiphy_dereference(struct wiphy *wiphy,
10406b4cac81SBjoern A. Zeeb     const struct linuxkpi_ieee80211_regdomain *regd)
10416b4cac81SBjoern A. Zeeb {
10426b4cac81SBjoern A. Zeeb 	TODO();
10436b4cac81SBjoern A. Zeeb         return (NULL);
10446b4cac81SBjoern A. Zeeb }
10456b4cac81SBjoern A. Zeeb 
10466b4cac81SBjoern A. Zeeb /* -------------------------------------------------------------------------- */
10476b4cac81SBjoern A. Zeeb 
10486b4cac81SBjoern A. Zeeb static __inline int
10496b4cac81SBjoern A. Zeeb reg_query_regdb_wmm(uint8_t *alpha2, uint32_t center_freq,
10506b4cac81SBjoern A. Zeeb     struct ieee80211_reg_rule *rule)
10516b4cac81SBjoern A. Zeeb {
10526b4cac81SBjoern A. Zeeb 
10536b4cac81SBjoern A. Zeeb 	/* ETSI has special rules. FreeBSD regdb needs to learn about them. */
10546b4cac81SBjoern A. Zeeb 	TODO();
10556b4cac81SBjoern A. Zeeb 
10566b4cac81SBjoern A. Zeeb 	return (-ENXIO);
10576b4cac81SBjoern A. Zeeb }
10586b4cac81SBjoern A. Zeeb 
10596b4cac81SBjoern A. Zeeb static __inline const u8 *
10606b4cac81SBjoern A. Zeeb cfg80211_find_ie_match(uint32_t f, const u8 *ies, size_t ies_len,
10616b4cac81SBjoern A. Zeeb     const u8 *match, int x, int y)
10626b4cac81SBjoern A. Zeeb {
10636b4cac81SBjoern A. Zeeb 	TODO();
10646b4cac81SBjoern A. Zeeb 	return (NULL);
10656b4cac81SBjoern A. Zeeb }
10666b4cac81SBjoern A. Zeeb 
10676b4cac81SBjoern A. Zeeb static __inline const u8 *
10686b4cac81SBjoern A. Zeeb cfg80211_find_ie(uint8_t  eid, uint8_t *variable, uint32_t frame_size)
10696b4cac81SBjoern A. Zeeb {
10706b4cac81SBjoern A. Zeeb 	TODO();
10716b4cac81SBjoern A. Zeeb 	return (NULL);
10726b4cac81SBjoern A. Zeeb }
10736b4cac81SBjoern A. Zeeb 
10746b4cac81SBjoern A. Zeeb static __inline void
10756b4cac81SBjoern A. Zeeb cfg80211_pmsr_complete(struct wireless_dev *wdev,
10766b4cac81SBjoern A. Zeeb     struct cfg80211_pmsr_request *req, gfp_t gfp)
10776b4cac81SBjoern A. Zeeb {
10786b4cac81SBjoern A. Zeeb 	TODO();
10796b4cac81SBjoern A. Zeeb }
10806b4cac81SBjoern A. Zeeb 
10816b4cac81SBjoern A. Zeeb static __inline void
10826b4cac81SBjoern A. Zeeb cfg80211_pmsr_report(struct wireless_dev *wdev,
10836b4cac81SBjoern A. Zeeb     struct cfg80211_pmsr_request *req,
10846b4cac81SBjoern A. Zeeb     struct cfg80211_pmsr_result *result, gfp_t gfp)
10856b4cac81SBjoern A. Zeeb {
10866b4cac81SBjoern A. Zeeb 	TODO();
10876b4cac81SBjoern A. Zeeb }
10886b4cac81SBjoern A. Zeeb 
10896b4cac81SBjoern A. Zeeb static __inline void
10906b4cac81SBjoern A. Zeeb cfg80211_chandef_create(struct cfg80211_chan_def *chandef,
10916b4cac81SBjoern A. Zeeb     struct linuxkpi_ieee80211_channel *chan, enum nl80211_chan_flags chan_flag)
10926b4cac81SBjoern A. Zeeb {
10936b4cac81SBjoern A. Zeeb 
10946b4cac81SBjoern A. Zeeb 	KASSERT(chandef != NULL, ("%s: chandef is NULL\n", __func__));
10956b4cac81SBjoern A. Zeeb 	KASSERT(chan != NULL, ("%s: chan is NULL\n", __func__));
10966b4cac81SBjoern A. Zeeb 
10976b4cac81SBjoern A. Zeeb 	chandef->chan = chan;
10986b4cac81SBjoern A. Zeeb 	chandef->center_freq2 = 0;	/* Set here and only overwrite if needed. */
10996b4cac81SBjoern A. Zeeb         chandef->chan = chan;
11006b4cac81SBjoern A. Zeeb 
11016b4cac81SBjoern A. Zeeb 	switch (chan_flag) {
11026b4cac81SBjoern A. Zeeb 	case NL80211_CHAN_NO_HT:
11036b4cac81SBjoern A. Zeeb 		chandef->width = NL80211_CHAN_WIDTH_20_NOHT;
11046b4cac81SBjoern A. Zeeb 		chandef->center_freq1 = chan->center_freq;
11056b4cac81SBjoern A. Zeeb 		break;
11066b4cac81SBjoern A. Zeeb 	default:
11076b4cac81SBjoern A. Zeeb 		printf("%s: unsupported chan_flag %#0x\n", __func__, chan_flag);
11086b4cac81SBjoern A. Zeeb 		/* XXX-BZ should we panic instead? */
11096b4cac81SBjoern A. Zeeb 		chandef->width = NL80211_CHAN_WIDTH_20;
11106b4cac81SBjoern A. Zeeb 		chandef->center_freq1 = chan->center_freq;
11116b4cac81SBjoern A. Zeeb 		break;
11126b4cac81SBjoern A. Zeeb 	};
11136b4cac81SBjoern A. Zeeb }
11146b4cac81SBjoern A. Zeeb 
11156b4cac81SBjoern A. Zeeb static __inline void
11166b4cac81SBjoern A. Zeeb cfg80211_bss_iter(struct wiphy *wiphy, struct cfg80211_chan_def *chandef,
11176b4cac81SBjoern A. Zeeb     void (*iterfunc)(struct wiphy *, struct cfg80211_bss *, void *), void *data)
11186b4cac81SBjoern A. Zeeb {
11196b4cac81SBjoern A. Zeeb 	TODO();
11206b4cac81SBjoern A. Zeeb }
11216b4cac81SBjoern A. Zeeb 
11226b4cac81SBjoern A. Zeeb struct element {
11236b4cac81SBjoern A. Zeeb 	uint8_t		id;
11246b4cac81SBjoern A. Zeeb 	uint8_t		datalen;
11256b4cac81SBjoern A. Zeeb 	uint8_t		data[0];
11266b4cac81SBjoern A. Zeeb };
11276b4cac81SBjoern A. Zeeb 
11286b4cac81SBjoern A. Zeeb static __inline const struct element *
11296b4cac81SBjoern A. Zeeb cfg80211_find_elem(enum ieee80211_eid eid, uint8_t *data, size_t len)
11306b4cac81SBjoern A. Zeeb {
11316b4cac81SBjoern A. Zeeb 	TODO();
11326b4cac81SBjoern A. Zeeb 	return (NULL);
11336b4cac81SBjoern A. Zeeb }
11346b4cac81SBjoern A. Zeeb 
11356b4cac81SBjoern A. Zeeb static __inline uint32_t
11366b4cac81SBjoern A. Zeeb cfg80211_calculate_bitrate(struct rate_info *rate)
11376b4cac81SBjoern A. Zeeb {
11386b4cac81SBjoern A. Zeeb 	TODO();
11396b4cac81SBjoern A. Zeeb 	return (-1);
11406b4cac81SBjoern A. Zeeb }
11416b4cac81SBjoern A. Zeeb 
11426b4cac81SBjoern A. Zeeb static __inline uint32_t
11436b4cac81SBjoern A. Zeeb ieee80211_channel_to_frequency(uint32_t channel, enum nl80211_band band)
11446b4cac81SBjoern A. Zeeb {
11456b4cac81SBjoern A. Zeeb 
11466b4cac81SBjoern A. Zeeb 	return (linuxkpi_ieee80211_channel_to_frequency(channel, band));
11476b4cac81SBjoern A. Zeeb }
11486b4cac81SBjoern A. Zeeb 
11496b4cac81SBjoern A. Zeeb static __inline uint32_t
11506b4cac81SBjoern A. Zeeb ieee80211_frequency_to_channel(uint32_t freq)
11516b4cac81SBjoern A. Zeeb {
11526b4cac81SBjoern A. Zeeb 
11536b4cac81SBjoern A. Zeeb 	return (linuxkpi_ieee80211_frequency_to_channel(freq, 0));
11546b4cac81SBjoern A. Zeeb }
11556b4cac81SBjoern A. Zeeb 
11566b4cac81SBjoern A. Zeeb static __inline int
11576b4cac81SBjoern A. Zeeb regulatory_set_wiphy_regd_sync(struct wiphy *wiphy,
11586b4cac81SBjoern A. Zeeb     struct linuxkpi_ieee80211_regdomain *regd)
11596b4cac81SBjoern A. Zeeb {
11606b4cac81SBjoern A. Zeeb 	IMPROVE();
11616b4cac81SBjoern A. Zeeb 	return (linuxkpi_regulatory_set_wiphy_regd_sync(wiphy, regd));
11626b4cac81SBjoern A. Zeeb }
11636b4cac81SBjoern A. Zeeb 
11646b4cac81SBjoern A. Zeeb static __inline int
11656b4cac81SBjoern A. Zeeb regulatory_set_wiphy_regd_sync_rtnl(struct wiphy *wiphy,
11666b4cac81SBjoern A. Zeeb     struct linuxkpi_ieee80211_regdomain *regd)
11676b4cac81SBjoern A. Zeeb {
11686b4cac81SBjoern A. Zeeb 
11696b4cac81SBjoern A. Zeeb 	IMPROVE();
11706b4cac81SBjoern A. Zeeb 	return (linuxkpi_regulatory_set_wiphy_regd_sync(wiphy, regd));
11716b4cac81SBjoern A. Zeeb }
11726b4cac81SBjoern A. Zeeb 
11736b4cac81SBjoern A. Zeeb static __inline int
11746b4cac81SBjoern A. Zeeb regulatory_set_wiphy_regd(struct wiphy *wiphy,
11756b4cac81SBjoern A. Zeeb     struct linuxkpi_ieee80211_regdomain *regd)
11766b4cac81SBjoern A. Zeeb {
11776b4cac81SBjoern A. Zeeb 
11786b4cac81SBjoern A. Zeeb 	IMPROVE();
11796b4cac81SBjoern A. Zeeb 	if (regd == NULL)
11806b4cac81SBjoern A. Zeeb 		return (EINVAL);
11816b4cac81SBjoern A. Zeeb 
11826b4cac81SBjoern A. Zeeb 	/* XXX-BZ wild guessing here based on brcmfmac. */
11836b4cac81SBjoern A. Zeeb 	if (wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED)
11846b4cac81SBjoern A. Zeeb 		wiphy->regd = regd;
11856b4cac81SBjoern A. Zeeb 	else
11866b4cac81SBjoern A. Zeeb 		return (EPERM);
11876b4cac81SBjoern A. Zeeb 
11886b4cac81SBjoern A. Zeeb 	/* XXX FIXME, do we have to do anything with reg_notifier? */
11896b4cac81SBjoern A. Zeeb 	return (0);
11906b4cac81SBjoern A. Zeeb }
11916b4cac81SBjoern A. Zeeb 
11926b4cac81SBjoern A. Zeeb static __inline int
1193*51b461b3SBjoern A. Zeeb regulatory_hint(struct wiphy *wiphy, const uint8_t *alpha2)
11946b4cac81SBjoern A. Zeeb {
11956b4cac81SBjoern A. Zeeb 	TODO();
11966b4cac81SBjoern A. Zeeb 	return (-ENXIO);
11976b4cac81SBjoern A. Zeeb }
11986b4cac81SBjoern A. Zeeb 
11996b4cac81SBjoern A. Zeeb static __inline struct linuxkpi_ieee80211_regdomain *
12006b4cac81SBjoern A. Zeeb rtnl_dereference(const struct linuxkpi_ieee80211_regdomain *regd)
12016b4cac81SBjoern A. Zeeb {
12026b4cac81SBjoern A. Zeeb 	TODO();
12036b4cac81SBjoern A. Zeeb 	return (NULL);
12046b4cac81SBjoern A. Zeeb }
12056b4cac81SBjoern A. Zeeb 
12066b4cac81SBjoern A. Zeeb static __inline struct ieee80211_reg_rule *
12076b4cac81SBjoern A. Zeeb freq_reg_info(struct wiphy *wiphy, uint32_t center_freq)
12086b4cac81SBjoern A. Zeeb {
12096b4cac81SBjoern A. Zeeb 	TODO();
12106b4cac81SBjoern A. Zeeb 	return (NULL);
12116b4cac81SBjoern A. Zeeb }
12126b4cac81SBjoern A. Zeeb 
12136b4cac81SBjoern A. Zeeb static __inline struct cfg80211_bss *
12146b4cac81SBjoern A. Zeeb cfg80211_get_bss(struct wiphy *wiphy, struct linuxkpi_ieee80211_channel *chan,
12156b4cac81SBjoern A. Zeeb     uint8_t *bssid, void *p, int x, uint32_t f1, uint32_t f2)
12166b4cac81SBjoern A. Zeeb {
12176b4cac81SBjoern A. Zeeb 	TODO();
12186b4cac81SBjoern A. Zeeb 	return (NULL);
12196b4cac81SBjoern A. Zeeb }
12206b4cac81SBjoern A. Zeeb 
12216b4cac81SBjoern A. Zeeb static __inline void
12226b4cac81SBjoern A. Zeeb cfg80211_put_bss(struct wiphy *wiphy, struct cfg80211_bss *bss)
12236b4cac81SBjoern A. Zeeb {
12246b4cac81SBjoern A. Zeeb 	TODO();
12256b4cac81SBjoern A. Zeeb }
12266b4cac81SBjoern A. Zeeb 
12276b4cac81SBjoern A. Zeeb static __inline void
12286b4cac81SBjoern A. Zeeb wiphy_apply_custom_regulatory(struct wiphy *wiphy,
12296b4cac81SBjoern A. Zeeb     const struct linuxkpi_ieee80211_regdomain *regd)
12306b4cac81SBjoern A. Zeeb {
12316b4cac81SBjoern A. Zeeb 	TODO();
12326b4cac81SBjoern A. Zeeb }
12336b4cac81SBjoern A. Zeeb 
12346b4cac81SBjoern A. Zeeb static __inline char *
12356b4cac81SBjoern A. Zeeb wiphy_name(struct wiphy *wiphy)
12366b4cac81SBjoern A. Zeeb {
12376b4cac81SBjoern A. Zeeb 	if (wiphy != NULL && wiphy->dev != NULL)
12386b4cac81SBjoern A. Zeeb 		return dev_name(wiphy->dev);
12396b4cac81SBjoern A. Zeeb 	else
12406b4cac81SBjoern A. Zeeb 		return ("wlanNA");
12416b4cac81SBjoern A. Zeeb }
12426b4cac81SBjoern A. Zeeb 
12436b4cac81SBjoern A. Zeeb static __inline void
12446b4cac81SBjoern A. Zeeb wiphy_read_of_freq_limits(struct wiphy *wiphy)
12456b4cac81SBjoern A. Zeeb {
12466b4cac81SBjoern A. Zeeb #ifdef FDT
12476b4cac81SBjoern A. Zeeb 	TODO();
12486b4cac81SBjoern A. Zeeb #endif
12496b4cac81SBjoern A. Zeeb }
12506b4cac81SBjoern A. Zeeb 
12516b4cac81SBjoern A. Zeeb static __inline uint8_t *
12526b4cac81SBjoern A. Zeeb cfg80211_find_vendor_ie(unsigned int oui, u8 oui_type,
12536b4cac81SBjoern A. Zeeb     uint8_t *data, size_t len)
12546b4cac81SBjoern A. Zeeb {
12556b4cac81SBjoern A. Zeeb 	TODO();
12566b4cac81SBjoern A. Zeeb 	return (NULL);
12576b4cac81SBjoern A. Zeeb }
12586b4cac81SBjoern A. Zeeb 
12596b4cac81SBjoern A. Zeeb static __inline void
12606b4cac81SBjoern A. Zeeb wiphy_ext_feature_set(struct wiphy *wiphy, enum nl80211_ext_feature ef)
12616b4cac81SBjoern A. Zeeb {
12626b4cac81SBjoern A. Zeeb 
12636b4cac81SBjoern A. Zeeb 	set_bit(ef, wiphy->ext_features);
12646b4cac81SBjoern A. Zeeb }
12656b4cac81SBjoern A. Zeeb 
12666b4cac81SBjoern A. Zeeb static __inline void *
12676b4cac81SBjoern A. Zeeb wiphy_net(struct wiphy *wiphy)
12686b4cac81SBjoern A. Zeeb {
12696b4cac81SBjoern A. Zeeb 	TODO();
12706b4cac81SBjoern A. Zeeb 	return (NULL);	/* XXX passed to dev_net_set() */
12716b4cac81SBjoern A. Zeeb }
12726b4cac81SBjoern A. Zeeb 
12736b4cac81SBjoern A. Zeeb static __inline int
12746b4cac81SBjoern A. Zeeb wiphy_register(struct wiphy *wiphy)
12756b4cac81SBjoern A. Zeeb {
12766b4cac81SBjoern A. Zeeb 	TODO();
12776b4cac81SBjoern A. Zeeb 	return (0);
12786b4cac81SBjoern A. Zeeb }
12796b4cac81SBjoern A. Zeeb 
12806b4cac81SBjoern A. Zeeb static __inline void
12816b4cac81SBjoern A. Zeeb wiphy_unregister(struct wiphy *wiphy)
12826b4cac81SBjoern A. Zeeb {
12836b4cac81SBjoern A. Zeeb 	TODO();
12846b4cac81SBjoern A. Zeeb }
12856b4cac81SBjoern A. Zeeb 
12866b4cac81SBjoern A. Zeeb static __inline void
12876b4cac81SBjoern A. Zeeb wiphy_warn(struct wiphy *wiphy, const char *fmt, ...)
12886b4cac81SBjoern A. Zeeb {
12896b4cac81SBjoern A. Zeeb 	TODO();
12906b4cac81SBjoern A. Zeeb }
12916b4cac81SBjoern A. Zeeb 
12926b4cac81SBjoern A. Zeeb static __inline int
12936b4cac81SBjoern A. Zeeb cfg80211_check_combinations(struct wiphy *wiphy,
12946b4cac81SBjoern A. Zeeb     struct iface_combination_params *params)
12956b4cac81SBjoern A. Zeeb {
12966b4cac81SBjoern A. Zeeb 	TODO();
12976b4cac81SBjoern A. Zeeb 	return (-ENOENT);
12986b4cac81SBjoern A. Zeeb }
12996b4cac81SBjoern A. Zeeb 
13006b4cac81SBjoern A. Zeeb static __inline uint8_t
13016b4cac81SBjoern A. Zeeb cfg80211_classify8021d(struct sk_buff *skb, void *p)
13026b4cac81SBjoern A. Zeeb {
13036b4cac81SBjoern A. Zeeb 	TODO();
13046b4cac81SBjoern A. Zeeb 	return (0);
13056b4cac81SBjoern A. Zeeb }
13066b4cac81SBjoern A. Zeeb 
13076b4cac81SBjoern A. Zeeb static __inline void
13086b4cac81SBjoern A. Zeeb cfg80211_connect_done(struct net_device *ndev,
13096b4cac81SBjoern A. Zeeb     struct cfg80211_connect_resp_params *conn_params, gfp_t gfp)
13106b4cac81SBjoern A. Zeeb {
13116b4cac81SBjoern A. Zeeb 	TODO();
13126b4cac81SBjoern A. Zeeb }
13136b4cac81SBjoern A. Zeeb 
13146b4cac81SBjoern A. Zeeb static __inline void
13156b4cac81SBjoern A. Zeeb cfg80211_crit_proto_stopped(struct wireless_dev *wdev, gfp_t gfp)
13166b4cac81SBjoern A. Zeeb {
13176b4cac81SBjoern A. Zeeb 	TODO();
13186b4cac81SBjoern A. Zeeb }
13196b4cac81SBjoern A. Zeeb 
13206b4cac81SBjoern A. Zeeb static __inline void
13216b4cac81SBjoern A. Zeeb cfg80211_disconnected(struct net_device *ndev, uint16_t reason,
13226b4cac81SBjoern A. Zeeb     void *p, int x, bool locally_generated, gfp_t gfp)
13236b4cac81SBjoern A. Zeeb {
13246b4cac81SBjoern A. Zeeb 	TODO();
13256b4cac81SBjoern A. Zeeb }
13266b4cac81SBjoern A. Zeeb 
13276b4cac81SBjoern A. Zeeb static __inline int
13286b4cac81SBjoern A. Zeeb cfg80211_get_p2p_attr(const u8 *ie, u32 ie_len,
13296b4cac81SBjoern A. Zeeb     enum ieee80211_p2p_attr_ids attr, u8 *p, size_t p_len)
13306b4cac81SBjoern A. Zeeb {
13316b4cac81SBjoern A. Zeeb 	TODO();
13326b4cac81SBjoern A. Zeeb 	return (-1);
13336b4cac81SBjoern A. Zeeb }
13346b4cac81SBjoern A. Zeeb 
13356b4cac81SBjoern A. Zeeb static __inline void
13366b4cac81SBjoern A. Zeeb cfg80211_ibss_joined(struct net_device *ndev, const uint8_t *addr,
13376b4cac81SBjoern A. Zeeb     struct linuxkpi_ieee80211_channel *chan, gfp_t gfp)
13386b4cac81SBjoern A. Zeeb {
13396b4cac81SBjoern A. Zeeb 	TODO();
13406b4cac81SBjoern A. Zeeb }
13416b4cac81SBjoern A. Zeeb 
13426b4cac81SBjoern A. Zeeb static __inline struct cfg80211_bss *
13436b4cac81SBjoern A. Zeeb cfg80211_inform_bss(struct wiphy *wiphy,
13446b4cac81SBjoern A. Zeeb     struct linuxkpi_ieee80211_channel *channel,
13456b4cac81SBjoern A. Zeeb     enum cfg80211_bss_ftypes bss_ftype, const uint8_t *bss, int _x,
13466b4cac81SBjoern A. Zeeb     uint16_t cap, uint16_t intvl, const uint8_t *ie, size_t ie_len,
13476b4cac81SBjoern A. Zeeb     int signal, gfp_t gfp)
13486b4cac81SBjoern A. Zeeb {
13496b4cac81SBjoern A. Zeeb 	TODO();
13506b4cac81SBjoern A. Zeeb 	return (NULL);
13516b4cac81SBjoern A. Zeeb }
13526b4cac81SBjoern A. Zeeb 
13536b4cac81SBjoern A. Zeeb static __inline struct cfg80211_bss *
13546b4cac81SBjoern A. Zeeb cfg80211_inform_bss_data(struct wiphy *wiphy,
13556b4cac81SBjoern A. Zeeb     struct cfg80211_inform_bss *bss_data,
13566b4cac81SBjoern A. Zeeb     enum cfg80211_bss_ftypes bss_ftype, const uint8_t *bss, int _x,
13576b4cac81SBjoern A. Zeeb     uint16_t cap, uint16_t intvl, const uint8_t *ie, size_t ie_len, gfp_t gfp)
13586b4cac81SBjoern A. Zeeb {
13596b4cac81SBjoern A. Zeeb 	TODO();
13606b4cac81SBjoern A. Zeeb 	return (NULL);
13616b4cac81SBjoern A. Zeeb }
13626b4cac81SBjoern A. Zeeb 
13636b4cac81SBjoern A. Zeeb static __inline void
13646b4cac81SBjoern A. Zeeb cfg80211_mgmt_tx_status(struct wireless_dev *wdev, uint64_t cookie,
13656b4cac81SBjoern A. Zeeb     const u8 *buf, size_t len, bool ack, gfp_t gfp)
13666b4cac81SBjoern A. Zeeb {
13676b4cac81SBjoern A. Zeeb 	TODO();
13686b4cac81SBjoern A. Zeeb }
13696b4cac81SBjoern A. Zeeb 
13706b4cac81SBjoern A. Zeeb static __inline void
13716b4cac81SBjoern A. Zeeb cfg80211_michael_mic_failure(struct net_device *ndev, const uint8_t *addr,
13726b4cac81SBjoern A. Zeeb     enum nl80211_key_type key_type, int _x, void *p, gfp_t gfp)
13736b4cac81SBjoern A. Zeeb {
13746b4cac81SBjoern A. Zeeb 	TODO();
13756b4cac81SBjoern A. Zeeb }
13766b4cac81SBjoern A. Zeeb 
13776b4cac81SBjoern A. Zeeb static __inline void
13786b4cac81SBjoern A. Zeeb cfg80211_new_sta(struct net_device *ndev, const uint8_t *addr,
13796b4cac81SBjoern A. Zeeb     struct station_info *sinfo, gfp_t gfp)
13806b4cac81SBjoern A. Zeeb {
13816b4cac81SBjoern A. Zeeb 	TODO();
13826b4cac81SBjoern A. Zeeb }
13836b4cac81SBjoern A. Zeeb 
13846b4cac81SBjoern A. Zeeb static __inline void
13856b4cac81SBjoern A. Zeeb cfg80211_del_sta(struct net_device *ndev, const uint8_t *addr, gfp_t gfp)
13866b4cac81SBjoern A. Zeeb {
13876b4cac81SBjoern A. Zeeb 	TODO();
13886b4cac81SBjoern A. Zeeb }
13896b4cac81SBjoern A. Zeeb 
13906b4cac81SBjoern A. Zeeb static __inline void
13916b4cac81SBjoern A. Zeeb cfg80211_port_authorized(struct net_device *ndev, const uint8_t *bssid,
13926b4cac81SBjoern A. Zeeb     gfp_t gfp)
13936b4cac81SBjoern A. Zeeb {
13946b4cac81SBjoern A. Zeeb 	TODO();
13956b4cac81SBjoern A. Zeeb }
13966b4cac81SBjoern A. Zeeb 
13976b4cac81SBjoern A. Zeeb static __inline void
13986b4cac81SBjoern A. Zeeb cfg80211_ready_on_channel(struct wireless_dev *wdev, uint64_t cookie,
13996b4cac81SBjoern A. Zeeb     struct linuxkpi_ieee80211_channel *channel, unsigned int duration,
14006b4cac81SBjoern A. Zeeb     gfp_t gfp)
14016b4cac81SBjoern A. Zeeb {
14026b4cac81SBjoern A. Zeeb 	TODO();
14036b4cac81SBjoern A. Zeeb }
14046b4cac81SBjoern A. Zeeb 
14056b4cac81SBjoern A. Zeeb static __inline void
14066b4cac81SBjoern A. Zeeb cfg80211_remain_on_channel_expired(struct wireless_dev *wdev,
14076b4cac81SBjoern A. Zeeb     uint64_t cookie, struct linuxkpi_ieee80211_channel *channel, gfp_t gfp)
14086b4cac81SBjoern A. Zeeb {
14096b4cac81SBjoern A. Zeeb 	TODO();
14106b4cac81SBjoern A. Zeeb }
14116b4cac81SBjoern A. Zeeb 
14126b4cac81SBjoern A. Zeeb static __inline void
14136b4cac81SBjoern A. Zeeb cfg80211_report_wowlan_wakeup(void)
14146b4cac81SBjoern A. Zeeb {
14156b4cac81SBjoern A. Zeeb 	TODO();
14166b4cac81SBjoern A. Zeeb }
14176b4cac81SBjoern A. Zeeb 
14186b4cac81SBjoern A. Zeeb static __inline void
14196b4cac81SBjoern A. Zeeb cfg80211_roamed(struct net_device *ndev, struct cfg80211_roam_info *roam_info,
14206b4cac81SBjoern A. Zeeb     gfp_t gfp)
14216b4cac81SBjoern A. Zeeb {
14226b4cac81SBjoern A. Zeeb 	TODO();
14236b4cac81SBjoern A. Zeeb }
14246b4cac81SBjoern A. Zeeb 
14256b4cac81SBjoern A. Zeeb static __inline void
14266b4cac81SBjoern A. Zeeb cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int _x,
14276b4cac81SBjoern A. Zeeb     uint8_t *p, size_t p_len, int _x2)
14286b4cac81SBjoern A. Zeeb {
14296b4cac81SBjoern A. Zeeb 	TODO();
14306b4cac81SBjoern A. Zeeb }
14316b4cac81SBjoern A. Zeeb 
14326b4cac81SBjoern A. Zeeb static __inline void
14336b4cac81SBjoern A. Zeeb cfg80211_scan_done(struct cfg80211_scan_request *scan_request,
14346b4cac81SBjoern A. Zeeb     struct cfg80211_scan_info *info)
14356b4cac81SBjoern A. Zeeb {
14366b4cac81SBjoern A. Zeeb 	TODO();
14376b4cac81SBjoern A. Zeeb }
14386b4cac81SBjoern A. Zeeb 
14396b4cac81SBjoern A. Zeeb static __inline void
14406b4cac81SBjoern A. Zeeb cfg80211_sched_scan_results(struct wiphy *wiphy, uint64_t reqid)
14416b4cac81SBjoern A. Zeeb {
14426b4cac81SBjoern A. Zeeb 	TODO();
14436b4cac81SBjoern A. Zeeb }
14446b4cac81SBjoern A. Zeeb 
14456b4cac81SBjoern A. Zeeb static __inline void
14466b4cac81SBjoern A. Zeeb cfg80211_sched_scan_stopped(struct wiphy *wiphy, int _x)
14476b4cac81SBjoern A. Zeeb {
14486b4cac81SBjoern A. Zeeb 	TODO();
14496b4cac81SBjoern A. Zeeb }
14506b4cac81SBjoern A. Zeeb 
14516b4cac81SBjoern A. Zeeb static __inline void
14526b4cac81SBjoern A. Zeeb cfg80211_unregister_wdev(struct wireless_dev *wdev)
14536b4cac81SBjoern A. Zeeb {
14546b4cac81SBjoern A. Zeeb 	TODO();
14556b4cac81SBjoern A. Zeeb }
14566b4cac81SBjoern A. Zeeb 
14576b4cac81SBjoern A. Zeeb static __inline struct sk_buff *
14586b4cac81SBjoern A. Zeeb cfg80211_vendor_cmd_alloc_reply_skb(struct wiphy *wiphy, unsigned int len)
14596b4cac81SBjoern A. Zeeb {
14606b4cac81SBjoern A. Zeeb 	TODO();
14616b4cac81SBjoern A. Zeeb 	return (NULL);
14626b4cac81SBjoern A. Zeeb }
14636b4cac81SBjoern A. Zeeb 
14646b4cac81SBjoern A. Zeeb static __inline int
14656b4cac81SBjoern A. Zeeb cfg80211_vendor_cmd_reply(struct sk_buff *skb)
14666b4cac81SBjoern A. Zeeb {
14676b4cac81SBjoern A. Zeeb 	TODO();
14686b4cac81SBjoern A. Zeeb 	return (-ENXIO);
14696b4cac81SBjoern A. Zeeb }
14706b4cac81SBjoern A. Zeeb 
14716b4cac81SBjoern A. Zeeb static __inline struct linuxkpi_ieee80211_channel *
14726b4cac81SBjoern A. Zeeb ieee80211_get_channel(struct wiphy *wiphy, uint32_t freq)
14736b4cac81SBjoern A. Zeeb {
14746b4cac81SBjoern A. Zeeb 	TODO();
14756b4cac81SBjoern A. Zeeb 	return (NULL);
14766b4cac81SBjoern A. Zeeb }
14776b4cac81SBjoern A. Zeeb 
14786b4cac81SBjoern A. Zeeb static __inline size_t
14796b4cac81SBjoern A. Zeeb ieee80211_get_hdrlen_from_skb(struct sk_buff *skb)
14806b4cac81SBjoern A. Zeeb {
14816b4cac81SBjoern A. Zeeb 
14826b4cac81SBjoern A. Zeeb 	TODO();
14836b4cac81SBjoern A. Zeeb 	return (-1);
14846b4cac81SBjoern A. Zeeb }
14856b4cac81SBjoern A. Zeeb 
14866b4cac81SBjoern A. Zeeb static __inline void
14876b4cac81SBjoern A. Zeeb cfg80211_bss_flush(struct wiphy *wiphy)
14886b4cac81SBjoern A. Zeeb {
14896b4cac81SBjoern A. Zeeb 	TODO();
14906b4cac81SBjoern A. Zeeb }
14916b4cac81SBjoern A. Zeeb 
14926b4cac81SBjoern A. Zeeb static __inline bool
14936b4cac81SBjoern A. Zeeb cfg80211_channel_is_psc(struct linuxkpi_ieee80211_channel *channel)
14946b4cac81SBjoern A. Zeeb {
14956b4cac81SBjoern A. Zeeb 
14966b4cac81SBjoern A. Zeeb 	/* Only 6Ghz. */
14976b4cac81SBjoern A. Zeeb 	if (channel->band != NL80211_BAND_6GHZ)
14986b4cac81SBjoern A. Zeeb 		return (false);
14996b4cac81SBjoern A. Zeeb 
15006b4cac81SBjoern A. Zeeb 	TODO();
15016b4cac81SBjoern A. Zeeb 	return (false);
15026b4cac81SBjoern A. Zeeb }
15036b4cac81SBjoern A. Zeeb 
15046b4cac81SBjoern A. Zeeb 
15056b4cac81SBjoern A. Zeeb /* Used for scanning at least. */
15066b4cac81SBjoern A. Zeeb static __inline void
15076b4cac81SBjoern A. Zeeb get_random_mask_addr(uint8_t *dst, const uint8_t *addr, const uint8_t *mask)
15086b4cac81SBjoern A. Zeeb {
15096b4cac81SBjoern A. Zeeb 	int i;
15106b4cac81SBjoern A. Zeeb 
15116b4cac81SBjoern A. Zeeb 	/* Get a completely random address and then overlay what we want. */
15126b4cac81SBjoern A. Zeeb 	get_random_bytes(dst, ETH_ALEN);
15136b4cac81SBjoern A. Zeeb 	for (i = 0; i < ETH_ALEN; i++)
15146b4cac81SBjoern A. Zeeb 		dst[i] = (dst[i] & ~(mask[i])) | (addr[i] & mask[i]);
15156b4cac81SBjoern A. Zeeb }
15166b4cac81SBjoern A. Zeeb 
15176b4cac81SBjoern A. Zeeb #ifndef LINUXKPI_NET80211
15186b4cac81SBjoern A. Zeeb #define	ieee80211_channel		linuxkpi_ieee80211_channel
15196b4cac81SBjoern A. Zeeb #define	ieee80211_regdomain		linuxkpi_ieee80211_regdomain
15206b4cac81SBjoern A. Zeeb /* net80211::IEEE80211_VHT_MCS_SUPPORT_0_n() conflicts */
15216b4cac81SBjoern A. Zeeb #if defined(IEEE80211_VHT_MCS_SUPPORT_0_7)
15226b4cac81SBjoern A. Zeeb #undef	IEEE80211_VHT_MCS_SUPPORT_0_7
15236b4cac81SBjoern A. Zeeb #endif
15246b4cac81SBjoern A. Zeeb #if defined(IEEE80211_VHT_MCS_SUPPORT_0_8)
15256b4cac81SBjoern A. Zeeb #undef	IEEE80211_VHT_MCS_SUPPORT_0_8
15266b4cac81SBjoern A. Zeeb #endif
15276b4cac81SBjoern A. Zeeb #if defined(IEEE80211_VHT_MCS_SUPPORT_0_9)
15286b4cac81SBjoern A. Zeeb #undef	IEEE80211_VHT_MCS_SUPPORT_0_9
15296b4cac81SBjoern A. Zeeb #endif
15306b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_MCS_SUPPORT_0_7	LKPI_IEEE80211_VHT_MCS_SUPPORT_0_7
15316b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_MCS_SUPPORT_0_8	LKPI_IEEE80211_VHT_MCS_SUPPORT_0_8
15326b4cac81SBjoern A. Zeeb #define	IEEE80211_VHT_MCS_SUPPORT_0_9	LKPI_IEEE80211_VHT_MCS_SUPPORT_0_9
15336b4cac81SBjoern A. Zeeb #endif
15346b4cac81SBjoern A. Zeeb 
15356b4cac81SBjoern A. Zeeb #endif	/* _LINUXKPI_NET_CFG80211_H */
1536