16d49e1aeSJan Lentfer /*
23ff40c12SJohn Marino  * Driver interface definition
3*a1157835SDaniel Fojt  * Copyright (c) 2003-2017, Jouni Malinen <j@w1.fi>
46d49e1aeSJan Lentfer  *
53ff40c12SJohn Marino  * This software may be distributed under the terms of the BSD license.
63ff40c12SJohn Marino  * See README for more details.
76d49e1aeSJan Lentfer  *
83ff40c12SJohn Marino  * This file defines a driver interface used by both %wpa_supplicant and
93ff40c12SJohn Marino  * hostapd. The first part of the file defines data structures used in various
103ff40c12SJohn Marino  * driver operations. This is followed by the struct wpa_driver_ops that each
113ff40c12SJohn Marino  * driver wrapper will beed to define with callback functions for requesting
123ff40c12SJohn Marino  * driver operations. After this, there are definitions for driver event
133ff40c12SJohn Marino  * reporting with wpa_supplicant_event() and some convenience helper functions
143ff40c12SJohn Marino  * that can be used to report events.
156d49e1aeSJan Lentfer  */
166d49e1aeSJan Lentfer 
176d49e1aeSJan Lentfer #ifndef DRIVER_H
186d49e1aeSJan Lentfer #define DRIVER_H
196d49e1aeSJan Lentfer 
203ff40c12SJohn Marino #define WPA_SUPPLICANT_DRIVER_VERSION 4
216d49e1aeSJan Lentfer 
223ff40c12SJohn Marino #include "common/defs.h"
23*a1157835SDaniel Fojt #include "common/ieee802_11_defs.h"
24*a1157835SDaniel Fojt #include "common/wpa_common.h"
25*a1157835SDaniel Fojt #ifdef CONFIG_MACSEC
26*a1157835SDaniel Fojt #include "pae/ieee802_1x_kay.h"
27*a1157835SDaniel Fojt #endif /* CONFIG_MACSEC */
283ff40c12SJohn Marino #include "utils/list.h"
296d49e1aeSJan Lentfer 
303ff40c12SJohn Marino #define HOSTAPD_CHAN_DISABLED 0x00000001
31*a1157835SDaniel Fojt #define HOSTAPD_CHAN_NO_IR 0x00000002
323ff40c12SJohn Marino #define HOSTAPD_CHAN_RADAR 0x00000008
333ff40c12SJohn Marino #define HOSTAPD_CHAN_HT40PLUS 0x00000010
343ff40c12SJohn Marino #define HOSTAPD_CHAN_HT40MINUS 0x00000020
353ff40c12SJohn Marino #define HOSTAPD_CHAN_HT40 0x00000040
363ff40c12SJohn Marino #define HOSTAPD_CHAN_SURVEY_LIST_INITIALIZED 0x00000080
373ff40c12SJohn Marino 
383ff40c12SJohn Marino #define HOSTAPD_CHAN_DFS_UNKNOWN 0x00000000
393ff40c12SJohn Marino #define HOSTAPD_CHAN_DFS_USABLE 0x00000100
403ff40c12SJohn Marino #define HOSTAPD_CHAN_DFS_UNAVAILABLE 0x00000200
413ff40c12SJohn Marino #define HOSTAPD_CHAN_DFS_AVAILABLE 0x00000300
423ff40c12SJohn Marino #define HOSTAPD_CHAN_DFS_MASK 0x00000300
433ff40c12SJohn Marino 
443ff40c12SJohn Marino #define HOSTAPD_CHAN_VHT_10_70 0x00000800
453ff40c12SJohn Marino #define HOSTAPD_CHAN_VHT_30_50 0x00001000
463ff40c12SJohn Marino #define HOSTAPD_CHAN_VHT_50_30 0x00002000
473ff40c12SJohn Marino #define HOSTAPD_CHAN_VHT_70_10 0x00004000
483ff40c12SJohn Marino 
49*a1157835SDaniel Fojt #define HOSTAPD_CHAN_INDOOR_ONLY 0x00010000
50*a1157835SDaniel Fojt #define HOSTAPD_CHAN_GO_CONCURRENT 0x00020000
51*a1157835SDaniel Fojt 
52*a1157835SDaniel Fojt #define HOSTAPD_CHAN_VHT_10_150 0x00100000
53*a1157835SDaniel Fojt #define HOSTAPD_CHAN_VHT_30_130 0x00200000
54*a1157835SDaniel Fojt #define HOSTAPD_CHAN_VHT_50_110 0x00400000
55*a1157835SDaniel Fojt #define HOSTAPD_CHAN_VHT_70_90  0x00800000
56*a1157835SDaniel Fojt #define HOSTAPD_CHAN_VHT_90_70  0x01000000
57*a1157835SDaniel Fojt #define HOSTAPD_CHAN_VHT_110_50 0x02000000
58*a1157835SDaniel Fojt #define HOSTAPD_CHAN_VHT_130_30 0x04000000
59*a1157835SDaniel Fojt #define HOSTAPD_CHAN_VHT_150_10 0x08000000
60*a1157835SDaniel Fojt 
61*a1157835SDaniel Fojt /* Allowed bandwidth mask */
62*a1157835SDaniel Fojt enum hostapd_chan_width_attr {
63*a1157835SDaniel Fojt 	HOSTAPD_CHAN_WIDTH_10   = BIT(0),
64*a1157835SDaniel Fojt 	HOSTAPD_CHAN_WIDTH_20   = BIT(1),
65*a1157835SDaniel Fojt 	HOSTAPD_CHAN_WIDTH_40P  = BIT(2),
66*a1157835SDaniel Fojt 	HOSTAPD_CHAN_WIDTH_40M  = BIT(3),
67*a1157835SDaniel Fojt 	HOSTAPD_CHAN_WIDTH_80   = BIT(4),
68*a1157835SDaniel Fojt 	HOSTAPD_CHAN_WIDTH_160  = BIT(5),
69*a1157835SDaniel Fojt };
70*a1157835SDaniel Fojt 
71*a1157835SDaniel Fojt /* Filter gratuitous ARP */
72*a1157835SDaniel Fojt #define WPA_DATA_FRAME_FILTER_FLAG_ARP BIT(0)
73*a1157835SDaniel Fojt /* Filter unsolicited Neighbor Advertisement */
74*a1157835SDaniel Fojt #define WPA_DATA_FRAME_FILTER_FLAG_NA BIT(1)
75*a1157835SDaniel Fojt /* Filter unicast IP packets encrypted using the GTK */
76*a1157835SDaniel Fojt #define WPA_DATA_FRAME_FILTER_FLAG_GTK BIT(2)
77*a1157835SDaniel Fojt 
78*a1157835SDaniel Fojt #define HOSTAPD_DFS_REGION_FCC	1
79*a1157835SDaniel Fojt #define HOSTAPD_DFS_REGION_ETSI	2
80*a1157835SDaniel Fojt #define HOSTAPD_DFS_REGION_JP	3
81*a1157835SDaniel Fojt 
82*a1157835SDaniel Fojt /**
83*a1157835SDaniel Fojt  * enum reg_change_initiator - Regulatory change initiator
84*a1157835SDaniel Fojt  */
853ff40c12SJohn Marino enum reg_change_initiator {
863ff40c12SJohn Marino 	REGDOM_SET_BY_CORE,
873ff40c12SJohn Marino 	REGDOM_SET_BY_USER,
883ff40c12SJohn Marino 	REGDOM_SET_BY_DRIVER,
893ff40c12SJohn Marino 	REGDOM_SET_BY_COUNTRY_IE,
903ff40c12SJohn Marino 	REGDOM_BEACON_HINT,
913ff40c12SJohn Marino };
923ff40c12SJohn Marino 
933ff40c12SJohn Marino /**
94*a1157835SDaniel Fojt  * enum reg_type - Regulatory change types
95*a1157835SDaniel Fojt  */
96*a1157835SDaniel Fojt enum reg_type {
97*a1157835SDaniel Fojt 	REGDOM_TYPE_UNKNOWN,
98*a1157835SDaniel Fojt 	REGDOM_TYPE_COUNTRY,
99*a1157835SDaniel Fojt 	REGDOM_TYPE_WORLD,
100*a1157835SDaniel Fojt 	REGDOM_TYPE_CUSTOM_WORLD,
101*a1157835SDaniel Fojt 	REGDOM_TYPE_INTERSECTION,
102*a1157835SDaniel Fojt };
103*a1157835SDaniel Fojt 
104*a1157835SDaniel Fojt /**
105*a1157835SDaniel Fojt  * struct hostapd_wmm_rule - WMM regulatory rule
106*a1157835SDaniel Fojt  * @min_cwmin: Lower bound of CW_min value
107*a1157835SDaniel Fojt  * @min_cwmax: Lower bound of CW_max value
108*a1157835SDaniel Fojt  * @min_aifs: Lower bound of AIFS value
109*a1157835SDaniel Fojt  * @max_txop: Upper bound of TXOP, value in units of 32 usec
110*a1157835SDaniel Fojt  */
111*a1157835SDaniel Fojt struct hostapd_wmm_rule {
112*a1157835SDaniel Fojt 	int min_cwmin;
113*a1157835SDaniel Fojt 	int min_cwmax;
114*a1157835SDaniel Fojt 	int min_aifs;
115*a1157835SDaniel Fojt 	int max_txop;
116*a1157835SDaniel Fojt };
117*a1157835SDaniel Fojt 
118*a1157835SDaniel Fojt /**
1193ff40c12SJohn Marino  * struct hostapd_channel_data - Channel information
1203ff40c12SJohn Marino  */
1213ff40c12SJohn Marino struct hostapd_channel_data {
1223ff40c12SJohn Marino 	/**
1233ff40c12SJohn Marino 	 * chan - Channel number (IEEE 802.11)
1243ff40c12SJohn Marino 	 */
1253ff40c12SJohn Marino 	short chan;
1263ff40c12SJohn Marino 
1273ff40c12SJohn Marino 	/**
1283ff40c12SJohn Marino 	 * freq - Frequency in MHz
1293ff40c12SJohn Marino 	 */
1303ff40c12SJohn Marino 	int freq;
1313ff40c12SJohn Marino 
1323ff40c12SJohn Marino 	/**
1333ff40c12SJohn Marino 	 * flag - Channel flags (HOSTAPD_CHAN_*)
1343ff40c12SJohn Marino 	 */
1353ff40c12SJohn Marino 	int flag;
1363ff40c12SJohn Marino 
1373ff40c12SJohn Marino 	/**
138*a1157835SDaniel Fojt 	 * allowed_bw - Allowed channel width bitmask
139*a1157835SDaniel Fojt 	 *
140*a1157835SDaniel Fojt 	 * See enum hostapd_chan_width_attr.
141*a1157835SDaniel Fojt 	 */
142*a1157835SDaniel Fojt 	u32 allowed_bw;
143*a1157835SDaniel Fojt 
144*a1157835SDaniel Fojt 	/**
1453ff40c12SJohn Marino 	 * max_tx_power - Regulatory transmit power limit in dBm
1463ff40c12SJohn Marino 	 */
1473ff40c12SJohn Marino 	u8 max_tx_power;
1483ff40c12SJohn Marino 
149*a1157835SDaniel Fojt 	/**
150*a1157835SDaniel Fojt 	 * survey_list - Linked list of surveys (struct freq_survey)
1513ff40c12SJohn Marino 	 */
1523ff40c12SJohn Marino 	struct dl_list survey_list;
1533ff40c12SJohn Marino 
1543ff40c12SJohn Marino 	/**
1553ff40c12SJohn Marino 	 * min_nf - Minimum observed noise floor, in dBm, based on all
1563ff40c12SJohn Marino 	 * surveyed channel data
1573ff40c12SJohn Marino 	 */
1583ff40c12SJohn Marino 	s8 min_nf;
1593ff40c12SJohn Marino 
1603ff40c12SJohn Marino #ifdef CONFIG_ACS
1613ff40c12SJohn Marino 	/**
1623ff40c12SJohn Marino 	 * interference_factor - Computed interference factor on this
1633ff40c12SJohn Marino 	 * channel (used internally in src/ap/acs.c; driver wrappers do not
1643ff40c12SJohn Marino 	 * need to set this)
1653ff40c12SJohn Marino 	 */
1663ff40c12SJohn Marino 	long double interference_factor;
1673ff40c12SJohn Marino #endif /* CONFIG_ACS */
168*a1157835SDaniel Fojt 
169*a1157835SDaniel Fojt 	/**
170*a1157835SDaniel Fojt 	 * dfs_cac_ms - DFS CAC time in milliseconds
171*a1157835SDaniel Fojt 	 */
172*a1157835SDaniel Fojt 	unsigned int dfs_cac_ms;
173*a1157835SDaniel Fojt 
174*a1157835SDaniel Fojt 	/**
175*a1157835SDaniel Fojt 	 * wmm_rules_valid - Indicates wmm_rules state
176*a1157835SDaniel Fojt 	 */
177*a1157835SDaniel Fojt 	int wmm_rules_valid;
178*a1157835SDaniel Fojt 
179*a1157835SDaniel Fojt 	/**
180*a1157835SDaniel Fojt 	 * wmm_rules - WMM regulatory rules
181*a1157835SDaniel Fojt 	 */
182*a1157835SDaniel Fojt 	struct hostapd_wmm_rule wmm_rules[WMM_AC_NUM];
183*a1157835SDaniel Fojt };
184*a1157835SDaniel Fojt 
185*a1157835SDaniel Fojt #define HE_MAX_MAC_CAPAB_SIZE	6
186*a1157835SDaniel Fojt #define HE_MAX_PHY_CAPAB_SIZE	11
187*a1157835SDaniel Fojt #define HE_MAX_MCS_CAPAB_SIZE	12
188*a1157835SDaniel Fojt #define HE_MAX_PPET_CAPAB_SIZE	25
189*a1157835SDaniel Fojt 
190*a1157835SDaniel Fojt /**
191*a1157835SDaniel Fojt  * struct he_capabilities - IEEE 802.11ax HE capabilities
192*a1157835SDaniel Fojt  */
193*a1157835SDaniel Fojt struct he_capabilities {
194*a1157835SDaniel Fojt 	u8 he_supported;
195*a1157835SDaniel Fojt 	u8 phy_cap[HE_MAX_PHY_CAPAB_SIZE];
196*a1157835SDaniel Fojt 	u8 mac_cap[HE_MAX_MAC_CAPAB_SIZE];
197*a1157835SDaniel Fojt 	u8 mcs[HE_MAX_MCS_CAPAB_SIZE];
198*a1157835SDaniel Fojt 	u8 ppet[HE_MAX_PPET_CAPAB_SIZE];
1993ff40c12SJohn Marino };
2003ff40c12SJohn Marino 
2013ff40c12SJohn Marino #define HOSTAPD_MODE_FLAG_HT_INFO_KNOWN BIT(0)
2023ff40c12SJohn Marino #define HOSTAPD_MODE_FLAG_VHT_INFO_KNOWN BIT(1)
2033ff40c12SJohn Marino 
204*a1157835SDaniel Fojt 
205*a1157835SDaniel Fojt enum ieee80211_op_mode {
206*a1157835SDaniel Fojt 	IEEE80211_MODE_INFRA = 0,
207*a1157835SDaniel Fojt 	IEEE80211_MODE_IBSS = 1,
208*a1157835SDaniel Fojt 	IEEE80211_MODE_AP = 2,
209*a1157835SDaniel Fojt 	IEEE80211_MODE_MESH = 5,
210*a1157835SDaniel Fojt 
211*a1157835SDaniel Fojt 	/* only add new entries before IEEE80211_MODE_NUM */
212*a1157835SDaniel Fojt 	IEEE80211_MODE_NUM
213*a1157835SDaniel Fojt };
214*a1157835SDaniel Fojt 
2153ff40c12SJohn Marino /**
2163ff40c12SJohn Marino  * struct hostapd_hw_modes - Supported hardware mode information
2173ff40c12SJohn Marino  */
2183ff40c12SJohn Marino struct hostapd_hw_modes {
2193ff40c12SJohn Marino 	/**
2203ff40c12SJohn Marino 	 * mode - Hardware mode
2213ff40c12SJohn Marino 	 */
2223ff40c12SJohn Marino 	enum hostapd_hw_mode mode;
2233ff40c12SJohn Marino 
2243ff40c12SJohn Marino 	/**
2253ff40c12SJohn Marino 	 * num_channels - Number of entries in the channels array
2263ff40c12SJohn Marino 	 */
2273ff40c12SJohn Marino 	int num_channels;
2283ff40c12SJohn Marino 
2293ff40c12SJohn Marino 	/**
2303ff40c12SJohn Marino 	 * channels - Array of supported channels
2313ff40c12SJohn Marino 	 */
2323ff40c12SJohn Marino 	struct hostapd_channel_data *channels;
2333ff40c12SJohn Marino 
2343ff40c12SJohn Marino 	/**
2353ff40c12SJohn Marino 	 * num_rates - Number of entries in the rates array
2363ff40c12SJohn Marino 	 */
2373ff40c12SJohn Marino 	int num_rates;
2383ff40c12SJohn Marino 
2393ff40c12SJohn Marino 	/**
2403ff40c12SJohn Marino 	 * rates - Array of supported rates in 100 kbps units
2413ff40c12SJohn Marino 	 */
2423ff40c12SJohn Marino 	int *rates;
2433ff40c12SJohn Marino 
2443ff40c12SJohn Marino 	/**
2453ff40c12SJohn Marino 	 * ht_capab - HT (IEEE 802.11n) capabilities
2463ff40c12SJohn Marino 	 */
2473ff40c12SJohn Marino 	u16 ht_capab;
2483ff40c12SJohn Marino 
2493ff40c12SJohn Marino 	/**
2503ff40c12SJohn Marino 	 * mcs_set - MCS (IEEE 802.11n) rate parameters
2513ff40c12SJohn Marino 	 */
2523ff40c12SJohn Marino 	u8 mcs_set[16];
2533ff40c12SJohn Marino 
2543ff40c12SJohn Marino 	/**
2553ff40c12SJohn Marino 	 * a_mpdu_params - A-MPDU (IEEE 802.11n) parameters
2563ff40c12SJohn Marino 	 */
2573ff40c12SJohn Marino 	u8 a_mpdu_params;
2583ff40c12SJohn Marino 
2593ff40c12SJohn Marino 	/**
2603ff40c12SJohn Marino 	 * vht_capab - VHT (IEEE 802.11ac) capabilities
2613ff40c12SJohn Marino 	 */
2623ff40c12SJohn Marino 	u32 vht_capab;
2633ff40c12SJohn Marino 
2643ff40c12SJohn Marino 	/**
2653ff40c12SJohn Marino 	 * vht_mcs_set - VHT MCS (IEEE 802.11ac) rate parameters
2663ff40c12SJohn Marino 	 */
2673ff40c12SJohn Marino 	u8 vht_mcs_set[8];
2683ff40c12SJohn Marino 
2693ff40c12SJohn Marino 	unsigned int flags; /* HOSTAPD_MODE_FLAG_* */
270*a1157835SDaniel Fojt 
271*a1157835SDaniel Fojt 	/**
272*a1157835SDaniel Fojt 	 * he_capab - HE (IEEE 802.11ax) capabilities
273*a1157835SDaniel Fojt 	 */
274*a1157835SDaniel Fojt 	struct he_capabilities he_capab[IEEE80211_MODE_NUM];
2753ff40c12SJohn Marino };
2763ff40c12SJohn Marino 
2776d49e1aeSJan Lentfer 
2786d49e1aeSJan Lentfer #define IEEE80211_CAP_ESS	0x0001
2796d49e1aeSJan Lentfer #define IEEE80211_CAP_IBSS	0x0002
2806d49e1aeSJan Lentfer #define IEEE80211_CAP_PRIVACY	0x0010
281*a1157835SDaniel Fojt #define IEEE80211_CAP_RRM	0x1000
2826d49e1aeSJan Lentfer 
2833ff40c12SJohn Marino /* DMG (60 GHz) IEEE 802.11ad */
2843ff40c12SJohn Marino /* type - bits 0..1 */
2853ff40c12SJohn Marino #define IEEE80211_CAP_DMG_MASK	0x0003
2863ff40c12SJohn Marino #define IEEE80211_CAP_DMG_IBSS	0x0001 /* Tx by: STA */
2873ff40c12SJohn Marino #define IEEE80211_CAP_DMG_PBSS	0x0002 /* Tx by: PCP */
2883ff40c12SJohn Marino #define IEEE80211_CAP_DMG_AP	0x0003 /* Tx by: AP */
2896d49e1aeSJan Lentfer 
2903ff40c12SJohn Marino #define WPA_SCAN_QUAL_INVALID		BIT(0)
2913ff40c12SJohn Marino #define WPA_SCAN_NOISE_INVALID		BIT(1)
2923ff40c12SJohn Marino #define WPA_SCAN_LEVEL_INVALID		BIT(2)
2933ff40c12SJohn Marino #define WPA_SCAN_LEVEL_DBM		BIT(3)
2943ff40c12SJohn Marino #define WPA_SCAN_ASSOCIATED		BIT(5)
2956d49e1aeSJan Lentfer 
2966d49e1aeSJan Lentfer /**
2976d49e1aeSJan Lentfer  * struct wpa_scan_res - Scan result for an BSS/IBSS
2983ff40c12SJohn Marino  * @flags: information flags about the BSS/IBSS (WPA_SCAN_*)
2996d49e1aeSJan Lentfer  * @bssid: BSSID
3006d49e1aeSJan Lentfer  * @freq: frequency of the channel in MHz (e.g., 2412 = channel 1)
3016d49e1aeSJan Lentfer  * @beacon_int: beacon interval in TUs (host byte order)
3026d49e1aeSJan Lentfer  * @caps: capability information field in host byte order
3036d49e1aeSJan Lentfer  * @qual: signal quality
3046d49e1aeSJan Lentfer  * @noise: noise level
3056d49e1aeSJan Lentfer  * @level: signal level
3066d49e1aeSJan Lentfer  * @tsf: Timestamp
3073ff40c12SJohn Marino  * @age: Age of the information in milliseconds (i.e., how many milliseconds
3083ff40c12SJohn Marino  * ago the last Beacon or Probe Response frame was received)
309*a1157835SDaniel Fojt  * @est_throughput: Estimated throughput in kbps (this is calculated during
310*a1157835SDaniel Fojt  * scan result processing if left zero by the driver wrapper)
311*a1157835SDaniel Fojt  * @snr: Signal-to-noise ratio in dB (calculated during scan result processing)
312*a1157835SDaniel Fojt  * @parent_tsf: Time when the Beacon/Probe Response frame was received in terms
313*a1157835SDaniel Fojt  * of TSF of the BSS specified by %tsf_bssid.
314*a1157835SDaniel Fojt  * @tsf_bssid: The BSS that %parent_tsf TSF time refers to.
3156d49e1aeSJan Lentfer  * @ie_len: length of the following IE field in octets
3163ff40c12SJohn Marino  * @beacon_ie_len: length of the following Beacon IE field in octets
3176d49e1aeSJan Lentfer  *
3186d49e1aeSJan Lentfer  * This structure is used as a generic format for scan results from the
3196d49e1aeSJan Lentfer  * driver. Each driver interface implementation is responsible for converting
3206d49e1aeSJan Lentfer  * the driver or OS specific scan results into this format.
3216d49e1aeSJan Lentfer  *
3226d49e1aeSJan Lentfer  * If the driver does not support reporting all IEs, the IE data structure is
3236d49e1aeSJan Lentfer  * constructed of the IEs that are available. This field will also need to
3246d49e1aeSJan Lentfer  * include SSID in IE format. All drivers are encouraged to be extended to
3256d49e1aeSJan Lentfer  * report all IEs to make it easier to support future additions.
326*a1157835SDaniel Fojt  *
327*a1157835SDaniel Fojt  * This structure data is followed by ie_len octets of IEs from Probe Response
328*a1157835SDaniel Fojt  * frame (or if the driver does not indicate source of IEs, these may also be
329*a1157835SDaniel Fojt  * from Beacon frame). After the first set of IEs, another set of IEs may follow
330*a1157835SDaniel Fojt  * (with beacon_ie_len octets of data) if the driver provides both IE sets.
3316d49e1aeSJan Lentfer  */
3326d49e1aeSJan Lentfer struct wpa_scan_res {
3333ff40c12SJohn Marino 	unsigned int flags;
3346d49e1aeSJan Lentfer 	u8 bssid[ETH_ALEN];
3356d49e1aeSJan Lentfer 	int freq;
3366d49e1aeSJan Lentfer 	u16 beacon_int;
3376d49e1aeSJan Lentfer 	u16 caps;
3386d49e1aeSJan Lentfer 	int qual;
3396d49e1aeSJan Lentfer 	int noise;
3406d49e1aeSJan Lentfer 	int level;
3416d49e1aeSJan Lentfer 	u64 tsf;
3423ff40c12SJohn Marino 	unsigned int age;
343*a1157835SDaniel Fojt 	unsigned int est_throughput;
344*a1157835SDaniel Fojt 	int snr;
345*a1157835SDaniel Fojt 	u64 parent_tsf;
346*a1157835SDaniel Fojt 	u8 tsf_bssid[ETH_ALEN];
3476d49e1aeSJan Lentfer 	size_t ie_len;
3483ff40c12SJohn Marino 	size_t beacon_ie_len;
349*a1157835SDaniel Fojt 	/* Followed by ie_len + beacon_ie_len octets of IE data */
3506d49e1aeSJan Lentfer };
3516d49e1aeSJan Lentfer 
3526d49e1aeSJan Lentfer /**
3536d49e1aeSJan Lentfer  * struct wpa_scan_results - Scan results
3546d49e1aeSJan Lentfer  * @res: Array of pointers to allocated variable length scan result entries
3556d49e1aeSJan Lentfer  * @num: Number of entries in the scan result array
3563ff40c12SJohn Marino  * @fetch_time: Time when the results were fetched from the driver
3576d49e1aeSJan Lentfer  */
3586d49e1aeSJan Lentfer struct wpa_scan_results {
3596d49e1aeSJan Lentfer 	struct wpa_scan_res **res;
3606d49e1aeSJan Lentfer 	size_t num;
3613ff40c12SJohn Marino 	struct os_reltime fetch_time;
3626d49e1aeSJan Lentfer };
3636d49e1aeSJan Lentfer 
3646d49e1aeSJan Lentfer /**
3656d49e1aeSJan Lentfer  * struct wpa_interface_info - Network interface information
3666d49e1aeSJan Lentfer  * @next: Pointer to the next interface or NULL if this is the last one
3676d49e1aeSJan Lentfer  * @ifname: Interface name that can be used with init() or init2()
3686d49e1aeSJan Lentfer  * @desc: Human readable adapter description (e.g., vendor/model) or NULL if
3696d49e1aeSJan Lentfer  *	not available
3706d49e1aeSJan Lentfer  * @drv_name: struct wpa_driver_ops::name (note: unlike other strings, this one
3716d49e1aeSJan Lentfer  *	is not an allocated copy, i.e., get_interfaces() caller will not free
3726d49e1aeSJan Lentfer  *	this)
3736d49e1aeSJan Lentfer  */
3746d49e1aeSJan Lentfer struct wpa_interface_info {
3756d49e1aeSJan Lentfer 	struct wpa_interface_info *next;
3766d49e1aeSJan Lentfer 	char *ifname;
3776d49e1aeSJan Lentfer 	char *desc;
3786d49e1aeSJan Lentfer 	const char *drv_name;
3796d49e1aeSJan Lentfer };
3806d49e1aeSJan Lentfer 
3813ff40c12SJohn Marino #define WPAS_MAX_SCAN_SSIDS 16
3823ff40c12SJohn Marino 
3833ff40c12SJohn Marino /**
384*a1157835SDaniel Fojt  * struct wpa_driver_scan_ssid - SSIDs to scan for
385*a1157835SDaniel Fojt  * @ssid - specific SSID to scan for (ProbeReq)
386*a1157835SDaniel Fojt  *	%NULL or zero-length SSID is used to indicate active scan
387*a1157835SDaniel Fojt  *	with wildcard SSID.
388*a1157835SDaniel Fojt  * @ssid_len - Length of the SSID in octets
389*a1157835SDaniel Fojt  */
390*a1157835SDaniel Fojt struct wpa_driver_scan_ssid {
391*a1157835SDaniel Fojt 	const u8 *ssid;
392*a1157835SDaniel Fojt 	size_t ssid_len;
393*a1157835SDaniel Fojt };
394*a1157835SDaniel Fojt 
395*a1157835SDaniel Fojt /**
3963ff40c12SJohn Marino  * struct wpa_driver_scan_params - Scan parameters
3973ff40c12SJohn Marino  * Data for struct wpa_driver_ops::scan2().
3983ff40c12SJohn Marino  */
3993ff40c12SJohn Marino struct wpa_driver_scan_params {
4003ff40c12SJohn Marino 	/**
4013ff40c12SJohn Marino 	 * ssids - SSIDs to scan for
4023ff40c12SJohn Marino 	 */
403*a1157835SDaniel Fojt 	struct wpa_driver_scan_ssid ssids[WPAS_MAX_SCAN_SSIDS];
4043ff40c12SJohn Marino 
4053ff40c12SJohn Marino 	/**
4063ff40c12SJohn Marino 	 * num_ssids - Number of entries in ssids array
4073ff40c12SJohn Marino 	 * Zero indicates a request for a passive scan.
4083ff40c12SJohn Marino 	 */
4093ff40c12SJohn Marino 	size_t num_ssids;
4103ff40c12SJohn Marino 
4113ff40c12SJohn Marino 	/**
4123ff40c12SJohn Marino 	 * extra_ies - Extra IE(s) to add into Probe Request or %NULL
4133ff40c12SJohn Marino 	 */
4143ff40c12SJohn Marino 	const u8 *extra_ies;
4153ff40c12SJohn Marino 
4163ff40c12SJohn Marino 	/**
4173ff40c12SJohn Marino 	 * extra_ies_len - Length of extra_ies in octets
4183ff40c12SJohn Marino 	 */
4193ff40c12SJohn Marino 	size_t extra_ies_len;
4203ff40c12SJohn Marino 
4213ff40c12SJohn Marino 	/**
4223ff40c12SJohn Marino 	 * freqs - Array of frequencies to scan or %NULL for all frequencies
4233ff40c12SJohn Marino 	 *
4243ff40c12SJohn Marino 	 * The frequency is set in MHz. The array is zero-terminated.
4253ff40c12SJohn Marino 	 */
4263ff40c12SJohn Marino 	int *freqs;
4273ff40c12SJohn Marino 
4283ff40c12SJohn Marino 	/**
4293ff40c12SJohn Marino 	 * filter_ssids - Filter for reporting SSIDs
4303ff40c12SJohn Marino 	 *
4313ff40c12SJohn Marino 	 * This optional parameter can be used to request the driver wrapper to
4323ff40c12SJohn Marino 	 * filter scan results to include only the specified SSIDs. %NULL
4333ff40c12SJohn Marino 	 * indicates that no filtering is to be done. This can be used to
4343ff40c12SJohn Marino 	 * reduce memory needs for scan results in environments that have large
4353ff40c12SJohn Marino 	 * number of APs with different SSIDs.
4363ff40c12SJohn Marino 	 *
4373ff40c12SJohn Marino 	 * The driver wrapper is allowed to take this allocated buffer into its
4383ff40c12SJohn Marino 	 * own use by setting the pointer to %NULL. In that case, the driver
4393ff40c12SJohn Marino 	 * wrapper is responsible for freeing the buffer with os_free() once it
4403ff40c12SJohn Marino 	 * is not needed anymore.
4413ff40c12SJohn Marino 	 */
4423ff40c12SJohn Marino 	struct wpa_driver_scan_filter {
443*a1157835SDaniel Fojt 		u8 ssid[SSID_MAX_LEN];
4443ff40c12SJohn Marino 		size_t ssid_len;
4453ff40c12SJohn Marino 	} *filter_ssids;
4463ff40c12SJohn Marino 
4473ff40c12SJohn Marino 	/**
4483ff40c12SJohn Marino 	 * num_filter_ssids - Number of entries in filter_ssids array
4493ff40c12SJohn Marino 	 */
4503ff40c12SJohn Marino 	size_t num_filter_ssids;
4513ff40c12SJohn Marino 
4523ff40c12SJohn Marino 	/**
4533ff40c12SJohn Marino 	 * filter_rssi - Filter by RSSI
4543ff40c12SJohn Marino 	 *
4553ff40c12SJohn Marino 	 * The driver may filter scan results in firmware to reduce host
4563ff40c12SJohn Marino 	 * wakeups and thereby save power. Specify the RSSI threshold in s32
4573ff40c12SJohn Marino 	 * dBm.
4583ff40c12SJohn Marino 	 */
4593ff40c12SJohn Marino 	s32 filter_rssi;
4603ff40c12SJohn Marino 
4613ff40c12SJohn Marino 	/**
4623ff40c12SJohn Marino 	 * p2p_probe - Used to disable CCK (802.11b) rates for P2P probes
4633ff40c12SJohn Marino 	 *
4643ff40c12SJohn Marino 	 * When set, the driver is expected to remove rates 1, 2, 5.5, and 11
4653ff40c12SJohn Marino 	 * Mbps from the support rates element(s) in the Probe Request frames
4663ff40c12SJohn Marino 	 * and not to transmit the frames at any of those rates.
4673ff40c12SJohn Marino 	 */
468*a1157835SDaniel Fojt 	unsigned int p2p_probe:1;
4693ff40c12SJohn Marino 
4703ff40c12SJohn Marino 	/**
4713ff40c12SJohn Marino 	 * only_new_results - Request driver to report only new results
4723ff40c12SJohn Marino 	 *
4733ff40c12SJohn Marino 	 * This is used to request the driver to report only BSSes that have
4743ff40c12SJohn Marino 	 * been detected after this scan request has been started, i.e., to
4753ff40c12SJohn Marino 	 * flush old cached BSS entries.
4763ff40c12SJohn Marino 	 */
477*a1157835SDaniel Fojt 	unsigned int only_new_results:1;
478*a1157835SDaniel Fojt 
479*a1157835SDaniel Fojt 	/**
480*a1157835SDaniel Fojt 	 * low_priority - Requests driver to use a lower scan priority
481*a1157835SDaniel Fojt 	 *
482*a1157835SDaniel Fojt 	 * This is used to request the driver to use a lower scan priority
483*a1157835SDaniel Fojt 	 * if it supports such a thing.
484*a1157835SDaniel Fojt 	 */
485*a1157835SDaniel Fojt 	unsigned int low_priority:1;
486*a1157835SDaniel Fojt 
487*a1157835SDaniel Fojt 	/**
488*a1157835SDaniel Fojt 	 * mac_addr_rand - Requests driver to randomize MAC address
489*a1157835SDaniel Fojt 	 */
490*a1157835SDaniel Fojt 	unsigned int mac_addr_rand:1;
491*a1157835SDaniel Fojt 
492*a1157835SDaniel Fojt 	/**
493*a1157835SDaniel Fojt 	 * mac_addr - MAC address used with randomization. The address cannot be
494*a1157835SDaniel Fojt 	 * a multicast one, i.e., bit 0 of byte 0 should not be set.
495*a1157835SDaniel Fojt 	 */
496*a1157835SDaniel Fojt 	const u8 *mac_addr;
497*a1157835SDaniel Fojt 
498*a1157835SDaniel Fojt 	/**
499*a1157835SDaniel Fojt 	 * mac_addr_mask - MAC address mask used with randomization.
500*a1157835SDaniel Fojt 	 *
501*a1157835SDaniel Fojt 	 * Bits that are 0 in the mask should be randomized. Bits that are 1 in
502*a1157835SDaniel Fojt 	 * the mask should be taken as is from mac_addr. The mask should not
503*a1157835SDaniel Fojt 	 * allow the generation of a multicast address, i.e., bit 0 of byte 0
504*a1157835SDaniel Fojt 	 * must be set.
505*a1157835SDaniel Fojt 	 */
506*a1157835SDaniel Fojt 	const u8 *mac_addr_mask;
507*a1157835SDaniel Fojt 
508*a1157835SDaniel Fojt 	/**
509*a1157835SDaniel Fojt 	 * sched_scan_plans - Scan plans for scheduled scan
510*a1157835SDaniel Fojt 	 *
511*a1157835SDaniel Fojt 	 * Each scan plan consists of the number of iterations to scan and the
512*a1157835SDaniel Fojt 	 * interval between scans. When a scan plan finishes (i.e., it was run
513*a1157835SDaniel Fojt 	 * for the specified number of iterations), the next scan plan is
514*a1157835SDaniel Fojt 	 * executed. The scan plans are executed in the order they appear in
515*a1157835SDaniel Fojt 	 * the array (lower index first). The last scan plan will run infinitely
516*a1157835SDaniel Fojt 	 * (until requested to stop), thus must not specify the number of
517*a1157835SDaniel Fojt 	 * iterations. All other scan plans must specify the number of
518*a1157835SDaniel Fojt 	 * iterations.
519*a1157835SDaniel Fojt 	 */
520*a1157835SDaniel Fojt 	struct sched_scan_plan {
521*a1157835SDaniel Fojt 		 u32 interval; /* In seconds */
522*a1157835SDaniel Fojt 		 u32 iterations; /* Zero to run infinitely */
523*a1157835SDaniel Fojt 	 } *sched_scan_plans;
524*a1157835SDaniel Fojt 
525*a1157835SDaniel Fojt 	/**
526*a1157835SDaniel Fojt 	 * sched_scan_plans_num - Number of scan plans in sched_scan_plans array
527*a1157835SDaniel Fojt 	 */
528*a1157835SDaniel Fojt 	 unsigned int sched_scan_plans_num;
529*a1157835SDaniel Fojt 
530*a1157835SDaniel Fojt 	/**
531*a1157835SDaniel Fojt 	 * sched_scan_start_delay - Delay to use before starting the first scan
532*a1157835SDaniel Fojt 	 *
533*a1157835SDaniel Fojt 	 * Delay (in seconds) before scheduling first scan plan cycle. The
534*a1157835SDaniel Fojt 	 * driver may ignore this parameter and start immediately (or at any
535*a1157835SDaniel Fojt 	 * other time), if this feature is not supported.
536*a1157835SDaniel Fojt 	 */
537*a1157835SDaniel Fojt 	 u32 sched_scan_start_delay;
538*a1157835SDaniel Fojt 
539*a1157835SDaniel Fojt 	/**
540*a1157835SDaniel Fojt 	 * bssid - Specific BSSID to scan for
541*a1157835SDaniel Fojt 	 *
542*a1157835SDaniel Fojt 	 * This optional parameter can be used to replace the default wildcard
543*a1157835SDaniel Fojt 	 * BSSID with a specific BSSID to scan for if results are needed from
544*a1157835SDaniel Fojt 	 * only a single BSS.
545*a1157835SDaniel Fojt 	 */
546*a1157835SDaniel Fojt 	const u8 *bssid;
547*a1157835SDaniel Fojt 
548*a1157835SDaniel Fojt 	/**
549*a1157835SDaniel Fojt 	 * scan_cookie - Unique identification representing the scan request
550*a1157835SDaniel Fojt 	 *
551*a1157835SDaniel Fojt 	 * This scan_cookie carries a unique identification representing the
552*a1157835SDaniel Fojt 	 * scan request if the host driver/kernel supports concurrent scan
553*a1157835SDaniel Fojt 	 * requests. This cookie is returned from the corresponding driver
554*a1157835SDaniel Fojt 	 * interface.
555*a1157835SDaniel Fojt 	 *
556*a1157835SDaniel Fojt 	 * Note: Unlike other parameters in this structure, scan_cookie is used
557*a1157835SDaniel Fojt 	 * only to return information instead of setting parameters for the
558*a1157835SDaniel Fojt 	 * scan.
559*a1157835SDaniel Fojt 	 */
560*a1157835SDaniel Fojt 	u64 scan_cookie;
561*a1157835SDaniel Fojt 
562*a1157835SDaniel Fojt 	 /**
563*a1157835SDaniel Fojt 	  * duration - Dwell time on each channel
564*a1157835SDaniel Fojt 	  *
565*a1157835SDaniel Fojt 	  * This optional parameter can be used to set the dwell time on each
566*a1157835SDaniel Fojt 	  * channel. In TUs.
567*a1157835SDaniel Fojt 	  */
568*a1157835SDaniel Fojt 	 u16 duration;
569*a1157835SDaniel Fojt 
570*a1157835SDaniel Fojt 	 /**
571*a1157835SDaniel Fojt 	  * duration_mandatory - Whether the specified duration is mandatory
572*a1157835SDaniel Fojt 	  *
573*a1157835SDaniel Fojt 	  * If this is set, the duration specified by the %duration field is
574*a1157835SDaniel Fojt 	  * mandatory (and the driver should reject the scan request if it is
575*a1157835SDaniel Fojt 	  * unable to comply with the specified duration), otherwise it is the
576*a1157835SDaniel Fojt 	  * maximum duration and the actual duration may be shorter.
577*a1157835SDaniel Fojt 	  */
578*a1157835SDaniel Fojt 	 unsigned int duration_mandatory:1;
579*a1157835SDaniel Fojt 
580*a1157835SDaniel Fojt 	/**
581*a1157835SDaniel Fojt 	 * relative_rssi_set - Whether relative RSSI parameters are set
582*a1157835SDaniel Fojt 	 */
583*a1157835SDaniel Fojt 	unsigned int relative_rssi_set:1;
584*a1157835SDaniel Fojt 
585*a1157835SDaniel Fojt 	/**
586*a1157835SDaniel Fojt 	 * relative_rssi - Relative RSSI for reporting better BSSs
587*a1157835SDaniel Fojt 	 *
588*a1157835SDaniel Fojt 	 * Amount of RSSI by which a BSS should be better than the current
589*a1157835SDaniel Fojt 	 * connected BSS to report the new BSS to user space.
590*a1157835SDaniel Fojt 	 */
591*a1157835SDaniel Fojt 	s8 relative_rssi;
592*a1157835SDaniel Fojt 
593*a1157835SDaniel Fojt 	/**
594*a1157835SDaniel Fojt 	 * relative_adjust_band - Band to which RSSI should be adjusted
595*a1157835SDaniel Fojt 	 *
596*a1157835SDaniel Fojt 	 * The relative_adjust_rssi should be added to the band specified
597*a1157835SDaniel Fojt 	 * by relative_adjust_band.
598*a1157835SDaniel Fojt 	 */
599*a1157835SDaniel Fojt 	enum set_band relative_adjust_band;
600*a1157835SDaniel Fojt 
601*a1157835SDaniel Fojt 	/**
602*a1157835SDaniel Fojt 	 * relative_adjust_rssi - RSSI to be added to relative_adjust_band
603*a1157835SDaniel Fojt 	 *
604*a1157835SDaniel Fojt 	 * An amount of relative_band_rssi should be added to the BSSs that
605*a1157835SDaniel Fojt 	 * belong to the band specified by relative_adjust_band while comparing
606*a1157835SDaniel Fojt 	 * with other bands for BSS reporting.
607*a1157835SDaniel Fojt 	 */
608*a1157835SDaniel Fojt 	s8 relative_adjust_rssi;
609*a1157835SDaniel Fojt 
610*a1157835SDaniel Fojt 	/**
611*a1157835SDaniel Fojt 	 * oce_scan
612*a1157835SDaniel Fojt 	 *
613*a1157835SDaniel Fojt 	 * Enable the following OCE scan features: (WFA OCE TechSpec v1.0)
614*a1157835SDaniel Fojt 	 * - Accept broadcast Probe Response frame.
615*a1157835SDaniel Fojt 	 * - Probe Request frame deferral and suppression.
616*a1157835SDaniel Fojt 	 * - Max Channel Time - driver fills FILS request params IE with
617*a1157835SDaniel Fojt 	 *   Maximum Channel Time.
618*a1157835SDaniel Fojt 	 * - Send 1st Probe Request frame in rate of minimum 5.5 Mbps.
619*a1157835SDaniel Fojt 	 */
620*a1157835SDaniel Fojt 	unsigned int oce_scan:1;
6213ff40c12SJohn Marino 
6223ff40c12SJohn Marino 	/*
6233ff40c12SJohn Marino 	 * NOTE: Whenever adding new parameters here, please make sure
6243ff40c12SJohn Marino 	 * wpa_scan_clone_params() and wpa_scan_free_params() get updated with
6253ff40c12SJohn Marino 	 * matching changes.
6263ff40c12SJohn Marino 	 */
6273ff40c12SJohn Marino };
6283ff40c12SJohn Marino 
6293ff40c12SJohn Marino /**
6303ff40c12SJohn Marino  * struct wpa_driver_auth_params - Authentication parameters
6313ff40c12SJohn Marino  * Data for struct wpa_driver_ops::authenticate().
6323ff40c12SJohn Marino  */
6333ff40c12SJohn Marino struct wpa_driver_auth_params {
6343ff40c12SJohn Marino 	int freq;
6353ff40c12SJohn Marino 	const u8 *bssid;
6363ff40c12SJohn Marino 	const u8 *ssid;
6373ff40c12SJohn Marino 	size_t ssid_len;
6383ff40c12SJohn Marino 	int auth_alg;
6393ff40c12SJohn Marino 	const u8 *ie;
6403ff40c12SJohn Marino 	size_t ie_len;
6413ff40c12SJohn Marino 	const u8 *wep_key[4];
6423ff40c12SJohn Marino 	size_t wep_key_len[4];
6433ff40c12SJohn Marino 	int wep_tx_keyidx;
6443ff40c12SJohn Marino 	int local_state_change;
6453ff40c12SJohn Marino 
6463ff40c12SJohn Marino 	/**
6473ff40c12SJohn Marino 	 * p2p - Whether this connection is a P2P group
6483ff40c12SJohn Marino 	 */
6493ff40c12SJohn Marino 	int p2p;
6503ff40c12SJohn Marino 
651*a1157835SDaniel Fojt 	/**
652*a1157835SDaniel Fojt 	 * auth_data - Additional elements for Authentication frame
653*a1157835SDaniel Fojt 	 *
654*a1157835SDaniel Fojt 	 * This buffer starts with the Authentication transaction sequence
655*a1157835SDaniel Fojt 	 * number field. If no special handling of such elements is needed, this
656*a1157835SDaniel Fojt 	 * pointer is %NULL. This is used with SAE and FILS.
657*a1157835SDaniel Fojt 	 */
658*a1157835SDaniel Fojt 	const u8 *auth_data;
6593ff40c12SJohn Marino 
660*a1157835SDaniel Fojt 	/**
661*a1157835SDaniel Fojt 	 * auth_data_len - Length of auth_data buffer in octets
662*a1157835SDaniel Fojt 	 */
663*a1157835SDaniel Fojt 	size_t auth_data_len;
6643ff40c12SJohn Marino };
6653ff40c12SJohn Marino 
666*a1157835SDaniel Fojt /**
667*a1157835SDaniel Fojt  * enum wps_mode - WPS mode
6683ff40c12SJohn Marino  */
669*a1157835SDaniel Fojt enum wps_mode {
670*a1157835SDaniel Fojt 	/**
671*a1157835SDaniel Fojt 	 * WPS_MODE_NONE - No WPS provisioning being used
672*a1157835SDaniel Fojt 	 */
673*a1157835SDaniel Fojt 	WPS_MODE_NONE,
674*a1157835SDaniel Fojt 
675*a1157835SDaniel Fojt 	/**
676*a1157835SDaniel Fojt 	 * WPS_MODE_OPEN - WPS provisioning with AP that is in open mode
677*a1157835SDaniel Fojt 	 */
678*a1157835SDaniel Fojt 	WPS_MODE_OPEN,
679*a1157835SDaniel Fojt 
680*a1157835SDaniel Fojt 	/**
681*a1157835SDaniel Fojt 	 * WPS_MODE_PRIVACY - WPS provisioning with AP that is using protection
682*a1157835SDaniel Fojt 	 */
683*a1157835SDaniel Fojt 	WPS_MODE_PRIVACY
684*a1157835SDaniel Fojt };
685*a1157835SDaniel Fojt 
686*a1157835SDaniel Fojt /**
687*a1157835SDaniel Fojt  * struct hostapd_freq_params - Channel parameters
688*a1157835SDaniel Fojt  */
689*a1157835SDaniel Fojt struct hostapd_freq_params {
690*a1157835SDaniel Fojt 	/**
691*a1157835SDaniel Fojt 	 * mode - Mode/band (HOSTAPD_MODE_IEEE80211A, ..)
692*a1157835SDaniel Fojt 	 */
693*a1157835SDaniel Fojt 	enum hostapd_hw_mode mode;
694*a1157835SDaniel Fojt 
695*a1157835SDaniel Fojt 	/**
696*a1157835SDaniel Fojt 	 * freq - Primary channel center frequency in MHz
697*a1157835SDaniel Fojt 	 */
698*a1157835SDaniel Fojt 	int freq;
699*a1157835SDaniel Fojt 
700*a1157835SDaniel Fojt 	/**
701*a1157835SDaniel Fojt 	 * channel - Channel number
702*a1157835SDaniel Fojt 	 */
703*a1157835SDaniel Fojt 	int channel;
704*a1157835SDaniel Fojt 
705*a1157835SDaniel Fojt 	/**
706*a1157835SDaniel Fojt 	 * ht_enabled - Whether HT is enabled
707*a1157835SDaniel Fojt 	 */
708*a1157835SDaniel Fojt 	int ht_enabled;
709*a1157835SDaniel Fojt 
710*a1157835SDaniel Fojt 	/**
711*a1157835SDaniel Fojt 	 * sec_channel_offset - Secondary channel offset for HT40
712*a1157835SDaniel Fojt 	 *
713*a1157835SDaniel Fojt 	 * 0 = HT40 disabled,
714*a1157835SDaniel Fojt 	 * -1 = HT40 enabled, secondary channel below primary,
715*a1157835SDaniel Fojt 	 * 1 = HT40 enabled, secondary channel above primary
716*a1157835SDaniel Fojt 	 */
717*a1157835SDaniel Fojt 	int sec_channel_offset;
718*a1157835SDaniel Fojt 
719*a1157835SDaniel Fojt 	/**
720*a1157835SDaniel Fojt 	 * vht_enabled - Whether VHT is enabled
721*a1157835SDaniel Fojt 	 */
722*a1157835SDaniel Fojt 	int vht_enabled;
723*a1157835SDaniel Fojt 
724*a1157835SDaniel Fojt 	/**
725*a1157835SDaniel Fojt 	 * he_enabled - Whether HE is enabled
726*a1157835SDaniel Fojt 	 */
727*a1157835SDaniel Fojt 	int he_enabled;
728*a1157835SDaniel Fojt 
729*a1157835SDaniel Fojt 	/**
730*a1157835SDaniel Fojt 	 * center_freq1 - Segment 0 center frequency in MHz
731*a1157835SDaniel Fojt 	 *
732*a1157835SDaniel Fojt 	 * Valid for both HT and VHT.
733*a1157835SDaniel Fojt 	 */
734*a1157835SDaniel Fojt 	int center_freq1;
735*a1157835SDaniel Fojt 
736*a1157835SDaniel Fojt 	/**
737*a1157835SDaniel Fojt 	 * center_freq2 - Segment 1 center frequency in MHz
738*a1157835SDaniel Fojt 	 *
739*a1157835SDaniel Fojt 	 * Non-zero only for bandwidth 80 and an 80+80 channel
740*a1157835SDaniel Fojt 	 */
741*a1157835SDaniel Fojt 	int center_freq2;
742*a1157835SDaniel Fojt 
743*a1157835SDaniel Fojt 	/**
744*a1157835SDaniel Fojt 	 * bandwidth - Channel bandwidth in MHz (20, 40, 80, 160)
745*a1157835SDaniel Fojt 	 */
746*a1157835SDaniel Fojt 	int bandwidth;
747*a1157835SDaniel Fojt };
748*a1157835SDaniel Fojt 
749*a1157835SDaniel Fojt /**
750*a1157835SDaniel Fojt  * struct wpa_driver_sta_auth_params - Authentication parameters
751*a1157835SDaniel Fojt  * Data for struct wpa_driver_ops::sta_auth().
752*a1157835SDaniel Fojt  */
753*a1157835SDaniel Fojt struct wpa_driver_sta_auth_params {
754*a1157835SDaniel Fojt 
755*a1157835SDaniel Fojt 	/**
756*a1157835SDaniel Fojt 	 * own_addr - Source address and BSSID for authentication frame
757*a1157835SDaniel Fojt 	 */
758*a1157835SDaniel Fojt 	const u8 *own_addr;
759*a1157835SDaniel Fojt 
760*a1157835SDaniel Fojt 	/**
761*a1157835SDaniel Fojt 	 * addr - MAC address of the station to associate
762*a1157835SDaniel Fojt 	 */
763*a1157835SDaniel Fojt 	const u8 *addr;
764*a1157835SDaniel Fojt 
765*a1157835SDaniel Fojt 	/**
766*a1157835SDaniel Fojt 	 * seq - authentication sequence number
767*a1157835SDaniel Fojt 	 */
768*a1157835SDaniel Fojt 	u16 seq;
769*a1157835SDaniel Fojt 
770*a1157835SDaniel Fojt 	/**
771*a1157835SDaniel Fojt 	 * status - authentication response status code
772*a1157835SDaniel Fojt 	 */
773*a1157835SDaniel Fojt 	u16 status;
774*a1157835SDaniel Fojt 
775*a1157835SDaniel Fojt 	/**
776*a1157835SDaniel Fojt 	 * ie - authentication frame ie buffer
777*a1157835SDaniel Fojt 	 */
778*a1157835SDaniel Fojt 	const u8 *ie;
779*a1157835SDaniel Fojt 
780*a1157835SDaniel Fojt 	/**
781*a1157835SDaniel Fojt 	 * len - ie buffer length
782*a1157835SDaniel Fojt 	 */
783*a1157835SDaniel Fojt 	size_t len;
784*a1157835SDaniel Fojt 
785*a1157835SDaniel Fojt 	/**
786*a1157835SDaniel Fojt 	 * fils_auth - Indicates whether FILS authentication is being performed
787*a1157835SDaniel Fojt 	 */
788*a1157835SDaniel Fojt 	int fils_auth;
789*a1157835SDaniel Fojt 
790*a1157835SDaniel Fojt 	/**
791*a1157835SDaniel Fojt 	 * fils_anonce - ANonce (required for FILS)
792*a1157835SDaniel Fojt 	 */
793*a1157835SDaniel Fojt 	u8 fils_anonce[WPA_NONCE_LEN];
794*a1157835SDaniel Fojt 
795*a1157835SDaniel Fojt 	/**
796*a1157835SDaniel Fojt 	 * fils_snonce - SNonce (required for FILS)
797*a1157835SDaniel Fojt 	*/
798*a1157835SDaniel Fojt 	u8 fils_snonce[WPA_NONCE_LEN];
799*a1157835SDaniel Fojt 
800*a1157835SDaniel Fojt 	/**
801*a1157835SDaniel Fojt 	 * fils_kek - key for encryption (required for FILS)
802*a1157835SDaniel Fojt 	 */
803*a1157835SDaniel Fojt 	u8 fils_kek[WPA_KEK_MAX_LEN];
804*a1157835SDaniel Fojt 
805*a1157835SDaniel Fojt 	/**
806*a1157835SDaniel Fojt 	 * fils_kek_len - Length of the fils_kek in octets (required for FILS)
807*a1157835SDaniel Fojt 	 */
808*a1157835SDaniel Fojt 	size_t fils_kek_len;
8093ff40c12SJohn Marino };
8103ff40c12SJohn Marino 
8116d49e1aeSJan Lentfer /**
8126d49e1aeSJan Lentfer  * struct wpa_driver_associate_params - Association parameters
8136d49e1aeSJan Lentfer  * Data for struct wpa_driver_ops::associate().
8146d49e1aeSJan Lentfer  */
8156d49e1aeSJan Lentfer struct wpa_driver_associate_params {
8166d49e1aeSJan Lentfer 	/**
8176d49e1aeSJan Lentfer 	 * bssid - BSSID of the selected AP
8186d49e1aeSJan Lentfer 	 * This can be %NULL, if ap_scan=2 mode is used and the driver is
8196d49e1aeSJan Lentfer 	 * responsible for selecting with which BSS to associate. */
8206d49e1aeSJan Lentfer 	const u8 *bssid;
8216d49e1aeSJan Lentfer 
8226d49e1aeSJan Lentfer 	/**
823*a1157835SDaniel Fojt 	 * bssid_hint - BSSID of a proposed AP
824*a1157835SDaniel Fojt 	 *
825*a1157835SDaniel Fojt 	 * This indicates which BSS has been found a suitable candidate for
826*a1157835SDaniel Fojt 	 * initial association for drivers that use driver/firmwate-based BSS
827*a1157835SDaniel Fojt 	 * selection. Unlike the @bssid parameter, @bssid_hint does not limit
828*a1157835SDaniel Fojt 	 * the driver from selecting other BSSes in the ESS.
829*a1157835SDaniel Fojt 	 */
830*a1157835SDaniel Fojt 	const u8 *bssid_hint;
831*a1157835SDaniel Fojt 
832*a1157835SDaniel Fojt 	/**
8336d49e1aeSJan Lentfer 	 * ssid - The selected SSID
8346d49e1aeSJan Lentfer 	 */
8356d49e1aeSJan Lentfer 	const u8 *ssid;
8363ff40c12SJohn Marino 
8373ff40c12SJohn Marino 	/**
8383ff40c12SJohn Marino 	 * ssid_len - Length of the SSID (1..32)
8393ff40c12SJohn Marino 	 */
8406d49e1aeSJan Lentfer 	size_t ssid_len;
8416d49e1aeSJan Lentfer 
8426d49e1aeSJan Lentfer 	/**
843*a1157835SDaniel Fojt 	 * freq - channel parameters
8446d49e1aeSJan Lentfer 	 */
845*a1157835SDaniel Fojt 	struct hostapd_freq_params freq;
846*a1157835SDaniel Fojt 
847*a1157835SDaniel Fojt 	/**
848*a1157835SDaniel Fojt 	 * freq_hint - Frequency of the channel the proposed AP is using
849*a1157835SDaniel Fojt 	 *
850*a1157835SDaniel Fojt 	 * This provides a channel on which a suitable BSS has been found as a
851*a1157835SDaniel Fojt 	 * hint for the driver. Unlike the @freq parameter, @freq_hint does not
852*a1157835SDaniel Fojt 	 * limit the driver from selecting other channels for
853*a1157835SDaniel Fojt 	 * driver/firmware-based BSS selection.
854*a1157835SDaniel Fojt 	 */
855*a1157835SDaniel Fojt 	int freq_hint;
8566d49e1aeSJan Lentfer 
8576d49e1aeSJan Lentfer 	/**
8583ff40c12SJohn Marino 	 * bg_scan_period - Background scan period in seconds, 0 to disable
8593ff40c12SJohn Marino 	 * background scan, or -1 to indicate no change to default driver
8603ff40c12SJohn Marino 	 * configuration
8613ff40c12SJohn Marino 	 */
8623ff40c12SJohn Marino 	int bg_scan_period;
8633ff40c12SJohn Marino 
8643ff40c12SJohn Marino 	/**
865*a1157835SDaniel Fojt 	 * beacon_int - Beacon interval for IBSS or 0 to use driver default
866*a1157835SDaniel Fojt 	 */
867*a1157835SDaniel Fojt 	int beacon_int;
868*a1157835SDaniel Fojt 
869*a1157835SDaniel Fojt 	/**
8706d49e1aeSJan Lentfer 	 * wpa_ie - WPA information element for (Re)Association Request
8716d49e1aeSJan Lentfer 	 * WPA information element to be included in (Re)Association
8726d49e1aeSJan Lentfer 	 * Request (including information element id and length). Use
8736d49e1aeSJan Lentfer 	 * of this WPA IE is optional. If the driver generates the WPA
874*a1157835SDaniel Fojt 	 * IE, it can use pairwise_suite, group_suite, group_mgmt_suite, and
8756d49e1aeSJan Lentfer 	 * key_mgmt_suite to select proper algorithms. In this case,
8766d49e1aeSJan Lentfer 	 * the driver has to notify wpa_supplicant about the used WPA
8776d49e1aeSJan Lentfer 	 * IE by generating an event that the interface code will
8786d49e1aeSJan Lentfer 	 * convert into EVENT_ASSOCINFO data (see below).
8796d49e1aeSJan Lentfer 	 *
8806d49e1aeSJan Lentfer 	 * When using WPA2/IEEE 802.11i, wpa_ie is used for RSN IE
8816d49e1aeSJan Lentfer 	 * instead. The driver can determine which version is used by
8826d49e1aeSJan Lentfer 	 * looking at the first byte of the IE (0xdd for WPA, 0x30 for
8836d49e1aeSJan Lentfer 	 * WPA2/RSN).
8846d49e1aeSJan Lentfer 	 *
8856d49e1aeSJan Lentfer 	 * When using WPS, wpa_ie is used for WPS IE instead of WPA/RSN IE.
8866d49e1aeSJan Lentfer 	 */
8876d49e1aeSJan Lentfer 	const u8 *wpa_ie;
8883ff40c12SJohn Marino 
8896d49e1aeSJan Lentfer 	/**
8906d49e1aeSJan Lentfer 	 * wpa_ie_len - length of the wpa_ie
8916d49e1aeSJan Lentfer 	 */
8926d49e1aeSJan Lentfer 	size_t wpa_ie_len;
8936d49e1aeSJan Lentfer 
8943ff40c12SJohn Marino 	/**
8953ff40c12SJohn Marino 	 * wpa_proto - Bitfield of WPA_PROTO_* values to indicate WPA/WPA2
8963ff40c12SJohn Marino 	 */
8973ff40c12SJohn Marino 	unsigned int wpa_proto;
8983ff40c12SJohn Marino 
8993ff40c12SJohn Marino 	/**
9003ff40c12SJohn Marino 	 * pairwise_suite - Selected pairwise cipher suite (WPA_CIPHER_*)
9013ff40c12SJohn Marino 	 *
9023ff40c12SJohn Marino 	 * This is usually ignored if @wpa_ie is used.
9033ff40c12SJohn Marino 	 */
9043ff40c12SJohn Marino 	unsigned int pairwise_suite;
9053ff40c12SJohn Marino 
9063ff40c12SJohn Marino 	/**
9073ff40c12SJohn Marino 	 * group_suite - Selected group cipher suite (WPA_CIPHER_*)
9083ff40c12SJohn Marino 	 *
9093ff40c12SJohn Marino 	 * This is usually ignored if @wpa_ie is used.
9103ff40c12SJohn Marino 	 */
9113ff40c12SJohn Marino 	unsigned int group_suite;
9123ff40c12SJohn Marino 
9133ff40c12SJohn Marino 	/**
914*a1157835SDaniel Fojt 	 * mgmt_group_suite - Selected group management cipher suite (WPA_CIPHER_*)
915*a1157835SDaniel Fojt 	 *
916*a1157835SDaniel Fojt 	 * This is usually ignored if @wpa_ie is used.
917*a1157835SDaniel Fojt 	 */
918*a1157835SDaniel Fojt 	unsigned int mgmt_group_suite;
919*a1157835SDaniel Fojt 
920*a1157835SDaniel Fojt 	/**
9213ff40c12SJohn Marino 	 * key_mgmt_suite - Selected key management suite (WPA_KEY_MGMT_*)
9223ff40c12SJohn Marino 	 *
9233ff40c12SJohn Marino 	 * This is usually ignored if @wpa_ie is used.
9243ff40c12SJohn Marino 	 */
9253ff40c12SJohn Marino 	unsigned int key_mgmt_suite;
9266d49e1aeSJan Lentfer 
9276d49e1aeSJan Lentfer 	/**
9286d49e1aeSJan Lentfer 	 * auth_alg - Allowed authentication algorithms
9293ff40c12SJohn Marino 	 * Bit field of WPA_AUTH_ALG_*
9306d49e1aeSJan Lentfer 	 */
9316d49e1aeSJan Lentfer 	int auth_alg;
9326d49e1aeSJan Lentfer 
9336d49e1aeSJan Lentfer 	/**
9346d49e1aeSJan Lentfer 	 * mode - Operation mode (infra/ibss) IEEE80211_MODE_*
9356d49e1aeSJan Lentfer 	 */
9366d49e1aeSJan Lentfer 	int mode;
9376d49e1aeSJan Lentfer 
9386d49e1aeSJan Lentfer 	/**
9396d49e1aeSJan Lentfer 	 * wep_key - WEP keys for static WEP configuration
9406d49e1aeSJan Lentfer 	 */
9416d49e1aeSJan Lentfer 	const u8 *wep_key[4];
9426d49e1aeSJan Lentfer 
9436d49e1aeSJan Lentfer 	/**
9446d49e1aeSJan Lentfer 	 * wep_key_len - WEP key length for static WEP configuration
9456d49e1aeSJan Lentfer 	 */
9466d49e1aeSJan Lentfer 	size_t wep_key_len[4];
9476d49e1aeSJan Lentfer 
9486d49e1aeSJan Lentfer 	/**
9496d49e1aeSJan Lentfer 	 * wep_tx_keyidx - WEP TX key index for static WEP configuration
9506d49e1aeSJan Lentfer 	 */
9516d49e1aeSJan Lentfer 	int wep_tx_keyidx;
9526d49e1aeSJan Lentfer 
9536d49e1aeSJan Lentfer 	/**
9546d49e1aeSJan Lentfer 	 * mgmt_frame_protection - IEEE 802.11w management frame protection
9556d49e1aeSJan Lentfer 	 */
9563ff40c12SJohn Marino 	enum mfp_options mgmt_frame_protection;
9576d49e1aeSJan Lentfer 
9586d49e1aeSJan Lentfer 	/**
9596d49e1aeSJan Lentfer 	 * passphrase - RSN passphrase for PSK
9606d49e1aeSJan Lentfer 	 *
9616d49e1aeSJan Lentfer 	 * This value is made available only for WPA/WPA2-Personal (PSK) and
962*a1157835SDaniel Fojt 	 * only for drivers that set WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_PSK. This
963*a1157835SDaniel Fojt 	 * is the 8..63 character ASCII passphrase, if available. Please note
964*a1157835SDaniel Fojt 	 * that this can be %NULL if passphrase was not used to generate the
965*a1157835SDaniel Fojt 	 * PSK. In that case, the psk field must be used to fetch the PSK.
9666d49e1aeSJan Lentfer 	 */
9676d49e1aeSJan Lentfer 	const char *passphrase;
9686d49e1aeSJan Lentfer 
9696d49e1aeSJan Lentfer 	/**
9706d49e1aeSJan Lentfer 	 * psk - RSN PSK (alternative for passphrase for PSK)
9716d49e1aeSJan Lentfer 	 *
9726d49e1aeSJan Lentfer 	 * This value is made available only for WPA/WPA2-Personal (PSK) and
973*a1157835SDaniel Fojt 	 * only for drivers that set WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_PSK. This
974*a1157835SDaniel Fojt 	 * is the 32-octet (256-bit) PSK, if available. The driver wrapper
975*a1157835SDaniel Fojt 	 * should be prepared to handle %NULL value as an error.
9766d49e1aeSJan Lentfer 	 */
9776d49e1aeSJan Lentfer 	const u8 *psk;
9783ff40c12SJohn Marino 
9793ff40c12SJohn Marino 	/**
9803ff40c12SJohn Marino 	 * drop_unencrypted - Enable/disable unencrypted frame filtering
9813ff40c12SJohn Marino 	 *
9823ff40c12SJohn Marino 	 * Configure the driver to drop all non-EAPOL frames (both receive and
9833ff40c12SJohn Marino 	 * transmit paths). Unencrypted EAPOL frames (ethertype 0x888e) must
9843ff40c12SJohn Marino 	 * still be allowed for key negotiation.
9853ff40c12SJohn Marino 	 */
9863ff40c12SJohn Marino 	int drop_unencrypted;
9873ff40c12SJohn Marino 
9883ff40c12SJohn Marino 	/**
9893ff40c12SJohn Marino 	 * prev_bssid - Previously used BSSID in this ESS
9903ff40c12SJohn Marino 	 *
9913ff40c12SJohn Marino 	 * When not %NULL, this is a request to use reassociation instead of
9923ff40c12SJohn Marino 	 * association.
9933ff40c12SJohn Marino 	 */
9943ff40c12SJohn Marino 	const u8 *prev_bssid;
9953ff40c12SJohn Marino 
9963ff40c12SJohn Marino 	/**
9973ff40c12SJohn Marino 	 * wps - WPS mode
9983ff40c12SJohn Marino 	 *
9993ff40c12SJohn Marino 	 * If the driver needs to do special configuration for WPS association,
10003ff40c12SJohn Marino 	 * this variable provides more information on what type of association
10013ff40c12SJohn Marino 	 * is being requested. Most drivers should not need ot use this.
10023ff40c12SJohn Marino 	 */
10033ff40c12SJohn Marino 	enum wps_mode wps;
10043ff40c12SJohn Marino 
10053ff40c12SJohn Marino 	/**
10063ff40c12SJohn Marino 	 * p2p - Whether this connection is a P2P group
10073ff40c12SJohn Marino 	 */
10083ff40c12SJohn Marino 	int p2p;
10093ff40c12SJohn Marino 
10103ff40c12SJohn Marino 	/**
10113ff40c12SJohn Marino 	 * uapsd - UAPSD parameters for the network
10123ff40c12SJohn Marino 	 * -1 = do not change defaults
10133ff40c12SJohn Marino 	 * AP mode: 1 = enabled, 0 = disabled
10143ff40c12SJohn Marino 	 * STA mode: bits 0..3 UAPSD enabled for VO,VI,BK,BE
10153ff40c12SJohn Marino 	 */
10163ff40c12SJohn Marino 	int uapsd;
10173ff40c12SJohn Marino 
10183ff40c12SJohn Marino 	/**
10193ff40c12SJohn Marino 	 * fixed_bssid - Whether to force this BSSID in IBSS mode
10203ff40c12SJohn Marino 	 * 1 = Fix this BSSID and prevent merges.
10213ff40c12SJohn Marino 	 * 0 = Do not fix BSSID.
10223ff40c12SJohn Marino 	 */
10233ff40c12SJohn Marino 	int fixed_bssid;
10243ff40c12SJohn Marino 
10253ff40c12SJohn Marino 	/**
1026*a1157835SDaniel Fojt 	 * fixed_freq - Fix control channel in IBSS mode
1027*a1157835SDaniel Fojt 	 * 0 = don't fix control channel (default)
1028*a1157835SDaniel Fojt 	 * 1 = fix control channel; this prevents IBSS merging with another
1029*a1157835SDaniel Fojt 	 *	channel
1030*a1157835SDaniel Fojt 	 */
1031*a1157835SDaniel Fojt 	int fixed_freq;
1032*a1157835SDaniel Fojt 
1033*a1157835SDaniel Fojt 	/**
10343ff40c12SJohn Marino 	 * disable_ht - Disable HT (IEEE 802.11n) for this connection
10353ff40c12SJohn Marino 	 */
10363ff40c12SJohn Marino 	int disable_ht;
10373ff40c12SJohn Marino 
10383ff40c12SJohn Marino 	/**
1039*a1157835SDaniel Fojt 	 * htcaps - HT Capabilities over-rides
1040*a1157835SDaniel Fojt 	 *
1041*a1157835SDaniel Fojt 	 * Only bits set in the mask will be used, and not all values are used
1042*a1157835SDaniel Fojt 	 * by the kernel anyway. Currently, MCS, MPDU and MSDU fields are used.
1043*a1157835SDaniel Fojt 	 *
1044*a1157835SDaniel Fojt 	 * Pointer to struct ieee80211_ht_capabilities.
10453ff40c12SJohn Marino 	 */
1046*a1157835SDaniel Fojt 	const u8 *htcaps;
1047*a1157835SDaniel Fojt 
1048*a1157835SDaniel Fojt 	/**
1049*a1157835SDaniel Fojt 	 * htcaps_mask - HT Capabilities over-rides mask
1050*a1157835SDaniel Fojt 	 *
1051*a1157835SDaniel Fojt 	 * Pointer to struct ieee80211_ht_capabilities.
1052*a1157835SDaniel Fojt 	 */
1053*a1157835SDaniel Fojt 	const u8 *htcaps_mask;
10543ff40c12SJohn Marino 
10553ff40c12SJohn Marino #ifdef CONFIG_VHT_OVERRIDES
10563ff40c12SJohn Marino 	/**
10573ff40c12SJohn Marino 	 * disable_vht - Disable VHT for this connection
10583ff40c12SJohn Marino 	 */
10593ff40c12SJohn Marino 	int disable_vht;
10603ff40c12SJohn Marino 
10613ff40c12SJohn Marino 	/**
10623ff40c12SJohn Marino 	 * VHT capability overrides.
10633ff40c12SJohn Marino 	 */
10643ff40c12SJohn Marino 	const struct ieee80211_vht_capabilities *vhtcaps;
10653ff40c12SJohn Marino 	const struct ieee80211_vht_capabilities *vhtcaps_mask;
10663ff40c12SJohn Marino #endif /* CONFIG_VHT_OVERRIDES */
1067*a1157835SDaniel Fojt 
1068*a1157835SDaniel Fojt 	/**
1069*a1157835SDaniel Fojt 	 * req_key_mgmt_offload - Request key management offload for connection
1070*a1157835SDaniel Fojt 	 *
1071*a1157835SDaniel Fojt 	 * Request key management offload for this connection if the device
1072*a1157835SDaniel Fojt 	 * supports it.
1073*a1157835SDaniel Fojt 	 */
1074*a1157835SDaniel Fojt 	int req_key_mgmt_offload;
1075*a1157835SDaniel Fojt 
1076*a1157835SDaniel Fojt 	/**
1077*a1157835SDaniel Fojt 	 * req_handshake_offload - Request EAPOL handshake offload
1078*a1157835SDaniel Fojt 	 *
1079*a1157835SDaniel Fojt 	 * Request EAPOL handshake offload for this connection if the device
1080*a1157835SDaniel Fojt 	 * supports it.
1081*a1157835SDaniel Fojt 	 */
1082*a1157835SDaniel Fojt 	int req_handshake_offload;
1083*a1157835SDaniel Fojt 
1084*a1157835SDaniel Fojt 	/**
1085*a1157835SDaniel Fojt 	 * Flag for indicating whether this association includes support for
1086*a1157835SDaniel Fojt 	 * RRM (Radio Resource Measurements)
1087*a1157835SDaniel Fojt 	 */
1088*a1157835SDaniel Fojt 	int rrm_used;
1089*a1157835SDaniel Fojt 
1090*a1157835SDaniel Fojt 	/**
1091*a1157835SDaniel Fojt 	 * pbss - If set, connect to a PCP in a PBSS. Otherwise, connect to an
1092*a1157835SDaniel Fojt 	 * AP as usual. Valid for DMG network only.
1093*a1157835SDaniel Fojt 	 */
1094*a1157835SDaniel Fojt 	int pbss;
1095*a1157835SDaniel Fojt 
1096*a1157835SDaniel Fojt 	/**
1097*a1157835SDaniel Fojt 	 * fils_kek - KEK for FILS association frame protection (AES-SIV)
1098*a1157835SDaniel Fojt 	 */
1099*a1157835SDaniel Fojt 	const u8 *fils_kek;
1100*a1157835SDaniel Fojt 
1101*a1157835SDaniel Fojt 	/**
1102*a1157835SDaniel Fojt 	 * fils_kek_len: Length of fils_kek in bytes
1103*a1157835SDaniel Fojt 	 */
1104*a1157835SDaniel Fojt 	size_t fils_kek_len;
1105*a1157835SDaniel Fojt 
1106*a1157835SDaniel Fojt 	/**
1107*a1157835SDaniel Fojt 	 * fils_nonces - Nonces for FILS association frame protection
1108*a1157835SDaniel Fojt 	 * (AES-SIV AAD)
1109*a1157835SDaniel Fojt 	 */
1110*a1157835SDaniel Fojt 	const u8 *fils_nonces;
1111*a1157835SDaniel Fojt 
1112*a1157835SDaniel Fojt 	/**
1113*a1157835SDaniel Fojt 	 * fils_nonces_len: Length of fils_nonce in bytes
1114*a1157835SDaniel Fojt 	 */
1115*a1157835SDaniel Fojt 	size_t fils_nonces_len;
1116*a1157835SDaniel Fojt 
1117*a1157835SDaniel Fojt 	/**
1118*a1157835SDaniel Fojt 	 * fils_erp_username - Username part of keyName-NAI
1119*a1157835SDaniel Fojt 	 */
1120*a1157835SDaniel Fojt 	const u8 *fils_erp_username;
1121*a1157835SDaniel Fojt 
1122*a1157835SDaniel Fojt 	/**
1123*a1157835SDaniel Fojt 	 * fils_erp_username_len - Length of fils_erp_username in bytes
1124*a1157835SDaniel Fojt 	 */
1125*a1157835SDaniel Fojt 	size_t fils_erp_username_len;
1126*a1157835SDaniel Fojt 
1127*a1157835SDaniel Fojt 	/**
1128*a1157835SDaniel Fojt 	 * fils_erp_realm - Realm/domain name to use in FILS ERP
1129*a1157835SDaniel Fojt 	 */
1130*a1157835SDaniel Fojt 	const u8 *fils_erp_realm;
1131*a1157835SDaniel Fojt 
1132*a1157835SDaniel Fojt 	/**
1133*a1157835SDaniel Fojt 	 * fils_erp_realm_len - Length of fils_erp_realm in bytes
1134*a1157835SDaniel Fojt 	 */
1135*a1157835SDaniel Fojt 	size_t fils_erp_realm_len;
1136*a1157835SDaniel Fojt 
1137*a1157835SDaniel Fojt 	/**
1138*a1157835SDaniel Fojt 	 * fils_erp_next_seq_num - The next sequence number to use in FILS ERP
1139*a1157835SDaniel Fojt 	 * messages
1140*a1157835SDaniel Fojt 	 */
1141*a1157835SDaniel Fojt 	u16 fils_erp_next_seq_num;
1142*a1157835SDaniel Fojt 
1143*a1157835SDaniel Fojt 	/**
1144*a1157835SDaniel Fojt 	 * fils_erp_rrk - Re-authentication root key (rRK) for the keyName-NAI
1145*a1157835SDaniel Fojt 	 * specified by fils_erp_username@fils_erp_realm.
1146*a1157835SDaniel Fojt 	 */
1147*a1157835SDaniel Fojt 	const u8 *fils_erp_rrk;
1148*a1157835SDaniel Fojt 
1149*a1157835SDaniel Fojt 	/**
1150*a1157835SDaniel Fojt 	 * fils_erp_rrk_len - Length of fils_erp_rrk in bytes
1151*a1157835SDaniel Fojt 	 */
1152*a1157835SDaniel Fojt 	size_t fils_erp_rrk_len;
11533ff40c12SJohn Marino };
11543ff40c12SJohn Marino 
11553ff40c12SJohn Marino enum hide_ssid {
11563ff40c12SJohn Marino 	NO_SSID_HIDING,
11573ff40c12SJohn Marino 	HIDDEN_SSID_ZERO_LEN,
11583ff40c12SJohn Marino 	HIDDEN_SSID_ZERO_CONTENTS
11593ff40c12SJohn Marino };
11603ff40c12SJohn Marino 
1161*a1157835SDaniel Fojt enum ch_switch_state {
1162*a1157835SDaniel Fojt 	CH_SW_STARTED,
1163*a1157835SDaniel Fojt 	CH_SW_FINISHED
1164*a1157835SDaniel Fojt };
1165*a1157835SDaniel Fojt 
1166*a1157835SDaniel Fojt struct wowlan_triggers {
1167*a1157835SDaniel Fojt 	u8 any;
1168*a1157835SDaniel Fojt 	u8 disconnect;
1169*a1157835SDaniel Fojt 	u8 magic_pkt;
1170*a1157835SDaniel Fojt 	u8 gtk_rekey_failure;
1171*a1157835SDaniel Fojt 	u8 eap_identity_req;
1172*a1157835SDaniel Fojt 	u8 four_way_handshake;
1173*a1157835SDaniel Fojt 	u8 rfkill_release;
1174*a1157835SDaniel Fojt };
1175*a1157835SDaniel Fojt 
11763ff40c12SJohn Marino struct wpa_driver_ap_params {
11773ff40c12SJohn Marino 	/**
11783ff40c12SJohn Marino 	 * head - Beacon head from IEEE 802.11 header to IEs before TIM IE
11793ff40c12SJohn Marino 	 */
11803ff40c12SJohn Marino 	u8 *head;
11813ff40c12SJohn Marino 
11823ff40c12SJohn Marino 	/**
11833ff40c12SJohn Marino 	 * head_len - Length of the head buffer in octets
11843ff40c12SJohn Marino 	 */
11853ff40c12SJohn Marino 	size_t head_len;
11863ff40c12SJohn Marino 
11873ff40c12SJohn Marino 	/**
11883ff40c12SJohn Marino 	 * tail - Beacon tail following TIM IE
11893ff40c12SJohn Marino 	 */
11903ff40c12SJohn Marino 	u8 *tail;
11913ff40c12SJohn Marino 
11923ff40c12SJohn Marino 	/**
11933ff40c12SJohn Marino 	 * tail_len - Length of the tail buffer in octets
11943ff40c12SJohn Marino 	 */
11953ff40c12SJohn Marino 	size_t tail_len;
11963ff40c12SJohn Marino 
11973ff40c12SJohn Marino 	/**
11983ff40c12SJohn Marino 	 * dtim_period - DTIM period
11993ff40c12SJohn Marino 	 */
12003ff40c12SJohn Marino 	int dtim_period;
12013ff40c12SJohn Marino 
12023ff40c12SJohn Marino 	/**
12033ff40c12SJohn Marino 	 * beacon_int - Beacon interval
12043ff40c12SJohn Marino 	 */
12053ff40c12SJohn Marino 	int beacon_int;
12063ff40c12SJohn Marino 
12073ff40c12SJohn Marino 	/**
12083ff40c12SJohn Marino 	 * basic_rates: -1 terminated array of basic rates in 100 kbps
12093ff40c12SJohn Marino 	 *
12103ff40c12SJohn Marino 	 * This parameter can be used to set a specific basic rate set for the
12113ff40c12SJohn Marino 	 * BSS. If %NULL, default basic rate set is used.
12123ff40c12SJohn Marino 	 */
12133ff40c12SJohn Marino 	int *basic_rates;
12143ff40c12SJohn Marino 
12153ff40c12SJohn Marino 	/**
1216*a1157835SDaniel Fojt 	 * beacon_rate: Beacon frame data rate
1217*a1157835SDaniel Fojt 	 *
1218*a1157835SDaniel Fojt 	 * This parameter can be used to set a specific Beacon frame data rate
1219*a1157835SDaniel Fojt 	 * for the BSS. The interpretation of this value depends on the
1220*a1157835SDaniel Fojt 	 * rate_type (legacy: in 100 kbps units, HT: HT-MCS, VHT: VHT-MCS). If
1221*a1157835SDaniel Fojt 	 * beacon_rate == 0 and rate_type == 0 (BEACON_RATE_LEGACY), the default
1222*a1157835SDaniel Fojt 	 * Beacon frame data rate is used.
1223*a1157835SDaniel Fojt 	 */
1224*a1157835SDaniel Fojt 	unsigned int beacon_rate;
1225*a1157835SDaniel Fojt 
1226*a1157835SDaniel Fojt 	/**
1227*a1157835SDaniel Fojt 	 * beacon_rate_type: Beacon data rate type (legacy/HT/VHT)
1228*a1157835SDaniel Fojt 	 */
1229*a1157835SDaniel Fojt 	enum beacon_rate_type rate_type;
1230*a1157835SDaniel Fojt 
1231*a1157835SDaniel Fojt 	/**
12323ff40c12SJohn Marino 	 * proberesp - Probe Response template
12333ff40c12SJohn Marino 	 *
12343ff40c12SJohn Marino 	 * This is used by drivers that reply to Probe Requests internally in
12353ff40c12SJohn Marino 	 * AP mode and require the full Probe Response template.
12363ff40c12SJohn Marino 	 */
12373ff40c12SJohn Marino 	u8 *proberesp;
12383ff40c12SJohn Marino 
12393ff40c12SJohn Marino 	/**
12403ff40c12SJohn Marino 	 * proberesp_len - Length of the proberesp buffer in octets
12413ff40c12SJohn Marino 	 */
12423ff40c12SJohn Marino 	size_t proberesp_len;
12433ff40c12SJohn Marino 
12443ff40c12SJohn Marino 	/**
12453ff40c12SJohn Marino 	 * ssid - The SSID to use in Beacon/Probe Response frames
12463ff40c12SJohn Marino 	 */
12473ff40c12SJohn Marino 	const u8 *ssid;
12483ff40c12SJohn Marino 
12493ff40c12SJohn Marino 	/**
12503ff40c12SJohn Marino 	 * ssid_len - Length of the SSID (1..32)
12513ff40c12SJohn Marino 	 */
12523ff40c12SJohn Marino 	size_t ssid_len;
12533ff40c12SJohn Marino 
12543ff40c12SJohn Marino 	/**
12553ff40c12SJohn Marino 	 * hide_ssid - Whether to hide the SSID
12563ff40c12SJohn Marino 	 */
12573ff40c12SJohn Marino 	enum hide_ssid hide_ssid;
12583ff40c12SJohn Marino 
12593ff40c12SJohn Marino 	/**
12603ff40c12SJohn Marino 	 * pairwise_ciphers - WPA_CIPHER_* bitfield
12613ff40c12SJohn Marino 	 */
12623ff40c12SJohn Marino 	unsigned int pairwise_ciphers;
12633ff40c12SJohn Marino 
12643ff40c12SJohn Marino 	/**
12653ff40c12SJohn Marino 	 * group_cipher - WPA_CIPHER_*
12663ff40c12SJohn Marino 	 */
12673ff40c12SJohn Marino 	unsigned int group_cipher;
12683ff40c12SJohn Marino 
12693ff40c12SJohn Marino 	/**
12703ff40c12SJohn Marino 	 * key_mgmt_suites - WPA_KEY_MGMT_* bitfield
12713ff40c12SJohn Marino 	 */
12723ff40c12SJohn Marino 	unsigned int key_mgmt_suites;
12733ff40c12SJohn Marino 
12743ff40c12SJohn Marino 	/**
12753ff40c12SJohn Marino 	 * auth_algs - WPA_AUTH_ALG_* bitfield
12763ff40c12SJohn Marino 	 */
12773ff40c12SJohn Marino 	unsigned int auth_algs;
12783ff40c12SJohn Marino 
12793ff40c12SJohn Marino 	/**
12803ff40c12SJohn Marino 	 * wpa_version - WPA_PROTO_* bitfield
12813ff40c12SJohn Marino 	 */
12823ff40c12SJohn Marino 	unsigned int wpa_version;
12833ff40c12SJohn Marino 
12843ff40c12SJohn Marino 	/**
12853ff40c12SJohn Marino 	 * privacy - Whether privacy is used in the BSS
12863ff40c12SJohn Marino 	 */
12873ff40c12SJohn Marino 	int privacy;
12883ff40c12SJohn Marino 
12893ff40c12SJohn Marino 	/**
12903ff40c12SJohn Marino 	 * beacon_ies - WPS/P2P IE(s) for Beacon frames
12913ff40c12SJohn Marino 	 *
12923ff40c12SJohn Marino 	 * This is used to add IEs like WPS IE and P2P IE by drivers that do
12933ff40c12SJohn Marino 	 * not use the full Beacon template.
12943ff40c12SJohn Marino 	 */
12953ff40c12SJohn Marino 	const struct wpabuf *beacon_ies;
12963ff40c12SJohn Marino 
12973ff40c12SJohn Marino 	/**
12983ff40c12SJohn Marino 	 * proberesp_ies - P2P/WPS IE(s) for Probe Response frames
12993ff40c12SJohn Marino 	 *
13003ff40c12SJohn Marino 	 * This is used to add IEs like WPS IE and P2P IE by drivers that
13013ff40c12SJohn Marino 	 * reply to Probe Request frames internally.
13023ff40c12SJohn Marino 	 */
13033ff40c12SJohn Marino 	const struct wpabuf *proberesp_ies;
13043ff40c12SJohn Marino 
13053ff40c12SJohn Marino 	/**
13063ff40c12SJohn Marino 	 * assocresp_ies - WPS IE(s) for (Re)Association Response frames
13073ff40c12SJohn Marino 	 *
13083ff40c12SJohn Marino 	 * This is used to add IEs like WPS IE by drivers that reply to
13093ff40c12SJohn Marino 	 * (Re)Association Request frames internally.
13103ff40c12SJohn Marino 	 */
13113ff40c12SJohn Marino 	const struct wpabuf *assocresp_ies;
13123ff40c12SJohn Marino 
13133ff40c12SJohn Marino 	/**
13143ff40c12SJohn Marino 	 * isolate - Whether to isolate frames between associated stations
13153ff40c12SJohn Marino 	 *
13163ff40c12SJohn Marino 	 * If this is non-zero, the AP is requested to disable forwarding of
13173ff40c12SJohn Marino 	 * frames between associated stations.
13183ff40c12SJohn Marino 	 */
13193ff40c12SJohn Marino 	int isolate;
13203ff40c12SJohn Marino 
13213ff40c12SJohn Marino 	/**
13223ff40c12SJohn Marino 	 * cts_protect - Whether CTS protection is enabled
13233ff40c12SJohn Marino 	 */
13243ff40c12SJohn Marino 	int cts_protect;
13253ff40c12SJohn Marino 
13263ff40c12SJohn Marino 	/**
13273ff40c12SJohn Marino 	 * preamble - Whether short preamble is enabled
13283ff40c12SJohn Marino 	 */
13293ff40c12SJohn Marino 	int preamble;
13303ff40c12SJohn Marino 
13313ff40c12SJohn Marino 	/**
13323ff40c12SJohn Marino 	 * short_slot_time - Whether short slot time is enabled
13333ff40c12SJohn Marino 	 *
13343ff40c12SJohn Marino 	 * 0 = short slot time disable, 1 = short slot time enabled, -1 = do
13353ff40c12SJohn Marino 	 * not set (e.g., when 802.11g mode is not in use)
13363ff40c12SJohn Marino 	 */
13373ff40c12SJohn Marino 	int short_slot_time;
13383ff40c12SJohn Marino 
13393ff40c12SJohn Marino 	/**
13403ff40c12SJohn Marino 	 * ht_opmode - HT operation mode or -1 if HT not in use
13413ff40c12SJohn Marino 	 */
13423ff40c12SJohn Marino 	int ht_opmode;
13433ff40c12SJohn Marino 
13443ff40c12SJohn Marino 	/**
13453ff40c12SJohn Marino 	 * interworking - Whether Interworking is enabled
13463ff40c12SJohn Marino 	 */
13473ff40c12SJohn Marino 	int interworking;
13483ff40c12SJohn Marino 
13493ff40c12SJohn Marino 	/**
13503ff40c12SJohn Marino 	 * hessid - Homogeneous ESS identifier or %NULL if not set
13513ff40c12SJohn Marino 	 */
13523ff40c12SJohn Marino 	const u8 *hessid;
13533ff40c12SJohn Marino 
13543ff40c12SJohn Marino 	/**
13553ff40c12SJohn Marino 	 * access_network_type - Access Network Type (0..15)
13563ff40c12SJohn Marino 	 *
13573ff40c12SJohn Marino 	 * This is used for filtering Probe Request frames when Interworking is
13583ff40c12SJohn Marino 	 * enabled.
13593ff40c12SJohn Marino 	 */
13603ff40c12SJohn Marino 	u8 access_network_type;
13613ff40c12SJohn Marino 
13623ff40c12SJohn Marino 	/**
13633ff40c12SJohn Marino 	 * ap_max_inactivity - Timeout in seconds to detect STA's inactivity
13643ff40c12SJohn Marino 	 *
13653ff40c12SJohn Marino 	 * This is used by driver which advertises this capability.
13663ff40c12SJohn Marino 	 */
13673ff40c12SJohn Marino 	int ap_max_inactivity;
13683ff40c12SJohn Marino 
13693ff40c12SJohn Marino 	/**
1370*a1157835SDaniel Fojt 	 * ctwindow - Client Traffic Window (in TUs)
1371*a1157835SDaniel Fojt 	 */
1372*a1157835SDaniel Fojt 	u8 p2p_go_ctwindow;
1373*a1157835SDaniel Fojt 
1374*a1157835SDaniel Fojt 	/**
1375*a1157835SDaniel Fojt 	 * smps_mode - SMPS mode
1376*a1157835SDaniel Fojt 	 *
1377*a1157835SDaniel Fojt 	 * SMPS mode to be used by the AP, specified as the relevant bits of
1378*a1157835SDaniel Fojt 	 * ht_capab (i.e. HT_CAP_INFO_SMPS_*).
1379*a1157835SDaniel Fojt 	 */
1380*a1157835SDaniel Fojt 	unsigned int smps_mode;
1381*a1157835SDaniel Fojt 
1382*a1157835SDaniel Fojt 	/**
13833ff40c12SJohn Marino 	 * disable_dgaf - Whether group-addressed frames are disabled
13843ff40c12SJohn Marino 	 */
13853ff40c12SJohn Marino 	int disable_dgaf;
1386*a1157835SDaniel Fojt 
1387*a1157835SDaniel Fojt 	/**
1388*a1157835SDaniel Fojt 	 * osen - Whether OSEN security is enabled
1389*a1157835SDaniel Fojt 	 */
1390*a1157835SDaniel Fojt 	int osen;
1391*a1157835SDaniel Fojt 
1392*a1157835SDaniel Fojt 	/**
1393*a1157835SDaniel Fojt 	 * freq - Channel parameters for dynamic bandwidth changes
1394*a1157835SDaniel Fojt 	 */
1395*a1157835SDaniel Fojt 	struct hostapd_freq_params *freq;
1396*a1157835SDaniel Fojt 
1397*a1157835SDaniel Fojt 	/**
1398*a1157835SDaniel Fojt 	 * reenable - Whether this is to re-enable beaconing
1399*a1157835SDaniel Fojt 	 */
1400*a1157835SDaniel Fojt 	int reenable;
1401*a1157835SDaniel Fojt 
1402*a1157835SDaniel Fojt 	/**
1403*a1157835SDaniel Fojt 	 * pbss - Whether to start a PCP (in PBSS) instead of an AP in
1404*a1157835SDaniel Fojt 	 * infrastructure BSS. Valid only for DMG network.
1405*a1157835SDaniel Fojt 	 */
1406*a1157835SDaniel Fojt 	int pbss;
1407*a1157835SDaniel Fojt 
1408*a1157835SDaniel Fojt 	/**
1409*a1157835SDaniel Fojt 	 * multicast_to_unicast - Whether to use multicast_to_unicast
1410*a1157835SDaniel Fojt 	 *
1411*a1157835SDaniel Fojt 	 * If this is non-zero, the AP is requested to perform multicast to
1412*a1157835SDaniel Fojt 	 * unicast conversion for ARP, IPv4, and IPv6 frames (possibly within
1413*a1157835SDaniel Fojt 	 * 802.1Q). If enabled, such frames are to be sent to each station
1414*a1157835SDaniel Fojt 	 * separately, with the DA replaced by their own MAC address rather
1415*a1157835SDaniel Fojt 	 * than the group address.
1416*a1157835SDaniel Fojt 	 *
1417*a1157835SDaniel Fojt 	 * Note that this may break certain expectations of the receiver, such
1418*a1157835SDaniel Fojt 	 * as the ability to drop unicast IP packets received within multicast
1419*a1157835SDaniel Fojt 	 * L2 frames, or the ability to not send ICMP destination unreachable
1420*a1157835SDaniel Fojt 	 * messages for packets received in L2 multicast (which is required,
1421*a1157835SDaniel Fojt 	 * but the receiver can't tell the difference if this new option is
1422*a1157835SDaniel Fojt 	 * enabled.)
1423*a1157835SDaniel Fojt 	 *
1424*a1157835SDaniel Fojt 	 * This also doesn't implement the 802.11 DMS (directed multicast
1425*a1157835SDaniel Fojt 	 * service).
1426*a1157835SDaniel Fojt 	 */
1427*a1157835SDaniel Fojt 	int multicast_to_unicast;
1428*a1157835SDaniel Fojt 
1429*a1157835SDaniel Fojt 	/**
1430*a1157835SDaniel Fojt 	 * ftm_responder - Whether FTM responder is enabled
1431*a1157835SDaniel Fojt 	 */
1432*a1157835SDaniel Fojt 	int ftm_responder;
1433*a1157835SDaniel Fojt 
1434*a1157835SDaniel Fojt 	/**
1435*a1157835SDaniel Fojt 	 * lci - Binary data, the content of an LCI report IE with type 8 as
1436*a1157835SDaniel Fojt 	 * defined in IEEE Std 802.11-2016, 9.4.2.22.10
1437*a1157835SDaniel Fojt 	 */
1438*a1157835SDaniel Fojt 	const struct wpabuf *lci;
1439*a1157835SDaniel Fojt 
1440*a1157835SDaniel Fojt 	/**
1441*a1157835SDaniel Fojt 	 * civic - Binary data, the content of a measurement report IE with
1442*a1157835SDaniel Fojt 	 * type 11 as defined in IEEE Std 802.11-2016, 9.4.2.22.13
1443*a1157835SDaniel Fojt 	 */
1444*a1157835SDaniel Fojt 	const struct wpabuf *civic;
1445*a1157835SDaniel Fojt };
1446*a1157835SDaniel Fojt 
1447*a1157835SDaniel Fojt struct wpa_driver_mesh_bss_params {
1448*a1157835SDaniel Fojt #define WPA_DRIVER_MESH_CONF_FLAG_AUTO_PLINKS		0x00000001
1449*a1157835SDaniel Fojt #define WPA_DRIVER_MESH_CONF_FLAG_PEER_LINK_TIMEOUT	0x00000002
1450*a1157835SDaniel Fojt #define WPA_DRIVER_MESH_CONF_FLAG_MAX_PEER_LINKS	0x00000004
1451*a1157835SDaniel Fojt #define WPA_DRIVER_MESH_CONF_FLAG_HT_OP_MODE		0x00000008
1452*a1157835SDaniel Fojt #define WPA_DRIVER_MESH_CONF_FLAG_RSSI_THRESHOLD	0x00000010
1453*a1157835SDaniel Fojt 	/*
1454*a1157835SDaniel Fojt 	 * TODO: Other mesh configuration parameters would go here.
1455*a1157835SDaniel Fojt 	 * See NL80211_MESHCONF_* for all the mesh config parameters.
1456*a1157835SDaniel Fojt 	 */
1457*a1157835SDaniel Fojt 	unsigned int flags;
1458*a1157835SDaniel Fojt 	int auto_plinks;
1459*a1157835SDaniel Fojt 	int peer_link_timeout;
1460*a1157835SDaniel Fojt 	int max_peer_links;
1461*a1157835SDaniel Fojt 	int rssi_threshold;
1462*a1157835SDaniel Fojt 	u16 ht_opmode;
1463*a1157835SDaniel Fojt };
1464*a1157835SDaniel Fojt 
1465*a1157835SDaniel Fojt struct wpa_driver_mesh_join_params {
1466*a1157835SDaniel Fojt 	const u8 *meshid;
1467*a1157835SDaniel Fojt 	int meshid_len;
1468*a1157835SDaniel Fojt 	const int *basic_rates;
1469*a1157835SDaniel Fojt 	const u8 *ies;
1470*a1157835SDaniel Fojt 	int ie_len;
1471*a1157835SDaniel Fojt 	struct hostapd_freq_params freq;
1472*a1157835SDaniel Fojt 	int beacon_int;
1473*a1157835SDaniel Fojt 	int dtim_period;
1474*a1157835SDaniel Fojt 	struct wpa_driver_mesh_bss_params conf;
1475*a1157835SDaniel Fojt #define WPA_DRIVER_MESH_FLAG_USER_MPM	0x00000001
1476*a1157835SDaniel Fojt #define WPA_DRIVER_MESH_FLAG_DRIVER_MPM	0x00000002
1477*a1157835SDaniel Fojt #define WPA_DRIVER_MESH_FLAG_SAE_AUTH	0x00000004
1478*a1157835SDaniel Fojt #define WPA_DRIVER_MESH_FLAG_AMPE	0x00000008
1479*a1157835SDaniel Fojt 	unsigned int flags;
14806d49e1aeSJan Lentfer };
14816d49e1aeSJan Lentfer 
14826d49e1aeSJan Lentfer /**
14836d49e1aeSJan Lentfer  * struct wpa_driver_capa - Driver capability information
14846d49e1aeSJan Lentfer  */
14856d49e1aeSJan Lentfer struct wpa_driver_capa {
14866d49e1aeSJan Lentfer #define WPA_DRIVER_CAPA_KEY_MGMT_WPA		0x00000001
14876d49e1aeSJan Lentfer #define WPA_DRIVER_CAPA_KEY_MGMT_WPA2		0x00000002
14886d49e1aeSJan Lentfer #define WPA_DRIVER_CAPA_KEY_MGMT_WPA_PSK	0x00000004
14896d49e1aeSJan Lentfer #define WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK	0x00000008
14906d49e1aeSJan Lentfer #define WPA_DRIVER_CAPA_KEY_MGMT_WPA_NONE	0x00000010
14916d49e1aeSJan Lentfer #define WPA_DRIVER_CAPA_KEY_MGMT_FT		0x00000020
14926d49e1aeSJan Lentfer #define WPA_DRIVER_CAPA_KEY_MGMT_FT_PSK		0x00000040
14933ff40c12SJohn Marino #define WPA_DRIVER_CAPA_KEY_MGMT_WAPI_PSK	0x00000080
1494*a1157835SDaniel Fojt #define WPA_DRIVER_CAPA_KEY_MGMT_SUITE_B	0x00000100
1495*a1157835SDaniel Fojt #define WPA_DRIVER_CAPA_KEY_MGMT_SUITE_B_192	0x00000200
1496*a1157835SDaniel Fojt #define WPA_DRIVER_CAPA_KEY_MGMT_OWE		0x00000400
1497*a1157835SDaniel Fojt #define WPA_DRIVER_CAPA_KEY_MGMT_DPP		0x00000800
1498*a1157835SDaniel Fojt #define WPA_DRIVER_CAPA_KEY_MGMT_FILS_SHA256    0x00001000
1499*a1157835SDaniel Fojt #define WPA_DRIVER_CAPA_KEY_MGMT_FILS_SHA384    0x00002000
1500*a1157835SDaniel Fojt #define WPA_DRIVER_CAPA_KEY_MGMT_FT_FILS_SHA256 0x00004000
1501*a1157835SDaniel Fojt #define WPA_DRIVER_CAPA_KEY_MGMT_FT_FILS_SHA384 0x00008000
1502*a1157835SDaniel Fojt #define WPA_DRIVER_CAPA_KEY_MGMT_SAE 		0x00010000
1503*a1157835SDaniel Fojt 	/** Bitfield of supported key management suites */
15046d49e1aeSJan Lentfer 	unsigned int key_mgmt;
15056d49e1aeSJan Lentfer 
15066d49e1aeSJan Lentfer #define WPA_DRIVER_CAPA_ENC_WEP40	0x00000001
15076d49e1aeSJan Lentfer #define WPA_DRIVER_CAPA_ENC_WEP104	0x00000002
15086d49e1aeSJan Lentfer #define WPA_DRIVER_CAPA_ENC_TKIP	0x00000004
15096d49e1aeSJan Lentfer #define WPA_DRIVER_CAPA_ENC_CCMP	0x00000008
15103ff40c12SJohn Marino #define WPA_DRIVER_CAPA_ENC_WEP128	0x00000010
15113ff40c12SJohn Marino #define WPA_DRIVER_CAPA_ENC_GCMP	0x00000020
15123ff40c12SJohn Marino #define WPA_DRIVER_CAPA_ENC_GCMP_256	0x00000040
15133ff40c12SJohn Marino #define WPA_DRIVER_CAPA_ENC_CCMP_256	0x00000080
15143ff40c12SJohn Marino #define WPA_DRIVER_CAPA_ENC_BIP		0x00000100
15153ff40c12SJohn Marino #define WPA_DRIVER_CAPA_ENC_BIP_GMAC_128	0x00000200
15163ff40c12SJohn Marino #define WPA_DRIVER_CAPA_ENC_BIP_GMAC_256	0x00000400
15173ff40c12SJohn Marino #define WPA_DRIVER_CAPA_ENC_BIP_CMAC_256	0x00000800
1518*a1157835SDaniel Fojt #define WPA_DRIVER_CAPA_ENC_GTK_NOT_USED	0x00001000
1519*a1157835SDaniel Fojt 	/** Bitfield of supported cipher suites */
15206d49e1aeSJan Lentfer 	unsigned int enc;
15216d49e1aeSJan Lentfer 
15226d49e1aeSJan Lentfer #define WPA_DRIVER_AUTH_OPEN		0x00000001
15236d49e1aeSJan Lentfer #define WPA_DRIVER_AUTH_SHARED		0x00000002
15246d49e1aeSJan Lentfer #define WPA_DRIVER_AUTH_LEAP		0x00000004
1525*a1157835SDaniel Fojt 	/** Bitfield of supported IEEE 802.11 authentication algorithms */
15266d49e1aeSJan Lentfer 	unsigned int auth;
15276d49e1aeSJan Lentfer 
1528*a1157835SDaniel Fojt /** Driver generated WPA/RSN IE */
15296d49e1aeSJan Lentfer #define WPA_DRIVER_FLAGS_DRIVER_IE	0x00000001
1530*a1157835SDaniel Fojt /** Driver needs static WEP key setup after association command */
15316d49e1aeSJan Lentfer #define WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC 0x00000002
1532*a1157835SDaniel Fojt /** Driver takes care of all DFS operations */
1533*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_DFS_OFFLOAD			0x00000004
1534*a1157835SDaniel Fojt /** Driver takes care of RSN 4-way handshake internally; PMK is configured with
15356d49e1aeSJan Lentfer  * struct wpa_driver_ops::set_key using alg = WPA_ALG_PMK */
1536*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_8021X		0x00000008
1537*a1157835SDaniel Fojt /** Driver is for a wired Ethernet interface */
15383ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_WIRED		0x00000010
1539*a1157835SDaniel Fojt /** Driver provides separate commands for authentication and association (SME in
15403ff40c12SJohn Marino  * wpa_supplicant). */
15413ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_SME		0x00000020
1542*a1157835SDaniel Fojt /** Driver supports AP mode */
15433ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_AP		0x00000040
1544*a1157835SDaniel Fojt /** Driver needs static WEP key setup after association has been completed */
15453ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE	0x00000080
1546*a1157835SDaniel Fojt /** Driver supports dynamic HT 20/40 MHz channel changes during BSS lifetime */
1547*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_HT_2040_COEX			0x00000100
1548*a1157835SDaniel Fojt /** Driver supports concurrent P2P operations */
15493ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_P2P_CONCURRENT	0x00000200
1550*a1157835SDaniel Fojt /**
15513ff40c12SJohn Marino  * Driver uses the initial interface as a dedicated management interface, i.e.,
15523ff40c12SJohn Marino  * it cannot be used for P2P group operations or non-P2P purposes.
15533ff40c12SJohn Marino  */
15543ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_P2P_DEDICATED_INTERFACE	0x00000400
1555*a1157835SDaniel Fojt /** This interface is P2P capable (P2P GO or P2P Client) */
15563ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_P2P_CAPABLE	0x00000800
1557*a1157835SDaniel Fojt /** Driver supports station and key removal when stopping an AP */
1558*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_AP_TEARDOWN_SUPPORT		0x00001000
1559*a1157835SDaniel Fojt /**
15603ff40c12SJohn Marino  * Driver uses the initial interface for P2P management interface and non-P2P
15613ff40c12SJohn Marino  * purposes (e.g., connect to infra AP), but this interface cannot be used for
15623ff40c12SJohn Marino  * P2P group operations.
15633ff40c12SJohn Marino  */
15643ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_P2P_MGMT_AND_NON_P2P		0x00002000
1565*a1157835SDaniel Fojt /**
15663ff40c12SJohn Marino  * Driver is known to use sane error codes, i.e., when it indicates that
15673ff40c12SJohn Marino  * something (e.g., association) fails, there was indeed a failure and the
15683ff40c12SJohn Marino  * operation does not end up getting completed successfully later.
15693ff40c12SJohn Marino  */
15703ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_SANE_ERROR_CODES		0x00004000
1571*a1157835SDaniel Fojt /** Driver supports off-channel TX */
15723ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_OFFCHANNEL_TX			0x00008000
1573*a1157835SDaniel Fojt /** Driver indicates TX status events for EAPOL Data frames */
15743ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_EAPOL_TX_STATUS		0x00010000
1575*a1157835SDaniel Fojt /** Driver indicates TX status events for Deauth/Disassoc frames */
15763ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_DEAUTH_TX_STATUS		0x00020000
1577*a1157835SDaniel Fojt /** Driver supports roaming (BSS selection) in firmware */
15783ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_BSS_SELECTION			0x00040000
1579*a1157835SDaniel Fojt /** Driver supports operating as a TDLS peer */
15803ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_TDLS_SUPPORT			0x00080000
1581*a1157835SDaniel Fojt /** Driver requires external TDLS setup/teardown/discovery */
15823ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_TDLS_EXTERNAL_SETUP		0x00100000
1583*a1157835SDaniel Fojt /** Driver indicates support for Probe Response offloading in AP mode */
15843ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_PROBE_RESP_OFFLOAD		0x00200000
1585*a1157835SDaniel Fojt /** Driver supports U-APSD in AP mode */
15863ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_AP_UAPSD			0x00400000
1587*a1157835SDaniel Fojt /** Driver supports inactivity timer in AP mode */
15883ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_INACTIVITY_TIMER		0x00800000
1589*a1157835SDaniel Fojt /** Driver expects user space implementation of MLME in AP mode */
15903ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_AP_MLME			0x01000000
1591*a1157835SDaniel Fojt /** Driver supports SAE with user space SME */
15923ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_SAE				0x02000000
1593*a1157835SDaniel Fojt /** Driver makes use of OBSS scan mechanism in wpa_supplicant */
15943ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_OBSS_SCAN			0x04000000
1595*a1157835SDaniel Fojt /** Driver supports IBSS (Ad-hoc) mode */
15963ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_IBSS				0x08000000
1597*a1157835SDaniel Fojt /** Driver supports radar detection */
15983ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_RADAR				0x10000000
1599*a1157835SDaniel Fojt /** Driver supports a dedicated interface for P2P Device */
16003ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_DEDICATED_P2P_DEVICE		0x20000000
1601*a1157835SDaniel Fojt /** Driver supports QoS Mapping */
16023ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_QOS_MAPPING			0x40000000
1603*a1157835SDaniel Fojt /** Driver supports CSA in AP mode */
16043ff40c12SJohn Marino #define WPA_DRIVER_FLAGS_AP_CSA				0x80000000
1605*a1157835SDaniel Fojt /** Driver supports mesh */
1606*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_MESH			0x0000000100000000ULL
1607*a1157835SDaniel Fojt /** Driver support ACS offload */
1608*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_ACS_OFFLOAD		0x0000000200000000ULL
1609*a1157835SDaniel Fojt /** Driver supports key management offload */
1610*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_KEY_MGMT_OFFLOAD	0x0000000400000000ULL
1611*a1157835SDaniel Fojt /** Driver supports TDLS channel switching */
1612*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_TDLS_CHANNEL_SWITCH	0x0000000800000000ULL
1613*a1157835SDaniel Fojt /** Driver supports IBSS with HT datarates */
1614*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_HT_IBSS		0x0000001000000000ULL
1615*a1157835SDaniel Fojt /** Driver supports IBSS with VHT datarates */
1616*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_VHT_IBSS		0x0000002000000000ULL
1617*a1157835SDaniel Fojt /** Driver supports automatic band selection */
1618*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_SUPPORT_HW_MODE_ANY	0x0000004000000000ULL
1619*a1157835SDaniel Fojt /** Driver supports simultaneous off-channel operations */
1620*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_OFFCHANNEL_SIMULTANEOUS	0x0000008000000000ULL
1621*a1157835SDaniel Fojt /** Driver supports full AP client state */
1622*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_FULL_AP_CLIENT_STATE	0x0000010000000000ULL
1623*a1157835SDaniel Fojt /** Driver supports P2P Listen offload */
1624*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_P2P_LISTEN_OFFLOAD     0x0000020000000000ULL
1625*a1157835SDaniel Fojt /** Driver supports FILS */
1626*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_SUPPORT_FILS		0x0000040000000000ULL
1627*a1157835SDaniel Fojt /** Driver supports Beacon frame TX rate configuration (legacy rates) */
1628*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_BEACON_RATE_LEGACY	0x0000080000000000ULL
1629*a1157835SDaniel Fojt /** Driver supports Beacon frame TX rate configuration (HT rates) */
1630*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_BEACON_RATE_HT		0x0000100000000000ULL
1631*a1157835SDaniel Fojt /** Driver supports Beacon frame TX rate configuration (VHT rates) */
1632*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_BEACON_RATE_VHT	0x0000200000000000ULL
1633*a1157835SDaniel Fojt /** Driver supports mgmt_tx with random TX address in non-connected state */
1634*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_MGMT_TX_RANDOM_TA	0x0000400000000000ULL
1635*a1157835SDaniel Fojt /** Driver supports mgmt_tx with random TX addr in connected state */
1636*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_MGMT_TX_RANDOM_TA_CONNECTED	0x0000800000000000ULL
1637*a1157835SDaniel Fojt /** Driver supports better BSS reporting with sched_scan in connected mode */
1638*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_SCHED_SCAN_RELATIVE_RSSI	0x0001000000000000ULL
1639*a1157835SDaniel Fojt /** Driver supports HE capabilities */
1640*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_HE_CAPABILITIES	0x0002000000000000ULL
1641*a1157835SDaniel Fojt /** Driver supports FILS shared key offload */
1642*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_FILS_SK_OFFLOAD	0x0004000000000000ULL
1643*a1157835SDaniel Fojt /** Driver supports all OCE STA specific mandatory features */
1644*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_OCE_STA		0x0008000000000000ULL
1645*a1157835SDaniel Fojt /** Driver supports all OCE AP specific mandatory features */
1646*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_OCE_AP			0x0010000000000000ULL
1647*a1157835SDaniel Fojt /**
1648*a1157835SDaniel Fojt  * Driver supports all OCE STA-CFON specific mandatory features only.
1649*a1157835SDaniel Fojt  * If a driver sets this bit but not the %WPA_DRIVER_FLAGS_OCE_AP, the
1650*a1157835SDaniel Fojt  * userspace shall assume that this driver may not support all OCE AP
1651*a1157835SDaniel Fojt  * functionality but can support only OCE STA-CFON functionality.
1652*a1157835SDaniel Fojt  */
1653*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_OCE_STA_CFON		0x0020000000000000ULL
1654*a1157835SDaniel Fojt /** Driver supports MFP-optional in the connect command */
1655*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_MFP_OPTIONAL		0x0040000000000000ULL
1656*a1157835SDaniel Fojt /** Driver is a self-managed regulatory device */
1657*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_SELF_MANAGED_REGULATORY       0x0080000000000000ULL
1658*a1157835SDaniel Fojt /** Driver supports FTM responder functionality */
1659*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_FTM_RESPONDER		0x0100000000000000ULL
1660*a1157835SDaniel Fojt /** Driver support 4-way handshake offload for WPA-Personal */
1661*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_PSK	0x0200000000000000ULL
1662*a1157835SDaniel Fojt 	u64 flags;
16633ff40c12SJohn Marino 
1664*a1157835SDaniel Fojt #define FULL_AP_CLIENT_STATE_SUPP(drv_flags) \
1665*a1157835SDaniel Fojt 	(drv_flags & WPA_DRIVER_FLAGS_FULL_AP_CLIENT_STATE)
1666*a1157835SDaniel Fojt 
1667*a1157835SDaniel Fojt #define WPA_DRIVER_SMPS_MODE_STATIC			0x00000001
1668*a1157835SDaniel Fojt #define WPA_DRIVER_SMPS_MODE_DYNAMIC			0x00000002
1669*a1157835SDaniel Fojt 	unsigned int smps_modes;
1670*a1157835SDaniel Fojt 
1671*a1157835SDaniel Fojt 	unsigned int wmm_ac_supported:1;
1672*a1157835SDaniel Fojt 
1673*a1157835SDaniel Fojt 	unsigned int mac_addr_rand_scan_supported:1;
1674*a1157835SDaniel Fojt 	unsigned int mac_addr_rand_sched_scan_supported:1;
1675*a1157835SDaniel Fojt 
1676*a1157835SDaniel Fojt 	/** Maximum number of supported active probe SSIDs */
16773ff40c12SJohn Marino 	int max_scan_ssids;
1678*a1157835SDaniel Fojt 
1679*a1157835SDaniel Fojt 	/** Maximum number of supported active probe SSIDs for sched_scan */
16803ff40c12SJohn Marino 	int max_sched_scan_ssids;
1681*a1157835SDaniel Fojt 
1682*a1157835SDaniel Fojt 	/** Maximum number of supported scan plans for scheduled scan */
1683*a1157835SDaniel Fojt 	unsigned int max_sched_scan_plans;
1684*a1157835SDaniel Fojt 
1685*a1157835SDaniel Fojt 	/** Maximum interval in a scan plan. In seconds */
1686*a1157835SDaniel Fojt 	u32 max_sched_scan_plan_interval;
1687*a1157835SDaniel Fojt 
1688*a1157835SDaniel Fojt 	/** Maximum number of iterations in a single scan plan */
1689*a1157835SDaniel Fojt 	u32 max_sched_scan_plan_iterations;
1690*a1157835SDaniel Fojt 
1691*a1157835SDaniel Fojt 	/** Whether sched_scan (offloaded scanning) is supported */
16923ff40c12SJohn Marino 	int sched_scan_supported;
1693*a1157835SDaniel Fojt 
1694*a1157835SDaniel Fojt 	/** Maximum number of supported match sets for sched_scan */
16953ff40c12SJohn Marino 	int max_match_sets;
16963ff40c12SJohn Marino 
16973ff40c12SJohn Marino 	/**
16983ff40c12SJohn Marino 	 * max_remain_on_chan - Maximum remain-on-channel duration in msec
16993ff40c12SJohn Marino 	 */
17003ff40c12SJohn Marino 	unsigned int max_remain_on_chan;
17013ff40c12SJohn Marino 
17023ff40c12SJohn Marino 	/**
17033ff40c12SJohn Marino 	 * max_stations - Maximum number of associated stations the driver
17043ff40c12SJohn Marino 	 * supports in AP mode
17053ff40c12SJohn Marino 	 */
17063ff40c12SJohn Marino 	unsigned int max_stations;
17073ff40c12SJohn Marino 
17083ff40c12SJohn Marino 	/**
17093ff40c12SJohn Marino 	 * probe_resp_offloads - Bitmap of supported protocols by the driver
17103ff40c12SJohn Marino 	 * for Probe Response offloading.
17113ff40c12SJohn Marino 	 */
1712*a1157835SDaniel Fojt /** Driver Probe Response offloading support for WPS ver. 1 */
17133ff40c12SJohn Marino #define WPA_DRIVER_PROBE_RESP_OFFLOAD_WPS		0x00000001
1714*a1157835SDaniel Fojt /** Driver Probe Response offloading support for WPS ver. 2 */
17153ff40c12SJohn Marino #define WPA_DRIVER_PROBE_RESP_OFFLOAD_WPS2		0x00000002
1716*a1157835SDaniel Fojt /** Driver Probe Response offloading support for P2P */
17173ff40c12SJohn Marino #define WPA_DRIVER_PROBE_RESP_OFFLOAD_P2P		0x00000004
1718*a1157835SDaniel Fojt /** Driver Probe Response offloading support for IEEE 802.11u (Interworking) */
17193ff40c12SJohn Marino #define WPA_DRIVER_PROBE_RESP_OFFLOAD_INTERWORKING	0x00000008
17203ff40c12SJohn Marino 	unsigned int probe_resp_offloads;
17213ff40c12SJohn Marino 
17223ff40c12SJohn Marino 	unsigned int max_acl_mac_addrs;
17233ff40c12SJohn Marino 
17243ff40c12SJohn Marino 	/**
17253ff40c12SJohn Marino 	 * Number of supported concurrent channels
17263ff40c12SJohn Marino 	 */
17273ff40c12SJohn Marino 	unsigned int num_multichan_concurrent;
17283ff40c12SJohn Marino 
17293ff40c12SJohn Marino 	/**
17303ff40c12SJohn Marino 	 * extended_capa - extended capabilities in driver/device
17313ff40c12SJohn Marino 	 *
17323ff40c12SJohn Marino 	 * Must be allocated and freed by driver and the pointers must be
17333ff40c12SJohn Marino 	 * valid for the lifetime of the driver, i.e., freed in deinit()
17343ff40c12SJohn Marino 	 */
17353ff40c12SJohn Marino 	const u8 *extended_capa, *extended_capa_mask;
17363ff40c12SJohn Marino 	unsigned int extended_capa_len;
1737*a1157835SDaniel Fojt 
1738*a1157835SDaniel Fojt 	struct wowlan_triggers wowlan_triggers;
1739*a1157835SDaniel Fojt 
1740*a1157835SDaniel Fojt /** Driver adds the DS Params Set IE in Probe Request frames */
1741*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_DS_PARAM_SET_IE_IN_PROBES	0x00000001
1742*a1157835SDaniel Fojt /** Driver adds the WFA TPC IE in Probe Request frames */
1743*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_WFA_TPC_IE_IN_PROBES		0x00000002
1744*a1157835SDaniel Fojt /** Driver handles quiet period requests */
1745*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_QUIET				0x00000004
1746*a1157835SDaniel Fojt /**
1747*a1157835SDaniel Fojt  * Driver is capable of inserting the current TX power value into the body of
1748*a1157835SDaniel Fojt  * transmitted frames.
1749*a1157835SDaniel Fojt  * Background: Some Action frames include a TPC Report IE. This IE contains a
1750*a1157835SDaniel Fojt  * TX power field, which has to be updated by lower layers. One such Action
1751*a1157835SDaniel Fojt  * frame is Link Measurement Report (part of RRM). Another is TPC Report (part
1752*a1157835SDaniel Fojt  * of spectrum management). Note that this insertion takes place at a fixed
1753*a1157835SDaniel Fojt  * offset, namely the 6th byte in the Action frame body.
1754*a1157835SDaniel Fojt  */
1755*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_TX_POWER_INSERTION		0x00000008
1756*a1157835SDaniel Fojt /**
1757*a1157835SDaniel Fojt  * Driver supports RRM. With this support, the driver will accept to use RRM in
1758*a1157835SDaniel Fojt  * (Re)Association Request frames, without supporting quiet period.
1759*a1157835SDaniel Fojt  */
1760*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_SUPPORT_RRM			0x00000010
1761*a1157835SDaniel Fojt 
1762*a1157835SDaniel Fojt /** Driver supports setting the scan dwell time */
1763*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_SUPPORT_SET_SCAN_DWELL		0x00000020
1764*a1157835SDaniel Fojt /** Driver supports Beacon Report Measurement */
1765*a1157835SDaniel Fojt #define WPA_DRIVER_FLAGS_SUPPORT_BEACON_REPORT		0x00000040
1766*a1157835SDaniel Fojt 
1767*a1157835SDaniel Fojt 	u32 rrm_flags;
1768*a1157835SDaniel Fojt 
1769*a1157835SDaniel Fojt 	/* Driver concurrency capabilities */
1770*a1157835SDaniel Fojt 	unsigned int conc_capab;
1771*a1157835SDaniel Fojt 	/* Maximum number of concurrent channels on 2.4 GHz */
1772*a1157835SDaniel Fojt 	unsigned int max_conc_chan_2_4;
1773*a1157835SDaniel Fojt 	/* Maximum number of concurrent channels on 5 GHz */
1774*a1157835SDaniel Fojt 	unsigned int max_conc_chan_5_0;
1775*a1157835SDaniel Fojt 
1776*a1157835SDaniel Fojt 	/* Maximum number of supported CSA counters */
1777*a1157835SDaniel Fojt 	u16 max_csa_counters;
17786d49e1aeSJan Lentfer };
17796d49e1aeSJan Lentfer 
17806d49e1aeSJan Lentfer 
17813ff40c12SJohn Marino struct hostapd_data;
17826d49e1aeSJan Lentfer 
1783*a1157835SDaniel Fojt #define STA_DRV_DATA_TX_MCS BIT(0)
1784*a1157835SDaniel Fojt #define STA_DRV_DATA_RX_MCS BIT(1)
1785*a1157835SDaniel Fojt #define STA_DRV_DATA_TX_VHT_MCS BIT(2)
1786*a1157835SDaniel Fojt #define STA_DRV_DATA_RX_VHT_MCS BIT(3)
1787*a1157835SDaniel Fojt #define STA_DRV_DATA_TX_VHT_NSS BIT(4)
1788*a1157835SDaniel Fojt #define STA_DRV_DATA_RX_VHT_NSS BIT(5)
1789*a1157835SDaniel Fojt #define STA_DRV_DATA_TX_SHORT_GI BIT(6)
1790*a1157835SDaniel Fojt #define STA_DRV_DATA_RX_SHORT_GI BIT(7)
1791*a1157835SDaniel Fojt #define STA_DRV_DATA_LAST_ACK_RSSI BIT(8)
1792*a1157835SDaniel Fojt 
17933ff40c12SJohn Marino struct hostap_sta_driver_data {
1794*a1157835SDaniel Fojt 	unsigned long rx_packets, tx_packets;
1795*a1157835SDaniel Fojt 	unsigned long long rx_bytes, tx_bytes;
1796*a1157835SDaniel Fojt 	unsigned long long rx_airtime, tx_airtime;
1797*a1157835SDaniel Fojt 	int bytes_64bit; /* whether 64-bit byte counters are supported */
17983ff40c12SJohn Marino 	unsigned long current_tx_rate;
1799*a1157835SDaniel Fojt 	unsigned long current_rx_rate;
18003ff40c12SJohn Marino 	unsigned long inactive_msec;
1801*a1157835SDaniel Fojt 	unsigned long flags; /* bitfield of STA_DRV_DATA_* */
18023ff40c12SJohn Marino 	unsigned long num_ps_buf_frames;
18033ff40c12SJohn Marino 	unsigned long tx_retry_failed;
18043ff40c12SJohn Marino 	unsigned long tx_retry_count;
1805*a1157835SDaniel Fojt 	s8 last_ack_rssi;
1806*a1157835SDaniel Fojt 	unsigned long backlog_packets;
1807*a1157835SDaniel Fojt 	unsigned long backlog_bytes;
1808*a1157835SDaniel Fojt 	s8 signal;
1809*a1157835SDaniel Fojt 	u8 rx_vhtmcs;
1810*a1157835SDaniel Fojt 	u8 tx_vhtmcs;
1811*a1157835SDaniel Fojt 	u8 rx_mcs;
1812*a1157835SDaniel Fojt 	u8 tx_mcs;
1813*a1157835SDaniel Fojt 	u8 rx_vht_nss;
1814*a1157835SDaniel Fojt 	u8 tx_vht_nss;
18156d49e1aeSJan Lentfer };
18166d49e1aeSJan Lentfer 
18173ff40c12SJohn Marino struct hostapd_sta_add_params {
18183ff40c12SJohn Marino 	const u8 *addr;
18193ff40c12SJohn Marino 	u16 aid;
18203ff40c12SJohn Marino 	u16 capability;
18213ff40c12SJohn Marino 	const u8 *supp_rates;
18223ff40c12SJohn Marino 	size_t supp_rates_len;
18233ff40c12SJohn Marino 	u16 listen_interval;
18243ff40c12SJohn Marino 	const struct ieee80211_ht_capabilities *ht_capabilities;
18253ff40c12SJohn Marino 	const struct ieee80211_vht_capabilities *vht_capabilities;
1826*a1157835SDaniel Fojt 	int vht_opmode_enabled;
1827*a1157835SDaniel Fojt 	u8 vht_opmode;
1828*a1157835SDaniel Fojt 	const struct ieee80211_he_capabilities *he_capab;
1829*a1157835SDaniel Fojt 	size_t he_capab_len;
18303ff40c12SJohn Marino 	u32 flags; /* bitmask of WPA_STA_* flags */
1831*a1157835SDaniel Fojt 	u32 flags_mask; /* unset bits in flags */
1832*a1157835SDaniel Fojt #ifdef CONFIG_MESH
1833*a1157835SDaniel Fojt 	enum mesh_plink_state plink_state;
1834*a1157835SDaniel Fojt 	u16 peer_aid;
1835*a1157835SDaniel Fojt #endif /* CONFIG_MESH */
18363ff40c12SJohn Marino 	int set; /* Set STA parameters instead of add */
18373ff40c12SJohn Marino 	u8 qosinfo;
18383ff40c12SJohn Marino 	const u8 *ext_capab;
18393ff40c12SJohn Marino 	size_t ext_capab_len;
18403ff40c12SJohn Marino 	const u8 *supp_channels;
18413ff40c12SJohn Marino 	size_t supp_channels_len;
18423ff40c12SJohn Marino 	const u8 *supp_oper_classes;
18433ff40c12SJohn Marino 	size_t supp_oper_classes_len;
1844*a1157835SDaniel Fojt 	int support_p2p_ps;
18456d49e1aeSJan Lentfer };
18466d49e1aeSJan Lentfer 
18473ff40c12SJohn Marino struct mac_address {
18483ff40c12SJohn Marino 	u8 addr[ETH_ALEN];
18493ff40c12SJohn Marino };
18503ff40c12SJohn Marino 
18513ff40c12SJohn Marino struct hostapd_acl_params {
18523ff40c12SJohn Marino 	u8 acl_policy;
18533ff40c12SJohn Marino 	unsigned int num_mac_acl;
18543ff40c12SJohn Marino 	struct mac_address mac_acl[0];
18553ff40c12SJohn Marino };
18563ff40c12SJohn Marino 
18573ff40c12SJohn Marino enum wpa_driver_if_type {
18583ff40c12SJohn Marino 	/**
18593ff40c12SJohn Marino 	 * WPA_IF_STATION - Station mode interface
18603ff40c12SJohn Marino 	 */
18613ff40c12SJohn Marino 	WPA_IF_STATION,
18623ff40c12SJohn Marino 
18633ff40c12SJohn Marino 	/**
18643ff40c12SJohn Marino 	 * WPA_IF_AP_VLAN - AP mode VLAN interface
18653ff40c12SJohn Marino 	 *
18663ff40c12SJohn Marino 	 * This interface shares its address and Beacon frame with the main
18673ff40c12SJohn Marino 	 * BSS.
18683ff40c12SJohn Marino 	 */
18693ff40c12SJohn Marino 	WPA_IF_AP_VLAN,
18703ff40c12SJohn Marino 
18713ff40c12SJohn Marino 	/**
18723ff40c12SJohn Marino 	 * WPA_IF_AP_BSS - AP mode BSS interface
18733ff40c12SJohn Marino 	 *
18743ff40c12SJohn Marino 	 * This interface has its own address and Beacon frame.
18753ff40c12SJohn Marino 	 */
18763ff40c12SJohn Marino 	WPA_IF_AP_BSS,
18773ff40c12SJohn Marino 
18783ff40c12SJohn Marino 	/**
18793ff40c12SJohn Marino 	 * WPA_IF_P2P_GO - P2P Group Owner
18803ff40c12SJohn Marino 	 */
18813ff40c12SJohn Marino 	WPA_IF_P2P_GO,
18823ff40c12SJohn Marino 
18833ff40c12SJohn Marino 	/**
18843ff40c12SJohn Marino 	 * WPA_IF_P2P_CLIENT - P2P Client
18853ff40c12SJohn Marino 	 */
18863ff40c12SJohn Marino 	WPA_IF_P2P_CLIENT,
18873ff40c12SJohn Marino 
18883ff40c12SJohn Marino 	/**
18893ff40c12SJohn Marino 	 * WPA_IF_P2P_GROUP - P2P Group interface (will become either
18903ff40c12SJohn Marino 	 * WPA_IF_P2P_GO or WPA_IF_P2P_CLIENT, but the role is not yet known)
18913ff40c12SJohn Marino 	 */
18923ff40c12SJohn Marino 	WPA_IF_P2P_GROUP,
18933ff40c12SJohn Marino 
18943ff40c12SJohn Marino 	/**
18953ff40c12SJohn Marino 	 * WPA_IF_P2P_DEVICE - P2P Device interface is used to indentify the
18963ff40c12SJohn Marino 	 * abstracted P2P Device function in the driver
18973ff40c12SJohn Marino 	 */
1898*a1157835SDaniel Fojt 	WPA_IF_P2P_DEVICE,
1899*a1157835SDaniel Fojt 
1900*a1157835SDaniel Fojt 	/*
1901*a1157835SDaniel Fojt 	 * WPA_IF_MESH - Mesh interface
1902*a1157835SDaniel Fojt 	 */
1903*a1157835SDaniel Fojt 	WPA_IF_MESH,
1904*a1157835SDaniel Fojt 
1905*a1157835SDaniel Fojt 	/*
1906*a1157835SDaniel Fojt 	 * WPA_IF_TDLS - TDLS offchannel interface (used for pref freq only)
1907*a1157835SDaniel Fojt 	 */
1908*a1157835SDaniel Fojt 	WPA_IF_TDLS,
1909*a1157835SDaniel Fojt 
1910*a1157835SDaniel Fojt 	/*
1911*a1157835SDaniel Fojt 	 * WPA_IF_IBSS - IBSS interface (used for pref freq only)
1912*a1157835SDaniel Fojt 	 */
1913*a1157835SDaniel Fojt 	WPA_IF_IBSS,
19143ff40c12SJohn Marino };
19153ff40c12SJohn Marino 
19163ff40c12SJohn Marino struct wpa_init_params {
19173ff40c12SJohn Marino 	void *global_priv;
19183ff40c12SJohn Marino 	const u8 *bssid;
19193ff40c12SJohn Marino 	const char *ifname;
1920*a1157835SDaniel Fojt 	const char *driver_params;
19213ff40c12SJohn Marino 	int use_pae_group_addr;
19223ff40c12SJohn Marino 	char **bridge;
19233ff40c12SJohn Marino 	size_t num_bridge;
19243ff40c12SJohn Marino 
19253ff40c12SJohn Marino 	u8 *own_addr; /* buffer for writing own MAC address */
19263ff40c12SJohn Marino };
19273ff40c12SJohn Marino 
19283ff40c12SJohn Marino 
19293ff40c12SJohn Marino struct wpa_bss_params {
19303ff40c12SJohn Marino 	/** Interface name (for multi-SSID/VLAN support) */
19313ff40c12SJohn Marino 	const char *ifname;
19323ff40c12SJohn Marino 	/** Whether IEEE 802.1X or WPA/WPA2 is enabled */
19333ff40c12SJohn Marino 	int enabled;
19343ff40c12SJohn Marino 
19353ff40c12SJohn Marino 	int wpa;
19363ff40c12SJohn Marino 	int ieee802_1x;
19373ff40c12SJohn Marino 	int wpa_group;
19383ff40c12SJohn Marino 	int wpa_pairwise;
19393ff40c12SJohn Marino 	int wpa_key_mgmt;
19403ff40c12SJohn Marino 	int rsn_preauth;
19413ff40c12SJohn Marino 	enum mfp_options ieee80211w;
19423ff40c12SJohn Marino };
19433ff40c12SJohn Marino 
19443ff40c12SJohn Marino #define WPA_STA_AUTHORIZED BIT(0)
19453ff40c12SJohn Marino #define WPA_STA_WMM BIT(1)
19463ff40c12SJohn Marino #define WPA_STA_SHORT_PREAMBLE BIT(2)
19473ff40c12SJohn Marino #define WPA_STA_MFP BIT(3)
19483ff40c12SJohn Marino #define WPA_STA_TDLS_PEER BIT(4)
1949*a1157835SDaniel Fojt #define WPA_STA_AUTHENTICATED BIT(5)
1950*a1157835SDaniel Fojt #define WPA_STA_ASSOCIATED BIT(6)
19513ff40c12SJohn Marino 
19523ff40c12SJohn Marino enum tdls_oper {
19533ff40c12SJohn Marino 	TDLS_DISCOVERY_REQ,
19543ff40c12SJohn Marino 	TDLS_SETUP,
19553ff40c12SJohn Marino 	TDLS_TEARDOWN,
19563ff40c12SJohn Marino 	TDLS_ENABLE_LINK,
19573ff40c12SJohn Marino 	TDLS_DISABLE_LINK,
19583ff40c12SJohn Marino 	TDLS_ENABLE,
19593ff40c12SJohn Marino 	TDLS_DISABLE
19603ff40c12SJohn Marino };
19613ff40c12SJohn Marino 
19623ff40c12SJohn Marino enum wnm_oper {
19633ff40c12SJohn Marino 	WNM_SLEEP_ENTER_CONFIRM,
19643ff40c12SJohn Marino 	WNM_SLEEP_ENTER_FAIL,
19653ff40c12SJohn Marino 	WNM_SLEEP_EXIT_CONFIRM,
19663ff40c12SJohn Marino 	WNM_SLEEP_EXIT_FAIL,
19673ff40c12SJohn Marino 	WNM_SLEEP_TFS_REQ_IE_ADD,   /* STA requests driver to add TFS req IE */
19683ff40c12SJohn Marino 	WNM_SLEEP_TFS_REQ_IE_NONE,  /* STA requests empty TFS req IE */
19693ff40c12SJohn Marino 	WNM_SLEEP_TFS_REQ_IE_SET,   /* AP requests driver to set TFS req IE for
19703ff40c12SJohn Marino 				     * a STA */
19713ff40c12SJohn Marino 	WNM_SLEEP_TFS_RESP_IE_ADD,  /* AP requests driver to add TFS resp IE
19723ff40c12SJohn Marino 				     * for a STA */
19733ff40c12SJohn Marino 	WNM_SLEEP_TFS_RESP_IE_NONE, /* AP requests empty TFS resp IE */
19743ff40c12SJohn Marino 	WNM_SLEEP_TFS_RESP_IE_SET,  /* AP requests driver to set TFS resp IE
19753ff40c12SJohn Marino 				     * for a STA */
19763ff40c12SJohn Marino 	WNM_SLEEP_TFS_IE_DEL        /* AP delete the TFS IE */
19773ff40c12SJohn Marino };
19783ff40c12SJohn Marino 
1979*a1157835SDaniel Fojt /* enum smps_mode - SMPS mode definitions */
1980*a1157835SDaniel Fojt enum smps_mode {
1981*a1157835SDaniel Fojt 	SMPS_AUTOMATIC,
1982*a1157835SDaniel Fojt 	SMPS_OFF,
1983*a1157835SDaniel Fojt 	SMPS_DYNAMIC,
1984*a1157835SDaniel Fojt 	SMPS_STATIC,
1985*a1157835SDaniel Fojt 
1986*a1157835SDaniel Fojt 	/* Keep last */
1987*a1157835SDaniel Fojt 	SMPS_INVALID,
19883ff40c12SJohn Marino };
19893ff40c12SJohn Marino 
1990*a1157835SDaniel Fojt #define WPA_INVALID_NOISE 9999
1991*a1157835SDaniel Fojt 
19923ff40c12SJohn Marino /**
19933ff40c12SJohn Marino  * struct wpa_signal_info - Information about channel signal quality
1994*a1157835SDaniel Fojt  * @frequency: control frequency
1995*a1157835SDaniel Fojt  * @above_threshold: true if the above threshold was crossed
1996*a1157835SDaniel Fojt  *	(relevant for a CQM event)
1997*a1157835SDaniel Fojt  * @current_signal: in dBm
1998*a1157835SDaniel Fojt  * @avg_signal: in dBm
1999*a1157835SDaniel Fojt  * @avg_beacon_signal: in dBm
2000*a1157835SDaniel Fojt  * @current_noise: %WPA_INVALID_NOISE if not supported
2001*a1157835SDaniel Fojt  * @current_txrate: current TX rate
2002*a1157835SDaniel Fojt  * @chanwidth: channel width
2003*a1157835SDaniel Fojt  * @center_frq1: center frequency for the first segment
2004*a1157835SDaniel Fojt  * @center_frq2: center frequency for the second segment (if relevant)
20053ff40c12SJohn Marino  */
20063ff40c12SJohn Marino struct wpa_signal_info {
20073ff40c12SJohn Marino 	u32 frequency;
20083ff40c12SJohn Marino 	int above_threshold;
20093ff40c12SJohn Marino 	int current_signal;
20103ff40c12SJohn Marino 	int avg_signal;
2011*a1157835SDaniel Fojt 	int avg_beacon_signal;
20123ff40c12SJohn Marino 	int current_noise;
20133ff40c12SJohn Marino 	int current_txrate;
20143ff40c12SJohn Marino 	enum chan_width chanwidth;
20153ff40c12SJohn Marino 	int center_frq1;
20163ff40c12SJohn Marino 	int center_frq2;
20173ff40c12SJohn Marino };
20183ff40c12SJohn Marino 
20193ff40c12SJohn Marino /**
2020*a1157835SDaniel Fojt  * struct wpa_channel_info - Information about the current channel
2021*a1157835SDaniel Fojt  * @frequency: Center frequency of the primary 20 MHz channel
2022*a1157835SDaniel Fojt  * @chanwidth: Width of the current operating channel
2023*a1157835SDaniel Fojt  * @sec_channel: Location of the secondary 20 MHz channel (either +1 or -1).
2024*a1157835SDaniel Fojt  *	This field is only filled in when using a 40 MHz channel.
2025*a1157835SDaniel Fojt  * @center_frq1: Center frequency of frequency segment 0
2026*a1157835SDaniel Fojt  * @center_frq2: Center frequency of frequency segment 1 (for 80+80 channels)
2027*a1157835SDaniel Fojt  * @seg1_idx: Frequency segment 1 index when using a 80+80 channel. This is
2028*a1157835SDaniel Fojt  *	derived from center_frq2 for convenience.
2029*a1157835SDaniel Fojt  */
2030*a1157835SDaniel Fojt struct wpa_channel_info {
2031*a1157835SDaniel Fojt 	u32 frequency;
2032*a1157835SDaniel Fojt 	enum chan_width chanwidth;
2033*a1157835SDaniel Fojt 	int sec_channel;
2034*a1157835SDaniel Fojt 	int center_frq1;
2035*a1157835SDaniel Fojt 	int center_frq2;
2036*a1157835SDaniel Fojt 	u8 seg1_idx;
2037*a1157835SDaniel Fojt };
2038*a1157835SDaniel Fojt 
2039*a1157835SDaniel Fojt /**
20403ff40c12SJohn Marino  * struct beacon_data - Beacon data
20413ff40c12SJohn Marino  * @head: Head portion of Beacon frame (before TIM IE)
20423ff40c12SJohn Marino  * @tail: Tail portion of Beacon frame (after TIM IE)
20433ff40c12SJohn Marino  * @beacon_ies: Extra information element(s) to add into Beacon frames or %NULL
20443ff40c12SJohn Marino  * @proberesp_ies: Extra information element(s) to add into Probe Response
20453ff40c12SJohn Marino  *	frames or %NULL
20463ff40c12SJohn Marino  * @assocresp_ies: Extra information element(s) to add into (Re)Association
20473ff40c12SJohn Marino  *	Response frames or %NULL
20483ff40c12SJohn Marino  * @probe_resp: Probe Response frame template
20493ff40c12SJohn Marino  * @head_len: Length of @head
20503ff40c12SJohn Marino  * @tail_len: Length of @tail
20513ff40c12SJohn Marino  * @beacon_ies_len: Length of beacon_ies in octets
20523ff40c12SJohn Marino  * @proberesp_ies_len: Length of proberesp_ies in octets
20533ff40c12SJohn Marino  * @proberesp_ies_len: Length of proberesp_ies in octets
20543ff40c12SJohn Marino  * @probe_resp_len: Length of probe response template (@probe_resp)
20553ff40c12SJohn Marino  */
20563ff40c12SJohn Marino struct beacon_data {
20573ff40c12SJohn Marino 	u8 *head, *tail;
20583ff40c12SJohn Marino 	u8 *beacon_ies;
20593ff40c12SJohn Marino 	u8 *proberesp_ies;
20603ff40c12SJohn Marino 	u8 *assocresp_ies;
20613ff40c12SJohn Marino 	u8 *probe_resp;
20623ff40c12SJohn Marino 
20633ff40c12SJohn Marino 	size_t head_len, tail_len;
20643ff40c12SJohn Marino 	size_t beacon_ies_len;
20653ff40c12SJohn Marino 	size_t proberesp_ies_len;
20663ff40c12SJohn Marino 	size_t assocresp_ies_len;
20673ff40c12SJohn Marino 	size_t probe_resp_len;
20683ff40c12SJohn Marino };
20693ff40c12SJohn Marino 
20703ff40c12SJohn Marino /**
20713ff40c12SJohn Marino  * struct csa_settings - Settings for channel switch command
20723ff40c12SJohn Marino  * @cs_count: Count in Beacon frames (TBTT) to perform the switch
20733ff40c12SJohn Marino  * @block_tx: 1 - block transmission for CSA period
20743ff40c12SJohn Marino  * @freq_params: Next channel frequency parameter
20753ff40c12SJohn Marino  * @beacon_csa: Beacon/probe resp/asooc resp info for CSA period
20763ff40c12SJohn Marino  * @beacon_after: Next beacon/probe resp/asooc resp info
20773ff40c12SJohn Marino  * @counter_offset_beacon: Offset to the count field in beacon's tail
20783ff40c12SJohn Marino  * @counter_offset_presp: Offset to the count field in probe resp.
20793ff40c12SJohn Marino  */
20803ff40c12SJohn Marino struct csa_settings {
20813ff40c12SJohn Marino 	u8 cs_count;
20823ff40c12SJohn Marino 	u8 block_tx;
20833ff40c12SJohn Marino 
20843ff40c12SJohn Marino 	struct hostapd_freq_params freq_params;
20853ff40c12SJohn Marino 	struct beacon_data beacon_csa;
20863ff40c12SJohn Marino 	struct beacon_data beacon_after;
20873ff40c12SJohn Marino 
2088*a1157835SDaniel Fojt 	u16 counter_offset_beacon[2];
2089*a1157835SDaniel Fojt 	u16 counter_offset_presp[2];
2090*a1157835SDaniel Fojt };
2091*a1157835SDaniel Fojt 
2092*a1157835SDaniel Fojt /* TDLS peer capabilities for send_tdls_mgmt() */
2093*a1157835SDaniel Fojt enum tdls_peer_capability {
2094*a1157835SDaniel Fojt 	TDLS_PEER_HT = BIT(0),
2095*a1157835SDaniel Fojt 	TDLS_PEER_VHT = BIT(1),
2096*a1157835SDaniel Fojt 	TDLS_PEER_WMM = BIT(2),
2097*a1157835SDaniel Fojt };
2098*a1157835SDaniel Fojt 
2099*a1157835SDaniel Fojt /* valid info in the wmm_params struct */
2100*a1157835SDaniel Fojt enum wmm_params_valid_info {
2101*a1157835SDaniel Fojt 	WMM_PARAMS_UAPSD_QUEUES_INFO = BIT(0),
2102*a1157835SDaniel Fojt };
2103*a1157835SDaniel Fojt 
2104*a1157835SDaniel Fojt /**
2105*a1157835SDaniel Fojt  * struct wmm_params - WMM parameterss configured for this association
2106*a1157835SDaniel Fojt  * @info_bitmap: Bitmap of valid wmm_params info; indicates what fields
2107*a1157835SDaniel Fojt  *	of the struct contain valid information.
2108*a1157835SDaniel Fojt  * @uapsd_queues: Bitmap of ACs configured for uapsd (valid only if
2109*a1157835SDaniel Fojt  *	%WMM_PARAMS_UAPSD_QUEUES_INFO is set)
2110*a1157835SDaniel Fojt  */
2111*a1157835SDaniel Fojt struct wmm_params {
2112*a1157835SDaniel Fojt 	u8 info_bitmap;
2113*a1157835SDaniel Fojt 	u8 uapsd_queues;
2114*a1157835SDaniel Fojt };
2115*a1157835SDaniel Fojt 
2116*a1157835SDaniel Fojt #ifdef CONFIG_MACSEC
2117*a1157835SDaniel Fojt struct macsec_init_params {
2118*a1157835SDaniel Fojt 	Boolean always_include_sci;
2119*a1157835SDaniel Fojt 	Boolean use_es;
2120*a1157835SDaniel Fojt 	Boolean use_scb;
2121*a1157835SDaniel Fojt };
2122*a1157835SDaniel Fojt #endif /* CONFIG_MACSEC */
2123*a1157835SDaniel Fojt 
2124*a1157835SDaniel Fojt enum drv_br_port_attr {
2125*a1157835SDaniel Fojt 	DRV_BR_PORT_ATTR_PROXYARP,
2126*a1157835SDaniel Fojt 	DRV_BR_PORT_ATTR_HAIRPIN_MODE,
2127*a1157835SDaniel Fojt };
2128*a1157835SDaniel Fojt 
2129*a1157835SDaniel Fojt enum drv_br_net_param {
2130*a1157835SDaniel Fojt 	DRV_BR_NET_PARAM_GARP_ACCEPT,
2131*a1157835SDaniel Fojt 	DRV_BR_MULTICAST_SNOOPING,
2132*a1157835SDaniel Fojt };
2133*a1157835SDaniel Fojt 
2134*a1157835SDaniel Fojt struct drv_acs_params {
2135*a1157835SDaniel Fojt 	/* Selected mode (HOSTAPD_MODE_*) */
2136*a1157835SDaniel Fojt 	enum hostapd_hw_mode hw_mode;
2137*a1157835SDaniel Fojt 
2138*a1157835SDaniel Fojt 	/* Indicates whether HT is enabled */
2139*a1157835SDaniel Fojt 	int ht_enabled;
2140*a1157835SDaniel Fojt 
2141*a1157835SDaniel Fojt 	/* Indicates whether HT40 is enabled */
2142*a1157835SDaniel Fojt 	int ht40_enabled;
2143*a1157835SDaniel Fojt 
2144*a1157835SDaniel Fojt 	/* Indicates whether VHT is enabled */
2145*a1157835SDaniel Fojt 	int vht_enabled;
2146*a1157835SDaniel Fojt 
2147*a1157835SDaniel Fojt 	/* Configured ACS channel width */
2148*a1157835SDaniel Fojt 	u16 ch_width;
2149*a1157835SDaniel Fojt 
2150*a1157835SDaniel Fojt 	/* ACS channel list info */
2151*a1157835SDaniel Fojt 	unsigned int ch_list_len;
2152*a1157835SDaniel Fojt 	const u8 *ch_list;
2153*a1157835SDaniel Fojt 	const int *freq_list;
2154*a1157835SDaniel Fojt };
2155*a1157835SDaniel Fojt 
2156*a1157835SDaniel Fojt struct wpa_bss_trans_info {
2157*a1157835SDaniel Fojt 	u8 mbo_transition_reason;
2158*a1157835SDaniel Fojt 	u8 n_candidates;
2159*a1157835SDaniel Fojt 	u8 *bssid;
2160*a1157835SDaniel Fojt };
2161*a1157835SDaniel Fojt 
2162*a1157835SDaniel Fojt struct wpa_bss_candidate_info {
2163*a1157835SDaniel Fojt 	u8 num;
2164*a1157835SDaniel Fojt 	struct candidate_list {
2165*a1157835SDaniel Fojt 		u8 bssid[ETH_ALEN];
2166*a1157835SDaniel Fojt 		u8 is_accept;
2167*a1157835SDaniel Fojt 		u32 reject_reason;
2168*a1157835SDaniel Fojt 	} *candidates;
2169*a1157835SDaniel Fojt };
2170*a1157835SDaniel Fojt 
2171*a1157835SDaniel Fojt struct wpa_pmkid_params {
2172*a1157835SDaniel Fojt 	const u8 *bssid;
2173*a1157835SDaniel Fojt 	const u8 *ssid;
2174*a1157835SDaniel Fojt 	size_t ssid_len;
2175*a1157835SDaniel Fojt 	const u8 *fils_cache_id;
2176*a1157835SDaniel Fojt 	const u8 *pmkid;
2177*a1157835SDaniel Fojt 	const u8 *pmk;
2178*a1157835SDaniel Fojt 	size_t pmk_len;
2179*a1157835SDaniel Fojt };
2180*a1157835SDaniel Fojt 
2181*a1157835SDaniel Fojt /* Mask used to specify which connection parameters have to be updated */
2182*a1157835SDaniel Fojt enum wpa_drv_update_connect_params_mask {
2183*a1157835SDaniel Fojt 	WPA_DRV_UPDATE_ASSOC_IES	= BIT(0),
2184*a1157835SDaniel Fojt 	WPA_DRV_UPDATE_FILS_ERP_INFO	= BIT(1),
2185*a1157835SDaniel Fojt 	WPA_DRV_UPDATE_AUTH_TYPE	= BIT(2),
2186*a1157835SDaniel Fojt };
2187*a1157835SDaniel Fojt 
2188*a1157835SDaniel Fojt /**
2189*a1157835SDaniel Fojt  * struct external_auth - External authentication trigger parameters
2190*a1157835SDaniel Fojt  *
2191*a1157835SDaniel Fojt  * These are used across the external authentication request and event
2192*a1157835SDaniel Fojt  * interfaces.
2193*a1157835SDaniel Fojt  * @action: Action type / trigger for external authentication. Only significant
2194*a1157835SDaniel Fojt  *	for the event interface.
2195*a1157835SDaniel Fojt  * @bssid: BSSID of the peer with which the authentication has to happen. Used
2196*a1157835SDaniel Fojt  *	by both the request and event interface.
2197*a1157835SDaniel Fojt  * @ssid: SSID of the AP. Used by both the request and event interface.
2198*a1157835SDaniel Fojt  * @ssid_len: SSID length in octets.
2199*a1157835SDaniel Fojt  * @key_mgmt_suite: AKM suite of the respective authentication. Optional for
2200*a1157835SDaniel Fojt  *	the request interface.
2201*a1157835SDaniel Fojt  * @status: Status code, %WLAN_STATUS_SUCCESS for successful authentication,
2202*a1157835SDaniel Fojt  *	use %WLAN_STATUS_UNSPECIFIED_FAILURE if wpa_supplicant cannot give
2203*a1157835SDaniel Fojt  *	the real status code for failures. Used only for the request interface
2204*a1157835SDaniel Fojt  *	from user space to the driver.
2205*a1157835SDaniel Fojt  * @pmkid: Generated PMKID as part of external auth exchange (e.g., SAE).
2206*a1157835SDaniel Fojt  */
2207*a1157835SDaniel Fojt struct external_auth {
2208*a1157835SDaniel Fojt 	enum {
2209*a1157835SDaniel Fojt 		EXT_AUTH_START,
2210*a1157835SDaniel Fojt 		EXT_AUTH_ABORT,
2211*a1157835SDaniel Fojt 	} action;
2212*a1157835SDaniel Fojt 	const u8 *bssid;
2213*a1157835SDaniel Fojt 	const u8 *ssid;
2214*a1157835SDaniel Fojt 	size_t ssid_len;
2215*a1157835SDaniel Fojt 	unsigned int key_mgmt_suite;
2216*a1157835SDaniel Fojt 	u16 status;
2217*a1157835SDaniel Fojt 	const u8 *pmkid;
22183ff40c12SJohn Marino };
22196d49e1aeSJan Lentfer 
22206d49e1aeSJan Lentfer /**
22216d49e1aeSJan Lentfer  * struct wpa_driver_ops - Driver interface API definition
22226d49e1aeSJan Lentfer  *
22236d49e1aeSJan Lentfer  * This structure defines the API that each driver interface needs to implement
22246d49e1aeSJan Lentfer  * for core wpa_supplicant code. All driver specific functionality is captured
22256d49e1aeSJan Lentfer  * in this wrapper.
22266d49e1aeSJan Lentfer  */
22276d49e1aeSJan Lentfer struct wpa_driver_ops {
22286d49e1aeSJan Lentfer 	/** Name of the driver interface */
22296d49e1aeSJan Lentfer 	const char *name;
22306d49e1aeSJan Lentfer 	/** One line description of the driver interface */
22316d49e1aeSJan Lentfer 	const char *desc;
22326d49e1aeSJan Lentfer 
22336d49e1aeSJan Lentfer 	/**
22346d49e1aeSJan Lentfer 	 * get_bssid - Get the current BSSID
22356d49e1aeSJan Lentfer 	 * @priv: private driver interface data
22366d49e1aeSJan Lentfer 	 * @bssid: buffer for BSSID (ETH_ALEN = 6 bytes)
22376d49e1aeSJan Lentfer 	 *
22386d49e1aeSJan Lentfer 	 * Returns: 0 on success, -1 on failure
22396d49e1aeSJan Lentfer 	 *
22406d49e1aeSJan Lentfer 	 * Query kernel driver for the current BSSID and copy it to bssid.
22416d49e1aeSJan Lentfer 	 * Setting bssid to 00:00:00:00:00:00 is recommended if the STA is not
22426d49e1aeSJan Lentfer 	 * associated.
22436d49e1aeSJan Lentfer 	 */
22446d49e1aeSJan Lentfer 	int (*get_bssid)(void *priv, u8 *bssid);
22456d49e1aeSJan Lentfer 
22466d49e1aeSJan Lentfer 	/**
22476d49e1aeSJan Lentfer 	 * get_ssid - Get the current SSID
22486d49e1aeSJan Lentfer 	 * @priv: private driver interface data
22496d49e1aeSJan Lentfer 	 * @ssid: buffer for SSID (at least 32 bytes)
22506d49e1aeSJan Lentfer 	 *
22516d49e1aeSJan Lentfer 	 * Returns: Length of the SSID on success, -1 on failure
22526d49e1aeSJan Lentfer 	 *
22536d49e1aeSJan Lentfer 	 * Query kernel driver for the current SSID and copy it to ssid.
22546d49e1aeSJan Lentfer 	 * Returning zero is recommended if the STA is not associated.
22556d49e1aeSJan Lentfer 	 *
22566d49e1aeSJan Lentfer 	 * Note: SSID is an array of octets, i.e., it is not nul terminated and
22576d49e1aeSJan Lentfer 	 * can, at least in theory, contain control characters (including nul)
22586d49e1aeSJan Lentfer 	 * and as such, should be processed as binary data, not a printable
22596d49e1aeSJan Lentfer 	 * string.
22606d49e1aeSJan Lentfer 	 */
22616d49e1aeSJan Lentfer 	int (*get_ssid)(void *priv, u8 *ssid);
22626d49e1aeSJan Lentfer 
22636d49e1aeSJan Lentfer 	/**
22646d49e1aeSJan Lentfer 	 * set_key - Configure encryption key
22653ff40c12SJohn Marino 	 * @ifname: Interface name (for multi-SSID/VLAN support)
22666d49e1aeSJan Lentfer 	 * @priv: private driver interface data
22676d49e1aeSJan Lentfer 	 * @alg: encryption algorithm (%WPA_ALG_NONE, %WPA_ALG_WEP,
22683ff40c12SJohn Marino 	 *	%WPA_ALG_TKIP, %WPA_ALG_CCMP, %WPA_ALG_IGTK, %WPA_ALG_PMK,
22693ff40c12SJohn Marino 	 *	%WPA_ALG_GCMP, %WPA_ALG_GCMP_256, %WPA_ALG_CCMP_256,
22703ff40c12SJohn Marino 	 *	%WPA_ALG_BIP_GMAC_128, %WPA_ALG_BIP_GMAC_256,
22713ff40c12SJohn Marino 	 *	%WPA_ALG_BIP_CMAC_256);
22726d49e1aeSJan Lentfer 	 *	%WPA_ALG_NONE clears the key.
22733ff40c12SJohn Marino 	 * @addr: Address of the peer STA (BSSID of the current AP when setting
22743ff40c12SJohn Marino 	 *	pairwise key in station mode), ff:ff:ff:ff:ff:ff for
22753ff40c12SJohn Marino 	 *	broadcast keys, %NULL for default keys that are used both for
22763ff40c12SJohn Marino 	 *	broadcast and unicast; when clearing keys, %NULL is used to
22773ff40c12SJohn Marino 	 *	indicate that both the broadcast-only and default key of the
22783ff40c12SJohn Marino 	 *	specified key index is to be cleared
22796d49e1aeSJan Lentfer 	 * @key_idx: key index (0..3), usually 0 for unicast keys; 0..4095 for
22806d49e1aeSJan Lentfer 	 *	IGTK
22816d49e1aeSJan Lentfer 	 * @set_tx: configure this key as the default Tx key (only used when
22826d49e1aeSJan Lentfer 	 *	driver does not support separate unicast/individual key
22836d49e1aeSJan Lentfer 	 * @seq: sequence number/packet number, seq_len octets, the next
22846d49e1aeSJan Lentfer 	 *	packet number to be used for in replay protection; configured
22856d49e1aeSJan Lentfer 	 *	for Rx keys (in most cases, this is only used with broadcast
22863ff40c12SJohn Marino 	 *	keys and set to zero for unicast keys); %NULL if not set
22876d49e1aeSJan Lentfer 	 * @seq_len: length of the seq, depends on the algorithm:
22883ff40c12SJohn Marino 	 *	TKIP: 6 octets, CCMP/GCMP: 6 octets, IGTK: 6 octets
22896d49e1aeSJan Lentfer 	 * @key: key buffer; TKIP: 16-byte temporal key, 8-byte Tx Mic key,
22906d49e1aeSJan Lentfer 	 *	8-byte Rx Mic Key
22916d49e1aeSJan Lentfer 	 * @key_len: length of the key buffer in octets (WEP: 5 or 13,
22923ff40c12SJohn Marino 	 *	TKIP: 32, CCMP/GCMP: 16, IGTK: 16)
22936d49e1aeSJan Lentfer 	 *
22946d49e1aeSJan Lentfer 	 * Returns: 0 on success, -1 on failure
22956d49e1aeSJan Lentfer 	 *
22966d49e1aeSJan Lentfer 	 * Configure the given key for the kernel driver. If the driver
22976d49e1aeSJan Lentfer 	 * supports separate individual keys (4 default keys + 1 individual),
22986d49e1aeSJan Lentfer 	 * addr can be used to determine whether the key is default or
22996d49e1aeSJan Lentfer 	 * individual. If only 4 keys are supported, the default key with key
23006d49e1aeSJan Lentfer 	 * index 0 is used as the individual key. STA must be configured to use
23016d49e1aeSJan Lentfer 	 * it as the default Tx key (set_tx is set) and accept Rx for all the
23026d49e1aeSJan Lentfer 	 * key indexes. In most cases, WPA uses only key indexes 1 and 2 for
23036d49e1aeSJan Lentfer 	 * broadcast keys, so key index 0 is available for this kind of
23046d49e1aeSJan Lentfer 	 * configuration.
23056d49e1aeSJan Lentfer 	 *
23066d49e1aeSJan Lentfer 	 * Please note that TKIP keys include separate TX and RX MIC keys and
23076d49e1aeSJan Lentfer 	 * some drivers may expect them in different order than wpa_supplicant
23086d49e1aeSJan Lentfer 	 * is using. If the TX/RX keys are swapped, all TKIP encrypted packets
23093ff40c12SJohn Marino 	 * will trigger Michael MIC errors. This can be fixed by changing the
23106d49e1aeSJan Lentfer 	 * order of MIC keys by swapping te bytes 16..23 and 24..31 of the key
23116d49e1aeSJan Lentfer 	 * in driver_*.c set_key() implementation, see driver_ndis.c for an
23126d49e1aeSJan Lentfer 	 * example on how this can be done.
23136d49e1aeSJan Lentfer 	 */
23143ff40c12SJohn Marino 	int (*set_key)(const char *ifname, void *priv, enum wpa_alg alg,
23153ff40c12SJohn Marino 		       const u8 *addr, int key_idx, int set_tx,
23163ff40c12SJohn Marino 		       const u8 *seq, size_t seq_len,
23176d49e1aeSJan Lentfer 		       const u8 *key, size_t key_len);
23186d49e1aeSJan Lentfer 
23196d49e1aeSJan Lentfer 	/**
23206d49e1aeSJan Lentfer 	 * init - Initialize driver interface
23216d49e1aeSJan Lentfer 	 * @ctx: context to be used when calling wpa_supplicant functions,
23226d49e1aeSJan Lentfer 	 * e.g., wpa_supplicant_event()
23236d49e1aeSJan Lentfer 	 * @ifname: interface name, e.g., wlan0
23246d49e1aeSJan Lentfer 	 *
23256d49e1aeSJan Lentfer 	 * Returns: Pointer to private data, %NULL on failure
23266d49e1aeSJan Lentfer 	 *
23276d49e1aeSJan Lentfer 	 * Initialize driver interface, including event processing for kernel
23286d49e1aeSJan Lentfer 	 * driver events (e.g., associated, scan results, Michael MIC failure).
23296d49e1aeSJan Lentfer 	 * This function can allocate a private configuration data area for
23306d49e1aeSJan Lentfer 	 * @ctx, file descriptor, interface name, etc. information that may be
23316d49e1aeSJan Lentfer 	 * needed in future driver operations. If this is not used, non-NULL
23326d49e1aeSJan Lentfer 	 * value will need to be returned because %NULL is used to indicate
23336d49e1aeSJan Lentfer 	 * failure. The returned value will be used as 'void *priv' data for
23346d49e1aeSJan Lentfer 	 * all other driver_ops functions.
23356d49e1aeSJan Lentfer 	 *
23366d49e1aeSJan Lentfer 	 * The main event loop (eloop.c) of wpa_supplicant can be used to
23376d49e1aeSJan Lentfer 	 * register callback for read sockets (eloop_register_read_sock()).
23386d49e1aeSJan Lentfer 	 *
23396d49e1aeSJan Lentfer 	 * See below for more information about events and
23406d49e1aeSJan Lentfer 	 * wpa_supplicant_event() function.
23416d49e1aeSJan Lentfer 	 */
23426d49e1aeSJan Lentfer 	void * (*init)(void *ctx, const char *ifname);
23436d49e1aeSJan Lentfer 
23446d49e1aeSJan Lentfer 	/**
23456d49e1aeSJan Lentfer 	 * deinit - Deinitialize driver interface
23466d49e1aeSJan Lentfer 	 * @priv: private driver interface data from init()
23476d49e1aeSJan Lentfer 	 *
23486d49e1aeSJan Lentfer 	 * Shut down driver interface and processing of driver events. Free
23496d49e1aeSJan Lentfer 	 * private data buffer if one was allocated in init() handler.
23506d49e1aeSJan Lentfer 	 */
23516d49e1aeSJan Lentfer 	void (*deinit)(void *priv);
23526d49e1aeSJan Lentfer 
23536d49e1aeSJan Lentfer 	/**
23546d49e1aeSJan Lentfer 	 * set_param - Set driver configuration parameters
23556d49e1aeSJan Lentfer 	 * @priv: private driver interface data from init()
23566d49e1aeSJan Lentfer 	 * @param: driver specific configuration parameters
23576d49e1aeSJan Lentfer 	 *
23586d49e1aeSJan Lentfer 	 * Returns: 0 on success, -1 on failure
23596d49e1aeSJan Lentfer 	 *
23606d49e1aeSJan Lentfer 	 * Optional handler for notifying driver interface about configuration
23616d49e1aeSJan Lentfer 	 * parameters (driver_param).
23626d49e1aeSJan Lentfer 	 */
23636d49e1aeSJan Lentfer 	int (*set_param)(void *priv, const char *param);
23646d49e1aeSJan Lentfer 
23656d49e1aeSJan Lentfer 	/**
23666d49e1aeSJan Lentfer 	 * set_countermeasures - Enable/disable TKIP countermeasures
23676d49e1aeSJan Lentfer 	 * @priv: private driver interface data
23686d49e1aeSJan Lentfer 	 * @enabled: 1 = countermeasures enabled, 0 = disabled
23696d49e1aeSJan Lentfer 	 *
23706d49e1aeSJan Lentfer 	 * Returns: 0 on success, -1 on failure
23716d49e1aeSJan Lentfer 	 *
23726d49e1aeSJan Lentfer 	 * Configure TKIP countermeasures. When these are enabled, the driver
23736d49e1aeSJan Lentfer 	 * should drop all received and queued frames that are using TKIP.
23746d49e1aeSJan Lentfer 	 */
23756d49e1aeSJan Lentfer 	int (*set_countermeasures)(void *priv, int enabled);
23766d49e1aeSJan Lentfer 
23776d49e1aeSJan Lentfer 	/**
23786d49e1aeSJan Lentfer 	 * deauthenticate - Request driver to deauthenticate
23796d49e1aeSJan Lentfer 	 * @priv: private driver interface data
23806d49e1aeSJan Lentfer 	 * @addr: peer address (BSSID of the AP)
23816d49e1aeSJan Lentfer 	 * @reason_code: 16-bit reason code to be sent in the deauthentication
23826d49e1aeSJan Lentfer 	 *	frame
23836d49e1aeSJan Lentfer 	 *
23846d49e1aeSJan Lentfer 	 * Returns: 0 on success, -1 on failure
23856d49e1aeSJan Lentfer 	 */
2386*a1157835SDaniel Fojt 	int (*deauthenticate)(void *priv, const u8 *addr, u16 reason_code);
23876d49e1aeSJan Lentfer 
23886d49e1aeSJan Lentfer 	/**
23896d49e1aeSJan Lentfer 	 * associate - Request driver to associate
23906d49e1aeSJan Lentfer 	 * @priv: private driver interface data
23916d49e1aeSJan Lentfer 	 * @params: association parameters
23926d49e1aeSJan Lentfer 	 *
23936d49e1aeSJan Lentfer 	 * Returns: 0 on success, -1 on failure
23946d49e1aeSJan Lentfer 	 */
23956d49e1aeSJan Lentfer 	int (*associate)(void *priv,
23966d49e1aeSJan Lentfer 			 struct wpa_driver_associate_params *params);
23976d49e1aeSJan Lentfer 
23986d49e1aeSJan Lentfer 	/**
23996d49e1aeSJan Lentfer 	 * add_pmkid - Add PMKSA cache entry to the driver
24006d49e1aeSJan Lentfer 	 * @priv: private driver interface data
2401*a1157835SDaniel Fojt 	 * @params: PMKSA parameters
24026d49e1aeSJan Lentfer 	 *
24036d49e1aeSJan Lentfer 	 * Returns: 0 on success, -1 on failure
24046d49e1aeSJan Lentfer 	 *
24056d49e1aeSJan Lentfer 	 * This function is called when a new PMK is received, as a result of
2406*a1157835SDaniel Fojt 	 * either normal authentication or RSN pre-authentication. The PMKSA
2407*a1157835SDaniel Fojt 	 * parameters are either a set of bssid, pmkid, and pmk; or a set of
2408*a1157835SDaniel Fojt 	 * ssid, fils_cache_id, pmkid, and pmk.
24096d49e1aeSJan Lentfer 	 *
24106d49e1aeSJan Lentfer 	 * If the driver generates RSN IE, i.e., it does not use wpa_ie in
24116d49e1aeSJan Lentfer 	 * associate(), add_pmkid() can be used to add new PMKSA cache entries
24126d49e1aeSJan Lentfer 	 * in the driver. If the driver uses wpa_ie from wpa_supplicant, this
24136d49e1aeSJan Lentfer 	 * driver_ops function does not need to be implemented. Likewise, if
24146d49e1aeSJan Lentfer 	 * the driver does not support WPA, this function is not needed.
24156d49e1aeSJan Lentfer 	 */
2416*a1157835SDaniel Fojt 	int (*add_pmkid)(void *priv, struct wpa_pmkid_params *params);
24176d49e1aeSJan Lentfer 
24186d49e1aeSJan Lentfer 	/**
24196d49e1aeSJan Lentfer 	 * remove_pmkid - Remove PMKSA cache entry to the driver
24206d49e1aeSJan Lentfer 	 * @priv: private driver interface data
2421*a1157835SDaniel Fojt 	 * @params: PMKSA parameters
24226d49e1aeSJan Lentfer 	 *
24236d49e1aeSJan Lentfer 	 * Returns: 0 on success, -1 on failure
24246d49e1aeSJan Lentfer 	 *
24256d49e1aeSJan Lentfer 	 * This function is called when the supplicant drops a PMKSA cache
2426*a1157835SDaniel Fojt 	 * entry for any reason. The PMKSA parameters are either a set of
2427*a1157835SDaniel Fojt 	 * bssid and pmkid; or a set of ssid, fils_cache_id, and pmkid.
24286d49e1aeSJan Lentfer 	 *
24296d49e1aeSJan Lentfer 	 * If the driver generates RSN IE, i.e., it does not use wpa_ie in
24306d49e1aeSJan Lentfer 	 * associate(), remove_pmkid() can be used to synchronize PMKSA caches
24316d49e1aeSJan Lentfer 	 * between the driver and wpa_supplicant. If the driver uses wpa_ie
24326d49e1aeSJan Lentfer 	 * from wpa_supplicant, this driver_ops function does not need to be
24336d49e1aeSJan Lentfer 	 * implemented. Likewise, if the driver does not support WPA, this
24346d49e1aeSJan Lentfer 	 * function is not needed.
24356d49e1aeSJan Lentfer 	 */
2436*a1157835SDaniel Fojt 	int (*remove_pmkid)(void *priv, struct wpa_pmkid_params *params);
24376d49e1aeSJan Lentfer 
24386d49e1aeSJan Lentfer 	/**
24396d49e1aeSJan Lentfer 	 * flush_pmkid - Flush PMKSA cache
24406d49e1aeSJan Lentfer 	 * @priv: private driver interface data
24416d49e1aeSJan Lentfer 	 *
24426d49e1aeSJan Lentfer 	 * Returns: 0 on success, -1 on failure
24436d49e1aeSJan Lentfer 	 *
24446d49e1aeSJan Lentfer 	 * This function is called when the supplicant drops all PMKSA cache
24456d49e1aeSJan Lentfer 	 * entries for any reason.
24466d49e1aeSJan Lentfer 	 *
24476d49e1aeSJan Lentfer 	 * If the driver generates RSN IE, i.e., it does not use wpa_ie in
24486d49e1aeSJan Lentfer 	 * associate(), remove_pmkid() can be used to synchronize PMKSA caches
24496d49e1aeSJan Lentfer 	 * between the driver and wpa_supplicant. If the driver uses wpa_ie
24506d49e1aeSJan Lentfer 	 * from wpa_supplicant, this driver_ops function does not need to be
24516d49e1aeSJan Lentfer 	 * implemented. Likewise, if the driver does not support WPA, this
24526d49e1aeSJan Lentfer 	 * function is not needed.
24536d49e1aeSJan Lentfer 	 */
24546d49e1aeSJan Lentfer 	int (*flush_pmkid)(void *priv);
24556d49e1aeSJan Lentfer 
24566d49e1aeSJan Lentfer 	/**
24576d49e1aeSJan Lentfer 	 * get_capa - Get driver capabilities
24586d49e1aeSJan Lentfer 	 * @priv: private driver interface data
24596d49e1aeSJan Lentfer 	 *
24606d49e1aeSJan Lentfer 	 * Returns: 0 on success, -1 on failure
24616d49e1aeSJan Lentfer 	 *
24626d49e1aeSJan Lentfer 	 * Get driver/firmware/hardware capabilities.
24636d49e1aeSJan Lentfer 	 */
24646d49e1aeSJan Lentfer 	int (*get_capa)(void *priv, struct wpa_driver_capa *capa);
24656d49e1aeSJan Lentfer 
24666d49e1aeSJan Lentfer 	/**
24676d49e1aeSJan Lentfer 	 * poll - Poll driver for association information
24686d49e1aeSJan Lentfer 	 * @priv: private driver interface data
24696d49e1aeSJan Lentfer 	 *
24706d49e1aeSJan Lentfer 	 * This is an option callback that can be used when the driver does not
24716d49e1aeSJan Lentfer 	 * provide event mechanism for association events. This is called when
24726d49e1aeSJan Lentfer 	 * receiving WPA EAPOL-Key messages that require association
24736d49e1aeSJan Lentfer 	 * information. The driver interface is supposed to generate associnfo
24746d49e1aeSJan Lentfer 	 * event before returning from this callback function. In addition, the
24756d49e1aeSJan Lentfer 	 * driver interface should generate an association event after having
24766d49e1aeSJan Lentfer 	 * sent out associnfo.
24776d49e1aeSJan Lentfer 	 */
24786d49e1aeSJan Lentfer 	void (*poll)(void *priv);
24796d49e1aeSJan Lentfer 
24806d49e1aeSJan Lentfer 	/**
2481*a1157835SDaniel Fojt 	 * get_ifindex - Get interface index
2482*a1157835SDaniel Fojt 	 * @priv: private driver interface data
2483*a1157835SDaniel Fojt 	 *
2484*a1157835SDaniel Fojt 	 * Returns: Interface index
2485*a1157835SDaniel Fojt 	 */
2486*a1157835SDaniel Fojt 	unsigned int (*get_ifindex)(void *priv);
2487*a1157835SDaniel Fojt 
2488*a1157835SDaniel Fojt 	/**
24896d49e1aeSJan Lentfer 	 * get_ifname - Get interface name
24906d49e1aeSJan Lentfer 	 * @priv: private driver interface data
24916d49e1aeSJan Lentfer 	 *
24926d49e1aeSJan Lentfer 	 * Returns: Pointer to the interface name. This can differ from the
24936d49e1aeSJan Lentfer 	 * interface name used in init() call. Init() is called first.
24946d49e1aeSJan Lentfer 	 *
24956d49e1aeSJan Lentfer 	 * This optional function can be used to allow the driver interface to
24966d49e1aeSJan Lentfer 	 * replace the interface name with something else, e.g., based on an
24976d49e1aeSJan Lentfer 	 * interface mapping from a more descriptive name.
24986d49e1aeSJan Lentfer 	 */
24996d49e1aeSJan Lentfer 	const char * (*get_ifname)(void *priv);
25006d49e1aeSJan Lentfer 
25016d49e1aeSJan Lentfer 	/**
25026d49e1aeSJan Lentfer 	 * get_mac_addr - Get own MAC address
25036d49e1aeSJan Lentfer 	 * @priv: private driver interface data
25046d49e1aeSJan Lentfer 	 *
25056d49e1aeSJan Lentfer 	 * Returns: Pointer to own MAC address or %NULL on failure
25066d49e1aeSJan Lentfer 	 *
25076d49e1aeSJan Lentfer 	 * This optional function can be used to get the own MAC address of the
25086d49e1aeSJan Lentfer 	 * device from the driver interface code. This is only needed if the
25096d49e1aeSJan Lentfer 	 * l2_packet implementation for the OS does not provide easy access to
25106d49e1aeSJan Lentfer 	 * a MAC address. */
25116d49e1aeSJan Lentfer 	const u8 * (*get_mac_addr)(void *priv);
25126d49e1aeSJan Lentfer 
25136d49e1aeSJan Lentfer 	/**
25146d49e1aeSJan Lentfer 	 * set_operstate - Sets device operating state to DORMANT or UP
25156d49e1aeSJan Lentfer 	 * @priv: private driver interface data
25166d49e1aeSJan Lentfer 	 * @state: 0 = dormant, 1 = up
25176d49e1aeSJan Lentfer 	 * Returns: 0 on success, -1 on failure
25186d49e1aeSJan Lentfer 	 *
25196d49e1aeSJan Lentfer 	 * This is an optional function that can be used on operating systems
25206d49e1aeSJan Lentfer 	 * that support a concept of controlling network device state from user
25216d49e1aeSJan Lentfer 	 * space applications. This function, if set, gets called with
25226d49e1aeSJan Lentfer 	 * state = 1 when authentication has been completed and with state = 0
25236d49e1aeSJan Lentfer 	 * when connection is lost.
25246d49e1aeSJan Lentfer 	 */
25256d49e1aeSJan Lentfer 	int (*set_operstate)(void *priv, int state);
25266d49e1aeSJan Lentfer 
25276d49e1aeSJan Lentfer 	/**
25286d49e1aeSJan Lentfer 	 * mlme_setprotection - MLME-SETPROTECTION.request primitive
25296d49e1aeSJan Lentfer 	 * @priv: Private driver interface data
25306d49e1aeSJan Lentfer 	 * @addr: Address of the station for which to set protection (may be
25316d49e1aeSJan Lentfer 	 * %NULL for group keys)
25326d49e1aeSJan Lentfer 	 * @protect_type: MLME_SETPROTECTION_PROTECT_TYPE_*
25336d49e1aeSJan Lentfer 	 * @key_type: MLME_SETPROTECTION_KEY_TYPE_*
25346d49e1aeSJan Lentfer 	 * Returns: 0 on success, -1 on failure
25356d49e1aeSJan Lentfer 	 *
25366d49e1aeSJan Lentfer 	 * This is an optional function that can be used to set the driver to
25376d49e1aeSJan Lentfer 	 * require protection for Tx and/or Rx frames. This uses the layer
25386d49e1aeSJan Lentfer 	 * interface defined in IEEE 802.11i-2004 clause 10.3.22.1
25396d49e1aeSJan Lentfer 	 * (MLME-SETPROTECTION.request). Many drivers do not use explicit
25406d49e1aeSJan Lentfer 	 * set protection operation; instead, they set protection implicitly
25416d49e1aeSJan Lentfer 	 * based on configured keys.
25426d49e1aeSJan Lentfer 	 */
25436d49e1aeSJan Lentfer 	int (*mlme_setprotection)(void *priv, const u8 *addr, int protect_type,
25446d49e1aeSJan Lentfer 				  int key_type);
25456d49e1aeSJan Lentfer 
25466d49e1aeSJan Lentfer 	/**
25476d49e1aeSJan Lentfer 	 * get_hw_feature_data - Get hardware support data (channels and rates)
25486d49e1aeSJan Lentfer 	 * @priv: Private driver interface data
25496d49e1aeSJan Lentfer 	 * @num_modes: Variable for returning the number of returned modes
25506d49e1aeSJan Lentfer 	 * flags: Variable for returning hardware feature flags
2551*a1157835SDaniel Fojt 	 * @dfs: Variable for returning DFS region (HOSTAPD_DFS_REGION_*)
25526d49e1aeSJan Lentfer 	 * Returns: Pointer to allocated hardware data on success or %NULL on
25536d49e1aeSJan Lentfer 	 * failure. Caller is responsible for freeing this.
25546d49e1aeSJan Lentfer 	 */
25553ff40c12SJohn Marino 	struct hostapd_hw_modes * (*get_hw_feature_data)(void *priv,
25566d49e1aeSJan Lentfer 							 u16 *num_modes,
2557*a1157835SDaniel Fojt 							 u16 *flags, u8 *dfs);
25586d49e1aeSJan Lentfer 
25596d49e1aeSJan Lentfer 	/**
25606d49e1aeSJan Lentfer 	 * send_mlme - Send management frame from MLME
25616d49e1aeSJan Lentfer 	 * @priv: Private driver interface data
25626d49e1aeSJan Lentfer 	 * @data: IEEE 802.11 management frame with IEEE 802.11 header
25636d49e1aeSJan Lentfer 	 * @data_len: Size of the management frame
25643ff40c12SJohn Marino 	 * @noack: Do not wait for this frame to be acked (disable retries)
2565*a1157835SDaniel Fojt 	 * @freq: Frequency (in MHz) to send the frame on, or 0 to let the
2566*a1157835SDaniel Fojt 	 * driver decide
2567*a1157835SDaniel Fojt 	 * @csa_offs: Array of CSA offsets or %NULL
2568*a1157835SDaniel Fojt 	 * @csa_offs_len: Number of elements in csa_offs
25696d49e1aeSJan Lentfer 	 * Returns: 0 on success, -1 on failure
25706d49e1aeSJan Lentfer 	 */
25713ff40c12SJohn Marino 	int (*send_mlme)(void *priv, const u8 *data, size_t data_len,
2572*a1157835SDaniel Fojt 			 int noack, unsigned int freq, const u16 *csa_offs,
2573*a1157835SDaniel Fojt 			 size_t csa_offs_len);
25746d49e1aeSJan Lentfer 
25756d49e1aeSJan Lentfer 	/**
25766d49e1aeSJan Lentfer 	 * update_ft_ies - Update FT (IEEE 802.11r) IEs
25776d49e1aeSJan Lentfer 	 * @priv: Private driver interface data
25786d49e1aeSJan Lentfer 	 * @md: Mobility domain (2 octets) (also included inside ies)
25796d49e1aeSJan Lentfer 	 * @ies: FT IEs (MDIE, FTIE, ...) or %NULL to remove IEs
25806d49e1aeSJan Lentfer 	 * @ies_len: Length of FT IEs in bytes
25816d49e1aeSJan Lentfer 	 * Returns: 0 on success, -1 on failure
25826d49e1aeSJan Lentfer 	 *
25836d49e1aeSJan Lentfer 	 * The supplicant uses this callback to let the driver know that keying
25846d49e1aeSJan Lentfer 	 * material for FT is available and that the driver can use the
25856d49e1aeSJan Lentfer 	 * provided IEs in the next message in FT authentication sequence.
25866d49e1aeSJan Lentfer 	 *
25876d49e1aeSJan Lentfer 	 * This function is only needed for driver that support IEEE 802.11r
25886d49e1aeSJan Lentfer 	 * (Fast BSS Transition).
25896d49e1aeSJan Lentfer 	 */
25906d49e1aeSJan Lentfer 	int (*update_ft_ies)(void *priv, const u8 *md, const u8 *ies,
25916d49e1aeSJan Lentfer 			     size_t ies_len);
25926d49e1aeSJan Lentfer 
25936d49e1aeSJan Lentfer 	/**
25946d49e1aeSJan Lentfer 	 * get_scan_results2 - Fetch the latest scan results
25956d49e1aeSJan Lentfer 	 * @priv: private driver interface data
25966d49e1aeSJan Lentfer 	 *
25976d49e1aeSJan Lentfer 	 * Returns: Allocated buffer of scan results (caller is responsible for
25986d49e1aeSJan Lentfer 	 * freeing the data structure) on success, NULL on failure
25996d49e1aeSJan Lentfer 	 */
26006d49e1aeSJan Lentfer 	 struct wpa_scan_results * (*get_scan_results2)(void *priv);
26016d49e1aeSJan Lentfer 
26026d49e1aeSJan Lentfer 	/**
26036d49e1aeSJan Lentfer 	 * set_country - Set country
26046d49e1aeSJan Lentfer 	 * @priv: Private driver interface data
26056d49e1aeSJan Lentfer 	 * @alpha2: country to which to switch to
26066d49e1aeSJan Lentfer 	 * Returns: 0 on success, -1 on failure
26076d49e1aeSJan Lentfer 	 *
26086d49e1aeSJan Lentfer 	 * This function is for drivers which support some form
26096d49e1aeSJan Lentfer 	 * of setting a regulatory domain.
26106d49e1aeSJan Lentfer 	 */
26116d49e1aeSJan Lentfer 	int (*set_country)(void *priv, const char *alpha2);
26126d49e1aeSJan Lentfer 
26136d49e1aeSJan Lentfer 	/**
26143ff40c12SJohn Marino 	 * get_country - Get country
26153ff40c12SJohn Marino 	 * @priv: Private driver interface data
26163ff40c12SJohn Marino 	 * @alpha2: Buffer for returning country code (at least 3 octets)
26173ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
26183ff40c12SJohn Marino 	 */
26193ff40c12SJohn Marino 	int (*get_country)(void *priv, char *alpha2);
26203ff40c12SJohn Marino 
26213ff40c12SJohn Marino 	/**
26226d49e1aeSJan Lentfer 	 * global_init - Global driver initialization
2623*a1157835SDaniel Fojt 	 * @ctx: wpa_global pointer
26246d49e1aeSJan Lentfer 	 * Returns: Pointer to private data (global), %NULL on failure
26256d49e1aeSJan Lentfer 	 *
26266d49e1aeSJan Lentfer 	 * This optional function is called to initialize the driver wrapper
26276d49e1aeSJan Lentfer 	 * for global data, i.e., data that applies to all interfaces. If this
26286d49e1aeSJan Lentfer 	 * function is implemented, global_deinit() will also need to be
26296d49e1aeSJan Lentfer 	 * implemented to free the private data. The driver will also likely
26306d49e1aeSJan Lentfer 	 * use init2() function instead of init() to get the pointer to global
26316d49e1aeSJan Lentfer 	 * data available to per-interface initializer.
26326d49e1aeSJan Lentfer 	 */
2633*a1157835SDaniel Fojt 	void * (*global_init)(void *ctx);
26346d49e1aeSJan Lentfer 
26356d49e1aeSJan Lentfer 	/**
26366d49e1aeSJan Lentfer 	 * global_deinit - Global driver deinitialization
26376d49e1aeSJan Lentfer 	 * @priv: private driver global data from global_init()
26386d49e1aeSJan Lentfer 	 *
26396d49e1aeSJan Lentfer 	 * Terminate any global driver related functionality and free the
26406d49e1aeSJan Lentfer 	 * global data structure.
26416d49e1aeSJan Lentfer 	 */
26426d49e1aeSJan Lentfer 	void (*global_deinit)(void *priv);
26436d49e1aeSJan Lentfer 
26446d49e1aeSJan Lentfer 	/**
26456d49e1aeSJan Lentfer 	 * init2 - Initialize driver interface (with global data)
26466d49e1aeSJan Lentfer 	 * @ctx: context to be used when calling wpa_supplicant functions,
26476d49e1aeSJan Lentfer 	 * e.g., wpa_supplicant_event()
26486d49e1aeSJan Lentfer 	 * @ifname: interface name, e.g., wlan0
26496d49e1aeSJan Lentfer 	 * @global_priv: private driver global data from global_init()
26506d49e1aeSJan Lentfer 	 * Returns: Pointer to private data, %NULL on failure
26516d49e1aeSJan Lentfer 	 *
26526d49e1aeSJan Lentfer 	 * This function can be used instead of init() if the driver wrapper
26536d49e1aeSJan Lentfer 	 * uses global data.
26546d49e1aeSJan Lentfer 	 */
26556d49e1aeSJan Lentfer 	void * (*init2)(void *ctx, const char *ifname, void *global_priv);
26566d49e1aeSJan Lentfer 
26576d49e1aeSJan Lentfer 	/**
26586d49e1aeSJan Lentfer 	 * get_interfaces - Get information about available interfaces
26596d49e1aeSJan Lentfer 	 * @global_priv: private driver global data from global_init()
26606d49e1aeSJan Lentfer 	 * Returns: Allocated buffer of interface information (caller is
26616d49e1aeSJan Lentfer 	 * responsible for freeing the data structure) on success, NULL on
26626d49e1aeSJan Lentfer 	 * failure
26636d49e1aeSJan Lentfer 	 */
26646d49e1aeSJan Lentfer 	struct wpa_interface_info * (*get_interfaces)(void *global_priv);
26653ff40c12SJohn Marino 
26663ff40c12SJohn Marino 	/**
26673ff40c12SJohn Marino 	 * scan2 - Request the driver to initiate scan
26683ff40c12SJohn Marino 	 * @priv: private driver interface data
26693ff40c12SJohn Marino 	 * @params: Scan parameters
26703ff40c12SJohn Marino 	 *
26713ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
26723ff40c12SJohn Marino 	 *
26733ff40c12SJohn Marino 	 * Once the scan results are ready, the driver should report scan
26743ff40c12SJohn Marino 	 * results event for wpa_supplicant which will eventually request the
26753ff40c12SJohn Marino 	 * results with wpa_driver_get_scan_results2().
26763ff40c12SJohn Marino 	 */
26773ff40c12SJohn Marino 	int (*scan2)(void *priv, struct wpa_driver_scan_params *params);
26783ff40c12SJohn Marino 
26793ff40c12SJohn Marino 	/**
26803ff40c12SJohn Marino 	 * authenticate - Request driver to authenticate
26813ff40c12SJohn Marino 	 * @priv: private driver interface data
26823ff40c12SJohn Marino 	 * @params: authentication parameters
26833ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
26843ff40c12SJohn Marino 	 *
26853ff40c12SJohn Marino 	 * This is an optional function that can be used with drivers that
26863ff40c12SJohn Marino 	 * support separate authentication and association steps, i.e., when
26873ff40c12SJohn Marino 	 * wpa_supplicant can act as the SME. If not implemented, associate()
26883ff40c12SJohn Marino 	 * function is expected to take care of IEEE 802.11 authentication,
26893ff40c12SJohn Marino 	 * too.
26903ff40c12SJohn Marino 	 */
26913ff40c12SJohn Marino 	int (*authenticate)(void *priv,
26923ff40c12SJohn Marino 			    struct wpa_driver_auth_params *params);
26933ff40c12SJohn Marino 
26943ff40c12SJohn Marino 	/**
26953ff40c12SJohn Marino 	 * set_ap - Set Beacon and Probe Response information for AP mode
26963ff40c12SJohn Marino 	 * @priv: Private driver interface data
26973ff40c12SJohn Marino 	 * @params: Parameters to use in AP mode
26983ff40c12SJohn Marino 	 *
26993ff40c12SJohn Marino 	 * This function is used to configure Beacon template and/or extra IEs
27003ff40c12SJohn Marino 	 * to add for Beacon and Probe Response frames for the driver in
27013ff40c12SJohn Marino 	 * AP mode. The driver is responsible for building the full Beacon
27023ff40c12SJohn Marino 	 * frame by concatenating the head part with TIM IE generated by the
27033ff40c12SJohn Marino 	 * driver/firmware and finishing with the tail part. Depending on the
27043ff40c12SJohn Marino 	 * driver architectue, this can be done either by using the full
27053ff40c12SJohn Marino 	 * template or the set of additional IEs (e.g., WPS and P2P IE).
27063ff40c12SJohn Marino 	 * Similarly, Probe Response processing depends on the driver design.
27073ff40c12SJohn Marino 	 * If the driver (or firmware) takes care of replying to Probe Request
27083ff40c12SJohn Marino 	 * frames, the extra IEs provided here needs to be added to the Probe
27093ff40c12SJohn Marino 	 * Response frames.
27103ff40c12SJohn Marino 	 *
27113ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
27123ff40c12SJohn Marino 	 */
27133ff40c12SJohn Marino 	int (*set_ap)(void *priv, struct wpa_driver_ap_params *params);
27143ff40c12SJohn Marino 
27153ff40c12SJohn Marino 	/**
27163ff40c12SJohn Marino 	 * set_acl - Set ACL in AP mode
27173ff40c12SJohn Marino 	 * @priv: Private driver interface data
27183ff40c12SJohn Marino 	 * @params: Parameters to configure ACL
27193ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
27203ff40c12SJohn Marino 	 *
27213ff40c12SJohn Marino 	 * This is used only for the drivers which support MAC address ACL.
27223ff40c12SJohn Marino 	 */
27233ff40c12SJohn Marino 	int (*set_acl)(void *priv, struct hostapd_acl_params *params);
27243ff40c12SJohn Marino 
27253ff40c12SJohn Marino 	/**
27263ff40c12SJohn Marino 	 * hapd_init - Initialize driver interface (hostapd only)
27273ff40c12SJohn Marino 	 * @hapd: Pointer to hostapd context
27283ff40c12SJohn Marino 	 * @params: Configuration for the driver wrapper
27293ff40c12SJohn Marino 	 * Returns: Pointer to private data, %NULL on failure
27303ff40c12SJohn Marino 	 *
27313ff40c12SJohn Marino 	 * This function is used instead of init() or init2() when the driver
27323ff40c12SJohn Marino 	 * wrapper is used with hostapd.
27333ff40c12SJohn Marino 	 */
27343ff40c12SJohn Marino 	void * (*hapd_init)(struct hostapd_data *hapd,
27353ff40c12SJohn Marino 			    struct wpa_init_params *params);
27363ff40c12SJohn Marino 
27373ff40c12SJohn Marino 	/**
27383ff40c12SJohn Marino 	 * hapd_deinit - Deinitialize driver interface (hostapd only)
27393ff40c12SJohn Marino 	 * @priv: Private driver interface data from hapd_init()
27403ff40c12SJohn Marino 	 */
27413ff40c12SJohn Marino 	void (*hapd_deinit)(void *priv);
27423ff40c12SJohn Marino 
27433ff40c12SJohn Marino 	/**
27443ff40c12SJohn Marino 	 * set_ieee8021x - Enable/disable IEEE 802.1X support (AP only)
27453ff40c12SJohn Marino 	 * @priv: Private driver interface data
27463ff40c12SJohn Marino 	 * @params: BSS parameters
27473ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
27483ff40c12SJohn Marino 	 *
27493ff40c12SJohn Marino 	 * This is an optional function to configure the kernel driver to
27503ff40c12SJohn Marino 	 * enable/disable IEEE 802.1X support and set WPA/WPA2 parameters. This
27513ff40c12SJohn Marino 	 * can be left undefined (set to %NULL) if IEEE 802.1X support is
27523ff40c12SJohn Marino 	 * always enabled and the driver uses set_ap() to set WPA/RSN IE
27533ff40c12SJohn Marino 	 * for Beacon frames.
27543ff40c12SJohn Marino 	 *
27553ff40c12SJohn Marino 	 * DEPRECATED - use set_ap() instead
27563ff40c12SJohn Marino 	 */
27573ff40c12SJohn Marino 	int (*set_ieee8021x)(void *priv, struct wpa_bss_params *params);
27583ff40c12SJohn Marino 
27593ff40c12SJohn Marino 	/**
27603ff40c12SJohn Marino 	 * set_privacy - Enable/disable privacy (AP only)
27613ff40c12SJohn Marino 	 * @priv: Private driver interface data
27623ff40c12SJohn Marino 	 * @enabled: 1 = privacy enabled, 0 = disabled
27633ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
27643ff40c12SJohn Marino 	 *
27653ff40c12SJohn Marino 	 * This is an optional function to configure privacy field in the
27663ff40c12SJohn Marino 	 * kernel driver for Beacon frames. This can be left undefined (set to
27673ff40c12SJohn Marino 	 * %NULL) if the driver uses the Beacon template from set_ap().
27683ff40c12SJohn Marino 	 *
27693ff40c12SJohn Marino 	 * DEPRECATED - use set_ap() instead
27703ff40c12SJohn Marino 	 */
27713ff40c12SJohn Marino 	int (*set_privacy)(void *priv, int enabled);
27723ff40c12SJohn Marino 
27733ff40c12SJohn Marino 	/**
27743ff40c12SJohn Marino 	 * get_seqnum - Fetch the current TSC/packet number (AP only)
27753ff40c12SJohn Marino 	 * @ifname: The interface name (main or virtual)
27763ff40c12SJohn Marino 	 * @priv: Private driver interface data
27773ff40c12SJohn Marino 	 * @addr: MAC address of the station or %NULL for group keys
27783ff40c12SJohn Marino 	 * @idx: Key index
27793ff40c12SJohn Marino 	 * @seq: Buffer for returning the latest used TSC/packet number
27803ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
27813ff40c12SJohn Marino 	 *
27823ff40c12SJohn Marino 	 * This function is used to fetch the last used TSC/packet number for
27833ff40c12SJohn Marino 	 * a TKIP, CCMP, GCMP, or BIP/IGTK key. It is mainly used with group
27843ff40c12SJohn Marino 	 * keys, so there is no strict requirement on implementing support for
27853ff40c12SJohn Marino 	 * unicast keys (i.e., addr != %NULL).
27863ff40c12SJohn Marino 	 */
27873ff40c12SJohn Marino 	int (*get_seqnum)(const char *ifname, void *priv, const u8 *addr,
27883ff40c12SJohn Marino 			  int idx, u8 *seq);
27893ff40c12SJohn Marino 
27903ff40c12SJohn Marino 	/**
27913ff40c12SJohn Marino 	 * flush - Flush all association stations (AP only)
27923ff40c12SJohn Marino 	 * @priv: Private driver interface data
27933ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
27943ff40c12SJohn Marino 	 *
27953ff40c12SJohn Marino 	 * This function requests the driver to disassociate all associated
27963ff40c12SJohn Marino 	 * stations. This function does not need to be implemented if the
27973ff40c12SJohn Marino 	 * driver does not process association frames internally.
27983ff40c12SJohn Marino 	 */
27993ff40c12SJohn Marino 	int (*flush)(void *priv);
28003ff40c12SJohn Marino 
28013ff40c12SJohn Marino 	/**
28023ff40c12SJohn Marino 	 * set_generic_elem - Add IEs into Beacon/Probe Response frames (AP)
28033ff40c12SJohn Marino 	 * @priv: Private driver interface data
28043ff40c12SJohn Marino 	 * @elem: Information elements
28053ff40c12SJohn Marino 	 * @elem_len: Length of the elem buffer in octets
28063ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
28073ff40c12SJohn Marino 	 *
28083ff40c12SJohn Marino 	 * This is an optional function to add information elements in the
28093ff40c12SJohn Marino 	 * kernel driver for Beacon and Probe Response frames. This can be left
28103ff40c12SJohn Marino 	 * undefined (set to %NULL) if the driver uses the Beacon template from
28113ff40c12SJohn Marino 	 * set_ap().
28123ff40c12SJohn Marino 	 *
28133ff40c12SJohn Marino 	 * DEPRECATED - use set_ap() instead
28143ff40c12SJohn Marino 	 */
28153ff40c12SJohn Marino 	int (*set_generic_elem)(void *priv, const u8 *elem, size_t elem_len);
28163ff40c12SJohn Marino 
28173ff40c12SJohn Marino 	/**
28183ff40c12SJohn Marino 	 * read_sta_data - Fetch station data
28193ff40c12SJohn Marino 	 * @priv: Private driver interface data
28203ff40c12SJohn Marino 	 * @data: Buffer for returning station information
28213ff40c12SJohn Marino 	 * @addr: MAC address of the station
28223ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
28233ff40c12SJohn Marino 	 */
28243ff40c12SJohn Marino 	int (*read_sta_data)(void *priv, struct hostap_sta_driver_data *data,
28253ff40c12SJohn Marino 			     const u8 *addr);
28263ff40c12SJohn Marino 
28273ff40c12SJohn Marino 	/**
28283ff40c12SJohn Marino 	 * hapd_send_eapol - Send an EAPOL packet (AP only)
28293ff40c12SJohn Marino 	 * @priv: private driver interface data
28303ff40c12SJohn Marino 	 * @addr: Destination MAC address
28313ff40c12SJohn Marino 	 * @data: EAPOL packet starting with IEEE 802.1X header
28323ff40c12SJohn Marino 	 * @data_len: Length of the EAPOL packet in octets
28333ff40c12SJohn Marino 	 * @encrypt: Whether the frame should be encrypted
28343ff40c12SJohn Marino 	 * @own_addr: Source MAC address
28353ff40c12SJohn Marino 	 * @flags: WPA_STA_* flags for the destination station
28363ff40c12SJohn Marino 	 *
28373ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
28383ff40c12SJohn Marino 	 */
28393ff40c12SJohn Marino 	int (*hapd_send_eapol)(void *priv, const u8 *addr, const u8 *data,
28403ff40c12SJohn Marino 			       size_t data_len, int encrypt,
28413ff40c12SJohn Marino 			       const u8 *own_addr, u32 flags);
28423ff40c12SJohn Marino 
28433ff40c12SJohn Marino 	/**
28443ff40c12SJohn Marino 	 * sta_deauth - Deauthenticate a station (AP only)
28453ff40c12SJohn Marino 	 * @priv: Private driver interface data
28463ff40c12SJohn Marino 	 * @own_addr: Source address and BSSID for the Deauthentication frame
28473ff40c12SJohn Marino 	 * @addr: MAC address of the station to deauthenticate
28483ff40c12SJohn Marino 	 * @reason: Reason code for the Deauthentiation frame
28493ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
28503ff40c12SJohn Marino 	 *
28513ff40c12SJohn Marino 	 * This function requests a specific station to be deauthenticated and
28523ff40c12SJohn Marino 	 * a Deauthentication frame to be sent to it.
28533ff40c12SJohn Marino 	 */
28543ff40c12SJohn Marino 	int (*sta_deauth)(void *priv, const u8 *own_addr, const u8 *addr,
2855*a1157835SDaniel Fojt 			  u16 reason);
28563ff40c12SJohn Marino 
28573ff40c12SJohn Marino 	/**
28583ff40c12SJohn Marino 	 * sta_disassoc - Disassociate a station (AP only)
28593ff40c12SJohn Marino 	 * @priv: Private driver interface data
28603ff40c12SJohn Marino 	 * @own_addr: Source address and BSSID for the Disassociation frame
28613ff40c12SJohn Marino 	 * @addr: MAC address of the station to disassociate
28623ff40c12SJohn Marino 	 * @reason: Reason code for the Disassociation frame
28633ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
28643ff40c12SJohn Marino 	 *
28653ff40c12SJohn Marino 	 * This function requests a specific station to be disassociated and
28663ff40c12SJohn Marino 	 * a Disassociation frame to be sent to it.
28673ff40c12SJohn Marino 	 */
28683ff40c12SJohn Marino 	int (*sta_disassoc)(void *priv, const u8 *own_addr, const u8 *addr,
2869*a1157835SDaniel Fojt 			    u16 reason);
28703ff40c12SJohn Marino 
28713ff40c12SJohn Marino 	/**
28723ff40c12SJohn Marino 	 * sta_remove - Remove a station entry (AP only)
28733ff40c12SJohn Marino 	 * @priv: Private driver interface data
28743ff40c12SJohn Marino 	 * @addr: MAC address of the station to be removed
28753ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
28763ff40c12SJohn Marino 	 */
28773ff40c12SJohn Marino 	int (*sta_remove)(void *priv, const u8 *addr);
28783ff40c12SJohn Marino 
28793ff40c12SJohn Marino 	/**
28803ff40c12SJohn Marino 	 * hapd_get_ssid - Get the current SSID (AP only)
28813ff40c12SJohn Marino 	 * @priv: Private driver interface data
28823ff40c12SJohn Marino 	 * @buf: Buffer for returning the SSID
28833ff40c12SJohn Marino 	 * @len: Maximum length of the buffer
28843ff40c12SJohn Marino 	 * Returns: Length of the SSID on success, -1 on failure
28853ff40c12SJohn Marino 	 *
28863ff40c12SJohn Marino 	 * This function need not be implemented if the driver uses Beacon
28873ff40c12SJohn Marino 	 * template from set_ap() and does not reply to Probe Request frames.
28883ff40c12SJohn Marino 	 */
28893ff40c12SJohn Marino 	int (*hapd_get_ssid)(void *priv, u8 *buf, int len);
28903ff40c12SJohn Marino 
28913ff40c12SJohn Marino 	/**
28923ff40c12SJohn Marino 	 * hapd_set_ssid - Set SSID (AP only)
28933ff40c12SJohn Marino 	 * @priv: Private driver interface data
28943ff40c12SJohn Marino 	 * @buf: SSID
28953ff40c12SJohn Marino 	 * @len: Length of the SSID in octets
28963ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
28973ff40c12SJohn Marino 	 *
28983ff40c12SJohn Marino 	 * DEPRECATED - use set_ap() instead
28993ff40c12SJohn Marino 	 */
29003ff40c12SJohn Marino 	int (*hapd_set_ssid)(void *priv, const u8 *buf, int len);
29013ff40c12SJohn Marino 
29023ff40c12SJohn Marino 	/**
29033ff40c12SJohn Marino 	 * hapd_set_countermeasures - Enable/disable TKIP countermeasures (AP)
29043ff40c12SJohn Marino 	 * @priv: Private driver interface data
29053ff40c12SJohn Marino 	 * @enabled: 1 = countermeasures enabled, 0 = disabled
29063ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
29073ff40c12SJohn Marino 	 *
29083ff40c12SJohn Marino 	 * This need not be implemented if the driver does not take care of
29093ff40c12SJohn Marino 	 * association processing.
29103ff40c12SJohn Marino 	 */
29113ff40c12SJohn Marino 	int (*hapd_set_countermeasures)(void *priv, int enabled);
29123ff40c12SJohn Marino 
29133ff40c12SJohn Marino 	/**
29143ff40c12SJohn Marino 	 * sta_add - Add a station entry
29153ff40c12SJohn Marino 	 * @priv: Private driver interface data
29163ff40c12SJohn Marino 	 * @params: Station parameters
29173ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
29183ff40c12SJohn Marino 	 *
2919*a1157835SDaniel Fojt 	 * This function is used to add or set (params->set 1) a station
2920*a1157835SDaniel Fojt 	 * entry in the driver. Adding STA entries is used only if the driver
29213ff40c12SJohn Marino 	 * does not take care of association processing.
29223ff40c12SJohn Marino 	 *
2923*a1157835SDaniel Fojt 	 * With drivers that don't support full AP client state, this function
2924*a1157835SDaniel Fojt 	 * is used to add a station entry to the driver once the station has
2925*a1157835SDaniel Fojt 	 * completed association.
2926*a1157835SDaniel Fojt 	 *
2927*a1157835SDaniel Fojt 	 * With TDLS, this function is used to add or set (params->set 1)
2928*a1157835SDaniel Fojt 	 * TDLS peer entries (even with drivers that do not support full AP
2929*a1157835SDaniel Fojt 	 * client state).
29303ff40c12SJohn Marino 	 */
29313ff40c12SJohn Marino 	int (*sta_add)(void *priv, struct hostapd_sta_add_params *params);
29323ff40c12SJohn Marino 
29333ff40c12SJohn Marino 	/**
29343ff40c12SJohn Marino 	 * get_inact_sec - Get station inactivity duration (AP only)
29353ff40c12SJohn Marino 	 * @priv: Private driver interface data
29363ff40c12SJohn Marino 	 * @addr: Station address
29373ff40c12SJohn Marino 	 * Returns: Number of seconds station has been inactive, -1 on failure
29383ff40c12SJohn Marino 	 */
29393ff40c12SJohn Marino 	int (*get_inact_sec)(void *priv, const u8 *addr);
29403ff40c12SJohn Marino 
29413ff40c12SJohn Marino 	/**
29423ff40c12SJohn Marino 	 * sta_clear_stats - Clear station statistics (AP only)
29433ff40c12SJohn Marino 	 * @priv: Private driver interface data
29443ff40c12SJohn Marino 	 * @addr: Station address
29453ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
29463ff40c12SJohn Marino 	 */
29473ff40c12SJohn Marino 	int (*sta_clear_stats)(void *priv, const u8 *addr);
29483ff40c12SJohn Marino 
29493ff40c12SJohn Marino 	/**
29503ff40c12SJohn Marino 	 * set_freq - Set channel/frequency (AP only)
29513ff40c12SJohn Marino 	 * @priv: Private driver interface data
29523ff40c12SJohn Marino 	 * @freq: Channel parameters
29533ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
29543ff40c12SJohn Marino 	 */
29553ff40c12SJohn Marino 	int (*set_freq)(void *priv, struct hostapd_freq_params *freq);
29563ff40c12SJohn Marino 
29573ff40c12SJohn Marino 	/**
29583ff40c12SJohn Marino 	 * set_rts - Set RTS threshold
29593ff40c12SJohn Marino 	 * @priv: Private driver interface data
29603ff40c12SJohn Marino 	 * @rts: RTS threshold in octets
29613ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
29623ff40c12SJohn Marino 	 */
29633ff40c12SJohn Marino 	int (*set_rts)(void *priv, int rts);
29643ff40c12SJohn Marino 
29653ff40c12SJohn Marino 	/**
29663ff40c12SJohn Marino 	 * set_frag - Set fragmentation threshold
29673ff40c12SJohn Marino 	 * @priv: Private driver interface data
29683ff40c12SJohn Marino 	 * @frag: Fragmentation threshold in octets
29693ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
29703ff40c12SJohn Marino 	 */
29713ff40c12SJohn Marino 	int (*set_frag)(void *priv, int frag);
29723ff40c12SJohn Marino 
29733ff40c12SJohn Marino 	/**
29743ff40c12SJohn Marino 	 * sta_set_flags - Set station flags (AP only)
29753ff40c12SJohn Marino 	 * @priv: Private driver interface data
29763ff40c12SJohn Marino 	 * @addr: Station address
29773ff40c12SJohn Marino 	 * @total_flags: Bitmap of all WPA_STA_* flags currently set
29783ff40c12SJohn Marino 	 * @flags_or: Bitmap of WPA_STA_* flags to add
29793ff40c12SJohn Marino 	 * @flags_and: Bitmap of WPA_STA_* flags to us as a mask
29803ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
29813ff40c12SJohn Marino 	 */
29823ff40c12SJohn Marino 	int (*sta_set_flags)(void *priv, const u8 *addr,
2983*a1157835SDaniel Fojt 			     unsigned int total_flags, unsigned int flags_or,
2984*a1157835SDaniel Fojt 			     unsigned int flags_and);
2985*a1157835SDaniel Fojt 
2986*a1157835SDaniel Fojt 	/**
2987*a1157835SDaniel Fojt 	 * sta_set_airtime_weight - Set station airtime weight (AP only)
2988*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
2989*a1157835SDaniel Fojt 	 * @addr: Station address
2990*a1157835SDaniel Fojt 	 * @weight: New weight for station airtime assignment
2991*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
2992*a1157835SDaniel Fojt 	 */
2993*a1157835SDaniel Fojt 	int (*sta_set_airtime_weight)(void *priv, const u8 *addr,
2994*a1157835SDaniel Fojt 				      unsigned int weight);
29953ff40c12SJohn Marino 
29963ff40c12SJohn Marino 	/**
29973ff40c12SJohn Marino 	 * set_tx_queue_params - Set TX queue parameters
29983ff40c12SJohn Marino 	 * @priv: Private driver interface data
29993ff40c12SJohn Marino 	 * @queue: Queue number (0 = VO, 1 = VI, 2 = BE, 3 = BK)
30003ff40c12SJohn Marino 	 * @aifs: AIFS
30013ff40c12SJohn Marino 	 * @cw_min: cwMin
30023ff40c12SJohn Marino 	 * @cw_max: cwMax
30033ff40c12SJohn Marino 	 * @burst_time: Maximum length for bursting in 0.1 msec units
30043ff40c12SJohn Marino 	 */
30053ff40c12SJohn Marino 	int (*set_tx_queue_params)(void *priv, int queue, int aifs, int cw_min,
30063ff40c12SJohn Marino 				   int cw_max, int burst_time);
30073ff40c12SJohn Marino 
30083ff40c12SJohn Marino 	/**
30093ff40c12SJohn Marino 	 * if_add - Add a virtual interface
30103ff40c12SJohn Marino 	 * @priv: Private driver interface data
30113ff40c12SJohn Marino 	 * @type: Interface type
30123ff40c12SJohn Marino 	 * @ifname: Interface name for the new virtual interface
30133ff40c12SJohn Marino 	 * @addr: Local address to use for the interface or %NULL to use the
30143ff40c12SJohn Marino 	 *	parent interface address
30153ff40c12SJohn Marino 	 * @bss_ctx: BSS context for %WPA_IF_AP_BSS interfaces
30163ff40c12SJohn Marino 	 * @drv_priv: Pointer for overwriting the driver context or %NULL if
30173ff40c12SJohn Marino 	 *	not allowed (applies only to %WPA_IF_AP_BSS type)
30183ff40c12SJohn Marino 	 * @force_ifname: Buffer for returning an interface name that the
30193ff40c12SJohn Marino 	 *	driver ended up using if it differs from the requested ifname
30203ff40c12SJohn Marino 	 * @if_addr: Buffer for returning the allocated interface address
30213ff40c12SJohn Marino 	 *	(this may differ from the requested addr if the driver cannot
30223ff40c12SJohn Marino 	 *	change interface address)
30233ff40c12SJohn Marino 	 * @bridge: Bridge interface to use or %NULL if no bridge configured
30243ff40c12SJohn Marino 	 * @use_existing: Whether to allow existing interface to be used
3025*a1157835SDaniel Fojt 	 * @setup_ap: Whether to setup AP for %WPA_IF_AP_BSS interfaces
30263ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
30273ff40c12SJohn Marino 	 */
30283ff40c12SJohn Marino 	int (*if_add)(void *priv, enum wpa_driver_if_type type,
30293ff40c12SJohn Marino 		      const char *ifname, const u8 *addr, void *bss_ctx,
30303ff40c12SJohn Marino 		      void **drv_priv, char *force_ifname, u8 *if_addr,
3031*a1157835SDaniel Fojt 		      const char *bridge, int use_existing, int setup_ap);
30323ff40c12SJohn Marino 
30333ff40c12SJohn Marino 	/**
30343ff40c12SJohn Marino 	 * if_remove - Remove a virtual interface
30353ff40c12SJohn Marino 	 * @priv: Private driver interface data
30363ff40c12SJohn Marino 	 * @type: Interface type
30373ff40c12SJohn Marino 	 * @ifname: Interface name of the virtual interface to be removed
30383ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
30393ff40c12SJohn Marino 	 */
30403ff40c12SJohn Marino 	int (*if_remove)(void *priv, enum wpa_driver_if_type type,
30413ff40c12SJohn Marino 			 const char *ifname);
30423ff40c12SJohn Marino 
30433ff40c12SJohn Marino 	/**
30443ff40c12SJohn Marino 	 * set_sta_vlan - Bind a station into a specific interface (AP only)
30453ff40c12SJohn Marino 	 * @priv: Private driver interface data
30463ff40c12SJohn Marino 	 * @ifname: Interface (main or virtual BSS or VLAN)
30473ff40c12SJohn Marino 	 * @addr: MAC address of the associated station
30483ff40c12SJohn Marino 	 * @vlan_id: VLAN ID
30493ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
30503ff40c12SJohn Marino 	 *
30513ff40c12SJohn Marino 	 * This function is used to bind a station to a specific virtual
30523ff40c12SJohn Marino 	 * interface. It is only used if when virtual interfaces are supported,
30533ff40c12SJohn Marino 	 * e.g., to assign stations to different VLAN interfaces based on
30543ff40c12SJohn Marino 	 * information from a RADIUS server. This allows separate broadcast
30553ff40c12SJohn Marino 	 * domains to be used with a single BSS.
30563ff40c12SJohn Marino 	 */
30573ff40c12SJohn Marino 	int (*set_sta_vlan)(void *priv, const u8 *addr, const char *ifname,
30583ff40c12SJohn Marino 			    int vlan_id);
30593ff40c12SJohn Marino 
30603ff40c12SJohn Marino 	/**
30613ff40c12SJohn Marino 	 * commit - Optional commit changes handler (AP only)
30623ff40c12SJohn Marino 	 * @priv: driver private data
30633ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
30643ff40c12SJohn Marino 	 *
30653ff40c12SJohn Marino 	 * This optional handler function can be registered if the driver
30663ff40c12SJohn Marino 	 * interface implementation needs to commit changes (e.g., by setting
30673ff40c12SJohn Marino 	 * network interface up) at the end of initial configuration. If set,
30683ff40c12SJohn Marino 	 * this handler will be called after initial setup has been completed.
30693ff40c12SJohn Marino 	 */
30703ff40c12SJohn Marino 	int (*commit)(void *priv);
30713ff40c12SJohn Marino 
30723ff40c12SJohn Marino 	/**
30733ff40c12SJohn Marino 	 * send_ether - Send an ethernet packet (AP only)
30743ff40c12SJohn Marino 	 * @priv: private driver interface data
30753ff40c12SJohn Marino 	 * @dst: Destination MAC address
30763ff40c12SJohn Marino 	 * @src: Source MAC address
30773ff40c12SJohn Marino 	 * @proto: Ethertype
30783ff40c12SJohn Marino 	 * @data: EAPOL packet starting with IEEE 802.1X header
30793ff40c12SJohn Marino 	 * @data_len: Length of the EAPOL packet in octets
30803ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
30813ff40c12SJohn Marino 	 */
30823ff40c12SJohn Marino 	int (*send_ether)(void *priv, const u8 *dst, const u8 *src, u16 proto,
30833ff40c12SJohn Marino 			  const u8 *data, size_t data_len);
30843ff40c12SJohn Marino 
30853ff40c12SJohn Marino 	/**
30863ff40c12SJohn Marino 	 * set_radius_acl_auth - Notification of RADIUS ACL change
30873ff40c12SJohn Marino 	 * @priv: Private driver interface data
30883ff40c12SJohn Marino 	 * @mac: MAC address of the station
30893ff40c12SJohn Marino 	 * @accepted: Whether the station was accepted
30903ff40c12SJohn Marino 	 * @session_timeout: Session timeout for the station
30913ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
30923ff40c12SJohn Marino 	 */
30933ff40c12SJohn Marino 	int (*set_radius_acl_auth)(void *priv, const u8 *mac, int accepted,
30943ff40c12SJohn Marino 				   u32 session_timeout);
30953ff40c12SJohn Marino 
30963ff40c12SJohn Marino 	/**
30973ff40c12SJohn Marino 	 * set_radius_acl_expire - Notification of RADIUS ACL expiration
30983ff40c12SJohn Marino 	 * @priv: Private driver interface data
30993ff40c12SJohn Marino 	 * @mac: MAC address of the station
31003ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
31013ff40c12SJohn Marino 	 */
31023ff40c12SJohn Marino 	int (*set_radius_acl_expire)(void *priv, const u8 *mac);
31033ff40c12SJohn Marino 
31043ff40c12SJohn Marino 	/**
31053ff40c12SJohn Marino 	 * set_ap_wps_ie - Add WPS IE(s) into Beacon/Probe Response frames (AP)
31063ff40c12SJohn Marino 	 * @priv: Private driver interface data
31073ff40c12SJohn Marino 	 * @beacon: WPS IE(s) for Beacon frames or %NULL to remove extra IE(s)
31083ff40c12SJohn Marino 	 * @proberesp: WPS IE(s) for Probe Response frames or %NULL to remove
31093ff40c12SJohn Marino 	 *	extra IE(s)
31103ff40c12SJohn Marino 	 * @assocresp: WPS IE(s) for (Re)Association Response frames or %NULL
31113ff40c12SJohn Marino 	 *	to remove extra IE(s)
31123ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
31133ff40c12SJohn Marino 	 *
31143ff40c12SJohn Marino 	 * This is an optional function to add WPS IE in the kernel driver for
31153ff40c12SJohn Marino 	 * Beacon and Probe Response frames. This can be left undefined (set
31163ff40c12SJohn Marino 	 * to %NULL) if the driver uses the Beacon template from set_ap()
31173ff40c12SJohn Marino 	 * and does not process Probe Request frames. If the driver takes care
31183ff40c12SJohn Marino 	 * of (Re)Association frame processing, the assocresp buffer includes
31193ff40c12SJohn Marino 	 * WPS IE(s) that need to be added to (Re)Association Response frames
31203ff40c12SJohn Marino 	 * whenever a (Re)Association Request frame indicated use of WPS.
31213ff40c12SJohn Marino 	 *
31223ff40c12SJohn Marino 	 * This will also be used to add P2P IE(s) into Beacon/Probe Response
31233ff40c12SJohn Marino 	 * frames when operating as a GO. The driver is responsible for adding
31243ff40c12SJohn Marino 	 * timing related attributes (e.g., NoA) in addition to the IEs
31253ff40c12SJohn Marino 	 * included here by appending them after these buffers. This call is
31263ff40c12SJohn Marino 	 * also used to provide Probe Response IEs for P2P Listen state
31273ff40c12SJohn Marino 	 * operations for drivers that generate the Probe Response frames
31283ff40c12SJohn Marino 	 * internally.
31293ff40c12SJohn Marino 	 *
31303ff40c12SJohn Marino 	 * DEPRECATED - use set_ap() instead
31313ff40c12SJohn Marino 	 */
31323ff40c12SJohn Marino 	int (*set_ap_wps_ie)(void *priv, const struct wpabuf *beacon,
31333ff40c12SJohn Marino 			     const struct wpabuf *proberesp,
31343ff40c12SJohn Marino 			     const struct wpabuf *assocresp);
31353ff40c12SJohn Marino 
31363ff40c12SJohn Marino 	/**
31373ff40c12SJohn Marino 	 * set_supp_port - Set IEEE 802.1X Supplicant Port status
31383ff40c12SJohn Marino 	 * @priv: Private driver interface data
31393ff40c12SJohn Marino 	 * @authorized: Whether the port is authorized
31403ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
31413ff40c12SJohn Marino 	 */
31423ff40c12SJohn Marino 	int (*set_supp_port)(void *priv, int authorized);
31433ff40c12SJohn Marino 
31443ff40c12SJohn Marino 	/**
31453ff40c12SJohn Marino 	 * set_wds_sta - Bind a station into a 4-address WDS (AP only)
31463ff40c12SJohn Marino 	 * @priv: Private driver interface data
31473ff40c12SJohn Marino 	 * @addr: MAC address of the associated station
31483ff40c12SJohn Marino 	 * @aid: Association ID
31493ff40c12SJohn Marino 	 * @val: 1 = bind to 4-address WDS; 0 = unbind
31503ff40c12SJohn Marino 	 * @bridge_ifname: Bridge interface to use for the WDS station or %NULL
31513ff40c12SJohn Marino 	 *	to indicate that bridge is not to be used
31523ff40c12SJohn Marino 	 * @ifname_wds: Buffer to return the interface name for the new WDS
31533ff40c12SJohn Marino 	 *	station or %NULL to indicate name is not returned.
31543ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
31553ff40c12SJohn Marino 	 */
31563ff40c12SJohn Marino 	int (*set_wds_sta)(void *priv, const u8 *addr, int aid, int val,
31573ff40c12SJohn Marino 			   const char *bridge_ifname, char *ifname_wds);
31583ff40c12SJohn Marino 
31593ff40c12SJohn Marino 	/**
31603ff40c12SJohn Marino 	 * send_action - Transmit an Action frame
31613ff40c12SJohn Marino 	 * @priv: Private driver interface data
31623ff40c12SJohn Marino 	 * @freq: Frequency (in MHz) of the channel
31633ff40c12SJohn Marino 	 * @wait: Time to wait off-channel for a response (in ms), or zero
31643ff40c12SJohn Marino 	 * @dst: Destination MAC address (Address 1)
31653ff40c12SJohn Marino 	 * @src: Source MAC address (Address 2)
31663ff40c12SJohn Marino 	 * @bssid: BSSID (Address 3)
31673ff40c12SJohn Marino 	 * @data: Frame body
31683ff40c12SJohn Marino 	 * @data_len: data length in octets
31693ff40c12SJohn Marino 	 @ @no_cck: Whether CCK rates must not be used to transmit this frame
31703ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
31713ff40c12SJohn Marino 	 *
31723ff40c12SJohn Marino 	 * This command can be used to request the driver to transmit an action
31733ff40c12SJohn Marino 	 * frame to the specified destination.
31743ff40c12SJohn Marino 	 *
31753ff40c12SJohn Marino 	 * If the %WPA_DRIVER_FLAGS_OFFCHANNEL_TX flag is set, the frame will
31763ff40c12SJohn Marino 	 * be transmitted on the given channel and the device will wait for a
31773ff40c12SJohn Marino 	 * response on that channel for the given wait time.
31783ff40c12SJohn Marino 	 *
31793ff40c12SJohn Marino 	 * If the flag is not set, the wait time will be ignored. In this case,
31803ff40c12SJohn Marino 	 * if a remain-on-channel duration is in progress, the frame must be
31813ff40c12SJohn Marino 	 * transmitted on that channel; alternatively the frame may be sent on
31823ff40c12SJohn Marino 	 * the current operational channel (if in associated state in station
31833ff40c12SJohn Marino 	 * mode or while operating as an AP.)
3184*a1157835SDaniel Fojt 	 *
3185*a1157835SDaniel Fojt 	 * If @src differs from the device MAC address, use of a random
3186*a1157835SDaniel Fojt 	 * transmitter address is requested for this message exchange.
31873ff40c12SJohn Marino 	 */
31883ff40c12SJohn Marino 	int (*send_action)(void *priv, unsigned int freq, unsigned int wait,
31893ff40c12SJohn Marino 			   const u8 *dst, const u8 *src, const u8 *bssid,
31903ff40c12SJohn Marino 			   const u8 *data, size_t data_len, int no_cck);
31913ff40c12SJohn Marino 
31923ff40c12SJohn Marino 	/**
31933ff40c12SJohn Marino 	 * send_action_cancel_wait - Cancel action frame TX wait
31943ff40c12SJohn Marino 	 * @priv: Private driver interface data
31953ff40c12SJohn Marino 	 *
31963ff40c12SJohn Marino 	 * This command cancels the wait time associated with sending an action
31973ff40c12SJohn Marino 	 * frame. It is only available when %WPA_DRIVER_FLAGS_OFFCHANNEL_TX is
31983ff40c12SJohn Marino 	 * set in the driver flags.
31993ff40c12SJohn Marino 	 */
32003ff40c12SJohn Marino 	void (*send_action_cancel_wait)(void *priv);
32013ff40c12SJohn Marino 
32023ff40c12SJohn Marino 	/**
32033ff40c12SJohn Marino 	 * remain_on_channel - Remain awake on a channel
32043ff40c12SJohn Marino 	 * @priv: Private driver interface data
32053ff40c12SJohn Marino 	 * @freq: Frequency (in MHz) of the channel
32063ff40c12SJohn Marino 	 * @duration: Duration in milliseconds
32073ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
32083ff40c12SJohn Marino 	 *
32093ff40c12SJohn Marino 	 * This command is used to request the driver to remain awake on the
32103ff40c12SJohn Marino 	 * specified channel for the specified duration and report received
32113ff40c12SJohn Marino 	 * Action frames with EVENT_RX_MGMT events. Optionally, received
32123ff40c12SJohn Marino 	 * Probe Request frames may also be requested to be reported by calling
32133ff40c12SJohn Marino 	 * probe_req_report(). These will be reported with EVENT_RX_PROBE_REQ.
32143ff40c12SJohn Marino 	 *
32153ff40c12SJohn Marino 	 * The driver may not be at the requested channel when this function
32163ff40c12SJohn Marino 	 * returns, i.e., the return code is only indicating whether the
32173ff40c12SJohn Marino 	 * request was accepted. The caller will need to wait until the
32183ff40c12SJohn Marino 	 * EVENT_REMAIN_ON_CHANNEL event indicates that the driver has
32193ff40c12SJohn Marino 	 * completed the channel change. This may take some time due to other
32203ff40c12SJohn Marino 	 * need for the radio and the caller should be prepared to timing out
32213ff40c12SJohn Marino 	 * its wait since there are no guarantees on when this request can be
32223ff40c12SJohn Marino 	 * executed.
32233ff40c12SJohn Marino 	 */
32243ff40c12SJohn Marino 	int (*remain_on_channel)(void *priv, unsigned int freq,
32253ff40c12SJohn Marino 				 unsigned int duration);
32263ff40c12SJohn Marino 
32273ff40c12SJohn Marino 	/**
32283ff40c12SJohn Marino 	 * cancel_remain_on_channel - Cancel remain-on-channel operation
32293ff40c12SJohn Marino 	 * @priv: Private driver interface data
32303ff40c12SJohn Marino 	 *
32313ff40c12SJohn Marino 	 * This command can be used to cancel a remain-on-channel operation
32323ff40c12SJohn Marino 	 * before its originally requested duration has passed. This could be
32333ff40c12SJohn Marino 	 * used, e.g., when remain_on_channel() is used to request extra time
32343ff40c12SJohn Marino 	 * to receive a response to an Action frame and the response is
32353ff40c12SJohn Marino 	 * received when there is still unneeded time remaining on the
32363ff40c12SJohn Marino 	 * remain-on-channel operation.
32373ff40c12SJohn Marino 	 */
32383ff40c12SJohn Marino 	int (*cancel_remain_on_channel)(void *priv);
32393ff40c12SJohn Marino 
32403ff40c12SJohn Marino 	/**
32413ff40c12SJohn Marino 	 * probe_req_report - Request Probe Request frames to be indicated
32423ff40c12SJohn Marino 	 * @priv: Private driver interface data
32433ff40c12SJohn Marino 	 * @report: Whether to report received Probe Request frames
32443ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure (or if not supported)
32453ff40c12SJohn Marino 	 *
32463ff40c12SJohn Marino 	 * This command can be used to request the driver to indicate when
32473ff40c12SJohn Marino 	 * Probe Request frames are received with EVENT_RX_PROBE_REQ events.
32483ff40c12SJohn Marino 	 * Since this operation may require extra resources, e.g., due to less
32493ff40c12SJohn Marino 	 * optimal hardware/firmware RX filtering, many drivers may disable
32503ff40c12SJohn Marino 	 * Probe Request reporting at least in station mode. This command is
32513ff40c12SJohn Marino 	 * used to notify the driver when the Probe Request frames need to be
32523ff40c12SJohn Marino 	 * reported, e.g., during remain-on-channel operations.
32533ff40c12SJohn Marino 	 */
32543ff40c12SJohn Marino 	int (*probe_req_report)(void *priv, int report);
32553ff40c12SJohn Marino 
32563ff40c12SJohn Marino 	/**
32573ff40c12SJohn Marino 	 * deinit_ap - Deinitialize AP mode
32583ff40c12SJohn Marino 	 * @priv: Private driver interface data
32593ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure (or if not supported)
32603ff40c12SJohn Marino 	 *
32613ff40c12SJohn Marino 	 * This optional function can be used to disable AP mode related
32623ff40c12SJohn Marino 	 * configuration. If the interface was not dynamically added,
32633ff40c12SJohn Marino 	 * change the driver mode to station mode to allow normal station
32643ff40c12SJohn Marino 	 * operations like scanning to be completed.
32653ff40c12SJohn Marino 	 */
32663ff40c12SJohn Marino 	int (*deinit_ap)(void *priv);
32673ff40c12SJohn Marino 
32683ff40c12SJohn Marino 	/**
32693ff40c12SJohn Marino 	 * deinit_p2p_cli - Deinitialize P2P client mode
32703ff40c12SJohn Marino 	 * @priv: Private driver interface data
32713ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure (or if not supported)
32723ff40c12SJohn Marino 	 *
32733ff40c12SJohn Marino 	 * This optional function can be used to disable P2P client mode. If the
32743ff40c12SJohn Marino 	 * interface was not dynamically added, change the interface type back
32753ff40c12SJohn Marino 	 * to station mode.
32763ff40c12SJohn Marino 	 */
32773ff40c12SJohn Marino 	int (*deinit_p2p_cli)(void *priv);
32783ff40c12SJohn Marino 
32793ff40c12SJohn Marino 	/**
32803ff40c12SJohn Marino 	 * suspend - Notification on system suspend/hibernate event
32813ff40c12SJohn Marino 	 * @priv: Private driver interface data
32823ff40c12SJohn Marino 	 */
32833ff40c12SJohn Marino 	void (*suspend)(void *priv);
32843ff40c12SJohn Marino 
32853ff40c12SJohn Marino 	/**
32863ff40c12SJohn Marino 	 * resume - Notification on system resume/thaw event
32873ff40c12SJohn Marino 	 * @priv: Private driver interface data
32883ff40c12SJohn Marino 	 */
32893ff40c12SJohn Marino 	void (*resume)(void *priv);
32903ff40c12SJohn Marino 
32913ff40c12SJohn Marino 	/**
32923ff40c12SJohn Marino 	 * signal_monitor - Set signal monitoring parameters
32933ff40c12SJohn Marino 	 * @priv: Private driver interface data
32943ff40c12SJohn Marino 	 * @threshold: Threshold value for signal change events; 0 = disabled
32953ff40c12SJohn Marino 	 * @hysteresis: Minimum change in signal strength before indicating a
32963ff40c12SJohn Marino 	 *	new event
32973ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure (or if not supported)
32983ff40c12SJohn Marino 	 *
32993ff40c12SJohn Marino 	 * This function can be used to configure monitoring of signal strength
33003ff40c12SJohn Marino 	 * with the current AP. Whenever signal strength drops below the
33013ff40c12SJohn Marino 	 * %threshold value or increases above it, EVENT_SIGNAL_CHANGE event
33023ff40c12SJohn Marino 	 * should be generated assuming the signal strength has changed at
33033ff40c12SJohn Marino 	 * least %hysteresis from the previously indicated signal change event.
33043ff40c12SJohn Marino 	 */
33053ff40c12SJohn Marino 	int (*signal_monitor)(void *priv, int threshold, int hysteresis);
33063ff40c12SJohn Marino 
33073ff40c12SJohn Marino 	/**
33083ff40c12SJohn Marino 	 * send_frame - Send IEEE 802.11 frame (testing use only)
33093ff40c12SJohn Marino 	 * @priv: Private driver interface data
33103ff40c12SJohn Marino 	 * @data: IEEE 802.11 frame with IEEE 802.11 header
33113ff40c12SJohn Marino 	 * @data_len: Size of the frame
33123ff40c12SJohn Marino 	 * @encrypt: Whether to encrypt the frame (if keys are set)
33133ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
33143ff40c12SJohn Marino 	 *
33153ff40c12SJohn Marino 	 * This function is only used for debugging purposes and is not
33163ff40c12SJohn Marino 	 * required to be implemented for normal operations.
33173ff40c12SJohn Marino 	 */
33183ff40c12SJohn Marino 	int (*send_frame)(void *priv, const u8 *data, size_t data_len,
33193ff40c12SJohn Marino 			  int encrypt);
33203ff40c12SJohn Marino 
33213ff40c12SJohn Marino 	/**
33223ff40c12SJohn Marino 	 * get_noa - Get current Notice of Absence attribute payload
33233ff40c12SJohn Marino 	 * @priv: Private driver interface data
33243ff40c12SJohn Marino 	 * @buf: Buffer for returning NoA
33253ff40c12SJohn Marino 	 * @buf_len: Buffer length in octets
33263ff40c12SJohn Marino 	 * Returns: Number of octets used in buf, 0 to indicate no NoA is being
33273ff40c12SJohn Marino 	 * advertized, or -1 on failure
33283ff40c12SJohn Marino 	 *
33293ff40c12SJohn Marino 	 * This function is used to fetch the current Notice of Absence
33303ff40c12SJohn Marino 	 * attribute value from GO.
33313ff40c12SJohn Marino 	 */
33323ff40c12SJohn Marino 	int (*get_noa)(void *priv, u8 *buf, size_t buf_len);
33333ff40c12SJohn Marino 
33343ff40c12SJohn Marino 	/**
33353ff40c12SJohn Marino 	 * set_noa - Set Notice of Absence parameters for GO (testing)
33363ff40c12SJohn Marino 	 * @priv: Private driver interface data
33373ff40c12SJohn Marino 	 * @count: Count
33383ff40c12SJohn Marino 	 * @start: Start time in ms from next TBTT
33393ff40c12SJohn Marino 	 * @duration: Duration in ms
33403ff40c12SJohn Marino 	 * Returns: 0 on success or -1 on failure
33413ff40c12SJohn Marino 	 *
33423ff40c12SJohn Marino 	 * This function is used to set Notice of Absence parameters for GO. It
33433ff40c12SJohn Marino 	 * is used only for testing. To disable NoA, all parameters are set to
33443ff40c12SJohn Marino 	 * 0.
33453ff40c12SJohn Marino 	 */
33463ff40c12SJohn Marino 	int (*set_noa)(void *priv, u8 count, int start, int duration);
33473ff40c12SJohn Marino 
33483ff40c12SJohn Marino 	/**
33493ff40c12SJohn Marino 	 * set_p2p_powersave - Set P2P power save options
33503ff40c12SJohn Marino 	 * @priv: Private driver interface data
33513ff40c12SJohn Marino 	 * @legacy_ps: 0 = disable, 1 = enable, 2 = maximum PS, -1 = no change
33523ff40c12SJohn Marino 	 * @opp_ps: 0 = disable, 1 = enable, -1 = no change
33533ff40c12SJohn Marino 	 * @ctwindow: 0.. = change (msec), -1 = no change
33543ff40c12SJohn Marino 	 * Returns: 0 on success or -1 on failure
33553ff40c12SJohn Marino 	 */
33563ff40c12SJohn Marino 	int (*set_p2p_powersave)(void *priv, int legacy_ps, int opp_ps,
33573ff40c12SJohn Marino 				 int ctwindow);
33583ff40c12SJohn Marino 
33593ff40c12SJohn Marino 	/**
33603ff40c12SJohn Marino 	 * ampdu - Enable/disable aggregation
33613ff40c12SJohn Marino 	 * @priv: Private driver interface data
33623ff40c12SJohn Marino 	 * @ampdu: 1/0 = enable/disable A-MPDU aggregation
33633ff40c12SJohn Marino 	 * Returns: 0 on success or -1 on failure
33643ff40c12SJohn Marino 	 */
33653ff40c12SJohn Marino 	int (*ampdu)(void *priv, int ampdu);
33663ff40c12SJohn Marino 
33673ff40c12SJohn Marino 	/**
33683ff40c12SJohn Marino 	 * get_radio_name - Get physical radio name for the device
33693ff40c12SJohn Marino 	 * @priv: Private driver interface data
33703ff40c12SJohn Marino 	 * Returns: Radio name or %NULL if not known
33713ff40c12SJohn Marino 	 *
33723ff40c12SJohn Marino 	 * The returned data must not be modified by the caller. It is assumed
33733ff40c12SJohn Marino 	 * that any interface that has the same radio name as another is
33743ff40c12SJohn Marino 	 * sharing the same physical radio. This information can be used to
33753ff40c12SJohn Marino 	 * share scan results etc. information between the virtual interfaces
33763ff40c12SJohn Marino 	 * to speed up various operations.
33773ff40c12SJohn Marino 	 */
33783ff40c12SJohn Marino 	const char * (*get_radio_name)(void *priv);
33793ff40c12SJohn Marino 
33803ff40c12SJohn Marino 	/**
33813ff40c12SJohn Marino 	 * send_tdls_mgmt - for sending TDLS management packets
33823ff40c12SJohn Marino 	 * @priv: private driver interface data
33833ff40c12SJohn Marino 	 * @dst: Destination (peer) MAC address
33843ff40c12SJohn Marino 	 * @action_code: TDLS action code for the mssage
33853ff40c12SJohn Marino 	 * @dialog_token: Dialog Token to use in the message (if needed)
33863ff40c12SJohn Marino 	 * @status_code: Status Code or Reason Code to use (if needed)
3387*a1157835SDaniel Fojt 	 * @peer_capab: TDLS peer capability (TDLS_PEER_* bitfield)
3388*a1157835SDaniel Fojt 	 * @initiator: Is the current end the TDLS link initiator
33893ff40c12SJohn Marino 	 * @buf: TDLS IEs to add to the message
33903ff40c12SJohn Marino 	 * @len: Length of buf in octets
33913ff40c12SJohn Marino 	 * Returns: 0 on success, negative (<0) on failure
33923ff40c12SJohn Marino 	 *
33933ff40c12SJohn Marino 	 * This optional function can be used to send packet to driver which is
33943ff40c12SJohn Marino 	 * responsible for receiving and sending all TDLS packets.
33953ff40c12SJohn Marino 	 */
33963ff40c12SJohn Marino 	int (*send_tdls_mgmt)(void *priv, const u8 *dst, u8 action_code,
3397*a1157835SDaniel Fojt 			      u8 dialog_token, u16 status_code, u32 peer_capab,
3398*a1157835SDaniel Fojt 			      int initiator, const u8 *buf, size_t len);
33993ff40c12SJohn Marino 
34003ff40c12SJohn Marino 	/**
34013ff40c12SJohn Marino 	 * tdls_oper - Ask the driver to perform high-level TDLS operations
34023ff40c12SJohn Marino 	 * @priv: Private driver interface data
34033ff40c12SJohn Marino 	 * @oper: TDLS high-level operation. See %enum tdls_oper
34043ff40c12SJohn Marino 	 * @peer: Destination (peer) MAC address
34053ff40c12SJohn Marino 	 * Returns: 0 on success, negative (<0) on failure
34063ff40c12SJohn Marino 	 *
34073ff40c12SJohn Marino 	 * This optional function can be used to send high-level TDLS commands
34083ff40c12SJohn Marino 	 * to the driver.
34093ff40c12SJohn Marino 	 */
34103ff40c12SJohn Marino 	int (*tdls_oper)(void *priv, enum tdls_oper oper, const u8 *peer);
34113ff40c12SJohn Marino 
34123ff40c12SJohn Marino 	/**
34133ff40c12SJohn Marino 	 * wnm_oper - Notify driver of the WNM frame reception
34143ff40c12SJohn Marino 	 * @priv: Private driver interface data
34153ff40c12SJohn Marino 	 * @oper: WNM operation. See %enum wnm_oper
34163ff40c12SJohn Marino 	 * @peer: Destination (peer) MAC address
34173ff40c12SJohn Marino 	 * @buf: Buffer for the driver to fill in (for getting IE)
34183ff40c12SJohn Marino 	 * @buf_len: Return the len of buf
34193ff40c12SJohn Marino 	 * Returns: 0 on success, negative (<0) on failure
34203ff40c12SJohn Marino 	 */
34213ff40c12SJohn Marino 	int (*wnm_oper)(void *priv, enum wnm_oper oper, const u8 *peer,
34223ff40c12SJohn Marino 			u8 *buf, u16 *buf_len);
34233ff40c12SJohn Marino 
34243ff40c12SJohn Marino 	/**
34253ff40c12SJohn Marino 	 * set_qos_map - Set QoS Map
34263ff40c12SJohn Marino 	 * @priv: Private driver interface data
34273ff40c12SJohn Marino 	 * @qos_map_set: QoS Map
34283ff40c12SJohn Marino 	 * @qos_map_set_len: Length of QoS Map
34293ff40c12SJohn Marino 	 */
34303ff40c12SJohn Marino 	int (*set_qos_map)(void *priv, const u8 *qos_map_set,
34313ff40c12SJohn Marino 			   u8 qos_map_set_len);
34323ff40c12SJohn Marino 
34333ff40c12SJohn Marino 	/**
3434*a1157835SDaniel Fojt 	 * br_add_ip_neigh - Add a neigh to the bridge ip neigh table
3435*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3436*a1157835SDaniel Fojt 	 * @version: IP version of the IP address, 4 or 6
3437*a1157835SDaniel Fojt 	 * @ipaddr: IP address for the neigh entry
3438*a1157835SDaniel Fojt 	 * @prefixlen: IP address prefix length
3439*a1157835SDaniel Fojt 	 * @addr: Corresponding MAC address
3440*a1157835SDaniel Fojt 	 * Returns: 0 on success, negative (<0) on failure
3441*a1157835SDaniel Fojt 	 */
3442*a1157835SDaniel Fojt 	int (*br_add_ip_neigh)(void *priv, u8 version, const u8 *ipaddr,
3443*a1157835SDaniel Fojt 			       int prefixlen, const u8 *addr);
3444*a1157835SDaniel Fojt 
3445*a1157835SDaniel Fojt 	/**
3446*a1157835SDaniel Fojt 	 * br_delete_ip_neigh - Remove a neigh from the bridge ip neigh table
3447*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3448*a1157835SDaniel Fojt 	 * @version: IP version of the IP address, 4 or 6
3449*a1157835SDaniel Fojt 	 * @ipaddr: IP address for the neigh entry
3450*a1157835SDaniel Fojt 	 * Returns: 0 on success, negative (<0) on failure
3451*a1157835SDaniel Fojt 	 */
3452*a1157835SDaniel Fojt 	int (*br_delete_ip_neigh)(void *priv, u8 version, const u8 *ipaddr);
3453*a1157835SDaniel Fojt 
3454*a1157835SDaniel Fojt 	/**
3455*a1157835SDaniel Fojt 	 * br_port_set_attr - Set a bridge port attribute
3456*a1157835SDaniel Fojt 	 * @attr: Bridge port attribute to set
3457*a1157835SDaniel Fojt 	 * @val: Value to be set
3458*a1157835SDaniel Fojt 	 * Returns: 0 on success, negative (<0) on failure
3459*a1157835SDaniel Fojt 	 */
3460*a1157835SDaniel Fojt 	int (*br_port_set_attr)(void *priv, enum drv_br_port_attr attr,
3461*a1157835SDaniel Fojt 				unsigned int val);
3462*a1157835SDaniel Fojt 
3463*a1157835SDaniel Fojt 	/**
3464*a1157835SDaniel Fojt 	 * br_port_set_attr - Set a bridge network parameter
3465*a1157835SDaniel Fojt 	 * @param: Bridge parameter to set
3466*a1157835SDaniel Fojt 	 * @val: Value to be set
3467*a1157835SDaniel Fojt 	 * Returns: 0 on success, negative (<0) on failure
3468*a1157835SDaniel Fojt 	 */
3469*a1157835SDaniel Fojt 	int (*br_set_net_param)(void *priv, enum drv_br_net_param param,
3470*a1157835SDaniel Fojt 				unsigned int val);
3471*a1157835SDaniel Fojt 
3472*a1157835SDaniel Fojt 	/**
3473*a1157835SDaniel Fojt 	 * set_wowlan - Set wake-on-wireless triggers
3474*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3475*a1157835SDaniel Fojt 	 * @triggers: wowlan triggers
3476*a1157835SDaniel Fojt 	 */
3477*a1157835SDaniel Fojt 	int (*set_wowlan)(void *priv, const struct wowlan_triggers *triggers);
3478*a1157835SDaniel Fojt 
3479*a1157835SDaniel Fojt 	/**
34803ff40c12SJohn Marino 	 * signal_poll - Get current connection information
34813ff40c12SJohn Marino 	 * @priv: Private driver interface data
34823ff40c12SJohn Marino 	 * @signal_info: Connection info structure
34833ff40c12SJohn Marino 	 */
34843ff40c12SJohn Marino 	int (*signal_poll)(void *priv, struct wpa_signal_info *signal_info);
34853ff40c12SJohn Marino 
34863ff40c12SJohn Marino 	/**
3487*a1157835SDaniel Fojt 	 * channel_info - Get parameters of the current operating channel
3488*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3489*a1157835SDaniel Fojt 	 * @channel_info: Channel info structure
3490*a1157835SDaniel Fojt 	 * Returns: 0 on success, negative (<0) on failure
3491*a1157835SDaniel Fojt 	 */
3492*a1157835SDaniel Fojt 	int (*channel_info)(void *priv, struct wpa_channel_info *channel_info);
3493*a1157835SDaniel Fojt 
3494*a1157835SDaniel Fojt 	/**
34953ff40c12SJohn Marino 	 * set_authmode - Set authentication algorithm(s) for static WEP
34963ff40c12SJohn Marino 	 * @priv: Private driver interface data
34973ff40c12SJohn Marino 	 * @authmode: 1=Open System, 2=Shared Key, 3=both
34983ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
34993ff40c12SJohn Marino 	 *
35003ff40c12SJohn Marino 	 * This function can be used to set authentication algorithms for AP
35013ff40c12SJohn Marino 	 * mode when static WEP is used. If the driver uses user space MLME/SME
35023ff40c12SJohn Marino 	 * implementation, there is no need to implement this function.
35033ff40c12SJohn Marino 	 *
35043ff40c12SJohn Marino 	 * DEPRECATED - use set_ap() instead
35053ff40c12SJohn Marino 	 */
35063ff40c12SJohn Marino 	int (*set_authmode)(void *priv, int authmode);
35073ff40c12SJohn Marino 
35083ff40c12SJohn Marino #ifdef ANDROID
35093ff40c12SJohn Marino 	/**
35103ff40c12SJohn Marino 	 * driver_cmd - Execute driver-specific command
35113ff40c12SJohn Marino 	 * @priv: Private driver interface data
35123ff40c12SJohn Marino 	 * @cmd: Command to execute
35133ff40c12SJohn Marino 	 * @buf: Return buffer
35143ff40c12SJohn Marino 	 * @buf_len: Buffer length
35153ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
35163ff40c12SJohn Marino 	 */
35173ff40c12SJohn Marino 	int (*driver_cmd)(void *priv, char *cmd, char *buf, size_t buf_len);
35183ff40c12SJohn Marino #endif /* ANDROID */
35193ff40c12SJohn Marino 
35203ff40c12SJohn Marino 	/**
3521*a1157835SDaniel Fojt 	 * vendor_cmd - Execute vendor specific command
3522*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3523*a1157835SDaniel Fojt 	 * @vendor_id: Vendor id
3524*a1157835SDaniel Fojt 	 * @subcmd: Vendor command id
3525*a1157835SDaniel Fojt 	 * @data: Vendor command parameters (%NULL if no parameters)
3526*a1157835SDaniel Fojt 	 * @data_len: Data length
3527*a1157835SDaniel Fojt 	 * @buf: Return buffer (%NULL to ignore reply)
3528*a1157835SDaniel Fojt 	 * Returns: 0 on success, negative (<0) on failure
3529*a1157835SDaniel Fojt 	 *
3530*a1157835SDaniel Fojt 	 * This function handles vendor specific commands that are passed to
3531*a1157835SDaniel Fojt 	 * the driver/device. The command is identified by vendor id and
3532*a1157835SDaniel Fojt 	 * command id. Parameters can be passed as argument to the command
3533*a1157835SDaniel Fojt 	 * in the data buffer. Reply (if any) will be filled in the supplied
3534*a1157835SDaniel Fojt 	 * return buffer.
3535*a1157835SDaniel Fojt 	 *
3536*a1157835SDaniel Fojt 	 * The exact driver behavior is driver interface and vendor specific. As
3537*a1157835SDaniel Fojt 	 * an example, this will be converted to a vendor specific cfg80211
3538*a1157835SDaniel Fojt 	 * command in case of the nl80211 driver interface.
3539*a1157835SDaniel Fojt 	 */
3540*a1157835SDaniel Fojt 	int (*vendor_cmd)(void *priv, unsigned int vendor_id,
3541*a1157835SDaniel Fojt 			  unsigned int subcmd, const u8 *data, size_t data_len,
3542*a1157835SDaniel Fojt 			  struct wpabuf *buf);
3543*a1157835SDaniel Fojt 
3544*a1157835SDaniel Fojt 	/**
35453ff40c12SJohn Marino 	 * set_rekey_info - Set rekey information
35463ff40c12SJohn Marino 	 * @priv: Private driver interface data
35473ff40c12SJohn Marino 	 * @kek: Current KEK
3548*a1157835SDaniel Fojt 	 * @kek_len: KEK length in octets
35493ff40c12SJohn Marino 	 * @kck: Current KCK
3550*a1157835SDaniel Fojt 	 * @kck_len: KCK length in octets
35513ff40c12SJohn Marino 	 * @replay_ctr: Current EAPOL-Key Replay Counter
35523ff40c12SJohn Marino 	 *
35533ff40c12SJohn Marino 	 * This optional function can be used to provide information for the
35543ff40c12SJohn Marino 	 * driver/firmware to process EAPOL-Key frames in Group Key Handshake
35553ff40c12SJohn Marino 	 * while the host (including wpa_supplicant) is sleeping.
35563ff40c12SJohn Marino 	 */
3557*a1157835SDaniel Fojt 	void (*set_rekey_info)(void *priv, const u8 *kek, size_t kek_len,
3558*a1157835SDaniel Fojt 			       const u8 *kck, size_t kck_len,
35593ff40c12SJohn Marino 			       const u8 *replay_ctr);
35603ff40c12SJohn Marino 
35613ff40c12SJohn Marino 	/**
35623ff40c12SJohn Marino 	 * sta_assoc - Station association indication
35633ff40c12SJohn Marino 	 * @priv: Private driver interface data
35643ff40c12SJohn Marino 	 * @own_addr: Source address and BSSID for association frame
35653ff40c12SJohn Marino 	 * @addr: MAC address of the station to associate
35663ff40c12SJohn Marino 	 * @reassoc: flag to indicate re-association
35673ff40c12SJohn Marino 	 * @status: association response status code
35683ff40c12SJohn Marino 	 * @ie: assoc response ie buffer
35693ff40c12SJohn Marino 	 * @len: ie buffer length
35703ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
35713ff40c12SJohn Marino 	 *
35723ff40c12SJohn Marino 	 * This function indicates the driver to send (Re)Association
35733ff40c12SJohn Marino 	 * Response frame to the station.
35743ff40c12SJohn Marino 	 */
35753ff40c12SJohn Marino 	 int (*sta_assoc)(void *priv, const u8 *own_addr, const u8 *addr,
35763ff40c12SJohn Marino 			  int reassoc, u16 status, const u8 *ie, size_t len);
35773ff40c12SJohn Marino 
35783ff40c12SJohn Marino 	/**
35793ff40c12SJohn Marino 	 * sta_auth - Station authentication indication
3580*a1157835SDaniel Fojt 	 * @priv: private driver interface data
3581*a1157835SDaniel Fojt 	 * @params: Station authentication parameters
35823ff40c12SJohn Marino 	 *
3583*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
35843ff40c12SJohn Marino 	 */
3585*a1157835SDaniel Fojt 	 int (*sta_auth)(void *priv,
3586*a1157835SDaniel Fojt 			 struct wpa_driver_sta_auth_params *params);
35873ff40c12SJohn Marino 
35883ff40c12SJohn Marino 	/**
35893ff40c12SJohn Marino 	 * add_tspec - Add traffic stream
35903ff40c12SJohn Marino 	 * @priv: Private driver interface data
35913ff40c12SJohn Marino 	 * @addr: MAC address of the station to associate
35923ff40c12SJohn Marino 	 * @tspec_ie: tspec ie buffer
35933ff40c12SJohn Marino 	 * @tspec_ielen: tspec ie length
35943ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
35953ff40c12SJohn Marino 	 *
35963ff40c12SJohn Marino 	 * This function adds the traffic steam for the station
35973ff40c12SJohn Marino 	 * and fills the medium_time in tspec_ie.
35983ff40c12SJohn Marino 	 */
35993ff40c12SJohn Marino 	 int (*add_tspec)(void *priv, const u8 *addr, u8 *tspec_ie,
36003ff40c12SJohn Marino 			  size_t tspec_ielen);
36013ff40c12SJohn Marino 
36023ff40c12SJohn Marino 	/**
36033ff40c12SJohn Marino 	 * add_sta_node - Add a station node in the driver
36043ff40c12SJohn Marino 	 * @priv: Private driver interface data
36053ff40c12SJohn Marino 	 * @addr: MAC address of the station to add
36063ff40c12SJohn Marino 	 * @auth_alg: authentication algorithm used by the station
36073ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
36083ff40c12SJohn Marino 	 *
36093ff40c12SJohn Marino 	 * This function adds the station node in the driver, when
36103ff40c12SJohn Marino 	 * the station gets added by FT-over-DS.
36113ff40c12SJohn Marino 	 */
36123ff40c12SJohn Marino 	int (*add_sta_node)(void *priv, const u8 *addr, u16 auth_alg);
36133ff40c12SJohn Marino 
36143ff40c12SJohn Marino 	/**
36153ff40c12SJohn Marino 	 * sched_scan - Request the driver to initiate scheduled scan
36163ff40c12SJohn Marino 	 * @priv: Private driver interface data
36173ff40c12SJohn Marino 	 * @params: Scan parameters
36183ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
36193ff40c12SJohn Marino 	 *
36203ff40c12SJohn Marino 	 * This operation should be used for scheduled scan offload to
36213ff40c12SJohn Marino 	 * the hardware. Every time scan results are available, the
36223ff40c12SJohn Marino 	 * driver should report scan results event for wpa_supplicant
36233ff40c12SJohn Marino 	 * which will eventually request the results with
36243ff40c12SJohn Marino 	 * wpa_driver_get_scan_results2(). This operation is optional
36253ff40c12SJohn Marino 	 * and if not provided or if it returns -1, we fall back to
36263ff40c12SJohn Marino 	 * normal host-scheduled scans.
36273ff40c12SJohn Marino 	 */
3628*a1157835SDaniel Fojt 	int (*sched_scan)(void *priv, struct wpa_driver_scan_params *params);
36293ff40c12SJohn Marino 
36303ff40c12SJohn Marino 	/**
36313ff40c12SJohn Marino 	 * stop_sched_scan - Request the driver to stop a scheduled scan
36323ff40c12SJohn Marino 	 * @priv: Private driver interface data
36333ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
36343ff40c12SJohn Marino 	 *
36353ff40c12SJohn Marino 	 * This should cause the scheduled scan to be stopped and
36363ff40c12SJohn Marino 	 * results should stop being sent. Must be supported if
36373ff40c12SJohn Marino 	 * sched_scan is supported.
36383ff40c12SJohn Marino 	 */
36393ff40c12SJohn Marino 	int (*stop_sched_scan)(void *priv);
36403ff40c12SJohn Marino 
36413ff40c12SJohn Marino 	/**
36423ff40c12SJohn Marino 	 * poll_client - Probe (null data or such) the given station
36433ff40c12SJohn Marino 	 * @priv: Private driver interface data
36443ff40c12SJohn Marino 	 * @own_addr: MAC address of sending interface
36453ff40c12SJohn Marino 	 * @addr: MAC address of the station to probe
36463ff40c12SJohn Marino 	 * @qos: Indicates whether station is QoS station
36473ff40c12SJohn Marino 	 *
36483ff40c12SJohn Marino 	 * This function is used to verify whether an associated station is
36493ff40c12SJohn Marino 	 * still present. This function does not need to be implemented if the
36503ff40c12SJohn Marino 	 * driver provides such inactivity polling mechanism.
36513ff40c12SJohn Marino 	 */
36523ff40c12SJohn Marino 	void (*poll_client)(void *priv, const u8 *own_addr,
36533ff40c12SJohn Marino 			    const u8 *addr, int qos);
36543ff40c12SJohn Marino 
36553ff40c12SJohn Marino 	/**
36563ff40c12SJohn Marino 	 * radio_disable - Disable/enable radio
36573ff40c12SJohn Marino 	 * @priv: Private driver interface data
36583ff40c12SJohn Marino 	 * @disabled: 1=disable 0=enable radio
36593ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
36603ff40c12SJohn Marino 	 *
36613ff40c12SJohn Marino 	 * This optional command is for testing purposes. It can be used to
36623ff40c12SJohn Marino 	 * disable the radio on a testbed device to simulate out-of-radio-range
36633ff40c12SJohn Marino 	 * conditions.
36643ff40c12SJohn Marino 	 */
36653ff40c12SJohn Marino 	int (*radio_disable)(void *priv, int disabled);
36663ff40c12SJohn Marino 
36673ff40c12SJohn Marino 	/**
36683ff40c12SJohn Marino 	 * switch_channel - Announce channel switch and migrate the GO to the
36693ff40c12SJohn Marino 	 * given frequency
36703ff40c12SJohn Marino 	 * @priv: Private driver interface data
36713ff40c12SJohn Marino 	 * @settings: Settings for CSA period and new channel
36723ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
36733ff40c12SJohn Marino 	 *
36743ff40c12SJohn Marino 	 * This function is used to move the GO to the legacy STA channel to
36753ff40c12SJohn Marino 	 * avoid frequency conflict in single channel concurrency.
36763ff40c12SJohn Marino 	 */
36773ff40c12SJohn Marino 	int (*switch_channel)(void *priv, struct csa_settings *settings);
36783ff40c12SJohn Marino 
36793ff40c12SJohn Marino 	/**
3680*a1157835SDaniel Fojt 	 * add_tx_ts - Add traffic stream
3681*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3682*a1157835SDaniel Fojt 	 * @tsid: Traffic stream ID
3683*a1157835SDaniel Fojt 	 * @addr: Receiver address
3684*a1157835SDaniel Fojt 	 * @user_prio: User priority of the traffic stream
3685*a1157835SDaniel Fojt 	 * @admitted_time: Admitted time for this TS in units of
3686*a1157835SDaniel Fojt 	 *	32 microsecond periods (per second).
3687*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
3688*a1157835SDaniel Fojt 	 */
3689*a1157835SDaniel Fojt 	int (*add_tx_ts)(void *priv, u8 tsid, const u8 *addr, u8 user_prio,
3690*a1157835SDaniel Fojt 			 u16 admitted_time);
3691*a1157835SDaniel Fojt 
3692*a1157835SDaniel Fojt 	/**
3693*a1157835SDaniel Fojt 	 * del_tx_ts - Delete traffic stream
3694*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3695*a1157835SDaniel Fojt 	 * @tsid: Traffic stream ID
3696*a1157835SDaniel Fojt 	 * @addr: Receiver address
3697*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
3698*a1157835SDaniel Fojt 	 */
3699*a1157835SDaniel Fojt 	int (*del_tx_ts)(void *priv, u8 tsid, const u8 *addr);
3700*a1157835SDaniel Fojt 
3701*a1157835SDaniel Fojt 	/**
3702*a1157835SDaniel Fojt 	 * Enable channel-switching with TDLS peer
3703*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3704*a1157835SDaniel Fojt 	 * @addr: MAC address of the TDLS peer
3705*a1157835SDaniel Fojt 	 * @oper_class: Operating class of the switch channel
3706*a1157835SDaniel Fojt 	 * @params: Channel specification
3707*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
3708*a1157835SDaniel Fojt 	 *
3709*a1157835SDaniel Fojt 	 * The function indicates to driver that it can start switching to a
3710*a1157835SDaniel Fojt 	 * different channel with a specified TDLS peer. The switching is
3711*a1157835SDaniel Fojt 	 * assumed on until canceled with tdls_disable_channel_switch().
3712*a1157835SDaniel Fojt 	 */
3713*a1157835SDaniel Fojt 	int (*tdls_enable_channel_switch)(
3714*a1157835SDaniel Fojt 		void *priv, const u8 *addr, u8 oper_class,
3715*a1157835SDaniel Fojt 		const struct hostapd_freq_params *params);
3716*a1157835SDaniel Fojt 
3717*a1157835SDaniel Fojt 	/**
3718*a1157835SDaniel Fojt 	 * Disable channel switching with TDLS peer
3719*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3720*a1157835SDaniel Fojt 	 * @addr: MAC address of the TDLS peer
3721*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
3722*a1157835SDaniel Fojt 	 *
3723*a1157835SDaniel Fojt 	 * This function indicates to the driver that it should stop switching
3724*a1157835SDaniel Fojt 	 * with a given TDLS peer.
3725*a1157835SDaniel Fojt 	 */
3726*a1157835SDaniel Fojt 	int (*tdls_disable_channel_switch)(void *priv, const u8 *addr);
3727*a1157835SDaniel Fojt 
3728*a1157835SDaniel Fojt 	/**
37293ff40c12SJohn Marino 	 * start_dfs_cac - Listen for radar interference on the channel
37303ff40c12SJohn Marino 	 * @priv: Private driver interface data
37313ff40c12SJohn Marino 	 * @freq: Channel parameters
37323ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
37333ff40c12SJohn Marino 	 */
37343ff40c12SJohn Marino 	int (*start_dfs_cac)(void *priv, struct hostapd_freq_params *freq);
37353ff40c12SJohn Marino 
37363ff40c12SJohn Marino 	/**
37373ff40c12SJohn Marino 	 * stop_ap - Removes beacon from AP
37383ff40c12SJohn Marino 	 * @priv: Private driver interface data
37393ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure (or if not supported)
37403ff40c12SJohn Marino 	 *
37413ff40c12SJohn Marino 	 * This optional function can be used to disable AP mode related
37423ff40c12SJohn Marino 	 * configuration. Unlike deinit_ap, it does not change to station
37433ff40c12SJohn Marino 	 * mode.
37443ff40c12SJohn Marino 	 */
37453ff40c12SJohn Marino 	int (*stop_ap)(void *priv);
37463ff40c12SJohn Marino 
37473ff40c12SJohn Marino 	/**
37483ff40c12SJohn Marino 	 * get_survey - Retrieve survey data
37493ff40c12SJohn Marino 	 * @priv: Private driver interface data
37503ff40c12SJohn Marino 	 * @freq: If set, survey data for the specified frequency is only
37513ff40c12SJohn Marino 	 *	being requested. If not set, all survey data is requested.
37523ff40c12SJohn Marino 	 * Returns: 0 on success, -1 on failure
37533ff40c12SJohn Marino 	 *
37543ff40c12SJohn Marino 	 * Use this to retrieve:
37553ff40c12SJohn Marino 	 *
37563ff40c12SJohn Marino 	 * - the observed channel noise floor
37573ff40c12SJohn Marino 	 * - the amount of time we have spent on the channel
37583ff40c12SJohn Marino 	 * - the amount of time during which we have spent on the channel that
37593ff40c12SJohn Marino 	 *   the radio has determined the medium is busy and we cannot
37603ff40c12SJohn Marino 	 *   transmit
37613ff40c12SJohn Marino 	 * - the amount of time we have spent receiving data
37623ff40c12SJohn Marino 	 * - the amount of time we have spent transmitting data
37633ff40c12SJohn Marino 	 *
37643ff40c12SJohn Marino 	 * This data can be used for spectrum heuristics. One example is
37653ff40c12SJohn Marino 	 * Automatic Channel Selection (ACS). The channel survey data is
37663ff40c12SJohn Marino 	 * kept on a linked list on the channel data, one entry is added
37673ff40c12SJohn Marino 	 * for each survey. The min_nf of the channel is updated for each
37683ff40c12SJohn Marino 	 * survey.
37693ff40c12SJohn Marino 	 */
37703ff40c12SJohn Marino 	int (*get_survey)(void *priv, unsigned int freq);
37713ff40c12SJohn Marino 
37723ff40c12SJohn Marino 	/**
37733ff40c12SJohn Marino 	 * status - Get driver interface status information
37743ff40c12SJohn Marino 	 * @priv: Private driver interface data
3775*a1157835SDaniel Fojt 	 * @buf: Buffer for printing the status information
37763ff40c12SJohn Marino 	 * @buflen: Maximum length of the buffer
37773ff40c12SJohn Marino 	 * Returns: Length of written status information or -1 on failure
37783ff40c12SJohn Marino 	 */
37793ff40c12SJohn Marino 	int (*status)(void *priv, char *buf, size_t buflen);
37806d49e1aeSJan Lentfer 
3781*a1157835SDaniel Fojt 	/**
3782*a1157835SDaniel Fojt 	 * roaming - Set roaming policy for driver-based BSS selection
3783*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3784*a1157835SDaniel Fojt 	 * @allowed: Whether roaming within ESS is allowed
3785*a1157835SDaniel Fojt 	 * @bssid: Forced BSSID if roaming is disabled or %NULL if not set
3786*a1157835SDaniel Fojt 	 * Returns: Length of written status information or -1 on failure
3787*a1157835SDaniel Fojt 	 *
3788*a1157835SDaniel Fojt 	 * This optional callback can be used to update roaming policy from the
3789*a1157835SDaniel Fojt 	 * associate() command (bssid being set there indicates that the driver
3790*a1157835SDaniel Fojt 	 * should not roam before getting this roaming() call to allow roaming.
3791*a1157835SDaniel Fojt 	 * If the driver does not indicate WPA_DRIVER_FLAGS_BSS_SELECTION
3792*a1157835SDaniel Fojt 	 * capability, roaming policy is handled within wpa_supplicant and there
3793*a1157835SDaniel Fojt 	 * is no need to implement or react to this callback.
3794*a1157835SDaniel Fojt 	 */
3795*a1157835SDaniel Fojt 	int (*roaming)(void *priv, int allowed, const u8 *bssid);
3796*a1157835SDaniel Fojt 
3797*a1157835SDaniel Fojt 	/**
3798*a1157835SDaniel Fojt 	 * disable_fils - Enable/disable FILS feature
3799*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3800*a1157835SDaniel Fojt 	 * @disable: 0-enable and 1-disable FILS feature
3801*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
3802*a1157835SDaniel Fojt 	 *
3803*a1157835SDaniel Fojt 	 * This callback can be used to configure driver and below layers to
3804*a1157835SDaniel Fojt 	 * enable/disable all FILS features.
3805*a1157835SDaniel Fojt 	 */
3806*a1157835SDaniel Fojt 	int (*disable_fils)(void *priv, int disable);
3807*a1157835SDaniel Fojt 
3808*a1157835SDaniel Fojt 	/**
3809*a1157835SDaniel Fojt 	 * set_mac_addr - Set MAC address
3810*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3811*a1157835SDaniel Fojt 	 * @addr: MAC address to use or %NULL for setting back to permanent
3812*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
3813*a1157835SDaniel Fojt 	 */
3814*a1157835SDaniel Fojt 	int (*set_mac_addr)(void *priv, const u8 *addr);
3815*a1157835SDaniel Fojt 
3816*a1157835SDaniel Fojt #ifdef CONFIG_MACSEC
3817*a1157835SDaniel Fojt 	int (*macsec_init)(void *priv, struct macsec_init_params *params);
3818*a1157835SDaniel Fojt 
3819*a1157835SDaniel Fojt 	int (*macsec_deinit)(void *priv);
3820*a1157835SDaniel Fojt 
3821*a1157835SDaniel Fojt 	/**
3822*a1157835SDaniel Fojt 	 * macsec_get_capability - Inform MKA of this driver's capability
3823*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3824*a1157835SDaniel Fojt 	 * @cap: Driver's capability
3825*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
3826*a1157835SDaniel Fojt 	 */
3827*a1157835SDaniel Fojt 	int (*macsec_get_capability)(void *priv, enum macsec_cap *cap);
3828*a1157835SDaniel Fojt 
3829*a1157835SDaniel Fojt 	/**
3830*a1157835SDaniel Fojt 	 * enable_protect_frames - Set protect frames status
3831*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3832*a1157835SDaniel Fojt 	 * @enabled: TRUE = protect frames enabled
3833*a1157835SDaniel Fojt 	 *           FALSE = protect frames disabled
3834*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure (or if not supported)
3835*a1157835SDaniel Fojt 	 */
3836*a1157835SDaniel Fojt 	int (*enable_protect_frames)(void *priv, Boolean enabled);
3837*a1157835SDaniel Fojt 
3838*a1157835SDaniel Fojt 	/**
3839*a1157835SDaniel Fojt 	 * enable_encrypt - Set encryption status
3840*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3841*a1157835SDaniel Fojt 	 * @enabled: TRUE = encrypt outgoing traffic
3842*a1157835SDaniel Fojt 	 *           FALSE = integrity-only protection on outgoing traffic
3843*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure (or if not supported)
3844*a1157835SDaniel Fojt 	 */
3845*a1157835SDaniel Fojt 	int (*enable_encrypt)(void *priv, Boolean enabled);
3846*a1157835SDaniel Fojt 
3847*a1157835SDaniel Fojt 	/**
3848*a1157835SDaniel Fojt 	 * set_replay_protect - Set replay protect status and window size
3849*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3850*a1157835SDaniel Fojt 	 * @enabled: TRUE = replay protect enabled
3851*a1157835SDaniel Fojt 	 *           FALSE = replay protect disabled
3852*a1157835SDaniel Fojt 	 * @window: replay window size, valid only when replay protect enabled
3853*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure (or if not supported)
3854*a1157835SDaniel Fojt 	 */
3855*a1157835SDaniel Fojt 	int (*set_replay_protect)(void *priv, Boolean enabled, u32 window);
3856*a1157835SDaniel Fojt 
3857*a1157835SDaniel Fojt 	/**
3858*a1157835SDaniel Fojt 	 * set_current_cipher_suite - Set current cipher suite
3859*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3860*a1157835SDaniel Fojt 	 * @cs: EUI64 identifier
3861*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure (or if not supported)
3862*a1157835SDaniel Fojt 	 */
3863*a1157835SDaniel Fojt 	int (*set_current_cipher_suite)(void *priv, u64 cs);
3864*a1157835SDaniel Fojt 
3865*a1157835SDaniel Fojt 	/**
3866*a1157835SDaniel Fojt 	 * enable_controlled_port - Set controlled port status
3867*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3868*a1157835SDaniel Fojt 	 * @enabled: TRUE = controlled port enabled
3869*a1157835SDaniel Fojt 	 *           FALSE = controlled port disabled
3870*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure (or if not supported)
3871*a1157835SDaniel Fojt 	 */
3872*a1157835SDaniel Fojt 	int (*enable_controlled_port)(void *priv, Boolean enabled);
3873*a1157835SDaniel Fojt 
3874*a1157835SDaniel Fojt 	/**
3875*a1157835SDaniel Fojt 	 * get_receive_lowest_pn - Get receive lowest pn
3876*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3877*a1157835SDaniel Fojt 	 * @sa: secure association
3878*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure (or if not supported)
3879*a1157835SDaniel Fojt 	 */
3880*a1157835SDaniel Fojt 	int (*get_receive_lowest_pn)(void *priv, struct receive_sa *sa);
3881*a1157835SDaniel Fojt 
3882*a1157835SDaniel Fojt 	/**
3883*a1157835SDaniel Fojt 	 * get_transmit_next_pn - Get transmit next pn
3884*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3885*a1157835SDaniel Fojt 	 * @sa: secure association
3886*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure (or if not supported)
3887*a1157835SDaniel Fojt 	 */
3888*a1157835SDaniel Fojt 	int (*get_transmit_next_pn)(void *priv, struct transmit_sa *sa);
3889*a1157835SDaniel Fojt 
3890*a1157835SDaniel Fojt 	/**
3891*a1157835SDaniel Fojt 	 * set_transmit_next_pn - Set transmit next pn
3892*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3893*a1157835SDaniel Fojt 	 * @sa: secure association
3894*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure (or if not supported)
3895*a1157835SDaniel Fojt 	 */
3896*a1157835SDaniel Fojt 	int (*set_transmit_next_pn)(void *priv, struct transmit_sa *sa);
3897*a1157835SDaniel Fojt 
3898*a1157835SDaniel Fojt 	/**
3899*a1157835SDaniel Fojt 	 * set_receive_lowest_pn - Set receive lowest PN
3900*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3901*a1157835SDaniel Fojt 	 * @sa: secure association
3902*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure (or if not supported)
3903*a1157835SDaniel Fojt 	 */
3904*a1157835SDaniel Fojt 	int (*set_receive_lowest_pn)(void *priv, struct receive_sa *sa);
3905*a1157835SDaniel Fojt 
3906*a1157835SDaniel Fojt 	/**
3907*a1157835SDaniel Fojt 	 * create_receive_sc - create secure channel for receiving
3908*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
3909*a1157835SDaniel Fojt 	 * @sc: secure channel
3910*a1157835SDaniel Fojt 	 * @conf_offset: confidentiality offset (0, 30, or 50)
3911*a1157835SDaniel Fojt 	 * @validation: frame validation policy (0 = Disabled, 1 = Checked,
3912*a1157835SDaniel Fojt 	 *	2 = Strict)
3913*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure (or if not supported)
3914*a1157835SDaniel Fojt 	 */
3915*a1157835SDaniel Fojt 	int (*create_receive_sc)(void *priv, struct receive_sc *sc,
3916*a1157835SDaniel Fojt 				 unsigned int conf_offset,
3917*a1157835SDaniel Fojt 				 int validation);
3918*a1157835SDaniel Fojt 
3919*a1157835SDaniel Fojt 	/**
3920*a1157835SDaniel Fojt 	 * delete_receive_sc - delete secure connection for receiving
3921*a1157835SDaniel Fojt 	 * @priv: private driver interface data from init()
3922*a1157835SDaniel Fojt 	 * @sc: secure channel
3923*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
3924*a1157835SDaniel Fojt 	 */
3925*a1157835SDaniel Fojt 	int (*delete_receive_sc)(void *priv, struct receive_sc *sc);
3926*a1157835SDaniel Fojt 
3927*a1157835SDaniel Fojt 	/**
3928*a1157835SDaniel Fojt 	 * create_receive_sa - create secure association for receive
3929*a1157835SDaniel Fojt 	 * @priv: private driver interface data from init()
3930*a1157835SDaniel Fojt 	 * @sa: secure association
3931*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
3932*a1157835SDaniel Fojt 	 */
3933*a1157835SDaniel Fojt 	int (*create_receive_sa)(void *priv, struct receive_sa *sa);
3934*a1157835SDaniel Fojt 
3935*a1157835SDaniel Fojt 	/**
3936*a1157835SDaniel Fojt 	 * delete_receive_sa - Delete secure association for receive
3937*a1157835SDaniel Fojt 	 * @priv: Private driver interface data from init()
3938*a1157835SDaniel Fojt 	 * @sa: Secure association
3939*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
3940*a1157835SDaniel Fojt 	 */
3941*a1157835SDaniel Fojt 	int (*delete_receive_sa)(void *priv, struct receive_sa *sa);
3942*a1157835SDaniel Fojt 
3943*a1157835SDaniel Fojt 	/**
3944*a1157835SDaniel Fojt 	 * enable_receive_sa - enable the SA for receive
3945*a1157835SDaniel Fojt 	 * @priv: private driver interface data from init()
3946*a1157835SDaniel Fojt 	 * @sa: secure association
3947*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
3948*a1157835SDaniel Fojt 	 */
3949*a1157835SDaniel Fojt 	int (*enable_receive_sa)(void *priv, struct receive_sa *sa);
3950*a1157835SDaniel Fojt 
3951*a1157835SDaniel Fojt 	/**
3952*a1157835SDaniel Fojt 	 * disable_receive_sa - disable SA for receive
3953*a1157835SDaniel Fojt 	 * @priv: private driver interface data from init()
3954*a1157835SDaniel Fojt 	 * @sa: secure association
3955*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
3956*a1157835SDaniel Fojt 	 */
3957*a1157835SDaniel Fojt 	int (*disable_receive_sa)(void *priv, struct receive_sa *sa);
3958*a1157835SDaniel Fojt 
3959*a1157835SDaniel Fojt 	/**
3960*a1157835SDaniel Fojt 	 * create_transmit_sc - create secure connection for transmit
3961*a1157835SDaniel Fojt 	 * @priv: private driver interface data from init()
3962*a1157835SDaniel Fojt 	 * @sc: secure channel
3963*a1157835SDaniel Fojt 	 * @conf_offset: confidentiality offset (0, 30, or 50)
3964*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
3965*a1157835SDaniel Fojt 	 */
3966*a1157835SDaniel Fojt 	int (*create_transmit_sc)(void *priv, struct transmit_sc *sc,
3967*a1157835SDaniel Fojt 				  unsigned int conf_offset);
3968*a1157835SDaniel Fojt 
3969*a1157835SDaniel Fojt 	/**
3970*a1157835SDaniel Fojt 	 * delete_transmit_sc - delete secure connection for transmit
3971*a1157835SDaniel Fojt 	 * @priv: private driver interface data from init()
3972*a1157835SDaniel Fojt 	 * @sc: secure channel
3973*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
3974*a1157835SDaniel Fojt 	 */
3975*a1157835SDaniel Fojt 	int (*delete_transmit_sc)(void *priv, struct transmit_sc *sc);
3976*a1157835SDaniel Fojt 
3977*a1157835SDaniel Fojt 	/**
3978*a1157835SDaniel Fojt 	 * create_transmit_sa - create secure association for transmit
3979*a1157835SDaniel Fojt 	 * @priv: private driver interface data from init()
3980*a1157835SDaniel Fojt 	 * @sa: secure association
3981*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
3982*a1157835SDaniel Fojt 	 */
3983*a1157835SDaniel Fojt 	int (*create_transmit_sa)(void *priv, struct transmit_sa *sa);
3984*a1157835SDaniel Fojt 
3985*a1157835SDaniel Fojt 	/**
3986*a1157835SDaniel Fojt 	 * delete_transmit_sa - Delete secure association for transmit
3987*a1157835SDaniel Fojt 	 * @priv: Private driver interface data from init()
3988*a1157835SDaniel Fojt 	 * @sa: Secure association
3989*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
3990*a1157835SDaniel Fojt 	 */
3991*a1157835SDaniel Fojt 	int (*delete_transmit_sa)(void *priv, struct transmit_sa *sa);
3992*a1157835SDaniel Fojt 
3993*a1157835SDaniel Fojt 	/**
3994*a1157835SDaniel Fojt 	 * enable_transmit_sa - enable SA for transmit
3995*a1157835SDaniel Fojt 	 * @priv: private driver interface data from init()
3996*a1157835SDaniel Fojt 	 * @sa: secure association
3997*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
3998*a1157835SDaniel Fojt 	 */
3999*a1157835SDaniel Fojt 	int (*enable_transmit_sa)(void *priv, struct transmit_sa *sa);
4000*a1157835SDaniel Fojt 
4001*a1157835SDaniel Fojt 	/**
4002*a1157835SDaniel Fojt 	 * disable_transmit_sa - disable SA for transmit
4003*a1157835SDaniel Fojt 	 * @priv: private driver interface data from init()
4004*a1157835SDaniel Fojt 	 * @sa: secure association
4005*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
4006*a1157835SDaniel Fojt 	 */
4007*a1157835SDaniel Fojt 	int (*disable_transmit_sa)(void *priv, struct transmit_sa *sa);
4008*a1157835SDaniel Fojt #endif /* CONFIG_MACSEC */
4009*a1157835SDaniel Fojt 
4010*a1157835SDaniel Fojt 	/**
4011*a1157835SDaniel Fojt 	 * init_mesh - Driver specific initialization for mesh
4012*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4013*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
4014*a1157835SDaniel Fojt 	 */
4015*a1157835SDaniel Fojt 	int (*init_mesh)(void *priv);
4016*a1157835SDaniel Fojt 
4017*a1157835SDaniel Fojt 	/**
4018*a1157835SDaniel Fojt 	 * join_mesh - Join a mesh network
4019*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4020*a1157835SDaniel Fojt 	 * @params: Mesh configuration parameters
4021*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
4022*a1157835SDaniel Fojt 	 */
4023*a1157835SDaniel Fojt 	int (*join_mesh)(void *priv,
4024*a1157835SDaniel Fojt 			 struct wpa_driver_mesh_join_params *params);
4025*a1157835SDaniel Fojt 
4026*a1157835SDaniel Fojt 	/**
4027*a1157835SDaniel Fojt 	 * leave_mesh - Leave a mesh network
4028*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4029*a1157835SDaniel Fojt 	 * Returns 0 on success, -1 on failure
4030*a1157835SDaniel Fojt 	 */
4031*a1157835SDaniel Fojt 	int (*leave_mesh)(void *priv);
4032*a1157835SDaniel Fojt 
4033*a1157835SDaniel Fojt 	/**
4034*a1157835SDaniel Fojt 	 * probe_mesh_link - Inject a frame over direct mesh link to a given
4035*a1157835SDaniel Fojt 	 *	peer skipping the next_hop lookup from mpath table.
4036*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4037*a1157835SDaniel Fojt 	 * @addr: Peer MAC address
4038*a1157835SDaniel Fojt 	 * @eth: Ethernet frame to be sent
4039*a1157835SDaniel Fojt 	 * @len: Ethernet frame lengtn in bytes
4040*a1157835SDaniel Fojt 	 * Returns 0 on success, -1 on failure
4041*a1157835SDaniel Fojt 	 */
4042*a1157835SDaniel Fojt 	int (*probe_mesh_link)(void *priv, const u8 *addr, const u8 *eth,
4043*a1157835SDaniel Fojt 			       size_t len);
4044*a1157835SDaniel Fojt 
4045*a1157835SDaniel Fojt 	/**
4046*a1157835SDaniel Fojt 	 * do_acs - Automatically select channel
4047*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4048*a1157835SDaniel Fojt 	 * @params: Parameters for ACS
4049*a1157835SDaniel Fojt 	 * Returns 0 on success, -1 on failure
4050*a1157835SDaniel Fojt 	 *
4051*a1157835SDaniel Fojt 	 * This command can be used to offload ACS to the driver if the driver
4052*a1157835SDaniel Fojt 	 * indicates support for such offloading (WPA_DRIVER_FLAGS_ACS_OFFLOAD).
4053*a1157835SDaniel Fojt 	 */
4054*a1157835SDaniel Fojt 	int (*do_acs)(void *priv, struct drv_acs_params *params);
4055*a1157835SDaniel Fojt 
4056*a1157835SDaniel Fojt 	/**
4057*a1157835SDaniel Fojt 	 * set_band - Notify driver of band selection
4058*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4059*a1157835SDaniel Fojt 	 * @band: The selected band(s)
4060*a1157835SDaniel Fojt 	 * Returns 0 on success, -1 on failure
4061*a1157835SDaniel Fojt 	 */
4062*a1157835SDaniel Fojt 	int (*set_band)(void *priv, enum set_band band);
4063*a1157835SDaniel Fojt 
4064*a1157835SDaniel Fojt 	/**
4065*a1157835SDaniel Fojt 	 * get_pref_freq_list - Get preferred frequency list for an interface
4066*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4067*a1157835SDaniel Fojt 	 * @if_type: Interface type
4068*a1157835SDaniel Fojt 	 * @num: Number of channels
4069*a1157835SDaniel Fojt 	 * @freq_list: Preferred channel frequency list encoded in MHz values
4070*a1157835SDaniel Fojt 	 * Returns 0 on success, -1 on failure
4071*a1157835SDaniel Fojt 	 *
4072*a1157835SDaniel Fojt 	 * This command can be used to query the preferred frequency list from
4073*a1157835SDaniel Fojt 	 * the driver specific to a particular interface type.
4074*a1157835SDaniel Fojt 	 */
4075*a1157835SDaniel Fojt 	int (*get_pref_freq_list)(void *priv, enum wpa_driver_if_type if_type,
4076*a1157835SDaniel Fojt 				  unsigned int *num, unsigned int *freq_list);
4077*a1157835SDaniel Fojt 
4078*a1157835SDaniel Fojt 	/**
4079*a1157835SDaniel Fojt 	 * set_prob_oper_freq - Indicate probable P2P operating channel
4080*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4081*a1157835SDaniel Fojt 	 * @freq: Channel frequency in MHz
4082*a1157835SDaniel Fojt 	 * Returns 0 on success, -1 on failure
4083*a1157835SDaniel Fojt 	 *
4084*a1157835SDaniel Fojt 	 * This command can be used to inform the driver of the operating
4085*a1157835SDaniel Fojt 	 * frequency that an ongoing P2P group formation is likely to come up
4086*a1157835SDaniel Fojt 	 * on. Local device is assuming P2P Client role.
4087*a1157835SDaniel Fojt 	 */
4088*a1157835SDaniel Fojt 	int (*set_prob_oper_freq)(void *priv, unsigned int freq);
4089*a1157835SDaniel Fojt 
4090*a1157835SDaniel Fojt 	/**
4091*a1157835SDaniel Fojt 	 * abort_scan - Request the driver to abort an ongoing scan
4092*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4093*a1157835SDaniel Fojt 	 * @scan_cookie: Cookie identifying the scan request. This is used only
4094*a1157835SDaniel Fojt 	 *	when the vendor interface QCA_NL80211_VENDOR_SUBCMD_TRIGGER_SCAN
4095*a1157835SDaniel Fojt 	 *	was used to trigger scan. Otherwise, 0 is used.
4096*a1157835SDaniel Fojt 	 * Returns 0 on success, -1 on failure
4097*a1157835SDaniel Fojt 	 */
4098*a1157835SDaniel Fojt 	int (*abort_scan)(void *priv, u64 scan_cookie);
4099*a1157835SDaniel Fojt 
4100*a1157835SDaniel Fojt 	/**
4101*a1157835SDaniel Fojt 	 * configure_data_frame_filters - Request to configure frame filters
4102*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4103*a1157835SDaniel Fojt 	 * @filter_flags: The type of frames to filter (bitfield of
4104*a1157835SDaniel Fojt 	 * WPA_DATA_FRAME_FILTER_FLAG_*)
4105*a1157835SDaniel Fojt 	 * Returns: 0 on success or -1 on failure
4106*a1157835SDaniel Fojt 	 */
4107*a1157835SDaniel Fojt 	int (*configure_data_frame_filters)(void *priv, u32 filter_flags);
4108*a1157835SDaniel Fojt 
4109*a1157835SDaniel Fojt 	/**
4110*a1157835SDaniel Fojt 	 * get_ext_capab - Get extended capabilities for the specified interface
4111*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4112*a1157835SDaniel Fojt 	 * @type: Interface type for which to get extended capabilities
4113*a1157835SDaniel Fojt 	 * @ext_capab: Extended capabilities fetched
4114*a1157835SDaniel Fojt 	 * @ext_capab_mask: Extended capabilities mask
4115*a1157835SDaniel Fojt 	 * @ext_capab_len: Length of the extended capabilities
4116*a1157835SDaniel Fojt 	 * Returns: 0 on success or -1 on failure
4117*a1157835SDaniel Fojt 	 */
4118*a1157835SDaniel Fojt 	int (*get_ext_capab)(void *priv, enum wpa_driver_if_type type,
4119*a1157835SDaniel Fojt 			     const u8 **ext_capab, const u8 **ext_capab_mask,
4120*a1157835SDaniel Fojt 			     unsigned int *ext_capab_len);
4121*a1157835SDaniel Fojt 
4122*a1157835SDaniel Fojt 	/**
4123*a1157835SDaniel Fojt 	 * p2p_lo_start - Start offloading P2P listen to device
4124*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4125*a1157835SDaniel Fojt 	 * @freq: Listening frequency (MHz) for P2P listen
4126*a1157835SDaniel Fojt 	 * @period: Length of the listen operation in milliseconds
4127*a1157835SDaniel Fojt 	 * @interval: Interval for running the listen operation in milliseconds
4128*a1157835SDaniel Fojt 	 * @count: Number of times to run the listen operation
4129*a1157835SDaniel Fojt 	 * @device_types: Device primary and secondary types
4130*a1157835SDaniel Fojt 	 * @dev_types_len: Number of bytes for device_types
4131*a1157835SDaniel Fojt 	 * @ies: P2P IE and WSC IE for Probe Response frames
4132*a1157835SDaniel Fojt 	 * @ies_len: Length of ies in bytes
4133*a1157835SDaniel Fojt 	 * Returns: 0 on success or -1 on failure
4134*a1157835SDaniel Fojt 	 */
4135*a1157835SDaniel Fojt 	int (*p2p_lo_start)(void *priv, unsigned int freq,
4136*a1157835SDaniel Fojt 			    unsigned int period, unsigned int interval,
4137*a1157835SDaniel Fojt 			    unsigned int count,
4138*a1157835SDaniel Fojt 			    const u8 *device_types, size_t dev_types_len,
4139*a1157835SDaniel Fojt 			    const u8 *ies, size_t ies_len);
4140*a1157835SDaniel Fojt 
4141*a1157835SDaniel Fojt 	/**
4142*a1157835SDaniel Fojt 	 * p2p_lo_stop - Stop P2P listen offload
4143*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4144*a1157835SDaniel Fojt 	 * Returns: 0 on success or -1 on failure
4145*a1157835SDaniel Fojt 	 */
4146*a1157835SDaniel Fojt 	int (*p2p_lo_stop)(void *priv);
4147*a1157835SDaniel Fojt 
4148*a1157835SDaniel Fojt 	/**
4149*a1157835SDaniel Fojt 	 * set_default_scan_ies - Set default scan IEs
4150*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4151*a1157835SDaniel Fojt 	 * @ies: Scan default IEs buffer
4152*a1157835SDaniel Fojt 	 * @ies_len: Length of IEs in bytes
4153*a1157835SDaniel Fojt 	 * Returns: 0 on success or -1 on failure
4154*a1157835SDaniel Fojt 	 *
4155*a1157835SDaniel Fojt 	 * The driver can use these by default when there are no scan IEs coming
4156*a1157835SDaniel Fojt 	 * in the subsequent scan requests. Also in case of one or more of IEs
4157*a1157835SDaniel Fojt 	 * given in set_default_scan_ies() are missing in the subsequent scan
4158*a1157835SDaniel Fojt 	 * request, the driver should merge the missing scan IEs in the scan
4159*a1157835SDaniel Fojt 	 * request from the IEs set by set_default_scan_ies() in the Probe
4160*a1157835SDaniel Fojt 	 * Request frames sent.
4161*a1157835SDaniel Fojt 	 */
4162*a1157835SDaniel Fojt 	int (*set_default_scan_ies)(void *priv, const u8 *ies, size_t ies_len);
4163*a1157835SDaniel Fojt 
4164*a1157835SDaniel Fojt 	/**
4165*a1157835SDaniel Fojt 	 * set_tdls_mode - Set TDLS trigger mode to the host driver
4166*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4167*a1157835SDaniel Fojt 	 * @tdls_external_control: Represents if TDLS external trigger control
4168*a1157835SDaniel Fojt 	 *  mode is enabled/disabled.
4169*a1157835SDaniel Fojt 	 *
4170*a1157835SDaniel Fojt 	 * This optional callback can be used to configure the TDLS external
4171*a1157835SDaniel Fojt 	 * trigger control mode to the host driver.
4172*a1157835SDaniel Fojt 	 */
4173*a1157835SDaniel Fojt 	int (*set_tdls_mode)(void *priv, int tdls_external_control);
4174*a1157835SDaniel Fojt 
4175*a1157835SDaniel Fojt 	/**
4176*a1157835SDaniel Fojt 	 * get_bss_transition_status - Get candidate BSS's transition status
4177*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4178*a1157835SDaniel Fojt 	 * @params: Candidate BSS list
4179*a1157835SDaniel Fojt 	 *
4180*a1157835SDaniel Fojt 	 * Get the accept or reject reason code for a list of BSS transition
4181*a1157835SDaniel Fojt 	 * candidates.
4182*a1157835SDaniel Fojt 	 */
4183*a1157835SDaniel Fojt 	struct wpa_bss_candidate_info *
4184*a1157835SDaniel Fojt 	(*get_bss_transition_status)(void *priv,
4185*a1157835SDaniel Fojt 				     struct wpa_bss_trans_info *params);
4186*a1157835SDaniel Fojt 	/**
4187*a1157835SDaniel Fojt 	 * ignore_assoc_disallow - Configure driver to ignore assoc_disallow
4188*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4189*a1157835SDaniel Fojt 	 * @ignore_disallow: 0 to not ignore, 1 to ignore
4190*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
4191*a1157835SDaniel Fojt 	 */
4192*a1157835SDaniel Fojt 	int (*ignore_assoc_disallow)(void *priv, int ignore_disallow);
4193*a1157835SDaniel Fojt 
4194*a1157835SDaniel Fojt 	/**
4195*a1157835SDaniel Fojt 	 * set_bssid_blacklist - Set blacklist of BSSIDs to the driver
4196*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4197*a1157835SDaniel Fojt 	 * @num_bssid: Number of blacklist BSSIDs
4198*a1157835SDaniel Fojt 	 * @bssids: List of blacklisted BSSIDs
4199*a1157835SDaniel Fojt 	 */
4200*a1157835SDaniel Fojt 	int (*set_bssid_blacklist)(void *priv, unsigned int num_bssid,
4201*a1157835SDaniel Fojt 				   const u8 *bssid);
4202*a1157835SDaniel Fojt 
4203*a1157835SDaniel Fojt 	/**
4204*a1157835SDaniel Fojt 	 * update_connect_params - Update the connection parameters
4205*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4206*a1157835SDaniel Fojt 	 * @params: Association parameters
4207*a1157835SDaniel Fojt 	 * @mask: Bit mask indicating which parameters in @params have to be
4208*a1157835SDaniel Fojt 	 *	updated
4209*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
4210*a1157835SDaniel Fojt 	 *
4211*a1157835SDaniel Fojt 	 * Update the connection parameters when in connected state so that the
4212*a1157835SDaniel Fojt 	 * driver uses the updated parameters for subsequent roaming. This is
4213*a1157835SDaniel Fojt 	 * used only with drivers that implement internal BSS selection and
4214*a1157835SDaniel Fojt 	 * roaming.
4215*a1157835SDaniel Fojt 	 */
4216*a1157835SDaniel Fojt 	int (*update_connect_params)(
4217*a1157835SDaniel Fojt 		void *priv, struct wpa_driver_associate_params *params,
4218*a1157835SDaniel Fojt 		enum wpa_drv_update_connect_params_mask mask);
4219*a1157835SDaniel Fojt 
4220*a1157835SDaniel Fojt 	/**
4221*a1157835SDaniel Fojt 	 * send_external_auth_status - Indicate the status of external
4222*a1157835SDaniel Fojt 	 * authentication processing to the host driver.
4223*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4224*a1157835SDaniel Fojt 	 * @params: Status of authentication processing.
4225*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
4226*a1157835SDaniel Fojt 	 */
4227*a1157835SDaniel Fojt 	int (*send_external_auth_status)(void *priv,
4228*a1157835SDaniel Fojt 					 struct external_auth *params);
4229*a1157835SDaniel Fojt 
4230*a1157835SDaniel Fojt 	/**
4231*a1157835SDaniel Fojt 	 * set_4addr_mode - Set 4-address mode
4232*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4233*a1157835SDaniel Fojt 	 * @bridge_ifname: Bridge interface name
4234*a1157835SDaniel Fojt 	 * @val: 0 - disable 4addr mode, 1 - enable 4addr mode
4235*a1157835SDaniel Fojt 	 * Returns: 0 on success, < 0 on failure
4236*a1157835SDaniel Fojt 	 */
4237*a1157835SDaniel Fojt 	int (*set_4addr_mode)(void *priv, const char *bridge_ifname, int val);
4238*a1157835SDaniel Fojt 
4239*a1157835SDaniel Fojt 	/**
4240*a1157835SDaniel Fojt 	 * update_dh_ie - Update DH IE
4241*a1157835SDaniel Fojt 	 * @priv: Private driver interface data
4242*a1157835SDaniel Fojt 	 * @peer_mac: Peer MAC address
4243*a1157835SDaniel Fojt 	 * @reason_code: Reacon code
4244*a1157835SDaniel Fojt 	 * @ie: DH IE
4245*a1157835SDaniel Fojt 	 * @ie_len: DH IE length in bytes
4246*a1157835SDaniel Fojt 	 * Returns: 0 on success, -1 on failure
4247*a1157835SDaniel Fojt 	 *
4248*a1157835SDaniel Fojt 	 * This callback is used to let the driver know the DH processing result
4249*a1157835SDaniel Fojt 	 * and DH IE for a pending association.
4250*a1157835SDaniel Fojt 	 */
4251*a1157835SDaniel Fojt 	int (*update_dh_ie)(void *priv, const u8 *peer_mac, u16 reason_code,
4252*a1157835SDaniel Fojt 			    const u8 *ie, size_t ie_len);
4253*a1157835SDaniel Fojt };
42546d49e1aeSJan Lentfer 
42556d49e1aeSJan Lentfer /**
42566d49e1aeSJan Lentfer  * enum wpa_event_type - Event type for wpa_supplicant_event() calls
42576d49e1aeSJan Lentfer  */
42583ff40c12SJohn Marino enum wpa_event_type {
42596d49e1aeSJan Lentfer 	/**
42606d49e1aeSJan Lentfer 	 * EVENT_ASSOC - Association completed
42616d49e1aeSJan Lentfer 	 *
42626d49e1aeSJan Lentfer 	 * This event needs to be delivered when the driver completes IEEE
42636d49e1aeSJan Lentfer 	 * 802.11 association or reassociation successfully.
42646d49e1aeSJan Lentfer 	 * wpa_driver_ops::get_bssid() is expected to provide the current BSSID
42656d49e1aeSJan Lentfer 	 * after this event has been generated. In addition, optional
42666d49e1aeSJan Lentfer 	 * EVENT_ASSOCINFO may be generated just before EVENT_ASSOC to provide
42676d49e1aeSJan Lentfer 	 * more information about the association. If the driver interface gets
42686d49e1aeSJan Lentfer 	 * both of these events at the same time, it can also include the
42696d49e1aeSJan Lentfer 	 * assoc_info data in EVENT_ASSOC call.
42706d49e1aeSJan Lentfer 	 */
42716d49e1aeSJan Lentfer 	EVENT_ASSOC,
42726d49e1aeSJan Lentfer 
42736d49e1aeSJan Lentfer 	/**
42746d49e1aeSJan Lentfer 	 * EVENT_DISASSOC - Association lost
42756d49e1aeSJan Lentfer 	 *
42766d49e1aeSJan Lentfer 	 * This event should be called when association is lost either due to
42776d49e1aeSJan Lentfer 	 * receiving deauthenticate or disassociate frame from the AP or when
42783ff40c12SJohn Marino 	 * sending either of these frames to the current AP. If the driver
42793ff40c12SJohn Marino 	 * supports separate deauthentication event, EVENT_DISASSOC should only
42803ff40c12SJohn Marino 	 * be used for disassociation and EVENT_DEAUTH for deauthentication.
42813ff40c12SJohn Marino 	 * In AP mode, union wpa_event_data::disassoc_info is required.
42826d49e1aeSJan Lentfer 	 */
42836d49e1aeSJan Lentfer 	EVENT_DISASSOC,
42846d49e1aeSJan Lentfer 
42856d49e1aeSJan Lentfer 	/**
42866d49e1aeSJan Lentfer 	 * EVENT_MICHAEL_MIC_FAILURE - Michael MIC (TKIP) detected
42876d49e1aeSJan Lentfer 	 *
42886d49e1aeSJan Lentfer 	 * This event must be delivered when a Michael MIC error is detected by
42896d49e1aeSJan Lentfer 	 * the local driver. Additional data for event processing is
42906d49e1aeSJan Lentfer 	 * provided with union wpa_event_data::michael_mic_failure. This
42916d49e1aeSJan Lentfer 	 * information is used to request new encyption key and to initiate
42926d49e1aeSJan Lentfer 	 * TKIP countermeasures if needed.
42936d49e1aeSJan Lentfer 	 */
42946d49e1aeSJan Lentfer 	EVENT_MICHAEL_MIC_FAILURE,
42956d49e1aeSJan Lentfer 
42966d49e1aeSJan Lentfer 	/**
42976d49e1aeSJan Lentfer 	 * EVENT_SCAN_RESULTS - Scan results available
42986d49e1aeSJan Lentfer 	 *
42996d49e1aeSJan Lentfer 	 * This event must be called whenever scan results are available to be
43006d49e1aeSJan Lentfer 	 * fetched with struct wpa_driver_ops::get_scan_results(). This event
43016d49e1aeSJan Lentfer 	 * is expected to be used some time after struct wpa_driver_ops::scan()
43026d49e1aeSJan Lentfer 	 * is called. If the driver provides an unsolicited event when the scan
43036d49e1aeSJan Lentfer 	 * has been completed, this event can be used to trigger
43046d49e1aeSJan Lentfer 	 * EVENT_SCAN_RESULTS call. If such event is not available from the
43056d49e1aeSJan Lentfer 	 * driver, the driver wrapper code is expected to use a registered
43066d49e1aeSJan Lentfer 	 * timeout to generate EVENT_SCAN_RESULTS call after the time that the
43073ff40c12SJohn Marino 	 * scan is expected to be completed. Optional information about
43083ff40c12SJohn Marino 	 * completed scan can be provided with union wpa_event_data::scan_info.
43096d49e1aeSJan Lentfer 	 */
43106d49e1aeSJan Lentfer 	EVENT_SCAN_RESULTS,
43116d49e1aeSJan Lentfer 
43126d49e1aeSJan Lentfer 	/**
43136d49e1aeSJan Lentfer 	 * EVENT_ASSOCINFO - Report optional extra information for association
43146d49e1aeSJan Lentfer 	 *
43156d49e1aeSJan Lentfer 	 * This event can be used to report extra association information for
43166d49e1aeSJan Lentfer 	 * EVENT_ASSOC processing. This extra information includes IEs from
43176d49e1aeSJan Lentfer 	 * association frames and Beacon/Probe Response frames in union
43186d49e1aeSJan Lentfer 	 * wpa_event_data::assoc_info. EVENT_ASSOCINFO must be send just before
43196d49e1aeSJan Lentfer 	 * EVENT_ASSOC. Alternatively, the driver interface can include
43206d49e1aeSJan Lentfer 	 * assoc_info data in the EVENT_ASSOC call if it has all the
43216d49e1aeSJan Lentfer 	 * information available at the same point.
43226d49e1aeSJan Lentfer 	 */
43236d49e1aeSJan Lentfer 	EVENT_ASSOCINFO,
43246d49e1aeSJan Lentfer 
43256d49e1aeSJan Lentfer 	/**
43266d49e1aeSJan Lentfer 	 * EVENT_INTERFACE_STATUS - Report interface status changes
43276d49e1aeSJan Lentfer 	 *
43286d49e1aeSJan Lentfer 	 * This optional event can be used to report changes in interface
43296d49e1aeSJan Lentfer 	 * status (interface added/removed) using union
43306d49e1aeSJan Lentfer 	 * wpa_event_data::interface_status. This can be used to trigger
43316d49e1aeSJan Lentfer 	 * wpa_supplicant to stop and re-start processing for the interface,
43326d49e1aeSJan Lentfer 	 * e.g., when a cardbus card is ejected/inserted.
43336d49e1aeSJan Lentfer 	 */
43346d49e1aeSJan Lentfer 	EVENT_INTERFACE_STATUS,
43356d49e1aeSJan Lentfer 
43366d49e1aeSJan Lentfer 	/**
43376d49e1aeSJan Lentfer 	 * EVENT_PMKID_CANDIDATE - Report a candidate AP for pre-authentication
43386d49e1aeSJan Lentfer 	 *
43396d49e1aeSJan Lentfer 	 * This event can be used to inform wpa_supplicant about candidates for
43406d49e1aeSJan Lentfer 	 * RSN (WPA2) pre-authentication. If wpa_supplicant is not responsible
43416d49e1aeSJan Lentfer 	 * for scan request (ap_scan=2 mode), this event is required for
43426d49e1aeSJan Lentfer 	 * pre-authentication. If wpa_supplicant is performing scan request
43436d49e1aeSJan Lentfer 	 * (ap_scan=1), this event is optional since scan results can be used
43446d49e1aeSJan Lentfer 	 * to add pre-authentication candidates. union
43456d49e1aeSJan Lentfer 	 * wpa_event_data::pmkid_candidate is used to report the BSSID of the
43466d49e1aeSJan Lentfer 	 * candidate and priority of the candidate, e.g., based on the signal
43476d49e1aeSJan Lentfer 	 * strength, in order to try to pre-authenticate first with candidates
43486d49e1aeSJan Lentfer 	 * that are most likely targets for re-association.
43496d49e1aeSJan Lentfer 	 *
43506d49e1aeSJan Lentfer 	 * EVENT_PMKID_CANDIDATE can be called whenever the driver has updates
43516d49e1aeSJan Lentfer 	 * on the candidate list. In addition, it can be called for the current
43526d49e1aeSJan Lentfer 	 * AP and APs that have existing PMKSA cache entries. wpa_supplicant
43536d49e1aeSJan Lentfer 	 * will automatically skip pre-authentication in cases where a valid
43546d49e1aeSJan Lentfer 	 * PMKSA exists. When more than one candidate exists, this event should
43556d49e1aeSJan Lentfer 	 * be generated once for each candidate.
43566d49e1aeSJan Lentfer 	 *
43576d49e1aeSJan Lentfer 	 * Driver will be notified about successful pre-authentication with
43586d49e1aeSJan Lentfer 	 * struct wpa_driver_ops::add_pmkid() calls.
43596d49e1aeSJan Lentfer 	 */
43606d49e1aeSJan Lentfer 	EVENT_PMKID_CANDIDATE,
43616d49e1aeSJan Lentfer 
43626d49e1aeSJan Lentfer 	/**
43633ff40c12SJohn Marino 	 * EVENT_TDLS - Request TDLS operation
43643ff40c12SJohn Marino 	 *
43653ff40c12SJohn Marino 	 * This event can be used to request a TDLS operation to be performed.
43663ff40c12SJohn Marino 	 */
43673ff40c12SJohn Marino 	EVENT_TDLS,
43683ff40c12SJohn Marino 
43693ff40c12SJohn Marino 	/**
43706d49e1aeSJan Lentfer 	 * EVENT_FT_RESPONSE - Report FT (IEEE 802.11r) response IEs
43716d49e1aeSJan Lentfer 	 *
43726d49e1aeSJan Lentfer 	 * The driver is expected to report the received FT IEs from
43736d49e1aeSJan Lentfer 	 * FT authentication sequence from the AP. The FT IEs are included in
43746d49e1aeSJan Lentfer 	 * the extra information in union wpa_event_data::ft_ies.
43756d49e1aeSJan Lentfer 	 */
43763ff40c12SJohn Marino 	EVENT_FT_RESPONSE,
43773ff40c12SJohn Marino 
43783ff40c12SJohn Marino 	/**
43793ff40c12SJohn Marino 	 * EVENT_IBSS_RSN_START - Request RSN authentication in IBSS
43803ff40c12SJohn Marino 	 *
43813ff40c12SJohn Marino 	 * The driver can use this event to inform wpa_supplicant about a STA
43823ff40c12SJohn Marino 	 * in an IBSS with which protected frames could be exchanged. This
43833ff40c12SJohn Marino 	 * event starts RSN authentication with the other STA to authenticate
43843ff40c12SJohn Marino 	 * the STA and set up encryption keys with it.
43853ff40c12SJohn Marino 	 */
43863ff40c12SJohn Marino 	EVENT_IBSS_RSN_START,
43873ff40c12SJohn Marino 
43883ff40c12SJohn Marino 	/**
43893ff40c12SJohn Marino 	 * EVENT_AUTH - Authentication result
43903ff40c12SJohn Marino 	 *
43913ff40c12SJohn Marino 	 * This event should be called when authentication attempt has been
43923ff40c12SJohn Marino 	 * completed. This is only used if the driver supports separate
43933ff40c12SJohn Marino 	 * authentication step (struct wpa_driver_ops::authenticate).
43943ff40c12SJohn Marino 	 * Information about authentication result is included in
43953ff40c12SJohn Marino 	 * union wpa_event_data::auth.
43963ff40c12SJohn Marino 	 */
43973ff40c12SJohn Marino 	EVENT_AUTH,
43983ff40c12SJohn Marino 
43993ff40c12SJohn Marino 	/**
44003ff40c12SJohn Marino 	 * EVENT_DEAUTH - Authentication lost
44013ff40c12SJohn Marino 	 *
44023ff40c12SJohn Marino 	 * This event should be called when authentication is lost either due
44033ff40c12SJohn Marino 	 * to receiving deauthenticate frame from the AP or when sending that
44043ff40c12SJohn Marino 	 * frame to the current AP.
44053ff40c12SJohn Marino 	 * In AP mode, union wpa_event_data::deauth_info is required.
44063ff40c12SJohn Marino 	 */
44073ff40c12SJohn Marino 	EVENT_DEAUTH,
44083ff40c12SJohn Marino 
44093ff40c12SJohn Marino 	/**
44103ff40c12SJohn Marino 	 * EVENT_ASSOC_REJECT - Association rejected
44113ff40c12SJohn Marino 	 *
44123ff40c12SJohn Marino 	 * This event should be called when (re)association attempt has been
44133ff40c12SJohn Marino 	 * rejected by the AP. Information about the association response is
44143ff40c12SJohn Marino 	 * included in union wpa_event_data::assoc_reject.
44153ff40c12SJohn Marino 	 */
44163ff40c12SJohn Marino 	EVENT_ASSOC_REJECT,
44173ff40c12SJohn Marino 
44183ff40c12SJohn Marino 	/**
44193ff40c12SJohn Marino 	 * EVENT_AUTH_TIMED_OUT - Authentication timed out
44203ff40c12SJohn Marino 	 */
44213ff40c12SJohn Marino 	EVENT_AUTH_TIMED_OUT,
44223ff40c12SJohn Marino 
44233ff40c12SJohn Marino 	/**
44243ff40c12SJohn Marino 	 * EVENT_ASSOC_TIMED_OUT - Association timed out
44253ff40c12SJohn Marino 	 */
44263ff40c12SJohn Marino 	EVENT_ASSOC_TIMED_OUT,
44273ff40c12SJohn Marino 
44283ff40c12SJohn Marino 	/**
44293ff40c12SJohn Marino 	 * EVENT_WPS_BUTTON_PUSHED - Report hardware push button press for WPS
44303ff40c12SJohn Marino 	 */
44313ff40c12SJohn Marino 	EVENT_WPS_BUTTON_PUSHED,
44323ff40c12SJohn Marino 
44333ff40c12SJohn Marino 	/**
44343ff40c12SJohn Marino 	 * EVENT_TX_STATUS - Report TX status
44353ff40c12SJohn Marino 	 */
44363ff40c12SJohn Marino 	EVENT_TX_STATUS,
44373ff40c12SJohn Marino 
44383ff40c12SJohn Marino 	/**
44393ff40c12SJohn Marino 	 * EVENT_RX_FROM_UNKNOWN - Report RX from unknown STA
44403ff40c12SJohn Marino 	 */
44413ff40c12SJohn Marino 	EVENT_RX_FROM_UNKNOWN,
44423ff40c12SJohn Marino 
44433ff40c12SJohn Marino 	/**
44443ff40c12SJohn Marino 	 * EVENT_RX_MGMT - Report RX of a management frame
44453ff40c12SJohn Marino 	 */
44463ff40c12SJohn Marino 	EVENT_RX_MGMT,
44473ff40c12SJohn Marino 
44483ff40c12SJohn Marino 	/**
44493ff40c12SJohn Marino 	 * EVENT_REMAIN_ON_CHANNEL - Remain-on-channel duration started
44503ff40c12SJohn Marino 	 *
44513ff40c12SJohn Marino 	 * This event is used to indicate when the driver has started the
44523ff40c12SJohn Marino 	 * requested remain-on-channel duration. Information about the
44533ff40c12SJohn Marino 	 * operation is included in union wpa_event_data::remain_on_channel.
44543ff40c12SJohn Marino 	 */
44553ff40c12SJohn Marino 	EVENT_REMAIN_ON_CHANNEL,
44563ff40c12SJohn Marino 
44573ff40c12SJohn Marino 	/**
44583ff40c12SJohn Marino 	 * EVENT_CANCEL_REMAIN_ON_CHANNEL - Remain-on-channel timed out
44593ff40c12SJohn Marino 	 *
44603ff40c12SJohn Marino 	 * This event is used to indicate when the driver has completed
44613ff40c12SJohn Marino 	 * remain-on-channel duration, i.e., may noot be available on the
44623ff40c12SJohn Marino 	 * requested channel anymore. Information about the
44633ff40c12SJohn Marino 	 * operation is included in union wpa_event_data::remain_on_channel.
44643ff40c12SJohn Marino 	 */
44653ff40c12SJohn Marino 	EVENT_CANCEL_REMAIN_ON_CHANNEL,
44663ff40c12SJohn Marino 
44673ff40c12SJohn Marino 	/**
44683ff40c12SJohn Marino 	 * EVENT_RX_PROBE_REQ - Indicate received Probe Request frame
44693ff40c12SJohn Marino 	 *
44703ff40c12SJohn Marino 	 * This event is used to indicate when a Probe Request frame has been
44713ff40c12SJohn Marino 	 * received. Information about the received frame is included in
44723ff40c12SJohn Marino 	 * union wpa_event_data::rx_probe_req. The driver is required to report
44733ff40c12SJohn Marino 	 * these events only after successfully completed probe_req_report()
44743ff40c12SJohn Marino 	 * commands to request the events (i.e., report parameter is non-zero)
44753ff40c12SJohn Marino 	 * in station mode. In AP mode, Probe Request frames should always be
44763ff40c12SJohn Marino 	 * reported.
44773ff40c12SJohn Marino 	 */
44783ff40c12SJohn Marino 	EVENT_RX_PROBE_REQ,
44793ff40c12SJohn Marino 
44803ff40c12SJohn Marino 	/**
44813ff40c12SJohn Marino 	 * EVENT_NEW_STA - New wired device noticed
44823ff40c12SJohn Marino 	 *
44833ff40c12SJohn Marino 	 * This event is used to indicate that a new device has been detected
44843ff40c12SJohn Marino 	 * in a network that does not use association-like functionality (i.e.,
44853ff40c12SJohn Marino 	 * mainly wired Ethernet). This can be used to start EAPOL
44863ff40c12SJohn Marino 	 * authenticator when receiving a frame from a device. The address of
44873ff40c12SJohn Marino 	 * the device is included in union wpa_event_data::new_sta.
44883ff40c12SJohn Marino 	 */
44893ff40c12SJohn Marino 	EVENT_NEW_STA,
44903ff40c12SJohn Marino 
44913ff40c12SJohn Marino 	/**
44923ff40c12SJohn Marino 	 * EVENT_EAPOL_RX - Report received EAPOL frame
44933ff40c12SJohn Marino 	 *
44943ff40c12SJohn Marino 	 * When in AP mode with hostapd, this event is required to be used to
4495*a1157835SDaniel Fojt 	 * deliver the receive EAPOL frames from the driver.
44963ff40c12SJohn Marino 	 */
44973ff40c12SJohn Marino 	EVENT_EAPOL_RX,
44983ff40c12SJohn Marino 
44993ff40c12SJohn Marino 	/**
45003ff40c12SJohn Marino 	 * EVENT_SIGNAL_CHANGE - Indicate change in signal strength
45013ff40c12SJohn Marino 	 *
45023ff40c12SJohn Marino 	 * This event is used to indicate changes in the signal strength
45033ff40c12SJohn Marino 	 * observed in frames received from the current AP if signal strength
45043ff40c12SJohn Marino 	 * monitoring has been enabled with signal_monitor().
45053ff40c12SJohn Marino 	 */
45063ff40c12SJohn Marino 	EVENT_SIGNAL_CHANGE,
45073ff40c12SJohn Marino 
45083ff40c12SJohn Marino 	/**
45093ff40c12SJohn Marino 	 * EVENT_INTERFACE_ENABLED - Notify that interface was enabled
45103ff40c12SJohn Marino 	 *
45113ff40c12SJohn Marino 	 * This event is used to indicate that the interface was enabled after
45123ff40c12SJohn Marino 	 * having been previously disabled, e.g., due to rfkill.
45133ff40c12SJohn Marino 	 */
45143ff40c12SJohn Marino 	EVENT_INTERFACE_ENABLED,
45153ff40c12SJohn Marino 
45163ff40c12SJohn Marino 	/**
45173ff40c12SJohn Marino 	 * EVENT_INTERFACE_DISABLED - Notify that interface was disabled
45183ff40c12SJohn Marino 	 *
45193ff40c12SJohn Marino 	 * This event is used to indicate that the interface was disabled,
45203ff40c12SJohn Marino 	 * e.g., due to rfkill.
45213ff40c12SJohn Marino 	 */
45223ff40c12SJohn Marino 	EVENT_INTERFACE_DISABLED,
45233ff40c12SJohn Marino 
45243ff40c12SJohn Marino 	/**
45253ff40c12SJohn Marino 	 * EVENT_CHANNEL_LIST_CHANGED - Channel list changed
45263ff40c12SJohn Marino 	 *
45273ff40c12SJohn Marino 	 * This event is used to indicate that the channel list has changed,
45283ff40c12SJohn Marino 	 * e.g., because of a regulatory domain change triggered by scan
45293ff40c12SJohn Marino 	 * results including an AP advertising a country code.
45303ff40c12SJohn Marino 	 */
45313ff40c12SJohn Marino 	EVENT_CHANNEL_LIST_CHANGED,
45323ff40c12SJohn Marino 
45333ff40c12SJohn Marino 	/**
45343ff40c12SJohn Marino 	 * EVENT_INTERFACE_UNAVAILABLE - Notify that interface is unavailable
45353ff40c12SJohn Marino 	 *
45363ff40c12SJohn Marino 	 * This event is used to indicate that the driver cannot maintain this
45373ff40c12SJohn Marino 	 * interface in its operation mode anymore. The most likely use for
45383ff40c12SJohn Marino 	 * this is to indicate that AP mode operation is not available due to
45393ff40c12SJohn Marino 	 * operating channel would need to be changed to a DFS channel when
45403ff40c12SJohn Marino 	 * the driver does not support radar detection and another virtual
45413ff40c12SJohn Marino 	 * interfaces caused the operating channel to change. Other similar
45423ff40c12SJohn Marino 	 * resource conflicts could also trigger this for station mode
4543*a1157835SDaniel Fojt 	 * interfaces. This event can be propagated when channel switching
4544*a1157835SDaniel Fojt 	 * fails.
45453ff40c12SJohn Marino 	 */
45463ff40c12SJohn Marino 	EVENT_INTERFACE_UNAVAILABLE,
45473ff40c12SJohn Marino 
45483ff40c12SJohn Marino 	/**
45493ff40c12SJohn Marino 	 * EVENT_BEST_CHANNEL
45503ff40c12SJohn Marino 	 *
45513ff40c12SJohn Marino 	 * Driver generates this event whenever it detects a better channel
45523ff40c12SJohn Marino 	 * (e.g., based on RSSI or channel use). This information can be used
45533ff40c12SJohn Marino 	 * to improve channel selection for a new AP/P2P group.
45543ff40c12SJohn Marino 	 */
45553ff40c12SJohn Marino 	EVENT_BEST_CHANNEL,
45563ff40c12SJohn Marino 
45573ff40c12SJohn Marino 	/**
45583ff40c12SJohn Marino 	 * EVENT_UNPROT_DEAUTH - Unprotected Deauthentication frame received
45593ff40c12SJohn Marino 	 *
45603ff40c12SJohn Marino 	 * This event should be called when a Deauthentication frame is dropped
45613ff40c12SJohn Marino 	 * due to it not being protected (MFP/IEEE 802.11w).
45623ff40c12SJohn Marino 	 * union wpa_event_data::unprot_deauth is required to provide more
45633ff40c12SJohn Marino 	 * details of the frame.
45643ff40c12SJohn Marino 	 */
45653ff40c12SJohn Marino 	EVENT_UNPROT_DEAUTH,
45663ff40c12SJohn Marino 
45673ff40c12SJohn Marino 	/**
45683ff40c12SJohn Marino 	 * EVENT_UNPROT_DISASSOC - Unprotected Disassociation frame received
45693ff40c12SJohn Marino 	 *
45703ff40c12SJohn Marino 	 * This event should be called when a Disassociation frame is dropped
45713ff40c12SJohn Marino 	 * due to it not being protected (MFP/IEEE 802.11w).
45723ff40c12SJohn Marino 	 * union wpa_event_data::unprot_disassoc is required to provide more
45733ff40c12SJohn Marino 	 * details of the frame.
45743ff40c12SJohn Marino 	 */
45753ff40c12SJohn Marino 	EVENT_UNPROT_DISASSOC,
45763ff40c12SJohn Marino 
45773ff40c12SJohn Marino 	/**
45783ff40c12SJohn Marino 	 * EVENT_STATION_LOW_ACK
45793ff40c12SJohn Marino 	 *
45803ff40c12SJohn Marino 	 * Driver generates this event whenever it detected that a particular
45813ff40c12SJohn Marino 	 * station was lost. Detection can be through massive transmission
45823ff40c12SJohn Marino 	 * failures for example.
45833ff40c12SJohn Marino 	 */
45843ff40c12SJohn Marino 	EVENT_STATION_LOW_ACK,
45853ff40c12SJohn Marino 
45863ff40c12SJohn Marino 	/**
45873ff40c12SJohn Marino 	 * EVENT_IBSS_PEER_LOST - IBSS peer not reachable anymore
45883ff40c12SJohn Marino 	 */
45893ff40c12SJohn Marino 	EVENT_IBSS_PEER_LOST,
45903ff40c12SJohn Marino 
45913ff40c12SJohn Marino 	/**
45923ff40c12SJohn Marino 	 * EVENT_DRIVER_GTK_REKEY - Device/driver did GTK rekey
45933ff40c12SJohn Marino 	 *
45943ff40c12SJohn Marino 	 * This event carries the new replay counter to notify wpa_supplicant
45953ff40c12SJohn Marino 	 * of the current EAPOL-Key Replay Counter in case the driver/firmware
45963ff40c12SJohn Marino 	 * completed Group Key Handshake while the host (including
45973ff40c12SJohn Marino 	 * wpa_supplicant was sleeping).
45983ff40c12SJohn Marino 	 */
45993ff40c12SJohn Marino 	EVENT_DRIVER_GTK_REKEY,
46003ff40c12SJohn Marino 
46013ff40c12SJohn Marino 	/**
46023ff40c12SJohn Marino 	 * EVENT_SCHED_SCAN_STOPPED - Scheduled scan was stopped
46033ff40c12SJohn Marino 	 */
46043ff40c12SJohn Marino 	EVENT_SCHED_SCAN_STOPPED,
46053ff40c12SJohn Marino 
46063ff40c12SJohn Marino 	/**
46073ff40c12SJohn Marino 	 * EVENT_DRIVER_CLIENT_POLL_OK - Station responded to poll
46083ff40c12SJohn Marino 	 *
46093ff40c12SJohn Marino 	 * This event indicates that the station responded to the poll
46103ff40c12SJohn Marino 	 * initiated with @poll_client.
46113ff40c12SJohn Marino 	 */
46123ff40c12SJohn Marino 	EVENT_DRIVER_CLIENT_POLL_OK,
46133ff40c12SJohn Marino 
46143ff40c12SJohn Marino 	/**
46153ff40c12SJohn Marino 	 * EVENT_EAPOL_TX_STATUS - notify of EAPOL TX status
46163ff40c12SJohn Marino 	 */
46173ff40c12SJohn Marino 	EVENT_EAPOL_TX_STATUS,
46183ff40c12SJohn Marino 
46193ff40c12SJohn Marino 	/**
46203ff40c12SJohn Marino 	 * EVENT_CH_SWITCH - AP or GO decided to switch channels
46213ff40c12SJohn Marino 	 *
46223ff40c12SJohn Marino 	 * Described in wpa_event_data.ch_switch
46233ff40c12SJohn Marino 	 * */
46243ff40c12SJohn Marino 	EVENT_CH_SWITCH,
46253ff40c12SJohn Marino 
46263ff40c12SJohn Marino 	/**
4627*a1157835SDaniel Fojt 	 * EVENT_CH_SWITCH_STARTED - AP or GO started to switch channels
4628*a1157835SDaniel Fojt 	 *
4629*a1157835SDaniel Fojt 	 * This is a pre-switch event indicating the shortly following switch
4630*a1157835SDaniel Fojt 	 * of operating channels.
4631*a1157835SDaniel Fojt 	 *
4632*a1157835SDaniel Fojt 	 * Described in wpa_event_data.ch_switch
4633*a1157835SDaniel Fojt 	 */
4634*a1157835SDaniel Fojt 	EVENT_CH_SWITCH_STARTED,
4635*a1157835SDaniel Fojt 	/**
46363ff40c12SJohn Marino 	 * EVENT_WNM - Request WNM operation
46373ff40c12SJohn Marino 	 *
46383ff40c12SJohn Marino 	 * This event can be used to request a WNM operation to be performed.
46393ff40c12SJohn Marino 	 */
46403ff40c12SJohn Marino 	EVENT_WNM,
46413ff40c12SJohn Marino 
46423ff40c12SJohn Marino 	/**
46433ff40c12SJohn Marino 	 * EVENT_CONNECT_FAILED_REASON - Connection failure reason in AP mode
46443ff40c12SJohn Marino 	 *
46453ff40c12SJohn Marino 	 * This event indicates that the driver reported a connection failure
46463ff40c12SJohn Marino 	 * with the specified client (for example, max client reached, etc.) in
46473ff40c12SJohn Marino 	 * AP mode.
46483ff40c12SJohn Marino 	 */
46493ff40c12SJohn Marino 	EVENT_CONNECT_FAILED_REASON,
46503ff40c12SJohn Marino 
46513ff40c12SJohn Marino 	/**
4652*a1157835SDaniel Fojt 	 * EVENT_DFS_RADAR_DETECTED - Notify of radar detection
46533ff40c12SJohn Marino 	 *
46543ff40c12SJohn Marino 	 * A radar has been detected on the supplied frequency, hostapd should
46553ff40c12SJohn Marino 	 * react accordingly (e.g., change channel).
46563ff40c12SJohn Marino 	 */
46573ff40c12SJohn Marino 	EVENT_DFS_RADAR_DETECTED,
46583ff40c12SJohn Marino 
46593ff40c12SJohn Marino 	/**
4660*a1157835SDaniel Fojt 	 * EVENT_DFS_CAC_FINISHED - Notify that channel availability check has been completed
46613ff40c12SJohn Marino 	 *
46623ff40c12SJohn Marino 	 * After a successful CAC, the channel can be marked clear and used.
46633ff40c12SJohn Marino 	 */
46643ff40c12SJohn Marino 	EVENT_DFS_CAC_FINISHED,
46653ff40c12SJohn Marino 
46663ff40c12SJohn Marino 	/**
4667*a1157835SDaniel Fojt 	 * EVENT_DFS_CAC_ABORTED - Notify that channel availability check has been aborted
46683ff40c12SJohn Marino 	 *
46693ff40c12SJohn Marino 	 * The CAC was not successful, and the channel remains in the previous
4670*a1157835SDaniel Fojt 	 * state. This may happen due to a radar being detected or other
46713ff40c12SJohn Marino 	 * external influences.
46723ff40c12SJohn Marino 	 */
46733ff40c12SJohn Marino 	EVENT_DFS_CAC_ABORTED,
46743ff40c12SJohn Marino 
46753ff40c12SJohn Marino 	/**
4676*a1157835SDaniel Fojt 	 * EVENT_DFS_NOP_FINISHED - Notify that non-occupancy period is over
46773ff40c12SJohn Marino 	 *
46783ff40c12SJohn Marino 	 * The channel which was previously unavailable is now available again.
46793ff40c12SJohn Marino 	 */
46803ff40c12SJohn Marino 	EVENT_DFS_NOP_FINISHED,
46813ff40c12SJohn Marino 
46823ff40c12SJohn Marino 	/**
46833ff40c12SJohn Marino 	 * EVENT_SURVEY - Received survey data
46843ff40c12SJohn Marino 	 *
46853ff40c12SJohn Marino 	 * This event gets triggered when a driver query is issued for survey
46863ff40c12SJohn Marino 	 * data and the requested data becomes available. The returned data is
46873ff40c12SJohn Marino 	 * stored in struct survey_results. The results provide at most one
46883ff40c12SJohn Marino 	 * survey entry for each frequency and at minimum will provide one
46893ff40c12SJohn Marino 	 * survey entry for one frequency. The survey data can be os_malloc()'d
46903ff40c12SJohn Marino 	 * and then os_free()'d, so the event callback must only copy data.
46913ff40c12SJohn Marino 	 */
46923ff40c12SJohn Marino 	EVENT_SURVEY,
46933ff40c12SJohn Marino 
46943ff40c12SJohn Marino 	/**
46953ff40c12SJohn Marino 	 * EVENT_SCAN_STARTED - Scan started
46963ff40c12SJohn Marino 	 *
46973ff40c12SJohn Marino 	 * This indicates that driver has started a scan operation either based
46983ff40c12SJohn Marino 	 * on a request from wpa_supplicant/hostapd or from another application.
46993ff40c12SJohn Marino 	 * EVENT_SCAN_RESULTS is used to indicate when the scan has been
47003ff40c12SJohn Marino 	 * completed (either successfully or by getting cancelled).
47013ff40c12SJohn Marino 	 */
47023ff40c12SJohn Marino 	EVENT_SCAN_STARTED,
47033ff40c12SJohn Marino 
47043ff40c12SJohn Marino 	/**
47053ff40c12SJohn Marino 	 * EVENT_AVOID_FREQUENCIES - Received avoid frequency range
47063ff40c12SJohn Marino 	 *
47073ff40c12SJohn Marino 	 * This event indicates a set of frequency ranges that should be avoided
47083ff40c12SJohn Marino 	 * to reduce issues due to interference or internal co-existence
47093ff40c12SJohn Marino 	 * information in the driver.
47103ff40c12SJohn Marino 	 */
4711*a1157835SDaniel Fojt 	EVENT_AVOID_FREQUENCIES,
4712*a1157835SDaniel Fojt 
4713*a1157835SDaniel Fojt 	/**
4714*a1157835SDaniel Fojt 	 * EVENT_NEW_PEER_CANDIDATE - new (unknown) mesh peer notification
4715*a1157835SDaniel Fojt 	 */
4716*a1157835SDaniel Fojt 	EVENT_NEW_PEER_CANDIDATE,
4717*a1157835SDaniel Fojt 
4718*a1157835SDaniel Fojt 	/**
4719*a1157835SDaniel Fojt 	 * EVENT_ACS_CHANNEL_SELECTED - Received selected channels by ACS
4720*a1157835SDaniel Fojt 	 *
4721*a1157835SDaniel Fojt 	 * Indicates a pair of primary and secondary channels chosen by ACS
4722*a1157835SDaniel Fojt 	 * in device.
4723*a1157835SDaniel Fojt 	 */
4724*a1157835SDaniel Fojt 	EVENT_ACS_CHANNEL_SELECTED,
4725*a1157835SDaniel Fojt 
4726*a1157835SDaniel Fojt 	/**
4727*a1157835SDaniel Fojt 	 * EVENT_DFS_CAC_STARTED - Notify that channel availability check has
4728*a1157835SDaniel Fojt 	 * been started.
4729*a1157835SDaniel Fojt 	 *
4730*a1157835SDaniel Fojt 	 * This event indicates that channel availability check has been started
4731*a1157835SDaniel Fojt 	 * on a DFS frequency by a driver that supports DFS Offload.
4732*a1157835SDaniel Fojt 	 */
4733*a1157835SDaniel Fojt 	EVENT_DFS_CAC_STARTED,
4734*a1157835SDaniel Fojt 
4735*a1157835SDaniel Fojt 	/**
4736*a1157835SDaniel Fojt 	 * EVENT_P2P_LO_STOP - Notify that P2P listen offload is stopped
4737*a1157835SDaniel Fojt 	 */
4738*a1157835SDaniel Fojt 	EVENT_P2P_LO_STOP,
4739*a1157835SDaniel Fojt 
4740*a1157835SDaniel Fojt 	/**
4741*a1157835SDaniel Fojt 	 * EVENT_BEACON_LOSS - Beacon loss detected
4742*a1157835SDaniel Fojt 	 *
4743*a1157835SDaniel Fojt 	 * This event indicates that no Beacon frames has been received from
4744*a1157835SDaniel Fojt 	 * the current AP. This may indicate that the AP is not anymore in
4745*a1157835SDaniel Fojt 	 * range.
4746*a1157835SDaniel Fojt 	 */
4747*a1157835SDaniel Fojt 	EVENT_BEACON_LOSS,
4748*a1157835SDaniel Fojt 
4749*a1157835SDaniel Fojt 	/**
4750*a1157835SDaniel Fojt 	 * EVENT_DFS_PRE_CAC_EXPIRED - Notify that channel availability check
4751*a1157835SDaniel Fojt 	 * done previously (Pre-CAC) on the channel has expired. This would
4752*a1157835SDaniel Fojt 	 * normally be on a non-ETSI DFS regulatory domain. DFS state of the
4753*a1157835SDaniel Fojt 	 * channel will be moved from available to usable. A new CAC has to be
4754*a1157835SDaniel Fojt 	 * performed before start operating on this channel.
4755*a1157835SDaniel Fojt 	 */
4756*a1157835SDaniel Fojt 	EVENT_DFS_PRE_CAC_EXPIRED,
4757*a1157835SDaniel Fojt 
4758*a1157835SDaniel Fojt 	/**
4759*a1157835SDaniel Fojt 	 * EVENT_EXTERNAL_AUTH - This event interface is used by host drivers
4760*a1157835SDaniel Fojt 	 * that do not define separate commands for authentication and
4761*a1157835SDaniel Fojt 	 * association (~WPA_DRIVER_FLAGS_SME) but offload the 802.11
4762*a1157835SDaniel Fojt 	 * authentication to wpa_supplicant. This event carries all the
4763*a1157835SDaniel Fojt 	 * necessary information from the host driver for the authentication to
4764*a1157835SDaniel Fojt 	 * happen.
4765*a1157835SDaniel Fojt 	 */
4766*a1157835SDaniel Fojt 	EVENT_EXTERNAL_AUTH,
4767*a1157835SDaniel Fojt 
4768*a1157835SDaniel Fojt 	/**
4769*a1157835SDaniel Fojt 	 * EVENT_PORT_AUTHORIZED - Notification that a connection is authorized
4770*a1157835SDaniel Fojt 	 *
4771*a1157835SDaniel Fojt 	 * This event should be indicated when the driver completes the 4-way
4772*a1157835SDaniel Fojt 	 * handshake. This event should be preceded by an EVENT_ASSOC that
4773*a1157835SDaniel Fojt 	 * indicates the completion of IEEE 802.11 association.
4774*a1157835SDaniel Fojt 	 */
4775*a1157835SDaniel Fojt 	EVENT_PORT_AUTHORIZED,
4776*a1157835SDaniel Fojt 
4777*a1157835SDaniel Fojt 	/**
4778*a1157835SDaniel Fojt 	 * EVENT_STATION_OPMODE_CHANGED - Notify STA's HT/VHT operation mode
4779*a1157835SDaniel Fojt 	 * change event.
4780*a1157835SDaniel Fojt 	 */
4781*a1157835SDaniel Fojt 	EVENT_STATION_OPMODE_CHANGED,
4782*a1157835SDaniel Fojt 
4783*a1157835SDaniel Fojt 	/**
4784*a1157835SDaniel Fojt 	 * EVENT_INTERFACE_MAC_CHANGED - Notify that interface MAC changed
4785*a1157835SDaniel Fojt 	 *
4786*a1157835SDaniel Fojt 	 * This event is emitted when the MAC changes while the interface is
4787*a1157835SDaniel Fojt 	 * enabled. When an interface was disabled and becomes enabled, it
4788*a1157835SDaniel Fojt 	 * must be always assumed that the MAC possibly changed.
4789*a1157835SDaniel Fojt 	 */
4790*a1157835SDaniel Fojt 	EVENT_INTERFACE_MAC_CHANGED,
4791*a1157835SDaniel Fojt 
4792*a1157835SDaniel Fojt 	/**
4793*a1157835SDaniel Fojt 	 * EVENT_WDS_STA_INTERFACE_STATUS - Notify WDS STA interface status
4794*a1157835SDaniel Fojt 	 *
4795*a1157835SDaniel Fojt 	 * This event is emitted when an interface is added/removed for WDS STA.
4796*a1157835SDaniel Fojt 	 */
4797*a1157835SDaniel Fojt 	EVENT_WDS_STA_INTERFACE_STATUS,
4798*a1157835SDaniel Fojt 
4799*a1157835SDaniel Fojt 	/**
4800*a1157835SDaniel Fojt 	  * EVENT_UPDATE_DH - Notification of updated DH information
4801*a1157835SDaniel Fojt 	  */
4802*a1157835SDaniel Fojt 	EVENT_UPDATE_DH,
48033ff40c12SJohn Marino };
48043ff40c12SJohn Marino 
48053ff40c12SJohn Marino 
48063ff40c12SJohn Marino /**
48073ff40c12SJohn Marino  * struct freq_survey - Channel survey info
48083ff40c12SJohn Marino  *
48093ff40c12SJohn Marino  * @ifidx: Interface index in which this survey was observed
48103ff40c12SJohn Marino  * @freq: Center of frequency of the surveyed channel
48113ff40c12SJohn Marino  * @nf: Channel noise floor in dBm
48123ff40c12SJohn Marino  * @channel_time: Amount of time in ms the radio spent on the channel
48133ff40c12SJohn Marino  * @channel_time_busy: Amount of time in ms the radio detected some signal
48143ff40c12SJohn Marino  *     that indicated to the radio the channel was not clear
48153ff40c12SJohn Marino  * @channel_time_rx: Amount of time the radio spent receiving data
48163ff40c12SJohn Marino  * @channel_time_tx: Amount of time the radio spent transmitting data
48173ff40c12SJohn Marino  * @filled: bitmask indicating which fields have been reported, see
48183ff40c12SJohn Marino  *     SURVEY_HAS_* defines.
48193ff40c12SJohn Marino  * @list: Internal list pointers
48203ff40c12SJohn Marino  */
48213ff40c12SJohn Marino struct freq_survey {
48223ff40c12SJohn Marino 	u32 ifidx;
48233ff40c12SJohn Marino 	unsigned int freq;
48243ff40c12SJohn Marino 	s8 nf;
48253ff40c12SJohn Marino 	u64 channel_time;
48263ff40c12SJohn Marino 	u64 channel_time_busy;
48273ff40c12SJohn Marino 	u64 channel_time_rx;
48283ff40c12SJohn Marino 	u64 channel_time_tx;
48293ff40c12SJohn Marino 	unsigned int filled;
48303ff40c12SJohn Marino 	struct dl_list list;
48313ff40c12SJohn Marino };
48323ff40c12SJohn Marino 
48333ff40c12SJohn Marino #define SURVEY_HAS_NF BIT(0)
48343ff40c12SJohn Marino #define SURVEY_HAS_CHAN_TIME BIT(1)
48353ff40c12SJohn Marino #define SURVEY_HAS_CHAN_TIME_BUSY BIT(2)
48363ff40c12SJohn Marino #define SURVEY_HAS_CHAN_TIME_RX BIT(3)
48373ff40c12SJohn Marino #define SURVEY_HAS_CHAN_TIME_TX BIT(4)
48386d49e1aeSJan Lentfer 
48396d49e1aeSJan Lentfer 
48406d49e1aeSJan Lentfer /**
48416d49e1aeSJan Lentfer  * union wpa_event_data - Additional data for wpa_supplicant_event() calls
48426d49e1aeSJan Lentfer  */
48436d49e1aeSJan Lentfer union wpa_event_data {
48446d49e1aeSJan Lentfer 	/**
48456d49e1aeSJan Lentfer 	 * struct assoc_info - Data for EVENT_ASSOC and EVENT_ASSOCINFO events
48466d49e1aeSJan Lentfer 	 *
48476d49e1aeSJan Lentfer 	 * This structure is optional for EVENT_ASSOC calls and required for
48486d49e1aeSJan Lentfer 	 * EVENT_ASSOCINFO calls. By using EVENT_ASSOC with this data, the
48496d49e1aeSJan Lentfer 	 * driver interface does not need to generate separate EVENT_ASSOCINFO
48506d49e1aeSJan Lentfer 	 * calls.
48516d49e1aeSJan Lentfer 	 */
48526d49e1aeSJan Lentfer 	struct assoc_info {
48536d49e1aeSJan Lentfer 		/**
48543ff40c12SJohn Marino 		 * reassoc - Flag to indicate association or reassociation
48553ff40c12SJohn Marino 		 */
48563ff40c12SJohn Marino 		int reassoc;
48573ff40c12SJohn Marino 
48583ff40c12SJohn Marino 		/**
48596d49e1aeSJan Lentfer 		 * req_ies - (Re)Association Request IEs
48606d49e1aeSJan Lentfer 		 *
48616d49e1aeSJan Lentfer 		 * If the driver generates WPA/RSN IE, this event data must be
48626d49e1aeSJan Lentfer 		 * returned for WPA handshake to have needed information. If
48636d49e1aeSJan Lentfer 		 * wpa_supplicant-generated WPA/RSN IE is used, this
48646d49e1aeSJan Lentfer 		 * information event is optional.
48656d49e1aeSJan Lentfer 		 *
48666d49e1aeSJan Lentfer 		 * This should start with the first IE (fixed fields before IEs
48676d49e1aeSJan Lentfer 		 * are not included).
48686d49e1aeSJan Lentfer 		 */
48693ff40c12SJohn Marino 		const u8 *req_ies;
48706d49e1aeSJan Lentfer 
48716d49e1aeSJan Lentfer 		/**
48726d49e1aeSJan Lentfer 		 * req_ies_len - Length of req_ies in bytes
48736d49e1aeSJan Lentfer 		 */
48746d49e1aeSJan Lentfer 		size_t req_ies_len;
48756d49e1aeSJan Lentfer 
48766d49e1aeSJan Lentfer 		/**
48776d49e1aeSJan Lentfer 		 * resp_ies - (Re)Association Response IEs
48786d49e1aeSJan Lentfer 		 *
48796d49e1aeSJan Lentfer 		 * Optional association data from the driver. This data is not
48806d49e1aeSJan Lentfer 		 * required WPA, but may be useful for some protocols and as
48816d49e1aeSJan Lentfer 		 * such, should be reported if this is available to the driver
48826d49e1aeSJan Lentfer 		 * interface.
48836d49e1aeSJan Lentfer 		 *
48846d49e1aeSJan Lentfer 		 * This should start with the first IE (fixed fields before IEs
48856d49e1aeSJan Lentfer 		 * are not included).
48866d49e1aeSJan Lentfer 		 */
48873ff40c12SJohn Marino 		const u8 *resp_ies;
48886d49e1aeSJan Lentfer 
48896d49e1aeSJan Lentfer 		/**
48906d49e1aeSJan Lentfer 		 * resp_ies_len - Length of resp_ies in bytes
48916d49e1aeSJan Lentfer 		 */
48926d49e1aeSJan Lentfer 		size_t resp_ies_len;
48936d49e1aeSJan Lentfer 
48946d49e1aeSJan Lentfer 		/**
4895*a1157835SDaniel Fojt 		 * resp_frame - (Re)Association Response frame
4896*a1157835SDaniel Fojt 		 */
4897*a1157835SDaniel Fojt 		const u8 *resp_frame;
4898*a1157835SDaniel Fojt 
4899*a1157835SDaniel Fojt 		/**
4900*a1157835SDaniel Fojt 		 * resp_frame_len - (Re)Association Response frame length
4901*a1157835SDaniel Fojt 		 */
4902*a1157835SDaniel Fojt 		size_t resp_frame_len;
4903*a1157835SDaniel Fojt 
4904*a1157835SDaniel Fojt 		/**
49056d49e1aeSJan Lentfer 		 * beacon_ies - Beacon or Probe Response IEs
49066d49e1aeSJan Lentfer 		 *
49076d49e1aeSJan Lentfer 		 * Optional Beacon/ProbeResp data: IEs included in Beacon or
49086d49e1aeSJan Lentfer 		 * Probe Response frames from the current AP (i.e., the one
49096d49e1aeSJan Lentfer 		 * that the client just associated with). This information is
49106d49e1aeSJan Lentfer 		 * used to update WPA/RSN IE for the AP. If this field is not
49116d49e1aeSJan Lentfer 		 * set, the results from previous scan will be used. If no
49126d49e1aeSJan Lentfer 		 * data for the new AP is found, scan results will be requested
49136d49e1aeSJan Lentfer 		 * again (without scan request). At this point, the driver is
49146d49e1aeSJan Lentfer 		 * expected to provide WPA/RSN IE for the AP (if WPA/WPA2 is
49156d49e1aeSJan Lentfer 		 * used).
49166d49e1aeSJan Lentfer 		 *
49176d49e1aeSJan Lentfer 		 * This should start with the first IE (fixed fields before IEs
49186d49e1aeSJan Lentfer 		 * are not included).
49196d49e1aeSJan Lentfer 		 */
49203ff40c12SJohn Marino 		const u8 *beacon_ies;
49216d49e1aeSJan Lentfer 
49226d49e1aeSJan Lentfer 		/**
49236d49e1aeSJan Lentfer 		 * beacon_ies_len - Length of beacon_ies */
49246d49e1aeSJan Lentfer 		size_t beacon_ies_len;
49253ff40c12SJohn Marino 
49263ff40c12SJohn Marino 		/**
49273ff40c12SJohn Marino 		 * freq - Frequency of the operational channel in MHz
49283ff40c12SJohn Marino 		 */
49293ff40c12SJohn Marino 		unsigned int freq;
49303ff40c12SJohn Marino 
49313ff40c12SJohn Marino 		/**
4932*a1157835SDaniel Fojt 		 * wmm_params - WMM parameters used in this association.
4933*a1157835SDaniel Fojt 		 */
4934*a1157835SDaniel Fojt 		struct wmm_params wmm_params;
4935*a1157835SDaniel Fojt 
4936*a1157835SDaniel Fojt 		/**
49373ff40c12SJohn Marino 		 * addr - Station address (for AP mode)
49383ff40c12SJohn Marino 		 */
49393ff40c12SJohn Marino 		const u8 *addr;
4940*a1157835SDaniel Fojt 
4941*a1157835SDaniel Fojt 		/**
4942*a1157835SDaniel Fojt 		 * The following is the key management offload information
4943*a1157835SDaniel Fojt 		 * @authorized
4944*a1157835SDaniel Fojt 		 * @key_replay_ctr
4945*a1157835SDaniel Fojt 		 * @key_replay_ctr_len
4946*a1157835SDaniel Fojt 		 * @ptk_kck
4947*a1157835SDaniel Fojt 		 * @ptk_kek_len
4948*a1157835SDaniel Fojt 		 * @ptk_kek
4949*a1157835SDaniel Fojt 		 * @ptk_kek_len
4950*a1157835SDaniel Fojt 		 */
4951*a1157835SDaniel Fojt 
4952*a1157835SDaniel Fojt 		/**
4953*a1157835SDaniel Fojt 		 * authorized - Status of key management offload,
4954*a1157835SDaniel Fojt 		 * 1 = successful
4955*a1157835SDaniel Fojt 		 */
4956*a1157835SDaniel Fojt 		int authorized;
4957*a1157835SDaniel Fojt 
4958*a1157835SDaniel Fojt 		/**
4959*a1157835SDaniel Fojt 		 * key_replay_ctr - Key replay counter value last used
4960*a1157835SDaniel Fojt 		 * in a valid EAPOL-Key frame
4961*a1157835SDaniel Fojt 		 */
4962*a1157835SDaniel Fojt 		const u8 *key_replay_ctr;
4963*a1157835SDaniel Fojt 
4964*a1157835SDaniel Fojt 		/**
4965*a1157835SDaniel Fojt 		 * key_replay_ctr_len - The length of key_replay_ctr
4966*a1157835SDaniel Fojt 		 */
4967*a1157835SDaniel Fojt 		size_t key_replay_ctr_len;
4968*a1157835SDaniel Fojt 
4969*a1157835SDaniel Fojt 		/**
4970*a1157835SDaniel Fojt 		 * ptk_kck - The derived PTK KCK
4971*a1157835SDaniel Fojt 		 */
4972*a1157835SDaniel Fojt 		const u8 *ptk_kck;
4973*a1157835SDaniel Fojt 
4974*a1157835SDaniel Fojt 		/**
4975*a1157835SDaniel Fojt 		 * ptk_kek_len - The length of ptk_kck
4976*a1157835SDaniel Fojt 		 */
4977*a1157835SDaniel Fojt 		size_t ptk_kck_len;
4978*a1157835SDaniel Fojt 
4979*a1157835SDaniel Fojt 		/**
4980*a1157835SDaniel Fojt 		 * ptk_kek - The derived PTK KEK
4981*a1157835SDaniel Fojt 		 * This is used in key management offload and also in FILS SK
4982*a1157835SDaniel Fojt 		 * offload.
4983*a1157835SDaniel Fojt 		 */
4984*a1157835SDaniel Fojt 		const u8 *ptk_kek;
4985*a1157835SDaniel Fojt 
4986*a1157835SDaniel Fojt 		/**
4987*a1157835SDaniel Fojt 		 * ptk_kek_len - The length of ptk_kek
4988*a1157835SDaniel Fojt 		 */
4989*a1157835SDaniel Fojt 		size_t ptk_kek_len;
4990*a1157835SDaniel Fojt 
4991*a1157835SDaniel Fojt 		/**
4992*a1157835SDaniel Fojt 		 * subnet_status - The subnet status:
4993*a1157835SDaniel Fojt 		 * 0 = unknown, 1 = unchanged, 2 = changed
4994*a1157835SDaniel Fojt 		 */
4995*a1157835SDaniel Fojt 		u8 subnet_status;
4996*a1157835SDaniel Fojt 
4997*a1157835SDaniel Fojt 		/**
4998*a1157835SDaniel Fojt 		 * The following information is used in FILS SK offload
4999*a1157835SDaniel Fojt 		 * @fils_erp_next_seq_num
5000*a1157835SDaniel Fojt 		 * @fils_pmk
5001*a1157835SDaniel Fojt 		 * @fils_pmk_len
5002*a1157835SDaniel Fojt 		 * @fils_pmkid
5003*a1157835SDaniel Fojt 		 */
5004*a1157835SDaniel Fojt 
5005*a1157835SDaniel Fojt 		/**
5006*a1157835SDaniel Fojt 		 * fils_erp_next_seq_num - The next sequence number to use in
5007*a1157835SDaniel Fojt 		 * FILS ERP messages
5008*a1157835SDaniel Fojt 		 */
5009*a1157835SDaniel Fojt 		u16 fils_erp_next_seq_num;
5010*a1157835SDaniel Fojt 
5011*a1157835SDaniel Fojt 		/**
5012*a1157835SDaniel Fojt 		 * fils_pmk - A new PMK if generated in case of FILS
5013*a1157835SDaniel Fojt 		 * authentication
5014*a1157835SDaniel Fojt 		 */
5015*a1157835SDaniel Fojt 		const u8 *fils_pmk;
5016*a1157835SDaniel Fojt 
5017*a1157835SDaniel Fojt 		/**
5018*a1157835SDaniel Fojt 		 * fils_pmk_len - Length of fils_pmk
5019*a1157835SDaniel Fojt 		 */
5020*a1157835SDaniel Fojt 		size_t fils_pmk_len;
5021*a1157835SDaniel Fojt 
5022*a1157835SDaniel Fojt 		/**
5023*a1157835SDaniel Fojt 		 * fils_pmkid - PMKID used or generated in FILS authentication
5024*a1157835SDaniel Fojt 		 */
5025*a1157835SDaniel Fojt 		const u8 *fils_pmkid;
50266d49e1aeSJan Lentfer 	} assoc_info;
50276d49e1aeSJan Lentfer 
50286d49e1aeSJan Lentfer 	/**
50293ff40c12SJohn Marino 	 * struct disassoc_info - Data for EVENT_DISASSOC events
50303ff40c12SJohn Marino 	 */
50313ff40c12SJohn Marino 	struct disassoc_info {
50323ff40c12SJohn Marino 		/**
50333ff40c12SJohn Marino 		 * addr - Station address (for AP mode)
50343ff40c12SJohn Marino 		 */
50353ff40c12SJohn Marino 		const u8 *addr;
50363ff40c12SJohn Marino 
50373ff40c12SJohn Marino 		/**
50383ff40c12SJohn Marino 		 * reason_code - Reason Code (host byte order) used in
50393ff40c12SJohn Marino 		 *	Deauthentication frame
50403ff40c12SJohn Marino 		 */
50413ff40c12SJohn Marino 		u16 reason_code;
50423ff40c12SJohn Marino 
50433ff40c12SJohn Marino 		/**
50443ff40c12SJohn Marino 		 * ie - Optional IE(s) in Disassociation frame
50453ff40c12SJohn Marino 		 */
50463ff40c12SJohn Marino 		const u8 *ie;
50473ff40c12SJohn Marino 
50483ff40c12SJohn Marino 		/**
50493ff40c12SJohn Marino 		 * ie_len - Length of ie buffer in octets
50503ff40c12SJohn Marino 		 */
50513ff40c12SJohn Marino 		size_t ie_len;
50523ff40c12SJohn Marino 
50533ff40c12SJohn Marino 		/**
50543ff40c12SJohn Marino 		 * locally_generated - Whether the frame was locally generated
50553ff40c12SJohn Marino 		 */
50563ff40c12SJohn Marino 		int locally_generated;
50573ff40c12SJohn Marino 	} disassoc_info;
50583ff40c12SJohn Marino 
50593ff40c12SJohn Marino 	/**
50603ff40c12SJohn Marino 	 * struct deauth_info - Data for EVENT_DEAUTH events
50613ff40c12SJohn Marino 	 */
50623ff40c12SJohn Marino 	struct deauth_info {
50633ff40c12SJohn Marino 		/**
50643ff40c12SJohn Marino 		 * addr - Station address (for AP mode)
50653ff40c12SJohn Marino 		 */
50663ff40c12SJohn Marino 		const u8 *addr;
50673ff40c12SJohn Marino 
50683ff40c12SJohn Marino 		/**
50693ff40c12SJohn Marino 		 * reason_code - Reason Code (host byte order) used in
50703ff40c12SJohn Marino 		 *	Deauthentication frame
50713ff40c12SJohn Marino 		 */
50723ff40c12SJohn Marino 		u16 reason_code;
50733ff40c12SJohn Marino 
50743ff40c12SJohn Marino 		/**
50753ff40c12SJohn Marino 		 * ie - Optional IE(s) in Deauthentication frame
50763ff40c12SJohn Marino 		 */
50773ff40c12SJohn Marino 		const u8 *ie;
50783ff40c12SJohn Marino 
50793ff40c12SJohn Marino 		/**
50803ff40c12SJohn Marino 		 * ie_len - Length of ie buffer in octets
50813ff40c12SJohn Marino 		 */
50823ff40c12SJohn Marino 		size_t ie_len;
50833ff40c12SJohn Marino 
50843ff40c12SJohn Marino 		/**
50853ff40c12SJohn Marino 		 * locally_generated - Whether the frame was locally generated
50863ff40c12SJohn Marino 		 */
50873ff40c12SJohn Marino 		int locally_generated;
50883ff40c12SJohn Marino 	} deauth_info;
50893ff40c12SJohn Marino 
50903ff40c12SJohn Marino 	/**
50916d49e1aeSJan Lentfer 	 * struct michael_mic_failure - Data for EVENT_MICHAEL_MIC_FAILURE
50926d49e1aeSJan Lentfer 	 */
50936d49e1aeSJan Lentfer 	struct michael_mic_failure {
50946d49e1aeSJan Lentfer 		int unicast;
50953ff40c12SJohn Marino 		const u8 *src;
50966d49e1aeSJan Lentfer 	} michael_mic_failure;
50976d49e1aeSJan Lentfer 
50986d49e1aeSJan Lentfer 	/**
50996d49e1aeSJan Lentfer 	 * struct interface_status - Data for EVENT_INTERFACE_STATUS
51006d49e1aeSJan Lentfer 	 */
51016d49e1aeSJan Lentfer 	struct interface_status {
5102*a1157835SDaniel Fojt 		unsigned int ifindex;
51036d49e1aeSJan Lentfer 		char ifname[100];
51046d49e1aeSJan Lentfer 		enum {
51056d49e1aeSJan Lentfer 			EVENT_INTERFACE_ADDED, EVENT_INTERFACE_REMOVED
51066d49e1aeSJan Lentfer 		} ievent;
51076d49e1aeSJan Lentfer 	} interface_status;
51086d49e1aeSJan Lentfer 
51096d49e1aeSJan Lentfer 	/**
51106d49e1aeSJan Lentfer 	 * struct pmkid_candidate - Data for EVENT_PMKID_CANDIDATE
51116d49e1aeSJan Lentfer 	 */
51126d49e1aeSJan Lentfer 	struct pmkid_candidate {
51136d49e1aeSJan Lentfer 		/** BSSID of the PMKID candidate */
51146d49e1aeSJan Lentfer 		u8 bssid[ETH_ALEN];
51156d49e1aeSJan Lentfer 		/** Smaller the index, higher the priority */
51166d49e1aeSJan Lentfer 		int index;
51176d49e1aeSJan Lentfer 		/** Whether RSN IE includes pre-authenticate flag */
51186d49e1aeSJan Lentfer 		int preauth;
51196d49e1aeSJan Lentfer 	} pmkid_candidate;
51206d49e1aeSJan Lentfer 
51216d49e1aeSJan Lentfer 	/**
51223ff40c12SJohn Marino 	 * struct tdls - Data for EVENT_TDLS
51233ff40c12SJohn Marino 	 */
51243ff40c12SJohn Marino 	struct tdls {
51253ff40c12SJohn Marino 		u8 peer[ETH_ALEN];
51263ff40c12SJohn Marino 		enum {
51273ff40c12SJohn Marino 			TDLS_REQUEST_SETUP,
5128*a1157835SDaniel Fojt 			TDLS_REQUEST_TEARDOWN,
5129*a1157835SDaniel Fojt 			TDLS_REQUEST_DISCOVER,
51303ff40c12SJohn Marino 		} oper;
51313ff40c12SJohn Marino 		u16 reason_code; /* for teardown */
51323ff40c12SJohn Marino 	} tdls;
51333ff40c12SJohn Marino 
51343ff40c12SJohn Marino 	/**
51353ff40c12SJohn Marino 	 * struct wnm - Data for EVENT_WNM
51363ff40c12SJohn Marino 	 */
51373ff40c12SJohn Marino 	struct wnm {
51383ff40c12SJohn Marino 		u8 addr[ETH_ALEN];
51393ff40c12SJohn Marino 		enum {
51403ff40c12SJohn Marino 			WNM_OPER_SLEEP,
51413ff40c12SJohn Marino 		} oper;
51423ff40c12SJohn Marino 		enum {
51433ff40c12SJohn Marino 			WNM_SLEEP_ENTER,
51443ff40c12SJohn Marino 			WNM_SLEEP_EXIT
51453ff40c12SJohn Marino 		} sleep_action;
51463ff40c12SJohn Marino 		int sleep_intval;
51473ff40c12SJohn Marino 		u16 reason_code;
51483ff40c12SJohn Marino 		u8 *buf;
51493ff40c12SJohn Marino 		u16 buf_len;
51503ff40c12SJohn Marino 	} wnm;
51513ff40c12SJohn Marino 
51523ff40c12SJohn Marino 	/**
51536d49e1aeSJan Lentfer 	 * struct ft_ies - FT information elements (EVENT_FT_RESPONSE)
51546d49e1aeSJan Lentfer 	 *
51556d49e1aeSJan Lentfer 	 * During FT (IEEE 802.11r) authentication sequence, the driver is
51566d49e1aeSJan Lentfer 	 * expected to use this event to report received FT IEs (MDIE, FTIE,
51576d49e1aeSJan Lentfer 	 * RSN IE, TIE, possible resource request) to the supplicant. The FT
51586d49e1aeSJan Lentfer 	 * IEs for the next message will be delivered through the
51596d49e1aeSJan Lentfer 	 * struct wpa_driver_ops::update_ft_ies() callback.
51606d49e1aeSJan Lentfer 	 */
51616d49e1aeSJan Lentfer 	struct ft_ies {
51626d49e1aeSJan Lentfer 		const u8 *ies;
51636d49e1aeSJan Lentfer 		size_t ies_len;
51646d49e1aeSJan Lentfer 		int ft_action;
51656d49e1aeSJan Lentfer 		u8 target_ap[ETH_ALEN];
51663ff40c12SJohn Marino 		/** Optional IE(s), e.g., WMM TSPEC(s), for RIC-Request */
51673ff40c12SJohn Marino 		const u8 *ric_ies;
51683ff40c12SJohn Marino 		/** Length of ric_ies buffer in octets */
51693ff40c12SJohn Marino 		size_t ric_ies_len;
51706d49e1aeSJan Lentfer 	} ft_ies;
51713ff40c12SJohn Marino 
51723ff40c12SJohn Marino 	/**
51733ff40c12SJohn Marino 	 * struct ibss_rsn_start - Data for EVENT_IBSS_RSN_START
51743ff40c12SJohn Marino 	 */
51753ff40c12SJohn Marino 	struct ibss_rsn_start {
51763ff40c12SJohn Marino 		u8 peer[ETH_ALEN];
51773ff40c12SJohn Marino 	} ibss_rsn_start;
51783ff40c12SJohn Marino 
51793ff40c12SJohn Marino 	/**
51803ff40c12SJohn Marino 	 * struct auth_info - Data for EVENT_AUTH events
51813ff40c12SJohn Marino 	 */
51823ff40c12SJohn Marino 	struct auth_info {
51833ff40c12SJohn Marino 		u8 peer[ETH_ALEN];
51843ff40c12SJohn Marino 		u8 bssid[ETH_ALEN];
51853ff40c12SJohn Marino 		u16 auth_type;
51863ff40c12SJohn Marino 		u16 auth_transaction;
51873ff40c12SJohn Marino 		u16 status_code;
51883ff40c12SJohn Marino 		const u8 *ies;
51893ff40c12SJohn Marino 		size_t ies_len;
51903ff40c12SJohn Marino 	} auth;
51913ff40c12SJohn Marino 
51923ff40c12SJohn Marino 	/**
51933ff40c12SJohn Marino 	 * struct assoc_reject - Data for EVENT_ASSOC_REJECT events
51943ff40c12SJohn Marino 	 */
51953ff40c12SJohn Marino 	struct assoc_reject {
51963ff40c12SJohn Marino 		/**
51973ff40c12SJohn Marino 		 * bssid - BSSID of the AP that rejected association
51983ff40c12SJohn Marino 		 */
51993ff40c12SJohn Marino 		const u8 *bssid;
52003ff40c12SJohn Marino 
52013ff40c12SJohn Marino 		/**
52023ff40c12SJohn Marino 		 * resp_ies - (Re)Association Response IEs
52033ff40c12SJohn Marino 		 *
52043ff40c12SJohn Marino 		 * Optional association data from the driver. This data is not
52053ff40c12SJohn Marino 		 * required WPA, but may be useful for some protocols and as
52063ff40c12SJohn Marino 		 * such, should be reported if this is available to the driver
52073ff40c12SJohn Marino 		 * interface.
52083ff40c12SJohn Marino 		 *
52093ff40c12SJohn Marino 		 * This should start with the first IE (fixed fields before IEs
52103ff40c12SJohn Marino 		 * are not included).
52113ff40c12SJohn Marino 		 */
52123ff40c12SJohn Marino 		const u8 *resp_ies;
52133ff40c12SJohn Marino 
52143ff40c12SJohn Marino 		/**
52153ff40c12SJohn Marino 		 * resp_ies_len - Length of resp_ies in bytes
52163ff40c12SJohn Marino 		 */
52173ff40c12SJohn Marino 		size_t resp_ies_len;
52183ff40c12SJohn Marino 
52193ff40c12SJohn Marino 		/**
52203ff40c12SJohn Marino 		 * status_code - Status Code from (Re)association Response
52213ff40c12SJohn Marino 		 */
52223ff40c12SJohn Marino 		u16 status_code;
5223*a1157835SDaniel Fojt 
5224*a1157835SDaniel Fojt 		/**
5225*a1157835SDaniel Fojt 		 * timed_out - Whether failure is due to timeout (etc.) rather
5226*a1157835SDaniel Fojt 		 * than explicit rejection response from the AP.
5227*a1157835SDaniel Fojt 		 */
5228*a1157835SDaniel Fojt 		int timed_out;
5229*a1157835SDaniel Fojt 
5230*a1157835SDaniel Fojt 		/**
5231*a1157835SDaniel Fojt 		 * timeout_reason - Reason for the timeout
5232*a1157835SDaniel Fojt 		 */
5233*a1157835SDaniel Fojt 		const char *timeout_reason;
5234*a1157835SDaniel Fojt 
5235*a1157835SDaniel Fojt 		/**
5236*a1157835SDaniel Fojt 		 * fils_erp_next_seq_num - The next sequence number to use in
5237*a1157835SDaniel Fojt 		 * FILS ERP messages
5238*a1157835SDaniel Fojt 		 */
5239*a1157835SDaniel Fojt 		u16 fils_erp_next_seq_num;
52403ff40c12SJohn Marino 	} assoc_reject;
52413ff40c12SJohn Marino 
52423ff40c12SJohn Marino 	struct timeout_event {
52433ff40c12SJohn Marino 		u8 addr[ETH_ALEN];
52443ff40c12SJohn Marino 	} timeout_event;
52453ff40c12SJohn Marino 
52463ff40c12SJohn Marino 	/**
52473ff40c12SJohn Marino 	 * struct tx_status - Data for EVENT_TX_STATUS events
52483ff40c12SJohn Marino 	 */
52493ff40c12SJohn Marino 	struct tx_status {
52503ff40c12SJohn Marino 		u16 type;
52513ff40c12SJohn Marino 		u16 stype;
52523ff40c12SJohn Marino 		const u8 *dst;
52533ff40c12SJohn Marino 		const u8 *data;
52543ff40c12SJohn Marino 		size_t data_len;
52553ff40c12SJohn Marino 		int ack;
52563ff40c12SJohn Marino 	} tx_status;
52573ff40c12SJohn Marino 
52583ff40c12SJohn Marino 	/**
52593ff40c12SJohn Marino 	 * struct rx_from_unknown - Data for EVENT_RX_FROM_UNKNOWN events
52603ff40c12SJohn Marino 	 */
52613ff40c12SJohn Marino 	struct rx_from_unknown {
52623ff40c12SJohn Marino 		const u8 *bssid;
52633ff40c12SJohn Marino 		const u8 *addr;
52643ff40c12SJohn Marino 		int wds;
52653ff40c12SJohn Marino 	} rx_from_unknown;
52663ff40c12SJohn Marino 
52673ff40c12SJohn Marino 	/**
52683ff40c12SJohn Marino 	 * struct rx_mgmt - Data for EVENT_RX_MGMT events
52693ff40c12SJohn Marino 	 */
52703ff40c12SJohn Marino 	struct rx_mgmt {
52713ff40c12SJohn Marino 		const u8 *frame;
52723ff40c12SJohn Marino 		size_t frame_len;
52733ff40c12SJohn Marino 		u32 datarate;
52743ff40c12SJohn Marino 
52753ff40c12SJohn Marino 		/**
5276*a1157835SDaniel Fojt 		 * drv_priv - Pointer to store driver private BSS information
5277*a1157835SDaniel Fojt 		 *
5278*a1157835SDaniel Fojt 		 * If not set to NULL, this is used for comparison with
5279*a1157835SDaniel Fojt 		 * hostapd_data->drv_priv to determine which BSS should process
5280*a1157835SDaniel Fojt 		 * the frame.
5281*a1157835SDaniel Fojt 		 */
5282*a1157835SDaniel Fojt 		void *drv_priv;
5283*a1157835SDaniel Fojt 
5284*a1157835SDaniel Fojt 		/**
52853ff40c12SJohn Marino 		 * freq - Frequency (in MHz) on which the frame was received
52863ff40c12SJohn Marino 		 */
52873ff40c12SJohn Marino 		int freq;
52883ff40c12SJohn Marino 
52893ff40c12SJohn Marino 		/**
52903ff40c12SJohn Marino 		 * ssi_signal - Signal strength in dBm (or 0 if not available)
52913ff40c12SJohn Marino 		 */
52923ff40c12SJohn Marino 		int ssi_signal;
52933ff40c12SJohn Marino 	} rx_mgmt;
52943ff40c12SJohn Marino 
52953ff40c12SJohn Marino 	/**
52963ff40c12SJohn Marino 	 * struct remain_on_channel - Data for EVENT_REMAIN_ON_CHANNEL events
52973ff40c12SJohn Marino 	 *
52983ff40c12SJohn Marino 	 * This is also used with EVENT_CANCEL_REMAIN_ON_CHANNEL events.
52993ff40c12SJohn Marino 	 */
53003ff40c12SJohn Marino 	struct remain_on_channel {
53013ff40c12SJohn Marino 		/**
53023ff40c12SJohn Marino 		 * freq - Channel frequency in MHz
53033ff40c12SJohn Marino 		 */
53043ff40c12SJohn Marino 		unsigned int freq;
53053ff40c12SJohn Marino 
53063ff40c12SJohn Marino 		/**
53073ff40c12SJohn Marino 		 * duration - Duration to remain on the channel in milliseconds
53083ff40c12SJohn Marino 		 */
53093ff40c12SJohn Marino 		unsigned int duration;
53103ff40c12SJohn Marino 	} remain_on_channel;
53113ff40c12SJohn Marino 
53123ff40c12SJohn Marino 	/**
53133ff40c12SJohn Marino 	 * struct scan_info - Optional data for EVENT_SCAN_RESULTS events
53143ff40c12SJohn Marino 	 * @aborted: Whether the scan was aborted
53153ff40c12SJohn Marino 	 * @freqs: Scanned frequencies in MHz (%NULL = all channels scanned)
53163ff40c12SJohn Marino 	 * @num_freqs: Number of entries in freqs array
53173ff40c12SJohn Marino 	 * @ssids: Scanned SSIDs (%NULL or zero-length SSID indicates wildcard
53183ff40c12SJohn Marino 	 *	SSID)
53193ff40c12SJohn Marino 	 * @num_ssids: Number of entries in ssids array
5320*a1157835SDaniel Fojt 	 * @external_scan: Whether the scan info is for an external scan
5321*a1157835SDaniel Fojt 	 * @nl_scan_event: 1 if the source of this scan event is a normal scan,
5322*a1157835SDaniel Fojt 	 * 	0 if the source of the scan event is a vendor scan
5323*a1157835SDaniel Fojt 	 * @scan_start_tsf: Time when the scan started in terms of TSF of the
5324*a1157835SDaniel Fojt 	 *	BSS that the interface that requested the scan is connected to
5325*a1157835SDaniel Fojt 	 *	(if available).
5326*a1157835SDaniel Fojt 	 * @scan_start_tsf_bssid: The BSSID according to which %scan_start_tsf
5327*a1157835SDaniel Fojt 	 *	is set.
53283ff40c12SJohn Marino 	 */
53293ff40c12SJohn Marino 	struct scan_info {
53303ff40c12SJohn Marino 		int aborted;
53313ff40c12SJohn Marino 		const int *freqs;
53323ff40c12SJohn Marino 		size_t num_freqs;
53333ff40c12SJohn Marino 		struct wpa_driver_scan_ssid ssids[WPAS_MAX_SCAN_SSIDS];
53343ff40c12SJohn Marino 		size_t num_ssids;
5335*a1157835SDaniel Fojt 		int external_scan;
5336*a1157835SDaniel Fojt 		int nl_scan_event;
5337*a1157835SDaniel Fojt 		u64 scan_start_tsf;
5338*a1157835SDaniel Fojt 		u8 scan_start_tsf_bssid[ETH_ALEN];
53393ff40c12SJohn Marino 	} scan_info;
53403ff40c12SJohn Marino 
53413ff40c12SJohn Marino 	/**
53423ff40c12SJohn Marino 	 * struct rx_probe_req - Data for EVENT_RX_PROBE_REQ events
53433ff40c12SJohn Marino 	 */
53443ff40c12SJohn Marino 	struct rx_probe_req {
53453ff40c12SJohn Marino 		/**
53463ff40c12SJohn Marino 		 * sa - Source address of the received Probe Request frame
53473ff40c12SJohn Marino 		 */
53483ff40c12SJohn Marino 		const u8 *sa;
53493ff40c12SJohn Marino 
53503ff40c12SJohn Marino 		/**
53513ff40c12SJohn Marino 		 * da - Destination address of the received Probe Request frame
53523ff40c12SJohn Marino 		 *	or %NULL if not available
53533ff40c12SJohn Marino 		 */
53543ff40c12SJohn Marino 		const u8 *da;
53553ff40c12SJohn Marino 
53563ff40c12SJohn Marino 		/**
53573ff40c12SJohn Marino 		 * bssid - BSSID of the received Probe Request frame or %NULL
53583ff40c12SJohn Marino 		 *	if not available
53593ff40c12SJohn Marino 		 */
53603ff40c12SJohn Marino 		const u8 *bssid;
53613ff40c12SJohn Marino 
53623ff40c12SJohn Marino 		/**
53633ff40c12SJohn Marino 		 * ie - IEs from the Probe Request body
53643ff40c12SJohn Marino 		 */
53653ff40c12SJohn Marino 		const u8 *ie;
53663ff40c12SJohn Marino 
53673ff40c12SJohn Marino 		/**
53683ff40c12SJohn Marino 		 * ie_len - Length of ie buffer in octets
53693ff40c12SJohn Marino 		 */
53703ff40c12SJohn Marino 		size_t ie_len;
53713ff40c12SJohn Marino 
53723ff40c12SJohn Marino 		/**
53733ff40c12SJohn Marino 		 * signal - signal strength in dBm (or 0 if not available)
53743ff40c12SJohn Marino 		 */
53753ff40c12SJohn Marino 		int ssi_signal;
53763ff40c12SJohn Marino 	} rx_probe_req;
53773ff40c12SJohn Marino 
53783ff40c12SJohn Marino 	/**
53793ff40c12SJohn Marino 	 * struct new_sta - Data for EVENT_NEW_STA events
53803ff40c12SJohn Marino 	 */
53813ff40c12SJohn Marino 	struct new_sta {
53823ff40c12SJohn Marino 		const u8 *addr;
53833ff40c12SJohn Marino 	} new_sta;
53843ff40c12SJohn Marino 
53853ff40c12SJohn Marino 	/**
53863ff40c12SJohn Marino 	 * struct eapol_rx - Data for EVENT_EAPOL_RX events
53873ff40c12SJohn Marino 	 */
53883ff40c12SJohn Marino 	struct eapol_rx {
53893ff40c12SJohn Marino 		const u8 *src;
53903ff40c12SJohn Marino 		const u8 *data;
53913ff40c12SJohn Marino 		size_t data_len;
53923ff40c12SJohn Marino 	} eapol_rx;
53933ff40c12SJohn Marino 
53943ff40c12SJohn Marino 	/**
53953ff40c12SJohn Marino 	 * signal_change - Data for EVENT_SIGNAL_CHANGE events
53963ff40c12SJohn Marino 	 */
53973ff40c12SJohn Marino 	struct wpa_signal_info signal_change;
53983ff40c12SJohn Marino 
53993ff40c12SJohn Marino 	/**
54003ff40c12SJohn Marino 	 * struct best_channel - Data for EVENT_BEST_CHANNEL events
54013ff40c12SJohn Marino 	 * @freq_24: Best 2.4 GHz band channel frequency in MHz
54023ff40c12SJohn Marino 	 * @freq_5: Best 5 GHz band channel frequency in MHz
54033ff40c12SJohn Marino 	 * @freq_overall: Best channel frequency in MHz
54043ff40c12SJohn Marino 	 *
54053ff40c12SJohn Marino 	 * 0 can be used to indicate no preference in either band.
54063ff40c12SJohn Marino 	 */
54073ff40c12SJohn Marino 	struct best_channel {
54083ff40c12SJohn Marino 		int freq_24;
54093ff40c12SJohn Marino 		int freq_5;
54103ff40c12SJohn Marino 		int freq_overall;
54113ff40c12SJohn Marino 	} best_chan;
54123ff40c12SJohn Marino 
54133ff40c12SJohn Marino 	struct unprot_deauth {
54143ff40c12SJohn Marino 		const u8 *sa;
54153ff40c12SJohn Marino 		const u8 *da;
54163ff40c12SJohn Marino 		u16 reason_code;
54173ff40c12SJohn Marino 	} unprot_deauth;
54183ff40c12SJohn Marino 
54193ff40c12SJohn Marino 	struct unprot_disassoc {
54203ff40c12SJohn Marino 		const u8 *sa;
54213ff40c12SJohn Marino 		const u8 *da;
54223ff40c12SJohn Marino 		u16 reason_code;
54233ff40c12SJohn Marino 	} unprot_disassoc;
54243ff40c12SJohn Marino 
54253ff40c12SJohn Marino 	/**
54263ff40c12SJohn Marino 	 * struct low_ack - Data for EVENT_STATION_LOW_ACK events
54273ff40c12SJohn Marino 	 * @addr: station address
5428*a1157835SDaniel Fojt 	 * @num_packets: Number of packets lost (consecutive packets not
5429*a1157835SDaniel Fojt 	 * acknowledged)
54303ff40c12SJohn Marino 	 */
54313ff40c12SJohn Marino 	struct low_ack {
54323ff40c12SJohn Marino 		u8 addr[ETH_ALEN];
5433*a1157835SDaniel Fojt 		u32 num_packets;
54343ff40c12SJohn Marino 	} low_ack;
54353ff40c12SJohn Marino 
54363ff40c12SJohn Marino 	/**
54373ff40c12SJohn Marino 	 * struct ibss_peer_lost - Data for EVENT_IBSS_PEER_LOST
54383ff40c12SJohn Marino 	 */
54393ff40c12SJohn Marino 	struct ibss_peer_lost {
54403ff40c12SJohn Marino 		u8 peer[ETH_ALEN];
54413ff40c12SJohn Marino 	} ibss_peer_lost;
54423ff40c12SJohn Marino 
54433ff40c12SJohn Marino 	/**
54443ff40c12SJohn Marino 	 * struct driver_gtk_rekey - Data for EVENT_DRIVER_GTK_REKEY
54453ff40c12SJohn Marino 	 */
54463ff40c12SJohn Marino 	struct driver_gtk_rekey {
54473ff40c12SJohn Marino 		const u8 *bssid;
54483ff40c12SJohn Marino 		const u8 *replay_ctr;
54493ff40c12SJohn Marino 	} driver_gtk_rekey;
54503ff40c12SJohn Marino 
54513ff40c12SJohn Marino 	/**
54523ff40c12SJohn Marino 	 * struct client_poll - Data for EVENT_DRIVER_CLIENT_POLL_OK events
54533ff40c12SJohn Marino 	 * @addr: station address
54543ff40c12SJohn Marino 	 */
54553ff40c12SJohn Marino 	struct client_poll {
54563ff40c12SJohn Marino 		u8 addr[ETH_ALEN];
54573ff40c12SJohn Marino 	} client_poll;
54583ff40c12SJohn Marino 
54593ff40c12SJohn Marino 	/**
54603ff40c12SJohn Marino 	 * struct eapol_tx_status
54613ff40c12SJohn Marino 	 * @dst: Original destination
54623ff40c12SJohn Marino 	 * @data: Data starting with IEEE 802.1X header (!)
54633ff40c12SJohn Marino 	 * @data_len: Length of data
54643ff40c12SJohn Marino 	 * @ack: Indicates ack or lost frame
54653ff40c12SJohn Marino 	 *
54663ff40c12SJohn Marino 	 * This corresponds to hapd_send_eapol if the frame sent
54673ff40c12SJohn Marino 	 * there isn't just reported as EVENT_TX_STATUS.
54683ff40c12SJohn Marino 	 */
54693ff40c12SJohn Marino 	struct eapol_tx_status {
54703ff40c12SJohn Marino 		const u8 *dst;
54713ff40c12SJohn Marino 		const u8 *data;
54723ff40c12SJohn Marino 		int data_len;
54733ff40c12SJohn Marino 		int ack;
54743ff40c12SJohn Marino 	} eapol_tx_status;
54753ff40c12SJohn Marino 
54763ff40c12SJohn Marino 	/**
54773ff40c12SJohn Marino 	 * struct ch_switch
54783ff40c12SJohn Marino 	 * @freq: Frequency of new channel in MHz
54793ff40c12SJohn Marino 	 * @ht_enabled: Whether this is an HT channel
54803ff40c12SJohn Marino 	 * @ch_offset: Secondary channel offset
54813ff40c12SJohn Marino 	 * @ch_width: Channel width
54823ff40c12SJohn Marino 	 * @cf1: Center frequency 1
54833ff40c12SJohn Marino 	 * @cf2: Center frequency 2
54843ff40c12SJohn Marino 	 */
54853ff40c12SJohn Marino 	struct ch_switch {
54863ff40c12SJohn Marino 		int freq;
54873ff40c12SJohn Marino 		int ht_enabled;
54883ff40c12SJohn Marino 		int ch_offset;
54893ff40c12SJohn Marino 		enum chan_width ch_width;
54903ff40c12SJohn Marino 		int cf1;
54913ff40c12SJohn Marino 		int cf2;
54923ff40c12SJohn Marino 	} ch_switch;
54933ff40c12SJohn Marino 
54943ff40c12SJohn Marino 	/**
54953ff40c12SJohn Marino 	 * struct connect_failed - Data for EVENT_CONNECT_FAILED_REASON
54963ff40c12SJohn Marino 	 * @addr: Remote client address
54973ff40c12SJohn Marino 	 * @code: Reason code for connection failure
54983ff40c12SJohn Marino 	 */
54993ff40c12SJohn Marino 	struct connect_failed_reason {
55003ff40c12SJohn Marino 		u8 addr[ETH_ALEN];
55013ff40c12SJohn Marino 		enum {
55023ff40c12SJohn Marino 			MAX_CLIENT_REACHED,
55033ff40c12SJohn Marino 			BLOCKED_CLIENT
55043ff40c12SJohn Marino 		} code;
55053ff40c12SJohn Marino 	} connect_failed_reason;
55063ff40c12SJohn Marino 
55073ff40c12SJohn Marino 	/**
55083ff40c12SJohn Marino 	 * struct dfs_event - Data for radar detected events
55093ff40c12SJohn Marino 	 * @freq: Frequency of the channel in MHz
55103ff40c12SJohn Marino 	 */
55113ff40c12SJohn Marino 	struct dfs_event {
55123ff40c12SJohn Marino 		int freq;
55133ff40c12SJohn Marino 		int ht_enabled;
55143ff40c12SJohn Marino 		int chan_offset;
55153ff40c12SJohn Marino 		enum chan_width chan_width;
55163ff40c12SJohn Marino 		int cf1;
55173ff40c12SJohn Marino 		int cf2;
55183ff40c12SJohn Marino 	} dfs_event;
55193ff40c12SJohn Marino 
55203ff40c12SJohn Marino 	/**
55213ff40c12SJohn Marino 	 * survey_results - Survey result data for EVENT_SURVEY
55223ff40c12SJohn Marino 	 * @freq_filter: Requested frequency survey filter, 0 if request
55233ff40c12SJohn Marino 	 *	was for all survey data
5524*a1157835SDaniel Fojt 	 * @survey_list: Linked list of survey data (struct freq_survey)
55253ff40c12SJohn Marino 	 */
55263ff40c12SJohn Marino 	struct survey_results {
55273ff40c12SJohn Marino 		unsigned int freq_filter;
55283ff40c12SJohn Marino 		struct dl_list survey_list; /* struct freq_survey */
55293ff40c12SJohn Marino 	} survey_results;
55303ff40c12SJohn Marino 
55313ff40c12SJohn Marino 	/**
55323ff40c12SJohn Marino 	 * channel_list_changed - Data for EVENT_CHANNEL_LIST_CHANGED
55333ff40c12SJohn Marino 	 * @initiator: Initiator of the regulatory change
5534*a1157835SDaniel Fojt 	 * @type: Regulatory change type
5535*a1157835SDaniel Fojt 	 * @alpha2: Country code (or "" if not available)
55363ff40c12SJohn Marino 	 */
55373ff40c12SJohn Marino 	struct channel_list_changed {
55383ff40c12SJohn Marino 		enum reg_change_initiator initiator;
5539*a1157835SDaniel Fojt 		enum reg_type type;
5540*a1157835SDaniel Fojt 		char alpha2[3];
55413ff40c12SJohn Marino 	} channel_list_changed;
55423ff40c12SJohn Marino 
55433ff40c12SJohn Marino 	/**
55443ff40c12SJohn Marino 	 * freq_range - List of frequency ranges
55453ff40c12SJohn Marino 	 *
55463ff40c12SJohn Marino 	 * This is used as the data with EVENT_AVOID_FREQUENCIES.
55473ff40c12SJohn Marino 	 */
55483ff40c12SJohn Marino 	struct wpa_freq_range_list freq_range;
5549*a1157835SDaniel Fojt 
5550*a1157835SDaniel Fojt 	/**
5551*a1157835SDaniel Fojt 	 * struct mesh_peer
5552*a1157835SDaniel Fojt 	 *
5553*a1157835SDaniel Fojt 	 * @peer: Peer address
5554*a1157835SDaniel Fojt 	 * @ies: Beacon IEs
5555*a1157835SDaniel Fojt 	 * @ie_len: Length of @ies
5556*a1157835SDaniel Fojt 	 *
5557*a1157835SDaniel Fojt 	 * Notification of new candidate mesh peer.
5558*a1157835SDaniel Fojt 	 */
5559*a1157835SDaniel Fojt 	struct mesh_peer {
5560*a1157835SDaniel Fojt 		const u8 *peer;
5561*a1157835SDaniel Fojt 		const u8 *ies;
5562*a1157835SDaniel Fojt 		size_t ie_len;
5563*a1157835SDaniel Fojt 	} mesh_peer;
5564*a1157835SDaniel Fojt 
5565*a1157835SDaniel Fojt 	/**
5566*a1157835SDaniel Fojt 	 * struct acs_selected_channels - Data for EVENT_ACS_CHANNEL_SELECTED
5567*a1157835SDaniel Fojt 	 * @pri_channel: Selected primary channel
5568*a1157835SDaniel Fojt 	 * @sec_channel: Selected secondary channel
5569*a1157835SDaniel Fojt 	 * @vht_seg0_center_ch: VHT mode Segment0 center channel
5570*a1157835SDaniel Fojt 	 * @vht_seg1_center_ch: VHT mode Segment1 center channel
5571*a1157835SDaniel Fojt 	 * @ch_width: Selected Channel width by driver. Driver may choose to
5572*a1157835SDaniel Fojt 	 *	change hostapd configured ACS channel width due driver internal
5573*a1157835SDaniel Fojt 	 *	channel restrictions.
5574*a1157835SDaniel Fojt 	 * hw_mode: Selected band (used with hw_mode=any)
5575*a1157835SDaniel Fojt 	 */
5576*a1157835SDaniel Fojt 	struct acs_selected_channels {
5577*a1157835SDaniel Fojt 		u8 pri_channel;
5578*a1157835SDaniel Fojt 		u8 sec_channel;
5579*a1157835SDaniel Fojt 		u8 vht_seg0_center_ch;
5580*a1157835SDaniel Fojt 		u8 vht_seg1_center_ch;
5581*a1157835SDaniel Fojt 		u16 ch_width;
5582*a1157835SDaniel Fojt 		enum hostapd_hw_mode hw_mode;
5583*a1157835SDaniel Fojt 	} acs_selected_channels;
5584*a1157835SDaniel Fojt 
5585*a1157835SDaniel Fojt 	/**
5586*a1157835SDaniel Fojt 	 * struct p2p_lo_stop - Reason code for P2P Listen offload stop event
5587*a1157835SDaniel Fojt 	 * @reason_code: Reason for stopping offload
5588*a1157835SDaniel Fojt 	 *	P2P_LO_STOPPED_REASON_COMPLETE: Listen offload finished as
5589*a1157835SDaniel Fojt 	 *	scheduled.
5590*a1157835SDaniel Fojt 	 *	P2P_LO_STOPPED_REASON_RECV_STOP_CMD: Host requested offload to
5591*a1157835SDaniel Fojt 	 *	be stopped.
5592*a1157835SDaniel Fojt 	 *	P2P_LO_STOPPED_REASON_INVALID_PARAM: Invalid listen offload
5593*a1157835SDaniel Fojt 	 *	parameters.
5594*a1157835SDaniel Fojt 	 *	P2P_LO_STOPPED_REASON_NOT_SUPPORTED: Listen offload not
5595*a1157835SDaniel Fojt 	 *	supported by device.
5596*a1157835SDaniel Fojt 	 */
5597*a1157835SDaniel Fojt 	struct p2p_lo_stop {
5598*a1157835SDaniel Fojt 		enum {
5599*a1157835SDaniel Fojt 			P2P_LO_STOPPED_REASON_COMPLETE = 0,
5600*a1157835SDaniel Fojt 			P2P_LO_STOPPED_REASON_RECV_STOP_CMD,
5601*a1157835SDaniel Fojt 			P2P_LO_STOPPED_REASON_INVALID_PARAM,
5602*a1157835SDaniel Fojt 			P2P_LO_STOPPED_REASON_NOT_SUPPORTED,
5603*a1157835SDaniel Fojt 		} reason_code;
5604*a1157835SDaniel Fojt 	} p2p_lo_stop;
5605*a1157835SDaniel Fojt 
5606*a1157835SDaniel Fojt 	/* For EVENT_EXTERNAL_AUTH */
5607*a1157835SDaniel Fojt 	struct external_auth external_auth;
5608*a1157835SDaniel Fojt 
5609*a1157835SDaniel Fojt 	/**
5610*a1157835SDaniel Fojt 	 * struct sta_opmode - Station's operation mode change event
5611*a1157835SDaniel Fojt 	 * @addr: The station MAC address
5612*a1157835SDaniel Fojt 	 * @smps_mode: SMPS mode of the station
5613*a1157835SDaniel Fojt 	 * @chan_width: Channel width of the station
5614*a1157835SDaniel Fojt 	 * @rx_nss: RX_NSS of the station
5615*a1157835SDaniel Fojt 	 *
5616*a1157835SDaniel Fojt 	 * This is used as data with EVENT_STATION_OPMODE_CHANGED.
5617*a1157835SDaniel Fojt 	 */
5618*a1157835SDaniel Fojt 	struct sta_opmode {
5619*a1157835SDaniel Fojt 		const u8 *addr;
5620*a1157835SDaniel Fojt 		enum smps_mode smps_mode;
5621*a1157835SDaniel Fojt 		enum chan_width chan_width;
5622*a1157835SDaniel Fojt 		u8 rx_nss;
5623*a1157835SDaniel Fojt 	} sta_opmode;
5624*a1157835SDaniel Fojt 
5625*a1157835SDaniel Fojt 	/**
5626*a1157835SDaniel Fojt 	 * struct wds_sta_interface - Data for EVENT_WDS_STA_INTERFACE_STATUS.
5627*a1157835SDaniel Fojt 	 */
5628*a1157835SDaniel Fojt 	struct wds_sta_interface {
5629*a1157835SDaniel Fojt 		const u8 *sta_addr;
5630*a1157835SDaniel Fojt 		const char *ifname;
5631*a1157835SDaniel Fojt 		enum {
5632*a1157835SDaniel Fojt 			INTERFACE_ADDED,
5633*a1157835SDaniel Fojt 			INTERFACE_REMOVED
5634*a1157835SDaniel Fojt 		} istatus;
5635*a1157835SDaniel Fojt 	} wds_sta_interface;
5636*a1157835SDaniel Fojt 
5637*a1157835SDaniel Fojt 	/**
5638*a1157835SDaniel Fojt 	 * struct update_dh - Data for EVENT_UPDATE_DH
5639*a1157835SDaniel Fojt 	 */
5640*a1157835SDaniel Fojt 	struct update_dh {
5641*a1157835SDaniel Fojt 		const u8 *peer;
5642*a1157835SDaniel Fojt 		const u8 *ie;
5643*a1157835SDaniel Fojt 		size_t ie_len;
5644*a1157835SDaniel Fojt 	} update_dh;
56456d49e1aeSJan Lentfer };
56466d49e1aeSJan Lentfer 
56476d49e1aeSJan Lentfer /**
56486d49e1aeSJan Lentfer  * wpa_supplicant_event - Report a driver event for wpa_supplicant
56496d49e1aeSJan Lentfer  * @ctx: Context pointer (wpa_s); this is the ctx variable registered
56506d49e1aeSJan Lentfer  *	with struct wpa_driver_ops::init()
56516d49e1aeSJan Lentfer  * @event: event type (defined above)
56526d49e1aeSJan Lentfer  * @data: possible extra data for the event
56536d49e1aeSJan Lentfer  *
56546d49e1aeSJan Lentfer  * Driver wrapper code should call this function whenever an event is received
56556d49e1aeSJan Lentfer  * from the driver.
56566d49e1aeSJan Lentfer  */
56573ff40c12SJohn Marino void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
56586d49e1aeSJan Lentfer 			  union wpa_event_data *data);
56596d49e1aeSJan Lentfer 
5660*a1157835SDaniel Fojt /**
5661*a1157835SDaniel Fojt  * wpa_supplicant_event_global - Report a driver event for wpa_supplicant
5662*a1157835SDaniel Fojt  * @ctx: Context pointer (wpa_s); this is the ctx variable registered
5663*a1157835SDaniel Fojt  *	with struct wpa_driver_ops::init()
5664*a1157835SDaniel Fojt  * @event: event type (defined above)
5665*a1157835SDaniel Fojt  * @data: possible extra data for the event
5666*a1157835SDaniel Fojt  *
5667*a1157835SDaniel Fojt  * Same as wpa_supplicant_event(), but we search for the interface in
5668*a1157835SDaniel Fojt  * wpa_global.
5669*a1157835SDaniel Fojt  */
5670*a1157835SDaniel Fojt void wpa_supplicant_event_global(void *ctx, enum wpa_event_type event,
5671*a1157835SDaniel Fojt 				 union wpa_event_data *data);
56723ff40c12SJohn Marino 
56733ff40c12SJohn Marino /*
56743ff40c12SJohn Marino  * The following inline functions are provided for convenience to simplify
56753ff40c12SJohn Marino  * event indication for some of the common events.
56766d49e1aeSJan Lentfer  */
56776d49e1aeSJan Lentfer 
drv_event_assoc(void * ctx,const u8 * addr,const u8 * ie,size_t ielen,int reassoc)56783ff40c12SJohn Marino static inline void drv_event_assoc(void *ctx, const u8 *addr, const u8 *ie,
56793ff40c12SJohn Marino 				   size_t ielen, int reassoc)
56803ff40c12SJohn Marino {
56813ff40c12SJohn Marino 	union wpa_event_data event;
56823ff40c12SJohn Marino 	os_memset(&event, 0, sizeof(event));
56833ff40c12SJohn Marino 	event.assoc_info.reassoc = reassoc;
56843ff40c12SJohn Marino 	event.assoc_info.req_ies = ie;
56853ff40c12SJohn Marino 	event.assoc_info.req_ies_len = ielen;
56863ff40c12SJohn Marino 	event.assoc_info.addr = addr;
56873ff40c12SJohn Marino 	wpa_supplicant_event(ctx, EVENT_ASSOC, &event);
56883ff40c12SJohn Marino }
56896d49e1aeSJan Lentfer 
drv_event_disassoc(void * ctx,const u8 * addr)56903ff40c12SJohn Marino static inline void drv_event_disassoc(void *ctx, const u8 *addr)
56913ff40c12SJohn Marino {
56923ff40c12SJohn Marino 	union wpa_event_data event;
56933ff40c12SJohn Marino 	os_memset(&event, 0, sizeof(event));
56943ff40c12SJohn Marino 	event.disassoc_info.addr = addr;
56953ff40c12SJohn Marino 	wpa_supplicant_event(ctx, EVENT_DISASSOC, &event);
56963ff40c12SJohn Marino }
56973ff40c12SJohn Marino 
drv_event_eapol_rx(void * ctx,const u8 * src,const u8 * data,size_t data_len)56983ff40c12SJohn Marino static inline void drv_event_eapol_rx(void *ctx, const u8 *src, const u8 *data,
56993ff40c12SJohn Marino 				      size_t data_len)
57003ff40c12SJohn Marino {
57013ff40c12SJohn Marino 	union wpa_event_data event;
57023ff40c12SJohn Marino 	os_memset(&event, 0, sizeof(event));
57033ff40c12SJohn Marino 	event.eapol_rx.src = src;
57043ff40c12SJohn Marino 	event.eapol_rx.data = data;
57053ff40c12SJohn Marino 	event.eapol_rx.data_len = data_len;
57063ff40c12SJohn Marino 	wpa_supplicant_event(ctx, EVENT_EAPOL_RX, &event);
57073ff40c12SJohn Marino }
57083ff40c12SJohn Marino 
57093ff40c12SJohn Marino /* driver_common.c */
57106d49e1aeSJan Lentfer void wpa_scan_results_free(struct wpa_scan_results *res);
57113ff40c12SJohn Marino 
57123ff40c12SJohn Marino /* Convert wpa_event_type to a string for logging */
57133ff40c12SJohn Marino const char * event_to_string(enum wpa_event_type event);
57143ff40c12SJohn Marino 
5715*a1157835SDaniel Fojt /* Convert chan_width to a string for logging and control interfaces */
5716*a1157835SDaniel Fojt const char * channel_width_to_string(enum chan_width width);
5717*a1157835SDaniel Fojt 
5718*a1157835SDaniel Fojt int channel_width_to_int(enum chan_width width);
5719*a1157835SDaniel Fojt 
5720*a1157835SDaniel Fojt int ht_supported(const struct hostapd_hw_modes *mode);
5721*a1157835SDaniel Fojt int vht_supported(const struct hostapd_hw_modes *mode);
5722*a1157835SDaniel Fojt 
5723*a1157835SDaniel Fojt struct wowlan_triggers *
5724*a1157835SDaniel Fojt wpa_get_wowlan_triggers(const char *wowlan_triggers,
5725*a1157835SDaniel Fojt 			const struct wpa_driver_capa *capa);
5726*a1157835SDaniel Fojt /* Convert driver flag to string */
5727*a1157835SDaniel Fojt const char * driver_flag_to_string(u64 flag);
5728*a1157835SDaniel Fojt 
57293ff40c12SJohn Marino /* NULL terminated array of linked in driver wrappers */
5730*a1157835SDaniel Fojt extern const struct wpa_driver_ops *const wpa_drivers[];
5731*a1157835SDaniel Fojt 
5732*a1157835SDaniel Fojt 
5733*a1157835SDaniel Fojt /* Available drivers */
5734*a1157835SDaniel Fojt 
5735*a1157835SDaniel Fojt #ifdef CONFIG_DRIVER_WEXT
5736*a1157835SDaniel Fojt extern const struct wpa_driver_ops wpa_driver_wext_ops; /* driver_wext.c */
5737*a1157835SDaniel Fojt #endif /* CONFIG_DRIVER_WEXT */
5738*a1157835SDaniel Fojt #ifdef CONFIG_DRIVER_NL80211
5739*a1157835SDaniel Fojt /* driver_nl80211.c */
5740*a1157835SDaniel Fojt extern const struct wpa_driver_ops wpa_driver_nl80211_ops;
5741*a1157835SDaniel Fojt #endif /* CONFIG_DRIVER_NL80211 */
5742*a1157835SDaniel Fojt #ifdef CONFIG_DRIVER_HOSTAP
5743*a1157835SDaniel Fojt extern const struct wpa_driver_ops wpa_driver_hostap_ops; /* driver_hostap.c */
5744*a1157835SDaniel Fojt #endif /* CONFIG_DRIVER_HOSTAP */
5745*a1157835SDaniel Fojt #ifdef CONFIG_DRIVER_BSD
5746*a1157835SDaniel Fojt extern const struct wpa_driver_ops wpa_driver_bsd_ops; /* driver_bsd.c */
5747*a1157835SDaniel Fojt #endif /* CONFIG_DRIVER_BSD */
5748*a1157835SDaniel Fojt #ifdef CONFIG_DRIVER_OPENBSD
5749*a1157835SDaniel Fojt /* driver_openbsd.c */
5750*a1157835SDaniel Fojt extern const struct wpa_driver_ops wpa_driver_openbsd_ops;
5751*a1157835SDaniel Fojt #endif /* CONFIG_DRIVER_OPENBSD */
5752*a1157835SDaniel Fojt #ifdef CONFIG_DRIVER_NDIS
5753*a1157835SDaniel Fojt extern struct wpa_driver_ops wpa_driver_ndis_ops; /* driver_ndis.c */
5754*a1157835SDaniel Fojt #endif /* CONFIG_DRIVER_NDIS */
5755*a1157835SDaniel Fojt #ifdef CONFIG_DRIVER_WIRED
5756*a1157835SDaniel Fojt extern const struct wpa_driver_ops wpa_driver_wired_ops; /* driver_wired.c */
5757*a1157835SDaniel Fojt #endif /* CONFIG_DRIVER_WIRED */
5758*a1157835SDaniel Fojt #ifdef CONFIG_DRIVER_MACSEC_QCA
5759*a1157835SDaniel Fojt /* driver_macsec_qca.c */
5760*a1157835SDaniel Fojt extern const struct wpa_driver_ops wpa_driver_macsec_qca_ops;
5761*a1157835SDaniel Fojt #endif /* CONFIG_DRIVER_MACSEC_QCA */
5762*a1157835SDaniel Fojt #ifdef CONFIG_DRIVER_MACSEC_LINUX
5763*a1157835SDaniel Fojt /* driver_macsec_linux.c */
5764*a1157835SDaniel Fojt extern const struct wpa_driver_ops wpa_driver_macsec_linux_ops;
5765*a1157835SDaniel Fojt #endif /* CONFIG_DRIVER_MACSEC_LINUX */
5766*a1157835SDaniel Fojt #ifdef CONFIG_DRIVER_ROBOSWITCH
5767*a1157835SDaniel Fojt /* driver_roboswitch.c */
5768*a1157835SDaniel Fojt extern const struct wpa_driver_ops wpa_driver_roboswitch_ops;
5769*a1157835SDaniel Fojt #endif /* CONFIG_DRIVER_ROBOSWITCH */
5770*a1157835SDaniel Fojt #ifdef CONFIG_DRIVER_ATHEROS
5771*a1157835SDaniel Fojt /* driver_atheros.c */
5772*a1157835SDaniel Fojt extern const struct wpa_driver_ops wpa_driver_atheros_ops;
5773*a1157835SDaniel Fojt #endif /* CONFIG_DRIVER_ATHEROS */
5774*a1157835SDaniel Fojt #ifdef CONFIG_DRIVER_NONE
5775*a1157835SDaniel Fojt extern const struct wpa_driver_ops wpa_driver_none_ops; /* driver_none.c */
5776*a1157835SDaniel Fojt #endif /* CONFIG_DRIVER_NONE */
57776d49e1aeSJan Lentfer 
57786d49e1aeSJan Lentfer #endif /* DRIVER_H */
5779