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