xref: /freebsd/contrib/wpa/src/common/qca-vendor.h (revision 190cef3d52236565eb22e18b33e9e865ec634aa3)
1 /*
2  * Qualcomm Atheros OUI and vendor specific assignments
3  * Copyright (c) 2014-2015, Qualcomm Atheros, Inc.
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  */
8 
9 #ifndef QCA_VENDOR_H
10 #define QCA_VENDOR_H
11 
12 /*
13  * This file is a registry of identifier assignments from the Qualcomm Atheros
14  * OUI 00:13:74 for purposes other than MAC address assignment. New identifiers
15  * can be assigned through normal review process for changes to the upstream
16  * hostap.git repository.
17  */
18 
19 #define OUI_QCA 0x001374
20 
21 /**
22  * enum qca_radiotap_vendor_ids - QCA radiotap vendor namespace IDs
23  */
24 enum qca_radiotap_vendor_ids {
25 	QCA_RADIOTAP_VID_WLANTEST = 0,
26 };
27 
28 /**
29  * enum qca_nl80211_vendor_subcmds - QCA nl80211 vendor command identifiers
30  *
31  * @QCA_NL80211_VENDOR_SUBCMD_UNSPEC: Reserved value 0
32  *
33  * @QCA_NL80211_VENDOR_SUBCMD_TEST: Test command/event
34  *
35  * @QCA_NL80211_VENDOR_SUBCMD_ROAMING: Set roaming policy for drivers that use
36  *	internal BSS-selection. This command uses
37  *	@QCA_WLAN_VENDOR_ATTR_ROAMING_POLICY to specify the new roaming policy
38  *	for the current connection (i.e., changes policy set by the nl80211
39  *	Connect command). @QCA_WLAN_VENDOR_ATTR_MAC_ADDR may optionally be
40  *	included to indicate which BSS to use in case roaming is disabled.
41  *
42  * @QCA_NL80211_VENDOR_SUBCMD_AVOID_FREQUENCY: Recommendation of frequency
43  *	ranges to avoid to reduce issues due to interference or internal
44  *	co-existence information in the driver. The event data structure is
45  *	defined in struct qca_avoid_freq_list.
46  *
47  * @QCA_NL80211_VENDOR_SUBCMD_DFS_CAPABILITY: Command to check driver support
48  *	for DFS offloading.
49  *
50  * @QCA_NL80211_VENDOR_SUBCMD_NAN: NAN command/event which is used to pass
51  *	NAN Request/Response and NAN Indication messages. These messages are
52  *	interpreted between the framework and the firmware component.
53  *
54  * @QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_SET_KEY: Set key operation that can be
55  *	used to configure PMK to the driver even when not connected. This can
56  *	be used to request offloading of key management operations. Only used
57  *	if device supports QCA_WLAN_VENDOR_FEATURE_KEY_MGMT_OFFLOAD.
58  *
59  * @QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH: An extended version of
60  *	NL80211_CMD_ROAM event with optional attributes including information
61  *	from offloaded key management operation. Uses
62  *	enum qca_wlan_vendor_attr_roam_auth attributes. Only used
63  *	if device supports QCA_WLAN_VENDOR_FEATURE_KEY_MGMT_OFFLOAD.
64  *
65  * @QCA_NL80211_VENDOR_SUBCMD_DO_ACS: ACS command/event which is used to
66  *	invoke the ACS function in device and pass selected channels to
67  *	hostapd.
68  *
69  * @QCA_NL80211_VENDOR_SUBCMD_GET_FEATURES: Command to get the features
70  *	supported by the driver. enum qca_wlan_vendor_features defines
71  *	the possible features.
72  *
73  * @QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_STARTED: Event used by driver,
74  *	which supports DFS offloading, to indicate a channel availability check
75  *	start.
76  *
77  * @QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_FINISHED: Event used by driver,
78  *	which supports DFS offloading, to indicate a channel availability check
79  *	completion.
80  *
81  * @QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_ABORTED: Event used by driver,
82  *	which supports DFS offloading, to indicate that the channel availability
83  *	check aborted, no change to the channel status.
84  *
85  * @QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_NOP_FINISHED: Event used by
86  *	driver, which supports DFS offloading, to indicate that the
87  *	Non-Occupancy Period for this channel is over, channel becomes usable.
88  *
89  * @QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_RADAR_DETECTED: Event used by driver,
90  *	which supports DFS offloading, to indicate a radar pattern has been
91  *	detected. The channel is now unusable.
92  *
93  * @QCA_NL80211_VENDOR_SUBCMD_P2P_LISTEN_OFFLOAD_START: Command used to
94  *	start the P2P Listen offload function in device and pass the listen
95  *	channel, period, interval, count, device types, and vendor specific
96  *	information elements to the device driver and firmware.
97  *	Uses the attributes defines in
98  *	enum qca_wlan_vendor_attr_p2p_listen_offload.
99  *
100  * @QCA_NL80211_VENDOR_SUBCMD_P2P_LISTEN_OFFLOAD_STOP: Command/event used to
101  *	indicate stop request/response of the P2P Listen offload function in
102  *	device. As an event, it indicates either the feature stopped after it
103  *	was already running or feature has actually failed to start. Uses the
104  *	attributes defines in enum qca_wlan_vendor_attr_p2p_listen_offload.
105  *
106  * @QCA_NL80211_VENDOR_SUBCMD_SAP_CONDITIONAL_CHAN_SWITCH: After AP starts
107  *	beaconing, this sub command provides the driver, the frequencies on the
108  *	5 GHz band to check for any radar activity. Driver selects one channel
109  *	from this priority list provided through
110  *	@QCA_WLAN_VENDOR_ATTR_SAP_CONDITIONAL_CHAN_SWITCH_FREQ_LIST and starts
111  *	to check for radar activity on it. If no radar activity is detected
112  *	during the channel availability check period, driver internally switches
113  *	to the selected frequency of operation. If the frequency is zero, driver
114  *	internally selects a channel. The status of this conditional switch is
115  *	indicated through an event using the same sub command through
116  *	@QCA_WLAN_VENDOR_ATTR_SAP_CONDITIONAL_CHAN_SWITCH_STATUS. Attributes are
117  *	listed in qca_wlan_vendor_attr_sap_conditional_chan_switch.
118  *
119  * @QCA_NL80211_VENDOR_SUBCMD_GPIO_CONFIG_COMMAND: Set GPIO pins. This uses the
120  *	attributes defined in enum qca_wlan_gpio_attr.
121  *
122  * @QCA_NL80211_VENDOR_SUBCMD_GET_HW_CAPABILITY: Fetch hardware capabilities.
123  *	This uses @QCA_WLAN_VENDOR_ATTR_GET_HW_CAPABILITY to indicate which
124  *	capabilities are to be fetched and other
125  *	enum qca_wlan_vendor_attr_get_hw_capability attributes to return the
126  *	requested capabilities.
127  *
128  * @QCA_NL80211_VENDOR_SUBCMD_LL_STATS_EXT: Link layer statistics extension.
129  *	enum qca_wlan_vendor_attr_ll_stats_ext attributes are used with this
130  *	command and event.
131  *
132  * @QCA_NL80211_VENDOR_SUBCMD_LOC_GET_CAPA: Get capabilities for
133  *	indoor location features. Capabilities are reported in
134  *	QCA_WLAN_VENDOR_ATTR_LOC_CAPA.
135  *
136  * @QCA_NL80211_VENDOR_SUBCMD_FTM_START_SESSION: Start an FTM
137  *	(fine timing measurement) session with one or more peers.
138  *	Specify Session cookie in QCA_WLAN_VENDOR_ATTR_FTM_SESSION_COOKIE and
139  *	peer information in QCA_WLAN_VENDOR_ATTR_FTM_MEAS_PEERS.
140  *	On success, 0 or more QCA_NL80211_VENDOR_SUBCMD_FTM_MEAS_RESULT
141  *	events will be reported, followed by
142  *	QCA_NL80211_VENDOR_SUBCMD_FTM_SESSION_DONE event to indicate
143  *	end of session.
144  *	Refer to IEEE P802.11-REVmc/D7.0, 11.24.6
145  *
146  * @QCA_NL80211_VENDOR_SUBCMD_FTM_ABORT_SESSION: Abort a running session.
147  *	A QCA_NL80211_VENDOR_SUBCMD_FTM_SESSION_DONE will be reported with
148  *	status code indicating session was aborted.
149  *
150  * @QCA_NL80211_VENDOR_SUBCMD_FTM_MEAS_RESULT: Event with measurement
151  *	results for one peer. Results are reported in
152  *	QCA_WLAN_VENDOR_ATTR_FTM_MEAS_PEER_RESULTS.
153  *
154  * @QCA_NL80211_VENDOR_SUBCMD_FTM_SESSION_DONE: Event triggered when
155  *	FTM session is finished, either successfully or aborted by
156  *	request.
157  *
158  * @QCA_NL80211_VENDOR_SUBCMD_FTM_CFG_RESPONDER: Configure FTM responder
159  *	mode. QCA_WLAN_VENDOR_ATTR_FTM_RESPONDER_ENABLE specifies whether
160  *	to enable or disable the responder. LCI/LCR reports can be
161  *	configured with QCA_WLAN_VENDOR_ATTR_FTM_LCI and
162  *	QCA_WLAN_VENDOR_ATTR_FTM_LCR. Can be called multiple
163  *	times to update the LCI/LCR reports.
164  *
165  * @QCA_NL80211_VENDOR_SUBCMD_AOA_MEAS: Perform a standalone AOA (angle of
166  *	arrival) measurement with a single peer. Specify peer MAC address in
167  *	QCA_WLAN_VENDOR_ATTR_MAC_ADDR and measurement type in
168  *	QCA_WLAN_VENDOR_ATTR_AOA_TYPE. Measurement result is reported in
169  *	QCA_NL80211_VENDOR_SUBCMD_AOA_MEAS_RESULT event.
170  *
171  * @QCA_NL80211_VENDOR_SUBCMD_AOA_ABORT_MEAS: Abort an AOA measurement. Specify
172  *	peer MAC address in QCA_WLAN_VENDOR_ATTR_MAC_ADDR.
173  *
174  * @QCA_NL80211_VENDOR_SUBCMD_AOA_MEAS_RESULT: Event that reports
175  *	the AOA measurement result.
176  *	Peer MAC address reported in QCA_WLAN_VENDOR_ATTR_MAC_ADDR.
177  *	success/failure status is reported in
178  *	QCA_WLAN_VENDOR_ATTR_LOC_SESSION_STATUS.
179  *	Measurement data is reported in QCA_WLAN_VENDOR_ATTR_AOA_MEAS_RESULT.
180  *	The antenna array(s) used in the measurement are reported in
181  *	QCA_WLAN_VENDOR_ATTR_LOC_ANTENNA_ARRAY_MASK.
182  *
183  * @QCA_NL80211_VENDOR_SUBCMD_ENCRYPTION_TEST: Encrypt/decrypt the given
184  *	data as per the given parameters.
185  *
186  * @QCA_NL80211_VENDOR_SUBCMD_GET_CHAIN_RSSI: Get antenna RSSI value for a
187  *	specific chain.
188  */
189 enum qca_nl80211_vendor_subcmds {
190 	QCA_NL80211_VENDOR_SUBCMD_UNSPEC = 0,
191 	QCA_NL80211_VENDOR_SUBCMD_TEST = 1,
192 	/* subcmds 2..8 not yet allocated */
193 	QCA_NL80211_VENDOR_SUBCMD_ROAMING = 9,
194 	QCA_NL80211_VENDOR_SUBCMD_AVOID_FREQUENCY = 10,
195 	QCA_NL80211_VENDOR_SUBCMD_DFS_CAPABILITY =  11,
196 	QCA_NL80211_VENDOR_SUBCMD_NAN =  12,
197 	QCA_NL80211_VENDOR_SUBMCD_STATS_EXT = 13,
198 	QCA_NL80211_VENDOR_SUBCMD_LL_STATS_SET = 14,
199 	QCA_NL80211_VENDOR_SUBCMD_LL_STATS_GET = 15,
200 	QCA_NL80211_VENDOR_SUBCMD_LL_STATS_CLR = 16,
201 	QCA_NL80211_VENDOR_SUBCMD_LL_STATS_RADIO_RESULTS = 17,
202 	QCA_NL80211_VENDOR_SUBCMD_LL_STATS_IFACE_RESULTS = 18,
203 	QCA_NL80211_VENDOR_SUBCMD_LL_STATS_PEERS_RESULTS = 19,
204 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_START = 20,
205 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_STOP = 21,
206 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_GET_VALID_CHANNELS = 22,
207 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_GET_CAPABILITIES = 23,
208 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_GET_CACHED_RESULTS = 24,
209 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_SCAN_RESULTS_AVAILABLE = 25,
210 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_FULL_SCAN_RESULT = 26,
211 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_SCAN_EVENT = 27,
212 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_HOTLIST_AP_FOUND = 28,
213 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_SET_BSSID_HOTLIST = 29,
214 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_RESET_BSSID_HOTLIST = 30,
215 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_SIGNIFICANT_CHANGE = 31,
216 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_SET_SIGNIFICANT_CHANGE = 32,
217 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_RESET_SIGNIFICANT_CHANGE = 33,
218 	QCA_NL80211_VENDOR_SUBCMD_TDLS_ENABLE = 34,
219 	QCA_NL80211_VENDOR_SUBCMD_TDLS_DISABLE = 35,
220 	QCA_NL80211_VENDOR_SUBCMD_TDLS_GET_STATUS = 36,
221 	QCA_NL80211_VENDOR_SUBCMD_TDLS_STATE = 37,
222 	QCA_NL80211_VENDOR_SUBCMD_GET_SUPPORTED_FEATURES = 38,
223 	QCA_NL80211_VENDOR_SUBCMD_SCANNING_MAC_OUI = 39,
224 	QCA_NL80211_VENDOR_SUBCMD_NO_DFS_FLAG = 40,
225 	QCA_NL80211_VENDOR_SUBCMD_GSCAN_HOTLIST_AP_LOST = 41,
226 	QCA_NL80211_VENDOR_SUBCMD_GET_CONCURRENCY_MATRIX = 42,
227 	/* 43..49 - reserved for QCA */
228 	QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_SET_KEY = 50,
229 	QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH = 51,
230 	QCA_NL80211_VENDOR_SUBCMD_APFIND = 52,
231 	/* 53 - reserved - was used by QCA, but not in use anymore */
232 	QCA_NL80211_VENDOR_SUBCMD_DO_ACS = 54,
233 	QCA_NL80211_VENDOR_SUBCMD_GET_FEATURES = 55,
234 	QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_STARTED = 56,
235 	QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_FINISHED = 57,
236 	QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_ABORTED = 58,
237 	QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_CAC_NOP_FINISHED = 59,
238 	QCA_NL80211_VENDOR_SUBCMD_DFS_OFFLOAD_RADAR_DETECTED = 60,
239 	/* 61-73 - reserved for QCA */
240 	/* Wi-Fi configuration subcommands */
241 	QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION = 74,
242 	QCA_NL80211_VENDOR_SUBCMD_GET_WIFI_CONFIGURATION = 75,
243 	/* 76-90 - reserved for QCA */
244 	QCA_NL80211_VENDOR_SUBCMD_DATA_OFFLOAD = 91,
245 	QCA_NL80211_VENDOR_SUBCMD_OCB_SET_CONFIG = 92,
246 	QCA_NL80211_VENDOR_SUBCMD_OCB_SET_UTC_TIME = 93,
247 	QCA_NL80211_VENDOR_SUBCMD_OCB_START_TIMING_ADVERT = 94,
248 	QCA_NL80211_VENDOR_SUBCMD_OCB_STOP_TIMING_ADVERT = 95,
249 	QCA_NL80211_VENDOR_SUBCMD_OCB_GET_TSF_TIMER = 96,
250 	QCA_NL80211_VENDOR_SUBCMD_DCC_GET_STATS = 97,
251 	QCA_NL80211_VENDOR_SUBCMD_DCC_CLEAR_STATS = 98,
252 	QCA_NL80211_VENDOR_SUBCMD_DCC_UPDATE_NDL = 99,
253 	QCA_NL80211_VENDOR_SUBCMD_DCC_STATS_EVENT = 100,
254 	QCA_NL80211_VENDOR_SUBCMD_LINK_PROPERTIES = 101,
255 	QCA_NL80211_VENDOR_SUBCMD_GW_PARAM_CONFIG = 102,
256 	QCA_NL80211_VENDOR_SUBCMD_GET_PREFERRED_FREQ_LIST = 103,
257 	QCA_NL80211_VENDOR_SUBCMD_SET_PROBABLE_OPER_CHANNEL = 104,
258 	QCA_NL80211_VENDOR_SUBCMD_SETBAND = 105,
259 	QCA_NL80211_VENDOR_SUBCMD_TRIGGER_SCAN = 106,
260 	QCA_NL80211_VENDOR_SUBCMD_SCAN_DONE = 107,
261 	QCA_NL80211_VENDOR_SUBCMD_OTA_TEST = 108,
262 	QCA_NL80211_VENDOR_SUBCMD_SET_TXPOWER_SCALE = 109,
263 	/* 110..114 - reserved for QCA */
264 	QCA_NL80211_VENDOR_SUBCMD_SET_TXPOWER_DECR_DB = 115,
265 	/* 116..117 - reserved for QCA */
266 	QCA_NL80211_VENDOR_SUBCMD_SET_SAP_CONFIG = 118,
267 	QCA_NL80211_VENDOR_SUBCMD_TSF = 119,
268 	QCA_NL80211_VENDOR_SUBCMD_WISA = 120,
269 	/* 121 - reserved for QCA */
270 	QCA_NL80211_VENDOR_SUBCMD_P2P_LISTEN_OFFLOAD_START = 122,
271 	QCA_NL80211_VENDOR_SUBCMD_P2P_LISTEN_OFFLOAD_STOP = 123,
272 	QCA_NL80211_VENDOR_SUBCMD_SAP_CONDITIONAL_CHAN_SWITCH = 124,
273 	QCA_NL80211_VENDOR_SUBCMD_GPIO_CONFIG_COMMAND = 125,
274 	QCA_NL80211_VENDOR_SUBCMD_GET_HW_CAPABILITY = 126,
275 	QCA_NL80211_VENDOR_SUBCMD_LL_STATS_EXT = 127,
276 	/* FTM/indoor location subcommands */
277 	QCA_NL80211_VENDOR_SUBCMD_LOC_GET_CAPA = 128,
278 	QCA_NL80211_VENDOR_SUBCMD_FTM_START_SESSION = 129,
279 	QCA_NL80211_VENDOR_SUBCMD_FTM_ABORT_SESSION = 130,
280 	QCA_NL80211_VENDOR_SUBCMD_FTM_MEAS_RESULT = 131,
281 	QCA_NL80211_VENDOR_SUBCMD_FTM_SESSION_DONE = 132,
282 	QCA_NL80211_VENDOR_SUBCMD_FTM_CFG_RESPONDER = 133,
283 	QCA_NL80211_VENDOR_SUBCMD_AOA_MEAS = 134,
284 	QCA_NL80211_VENDOR_SUBCMD_AOA_ABORT_MEAS = 135,
285 	QCA_NL80211_VENDOR_SUBCMD_AOA_MEAS_RESULT = 136,
286 	QCA_NL80211_VENDOR_SUBCMD_ENCRYPTION_TEST = 137,
287 	QCA_NL80211_VENDOR_SUBCMD_GET_CHAIN_RSSI = 138,
288 };
289 
290 
291 enum qca_wlan_vendor_attr {
292 	QCA_WLAN_VENDOR_ATTR_INVALID = 0,
293 	/* used by QCA_NL80211_VENDOR_SUBCMD_DFS_CAPABILITY */
294 	QCA_WLAN_VENDOR_ATTR_DFS     = 1,
295 	/* used by QCA_NL80211_VENDOR_SUBCMD_NAN */
296 	QCA_WLAN_VENDOR_ATTR_NAN     = 2,
297 	/* used by QCA_NL80211_VENDOR_SUBCMD_STATS_EXT */
298 	QCA_WLAN_VENDOR_ATTR_STATS_EXT     = 3,
299 	/* used by QCA_NL80211_VENDOR_SUBCMD_STATS_EXT */
300 	QCA_WLAN_VENDOR_ATTR_IFINDEX     = 4,
301 	/* used by QCA_NL80211_VENDOR_SUBCMD_ROAMING, u32 with values defined
302 	 * by enum qca_roaming_policy. */
303 	QCA_WLAN_VENDOR_ATTR_ROAMING_POLICY = 5,
304 	QCA_WLAN_VENDOR_ATTR_MAC_ADDR = 6,
305 	/* used by QCA_NL80211_VENDOR_SUBCMD_GET_FEATURES */
306 	QCA_WLAN_VENDOR_ATTR_FEATURE_FLAGS = 7,
307 	QCA_WLAN_VENDOR_ATTR_TEST = 8,
308 	/* used by QCA_NL80211_VENDOR_SUBCMD_GET_FEATURES */
309 	/* Unsigned 32-bit value. */
310 	QCA_WLAN_VENDOR_ATTR_CONCURRENCY_CAPA = 9,
311 	/* Unsigned 32-bit value */
312 	QCA_WLAN_VENDOR_ATTR_MAX_CONCURRENT_CHANNELS_2_4_BAND = 10,
313 	/* Unsigned 32-bit value */
314 	QCA_WLAN_VENDOR_ATTR_MAX_CONCURRENT_CHANNELS_5_0_BAND = 11,
315 	/* Unsigned 32-bit value from enum qca_set_band. */
316 	QCA_WLAN_VENDOR_ATTR_SETBAND_VALUE = 12,
317 	/* Dummy (NOP) attribute for 64 bit padding */
318 	QCA_WLAN_VENDOR_ATTR_PAD = 13,
319 	/* Unique FTM session cookie (Unsigned 64 bit). Specified in
320 	 * QCA_NL80211_VENDOR_SUBCMD_FTM_START_SESSION. Reported in
321 	 * the session in QCA_NL80211_VENDOR_SUBCMD_FTM_MEAS_RESULT and
322 	 * QCA_NL80211_VENDOR_SUBCMD_FTM_SESSION_DONE.
323 	 */
324 	QCA_WLAN_VENDOR_ATTR_FTM_SESSION_COOKIE = 14,
325 	/* Indoor location capabilities, returned by
326 	 * QCA_NL80211_VENDOR_SUBCMD_LOC_GET_CAPA.
327 	 * see enum qca_wlan_vendor_attr_loc_capa.
328 	 */
329 	QCA_WLAN_VENDOR_ATTR_LOC_CAPA = 15,
330 	/* Array of nested attributes containing information about each peer
331 	 * in FTM measurement session. See enum qca_wlan_vendor_attr_peer_info
332 	 * for supported attributes for each peer.
333 	 */
334 	QCA_WLAN_VENDOR_ATTR_FTM_MEAS_PEERS = 16,
335 	/* Array of nested attributes containing measurement results for
336 	 * one or more peers, reported by the
337 	 * QCA_NL80211_VENDOR_SUBCMD_FTM_MEAS_RESULT event.
338 	 * See enum qca_wlan_vendor_attr_peer_result for list of supported
339 	 * attributes.
340 	 */
341 	QCA_WLAN_VENDOR_ATTR_FTM_MEAS_PEER_RESULTS = 17,
342 	/* Flag attribute for enabling or disabling responder functionality. */
343 	QCA_WLAN_VENDOR_ATTR_FTM_RESPONDER_ENABLE = 18,
344 	/* Used in the QCA_NL80211_VENDOR_SUBCMD_FTM_CFG_RESPONDER
345 	 * command to specify the LCI report that will be sent by
346 	 * the responder during a measurement exchange. The format is
347 	 * defined in IEEE P802.11-REVmc/D7.0, 9.4.2.22.10.
348 	 */
349 	QCA_WLAN_VENDOR_ATTR_FTM_LCI = 19,
350 	/* Used in the QCA_NL80211_VENDOR_SUBCMD_FTM_CFG_RESPONDER
351 	 * command to specify the location civic report that will
352 	 * be sent by the responder during a measurement exchange.
353 	 * The format is defined in IEEE P802.11-REVmc/D7.0, 9.4.2.22.13.
354 	 */
355 	QCA_WLAN_VENDOR_ATTR_FTM_LCR = 20,
356 	/* Session/measurement completion status code,
357 	 * reported in QCA_NL80211_VENDOR_SUBCMD_FTM_SESSION_DONE and
358 	 * QCA_NL80211_VENDOR_SUBCMD_AOA_MEAS_RESULT
359 	 * see enum qca_vendor_attr_loc_session_status.
360 	 */
361 	QCA_WLAN_VENDOR_ATTR_LOC_SESSION_STATUS = 21,
362 	/* Initial dialog token used by responder (0 if not specified),
363 	 * unsigned 8 bit value.
364 	 */
365 	QCA_WLAN_VENDOR_ATTR_FTM_INITIAL_TOKEN = 22,
366 	/* AOA measurement type. Requested in QCA_NL80211_VENDOR_SUBCMD_AOA_MEAS
367 	 * and optionally in QCA_NL80211_VENDOR_SUBCMD_FTM_START_SESSION if
368 	 * AOA measurements are needed as part of an FTM session.
369 	 * Reported by QCA_NL80211_VENDOR_SUBCMD_AOA_MEAS_RESULT. See
370 	 * enum qca_wlan_vendor_attr_aoa_type.
371 	 */
372 	QCA_WLAN_VENDOR_ATTR_AOA_TYPE = 23,
373 	/* A bit mask (unsigned 32 bit value) of antenna arrays used
374 	 * by indoor location measurements. Refers to the antenna
375 	 * arrays described by QCA_VENDOR_ATTR_LOC_CAPA_ANTENNA_ARRAYS.
376 	 */
377 	QCA_WLAN_VENDOR_ATTR_LOC_ANTENNA_ARRAY_MASK = 24,
378 	/* AOA measurement data. Its contents depends on the AOA measurement
379 	 * type and antenna array mask:
380 	 * QCA_WLAN_VENDOR_ATTR_AOA_TYPE_TOP_CIR_PHASE: array of U16 values,
381 	 * phase of the strongest CIR path for each antenna in the measured
382 	 * array(s).
383 	 * QCA_WLAN_VENDOR_ATTR_AOA_TYPE_TOP_CIR_PHASE_AMP: array of 2 U16
384 	 * values, phase and amplitude of the strongest CIR path for each
385 	 * antenna in the measured array(s).
386 	 */
387 	QCA_WLAN_VENDOR_ATTR_AOA_MEAS_RESULT = 25,
388 	/* Used in QCA_NL80211_VENDOR_SUBCMD_GET_CHAIN_RSSI command
389 	 * to specify the chain number (unsigned 32 bit value) to inquire
390 	 * the corresponding antenna RSSI value */
391 	QCA_WLAN_VENDOR_ATTR_CHAIN_INDEX = 26,
392 	/* Used in QCA_NL80211_VENDOR_SUBCMD_GET_CHAIN_RSSI command
393 	 * to report the specific antenna RSSI value (unsigned 32 bit value) */
394 	QCA_WLAN_VENDOR_ATTR_CHAIN_RSSI = 27,
395 	/* keep last */
396 	QCA_WLAN_VENDOR_ATTR_AFTER_LAST,
397 	QCA_WLAN_VENDOR_ATTR_MAX	= QCA_WLAN_VENDOR_ATTR_AFTER_LAST - 1,
398 };
399 
400 
401 enum qca_roaming_policy {
402 	QCA_ROAMING_NOT_ALLOWED,
403 	QCA_ROAMING_ALLOWED_WITHIN_ESS,
404 };
405 
406 enum qca_wlan_vendor_attr_roam_auth {
407 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_INVALID = 0,
408 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_BSSID,
409 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_REQ_IE,
410 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_RESP_IE,
411 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_AUTHORIZED,
412 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_KEY_REPLAY_CTR,
413 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_PTK_KCK,
414 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_PTK_KEK,
415 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_SUBNET_STATUS,
416 	/* keep last */
417 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_AFTER_LAST,
418 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_MAX =
419 	QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_AFTER_LAST - 1
420 };
421 
422 enum qca_wlan_vendor_attr_p2p_listen_offload {
423 	QCA_WLAN_VENDOR_ATTR_P2P_LISTEN_OFFLOAD_INVALID = 0,
424 	/* A 32-bit unsigned value; the P2P listen frequency (MHz); must be one
425 	 * of the social channels.
426 	 */
427 	QCA_WLAN_VENDOR_ATTR_P2P_LISTEN_OFFLOAD_CHANNEL,
428 	/* A 32-bit unsigned value; the P2P listen offload period (ms).
429 	 */
430 	QCA_WLAN_VENDOR_ATTR_P2P_LISTEN_OFFLOAD_PERIOD,
431 	/* A 32-bit unsigned value; the P2P listen interval duration (ms).
432 	 */
433 	QCA_WLAN_VENDOR_ATTR_P2P_LISTEN_OFFLOAD_INTERVAL,
434 	/* A 32-bit unsigned value; number of interval times the firmware needs
435 	 * to run the offloaded P2P listen operation before it stops.
436 	 */
437 	QCA_WLAN_VENDOR_ATTR_P2P_LISTEN_OFFLOAD_COUNT,
438 	/* An array of arbitrary binary data with one or more 8-byte values.
439 	 * The device types include both primary and secondary device types.
440 	 */
441 	QCA_WLAN_VENDOR_ATTR_P2P_LISTEN_OFFLOAD_DEVICE_TYPES,
442 	/* An array of unsigned 8-bit characters; vendor information elements.
443 	 */
444 	QCA_WLAN_VENDOR_ATTR_P2P_LISTEN_OFFLOAD_VENDOR_IE,
445 	/* A 32-bit unsigned value; a control flag to indicate whether listen
446 	 * results need to be flushed to wpa_supplicant.
447 	 */
448 	QCA_WLAN_VENDOR_ATTR_P2P_LISTEN_OFFLOAD_CTRL_FLAG,
449 	/* A 8-bit unsigned value; reason code for P2P listen offload stop
450 	 * event.
451 	 */
452 	QCA_WLAN_VENDOR_ATTR_P2P_LISTEN_OFFLOAD_STOP_REASON,
453 	/* keep last */
454 	QCA_WLAN_VENDOR_ATTR_P2P_LISTEN_OFFLOAD_AFTER_LAST,
455 	QCA_WLAN_VENDOR_ATTR_P2P_LISTEN_OFFLOAD_MAX =
456 	QCA_WLAN_VENDOR_ATTR_P2P_LISTEN_OFFLOAD_AFTER_LAST - 1
457 };
458 
459 enum qca_wlan_vendor_attr_acs_offload {
460 	QCA_WLAN_VENDOR_ATTR_ACS_CHANNEL_INVALID = 0,
461 	QCA_WLAN_VENDOR_ATTR_ACS_PRIMARY_CHANNEL,
462 	QCA_WLAN_VENDOR_ATTR_ACS_SECONDARY_CHANNEL,
463 	QCA_WLAN_VENDOR_ATTR_ACS_HW_MODE,
464 	QCA_WLAN_VENDOR_ATTR_ACS_HT_ENABLED,
465 	QCA_WLAN_VENDOR_ATTR_ACS_HT40_ENABLED,
466 	QCA_WLAN_VENDOR_ATTR_ACS_VHT_ENABLED,
467 	QCA_WLAN_VENDOR_ATTR_ACS_CHWIDTH,
468 	QCA_WLAN_VENDOR_ATTR_ACS_CH_LIST,
469 	QCA_WLAN_VENDOR_ATTR_ACS_VHT_SEG0_CENTER_CHANNEL,
470 	QCA_WLAN_VENDOR_ATTR_ACS_VHT_SEG1_CENTER_CHANNEL,
471 	QCA_WLAN_VENDOR_ATTR_ACS_FREQ_LIST,
472 	/* keep last */
473 	QCA_WLAN_VENDOR_ATTR_ACS_AFTER_LAST,
474 	QCA_WLAN_VENDOR_ATTR_ACS_MAX =
475 	QCA_WLAN_VENDOR_ATTR_ACS_AFTER_LAST - 1
476 };
477 
478 enum qca_wlan_vendor_acs_hw_mode {
479 	QCA_ACS_MODE_IEEE80211B,
480 	QCA_ACS_MODE_IEEE80211G,
481 	QCA_ACS_MODE_IEEE80211A,
482 	QCA_ACS_MODE_IEEE80211AD,
483 	QCA_ACS_MODE_IEEE80211ANY,
484 };
485 
486 /**
487  * enum qca_wlan_vendor_features - Vendor device/driver feature flags
488  *
489  * @QCA_WLAN_VENDOR_FEATURE_KEY_MGMT_OFFLOAD: Device supports key
490  *	management offload, a mechanism where the station's firmware
491  *	does the exchange with the AP to establish the temporal keys
492  *	after roaming, rather than having the user space wpa_supplicant do it.
493  * @QCA_WLAN_VENDOR_FEATURE_SUPPORT_HW_MODE_ANY: Device supports automatic
494  *	band selection based on channel selection results.
495  * @QCA_WLAN_VENDOR_FEATURE_OFFCHANNEL_SIMULTANEOUS: Device supports
496  * 	simultaneous off-channel operations.
497  * @QCA_WLAN_VENDOR_FEATURE_P2P_LISTEN_OFFLOAD: Device supports P2P
498  *	Listen offload; a mechanism where the station's firmware takes care of
499  *	responding to incoming Probe Request frames received from other P2P
500  *	Devices whilst in Listen state, rather than having the user space
501  *	wpa_supplicant do it. Information from received P2P requests are
502  *	forwarded from firmware to host whenever the host processor wakes up.
503  * @NUM_QCA_WLAN_VENDOR_FEATURES: Number of assigned feature bits
504  */
505 enum qca_wlan_vendor_features {
506 	QCA_WLAN_VENDOR_FEATURE_KEY_MGMT_OFFLOAD	= 0,
507 	QCA_WLAN_VENDOR_FEATURE_SUPPORT_HW_MODE_ANY     = 1,
508 	QCA_WLAN_VENDOR_FEATURE_OFFCHANNEL_SIMULTANEOUS = 2,
509 	QCA_WLAN_VENDOR_FEATURE_P2P_LISTEN_OFFLOAD	= 3,
510 	NUM_QCA_WLAN_VENDOR_FEATURES /* keep last */
511 };
512 
513 /**
514  * enum qca_wlan_vendor_attr_data_offload_ind - Vendor Data Offload Indication
515  *
516  * @QCA_WLAN_VENDOR_ATTR_DATA_OFFLOAD_IND_SESSION: Session corresponding to
517  *	the offloaded data.
518  * @QCA_WLAN_VENDOR_ATTR_DATA_OFFLOAD_IND_PROTOCOL: Protocol of the offloaded
519  *	data.
520  * @QCA_WLAN_VENDOR_ATTR_DATA_OFFLOAD_IND_EVENT: Event type for the data offload
521  *	indication.
522  */
523 enum qca_wlan_vendor_attr_data_offload_ind {
524 	QCA_WLAN_VENDOR_ATTR_DATA_OFFLOAD_IND_INVALID = 0,
525 	QCA_WLAN_VENDOR_ATTR_DATA_OFFLOAD_IND_SESSION,
526 	QCA_WLAN_VENDOR_ATTR_DATA_OFFLOAD_IND_PROTOCOL,
527 	QCA_WLAN_VENDOR_ATTR_DATA_OFFLOAD_IND_EVENT,
528 
529 	/* keep last */
530 	QCA_WLAN_VENDOR_ATTR_DATA_OFFLOAD_IND_AFTER_LAST,
531 	QCA_WLAN_VENDOR_ATTR_DATA_OFFLOAD_IND_MAX =
532 	QCA_WLAN_VENDOR_ATTR_DATA_OFFLOAD_IND_AFTER_LAST - 1
533 };
534 
535 enum qca_vendor_attr_get_preferred_freq_list {
536 	QCA_WLAN_VENDOR_ATTR_GET_PREFERRED_FREQ_LIST_INVALID,
537 	/* A 32-unsigned value; the interface type/mode for which the preferred
538 	 * frequency list is requested (see enum qca_iface_type for possible
539 	 * values); used in GET_PREFERRED_FREQ_LIST command from user-space to
540 	 * kernel and in the kernel response back to user-space.
541 	 */
542 	QCA_WLAN_VENDOR_ATTR_GET_PREFERRED_FREQ_LIST_IFACE_TYPE,
543 	/* An array of 32-unsigned values; values are frequency (MHz); sent
544 	 * from kernel space to user space.
545 	 */
546 	QCA_WLAN_VENDOR_ATTR_GET_PREFERRED_FREQ_LIST,
547 	/* keep last */
548 	QCA_WLAN_VENDOR_ATTR_GET_PREFERRED_FREQ_LIST_AFTER_LAST,
549 	QCA_WLAN_VENDOR_ATTR_GET_PREFERRED_FREQ_LIST_MAX =
550 	QCA_WLAN_VENDOR_ATTR_GET_PREFERRED_FREQ_LIST_AFTER_LAST - 1
551 };
552 
553 enum qca_vendor_attr_probable_oper_channel {
554 	QCA_WLAN_VENDOR_ATTR_PROBABLE_OPER_CHANNEL_INVALID,
555 	/* 32-bit unsigned value; indicates the connection/iface type likely to
556 	 * come on this channel (see enum qca_iface_type).
557 	 */
558 	QCA_WLAN_VENDOR_ATTR_PROBABLE_OPER_CHANNEL_IFACE_TYPE,
559 	/* 32-bit unsigned value; the frequency (MHz) of the probable channel */
560 	QCA_WLAN_VENDOR_ATTR_PROBABLE_OPER_CHANNEL_FREQ,
561 	/* keep last */
562 	QCA_WLAN_VENDOR_ATTR_PROBABLE_OPER_CHANNEL_AFTER_LAST,
563 	QCA_WLAN_VENDOR_ATTR_PROBABLE_OPER_CHANNEL_MAX =
564 	QCA_WLAN_VENDOR_ATTR_PROBABLE_OPER_CHANNEL_AFTER_LAST - 1
565 };
566 
567 enum qca_iface_type {
568 	QCA_IFACE_TYPE_STA,
569 	QCA_IFACE_TYPE_AP,
570 	QCA_IFACE_TYPE_P2P_CLIENT,
571 	QCA_IFACE_TYPE_P2P_GO,
572 	QCA_IFACE_TYPE_IBSS,
573 	QCA_IFACE_TYPE_TDLS,
574 };
575 
576 enum qca_set_band {
577 	QCA_SETBAND_AUTO,
578 	QCA_SETBAND_5G,
579 	QCA_SETBAND_2G,
580 };
581 
582 /**
583  * enum qca_access_policy - Access control policy
584  *
585  * Access control policy is applied on the configured IE
586  * (QCA_WLAN_VENDOR_ATTR_CONFIG_ACCESS_POLICY_IE).
587  * To be set with QCA_WLAN_VENDOR_ATTR_CONFIG_ACCESS_POLICY.
588  *
589  * @QCA_ACCESS_POLICY_ACCEPT_UNLESS_LISTED: Deny Wi-Fi connections which match
590  *	the specific configuration (IE) set, i.e., allow all the
591  *	connections which do not match the configuration.
592  * @QCA_ACCESS_POLICY_DENY_UNLESS_LISTED: Accept Wi-Fi connections which match
593  *	the specific configuration (IE) set, i.e., deny all the
594  *	connections which do not match the configuration.
595  */
596 enum qca_access_policy {
597 	QCA_ACCESS_POLICY_ACCEPT_UNLESS_LISTED,
598 	QCA_ACCESS_POLICY_DENY_UNLESS_LISTED,
599 };
600 
601 /**
602  * enum qca_vendor_attr_get_tsf: Vendor attributes for TSF capture
603  * @QCA_WLAN_VENDOR_ATTR_TSF_CMD: enum qca_tsf_operation (u32)
604  * @QCA_WLAN_VENDOR_ATTR_TSF_TIMER_VALUE: Unsigned 64 bit TSF timer value
605  * @QCA_WLAN_VENDOR_ATTR_TSF_SOC_TIMER_VALUE: Unsigned 64 bit Synchronized
606  *	SOC timer value at TSF capture
607  */
608 enum qca_vendor_attr_tsf_cmd {
609 	QCA_WLAN_VENDOR_ATTR_TSF_INVALID = 0,
610 	QCA_WLAN_VENDOR_ATTR_TSF_CMD,
611 	QCA_WLAN_VENDOR_ATTR_TSF_TIMER_VALUE,
612 	QCA_WLAN_VENDOR_ATTR_TSF_SOC_TIMER_VALUE,
613 	QCA_WLAN_VENDOR_ATTR_TSF_AFTER_LAST,
614 	QCA_WLAN_VENDOR_ATTR_TSF_MAX =
615 	QCA_WLAN_VENDOR_ATTR_TSF_AFTER_LAST - 1
616 };
617 
618 /**
619  * enum qca_tsf_operation: TSF driver commands
620  * @QCA_TSF_CAPTURE: Initiate TSF Capture
621  * @QCA_TSF_GET: Get TSF capture value
622  * @QCA_TSF_SYNC_GET: Initiate TSF capture and return with captured value
623  */
624 enum qca_tsf_cmd {
625 	QCA_TSF_CAPTURE,
626 	QCA_TSF_GET,
627 	QCA_TSF_SYNC_GET,
628 };
629 
630 /**
631  * enum qca_vendor_attr_wisa_cmd
632  * @QCA_WLAN_VENDOR_ATTR_WISA_MODE: WISA mode value (u32)
633  * WISA setup vendor commands
634  */
635 enum qca_vendor_attr_wisa_cmd {
636 	QCA_WLAN_VENDOR_ATTR_WISA_INVALID = 0,
637 	QCA_WLAN_VENDOR_ATTR_WISA_MODE,
638 	QCA_WLAN_VENDOR_ATTR_WISA_AFTER_LAST,
639 	QCA_WLAN_VENDOR_ATTR_WISA_MAX =
640 	QCA_WLAN_VENDOR_ATTR_WISA_AFTER_LAST - 1
641 };
642 
643 /* IEEE 802.11 Vendor Specific elements */
644 
645 /**
646  * enum qca_vendor_element_id - QCA Vendor Specific element types
647  *
648  * These values are used to identify QCA Vendor Specific elements. The
649  * payload of the element starts with the three octet OUI (OUI_QCA) and
650  * is followed by a single octet type which is defined by this enum.
651  *
652  * @QCA_VENDOR_ELEM_P2P_PREF_CHAN_LIST: P2P preferred channel list.
653  *	This element can be used to specify preference order for supported
654  *	channels. The channels in this list are in preference order (the first
655  *	one has the highest preference) and are described as a pair of
656  *	(global) Operating Class and Channel Number (each one octet) fields.
657  *
658  *	This extends the standard P2P functionality by providing option to have
659  *	more than one preferred operating channel. When this element is present,
660  *	it replaces the preference indicated in the Operating Channel attribute.
661  *	For supporting other implementations, the Operating Channel attribute is
662  *	expected to be used with the highest preference channel. Similarly, all
663  *	the channels included in this Preferred channel list element are
664  *	expected to be included in the Channel List attribute.
665  *
666  *	This vendor element may be included in GO Negotiation Request, P2P
667  *	Invitation Request, and Provision Discovery Request frames.
668  *
669  * @QCA_VENDOR_ELEM_HE_CAPAB: HE Capabilities element.
670  *	This element can be used for pre-standard publication testing of HE
671  *	before P802.11ax draft assigns the element ID. The payload of this
672  *	vendor specific element is defined by the latest P802.11ax draft.
673  *	Please note that the draft is still work in progress and this element
674  *	payload is subject to change.
675  *
676  * @QCA_VENDOR_ELEM_HE_OPER: HE Operation element.
677  *	This element can be used for pre-standard publication testing of HE
678  *	before P802.11ax draft assigns the element ID. The payload of this
679  *	vendor specific element is defined by the latest P802.11ax draft.
680  *	Please note that the draft is still work in progress and this element
681  *	payload is subject to change.
682  */
683 enum qca_vendor_element_id {
684 	QCA_VENDOR_ELEM_P2P_PREF_CHAN_LIST = 0,
685 	QCA_VENDOR_ELEM_HE_CAPAB = 1,
686 	QCA_VENDOR_ELEM_HE_OPER = 2,
687 };
688 
689 /**
690  * enum qca_wlan_vendor_attr_scan - Specifies vendor scan attributes
691  *
692  * @QCA_WLAN_VENDOR_ATTR_SCAN_IE: IEs that should be included as part of scan
693  * @QCA_WLAN_VENDOR_ATTR_SCAN_FREQUENCIES: Nested unsigned 32-bit attributes
694  *	with frequencies to be scanned (in MHz)
695  * @QCA_WLAN_VENDOR_ATTR_SCAN_SSIDS: Nested attribute with SSIDs to be scanned
696  * @QCA_WLAN_VENDOR_ATTR_SCAN_SUPP_RATES: Nested array attribute of supported
697  *	rates to be included
698  * @QCA_WLAN_VENDOR_ATTR_SCAN_TX_NO_CCK_RATE: flag used to send probe requests
699  * 	at non CCK rate in 2GHz band
700  * @QCA_WLAN_VENDOR_ATTR_SCAN_FLAGS: Unsigned 32-bit scan flags
701  * @QCA_WLAN_VENDOR_ATTR_SCAN_COOKIE: Unsigned 64-bit cookie provided by the
702  * 	driver for the specific scan request
703  * @QCA_WLAN_VENDOR_ATTR_SCAN_STATUS: Unsigned 8-bit status of the scan
704  * 	request decoded as in enum scan_status
705  * @QCA_WLAN_VENDOR_ATTR_SCAN_MAC: 6-byte MAC address to use when randomisation
706  * 	scan flag is set
707  * @QCA_WLAN_VENDOR_ATTR_SCAN_MAC_MASK: 6-byte MAC address mask to be used with
708  * 	randomisation
709  */
710 enum qca_wlan_vendor_attr_scan {
711 	QCA_WLAN_VENDOR_ATTR_SCAN_INVALID_PARAM = 0,
712 	QCA_WLAN_VENDOR_ATTR_SCAN_IE,
713 	QCA_WLAN_VENDOR_ATTR_SCAN_FREQUENCIES,
714 	QCA_WLAN_VENDOR_ATTR_SCAN_SSIDS,
715 	QCA_WLAN_VENDOR_ATTR_SCAN_SUPP_RATES,
716 	QCA_WLAN_VENDOR_ATTR_SCAN_TX_NO_CCK_RATE,
717 	QCA_WLAN_VENDOR_ATTR_SCAN_FLAGS,
718 	QCA_WLAN_VENDOR_ATTR_SCAN_COOKIE,
719 	QCA_WLAN_VENDOR_ATTR_SCAN_STATUS,
720 	QCA_WLAN_VENDOR_ATTR_SCAN_MAC,
721 	QCA_WLAN_VENDOR_ATTR_SCAN_MAC_MASK,
722 	QCA_WLAN_VENDOR_ATTR_SCAN_AFTER_LAST,
723 	QCA_WLAN_VENDOR_ATTR_SCAN_MAX =
724 	QCA_WLAN_VENDOR_ATTR_SCAN_AFTER_LAST - 1
725 };
726 
727 /**
728  * enum scan_status - Specifies the valid values the vendor scan attribute
729  * 	QCA_WLAN_VENDOR_ATTR_SCAN_STATUS can take
730  *
731  * @VENDOR_SCAN_STATUS_NEW_RESULTS: implies the vendor scan is successful with
732  * 	new scan results
733  * @VENDOR_SCAN_STATUS_ABORTED: implies the vendor scan was aborted in-between
734  */
735 enum scan_status {
736 	VENDOR_SCAN_STATUS_NEW_RESULTS,
737 	VENDOR_SCAN_STATUS_ABORTED,
738 	VENDOR_SCAN_STATUS_MAX,
739 };
740 
741 /**
742  * enum qca_vendor_attr_ota_test - Specifies the values for vendor
743  *                       command QCA_NL80211_VENDOR_SUBCMD_OTA_TEST
744  * @QCA_WLAN_VENDOR_ATTR_OTA_TEST_ENABLE: enable ota test
745  */
746 enum qca_vendor_attr_ota_test {
747 	QCA_WLAN_VENDOR_ATTR_OTA_TEST_INVALID,
748 	/* 8-bit unsigned value to indicate if OTA test is enabled */
749 	QCA_WLAN_VENDOR_ATTR_OTA_TEST_ENABLE,
750 	/* keep last */
751 	QCA_WLAN_VENDOR_ATTR_OTA_TEST_AFTER_LAST,
752 	QCA_WLAN_VENDOR_ATTR_OTA_TEST_MAX =
753 	QCA_WLAN_VENDOR_ATTR_OTA_TEST_AFTER_LAST - 1
754 };
755 
756 /**
757  * enum qca_vendor_attr_txpower_scale - vendor sub commands index
758  *
759  * @QCA_WLAN_VENDOR_ATTR_TXPOWER_SCALE: scaling value
760  */
761 enum qca_vendor_attr_txpower_scale {
762 	QCA_WLAN_VENDOR_ATTR_TXPOWER_SCALE_INVALID,
763 	/* 8-bit unsigned value to indicate the scaling of tx power */
764 	QCA_WLAN_VENDOR_ATTR_TXPOWER_SCALE,
765 	/* keep last */
766 	QCA_WLAN_VENDOR_ATTR_TXPOWER_SCALE_AFTER_LAST,
767 	QCA_WLAN_VENDOR_ATTR_TXPOWER_SCALE_MAX =
768 	QCA_WLAN_VENDOR_ATTR_TXPOWER_SCALE_AFTER_LAST - 1
769 };
770 
771 /**
772  * enum qca_vendor_attr_txpower_decr_db - Attributes for TX power decrease
773  *
774  * These attributes are used with QCA_NL80211_VENDOR_SUBCMD_SET_TXPOWER_DECR_DB.
775  */
776 enum qca_vendor_attr_txpower_decr_db {
777 	QCA_WLAN_VENDOR_ATTR_TXPOWER_DECR_DB_INVALID,
778 	/* 8-bit unsigned value to indicate the reduction of TX power in dB for
779 	 * a virtual interface. */
780 	QCA_WLAN_VENDOR_ATTR_TXPOWER_DECR_DB,
781 	/* keep last */
782 	QCA_WLAN_VENDOR_ATTR_TXPOWER_DECR_DB_AFTER_LAST,
783 	QCA_WLAN_VENDOR_ATTR_TXPOWER_DECR_DB_MAX =
784 	QCA_WLAN_VENDOR_ATTR_TXPOWER_DECR_DB_AFTER_LAST - 1
785 };
786 
787 /* Attributes for data used by
788  * QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION and
789  * QCA_NL80211_VENDOR_SUBCMD_GET_WIFI_CONFIGURATION subcommands.
790  */
791 enum qca_wlan_vendor_attr_config {
792 	QCA_WLAN_VENDOR_ATTR_CONFIG_INVALID = 0,
793 	/* Unsigned 32-bit value to set the DTIM period.
794 	 * Whether the wifi chipset wakes at every dtim beacon or a multiple of
795 	 * the DTIM period. If DTIM is set to 3, the STA shall wake up every 3
796 	 * DTIM beacons.
797 	 */
798 	QCA_WLAN_VENDOR_ATTR_CONFIG_DYNAMIC_DTIM = 1,
799 	/* Unsigned 32-bit value to set the wifi_iface stats averaging factor
800 	 * used to calculate statistics like average the TSF offset or average
801 	 * number of frame leaked.
802 	 * For instance, upon Beacon frame reception:
803 	 * current_avg = ((beacon_TSF - TBTT) * factor + previous_avg * (0x10000 - factor) ) / 0x10000
804 	 * For instance, when evaluating leaky APs:
805 	 * current_avg = ((num frame received within guard time) * factor + previous_avg * (0x10000 - factor)) / 0x10000
806 	 */
807 	QCA_WLAN_VENDOR_ATTR_CONFIG_STATS_AVG_FACTOR = 2,
808 	/* Unsigned 32-bit value to configure guard time, i.e., when
809 	 * implementing IEEE power management based on frame control PM bit, how
810 	 * long the driver waits before shutting down the radio and after
811 	 * receiving an ACK frame for a Data frame with PM bit set.
812 	 */
813 	QCA_WLAN_VENDOR_ATTR_CONFIG_GUARD_TIME = 3,
814 	/* Unsigned 32-bit value to change the FTM capability dynamically */
815 	QCA_WLAN_VENDOR_ATTR_CONFIG_FINE_TIME_MEASUREMENT = 4,
816 	/* Unsigned 16-bit value to configure maximum TX rate dynamically */
817 	QCA_WLAN_VENDOR_ATTR_CONF_TX_RATE = 5,
818 	/* Unsigned 32-bit value to configure the number of continuous
819 	 * Beacon Miss which shall be used by the firmware to penalize
820 	 * the RSSI.
821 	 */
822 	QCA_WLAN_VENDOR_ATTR_CONFIG_PENALIZE_AFTER_NCONS_BEACON_MISS = 6,
823 	/* Unsigned 8-bit value to configure the channel avoidance indication
824 	 * behavior. Firmware to send only one indication and ignore duplicate
825 	 * indications when set to avoid multiple Apps wakeups.
826 	 */
827 	QCA_WLAN_VENDOR_ATTR_CONFIG_CHANNEL_AVOIDANCE_IND = 7,
828 	/* 8-bit unsigned value to configure the maximum TX MPDU for
829 	 * aggregation. */
830 	QCA_WLAN_VENDOR_ATTR_CONFIG_TX_MPDU_AGGREGATION = 8,
831 	/* 8-bit unsigned value to configure the maximum RX MPDU for
832 	 * aggregation. */
833 	QCA_WLAN_VENDOR_ATTR_CONFIG_RX_MPDU_AGGREGATION = 9,
834 	/* 8-bit unsigned value to configure the Non aggregrate/11g sw
835 	 * retry threshold (0 disable, 31 max). */
836 	QCA_WLAN_VENDOR_ATTR_CONFIG_NON_AGG_RETRY = 10,
837 	/* 8-bit unsigned value to configure the aggregrate sw
838 	 * retry threshold (0 disable, 31 max). */
839 	QCA_WLAN_VENDOR_ATTR_CONFIG_AGG_RETRY = 11,
840 	/* 8-bit unsigned value to configure the MGMT frame
841 	 * retry threshold (0 disable, 31 max). */
842 	QCA_WLAN_VENDOR_ATTR_CONFIG_MGMT_RETRY = 12,
843 	/* 8-bit unsigned value to configure the CTRL frame
844 	 * retry threshold (0 disable, 31 max). */
845 	QCA_WLAN_VENDOR_ATTR_CONFIG_CTRL_RETRY = 13,
846 	/* 8-bit unsigned value to configure the propagation delay for
847 	 * 2G/5G band (0~63, units in us) */
848 	QCA_WLAN_VENDOR_ATTR_CONFIG_PROPAGATION_DELAY = 14,
849 	/* Unsigned 32-bit value to configure the number of unicast TX fail
850 	 * packet count. The peer is disconnected once this threshold is
851 	 * reached. */
852 	QCA_WLAN_VENDOR_ATTR_CONFIG_TX_FAIL_COUNT = 15,
853 	/* Attribute used to set scan default IEs to the driver.
854 	 *
855 	 * These IEs can be used by scan operations that will be initiated by
856 	 * the driver/firmware.
857 	 *
858 	 * For further scan requests coming to the driver, these IEs should be
859 	 * merged with the IEs received along with scan request coming to the
860 	 * driver. If a particular IE is present in the scan default IEs but not
861 	 * present in the scan request, then that IE should be added to the IEs
862 	 * sent in the Probe Request frames for that scan request. */
863 	QCA_WLAN_VENDOR_ATTR_CONFIG_SCAN_DEFAULT_IES = 16,
864 	/* Unsigned 32-bit attribute for generic commands */
865 	QCA_WLAN_VENDOR_ATTR_CONFIG_GENERIC_COMMAND = 17,
866 	/* Unsigned 32-bit value attribute for generic commands */
867 	QCA_WLAN_VENDOR_ATTR_CONFIG_GENERIC_VALUE = 18,
868 	/* Unsigned 32-bit data attribute for generic command response */
869 	QCA_WLAN_VENDOR_ATTR_CONFIG_GENERIC_DATA = 19,
870 	/* Unsigned 32-bit length attribute for
871 	 * QCA_WLAN_VENDOR_ATTR_CONFIG_GENERIC_DATA */
872 	QCA_WLAN_VENDOR_ATTR_CONFIG_GENERIC_LENGTH = 20,
873 	/* Unsigned 32-bit flags attribute for
874 	 * QCA_WLAN_VENDOR_ATTR_CONFIG_GENERIC_DATA */
875 	QCA_WLAN_VENDOR_ATTR_CONFIG_GENERIC_FLAGS = 21,
876 	/* Unsigned 32-bit, defining the access policy.
877 	 * See enum qca_access_policy. Used with
878 	 * QCA_WLAN_VENDOR_ATTR_CONFIG_ACCESS_POLICY_IE_LIST. */
879 	QCA_WLAN_VENDOR_ATTR_CONFIG_ACCESS_POLICY = 22,
880 	/* Sets the list of full set of IEs for which a specific access policy
881 	 * has to be applied. Used along with
882 	 * QCA_WLAN_VENDOR_ATTR_CONFIG_ACCESS_POLICY to control the access.
883 	 * Zero length payload can be used to clear this access constraint. */
884 	QCA_WLAN_VENDOR_ATTR_CONFIG_ACCESS_POLICY_IE_LIST = 23,
885 	/* Unsigned 32-bit, specifies the interface index (netdev) for which the
886 	 * corresponding configurations are applied. If the interface index is
887 	 * not specified, the configurations are attributed to the respective
888 	 * wiphy. */
889 	QCA_WLAN_VENDOR_ATTR_CONFIG_IFINDEX = 24,
890 	/* 8-bit unsigned value to trigger QPower: 1-Enable, 0-Disable */
891 	QCA_WLAN_VENDOR_ATTR_CONFIG_QPOWER = 25,
892 	/* 8-bit unsigned value to configure the driver and below layers to
893 	 * ignore the assoc disallowed set by APs while connecting
894 	 * 1-Ignore, 0-Don't ignore */
895 	QCA_WLAN_VENDOR_ATTR_CONFIG_IGNORE_ASSOC_DISALLOWED = 26,
896 	/* 32-bit unsigned value to trigger antenna diversity features:
897 	 * 1-Enable, 0-Disable */
898 	QCA_WLAN_VENDOR_ATTR_CONFIG_ANT_DIV_ENA = 27,
899 	/* 32-bit unsigned value to configure specific chain antenna */
900 	QCA_WLAN_VENDOR_ATTR_CONFIG_ANT_DIV_CHAIN = 28,
901 	/* 32-bit unsigned value to trigger cycle selftest
902 	 * 1-Enable, 0-Disable */
903 	QCA_WLAN_VENDOR_ATTR_CONFIG_ANT_DIV_SELFTEST = 29,
904 	/* 32-bit unsigned to configure the cycle time of selftest
905 	 * the unit is micro-second */
906 	QCA_WLAN_VENDOR_ATTR_CONFIG_ANT_DIV_SELFTEST_INTVL = 30,
907 
908 	/* keep last */
909 	QCA_WLAN_VENDOR_ATTR_CONFIG_AFTER_LAST,
910 	QCA_WLAN_VENDOR_ATTR_CONFIG_MAX =
911 	QCA_WLAN_VENDOR_ATTR_CONFIG_AFTER_LAST - 1,
912 };
913 
914 /**
915  * enum qca_wlan_vendor_attr_sap_config - Parameters for AP configuration
916  */
917 enum qca_wlan_vendor_attr_sap_config {
918 	QCA_WLAN_VENDOR_ATTR_SAP_CONFIG_INVALID = 0,
919 	/* 1 - reserved for QCA */
920 	/* List of frequencies on which AP is expected to operate.
921 	 * This is irrespective of ACS configuration. This list is a priority
922 	 * based one and is looked for before the AP is created to ensure the
923 	 * best concurrency sessions (avoid MCC and use DBS/SCC) co-exist in
924 	 * the system.
925 	 */
926 	QCA_WLAN_VENDOR_ATTR_SAP_MANDATORY_FREQUENCY_LIST = 2,
927 
928 	QCA_WLAN_VENDOR_ATTR_SAP_CONFIG_AFTER_LAST,
929 	QCA_WLAN_VENDOR_ATTR_SAP_CONFIG_MAX =
930 	QCA_WLAN_VENDOR_ATTR_SAP_CONFIG_AFTER_LAST - 1,
931 };
932 
933 /**
934  * enum qca_wlan_vendor_attr_sap_conditional_chan_switch - Parameters for AP
935  *					conditional channel switch
936  */
937 enum qca_wlan_vendor_attr_sap_conditional_chan_switch {
938 	QCA_WLAN_VENDOR_ATTR_SAP_CONDITIONAL_CHAN_SWITCH_INVALID = 0,
939 	/* Priority based frequency list (an array of u32 values in host byte
940 	 * order) */
941 	QCA_WLAN_VENDOR_ATTR_SAP_CONDITIONAL_CHAN_SWITCH_FREQ_LIST = 1,
942 	/* Status of the conditional switch (u32).
943 	 * 0: Success, Non-zero: Failure
944 	 */
945 	QCA_WLAN_VENDOR_ATTR_SAP_CONDITIONAL_CHAN_SWITCH_STATUS = 2,
946 
947 	QCA_WLAN_VENDOR_ATTR_SAP_CONDITIONAL_CHAN_SWITCH_AFTER_LAST,
948 	QCA_WLAN_VENDOR_ATTR_SAP_CONDITIONAL_CHAN_SWITCH_MAX =
949 	QCA_WLAN_VENDOR_ATTR_SAP_CONDITIONAL_CHAN_SWITCH_AFTER_LAST - 1,
950 };
951 
952 /**
953  * enum qca_wlan_gpio_attr - Parameters for GPIO configuration
954  */
955 enum qca_wlan_gpio_attr {
956 	QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INVALID = 0,
957 	/* Unsigned 32-bit attribute for GPIO command */
958 	QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND,
959 	/* Unsigned 32-bit attribute for GPIO PIN number to configure */
960 	QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_PINNUM,
961 	/* Unsigned 32-bit attribute for GPIO value to configure */
962 	QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_VALUE,
963 	/* Unsigned 32-bit attribute for GPIO pull type */
964 	QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_PULL_TYPE,
965 	/* Unsigned 32-bit attribute for GPIO interrupt mode */
966 	QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTR_MODE,
967 
968 	/* keep last */
969 	QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_LAST,
970 	QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_MAX =
971 	QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_LAST - 1
972 };
973 
974 /**
975  * enum qca_wlan_vendor_attr_get_hw_capability - Wi-Fi hardware capability
976  */
977 enum qca_wlan_vendor_attr_get_hw_capability {
978 	QCA_WLAN_VENDOR_ATTR_HW_CAPABILITY_INVALID,
979 	/* Antenna isolation
980 	 * An attribute used in the response.
981 	 * The content of this attribute is encoded in a byte array. Each byte
982 	 * value is an antenna isolation value. The array length is the number
983 	 * of antennas.
984 	 */
985 	QCA_WLAN_VENDOR_ATTR_ANTENNA_ISOLATION,
986 	/* Request HW capability
987 	 * An attribute used in the request.
988 	 * The content of this attribute is a u32 array for one or more of
989 	 * hardware capabilities (attribute IDs) that are being requested. Each
990 	 * u32 value has a value from this
991 	 * enum qca_wlan_vendor_attr_get_hw_capability
992 	 * identifying which capabilities are requested.
993 	 */
994 	QCA_WLAN_VENDOR_ATTR_GET_HW_CAPABILITY,
995 
996 	/* keep last */
997 	QCA_WLAN_VENDOR_ATTR_HW_CAPABILITY_AFTER_LAST,
998 	QCA_WLAN_VENDOR_ATTR_HW_CAPABILITY_MAX =
999 	QCA_WLAN_VENDOR_ATTR_HW_CAPABILITY_AFTER_LAST - 1,
1000 };
1001 
1002 /**
1003  * enum qca_wlan_vendor_attr_ll_stats_ext - Attributes for MAC layer monitoring
1004  *    offload which is an extension for LL_STATS.
1005  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_CFG_PERIOD: Monitoring period. Unit in ms.
1006  *    If MAC counters do not exceed the threshold, FW will report monitored
1007  *    link layer counters periodically as this setting. The first report is
1008  *    always triggered by this timer.
1009  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_CFG_THRESHOLD: It is a percentage (1-99).
1010  *    For each MAC layer counter, FW holds two copies. One is the current value.
1011  *    The other is the last report. Once a current counter's increment is larger
1012  *    than the threshold, FW will indicate that counter to host even if the
1013  *    monitoring timer does not expire.
1014  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_PS_CHG: Peer STA power state change
1015  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TID: TID of MSDU
1016  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_NUM_MSDU: Count of MSDU with the same
1017  *    failure code.
1018  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_STATUS: TX failure code
1019  *    1: TX packet discarded
1020  *    2: No ACK
1021  *    3: Postpone
1022  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_MAC_ADDRESS: peer MAC address
1023  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_PS_STATE: Peer STA current state
1024  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_GLOBAL: Global threshold.
1025  *    Threshold for all monitored parameters. If per counter dedicated threshold
1026  *    is not enabled, this threshold will take effect.
1027  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_EVENT_MODE: Indicate what triggers this
1028  *    event, PERORID_TIMEOUT == 1, THRESH_EXCEED == 0.
1029  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_IFACE_ID: interface ID
1030  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_ID: peer ID
1031  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_BITMAP: bitmap for TX counters
1032  *    Bit0: TX counter unit in MSDU
1033  *    Bit1: TX counter unit in MPDU
1034  *    Bit2: TX counter unit in PPDU
1035  *    Bit3: TX counter unit in byte
1036  *    Bit4: Dropped MSDUs
1037  *    Bit5: Dropped Bytes
1038  *    Bit6: MPDU retry counter
1039  *    Bit7: MPDU failure counter
1040  *    Bit8: PPDU failure counter
1041  *    Bit9: MPDU aggregation counter
1042  *    Bit10: MCS counter for ACKed MPDUs
1043  *    Bit11: MCS counter for Failed MPDUs
1044  *    Bit12: TX Delay counter
1045  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_BITMAP: bitmap for RX counters
1046  *    Bit0: MAC RX counter unit in MPDU
1047  *    Bit1: MAC RX counter unit in byte
1048  *    Bit2: PHY RX counter unit in PPDU
1049  *    Bit3: PHY RX counter unit in byte
1050  *    Bit4: Disorder counter
1051  *    Bit5: Retry counter
1052  *    Bit6: Duplication counter
1053  *    Bit7: Discard counter
1054  *    Bit8: MPDU aggregation size counter
1055  *    Bit9: MCS counter
1056  *    Bit10: Peer STA power state change (wake to sleep) counter
1057  *    Bit11: Peer STA power save counter, total time in PS mode
1058  *    Bit12: Probe request counter
1059  *    Bit13: Other management frames counter
1060  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_CCA_BSS_BITMAP: bitmap for CCA
1061  *    Bit0: Idle time
1062  *    Bit1: TX time
1063  *    Bit2: time RX in current bss
1064  *    Bit3: Out of current bss time
1065  *    Bit4: Wireless medium busy time
1066  *    Bit5: RX in bad condition time
1067  *    Bit6: TX in bad condition time
1068  *    Bit7: time wlan card not available
1069  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_SIGNAL_BITMAP: bitmap for signal
1070  *    Bit0: Per channel SNR counter
1071  *    Bit1: Per channel noise floor counter
1072  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_NUM: number of peers
1073  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_CHANNEL_NUM: number of channels
1074  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_AC_RX_NUM: number of RX stats
1075  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_CCA_BSS: per channel BSS CCA stats
1076  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER: container for per PEER stats
1077  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_MSDU: Number of total TX MSDUs
1078  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_MPDU: Number of total TX MPDUs
1079  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_PPDU: Number of total TX PPDUs
1080  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_BYTES: bytes of TX data
1081  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_DROP: Number of dropped TX packets
1082  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_DROP_BYTES: Bytes dropped
1083  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_RETRY: waiting time without an ACK
1084  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_NO_ACK: number of MPDU not-ACKed
1085  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_NO_BACK: number of PPDU not-ACKed
1086  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_AGGR_NUM:
1087  *    aggregation stats buffer length
1088  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_SUCC_MCS_NUM: length of mcs stats
1089  *    buffer for ACKed MPDUs.
1090  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_FAIL_MCS_NUM: length of mcs stats
1091  *    buffer for failed MPDUs.
1092  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_DELAY_ARRAY_SIZE:
1093  *    length of delay stats array.
1094  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_AGGR: TX aggregation stats
1095  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_SUCC_MCS: MCS stats for ACKed MPDUs
1096  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_FAIL_MCS: MCS stats for failed MPDUs
1097  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_DELAY: tx delay stats
1098  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_MPDU: MPDUs received
1099  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_MPDU_BYTES: bytes received
1100  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_PPDU: PPDU received
1101  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_PPDU_BYTES: PPDU bytes received
1102  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_MPDU_LOST: packets lost
1103  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_MPDU_RETRY: number of RX packets
1104  *    flagged as retransmissions
1105  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_MPDU_DUP: number of RX packets
1106  *    flagged as duplicated
1107  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_MPDU_DISCARD: number of RX
1108  *    packets discarded
1109  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_AGGR_NUM: length of RX aggregation
1110  *    stats buffer.
1111  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_MCS_NUM: length of RX mcs
1112  *    stats buffer.
1113  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_MCS: RX mcs stats buffer
1114  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_AGGR: aggregation stats buffer
1115  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_PS_TIMES: times STAs go to sleep
1116  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_PS_DURATION: STAs' total sleep time
1117  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_PROBE_REQ: number of probe
1118  *    requests received
1119  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_MGMT: number of other mgmt
1120  *    frames received
1121  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_IDLE_TIME: Percentage of idle time
1122  *    there is no TX, nor RX, nor interference.
1123  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_TIME: percentage of time
1124  *    transmitting packets.
1125  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_TIME: percentage of time
1126  *    for receiving.
1127  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_BUSY: percentage of time
1128  *    interference detected.
1129  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_BAD: percentage of time
1130  *    receiving packets with errors.
1131  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_BAD: percentage of time
1132  *    TX no-ACK.
1133  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_NO_AVAIL: percentage of time
1134  *    the chip is unable to work in normal conditions.
1135  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_IN_BSS_TIME: percentage of time
1136  *    receiving packets in current BSS.
1137  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_OUT_BSS_TIME: percentage of time
1138  *    receiving packets not in current BSS.
1139  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_ANT_NUM: number of antennas
1140  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_SIGNAL:
1141  *    This is a container for per antenna signal stats.
1142  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_ANT_SNR: per antenna SNR value
1143  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_ANT_NF: per antenna NF value
1144  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_IFACE_RSSI_BEACON: RSSI of beacon
1145  * @QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_IFACE_SNR_BEACON: SNR of beacon
1146  */
1147 enum qca_wlan_vendor_attr_ll_stats_ext {
1148 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_INVALID = 0,
1149 
1150 	/* Attributes for configurations */
1151 	QCA_WLAN_VENDOR_ATTR_LL_STATS_CFG_PERIOD,
1152 	QCA_WLAN_VENDOR_ATTR_LL_STATS_CFG_THRESHOLD,
1153 
1154 	/* Peer STA power state change */
1155 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_PS_CHG,
1156 
1157 	/* TX failure event */
1158 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TID,
1159 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_NUM_MSDU,
1160 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_STATUS,
1161 
1162 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_PS_STATE,
1163 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_MAC_ADDRESS,
1164 
1165 	/* MAC counters */
1166 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_GLOBAL,
1167 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_EVENT_MODE,
1168 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_IFACE_ID,
1169 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_ID,
1170 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_BITMAP,
1171 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_BITMAP,
1172 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_CCA_BSS_BITMAP,
1173 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_SIGNAL_BITMAP,
1174 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_NUM,
1175 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_CHANNEL_NUM,
1176 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_CCA_BSS,
1177 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER,
1178 
1179 	/* Sub-attributes for PEER_AC_TX */
1180 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_MSDU,
1181 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_MPDU,
1182 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_PPDU,
1183 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_BYTES,
1184 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_DROP,
1185 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_DROP_BYTES,
1186 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_RETRY,
1187 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_NO_ACK,
1188 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_NO_BACK,
1189 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_AGGR_NUM,
1190 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_SUCC_MCS_NUM,
1191 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_FAIL_MCS_NUM,
1192 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_AGGR,
1193 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_SUCC_MCS,
1194 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_FAIL_MCS,
1195 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_DELAY_ARRAY_SIZE,
1196 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_DELAY,
1197 
1198 	/* Sub-attributes for PEER_AC_RX */
1199 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_MPDU,
1200 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_MPDU_BYTES,
1201 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_PPDU,
1202 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_PPDU_BYTES,
1203 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_MPDU_LOST,
1204 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_MPDU_RETRY,
1205 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_MPDU_DUP,
1206 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_MPDU_DISCARD,
1207 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_AGGR_NUM,
1208 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_MCS_NUM,
1209 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_MCS,
1210 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_AGGR,
1211 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_PS_TIMES,
1212 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_PS_DURATION,
1213 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_PROBE_REQ,
1214 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_MGMT,
1215 
1216 	/* Sub-attributes for CCA_BSS */
1217 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_IDLE_TIME,
1218 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_TIME,
1219 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_TIME,
1220 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_BUSY,
1221 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_RX_BAD,
1222 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_TX_BAD,
1223 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_NO_AVAIL,
1224 
1225 	/* sub-attribute for BSS_RX_TIME */
1226 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_IN_BSS_TIME,
1227 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_OUT_BSS_TIME,
1228 
1229 	/* Sub-attributes for PEER_SIGNAL */
1230 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_ANT_NUM,
1231 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_PEER_SIGNAL,
1232 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_ANT_SNR,
1233 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_ANT_NF,
1234 
1235 	/* Sub-attributes for IFACE_BSS */
1236 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_IFACE_RSSI_BEACON,
1237 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_IFACE_SNR_BEACON,
1238 
1239 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_LAST,
1240 	QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_MAX =
1241 		QCA_WLAN_VENDOR_ATTR_LL_STATS_EXT_LAST - 1
1242 };
1243 
1244 /* Attributes for FTM commands and events */
1245 
1246 /**
1247  * enum qca_wlan_vendor_attr_loc_capa - Indoor location capabilities
1248  *
1249  * @QCA_WLAN_VENDOR_ATTR_LOC_CAPA_FLAGS: Various flags. See
1250  *	enum qca_wlan_vendor_attr_loc_capa_flags.
1251  * @QCA_WLAN_VENDOR_ATTR_FTM_CAPA_MAX_NUM_SESSIONS: Maximum number
1252  *	of measurement sessions that can run concurrently.
1253  *	Default is one session (no session concurrency).
1254  * @QCA_WLAN_VENDOR_ATTR_FTM_CAPA_MAX_NUM_PEERS: The total number of unique
1255  *	peers that are supported in running sessions. For example,
1256  *	if the value is 8 and maximum number of sessions is 2, you can
1257  *	have one session with 8 unique peers, or 2 sessions with 4 unique
1258  *	peers each, and so on.
1259  * @QCA_WLAN_VENDOR_ATTR_FTM_CAPA_MAX_NUM_BURSTS_EXP: Maximum number
1260  *	of bursts per peer, as an exponent (2^value). Default is 0,
1261  *	meaning no multi-burst support.
1262  * @QCA_WLAN_VENDOR_ATTR_FTM_CAPA_MAX_MEAS_PER_BURST: Maximum number
1263  *	of measurement exchanges allowed in a single burst.
1264  * @QCA_WLAN_VENDOR_ATTR_AOA_CAPA_SUPPORTED_TYPES: Supported AOA measurement
1265  *	types. A bit mask (unsigned 32 bit value), each bit corresponds
1266  *	to an AOA type as defined by enum qca_vendor_attr_aoa_type.
1267  */
1268 enum qca_wlan_vendor_attr_loc_capa {
1269 	QCA_WLAN_VENDOR_ATTR_LOC_CAPA_INVALID,
1270 	QCA_WLAN_VENDOR_ATTR_LOC_CAPA_FLAGS,
1271 	QCA_WLAN_VENDOR_ATTR_FTM_CAPA_MAX_NUM_SESSIONS,
1272 	QCA_WLAN_VENDOR_ATTR_FTM_CAPA_MAX_NUM_PEERS,
1273 	QCA_WLAN_VENDOR_ATTR_FTM_CAPA_MAX_NUM_BURSTS_EXP,
1274 	QCA_WLAN_VENDOR_ATTR_FTM_CAPA_MAX_MEAS_PER_BURST,
1275 	QCA_WLAN_VENDOR_ATTR_AOA_CAPA_SUPPORTED_TYPES,
1276 	/* keep last */
1277 	QCA_WLAN_VENDOR_ATTR_LOC_CAPA_AFTER_LAST,
1278 	QCA_WLAN_VENDOR_ATTR_LOC_CAPA_MAX =
1279 	QCA_WLAN_VENDOR_ATTR_LOC_CAPA_AFTER_LAST - 1,
1280 };
1281 
1282 /**
1283  * enum qca_wlan_vendor_attr_loc_capa_flags: Indoor location capability flags
1284  *
1285  * @QCA_WLAN_VENDOR_ATTR_LOC_CAPA_FLAG_FTM_RESPONDER: Set if driver
1286  *	can be configured as an FTM responder (for example, an AP that
1287  *	services FTM requests). QCA_NL80211_VENDOR_SUBCMD_FTM_CFG_RESPONDER
1288  *	will be supported if set.
1289  * @QCA_WLAN_VENDOR_ATTR_LOC_CAPA_FLAG_FTM_INITIATOR: Set if driver
1290  *	can run FTM sessions. QCA_NL80211_VENDOR_SUBCMD_FTM_START_SESSION
1291  *	will be supported if set.
1292 * @QCA_WLAN_VENDOR_ATTR_LOC_CAPA_FLAG_ASAP: Set if FTM responder
1293  *	supports immediate (ASAP) response.
1294  * @QCA_WLAN_VENDOR_ATTR_LOC_CAPA_FLAG_AOA: Set if driver supports standalone
1295  *	AOA measurement using QCA_NL80211_VENDOR_SUBCMD_AOA_MEAS.
1296  * @QCA_WLAN_VENDOR_ATTR_LOC_CAPA_FLAG_AOA_IN_FTM: Set if driver supports
1297  *	requesting AOA measurements as part of an FTM session.
1298  */
1299 enum qca_wlan_vendor_attr_loc_capa_flags {
1300 	QCA_WLAN_VENDOR_ATTR_LOC_CAPA_FLAG_FTM_RESPONDER = 1 << 0,
1301 	QCA_WLAN_VENDOR_ATTR_LOC_CAPA_FLAG_FTM_INITIATOR = 1 << 1,
1302 	QCA_WLAN_VENDOR_ATTR_LOC_CAPA_FLAG_ASAP = 1 << 2,
1303 	QCA_WLAN_VENDOR_ATTR_LOC_CAPA_FLAG_AOA = 1 << 3,
1304 	QCA_WLAN_VENDOR_ATTR_LOC_CAPA_FLAG_AOA_IN_FTM = 1 << 4,
1305 };
1306 
1307 /**
1308  * enum qca_wlan_vendor_attr_ftm_peer_info: Information about
1309  *	a single peer in a measurement session.
1310  *
1311  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_MAC_ADDR: The MAC address of the peer.
1312  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_MEAS_FLAGS: Various flags related
1313  *	to measurement. See enum qca_wlan_vendor_attr_ftm_peer_meas_flags.
1314  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_MEAS_PARAMS: Nested attribute of
1315  *	FTM measurement parameters, as specified by IEEE P802.11-REVmc/D7.0
1316  *	9.4.2.167. See enum qca_wlan_vendor_attr_ftm_meas_param for
1317  *	list of supported attributes.
1318  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_SECURE_TOKEN_ID: Initial token ID for
1319  *	secure measurement.
1320  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_AOA_BURST_PERIOD: Request AOA
1321  *	measurement every <value> bursts. If 0 or not specified,
1322  *	AOA measurements will be disabled for this peer.
1323  */
1324 enum qca_wlan_vendor_attr_ftm_peer_info {
1325 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_INVALID,
1326 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_MAC_ADDR,
1327 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_MEAS_FLAGS,
1328 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_MEAS_PARAMS,
1329 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_SECURE_TOKEN_ID,
1330 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_AOA_BURST_PERIOD,
1331 	/* keep last */
1332 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_AFTER_LAST,
1333 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_MAX =
1334 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_AFTER_LAST - 1,
1335 };
1336 
1337 /**
1338  * enum qca_wlan_vendor_attr_ftm_peer_meas_flags: Measurement request flags,
1339  *	per-peer
1340  *
1341  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_MEAS_FLAG_ASAP: If set, request
1342  *	immediate (ASAP) response from peer.
1343  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_MEAS_FLAG_LCI: If set, request
1344  *	LCI report from peer. The LCI report includes the absolute
1345  *	location of the peer in "official" coordinates (similar to GPS).
1346  *	See IEEE P802.11-REVmc/D7.0, 11.24.6.7 for more information.
1347  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_MEAS_FLAG_LCR: If set, request
1348  *	Location civic report from peer. The LCR includes the location
1349  *	of the peer in free-form format. See IEEE P802.11-REVmc/D7.0,
1350  *	11.24.6.7 for more information.
1351  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_MEAS_FLAG_SECURE: If set,
1352  *	request a secure measurement.
1353  *	QCA_WLAN_VENDOR_ATTR_FTM_PEER_SECURE_TOKEN_ID must also be provided.
1354  */
1355 enum qca_wlan_vendor_attr_ftm_peer_meas_flags {
1356 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_MEAS_FLAG_ASAP	= 1 << 0,
1357 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_MEAS_FLAG_LCI	= 1 << 1,
1358 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_MEAS_FLAG_LCR	= 1 << 2,
1359 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_MEAS_FLAG_SECURE	= 1 << 3,
1360 };
1361 
1362 /**
1363  * enum qca_wlan_vendor_attr_ftm_meas_param: Measurement parameters
1364  *
1365  * @QCA_WLAN_VENDOR_ATTR_FTM_PARAM_MEAS_PER_BURST: Number of measurements
1366  *	to perform in a single burst.
1367  * @QCA_WLAN_VENDOR_ATTR_FTM_PARAM_NUM_BURSTS_EXP: Number of bursts to
1368  *	perform, specified as an exponent (2^value).
1369  * @QCA_WLAN_VENDOR_ATTR_FTM_PARAM_BURST_DURATION: Duration of burst
1370  *	instance, as specified in IEEE P802.11-REVmc/D7.0, 9.4.2.167.
1371  * @QCA_WLAN_VENDOR_ATTR_FTM_PARAM_BURST_PERIOD: Time between bursts,
1372  *	as specified in IEEE P802.11-REVmc/D7.0, 9.4.2.167. Must
1373  *	be larger than QCA_WLAN_VENDOR_ATTR_FTM_PARAM_BURST_DURATION.
1374  */
1375 enum qca_wlan_vendor_attr_ftm_meas_param {
1376 	QCA_WLAN_VENDOR_ATTR_FTM_PARAM_INVALID,
1377 	QCA_WLAN_VENDOR_ATTR_FTM_PARAM_MEAS_PER_BURST,
1378 	QCA_WLAN_VENDOR_ATTR_FTM_PARAM_NUM_BURSTS_EXP,
1379 	QCA_WLAN_VENDOR_ATTR_FTM_PARAM_BURST_DURATION,
1380 	QCA_WLAN_VENDOR_ATTR_FTM_PARAM_BURST_PERIOD,
1381 	/* keep last */
1382 	QCA_WLAN_VENDOR_ATTR_FTM_PARAM_AFTER_LAST,
1383 	QCA_WLAN_VENDOR_ATTR_FTM_PARAM_MAX =
1384 	QCA_WLAN_VENDOR_ATTR_FTM_PARAM_AFTER_LAST - 1,
1385 };
1386 
1387 /**
1388  * enum qca_wlan_vendor_attr_ftm_peer_result: Per-peer results
1389  *
1390  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_MAC_ADDR: MAC address of the reported
1391  *	 peer.
1392  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_STATUS: Status of measurement
1393  *	request for this peer.
1394  *	See enum qca_wlan_vendor_attr_ftm_peer_result_status.
1395  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_FLAGS: Various flags related
1396  *	to measurement results for this peer.
1397  *	See enum qca_wlan_vendor_attr_ftm_peer_result_flags.
1398  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_VALUE_SECONDS: Specified when
1399  *	request failed and peer requested not to send an additional request
1400  *	for this number of seconds.
1401  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_LCI: LCI report when received
1402  *	from peer. In the format specified by IEEE P802.11-REVmc/D7.0,
1403  *	9.4.2.22.10.
1404  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_LCR: Location civic report when
1405  *	received from peer. In the format specified by IEEE P802.11-REVmc/D7.0,
1406  *	9.4.2.22.13.
1407  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_MEAS_PARAMS: Reported when peer
1408  *	overridden some measurement request parameters. See
1409  *	enum qca_wlan_vendor_attr_ftm_meas_param.
1410  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_AOA_MEAS: AOA measurement
1411  *	for this peer. Same contents as @QCA_WLAN_VENDOR_ATTR_AOA_MEAS_RESULT.
1412  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_MEAS: Array of measurement
1413  *	results. Each entry is a nested attribute defined
1414  *	by enum qca_wlan_vendor_attr_ftm_meas.
1415  */
1416 enum qca_wlan_vendor_attr_ftm_peer_result {
1417 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_INVALID,
1418 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_MAC_ADDR,
1419 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_STATUS,
1420 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_FLAGS,
1421 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_VALUE_SECONDS,
1422 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_LCI,
1423 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_LCR,
1424 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_MEAS_PARAMS,
1425 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_AOA_MEAS,
1426 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_MEAS,
1427 	/* keep last */
1428 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_AFTER_LAST,
1429 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_MAX =
1430 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_AFTER_LAST - 1,
1431 };
1432 
1433 /**
1434  * enum qca_wlan_vendor_attr_ftm_peer_result_status
1435  *
1436  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_STATUS_OK: Request sent ok and results
1437  *	will be provided. Peer may have overridden some measurement parameters,
1438  *	in which case overridden parameters will be report by
1439  *	QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_MEAS_PARAM attribute.
1440  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_STATUS_INCAPABLE: Peer is incapable
1441  *	of performing the measurement request. No more results will be sent
1442  *	for this peer in this session.
1443  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_STATUS_FAILED: Peer reported request
1444  *	failed, and requested not to send an additional request for number
1445  *	of seconds specified by QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_VALUE_SECONDS
1446  *	attribute.
1447  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_STATUS_INVALID: Request validation
1448  *	failed. Request was not sent over the air.
1449  */
1450 enum qca_wlan_vendor_attr_ftm_peer_result_status {
1451 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_STATUS_OK,
1452 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_STATUS_INCAPABLE,
1453 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_STATUS_FAILED,
1454 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_STATUS_INVALID,
1455 };
1456 
1457 /**
1458  * enum qca_wlan_vendor_attr_ftm_peer_result_flags: Various flags
1459  *  for measurement result, per-peer
1460  *
1461  * @QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_FLAG_DONE: If set,
1462  *	measurement completed for this peer. No more results will be reported
1463  *	for this peer in this session.
1464  */
1465 enum qca_wlan_vendor_attr_ftm_peer_result_flags {
1466 	QCA_WLAN_VENDOR_ATTR_FTM_PEER_RES_FLAG_DONE = 1 << 0,
1467 };
1468 
1469 /**
1470  * enum qca_vendor_attr_loc_session_status: Session completion status code
1471  *
1472  * @QCA_WLAN_VENDOR_ATTR_LOC_SESSION_STATUS_OK: Session completed
1473  *	successfully.
1474  * @QCA_WLAN_VENDOR_ATTR_LOC_SESSION_STATUS_ABORTED: Session aborted
1475  *	by request.
1476  * @QCA_WLAN_VENDOR_ATTR_LOC_SESSION_STATUS_INVALID: Session request
1477  *	was invalid and was not started.
1478  * @QCA_WLAN_VENDOR_ATTR_LOC_SESSION_STATUS_FAILED: Session had an error
1479  *	and did not complete normally (for example out of resources).
1480  */
1481 enum qca_vendor_attr_loc_session_status {
1482 	QCA_WLAN_VENDOR_ATTR_LOC_SESSION_STATUS_OK,
1483 	QCA_WLAN_VENDOR_ATTR_LOC_SESSION_STATUS_ABORTED,
1484 	QCA_WLAN_VENDOR_ATTR_LOC_SESSION_STATUS_INVALID,
1485 	QCA_WLAN_VENDOR_ATTR_LOC_SESSION_STATUS_FAILED,
1486 };
1487 
1488 /**
1489  * enum qca_wlan_vendor_attr_ftm_meas: Single measurement data
1490  *
1491  * @QCA_WLAN_VENDOR_ATTR_FTM_MEAS_T1: Time of departure (TOD) of FTM packet as
1492  *	recorded by responder, in picoseconds.
1493  *	See IEEE P802.11-REVmc/D7.0, 11.24.6.4 for more information.
1494  * @QCA_WLAN_VENDOR_ATTR_FTM_MEAS_T2: Time of arrival (TOA) of FTM packet at
1495  *	initiator, in picoseconds.
1496  *	See IEEE P802.11-REVmc/D7.0, 11.24.6.4 for more information.
1497  * @QCA_WLAN_VENDOR_ATTR_FTM_MEAS_T3: TOD of ACK packet as recorded by
1498  *	initiator, in picoseconds.
1499  *	See IEEE P802.11-REVmc/D7.0, 11.24.6.4 for more information.
1500  * @QCA_WLAN_VENDOR_ATTR_FTM_MEAS_T4: TOA of ACK packet at
1501  *	responder, in picoseconds.
1502  *	See IEEE P802.11-REVmc/D7.0, 11.24.6.4 for more information.
1503  * @QCA_WLAN_VENDOR_ATTR_FTM_MEAS_RSSI: RSSI (signal level) as recorded
1504  *	during this measurement exchange. Optional and will be provided if
1505  *	the hardware can measure it.
1506  * @QCA_WLAN_VENDOR_ATTR_FTM_MEAS_TOD_ERR: TOD error reported by
1507  *	responder. Not always provided.
1508  *	See IEEE P802.11-REVmc/D7.0, 9.6.8.33 for more information.
1509  * @QCA_WLAN_VENDOR_ATTR_FTM_MEAS_TOA_ERR: TOA error reported by
1510  *	responder. Not always provided.
1511  *	See IEEE P802.11-REVmc/D7.0, 9.6.8.33 for more information.
1512  * @QCA_WLAN_VENDOR_ATTR_FTM_MEAS_INITIATOR_TOD_ERR: TOD error measured by
1513  *	initiator. Not always provided.
1514  *	See IEEE P802.11-REVmc/D7.0, 9.6.8.33 for more information.
1515  * @QCA_WLAN_VENDOR_ATTR_FTM_MEAS_INITIATOR_TOA_ERR: TOA error measured by
1516  *	initiator. Not always provided.
1517  *	See IEEE P802.11-REVmc/D7.0, 9.6.8.33 for more information.
1518  * @QCA_WLAN_VENDOR_ATTR_FTM_MEAS_PAD: Dummy attribute for padding.
1519  */
1520 enum qca_wlan_vendor_attr_ftm_meas {
1521 	QCA_WLAN_VENDOR_ATTR_FTM_MEAS_INVALID,
1522 	QCA_WLAN_VENDOR_ATTR_FTM_MEAS_T1,
1523 	QCA_WLAN_VENDOR_ATTR_FTM_MEAS_T2,
1524 	QCA_WLAN_VENDOR_ATTR_FTM_MEAS_T3,
1525 	QCA_WLAN_VENDOR_ATTR_FTM_MEAS_T4,
1526 	QCA_WLAN_VENDOR_ATTR_FTM_MEAS_RSSI,
1527 	QCA_WLAN_VENDOR_ATTR_FTM_MEAS_TOD_ERR,
1528 	QCA_WLAN_VENDOR_ATTR_FTM_MEAS_TOA_ERR,
1529 	QCA_WLAN_VENDOR_ATTR_FTM_MEAS_INITIATOR_TOD_ERR,
1530 	QCA_WLAN_VENDOR_ATTR_FTM_MEAS_INITIATOR_TOA_ERR,
1531 	QCA_WLAN_VENDOR_ATTR_FTM_MEAS_PAD,
1532 	/* keep last */
1533 	QCA_WLAN_VENDOR_ATTR_FTM_MEAS_AFTER_LAST,
1534 	QCA_WLAN_VENDOR_ATTR_FTM_MEAS_MAX =
1535 	QCA_WLAN_VENDOR_ATTR_FTM_MEAS_AFTER_LAST - 1,
1536 };
1537 
1538 /**
1539  * enum qca_wlan_vendor_attr_aoa_type - AOA measurement type
1540  *
1541  * @QCA_WLAN_VENDOR_ATTR_AOA_TYPE_TOP_CIR_PHASE: Phase of the strongest
1542  *	CIR (channel impulse response) path for each antenna.
1543  * @QCA_WLAN_VENDOR_ATTR_AOA_TYPE_TOP_CIR_PHASE_AMP: Phase and amplitude
1544  *	of the strongest CIR path for each antenna.
1545  */
1546 enum qca_wlan_vendor_attr_aoa_type {
1547 	QCA_WLAN_VENDOR_ATTR_AOA_TYPE_TOP_CIR_PHASE,
1548 	QCA_WLAN_VENDOR_ATTR_AOA_TYPE_TOP_CIR_PHASE_AMP,
1549 	QCA_WLAN_VENDOR_ATTR_AOA_TYPE_MAX
1550 };
1551 
1552 /**
1553  * enum qca_wlan_vendor_attr_encryption_test - Attributes to
1554  * validate encryption engine
1555  *
1556  * @QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_NEEDS_DECRYPTION: Flag attribute.
1557  *	This will be included if the request is for decryption; if not included,
1558  *	the request is treated as a request for encryption by default.
1559  * @QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_CIPHER: Unsigned 32-bit value
1560  *	indicating the key cipher suite. Takes same values as
1561  *	NL80211_ATTR_KEY_CIPHER.
1562  * @QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_KEYID: Unsigned 8-bit value
1563  *	Key Id to be used for encryption
1564  * @QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_TK: Array of 8-bit values.
1565  *	Key (TK) to be used for encryption/decryption
1566  * @QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_PN: Array of 8-bit values.
1567  *	Packet number to be specified for encryption/decryption
1568  *	6 bytes for TKIP/CCMP/GCMP.
1569  * @QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_DATA: Array of 8-bit values
1570  *	representing the 802.11 packet (header + payload + FCS) that
1571  *	needs to be encrypted/decrypted.
1572  *	Encrypted/decrypted response from the driver will also be sent
1573  *	to userspace with the same attribute.
1574  */
1575 enum qca_wlan_vendor_attr_encryption_test {
1576 	QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_INVALID = 0,
1577 	QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_NEEDS_DECRYPTION,
1578 	QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_CIPHER,
1579 	QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_KEYID,
1580 	QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_TK,
1581 	QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_PN,
1582 	QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_DATA,
1583 
1584 	/* keep last */
1585 	QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_AFTER_LAST,
1586 	QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_MAX =
1587 	QCA_WLAN_VENDOR_ATTR_ENCRYPTION_TEST_AFTER_LAST - 1
1588 };
1589 
1590 #endif /* QCA_VENDOR_H */
1591