blob: 73d394ac351257abdb58b1bf5ac740aed6064f11 [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05302 * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
28/**
29 * @addtogroup WMIAPI
30 ***@{
31 */
32
33/** @file
34 * This file specifies the WMI interface for the Software Architecture.
35 *
36 * It includes definitions of all the commands and events. Commands are messages
37 * from the host to the target. Events and Replies are messages from the target
38 * to the host.
39 *
40 * Ownership of correctness in regards to WMI commands
41 * belongs to the host driver and the target is not required to validate
42 * parameters for value, proper range, or any other checking.
43 *
44 * Guidelines for extending this interface are below.
45 *
46 * 1. Add new WMI commands ONLY within the specified range - 0x9000 - 0x9fff
47 * 2. Use ONLY A_UINT32 type for defining member variables within WMI command/event
48 * structures. Do not use A_UINT8, A_UINT16, A_BOOL or enum types within these structures.
49 * 3. DO NOT define bit fields within structures. Implement bit fields using masks
50 * if necessary. Do not use the programming language's bit field definition.
51 * 4. Define macros for encode/decode of A_UINT8, A_UINT16 fields within the A_UINT32
52 * variables. Use these macros for set/get of these fields. Try to use this to
53 * optimize the structure without bloating it with A_UINT32 variables for every lower
54 * sized field.
55 * 5. Do not use PACK/UNPACK attributes for the structures as each member variable is
56 * already 4-byte aligned by virtue of being a A_UINT32 type.
57 * 6. Comment each parameter part of the WMI command/event structure by using the
58 * 2 stars at the begining of C comment instead of one star to enable HTML document
59 * generation using Doxygen.
60 *
61 */
62
63#ifndef _WMI_UNIFIED_H_
64#define _WMI_UNIFIED_H_
65
66#ifdef __cplusplus
67extern "C" {
68#endif
69
70#include <wlan_defs.h>
71#include <wmi_services.h>
72#include <dbglog.h>
73
74#define ATH_MAC_LEN 6 /**< length of MAC in bytes */
75#define WMI_EVENT_STATUS_SUCCESS 0 /* Success return status to host */
76#define WMI_EVENT_STATUS_FAILURE 1 /* Failure return status to host */
77
78#define MAX_TX_RATE_VALUES 10 /*Max Tx Rates */
79#define MAX_RSSI_VALUES 10 /*Max Rssi values */
80
81/* The WLAN_MAX_AC macro cannot be changed without breaking
82 * WMI compatibility.
83 * The maximum value of access category
84 */
85#define WLAN_MAX_AC 4
86
87/*
88 * These don't necessarily belong here; but as the MS/SM macros require
89 * ar6000_internal.h to be included, it may not be defined as yet.
90 */
91#define WMI_F_MS(_v, _f) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053092 (((_v) & (_f)) >> (_f ## _S))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080093
94/*
95 * This breaks the "good macro practice" of only referencing each
96 * macro field once (to avoid things like field++ from causing issues.)
97 */
98#define WMI_F_RMW(_var, _v, _f) \
99 do { \
100 (_var) &= ~(_f); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530101 (_var) |= (((_v) << (_f ## _S)) & (_f)); \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800102 } while (0)
103
104#define WMI_GET_BITS(_val, _index, _num_bits) \
105 (((_val) >> (_index)) & ((1 << (_num_bits)) - 1))
106
107#define WMI_SET_BITS(_var, _index, _num_bits, _val) do { \
108 (_var) &= ~(((1 << (_num_bits)) - 1) << (_index)); \
109 (_var) |= (((_val) & ((1 << (_num_bits)) - 1)) << (_index)); \
110 } while (0)
111
112/**
113 * A packed array is an array where each entry in the array is less than
114 * or equal to 16 bits, and the entries are stuffed into an A_UINT32 array.
115 * For example, if each entry in the array is 11 bits, then you can stuff
116 * an array of 4 11-bit values into an array of 2 A_UINT32 values.
117 * The first 2 11-bit values will be stored in the first A_UINT32,
118 * and the last 2 11-bit values will be stored in the second A_UINT32.
119 */
120#define WMI_PACKED_ARR_SIZE(num_entries, bits_per_entry) \
121 (((num_entries) / (32 / (bits_per_entry))) + \
122 (((num_entries) % (32 / (bits_per_entry))) ? 1 : 0))
123
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530124static inline A_UINT32 wmi_packed_arr_get_bits(A_UINT32 *arr,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800125 A_UINT32 entry_index, A_UINT32 bits_per_entry)
126{
127 A_UINT32 entries_per_uint = (32 / bits_per_entry);
128 A_UINT32 uint_index = (entry_index / entries_per_uint);
129 A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
130 A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
131 A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530132 return (arr[uint_index] >> start_bit_in_uint) &
133 ((1 << bits_per_entry) - 1);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800134}
135
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530136static inline void wmi_packed_arr_set_bits(A_UINT32 *arr, A_UINT32 entry_index,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800137 A_UINT32 bits_per_entry, A_UINT32 val)
138{
139 A_UINT32 entries_per_uint = (32 / bits_per_entry);
140 A_UINT32 uint_index = (entry_index / entries_per_uint);
141 A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
142 A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
143 A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
144
145 arr[uint_index] &= ~(((1 << bits_per_entry) - 1) << start_bit_in_uint);
146 arr[uint_index] |=
147 ((val & ((1 << bits_per_entry) - 1)) << start_bit_in_uint);
148}
149
150/** 2 word representation of MAC addr */
151typedef struct {
152 /** upper 4 bytes of MAC address */
153 A_UINT32 mac_addr31to0;
154 /** lower 2 bytes of MAC address */
155 A_UINT32 mac_addr47to32;
156} wmi_mac_addr;
157
158/** macro to convert MAC address from WMI word format to char array */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530159#define WMI_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr, c_macaddr) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800160 (c_macaddr)[0] = ((pwmi_mac_addr)->mac_addr31to0) & 0xff; \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530161 (c_macaddr)[1] = (((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \
162 (c_macaddr)[2] = (((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \
163 (c_macaddr)[3] = (((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff; \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800164 (c_macaddr)[4] = ((pwmi_mac_addr)->mac_addr47to32) & 0xff; \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530165 (c_macaddr)[5] = (((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \
166} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800167
168/** macro to convert MAC address from char array to WMI word format */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530169#define WMI_CHAR_ARRAY_TO_MAC_ADDR(c_macaddr, pwmi_mac_addr) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800170 (pwmi_mac_addr)->mac_addr31to0 = \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530171 ((c_macaddr)[0] | ((c_macaddr)[1] << 8) \
172 | ((c_macaddr)[2] << 16) | ((c_macaddr)[3] << 24)); \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800173 (pwmi_mac_addr)->mac_addr47to32 = \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530174 ((c_macaddr)[4] | ((c_macaddr)[5] << 8)); \
175} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800176
177/*
178 * wmi command groups.
179 */
180typedef enum {
181 /* 0 to 2 are reserved */
182 WMI_GRP_START = 0x3,
Himanshu Agarwala1438152016-05-13 21:40:19 +0530183 WMI_GRP_SCAN = WMI_GRP_START, /* 0x3 */
184 WMI_GRP_PDEV, /* 0x4 */
185 WMI_GRP_VDEV, /* 0x5 */
186 WMI_GRP_PEER, /* 0x6 */
187 WMI_GRP_MGMT, /* 0x7 */
188 WMI_GRP_BA_NEG, /* 0x8 */
189 WMI_GRP_STA_PS, /* 0x9 */
190 WMI_GRP_DFS, /* 0xa */
191 WMI_GRP_ROAM, /* 0xb */
192 WMI_GRP_OFL_SCAN, /* 0xc */
193 WMI_GRP_P2P, /* 0xd */
194 WMI_GRP_AP_PS, /* 0xe */
195 WMI_GRP_RATE_CTRL, /* 0xf */
196 WMI_GRP_PROFILE, /* 0x10 */
197 WMI_GRP_SUSPEND, /* 0x11 */
198 WMI_GRP_BCN_FILTER, /* 0x12 */
199 WMI_GRP_WOW, /* 0x13 */
200 WMI_GRP_RTT, /* 0x14 */
201 WMI_GRP_SPECTRAL, /* 0x15 */
202 WMI_GRP_STATS, /* 0x16 */
203 WMI_GRP_ARP_NS_OFL, /* 0x17 */
204 WMI_GRP_NLO_OFL, /* 0x18 */
205 WMI_GRP_GTK_OFL, /* 0x19 */
206 WMI_GRP_CSA_OFL, /* 0x1a */
207 WMI_GRP_CHATTER, /* 0x1b */
208 WMI_GRP_TID_ADDBA, /* 0x1c */
209 WMI_GRP_MISC, /* 0x1d */
210 WMI_GRP_GPIO, /* 0x1e */
211 WMI_GRP_FWTEST, /* 0x1f */
212 WMI_GRP_TDLS, /* 0x20 */
213 WMI_GRP_RESMGR, /* 0x21 */
214 WMI_GRP_STA_SMPS, /* 0x22 */
215 WMI_GRP_WLAN_HB, /* 0x23 */
216 WMI_GRP_RMC, /* 0x24 */
217 WMI_GRP_MHF_OFL, /* 0x25 */
218 WMI_GRP_LOCATION_SCAN, /* 0x26 */
219 WMI_GRP_OEM, /* 0x27 */
220 WMI_GRP_NAN, /* 0x28 */
221 WMI_GRP_COEX, /* 0x29 */
222 WMI_GRP_OBSS_OFL, /* 0x2a */
223 WMI_GRP_LPI, /* 0x2b */
224 WMI_GRP_EXTSCAN, /* 0x2c */
225 WMI_GRP_DHCP_OFL, /* 0x2d */
226 WMI_GRP_IPA, /* 0x2e */
227 WMI_GRP_MDNS_OFL, /* 0x2f */
228 WMI_GRP_SAP_OFL, /* 0x30 */
229 WMI_GRP_OCB, /* 0x31 */
230 WMI_GRP_SOC, /* 0x32 */
231 WMI_GRP_PKT_FILTER, /* 0x33 */
232 WMI_GRP_MAWC, /* 0x34 */
233 WMI_GRP_PMF_OFFLOAD, /* 0x35 */
234 WMI_GRP_BPF_OFFLOAD, /* 0x36 Berkeley Packet Filter */
235 WMI_GRP_NAN_DATA, /* 0x37 */
236 WMI_GRP_PROTOTYPE, /* 0x38 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800237} WMI_GRP_ID;
238
239#define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
240#define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
241
242/**
243 * Command IDs and commange events
244 */
245typedef enum {
246 /** initialize the wlan sub system */
247 WMI_INIT_CMDID = 0x1,
248
249 /* Scan specific commands */
250
251 /** start scan request to FW */
252 WMI_START_SCAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SCAN),
253 /** stop scan request to FW */
254 WMI_STOP_SCAN_CMDID,
255 /** full list of channels as defined by the regulatory that will be used by scanner */
256 WMI_SCAN_CHAN_LIST_CMDID,
257 /** overwrite default priority table in scan scheduler */
258 WMI_SCAN_SCH_PRIO_TBL_CMDID,
259 /** This command to adjust the priority and min.max_rest_time
260 * of an on ongoing scan request.
261 */
262 WMI_SCAN_UPDATE_REQUEST_CMDID,
263
264 /** set OUI to be used in probe request if enabled */
265 WMI_SCAN_PROB_REQ_OUI_CMDID,
Anurag Chouhanb3fa7a12016-04-18 17:26:49 +0530266 /** config adaptive dwell scan */
267 WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800268
269 /* PDEV(physical device) specific commands */
270 /** set regulatorty ctl id used by FW to determine the exact ctl power limits */
271 WMI_PDEV_SET_REGDOMAIN_CMDID =
272 WMI_CMD_GRP_START_ID(WMI_GRP_PDEV),
273 /** set channel. mainly used for supporting monitor mode */
274 WMI_PDEV_SET_CHANNEL_CMDID,
275 /** set pdev specific parameters */
276 WMI_PDEV_SET_PARAM_CMDID,
277 /** enable packet log */
278 WMI_PDEV_PKTLOG_ENABLE_CMDID,
279 /** disable packet log*/
280 WMI_PDEV_PKTLOG_DISABLE_CMDID,
281 /** set wmm parameters */
282 WMI_PDEV_SET_WMM_PARAMS_CMDID,
283 /** set HT cap ie that needs to be carried probe requests HT/VHT channels */
284 WMI_PDEV_SET_HT_CAP_IE_CMDID,
285 /** set VHT cap ie that needs to be carried on probe requests on VHT channels */
286 WMI_PDEV_SET_VHT_CAP_IE_CMDID,
287
288 /** Command to send the DSCP-to-TID map to the target */
289 WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
290 /** set quiet ie parameters. primarily used in AP mode */
291 WMI_PDEV_SET_QUIET_MODE_CMDID,
292 /** Enable/Disable Green AP Power Save */
293 WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
294 /** get TPC config for the current operating channel */
295 WMI_PDEV_GET_TPC_CONFIG_CMDID,
296
297 /** set the base MAC address for the physical device before a VDEV is created.
298 * For firmware that doesn't support this feature and this command, the pdev
299 * MAC address will not be changed. */
300 WMI_PDEV_SET_BASE_MACADDR_CMDID,
301
302 /* eeprom content dump , the same to bdboard data */
303 WMI_PDEV_DUMP_CMDID,
304 /* set LED configuration */
305 WMI_PDEV_SET_LED_CONFIG_CMDID,
306 /* Get Current temprature of chip in Celcius degree */
307 WMI_PDEV_GET_TEMPERATURE_CMDID,
308 /* Set LED flashing behavior */
309 WMI_PDEV_SET_LED_FLASHING_CMDID,
Govind Singhc7d51942016-02-01 12:09:31 +0530310 /** Enable/Disable Smart Antenna */
311 WMI_PDEV_SMART_ANT_ENABLE_CMDID,
312 /** Set Smart Antenna RX antenna*/
313 WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
314 /** Override the antenna switch table */
315 WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
316 /** Override the CTL table */
317 WMI_PDEV_SET_CTL_TABLE_CMDID,
318 /** Override the array gain table */
319 WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID,
320 /** FIPS test mode command */
321 WMI_PDEV_FIPS_CMDID,
322 /** get CCK ANI level */
323 WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID,
324 /** get OFDM ANI level */
325 WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID,
326 /** NF Cal Power dBr/dBm */
327 WMI_PDEV_GET_NFCAL_POWER_CMDID,
328 /** TxPPDU TPC */
329 WMI_PDEV_GET_TPC_CMDID,
Govind Singh45ef44a2016-02-01 17:45:22 +0530330 /* Set to enable MIB stats collection */
331 WMI_MIB_STATS_ENABLE_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800332
Govind Singh869c9872016-02-22 18:36:34 +0530333 /** Set preferred channel list for DBS Mgr */
334 WMI_PDEV_SET_PCL_CMDID,
335 /** Set HW mode. Eg: single MAC, DBS & SBS,
336 * see soc_hw_mode_t for values
337 */
338 WMI_PDEV_SET_HW_MODE_CMDID,
339 /** Set DFS, SCAN modes and other FW configurations */
340 WMI_PDEV_SET_MAC_CONFIG_CMDID,
341 /** Set per band and per pdev antenna chains */
342 WMI_PDEV_SET_ANTENNA_MODE_CMDID,
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +0530343 /** Periodic channel stats request command */
344 WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID,
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +0530345 /** WMI command for power debug framework */
346 WMI_PDEV_WAL_POWER_DEBUG_CMDID,
Govind Singh869c9872016-02-22 18:36:34 +0530347
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800348 /* VDEV(virtual device) specific commands */
349 /** vdev create */
350 WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VDEV),
351 /** vdev delete */
352 WMI_VDEV_DELETE_CMDID,
353 /** vdev start request */
354 WMI_VDEV_START_REQUEST_CMDID,
355 /** vdev restart request (RX only, NO TX, used for CAC period)*/
356 WMI_VDEV_RESTART_REQUEST_CMDID,
357 /** vdev up request */
358 WMI_VDEV_UP_CMDID,
359 /** vdev stop request */
360 WMI_VDEV_STOP_CMDID,
361 /** vdev down request */
362 WMI_VDEV_DOWN_CMDID,
363 /* set a vdev param */
364 WMI_VDEV_SET_PARAM_CMDID,
365 /* set a key (used for setting per peer unicast and per vdev multicast) */
366 WMI_VDEV_INSTALL_KEY_CMDID,
367
368 /* wnm sleep mode command */
369 WMI_VDEV_WNM_SLEEPMODE_CMDID,
370 WMI_VDEV_WMM_ADDTS_CMDID,
371 WMI_VDEV_WMM_DELTS_CMDID,
372 WMI_VDEV_SET_WMM_PARAMS_CMDID,
373 WMI_VDEV_SET_GTX_PARAMS_CMDID,
374 WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID,
375
376 WMI_VDEV_PLMREQ_START_CMDID,
377 WMI_VDEV_PLMREQ_STOP_CMDID,
378 /* TSF timestamp action for specified vdev */
379 WMI_VDEV_TSF_TSTAMP_ACTION_CMDID,
380 /*
Govind Singh86180292016-02-01 14:03:37 +0530381 * set the additional IEs in probe requests for scan or
382 * assoc req etc for frames FW locally generates
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800383 */
384 WMI_VDEV_SET_IE_CMDID,
385
Govind Singhc7d51942016-02-01 12:09:31 +0530386 WMI_VDEV_RATEMASK_CMDID,
387 /** ATF VDEV REQUEST commands. */
388 WMI_VDEV_ATF_REQUEST_CMDID,
389 /** Command to send the DSCP-to-TID map to the target for VAP */
390 WMI_VDEV_SET_DSCP_TID_MAP_CMDID,
391 /*
392 * Configure filter for Neighbor Rx Pkt
393 * (smart mesh selective listening)
394 */
395 WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID,
Govind Singh869c9872016-02-22 18:36:34 +0530396 /** set quiet ie parameters. primarily used in AP mode */
397 WMI_VDEV_SET_QUIET_MODE_CMDID,
Krishna Kumaar Natarajanea0a7962016-04-16 14:09:09 +0530398 /** To set custom aggregation size for per vdev */
399 WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID,
Govind Singh869c9872016-02-22 18:36:34 +0530400
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800401 /* peer specific commands */
402
403 /** create a peer */
404 WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER),
405 /** delete a peer */
406 WMI_PEER_DELETE_CMDID,
407 /** flush specific tid queues of a peer */
408 WMI_PEER_FLUSH_TIDS_CMDID,
409 /** set a parameter of a peer */
410 WMI_PEER_SET_PARAM_CMDID,
411 /** set peer to associated state. will cary all parameters determined during assocication time */
412 WMI_PEER_ASSOC_CMDID,
413 /**add a wds (4 address ) entry. used only for testing WDS feature on AP products */
414 WMI_PEER_ADD_WDS_ENTRY_CMDID,
415 /**remove wds (4 address ) entry. used only for testing WDS feature on AP products */
416 WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
417 /** set up mcast group infor for multicast to unicast conversion */
418 WMI_PEER_MCAST_GROUP_CMDID,
419 /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */
420 WMI_PEER_INFO_REQ_CMDID,
421
422 /** request the estimated link speed for the peer. FW shall respond with
423 * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID.
424 */
425 WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID,
426 /*
427 * Set the conditions to report peer justified rate to driver
428 * The justified rate means the the user-rate is justified by PER.
429 */
430 WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID,
Govind Singhc7d51942016-02-01 12:09:31 +0530431 /** update a wds (4 address) entry */
432 WMI_PEER_UPDATE_WDS_ENTRY_CMDID,
433 /** add a proxy sta entry */
434 WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID,
435 /** Set Smart Antenna TX antenna */
436 WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
437 /** Set Smart Antenna TX train info */
438 WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
439 /** Set SA node config options */
440 WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
441 /** ATF PEER REQUEST commands */
442 WMI_PEER_ATF_REQUEST_CMDID,
Himanshu Agarwal134b7362016-05-13 20:30:12 +0530443 /** bandwidth fairness (BWF) peer configuration request command */
444 WMI_PEER_BWF_REQUEST_CMDID,
Govind Singhc7d51942016-02-01 12:09:31 +0530445
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800446 /* beacon/management specific commands */
447
448 /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */
449 WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT),
450 /** transmit beacon by value */
451 WMI_PDEV_SEND_BCN_CMDID,
452 /** set the beacon template. used in beacon offload mode to setup the
453 * the common beacon template with the FW to be used by FW to generate beacons */
454 WMI_BCN_TMPL_CMDID,
455 /** set beacon filter with FW */
456 WMI_BCN_FILTER_RX_CMDID,
457 /* enable/disable filtering of probe requests in the firmware */
458 WMI_PRB_REQ_FILTER_RX_CMDID,
459 /** transmit management frame by value. will be deprecated */
460 WMI_MGMT_TX_CMDID,
461 /** set the probe response template. used in beacon offload mode to setup the
462 * the common probe response template with the FW to be used by FW to generate
463 * probe responses */
464 WMI_PRB_TMPL_CMDID,
465 /** Transmit Mgmt frame by reference */
466 WMI_MGMT_TX_SEND_CMDID,
467
468 /** commands to directly control ba negotiation directly from host. only used in test mode */
469
470 /** turn off FW Auto addba mode and let host control addba */
471 WMI_ADDBA_CLEAR_RESP_CMDID =
472 WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG),
473 /** send add ba request */
474 WMI_ADDBA_SEND_CMDID,
475 WMI_ADDBA_STATUS_CMDID,
476 /** send del ba */
477 WMI_DELBA_SEND_CMDID,
478 /** set add ba response will be used by FW to generate addba response*/
479 WMI_ADDBA_SET_RESP_CMDID,
480 /** send single VHT MPDU with AMSDU */
481 WMI_SEND_SINGLEAMSDU_CMDID,
482
483 /** Station power save specific config */
484 /** enable/disable station powersave */
485 WMI_STA_POWERSAVE_MODE_CMDID =
486 WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS),
487 /** set station power save specific parameter */
488 WMI_STA_POWERSAVE_PARAM_CMDID,
489 /** set station mimo powersave mode */
490 WMI_STA_MIMO_PS_MODE_CMDID,
491
492 /** DFS-specific commands */
493 /** enable DFS (radar detection)*/
494 WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS),
495 /** disable DFS (radar detection)*/
496 WMI_PDEV_DFS_DISABLE_CMDID,
497 /** enable DFS phyerr/parse filter offload */
498 WMI_DFS_PHYERR_FILTER_ENA_CMDID,
499 /** enable DFS phyerr/parse filter offload */
500 WMI_DFS_PHYERR_FILTER_DIS_CMDID,
501
502 /* Roaming specific commands */
503 /** set roam scan mode */
504 WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM),
505 /** set roam scan rssi threshold below which roam scan is enabled */
506 WMI_ROAM_SCAN_RSSI_THRESHOLD,
507 /** set roam scan period for periodic roam scan mode */
508 WMI_ROAM_SCAN_PERIOD,
509 /** set roam scan trigger rssi change threshold */
510 WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
511 /** set roam AP profile */
512 WMI_ROAM_AP_PROFILE,
513 /** set channel list for roam scans */
514 WMI_ROAM_CHAN_LIST,
515 /** Stop scan command */
516 WMI_ROAM_SCAN_CMD,
517 /** roaming sme offload sync complete */
518 WMI_ROAM_SYNCH_COMPLETE,
519 /** set ric request element for 11r roaming */
520 WMI_ROAM_SET_RIC_REQUEST_CMDID,
521 /** Invoke roaming forcefully */
522 WMI_ROAM_INVOKE_CMDID,
523 /** roaming filter cmd to allow further filtering of roaming candidate */
524 WMI_ROAM_FILTER_CMDID,
525 /** set gateway ip, mac and retries for subnet change detection */
526 WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID,
527 /** configure thresholds for MAWC */
528 WMI_ROAM_CONFIGURE_MAWC_CMDID,
Govind Singh86180292016-02-01 14:03:37 +0530529 /** configure MultiBand Operation(refer WFA MBO spec) parameter */
530 WMI_ROAM_SET_MBO_PARAM_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800531
532 /** offload scan specific commands */
533 /** set offload scan AP profile */
534 WMI_OFL_SCAN_ADD_AP_PROFILE =
535 WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN),
536 /** remove offload scan AP profile */
537 WMI_OFL_SCAN_REMOVE_AP_PROFILE,
538 /** set offload scan period */
539 WMI_OFL_SCAN_PERIOD,
540
541 /* P2P specific commands */
542 /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response
543 * generated during p2p listen and for p2p discoverability */
544 WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P),
545 /** enable/disable p2p discoverability on STA/AP VDEVs */
546 WMI_P2P_DEV_SET_DISCOVERABILITY,
547 /** set p2p ie to be carried in beacons generated by FW for GO */
548 WMI_P2P_GO_SET_BEACON_IE,
549 /** set p2p ie to be carried in probe response frames generated by FW for GO */
550 WMI_P2P_GO_SET_PROBE_RESP_IE,
551 /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA
552 * attribute in the beacons/probe responses received.
553 */
554 WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
555 /** set the configure of p2p find offload */
556 WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID,
557 /** set the vendor specific p2p ie data for p2p find offload using */
558 WMI_P2P_DISC_OFFLOAD_APPIE_CMDID,
559 /** set the BSSID/device name pattern of p2p find offload */
560 WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID,
561 /** set OppPS related parameters **/
562 WMI_P2P_SET_OPPPS_PARAM_CMDID,
563
564 /** AP power save specific config */
565 /** set AP power save specific param */
566 WMI_AP_PS_PEER_PARAM_CMDID =
567 WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS),
568 /** set AP UAPSD coex pecific param */
569 WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
570
571 /** set Enhanced Green AP param */
572 WMI_AP_PS_EGAP_PARAM_CMDID,
573
574 /** Rate-control specific commands */
575 WMI_PEER_RATE_RETRY_SCHED_CMDID =
576 WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL),
577
578 /** WLAN Profiling commands. */
579 WMI_WLAN_PROFILE_TRIGGER_CMDID =
580 WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE),
581 WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
582 WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
583 WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
584 WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
585
586 /** Suspend resume command Ids */
587 WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND),
588 WMI_PDEV_RESUME_CMDID,
589
590 /* Beacon filter commands */
591 /** add a beacon filter */
592 WMI_ADD_BCN_FILTER_CMDID =
593 WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER),
594 /** remove a beacon filter */
595 WMI_RMV_BCN_FILTER_CMDID,
596
597 /* WOW Specific WMI commands */
598 /** add pattern for awake */
599 WMI_WOW_ADD_WAKE_PATTERN_CMDID =
600 WMI_CMD_GRP_START_ID(WMI_GRP_WOW),
601 /** deleta a wake pattern */
602 WMI_WOW_DEL_WAKE_PATTERN_CMDID,
603 /** enable/deisable wake event */
604 WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
605 /** enable WOW */
606 WMI_WOW_ENABLE_CMDID,
607 /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */
608 WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
609 /* IOAC add keep alive cmd. */
610 WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID,
611 /* IOAC del keep alive cmd. */
612 WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID,
613 /* IOAC add pattern for awake */
614 WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID,
615 /* IOAC deleta a wake pattern */
616 WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID,
617 /* D0-WOW enable or disable cmd */
618 WMI_D0_WOW_ENABLE_DISABLE_CMDID,
619 /* enable extend WoW */
620 WMI_EXTWOW_ENABLE_CMDID,
621 /* Extend WoW command to configure app type1 parameter */
622 WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID,
623 /* Extend WoW command to configure app type2 parameter */
624 WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID,
625 /* enable ICMPv6 Network advertisement filtering */
626 WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID,
627 /*
628 * Set a pattern to match UDP packet in WOW mode.
629 * If match, construct a tx frame in a local buffer
630 * to send through the peer AP to the entity in the
631 * IP network that sent the UDP packet to this STA.
632 */
633 WMI_WOW_UDP_SVC_OFLD_CMDID,
634
635 /* configure WOW host wakeup PIN pattern */
636 WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID,
637
Anurag Chouhan86eab9b2016-04-21 16:22:47 +0530638 /* Set which action category should wake the host from suspend */
639 WMI_WOW_SET_ACTION_WAKE_UP_CMDID,
640
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800641 /* RTT measurement related cmd */
642 /** request to make an RTT measurement */
643 WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT),
644 /** request to report a tsf measurement */
645 WMI_RTT_TSF_CMDID,
646
647 /** spectral scan command */
648 /** configure spectral scan */
649 WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID =
650 WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL),
651 /** enable/disable spectral scan and trigger */
652 WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
653
654 /* F/W stats */
655 /** one time request for stats */
656 WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS),
657 /** Push MCC Adaptive Scheduler Stats to Firmware */
658 WMI_MCC_SCHED_TRAFFIC_STATS_CMDID,
659 /** one time request for txrx stats */
660 WMI_REQUEST_STATS_EXT_CMDID,
661
662 /* Link Layer stats */
663 /** Request for link layer stats */
664 WMI_REQUEST_LINK_STATS_CMDID,
665 /** Request for setting params to link layer stats */
666 WMI_START_LINK_STATS_CMDID,
667 /** Request to clear stats*/
668 WMI_CLEAR_LINK_STATS_CMDID,
669
670 /** Request for getting the Firmware Memory Dump */
671 WMI_GET_FW_MEM_DUMP_CMDID,
672
673 /** Request to flush of the buffered debug messages */
674 WMI_DEBUG_MESG_FLUSH_CMDID,
675
676 /** Cmd to configure the verbose level */
677 WMI_DIAG_EVENT_LOG_CONFIG_CMDID,
678
679 /** ARP OFFLOAD REQUEST*/
680 WMI_SET_ARP_NS_OFFLOAD_CMDID =
681 WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
682
683 /** Proactive ARP Response Add Pattern Command*/
684 WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID,
685
686 /** Proactive ARP Response Del Pattern Command*/
687 WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID,
688
689 /** NS offload config*/
690 WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID =
691 WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL),
692
693 /** APFIND Config */
694 WMI_APFIND_CMDID,
695
696 /** Passpoint list config */
697 WMI_PASSPOINT_LIST_CONFIG_CMDID,
698
699 /** configure supprssing parameters for MAWC */
700 WMI_NLO_CONFIGURE_MAWC_CMDID,
701
702 /* GTK offload Specific WMI commands */
703 WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL),
704
705 /* CSA offload Specific WMI commands */
706 /** csa offload enable */
707 WMI_CSA_OFFLOAD_ENABLE_CMDID =
708 WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL),
709 /** chan switch command */
710 WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
711
712 /* Chatter commands */
713 /* Change chatter mode of operation */
714 WMI_CHATTER_SET_MODE_CMDID =
715 WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER),
716 /** chatter add coalescing filter command */
717 WMI_CHATTER_ADD_COALESCING_FILTER_CMDID,
718 /** chatter delete coalescing filter command */
719 WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID,
720 /** chatter coalecing query command */
721 WMI_CHATTER_COALESCING_QUERY_CMDID,
722
723 /**addba specific commands */
724 /** start the aggregation on this TID */
725 WMI_PEER_TID_ADDBA_CMDID =
726 WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA),
727 /** stop the aggregation on this TID */
728 WMI_PEER_TID_DELBA_CMDID,
729
730 /** set station mimo powersave method */
731 WMI_STA_DTIM_PS_METHOD_CMDID,
732 /** Configure the Station UAPSD AC Auto Trigger Parameters */
733 WMI_STA_UAPSD_AUTO_TRIG_CMDID,
734 /** Configure the Keep Alive Parameters */
735 WMI_STA_KEEPALIVE_CMDID,
736
737 /* Request ssn from target for a sta/tid pair */
738 WMI_BA_REQ_SSN_CMDID,
739 /* misc command group */
740 /** echo command mainly used for testing */
741 WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC),
742
743 /* !!IMPORTANT!!
744 * If you need to add a new WMI command to the WMI_GRP_MISC sub-group,
745 * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID,
746 * as we MUST have a fixed value here to maintain compatibility between
747 * UTF and the ART2 driver
748 */
749 /** UTF WMI commands */
750 WMI_PDEV_UTF_CMDID,
751
752 /** set debug log config */
753 WMI_DBGLOG_CFG_CMDID,
754 /* QVIT specific command id */
755 WMI_PDEV_QVIT_CMDID,
756 /* Factory Testing Mode request command
757 * used for integrated chipsets */
758 WMI_PDEV_FTM_INTG_CMDID,
759 /* set and get keepalive parameters command */
760 WMI_VDEV_SET_KEEPALIVE_CMDID,
761 WMI_VDEV_GET_KEEPALIVE_CMDID,
762 /* For fw recovery test command */
763 WMI_FORCE_FW_HANG_CMDID,
764 /* Set Mcast/Bdcast filter */
765 WMI_SET_MCASTBCAST_FILTER_CMDID,
766 /** set thermal management params **/
767 WMI_THERMAL_MGMT_CMDID,
768 /** set host auto shutdown params **/
769 WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID,
770 /** set tpc chainmask config command */
771 WMI_TPC_CHAINMASK_CONFIG_CMDID,
772 /** set Antenna diversity command */
773 WMI_SET_ANTENNA_DIVERSITY_CMDID,
774 /** Set OCB Sched Request, deprecated */
775 WMI_OCB_SET_SCHED_CMDID,
776 /* Set rssi monitoring config command */
777 WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID,
778 /* Enable/disable Large Receive Offload processing;
779 * provide cfg params */
780 WMI_LRO_CONFIG_CMDID,
Nirav Shahbf6450f2015-11-05 11:47:20 +0530781 /*transfer data from host to firmware to write flash */
782 WMI_TRANSFER_DATA_TO_FLASH_CMDID,
Sreelakshmi Konamki58f4d622016-04-14 18:03:21 +0530783 /** Command to enable/disable filtering of multicast IP with unicast mac */
784 WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID,
Anurag Chouhan05d05fe2016-04-18 17:09:24 +0530785 /** Command to control WISA mode */
786 WMI_VDEV_WISA_CMDID,
Himanshu Agarwalb0497b52016-05-13 21:03:37 +0530787 /** set debug log time stamp sync up with host */
788 WMI_DBGLOG_TIME_STAMP_SYNC_CMDID,
Anurag Chouhan05d05fe2016-04-18 17:09:24 +0530789
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800790 /* GPIO Configuration */
791 WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
792 WMI_GPIO_OUTPUT_CMDID,
793
794 /* Txbf configuration command */
795 WMI_TXBF_CMDID,
796
797 /* FWTEST Commands */
798 WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID =
799 WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
800 /** set NoA descs **/
801 WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
802 /* UNIT Tests */
803 WMI_UNIT_TEST_CMDID,
Govind Singhc7d51942016-02-01 12:09:31 +0530804 /* set debug and tuning parameters */
805 WMI_FWTEST_CMDID,
806 /* Q-Boost configuration test commands */
807 WMI_QBOOST_CFG_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800808
809 /** TDLS Configuration */
810 /** enable/disable TDLS */
811 WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS),
812 /** set tdls peer state */
813 WMI_TDLS_PEER_UPDATE_CMDID,
814 /** TDLS Offchannel control */
815 WMI_TDLS_SET_OFFCHAN_MODE_CMDID,
816
817 /** Resmgr Configuration */
818 /** Adaptive OCS is enabled by default in the FW. This command is used to
819 * disable FW based adaptive OCS.
820 */
821 WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID =
822 WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR),
823 /** set the requested channel time quota for the home channels */
824 WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID,
825 /** set the requested latency for the home channels */
826 WMI_RESMGR_SET_CHAN_LATENCY_CMDID,
827
828 /** STA SMPS Configuration */
829 /** force SMPS mode */
830 WMI_STA_SMPS_FORCE_MODE_CMDID =
831 WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS),
832 /** set SMPS parameters */
833 WMI_STA_SMPS_PARAM_CMDID,
834
835 /* Wlan HB commands */
836 /* enalbe/disable wlan HB */
837 WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB),
838 /* set tcp parameters for wlan HB */
839 WMI_HB_SET_TCP_PARAMS_CMDID,
840 /* set tcp pkt filter for wlan HB */
841 WMI_HB_SET_TCP_PKT_FILTER_CMDID,
842 /* set udp parameters for wlan HB */
843 WMI_HB_SET_UDP_PARAMS_CMDID,
844 /* set udp pkt filter for wlan HB */
845 WMI_HB_SET_UDP_PKT_FILTER_CMDID,
846
847 /** Wlan RMC commands*/
848 /** enable/disable RMC */
849 WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC),
850 /** configure action frame period */
851 WMI_RMC_SET_ACTION_PERIOD_CMDID,
852 /** For debug/future enhancement purposes only,
853 * configures/finetunes RMC algorithms */
854 WMI_RMC_CONFIG_CMDID,
855
856 /** WLAN MHF offload commands */
857 /** enable/disable MHF offload */
858 WMI_MHF_OFFLOAD_SET_MODE_CMDID =
859 WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL),
860 /** Plumb routing table for MHF offload */
861 WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID,
862
863 /*location scan commands */
864 /*start batch scan */
865 WMI_BATCH_SCAN_ENABLE_CMDID =
866 WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
867 /*stop batch scan */
868 WMI_BATCH_SCAN_DISABLE_CMDID,
869 /*get batch scan result */
870 WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID,
871 /* OEM related cmd */
Manikandan Mohan05ac7ee2015-12-23 14:18:36 -0800872 WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM),
873 WMI_OEM_REQUEST_CMDID, /* UNUSED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800874
875 /** Nan Request */
876 WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN),
877
878 /** Modem power state command */
879 WMI_MODEM_POWER_STATE_CMDID =
880 WMI_CMD_GRP_START_ID(WMI_GRP_COEX),
881 WMI_CHAN_AVOID_UPDATE_CMDID,
Sreelakshmi Konamki02a4d7c2016-04-14 17:46:54 +0530882 WMI_COEX_CONFIG_CMDID,
Sandeep Puligillaff55fec2016-03-09 12:54:23 -0800883 WMI_CHAN_AVOID_RPT_ALLOW_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800884
885 /**
886 * OBSS scan offload enable/disable commands
887 * OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true:
888 * 1. WMI_SERVICE_OBSS_SCAN is reported by FW in service ready,
889 * 2. STA connect to a 2.4Ghz ht20/ht40 AP,
890 * 3. AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response)
891 * If OBSS parameters from beacon changed, also use enable CMD to update parameters.
892 * OBSS scan disable CMD will send to FW if have enabled when tearing down connection.
893 */
894 WMI_OBSS_SCAN_ENABLE_CMDID =
895 WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL),
896 WMI_OBSS_SCAN_DISABLE_CMDID,
897
898 /**LPI commands*/
899 /**LPI mgmt snooping config command*/
900 WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID =
901 WMI_CMD_GRP_START_ID(WMI_GRP_LPI),
902 /**LPI scan start command*/
903 WMI_LPI_START_SCAN_CMDID,
904 /**LPI scan stop command*/
905 WMI_LPI_STOP_SCAN_CMDID,
906
907 /** ExtScan commands */
908 WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN),
909 WMI_EXTSCAN_STOP_CMDID,
910 WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID,
911 WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID,
912 WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID,
913 WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID,
914 WMI_EXTSCAN_SET_CAPABILITIES_CMDID,
915 WMI_EXTSCAN_GET_CAPABILITIES_CMDID,
916 WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID,
917 WMI_EXTSCAN_CONFIGURE_MAWC_CMDID,
918
919 /** DHCP server offload commands */
920 WMI_SET_DHCP_SERVER_OFFLOAD_CMDID =
921 WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL),
922
923 /** IPA Offload features related commands */
924 WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID =
925 WMI_CMD_GRP_START_ID(WMI_GRP_IPA),
926
927 /** mDNS responder offload commands */
928 WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL),
929 WMI_MDNS_SET_FQDN_CMDID,
930 WMI_MDNS_SET_RESPONSE_CMDID,
931 WMI_MDNS_GET_STATS_CMDID,
932
933 /* enable/disable AP Authentication offload */
934 WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL),
935 WMI_SAP_SET_BLACKLIST_PARAM_CMDID,
936
937 /** Out-of-context-of-BSS (OCB) commands */
938 WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB),
939 WMI_OCB_SET_UTC_TIME_CMDID,
940 WMI_OCB_START_TIMING_ADVERT_CMDID,
941 WMI_OCB_STOP_TIMING_ADVERT_CMDID,
942 WMI_OCB_GET_TSF_TIMER_CMDID,
943 WMI_DCC_GET_STATS_CMDID,
944 WMI_DCC_CLEAR_STATS_CMDID,
945 WMI_DCC_UPDATE_NDL_CMDID,
946 /* System-On-Chip commands */
947 WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
948 WMI_SOC_SET_HW_MODE_CMDID,
949 WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID,
950 WMI_SOC_SET_ANTENNA_MODE_CMDID,
951
952 /* packet filter commands */
953 WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER),
954 WMI_PACKET_FILTER_ENABLE_CMDID,
955 /** Motion Aided WiFi Connectivity (MAWC) commands */
956 WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC),
957
958 /** WMI commands related to PMF 11w Offload */
959 WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID =
960 WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD),
961
Manikandan Mohan130eb572015-12-23 13:53:34 -0800962 /** WMI commands related to pkt filter (BPF) offload */
963 WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
964 WMI_BPF_GET_VDEV_STATS_CMDID,
965 WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
966 WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
Govind Singh941bd5e2016-02-04 17:15:25 +0530967 /**
968 * Nan Data commands
969 * NDI - NAN Data Interface
970 * NDP - NAN Data Path
971 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +0530972 /* Commands in prototyping phase */
973 WMI_NDI_GET_CAP_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROTOTYPE),
Govind Singh941bd5e2016-02-04 17:15:25 +0530974 WMI_NDP_INITIATOR_REQ_CMDID,
975 WMI_NDP_RESPONDER_REQ_CMDID,
976 WMI_NDP_END_REQ_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800977} WMI_CMD_ID;
978
979typedef enum {
980 /** WMI service is ready; after this event WMI messages can be sent/received */
981 WMI_SERVICE_READY_EVENTID = 0x1,
982 /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */
983 WMI_READY_EVENTID,
984
985 /** Scan specific events */
986 WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
987
988 /* PDEV specific events */
989 /** TPC config for the current operating channel */
990 WMI_PDEV_TPC_CONFIG_EVENTID =
991 WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
992 /** Channel stats event */
993 WMI_CHAN_INFO_EVENTID,
994
995 /** PHY Error specific WMI event */
996 WMI_PHYERR_EVENTID,
997
998 /** eeprom dump event */
999 WMI_PDEV_DUMP_EVENTID,
1000
1001 /** traffic pause event */
1002 WMI_TX_PAUSE_EVENTID,
1003
1004 /** DFS radar event */
1005 WMI_DFS_RADAR_EVENTID,
1006
1007 /** track L1SS entry and residency event */
1008 WMI_PDEV_L1SS_TRACK_EVENTID,
1009
1010 /** Report current temprature of the chip in Celcius degree */
1011 WMI_PDEV_TEMPERATURE_EVENTID,
1012
1013 /* Extension of WMI_SERVICE_READY msg with
1014 * extra target capability info
1015 */
1016 WMI_SERVICE_READY_EXT_EVENTID,
1017
Govind Singhc7d51942016-02-01 12:09:31 +05301018 /** FIPS test mode event */
1019 WMI_PDEV_FIPS_EVENTID,
1020
1021 /** Channel hopping avoidance */
1022 WMI_PDEV_CHANNEL_HOPPING_EVENTID,
1023
1024 /** CCK ANI level event */
1025 WMI_PDEV_ANI_CCK_LEVEL_EVENTID,
1026
1027 /** OFDM ANI level event */
1028 WMI_PDEV_ANI_OFDM_LEVEL_EVENTID,
1029
1030 /** Tx PPDU params */
1031 WMI_PDEV_TPC_EVENTID,
1032
1033 /** NF Cal Power in DBR/DBM for all channels */
1034 WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
Govind Singh869c9872016-02-22 18:36:34 +05301035
1036 /** SOC/PDEV events */
1037 WMI_PDEV_SET_HW_MODE_RESP_EVENTID,
1038 WMI_PDEV_HW_MODE_TRANSITION_EVENTID,
1039 WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID,
1040
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001041 /* VDEV specific events */
1042 /** VDEV started event in response to VDEV_START request */
1043 WMI_VDEV_START_RESP_EVENTID =
1044 WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
1045 /** vdev stopped event , generated in response to VDEV_STOP request */
1046 WMI_VDEV_STOPPED_EVENTID,
1047 /* Indicate the set key (used for setting per
1048 * peer unicast and per vdev multicast)
1049 * operation has completed */
1050 WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
1051 /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please
1052 don't use this for any new implementations */
1053 /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario.
1054 This request is valid only for vdevs operating in soft AP or P2P GO mode */
1055 WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID,
1056
1057 /* Return the TSF timestamp of specified vdev */
1058 WMI_VDEV_TSF_REPORT_EVENTID,
Manikandan Mohan429a0782015-12-23 14:35:54 -08001059
1060 /* FW response to Host for vdev delete cmdid */
1061 WMI_VDEV_DELETE_RESP_EVENTID,
1062
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001063 /* peer specific events */
1064 /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
1065 WMI_PEER_STA_KICKOUT_EVENTID =
1066 WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
1067
1068 /** Peer Info Event with data_rate, rssi, tx_fail_cnt etc */
1069 WMI_PEER_INFO_EVENTID,
1070
1071 /** Event indicating that TX fail count reaching threshold */
1072 WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
1073 /** Return the estimate link speed for the Peer specified in the
1074 * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command.
1075 */
1076 WMI_PEER_ESTIMATED_LINKSPEED_EVENTID,
1077 /* Return the peer state
1078 * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE
1079 */
1080 WMI_PEER_STATE_EVENTID,
1081
1082 /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD.
1083 * After that, host will send Mx message.
1084 * Otherwise, host will pause any Mx(STA:M2/M4) message
1085 */
1086 WMI_PEER_ASSOC_CONF_EVENTID,
1087
Manikandan Mohan429a0782015-12-23 14:35:54 -08001088 /* FW response to Host for peer delete cmdid */
1089 WMI_PEER_DELETE_RESP_EVENTID,
1090
Govind Singhc7d51942016-02-01 12:09:31 +05301091 /** Valid rate code list for peer */
1092 WMI_PEER_RATECODE_LIST_EVENTID,
1093 WMI_WDS_PEER_EVENTID,
1094 WMI_PEER_STA_PS_STATECHG_EVENTID,
1095
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001096 /* beacon/mgmt specific events */
1097 /** RX management frame. the entire frame is carried along with the event. */
1098 WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
1099 /** software beacon alert event to Host requesting host to Queue a beacon for transmission
1100 use only in host beacon mode */
1101 WMI_HOST_SWBA_EVENTID,
1102 /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theritical value.
1103 tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in
1104 staggered beacon transmission mode */
1105 WMI_TBTTOFFSET_UPDATE_EVENTID,
1106
1107 /** event after the first beacon is transmitted following
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301108 a change in the template.*/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001109 WMI_OFFLOAD_BCN_TX_STATUS_EVENTID,
1110 /** event after the first probe response is transmitted following
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301111 a change in the template.*/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001112 WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID,
1113 /** Event for Mgmt TX completion event */
1114 WMI_MGMT_TX_COMPLETION_EVENTID,
1115
1116 /*ADDBA Related WMI Events */
1117 /** Indication the completion of the prior
1118 WMI_PEER_TID_DELBA_CMDID(initiator) */
1119 WMI_TX_DELBA_COMPLETE_EVENTID =
1120 WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
1121 /** Indication the completion of the prior
1122 *WMI_PEER_TID_ADDBA_CMDID(initiator) */
1123 WMI_TX_ADDBA_COMPLETE_EVENTID,
1124
1125 /* Seq num returned from hw for a sta/tid pair */
1126 WMI_BA_RSP_SSN_EVENTID,
1127
1128 /* Aggregation state requested by BTC */
1129 WMI_AGGR_STATE_TRIG_EVENTID,
1130
1131 /** Roam event to trigger roaming on host */
1132 WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
1133
1134 /** matching AP found from list of profiles */
1135 WMI_PROFILE_MATCH,
1136 /** roam synch event */
1137 WMI_ROAM_SYNCH_EVENTID,
1138
1139 /** P2P disc found */
1140 WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
1141
1142 /*send noa info to host when noa is changed for beacon tx offload enable */
1143 WMI_P2P_NOA_EVENTID,
1144
1145 /** Send EGAP Info to host */
1146 WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS),
1147
1148 /* send pdev resume event to host after pdev resume. */
1149 WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND),
1150
1151 /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID.
1152 will cary wake reason */
1153 WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
1154 WMI_D0_WOW_DISABLE_ACK_EVENTID,
1155 WMI_WOW_INITIAL_WAKEUP_EVENTID,
1156
1157 /*RTT related event ID */
1158 /** RTT measurement report */
1159 WMI_RTT_MEASUREMENT_REPORT_EVENTID =
1160 WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
1161 /** TSF measurement report */
1162 WMI_TSF_MEASUREMENT_REPORT_EVENTID,
1163 /** RTT error report */
1164 WMI_RTT_ERROR_REPORT_EVENTID,
1165 /*STATS specific events */
1166 /** txrx stats event requested by host */
1167 WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS),
1168 /** FW iface link stats Event */
1169 WMI_IFACE_LINK_STATS_EVENTID,
1170 /** FW iface peer link stats Event */
1171 WMI_PEER_LINK_STATS_EVENTID,
1172 /** FW Update radio stats Event */
1173 WMI_RADIO_LINK_STATS_EVENTID,
1174 /** Firmware memory dump Complete event*/
1175 WMI_UPDATE_FW_MEM_DUMP_EVENTID,
1176
1177 /** Event indicating the DIAG logs/events supported by FW */
1178 WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID,
1179
Anurag Chouhan90c1a182016-04-18 17:20:38 +05301180 /** Instantaneous RSSI event */
Govind Singhc7d51942016-02-01 12:09:31 +05301181 WMI_INST_RSSI_STATS_EVENTID,
1182
Anurag Chouhan90c1a182016-04-18 17:20:38 +05301183 /** FW update tx power levels event */
1184 WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID,
1185
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001186 /** NLO specific events */
1187 /** NLO match event after the first match */
1188 WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
1189
1190 /** NLO scan complete event */
1191 WMI_NLO_SCAN_COMPLETE_EVENTID,
1192
1193 /** APFIND specific events */
1194 WMI_APFIND_EVENTID,
1195
1196 /** passpoint network match event */
1197 WMI_PASSPOINT_MATCH_EVENTID,
1198
1199 /** GTK offload stautus event requested by host */
1200 WMI_GTK_OFFLOAD_STATUS_EVENTID =
1201 WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
1202
1203 /** GTK offload failed to rekey event */
1204 WMI_GTK_REKEY_FAIL_EVENTID,
1205 /* CSA IE received event */
1206 WMI_CSA_HANDLING_EVENTID =
1207 WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
1208
1209 /*chatter query reply event */
1210 WMI_CHATTER_PC_QUERY_EVENTID =
1211 WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER),
1212
1213 /** echo event in response to echo command */
1214 WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
1215
1216 /* !!IMPORTANT!!
1217 * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group,
1218 * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID,
1219 * as we MUST have a fixed value here to maintain compatibility between
1220 * UTF and the ART2 driver
1221 */
1222 /** UTF specific WMI event */
1223 WMI_PDEV_UTF_EVENTID,
1224
1225 /** event carries buffered debug messages */
1226 WMI_DEBUG_MESG_EVENTID,
1227 /** FW stats(periodic or on shot) */
1228 WMI_UPDATE_STATS_EVENTID,
1229 /** debug print message used for tracing FW code while debugging */
1230 WMI_DEBUG_PRINT_EVENTID,
1231 /** DCS wlan or non-wlan interference event
1232 */
1233 WMI_DCS_INTERFERENCE_EVENTID,
1234 /** VI spoecific event */
1235 WMI_PDEV_QVIT_EVENTID,
1236 /** FW code profile data in response to profile request */
1237 WMI_WLAN_PROFILE_DATA_EVENTID,
1238 /* Factory Testing Mode request event
1239 * used for integrated chipsets */
1240 WMI_PDEV_FTM_INTG_EVENTID,
1241 /* avoid list of frequencies .
1242 */
1243 WMI_WLAN_FREQ_AVOID_EVENTID,
1244 /* Indicate the keepalive parameters */
1245 WMI_VDEV_GET_KEEPALIVE_EVENTID,
1246 /* Thermal Management event */
1247 WMI_THERMAL_MGMT_EVENTID,
1248
1249 /* Container for QXDM/DIAG events */
1250 WMI_DIAG_DATA_CONTAINER_EVENTID,
1251
1252 /* host auto shutdown event */
1253 WMI_HOST_AUTO_SHUTDOWN_EVENTID,
1254
1255 /*update mib counters together with WMI_UPDATE_STATS_EVENTID */
1256 WMI_UPDATE_WHAL_MIB_STATS_EVENTID,
1257
1258 /*update ht/vht info based on vdev (rx and tx NSS and preamble) */
1259 WMI_UPDATE_VDEV_RATE_STATS_EVENTID,
1260
1261 WMI_DIAG_EVENTID,
1262
1263 /** Set OCB Sched Response, deprecated */
1264 WMI_OCB_SET_SCHED_EVENTID,
1265
1266 /* event to indicate the flush of the buffered debug messages is complete*/
1267 WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID,
1268 /* event to report mix/max RSSI breach events */
1269 WMI_RSSI_BREACH_EVENTID,
Nirav Shahbf6450f2015-11-05 11:47:20 +05301270 /* event to report completion of data storage into flash memory */
1271 WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001272
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -08001273 /** event to report SCPC calibrated data to host */
1274 WMI_PDEV_UTF_SCPC_EVENTID,
1275
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001276 /* GPIO Event */
1277 WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
1278 /** upload H_CV info WMI event
1279 * to indicate uploaded H_CV info to host
1280 */
1281 WMI_UPLOADH_EVENTID,
1282
1283 /** capture H info WMI event
1284 * to indicate captured H info to host
1285 */
1286 WMI_CAPTUREH_EVENTID,
1287 /* hw RFkill */
1288 WMI_RFKILL_STATE_CHANGE_EVENTID,
1289
1290 /* TDLS Event */
1291 WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
1292
Manikandan Mohan55c94d62015-12-04 13:47:58 -08001293 /* STA SMPS Event */
1294 /* force SMPS mode */
1295 WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID =
1296 WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS),
1297
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001298 /*location scan event */
1299 /*report the firmware's capability of batch scan */
1300 WMI_BATCH_SCAN_ENABLED_EVENTID =
1301 WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
1302 /*batch scan result */
1303 WMI_BATCH_SCAN_RESULT_EVENTID,
1304 /* OEM Event */
Krishna Kumaar Natarajan1dfa3532015-11-19 16:16:20 -08001305 WMI_OEM_CAPABILITY_EVENTID = /* DEPRECATED */
1306 WMI_EVT_GRP_START_ID(WMI_GRP_OEM),
1307 WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */
1308 WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */
1309 WMI_OEM_RESPONSE_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001310
1311 /* NAN Event */
1312 WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN),
Govind Singh941bd5e2016-02-04 17:15:25 +05301313 WMI_NAN_DISC_IFACE_CREATED_EVENTID,
1314 WMI_NAN_DISC_IFACE_DELETED_EVENTID,
1315 WMI_NAN_STARTED_CLUSTER_EVENTID,
1316 WMI_NAN_JOINED_CLUSTER_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001317
1318 /* LPI Event */
1319 WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI),
1320 WMI_LPI_STATUS_EVENTID,
1321 WMI_LPI_HANDOFF_EVENTID,
1322
1323 /* ExtScan events */
1324 WMI_EXTSCAN_START_STOP_EVENTID =
1325 WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN),
1326 WMI_EXTSCAN_OPERATION_EVENTID,
1327 WMI_EXTSCAN_TABLE_USAGE_EVENTID,
1328 WMI_EXTSCAN_CACHED_RESULTS_EVENTID,
1329 WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID,
1330 WMI_EXTSCAN_HOTLIST_MATCH_EVENTID,
1331 WMI_EXTSCAN_CAPABILITIES_EVENTID,
1332 WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID,
1333
1334 /* mDNS offload events */
1335 WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL),
1336
1337 /* SAP Authentication offload events */
1338 WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL),
1339 WMI_SAP_OFL_DEL_STA_EVENTID,
1340
1341 /** Out-of-context-of-bss (OCB) events */
1342 WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB),
1343 WMI_OCB_GET_TSF_TIMER_RESP_EVENTID,
1344 WMI_DCC_GET_STATS_RESP_EVENTID,
1345 WMI_DCC_UPDATE_NDL_RESP_EVENTID,
1346 WMI_DCC_STATS_EVENTID,
1347 /* System-On-Chip events */
1348 WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
1349 WMI_SOC_HW_MODE_TRANSITION_EVENTID,
1350 WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID,
1351 /** Motion Aided WiFi Connectivity (MAWC) events */
1352 WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC),
1353
Manikandan Mohan130eb572015-12-23 13:53:34 -08001354 /** pkt filter (BPF) offload relevant events */
Anurag Chouhan08f66c62016-04-18 17:14:51 +05301355 WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
Manikandan Mohan130eb572015-12-23 13:53:34 -08001356 WMI_BPF_VDEV_STATS_INFO_EVENTID,
Govind Singh941bd5e2016-02-04 17:15:25 +05301357
Anurag Chouhan08f66c62016-04-18 17:14:51 +05301358 /* Events in Prototyping phase */
1359 WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE),
Govind Singh941bd5e2016-02-04 17:15:25 +05301360 WMI_NDP_INITIATOR_RSP_EVENTID,
1361 WMI_NDP_RESPONDER_RSP_EVENTID,
1362 WMI_NDP_END_RSP_EVENTID,
1363 WMI_NDP_INDICATION_EVENTID,
1364 WMI_NDP_CONFIRM_EVENTID,
1365 WMI_NDP_END_INDICATION_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001366} WMI_EVT_ID;
1367
1368/* defines for OEM message sub-types */
1369#define WMI_OEM_CAPABILITY_REQ 0x01
1370#define WMI_OEM_CAPABILITY_RSP 0x02
1371#define WMI_OEM_MEASUREMENT_REQ 0x03
1372#define WMI_OEM_MEASUREMENT_RSP 0x04
1373#define WMI_OEM_ERROR_REPORT_RSP 0x05
1374#define WMI_OEM_NAN_MEAS_REQ 0x06
1375#define WMI_OEM_NAN_MEAS_RSP 0x07
1376#define WMI_OEM_NAN_PEER_INFO 0x08
1377#define WMI_OEM_CONFIGURE_LCR 0x09
1378#define WMI_OEM_CONFIGURE_LCI 0x0A
1379
1380/* below message subtype is internal to CLD. Target should
1381 * never use internal response type
1382 */
1383#define WMI_OEM_INTERNAL_RSP 0xdeadbeef
1384
Govind Singh941bd5e2016-02-04 17:15:25 +05301385#define WMI_CHAN_LIST_TAG 0x1
1386#define WMI_SSID_LIST_TAG 0x2
1387#define WMI_BSSID_LIST_TAG 0x3
1388#define WMI_IE_TAG 0x4
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001389
1390typedef struct {
1391 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
1392 /** primary 20 MHz channel frequency in mhz */
1393 A_UINT32 mhz;
1394 /** Center frequency 1 in MHz*/
1395 A_UINT32 band_center_freq1;
1396 /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
1397 A_UINT32 band_center_freq2;
1398 /** channel info described below */
1399 A_UINT32 info;
1400 /** contains min power, max power, reg power and reg class id. */
1401 A_UINT32 reg_info_1;
1402 /** contains antennamax */
1403 A_UINT32 reg_info_2;
1404} wmi_channel;
1405
1406typedef enum {
1407 WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
1408 WMI_CHANNEL_CHANGE_CAUSE_CSA,
1409} wmi_channel_change_cause;
1410
1411/** channel info consists of 6 bits of channel mode */
1412
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301413#define WMI_SET_CHANNEL_MODE(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001414 (pwmi_channel)->info &= 0xffffffc0; \
1415 (pwmi_channel)->info |= (val); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301416} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001417
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301418#define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001419
1420#define WMI_CHAN_FLAG_HT40_PLUS 6
1421#define WMI_CHAN_FLAG_PASSIVE 7
1422#define WMI_CHAN_ADHOC_ALLOWED 8
1423#define WMI_CHAN_AP_DISABLED 9
1424#define WMI_CHAN_FLAG_DFS 10
1425#define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */
1426#define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */
1427#define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */
1428#define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */
1429#define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */
Govind Singh32cced32016-02-01 13:33:09 +05301430/* Enable radar event reporting for sec80 in VHT80p80 */
1431#define WMI_CHAN_FLAG_DFS_CFREQ2 16
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001432
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301433#define WMI_SET_CHANNEL_FLAG(pwmi_channel, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001434 (pwmi_channel)->info |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301435} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001436
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301437#define WMI_GET_CHANNEL_FLAG(pwmi_channel, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001438 (((pwmi_channel)->info & (1 << flag)) >> flag)
1439
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301440#define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001441 (pwmi_channel)->reg_info_1 &= 0xffffff00; \
1442 (pwmi_channel)->reg_info_1 |= (val&0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301443} while (0)
1444#define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001445
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301446#define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001447 (pwmi_channel)->reg_info_1 &= 0xffff00ff; \
1448 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 8); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301449} while (0)
1450#define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001451
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301452#define WMI_SET_CHANNEL_REG_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001453 (pwmi_channel)->reg_info_1 &= 0xff00ffff; \
1454 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 16); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301455} while (0)
1456#define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
1457#define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001458 (pwmi_channel)->reg_info_1 &= 0x00ffffff; \
1459 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 24); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301460} while (0)
1461#define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001462
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301463#define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001464 (pwmi_channel)->reg_info_2 &= 0xffffff00; \
1465 (pwmi_channel)->reg_info_2 |= (val&0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301466} while (0)
1467#define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001468
1469/* max tx power is in 1 dBm units */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301470#define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001471 (pwmi_channel)->reg_info_2 &= 0xffff00ff; \
1472 (pwmi_channel)->reg_info_2 |= ((val&0xff)<<8); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301473} while (0)
1474#define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001475
1476
1477/** HT Capabilities*/
1478#define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
1479#define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
1480#define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
1481#define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
1482#define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
1483#define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
1484#define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
1485#define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
1486#define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
1487#define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
1488#define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
1489#define WMI_HT_CAP_HT40_SGI 0x0800
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301490#define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */
1491#define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001492
1493/* These macros should be used when we wish to advertise STBC support for
1494 * only 1SS or 2SS or 3SS. */
1495#define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
1496#define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
1497#define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
1498
1499#define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
1500 WMI_HT_CAP_HT20_SGI | \
1501 WMI_HT_CAP_HT40_SGI | \
1502 WMI_HT_CAP_TX_STBC | \
1503 WMI_HT_CAP_RX_STBC | \
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301504 WMI_HT_CAP_LDPC | \
1505 WMI_HT_CAP_TX_LDPC | \
1506 WMI_HT_CAP_RX_LDPC)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001507
1508/* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
1509 field. The fields not defined here are not supported, or reserved.
1510 Do not change these masks and if you have to add new one follow the
1511 bitmask as specified by 802.11ac draft.
1512 */
1513
1514#define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
1515#define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
1516#define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
1517#define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004
1518#define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008
1519#define WMI_VHT_CAP_RX_LDPC 0x00000010
1520#define WMI_VHT_CAP_SGI_80MHZ 0x00000020
1521#define WMI_VHT_CAP_SGI_160MHZ 0x00000040
1522#define WMI_VHT_CAP_TX_STBC 0x00000080
1523#define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
1524#define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
1525#define WMI_VHT_CAP_SU_BFORMER 0x00000800
1526#define WMI_VHT_CAP_SU_BFORMEE 0x00001000
1527#define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
1528#define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
1529#define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
1530#define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
1531#define WMI_VHT_CAP_MU_BFORMER 0x00080000
1532#define WMI_VHT_CAP_MU_BFORMEE 0x00100000
1533#define WMI_VHT_CAP_TXOP_PS 0x00200000
1534#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
1535#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
1536#define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
1537#define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301538#define WMI_VHT_CAP_TX_LDPC 0x40000000
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001539
1540/* TEMPORARY:
1541 * Preserve the incorrect old name as an alias for the correct new name
1542 * until all references to the old name have been removed from all hosts
1543 * and targets.
1544 */
1545#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
1546
1547/* These macros should be used when we wish to advertise STBC support for
1548 * only 1SS or 2SS or 3SS. */
1549#define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
1550#define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
1551#define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
1552
1553/* TEMPORARY:
1554 * Preserve the incorrect old name as an alias for the correct new name
1555 * until all references to the old name have been removed from all hosts
1556 * and targets.
1557 */
1558#define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
1559
1560#define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
1561 WMI_VHT_CAP_SGI_80MHZ | \
1562 WMI_VHT_CAP_TX_STBC | \
1563 WMI_VHT_CAP_RX_STBC_MASK | \
1564 WMI_VHT_CAP_RX_LDPC | \
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301565 WMI_VHT_CAP_TX_LDPC | \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001566 WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
1567 WMI_VHT_CAP_RX_FIXED_ANT | \
1568 WMI_VHT_CAP_TX_FIXED_ANT)
1569
1570/* Interested readers refer to Rx/Tx MCS Map definition as defined in
1571 802.11ac
1572 */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301573#define WMI_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001574#define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
1575#define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
1576
Govind Singhd24f5e42016-02-22 15:16:46 +05301577/** 11ax capabilities */
1578#define WMI_HE_CAP_PPE_PRESENT 0x00000001
1579#define WMI_HE_CAP_TWT_RESPONDER_SUPPORT 0x00000002
1580#define WMI_HE_CAP_TWT_REQUESTER_SUPPORT 0x00000004
1581#define WMI_HE_FRAG_SUPPORT_MASK 0x00000018
1582#define WMI_HE_FRAG_SUPPORT_SHIFT 3
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07001583
1584
1585/* fragmentation support field value */
1586enum {
1587 WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */
1588 /*
1589 * support for fragments within a VHT single MPDU,
1590 * no support for fragments within AMPDU
1591 */
1592 WMI_HE_FRAG_SUPPORT_LEVEL1,
1593 /* support for up to 1 fragment per MSDU within a single A-MPDU */
1594 WMI_HE_FRAG_SUPPORT_LEVEL2,
1595 /* support for multiple fragments per MSDU within an A-MPDU */
1596 WMI_HE_FRAG_SUPPORT_LEVEL3,
1597};
1598
1599
Govind Singhd24f5e42016-02-22 15:16:46 +05301600/** NOTE: This defs cannot be changed in the future without
1601 * breaking WMI compatibility
1602 */
1603#define WMI_MAX_NUM_SS 8
1604#define WMI_MAX_NUM_RU 4
1605
1606/*
1607 * Figure 8 554ae: -PPE Threshold Info field format
1608 * we pack PPET16 and PPT8 for four RU's in one element of array.
1609 *
1610 * ppet16_ppet8_ru3_ru0 array element 0 holds:
1611 * | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 |
1612 *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1|
1613 *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
1614 *
1615 * ppet16_ppet8_ru3_ru0 array element 1 holds:
1616 * | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 |
1617 *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1|
1618 *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
1619 *
1620 * etc.
1621 */
1622
1623/*
1624 * Note that in these macros, "ru" is one-based, not zero-based, while
1625 * nssm1 is zero-based.
1626 */
1627#define WMI_SET_PPET8(ppet16_ppet8_ru3_ru0, ppet, ru, nssm1) \
1628 do { \
1629 ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1)%4)*6)); \
1630 ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1)%4)*6)); \
1631 } while (0)
1632
1633#define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \
1634 ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1)%4)*6))&7)
1635
1636#define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ppet, ru, nssm1) \
1637 do { \
1638 ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1)%4)*6+3)); \
1639 ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1)%4)*6+3)); \
1640 } while (0)
1641
1642#define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \
1643 ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1)%4)*6+3))&7)
1644
1645typedef struct _wmi_ppe_threshold {
1646 A_UINT32 numss_m1; /** NSS - 1*/
1647 A_UINT32 ru_count; /** Max RU count */
1648 /** ppet8 and ppet16 for max num ss */
1649 A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS];
1650} wmi_ppe_threshold;
1651
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001652/* WMI_SYS_CAPS_* refer to the capabilities that system support
1653 */
1654#define WMI_SYS_CAP_ENABLE 0x00000001
1655#define WMI_SYS_CAP_TXPOWER 0x00000002
1656
1657/*
1658 * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
1659 * Bits 5:0 are reserved
1660 */
1661#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
1662#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
1663#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
1664#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
1665#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
1666#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
1667#define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7)
1668#define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
1669
1670#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
1671#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
1672#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
1673#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
1674#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
1675#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
1676#define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
1677#define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
1678
1679#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
1680 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
1681#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
1682 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
1683#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
1684 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
1685#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
1686 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
1687#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
1688 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
1689#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
1690 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
1691#define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \
1692 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
1693#define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
1694 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
1695
1696#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
1697 ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
1698#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
1699 ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
1700#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
1701 ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
1702#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
1703 ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
1704#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
1705 ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
1706#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
1707 ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
1708#define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \
1709 ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
1710#define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \
1711 ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
1712
1713#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31)
1714#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30)
1715#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29)
1716
1717#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
1718#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
1719#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
1720
1721#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
1722 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
1723#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
1724 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
1725#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
1726 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
1727
1728#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \
1729 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
1730#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \
1731 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
1732#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \
1733 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
1734
1735#define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31)
1736#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30)
1737
1738#define WMI_DBS_FW_MODE_CFG_DBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
1739#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
1740
1741#define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
1742 WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
1743#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
1744 WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
1745
1746#define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \
1747 ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
1748#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \
1749 ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
1750
1751/** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
1752typedef struct _wmi_abi_version {
1753 A_UINT32 abi_version_0;
1754 /** WMI Major and Minor versions */
1755 A_UINT32 abi_version_1;
1756 /** WMI change revision */
1757 A_UINT32 abi_version_ns_0;
1758 /** ABI version namespace first four dwords */
1759 A_UINT32 abi_version_ns_1;
1760 /** ABI version namespace second four dwords */
1761 A_UINT32 abi_version_ns_2;
1762 /** ABI version namespace third four dwords */
1763 A_UINT32 abi_version_ns_3;
1764 /** ABI version namespace fourth four dwords */
1765} wmi_abi_version;
1766
1767/*
1768 * maximum number of memroy requests allowed from FW.
1769 */
1770#define WMI_MAX_MEM_REQS 16
1771
1772/* !!NOTE!!:
1773 * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
1774 * Please don't change it.
1775 */
1776#define HW_BD_INFO_SIZE 5
1777
1778/**
Govind Singh869c9872016-02-22 18:36:34 +05301779 * PDEV ID to identify the physical device,
1780 * value 0 reserved for SOC level commands/event
1781 */
1782#define WMI_PDEV_ID_SOC 0 /* SOC level, applicable to all PDEVs */
1783#define WMI_PDEV_ID_1ST 1 /* first pdev (pdev 0) */
1784#define WMI_PDEV_ID_2ND 2 /* second pdev (pdev 1) */
1785#define WMI_PDEV_ID_3RD 3 /* third pdev (pdev 2) */
1786
1787/**
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001788 * The following struct holds optional payload for
1789 * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
1790 * device capability to the host.
1791 */
1792typedef struct {
1793 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
1794 A_UINT32 fw_build_vers; /* firmware build number */
1795 wmi_abi_version fw_abi_vers;
1796 A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
1797 A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
1798 A_UINT32 num_rf_chains;
1799 /* The following field is only valid for service type WMI_SERVICE_11AC */
1800 A_UINT32 ht_cap_info; /* WMI HT Capability */
1801 A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
1802 A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
1803 A_UINT32 hw_min_tx_power;
1804 A_UINT32 hw_max_tx_power;
1805 A_UINT32 sys_cap_info;
1806 A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
1807 /** Max beacon and Probe Response IE offload size (includes
1808 * optional P2P IEs) */
1809 A_UINT32 max_bcn_ie_size;
1810 /*
1811 * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
1812 * FW uses this as FW extesnsion memory for saving its data structures. Only valid
1813 * for low latency interfaces like PCIE where FW can access this memory directly (or)
1814 * by DMA.
1815 */
1816 A_UINT32 num_mem_reqs;
1817 /* Max No. scan channels target can support
1818 * If FW is too old and doesn't indicate this number, host side value will default to
1819 * 0, and host will take the original compatible value (62) for future scan channel
1820 * setup.
1821 */
1822 A_UINT32 max_num_scan_channels;
1823
1824 /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
1825 * Default 0 means tha hw_bd_info[] is invalid(legacy board).
1826 */
1827 A_UINT32 hw_bd_id;
1828 A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
1829
1830 /*
1831 * Number of MACs supported, i.e. a DBS-capable device will return 2
1832 */
1833 A_UINT32 max_supported_macs;
1834
1835 /*
1836 * FW sub-feature capabilities to be used in concurrence with
1837 * wmi_service_bitmap
1838 * values from enum WMI_FW_SUB_FEAT_CAPS
1839 */
1840 A_UINT32 wmi_fw_sub_feat_caps;
1841 /*
1842 * Number of Dual Band Simultaneous (DBS) hardware modes
1843 */
1844 A_UINT32 num_dbs_hw_modes;
1845 /*
1846 * txrx_chainmask
1847 * [7:0] - 2G band tx chain mask
1848 * [15:8] - 2G band rx chain mask
1849 * [23:16] - 5G band tx chain mask
1850 * [31:24] - 5G band rx chain mask
1851 *
1852 */
1853 A_UINT32 txrx_chainmask;
1854
1855 /*
1856 * default Dual Band Simultaneous (DBS) hardware mode
1857 */
1858 A_UINT32 default_dbs_hw_mode_index;
1859
1860 /*
1861 * Number of msdu descriptors target would use
1862 */
1863 A_UINT32 num_msdu_desc;
1864
1865 /* The TLVs for hal_reg_capabilities, wmi_service_bitmap and mem_reqs[] will follow this TLV.
1866 * HAL_REG_CAPABILITIES hal_reg_capabilities;
1867 * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
1868 * wlan_host_mem_req mem_reqs[];
1869 * wlan_dbs_hw_mode_list[];
1870 */
1871} wmi_service_ready_event_fixed_param;
1872
1873typedef struct {
1874 /* TLV tag and len; tag equals
1875 *WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT
1876 */
1877 A_UINT32 tlv_header;
1878 /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
1879 A_UINT32 default_conc_scan_config_bits;
1880 /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
1881 A_UINT32 default_fw_config_bits;
Govind Singhd24f5e42016-02-22 15:16:46 +05301882 wmi_ppe_threshold ppet;
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07001883 /*
1884 * see section 8.4.2.213 from draft r8 of 802.11ax;
1885 * see WMI_HE_FRAG_SUPPORT enum
1886 */
Govind Singhd24f5e42016-02-22 15:16:46 +05301887 A_UINT32 he_cap_info;
Govind Singh76d82bc2016-02-22 15:39:48 +05301888 /*
1889 * An HT STA shall not allow transmission of more than one MPDU start
1890 * within the time limit described in the MPDU maximum density field.
1891 */
1892 A_UINT32 mpdu_density; /* units are microseconds */
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05301893 /*
1894 * Maximum no of BSSID based RX filters host can program
1895 * Value 0 means FW hasn't given any limit to host.
1896 */
1897 A_UINT32 max_bssid_rx_filters;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001898} wmi_service_ready_ext_event_fixed_param;
1899
1900typedef enum {
1901 WMI_HWBD_NONE = 0, /* No hw board information is given */
1902 WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */
1903 WMI_HWBD_QCA2582 = 2, /* Killer 1525 */
1904} WMI_HWBD_ID;
1905
1906typedef enum {
1907 WMI_FW_STA_RTT_INITR = 0x00000001,
1908 WMI_FW_STA_RTT_RESPR = 0x00000002,
1909 WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
1910 WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
1911 WMI_FW_P2P_GO_RTT_INITR = 0x00000010,
1912 WMI_FW_P2P_GO_RTT_RESPR = 0x00000020,
1913 WMI_FW_AP_RTT_INITR = 0x00000040,
1914 WMI_FW_AP_RTT_RESPR = 0x00000080,
1915 WMI_FW_NAN_RTT_INITR = 0x00000100,
1916 WMI_FW_NAN_RTT_RESPR = 0x00000200,
1917 /*
1918 * New fw sub feature capabilites before
1919 * WMI_FW_MAX_SUB_FEAT_CAP
1920 */
1921 WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000,
1922} WMI_FW_SUB_FEAT_CAPS;
1923
1924#define ATH_BD_DATA_REV_MASK 0x000000FF
1925#define ATH_BD_DATA_REV_SHIFT 0
1926
1927#define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00
1928#define ATH_BD_DATA_PROJ_ID_SHIFT 8
1929
1930#define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000
1931#define ATH_BD_DATA_CUST_ID_SHIFT 16
1932
1933#define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000
1934#define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
1935
1936#define SET_BD_DATA_REV(bd_data_ver, value) \
1937 ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
1938
1939#define GET_BD_DATA_REV(bd_data_ver) \
1940 (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
1941
1942#define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
1943 ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
1944
1945#define GET_BD_DATA_PROJ_ID(bd_data_ver) \
1946 (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
1947
1948#define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
1949 ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
1950
1951#define GET_BD_DATA_CUST_ID(bd_data_ver) \
1952 (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
1953
1954#define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \
1955 ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
1956
1957#define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \
1958 (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
1959
1960#ifdef ROME_LTE_COEX_FREQ_AVOID
1961typedef struct {
1962 A_UINT32 start_freq; /* start frequency, not channel center freq */
1963 A_UINT32 end_freq; /* end frequency */
1964} avoid_freq_range_desc;
1965
1966typedef struct {
1967 /* bad channel range count, multi range is allowed, 0 means all channel clear */
1968 A_UINT32 num_freq_ranges;
1969 /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
1970 avoid_freq_range_desc avd_freq_range[0];
1971} wmi_wlan_avoid_freq_ranges_event;
1972#endif
1973
1974/** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that retuned status */
1975#define WLAN_INIT_STATUS_SUCCESS 0x0
1976#define WLAN_INIT_STATUS_GEN_FAILED 0x1
1977#define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
1978#define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
1979
1980typedef A_UINT32 WLAN_INIT_STATUS;
1981
1982typedef struct {
1983 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
1984 wmi_abi_version fw_abi_vers;
1985 wmi_mac_addr mac_addr;
1986 A_UINT32 status;
Rajeev Kumare18f5282016-04-15 14:08:29 -07001987 A_UINT32 num_dscp_table;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001988} wmi_ready_event_fixed_param;
1989
1990typedef struct {
1991 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
1992/**
1993 * @brief num_vdev - number of virtual devices (VAPs) to support
1994 */
1995 A_UINT32 num_vdevs;
1996/**
1997 * @brief num_peers - number of peer nodes to support
1998 */
1999 A_UINT32 num_peers;
2000/*
2001 * @brief In offload mode target supports features like WOW, chatter and other
2002 * protocol offloads. In order to support them some functionalities like
2003 * reorder buffering, PN checking need to be done in target. This determines
2004 * maximum number of peers suported by target in offload mode
2005 */
2006 A_UINT32 num_offload_peers;
2007/* @brief Number of reorder buffers available for doing target based reorder
2008 * Rx reorder buffering
2009 */
2010 A_UINT32 num_offload_reorder_buffs;
2011/**
2012 * @brief num_peer_keys - number of keys per peer
2013 */
2014 A_UINT32 num_peer_keys;
2015/**
2016 * @brief num_peer_tids - number of TIDs to provide storage for per peer.
2017 */
2018 A_UINT32 num_tids;
2019/**
2020 * @brief ast_skid_limit - max skid for resolving hash collisions
2021 * @details
2022 * The address search table is sparse, so that if two MAC addresses
2023 * result in the same hash value, the second of these conflicting
2024 * entries can slide to the next index in the address search table,
2025 * and use it, if it is unoccupied. This ast_skid_limit parameter
2026 * specifies the upper bound on how many subsequent indices to search
2027 * over to find an unoccupied space.
2028 */
2029 A_UINT32 ast_skid_limit;
2030/**
2031 * @brief tx_chain_mask - the nominal chain mask for transmit
2032 * @details
2033 * The chain mask may be modified dynamically, e.g. to operate AP tx with
2034 * a reduced number of chains if no clients are associated.
2035 * This configuration parameter specifies the nominal chain-mask that
2036 * should be used when not operating with a reduced set of tx chains.
2037 */
2038 A_UINT32 tx_chain_mask;
2039/**
2040 * @brief rx_chain_mask - the nominal chain mask for receive
2041 * @details
2042 * The chain mask may be modified dynamically, e.g. for a client to use
2043 * a reduced number of chains for receive if the traffic to the client
2044 * is low enough that it doesn't require downlink MIMO or antenna
2045 * diversity.
2046 * This configuration parameter specifies the nominal chain-mask that
2047 * should be used when not operating with a reduced set of rx chains.
2048 */
2049 A_UINT32 rx_chain_mask;
2050/**
2051 * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
2052 * @details
2053 * Each WMM access class (voice, video, best-effort, background) will
2054 * have its own timeout value to dictate how long to wait for missing
2055 * rx MPDUs to arrive before flushing subsequent MPDUs that have already
2056 * been received.
2057 * This parameter specifies the timeout in milliseconds for each class .
2058 * NOTE: the number of class (defined as 4) cannot be
2059 * changed in the future without breaking WMI compatibility.
2060 */
2061 A_UINT32 rx_timeout_pri[4];
2062/**
2063 * @brief rx_decap mode - what mode the rx should decap packets to
2064 * @details
2065 * MAC can decap to RAW (no decap), native wifi or Ethernet types
2066 * THis setting also determines the default TX behavior, however TX
2067 * behavior can be modified on a per VAP basis during VAP init
2068 */
2069 A_UINT32 rx_decap_mode;
2070 /**
2071 * @brief scan_max_pending_req - what is the maximum scan requests than can be queued
2072 */
2073 A_UINT32 scan_max_pending_req;
2074
2075 /**
2076 * @brief maximum VDEV that could use BMISS offload
2077 */
2078 A_UINT32 bmiss_offload_max_vdev;
2079
2080 /**
2081 * @brief maximum VDEV that could use offload roaming
2082 */
2083 A_UINT32 roam_offload_max_vdev;
2084
2085 /**
2086 * @brief maximum AP profiles that would push to offload roaming
2087 */
2088 A_UINT32 roam_offload_max_ap_profiles;
2089
2090/**
2091 * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
2092 * @details
2093 * The target's WAL maintains a table to hold information regarding which
2094 * peers belong to a given multicast group, so that if multicast->unicast
2095 * conversion is enabled, the target can convert multicast tx frames to a
2096 * series of unicast tx frames, to each peer within the multicast group.
2097 * This num_mcast_groups configuration parameter tells the target how
2098 * many multicast groups to provide storage for within its multicast
2099 * group membership table.
2100 */
2101 A_UINT32 num_mcast_groups;
2102
2103/**
2104 * @brief num_mcast_table_elems - size to alloc for the mcast membership table
2105 * @details
2106 * This num_mcast_table_elems configuration parameter tells the target
2107 * how many peer elements it needs to provide storage for in its
2108 * multicast group membership table.
2109 * These multicast group membership table elements are shared by the
2110 * multicast groups stored within the table.
2111 */
2112 A_UINT32 num_mcast_table_elems;
2113
2114/**
2115 * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
2116 * @details
2117 * This configuration parameter specifies whether the target should
2118 * perform multicast --> unicast conversion on transmit, and if so,
2119 * what to do if it finds no entries in its multicast group membership
2120 * table for the multicast IP address in the tx frame.
2121 * Configuration value:
2122 * 0 -> Do not perform multicast to unicast conversion.
2123 * 1 -> Convert multicast frames to unicast, if the IP multicast address
2124 * from the tx frame is found in the multicast group membership
2125 * table. If the IP multicast address is not found, drop the frame.
2126 * 2 -> Convert multicast frames to unicast, if the IP multicast address
2127 * from the tx frame is found in the multicast group membership
2128 * table. If the IP multicast address is not found, transmit the
2129 * frame as multicast.
2130 */
2131 A_UINT32 mcast2ucast_mode;
2132
2133 /**
2134 * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
2135 * @details
2136 * This parameter controls how much memory the target will allocate to
2137 * store a log of tx PPDU meta-information (how large the PPDU was,
2138 * when it was sent, whether it was successful, etc.)
2139 */
2140 A_UINT32 tx_dbg_log_size;
2141
2142 /**
2143 * @brief num_wds_entries - how many AST entries to be allocated for WDS
2144 */
2145 A_UINT32 num_wds_entries;
2146
2147 /**
2148 * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
2149 * this limit can be 0 -default, 1 256B
2150 */
2151 A_UINT32 dma_burst_size;
2152
2153 /**
2154 * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
2155 * to account for interface latency to avoid underrun.
2156 */
2157 A_UINT32 mac_aggr_delim;
2158 /**
2159 * @brief rx_skip_defrag_timeout_dup_detection_check
2160 * @details
2161 * determine whether target is responsible for detecting duplicate
2162 * non-aggregate MPDU and timing out stale fragments.
2163 *
2164 * A-MPDU reordering is always performed on the target.
2165 *
2166 * 0: target responsible for frag timeout and dup checking
2167 * 1: host responsible for frag timeout and dup checking
2168 */
2169 A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
2170
2171 /**
2172 * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
2173 * and Max no of descriptors for each Video link (node).
2174 */
2175 A_UINT32 vow_config;
2176
2177 /**
2178 * @brief maximum VDEV that could use GTK offload
2179 */
2180 A_UINT32 gtk_offload_max_vdev;
2181
2182 /**
2183 * @brief num_msdu_desc - Number of msdu descriptors target should use
2184 */
2185 A_UINT32 num_msdu_desc; /* Number of msdu desc */
2186 /**
2187 * @brief max_frag_entry - Max. number of Tx fragments per MSDU
2188 * @details
2189 * This parameter controls the max number of Tx fragments per MSDU.
2190 * This is sent by the target as part of the WMI_SERVICE_READY event
2191 * and is overriden by the OS shim as required.
2192 */
2193 A_UINT32 max_frag_entries;
2194
2195 /**
2196 * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
2197 * @brief num_msdu_desc - Number of vdev that can support beacon offload
2198 */
2199
2200 A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
2201
2202 /**
2203 * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
2204 * @details
2205 * Each TDLS enabled vdev can track outgoing transmits/rssi/rates to/of
2206 * peers in a connection tracking table for possible TDLS link creation
2207 * or deletion. This controls the number of tracked peers per vdev.
2208 */
2209 A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
2210 A_UINT32 beacon_tx_offload_max_vdev;
2211 A_UINT32 num_multicast_filter_entries;
2212 A_UINT32 num_wow_filters; /*host can configure the number of wow filters */
2213
2214 /**
2215 * @brief num_keep_alive_pattern - Num of keep alive patterns configured
2216 * from host.
2217 */
2218 A_UINT32 num_keep_alive_pattern;
2219 /**
2220 * @brief keep_alive_pattern_size - keep alive pattern size.
2221 */
2222 A_UINT32 keep_alive_pattern_size;
2223
2224 /**
2225 * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
2226 * @details
2227 * Each TDLS STA can become a sleep STA independently. This parameter
2228 * mentions how many such sleep STAs can be supported concurrently.
2229 */
2230 A_UINT32 max_tdls_concurrent_sleep_sta;
2231
2232 /**
2233 * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
2234 * @details
2235 * Each TDLS STA can become a buffer STA independently. This parameter
2236 * mentions how many such buffer STAs can be supported concurrently.
2237 */
2238 A_UINT32 max_tdls_concurrent_buffer_sta;
2239
2240 /**
2241 * @brief wmi_send_separate - host configures fw to send the wmi separately
2242 */
2243 A_UINT32 wmi_send_separate;
2244
2245 /**
2246 * @brief num_ocb_vdevs - Number of vdevs used for OCB support
2247 */
2248 A_UINT32 num_ocb_vdevs;
2249
2250 /**
2251 * @brief num_ocb_channels - The supported number of simultaneous OCB channels
2252 */
2253 A_UINT32 num_ocb_channels;
2254
2255 /**
2256 * @brief num_ocb_schedules - The supported number of OCB schedule segments
2257 */
2258 A_UINT32 num_ocb_schedules;
Manikandan Mohan30728082015-12-09 12:35:24 -08002259 /**
2260 * @brief specific configuration from host, such as per platform configuration
2261 */
2262 #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
2263 #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002264
2265 #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
2266 #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
2267
2268 #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
2269 #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
2270
2271 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
2272 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
2273
2274 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
2275 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
2276
2277 #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
2278 #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
2279
2280 #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
2281 #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
2282
2283 #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
2284 #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
2285
2286 #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
2287 #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
2288
Manikandan Mohan30728082015-12-09 12:35:24 -08002289 A_UINT32 flag1;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002290
2291 /** @brief smart_ant_cap - Smart Antenna capabilities information
2292 * @details
2293 * 1 - Smart antenna is enabled.
2294 * 0 - Smart antenna is disabled.
2295 * In future this can contain smart antenna specifc capabilities.
2296 */
2297 A_UINT32 smart_ant_cap;
2298
2299 /**
2300 * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
2301 * during init
2302 */
2303 A_UINT32 BK_Minfree;
2304 A_UINT32 BE_Minfree;
2305 A_UINT32 VI_Minfree;
2306 A_UINT32 VO_Minfree;
2307
2308 /**
2309 * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
2310 * descriptor memory allocation.
2311 * 1 - Allocate fragment descriptor memory for data packet in firmware.
2312 * If host wants to transmit data packet at its desired rate,
2313 * this field must be set.
2314 * 0 - Don't allocate fragment descriptor for data packet.
2315 */
2316 A_UINT32 alloc_frag_desc_for_data_pkt;
Govind Singh86180292016-02-01 14:03:37 +05302317
2318 /*
2319 * how much space to allocate for NDP NS (neighbor solicitation)
2320 * specs
2321 */
2322 A_UINT32 num_ns_ext_tuples_cfg;
Sandeep Puligillab6ddc262016-03-09 13:06:16 -08002323 /**
2324 * size (in bytes) of the buffer the FW shall allocate to store
2325 * packet filtering instructions
2326 */
2327 A_UINT32 bpf_instruction_size;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05302328 /**
2329 * Maximum no of BSSID based RX filters host would program
2330 * Value 0 means host doesn't given any limit to FW.
2331 */
2332 A_UINT32 max_bssid_rx_filters;
Krishna Kumaar Natarajan7dde8c72016-03-25 15:11:49 -07002333 /**
2334 * Use PDEV ID instead of MAC ID, added for backward compatibility with
2335 * older host which is using MAC ID. 1 means PDEV ID, 0 means MAC ID.
2336 */
2337 A_UINT32 use_pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002338} wmi_resource_config;
2339
Manikandan Mohan30728082015-12-09 12:35:24 -08002340#define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
2341 do { \
2342 (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
2343 (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
2344 WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
2345 } while (0)
2346#define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
2347 (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
2348 WMI_RSRC_CFG_FLAG_ ## flag ## _S)
2349
2350#define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
2351 WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
2352#define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
2353 WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
2354
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002355#define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
2356 WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
2357#define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
2358 WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
2359
2360#define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
2361 WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
2362#define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
2363 WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
2364
2365#define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
2366 WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
2367#define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
2368 WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
2369
2370#define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
2371 WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
2372#define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
2373 WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
2374
2375#define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
2376 WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
2377#define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
2378 WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
2379
2380#define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
2381 WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
2382#define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
2383 WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
2384
2385#define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
2386 WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
2387#define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
2388 WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
2389
2390#define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
2391 WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
2392#define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
2393 WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
2394
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002395typedef struct {
2396 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
2397
2398 /** The following indicate the WMI versions to be supported by
2399 * the host driver. Note that the host driver decide to
2400 * "downgrade" its WMI version support and this may not be the
2401 * native version of the host driver. */
2402 wmi_abi_version host_abi_vers;
2403
2404 A_UINT32 num_host_mem_chunks;
2405 /** size of array host_mem_chunks[] */
2406 /* The TLVs for resource_config and host_mem_chunks[] will follow.
2407 * wmi_resource_config resource_config;
2408 * wlan_host_memory_chunk host_mem_chunks[];
2409 */
2410
2411} wmi_init_cmd_fixed_param;
2412
2413/**
2414 * TLV for channel list
2415 */
2416typedef struct {
2417 /** WMI_CHAN_LIST_TAG */
2418 A_UINT32 tag;
2419 /** # of channels to scan */
2420 A_UINT32 num_chan;
2421 /** channels in Mhz */
2422 A_UINT32 channel_list[1];
2423} wmi_chan_list;
2424
2425/**
2426 * TLV for bssid list
2427 */
2428typedef struct {
2429 /** WMI_BSSID_LIST_TAG */
2430 A_UINT32 tag;
2431 /** number of bssids */
2432 A_UINT32 num_bssid;
2433 /** bssid list */
2434 wmi_mac_addr bssid_list[1];
2435} wmi_bssid_list;
2436
2437/**
2438 * TLV for ie data.
2439 */
2440typedef struct {
2441 /** WMI_IE_TAG */
2442 A_UINT32 tag;
2443 /** number of bytes in ie data */
2444 A_UINT32 ie_len;
2445 /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4 ) */
2446 A_UINT32 ie_data[1];
2447} wmi_ie_data;
2448
2449typedef struct {
2450 /** Len of the SSID */
2451 A_UINT32 ssid_len;
2452 /** SSID */
2453 A_UINT32 ssid[8];
2454} wmi_ssid;
2455
2456typedef struct {
2457 /** WMI_SSID_LIST_TAG */
2458 A_UINT32 tag;
2459 A_UINT32 num_ssids;
2460 wmi_ssid ssids[1];
2461} wmi_ssid_list;
2462
2463/* prefix used by scan requestor ids on the host */
2464#define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
2465/* prefix used by scan request ids generated on the host */
2466/* host cycles through the lower 12 bits to generate ids */
2467#define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
2468
2469#define WLAN_SCAN_PARAMS_MAX_SSID 16
2470#define WLAN_SCAN_PARAMS_MAX_BSSID 4
2471#define WLAN_SCAN_PARAMS_MAX_IE_LEN 512
2472
2473typedef struct {
2474 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
2475 /** Scan ID */
2476 A_UINT32 scan_id;
2477 /** Scan requestor ID */
2478 A_UINT32 scan_req_id;
2479 /** VDEV id(interface) that is requesting scan */
2480 A_UINT32 vdev_id;
2481 /** Scan Priority, input to scan scheduler */
2482 A_UINT32 scan_priority;
2483 /** Scan events subscription */
2484 A_UINT32 notify_scan_events;
2485 /** dwell time in msec on active channels */
2486 A_UINT32 dwell_time_active;
2487 /** dwell time in msec on passive channels */
2488 A_UINT32 dwell_time_passive;
2489 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
2490 A_UINT32 min_rest_time;
2491 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
2492 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
2493 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
2494 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
2495 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
2496 * irrespective of activity. activity is determined by the idle_time parameter.
2497 */
2498 A_UINT32 max_rest_time;
2499 /** time before sending next set of probe requests.
2500 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
2501 * The number of probe requests specified depends on the ssid_list and bssid_list
2502 */
2503 A_UINT32 repeat_probe_time;
2504 /** time in msec between 2 consequetive probe requests with in a set. */
2505 A_UINT32 probe_spacing_time;
2506 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
2507 A_UINT32 idle_time;
2508 /** maximum time in msec allowed for scan */
2509 A_UINT32 max_scan_time;
2510 /** delay in msec before sending first probe request after switching to a channel */
2511 A_UINT32 probe_delay;
2512 /** Scan control flags */
2513 A_UINT32 scan_ctrl_flags;
2514 /** Burst duration time in msec*/
2515 A_UINT32 burst_duration;
2516
2517 /** # if channels to scan. In the TLV channel_list[] */
2518 A_UINT32 num_chan;
2519 /** number of bssids. In the TLV bssid_list[] */
2520 A_UINT32 num_bssid;
2521 /** number of ssid. In the TLV ssid_list[] */
2522 A_UINT32 num_ssids;
2523 /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
2524 A_UINT32 ie_len;
2525 /** Max number of probes to be sent */
2526 A_UINT32 n_probes;
2527
2528 /**
2529 * TLV (tag length value ) parameters follow the scan_cmd
2530 * structure. The TLV's are:
2531 * A_UINT32 channel_list[];
2532 * wmi_ssid ssid_list[];
2533 * wmi_mac_addr bssid_list[];
2534 * A_UINT8 ie_data[];
2535 */
2536} wmi_start_scan_cmd_fixed_param;
2537
2538/**
2539 * scan control flags.
2540 */
2541
2542/** passively scan all channels including active channels */
2543#define WMI_SCAN_FLAG_PASSIVE 0x1
2544/** add wild card ssid probe request even though ssid_list is specified. */
2545#define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
2546/** add cck rates to rates/xrate ie for the generated probe request */
2547#define WMI_SCAN_ADD_CCK_RATES 0x4
2548/** add ofdm rates to rates/xrate ie for the generated probe request */
2549#define WMI_SCAN_ADD_OFDM_RATES 0x8
2550/** To enable indication of Chan load and Noise floor to host */
2551#define WMI_SCAN_CHAN_STAT_EVENT 0x10
2552/** Filter Probe request frames */
2553#define WMI_SCAN_FILTER_PROBE_REQ 0x20
2554/**When set, not to scan DFS channels*/
2555#define WMI_SCAN_BYPASS_DFS_CHN 0x40
2556/**When set, certain errors are ignored and scan continues.
2557 * Different FW scan engine may use its own logic to decide what errors to ignore*/
2558#define WMI_SCAN_CONTINUE_ON_ERROR 0x80
2559/** Enable promiscous mode for ese */
2560#define WMI_SCAN_FILTER_PROMISCOUS 0x100
2561/** allow to send probe req on DFS channel */
2562#define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
2563/** add TPC content in probe req frame */
2564#define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400
2565/** add DS content in probe req frame */
2566#define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800
2567/** use random mac address for TA for probe request frame and add
2568 * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
2569 * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/
2570#define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000
Govind Singh32cced32016-02-01 13:33:09 +05302571/** allow mgmt transmission during off channel scan */
2572#define WMI_SCAN_OFFCHAN_MGMT_TX 0x2000
2573/** allow data transmission during off channel scan */
2574#define WMI_SCAN_OFFCHAN_DATA_TX 0x4000
2575/** allow capture ppdu with phy errrors */
2576#define WMI_SCAN_CAPTURE_PHY_ERROR 0x8000
Sandeep Puligilla1d9a8d82016-03-09 13:07:58 -08002577/** always do passive scan on passive channels */
2578#define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x1000
Anurag Chouhanb3fa7a12016-04-18 17:26:49 +05302579/** for adaptive scan mode using 3 bits (21 - 23 bits) */
2580#define WMI_SCAN_DWELL_MODE_MASK 0x00E00000
2581#define WMI_SCAN_DWELL_MODE_SHIFT 21
2582
2583typedef enum {
2584 WMI_SCAN_DWELL_MODE_DEFAULT = 0,
2585 WMI_SCAN_DWELL_MODE_CONSERVATIVE = 1,
2586 WMI_SCAN_DWELL_MODE_MODERATE = 2,
2587 WMI_SCAN_DWELL_MODE_AGGRESSIVE = 3,
2588 WMI_SCAN_DWELL_MODE_STATIC = 4,
2589} WMI_SCAN_DWELL_MODE;
2590
2591#define WMI_SCAN_SET_DWELL_MODE(flag, mode) \
2592 do { \
2593 (flag) |= (((mode) << WMI_SCAN_DWELL_MODE_SHIFT) & \
2594 WMI_SCAN_DWELL_MODE_MASK); \
2595 } while (0)
2596
2597#define WMI_SCAN_GET_DWELL_MODE(flag) \
2598 (((flag) & WMI_SCAN_DWELL_MODE_MASK) >> WMI_SCAN_DWELL_MODE_SHIFT)
2599
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002600/** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
2601#define WMI_SCAN_CLASS_MASK 0xFF000000
2602
2603/*
2604 * Masks identifying types/ID of scans
2605 * Scan_Stop macros should be the same value as below defined in UMAC
2606 * #define IEEE80211_SPECIFIC_SCAN 0x00000000
2607 * #define IEEE80211_VAP_SCAN 0x01000000
2608 * #define IEEE80211_ALL_SCANS 0x04000000
2609 */
2610#define WMI_SCAN_STOP_ONE 0x00000000
2611#define WMI_SCN_STOP_VAP_ALL 0x01000000
2612#define WMI_SCAN_STOP_ALL 0x04000000
2613
2614typedef struct {
2615 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
2616 /** requestor requesting cancel */
2617 A_UINT32 requestor;
2618 /** Scan ID */
2619 A_UINT32 scan_id;
2620 /**
2621 * Req Type
2622 * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
2623 * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
2624 * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
2625 * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
2626 */
2627 A_UINT32 req_type;
2628 /**
2629 * vDev ID
2630 * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
2631 */
2632 A_UINT32 vdev_id;
2633} wmi_stop_scan_cmd_fixed_param;
2634
2635#define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */
2636#define APPEND_TO_EXISTING_CHAN_LIST 1
2637
2638typedef struct {
2639 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
2640 A_UINT32 num_scan_chans;
2641 /** no of elements in chan_info[] */
2642 A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
2643 /** Followed by the variable length TLV chan_info:
2644 * wmi_channel chan_info[] */
2645} wmi_scan_chan_list_cmd_fixed_param;
2646
2647/*
2648 * Priority numbers must be sequential, starting with 0.
2649 */
2650/* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
2651typedef enum {
2652 WMI_SCAN_PRIORITY_VERY_LOW = 0,
2653 WMI_SCAN_PRIORITY_LOW,
2654 WMI_SCAN_PRIORITY_MEDIUM,
2655 WMI_SCAN_PRIORITY_HIGH,
2656 WMI_SCAN_PRIORITY_VERY_HIGH,
2657
2658 WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
2659} wmi_scan_priority;
2660
2661/* Five Levels for Requested Priority */
2662/* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */
2663typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
2664
2665/**
2666 * to keep align with UMAC implementation, we pass only vdev_type but not vdev_subtype when we overwrite an entry for a specific vdev_subtype
2667 * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
2668 * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
2669 */
2670typedef struct {
2671 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
2672 /**
2673 * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
2674 * vdev_type should be one of enum in WLAN_OPMODE which inculdes WLAN_M_IBSS, WLAN_M_STA, WLAN_M_AP and WLAN_M_MONITOR currently
2675 */
2676 A_UINT32 vdev_type;
2677 /**
2678 * number of rows in mapping_table for a specific vdev
2679 * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
2680 */
2681 A_UINT32 number_rows;
2682 /** mapping_table for a specific vdev follows this TLV
2683 * WLAN_PRIORITY_MAPPING mapping_table[]; */
2684} wmi_scan_sch_priority_table_cmd_fixed_param;
2685
2686/** update flags */
2687#define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1
2688#define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2
2689#define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4
2690
2691typedef struct {
2692 A_UINT32 tlv_header;
2693 /** requestor requesting update scan request */
2694 A_UINT32 requestor;
2695 /** Scan ID of the scan request that need to be update */
2696 A_UINT32 scan_id;
2697 /** update flags, indicating which of the following fields are valid and need to be updated*/
2698 A_UINT32 scan_update_flags;
2699 /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
2700 A_UINT32 scan_priority;
2701 /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
2702 A_UINT32 min_rest_time;
2703 /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
2704 A_UINT32 max_rest_time;
2705} wmi_scan_update_request_cmd_fixed_param;
2706
2707typedef struct {
2708 A_UINT32 tlv_header;
2709 /** oui to be used in probe request frame when random mac addresss is
2710 * requested part of scan parameters. this is applied to both FW internal scans and
2711 * host initated scans. host can request for random mac address with
2712 * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */
2713 A_UINT32 prob_req_oui;
2714} wmi_scan_prob_req_oui_cmd_fixed_param;
2715
2716enum wmi_scan_event_type {
2717 WMI_SCAN_EVENT_STARTED = 0x1,
2718 WMI_SCAN_EVENT_COMPLETED = 0x2,
2719 WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
2720 WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
2721 WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
2722 WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
2723 WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
Manikandan Mohan46b95c02015-12-09 12:23:08 -08002724 WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
2725 WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
Govind Singh45ef44a2016-02-01 17:45:22 +05302726 WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */
2727 WMI_SCAN_EVENT_RESUMED = 0x400, /* scan request is resumed */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002728 WMI_SCAN_EVENT_MAX = 0x8000
2729};
2730
2731enum wmi_scan_completion_reason {
2732 /** scan related events */
2733 WMI_SCAN_REASON_NONE = 0xFF,
2734 WMI_SCAN_REASON_COMPLETED = 0,
2735 WMI_SCAN_REASON_CANCELLED = 1,
2736 WMI_SCAN_REASON_PREEMPTED = 2,
2737 WMI_SCAN_REASON_TIMEDOUT = 3,
2738 WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
Govind Singh45ef44a2016-02-01 17:45:22 +05302739 WMI_SCAN_REASON_SUSPENDED = 5,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002740 WMI_SCAN_REASON_MAX,
2741};
2742
2743typedef struct {
2744 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
2745 /** scan event (wmi_scan_event_type) */
2746 A_UINT32 event;
2747 /** status of the scan completion event */
2748 A_UINT32 reason;
2749 /** channel freq , only valid for FOREIGN channel event*/
2750 A_UINT32 channel_freq;
2751 /**id of the requestor whose scan is in progress */
2752 A_UINT32 requestor;
2753 /**id of the scan that is in progress */
2754 A_UINT32 scan_id;
2755 /**id of VDEV that requested the scan */
2756 A_UINT32 vdev_id;
2757} wmi_scan_event_fixed_param;
2758
2759/* WMI Diag event */
2760typedef struct {
2761 A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
2762 A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
2763 A_UINT32 count; /* Number of diag frames added to current event */
2764 A_UINT32 dropped;
2765 /* followed by WMITLV_TAG_ARRAY_BYTE */
2766} wmi_diag_event_fixed_param;
2767
2768/*
2769 * If FW has multiple active channels due to MCC(multi channel concurrency),
2770 * then these stats are combined stats for all the active channels.
2771 */
2772typedef struct {
2773 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
2774 /** ack count, it is an incremental number, not accumulated number */
2775 A_UINT32 ackRcvBad;
2776 /** bad rts count, it is an incremental number, not accumulated number */
2777 A_UINT32 rtsBad;
2778 /** good rts, it is an incremental number, not accumulated number */
2779 A_UINT32 rtsGood;
2780 /** fcs count, it is an incremental number, not accumulated number */
2781 A_UINT32 fcsBad;
2782 /** beacon count, it is an incremental number, not accumulated number */
2783 A_UINT32 noBeacons;
2784} wmi_update_whal_mib_stats_event_fixed_param;
2785
2786/*
2787 * This defines how much headroom is kept in the
2788 * receive frame between the descriptor and the
2789 * payload, in order for the WMI PHY error and
2790 * management handler to insert header contents.
2791 *
2792 * This is in bytes.
2793 */
2794#define WMI_MGMT_RX_HDR_HEADROOM sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr)
2795
2796/** This event will be used for sending scan results
2797 * as well as rx mgmt frames to the host. The rx buffer
2798 * will be sent as part of this WMI event. It would be a
2799 * good idea to pass all the fields in the RX status
2800 * descriptor up to the host.
2801 */
2802/* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
2803#define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
2804
2805/** flag indicating that the the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
2806#define WMI_MGMT_RX_HDR_EXTSCAN 0x01
2807
2808/**
2809 * flag indicating that the the mgmt frame (probe req/beacon) is received in
2810 * the context of matched network by FW ENLO
2811 */
2812#define WMI_MGMT_RX_HDR_ENLO 0x02
2813
2814typedef struct {
2815 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
2816 /** channel on which this frame is received. */
2817 A_UINT32 channel;
2818 /** snr information used to cal rssi */
2819 A_UINT32 snr;
2820 /** Rate kbps */
2821 A_UINT32 rate;
2822 /** rx phy mode WLAN_PHY_MODE */
2823 A_UINT32 phy_mode;
2824 /** length of the frame */
2825 A_UINT32 buf_len;
2826 /** rx status */
2827 A_UINT32 status;
2828 /** RSSI of PRI 20MHz for each chain. */
2829 A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
2830 /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
2831 A_UINT32 flags;
2832 /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
2833 A_INT32 rssi;
2834
2835 /** delta between local TSF(TSF timestamp when frame was RXd)
2836 * and remote TSF(TSF timestamp in the IE for mgmt frame
2837 * beacon,proberesp for e.g). If remote TSF is not available,
2838 * delta set to 0.
2839 * Although tsf_delta is stored as A_UINT32, it can be negative,
2840 * and thus would need to be sign-extended if added to a value
2841 * larger than 32 bits.
2842 */
2843 A_UINT32 tsf_delta;
Sandeep Puligilla62f7ca02016-03-24 15:48:33 -07002844 /*
2845 * The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from
2846 * TSF timestamp in the RX MAC descriptor provided by HW.
2847 */
2848 A_UINT32 rx_tsf_l32;
2849
2850 /*
2851 *The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register
2852 * after the packet is received.
2853 */
2854 A_UINT32 rx_tsf_u32;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002855 /* This TLV is followed by array of bytes:
2856 * // management frame buffer
2857 * A_UINT8 bufp[];
2858 */
2859} wmi_mgmt_rx_hdr;
2860
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002861typedef struct {
2862 /** TSF timestamp */
2863 A_UINT32 tsf_timestamp;
2864
2865 /**
2866 * Current freq1, freq2
2867 *
2868 * [7:0]: freq1[lo]
2869 * [15:8] : freq1[hi]
2870 * [23:16]: freq2[lo]
2871 * [31:24]: freq2[hi]
2872 */
2873 A_UINT32 freq_info_1;
2874
2875 /**
2876 * Combined RSSI over all chains and channel width for this PHY error
2877 *
2878 * [7:0]: RSSI combined
2879 * [15:8]: Channel width (MHz)
2880 * [23:16]: PHY error code
2881 * [24:16]: reserved (future use)
2882 */
2883 A_UINT32 freq_info_2;
2884
2885 /**
2886 * RSSI on chain 0 through 3
2887 *
2888 * This is formatted the same as the PPDU_START RX descriptor
2889 * field:
2890 *
2891 * [7:0]: pri20
2892 * [15:8]: sec20
2893 * [23:16]: sec40
2894 * [31:24]: sec80
2895 */
2896 A_UINT32 rssi_chain0;
2897 A_UINT32 rssi_chain1;
2898 A_UINT32 rssi_chain2;
2899 A_UINT32 rssi_chain3;
2900
2901 /**
2902 * Last calibrated NF value for chain 0 through 3
2903 *
2904 * nf_list_1:
2905 *
2906 * + [15:0] - chain 0
2907 * + [31:16] - chain 1
2908 *
2909 * nf_list_2:
2910 *
2911 * + [15:0] - chain 2
2912 * + [31:16] - chain 3
2913 */
2914 A_UINT32 nf_list_1;
2915 A_UINT32 nf_list_2;
2916
2917 /** Length of the frame */
2918 A_UINT32 buf_len;
2919} wmi_single_phyerr_rx_hdr;
2920
2921#define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff
2922#define WMI_UNIFIED_FREQINFO_1_LO_S 0
2923#define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00
2924#define WMI_UNIFIED_FREQINFO_1_HI_S 8
2925#define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000
2926#define WMI_UNIFIED_FREQINFO_2_LO_S 16
2927#define WMI_UNIFIED_FREQINFO_2_HI 0xff000000
2928#define WMI_UNIFIED_FREQINFO_2_HI_S 24
2929
2930/*
2931 * Please keep in mind that these _SET macros break macro side effect
2932 * assumptions; don't be clever with them.
2933 */
2934#define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05302935 (WMI_F_MS((hdr)->freq_info_1, \
2936 WMI_UNIFIED_FREQINFO_ ## f ## _LO) \
2937 | (WMI_F_MS((hdr)->freq_info_1, \
2938 WMI_UNIFIED_FREQINFO_ ## f ## _HI) << 8))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002939
2940#define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \
2941 do { \
2942 WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \
2943 WMI_UNIFIED_FREQINFO_ ## f ## _LO); \
2944 WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \
2945 WMI_UNIFIED_FREQINFO_ ## f ## _HI); \
2946 } while (0)
2947
2948#define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff
2949#define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0
2950#define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00
2951#define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8
2952#define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000
2953#define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
2954
2955#define WMI_UNIFIED_RSSI_COMB_GET(hdr) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05302956 ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002957 WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
2958
2959#define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \
2960 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
2961 WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
2962
2963#define WMI_UNIFIED_CHWIDTH_GET(hdr) \
2964 WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
2965
2966#define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \
2967 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
2968 WMI_UNIFIED_FREQINFO_2_CHWIDTH);
2969
2970#define WMI_UNIFIED_PHYERRCODE_GET(hdr) \
2971 WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
2972
2973#define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \
2974 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
2975 WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
2976
2977#define WMI_UNIFIED_CHAIN_0 0x0000ffff
2978#define WMI_UNIFIED_CHAIN_0_S 0
2979#define WMI_UNIFIED_CHAIN_1 0xffff0000
2980#define WMI_UNIFIED_CHAIN_1_S 16
2981#define WMI_UNIFIED_CHAIN_2 0x0000ffff
2982#define WMI_UNIFIED_CHAIN_2_S 0
2983#define WMI_UNIFIED_CHAIN_3 0xffff0000
2984#define WMI_UNIFIED_CHAIN_3_S 16
2985
2986#define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1
2987#define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1
2988#define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2
2989#define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2
2990
2991#define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \
2992 ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, \
2993 WMI_UNIFIED_CHAIN_ ## c)))
2994
2995#define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \
2996 WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, (nf) & 0xffff, \
2997 WMI_UNIFIED_CHAIN_ ## c);
2998
2999/*
3000 * For now, this matches what the underlying hardware is doing.
3001 * Update ar6000ProcRxDesc() to use these macros when populating
3002 * the rx descriptor and then we can just copy the field over
3003 * to the WMI PHY notification without worrying about breaking
3004 * things.
3005 */
3006#define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff
3007#define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0
3008#define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00
3009#define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8
3010#define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000
3011#define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16
3012#define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000
3013#define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24
3014
3015#define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \
3016 WMI_F_RMW((hdr)->rssi_chain ## c, (rssi) & 0xff, \
3017 WMI_UNIFIED_RSSI_CHAN_ ## ch);
3018
3019#define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \
3020 ((int8_t) (WMI_F_MS((hdr)->rssi_chain ## c, \
3021 WMI_UNIFIED_RSSI_CHAN_ ## ch)))
3022
3023typedef struct {
3024 /** Phy error event header */
3025 wmi_single_phyerr_rx_hdr hdr;
3026 /** frame buffer */
3027 A_UINT8 bufp[1];
3028} wmi_single_phyerr_rx_event;
3029
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08003030/* PHY ERROR MASK 0 */
3031/* bits 1:0 defined but not published */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05303032#define WMI_PHY_ERROR_MASK0_RADAR (1<<2)
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08003033/* bits 23:3 defined but not published */
3034#define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1<<24)
3035/* bits 25:24 defined but not published */
3036#define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1<<26)
3037/* bits 31:27 defined but not published */
3038
3039/* PHY ERROR MASK 1
3040 * bits 13:0 defined but not published
3041 * bits 31:14 reserved
3042 */
3043
3044/* PHY ERROR MASK 2
3045 * bits 31:0 reserved
3046 */
3047
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003048typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303049 /* TLV tag and len; tag equals
3050 * WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr
3051 */
3052 A_UINT32 tlv_header;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003053 /** Phy error phy error count */
3054 A_UINT32 num_phyerr_events;
3055 A_UINT32 tsf_l32;
3056 A_UINT32 tsf_u32;
3057 A_UINT32 buf_len;
Govind Singh869c9872016-02-22 18:36:34 +05303058 union {
3059 /* OBSOLETE - will be removed once all refs are gone */
3060 A_UINT32 pmac_id;
3061 /** pdev_id for identifying the MAC
3062 * See macros starting with WMI_PDEV_ID_ for values.
3063 */
3064 A_UINT32 pdev_id;
3065 };
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08003066 A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
3067 A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
3068 A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
3069
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003070 /* This TLV is followed by array of bytes:
3071 * // frame buffer - contains multiple payloads in the order:
3072 * // header - payload, header - payload...
3073 * (The header is of type: wmi_single_phyerr_rx_hdr)
3074 * A_UINT8 bufp[];
3075 */
3076} wmi_comb_phyerr_rx_hdr;
3077
3078/* WMI MGMT TX */
3079typedef struct {
3080 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
3081 /** unique id identifying the VDEV, generated by the caller */
3082 A_UINT32 vdev_id;
3083 /** peer MAC address */
3084 wmi_mac_addr peer_macaddr;
3085 /** xmit rate */
3086 A_UINT32 tx_rate;
3087 /** xmit power */
3088 A_UINT32 tx_power;
3089 /** Buffer length in bytes */
3090 A_UINT32 buf_len;
3091 /* This TLV is followed by array of bytes:
3092 * // management frame buffer
3093 * A_UINT8 bufp[];
3094 */
3095} wmi_mgmt_tx_hdr;
3096
3097typedef struct {
3098 /*
3099 * TLV tag and len;
3100 * tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param
3101 */
3102 A_UINT32 tlv_header;
3103 A_UINT32 vdev_id;
3104 /* echoed in tx_compl_event */
3105 A_UINT32 desc_id;
3106 /* MHz units */
3107 A_UINT32 chanfreq;
3108 A_UINT32 paddr_lo;
3109 A_UINT32 paddr_hi;
3110 A_UINT32 frame_len;
3111 /* Buffer length in bytes */
3112 A_UINT32 buf_len;
3113 /*
3114 * This TLV is followed by array of bytes:
3115 * First 64 bytes of management frame
3116 * A_UINT8 bufp[];
3117 */
3118} wmi_mgmt_tx_send_cmd_fixed_param;
3119
3120typedef struct {
3121 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
3122 A_UINT32 value;
3123} wmi_echo_event_fixed_param;
3124
3125typedef struct {
3126 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
3127 A_UINT32 value;
3128} wmi_echo_cmd_fixed_param;
3129
3130typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303131 /* TLV tag and len; tag equals
3132 * WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param
3133 */
3134 A_UINT32 tlv_header;
3135 /** pdev_id for identifying the MAC
3136 * See macros starting with WMI_PDEV_ID_ for values.
3137 */
3138 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003139 /** reg domain code */
3140 A_UINT32 reg_domain;
3141 A_UINT32 reg_domain_2G;
3142 A_UINT32 reg_domain_5G;
3143 A_UINT32 conformance_test_limit_2G;
3144 A_UINT32 conformance_test_limit_5G;
Govind Singh32cced32016-02-01 13:33:09 +05303145 A_UINT32 dfs_domain;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003146} wmi_pdev_set_regdomain_cmd_fixed_param;
3147
3148typedef struct {
3149 /** true for scan start and flase for scan end */
3150 A_UINT32 scan_start;
3151} wmi_pdev_scan_cmd;
3152
Govind Singhc7d51942016-02-01 12:09:31 +05303153/* WMI support for setting ratemask in target */
3154
3155typedef struct {
3156 A_UINT32 tlv_header;
3157 /*
3158 * TLV tag and len; tag equals
3159 * WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param
3160 */
3161 A_UINT32 vdev_id;
3162 /*
3163 * 0 - cck/ofdm
3164 * 1 - HT
3165 * 2 - VHT */
3166 A_UINT32 type;
3167
3168 A_UINT32 mask_lower32;
3169 A_UINT32 mask_higher32;
3170} wmi_vdev_config_ratemask_cmd_fixed_param;
3171
3172/* nrp action - Filter Neighbor Rx Packets - add/remove filter */
3173enum {
3174 WMI_FILTER_NRP_ACTION_ADD = 0x1,
3175 WMI_FILTER_NRP_ACTION_REMOVE = 0x2,
3176 WMI_FILTER_NRP_ACTION_GET_LIST = 0x3,
3177}; /* nrp - Neighbor Rx Packets */
3178
3179/* nrp type - Filter Neighbor Rx Packets - ap/client addr */
3180enum {
3181 WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1,
3182 WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2,
3183};
3184
3185/* nrp flag - Filter Neighbor Rx Packets
3186 * (capture flag, 2 & 3 not initially supported)
3187 */
3188enum {
3189 WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1,
3190 WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2,
3191 WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3,
3192};
3193
3194/* Filter for Neighbor Rx Packets */
3195typedef struct {
3196 A_UINT32 tlv_header;
3197 /*
3198 * TLV tag and len; tag equals
3199 * WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param
3200 */
3201 A_UINT32 vdev_id;
3202 /* AP Bssid or Client Mac-addr */
3203 wmi_mac_addr addr;
3204 /* Add/Remove NRF Filter */
3205 A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
3206 /* client/ap filter */
3207 A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
3208 /* optional - tx/rx capture */
3209 A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
3210 /* BSSID index - index of the BSSID register */
3211 A_UINT32 bssid_idx;
3212} wmi_vdev_filter_nrp_config_cmd_fixed_param;
3213
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003214/*Command to set/unset chip in quiet mode*/
3215typedef struct {
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05303216 /*
3217 * TLV tag and len; tag equals
3218 * WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param
3219 */
3220 A_UINT32 tlv_header;
3221 /*
3222 * pdev_id for identifying the MAC, See macros
3223 * starting with WMI_PDEV_ID_ for values.
3224 */
3225 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003226 A_UINT32 period; /*period in TUs */
3227 A_UINT32 duration; /*duration in TUs */
3228 A_UINT32 next_start; /*offset in TUs */
3229 A_UINT32 enabled; /*enable/disable */
3230} wmi_pdev_set_quiet_cmd_fixed_param;
3231
Govind Singh869c9872016-02-22 18:36:34 +05303232typedef struct {
3233 /* TLV tag and len; tag equals
3234 * WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param
3235 */
3236 A_UINT32 tlv_header;
3237 A_UINT32 vdev_id; /* Virtual interface ID */
3238 A_UINT32 period; /* period in TUs */
3239 A_UINT32 duration; /* duration in TUs */
3240 A_UINT32 next_start; /* offset in TUs */
3241 A_UINT32 enabled; /* enable/disable */
3242} wmi_vdev_set_quiet_cmd_fixed_param;
3243
Krishna Kumaar Natarajanea0a7962016-04-16 14:09:09 +05303244typedef struct {
3245 /*
3246 * TLV tag and len; tag equals
3247 * WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param
3248 */
3249 A_UINT32 tlv_header;
3250 /*
3251 * vdev id indicating to which the vdev custom aggregation size
3252 * will be applied.
3253 */
3254 A_UINT32 vdev_id;
3255 /*
3256 * Size for tx aggregation (max MPDUs per A-MPDU) for the vdev
3257 * mentioned in vdev id
3258 */
3259 A_UINT32 tx_aggr_size;
3260 /*
3261 * Size for rx aggregation (block ack window size limit) for
3262 * the vdev mentioned in vdev id
3263 */
3264 A_UINT32 rx_aggr_size;
3265} wmi_vdev_set_custom_aggr_size_cmd_fixed_param;
3266
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003267/*
3268 * Command to enable/disable Green AP Power Save.
3269 * This helps conserve power during AP operation. When the AP has no
3270 * stations associated with it, the host can enable Green AP Power Save
3271 * to request the firmware to shut down all but one transmit and receive
3272 * chains.
3273 */
3274typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303275 /** TLV tag and len; tag equals
3276 * WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param
3277 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003278 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303279 /** pdev_id for identifying the MAC
3280 * See macros starting with WMI_PDEV_ID_ for values.
3281 */
3282 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003283 A_UINT32 enable; /*1:enable, 0:disable */
3284} wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
3285
3286#define MAX_HT_IE_LEN 32
Govind Singh869c9872016-02-22 18:36:34 +05303287/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003288typedef struct {
3289 A_UINT32 tlv_header;
3290 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
3291 A_UINT32 reserved0;
3292 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3293 A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
3294 A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
3295 A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
3296 /** The TLV for the HT IE follows:
3297 * A_UINT32 ie_data[];
3298 */
3299} wmi_pdev_set_ht_ie_cmd_fixed_param;
3300
3301#define MAX_VHT_IE_LEN 32
Govind Singh869c9872016-02-22 18:36:34 +05303302/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003303typedef struct {
3304 A_UINT32 tlv_header;
3305 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
3306 A_UINT32 reserved0;
3307 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3308 A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
3309 A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
3310 A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
3311 /** The TLV for the VHT IE follows:
3312 * A_UINT32 ie_data[];
3313 */
3314} wmi_pdev_set_vht_ie_cmd_fixed_param;
3315
3316typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303317 /** TLV tag and len; tag equals
3318 * WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param
3319 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003320 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303321 /** pdev_id for identifying the MAC
3322 * See macros starting with WMI_PDEV_ID_ for values.
3323 */
3324 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003325 wmi_mac_addr base_macaddr;
3326} wmi_pdev_set_base_macaddr_cmd_fixed_param;
3327
3328/*
3329 * For now, the spectral configuration is global rather than
3330 * per-vdev. The vdev is a placeholder and will be ignored
3331 * by the firmware.
3332 */
3333typedef struct {
3334 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
3335 A_UINT32 vdev_id;
3336 A_UINT32 spectral_scan_count;
3337 A_UINT32 spectral_scan_period;
3338 A_UINT32 spectral_scan_priority;
3339 A_UINT32 spectral_scan_fft_size;
3340 A_UINT32 spectral_scan_gc_ena;
3341 A_UINT32 spectral_scan_restart_ena;
3342 A_UINT32 spectral_scan_noise_floor_ref;
3343 A_UINT32 spectral_scan_init_delay;
3344 A_UINT32 spectral_scan_nb_tone_thr;
3345 A_UINT32 spectral_scan_str_bin_thr;
3346 A_UINT32 spectral_scan_wb_rpt_mode;
3347 A_UINT32 spectral_scan_rssi_rpt_mode;
3348 A_UINT32 spectral_scan_rssi_thr;
3349 A_UINT32 spectral_scan_pwr_format;
3350 A_UINT32 spectral_scan_rpt_mode;
3351 A_UINT32 spectral_scan_bin_scale;
3352 A_UINT32 spectral_scan_dBm_adj;
3353 A_UINT32 spectral_scan_chn_mask;
3354} wmi_vdev_spectral_configure_cmd_fixed_param;
3355
3356/*
3357 * Enabling, disabling and triggering the spectral scan
3358 * is a per-vdev operation. That is, it will set channel
3359 * flags per vdev rather than globally; so concurrent scan/run
3360 * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
3361 */
3362typedef struct {
3363 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
3364 A_UINT32 vdev_id;
3365 /* 0 - ignore; 1 - trigger, 2 - clear trigger */
3366 A_UINT32 trigger_cmd;
3367 /* 0 - ignore; 1 - enable, 2 - disable */
3368 A_UINT32 enable_cmd;
3369} wmi_vdev_spectral_enable_cmd_fixed_param;
3370
3371typedef enum {
3372 WMI_CSA_IE_PRESENT = 0x00000001,
3373 WMI_XCSA_IE_PRESENT = 0x00000002,
3374 WMI_WBW_IE_PRESENT = 0x00000004,
3375 WMI_CSWARP_IE_PRESENT = 0x00000008,
3376} WMI_CSA_EVENT_IES_PRESENT_FLAG;
3377
3378/* wmi CSA receive event from beacon frame */
3379typedef struct {
3380 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
3381 A_UINT32 i_fc_dur;
3382/* Bit 0-15: FC */
3383/* Bit 16-31: DUR */
3384 wmi_mac_addr i_addr1;
3385 wmi_mac_addr i_addr2;
3386 /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
3387 * changed in the future without breaking WMI compatibility */
3388 A_UINT32 csa_ie[2];
3389 A_UINT32 xcsa_ie[2];
3390 A_UINT32 wb_ie[2];
3391 A_UINT32 cswarp_ie;
3392 A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
3393} wmi_csa_event_fixed_param;
3394
3395typedef enum {
Govind Singh32cced32016-02-01 13:33:09 +05303396 WAL_PEER_MCAST2UCAST_DISABLED = 0,
3397 /* Drop the frames if match is not found */
3398 WAL_PEER_MCAST2UCAST_DROP_EMPTY = 1,
3399 /* Send as mcast if match is not found */
3400 WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2,
3401} WMI_PEER_MCAST2UCAST_MODE;
3402
3403typedef enum {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003404 /** TX chain mask */
3405 WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
3406 /** RX chain mask */
3407 WMI_PDEV_PARAM_RX_CHAIN_MASK,
3408 /** TX power limit for 2G Radio */
3409 WMI_PDEV_PARAM_TXPOWER_LIMIT2G,
3410 /** TX power limit for 5G Radio */
3411 WMI_PDEV_PARAM_TXPOWER_LIMIT5G,
3412 /** TX power scale */
3413 WMI_PDEV_PARAM_TXPOWER_SCALE,
3414 /** Beacon generation mode . 0: host, 1: target */
3415 WMI_PDEV_PARAM_BEACON_GEN_MODE,
3416 /** Beacon generation mode . 0: staggered 1: bursted */
3417 WMI_PDEV_PARAM_BEACON_TX_MODE,
3418 /** Resource manager off chan mode .
3419 * 0: turn off off chan mode. 1: turn on offchan mode
3420 */
3421 WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
3422 /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */
3423 WMI_PDEV_PARAM_PROTECTION_MODE,
3424 /** Dynamic bandwidth 0: disable 1: enable */
3425 WMI_PDEV_PARAM_DYNAMIC_BW,
3426 /** Non aggregrate/ 11g sw retry threshold.0-disable */
3427 WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
3428 /** aggregrate sw retry threshold. 0-disable*/
3429 WMI_PDEV_PARAM_AGG_SW_RETRY_TH,
3430 /** Station kickout threshold (non of consecutive failures).0-disable */
3431 WMI_PDEV_PARAM_STA_KICKOUT_TH,
3432 /** Aggerate size scaling configuration per AC */
3433 WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING,
3434 /** LTR enable */
3435 WMI_PDEV_PARAM_LTR_ENABLE,
3436 /** LTR latency for BE, in us */
3437 WMI_PDEV_PARAM_LTR_AC_LATENCY_BE,
3438 /** LTR latency for BK, in us */
3439 WMI_PDEV_PARAM_LTR_AC_LATENCY_BK,
3440 /** LTR latency for VI, in us */
3441 WMI_PDEV_PARAM_LTR_AC_LATENCY_VI,
3442 /** LTR latency for VO, in us */
3443 WMI_PDEV_PARAM_LTR_AC_LATENCY_VO,
3444 /** LTR AC latency timeout, in ms */
3445 WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
3446 /** LTR platform latency override, in us */
3447 WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
3448 /** LTR-M override, in us */
3449 WMI_PDEV_PARAM_LTR_RX_OVERRIDE,
3450 /** Tx activity timeout for LTR, in us */
3451 WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
3452 /** L1SS state machine enable */
3453 WMI_PDEV_PARAM_L1SS_ENABLE,
3454 /** Deep sleep state machine enable */
3455 WMI_PDEV_PARAM_DSLEEP_ENABLE,
3456 /** RX buffering flush enable */
3457 WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
3458 /** RX buffering matermark */
3459 WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
3460 /** RX buffering timeout enable */
3461 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
3462 /** RX buffering timeout value */
3463 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
3464 /** pdev level stats update period in ms */
3465 WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
3466 /** vdev level stats update period in ms */
3467 WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
3468 /** peer level stats update period in ms */
3469 WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
3470 /** beacon filter status update period */
3471 WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
3472 /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
3473 WMI_PDEV_PARAM_PMF_QOS,
3474 /** Access category on which ARP frames are sent */
3475 WMI_PDEV_PARAM_ARP_AC_OVERRIDE,
3476 /** DCS configuration */
3477 WMI_PDEV_PARAM_DCS,
3478 /** Enable/Disable ANI on target */
3479 WMI_PDEV_PARAM_ANI_ENABLE,
3480 /** configure the ANI polling period */
3481 WMI_PDEV_PARAM_ANI_POLL_PERIOD,
3482 /** configure the ANI listening period */
3483 WMI_PDEV_PARAM_ANI_LISTEN_PERIOD,
3484 /** configure OFDM immunity level */
3485 WMI_PDEV_PARAM_ANI_OFDM_LEVEL,
3486 /** configure CCK immunity level */
3487 WMI_PDEV_PARAM_ANI_CCK_LEVEL,
3488 /** Enable/Disable CDD for 1x1 STAs in rate control module */
3489 WMI_PDEV_PARAM_DYNTXCHAIN,
3490 /** Enable/Disable proxy STA */
3491 WMI_PDEV_PARAM_PROXY_STA,
3492 /** Enable/Disable low power state when all VDEVs are inactive/idle. */
3493 WMI_PDEV_PARAM_IDLE_PS_CONFIG,
3494 /** Enable/Disable power gating sleep */
3495 WMI_PDEV_PARAM_POWER_GATING_SLEEP,
3496 /** Enable/Disable Rfkill */
3497 WMI_PDEV_PARAM_RFKILL_ENABLE,
3498 /** Set Bursting DUR */
3499 WMI_PDEV_PARAM_BURST_DUR,
3500 /** Set Bursting ENABLE */
3501 WMI_PDEV_PARAM_BURST_ENABLE,
3502 /** HW rfkill config */
3503 WMI_PDEV_PARAM_HW_RFKILL_CONFIG,
3504 /** Enable radio low power features */
3505 WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE,
3506 /** L1SS entry and residency time track */
3507 WMI_PDEV_PARAM_L1SS_TRACK,
3508 /** set hyst at runtime, requirement from SS */
3509 WMI_PDEV_PARAM_HYST_EN,
3510 /** Enable/ Disable POWER COLLAPSE */
3511 WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE,
3512 /** configure LED system state */
3513 WMI_PDEV_PARAM_LED_SYS_STATE,
3514 /** Enable/Disable LED */
3515 WMI_PDEV_PARAM_LED_ENABLE,
3516 /** set DIRECT AUDIO time latency */
Govind Singh869c9872016-02-22 18:36:34 +05303517 WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003518 /** set DIRECT AUDIO Feature ENABLE */
Govind Singh869c9872016-02-22 18:36:34 +05303519 WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003520 /** pdev level whal mib stats update enable */
3521 WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE,
3522 /** ht/vht info based on vdev */
3523 WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD,
3524 /** Set CTS channel BW for dynamic BW adjustment feature */
3525 WMI_PDEV_PARAM_CTS_CBW,
3526 /** Set GPIO pin info used by WNTS */
3527 WMI_PDEV_PARAM_WNTS_CONFIG,
3528 /** Enable/Disable hardware adaptive early rx feature */
3529 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE,
3530 /** The minimum early rx duration, to ensure early rx duration is non-zero */
3531 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP,
3532 /** Increasing/decreasing step used by hardware */
3533 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP,
3534 /** The fixed early rx duration when adaptive early rx is disabled */
3535 WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP,
3536 /** Enable/Disable bmiss based adaptive beacon timeout feature */
3537 WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE,
3538 /*
3539 * The minimum beacon timeout duration, to ensure beacon timeout
3540 * duration is non-zero
3541 */
3542 WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT,
3543 /** Increasing/decreasing step used by hardware */
3544 WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP,
3545 /*
3546 * The fixed beacon timeout duration when bmiss based adaptive beacon
3547 * timeout is disabled
3548 */
3549 WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT,
3550 /*
3551 * Enable/Disable Congestion Estimator based adaptive beacon
3552 * timeout feature */
3553 WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE,
3554 /*
3555 * combo value of ce_id, ce_threshold, ce_time, refer
3556 * to WMI_CE_BTO_CE_ID_MASK
3557 */
3558 WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE,
3559 /** 2G TX chain mask */
3560 WMI_PDEV_PARAM_TX_CHAIN_MASK_2G,
3561 /** 2G RX chain mask */
3562 WMI_PDEV_PARAM_RX_CHAIN_MASK_2G,
3563 /** 5G TX chain mask */
3564 WMI_PDEV_PARAM_TX_CHAIN_MASK_5G,
3565 /** 5G RX chain mask */
3566 WMI_PDEV_PARAM_RX_CHAIN_MASK_5G,
3567 /* Set tx chain mask for CCK rates */
3568 WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK,
3569 /* Set tx chain mask for 1SS stream */
3570 WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS,
Nirav Shahe1e4a812015-11-05 11:15:54 +05303571 /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected*/
3572 WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG,
Nirav Shah47062ff2015-11-05 11:21:08 +05303573 /* TX power backoff in dB: tx power -= param value
3574 * Host passes values(DB) to Halphy, Halphy reduces the power table by
3575 * the values. Safety check will happen in Halphy
3576 */
3577 WMI_PDEV_PARAM_TXPOWER_DECR_DB,
Govind Singh32cced32016-02-01 13:33:09 +05303578 /** enable and disable aggregate burst along with duration */
3579 WMI_PDEV_PARAM_AGGR_BURST,
3580 /** Set the global RX decap mode */
3581 WMI_PDEV_PARAM_RX_DECAP_MODE,
3582 /** Enable/Disable Fast channel reset */
3583 WMI_PDEV_PARAM_FAST_CHANNEL_RESET,
3584 /** Default antenna for Smart antenna */
3585 WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA,
3586 /** Set the user-specified antenna gain */
3587 WMI_PDEV_PARAM_ANTENNA_GAIN,
3588 /** Set the user-specified RX filter */
3589 WMI_PDEV_PARAM_RX_FILTER,
3590 /*
3591 * configure the user-specified MCAST tid for managed mcast feature
3592 * 0-15 is the valid range. 0xff will clear the tid setting
3593 */
3594 WMI_PDEV_SET_MCAST_TO_UCAST_TID,
3595 /** Enable/Disable Proxy sta mode */
3596 WMI_PDEV_PARAM_PROXY_STA_MODE,
3597 /*
3598 * configure the mcast2ucast mode for the pdev->peer_mcast.
3599 * See WMI_PEER_MCAST2UCAST_MODE for possible values
3600 */
3601 WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE,
3602 /** Sets the Mcast buffers for cloning, to support Mcast enhancement */
3603 WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER,
3604 /** Remove the Mcast buffers added by host */
3605 WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER,
3606 /** En/disable station power save state indication */
3607 WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE,
3608 /** Access category on which ARP frames are sent */
3609 WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE,
3610 /** allow or disallow interbss frame forwarding */
3611 WMI_PDEV_PARAM_BLOCK_INTERBSS,
3612 /** Enable/Disable reset */
3613 WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID,
3614 /** Enable/Disable/Set MSDU_TTL in milliseconds. */
3615 WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID,
3616 /** Set global PPDU duration limit (usec). */
3617 WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID,
3618 /** set txbf sounding period of vap in milliseconds */
3619 WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID,
3620 /** Set promiscuous mode */
3621 WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID,
3622 /** Set burst mode */
3623 WMI_PDEV_PARAM_SET_BURST_MODE_CMDID,
3624 /** enable enhanced stats */
3625 WMI_PDEV_PARAM_EN_STATS,
3626 /** Set mu-grouping policy */
3627 WMI_PDEV_PARAM_MU_GROUP_POLICY,
3628 /** Channel Hopping Enable */
3629 WMI_PDEV_PARAM_NOISE_DETECTION,
3630 /** Set Channel Hopping NF threshold in dBm */
3631 WMI_PDEV_PARAM_NOISE_THRESHOLD,
3632 /** Set PAPRD policy */
3633 WMI_PDEV_PARAM_DPD_ENABLE,
3634 /** Enable/disable mcast/bcast echo, used by ProxySTA */
3635 WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO,
3636 /** ATF enable/disable strict schedule */
3637 WMI_PDEV_PARAM_ATF_STRICT_SCH,
3638 /** ATF set access category duration, B0-B29 duration, B30-B31: AC */
3639 WMI_PDEV_PARAM_ATF_SCHED_DURATION,
3640 /** Default antenna polarization */
3641 WMI_PDEV_PARAM_ANT_PLZN,
3642 /** Set mgmt retry limit */
3643 WMI_PDEV_PARAM_MGMT_RETRY_LIMIT,
3644 /** Set CCA sensitivity level in dBm */
3645 WMI_PDEV_PARAM_SENSITIVITY_LEVEL,
3646 /** Set 2G positive and negative Tx power in 0.5dBm units */
3647 WMI_PDEV_PARAM_SIGNED_TXPOWER_2G,
3648 /** Set 5G positive and negative Tx power in 0.5dBm units */
3649 WMI_PDEV_PARAM_SIGNED_TXPOWER_5G,
3650 /** Enable/disble AMSDU for tids */
3651 WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU,
3652 /** Enable/disable AMPDU for tids */
3653 WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU,
3654 /** Set CCA threshold in dBm */
3655 WMI_PDEV_PARAM_CCA_THRESHOLD,
3656 /** RTS Fixed rate setting */
3657 WMI_PDEV_PARAM_RTS_FIXED_RATE,
3658 /** Pdev reset */
3659 WMI_PDEV_PARAM_PDEV_RESET,
3660 /** wapi mbssid offset **/
3661 WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET,
3662 /** ARP DEBUG source address*/
3663 WMI_PDEV_PARAM_ARP_DBG_SRCADDR,
3664 /** ARP DEBUG destination address*/
3665 WMI_PDEV_PARAM_ARP_DBG_DSTADDR,
3666 /** ATF enable/disable obss noise scheduling */
3667 WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH,
3668 /** ATF obss noise scaling factor */
3669 WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR,
3670 /**
3671 * TX power reduction scaling exponent - final tx power is the
3672 * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by
3673 * 2^(scale exponent). For example:
3674 * If this scale exponent is 0, the power is unchanged (divided by 2^0)
3675 * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB
3676 * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB
3677 * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB
3678 */
3679 WMI_PDEV_PARAM_CUST_TXPOWER_SCALE,
3680 /** ATF enabe/disabe dynamically */
3681 WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE,
3682
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003683} WMI_PDEV_PARAM;
3684
3685typedef enum {
3686 /** Set the loglevel */
3687 WMI_DBGLOG_LOG_LEVEL = 0x1,
3688 /** Enable VAP level debug */
3689 WMI_DBGLOG_VAP_ENABLE,
3690 /** Disable VAP level debug */
3691 WMI_DBGLOG_VAP_DISABLE,
3692 /** Enable MODULE level debug */
3693 WMI_DBGLOG_MODULE_ENABLE,
3694 /** Disable MODULE level debug */
3695 WMI_DBGLOG_MODULE_DISABLE,
3696 /** Enable MODULE level debug */
3697 WMI_DBGLOG_MOD_LOG_LEVEL,
3698 /** set type of the debug output */
3699 WMI_DBGLOG_TYPE,
3700 /** Enable Disable debug */
3701 WMI_DBGLOG_REPORT_ENABLE
3702} WMI_DBG_PARAM;
3703
3704/* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
3705typedef enum {
3706 WMI_CTS_CBW_INVALID = 0,
3707 WMI_CTS_CBW_20,
3708 WMI_CTS_CBW_40,
3709 WMI_CTS_CBW_80,
3710 WMI_CTS_CBW_80_80,
3711 WMI_CTS_CBW_160,
3712} WMI_CTS_CBW;
3713
3714typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303715 /** TLV tag and len; tag equals
3716 * WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param
3717 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003718 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303719 /** pdev_id for identifying the MAC
3720 * See macros starting with WMI_PDEV_ID_ for values.
3721 */
3722 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003723 /** parameter id */
3724 A_UINT32 param_id;
3725 /** parametr value */
3726 A_UINT32 param_value;
3727} wmi_pdev_set_param_cmd_fixed_param;
3728
3729typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303730 /** TLV tag and len; tag equals
3731 * WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param
3732 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003733 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303734 /** pdev_id for identifying the MAC
3735 * See macros starting with WMI_PDEV_ID_ for values.
3736 */
3737 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003738 /** parameter */
3739 A_UINT32 param;
3740} wmi_pdev_get_tpc_config_cmd_fixed_param;
3741
3742#define WMI_FAST_DIVERSITY_BIT_OFFSET 0
3743#define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
3744
3745typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303746 /** TLV tag and len; tag equals
3747 * WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param
3748 */
3749 A_UINT32 tlv_header;
3750 union {
3751 /* OBSOLETE - will be removed once all refs are gone */
3752 A_UINT32 mac_id;
3753 /** pdev_id for identifying the MAC
3754 * See macros starting with WMI_PDEV_ID_ for values.
3755 */
3756 A_UINT32 pdev_id;
3757 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003758 /** parameter */
Govind Singh869c9872016-02-22 18:36:34 +05303759 /** bit0 is for enable/disable FAST diversity,
3760 * and bit1 is for enable/disable SLOW diversity,
3761 * 0->disable, 1->enable
3762 */
3763 A_UINT32 value;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003764} wmi_pdev_set_antenna_diversity_cmd_fixed_param;
3765
3766#define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
3767
3768typedef struct {
3769 /*
3770 * TLV tag and len; tag equals
3771 * WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param
3772 */
3773 A_UINT32 tlv_header;
3774 /* vdev_id, where RSSI monitoring will take place */
3775 A_UINT32 vdev_id;
3776 /*
3777 * host will configure request_id and firmware echo
3778 * this id in RSSI_BREACH_EVENT
3779 */
3780 A_UINT32 request_id;
3781 /*
3782 * bit [0-2] = low_rssi_breach_enabled[0-2]
3783 * enabled, bit [3-5] = hi_rssi_breach_enabled[0-2]
3784 */
3785 A_UINT32 enabled_bitmap;
3786 /* unit dBm. host driver to make sure [0] > [1] > [2] */
3787 A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED];
3788 /* unit dBm. host driver to make sure [0] < [1] < [2] */
3789 A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED];
3790 /*
3791 * unit dBm. once low rssi[] breached, same event
3792 * bitmap will be generated only after signal gets better
3793 * than this level. This value is adopted for all low_rssi_breach_threshold[3]
3794 */
3795 A_UINT32 lo_rssi_reenable_hysteresis;
3796 /*
3797 * unit dBm. once hi rssi[] breached, same event bitmap
3798 * will be generated only after signal gets worse than this
3799 * level. This value is adopted for all hi_rssi_breach_threshold[3]
3800 */
3801 A_UINT32 hi_rssi_reenable_histeresis;
3802 /*
3803 * After last event is generated, we wait
3804 * until this interval to generate next event
3805 */
3806 A_UINT32 min_report_interval;
3807 /* this is to suppress number of event to be generated */
3808 A_UINT32 max_num_report;
3809} wmi_rssi_breach_monitor_config_fixed_param;
3810
3811typedef struct {
3812 /** parameter */
3813 A_UINT32 param;
3814} wmi_pdev_dump_cmd;
3815
3816typedef enum {
3817 PAUSE_TYPE_CHOP = 0x1,
3818 /** for MCC (switch channel), only vdev_map is valid */
3819 PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */
3820 PAUSE_TYPE_UAPSD = 0x3,
3821 /** for uapsd, only peer_id and tid_map are valid. */
3822 PAUSE_TYPE_P2P_CLIENT_NOA = 0x4,
3823 /** only vdev_map is valid, actually only one vdev id is set at one time */
3824 PAUSE_TYPE_P2P_GO_PS = 0x5,
3825 /** only vdev_map is valid, actually only one vdev id is set at one time */
3826 PAUSE_TYPE_STA_ADD_BA = 0x6,
3827 /** only peer_id and tid_map are valid, actually only one tid is set at one time */
3828 PAUSE_TYPE_AP_PS = 0x7,
3829 /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
3830 PAUSE_TYPE_IBSS_PS = 0x8,
3831 /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +05303832 PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9,
3833 /*
3834 * for TDLS offchannel MCC (switch channel), only vdev_map is valid,
3835 * TDLS connection tracker needs to be notified
3836 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003837 PAUSE_TYPE_HOST = 0x15,
3838 /** host is requesting vdev pause */
3839} wmi_tx_pause_type;
3840
3841typedef enum {
3842 ACTION_PAUSE = 0x0,
3843 ACTION_UNPAUSE = 0x1,
3844} wmi_tx_pause_action;
3845
3846typedef struct {
3847 A_UINT32 tlv_header;
3848 A_UINT32 pause_type;
3849 A_UINT32 action;
3850 A_UINT32 vdev_map;
3851 A_UINT32 peer_id;
3852 A_UINT32 tid_map;
3853} wmi_tx_pause_event_fixed_param;
3854
3855typedef enum {
3856 WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
3857 WMI_MGMT_TX_COMP_TYPE_DISCARD,
3858 WMI_MGMT_TX_COMP_TYPE_INSPECT,
3859 WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
3860 WMI_MGMT_TX_COMP_TYPE_MAX,
3861} WMI_MGMT_TX_COMP_STATUS_TYPE;
3862
3863typedef struct {
3864 A_UINT32 tlv_header;
3865 A_UINT32 desc_id; /* from tx_send_cmd */
3866 A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */
3867} wmi_mgmt_tx_compl_event_fixed_param;
3868
3869#define WMI_TPC_RATE_MAX 160
3870/* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
3871#define WMI_TPC_TX_NUM_CHAIN 4
3872
3873typedef enum {
3874 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
3875 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
3876 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
3877} WMI_TPC_CONFIG_EVENT_FLAG;
3878
3879typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303880 /* TLV tag and len; tag equals
3881 * WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param
3882 */
3883 A_UINT32 tlv_header;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003884 A_UINT32 regDomain;
3885 A_UINT32 chanFreq;
3886 A_UINT32 phyMode;
3887 A_UINT32 twiceAntennaReduction;
3888 A_UINT32 twiceMaxRDPower;
3889 A_INT32 twiceAntennaGain;
3890 A_UINT32 powerLimit;
3891 A_UINT32 rateMax;
3892 A_UINT32 numTxChain;
3893 A_UINT32 ctl;
3894 A_UINT32 flags;
Govind Singh869c9872016-02-22 18:36:34 +05303895 /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without
3896 * breaking the WMI compatibility
3897 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003898 A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
3899 A_INT8
3900 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN]
3901 [WMI_TPC_TX_NUM_CHAIN];
3902 A_INT8
3903 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN]
3904 [WMI_TPC_TX_NUM_CHAIN];
3905 A_INT8
3906 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN]
3907 [WMI_TPC_TX_NUM_CHAIN];
Govind Singh869c9872016-02-22 18:36:34 +05303908 /** pdev_id for identifying the MAC
3909 * See macros starting with WMI_PDEV_ID_ for values.
3910 */
3911 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003912 /* This TLV is followed by a byte array:
3913 * A_UINT8 ratesArray[];
3914 */
3915} wmi_pdev_tpc_config_event_fixed_param;
3916
3917typedef struct {
3918 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */
3919 A_UINT32 periodCnt;
3920 A_UINT32 L1Cnt;
3921 A_UINT32 L11Cnt;
3922 A_UINT32 L12Cnt;
3923 A_UINT32 L1Entry;
3924 A_UINT32 L11Entry;
3925 A_UINT32 L12Entry;
Govind Singh869c9872016-02-22 18:36:34 +05303926 /** pdev_id for identifying the MAC
3927 * See macros starting with WMI_PDEV_ID_ for values.
3928 */
3929 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003930} wmi_pdev_l1ss_track_event_fixed_param;
3931
3932typedef struct {
3933 A_UINT32 len;
3934 A_UINT32 msgref;
3935 A_UINT32 segmentInfo;
3936} wmi_pdev_seg_hdr_info;
3937
3938/*
3939 * Transmit power scale factor.
3940 *
3941 */
3942typedef enum {
3943 WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
3944 WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
3945 WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
3946 WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
3947 WMI_TP_SCALE_MIN = 4, /* min, but still on */
3948 WMI_TP_SCALE_SIZE = 5, /* max num of enum */
3949} WMI_TP_SCALE;
3950
3951#define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
3952
3953typedef struct {
3954 /** message buffer, NULL terminated */
3955 char bufp[WMI_MAX_DEBUG_MESG];
3956} wmi_debug_mesg_event;
3957
3958enum {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003959 /** P2P device */
3960 VDEV_SUBTYPE_P2PDEV = 0,
3961 /** P2P client */
3962 VDEV_SUBTYPE_P2PCLI,
3963 /** P2P GO */
3964 VDEV_SUBTYPE_P2PGO,
3965 /** BT3.0 HS */
3966 VDEV_SUBTYPE_BT,
3967};
3968
3969typedef struct {
3970 /** idnore power , only use flags , mode and freq */
3971 wmi_channel chan;
3972} wmi_pdev_set_channel_cmd;
3973
3974typedef enum {
3975 WMI_PKTLOG_EVENT_RX = 0x1,
3976 WMI_PKTLOG_EVENT_TX = 0x2,
3977 WMI_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
3978 WMI_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
3979 /* 0x10 used by deprecated DBG_PRINT */
3980 WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x20, /* To support Smart Antenna */
3981} WMI_PKTLOG_EVENT;
3982
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07003983typedef enum {
3984 /* (default) FW will decide under what conditions to enable pktlog */
3985 WMI_PKTLOG_ENABLE_AUTO = 0,
3986 WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */
3987} WMI_PKTLOG_ENABLE;
3988
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003989typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303990 /** TLV tag and len; tag equals
3991 * WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param
3992 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003993 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303994 /** pdev_id for identifying the MAC
3995 * See macros starting with WMI_PDEV_ID_ for values.
3996 */
3997 A_UINT32 pdev_id;
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07003998 A_UINT32 evlist; /* WMI_PKTLOG_EVENT */
3999 A_UINT32 enable; /* WMI_PKTLOG_ENABLE */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004000} wmi_pdev_pktlog_enable_cmd_fixed_param;
4001
4002typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05304003 /** TLV tag and len; tag equals
4004 * WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param
4005 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004006 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05304007 /** pdev_id for identifying the MAC
4008 * See macros starting with WMI_PDEV_ID_ for values.
4009 */
4010 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004011} wmi_pdev_pktlog_disable_cmd_fixed_param;
4012
Govind Singh45ef44a2016-02-01 17:45:22 +05304013typedef struct {
4014 /*
4015 * TLV tag and len; tag equals
4016 * WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param
4017 */
4018 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05304019 /** pdev_id for identifying the MAC
4020 * See macros starting with WMI_PDEV_ID_ for values.
4021 */
4022 A_UINT32 pdev_id;
Govind Singh45ef44a2016-02-01 17:45:22 +05304023 /*
4024 * enable for mib stats collection.
4025 * Stats are delivered to host in wmi_mib_stats structure.
4026 * If enable_Mib=1, stats collection is enabled.
4027 * If enable_Mib=0, stats collection does not happen
4028 */
4029 A_UINT32 enable_Mib;
4030} wmi_mib_stats_enable_cmd_fixed_param;
4031
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004032/** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
4033 * NOTE: This constant cannot be changed without breaking
4034 * WMI Compatibility. */
4035
4036#define WMI_DSCP_MAP_MAX (64)
4037/*
4038 * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
4039 * @details
4040 * Create an API for sending the custom DSCP-to-TID map to the target
4041 * If this is a request from the user space or from above the UMAC
4042 * then the best place to implement this is in the umac_if_offload of the OL path.
4043 * Provide a place holder for this API in the ieee80211com (ic).
4044 *
4045 * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
4046 * in the target should be directed to the function pointer in the ic.
4047 *
4048 * Implementation details of the API to send the map to the target are as described-
4049 *
4050 * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
4051 * DSCP-to-TID map is a one dimensional uint32_t array of length 64 to accomodate
4052 * 64 TID values for 2^6 (64) DSCP ids.
4053 * Example:
4054 * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
4055 * 0, 0, 0, 0, 0, 0, 0, 0,
4056 * 1, 1, 1, 1, 1, 1, 1, 1,
4057 * 2, 2, 2, 2, 2, 2, 2, 2,
4058 * 3, 3, 3, 3, 3, 3, 3, 3,
4059 * 4, 4, 4, 4, 4, 4, 4, 4,
4060 * 5, 5, 5, 5, 5, 5, 5, 5,
4061 * 6, 6, 6, 6, 6, 6, 6, 6,
4062 * 7, 7, 7, 7, 7, 7, 7, 7,
4063 * };
4064 *
4065 * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
4066 *
4067 * 3. Copy the DSCP-to-TID map into the WMI buffer.
4068 *
4069 * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
4070 * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
4071 * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
4072 * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
4073 *
4074 */
Govind Singh869c9872016-02-22 18:36:34 +05304075
4076/* DEPRECATED - use VDEV level command instead
4077 * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param)
4078 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004079typedef struct {
4080 A_UINT32 tlv_header;
4081 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
4082 A_UINT32 reserved0;
4083 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
4084 /* map indicating DSCP to TID conversion */
4085 A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
4086} wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
4087
Govind Singhc7d51942016-02-01 12:09:31 +05304088typedef struct {
4089 A_UINT32 tlv_header;
4090 /*
4091 * TLV tag and len; tag equals
4092 * WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param
4093 */
4094 A_UINT32 vdev_id;
4095 /** map indicating DSCP to TID conversion */
4096 A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
Rajeev Kumare18f5282016-04-15 14:08:29 -07004097 A_UINT32 enable_override;
Govind Singhc7d51942016-02-01 12:09:31 +05304098} wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
4099
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004100/** Fixed rate (rate-code) for broadcast/ multicast data frames */
4101/* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
4102 * @details
4103 * Create an API for setting the custom rate for the MCAST and BCAST frames
4104 * in the target. If this is a request from the user space or from above the UMAC
4105 * then the best place to implement this is in the umac_if_offload of the OL path.
4106 * Provide a place holder for this API in the ieee80211com (ic).
4107 *
4108 * Implementation details of the API to set custom rates for MCAST and BCAST in
4109 * the target are as described-
4110 *
4111 * 1. The function will have 3 arguments-
4112 * vap structure,
4113 * MCAST/ BCAST identifier code,
4114 * 8 bit rate code
4115 *
4116 * The rate-code is a 1-byte field in which:for given rate, nss and preamble
4117 * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
4118 * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
4119 * b'3-b'0 indicate the rate, which is indicated as follows:
4120 * OFDM : 0: OFDM 48 Mbps
4121 * 1: OFDM 24 Mbps
4122 * 2: OFDM 12 Mbps
4123 * 3: OFDM 6 Mbps
4124 * 4: OFDM 54 Mbps
4125 * 5: OFDM 36 Mbps
4126 * 6: OFDM 18 Mbps
4127 * 7: OFDM 9 Mbps
4128 * CCK (pream == 1)
4129 * 0: CCK 11 Mbps Long
4130 * 1: CCK 5.5 Mbps Long
4131 * 2: CCK 2 Mbps Long
4132 * 3: CCK 1 Mbps Long
4133 * 4: CCK 11 Mbps Short
4134 * 5: CCK 5.5 Mbps Short
4135 * 6: CCK 2 Mbps Short
4136 * HT/VHT (pream == 2/3)
4137 * 0..7: MCS0..MCS7 (HT)
4138 * 0..9: MCS0..MCS9 (VHT)
4139 *
4140 * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
4141 * to the target.
4142 * Arguments to the API are-
4143 * wmi handle,
4144 * VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
4145 * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
4146 * rate value.
4147 */
4148typedef enum {
4149 WMI_SET_MCAST_RATE,
4150 WMI_SET_BCAST_RATE
4151} MCAST_BCAST_RATE_ID;
4152
4153typedef struct {
4154 MCAST_BCAST_RATE_ID rate_id;
4155 A_UINT32 rate;
4156} mcast_bcast_rate;
4157
4158typedef struct {
4159 A_UINT32 tlv_header;
4160 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
4161 A_UINT32 cwmin;
4162 A_UINT32 cwmax;
4163 A_UINT32 aifs;
4164 A_UINT32 txoplimit;
4165 A_UINT32 acm;
4166 A_UINT32 no_ack;
4167} wmi_wmm_params;
4168
Govind Singh869c9872016-02-22 18:36:34 +05304169/* DEPRECATED - use VDEV level command instead
4170 * (wmi_vdev_set_wmm_params_cmd_fixed_param)
4171 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004172typedef struct {
4173 A_UINT32 tlv_header;
4174 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
4175 A_UINT32 reserved0;
4176 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
4177 A_UINT32 dg_type;
4178
4179 /* The TLVs for the 4 AC follows:
4180 * wmi_wmm_params wmm_params_ac_be;
4181 * wmi_wmm_params wmm_params_ac_bk;
4182 * wmi_wmm_params wmm_params_ac_vi;
4183 * wmi_wmm_params wmm_params_ac_vo;
4184 */
4185} wmi_pdev_set_wmm_params_cmd_fixed_param;
4186
4187typedef enum {
4188 WMI_REQUEST_PEER_STAT = 0x01,
4189 WMI_REQUEST_AP_STAT = 0x02,
4190 WMI_REQUEST_PDEV_STAT = 0x04,
4191 WMI_REQUEST_VDEV_STAT = 0x08,
4192 WMI_REQUEST_BCNFLT_STAT = 0x10,
4193 WMI_REQUEST_VDEV_RATE_STAT = 0x20,
Govind Singh32cced32016-02-01 13:33:09 +05304194 WMI_REQUEST_INST_STAT = 0x40,
Govind Singh45ef44a2016-02-01 17:45:22 +05304195 WMI_REQUEST_MIB_STAT = 0x80,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004196} wmi_stats_id;
4197
4198typedef struct {
4199 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
4200 wmi_stats_id stats_id;
4201 /** unique id identifying the VDEV, generated by the caller */
4202 A_UINT32 vdev_id;
4203 /** peer MAC address */
4204 wmi_mac_addr peer_macaddr;
4205} wmi_request_stats_cmd_fixed_param;
4206
4207/* stats type bitmap */
4208#define WMI_LINK_STATS_RADIO 0x00000001
4209#define WMI_LINK_STATS_IFACE 0x00000002
4210#define WMI_LINK_STATS_ALL_PEER 0x00000004
4211#define WMI_LINK_STATS_PER_PEER 0x00000008
4212
4213/* wifi clear statistics bitmap */
4214#define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
4215#define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
4216#define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
4217#define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
4218#define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
4219#define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
4220#define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
4221#define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
4222#define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */
4223#define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */
4224
4225/** Default value for stats if the stats collection has not started */
4226#define WMI_STATS_VALUE_INVALID 0xffffffff
4227
4228#define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16)
4229#define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value)
4230#define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1)
4231#define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value)
4232#define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
4233#define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
4234
4235typedef struct {
4236 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
4237 A_UINT32 num_of_diag_events_logs;
4238/* The TLVs will follow.
4239 * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
4240 * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
4241 * Bit 17 Indicate if the DIAG type is Enabled/Disabled.
4242 */
4243} wmi_diag_event_log_config_fixed_param;
4244
4245#define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
4246#define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
4247#define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1)
4248#define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
4249
4250typedef struct {
4251 A_UINT32 tlv_header;
4252 A_UINT32 num_of_diag_events_logs;
4253/* The TLVs will follow.
4254 * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
4255 * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
4256 * Bit 17 - Frequncy of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
4257 * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
4258 */
4259} wmi_diag_event_log_supported_event_fixed_params;
4260
4261typedef struct {
4262 /**
4263 * TLV tag and len; tag equals
4264 * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param
4265 */
4266 A_UINT32 tlv_header;
4267 /** placeholder for future */
4268 A_UINT32 reserved0;
4269} wmi_debug_mesg_flush_fixed_param;
4270
4271typedef struct {
4272 /**
4273 * TLV tag and len; tag equals
4274 * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param
4275 */
4276 A_UINT32 tlv_header;
4277 /** placeholder for future */
4278 A_UINT32 reserved0;
4279} wmi_debug_mesg_flush_complete_fixed_param;
4280
4281
4282typedef struct {
4283 /*
4284 * TLV tag and len; tag equals
4285 * WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param
4286 * vdev_id, where RSSI breach event occurred
4287 */
4288 A_UINT32 tlv_header;
4289 A_UINT32 vdev_id;
4290 /* request id */
4291 A_UINT32 request_id;
4292 /*
4293 * bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is
4294 * corresponding to hi_rssi[0-2]
4295 */
4296 A_UINT32 event_bitmap;
4297 /* rssi at the time of RSSI breach. Unit dBm */
4298 A_UINT32 rssi;
4299 /* bssid of the monitored AP's */
4300 wmi_mac_addr bssid;
4301} wmi_rssi_breach_event_fixed_param;
4302
4303
4304typedef struct {
4305 /** TLV tag and len; tag equals
4306 * WMITLV_TAG_STRUC_wmi_fw_mem_dump */
4307 A_UINT32 tlv_header;
4308 /** unique id identifying the segment */
4309 A_UINT32 seg_id;
4310 /** Start address of the segment to be read */
4311 A_UINT32 seg_start_addr_lo;
4312 A_UINT32 seg_start_addr_hi;
4313 /** Length of the segment to be read */
4314 A_UINT32 seg_length;
4315 /** Host bufeer address to which the segment will be read and dumped */
4316 A_UINT32 dest_addr_lo;
4317 A_UINT32 dest_addr_hi;
4318} wmi_fw_mem_dump;
4319
4320/* Command to get firmware memory dump*/
4321typedef struct {
4322 /** TLV tag and len; tag equals
4323 * WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
4324 A_UINT32 tlv_header;
4325 /** unique id identifying the request */
4326 A_UINT32 request_id;
4327 /** number of memory dump segments */
4328 A_UINT32 num_fw_mem_dump_segs;
4329 /**
4330 * This TLV is followed by another TLV
4331 * wmi_fw_mem_dump fw_mem_dump[];
4332 */
4333} wmi_get_fw_mem_dump_fixed_param;
4334
4335/** Event to indicate the completion of fw mem dump */
4336typedef struct {
4337 /* TLV tag and len; tag equals
4338 * WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
4339 A_UINT32 tlv_header;
4340 /** unique id identifying the request, given
4341 * in the request stats command */
4342 A_UINT32 request_id;
4343 /*In case of Firmware memory dump */
4344 A_UINT32 fw_mem_dump_complete;
4345} wmi_update_fw_mem_dump_fixed_param;
4346
4347typedef enum {
4348 WMI_ROAMING_IDLE = 0,
4349 WMI_ROAMING_ACTIVE = 1,
4350} wmi_roam_state;
4351
4352/* access categories */
4353typedef enum {
4354 WMI_AC_VO = 0,
4355 WMI_AC_VI = 1,
4356 WMI_AC_BE = 2,
4357 WMI_AC_BK = 3,
4358 WMI_AC_MAX = 4,
4359} wmi_traffic_ac;
4360
4361typedef enum {
4362 WMI_STA_STATS = 0,
4363 WMI_SOFTAP_STATS = 1,
4364 WMI_IBSS_STATS = 2,
4365 WMI_P2P_CLIENT_STATS = 3,
4366 WMI_P2P_GO_STATS = 4,
4367 WMI_NAN_STATS = 5,
4368 WMI_MESH_STATS = 6,
4369} wmi_link_iface_type;
4370
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004371/*Clear stats*/
4372typedef struct {
4373 A_UINT32 tlv_header;
4374 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
4375 /** unique id identifying the VDEV, generated by the caller */
4376 A_UINT32 vdev_id;
4377 /** stop_stats_collection_req = 1 will imply stop the statistics collection */
4378 A_UINT32 stop_stats_collection_req;
4379 /** identifies what stats to be cleared */
4380 A_UINT32 stats_clear_req_mask;
4381 /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
4382 wmi_mac_addr peer_macaddr;
4383} wmi_clear_link_stats_cmd_fixed_param;
4384
4385/* Link Stats configuration params. Trigger the link layer statistics collection*/
4386typedef struct {
4387 A_UINT32 tlv_header;
4388 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
4389 /** threshold to classify the pkts as short or long */
4390 A_UINT32 mpdu_size_threshold;
4391 /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
4392 A_UINT32 aggressive_statistics_gathering;
4393} wmi_start_link_stats_cmd_fixed_param;
4394
4395typedef struct {
4396 A_UINT32 tlv_header;
4397 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
4398 /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
4399 A_UINT32 stats_type;
4400 /** unique id identifying the VDEV, generated by the caller */
4401 A_UINT32 vdev_id;
4402 /** unique id identifying the request, generated by the caller */
4403 A_UINT32 request_id;
4404 /** peer MAC address */
4405 wmi_mac_addr peer_macaddr;
4406} wmi_request_link_stats_cmd_fixed_param;
4407
4408/* channel statistics */
4409typedef struct {
4410 A_UINT32 tlv_header;
4411 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
4412 /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
4413 A_UINT32 channel_width;
4414 /** Primary 20 MHz channel */
4415 A_UINT32 center_freq;
4416 /** center frequency (MHz) first segment */
4417 A_UINT32 center_freq0;
4418 /** center frequency (MHz) second segment */
4419 A_UINT32 center_freq1;
4420 /** msecs the radio is awake (32 bits number accruing over time) */
4421 A_UINT32 radio_awake_time;
4422 /** msecs the CCA register is busy (32 bits number accruing over time) */
4423 A_UINT32 cca_busy_time;
4424} wmi_channel_stats;
4425
Krishna Kumaar Natarajanee6cfa72016-03-25 14:05:03 -07004426/*
4427 * Each step represents 0.5 dB. The starting value is 0 dBm.
4428 * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps.
4429 */
4430#define MAX_TPC_LEVELS 64
4431
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004432/* radio statistics */
4433typedef struct {
4434 A_UINT32 tlv_header;
4435 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
4436 /** Wifi radio (if multiple radio supported) */
4437 A_UINT32 radio_id;
4438 /** msecs the radio is awake (32 bits number accruing over time) */
4439 A_UINT32 on_time;
4440 /** msecs the radio is transmitting (32 bits number accruing over time) */
4441 A_UINT32 tx_time;
4442 /** msecs the radio is in active receive (32 bits number accruing over time) */
4443 A_UINT32 rx_time;
4444 /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
4445 A_UINT32 on_time_scan;
4446 /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
4447 A_UINT32 on_time_nbd;
4448 /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
4449 A_UINT32 on_time_gscan;
4450 /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
4451 A_UINT32 on_time_roam_scan;
4452 /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
4453 A_UINT32 on_time_pno_scan;
4454 /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
4455 A_UINT32 on_time_hs20;
4456 /** number of channels */
4457 A_UINT32 num_channels;
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304458 /*
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304459 * tx time per TPC level - DEPRECATED
4460 * This field is deprecated.
4461 * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID
4462 * message.
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304463 */
Krishna Kumaar Natarajanee6cfa72016-03-25 14:05:03 -07004464 A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS];
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304465} wmi_radio_link_stats;
4466
4467/** tx time per power level statistics */
4468typedef struct {
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304469 /*
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304470 * TLV tag and len; tag equals
4471 * WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304472 */
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304473 A_UINT32 tlv_header;
4474 /* total number of tx power levels */
4475 A_UINT32 total_num_tx_power_levels;
4476 /* number of tx power levels that are carried in this event */
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304477 A_UINT32 num_tx_power_levels;
4478 /*
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304479 * offset of current stats
4480 * If ((num_tx_power_levels + power_level_offset)) ==
4481 * total_num_tx_power_levels)
4482 * this message completes the report of tx time per power levels.
4483 * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID
4484 * messages will be sent by the target to deliver the remainder of the
4485 * tx time per power level stats.
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304486 */
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304487 A_UINT32 power_level_offset;
4488 /*
4489 * This TLV will be followed by a TLV containing a variable-length
4490 * array of A_UINT32 with tx time per power level data
4491 * A_UINT32 tx_time_per_power_level[num_tx_power_levels]
4492 * The tx time is in units of milliseconds.
4493 * The power levels are board-specific values; a board-specific
4494 * translation has to be applied to determine what actual power
4495 * corresponds to each power level.
4496 * Just as the host has a BDF file available, the host should also have
4497 * a data file available that provides the power level to power
4498 * translations.
4499 */
4500} wmi_tx_power_level_stats_evt_fixed_param;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004501
4502/** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
4503typedef struct {
4504 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
4505 /** unique id identifying the request, given in the request stats command */
4506 A_UINT32 request_id;
4507 /** Number of radios*/
4508 A_UINT32 num_radio;
4509 /** more_data will be set depending on the number of radios */
4510 A_UINT32 more_radio_events;
4511/*
4512 * This TLV is followed by another TLV of array of bytes
4513 * size of(struct wmi_radio_link_stats);
4514 *
4515 * This TLV is followed by another TLV of array of bytes
4516 * num_channels * size of(struct wmi_channel_stats)
4517 */
4518
4519} wmi_radio_link_stats_event_fixed_param;
4520
4521/* per rate statistics */
4522typedef struct {
4523 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
4524 /** rate information
4525 * The rate-code is a 1-byte field in which:for given rate, nss and preamble
4526 * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
4527 * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
4528 * b'3-b'0 indicate the rate, which is indicated as follows:
4529 * OFDM : 0: OFDM 48 Mbps
4530 * 1: OFDM 24 Mbps
4531 * 2: OFDM 12 Mbps
4532 * 3: OFDM 6 Mbps
4533 * 4: OFDM 54 Mbps
4534 * 5: OFDM 36 Mbps
4535 * 6: OFDM 18 Mbps
4536 * 7: OFDM 9 Mbps
4537 * CCK (pream == 1)
4538 * 0: CCK 11 Mbps Long
4539 * 1: CCK 5.5 Mbps Long
4540 * 2: CCK 2 Mbps Long
4541 * 3: CCK 1 Mbps Long
4542 * 4: CCK 11 Mbps Short
4543 * 5: CCK 5.5 Mbps Short
4544 * 6: CCK 2 Mbps Short
4545 * HT/VHT (pream == 2/3)
4546 * 0..7: MCS0..MCS7 (HT)
4547 * 0..9: MCS0..MCS9 (VHT)
4548 */
4549 A_UINT32 rate;
4550 /** units of 100 Kbps */
4551 A_UINT32 bitrate;
4552 /** number of successfully transmitted data pkts (ACK rcvd) */
4553 A_UINT32 tx_mpdu;
4554 /** number of received data pkts */
4555 A_UINT32 rx_mpdu;
4556 /** number of data packet losses (no ACK) */
4557 A_UINT32 mpdu_lost;
4558 /** total number of data pkt retries */
4559 A_UINT32 retries;
4560 /** number of short data pkt retries */
4561 A_UINT32 retries_short;
4562 /** number of long data pkt retries */
4563 A_UINT32 retries_long;
4564} wmi_rate_stats;
4565
4566typedef struct {
4567 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
4568 /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
4569 A_UINT32 peer_type;
4570 /** mac address */
4571 wmi_mac_addr peer_mac_address;
4572 /** peer wmi_CAPABILITY_XXX */
4573 A_UINT32 capabilities;
4574 /** number of rates */
4575 A_UINT32 num_rates;
4576} wmi_peer_link_stats;
4577
4578/** PEER statistics (once started) reset and start afresh after each connection */
4579typedef struct {
4580 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
4581 /** unique id identifying the request, given in the request stats command */
4582 A_UINT32 request_id;
4583 /** number of peers accomidated in this particular event */
4584 A_UINT32 num_peers;
4585 /** Indicates the fragment number */
4586 A_UINT32 peer_event_number;
4587 /** Indicates if there are more peers which will be sent as seperate peer_stats event */
4588 A_UINT32 more_data;
4589
4590/**
4591 * This TLV is followed by another TLV
4592 * num_peers * size of(struct wmi_peer_stats)
4593 * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
4594 */
4595} wmi_peer_stats_event_fixed_param;
4596
4597/* per access category statistics */
4598typedef struct {
4599 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
4600 /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
4601 A_UINT32 ac_type;
4602 /** number of successfully transmitted unicast data pkts (ACK rcvd) */
4603 A_UINT32 tx_mpdu;
4604 /** number of received unicast mpdus */
4605 A_UINT32 rx_mpdu;
4606 /** number of succesfully transmitted multicast data packets */
4607 /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
4608 A_UINT32 tx_mcast;
4609 /** number of received multicast data packets */
4610 A_UINT32 rx_mcast;
4611 /** number of received unicast a-mpdus */
4612 A_UINT32 rx_ampdu;
4613 /** number of transmitted unicast a-mpdus */
4614 A_UINT32 tx_ampdu;
4615 /** number of data pkt losses (no ACK) */
4616 A_UINT32 mpdu_lost;
4617 /** total number of data pkt retries */
4618 A_UINT32 retries;
4619 /** number of short data pkt retries */
4620 A_UINT32 retries_short;
4621 /** number of long data pkt retries */
4622 A_UINT32 retries_long;
4623 /** data pkt min contention time (usecs) */
4624 A_UINT32 contention_time_min;
4625 /** data pkt max contention time (usecs) */
4626 A_UINT32 contention_time_max;
4627 /** data pkt avg contention time (usecs) */
4628 A_UINT32 contention_time_avg;
4629 /** num of data pkts used for contention statistics */
4630 A_UINT32 contention_num_samples;
4631} wmi_wmm_ac_stats;
4632
4633/* interface statistics */
4634typedef struct {
4635 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
4636 /** access point beacon received count from connected AP */
4637 A_UINT32 beacon_rx;
4638 /** access point mgmt frames received count from connected AP (including Beacon) */
4639 A_UINT32 mgmt_rx;
4640 /** action frames received count */
4641 A_UINT32 mgmt_action_rx;
4642 /** action frames transmit count */
4643 A_UINT32 mgmt_action_tx;
4644 /** access Point Beacon and Management frames RSSI (averaged) */
4645 A_UINT32 rssi_mgmt;
4646 /** access Point Data Frames RSSI (averaged) from connected AP */
4647 A_UINT32 rssi_data;
4648 /** access Point ACK RSSI (averaged) from connected AP */
4649 A_UINT32 rssi_ack;
4650 /** number of peers */
4651 A_UINT32 num_peers;
4652 /** Indicates how many peer_stats events will be sent depending on the num_peers. */
4653 A_UINT32 num_peer_events;
4654 /** number of ac */
4655 A_UINT32 num_ac;
4656 /** Roaming Stat */
4657 A_UINT32 roam_state;
4658 /**
4659 * Average Beacon spread offset is the averaged time delay between TBTT
4660 * and beacon TSF */
4661 /** Upper 32 bits of averaged 64 bit beacon spread offset */
4662 A_UINT32 avg_bcn_spread_offset_high;
4663 /** Lower 32 bits of averaged 64 bit beacon spread offset */
4664 A_UINT32 avg_bcn_spread_offset_low;
4665 /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
4666 A_UINT32 is_leaky_ap;
4667 /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
4668 A_UINT32 avg_rx_frms_leaked;
4669 /** Rx leak watch window currently in force to minimize data loss
4670 * because of leaky AP. Rx leak window is the
4671 * time driver waits before shutting down the radio or switching the
4672 * channel and after receiving an ACK for
4673 * a data frame with PM bit set) */
4674 A_UINT32 rx_leak_window;
4675} wmi_iface_link_stats;
4676
4677/** Interface statistics (once started) reset and start afresh after each connection */
4678typedef struct {
4679 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
4680 /** unique id identifying the request, given in the request stats command */
4681 A_UINT32 request_id;
4682 /** unique id identifying the VDEV, generated by the caller */
4683 A_UINT32 vdev_id;
4684/*
4685 * This TLV is followed by another TLV
4686 * wmi_iface_link_stats iface_link_stats;
4687 * num_ac * size of(struct wmi_wmm_ac_stats)
4688 */
4689} wmi_iface_link_stats_event_fixed_param;
4690
4691/** Suspend option */
4692enum {
4693 WMI_PDEV_SUSPEND, /* suspend */
4694 WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
4695};
4696
4697typedef struct {
4698 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */
4699 /* suspend option sent to target */
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05304700 /*
4701 * pdev_id for identifying the MAC, See macros
4702 * starting with WMI_PDEV_ID_ for values.
4703 */
4704 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004705 A_UINT32 suspend_opt;
4706} wmi_pdev_suspend_cmd_fixed_param;
4707
4708typedef struct {
4709 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param */
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05304710 /*
4711 * pdev_id for identifying the MAC, See macros
4712 * starting with WMI_PDEV_ID_ for values.
4713 */
4714 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004715} wmi_pdev_resume_cmd_fixed_param;
4716
4717typedef struct {
4718 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */
4719 A_UINT32 num_vdev_stats; /* number of vdevs */
4720} wmi_vdev_rate_stats_event_fixed_param;
4721
4722typedef struct {
4723 A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info */
4724 A_UINT32 vdevid; /* Id of the wlan vdev */
4725 A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted */
4726 A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above */
4727 A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
4728 A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
4729} wmi_vdev_rate_ht_info;
4730
4731typedef struct {
4732 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
4733 wmi_stats_id stats_id;
4734 /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
4735 A_UINT32 num_pdev_stats;
4736 /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */
4737 A_UINT32 num_vdev_stats;
4738 /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */
4739 A_UINT32 num_peer_stats;
4740 A_UINT32 num_bcnflt_stats;
4741 /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */
4742 A_UINT32 num_chan_stats;
Govind Singh45ef44a2016-02-01 17:45:22 +05304743 /** number of MIB stats event structures (wmi_mib_stats) */
4744 A_UINT32 num_mib_stats;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004745 /* This TLV is followed by another TLV of array of bytes
4746 * A_UINT8 data[];
4747 * This data array contains
4748 * num_pdev_stats * size of(struct wmi_pdev_stats)
4749 * num_vdev_stats * size of(struct wmi_vdev_stats)
4750 * num_peer_stats * size of(struct wmi_peer_stats)
4751 * num_bcnflt_stats * size_of()
4752 * num_chan_stats * size of(struct wmi_chan_stats)
Govind Singh45ef44a2016-02-01 17:45:22 +05304753 * num_mib_stats * size of(struct wmi_mib_stats)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004754 *
4755 */
4756} wmi_stats_event_fixed_param;
4757
4758/**
4759 * PDEV statistics
4760 * @todo
4761 * add all PDEV stats here
4762 */
4763typedef struct {
4764 /** Channel noise floor */
4765 A_INT32 chan_nf;
4766 /** TX frame count */
4767 A_UINT32 tx_frame_count;
4768 /** RX frame count */
4769 A_UINT32 rx_frame_count;
4770 /** rx clear count */
4771 A_UINT32 rx_clear_count;
4772 /** cycle count */
4773 A_UINT32 cycle_count;
4774 /** Phy error count */
4775 A_UINT32 phy_err_count;
4776 /** Channel Tx Power */
4777 A_UINT32 chan_tx_pwr;
4778 /** WAL dbg stats */
4779 struct wlan_dbg_stats pdev_stats;
4780
4781} wmi_pdev_stats;
4782
4783/**
4784 * VDEV statistics
4785 * @todo
4786 * add all VDEV stats here
4787 */
4788
4789typedef struct {
4790 A_INT32 bcn_snr;
4791 A_INT32 dat_snr;
4792} wmi_snr_info;
4793
4794typedef struct {
4795 /** unique id identifying the VDEV, generated by the caller */
4796 A_UINT32 vdev_id;
4797 wmi_snr_info vdev_snr;
4798 A_UINT32 tx_frm_cnt[WLAN_MAX_AC]; /* Total number of packets(per AC) that were successfully transmitted(with and without retries, including multi-cast, broadcast) */
4799 A_UINT32 rx_frm_cnt; /* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast) */
4800 A_UINT32 multiple_retry_cnt[WLAN_MAX_AC]; /*The number of MSDU packets and MMPDU frames per AC
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05304801 that the 802.11 station successfully transmitted after more than one retransmission attempt */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004802 A_UINT32 fail_cnt[WLAN_MAX_AC]; /*Total number packets(per AC) failed to transmit */
4803 A_UINT32 rts_fail_cnt; /*Total number of RTS/CTS sequence failures for transmission of a packet */
4804 A_UINT32 rts_succ_cnt; /*Total number of RTS/CTS sequence success for transmission of a packet */
4805 A_UINT32 rx_err_cnt; /*The receive error count. HAL will provide the RxP FCS error global */
4806 A_UINT32 rx_discard_cnt; /* The sum of the receive error count and dropped-receive-buffer error count. (FCS error) */
4807 A_UINT32 ack_fail_cnt; /*Total number packets failed transmit because of no ACK from the remote entity */
4808 A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES]; /*History of last ten transmit rate, in units of 500 kbit/sec */
4809 A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES]; /*History of last ten Beacon rssi of the connected Bss */
4810} wmi_vdev_stats;
4811
4812/**
4813 * peer statistics.
4814 *
4815 * @todo
4816 * add more stats
4817 *
4818 */
4819typedef struct {
4820 /** peer MAC address */
4821 wmi_mac_addr peer_macaddr;
4822 /** rssi */
4823 A_UINT32 peer_rssi;
4824 /** last tx data rate used for peer */
4825 A_UINT32 peer_tx_rate;
4826 /** last rx data rate used for peer */
4827 A_UINT32 peer_rx_rate;
4828} wmi_peer_stats;
4829
4830typedef struct {
4831 /** Primary channel freq of the channel for which stats are sent */
4832 A_UINT32 chan_mhz;
4833 /** Time spent on the channel */
4834 A_UINT32 sampling_period_us;
4835 /** Aggregate duration over a sampling period for which channel activity was observed */
4836 A_UINT32 rx_clear_count;
4837 /** Accumalation of the TX PPDU duration over a sampling period */
4838 A_UINT32 tx_duration_us;
4839 /** Accumalation of the RX PPDU duration over a sampling period */
4840 A_UINT32 rx_duration_us;
4841} wmi_chan_stats;
4842
4843typedef struct {
Govind Singh45ef44a2016-02-01 17:45:22 +05304844 A_UINT32 tx_mpdu_grp_frag_cnt; /*dot11TransmittedFragmentCount */
4845 A_UINT32 tx_msdu_grp_frm_cnt; /*dot11GroupTransmittedFrameCount */
4846 A_UINT32 tx_msdu_fail_cnt; /*dot11FailedCount*/
4847 A_UINT32 rx_mpdu_frag_cnt; /*dot11ReceivedFragmentCount*/
4848 A_UINT32 rx_msdu_grp_frm_cnt; /*dot11GroupReceivedFrameCount*/
4849 A_UINT32 rx_mpdu_fcs_err; /*dot11FCSErrorCount*/
4850 A_UINT32 tx_msdu_frm_cnt; /*dot11TransmittedFrameCount*/
4851 A_UINT32 tx_msdu_retry_cnt; /*dot11RetryCount*/
4852 A_UINT32 rx_frm_dup_cnt; /*dot11FrameDuplicateCount */
4853 A_UINT32 tx_rts_success_cnt; /*dot11RTSSuccessCount*/
4854 A_UINT32 tx_rts_fail_cnt; /*dot11RTSFailureCount*/
4855 /*dot11QosTransmittedFragmentCount */
4856 A_UINT32 tx_Qos_mpdu_grp_frag_cnt;
4857 A_UINT32 tx_Qos_msdu_fail_UP; /*dot11QosFailedCount */
4858 A_UINT32 tx_Qos_msdu_retry_UP; /*dot11QosRetryCount */
4859 A_UINT32 rx_Qos_frm_dup_cnt_UP; /*dot11QosFrameDuplicateCount*/
4860 A_UINT32 tx_Qos_rts_success_cnt_UP; /*dot11QosRTSSuccessCount*/
4861 A_UINT32 tx_Qos_rts_fail_cnt_UP; /*dot11QosRTSFailureCount*/
4862 A_UINT32 rx_Qos_mpdu_frag_cnt_UP; /*dot11QosReceivedFragmentCount*/
4863 A_UINT32 tx_Qos_msdu_frm_cnt_UP; /*dot11QosTransmittedFrameCount*/
4864 A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/
4865 A_UINT32 rx_Qos_mpdu_cnt; /*dot11QosMPDUsReceivedCount*/
4866 A_UINT32 rx_Qos_mpdu_retryBit_cnt; /*dot11QosRetriesReceivedCount*/
4867 /*dot11RSNAStatsRobustMgmtCCMPReplays */
4868 A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt;
4869 A_UINT32 rsna_TKIP_icv_err_cnt; /*dot11RSNAStatsTKIPICVErrors*/
4870 A_UINT32 rsna_TKIP_replay_err_cnt; /*dot11RSNAStatsTKIPReplays*/
4871 /*dot11RSNAStatsCCMPDecryptErrors */
4872 A_UINT32 rsna_CCMP_decrypt_err_cnt;
4873 A_UINT32 rsna_CCMP_replay_err_cnt; /*dot11RSNAStatsCCMPReplays*/
4874 A_UINT32 tx_ampdu_cnt; /*dot11TransmittedAMPDUCount*/
4875 /*dot11TransmittedMPDUsInAMPDUCount*/
4876 A_UINT32 tx_mpdu_cnt_in_ampdu;
4877 /*dot11TransmittedOctetsInAMPDUCount*/
4878 union {
4879 A_UINT64 counter; /* for use by target only */
4880 struct {
4881 A_UINT32 low;
4882 A_UINT32 high;
4883 } upload; /* for use by host */
4884 } tx_octets_in_ampdu;
4885 A_UINT32 rx_ampdu_cnt; /*dot11AMPDUReceivedCount*/
4886 A_UINT32 rx_mpdu_cnt_in_ampdu; /*dot11MPDUInReceivedAMPDUCount*/
4887 union {
4888 A_UINT64 counter; /* for use by target only */
4889 struct {
4890 A_UINT32 rx_octets_in_ampdu_low;
4891 A_UINT32 rx_octets_in_ampdu_high;
4892 } upload; /* for use by host */
4893 } rx_octets_in_ampdu; /*dot11ReceivedOctetsInAMPDUCount*/
4894 A_UINT32 reserved_1;
4895 A_UINT32 reserved_2;
4896 A_UINT32 reserved_3;
4897 A_UINT32 reserved_4;
4898} wmi_mib_stats;
4899
4900typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004901 A_UINT32 tlv_header;
4902 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
4903 /** unique id identifying the VDEV, generated by the caller */
4904 A_UINT32 vdev_id;
4905 /** VDEV type (AP,STA,IBSS,MONITOR) */
4906 A_UINT32 vdev_type;
4907 /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0)*/
4908 A_UINT32 vdev_subtype;
4909 /** VDEV MAC address */
4910 wmi_mac_addr vdev_macaddr;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05304911 /** Number of configured txrx streams */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004912 A_UINT32 num_cfg_txrx_streams;
4913 /*
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05304914 * pdev_id for identifying the MAC,
4915 * See macros starting with WMI_PDEV_ID_ for values.
4916 */
4917 A_UINT32 pdev_id;
4918 /*
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004919 * This TLV is followed by another TLV of array of structures
4920 * wmi_vdev_txrx_streams cfg_txrx_streams[];
4921 */
4922} wmi_vdev_create_cmd_fixed_param;
4923
4924typedef struct {
4925 /*
4926 * TLV tag and len; tag equals
4927 * WMITLV_TAG_STRUC_wmi_vdev_txrx_streams
4928 */
4929 A_UINT32 tlv_header;
4930 /* band - Should take values from wmi_channel_band_mask */
4931 A_UINT32 band;
4932 /* max supported tx streams per given band for this vdev */
4933 A_UINT32 supported_tx_streams;
4934 /* max supported rx streams per given band for this vdev */
4935 A_UINT32 supported_rx_streams;
4936} wmi_vdev_txrx_streams;
4937
4938/* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
4939typedef struct {
4940 A_UINT32 tlv_header;
4941 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
4942 A_UINT32 type_count;
4943 /** 255: continuous schedule, 0: reserved */
4944 A_UINT32 duration;
4945 /** Absent period duration in micro seconds */
4946 A_UINT32 interval;
4947 /** Absent period interval in micro seconds */
4948 A_UINT32 start_time;
4949 /** 32 bit tsf time when in starts */
4950} wmi_p2p_noa_descriptor;
4951
4952/** values for vdev_type */
4953#define WMI_VDEV_TYPE_AP 0x1
4954#define WMI_VDEV_TYPE_STA 0x2
4955#define WMI_VDEV_TYPE_IBSS 0x3
4956#define WMI_VDEV_TYPE_MONITOR 0x4
4957
4958/** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
4959 * by FW to execute the NAN specific WMI commands and also implement NAN specific
4960 * operations like Network discovery, service provisioning and service
4961 * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create
4962 * WMI command to create this VDEV once during initialization and host is not
4963 * expected to use any VDEV specific WMI commands on this VDEV.
4964 **/
4965#define WMI_VDEV_TYPE_NAN 0x5
4966
4967#define WMI_VDEV_TYPE_OCB 0x6
4968
Govind Singh941bd5e2016-02-04 17:15:25 +05304969/* NAN Data Interface */
4970#define WMI_VDEV_TYPE_NDI 0x7
4971
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004972/** values for vdev_subtype */
4973#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
4974#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
4975#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3
Govind Singh32cced32016-02-01 13:33:09 +05304976#define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA 0x4
4977#define WMI_UNIFIED_VDEV_SUBTYPE_MESH 0x5
Sandeep Puligilla62f7ca02016-03-24 15:48:33 -07004978/*
4979 * new subtype for 11S mesh is required as 11S functionality differs
4980 * in many ways from proprietary mesh
4981 * 11S uses 6-addr frame format and supports peering between mesh
4982 * stations and dynamic best path selection between mesh stations.
4983 * While in proprietary mesh, neighboring mesh station MAC is manually
4984 * added to AST table for traffic flow between mesh stations
4985 */
4986#define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S 0x6
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004987
4988/** values for vdev_start_request flags */
4989/** Indicates that AP VDEV uses hidden ssid. only valid for
4990 * AP/GO */
4991#define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0)
4992/** Indicates if robust management frame/management frame
4993 * protection is enabled. For GO/AP vdevs, it indicates that
4994 * it may support station/client associations with RMF enabled.
4995 * For STA/client vdevs, it indicates that sta will
4996 * associate with AP with RMF enabled. */
4997#define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1)
4998
4999/*
5000 * Host is sending bcn_tx_rate to override the beacon tx rates.
5001 */
5002#define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
5003
5004typedef struct {
5005 A_UINT32 tlv_header;
5006 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
5007 /** unique id identifying the VDEV, generated by the caller */
5008 A_UINT32 vdev_id;
5009 /** requestor id identifying the caller module */
5010 A_UINT32 requestor_id;
5011 /** beacon interval from received beacon */
5012 A_UINT32 beacon_interval;
5013 /** DTIM Period from the received beacon */
5014 A_UINT32 dtim_period;
5015 /** Flags */
5016 A_UINT32 flags;
5017 /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
5018 wmi_ssid ssid;
5019 /** beacon/probe reponse xmit rate. Applicable for SoftAP. */
5020 /** This field will be invalid and ignored unless the */
5021 /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
5022 /** When valid, this field contains the fixed tx rate for the beacon */
5023 /** and probe response frames send by the GO or SoftAP */
5024 A_UINT32 bcn_tx_rate;
5025 /** beacon/probe reponse xmit power. Applicable for SoftAP. */
5026 A_UINT32 bcn_txPower;
5027 /** number of p2p NOA descriptor(s) from scan entry */
5028 A_UINT32 num_noa_descriptors;
5029 /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
5030 During CAC, Our HW shouldn't ack ditected frames */
5031 A_UINT32 disable_hw_ack;
5032 /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
5033 /** The DBS policy manager indicates the preferred number of transmit streams. */
5034 A_UINT32 preferred_tx_streams;
5035 /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
5036 /** the DBS policy manager indicates the preferred number of receive streams. */
5037 A_UINT32 preferred_rx_streams;
5038 /* The TLVs follows this structure:
5039 * wmi_channel chan; //WMI channel
5040 * wmi_p2p_noa_descriptor noa_descriptors[]; //actual p2p NOA descriptor from scan entry
5041 */
5042} wmi_vdev_start_request_cmd_fixed_param;
5043
5044typedef struct {
5045 A_UINT32 tlv_header;
5046 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
5047 /** unique id identifying the VDEV, generated by the caller */
5048 A_UINT32 vdev_id;
5049} wmi_vdev_delete_cmd_fixed_param;
5050
5051typedef struct {
5052 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
5053 /** unique id identifying the VDEV, generated by the caller */
5054 A_UINT32 vdev_id;
5055 /** aid (assoc id) received in association response for STA VDEV */
5056 A_UINT32 vdev_assoc_id;
5057 /** bssid of the BSS the VDEV is joining */
5058 wmi_mac_addr vdev_bssid;
5059} wmi_vdev_up_cmd_fixed_param;
5060
5061typedef struct {
5062 A_UINT32 tlv_header;
5063 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
5064 /** unique id identifying the VDEV, generated by the caller */
5065 A_UINT32 vdev_id;
5066} wmi_vdev_stop_cmd_fixed_param;
5067
5068typedef struct {
5069 A_UINT32 tlv_header;
5070 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
5071 /** unique id identifying the VDEV, generated by the caller */
5072 A_UINT32 vdev_id;
5073} wmi_vdev_down_cmd_fixed_param;
5074
5075typedef struct {
5076 /** unique id identifying the VDEV, generated by the caller */
5077 A_UINT32 vdev_id;
5078} wmi_vdev_standby_response_cmd;
5079
5080typedef struct {
5081 /** unique id identifying the VDEV, generated by the caller */
5082 A_UINT32 vdev_id;
5083} wmi_vdev_resume_response_cmd;
5084
5085typedef struct {
5086 A_UINT32 tlv_header;
5087 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
5088 /** unique id identifying the VDEV, generated by the caller */
5089 A_UINT32 vdev_id;
5090 /** parameter id */
5091 A_UINT32 param_id;
5092 /** parameter value */
5093 A_UINT32 param_value;
5094} wmi_vdev_set_param_cmd_fixed_param;
5095
5096typedef struct {
5097 A_UINT32 key_seq_counter_l;
5098 A_UINT32 key_seq_counter_h;
5099} wmi_key_seq_counter;
5100
5101#define WMI_CIPHER_NONE 0x0 /* clear key */
5102#define WMI_CIPHER_WEP 0x1
5103#define WMI_CIPHER_TKIP 0x2
5104#define WMI_CIPHER_AES_OCB 0x3
5105#define WMI_CIPHER_AES_CCM 0x4
5106#define WMI_CIPHER_WAPI 0x5
5107#define WMI_CIPHER_CKIP 0x6
5108#define WMI_CIPHER_AES_CMAC 0x7
5109#define WMI_CIPHER_ANY 0x8
Govind Singh869c9872016-02-22 18:36:34 +05305110#define WMI_CIPHER_AES_GCM 0x9
5111#define WMI_CIPHER_AES_GMAC 0xa
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005112
5113typedef struct {
5114 A_UINT32 tlv_header;
5115 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
5116 /** unique id identifying the VDEV, generated by the caller */
5117 A_UINT32 vdev_id;
5118 /** MAC address used for installing */
5119 wmi_mac_addr peer_macaddr;
5120 /** key index */
5121 A_UINT32 key_ix;
5122 /** key flags */
5123 A_UINT32 key_flags;
5124 /** key cipher, defined above */
5125 A_UINT32 key_cipher;
5126 /** key rsc counter */
5127 wmi_key_seq_counter key_rsc_counter;
5128 /** global key rsc counter */
5129 wmi_key_seq_counter key_global_rsc_counter;
5130 /** global key tsc counter */
5131 wmi_key_seq_counter key_tsc_counter;
5132 /** WAPI key rsc counter */
5133 A_UINT8 wpi_key_rsc_counter[16];
5134 /** WAPI key tsc counter */
5135 A_UINT8 wpi_key_tsc_counter[16];
5136 /** key length */
5137 A_UINT32 key_len;
5138 /** key tx mic length */
5139 A_UINT32 key_txmic_len;
5140 /** key rx mic length */
5141 A_UINT32 key_rxmic_len;
5142 /*
5143 * Following this struct are this TLV.
5144 * // actual key data
5145 * A_UINT8 key_data[]; // contains key followed by tx mic followed by rx mic
5146 */
5147} wmi_vdev_install_key_cmd_fixed_param;
5148
5149/** Preamble types to be used with VDEV fixed rate configuration */
5150typedef enum {
5151 WMI_RATE_PREAMBLE_OFDM,
5152 WMI_RATE_PREAMBLE_CCK,
5153 WMI_RATE_PREAMBLE_HT,
5154 WMI_RATE_PREAMBLE_VHT,
5155} WMI_RATE_PREAMBLE;
5156
5157/** Value to disable fixed rate setting */
5158#define WMI_FIXED_RATE_NONE (0xff)
5159
5160/** the definition of different VDEV parameters */
5161typedef enum {
5162 /** RTS Threshold */
5163 WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
5164 /** Fragmentation threshold */
5165 WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
5166 /** beacon interval in TUs */
5167 WMI_VDEV_PARAM_BEACON_INTERVAL,
5168 /** Listen interval in TUs */
5169 WMI_VDEV_PARAM_LISTEN_INTERVAL,
5170 /** muticast rate in Mbps */
5171 WMI_VDEV_PARAM_MULTICAST_RATE,
5172 /** management frame rate in Mbps */
5173 WMI_VDEV_PARAM_MGMT_TX_RATE,
5174 /** slot time (long vs short) */
5175 WMI_VDEV_PARAM_SLOT_TIME,
5176 /** preamble (long vs short) */
5177 WMI_VDEV_PARAM_PREAMBLE,
5178 /** SWBA time (time before tbtt in msec) */
5179 WMI_VDEV_PARAM_SWBA_TIME,
5180 /** time period for updating VDEV stats */
5181 WMI_VDEV_STATS_UPDATE_PERIOD,
5182 /** age out time in msec for frames queued for station in power save*/
5183 WMI_VDEV_PWRSAVE_AGEOUT_TIME,
5184 /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
5185 WMI_VDEV_HOST_SWBA_INTERVAL,
5186 /** DTIM period (specified in units of num beacon intervals) */
5187 WMI_VDEV_PARAM_DTIM_PERIOD,
5188 /** scheduler air time limit for this VDEV. used by off chan scheduler */
5189 WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
5190 /** enable/dsiable WDS for this VDEV */
5191 WMI_VDEV_PARAM_WDS,
5192 /** ATIM Window */
5193 WMI_VDEV_PARAM_ATIM_WINDOW,
5194 /** BMISS max */
5195 WMI_VDEV_PARAM_BMISS_COUNT_MAX,
5196 /** BMISS first time */
5197 WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
5198 /** BMISS final time */
5199 WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
5200 /** WMM enables/disabled */
5201 WMI_VDEV_PARAM_FEATURE_WMM,
5202 /** Channel width */
5203 WMI_VDEV_PARAM_CHWIDTH,
5204 /** Channel Offset */
5205 WMI_VDEV_PARAM_CHEXTOFFSET,
5206 /** Disable HT Protection */
5207 WMI_VDEV_PARAM_DISABLE_HTPROTECTION,
5208 /** Quick STA Kickout */
5209 WMI_VDEV_PARAM_STA_QUICKKICKOUT,
5210 /** Rate to be used with Management frames */
5211 WMI_VDEV_PARAM_MGMT_RATE,
5212 /** Protection Mode */
5213 WMI_VDEV_PARAM_PROTECTION_MODE,
5214 /** Fixed rate setting */
5215 WMI_VDEV_PARAM_FIXED_RATE,
5216 /** Short GI Enable/Disable */
5217 WMI_VDEV_PARAM_SGI,
5218 /** Enable LDPC */
5219 WMI_VDEV_PARAM_LDPC,
5220 /** Enable Tx STBC */
5221 WMI_VDEV_PARAM_TX_STBC,
5222 /** Enable Rx STBC */
5223 WMI_VDEV_PARAM_RX_STBC,
5224 /** Intra BSS forwarding */
5225 WMI_VDEV_PARAM_INTRA_BSS_FWD,
5226 /** Setting Default xmit key for Vdev */
5227 WMI_VDEV_PARAM_DEF_KEYID,
5228 /** NSS width */
5229 WMI_VDEV_PARAM_NSS,
5230 /** Set the custom rate for the broadcast data frames */
5231 WMI_VDEV_PARAM_BCAST_DATA_RATE,
5232 /** Set the custom rate (rate-code) for multicast data frames */
5233 WMI_VDEV_PARAM_MCAST_DATA_RATE,
5234 /** Tx multicast packet indicate Enable/Disable */
5235 WMI_VDEV_PARAM_MCAST_INDICATE,
5236 /** Tx DHCP packet indicate Enable/Disable */
5237 WMI_VDEV_PARAM_DHCP_INDICATE,
5238 /** Enable host inspection of Tx unicast packet to unknown destination */
5239 WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
5240
5241 /* The minimum amount of time AP begins to consider STA inactive */
5242 WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
5243
5244 /* An associated STA is considered inactive when there is no recent TX/RX
5245 * activity and no downlink frames are buffered for it. Once a STA exceeds
5246 * the maximum idle inactive time, the AP will send an 802.11 data-null as
5247 * a keep alive to verify the STA is still associated. If the STA does ACK
5248 * the data-null, or if the data-null is buffered and the STA does not
5249 * retrieve it, the STA will be considered unresponsive (see
5250 * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
5251 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
5252
5253 /* An associated STA is considered unresponsive if there is no recent
5254 * TX/RX activity and downlink frames are buffered for it. Once a STA
5255 * exceeds the maximum unresponsive time, the AP will send a
5256 * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
5257 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
5258
5259 /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
5260 WMI_VDEV_PARAM_AP_ENABLE_NAWDS,
5261 /** Enable/Disable RTS-CTS */
5262 WMI_VDEV_PARAM_ENABLE_RTSCTS,
5263 /* Enable TXBFee/er */
5264 WMI_VDEV_PARAM_TXBF,
5265
5266 /**Set packet power save */
5267 WMI_VDEV_PARAM_PACKET_POWERSAVE,
5268
5269 /**Drops un-encrypted packets if any received in an encryted connection
5270 * otherwise forwards to host
5271 */
5272 WMI_VDEV_PARAM_DROP_UNENCRY,
5273
5274 /*
5275 * Set TX encap type.
5276 *
5277 * enum wmi_pkt_type is to be used as the parameter
5278 * specifying the encap type.
5279 */
5280 WMI_VDEV_PARAM_TX_ENCAP_TYPE,
5281
5282 /*
5283 * Try to detect stations that woke-up and exited power save but did not
5284 * successfully transmit data-null with PM=0 to AP. When this happens,
5285 * STA and AP power save state are out-of-sync. Use buffered but
5286 * undelivered MSDU to the STA as a hint that the STA is really awake
5287 * and expecting normal ASAP delivery, rather than retrieving BU with
5288 * PS-Poll, U-APSD trigger, etc.
5289 *
5290 * 0 disables out-of-sync detection. Maximum time is 255 seconds.
5291 */
5292 WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,
5293
5294 /* Enable/Disable early rx dynamic adjust feature.
5295 * Early-rx dynamic adjust is a advance power save feature.
5296 * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
5297 * timing discrepancies in the system.
5298 * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
5299 * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
5300 * properly to minimum the power consume.*/
5301 WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE,
5302
5303 /* set target bmiss number per sample cycle if bmiss adjust was chosen.
5304 * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
5305 * which can be set by user through WMI command.
5306 */
5307 WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM,
5308
5309 /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
5310 WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE,
5311
5312 /* set slop_step */
5313 WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP,
5314
5315 /* set init slop */
5316 WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP,
5317
5318 /* pause adjust enable/disable */
5319 WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE,
5320
5321 /* Set channel pwr limit value of the vdev the minimal value of all
5322 * vdevs operating on this channel will be set as channel tx power
5323 * limit, which is used to configure ratearray
5324 */
5325 WMI_VDEV_PARAM_TX_PWRLIMIT,
5326
5327 /* set the count of snr value for calculation in snr monitor */
5328 WMI_VDEV_PARAM_SNR_NUM_FOR_CAL,
5329
5330 /** Roaming offload */
5331 WMI_VDEV_PARAM_ROAM_FW_OFFLOAD,
5332
5333 /** Enable Leader request RX functionality for RMC */
5334 WMI_VDEV_PARAM_ENABLE_RMC,
5335
5336 /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
5337 * by himself. If the beacon lost time exceed this threshold, the peer is
5338 * thought to be gone. */
5339 WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS,
5340
5341 /** max rate in kpbs, transmit rate can't go beyond it */
5342 WMI_VDEV_PARAM_MAX_RATE,
5343
5344 /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift */
5345 WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE,
5346 /* set Tx failure count threshold for the vdev */
5347 WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR,
5348
5349 /* set ebt resync timeout value, in the unit of TU */
5350 WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT,
5351
5352 /* Enable Aggregation State Trigger Event */
5353 WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE,
5354
5355 /* This parameter indicates whether IBSS station can enter into power save
5356 * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
5357 * awake all the time and should never set PM=1 in its transmitted frames.
5358 * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
5359 * is non-zero. */
5360 WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED,
5361
5362 /* This parameter indicates if this station can enter into power collapse
5363 * for the remaining beacon interval after the ATIM window.
5364 * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
5365 * is set to true. */
5366 WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED,
5367
5368 /* This parameter indicates whether IBSS station exit power save mode and
5369 * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
5370 * whenever there is a TX/RX activity. */
5371 WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED,
5372
5373 /* If Awake on TX/RX activity is enabled, this parameter indicates
5374 * the data inactivity time in number of beacon intervals after which
5375 * IBSS station reenters power save by sending Null frame with PM=1. */
5376 WMI_VDEV_PARAM_INACTIVITY_CNT,
5377
5378 /* Inactivity time in msec after which TX Service Period (SP) is
5379 * terminated by sending a Qos Null frame with EOSP.
5380 * If value is 0, TX SP is terminated with the last buffered packet itself
5381 * instead of waiting for the inactivity timeout. */
5382 WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS,
5383
5384 /** DTIM policy */
5385 WMI_VDEV_PARAM_DTIM_POLICY,
5386
5387 /* When IBSS network is initialized, PS-supporting device
5388 * does not enter protocol sleep state during first
5389 * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
5390 WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS,
5391
5392 /* Enable/Disable 1 RX chain usage during the ATIM window */
5393 WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE,
5394 /**
5395 * RX Leak window is the time driver waits before shutting down
5396 * the radio or switching the channel and after receiving an ACK
5397 * for a data frame with PM bit set)
5398 */
5399 WMI_VDEV_PARAM_RX_LEAK_WINDOW,
5400
5401 /**
5402 * Averaging factor(16 bit value) is used in the calculations to
5403 * perform averaging of different link level statistics like average
5404 * beacon spread or average number of frames leaked
5405 */
5406 WMI_VDEV_PARAM_STATS_AVG_FACTOR,
5407 /*
5408 * disconnect threshold, once the consecutive error for specific peer
5409 * exceed this threhold, FW will send kickout event to host
5410 */
5411 WMI_VDEV_PARAM_DISCONNECT_TH,
5412 /*
5413 * The rate_code of RTS_CTS changed by host. Now FW can support
5414 * more non-HT rates rather than 1Mbps or 6Mbps */
5415 WMI_VDEV_PARAM_RTSCTS_RATE,
5416
5417 /** This parameter indicates whether using a long duration RTS-CTS
5418 * protection when a SAP goes off channel in MCC mode */
5419 WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE,
5420
5421 /*
5422 * This parameter indicates whether using a broadcast probe response
5423 * to increase the detectability of SAP in MCC mode
5424 */
5425 WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE,
Nirav Shah47062ff2015-11-05 11:21:08 +05305426
5427 /* This parameter indicates the power backoff in percentage
5428 * currently supports 100%, 50%, 25%, 12.5%, and minimum
5429 * Host passes 0, 1, 2, 3, 4 to Firmware
5430 * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
5431 * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
5432 */
5433 WMI_VDEV_PARAM_TXPOWER_SCALE,
5434
5435 /* TX power backoff in dB: tx power -= param value
5436 * Host passes values(DB) to Halphy, Halphy reduces the power table
5437 * by the values. Safety check will happen in Halphy.
5438 */
5439 WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB,
Govind Singh32cced32016-02-01 13:33:09 +05305440 /** Multicast to Unicast conversion setting */
5441 WMI_VDEV_PARAM_MCAST2UCAST_SET,
5442
5443 /** Total number of HW retries */
5444 WMI_VDEV_PARAM_RC_NUM_RETRIES,
5445
5446 /** Max tx percentage for cabq */
5447 WMI_VDEV_PARAM_CABQ_MAXDUR,
5448
5449 /** MFPTEST settings */
5450 WMI_VDEV_PARAM_MFPTEST_SET,
5451
5452 /** RTS Fixed rate setting */
5453 WMI_VDEV_PARAM_RTS_FIXED_RATE,
5454
5455 /** VHT SGI MASK */
5456 WMI_VDEV_PARAM_VHT_SGIMASK,
5457
5458 /** VHT80 Auto Rate MASK */
5459 WMI_VDEV_PARAM_VHT80_RATEMASK,
5460
5461 /** set Proxy STA features for this vap */
5462 WMI_VDEV_PARAM_PROXY_STA,
5463
5464 /** set virtual cell mode - enable/disable */
5465 WMI_VDEV_PARAM_VIRTUAL_CELL_MODE,
5466
5467 /** Set receive packet type */
5468 WMI_VDEV_PARAM_RX_DECAP_TYPE,
5469
5470 /** Set ratemask with specific Bandwidth and NSS */
5471 WMI_VDEV_PARAM_BW_NSS_RATEMASK,
5472
5473 /** Set SENSOR Support */
5474 WMI_VDEV_PARAM_SENSOR_AP,
5475
5476 /** Set beacon rate */
5477 WMI_VDEV_PARAM_BEACON_RATE,
5478
5479 /** Enable CTS to self for DTIM beacon */
5480 WMI_VDEV_PARAM_DTIM_ENABLE_CTS,
5481
5482 /** Disable station kickout at Vap level */
5483 WMI_VDEV_PARAM_STA_KICKOUT,
Nirav Shah47062ff2015-11-05 11:21:08 +05305484
Govind Singh869c9872016-02-22 18:36:34 +05305485 /* VDEV capabilities */
5486 WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */
Sandeep Puligilla62f7ca02016-03-24 15:48:33 -07005487 /*
5488 * Increment TSF in micro seconds to avoid beacon collision on mesh VAP
5489 * The host must ensure that either no other vdevs share the TSF with
5490 * this vdev, or else that it is acceptable to apply this TSF adjustment
5491 * to all vdevs sharing the TSF
5492 */
5493 WMI_VDEV_PARAM_TSF_INCREMENT,
Himanshu Agarwalb953a262016-06-03 10:48:23 +05305494 WMI_VDEV_PARAM_PLACE_HOLDER_1,
Himanshu Agarwala1438152016-05-13 21:40:19 +05305495
5496 /*
5497 * Vdev level rx filter of from-ds / to-ds / no-ds / ta / ra frames.
5498 * Used mainly for mesh-vap.
5499 * The parameter value delivered with the RX_FILTER vdev param contains
5500 * a bit-or mask of wmi_vdev_param_filter enum values.
5501 */
5502 WMI_VDEV_PARAM_RX_FILTER,
Himanshu Agarwale93c55e2016-05-20 12:18:15 +05305503 /* vdev-specific mgmt tx power in dBm units (signed integer value) */
5504 WMI_VDEV_PARAM_MGMT_TX_POWER,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005505} WMI_VDEV_PARAM;
5506
Govind Singh869c9872016-02-22 18:36:34 +05305507/* vdev capabilities bit mask */
Himanshu Agarwal800d58d2016-05-13 21:22:19 +05305508#define WMI_VDEV_BEACON_SUPPORT 0x1
Govind Singh869c9872016-02-22 18:36:34 +05305509#define WMI_VDEV_WDS_LRN_ENABLED 0x2
Himanshu Agarwal800d58d2016-05-13 21:22:19 +05305510#define WMI_VDEV_VOW_ENABLED 0x4
5511
Govind Singh869c9872016-02-22 18:36:34 +05305512#define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT)
5513#define WMI_VDEV_IS_WDS_LRN_ENABLED(param) ((param) & WMI_VDEV_WDS_LRN_ENABLED)
Himanshu Agarwal800d58d2016-05-13 21:22:19 +05305514#define WMI_VDEV_IS_VOW_ENABLED(param) ((param) & WMI_VDEV_VOW_ENABLED)
Govind Singh869c9872016-02-22 18:36:34 +05305515
5516/* TXBF capabilities masks */
5517#define WMI_TXBF_CONF_SU_TX_BFEE_S 0
5518#define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1
5519#define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << \
5520 WMI_TXBF_CONF_SU_TX_BFEE_S)
5521#define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_SU_TX_BFEE)
5522#define WMI_TXBF_CONF_SU_TX_BFEE_SET(x, z) WMI_F_RMW(x, z,\
5523 WMI_TXBF_CONF_SU_TX_BFEE)
5524
5525#define WMI_TXBF_CONF_MU_TX_BFEE_S 1
5526#define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1
5527#define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << \
5528 WMI_TXBF_CONF_MU_TX_BFEE_S)
5529#define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_MU_TX_BFEE)
5530#define WMI_TXBF_CONF_MU_TX_BFEE_SET(x, z) WMI_F_RMW(x, z, \
5531 WMI_TXBF_CONF_MU_TX_BFEE)
5532
5533#define WMI_TXBF_CONF_SU_TX_BFER_S 2
5534#define WMI_TXBF_CONF_SU_TX_BFER_M 0x1
5535#define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << \
5536 WMI_TXBF_CONF_SU_TX_BFER_S)
5537#define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_SU_TX_BFER)
5538#define WMI_TXBF_CONF_SU_TX_BFER_SET(x, z) WMI_F_RMW(x, z, \
5539 WMI_TXBF_CONF_SU_TX_BFER)
5540
5541#define WMI_TXBF_CONF_MU_TX_BFER_S 3
5542#define WMI_TXBF_CONF_MU_TX_BFER_M 0x1
5543#define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << \
5544 WMI_TXBF_CONF_MU_TX_BFER_S)
5545#define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_MU_TX_BFER)
5546#define WMI_TXBF_CONF_MU_TX_BFER_SET(x, z) WMI_F_RMW(x, z, \
5547 WMI_TXBF_CONF_MU_TX_BFER)
5548
5549#define WMI_TXBF_CONF_STS_CAP_S 4
5550#define WMI_TXBF_CONF_STS_CAP_M 0x7
5551#define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << \
5552 WMI_TXBF_CONF_STS_CAP_S)
5553#define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_STS_CAP);
5554#define WMI_TXBF_CONF_STS_CAP_SET(x, z) WMI_F_RMW(x, z, \
5555 WMI_TXBF_CONF_STS_CAP)
5556
5557#define WMI_TXBF_CONF_IMPLICIT_BF_S 7
5558#define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1
5559#define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << \
5560 WMI_TXBF_CONF_IMPLICIT_BF_S)
5561#define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_IMPLICIT_BF)
5562#define WMI_TXBF_CONF_IMPLICIT_BF_SET(x, z) WMI_F_RMW(x, z, \
5563 WMI_TXBF_CONF_IMPLICIT_BF)
5564
5565#define WMI_TXBF_CONF_BF_SND_DIM_S 8
5566#define WMI_TXBF_CONF_BF_SND_DIM_M 0x7
5567#define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << \
5568 WMI_TXBF_CONF_BF_SND_DIM_S)
5569#define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_BF_SND_DIM)
5570#define WMI_TXBF_CONF_BF_SND_DIM_SET(x, z) WMI_F_RMW(x, z, \
5571 WMI_TXBF_CONF_BF_SND_DIM)
5572
5573/* TXBF capabilities */
5574typedef struct {
5575 A_UINT32 txbf_cap;
5576} wmi_vdev_txbf_cap;
5577
Himanshu Agarwala1438152016-05-13 21:40:19 +05305578/* vdev rx filters (for mesh) */
5579typedef enum {
5580 /* Don't drop any frames - Default */
5581 WMI_VDEV_RX_ALLOW_ALL_FRAMES = 0x0,
5582 /* Drop FromDS frames */
5583 WMI_VDEV_RX_FILTER_OUT_FROMDS = 0x1,
5584 /* Drop ToDS frames */
5585 WMI_VDEV_RX_FILTER_OUT_TODS = 0x2,
5586 /* Drop NODS frames */
5587 WMI_VDEV_RX_FILTER_OUT_NODS = 0x4,
5588 /* Drop RA frames */
5589 WMI_VDEV_RX_FILTER_OUT_RA = 0x8,
5590 /* Drop TA frames */
5591 WMI_VDEV_RX_FILTER_OUT_TA = 0x10,
5592} wmi_vdev_param_filter;
5593
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005594/* Length of ATIM Window in TU */
5595#define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
5596
5597enum wmi_pkt_type {
5598 WMI_PKT_TYPE_RAW = 0,
5599 WMI_PKT_TYPE_NATIVE_WIFI = 1,
5600 WMI_PKT_TYPE_ETHERNET = 2,
5601};
5602
Govind Singh869c9872016-02-22 18:36:34 +05305603/*******************************************************************
5604 * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap
5605 * Do not use it!
5606 *******************************************************************/
5607
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005608typedef struct {
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05305609 A_UINT8 sutxbfee:1, mutxbfee:1, sutxbfer:1, mutxbfer:1,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005610#if defined(AR900B)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05305611 txb_sts_cap:3, implicit_bf:1;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005612#else
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05305613 reserved:4;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005614#endif
5615} wmi_vdev_txbf_en;
5616
5617/** Upto 8 bits are available for Roaming module to be sent along with
5618 WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
5619/* Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
5620#define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1
5621/* Enable Roaming module in FW to do scan based on Final BMISS */
5622#define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2
5623
5624/** slot time long */
5625#define WMI_VDEV_SLOT_TIME_LONG 0x1
5626/** slot time short */
5627#define WMI_VDEV_SLOT_TIME_SHORT 0x2
5628/** preablbe long */
5629#define WMI_VDEV_PREAMBLE_LONG 0x1
5630/** preablbe short */
5631#define WMI_VDEV_PREAMBLE_SHORT 0x2
5632
5633/** the definition of different START/RESTART Event response */
5634typedef enum {
5635 /* Event respose of START CMD */
5636 WMI_VDEV_START_RESP_EVENT = 0,
5637 /* Event respose of RESTART CMD */
5638 WMI_VDEV_RESTART_RESP_EVENT,
5639} WMI_START_EVENT_PARAM;
5640
5641typedef struct {
5642 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */
5643 /** unique id identifying the VDEV, generated by the caller */
5644 A_UINT32 vdev_id;
5645 /** requestor id that requested the VDEV start request */
5646 A_UINT32 requestor_id;
5647 /* Respose of Event type START/RESTART */
5648 WMI_START_EVENT_PARAM resp_type;
5649 /** status of the response */
5650 A_UINT32 status;
5651 /** Vdev chain mask */
5652 A_UINT32 chain_mask;
5653 /** Vdev mimo power save mode */
5654 A_UINT32 smps_mode;
Govind Singh869c9872016-02-22 18:36:34 +05305655 union {
5656 /* OBSOLETE - will be removed once all refs are gone */
5657 A_UINT32 mac_id;
5658 /** pdev_id for identifying the MAC
5659 * See macros starting with WMI_PDEV_ID_ for values.
5660 */
5661 A_UINT32 pdev_id;
5662 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005663 /** Configured Transmit Streams **/
5664 A_UINT32 cfgd_tx_streams;
5665 /** Configured Receive Streams **/
5666 A_UINT32 cfgd_rx_streams;
5667} wmi_vdev_start_response_event_fixed_param;
5668
5669typedef struct {
5670 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */
5671 /** unique id identifying the VDEV, generated by the caller */
5672 A_UINT32 vdev_id;
5673} wmi_vdev_stopped_event_fixed_param;
5674
Manikandan Mohan429a0782015-12-23 14:35:54 -08005675typedef struct {
5676 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */
5677 /** unique id identifying the VDEV, generated by the caller */
5678 A_UINT32 vdev_id;
5679} wmi_vdev_delete_resp_event_fixed_param;
5680
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005681/** common structure used for simple events (stopped, resume_req, standby response) */
5682typedef struct {
5683 A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */
5684 /** unique id identifying the VDEV, generated by the caller */
5685 A_UINT32 vdev_id;
5686} wmi_vdev_simple_event_fixed_param;
5687
5688/** VDEV start response status codes */
5689#define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV succesfully started */
5690#define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */
5691#define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */
5692
5693/** Beacon processing related command and event structures */
5694typedef struct {
5695 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
5696 /** unique id identifying the VDEV, generated by the caller */
5697 A_UINT32 vdev_id;
5698 /** xmit rate */
5699 A_UINT32 tx_rate;
5700 /** xmit power */
5701 A_UINT32 txPower;
5702 /** beacon buffer length in bytes */
5703 A_UINT32 buf_len;
5704 /* This TLV is followed by array of bytes:
5705 * // beacon frame buffer
5706 * A_UINT8 bufp[];
5707 */
5708} wmi_bcn_tx_hdr;
5709
5710/* Beacon filter */
5711#define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
5712#define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
5713#define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
5714#define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
5715#define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
5716
5717typedef struct {
5718 /** Filter ID */
5719 A_UINT32 bcn_filter_id;
5720 /** Filter type - wmi_bcn_filter */
5721 A_UINT32 bcn_filter;
5722 /** Buffer len */
5723 A_UINT32 bcn_filter_len;
5724 /** Filter info (threshold, BSSID, RSSI) */
5725 A_UINT8 *bcn_filter_buf;
5726} wmi_bcn_filter_rx_cmd;
5727
5728/** Capabilities and IEs to be passed to firmware */
5729typedef struct {
5730 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
5731 /** Capabilities */
5732 A_UINT32 caps;
5733 /** ERP info */
5734 A_UINT32 erp;
5735 /** Advanced capabilities */
5736 /** HT capabilities */
5737 /** HT Info */
5738 /** ibss_dfs */
5739 /** wpa Info */
5740 /** rsn Info */
5741 /** rrm info */
5742 /** ath_ext */
5743 /** app IE */
5744} wmi_bcn_prb_info;
5745
5746typedef struct {
5747 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
5748 /** unique id identifying the VDEV, generated by the caller */
5749 A_UINT32 vdev_id;
5750 /** TIM IE offset from the beginning of the template. */
5751 A_UINT32 tim_ie_offset;
5752 /** beacon buffer length. data is in TLV data[] */
5753 A_UINT32 buf_len;
5754 /*
5755 * The TLVs follows:
5756 * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs
5757 * A_UINT8 data[]; //Variable length data
5758 */
5759} wmi_bcn_tmpl_cmd_fixed_param;
5760
5761typedef struct {
5762 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
5763 /** unique id identifying the VDEV, generated by the caller */
5764 A_UINT32 vdev_id;
5765 /** beacon buffer length. data is in TLV data[] */
5766 A_UINT32 buf_len;
5767 /*
5768 * The TLVs follows:
5769 * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs
5770 * A_UINT8 data[]; //Variable length data
5771 */
5772} wmi_prb_tmpl_cmd_fixed_param;
5773
5774typedef struct {
5775 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
5776 A_UINT32 tlv_header;
5777 /** unique id identifying the VDEV */
5778 A_UINT32 vdev_id;
5779 /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
5780 A_UINT32 tx_status;
5781} wmi_offload_bcn_tx_status_event_fixed_param;
5782
5783enum wmi_sta_ps_mode {
5784 /** enable power save for the given STA VDEV */
5785 WMI_STA_PS_MODE_DISABLED = 0,
5786 /** disable power save for a given STA VDEV */
5787 WMI_STA_PS_MODE_ENABLED = 1,
5788};
5789
5790typedef struct {
5791 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
5792 /** unique id identifying the VDEV, generated by the caller */
5793 A_UINT32 vdev_id;
5794
5795 /** Power save mode
5796 *
5797 * (see enum wmi_sta_ps_mode)
5798 */
5799 A_UINT32 sta_ps_mode;
5800} wmi_sta_powersave_mode_cmd_fixed_param;
5801
5802enum wmi_csa_offload_en {
5803 WMI_CSA_OFFLOAD_DISABLE = 0,
5804 WMI_CSA_OFFLOAD_ENABLE = 1,
5805};
5806
5807typedef struct {
5808 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */
5809 A_UINT32 vdev_id;
5810 A_UINT32 csa_offload_enable;
5811} wmi_csa_offload_enable_cmd_fixed_param;
5812
5813typedef struct {
5814 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */
5815 A_UINT32 vdev_id;
5816 /*
5817 * The TLVs follows:
5818 * wmi_channel chan;
5819 */
5820} wmi_csa_offload_chanswitch_cmd_fixed_param;
5821/**
5822 * This parameter controls the policy for retrieving frames from AP while the
5823 * STA is in sleep state.
5824 *
5825 * Only takes affect if the sta_ps_mode is enabled
5826 */
5827enum wmi_sta_ps_param_rx_wake_policy {
5828 /* Wake up when ever there is an RX activity on the VDEV. In this mode
5829 * the Power save SM(state machine) will come out of sleep by either
5830 * sending null frame (or) a data frame (with PS==0) in response to TIM
5831 * bit set in the received beacon frame from AP.
5832 */
5833 WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
5834
5835 /* Here the power save state machine will not wakeup in response to TIM
5836 * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
5837 * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
5838 * access categories are delivery-enabled, the station will send a UAPSD
5839 * trigger frame, otherwise it will send a PS-Poll.
5840 */
5841 WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
5842};
5843
5844/** Number of tx frames/beacon that cause the power save SM to wake up.
5845 *
5846 * Value 1 causes the SM to wake up for every TX. Value 0 has a special
5847 * meaning, It will cause the SM to never wake up. This is useful if you want
5848 * to keep the system to sleep all the time for some kind of test mode . host
5849 * can change this parameter any time. It will affect at the next tx frame.
5850 */
5851enum wmi_sta_ps_param_tx_wake_threshold {
5852 WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
5853 WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
5854
5855 /* Values greater than one indicate that many TX attempts per beacon
5856 * interval before the STA will wake up
5857 */
5858};
5859
5860/**
5861 * The maximum number of PS-Poll frames the FW will send in response to
5862 * traffic advertised in TIM before waking up (by sending a null frame with PS
5863 * = 0). Value 0 has a special meaning: there is no maximum count and the FW
5864 * will send as many PS-Poll as are necessary to retrieve buffered BU. This
5865 * parameter is used when the RX wake policy is
5866 * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
5867 * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
5868 */
5869enum wmi_sta_ps_param_pspoll_count {
5870 WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
5871 /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
5872 * will send before waking up.
5873 */
5874};
5875
5876/*
5877 * This will include the delivery and trigger enabled state for every AC.
5878 * This is the negotiated state with AP. The host MLME needs to set this based
5879 * on AP capability and the state Set in the association request by the
5880 * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
5881 */
5882#define WMI_UAPSD_AC_TYPE_DELI 0
5883#define WMI_UAPSD_AC_TYPE_TRIG 1
5884
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05305885#define WMI_UAPSD_AC_BIT_MASK(ac, type) \
5886 do { \
5887 (type == WMI_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) : \
5888 (1<<((ac<<1)+1)) \
5889 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005890
5891enum wmi_sta_ps_param_uapsd {
5892 WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
5893 WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
5894 WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
5895 WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
5896 WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
5897 WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
5898 WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
5899 WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
5900};
5901
5902enum wmi_sta_powersave_param {
5903 /**
5904 * Controls how frames are retrievd from AP while STA is sleeping
5905 *
5906 * (see enum wmi_sta_ps_param_rx_wake_policy)
5907 */
5908 WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
5909
5910 /**
5911 * The STA will go active after this many TX
5912 *
5913 * (see enum wmi_sta_ps_param_tx_wake_threshold)
5914 */
5915 WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
5916
5917 /**
5918 * Number of PS-Poll to send before STA wakes up
5919 *
5920 * (see enum wmi_sta_ps_param_pspoll_count)
5921 *
5922 */
5923 WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
5924
5925 /**
5926 * TX/RX inactivity time in msec before going to sleep.
5927 *
5928 * The power save SM will monitor tx/rx activity on the VDEV, if no
5929 * activity for the specified msec of the parameter the Power save SM will
5930 * go to sleep.
5931 */
5932 WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
5933
5934 /**
5935 * Set uapsd configuration.
5936 *
5937 * (see enum wmi_sta_ps_param_uapsd)
5938 */
5939 WMI_STA_PS_PARAM_UAPSD = 4,
5940 /**
5941 * Number of PS-Poll to send before STA wakes up in QPower Mode
5942 */
5943 WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
5944
5945 /**
5946 * Enable QPower
5947 */
5948 WMI_STA_PS_ENABLE_QPOWER = 6,
5949
5950 /**
5951 * Number of TX frames before the entering the Active state
5952 */
5953 WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
5954
5955 /**
5956 * QPower SPEC PSPOLL interval
5957 */
5958 WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
5959
5960 /**
5961 * Max SPEC PSPOLL to be sent when the PSPOLL response has
5962 * no-data bit set
5963 */
5964 WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
5965};
5966
5967typedef struct {
5968 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
5969 /** unique id identifying the VDEV, generated by the caller */
5970 A_UINT32 vdev_id;
5971 /** station power save parameter (see enum wmi_sta_powersave_param) */
5972 A_UINT32 param;
5973 A_UINT32 value;
5974} wmi_sta_powersave_param_cmd_fixed_param;
5975
5976/** No MIMO power save */
5977#define WMI_STA_MIMO_PS_MODE_DISABLE
5978/** mimo powersave mode static*/
5979#define WMI_STA_MIMO_PS_MODE_STATIC
5980/** mimo powersave mode dynamic */
5981#define WMI_STA_MIMO_PS_MODE_DYNAMI
5982
5983typedef struct {
5984 /** unique id identifying the VDEV, generated by the caller */
5985 A_UINT32 vdev_id;
5986 /** mimo powersave mode as defined above */
5987 A_UINT32 mimo_pwrsave_mode;
5988} wmi_sta_mimo_ps_mode_cmd;
5989
5990/** U-APSD configuration of peer station from (re)assoc request and TSPECs */
5991enum wmi_ap_ps_param_uapsd {
5992 WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
5993 WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
5994 WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
5995 WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
5996 WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
5997 WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
5998 WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
5999 WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
6000};
6001
6002/** U-APSD maximum service period of peer station */
6003enum wmi_ap_ps_peer_param_max_sp {
6004 WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
6005 WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
6006 WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
6007 WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
6008
6009 /* keep last! */
6010 MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
6011};
6012
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05306013/** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */
6014enum wmi_ap_ps_param_sifs_resp_frmtype {
6015 WMI_SIFS_RESP_PSPOLL = (1 << 0),
6016 WMI_SIFS_RESP_UAPSD = (1 << 1),
6017 WMI_SIFS_RESP_QBST_EXP = (1 << 2),
6018 WMI_SIFS_RESP_QBST_DATA = (1 << 3),
6019 WMI_SIFS_RESP_QBST_BAR = (1 << 4),
6020};
6021
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006022/**
6023 * AP power save parameter
6024 * Set a power save specific parameter for a peer station
6025 */
6026enum wmi_ap_ps_peer_param {
6027 /** Set uapsd configuration for a given peer.
6028 *
6029 * This will include the delivery and trigger enabled state for every AC.
6030 * The host MLME needs to set this based on AP capability and stations
6031 * request Set in the association request received from the station.
6032 *
6033 * Lower 8 bits of the value specify the UAPSD configuration.
6034 *
6035 * (see enum wmi_ap_ps_param_uapsd)
6036 * The default value is 0.
6037 */
6038 WMI_AP_PS_PEER_PARAM_UAPSD = 0,
6039
6040 /**
6041 * Set the service period for a UAPSD capable station
6042 *
6043 * The service period from wme ie in the (re)assoc request frame.
6044 *
6045 * (see enum wmi_ap_ps_peer_param_max_sp)
6046 */
6047 WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
6048
6049 /** Time in seconds for aging out buffered frames for STA in power save */
6050 WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05306051 /**
6052 * Specify frame types that are considered SIFS RESP trigger frame
6053 * (see enum wmi_ap_ps_param_sifs_resp_frmtype)
6054 */
Govind Singh32cced32016-02-01 13:33:09 +05306055 WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
6056
6057 /*
6058 * Specifies the trigger state of TID.
6059 * Valid only for UAPSD frame type
6060 */
6061 WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
6062
6063 /** Specifies the WNM sleep state of a STA */
6064 WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006065};
6066
6067typedef struct {
6068 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
6069 /** unique id identifying the VDEV, generated by the caller */
6070 A_UINT32 vdev_id;
6071 /** peer MAC address */
6072 wmi_mac_addr peer_macaddr;
6073 /** AP powersave param (see enum wmi_ap_ps_peer_param) */
6074 A_UINT32 param;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05306075 /** AP powersave param value (see defines) */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006076 A_UINT32 value;
6077} wmi_ap_ps_peer_cmd_fixed_param;
6078
6079/** Configure peer station 11v U-APSD coexistance
6080 *
6081 * Two parameters from uaspd coexistence ie info (as specified in 11v) are
6082 * sent down to FW along with this command.
6083 *
6084 * The semantics of these fields are described in the following text extracted
6085 * from 802.11v.
6086 *
6087 * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the
6088 * U-APSD Coexistence element, the AP should not transmit frames to the
6089 * non-AP STA outside of the U-APSD Coexistence Service Period, which
6090 * begins when the AP receives the U-APSD trigger frame and ends after
6091 * the transmission period specified by the result of the following
6092 * calculation:
6093 *
6094 * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
6095 *
6096 * Where T is the time the U-APSD trigger frame was received at the AP
6097 * Interval is the UAPSD Coexistence element Duration/Interval field
6098 * value (see 7.3.2.91) or upon the successful transmission of a frame
6099 * with EOSP bit set to 1, whichever is earlier.
6100 *
6101 *
6102 * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
6103 * Coexistence element, the AP should not transmit frames to the non-AP
6104 * STA outside of the U-APSD Coexistence Service Period, which begins
6105 * when the AP receives a U-APSD trigger frame and ends after the
6106 * transmission period specified by the result of the following
6107 * calculation: End of transmission period = T + Duration
6108 */
6109typedef struct {
6110 /** unique id identifying the VDEV, generated by the caller */
6111 A_UINT32 vdev_id;
6112 /** peer MAC address */
6113 wmi_mac_addr peer_macaddr;
6114 /** Enable U-APSD coexistence support for this peer
6115 *
6116 * 0 -> disabled (default)
6117 * 1 -> enabled
6118 */
6119 A_UINT32 enabled;
6120 /** Duration/Interval as defined by 11v U-ASPD coexistance */
6121 A_UINT32 duration_interval;
6122 /** Upper 32 bits of 64-bit TSF offset */
6123 A_UINT32 tsf_offset_high;
6124 /** Lower 32 bits of 64-bit TSF offset */
6125 A_UINT32 tsf_offset_low;
6126} wmi_ap_powersave_peer_uapsd_coex_cmd;
6127
6128typedef enum {
6129 WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001,
6130 WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002,
6131 WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
6132
6133 WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
6134} wmi_ap_ps_egap_flag_type;
6135
6136/**
6137 * configure ehanced green ap parameters
6138 */
6139typedef struct {
6140 /*
6141 * TLV tag and len; tag equals
6142 * wmi_ap_powersave_egap_param_cmd_fixed_param
6143 */
6144 A_UINT32 tlv_header;
6145 /** Enable enhanced green ap
6146 * 0 -> disabled
6147 * 1 -> enabled
6148 */
6149 A_UINT32 enable;
6150 /** The param indicates a duration that all STAs connected
6151 * to S-AP have no traffic.
6152 */
6153 A_UINT32 inactivity_time; /* in unit of milliseconds */
6154 /** The param indicates a duration that all STAs connected
6155 * to S-AP have no traffic, after all STAs have entered powersave.
6156 */
6157 A_UINT32 wait_time; /* in unit of milliseconds */
6158 /** The param is used to turn on/off some functions within E-GAP.
6159 */
6160 A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
6161} wmi_ap_ps_egap_param_cmd_fixed_param;
6162
6163typedef enum {
6164 WMI_AP_PS_EGAP_STATUS_IDLE = 1,
6165 WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
6166 WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3,
6167
6168 WMI_AP_PS_EGAP_STATUS_MAX = 15
6169} wmi_ap_ps_egap_status_type;
6170
6171/**
6172 * send ehanced green ap status to host
6173 */
6174typedef struct {
Manikandan Mohan0c7ae402015-12-03 17:56:41 -08006175 /* TLV tag and len; tag equals
6176 * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list
6177 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006178 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05306179 union {
6180 /* OBSOLETE - will be removed once all refs are gone */
6181 A_UINT32 mac_id;
6182 /** pdev_id for identifying the MAC
6183 * See macros starting with WMI_PDEV_ID_ for values.
6184 */
6185 A_UINT32 pdev_id;
6186 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006187 /** The param indicates the current tx chainmask with the mac id. */
6188 A_UINT32 tx_chainmask;
6189 /** The param indicates the current rx chainmask with the mac id. */
6190 A_UINT32 rx_chainmask;
6191} wmi_ap_ps_egap_info_chainmask_list;
6192
6193typedef struct {
6194 /*
6195 * TLV tag and len; tag equals
6196 * wmi_ap_powersave_egap_param_cmd_fixed_param
6197 */
6198 A_UINT32 tlv_header;
6199 /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
6200 A_UINT32 status;
6201 /* This TLV is followed by
6202 * wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
6203 */
6204} wmi_ap_ps_egap_info_event_fixed_param;
6205
6206
6207/* 128 clients = 4 words */
6208/* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
6209#define WMI_TIM_BITMAP_ARRAY_SIZE 4
6210
6211typedef struct {
6212 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
6213 /** TIM bitmap len (in bytes)*/
6214 A_UINT32 tim_len;
6215 /** TIM Partial Virtual Bitmap */
6216 A_UINT32 tim_mcast;
6217 A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
6218 A_UINT32 tim_changed;
6219 A_UINT32 tim_num_ps_pending;
6220} wmi_tim_info;
6221
6222typedef struct {
6223 /** Flag to enable quiet period IE support */
6224 A_UINT32 is_enabled;
6225 /** Quiet start */
6226 A_UINT32 tbttcount;
6227 /** Beacon intervals between quiets*/
6228 A_UINT32 period;
6229 /** TUs of each quiet*/
6230 A_UINT32 duration;
6231 /** TUs of from TBTT of quiet start*/
6232 A_UINT32 offset;
6233} wmi_quiet_info;
6234
6235/* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
6236#define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
6237
6238typedef struct {
6239 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
6240 /** Bit 0: Flag to indicate an update in NOA schedule
6241 * Bits 7-1: Reserved
6242 * Bits 15-8: Index (identifies the instance of NOA sub element)
6243 * Bit 16: Opp PS state of the AP
6244 * Bits 23-17: Ctwindow in TUs
6245 * Bits 31-24: Number of NOA descriptors
6246 */
6247 A_UINT32 noa_attributes;
6248 wmi_p2p_noa_descriptor
6249 noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
6250} wmi_p2p_noa_info;
6251
6252#define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
6253#define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
6254
6255#define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \
6256 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
6257
6258#define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \
6259 WMI_F_RMW((hdr)->noa_attributes, 0x1, \
6260 WMI_UNIFIED_NOA_ATTR_MODIFIED);
6261
6262#define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00
6263#define WMI_UNIFIED_NOA_ATTR_INDEX_S 8
6264
6265#define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \
6266 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
6267
6268#define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \
6269 WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
6270 WMI_UNIFIED_NOA_ATTR_INDEX);
6271
6272#define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000
6273#define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16
6274
6275#define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \
6276 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
6277
6278#define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \
6279 WMI_F_RMW((hdr)->noa_attributes, 0x1, \
6280 WMI_UNIFIED_NOA_ATTR_OPP_PS);
6281
6282#define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000
6283#define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17
6284
6285#define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \
6286 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
6287
6288#define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \
6289 WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \
6290 WMI_UNIFIED_NOA_ATTR_CTWIN);
6291
6292#define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000
6293#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24
6294
6295#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \
6296 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
6297
6298#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \
6299 WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
6300 WMI_UNIFIED_NOA_ATTR_NUM_DESC);
6301
6302typedef struct {
6303 /** TIM info */
6304 wmi_tim_info tim_info;
6305 /** P2P NOA info */
6306 wmi_p2p_noa_info p2p_noa_info;
6307 /* TBD: More info elements to be added later */
6308} wmi_bcn_info;
6309
6310typedef struct {
6311 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
6312 /** bitmap identifying the VDEVs, generated by the caller */
6313 A_UINT32 vdev_map;
6314 /* This TLV is followed by tim_info and p2p_noa_info for each vdev in vdevmap :
6315 * wmi_tim_info tim_info[];
6316 * wmi_p2p_noa_info p2p_noa_info[];
6317 *
6318 */
6319} wmi_host_swba_event_fixed_param;
6320
6321#define WMI_MAX_AP_VDEV 16
6322
6323typedef struct {
6324 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
6325 /** bimtap of VDEVs that has tbtt offset updated */
6326 A_UINT32 vdev_map;
6327 /* The TLVs for tbttoffset_list will follow this TLV.
6328 * tbtt offset list in the order of the LSB to MSB in the vdev_map bitmap
6329 * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
6330 */
6331} wmi_tbtt_offset_event_fixed_param;
6332
6333/* Peer Specific commands and events */
6334
6335typedef struct {
6336 A_UINT32 percentage; /* in unit of 12.5% */
6337 A_UINT32 min_delta; /* in unit of Mbps */
6338} rate_delta_t;
6339
6340#define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01
6341#define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02
6342#define MAX_NUM_OF_RATE_THRESH 4
6343
6344typedef struct {
6345 /*
6346 * PEER_RATE_REPORT_COND_FLAG_DELTA,
6347 * PEER_RATE_REPORT_COND_FLAG_THRESHOLD
6348 * Any of these two conditions or both of
6349 * them can be set.
6350 */
6351 A_UINT32 val_cond_flags;
6352 rate_delta_t rate_delta;
6353 /*
6354 * In unit of Mbps. There are at most 4 thresholds
6355 * If the threshold count is less than 4, set zero to
6356 * the one following the last threshold
6357 */
6358 A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH];
6359} report_cond_per_phy_t;
6360
6361
6362enum peer_rate_report_cond_phy_type {
6363 PEER_RATE_REPORT_COND_11B = 0,
6364 PEER_RATE_REPORT_COND_11A_G,
6365 PEER_RATE_REPORT_COND_11N,
6366 PEER_RATE_REPORT_COND_11AC,
6367 PEER_RATE_REPORT_COND_MAX_NUM
6368};
6369
6370typedef struct {
6371 /*
6372 * TLV tag and len; tag equals
6373 * WMITLV_TAG_STRUC_wmi_peer_rate_report_condtion_fixed_param
6374 */
6375 A_UINT32 tlv_header;
6376 /* 1= enable, 0=disable */
6377 A_UINT32 enable_rate_report;
6378 A_UINT32 report_backoff_time; /* in unit of msecond */
6379 A_UINT32 report_timer_period; /* in unit of msecond */
6380 /*
6381 *In the following field, the array index means the phy type,
6382 * please see enum peer_rate_report_cond_phy_type for detail
6383 */
6384 report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
6385} wmi_peer_set_rate_report_condition_fixed_param;
6386
6387/* Peer Type:
6388 * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
6389 * on address and vdev opmode. This is largely here to allow host to indicate that
6390 * peer is explicitly a TDLS peer
6391 */
6392enum wmi_peer_type {
6393 WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
6394 WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
6395 WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
6396 WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
Govind Singh941bd5e2016-02-04 17:15:25 +05306397 WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006398 WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306399 * is assigned up to 127 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006400 /* Reserved from 128 - 255 for
6401 * target internal use.*/
6402 WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
6403};
6404
6405typedef struct {
6406 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
6407 /** unique id identifying the VDEV, generated by the caller */
6408 A_UINT32 vdev_id;
6409 /** peer MAC address */
6410 wmi_mac_addr peer_macaddr;
6411 /** peer type: see enum values above */
6412 A_UINT32 peer_type;
6413} wmi_peer_create_cmd_fixed_param;
6414
6415typedef struct {
6416 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
6417 /** unique id identifying the VDEV, generated by the caller */
6418 A_UINT32 vdev_id;
6419 /** peer MAC address */
6420 wmi_mac_addr peer_macaddr;
6421} wmi_peer_delete_cmd_fixed_param;
6422
6423typedef struct {
6424 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
6425 /** unique id identifying the VDEV, generated by the caller */
6426 A_UINT32 vdev_id;
6427 /** peer MAC address */
6428 wmi_mac_addr peer_macaddr;
6429 /** tid bitmap identifying the tids to flush */
6430 A_UINT32 peer_tid_bitmap;
6431} wmi_peer_flush_tids_cmd_fixed_param;
6432
6433typedef struct {
6434 /** rate mode . 0: disable fixed rate (auto rate)
6435 * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
6436 * 2: ht20 11n rate specified as mcs index
6437 * 3: ht40 11n rate specified as mcs index
6438 */
6439 A_UINT32 rate_mode;
6440 /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
6441 * and series 3 is stored at byte 3 (MSB) */
6442 A_UINT32 rate_series;
6443 /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
6444 * and retry count for rate 3 is stored at byte 3 (MSB) */
6445 A_UINT32 rate_retries;
6446} wmi_fixed_rate;
6447
6448typedef struct {
6449 /** unique id identifying the VDEV, generated by the caller */
6450 A_UINT32 vdev_id;
6451 /** peer MAC address */
6452 wmi_mac_addr peer_macaddr;
6453 /** fixed rate */
6454 wmi_fixed_rate peer_fixed_rate;
6455} wmi_peer_fixed_rate_cmd;
6456
6457#define WMI_MGMT_TID 17
6458
6459typedef struct {
6460 A_UINT32 tlv_header;
6461 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
6462 /** unique id identifying the VDEV, generated by the caller */
6463 A_UINT32 vdev_id;
6464 /** peer MAC address */
6465 wmi_mac_addr peer_macaddr;
6466} wmi_addba_clear_resp_cmd_fixed_param;
6467
6468typedef struct {
6469 A_UINT32 tlv_header;
6470 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */
6471 /** unique id identifying the VDEV, generated by the caller */
6472 A_UINT32 vdev_id;
6473 /** peer MAC address */
6474 wmi_mac_addr peer_macaddr;
6475 /** Tid number */
6476 A_UINT32 tid;
6477 /** Buffer/Window size*/
6478 A_UINT32 buffersize;
6479} wmi_addba_send_cmd_fixed_param;
6480
6481typedef struct {
6482 A_UINT32 tlv_header;
6483 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
6484 /** unique id identifying the VDEV, generated by the caller */
6485 A_UINT32 vdev_id;
6486 /** peer MAC address */
6487 wmi_mac_addr peer_macaddr;
6488 /** Tid number */
6489 A_UINT32 tid;
6490 /** Is Initiator */
6491 A_UINT32 initiator;
6492 /** Reason code */
6493 A_UINT32 reasoncode;
6494} wmi_delba_send_cmd_fixed_param;
6495
6496typedef struct {
6497 A_UINT32 tlv_header;
6498 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
6499 /** unique id identifying the vdev, generated by the caller */
6500 A_UINT32 vdev_id;
6501 /** peer mac address */
6502 wmi_mac_addr peer_macaddr;
6503 /** Tid number */
6504 A_UINT32 tid;
6505 /** status code */
6506 A_UINT32 statuscode;
6507} wmi_addba_setresponse_cmd_fixed_param;
6508
6509typedef struct {
6510 A_UINT32 tlv_header;
6511 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
6512 /** unique id identifying the vdev, generated by the caller */
6513 A_UINT32 vdev_id;
6514 /** peer mac address */
6515 wmi_mac_addr peer_macaddr;
6516 /** Tid number */
6517 A_UINT32 tid;
6518} wmi_send_singleamsdu_cmd_fixed_param;
6519
6520/* Type of Station DTIM Power Save method */
6521enum {
6522 /* For NORMAL DTIM, the parameter is the number of beacon intervals and
6523 * also the same value as the listen interval. For this method, the
6524 * station will wake up based on the listen interval. If this
6525 * listen interval is not equal to DTIM, then the station may
6526 * miss certain DTIM beacons. If this value is 1, then the
6527 * station will wake up for every beacon.
6528 */
6529 WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
6530 /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
6531 * When this value is 1, then the station will wake at every DTIM beacon.
6532 * If this value is >1, then the station will skip certain DTIM beacons.
6533 * This value is the multiple of DTIM intervals that the station will
6534 * wake up to receive the DTIM beacons.
6535 */
6536 WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
6537};
6538
6539/* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
6540typedef struct {
6541 A_UINT32 tlv_header;
6542 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
6543 /** unique id identifying the VDEV, generated by the caller */
6544 A_UINT32 vdev_id;
6545 /* Station DTIM Power Save method as defined above */
6546 A_UINT32 dtim_pwrsave_method;
6547 /* DTIM PS value. Contents depends on the method */
6548 A_UINT32 value;
6549 /* Modulated DTIM value */
6550 A_UINT32 MaxLIModulatedDTIM;
6551} wmi_sta_dtim_ps_method_cmd_fixed_param;
6552
6553/*
6554 * For Station UAPSD Auto Trigger feature, the Firmware monitors the
6555 * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
6556 * If there is no uplink/download for the specified service interval (field service_interval),
6557 * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
6558 * specified in the UP (field user_priority).
6559 * Firmware also monitors the responses for these QOS-NULL triggers.
6560 * If the peer does not have any delivery frames, it will respond with
6561 * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
6562 * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
6563 * are unused and should be set to 0.
6564 * When service_interval is 0, then the firmware will not send any trigger frames. This is for
6565 * certain host-based implementations that don't want this firmware offload.
6566 * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
6567 * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
6568 * and rest of the AC default to 300 ms.
6569 *
6570 * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
6571 * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
6572 * the more advanced monitoring method.
6573 * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
6574 * suspend interval (field suspend_interval), firmware will change its auto trigger interval
6575 * to delay interval (field delay_interval). This way, when there is no traffic, the station
6576 * will save more power by waking up less and sending less trigger frames.
6577 * The (service_interval < suspend_interval) and (service_interval < delay_interval).
6578 * If this variable auto trigger is not required, then the suspend_interval and delay_interval
6579 * should be 0.
6580 */
6581typedef struct {
6582 A_UINT32 tlv_header;
6583 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
6584 /** WMM Access category from 0 to 3 */
6585 A_UINT32 wmm_ac;
6586 /** User priority to use in trigger frames. It is the TID
6587 * value. This field needs to be specified and may not be
6588 * equivalent to AC since some implementation may use the TSPEC
6589 * to enable UAPSD and negotiate a particular user priority. */
6590 A_UINT32 user_priority;
6591 /** service interval in ms */
6592 A_UINT32 service_interval;
6593 /** Suspend interval in ms */
6594 A_UINT32 suspend_interval;
6595 /** delay interval in ms */
6596 A_UINT32 delay_interval;
6597} wmi_sta_uapsd_auto_trig_param;
6598
6599typedef struct {
6600 A_UINT32 tlv_header;
6601 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
6602 /** unique id identifying the VDEV, generated by the caller */
6603 A_UINT32 vdev_id;
6604 /** peer mac address */
6605 wmi_mac_addr peer_macaddr;
6606 /** Number of AC to specify */
6607 A_UINT32 num_ac;
6608 /*
6609 * Following this struc is the TLV:
6610 * wmi_sta_uapsd_auto_trig_param ac_param[]; //Variable number of AC parameters (defined by field num_ac)
6611 */
6612
6613} wmi_sta_uapsd_auto_trig_cmd_fixed_param;
6614
6615/** mimo powersave state */
6616#define WMI_PEER_MIMO_PS_STATE 0x1
6617/** enable/disable AMPDU . initial value (enabled) */
6618#define WMI_PEER_AMPDU 0x2
6619/** authorize/unauthorize peer. initial value is unauthorized (0) */
6620#define WMI_PEER_AUTHORIZE 0x3
6621/** peer channel bandwidth */
6622#define WMI_PEER_CHWIDTH 0x4
6623/** peer NSS */
6624#define WMI_PEER_NSS 0x5
6625/** USE 4 ADDR */
6626#define WMI_PEER_USE_4ADDR 0x6
6627/* set group membership status */
6628#define WMI_PEER_MEMBERSHIP 0x7
6629#define WMI_PEER_USERPOS 0x8
6630/*
6631 * A critical high-level protocol is being used with this peer. Target
6632 * should take appropriate measures (if possible) to ensure more
6633 * reliable link with minimal latency. This *may* include modifying the
6634 * station power save policy, enabling more RX chains, increased
6635 * priority of channel scheduling, etc.
6636 *
6637 * NOTE: This parameter should only be considered a hint as specific
6638 * behavior will depend on many factors including current network load
6639 * and vdev/peer configuration.
6640 *
6641 * For STA VDEV this peer corresponds to the AP's BSS peer.
6642 * For AP VDEV this peer corresponds to the remote peer STA.
6643 */
6644#define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9
6645/* set Tx failure count threshold for the peer - Currently unused */
6646#define WMI_PEER_TX_FAIL_CNT_THR 0xA
6647/* Enable H/W retry and Enable H/W Send CTS2S before Data */
6648#define WMI_PEER_SET_HW_RETRY_CTS2S 0xB
6649
6650/* Set peer advertised IBSS atim window length */
6651#define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC
6652
6653/** peer phy mode */
6654#define WMI_PEER_PHYMODE 0xD
Govind Singh32cced32016-02-01 13:33:09 +05306655/** Use FIXED Pwr */
6656#define WMI_PEER_USE_FIXED_PWR 0xE
6657/** Set peer fixed rate */
6658#define WMI_PEER_PARAM_FIXED_RATE 0xF
6659/** Whitelist peer TIDs */
6660#define WMI_PEER_SET_MU_WHITELIST 0x10
Govind Singh67b83b82016-02-01 19:26:59 +05306661/** Set peer max tx rate (MCS) in adaptive rate ctrl */
6662#define WMI_PEER_SET_MAX_TX_RATE 0x11
6663/** Set peer minimal tx rate (MCS) in adaptive rate ctrl */
6664#define WMI_PEER_SET_MIN_TX_RATE 0x12
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006665
6666/** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
6667#define WMI_PEER_MIMO_PS_NONE 0x0
6668#define WMI_PEER_MIMO_PS_STATIC 0x1
6669#define WMI_PEER_MIMO_PS_DYNAMIC 0x2
6670
6671typedef struct {
6672 A_UINT32 tlv_header;
6673 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */
6674 /** unique id identifying the VDEV, generated by the caller */
6675 A_UINT32 vdev_id;
6676 /** peer MAC address */
6677 wmi_mac_addr peer_macaddr;
6678 /** parameter id */
6679 A_UINT32 param_id;
6680 /** parametr value */
6681 A_UINT32 param_value;
6682} wmi_peer_set_param_cmd_fixed_param;
6683
Govind Singh67b83b82016-02-01 19:26:59 +05306684typedef union {
6685 /*
6686 * The A_UINT16 "mode" and "tx_rate" fields can only be directly used
6687 * by the target or a little-endian host.
6688 * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET
6689 * macros on the A_UINT32 "value" field.
6690 */
6691 struct {
6692 /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */
6693 A_UINT16 mode;
6694 A_UINT16 tx_rate; /* see per-mode specs below */
6695 };
6696 A_UINT32 value; /* for use by big-endian host */
6697} wmi_peer_max_min_tx_rate;
6698
6699/*
6700 * Any access to the mode/tx_rate in an big endian system should use
6701 * the below Macros on the wmi_peer_max_min_tx_rate.value field.
6702 */
6703#define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16)
6704#define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode)
6705
6706#define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16)
6707#define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode)
6708
6709/*
6710 * CCK max/min tx Rate description
6711 * tx_rate = 0: 1Mbps,
6712 * tx_rate = 1: 2Mbps
6713 * tx_rate = 2: 5.5Mbps
6714 * tx_rate = 3: 11Mbps
6715 * tx_rate = else : invalid.
6716 */
6717#define WMI_MAX_CCK_TX_RATE 0x03
6718
6719/*
6720 * OFDM max/min tx Rate description
6721 * tx_rate = 0: 6Mbps,
6722 * tx_rate = 1: 9Mbps
6723 * tx_rate = 2: 12Mbps
6724 * tx_rate = 3: 18Mbps
6725 * tx_rate = 4: 24Mbps
6726 * tx_rate = 5: 32Mbps
6727 * tx_rate = 6: 48Mbps
6728 * tx_rate = 7: 54Mbps
6729 * tx_rate = else : invalid.
6730 */
6731#define WMI_MAX_OFDM_TX_RATE 0x07
6732
6733/*
6734 * HT max/min tx rate description
6735 * tx_rate = 0~7 : MCS Rate 0~7
6736 * tx_rate=else : invalid.
6737 */
6738#define WMI_MAX_HT_TX_MCS 0x07
6739
6740/*
6741 * VHT max/min tx rate description
6742 * tx_rate = 0~9 : MCS Rate 0~9
6743 * tx_rate=else : invalid.
6744 */
6745#define WMI_MAX_VHT_TX_MCS 0x09
6746
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006747#define MAX_SUPPORTED_RATES 128
6748
6749typedef struct {
6750 /** total number of rates */
6751 A_UINT32 num_rates;
6752 /**
6753 * rates (each 8bit value) packed into a 32 bit word.
6754 * the rates are filled from least significant byte to most
6755 * significant byte.
6756 */
6757 A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
6758} wmi_rate_set;
6759
6760/* NOTE: It would bea good idea to represent the Tx MCS
6761 * info in one word and Rx in another word. This is split
6762 * into multiple words for convenience
6763 */
6764typedef struct {
6765 A_UINT32 tlv_header;
6766 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
6767 A_UINT32 rx_max_rate; /* Max Rx data rate */
6768 A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
6769 A_UINT32 tx_max_rate; /* Max Tx data rate */
6770 A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
Govind Singh32cced32016-02-01 13:33:09 +05306771 A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006772} wmi_vht_rate_set;
6773
6774/*
6775 * IMPORTANT: Make sure the bit definitions here are consistent
6776 * with the ni_flags definitions in wlan_peer.h
6777 */
6778#define WMI_PEER_AUTH 0x00000001 /* Authorized for data */
6779#define WMI_PEER_QOS 0x00000002 /* QoS enabled */
6780#define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */
6781#define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */
6782#define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */
6783#define WMI_PEER_HT 0x00001000 /* HT enabled */
6784#define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */
6785#define WMI_PEER_STBC 0x00008000 /* STBC Enabled */
6786#define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */
6787#define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */
6788#define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */
6789#define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */
6790#define WMI_PEER_VHT 0x02000000 /* VHT Enabled */
6791#define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */
6792#define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */
6793/** CAUTION TODO: Place holder for WLAN_PEER_F_PS_PRESEND_REQUIRED = 0x10000000. Need to be clean up */
6794#define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */
6795#define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */
6796#define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */
6797
6798/**
6799 * Peer rate capabilities.
6800 *
6801 * This is of interest to the ratecontrol
6802 * module which resides in the firmware. The bit definitions are
6803 * consistent with that defined in if_athrate.c.
6804 *
6805 * @todo
6806 * Move this to a common header file later so there is no need to
6807 * duplicate the definitions or maintain consistency.
6808 */
6809#define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */
6810#define WMI_RC_CW40_FLAG 0x02 /* CW 40 */
6811#define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */
6812#define WMI_RC_HT_FLAG 0x08 /* HT */
6813#define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
6814#define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */
6815#define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */
6816#define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
6817#define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
6818#define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
6819#define WMI_RC_TS_FLAG 0x200 /* Three stream flag */
6820#define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
6821
6822typedef struct {
6823 A_UINT32 tlv_header;
6824 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
6825 /** peer MAC address */
6826 wmi_mac_addr peer_macaddr;
6827 /** VDEV id */
6828 A_UINT32 vdev_id;
6829 /** assoc = 1 reassoc = 0 */
6830 A_UINT32 peer_new_assoc;
6831 /** peer associd (16 bits) */
6832 A_UINT32 peer_associd;
6833 /** peer station flags: see definition above */
6834 A_UINT32 peer_flags;
6835 /** negotiated capabilities (lower 16 bits)*/
6836 A_UINT32 peer_caps;
6837 /** Listen interval */
6838 A_UINT32 peer_listen_intval;
6839 /** HT capabilties of the peer */
6840 A_UINT32 peer_ht_caps;
6841 /** maximum rx A-MPDU length */
6842 A_UINT32 peer_max_mpdu;
6843 /** mpdu density of the peer in usec(0 to 16) */
6844 A_UINT32 peer_mpdu_density;
6845 /** peer rate capabilties see flags above */
6846 A_UINT32 peer_rate_caps;
6847 /** num spatial streams */
6848 A_UINT32 peer_nss;
6849 /** VHT capabilties of the peer */
6850 A_UINT32 peer_vht_caps;
6851 /** phy mode */
6852 A_UINT32 peer_phymode;
6853 /** HT Operation Element of the peer. Five bytes packed in 2
6854 * INT32 array and filled from lsb to msb.
6855 * Note that the size of array peer_ht_info[] cannotbe changed
6856 * without breaking WMI Compatibility. */
6857 A_UINT32 peer_ht_info[2];
6858 /** total number of negotiated legacy rate set. Also the sizeof
6859 * peer_legacy_rates[] */
6860 A_UINT32 num_peer_legacy_rates;
6861 /** total number of negotiated ht rate set. Also the sizeof
6862 * peer_ht_rates[] */
6863 A_UINT32 num_peer_ht_rates;
Anurag Chouhan08f66c62016-04-18 17:14:51 +05306864 /*
6865 * Bitmap providing customized mapping of bandwidths to max Rx NSS
Govind Singh32cced32016-02-01 13:33:09 +05306866 * for this peer.
6867 * This is required since 802.11 standard currently facilitates peer to
6868 * be able to advertise only a single max Rx NSS value across all
6869 * bandwidths.
6870 * Some QCA chipsets might need to be able to advertise a different max
6871 * Rx NSS value for 160 MHz, than that for 80 MHz and lower.
6872 *
6873 * bit[2:0] : Represents value of Rx NSS for VHT 160 MHz
6874 * bit[30:3]: Reserved
6875 * bit[31] : MSB(0/1): 1 in case of valid data else all bits will be
6876 * set to 0 by host
6877 */
6878 A_UINT32 peer_bw_rxnss_override;
Govind Singhd24f5e42016-02-22 15:16:46 +05306879 /* 802.11ax capabilities */
6880 wmi_ppe_threshold peer_ppet;
6881 /* protocol-defined HE / 11ax capability flags */
6882 A_UINT32 peer_he_cap_info;
6883 A_UINT32 peer_he_ops; /* HE operation contains BSS color */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006884 /* Following this struc are the TLV's:
6885 * A_UINT8 peer_legacy_rates[];
6886 * A_UINT8 peer_ht_rates[];
6887 * wmi_vht_rate_set peer_vht_rates; //VHT capabilties of the peer
6888 */
6889} wmi_peer_assoc_complete_cmd_fixed_param;
6890
Govind Singh32cced32016-02-01 13:33:09 +05306891/* WDS Entry Flags */
6892#define WMI_WDS_FLAG_STATIC 0x1 /* Disable aging & learning */
6893
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006894typedef struct {
6895 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
6896 /** peer MAC address */
6897 wmi_mac_addr peer_macaddr;
6898 /** wds MAC addr */
6899 wmi_mac_addr wds_macaddr;
Govind Singh32cced32016-02-01 13:33:09 +05306900 /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */
6901 A_UINT32 flags;
Govind Singh869c9872016-02-22 18:36:34 +05306902 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006903} wmi_peer_add_wds_entry_cmd_fixed_param;
6904
6905typedef struct {
6906 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
6907 /** wds MAC addr */
6908 wmi_mac_addr wds_macaddr;
Govind Singh869c9872016-02-22 18:36:34 +05306909 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006910} wmi_peer_remove_wds_entry_cmd_fixed_param;
6911
6912typedef struct {
6913 /** peer MAC address */
6914 wmi_mac_addr peer_macaddr;
6915} wmi_peer_q_empty_callback_event;
6916
Govind Singhc7d51942016-02-01 12:09:31 +05306917/*
6918 * Command to update an already existing WDS entry. Different address setting
6919 * combinations are possible.
6920 *
6921 * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated.
6922 * Valid wds and null peer -> Associated WDS entry flags will be updated.
6923 * Null wds and Valid peer-> Flags will be updated for all WDS entries
6924 * behind the peer.
6925 * Null wds and peer -> Flags will be updated for all WDS entries.
6926 */
6927typedef struct {
6928 /*
6929 * TLV tag and len; tag equals
6930 * WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param
6931 */
6932 A_UINT32 tlv_header;
6933 /** peer MAC address */
6934 wmi_mac_addr peer_macaddr;
6935 /** wds MAC addr */
6936 wmi_mac_addr wds_macaddr;
6937 /* Flags associated with WDS entry */
6938 A_UINT32 flags;
Govind Singh869c9872016-02-22 18:36:34 +05306939 A_UINT32 vdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +05306940} wmi_peer_update_wds_entry_cmd_fixed_param;
6941
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006942/**
6943 * Channel info WMI event
6944 */
6945typedef struct {
6946 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
6947 /** Error code */
6948 A_UINT32 err_code;
6949 /** Channel freq */
6950 A_UINT32 freq;
6951 /** Read flags */
6952 A_UINT32 cmd_flags;
6953 /** Noise Floor value */
6954 A_UINT32 noise_floor;
6955 /** rx clear count */
6956 A_UINT32 rx_clear_count;
6957 /** cycle count */
6958 A_UINT32 cycle_count;
Govind Singh32cced32016-02-01 13:33:09 +05306959 /** channel tx power per range in 0.5dBm steps */
6960 A_UINT32 chan_tx_pwr_range;
6961 /** channel tx power per throughput */
6962 A_UINT32 chan_tx_pwr_tp;
6963 /** rx frame count (cumulative) */
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +05306964 A_UINT32 rx_frame_count;
6965 /** BSS rx cycle count */
6966 A_UINT32 my_bss_rx_cycle_count;
6967 /** b-mode data rx time (units are microseconds) */
6968 A_UINT32 rx_11b_mode_data_duration;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006969} wmi_chan_info_event_fixed_param;
6970
6971/**
6972 * Non wlan interference event
6973 */
6974typedef struct {
6975 A_UINT32 tlv_header;
6976 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_ath_dcs_cw_int */
6977 A_UINT32 channel; /* either number or freq in mhz */
Govind Singh869c9872016-02-22 18:36:34 +05306978} wlan_dcs_cw_int;
6979#define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006980
6981/**
6982 * wlan_dcs_im_tgt_stats
6983 *
6984 */
6985typedef struct _wlan_dcs_im_tgt_stats {
Govind Singh869c9872016-02-22 18:36:34 +05306986 /** TLV tag and len; tag equals
6987 * WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t
6988 */
6989 A_UINT32 tlv_header;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006990 /** current running TSF from the TSF-1 */
6991 A_UINT32 reg_tsf32;
6992
6993 /** Known last frame rssi, in case of multiple stations, if
6994 * and at different ranges, this would not gaurantee that
6995 * this is the least rssi.
6996 */
6997 A_UINT32 last_ack_rssi;
6998
6999 /** Sum of all the failed durations in the last one second interval.
7000 */
7001 A_UINT32 tx_waste_time;
7002 /** count how many times the hal_rxerr_phy is marked, in this
7003 * time period
7004 */
7005 A_UINT32 rx_time;
7006 A_UINT32 phyerr_cnt;
7007
7008 /**
7009 * WLAN IM stats from target to host
7010 *
7011 * Below statistics are sent from target to host periodically.
7012 * These are collected at target as long as target is running
7013 * and target chip is not in sleep.
7014 *
7015 */
7016
7017 /** listen time from ANI */
7018 A_INT32 listen_time;
7019
7020 /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
7021 A_UINT32 reg_tx_frame_cnt;
7022
7023 /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
7024 A_UINT32 reg_rx_frame_cnt;
7025
7026 /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
7027 A_UINT32 reg_rxclr_cnt;
7028
7029 /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
7030 A_UINT32 reg_cycle_cnt; /* delta cycle count */
7031
7032 /** extenstion channel rx clear count */
7033 A_UINT32 reg_rxclr_ext_cnt;
7034
7035 /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
7036 A_UINT32 reg_ofdm_phyerr_cnt;
7037
7038 /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
7039 A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +05307040 /** Channel noise floor (units are dBm) */
7041 A_INT32 chan_nf;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007042
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +05307043 /** BSS rx cycle count */
7044 A_UINT32 my_bss_rx_cycle_count;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007045} wlan_dcs_im_tgt_stats_t;
7046
7047/**
7048 * wmi_dcs_interference_event_t
7049 *
7050 * Right now this is event and stats together. Partly this is
7051 * because cw interference is handled in target now. This
7052 * can be done at host itself, if we can carry the NF alone
7053 * as a stats event. In future this would be done and this
7054 * event would carry only stats.
7055 */
7056typedef struct {
7057 A_UINT32 tlv_header;
7058 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
7059 /**
7060 * Type of the event present, either the cw interference event, or the wlan_im stats
7061 */
7062 A_UINT32 interference_type; /* type of interference, wlan or cw */
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05307063 /** pdev_id for identifying the MAC
7064 * See macros starting with WMI_PDEV_ID_ for values.
7065 */
7066 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007067 /*
7068 * Following this struct are these TLVs. Note that they are both array of structures
7069 * but can have at most one element. Which TLV is empty or has one element depends
7070 * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
Govind Singh869c9872016-02-22 18:36:34 +05307071 * elements (not arrays). union { wlan_dcs_cw_int cw_int;
7072 * wlan_dcs_im_tgt_stats_t wlan_stat; }
7073 * int_event;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007074 *
7075 * //cw_interference event
Govind Singh869c9872016-02-22 18:36:34 +05307076 * wlan_dcs_cw_int cw_int[]; this element
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007077 * // wlan im interfernce stats
7078 * wlan_dcs_im_tgt_stats_t wlan_stat[];
7079 */
7080} wmi_dcs_interference_event_fixed_param;
7081
7082enum wmi_peer_mcast_group_action {
7083 wmi_peer_mcast_group_action_add = 0,
7084 wmi_peer_mcast_group_action_del = 1
7085};
7086#define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1
7087#define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0
7088#define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
7089#define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
Govind Singh32cced32016-02-01 13:33:09 +05307090/* flag to exclude an ip while filtering.set to exclude */
7091#define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4
7092#define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2
7093/* flag to say ipv4/ipv6. Will be set for ipv6 */
7094#define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8
7095#define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3
7096/* delete all mcast table entries. */
7097#define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10
7098#define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4
7099
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007100/* multicast group membership commands */
7101/* TODO: Converting this will be tricky since it uses an union.
7102 Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
7103typedef struct {
7104 A_UINT32 tlv_header;
7105 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
7106 A_UINT32 flags;
7107 wmi_mac_addr ucast_mac_addr;
Govind Singh32cced32016-02-01 13:33:09 +05307108 /*
7109 * for ipv4, bytes (12-15) should contain ip address and
7110 * other lower bytes 0. ipv6 should have all bytes valid
7111 */
7112 A_UINT8 mcast_ip_addr[16]; /* in network byte order */
7113 /*
7114 * for ipv6, all 16 bytes has to be valid;
7115 * for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s
7116 */
7117 A_UINT8 mcast_ip_mask[16]; /* zero out lower bytes if ipv4 */
7118 /* number of address filters - irrespective of ipv4/ipv6 addresses */
7119 A_UINT32 num_filter_addr;
7120 /*
7121 * this array should contain the src IPs that are to be filtered
7122 * during find. The array should be packed. If there are 2 ipv4
7123 * addresses, there should be 8 bytes and rest all 0s
7124 */
7125 A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */
7126 A_UINT8 vdev_id; /* vdev of this mcast group */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007127} wmi_peer_mcast_group_cmd_fixed_param;
7128
7129/** Offload Scan and Roaming related commands */
7130/** The FW performs 2 different kinds of offload scans independent
7131 * of host. One is Roam scan which is primarily performed on a
7132 * station VDEV after association to look for a better AP that
7133 * the station VDEV can roam to. The second scan is connect scan
7134 * which is mainly performed when the station is not associated
7135 * and to look for a matching AP profile from a list of
7136 * configured profiles. */
7137
7138/**
7139 * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
7140 * the roam scan mode is one of the periodic, rssi change, both, none.
7141 * None : Disable Roam scan. No Roam scan at all.
7142 * Periodic : Scan periodically with a configurable period.
7143 * Rssi change : Scan when ever rssi to current AP changes by the threshold value
7144 * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
7145 * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount)
7146 *
7147 */
7148typedef struct {
7149 A_UINT32 tlv_header;
7150 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
7151 A_UINT32 roam_scan_mode;
7152 A_UINT32 vdev_id;
7153} wmi_roam_scan_mode_fixed_param;
7154
7155#define WMI_ROAM_SCAN_MODE_NONE 0x0
7156#define WMI_ROAM_SCAN_MODE_PERIODIC 0x1
7157#define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
7158#define WMI_ROAM_SCAN_MODE_BOTH 0x3
7159/* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
7160#define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
7161
7162typedef struct {
7163 A_UINT32 tlv_header;
7164 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
7165 A_UINT32 vdev_id;
7166 A_UINT32 command_arg;
7167} wmi_roam_scan_cmd_fixed_param;
7168
7169#define WMI_ROAM_SCAN_STOP_CMD 0x1
7170
7171/**
7172 * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan rssi thresold
7173 * scan rssi threshold is the rssi threshold below which the FW will start running Roam scans.
7174 * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
7175 */
7176typedef struct {
7177 A_UINT32 tlv_header;
7178 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
7179 /** unique id identifying the VDEV, generated by the caller */
7180 A_UINT32 vdev_id;
7181 /** roam scan rssi threshold */
7182 A_UINT32 roam_scan_rssi_thresh;
7183 /** When using Hw generated beacon RSSI interrupts */
7184 A_UINT32 roam_rssi_thresh_diff;
7185 /** 5G scan max count */
7186 A_UINT32 hirssi_scan_max_count;
7187 /** 5G scan rssi change threshold value */
7188 A_UINT32 hirssi_scan_delta;
7189 /** 5G scan upper bound */
7190 A_UINT32 hirssi_upper_bound;
7191 /* The TLVs will follow.
7192 * wmi_roam_scan_extended_threshold_param extended_param;
7193 * wmi_roam_earlystop_rssi_thres_param earlystop_param;
Govind Singhce8fd912016-01-21 10:24:19 +05307194 * wmi_roam_dense_thres_param dense_param;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007195 */
7196} wmi_roam_scan_rssi_threshold_fixed_param;
7197
7198#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0
7199#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
7200#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2
7201#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3
7202
7203typedef struct {
7204 /** TLV tag and len; tag equals
7205 *WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
7206 A_UINT32 tlv_header;
7207 A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
7208 A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
7209 A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
7210 A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
7211 A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
7212 A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
7213 A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
7214 A_UINT32 max_penalty_5g; /** maximum penality that can be applied to a 5GHz RSSI */
7215 /**
7216 * RSSI below which roam is kicked in by background scan
7217 * although rssi is still good
7218 */
7219 A_UINT32 good_rssi_threshold;
7220} wmi_roam_scan_extended_threshold_param;
7221
7222
7223/**
7224 * WMI_ROAM_SCAN_PERIOD: period for roam scan.
7225 * Applicable when the scan mode is Periodic or both.
7226 */
7227typedef struct {
7228 A_UINT32 tlv_header;
7229 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
7230 /** unique id identifying the VDEV, generated by the caller */
7231 A_UINT32 vdev_id;
7232 /** roam scan period value */
7233 A_UINT32 roam_scan_period;
7234 /** Aging for Roam scans */
7235 A_UINT32 roam_scan_age;
7236} wmi_roam_scan_period_fixed_param;
7237
7238/**
7239 * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : rssi delta to trigger the roam scan.
7240 * Rssi change threshold used when mode is Rssi change (or) Both.
7241 * The FW will run the roam scan when ever the rssi changes (up or down) by the value set by this parameter.
7242 * Note scan is triggered based on the rssi threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
7243 */
7244typedef struct {
7245 A_UINT32 tlv_header;
7246 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
7247 /** unique id identifying the VDEV, generated by the caller */
7248 A_UINT32 vdev_id;
7249 /** roam scan rssi change threshold value */
7250 A_UINT32 roam_scan_rssi_change_thresh;
7251 /** When using Hw generated beacon RSSI interrupts */
7252 A_UINT32 bcn_rssi_weight;
7253 /** Minimum delay between two 5G scans */
7254 A_UINT32 hirssi_delay_btw_scans;
7255} wmi_roam_scan_rssi_change_threshold_fixed_param;
7256
7257#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
7258#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
7259#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
7260/**
7261 * TLV for roaming channel list
7262 */
7263typedef struct {
7264 A_UINT32 tlv_header;
7265 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
7266 /** unique id identifying the VDEV, generated by the caller */
7267 A_UINT32 vdev_id;
7268 /** WMI_CHAN_LIST_TAG */
7269 A_UINT32 chan_list_type;
7270 /** # if channels to scan */
7271 A_UINT32 num_chan;
7272/**
7273 * TLV (tag length value ) parameters follow the wmi_roam_chan_list
7274 * structure. The TLV's are:
7275 * A_UINT32 channel_list[];
7276 **/
7277} wmi_roam_chan_list_fixed_param;
7278
7279/** Authentication modes */
7280enum {
7281 WMI_AUTH_NONE, /* no upper level auth */
7282 WMI_AUTH_OPEN, /* open */
7283 WMI_AUTH_SHARED, /* shared-key */
7284 WMI_AUTH_8021X, /* 802.1x */
7285 WMI_AUTH_AUTO, /* Auto */
7286 WMI_AUTH_WPA, /* WPA */
7287 WMI_AUTH_RSNA, /* WPA2/RSNA */
7288 WMI_AUTH_CCKM, /* CCK */
7289 WMI_AUTH_WAPI, /* WAPI */
7290 WMI_AUTH_AUTO_PSK,
7291 WMI_AUTH_WPA_PSK,
7292 WMI_AUTH_RSNA_PSK,
7293 WMI_AUTH_WAPI_PSK,
7294 WMI_AUTH_FT_RSNA, /* 11r FT */
7295 WMI_AUTH_FT_RSNA_PSK,
7296 WMI_AUTH_RSNA_PSK_SHA256,
7297 WMI_AUTH_RSNA_8021X_SHA256,
7298};
7299
7300typedef struct {
7301 /** authentication mode (defined above) */
7302 A_UINT32 rsn_authmode;
7303 /** unicast cipher set */
7304 A_UINT32 rsn_ucastcipherset;
7305 /** mcast/group cipher set */
7306 A_UINT32 rsn_mcastcipherset;
7307 /** mcast/group management frames cipher set */
7308 A_UINT32 rsn_mcastmgmtcipherset;
7309} wmi_rsn_params;
7310
7311/** looking for a wps enabled AP */
7312#define WMI_AP_PROFILE_FLAG_WPS 0x1
7313/** looking for a secure AP */
7314#define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
7315/** looking for a PMF enabled AP */
7316#define WMI_AP_PROFILE_FLAG_PMF 0x4
7317
7318/** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
7319 * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
7320 * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
7321 * and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
7322 */
7323
7324typedef struct {
7325 A_UINT32 tlv_header;
7326 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
7327 /** flags as defined above */
7328 A_UINT32 flags;
7329 /**
7330 * rssi thresold value: the value of the the candidate AP should
7331 * higher by this threshold than the rssi of the currrently associated AP.
7332 */
7333 A_UINT32 rssi_threshold;
7334 /**
7335 * ssid vlaue to be matched.
7336 */
7337 wmi_ssid ssid;
7338
7339 /**
7340 * security params to be matched.
7341 */
7342 /** authentication mode (defined above) */
7343 A_UINT32 rsn_authmode;
7344 /** unicast cipher set */
7345 A_UINT32 rsn_ucastcipherset;
7346 /** mcast/group cipher set */
7347 A_UINT32 rsn_mcastcipherset;
7348 /** mcast/group management frames cipher set */
7349 A_UINT32 rsn_mcastmgmtcipherset;
7350} wmi_ap_profile;
7351
7352/** Support early stop roaming scanning when finding a strong candidate AP
7353 * A 'strong' candidate is
7354 * 1) Is eligible candidate
7355 * (all conditions are met in existing candidate selection).
7356 * 2) Its rssi is better than earlystop threshold.
7357 * Earlystop threshold will be relaxed as each channel is scanned.
7358 */
7359typedef struct {
7360 A_UINT32 tlv_header;
7361 /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
7362 A_UINT32 roam_earlystop_thres_min;
7363 /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
7364 A_UINT32 roam_earlystop_thres_max;
7365} wmi_roam_earlystop_rssi_thres_param;
7366
Govind Singhce8fd912016-01-21 10:24:19 +05307367typedef struct {
7368 /* TLV tag and len;
7369 * tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param
7370 */
7371 A_UINT32 tlv_header;
7372 /* rssi threshold offset under trffic and dense env */
7373 A_UINT32 roam_dense_rssi_thres_offset;
7374 /* minimum number of APs to determine dense env */
7375 A_UINT32 roam_dense_min_aps;
7376 /* initial dense status detected by host
7377 * at the time of initial connection */
7378 A_UINT32 roam_dense_status;
7379 /* traffic threshold to enable aggressive roaming in dense env;
7380 * units are percent of medium occupancy, 0 - 100
7381 */
7382 A_UINT32 roam_dense_traffic_thres;
7383} wmi_roam_dense_thres_param;
7384
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007385/** Beacon filter wmi command info */
7386
7387#define BCN_FLT_MAX_SUPPORTED_IES 256
7388#define BCN_FLT_MAX_ELEMS_IE_LIST BCN_FLT_MAX_SUPPORTED_IES/32
7389
7390typedef struct bss_bcn_stats {
7391 A_UINT32 vdev_id;
7392 A_UINT32 bss_bcnsdropped;
7393 A_UINT32 bss_bcnsdelivered;
7394} wmi_bss_bcn_stats_t;
7395
7396typedef struct bcn_filter_stats {
7397 A_UINT32 bcns_dropped;
7398 A_UINT32 bcns_delivered;
7399 A_UINT32 activefilters;
7400 wmi_bss_bcn_stats_t bss_stats;
7401} wmi_bcnfilter_stats_t;
7402
7403typedef struct wmi_add_bcn_filter_cmd {
7404 A_UINT32 tlv_header;
7405 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
7406 A_UINT32 vdev_id;
7407 /*
7408 * Following this structure is the TLV:
7409 * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
7410 */
7411} wmi_add_bcn_filter_cmd_fixed_param;
7412
7413typedef struct wmi_rmv_bcn_filter_cmd {
7414 A_UINT32 tlv_header;
7415 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
7416 A_UINT32 vdev_id;
7417} wmi_rmv_bcn_filter_cmd_fixed_param;
7418
7419#define WMI_BCN_SEND_DTIM_ZERO 1
7420#define WMI_BCN_SEND_DTIM_BITCTL_SET 2
7421typedef struct wmi_bcn_send_from_host {
7422 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */
7423 A_UINT32 vdev_id;
7424 A_UINT32 data_len;
Krishna Kumaar Natarajan7dde8c72016-03-25 15:11:49 -07007425 union {
7426 A_UINT32 frag_ptr; /* Physical address of the frame */
7427 A_UINT32 frag_ptr_lo; /* LSB of physical address of the frame */
7428 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007429 A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
7430 A_UINT32 dtim_flag; /* to control CABQ traffic */
Govind Singh32cced32016-02-01 13:33:09 +05307431 A_UINT32 bcn_antenna; /* Antenna for beacon transmission */
Krishna Kumaar Natarajan7dde8c72016-03-25 15:11:49 -07007432 A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007433} wmi_bcn_send_from_host_cmd_fixed_param;
7434
7435/* cmd to support bcn snd for all vaps at once */
7436typedef struct wmi_pdev_send_bcn {
7437 A_UINT32 num_vdevs;
7438 wmi_bcn_send_from_host_cmd_fixed_param bcn_cmd[1];
7439} wmi_pdev_send_bcn_cmd_t;
7440
7441/*
7442 * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming.
7443 */
7444typedef struct {
7445 A_UINT32 tlv_header;
7446 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
7447 /** id of AP criteria */
7448 A_UINT32 id;
7449
7450 /** unique id identifying the VDEV, generated by the caller */
7451 A_UINT32 vdev_id;
7452
7453 /*
7454 * Following this structure is the TLV:
7455 * wmi_ap_profile ap_profile; //AP profile info
7456 */
7457} wmi_roam_ap_profile_fixed_param;
7458
7459/**
7460 * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
7461 */
7462typedef struct {
7463 /** id of AP criteria */
7464 A_UINT32 id;
7465
7466 /** unique id identifying the VDEV, generated by the caller */
7467 A_UINT32 vdev_id;
7468
7469 /** AP profile info */
7470 wmi_ap_profile ap_profile;
7471
7472} wmi_ofl_scan_add_ap_profile;
7473
7474/**
7475 * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
7476 */
7477typedef struct {
7478 /** id of AP criteria */
7479 A_UINT32 id;
7480 /** unique id identifying the VDEV, generated by the caller */
7481 A_UINT32 vdev_id;
7482} wmi_ofl_scan_remove_ap_profile;
7483
7484/**
7485 * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
7486 * 0 will disable ofload scan and a very low value will perform a continous
7487 * scan.
7488 */
7489typedef struct {
7490 /** offload scan period value, used for scans used when not connected */
7491 A_UINT32 ofl_scan_period;
7492} wmi_ofl_scan_period;
7493
7494/* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
7495#define ROAM_OFFLOAD_PMK_BYTES (32)
7496#define ROAM_OFFLOAD_PSK_MSK_BYTES (32)
7497#define ROAM_OFFLOAD_KRK_BYTES (16)
7498#define ROAM_OFFLOAD_BTK_BYTES (32)
7499#define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
7500#define ROAM_OFFLOAD_NUM_MCS_SET (16)
7501
7502/* This TLV will be filled only in case roam offload
7503 * for wpa2-psk/okc/ese/11r is enabled */
7504typedef struct {
7505 A_UINT32 tlv_header;
7506 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
7507 A_UINT32 rssi_cat_gap; /* gap for every category bucket */
7508 A_UINT32 prefer_5g; /* prefer select 5G candidate */
7509 A_UINT32 select_5g_margin;
7510 A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */
7511 A_UINT32 capability;
7512 A_UINT32 ht_caps_info;
7513 A_UINT32 ampdu_param;
7514 A_UINT32 ht_ext_cap;
7515 A_UINT32 ht_txbf;
7516 A_UINT32 asel_cap;
7517 A_UINT32 qos_enabled;
7518 A_UINT32 qos_caps;
7519 A_UINT32 wmm_caps;
7520 A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET >> 2]; /* since this 4 byte aligned,
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307521 * we don't declare it as
7522 * tlv array */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007523} wmi_roam_offload_tlv_param;
7524
7525/* flags for 11i offload */
7526#define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */
7527/* from bit 1 to bit 31 are reserved */
7528
7529#define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
7530 (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307531} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007532
7533#define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
7534 (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307535} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007536
7537#define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \
7538 ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
7539
7540/* This TLV will be filled only in case of wpa-psk/wpa2-psk */
7541typedef struct {
7542 A_UINT32 tlv_header;
7543 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
7544 A_UINT32 flags;
7545 /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
7546 A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES >> 2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
7547 A_UINT32 pmk_len;
7548 /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
7549} wmi_roam_11i_offload_tlv_param;
7550
7551/* This TLV will be filled only in case of 11R*/
7552typedef struct {
7553 A_UINT32 tlv_header;
7554 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
7555 A_UINT32 mdie_present;
7556 A_UINT32 mdid;
7557 A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN >> 2];
7558 A_UINT32 r0kh_id_len;
7559 A_UINT32 psk_msk[ROAM_OFFLOAD_PSK_MSK_BYTES >> 2]; /* psk/msk offload. As this 4 byte aligned, we don't declare it as tlv array */
7560 A_UINT32 psk_msk_len;
7561 /**length of psk_msk*/
7562} wmi_roam_11r_offload_tlv_param;
7563
7564/* This TLV will be filled only in case of ESE */
7565typedef struct {
7566 A_UINT32 tlv_header;
7567 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
7568 A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES >> 2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
7569 A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES >> 2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
7570} wmi_roam_ese_offload_tlv_param;
7571
7572/** WMI_ROAM_EVENT: roam event triggering the host roam logic.
7573 * generated when ever a better AP is found in the recent roam scan (or)
7574 * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
7575 * from the current AP.
7576 */
7577typedef struct {
7578 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */
7579 /** unique id identifying the VDEV, generated by the caller */
7580 A_UINT32 vdev_id;
7581 /** reason for roam event */
7582 A_UINT32 reason;
7583 /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI*/
7584 A_UINT32 rssi;
Krishna Kumaar Natarajan79a2a082016-03-25 15:07:07 -07007585 /** roam notification */
7586 A_UINT32 notif;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007587
7588} wmi_roam_event_fixed_param;
7589
Nirav Shah439e6262015-11-05 10:53:18 +05307590/* roam_reason: bits 0-3 */
Krishna Kumaar Natarajan79a2a082016-03-25 15:07:07 -07007591
7592/** invalid reason. Do not interpret reason field */
7593#define WMI_ROAM_REASON_INVALID 0x0
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007594#define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
7595#define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */
7596#define WMI_ROAM_REASON_DEAUTH 0x2 /** deauth/disassoc received */
7597#define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */
7598#define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307599 SSID and Security profile in
7600 WMI_ROAM_AP_PROFILE, found during scan
7601 triggered upon FINAL_BMISS **/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007602#define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */
Govind Singhd0c80a32016-02-01 17:57:48 +05307603
7604/*
7605 * WMI_ROAM_REASON_INVOKE_ROAM_FAIL:
7606 * Result code of WMI_ROAM_INVOKE_CMDID.
7607 * Any roaming failure before reassociation will be indicated to host
7608 * with this reason.
7609 * Any roaming failure after reassociation will be indicated to host with
7610 * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not.
7611 */
7612#define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6
Nirav Shah439e6262015-11-05 10:53:18 +05307613/* reserved up through 0xF */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007614
Nirav Shah439e6262015-11-05 10:53:18 +05307615/* subnet status: bits 4-5 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007616typedef enum {
7617 WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
7618 WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
7619 WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
7620} wmi_roam_subnet_change_status;
7621
Nirav Shah439e6262015-11-05 10:53:18 +05307622#define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30
7623#define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4
7624
7625#define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
7626 do { \
7627 (roam_reason) |= \
7628 (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
7629 WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
7630 } while (0)
7631
7632#define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
7633 (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
7634 WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
7635
Krishna Kumaar Natarajan79a2a082016-03-25 15:07:07 -07007636/* roaming notification */
7637/** invalid notification. Do not interpret notif field */
7638#define WMI_ROAM_NOTIF_INVALID 0x0
7639/** indicate that roaming is started. sent only in non WOW state */
7640#define WMI_ROAM_NOTIF_ROAM_START 0x1
7641/** indicate that roaming is aborted. sent only in non WOW state */
7642#define WMI_ROAM_NOTIF_ROAM_ABORT 0x2
7643
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007644/**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
7645 * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations
7646 */
7647typedef struct {
7648 A_UINT32 tlv_header;
7649 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
7650 A_UINT32 vdev_id;
7651 /**unique id identifying the VDEV, generated by the caller*/
7652 A_UINT32 num_ric_request;
7653 /**number of ric request ie send to firmware.(max value is 2 now)*/
7654 A_UINT32 is_add_ric;
7655 /**support add ric or delete ric*/
7656} wmi_ric_request_fixed_param;
7657
7658/**tspec element: refer to 8.4.2.32 of 802.11 2012 spec
7659 * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
7660 */
7661typedef struct {
7662 A_UINT32 tlv_header;
7663 A_UINT32 ts_info; /** bits value of TS Info field.*/
7664 A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/
7665 A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/
7666 A_UINT32 min_service_interval; /**The Minimum Service Interval field*/
7667 A_UINT32 max_service_interval; /**The Maximum Service Interval field*/
7668 A_UINT32 inactivity_interval; /**The Inactivity Interval field*/
7669 A_UINT32 suspension_interval; /**The Suspension Interval field*/
7670 A_UINT32 svc_start_time; /**The Service Start Time field*/
7671 A_UINT32 min_data_rate; /**The Minimum Data Rate field*/
7672 A_UINT32 mean_data_rate; /**The Mean Data Rate field*/
7673 A_UINT32 peak_data_rate; /**The Peak Data Rate field*/
7674 A_UINT32 max_burst_size; /**The Burst Size field*/
7675 A_UINT32 delay_bound; /**The Delay Bound field*/
7676 A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/
7677 A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
7678 A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/
7679} wmi_ric_tspec;
7680
7681/* flags for roam_invoke_cmd */
7682/* add this channel into roam cache channel list after this command is finished */
7683#define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0
Govind Singhd0c80a32016-02-01 17:57:48 +05307684/* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */
7685#define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE 1
7686/* from bit 2 to bit 31 are reserved */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007687
7688#define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
7689 (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307690 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007691
7692#define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
7693 (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307694 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007695
7696#define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307697 ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007698
7699
7700#define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */
7701#define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */
7702#define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */
7703
7704#define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */
7705#define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */
7706
7707/** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
7708 *
7709 * if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
7710 * if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
7711 *
7712 * This command can be used to add specific channel into roam cached channel list by following
7713 * <roam_scan_ch_mode> = 0
7714 * <roam_ap_sel_mode> = 0
7715 * <roam_delay> = 0
7716 * <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
7717 * <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
7718 * <channel_no> = channel list to be added
7719 */
7720typedef struct {
7721 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
7722 A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
7723 A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
7724 A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
7725 A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
7726 A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
7727 A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
7728 A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */
7729 /**
7730 * TLV (tag length value ) parameters follows roam_invoke_req
7731 * The TLV's are:
7732 * A_UINT32 channel_list[];
7733 * wmi_mac_addr bssid_list[];
7734 */
7735} wmi_roam_invoke_cmd_fixed_param;
7736
7737/* Definition for op_bitmap */
7738enum {
7739 ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1,
7740 ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2,
7741 ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
7742};
7743
7744typedef struct {
7745 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
7746 A_UINT32 tlv_header;
7747 /** Unique id identifying the VDEV on which roaming filter is adopted */
7748 A_UINT32 vdev_id;
7749 A_UINT32 flags; /** flags for filter */
7750 /** 32 bit bitmap to be set on.
7751 * bit0 = first param,
7752 * bit 1 = second param...etc. Can be or'ed
7753 */
7754 A_UINT32 op_bitmap;
7755 /* number of blacklist in the TLV variable bssid_black_list */
7756 A_UINT32 num_bssid_black_list;
7757 /* number of whitelist in the TLV variable ssid_white_list */
7758 A_UINT32 num_ssid_white_list;
7759 /* only for lfr 3.0. number of preferred list & factor in the TLV */
7760 A_UINT32 num_bssid_preferred_list;
7761 /**
7762 * TLV (tag length value ) parameters follows roam_filter_list_cmd
7763 * The TLV's are:
7764 * wmi_mac_addr bssid_black_list[];
7765 * wmi_ssid ssid_white_list[];
7766 * wmi_mac_addr bssid_preferred_list[];
7767 * A_UINT32 bssid_preferred_factor[];
7768 */
7769} wmi_roam_filter_fixed_param;
7770
7771typedef struct {
7772 A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
7773} WMI_IPV4_ADDR;
7774
7775typedef struct _WMI_IPV6_ADDR {
7776 A_UINT8 address[16]; /* IPV6 in Network Byte Order */
7777} WMI_IPV6_ADDR;
7778
7779/* flags for subnet change detection */
7780#define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
7781#define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
7782/* bit 2 to bit 31 are reserved */
7783
7784/* set IPv4 enabled/disabled flag and get the flag */
7785#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
7786 (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
7787} while (0)
7788
7789#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
7790 (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
7791} while (0)
7792
7793#define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
7794 ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
7795
7796/* set IPv6 enabled flag, disabled and get the flag */
7797#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
7798 (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
7799} while (0)
7800
7801#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
7802 (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
7803} while (0)
7804
7805#define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
7806 ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
7807
7808/**
7809 * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
7810 * to FW. FW uses these parameters for subnet change detection.
7811 */
7812typedef struct {
7813 /*
7814 * TLV tag and len; tag equals
7815 * WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param
7816 */
7817 A_UINT32 tlv_header;
7818 /** unique id identifying the VDEV, generated by the caller */
7819 A_UINT32 vdev_id;
7820 /** IPv4/IPv6 enabled/disabled */
7821 /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/
7822 DISABLED */
7823 A_UINT32 flag;
7824 /** Gateway MAC address */
7825 wmi_mac_addr inet_gw_mac_addr;
7826 /** IP addresses */
7827 WMI_IPV4_ADDR inet_gw_ip_v4_addr;
7828 WMI_IPV6_ADDR inet_gw_ip_v6_addr;
7829 /** Number of software retries for ARP/Neighbor solicitation request */
7830 A_UINT32 max_retries;
7831 /** timeout in milliseconds for each ARP request*/
7832 A_UINT32 timeout;
7833 /** number of skipped aps **/
7834 A_UINT32 num_skip_subnet_change_detection_bssid_list;
7835/**
7836 * TLV (tag length value ) parameters follows roam_subnet_change_config_cmd
7837 * structure. The TLV's are:
7838 * wmi_mac_addr skip_subnet_change_detection_bssid_list [];
7839 **/
7840} wmi_roam_subnet_change_config_fixed_param;
7841
7842/** WMI_PROFILE_MATCH_EVENT: offload scan
7843 * generated when ever atleast one of the matching profiles is found
7844 * in recent NLO scan. no data is carried with the event.
7845 */
7846
7847/** P2P specific commands */
7848
7849/**
7850 * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
7851 * FW to generate P2P IE tobe carried in probe response frames.
7852 * FW will respond to probe requests while in listen state.
7853 */
7854typedef struct {
7855 /* number of secondary device types,supported */
7856 A_UINT32 num_secondary_dev_types;
7857 /**
7858 * followed by 8 bytes of primary device id and
7859 * num_secondary_dev_types * 8 bytes of secondary device
7860 * id.
7861 */
7862} wmi_p2p_dev_set_device_info;
7863
7864/** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
7865 * state. if enabled, an active STA/AP will respond to P2P probe requests on
7866 * the operating channel of the VDEV.
7867 */
7868
7869typedef struct {
7870 /* 1:enable disoverability, 0:disable discoverability */
7871 A_UINT32 enable_discoverability;
7872} wmi_p2p_set_discoverability;
7873
7874/** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
7875 * beacons generated by FW. used in FW beacon mode.
7876 * the FW will add this IE to beacon in addition to the beacon
7877 * template set by WMI_BCN_TMPL_CMDID command.
7878 */
7879typedef struct {
7880 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */
7881 /** unique id identifying the VDEV, generated by the caller */
7882 A_UINT32 vdev_id;
7883 /* ie length */
7884 A_UINT32 ie_buf_len;
7885 /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
7886 * A_UINT8 ie_data[]; // length in byte given by field num_data.
7887 */
7888
7889} wmi_p2p_go_set_beacon_ie_fixed_param;
7890
7891/** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
7892 * probe response generated by FW. used in FW beacon mode.
7893 * the FW will add this IE to probe response in addition to the probe response
7894 * template set by WMI_PRB_TMPL_CMDID command.
7895 */
7896typedef struct {
7897 /** unique id identifying the VDEV, generated by the caller */
7898 A_UINT32 vdev_id;
7899 /* ie length */
7900 A_UINT32 ie_buf_len;
7901 /*followed by byte stream of ie data of length ie_buf_len */
7902} wmi_p2p_go_set_probe_resp_ie;
7903
7904/** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
7905 * be used by the FW to parse the P2P NoA attribute in beacons, probe resposes
7906 * and action frames received by the P2P Client.
7907 */
7908typedef struct {
7909 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
7910 /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */
7911 A_UINT32 p2p_ie_oui_type;
7912 /** OS specific NoA Attribute ID */
7913 A_UINT32 p2p_noa_attribute;
7914} wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
7915
7916/*----P2P disc offload definition ----*/
7917
7918typedef struct {
7919 A_UINT32 pattern_type;
7920 /**
7921 * TLV (tag length value ) paramerters follow the pattern structure.
7922 * TLV can contain bssid list, ssid list and
7923 * ie. the TLV tags are defined above;
7924 */
7925} wmi_p2p_disc_offload_pattern_cmd;
7926
7927typedef struct {
7928 /* unique id identifying the VDEV, generated by the caller */
7929 A_UINT32 vdev_id;
7930 /* mgmt type of the ie */
7931 A_UINT32 mgmt_type;
7932 /* ie length */
7933 A_UINT32 ie_buf_len;
7934 /*followed by byte stream of ie data of length ie_buf_len */
7935} wmi_p2p_disc_offload_appie_cmd;
7936
7937typedef struct {
7938 /* enable/disable p2p find offload */
7939 A_UINT32 enable;
7940 /* unique id identifying the VDEV, generated by the caller */
7941 A_UINT32 vdev_id;
7942 /* p2p find type */
7943 A_UINT32 disc_type;
7944 /* p2p find perodic */
7945 A_UINT32 perodic;
7946 /* p2p find listen channel */
7947 A_UINT32 listen_channel;
7948 /* p2p find full channel number */
7949 A_UINT32 num_scan_chans;
7950 /**
7951 * TLV (tag length value ) paramerters follow the pattern structure.
7952 * TLV contain channel list
7953 */
7954} wmi_p2p_disc_offload_config_cmd;
7955
7956/*----P2P OppPS definition ----*/
7957typedef struct {
7958 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */
7959 A_UINT32 tlv_header;
7960 /* unique id identifying the VDEV, generated by the caller */
7961 A_UINT32 vdev_id;
7962 /* OppPS attributes */
7963 /** Bit 0: Indicate enable/disable of OppPS
7964 * Bits 7-1: Ctwindow in TUs
7965 * Bits 31-8: Reserved
7966 */
7967 A_UINT32 oppps_attr;
7968} wmi_p2p_set_oppps_cmd_fixed_param;
7969
7970#define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1
7971#define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0
7972
7973#define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \
7974 WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
7975
7976#define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \
7977 WMI_F_RMW((hdr)->oppps_attr, 0x1, \
7978 WMI_UNIFIED_OPPPS_ATTR_ENALBED);
7979
7980#define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe
7981#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1
7982
7983#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \
7984 WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
7985
7986#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \
7987 WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \
7988 WMI_UNIFIED_OPPPS_ATTR_CTWIN);
7989
7990typedef struct {
7991 A_UINT32 time32; /* upper 32 bits of time stamp */
7992 A_UINT32 time0; /* lower 32 bits of time stamp */
7993} A_TIME64;
7994
7995typedef enum wmi_peer_sta_kickout_reason {
7996 WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */
7997 WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
7998 WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
7999 WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
8000 WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */
8001 WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
8002} PEER_KICKOUT_REASON;
8003
8004typedef struct {
8005 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */
8006 /** peer mac address */
8007 wmi_mac_addr peer_macaddr;
8008 /** Reason code, defined as above */
8009 A_UINT32 reason;
8010 /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
8011 A_UINT32 rssi;
8012} wmi_peer_sta_kickout_event_fixed_param;
8013
8014#define WMI_WLAN_PROFILE_MAX_HIST 3
8015#define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
8016
8017typedef struct _wmi_wlan_profile_t {
8018 A_UINT32 tlv_header;
8019 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
8020 A_UINT32 id;
8021 A_UINT32 cnt;
8022 A_UINT32 tot;
8023 A_UINT32 min;
8024 A_UINT32 max;
8025 A_UINT32 hist_intvl;
8026 A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
8027} wmi_wlan_profile_t;
8028
8029typedef struct _wmi_wlan_profile_ctx_t {
8030 A_UINT32 tlv_header;
8031 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
8032 A_UINT32 tot; /* time in us */
8033 A_UINT32 tx_msdu_cnt;
8034 A_UINT32 tx_mpdu_cnt;
8035 A_UINT32 tx_ppdu_cnt;
8036 A_UINT32 rx_msdu_cnt;
8037 A_UINT32 rx_mpdu_cnt;
8038 A_UINT32 bin_count;
8039} wmi_wlan_profile_ctx_t;
8040
8041typedef struct {
8042 A_UINT32 tlv_header;
8043 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
8044 A_UINT32 enable;
8045} wmi_wlan_profile_trigger_cmd_fixed_param;
8046
8047typedef struct {
8048 A_UINT32 tlv_header;
8049 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
8050 A_UINT32 value;
8051} wmi_wlan_profile_get_prof_data_cmd_fixed_param;
8052
8053typedef struct {
8054 A_UINT32 tlv_header;
8055 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
8056 A_UINT32 profile_id;
8057 A_UINT32 value;
8058} wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
8059
8060typedef struct {
8061 A_UINT32 tlv_header;
8062 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
8063 A_UINT32 profile_id;
8064 A_UINT32 enable;
8065} wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
8066
8067/*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
8068 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
8069 when comparing wifi header.*/
8070/* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
8071#define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146
8072#define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
8073#define WOW_DEFAULT_BITMASK_SIZE 146
8074#define WOW_DEFAULT_BITMASK_SIZE_DWORD 37
8075#define WOW_MAX_BITMAP_FILTERS 32
8076#define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16
8077#define WOW_EXTEND_PATTERN_MATCH_CNT 16
8078#define WOW_SHORT_PATTERN_MATCH_CNT 8
8079#define WOW_DEFAULT_EVT_BUF_SIZE 148 /* Maximum 148 bytes of the data is copied starting from header incase if the match is found.
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308080 The 148 comes from (128 - 14 ) payload size + 8bytes LLC + 26bytes MAC header */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008081#define WOW_DEFAULT_IOAC_PATTERN_SIZE 6
8082#define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
8083#define WOW_DEFAULT_IOAC_RANDOM_SIZE 6
8084#define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
8085#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120
8086#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
8087#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32
8088#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
8089#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32
8090#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08008091#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128
8092#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008093
8094typedef enum pattern_type_e {
8095 WOW_PATTERN_MIN = 0,
8096 WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
8097 WOW_IPV4_SYNC_PATTERN,
8098 WOW_IPV6_SYNC_PATTERN,
8099 WOW_WILD_CARD_PATTERN,
8100 WOW_TIMER_PATTERN,
8101 WOW_MAGIC_PATTERN,
8102 WOW_IPV6_RA_PATTERN,
8103 WOW_IOAC_PKT_PATTERN,
8104 WOW_IOAC_TMR_PATTERN,
8105 WOW_IOAC_SOCK_PATTERN,
8106 WOW_PATTERN_MAX
8107} WOW_PATTERN_TYPE;
8108
8109typedef enum event_type_e {
8110 WOW_BMISS_EVENT = 0,
8111 WOW_BETTER_AP_EVENT,
8112 WOW_DEAUTH_RECVD_EVENT,
8113 WOW_MAGIC_PKT_RECVD_EVENT,
8114 WOW_GTK_ERR_EVENT,
8115 WOW_FOURWAY_HSHAKE_EVENT,
8116 WOW_EAPOL_RECVD_EVENT,
8117 WOW_NLO_DETECTED_EVENT,
8118 WOW_DISASSOC_RECVD_EVENT,
8119 WOW_PATTERN_MATCH_EVENT,
8120 WOW_CSA_IE_EVENT,
8121 WOW_PROBE_REQ_WPS_IE_EVENT,
8122 WOW_AUTH_REQ_EVENT,
8123 WOW_ASSOC_REQ_EVENT,
8124 WOW_HTT_EVENT,
8125 WOW_RA_MATCH_EVENT,
8126 WOW_HOST_AUTO_SHUTDOWN_EVENT,
8127 WOW_IOAC_MAGIC_EVENT,
8128 WOW_IOAC_SHORT_EVENT,
8129 WOW_IOAC_EXTEND_EVENT,
8130 WOW_IOAC_TIMER_EVENT,
8131 WOW_DFS_PHYERR_RADAR_EVENT,
8132 WOW_BEACON_EVENT,
8133 WOW_CLIENT_KICKOUT_EVENT,
8134 WOW_NAN_EVENT,
8135 WOW_EXTSCAN_EVENT,
8136 WOW_IOAC_REV_KA_FAIL_EVENT,
8137 WOW_IOAC_SOCK_EVENT,
8138 WOW_NLO_SCAN_COMPLETE_EVENT,
Govind Singh941bd5e2016-02-04 17:15:25 +05308139 WOW_NAN_DATA_EVENT,
8140 WOW_NAN_RTT_EVENT,
Krishna Kumaar Natarajan3bd73642016-03-25 13:59:54 -07008141 WOW_TDLS_CONN_TRACKER_EVENT,
Anurag Chouhan05d05fe2016-04-18 17:09:24 +05308142 WOW_CRITICAL_LOG_EVENT,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008143} WOW_WAKE_EVENT_TYPE;
8144
8145typedef enum wake_reason_e {
8146 WOW_REASON_UNSPECIFIED = -1,
8147 WOW_REASON_NLOD = 0,
8148 WOW_REASON_AP_ASSOC_LOST,
8149 WOW_REASON_LOW_RSSI,
8150 WOW_REASON_DEAUTH_RECVD,
8151 WOW_REASON_DISASSOC_RECVD,
8152 WOW_REASON_GTK_HS_ERR,
8153 WOW_REASON_EAP_REQ,
8154 WOW_REASON_FOURWAY_HS_RECV,
8155 WOW_REASON_TIMER_INTR_RECV,
8156 WOW_REASON_PATTERN_MATCH_FOUND,
8157 WOW_REASON_RECV_MAGIC_PATTERN,
8158 WOW_REASON_P2P_DISC,
8159 WOW_REASON_WLAN_HB,
8160 WOW_REASON_CSA_EVENT,
8161 WOW_REASON_PROBE_REQ_WPS_IE_RECV,
8162 WOW_REASON_AUTH_REQ_RECV,
8163 WOW_REASON_ASSOC_REQ_RECV,
8164 WOW_REASON_HTT_EVENT,
8165 WOW_REASON_RA_MATCH,
8166 WOW_REASON_HOST_AUTO_SHUTDOWN,
8167 WOW_REASON_IOAC_MAGIC_EVENT,
8168 WOW_REASON_IOAC_SHORT_EVENT,
8169 WOW_REASON_IOAC_EXTEND_EVENT,
8170 WOW_REASON_IOAC_TIMER_EVENT,
8171 WOW_REASON_ROAM_HO,
8172 WOW_REASON_DFS_PHYERR_RADADR_EVENT,
8173 WOW_REASON_BEACON_RECV,
8174 WOW_REASON_CLIENT_KICKOUT_EVENT,
8175 WOW_REASON_NAN_EVENT,
8176 WOW_REASON_EXTSCAN,
8177 WOW_REASON_RSSI_BREACH_EVENT,
8178 WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
8179 WOW_REASON_IOAC_SOCK_EVENT,
8180 WOW_REASON_NLO_SCAN_COMPLETE,
8181 WOW_REASON_PACKET_FILTER_MATCH,
8182 WOW_REASON_ASSOC_RES_RECV,
8183 WOW_REASON_REASSOC_REQ_RECV,
8184 WOW_REASON_REASSOC_RES_RECV,
8185 WOW_REASON_ACTION_FRAME_RECV,
Manikandan Mohan130eb572015-12-23 13:53:34 -08008186 WOW_REASON_BPF_ALLOW,
Govind Singh941bd5e2016-02-04 17:15:25 +05308187 WOW_REASON_NAN_DATA,
8188 WOW_REASON_NAN_RTT,
Krishna Kumaar Natarajan3bd73642016-03-25 13:59:54 -07008189 WOW_REASON_TDLS_CONN_TRACKER_EVENT,
Anurag Chouhan05d05fe2016-04-18 17:09:24 +05308190 WOW_REASON_CRITICAL_LOG,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008191 WOW_REASON_DEBUG_TEST = 0xFF,
8192} WOW_WAKE_REASON_TYPE;
8193
8194typedef enum {
8195 WOW_IFACE_PAUSE_ENABLED,
8196 WOW_IFACE_PAUSE_DISABLED
8197} WOW_IFACE_STATUS;
8198
8199enum {
8200 /* some win10 platfrom will not assert pcie_reset for wow.*/
8201 WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001,
Govind Singhb5158e22016-02-04 15:38:30 +05308202 /*
8203 * WMI_WOW_FLAG_SEND_PM_PME
8204 * Some platforms have issues if the PM_PME message is sent after WoW,
8205 * so don't send PM_PME after WoW unless the host uses this flag
8206 * to request it.
8207 */
8208 WMI_WOW_FLAG_SEND_PM_PME = 0x00000002,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008209};
8210
8211
8212typedef struct {
8213 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */
8214 A_UINT32 enable;
8215 A_UINT32 pause_iface_config;
8216 A_UINT32 flags; /* WMI_WOW_FLAG enums */
8217} wmi_wow_enable_cmd_fixed_param;
8218
8219typedef struct {
8220 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */
8221 /** Reserved for future use */
8222 A_UINT32 reserved0;
8223} wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
8224
8225#define WOW_ICMPV6_NA_FILTER_DISABLE 0
8226#define WOW_ICMPV6_NA_FILTER_ENABLE 1
8227
8228typedef struct {
8229 /* TLV tag and len;
8230 * tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param
8231 */
8232 A_UINT32 tlv_header;
8233 A_UINT32 vdev_id;
8234 A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
8235} wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
8236
8237typedef struct bitmap_pattern_s {
8238 A_UINT32 tlv_header;
8239 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
8240 A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
8241 A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
8242 A_UINT32 pattern_offset;
8243 A_UINT32 pattern_len;
8244 A_UINT32 bitmask_len;
8245 A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
8246} WOW_BITMAP_PATTERN_T;
8247
8248typedef struct ipv4_sync_s {
8249 A_UINT32 tlv_header;
8250 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
8251 A_UINT32 ipv4_src_addr;
8252 A_UINT32 ipv4_dst_addr;
8253 A_UINT32 tcp_src_prt;
8254 A_UINT32 tcp_dst_prt;
8255} WOW_IPV4_SYNC_PATTERN_T;
8256
8257typedef struct ipv6_sync_s {
8258 A_UINT32 tlv_header;
8259 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
8260 A_UINT32 ipv6_src_addr[4];
8261 A_UINT32 ipv6_dst_addr[4];
8262 A_UINT32 tcp_src_prt;
8263 A_UINT32 tcp_dst_prt;
8264} WOW_IPV6_SYNC_PATTERN_T;
8265
8266typedef struct WOW_MAGIC_PATTERN_CMD {
8267 A_UINT32 tlv_header;
8268 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
8269 wmi_mac_addr macaddr;
8270} WOW_MAGIC_PATTERN_CMD;
8271
8272typedef enum wow_ioac_pattern_type {
8273 WOW_IOAC_MAGIC_PATTERN = 1,
8274 WOW_IOAC_SHORT_PATTERN,
8275 WOW_IOAC_EXTEND_PATTERN,
8276} WOW_IOAC_PATTERN_TYPE;
8277
8278typedef struct ioac_sock_pattern_s {
8279 /**
8280 * TLV tag and len;
8281 * tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T
8282 */
8283 A_UINT32 tlv_header;
8284 A_UINT32 id;
8285 A_UINT32 local_ipv4;
8286 A_UINT32 remote_ipv4;
8287 A_UINT32 local_port;
8288 A_UINT32 remote_port;
8289 A_UINT32 pattern_len; /* units = bytes */
8290 A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08008291 WMI_IPV6_ADDR local_ipv6;
8292 WMI_IPV6_ADDR remote_ipv6;
8293 A_UINT32 ack_nak_len;
8294 A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
8295 A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008296} WOW_IOAC_SOCK_PATTERN_T;
8297
8298typedef struct ioac_pkt_pattern_s {
8299 A_UINT32 tlv_header;
8300 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
8301 A_UINT32 pattern_type;
8302 A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
8303 A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
8304 A_UINT32 pattern_len;
8305 A_UINT32 random_len;
8306} WOW_IOAC_PKT_PATTERN_T;
8307
8308typedef struct ioac_tmr_pattern_s {
8309 A_UINT32 tlv_header;
8310 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
8311 A_UINT32 wake_in_s;
8312 A_UINT32 vdev_id;
8313} WOW_IOAC_TMR_PATTERN_T;
8314
8315typedef struct {
8316 A_UINT32 tlv_header;
8317 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
8318 A_UINT32 nID;
8319} WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
8320
8321typedef struct {
8322 A_UINT32 tlv_header;
8323 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
8324 A_UINT32 nID;
8325} WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
8326
8327typedef struct ioac_keepalive_s {
8328 A_UINT32 tlv_header;
8329 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
8330 A_UINT32
8331 keepalive_pkt_buf
8332 [WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
8333 A_UINT32 keepalive_pkt_len;
8334 A_UINT32 period_in_ms;
8335 A_UINT32 vdev_id;
8336 A_UINT32 max_loss_cnt;
8337 A_UINT32 local_ipv4;
8338 A_UINT32 remote_ipv4;
8339 A_UINT32 local_port;
8340 A_UINT32 remote_port;
8341 A_UINT32 recv_period_in_ms;
8342 A_UINT32 rev_ka_size;
8343 A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08008344 WMI_IPV6_ADDR local_ipv6;
8345 WMI_IPV6_ADDR remote_ipv6;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008346} WMI_WOW_IOAC_KEEPALIVE_T;
8347
8348typedef struct {
8349 A_UINT32 tlv_header;
8350 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
8351 A_UINT32 vdev_id;
8352 A_UINT32 pattern_type;
8353/*
8354 * Following this struct are these TLVs. Note that they are all array of structures
8355 * but can have at most one element. Which TLV is empty or has one element depends
8356 * on the field pattern_type. This is to emulate an union.
8357 * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
8358 * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
8359 */
8360} WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
8361
8362typedef struct {
8363 A_UINT32 tlv_header;
8364 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
8365 A_UINT32 vdev_id;
8366 A_UINT32 pattern_type;
8367 A_UINT32 pattern_id;
8368} WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
8369
8370typedef struct {
8371 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
8372 A_UINT32 vdev_id;
8373 A_UINT32 pattern_id;
8374 A_UINT32 pattern_type;
8375 /*
8376 * Following this struct are these TLVs. Note that they are all array of structures
8377 * but can have at most one element. Which TLV is empty or has one element depends
8378 * on the field pattern_type. This is to emulate an union.
8379 * WOW_BITMAP_PATTERN_T pattern_info_bitmap[];
8380 * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[];
8381 * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[];
8382 * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[];
8383 * A_UINT32 pattern_info_timeout[];
8384 * A_UINT32 ra_ratelimit_interval;
8385 */
8386} WMI_WOW_ADD_PATTERN_CMD_fixed_param;
8387
8388typedef struct {
8389 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
8390 A_UINT32 vdev_id;
8391 A_UINT32 pattern_id;
8392 A_UINT32 pattern_type;
8393} WMI_WOW_DEL_PATTERN_CMD_fixed_param;
8394
8395typedef struct {
8396 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */
8397 A_UINT32 vdev_id;
8398 A_UINT32 is_add;
8399 A_UINT32 event_bitmap;
8400} WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
8401
8402/*
8403 * This structure is used to set the pattern to check UDP packet in WOW mode.
8404 * If match, construct a tx frame in a local buffer to send through the peer
8405 * AP to the entity in the IP network that sent the UDP packet to this STA.
8406 */
8407typedef struct {
8408 /*
8409 * TLV tag and len;
8410 * tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param
8411 */
8412 A_UINT32 tlv_header;
8413 A_UINT32 vdev_id;
8414 A_UINT32 enable; /* 1: enable, 0: disable */
8415 /*
8416 * dest_port -
8417 * bits 7:0 contain the LSB of the UDP dest port,
8418 * bits 15:8 contain the MSB of the UDP dest port
8419 */
8420 A_UINT32 dest_port;
8421 A_UINT32 pattern_len; /* length in byte of pattern[] */
8422 A_UINT32 response_len; /* length in byte of response[] */
8423 /*
8424 * Following this struct are the TLV's:
8425 * payload of UDP packet to be checked, network byte order
8426 * A_UINT8 pattern[];
8427 * payload of UDP packet to be response, network byte order
8428 * A_UINT8 response[];
8429 */
8430} WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
8431
8432/*
8433 * This structure is used to set the pattern for WOW host wakeup pin pulse
8434 * pattern confirguration.
8435 */
8436typedef struct {
8437 /*
8438 * TLV tag and len; tag equals
8439 * WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param
8440 */
8441 A_UINT32 tlv_header;
8442
8443 /* 1: enable, 0: disable */
8444 A_UINT32 enable;
8445
8446 /* pin for host wakeup */
8447 A_UINT32 pin;
8448
8449 /* interval for keeping low voltage, unit: ms */
8450 A_UINT32 interval_low;
8451
8452 /* interval for keeping high voltage, unit: ms */
8453 A_UINT32 interval_high;
8454
8455 /* repeat times for pulse (0xffffffff means forever) */
8456 A_UINT32 repeat_cnt;
8457} WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
8458
Anurag Chouhan86eab9b2016-04-21 16:22:47 +05308459#define MAX_SUPPORTED_ACTION_CATEGORY 256
8460#define MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST (MAX_SUPPORTED_ACTION_CATEGORY/32)
8461
8462typedef enum {
8463 WOW_ACTION_WAKEUP_OPERATION_RESET = 0,
8464 WOW_ACTION_WAKEUP_OPERATION_SET,
8465 WOW_ACTION_WAKEUP_OPERATION_ADD_SET,
8466 WOW_ACTION_WAKEUP_OPERATION_DELETE_SET,
8467} WOW_ACTION_WAKEUP_OPERATION;
8468
8469typedef struct {
8470 /*
8471 * TLV tag and len; tag equals
8472 * WMITLV_TAG_STRUC_WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param
8473 */
8474 A_UINT32 tlv_header;
8475 A_UINT32 vdev_id;
8476 /*
8477 * 0 reset to fw default, 1 set the bits, 2 add the setting bits,
8478 * 3 delete the setting bits
8479 */
8480 A_UINT32 operation;
8481 A_UINT32 action_category_map[MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST];
8482} WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param;
8483
8484
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008485typedef struct wow_event_info_s {
8486 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */
8487 A_UINT32 vdev_id;
8488 A_UINT32 flag; /*This is current reserved. */
8489 A_INT32 wake_reason;
8490 A_UINT32 data_len;
8491} WOW_EVENT_INFO_fixed_param;
8492
8493typedef struct wow_initial_wakeup_event_s {
8494 /*
8495 * TLV tag and len; tag equals
8496 * WOW_INITIAL_WAKEUP_EVENT_fixed_param
8497 */
8498 A_UINT32 tlv_header;
8499 A_UINT32 vdev_id;
8500} WOW_INITIAL_WAKEUP_EVENT_fixed_param;
8501
8502typedef enum {
8503 WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
8504 WOW_EVENT_INFO_TYPE_BITMAP,
8505 WOW_EVENT_INFO_TYPE_GTKIGTK,
8506} WOW_EVENT_INFO_TYPE;
8507
8508typedef struct wow_event_info_section_s {
8509 A_UINT32 data_type;
8510 A_UINT32 data_len;
8511} WOW_EVENT_INFO_SECTION;
8512
8513typedef struct wow_event_info_section_packet_s {
8514 A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
8515} WOW_EVENT_INFO_SECTION_PACKET;
8516
8517typedef struct wow_event_info_section_bitmap_s {
8518 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */
8519 A_UINT32 flag; /*This is current reserved. */
8520 A_UINT32 value; /*This could be the pattern id for bitmap pattern. */
8521 A_UINT32 org_len; /*The length of the orginal packet. */
8522} WOW_EVENT_INFO_SECTION_BITMAP;
8523
8524/**
8525 * This command is sent from WLAN host driver to firmware to
8526 * enable or disable D0-WOW. D0-WOW means APSS suspend with
8527 * PCIe link and DDR being active.
8528 *
8529 *
8530 * Entering D0-WOW Mode (based on kernel suspend request):
8531 * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
8532 * target: Take action (e.g. dbglog suspend)
8533 * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
8534 *
8535 * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
8536 * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
8537 * target: Take action (e.g. dbglog resume)
8538 * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
8539 *
8540 * This command is applicable only on the PCIE LL systems
8541 * Host can enter either D0-WOW or WOW mode, but NOT both at same time
8542 * Decision to enter D0-WOW or WOW is based on active interfaces
8543 *
8544 */
8545typedef struct {
8546 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */
8547 A_UINT32 enable; /* 1 = enable, 0 = disable */
8548} wmi_d0_wow_enable_disable_cmd_fixed_param;
8549
8550typedef enum extend_wow_type_e {
8551 EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */
8552 EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */
8553 EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08008554 EXTWOW_TYPE_APP_PULSETEST,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008555 EXTWOW_DISABLED = 255,
8556} EXTWOW_TYPE;
8557
8558typedef struct {
8559 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */
8560 A_UINT32 vdev_id;
8561 A_UINT32 type;
8562 A_UINT32 wakeup_pin_num;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08008563 A_UINT32 swol_pulsetest_type;
8564 A_UINT32 swol_pulsetest_application;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008565} wmi_extwow_enable_cmd_fixed_param;
8566
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08008567#define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
8568#define SWOL_INDOOR_KEY_LEN 16
8569
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008570typedef struct {
8571 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */
8572 A_UINT32 vdev_id;
8573 wmi_mac_addr wakee_mac;
8574 A_UINT8 ident[8];
8575 A_UINT8 passwd[16];
8576 A_UINT32 ident_len;
8577 A_UINT32 passwd_len;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08008578
8579 /* indoor check parameters */
8580 /* key for mac addresses specified in swol_indoor_key_mac
8581 * Big-endian hosts need to byte-swap the bytes within each 4-byte
8582 * segment of this array, so the bytes will return to their original
8583 * order when the entire WMI message contents are byte-swapped to
8584 * convert from big-endian to little-endian format.
8585 */
8586 A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
8587 /* key length for specified mac address index
8588 * Big-endian hosts need to byte-swap the bytes within each 4-byte
8589 * segment of this array, so the bytes will return to their original
8590 * order when the entire WMI message contents are byte-swapped to
8591 * convert from big-endian to little-endian format.
8592 */
8593 A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
8594 /* mac address array allowed to wakeup host*/
8595 wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
8596 /* app mask for the mac addresses specified in swol_indoor_key_mac */
8597 A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
8598 A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
8599 A_UINT32 swol_indoor_pw_check; /* whether to check password */
8600 A_UINT32 swol_indoor_pattern; /* wakeup pattern */
8601 A_UINT32 swol_indoor_exception; /* wakeup when exception happens */
8602 A_UINT32 swol_indoor_exception_app;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008603} wmi_extwow_set_app_type1_params_cmd_fixed_param;
8604
8605typedef struct {
8606 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */
8607 A_UINT32 vdev_id;
8608
8609 A_UINT8 rc4_key[16];
8610 A_UINT32 rc4_key_len;
8611
8612 /** ip header parameter */
8613 A_UINT32 ip_id; /* NC id */
8614 A_UINT32 ip_device_ip; /* NC IP address */
8615 A_UINT32 ip_server_ip; /* Push server IP address */
8616
8617 /** tcp header parameter */
8618 A_UINT16 tcp_src_port; /* NC TCP port */
8619 A_UINT16 tcp_dst_port; /* Push server TCP port */
8620 A_UINT32 tcp_seq;
8621 A_UINT32 tcp_ack_seq;
8622
8623 A_UINT32 keepalive_init; /* Initial ping interval */
8624 A_UINT32 keepalive_min; /* Minimum ping interval */
8625 A_UINT32 keepalive_max; /* Maximum ping interval */
8626 A_UINT32 keepalive_inc; /* Increment of ping interval */
8627
8628 wmi_mac_addr gateway_mac;
8629 A_UINT32 tcp_tx_timeout_val;
8630 A_UINT32 tcp_rx_timeout_val;
8631
8632 /** add extra parameter for backward-compatible */
8633 /*
8634 * For all byte arrays, natural order is used. E.g.
8635 * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
8636 * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
8637 */
8638
8639 /* used to encrypt transmit packet such as keep-alive */
8640 A_UINT8 rc4_write_sandbox[256];
8641 A_UINT32 rc4_write_x;
8642 A_UINT32 rc4_write_y;
8643
8644 /* used to decrypt received packet such as wow data */
8645 A_UINT8 rc4_read_sandbox[256];
8646 A_UINT32 rc4_read_x;
8647 A_UINT32 rc4_read_y;
8648
8649 /* used to caculate HMAC hash for transmit packet such as keep-alive */
8650 A_UINT8 ssl_write_seq[8];
8651 A_UINT8 ssl_sha1_write_key[64];
8652 A_UINT32 ssl_sha1_write_key_len;
8653
8654 /* used to calculate HAMC hash for receive packet such as wow data */
8655 A_UINT8 ssl_read_seq[8];
8656 A_UINT8 ssl_sha1_read_key[64];
8657 A_UINT32 ssl_sha1_read_key_len;
8658
8659 /* optional element for specifying TCP options data to include in
8660 * transmit packets such as keep-alive
8661 */
8662 A_UINT32 tcp_options_len;
8663 A_UINT8 tcp_options[40];
8664
8665 A_UINT32 async_id; /* keep-alive request id */
8666} wmi_extwow_set_app_type2_params_cmd_fixed_param;
8667
8668#define WMI_RXERR_CRC 0x01 /* CRC error on frame */
8669#define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
8670#define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */
8671#define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
8672
8673typedef enum {
8674 PKT_PWR_SAVE_PAID_MATCH = 0x0001,
8675 PKT_PWR_SAVE_GID_MATCH = 0x0002,
8676 PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x0004,
8677 PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x0008,
8678 PKT_PWR_SAVE_EOF_PAD_DELIM = 0x0010,
8679 PKT_PWR_SAVE_MACADDR_MISMATCH = 0x0020,
8680 PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x0040,
8681 PKT_PWR_SAVE_GID_NSTS_ZERO = 0x0080,
8682 PKT_PWR_SAVE_RSSI_CHECK = 0x0100,
8683 PKT_PWR_SAVE_5G_EBT = 0x0200,
8684 PKT_PWR_SAVE_2G_EBT = 0x0400,
8685 WMI_PKT_PWR_SAVE_MAX = 0x0800,
8686} WMI_PKT_PWR_SAVE_TYPE;
8687
8688typedef struct {
8689 A_UINT32 tlv_header;
8690 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
8691 A_UINT32 num_data;
8692 /** length in byte of data[]. */
Govind Singh869c9872016-02-22 18:36:34 +05308693 /** pdev_id for identifying the MAC
8694 * See macros starting with WMI_PDEV_ID_ for values.
8695 */
8696 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008697 /* This structure is used to send Factory Test Mode [FTM] command
8698 * from host to firmware for integrated chips which are binary blobs.
8699 * Following this structure is the TLV:
8700 * A_UINT8 data[]; // length in byte given by field num_data.
8701 */
8702} wmi_ftm_intg_cmd_fixed_param;
8703
8704typedef struct {
8705 A_UINT32 tlv_header;
8706 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
8707 A_UINT32 num_data;
8708 /** length in byte of data[]. */
8709 /* This structure is used to receive Factory Test Mode [FTM] event
8710 * from firmware to host for integrated chips which are binary blobs.
8711 * Following this structure is the TLV:
8712 * A_UINT8 data[]; // length in byte given by field num_data.
8713 */
8714} wmi_ftm_intg_event_fixed_param;
8715
8716#define WMI_MAX_NS_OFFLOADS 2
8717#define WMI_MAX_ARP_OFFLOADS 2
8718
8719#define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
8720#define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
8721#define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
8722
8723typedef struct {
8724 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
8725 A_UINT32 flags; /* flags */
8726 A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node */
8727 A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
8728 wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
8729} WMI_ARP_OFFLOAD_TUPLE;
8730
8731#define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
8732#define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
8733#define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
Govind Singh86180292016-02-01 14:03:37 +05308734/* whether the configured IPv6 address is anycast */
8735#define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008736
8737#define WMI_NSOFF_MAX_TARGET_IPS 2
8738
8739typedef struct {
8740 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
8741 A_UINT32 flags; /* flags */
8742 /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
8743 WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */
8744 WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
8745 WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
8746 wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
8747} WMI_NS_OFFLOAD_TUPLE;
8748
8749typedef struct {
8750 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
8751 A_UINT32 flags;
8752 A_UINT32 vdev_id;
8753 A_UINT32 num_ns_ext_tuples;
8754 /* Following this structure are the TLVs:
8755 * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS];
8756 * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
8757 * size of ns_ext_tuples is based on num_ns_ext_tuples
8758 * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[];
8759 */
8760} WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
8761
8762typedef struct {
8763 A_UINT32 tlv_header;
8764 A_UINT32 vdev_id;
8765 A_UINT32 pattern_id;
8766 A_UINT32 timeout;
8767 A_UINT32 length;
8768 /* Following this would be the pattern
8769 A_UINT8 pattern[] of length specifed by length
8770 field in the structure. */
8771} WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
8772
8773typedef struct {
8774 A_UINT32 tlv_header;
8775 A_UINT32 vdev_id;
8776 A_UINT32 pattern_id;
8777} WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
8778
8779typedef struct {
8780 A_UINT32 tlv_header;
8781 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
8782 /** unique id identifying the VDEV, generated by the caller */
8783 A_UINT32 vdev_id;
8784 /** peer MAC address */
8785 wmi_mac_addr peer_macaddr;
8786 /** Tid number */
8787 A_UINT32 tid;
8788 /** Initiator (1) or Responder (0) for this aggregation */
8789 A_UINT32 initiator;
8790 /** size of the negotiated window */
8791 A_UINT32 window_size;
8792 /** starting sequence number (only valid for initiator) */
8793 A_UINT32 ssn;
8794 /** timeout field represents the time to wait for Block Ack in
8795 * initiator case and the time to wait for BAR in responder
8796 * case. 0 represents no timeout. */
8797 A_UINT32 timeout;
8798 /* BA policy: immediate ACK (0) or delayed ACK (1) */
8799 A_UINT32 policy;
8800} wmi_peer_tid_addba_cmd_fixed_param;
8801
8802typedef struct {
8803 A_UINT32 tlv_header;
8804 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
8805 /** unique id identifying the VDEV, generated by the caller */
8806 A_UINT32 vdev_id;
8807 /** peer MAC address */
8808 wmi_mac_addr peer_macaddr;
8809 /** Tid number */
8810 A_UINT32 tid;
8811 /** Initiator (1) or Responder (0) for this aggregation */
8812 A_UINT32 initiator;
8813} wmi_peer_tid_delba_cmd_fixed_param;
8814
8815typedef struct {
8816 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
8817 /** unique id identifying the VDEV, generated by the caller */
8818 A_UINT32 vdev_id;
8819 /** peer MAC address */
8820 wmi_mac_addr peer_macaddr;
8821 /** Tid number */
8822 A_UINT32 tid;
8823 /** Event status */
8824 A_UINT32 status;
8825} wmi_tx_addba_complete_event_fixed_param;
8826
8827typedef struct {
8828 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
8829 /** unique id identifying the VDEV, generated by the caller */
8830 A_UINT32 vdev_id;
8831 /** peer MAC address */
8832 wmi_mac_addr peer_macaddr;
8833 /** Tid number */
8834 A_UINT32 tid;
8835 /** Event status */
8836 A_UINT32 status;
8837} wmi_tx_delba_complete_event_fixed_param;
8838/*
8839 * Structure to request sequence numbers for a given
8840 * peer station on different TIDs. The TIDs are
8841 * indicated in the tidBitMap, tid 0 would
8842 * be represented by LSB bit 0. tid 1 would be
8843 * represented by LSB bit 1 etc.
8844 * The target will retrieve the current sequence
8845 * numbers for the peer on all the TIDs requested
8846 * and send back a response in a WMI event.
8847 */
8848typedef struct {
8849 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308850 WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008851 wmi_mac_addr peer_macaddr;
8852 A_UINT32 tidBitmap;
8853} wmi_ba_req_ssn;
8854
8855typedef struct {
8856 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308857 WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008858 /** unique id identifying the VDEV, generated by the caller */
8859 A_UINT32 vdev_id;
8860 /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
8861 A_UINT32 num_ba_req_ssn;
8862/* Following this struc are the TLV's:
8863 * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
8864 */
8865} wmi_ba_req_ssn_cmd_fixed_param;
8866
8867/*
8868 * Max transmit categories
8869 *
8870 * Note: In future if we need to increase WMI_MAX_TC definition
8871 * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
8872 */
8873#define WMI_MAX_TC 8
8874
8875/*
8876 * Structure to send response sequence numbers
8877 * for a give peer and tidmap.
8878 */
8879typedef struct {
8880 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308881 WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008882 wmi_mac_addr peer_macaddr;
8883 /* A bool to indicate if ssn is present */
8884 A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
8885 /* The ssn from target, valid only if
8886 * ssn_present_for_tid[tidn] equals 1
8887 */
8888 A_UINT32 ssn_for_tid[WMI_MAX_TC];
8889} wmi_ba_event_ssn;
8890
8891typedef struct {
8892 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308893 WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008894 /** unique id identifying the VDEV, generated by the caller */
8895 A_UINT32 vdev_id;
8896 /** Event status, success or failure of the overall operation */
8897 A_UINT32 status;
8898 /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
8899 A_UINT32 num_ba_event_ssn;
8900/* Following this struc are the TLV's:
8901 * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
8902 */
8903} wmi_ba_rsp_ssn_event_fixed_param;
8904
8905enum wmi_aggr_state_req_type {
8906 WMI_DISABLE_AGGREGATION,
8907 WMI_ENABLE_AGGREGATION
8908};
8909
8910/*
8911 * This event is generated by the COEX module
8912 * when esco call is begins the coex module in fw genrated this event to host to
8913 * disable the RX aggregation and after completion of the esco call fw will indicate to
8914 * enable back the Rx aggregation .
8915 */
8916
8917typedef struct {
8918 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
8919 /** unique id identifying the VDEV, generated by the caller */
8920 A_UINT32 vdev_id;
8921 /** req_type contains values from enum
8922 * wmi_aggr_state_req_type; 0 (disable) 1(enable) */
8923 A_UINT32 req_type;
8924} wmi_aggr_state_trig_event_fixed_param;
8925
8926typedef struct {
8927 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
8928 /** unique id identifying the VDEV, generated by the caller */
8929 A_UINT32 vdev_id;
8930 /** MAC address used for installing */
8931 wmi_mac_addr peer_macaddr;
8932 /** key index */
8933 A_UINT32 key_ix;
8934 /** key flags */
8935 A_UINT32 key_flags;
8936 /** Event status */
8937 A_UINT32 status;
8938} wmi_vdev_install_key_complete_event_fixed_param;
8939
8940typedef enum _WMI_NLO_AUTH_ALGORITHM {
8941 WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
8942 WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
8943 WMI_NLO_AUTH_ALGO_WPA = 3,
8944 WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
8945 WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
8946 WMI_NLO_AUTH_ALGO_RSNA = 6,
8947 WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
8948} WMI_NLO_AUTH_ALGORITHM;
8949
8950typedef enum _WMI_NLO_CIPHER_ALGORITHM {
8951 WMI_NLO_CIPHER_ALGO_NONE = 0x00,
8952 WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
8953 WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
8954 WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
8955 WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
8956 WMI_NLO_CIPHER_ALGO_BIP = 0x06,
8957 WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
8958 WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
8959 WMI_NLO_CIPHER_ALGO_WEP = 0x101,
8960} WMI_NLO_CIPHER_ALGORITHM;
8961
8962/* SSID broadcast type passed in NLO params */
8963typedef enum _WMI_NLO_SSID_BcastNwType {
8964 WMI_NLO_BCAST_UNKNOWN = 0,
8965 WMI_NLO_BCAST_NORMAL = 1,
8966 WMI_NLO_BCAST_HIDDEN = 2,
8967} WMI_NLO_SSID_BcastNwType;
8968
8969#define WMI_NLO_MAX_SSIDS 16
8970#define WMI_NLO_MAX_CHAN 48
8971
8972#define WMI_NLO_CONFIG_STOP (0x1 << 0)
8973#define WMI_NLO_CONFIG_START (0x1 << 1)
8974#define WMI_NLO_CONFIG_RESET (0x1 << 2)
8975#define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4)
8976#define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5)
8977#define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6)
8978/* This bit is used to indicate if EPNO or supplicant PNO is enabled. Only
8979 * one of them can be enabled at a given time */
8980#define WMI_NLO_CONFIG_ENLO (0x1 << 7)
8981#define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8)
Govind Singh42f71542016-03-14 16:32:33 +05308982#define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008983
8984/* Whether directed scan needs to be performed (for hidden SSIDs) */
8985#define WMI_ENLO_FLAG_DIRECTED_SCAN 1
8986/* Whether PNO event shall be triggered if the network is found on A band */
8987#define WMI_ENLO_FLAG_A_BAND 2
8988/* Whether PNO event shall be triggered if the network is found on G band */
8989#define WMI_ENLO_FLAG_G_BAND 4
8990/* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
8991#define WMI_ENLO_FLAG_STRICT_MATCH 8
8992/* Code for matching the beacon AUTH IE - additional codes TBD open */
8993#define WMI_ENLO_AUTH_CODE_OPEN 1
8994/* WPA_PSK or WPA2PSK */
8995#define WMI_ENLO_AUTH_CODE_PSK 2
8996/* any EAPOL */
8997#define WMI_ENLO_AUTH_CODE_EAPOL 4
8998
8999/* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
9000typedef struct wmi_nlo_ssid_param {
9001 A_UINT32 valid;
9002 wmi_ssid ssid;
9003} wmi_nlo_ssid_param;
9004
9005/* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
9006typedef struct wmi_nlo_enc_param {
9007 A_UINT32 valid;
9008 A_UINT32 enc_type;
9009} wmi_nlo_enc_param;
9010
9011/* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
9012typedef struct wmi_nlo_auth_param {
9013 A_UINT32 valid;
9014 A_UINT32 auth_type;
9015} wmi_nlo_auth_param;
9016
9017/* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
9018typedef struct wmi_nlo_bcast_nw_param {
9019 A_UINT32 valid;
9020 /**
9021 * If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value
9022 * should be true/false.Otherwise EPNO is enabled. bcast_nw_type would be used
9023 * as a bit flag contains WMI_ENLO_FLAG_XXX
9024 */
9025 A_UINT32 bcast_nw_type;
9026} wmi_nlo_bcast_nw_param;
9027
9028/* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
9029typedef struct wmi_nlo_rssi_param {
9030 A_UINT32 valid;
9031 A_INT32 rssi;
9032} wmi_nlo_rssi_param;
9033
9034typedef struct nlo_configured_parameters {
9035 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
9036 wmi_nlo_ssid_param ssid;
9037 wmi_nlo_enc_param enc_type;
9038 wmi_nlo_auth_param auth_type;
9039 wmi_nlo_rssi_param rssi_cond;
9040 wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
9041} nlo_configured_parameters;
9042
9043/* Support channel prediction for PNO scan after scanning top_k_num channels
9044 * if stationary_threshold is met.
9045 */
9046typedef struct nlo_channel_prediction_cfg {
9047 A_UINT32 tlv_header;
9048 /* Enable or disable this feature. */
9049 A_UINT32 enable;
9050 /* Top K channels will be scanned before deciding whether to further
9051 * scan or stop. Minimum value is 3 and maximum is 5. */
9052 A_UINT32 top_k_num;
9053 /* Preconfigured stationary threshold. Lesser value means more
9054 * conservative. Bigger value means more aggressive.
9055 * Maximum is 100 and mininum is 0. */
9056 A_UINT32 stationary_threshold;
9057 /* Periodic full channel scan in milliseconds unit.
9058 * After full_scan_period_ms since last full scan, channel prediction
9059 * scan is suppressed and will do full scan.
9060 * This is to help detecting sudden AP power-on or -off.
9061 * Value 0 means no full scan at all (not recommended).
9062 */
9063 A_UINT32 full_scan_period_ms;
9064} nlo_channel_prediction_cfg;
9065
Govind Singh42f71542016-03-14 16:32:33 +05309066typedef struct enlo_candidate_score_params_t {
9067 /*
9068 * TLV tag and len;
9069 * tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param
9070 */
9071 A_UINT32 tlv_header;
9072 /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
9073 A_INT32 min5GHz_rssi;
9074 /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
9075 A_INT32 min24GHz_rssi;
9076 /* the maximum score that a network can have before bonuses */
9077 A_UINT32 initial_score_max;
9078 /* current_connection_bonus:
9079 * only report when there is a network's score this much higher
9080 * than the current connection
9081 */
9082 A_UINT32 current_connection_bonus;
9083 /* score bonus for all networks with the same network flag */
9084 A_UINT32 same_network_bonus;
9085 /* score bonus for networks that are not open */
9086 A_UINT32 secure_bonus;
9087 /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
9088 A_UINT32 band5GHz_bonus;
9089} enlo_candidate_score_params;
9090
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009091typedef struct wmi_nlo_config {
9092 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
9093 A_UINT32 flags;
9094 A_UINT32 vdev_id;
9095 A_UINT32 fast_scan_max_cycles;
9096 A_UINT32 active_dwell_time;
9097 A_UINT32 passive_dwell_time; /* PDT in msecs */
9098 A_UINT32 probe_bundle_size;
9099 A_UINT32 rest_time; /* ART = IRT */
9100 A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
9101 A_UINT32 scan_backoff_multiplier; /* SBM */
9102 A_UINT32 fast_scan_period; /* SCBM */
9103 A_UINT32 slow_scan_period; /* specific to windows */
9104 A_UINT32 no_of_ssids;
9105 A_UINT32 num_of_channels;
9106 A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
9107 /* The TLVs will follow.
9108 * nlo_configured_parameters nlo_list[];
9109 * A_UINT32 channel_list[];
9110 * nlo_channel_prediction_cfg ch_prediction_cfg;
Govind Singh42f71542016-03-14 16:32:33 +05309111 * enlo_candidate_score_params candidate_score_params;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009112 */
9113
9114} wmi_nlo_config_cmd_fixed_param;
9115
9116typedef struct wmi_nlo_event {
9117 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
9118 A_UINT32 vdev_id;
9119} wmi_nlo_event;
9120
9121/* WMI_PASSPOINT_CONFIG_SET
9122 * Sets a list for passpoint networks for PNO purposes;
9123 * it should be matched against any passpoint networks found
9124 * during regular PNO scan.
9125 */
9126#define WMI_PASSPOINT_CONFIG_SET (0x1 << 0)
9127/* WMI_PASSPOINT_CONFIG_RESET
9128 * Reset passpoint network list -
9129 * no Passpoint networks should be matched after this.
9130 */
9131#define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1)
9132#define PASSPOINT_REALM_LEN 256
9133#define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5
9134#define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
9135#define PASSPOINT_PLMN_ID_LEN 3
9136#define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
9137 (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
9138
9139/*
9140 * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
9141 * A_UINT8 realm[PASSPOINT_REALM_LEN]
9142 * array will end on a 4-byte boundary.
9143 * (This 4-byte alignment simplifies endianness-correction byte swapping.)
9144 */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309145A_COMPILE_TIME_ASSERT(check_passpoint_realm_size, (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009146
9147/*
9148 * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
9149 * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
9150 * roaming_consortium_ids array below will end on a 4-byte boundary.
9151 * (This 4-byte alignment simplifies endianness-correction byte swapping.)
9152 */
9153A_COMPILE_TIME_ASSERT(check_passpoint_roaming_consortium_ids_size,
9154((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
9155
9156/* wildcard ID to allow an action (reset) to apply to all networks */
9157#define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
9158typedef struct wmi_passpoint_config {
9159 /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
9160 A_UINT32 tlv_header;
9161 /* (network) id
9162 * identifier of the matched network, report this in event
9163 * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
9164 * that indicates the action should be applied to all networks.
9165 * Currently, the only action that is applied to all networks is "reset".
9166 * If a non-wildcard ID is specified, that particular network is configured.
9167 * If a wildcard ID is specified, all networks are reset.
9168 */
9169 A_UINT32 id;
9170 A_UINT32 req_id;
9171 /*null terminated UTF8 encoded realm, 0 if unspecified*/
9172 A_UINT8 realm[PASSPOINT_REALM_LEN];
9173 /*roaming consortium ids to match, 0s if unspecified*/
9174 A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN];
9175 /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
9176 /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
9177 A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN];
9178} wmi_passpoint_config_cmd_fixed_param;
9179
9180typedef struct {
9181 A_UINT32 tlv_header; /* TLV tag and len; tag equals
9182wmi_passpoint_event_hdr */
9183 A_UINT32 id; /* identifier of the matched network */
9184 A_UINT32 vdev_id;
9185 A_UINT32 timestamp; /* time since boot (in microsecond) when the
9186result was retrieved*/
9187 wmi_ssid ssid;
9188 wmi_mac_addr bssid; /* bssid of the network */
9189 A_UINT32 channel_mhz; /* channel frequency in MHz */
9190 A_UINT32 rssi; /* rssi value */
9191 A_UINT32 rtt; /* timestamp in nanoseconds*/
9192 A_UINT32 rtt_sd; /* standard deviation in rtt */
9193 A_UINT32 beacon_period; /* beacon advertised in the beacon */
9194 A_UINT32 capability; /* capabilities advertised in the beacon */
9195 A_UINT32 ie_length; /* size of the ie_data blob */
9196 A_UINT32 anqp_length; /* length of ANQP blob */
9197 /**
9198 * Following this structure is the byte stream of ie data of length ie_buf_len:
9199 * A_UINT8 ie_data[]; // length in byte given by field ie_length, blob of ie data in beacon
9200 * A_UINT8 anqp_ie[]; // length in byte given by field anqp_len, blob of anqp data of IE
9201 * Implicitly, combing ie_data and anqp_ie into a single bufp, and the bytes
9202 * stream of each ie should be same as BEACON/Action-frm by 802.11 spec
9203 */
9204} wmi_passpoint_event_hdr;
9205
9206#define GTK_OFFLOAD_OPCODE_MASK 0xFF000000
9207/** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
9208#define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000
9209/** Disable GTK offload */
9210#define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000
9211/** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
9212#define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000
9213enum wmi_chatter_mode {
9214 /* Chatter enter/exit happens
9215 * automatically based on preset
9216 * params
9217 */
9218 WMI_CHATTER_MODE_AUTO,
9219 /* Chatter enter is triggered
9220 * manually by the user
9221 */
9222 WMI_CHATTER_MODE_MANUAL_ENTER,
9223 /* Chatter exit is triggered
9224 * manually by the user
9225 */
9226 WMI_CHATTER_MODE_MANUAL_EXIT,
9227 /* Placeholder max value, always last */
9228 WMI_CHATTER_MODE_MAX
9229};
9230
9231enum wmi_chatter_query_type {
9232 /*query coalescing filter match counter */
9233 WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
9234 WMI_CHATTER_QUERY_MAX
9235};
9236
9237typedef struct {
9238 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */
9239 A_UINT32 chatter_mode;
9240} wmi_chatter_set_mode_cmd_fixed_param;
9241
9242/** maximum number of filter supported*/
9243#define CHATTER_MAX_COALESCING_RULES 11
9244/** maximum number of field tests per filter*/
9245#define CHATTER_MAX_FIELD_TEST 5
9246/** maximum field length in number of DWORDS*/
9247#define CHATTER_MAX_TEST_FIELD_LEN32 2
9248
9249/** field test kinds*/
9250#define CHATTER_COALESCING_TEST_EQUAL 1
9251#define CHATTER_COALESCING_TEST_MASKED_EQUAL 2
9252#define CHATTER_COALESCING_TEST_NOT_EQUAL 3
9253
9254/** packet type*/
9255#define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0)
9256#define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1)
9257#define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2)
9258
9259/** coalescing field test*/
9260typedef struct _chatter_pkt_coalescing_hdr_test {
9261 /** offset from start of mac header, for windows native wifi host driver
9262 * should assume standard 802.11 frame format without QoS info and address4
9263 * FW would account for any non-stand fields for final offset value.
9264 */
9265 A_UINT32 offset;
9266 A_UINT32 length; /* length of test field */
9267 A_UINT32 test; /*equal, not equal or masked equal */
9268 A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream */
9269 A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream */
9270} chatter_pkt_coalescing_hdr_test;
9271
9272/** packet coalescing filter*/
9273typedef struct _chatter_pkt_coalescing_filter {
9274 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
9275 A_UINT32 filter_id; /*unique id assigned by OS */
9276 A_UINT32 max_coalescing_delay; /*max miliseconds 1st pkt can be hold */
9277 A_UINT32 pkt_type; /*unicast/multicast/broadcast */
9278 A_UINT32 num_of_test_field; /*number of field test in table */
9279 chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /*field test tbl */
9280} chatter_pkt_coalescing_filter;
9281
9282/** packet coalescing filter add command*/
9283typedef struct {
9284 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
9285 A_UINT32 num_of_filters;
9286 /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
9287 chatter_pkt_coalescing_filter rx_filter[1]; */
9288} wmi_chatter_coalescing_add_filter_cmd_fixed_param;
9289/** packet coalescing filter delete command*/
9290typedef struct {
9291 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
9292 A_UINT32 filter_id; /*filter id which will be deleted */
9293} wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
9294/** packet coalescing query command*/
9295typedef struct {
9296 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
9297 A_UINT32 type; /*type of query */
9298} wmi_chatter_coalescing_query_cmd_fixed_param;
9299/** chatter query reply event*/
9300typedef struct {
9301 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */
9302 A_UINT32 type; /*query type */
9303 A_UINT32 filter_match_cnt; /*coalescing filter match counter */
9304} wmi_chatter_query_reply_event_fixed_param;
9305
9306/* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
9307 * cannot be changed without breaking WMI compatibility. */
9308#define GTK_OFFLOAD_KEK_BYTES 16
9309#define GTK_OFFLOAD_KCK_BYTES 16
9310/* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
9311#define GTK_REPLAY_COUNTER_BYTES 8
9312#define WMI_MAX_KEY_LEN 32
9313#define IGTK_PN_SIZE 6
9314
9315typedef struct {
9316 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
9317 A_UINT32 vdev_id;
9318 /** unique id identifying the VDEV */
9319 A_UINT32 flags; /* status flags */
9320 A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
9321 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
9322 A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
9323 A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
9324 A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
9325 A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
9326} WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
9327
9328typedef struct {
9329 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
9330 A_UINT32 vdev_id; /** unique id identifying the VDEV */
9331 A_UINT32 flags; /* control flags, GTK offload command use high byte */
9332 /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
9333 A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
9334 A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
9335 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
9336} WMI_GTK_OFFLOAD_CMD_fixed_param;
9337
9338typedef struct {
9339 /* TLV tag and len; tag equals
9340 * WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param
9341 */
9342 A_UINT32 tlv_header;
9343 A_UINT32 vdev_id;
9344 A_UINT32 sa_query_retry_interval; /* in msec */
9345 A_UINT32 sa_query_max_retry_count;
9346} WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
9347
9348typedef enum {
9349 WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
9350 WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
9351 WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK */
9352 /* gratuitous ARP req*/
9353 WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4,
9354} WMI_STA_KEEPALIVE_METHOD;
9355
9356typedef struct {
9357 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
9358 WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
9359 WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
9360 wmi_mac_addr dest_mac_addr; /* destination MAC address */
9361} WMI_STA_KEEPALVE_ARP_RESPONSE;
9362
9363typedef struct {
9364 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
9365 A_UINT32 vdev_id;
9366 A_UINT32 enable; /* 1 - Enable, 0 - disable */
9367 A_UINT32 method; /* keep alive method */
9368 A_UINT32 interval; /* time interval in seconds */
9369 /*
9370 * NOTE: following this structure is the TLV for ARP Resonse:
9371 * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; // ARP response
9372 */
9373} WMI_STA_KEEPALIVE_CMD_fixed_param;
9374
9375typedef struct {
9376 A_UINT32 tlv_header;
9377 A_UINT32 vdev_id;
9378 A_UINT32 action;
9379} WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
9380typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
9381
9382typedef struct {
9383 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
9384 A_UINT32 vdev_id;
9385 A_UINT32 keepaliveInterval; /* seconds */
9386 A_UINT32 keepaliveMethod;
9387} wmi_vdev_set_keepalive_cmd_fixed_param;
9388
9389typedef struct {
9390 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
9391 A_UINT32 vdev_id;
9392} wmi_vdev_get_keepalive_cmd_fixed_param;
9393
9394typedef struct {
9395 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
9396 A_UINT32 vdev_id;
9397 A_UINT32 keepaliveInterval; /* seconds */
9398 A_UINT32 keepaliveMethod; /* seconds */
9399} wmi_vdev_get_keepalive_event_fixed_param;
9400
9401#define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
9402#define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
9403
9404typedef struct {
9405 A_UINT32 tlv_header;
9406 A_UINT32 vdev_id;
9407 A_UINT32 action;
9408} WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
9409
9410typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param
9411WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
9412
9413typedef struct {
9414 A_UINT32 tlv_header;
9415 A_UINT32 vdev_id;
9416 A_UINT32 mcc_tbttmode;
9417 wmi_mac_addr mcc_bssid;
9418} wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
9419
9420typedef struct {
9421 A_UINT32 tlv_header;
9422 A_UINT32 vdev_id; /* home vdev id */
9423 A_UINT32 meas_token; /* from measure request frame */
9424 A_UINT32 dialog_token;
9425 A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
9426 A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst */
9427 A_UINT32 burst_cycle; /* times cycle through within one burst */
9428 A_UINT32 tx_power; /* for path frame */
9429 A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */
9430 wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
9431 A_UINT32 num_chans;
9432} wmi_vdev_plmreq_start_cmd_fixed_param;
9433
9434typedef struct {
9435 A_UINT32 tlv_header;
9436 A_UINT32 vdev_id;
9437 A_UINT32 meas_token; /* same value from req */
9438} wmi_vdev_plmreq_stop_cmd_fixed_param;
9439
9440typedef struct {
9441 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */
9442 A_UINT32 tlv_header;
9443 /* unique id identifying the VDEV, generated by the caller */
9444 A_UINT32 vdev_id;
9445 /* enable/disable NoA */
9446 A_UINT32 enable;
9447 /** number of NoA desc. In the TLV noa_descriptor[] */
9448 A_UINT32 num_noa;
9449 /**
9450 * TLV (tag length value ) paramerters follow the pattern structure.
9451 * TLV contain NoA desc with num of num_noa
9452 */
9453} wmi_p2p_set_noa_cmd_fixed_param;
9454
9455typedef struct {
9456 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */
9457 A_UINT32 tlv_header;
9458 /* unique id identifying the VDEV, generated by the caller */
9459 A_UINT32 vdev_id;
9460 /* Identify the wlan module */
9461 A_UINT32 module_id;
9462 /* Num of test arguments passed */
9463 A_UINT32 num_args;
9464/**
9465 * TLV (tag length value ) parameters follow the wmi_roam_chan_list
9466 * structure. The TLV's are:
9467 * A_UINT32 args[];
9468 **/
9469} wmi_unit_test_cmd_fixed_param;
9470
9471/** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
9472 * after it received WMI_ROAM_SYNCH_EVENTID.
9473 */
9474typedef struct {
9475 A_UINT32 tlv_header;
9476 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
9477 /** unique id identifying the VDEV, generated by the caller */
9478 A_UINT32 vdev_id;
9479} wmi_roam_synch_complete_fixed_param;
9480
9481typedef enum {
9482 RECOVERY_SIM_ASSERT = 0x01,
9483 RECOVERY_SIM_NO_DETECT = 0x02,
9484 RECOVERY_SIM_CTR_EP_FULL = 0x03,
9485 RECOVERY_SIM_EMPTY_POINT = 0x04,
9486 RECOVERY_SIM_STACK_OV = 0x05,
9487 RECOVERY_SIM_INFINITE_LOOP = 0x06,
9488 RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
9489 RECOVERY_SIM_SELF_RECOVERY = 0x08,
9490} RECOVERY_SIM_TYPE;
9491
9492/* WMI_FORCE_FW_HANG_CMDID */
9493typedef struct {
9494 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
9495 A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:... */
9496 A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms) */
9497} WMI_FORCE_FW_HANG_CMD_fixed_param;
9498#define WMI_MCAST_FILTER_SET 1
9499#define WMI_MCAST_FILTER_DELETE 2
9500typedef struct {
9501 A_UINT32 tlv_header;
9502 A_UINT32 vdev_id;
9503 A_UINT32 index;
9504 A_UINT32 action;
9505 wmi_mac_addr mcastbdcastaddr;
9506} WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
9507
Himanshu Agarwalb0497b52016-05-13 21:03:37 +05309508/* WMI_DBGLOG_TIME_STAMP_SYNC_CMDID */
9509typedef enum {
9510 WMI_TIME_STAMP_SYNC_MODE_MS, /* millisecond units */
9511 WMI_TIME_STAMP_SYNC_MODE_US, /* microsecond units */
9512} WMI_TIME_STAMP_SYNC_MODE;
9513
9514typedef struct {
9515 /*
9516 * TLV tag and len; tag equals
9517 * WMITLV_TAG_STRUC_wmi_dbglog_time_stamp_sync_cmd_fixed_param
9518 */
9519 A_UINT32 tlv_header;
9520 /* 0: millisec, 1: microsec (see WMI_TIME_STAMP_SYNC_MODE) */
9521 A_UINT32 mode;
9522 A_UINT32 time_stamp_low; /* lower 32 bits of remote time stamp */
9523 A_UINT32 time_stamp_high; /* higher 32 bits of remote time stamp */
9524} WMI_DBGLOG_TIME_STAMP_SYNC_CMD_fixed_param;
9525
9526
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009527/* GPIO Command and Event data structures */
9528
9529/* WMI_GPIO_CONFIG_CMDID */
9530enum {
9531 WMI_GPIO_PULL_NONE,
9532 WMI_GPIO_PULL_UP,
9533 WMI_GPIO_PULL_DOWN,
9534};
9535
9536enum {
9537 WMI_GPIO_INTTYPE_DISABLE,
9538 WMI_GPIO_INTTYPE_RISING_EDGE,
9539 WMI_GPIO_INTTYPE_FALLING_EDGE,
9540 WMI_GPIO_INTTYPE_BOTH_EDGE,
9541 WMI_GPIO_INTTYPE_LEVEL_LOW,
9542 WMI_GPIO_INTTYPE_LEVEL_HIGH
9543};
9544
9545typedef struct {
9546 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
9547 A_UINT32 gpio_num; /* GPIO number to be setup */
9548 A_UINT32 input; /* 0 - Output/ 1 - Input */
9549 A_UINT32 pull_type; /* Pull type defined above */
9550 A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
9551} wmi_gpio_config_cmd_fixed_param;
9552
9553/* WMI_GPIO_OUTPUT_CMDID */
9554typedef struct {
9555 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
9556 A_UINT32 gpio_num; /* GPIO number to be setup */
9557 A_UINT32 set; /* Set the GPIO pin */
9558} wmi_gpio_output_cmd_fixed_param;
9559
9560/* WMI_GPIO_INPUT_EVENTID */
9561typedef struct {
9562 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
9563 A_UINT32 gpio_num; /* GPIO number which changed state */
9564} wmi_gpio_input_event_fixed_param;
9565
9566/* WMI_P2P_DISC_EVENTID */
9567enum {
9568 P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
9569 P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
9570};
9571
9572enum {
9573 P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload */
9574 P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload */
9575 P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload */
9576};
9577
9578enum {
9579 P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
9580 P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
9581};
9582
9583typedef struct {
9584 A_UINT32 vdev_id;
9585 A_UINT32 reason; /* P2P DISC wake up reason */
9586} wmi_p2p_disc_event;
9587
9588typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param
9589WOW_EVENT_INFO_SECTION_GTKIGTK;
9590
9591typedef enum {
9592 WMI_FAKE_TXBFER_SEND_NDPA,
9593 WMI_FAKE_TXBFER_SEND_MU,
9594 WMI_FAKE_TXBFER_NDPA_FBTYPE,
9595 WMI_FAKE_TXBFER_NDPA_NCIDX,
9596 WMI_FAKE_TXBFER_NDPA_POLL,
9597 WMI_FAKE_TXBFER_NDPA_BW,
9598 WMI_FAKE_TXBFER_NDPA_PREAMBLE,
9599 WMI_FAKE_TXBFER_NDPA_RATE,
9600 WMI_FAKE_TXBFER_NDP_BW,
9601 WMI_FAKE_TXBFER_NDP_NSS,
9602 WMI_TXBFEE_ENABLE_UPLOAD_H,
9603 WMI_TXBFEE_ENABLE_CAPTURE_H,
9604 WMI_TXBFEE_SET_CBF_TBL,
9605 WMI_TXBFEE_CBF_TBL_LSIG,
9606 WMI_TXBFEE_CBF_TBL_SIGA1,
9607 WMI_TXBFEE_CBF_TBL_SIGA2,
9608 WMI_TXBFEE_CBF_TBL_SIGB,
9609 WMI_TXBFEE_CBF_TBL_PAD,
9610 WMI_TXBFEE_CBF_TBL_DUR,
9611 WMI_TXBFEE_SU_NCIDX,
9612 WMI_TXBFEE_CBIDX,
9613 WMI_TXBFEE_NGIDX,
9614} WMI_TXBF_PARAM_ID;
9615
9616typedef struct {
9617 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
9618 /** parameter id */
9619 A_UINT32 param_id;
9620 /** parameter value */
9621 A_UINT32 param_value;
9622} wmi_txbf_cmd_fixed_param;
9623
9624typedef struct {
9625 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
9626 A_UINT32 h_length;
9627 A_UINT32 cv_length;
9628 /* This TLV is followed by array of bytes:
9629 * // h_cv info buffer
9630 * A_UINT8 bufp[];
9631 */
9632} wmi_upload_h_hdr;
9633
9634typedef struct {
9635 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
9636 A_UINT32 svd_num;
9637 A_UINT32 tone_num;
9638 A_UINT32 reserved;
9639} wmi_capture_h_event_hdr;
9640
9641typedef struct {
9642 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
9643 A_UINT32 start_freq; /* start frequency, not channel center freq */
9644 A_UINT32 end_freq; /* end frequency */
9645} wmi_avoid_freq_range_desc;
9646
9647typedef struct {
9648 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
9649 /* bad channel range count, multi range is allowed, 0 means all channel clear */
9650 A_UINT32 num_freq_ranges;
9651
9652 /* The TLVs will follow.
9653 * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
9654 * wmi_avoid_freq_range_desc avd_freq_range[]; // message buffer, NULL terminated
9655 */
9656} wmi_avoid_freq_ranges_event_fixed_param;
9657
9658typedef struct {
9659 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */
9660 /** Reserved for future use */
9661 A_UINT32 reserved0;
9662 A_UINT32 vdev_id;
9663} wmi_gtk_rekey_fail_event_fixed_param;
9664
9665enum wmm_ac_downgrade_policy {
9666 WMM_AC_DOWNGRADE_DEPRIO,
9667 WMM_AC_DOWNGRADE_DROP,
9668 WMM_AC_DOWNGRADE_INVALID,
9669};
9670
9671typedef struct {
9672 A_UINT32 tlv_header;
9673 A_UINT32 cwmin;
9674 A_UINT32 cwmax;
9675 A_UINT32 aifs;
9676 A_UINT32 txoplimit;
9677 A_UINT32 acm;
9678 A_UINT32 no_ack;
9679} wmi_wmm_vparams;
9680
9681typedef struct {
9682 A_UINT32 tlv_header;
9683 A_UINT32 vdev_id;
9684 wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
9685} wmi_vdev_set_wmm_params_cmd_fixed_param;
9686
9687typedef struct {
9688 A_UINT32 tlv_header;
9689 A_UINT32 vdev_id;
9690 A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */
9691 A_UINT32 userGtxMask; /* host request for GTX mask */
9692 A_UINT32 gtxPERThreshold; /* default: 10% */
9693 A_UINT32 gtxPERMargin; /* default: 2% */
9694 A_UINT32 gtxTPCstep; /* default: 1 */
9695 A_UINT32 gtxTPCMin; /* default: 5 */
9696 A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */
9697} wmi_vdev_set_gtx_params_cmd_fixed_param;
9698
9699typedef struct {
9700 A_UINT32 tlv_header;
9701 A_UINT32 vdev_id;
9702 A_UINT32 ac;
9703 A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
9704 A_UINT32 downgrade_type;
9705} wmi_vdev_wmm_addts_cmd_fixed_param;
9706
9707typedef struct {
9708 A_UINT32 tlv_header;
9709 A_UINT32 vdev_id;
9710 A_UINT32 ac;
9711} wmi_vdev_wmm_delts_cmd_fixed_param;
9712
Govind Singh869c9872016-02-22 18:36:34 +05309713/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009714typedef struct {
9715 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */
9716 /** Reserved for future use */
9717 A_UINT32 reserved0;
9718} wmi_pdev_dfs_enable_cmd_fixed_param;
9719
Govind Singh869c9872016-02-22 18:36:34 +05309720/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009721typedef struct {
9722 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_disable_cmd_fixed_param */
Govind Singh869c9872016-02-22 18:36:34 +05309723 /** pdev_id for identifying the MAC
9724 * See macros starting with WMI_PDEV_ID_ for values.
9725 */
9726 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009727} wmi_pdev_dfs_disable_cmd_fixed_param;
9728
9729typedef struct {
9730 /** TLV tag and len; tag equals
9731 * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
9732 */
9733 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05309734 /** pdev_id for identifying the MAC
9735 * See macros starting with WMI_PDEV_ID_ for values.
9736 */
9737 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009738} wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
9739
9740typedef struct {
9741 /** TLV tag and len; tag equals
9742 * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
9743 */
9744 A_UINT32 tlv_header;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05309745 /** pdev_id for identifying the MAC
9746 * See macros starting with WMI_PDEV_ID_ for values.
9747 */
9748 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009749} wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
9750
9751/** TDLS COMMANDS */
9752
9753/* WMI_TDLS_SET_STATE_CMDID */
9754/* TDLS State */
9755enum wmi_tdls_state {
9756 /** TDLS disable */
9757 WMI_TDLS_DISABLE,
9758 /** TDLS enabled - no firmware connection tracking/notifications */
9759 WMI_TDLS_ENABLE_PASSIVE,
9760 /** TDLS enabled - with firmware connection tracking/notifications */
9761 WMI_TDLS_ENABLE_ACTIVE,
9762 /* TDLS enabled - firmware waits for peer mac for connection tracking */
9763 WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +05309764 /** TDLS enabled - TDLS connection tracking is done in host */
9765 WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009766};
9767
9768/* TDLS Options */
9769#define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */
9770#define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */
9771#define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */
9772
9773typedef struct {
9774 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */
9775 A_UINT32 tlv_header;
9776 /** unique id identifying the VDEV */
9777 A_UINT32 vdev_id;
9778 /** Enable/Disable TDLS (wmi_tdls_state) */
9779 A_UINT32 state;
9780 /* Duration (in ms) over which to calculate tx/rx threshold
9781 * to trigger TDLS Discovery
9782 */
9783 A_UINT32 notification_interval_ms;
9784 /** number of packets OVER which notify/suggest TDLS Discovery:
9785 * if current tx pps counter / notification interval >= threshold
9786 * then a notification will be sent to host to advise TDLS Discovery */
9787 A_UINT32 tx_discovery_threshold;
9788 /** number of packets UNDER which notify/suggest TDLS Teardown:
9789 * if current tx pps counter / notification interval < threshold
9790 * then a notification will be sent to host to advise TDLS Tear down */
9791 A_UINT32 tx_teardown_threshold;
9792 /** Absolute RSSI value under which notify/suggest TDLS Teardown */
9793 A_INT32 rssi_teardown_threshold;
9794 /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
9795 A_INT32 rssi_delta;
9796 /** TDLS Option Control
9797 * Off-Channel, Buffer STA, (later)Sleep STA support */
9798 A_UINT32 tdls_options;
9799 /* Buffering time in number of beacon intervals */
9800 A_UINT32 tdls_peer_traffic_ind_window;
9801 /* Wait time for PTR frame */
9802 A_UINT32 tdls_peer_traffic_response_timeout_ms;
9803 /* Self PUAPSD mask */
9804 A_UINT32 tdls_puapsd_mask;
9805 /* Inactivity timeout */
9806 A_UINT32 tdls_puapsd_inactivity_time_ms;
9807 /* Max of rx frame during SP */
9808 A_UINT32 tdls_puapsd_rx_frame_threshold;
9809 /* Duration (in ms) over which to check whether TDLS link
9810 * needs to be torn down
9811 */
9812 A_UINT32 teardown_notification_ms;
9813 /* STA kickout threshold for TDLS peer */
9814 A_UINT32 tdls_peer_kickout_threshold;
9815} wmi_tdls_set_state_cmd_fixed_param;
9816
9817/* WMI_TDLS_PEER_UPDATE_CMDID */
9818
9819enum wmi_tdls_peer_state {
9820 /** tx peer TDLS link setup now starting, traffic to DA should be
9821 * paused (except TDLS frames) until state is moved to CONNECTED (or
9822 * TEARDOWN on setup failure) */
9823 WMI_TDLS_PEER_STATE_PEERING,
9824 /** tx peer TDLS link established, running (all traffic to DA unpaused) */
9825 WMI_TDLS_PEER_STATE_CONNECTED,
9826 /** tx peer TDLS link tear down started (link paused, any frames
9827 * queued for DA will be requeued back through the AP)*/
9828 WMI_TDLS_PEER_STATE_TEARDOWN,
9829 /* Add peer mac into connection table */
9830 WMI_TDLS_PEER_ADD_MAC_ADDR,
9831 /* Remove peer mac from connection table */
9832 WMI_TDLS_PEER_REMOVE_MAC_ADDR,
9833};
9834
9835/* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
9836#define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
9837typedef struct {
9838 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */
9839 A_UINT32 tlv_header;
9840 /* Peer's QoS Info - for U-APSD */
9841 /* AC FLAGS - accessed through macros below */
9842 /* Ack, SP, More Data Ack - accessed through macros below */
9843 A_UINT32 peer_qos;
9844 /*TDLS Peer's U-APSD Buffer STA Support */
9845 A_UINT32 buff_sta_support;
9846 /*TDLS off channel related params */
9847 A_UINT32 off_chan_support;
9848 A_UINT32 peer_curr_operclass;
9849 A_UINT32 self_curr_operclass;
9850 /* Number of channels available for off channel operation */
9851 A_UINT32 peer_chan_len;
9852 A_UINT32 peer_operclass_len;
9853 A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
9854 /* Is peer initiator or responder of TDLS setup request */
9855 A_UINT32 is_peer_responder;
9856 /* Preferred off channel number as configured by user */
9857 A_UINT32 pref_offchan_num;
9858 /* Preferred off channel bandwidth as configured by user */
9859 A_UINT32 pref_offchan_bw;
9860
9861 /** Followed by the variable length TLV peer_chan_list:
9862 * wmi_channel peer_chan_list[].
9863 * Array size would be peer_chan_len.
9864 * This array is intersected channels which is supported by both peer
9865 * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
9866 * FW shall compute BW for an offchan based on peer's ht/vht cap
9867 * received in peer_assoc cmd during change STA operation
9868 */
9869} wmi_tdls_peer_capabilities;
9870
9871#define WMI_TDLS_QOS_VO_FLAG 0
9872#define WMI_TDLS_QOS_VI_FLAG 1
9873#define WMI_TDLS_QOS_BK_FLAG 2
9874#define WMI_TDLS_QOS_BE_FLAG 3
9875#define WMI_TDLS_QOS_ACK_FLAG 4
9876#define WMI_TDLS_QOS_SP_FLAG 5
9877#define WMI_TDLS_QOS_MOREDATA_FLAG 7
9878
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309879#define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009880 (ppeer_caps)->peer_qos |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309881} while (0)
9882#define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009883 (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
9884
9885#define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
9886 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
9887#define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
9888 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
9889#define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
9890 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
9891#define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
9892 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
9893#define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
9894 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
9895#define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
9896 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
9897#define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
9898 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
9899#define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
9900 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
9901#define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
9902 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
9903#define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
9904 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
9905/* SP has 2 bits */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309906#define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009907 (ppeer_caps)->peer_qos |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309908} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009909#define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
9910 (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
9911
9912#define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
9913 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
9914#define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
9915 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
9916
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309917#define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009918 (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309919} while (0)
9920#define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009921 (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
9922
9923#define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
9924 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
9925#define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
9926 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
9927#define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
9928 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
9929#define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
9930 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
9931#define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
9932 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
9933#define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
9934 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
9935#define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
9936 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
9937#define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
9938 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
9939#define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
9940 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
9941#define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
9942 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
9943/* SP has 2 bits */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309944#define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009945 (pset_cmd)->tdls_puapsd_mask |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309946} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009947#define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
9948 (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
9949
9950#define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
9951 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
9952#define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
9953 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
9954
9955typedef struct {
9956 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */
9957 A_UINT32 tlv_header;
9958 /** unique id identifying the VDEV */
9959 A_UINT32 vdev_id;
9960 /** peer MAC address */
9961 wmi_mac_addr peer_macaddr;
9962 /** new TDLS state for peer (wmi_tdls_peer_state) */
9963 A_UINT32 peer_state;
9964 /* The TLV for wmi_tdls_peer_capabilities will follow.
9965 * wmi_tdls_peer_capabilities peer_caps;
9966 */
9967 /** Followed by the variable length TLV chan_info:
9968 * wmi_channel chan_info[] */
9969} wmi_tdls_peer_update_cmd_fixed_param;
9970
9971/* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
9972
9973/* bitmap 20, 40, 80 or 160 MHz wide channel */
9974#define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */
9975#define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */
9976#define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */
9977#define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */
9978
9979enum wmi_tdls_offchan_mode {
9980 WMI_TDLS_ENABLE_OFFCHANNEL,
9981 WMI_TDLS_DISABLE_OFFCHANNEL
9982};
9983
9984typedef struct {
9985 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */
9986 A_UINT32 tlv_header;
9987 /** unique id identifying the VDEV */
9988 A_UINT32 vdev_id;
9989 /** Enable/Disable TDLS offchannel */
9990 A_UINT32 offchan_mode;
9991 /** peer MAC address */
9992 wmi_mac_addr peer_macaddr;
9993 /* Is peer initiator or responder of TDLS setup request */
9994 A_UINT32 is_peer_responder;
9995 /* off channel number */
9996 A_UINT32 offchan_num;
9997 /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
9998 A_UINT32 offchan_bw_bitmap;
9999 /* operating class for offchan */
10000 A_UINT32 offchan_oper_class;
10001} wmi_tdls_set_offchan_mode_cmd_fixed_param;
10002
10003/** TDLS EVENTS */
10004enum wmi_tdls_peer_notification {
10005 /** tdls discovery recommended for peer (based
10006 * on tx bytes per second > tx_discover threshold) */
10007 WMI_TDLS_SHOULD_DISCOVER,
10008 /** tdls link tear down recommended for peer
10009 * due to tx bytes per second below tx_teardown_threshold
10010 * NB: this notification sent once */
10011 WMI_TDLS_SHOULD_TEARDOWN,
10012 /** tx peer TDLS link tear down complete */
10013 WMI_TDLS_PEER_DISCONNECTED,
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +053010014 /** TDLS/BT role change notification for connection tracker */
10015 WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010016};
10017
10018enum wmi_tdls_peer_reason {
10019 /** tdls teardown recommended due to low transmits */
10020 WMI_TDLS_TEARDOWN_REASON_TX,
10021 /** tdls link tear down recommended due to poor RSSI */
10022 WMI_TDLS_TEARDOWN_REASON_RSSI,
10023 /** tdls link tear down recommended due to offchannel scan */
10024 WMI_TDLS_TEARDOWN_REASON_SCAN,
10025 /** tdls peer disconnected due to peer deletion */
10026 WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
10027 /** tdls peer disconnected due to PTR timeout */
10028 WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
10029 /** tdls peer disconnected due wrong PTR format */
10030 WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
10031 /** tdls peer not responding */
10032 WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +053010033 /*
10034 * tdls entered buffer STA role, TDLS connection tracker
10035 * needs to handle this
10036 */
10037 WMI_TDLS_ENTER_BUF_STA,
10038 /*
10039 * tdls exited buffer STA role, TDLS connection tracker
10040 * needs to handle this
10041 */
10042 WMI_TDLS_EXIT_BUF_STA,
10043 /* BT entered busy mode, TDLS connection tracker needs to handle this */
10044 WMI_TDLS_ENTER_BT_BUSY_MODE,
10045 /** BT exited busy mode, TDLS connection tracker needs to handle this */
10046 WMI_TDLS_EXIT_BT_BUSY_MODE,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010047};
10048
10049/* WMI_TDLS_PEER_EVENTID */
10050typedef struct {
10051 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */
10052 A_UINT32 tlv_header;
10053 /** peer MAC address */
10054 wmi_mac_addr peer_macaddr;
10055 /** TDLS peer status (wmi_tdls_peer_notification)*/
10056 A_UINT32 peer_status;
10057 /** TDLS peer reason (wmi_tdls_peer_reason) */
10058 A_UINT32 peer_reason;
10059 /** unique id identifying the VDEV */
10060 A_UINT32 vdev_id;
10061} wmi_tdls_peer_event_fixed_param;
10062
10063/* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
10064 don't use this for any new implementations */
10065typedef struct {
10066 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */
10067 /** unique id identifying the VDEV, generated by the caller */
10068 A_UINT32 vdev_id;
10069 /* New beacon interval to be used for the specified VDEV suggested by firmware */
10070 A_UINT32 new_bcn_intvl;
10071} wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
10072
10073/* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
10074typedef struct {
10075 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
10076 A_UINT32 tlv_header;
10077 /** 1: enable fw based adaptive ocs,
10078 * 0: disable fw based adaptive ocs
10079 */
10080 A_UINT32 enable;
10081 /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
Govind Singh869c9872016-02-22 18:36:34 +053010082 union {
10083 /* OBSOLETE - will be removed once all refs are gone */
10084 A_UINT32 mac_id;
10085 /** pdev_id for identifying the MAC
10086 * See macros starting with WMI_PDEV_ID_ for values.
10087 */
10088 A_UINT32 pdev_id;
10089 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010090} wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
10091
10092/* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
10093typedef struct {
10094 /* Frequency of the channel for which the quota is set */
10095 A_UINT32 chan_mhz;
10096 /* Requested channel time quota expressed as percentage */
10097 A_UINT32 channel_time_quota;
10098} wmi_resmgr_chan_time_quota;
10099
10100typedef struct {
10101 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
10102 A_UINT32 tlv_header;
10103 /** number of channel time quota command structures
10104 * (wmi_resmgr_chan_time_quota) 1 or 2
10105 */
10106 A_UINT32 num_chans;
10107/* This TLV is followed by another TLV of array of bytes
10108 * A_UINT8 data[];
10109 * This data array contains
10110 * num_chans * size of(struct wmi_resmgr_chan_time_quota)
10111 */
10112} wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
10113
10114/* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
10115typedef struct {
10116 /* Frequency of the channel for which the latency is set */
10117 A_UINT32 chan_mhz;
10118 /* Requested channel latency in milliseconds */
10119 A_UINT32 latency;
10120} wmi_resmgr_chan_latency;
10121
10122typedef struct {
10123 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
10124 A_UINT32 tlv_header;
10125 /** number of channel latency command structures
10126 * (wmi_resmgr_chan_latency) 1 or 2
10127 */
10128 A_UINT32 num_chans;
10129/* This TLV is followed by another TLV of array of bytes
10130 * A_UINT8 data[];
10131 * This data array contains
10132 * num_chans * size of(struct wmi_resmgr_chan_latency)
10133 */
10134} wmi_resmgr_set_chan_latency_cmd_fixed_param;
10135
10136/* WMI_STA_SMPS_FORCE_MODE_CMDID */
10137
10138/** STA SMPS Forced Mode */
10139typedef enum {
10140 WMI_SMPS_FORCED_MODE_NONE = 0,
10141 WMI_SMPS_FORCED_MODE_DISABLED,
10142 WMI_SMPS_FORCED_MODE_STATIC,
10143 WMI_SMPS_FORCED_MODE_DYNAMIC
10144} wmi_sta_smps_forced_mode;
10145
10146typedef struct {
10147 /** TLV tag and len; tag equals
10148 * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
10149 A_UINT32 tlv_header;
10150 /** Unique id identifying the VDEV */
10151 A_UINT32 vdev_id;
10152 /** The mode of SMPS that is to be forced in the FW. */
10153 A_UINT32 forced_mode;
10154} wmi_sta_smps_force_mode_cmd_fixed_param;
10155
10156/** wlan HB commands */
10157#define WMI_WLAN_HB_ITEM_UDP 0x1
10158#define WMI_WLAN_HB_ITEM_TCP 0x2
10159#define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE, must be a multiple of 4 bytes */
10160
10161typedef struct {
10162 /** TLV tag and len; tag equals
10163 * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
10164 A_UINT32 tlv_header;
10165 A_UINT32 vdev_id;
10166 A_UINT32 enable;
10167 A_UINT32 item;
10168 A_UINT32 session;
10169} wmi_hb_set_enable_cmd_fixed_param;
10170
10171typedef struct {
10172 /** TLV tag and len; tag equals
10173 * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
10174 A_UINT32 tlv_header;
10175 A_UINT32 vdev_id;
10176 A_UINT32 srv_ip;
10177 A_UINT32 dev_ip;
10178 A_UINT32 seq;
10179 A_UINT32 src_port;
10180 A_UINT32 dst_port;
10181 A_UINT32 interval;
10182 A_UINT32 timeout;
10183 A_UINT32 session;
10184 wmi_mac_addr gateway_mac;
10185} wmi_hb_set_tcp_params_cmd_fixed_param;
10186
10187typedef struct {
10188 /** TLV tag and len; tag equals
10189 * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
10190 A_UINT32 tlv_header;
10191 A_UINT32 vdev_id;
10192 A_UINT32 length;
10193 A_UINT32 offset;
10194 A_UINT32 session;
10195 A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
10196} wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
10197
10198typedef struct {
10199 /** TLV tag and len; tag equals
10200 * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
10201 A_UINT32 tlv_header;
10202 A_UINT32 vdev_id;
10203 A_UINT32 srv_ip;
10204 A_UINT32 dev_ip;
10205 A_UINT32 src_port;
10206 A_UINT32 dst_port;
10207 A_UINT32 interval;
10208 A_UINT32 timeout;
10209 A_UINT32 session;
10210 wmi_mac_addr gateway_mac;
10211} wmi_hb_set_udp_params_cmd_fixed_param;
10212
10213typedef struct {
10214 /** TLV tag and len; tag equals
10215 * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
10216 A_UINT32 tlv_header;
10217 A_UINT32 vdev_id;
10218 A_UINT32 length;
10219 A_UINT32 offset;
10220 A_UINT32 session;
10221 A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
10222} wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
10223
10224/** wlan HB events */
10225typedef enum {
10226 WMI_WLAN_HB_REASON_UNKNOWN = 0,
10227 WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1,
10228 WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2,
10229} WMI_HB_WAKEUP_REASON;
10230
10231typedef struct {
10232 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
10233 A_UINT32 vdev_id; /* unique id identifying the VDEV */
10234 A_UINT32 session; /* Session ID from driver */
10235 A_UINT32 reason; /* wakeup reason */
10236} wmi_hb_ind_event_fixed_param;
10237
10238/** WMI_STA_SMPS_PARAM_CMDID */
10239typedef enum {
10240 /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
10241 WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
10242 /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
10243 * to enter D-SMPS mode from Stalled-D-SMPS mode */
10244 WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
10245 /** RSSI threshold to disable SMPS modes */
10246 WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
10247 /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
10248 WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
10249 /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
10250 WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
10251 /** Enable/Disable DTIM 1chRx feature */
10252 WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5
10253} wmi_sta_smps_param;
10254
10255typedef struct {
10256 /** TLV tag and len; tag equals
10257 * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
10258 A_UINT32 tlv_header;
10259 /** Unique id identifying the VDEV */
10260 A_UINT32 vdev_id;
10261 /** SMPS parameter (see wmi_sta_smps_param) */
10262 A_UINT32 param;
10263 /** Value of SMPS parameter */
10264 A_UINT32 value;
10265} wmi_sta_smps_param_cmd_fixed_param;
10266
10267typedef struct {
10268 /** TLV tag and len; tag equals
10269 * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
10270 A_UINT32 tlv_header;
10271 /* TX stats */
10272 A_UINT32 txBytesPushed;
10273 A_UINT32 txPacketsPushed;
10274 /* RX stats */
10275 A_UINT32 rxBytesRcvd;
10276 A_UINT32 rxPacketsRcvd;
10277 A_UINT32 rxTimeTotal;
10278 /** peer MAC address */
10279 wmi_mac_addr peer_macaddr;
10280} wmi_mcc_sched_sta_traffic_stats;
10281
10282typedef struct {
10283 /** TLV tag and len; tag equals
10284 * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
10285 A_UINT32 tlv_header;
10286 /** Duration over which the host stats were collected */
10287 A_UINT32 duration;
10288 /** Number of stations filled in following stats array */
10289 A_UINT32 num_sta;
10290 /* Following this struct are the TLVs:
10291 * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
10292 */
10293} wmi_mcc_sched_traffic_stats_cmd_fixed_param;
10294
10295typedef struct {
10296 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
10297 /* unique id identifying the VDEV, generated by the caller */
10298 A_UINT32 vdev_id;
10299 /*Batch scan enable command parameters */
10300 A_UINT32 scanInterval;
10301 A_UINT32 numScan2Batch;
10302 A_UINT32 bestNetworks;
10303 A_UINT32 rfBand;
10304 A_UINT32 rtt;
10305} wmi_batch_scan_enable_cmd_fixed_param;
10306
10307typedef struct {
10308 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */
10309 A_UINT32 supportedMscan;
10310} wmi_batch_scan_enabled_event_fixed_param;
10311
10312typedef struct {
10313 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
10314/* unique id identifying the VDEV, generated by the caller */
10315 A_UINT32 vdev_id;
10316 A_UINT32 param;
10317} wmi_batch_scan_disable_cmd_fixed_param;
10318
10319typedef struct {
10320 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
10321 /** unique id identifying the VDEV, generated by the caller */
10322 A_UINT32 vdev_id;
10323 A_UINT32 param;
10324} wmi_batch_scan_trigger_result_cmd_fixed_param;
10325
10326typedef struct {
10327 A_UINT32 tlv_header;
10328 wmi_mac_addr bssid; /* BSSID */
10329 wmi_ssid ssid; /* SSID */
10330 A_UINT32 ch; /* Channel */
10331 A_UINT32 rssi; /* RSSI or Level */
10332 /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
10333 A_UINT32 timestamp;
10334} wmi_batch_scan_result_network_info;
10335
10336typedef struct {
10337 A_UINT32 tlv_header;
10338 A_UINT32 scanId; /* Scan List ID. */
10339 /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
10340 A_UINT32 numNetworksInScanList;
10341 A_UINT32 netWorkStartIndex; /* indicate the start index of network info */
10342} wmi_batch_scan_result_scan_list;
10343
10344#define LPI_IE_BITMAP_BSSID 0x00000001 /* if this bit is set, bssid of the scan response frame is sent as the first IE in the data buffer sent to LOWI LP.*/
10345#define LPI_IE_BITMAP_IS_PROBE 0x00000002 /*send true or false based on scan response frame being a Probe Rsp or not*/
10346#define LPI_IE_BITMAP_SSID 0x00000004 /*send ssid from received scan response frame*/
10347#define LPI_IE_BITMAP_RSSI 0x00000008 /* end RSSI value reported by HW for the received scan response after adjusting with noise floor*/
10348#define LPI_IE_BITMAP_CHAN 0x00000010 /*send channel number from the received scan response*/
10349#define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* sen Tx power from TPC IE of scan rsp*/
10350#define LPI_IE_BITMAP_TX_RATE 0x00000040 /*send rate of the received frame as reported by HW.*/
10351#define LPI_IE_BITMAP_80211_MC_SUPPORT 0x00000080 /*send true or false based on the received scan rsp was from a 11mc supported AP or not.*/
10352#define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /*send timestamp reported in the received scan rsp frame.*/
10353#define LPI_IE_BITMAP_AGE_OF_MEASUREMENT 0x00000200 /* current system time - received time) = duration of time scan rsp frame data is kept in the buffer before sending to LOWI LP.*/
10354/*
10355 * TEMPORARY alias of incorrect old name the correct name.
10356 * This alias will be removed once all references to the old name have been fixed.
10357 */
10358#define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
10359#define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false.*/
10360#define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP*/
10361#define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled*/
10362#define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device.*/
10363#define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel*/
10364#define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received.*/
10365#define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz*/
10366#define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above*/
10367#define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations*/
10368#define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan*/
10369#define LPI_IE_BITMAP_SCAN_ID 0x00100000 /*extscan inserts the scan cycle count for this value; other scan clients can insert the scan id of the scan, if needed.*/
10370#define LPI_IE_BITMAP_FLAGS 0x00200000 /* reserved as a bitmap to indicate more scan information; one such use being to indicate if the on-going scan is interrupted or not*/
10371#define LPI_IE_BITMAP_CACHING_REQD 0x00400000 /*extscan will use this field to indicate if this frame info needs to be cached in LOWI LP or not*/
Govind Singhfad2f212016-01-21 10:55:51 +053010372/*
10373 * extscan will use this field to indicate to
10374 * LOWI LP whether to report result to context hub or not
10375 */
10376#define LPI_IE_BITMAP_REPORT_CONTEXT_HUB 0x00800000
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010377#define LPI_IE_BITMAP_ALL 0xFFFFFFFF
10378
10379typedef struct {
10380 A_UINT32 tlv_header;
10381 /**A_BOOL indicates LPI mgmt snooping enable/disable*/
10382 A_UINT32 enable;
10383 /**LPI snooping mode*/
10384 A_UINT32 snooping_mode;
10385 /** LPI interested IEs in snooping context */
10386 A_UINT32 ie_bitmap;
10387} wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
10388
10389typedef struct {
10390 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
10391 /** Scan ID */
10392 A_UINT32 scan_id;
10393 /** Scan requestor ID */
10394 A_UINT32 scan_req_id;
10395 /** VDEV id(interface) that is requesting scan */
10396 A_UINT32 vdev_id;
10397 /** LPI interested IEs in scan context */
10398 A_UINT32 ie_bitmap;
10399 /** Scan Priority, input to scan scheduler */
10400 A_UINT32 scan_priority;
10401 /** dwell time in msec on active channels */
10402 A_UINT32 dwell_time_active;
10403 /** dwell time in msec on passive channels */
10404 A_UINT32 dwell_time_passive;
10405 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
10406 A_UINT32 min_rest_time;
10407 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
10408 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
10409 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
10410 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
10411 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
10412 * irrespective of activity. activity is determined by the idle_time parameter.
10413 */
10414 A_UINT32 max_rest_time;
10415 /** time before sending next set of probe requests.
10416 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
10417 * The number of probe requests specified depends on the ssid_list and bssid_list
10418 */
10419 A_UINT32 repeat_probe_time;
10420 /** time in msec between 2 consequetive probe requests with in a set. */
10421 A_UINT32 probe_spacing_time;
10422 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
10423 A_UINT32 idle_time;
10424 /** maximum time in msec allowed for scan */
10425 A_UINT32 max_scan_time;
10426 /** delay in msec before sending first probe request after switching to a channel */
10427 A_UINT32 probe_delay;
10428 /** Scan control flags */
10429 A_UINT32 scan_ctrl_flags;
10430 /** Burst duration time in msec*/
10431 A_UINT32 burst_duration;
10432
10433 /** # if channels to scan. In the TLV channel_list[] */
10434 A_UINT32 num_chan;
10435 /** number of bssids. In the TLV bssid_list[] */
10436 A_UINT32 num_bssid;
10437 /** number of ssid. In the TLV ssid_list[] */
10438 A_UINT32 num_ssids;
10439 /** number of bytes in ie data. In the TLV ie_data[] */
10440 A_UINT32 ie_len;
10441
10442/**
10443 * TLV (tag length value ) parameters follow the scan_cmd
10444 * structure. The TLV's are:
10445 * A_UINT32 channel_list[];
10446 * wmi_ssid ssid_list[];
10447 * wmi_mac_addr bssid_list[];
10448 * A_UINT8 ie_data[];
10449 */
10450} wmi_lpi_start_scan_cmd_fixed_param;
10451
10452typedef struct {
10453 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
10454 /** Scan requestor ID */
10455 A_UINT32 scan_req_id;
10456 /** Scan ID */
10457 A_UINT32 scan_id;
10458 /**
10459 * Req Type
10460 * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
10461 * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
10462 * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
10463 * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
10464 */
10465 A_UINT32 req_type;
10466 /**
10467 * vDev ID
10468 * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
10469 */
10470 A_UINT32 vdev_id;
10471} wmi_lpi_stop_scan_cmd_fixed_param;
10472
10473typedef enum {
10474 WMI_LPI_DEVICE_TYPE_AP = 1,
10475 WMI_LPI_DEVICE_TYPE_P2P = 2,
10476 WMI_LPI_DEVICE_TYPE_NAN = 3,
10477} wmi_lpi_device_type;
10478
10479typedef struct {
10480 A_UINT32 tlv_header;
10481 /** Scan requestor ID */
10482 A_UINT32 scan_req_id;
10483 A_UINT32 ie_bitmap;
10484 A_UINT32 data_len;
10485} wmi_lpi_result_event_fixed_param;
10486
10487typedef enum {
10488 /** User scan Request completed */
10489 WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
10490 /** User Request was never serviced */
10491 WMI_LPI_STATUS_DROPPED_REQ = 1,
10492 /** Illegal channel Req */
10493 WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
10494 /** Illegal Operation Req */
10495 WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
10496 /** Request Aborted */
10497 WMI_LPI_STATUS_REQ_ABORTED = 4,
10498 /** Request Timed Out */
10499 WMI_LPI_STATUS_REQ_TIME_OUT = 5,
10500 /** Medium Busy, already there
10501 * is a scan is going on */
10502 WMI_LPI_STATUS_MEDIUM_BUSY = 6,
10503 /* Extscan is the scan client whose scan complete event is triggered */
10504 WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
10505} wmi_lpi_staus;
10506
10507typedef struct {
10508 A_UINT32 tlv_header;
10509 wmi_lpi_staus status;
10510 /** Scan requestor ID */
10511 A_UINT32 scan_req_id;
10512} wmi_lpi_status_event_fixed_param;
10513
10514typedef struct {
10515 A_UINT32 tlv_header;
10516 wmi_mac_addr bssid;
10517 wmi_ssid ssid;
10518 A_UINT32 freq;
10519 A_UINT32 rssi;
10520 A_UINT32 vdev_id;
10521} wmi_lpi_handoff_event_fixed_param;
10522
10523typedef struct {
10524 A_UINT32 tlv_header;
10525 A_UINT32 timestamp; /*timestamp of batch scan event */
10526 A_UINT32 numScanLists; /*number of scan in this event */
10527 A_UINT32 isLastResult; /*is this event a last event of the whole batch scan */
10528} wmi_batch_scan_result_event_fixed_param;
10529
10530typedef struct {
10531 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */
10532 A_UINT32 vdev_id;
10533 /* This TLV is followed by p2p_noa_info for vdev :
10534 * wmi_p2p_noa_info p2p_noa_info;
10535 */
10536} wmi_p2p_noa_event_fixed_param;
10537
10538#define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6
10539#define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1
10540
10541#define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0
10542#define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f
10543
10544#define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7
10545#define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf
10546
10547typedef struct {
10548 /** TLV tag and len; tag equals
10549 * */
10550 A_UINT32 tlv_header;
10551 /** gpip pin number */
10552 A_UINT32 gpio_pin_num;
10553 /** gpio interupt type */
10554 A_UINT32 int_type;
10555 /** RF radio status */
10556 A_UINT32 radio_state;
10557} wmi_rfkill_mode_param;
10558
10559typedef enum {
10560 WMI_SET_LED_SYS_POWEROFF,
10561 WMI_SET_LED_SYS_S3_SUSPEND,
10562 WMI_SET_LED_SYS_S4_S5,
10563 WMI_SET_LED_SYS_DRIVER_DISABLE,
10564 WMI_SET_LED_SYS_WAKEUP,
10565 WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
10566 WMI_SET_LED_SYS_POWERON,
10567} wmi_led_sys_state_param;
10568
10569typedef enum {
10570 WMI_CONFIG_LED_TO_VDD = 0,
10571 WMI_CONFIG_LED_TO_GND = 1,
10572} wmi_config_led_connect_type;
10573
10574typedef enum {
10575 WMI_CONFIG_LED_NOT_WITH_BT = 0,
10576 WMI_CONFIG_LED_WITH_BT = 1,
10577} wmi_config_led_with_bt_flag;
10578
10579typedef enum {
10580 WMI_CONFIG_LED_DISABLE = 0,
10581 WMI_CONFIG_LED_ENABLE = 1,
10582} wmi_config_led_enable_flag;
10583
Sreelakshmi Konamkif9bde842016-03-03 19:03:02 +053010584typedef enum {
10585 WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0,
10586 WMI_CONFIG_LED_HIGH_OFF = 1,
10587 WMI_CONFIG_LED_HIGH_ON = 2,
10588} wmi_config_led_on_flag;
10589
10590typedef enum {
10591 WMI_CONFIG_LED_UNSPECIFIED = 0,
10592 WMI_CONFIG_LED_ON = 1,
10593 WMI_CONFIG_LED_OFF = 2,
10594 WMI_CONFIG_LED_DIM = 3,
10595 WMI_CONFIG_LED_BLINK = 4,
10596 WMI_CONFIG_LED_TXRX = 5,
10597} wmi_config_led_operation_type;
10598
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010599typedef struct {
10600 /** TLV tag and len; tag equals
Govind Singh869c9872016-02-22 18:36:34 +053010601 * WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010602 A_UINT32 tlv_header;
10603 /* Set GPIO pin */
10604 A_UINT32 led_gpio_pin;
10605 /* Set connect type defined in wmi_config_led_connect_type */
10606 A_UINT32 connect_type;
10607 /* Set flag defined in wmi_config_led_with_bt_flag */
10608 A_UINT32 with_bt;
10609 /* Set LED enablement defined in wmi_config_led_enable_flag */
10610 A_UINT32 led_enable;
Govind Singh869c9872016-02-22 18:36:34 +053010611 /** pdev_id for identifying the MAC
10612 * See macros starting with WMI_PDEV_ID_ for values.
10613 */
10614 A_UINT32 pdev_id;
Sreelakshmi Konamkif9bde842016-03-03 19:03:02 +053010615 /* see wmi_config_led_operation_type enum */
10616 A_UINT32 led_operation_type;
10617 /* see wmi_config_led_on_flag enum */
10618 A_UINT32 led_on_flag; /* configure high/low on/off sense */
10619 A_UINT32 led_on_interval; /* for blink function; unit: ms */
10620 A_UINT32 led_off_interval; /* for blink function; unit: ms */
10621 A_UINT32 led_repeat_cnt; /* for blink function: how many blinks */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010622} wmi_pdev_set_led_config_cmd_fixed_param;
10623
10624#define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
10625#define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff
10626
10627/** WMI_PEER_INFO_REQ_CMDID
10628 * Request FW to provide peer info */
10629typedef struct {
10630 /** TLV tag and len; tag equals
10631 * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
10632 A_UINT32 tlv_header;
10633 /** In order to get the peer info for a single peer, host shall
10634 * issue the peer_mac_address of that peer. For getting the
10635 * info all peers, the host shall issue 0xFFFFFFFF as the mac
10636 * address. The firmware will return the peer info for all the
10637 * peers on the specified vdev_id */
10638 wmi_mac_addr peer_mac_address;
10639 /** vdev id */
10640 A_UINT32 vdev_id;
10641} wmi_peer_info_req_cmd_fixed_param;
10642
10643typedef struct {
10644 /** TLV tag and len; tag equals
10645 * WMITLV_TAG_STRUC_wmi_peer_info */
10646 A_UINT32 tlv_header;
10647 /** mac addr of the peer */
10648 wmi_mac_addr peer_mac_address;
10649 /** data_rate of the peer */
10650 A_UINT32 data_rate;
10651 /** rssi of the peer */
10652 A_UINT32 rssi;
10653 /** tx fail count */
10654 A_UINT32 tx_fail_cnt;
10655} wmi_peer_info;
10656
10657/** FW response with the peer info */
10658typedef struct {
10659 /** TLV tag and len; tag equals
10660 * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */
10661 A_UINT32 tlv_header;
10662 /** number of peers in peer_info */
10663 A_UINT32 num_peers;
Govind Singh869c9872016-02-22 18:36:34 +053010664 /* Set to 1 only if vdev_id field is valid */
10665 A_UINT32 valid_vdev_id;
10666 /* VDEV to which the peer belongs to */
10667 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010668 /* This TLV is followed by another TLV of array of structs
10669 * wmi_peer_info peer_info[];
10670 */
10671} wmi_peer_info_event_fixed_param;
10672
10673/** FW response when tx failure count has reached threshold
10674 * for a peer */
10675typedef struct {
10676 /** TLV tag and len; tag equals
10677 * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
10678 A_UINT32 tlv_header;
10679 /** vdev id*/
10680 A_UINT32 vdev_id;
10681 /** mac address */
10682 wmi_mac_addr peer_mac_address;
10683 /** tx failure count- will eventually be removed and not used * */
10684 A_UINT32 tx_fail_cnt;
10685 /** seq number of the nth tx_fail_event */
10686 A_UINT32 seq_no;
10687} wmi_peer_tx_fail_cnt_thr_event_fixed_param;
10688
10689enum wmi_rmc_mode {
10690 /** Disable RMC */
10691 WMI_RMC_MODE_DISABLED = 0,
10692 /** Enable RMC */
10693 WMI_RMC_MODE_ENABLED = 1,
10694};
10695
10696/** Enable RMC transmitter functionality. Upon
10697 * receiving this, the FW shall mutlicast frames with
10698 * reliablity. This is a vendor
10699 * proprietary feature. */
10700typedef struct {
10701 /** TLV tag and len; tag equals
10702 * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */
10703 A_UINT32 tlv_header;
10704 /** vdev id*/
10705 A_UINT32 vdev_id;
10706 /** enable_rmc contains values from enum wmi_rmc_mode;
10707 * Default value: 0 (disabled) */
10708 A_UINT32 enable_rmc;
10709} wmi_rmc_set_mode_cmd_fixed_param;
10710
10711/** Configure transmission periodicity of action frames in a
10712 * RMC network for the multicast transmitter */
10713typedef struct {
10714 /** TLV tag and len; tag equals
10715 * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
10716 A_UINT32 tlv_header;
10717 /** vdev id */
10718 A_UINT32 vdev_id;
10719 /** time period in milliseconds. Default: 300 ms.
10720 An action frame indicating the current leader is transmitted by the
10721 RMC transmitter once every 'periodity_msec' */
10722 A_UINT32 periodicity_msec;
10723} wmi_rmc_set_action_period_cmd_fixed_param;
10724
10725/** Optimise Leader selection process in RMC functionality. For
10726 * Enhancement/Debug purposes only */
10727typedef struct {
10728 /** TLV tag and len; tag equals
10729 * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */
10730 A_UINT32 tlv_header;
10731 /** vdev id */
10732 A_UINT32 vdev_id;
10733 /** flags ::
10734 * 0x0001 - Enable beacon averaging
10735 * 0x0002 - Force leader selection
10736 * 0x0004 - Enable Timer based leader switch
10737 * 0x0008 - Use qos/NULL based for multicast reliability */
10738 A_UINT32 flags;
10739 /** control leader change timeperiod (in seconds) */
10740 A_UINT32 peridocity_leader_switch;
10741 /** control activity timeout value for data rx (in seconds) */
10742 A_UINT32 data_activity_timeout;
10743 /** mac address of leader */
10744 wmi_mac_addr forced_leader_mac_addr;
10745} wmi_rmc_config_cmd_fixed_param;
10746
10747/** MHF is generally implemented in
10748 * the kernel. To decrease system power consumption, the
10749 * driver can enable offloading this to the chipset. In
10750 * order for the offload, the firmware needs the routing table.
10751 * The host shall plumb the routing table into FW. The firmware
10752 * shall perform an IP address lookup and forward the packet to
10753 * the next hop using next hop's mac address. This is a vendor
10754 * proprietary feature. */
10755enum wmi_mhf_ofl_mode {
10756 /** Disable MHF offload */
10757 WMI_MHF_OFL_MODE_DISABLED = 0,
10758 /** Enable MHF offload */
10759 WMI_MHF_OFL_MODE_ENABLED = 1,
10760};
10761
10762typedef struct {
10763 /** TLV tag and len; tag equals
10764 * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
10765 A_UINT32 tlv_header;
10766 /** vdev id*/
10767 A_UINT32 vdev_id;
10768 /** enable_mhf_ofl contains values from enum
10769 * wmi_mhf_ofl_mode; Default value: 0 (disabled) */
10770 A_UINT32 enable_mhf_ofl;
10771} wmi_mhf_offload_set_mode_cmd_fixed_param;
10772
10773enum wmi_mhf_ofl_table_action {
10774 /** Create forwarding offload table in FW */
10775 WMI_MHF_OFL_TBL_CREATE = 0,
10776 /** Append to existing MHF offload table */
10777 WMI_MHF_OFL_TBL_APPEND = 1,
10778 /** Flush entire MHF offload table in FW */
10779 WMI_MHF_OFL_TBL_FLUSH = 2,
10780};
10781
10782typedef struct {
10783 /** TLV tag and len; tag equals
10784 * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
10785 A_UINT32 tlv_header;
10786 /** vdev id*/
10787 A_UINT32 vdev_id;
10788 /** action corresponds to values from enum
10789 * wmi_mhf_ofl_table_action */
10790 A_UINT32 action;
10791 /** number of entries in the table */
10792 A_UINT32 num_entries;
10793/** Followed by the variable length TLV
10794 * wmi_mhf_offload_routing_table_entry entries[] */
10795} wmi_mhf_offload_plumb_routing_table_cmd;
10796
10797typedef struct {
10798 /** TLV tag and len; tag equals
10799 * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
10800 A_UINT32 tlv_header;
10801 /** Destination node's IP address */
10802 WMI_IPV4_ADDR dest_ipv4_addr;
10803 /** Next hop node's MAC address */
10804 wmi_mac_addr next_hop_mac_addr;
10805} wmi_mhf_offload_routing_table_entry;
10806
10807typedef struct {
10808 /** tlv tag and len, tag equals
10809 * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
10810 A_UINT32 tlv_header;
10811
10812 /** full 64 tsf timestamp get from MAC tsf timer indicates
10813 * the time that the radar event uploading to host, split
10814 * it to high 32 bit and lower 32 bit in fulltsf_high and
10815 * full_tsf_low
10816 */
10817 A_UINT32 upload_fullts_low;
10818 A_UINT32 upload_fullts_high;
10819
10820 /** timestamp indicates the time when DFS pulse is detected
10821 * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
10822 */
10823 A_UINT32 pulse_detect_ts;
10824
10825 /** the duaration of the pulse in us */
10826 A_UINT32 pulse_duration;
10827
10828 /** the center frequency of the radar pulse detected, KHz */
10829 A_UINT32 pulse_center_freq;
10830
10831 /** bandwidth of current DFS channel, MHz */
10832 A_UINT32 ch_bandwidth;
10833
10834 /** center channel frequency1 of current DFS channel, MHz */
10835 A_UINT16 ch_center_freq1;
10836
10837 /** center channel frequency2 of current DFS channel, MHz,
10838 * reserved for 160 BW mode
10839 */
10840 A_UINT16 ch_center_freq2;
10841
10842 /** flag to indicate if this pulse is chirp */
10843 A_UINT8 pulse_is_chirp;
10844
10845 /** RSSI recorded in the ppdu */
10846 A_UINT8 rssi;
10847
10848 /** extened RSSI info */
10849 A_UINT8 rssi_ext;
10850
10851 /** For 4-byte aligment padding */
10852 A_UINT8 reserved;
10853
Govind Singh869c9872016-02-22 18:36:34 +053010854 union {
10855 /* OBSOLETE - will be removed once all refs are gone */
10856 A_UINT8 pmac_id;
10857 /** pdev_id for identifying the MAC
10858 * See macros starting with WMI_PDEV_ID_ for values.
10859 */
10860 A_UINT8 pdev_id;
10861 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010862
10863 /** index of peak magnitude bin (signed) */
10864 A_INT32 peak_sidx;
10865
10866} wmi_dfs_radar_event_fixed_param;
10867
10868typedef struct {
10869 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */
10870
10871 /*Thermal thresholds */
10872 A_UINT32 lower_thresh_degreeC; /* in degree C */
10873 A_UINT32 upper_thresh_degreeC; /* in degree C */
10874
10875 /*Enable/Disable Thermal Monitoring for Mitigation */
10876 A_UINT32 enable;
10877} wmi_thermal_mgmt_cmd_fixed_param;
10878
10879typedef struct {
10880 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */
10881
10882 A_UINT32 temperature_degreeC; /* temperature in degree C */
10883} wmi_thermal_mgmt_event_fixed_param;
10884
10885/**
10886 * This command is sent from WLAN host driver to firmware to
10887 * request firmware to configure auto shutdown timer in fw
10888 * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
10889 */
10890typedef struct {
10891 A_UINT32 tlv_header;
10892 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */
10893 A_UINT32 timer_value;
10894 /** timer value; 0=disable */
10895} wmi_host_auto_shutdown_cfg_cmd_fixed_param;
10896
10897enum wmi_host_auto_shutdown_reason {
10898 WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
10899 WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
10900 WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
10901};
10902
10903/* WMI_HOST_AUTO_SHUTDOWN_EVENTID */
10904typedef struct {
10905 A_UINT32 tlv_header;
10906 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */
10907 A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
10908} wmi_host_auto_shutdown_event_fixed_param;
10909
10910/** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
10911 * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
10912 * This command is only used by some customer for verification test. It is not for end-user.
10913 *
10914 * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
10915 *
10916 * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
10917 * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condtion only. When multiple
10918 * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
10919 * <channel, ack_offset> pair is unique.
10920 *
10921 * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
10922 * called basic_config_info by bitmap
10923 * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
10924 *
10925 * 'rate bit' or 'channel bit' field of basic_config_info indicate validity of the channel and rate fields.if rate bit is 0 then the rate field
10926 * is ignored.
10927 * disable will remove preious conditions from FW.
10928 * conditions from the later command will over write conditions stored from a previous command.
10929 *
10930 */
10931
10932#define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */
10933#define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */
10934#define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */
10935#define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */
10936
10937#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */
10938#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */
10939#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */
10940#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */
10941
10942#define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */
10943#define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */
10944#define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */
10945#define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */
10946
10947#define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */
10948#define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */
10949
10950#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */
10951#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */
10952#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */
10953#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */
10954#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */
10955#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */
10956#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */
10957#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */
10958
10959#define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */
10960#define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */
10961
10962#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */
10963#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */
10964
10965#define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */
10966#define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */
10967
10968/** Bit map definition for basic_config_info starts */
10969#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0
10970#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010971#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
10972#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_SET(x, z) WMI_F_RMW(x, (z) & 0x1f, WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010973
10974#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5
10975#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010976#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
10977#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_SET(x, z) WMI_F_RMW(x, (z) & 0x1f, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010978
10979#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10
10980#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010981#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
10982#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_SET(x, z) WMI_F_RMW(x, (z)&0x3, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010983
10984#define WMI_TPC_CHAINMASK_CONFIG_BT_S 12
10985#define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010986#define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BT)
10987#define WMI_TPC_CHAINMASK_CONFIG_BT_SET(x, z) WMI_F_RMW(x, (z)&0x3, WMI_TPC_CHAINMASK_CONFIG_BT)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010988
10989#define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14
10990#define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010991#define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STBC)
10992#define WMI_TPC_CHAINMASK_CONFIG_STBC_SET(x, z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_STBC)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010993
10994#define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16
10995#define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010996#define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BAND)
10997#define WMI_TPC_CHAINMASK_CONFIG_BAND_SET(x, z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_BAND)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010998
10999#define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17
11000#define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011001#define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STREAM)
11002#define WMI_TPC_CHAINMASK_CONFIG_STREAM_SET(x, z) WMI_F_RMW(x, (z)&0x1, WMI_TPC_CHAINMASK_CONFIG_STREAM)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011003
11004#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18
11005#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011006#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
11007#define WMI_TPC_CHAINAMSK_CONFIG_PHY_MODE_SET(x, z) WMI_F_RMW(x, (z)&0x7, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011008
11009#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21
11010/*
11011 * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
11012 * is temporarily maintained as an alias for the correct name
11013 * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
11014 */
11015#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
11016#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011017#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
11018#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_SET(x, z) WMI_F_RMW(x, (z)&0x1, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011019
11020#define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22
11021/*
11022 * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
11023 * is temporarily maintained as an alias for the correct name
11024 * (WMI_TPC_CHAINMASK_CONFIG_RATE)
11025 */
11026#define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
11027#define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
11028#define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011029#define WMI_TPC_CHAINMASK_CONFIG_RATE_SET(x, z) WMI_F_RMW(x, (z)&0x1, WMI_TPC_CHAINMASK_CONFIG_RATE)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011030
11031/** Bit map definition for basic_config_info ends */
11032
11033typedef struct {
11034 A_UINT32 tlv_header;
11035 /** Basic condition defined as bit map above, bitmap is chosen to save memory.
11036 * Bit0 ~ Bit4: tpc offset which will be adjusted if condtion matches, the unit is 0.5dB. bit4 indicates signed
11037 * Bit5 ~ Bit9: ack offset which will be adjusted if condtion matches, the unit is 0.5dB. bit9 indicates signed
11038 * Bit10 ~ Bit11: chainmask b'00: don't care, b'01: force to use chain0, b'10: force to use chain1, b'11: force to use chain0&chain1
11039 * Bit12 ~ Bit13: bt condition b'00: don't care, b'01: apply only when bt on, b'10: apply only when bt off, b'11: reserved
11040 * Bit14 ~ Bit15: stbc condition b'00: don't care, b'01: apply only when stbc on, b'10: apply only when stbc off, b'11: reserved
11041 * Bit16 : band condition b'0: 2G, b'1: 5G
11042 * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams
11043 * Bit18 ~ Bit20: phy mode condition: b'000: 11b 2g, b'001: 11g 2g, b'010: 11n 2g, b'011: 11n+11ac 2g, b'100: 11a, b'101: 11n 5g, b'110: 11ac 5g, b'111: 11n+11ac 5g
11044 * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
11045 * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
11046 * Bit23 ~ Bit31: reserved
11047 */
11048 A_UINT32 basic_config_info;
11049
11050 /** channel mapping bit rule: The lower bit corresponds with smaller channel.
11051 * it depends on Bit14 of basic_config_info
11052 * Total 24 channels for 5G
11053 * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
11054 * Total 14 channels for 2G
11055 * 1 ~ 14
11056 */
11057 A_UINT32 channel;
11058
11059 /** rate mapping bit rule: The lower bit corresponds with lower rate.
11060 * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
11061 * Legacy rates , 11b, 11g, 11A
11062 * 11n one stream ( ht20, ht40 ) 8+8
11063 * 11n two streams ( ht20, ht40 ) 8+8
11064 * 11ac one stream ( vht20, vht40, vht80 ) 10+10+10
11065 * 11ac two streams (vht20, vht40, vht80 ) 10+10+10
11066 */
11067 A_UINT32 rate0;
11068 /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
11069 * For example, for 11g/11a, when rate0 equals 0xf0,it means "54Mbps", "48Mbps", "36Mbps", "24Mb's" is selected, while "18Mbps", "12Mbps", "9Mbps", "6Mbps" is not selected
11070 */
11071
11072 /** only used for "11n+11ac" combined phy_mode, (WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G , WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G) in this case, 11n rates begins on rate0, while 11ac rates begins on rate1
11073 */
11074 A_UINT32 rate1;
11075} wmi_tpc_chainmask_config;
11076
11077#define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/
11078#define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/
11079
11080typedef struct {
11081 A_UINT32 tlv_header;
11082 A_UINT32 enable;
11083 /** enable to set tpc & chainmask when condtions meet, 0: disabled, 1: enabled. */
11084 A_UINT32 num_tpc_chainmask_configs;
11085 /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */
11086} wmi_tpc_chainmask_config_cmd_fixed_param;
11087
11088typedef struct {
11089 A_UINT32 tlv_header;
11090 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
11091 A_UINT32 data_len;
11092 /** length in byte of data[]. */
11093 /* This structure is used to send REQ binary blobs
11094 * from application/service to firmware where Host drv is pass through .
11095 * Following this structure is the TLV:
11096 * A_UINT8 data[]; // length in byte given by field data_len.
11097 */
11098} wmi_nan_cmd_param;
11099
11100typedef struct {
11101 A_UINT32 tlv_header;
11102 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
11103 A_UINT32 data_len;
11104 /** length in byte of data[]. */
11105 /* This structure is used to send REQ binary blobs
11106 * from firmware to application/service where Host drv is pass through .
11107 * Following this structure is the TLV:
11108 * A_UINT8 data[]; // length in byte given by field data_len.
11109 */
11110} wmi_nan_event_hdr;
11111
Govind Singh941bd5e2016-02-04 17:15:25 +053011112/**
11113 * Event to indicate NAN discovery interface created
11114 */
11115typedef struct {
11116 /*
11117 * TLV tag and len; tag equals
11118 * WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param
11119 */
11120 A_UINT32 tlv_header;
11121 /** Unique id identifying the VDEV */
11122 A_UINT32 vdev_id;
11123 /** NAN interface MAC address */
11124 wmi_mac_addr nan_interface_macaddr;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011125} wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE;
11126
11127#define wmi_nan_disc_iface_created_event_fixed_param wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011128
11129/**
11130 * Event to indicate NAN discovery interface deleted
11131 */
11132typedef struct {
11133 /*
11134 * TLV tag and len; tag equals
11135 * WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param
11136 */
11137 A_UINT32 tlv_header;
11138 /** Unique id identifying the VDEV */
11139 A_UINT32 vdev_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011140} wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE;
11141
11142#define wmi_nan_disc_iface_deleted_event_fixed_param wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011143
11144/**
11145 * Event to indicate NAN device started new cluster
11146 */
11147typedef struct {
11148 /*
11149 * TLV tag and len; tag equals
11150 * WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param
11151 */
11152 A_UINT32 tlv_header;
11153 /** Unique id identifying the VDEV */
11154 A_UINT32 vdev_id;
11155 /** NAN Cluster ID */
11156 A_UINT32 nan_cluster_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011157} wmi_nan_started_cluster_event_fixed_param_PROTOTYPE;
11158
11159#define wmi_nan_started_cluster_event_fixed_param wmi_nan_started_cluster_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011160
11161/**
11162 * Event to indicate NAN device joined to cluster
11163 */
11164typedef struct {
11165 /*
11166 * TLV tag and len; tag equals
11167 * WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param
11168 */
11169 A_UINT32 tlv_header;
11170 /** Unique id identifying the VDEV */
11171 A_UINT32 vdev_id;
11172 /** NAN Cluster ID */
11173 A_UINT32 nan_cluster_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011174} wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE;
11175
11176#define wmi_nan_joined_cluster_event_fixed_param wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011177
11178/** NAN DATA CMD's */
11179
11180/**
11181 * NAN Data get capabilities req
11182 */
11183typedef struct {
11184 /*
11185 * TLV tag and len; tag equals
11186 * WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param
11187 */
11188 A_UINT32 tlv_header;
11189 /** unique id generated in upper layer for the transaction */
11190 A_UINT32 transaction_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011191} wmi_ndi_get_cap_req_fixed_param_PROTOTYPE;
Govind Singh941bd5e2016-02-04 17:15:25 +053011192
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011193#define wmi_ndi_get_cap_req_fixed_param wmi_ndi_get_cap_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011194
11195/**
11196 * NDP Response code
11197 */
11198typedef enum {
11199 NDP_RSP_CODE_REQUEST_ACCEPT = 0x00,
11200 NDP_RSP_CODE_REQUEST_REJECT = 0x01,
11201 NDP_RSP_CODE_REQUEST_DEFER = 0x02,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011202} wmi_ndp_rsp_code_PROTOTYPE;
11203
11204#define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011205
11206/**
11207 * NDP Initiator requesting a data session
11208 */
11209typedef struct {
11210 /*
11211 * TLV tag and len; tag equals
11212 * WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param
11213 */
11214 A_UINT32 tlv_header;
11215 /** Unique id identifying the VDEV */
11216 A_UINT32 vdev_id;
11217 /** unique id generated in upper layer for the transaction */
11218 A_UINT32 transaction_id;
11219 /** Unique Instance Id identifying the Responder's service */
11220 A_UINT32 service_instance_id;
11221 /** Discovery MAC addr of the publisher/peer */
11222 wmi_mac_addr peer_discovery_mac_addr;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011223 /* Actual number of bytes in TLV ndp_cfg */
Govind Singh941bd5e2016-02-04 17:15:25 +053011224 A_UINT32 ndp_cfg_len;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011225 /* Actual number of bytes in TLV ndp_app_info */
Govind Singh941bd5e2016-02-04 17:15:25 +053011226 A_UINT32 ndp_app_info_len;
11227 /**
11228 * TLV (tag length value ) parameters follow the ndp_initiator_req
11229 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011230 * wmi_channel channel;
11231 * A_UINT8 ndp_cfg[];
11232 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053011233 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011234} wmi_ndp_initiator_req_fixed_param_PROTOTYPE;
11235
11236#define wmi_ndp_initiator_req_fixed_param wmi_ndp_initiator_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011237
11238/**
11239 * Initiate a data response on the responder side
11240 * for data request indication from the peer
11241 */
11242typedef struct {
11243 /*
11244 * TLV tag and len; tag equals
11245 * WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param
11246 */
11247 A_UINT32 tlv_header;
11248 /** Unique id identifying the VDEV */
11249 A_UINT32 vdev_id;
11250 /** unique id generated in upper layer for the transaction */
11251 A_UINT32 transaction_id;
11252 /**
11253 * Unique token Id generated on the initiator/responder
11254 * side used for a NDP session between two NAN devices
11255 */
11256 A_UINT32 ndp_instance_id;
11257 /** Response Code defined in wmi_ndp_rsp_code */
11258 A_UINT32 rsp_code;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011259 /** Number of bytes in TLV ndp_cfg */
Govind Singh941bd5e2016-02-04 17:15:25 +053011260 A_UINT32 ndp_cfg_len;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011261 /** Number of bytes in TLV ndp_app_info */
Govind Singh941bd5e2016-02-04 17:15:25 +053011262 A_UINT32 ndp_app_info_len;
11263 /**
11264 * TLV (tag length value ) parameters follow the ndp_responder_req
11265 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011266 * A_UINT8 ndp_cfg[];
11267 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053011268 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011269} wmi_ndp_responder_req_fixed_param_PROTOTYPE;
11270
11271#define wmi_ndp_responder_req_fixed_param wmi_ndp_responder_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011272
11273/**
11274 * NDP end type
11275 */
11276typedef enum {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011277 WMI_NDP_END_TYPE_UNSPECIFIED = 0x00,
11278 WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01,
11279 WMI_NDP_END_TYPE_OTA_FRAME = 0x02,
11280} wmi_ndp_end_type_PROTOTYPE;
11281
11282#define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011283
11284/**
11285 * NDP end reason code
11286 */
11287typedef enum {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011288 WMI_NDP_END_REASON_UNSPECIFIED = 0x00,
11289 WMI_NDP_END_REASON_INACTIVITY = 0x01,
11290 WMI_NDP_END_REASON_PEER_DATA_END = 0x02,
11291} wmi_ndp_end_reason_code_PROTOTYPE;
11292
11293#define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011294
11295/**
11296 * NDP end request
11297 */
11298typedef struct {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011299 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */
11300 A_UINT32 tlv_header;
Govind Singh941bd5e2016-02-04 17:15:25 +053011301 /** NDP instance id */
11302 A_UINT32 ndp_instance_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011303} wmi_ndp_end_req_PROTOTYPE;
Govind Singh941bd5e2016-02-04 17:15:25 +053011304
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011305#define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011306
11307/**
11308 * NDP End request
11309 */
11310typedef struct {
11311 /*
11312 * TLV tag and len; tag equals
11313 * WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param
11314 */
11315 A_UINT32 tlv_header;
11316 /** unique id generated in upper layer for the transaction */
11317 A_UINT32 transaction_id;
Govind Singh941bd5e2016-02-04 17:15:25 +053011318 /**
11319 * TLV (tag length value ) parameters follow the ndp_end_req
11320 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011321 * wmi_ndp_end_req ndp_end_req_list[];
Govind Singh941bd5e2016-02-04 17:15:25 +053011322 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011323} wmi_ndp_end_req_fixed_param_PROTOTYPE;
11324
11325#define wmi_ndp_end_req_fixed_param wmi_ndp_end_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011326
11327/* NAN DATA RSP EVENTS */
11328
11329/**
11330 * Event to indicate NAN Data Interface capabilities cmd
11331 */
11332typedef struct {
11333 /*
11334 * TLV tag and len; tag equals
11335 * WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param
11336 */
11337 A_UINT32 tlv_header;
11338 /** Copy of transaction_id received in wmi_ndi_get_cap_req */
11339 A_UINT32 transaction_id;
11340 /** Max ndi interface support */
11341 A_UINT32 max_ndi_interfaces;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011342 /** Max ndp sessions can support */
11343 A_UINT32 max_ndp_sessions;
Govind Singh941bd5e2016-02-04 17:15:25 +053011344 /** Max number of peer's per ndi */
11345 A_UINT32 max_peers_per_ndi;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011346} wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE;
11347
11348#define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011349
11350/**
11351 * NDP command response code
11352 */
11353typedef enum {
11354 NDP_CMD_RSP_STATUS_SUCCESS = 0x00,
11355 NDP_CMD_RSP_STATUS_ERROR = 0x01,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011356} wmi_ndp_cmd_rsp_status_PROTOTYPE;
11357
11358#define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011359
11360/**
Govind Singh941bd5e2016-02-04 17:15:25 +053011361 * Event response for wmi_ndp_initiator_req
11362 */
11363typedef struct {
11364 /*
11365 * TLV tag and len; tag equals
11366 * WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param
11367 */
11368 A_UINT32 tlv_header;
11369 /** Unique id identifying the VDEV */
11370 A_UINT32 vdev_id;
11371 /** Copy of transaction_id received in wmi_ndp_initiator_req */
11372 A_UINT32 transaction_id;
11373 /** Response status defined in wmi_ndp_cmd_rsp_status*/
11374 A_UINT32 rsp_status;
Govind Singh941bd5e2016-02-04 17:15:25 +053011375 A_UINT32 reason_code;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011376 /*
11377 * Unique token Id generated on the initiator/responder
11378 * side used for a NDP session between two NAN devices
11379 */
11380 A_UINT32 ndp_instance_id;
11381} wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE;
11382
11383#define wmi_ndp_initiator_rsp_event_fixed_param wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011384
11385/**
11386 * Event response for wmi_ndp_responder_req cmd
11387 */
11388typedef struct {
11389 /*
11390 * TLV tag and len; tag equals
11391 * WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param
11392 */
11393 A_UINT32 tlv_header;
11394 /** Unique id identifying the VDEV */
11395 A_UINT32 vdev_id;
11396 /** Copy of transaction_id received in wmi_ndp_responder_req */
11397 A_UINT32 transaction_id;
11398 /** Response status defined in wmi_ndp_cmd_rsp_status*/
11399 A_UINT32 rsp_status;
Govind Singh941bd5e2016-02-04 17:15:25 +053011400 A_UINT32 reason_code;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011401 /*
11402 * Unique token Id generated on the initiator/responder
11403 * side used for a NDP session between two NAN devices
11404 */
11405 A_UINT32 ndp_instance_id;
11406 /* NDI mac address of the peer */
11407 wmi_mac_addr peer_ndi_mac_addr;
11408} wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE;
11409
11410#define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE
11411/**
11412 * Active ndp instance id
11413 */
11414typedef struct {
11415 /*
11416 * TLV tag and len; tag equals
11417 * WMITLV_TAG_STRUC_wmi_active_ndp_instance_id
11418 */
11419 A_UINT32 tlv_header;
11420 /* NDP instance id */
11421 A_UINT32 ndp_instance_id;
11422} wmi_active_ndp_instance_id_PROTOTYPE;
11423
11424#define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011425
11426/**
11427 * NDP end response per ndi
11428 */
11429typedef struct {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011430 /*
11431 * TLV tag and len; tag equals
11432 * WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi
11433 */
11434 A_UINT32 tlv_header;
Govind Singh941bd5e2016-02-04 17:15:25 +053011435 /** Unique id identifying the VDEV */
11436 A_UINT32 vdev_id;
11437 /** Peer MAC addr */
11438 wmi_mac_addr peer_mac_addr;
11439 /** Number of active ndps on this ndi */
11440 A_UINT32 num_active_ndps_on_ndi;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011441} wmi_ndp_end_rsp_per_ndi_PROTOTYPE;
Govind Singh941bd5e2016-02-04 17:15:25 +053011442
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011443#define wmi_ndp_end_rsp_per_ndi wmi_ndp_end_rsp_per_ndi_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011444
11445/**
11446 * Event response for wmi_ndp_end_req cmd
11447 */
11448typedef struct {
11449 /*
11450 * TLV tag and len; tag equals
11451 * WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param
11452 */
11453 A_UINT32 tlv_header;
11454 /** Copy of transaction_id received in wmi_ndp_end_req */
11455 A_UINT32 transaction_id;
11456 /** Response status defined in wmi_ndp_cmd_rsp_status*/
11457 A_UINT32 rsp_status;
Govind Singh941bd5e2016-02-04 17:15:25 +053011458 A_UINT32 reason_code;
Govind Singh941bd5e2016-02-04 17:15:25 +053011459 /**
11460 * TLV (tag length value ) parameters follow the ndp_end_rsp
11461 * structure. The TLV's are:
11462 * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[];
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011463 * wmi_active_ndp_instance_id active_ndp_instances_id[];
Govind Singh941bd5e2016-02-04 17:15:25 +053011464 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011465} wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE;
11466
11467#define wmi_ndp_end_rsp_event_fixed_param wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011468
11469/** NAN DATA EVENTS */
11470
11471/**
11472 * NDP self role
11473 */
11474typedef enum {
11475 WMI_NDP_INITIATOR_ROLE,
11476 WMI_NDP_RESPONDER_ROLE,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011477} wmi_ndp_self_role_PROTOTYPE;
11478
11479#define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011480
11481/**
11482 * NDP accept policy
11483 */
11484typedef enum {
11485 WMI_NDP_ACCEPT_POLICY_NONE,
11486 WMI_NDP_ACCEPT_POLICY_ALL,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011487} wmi_ndp_accept_policy_PROTOTYPE;
11488
11489#define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011490
11491/**
11492 * Event indication received on the responder side when a NDP Initiator request/
11493 * NDP session is initiated on the Initiator side
11494 * (self role will be NDP_RESPONDER_ROLE)
11495 *
11496 * Event indication received on the initiator side when a
11497 * NDP responder request on the Initiator side
11498 * (self role will be NDP_INITIATOR_ROLE)
11499 */
11500typedef struct {
11501 /*
11502 * TLV tag and len; tag equals
11503 * WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param
11504 */
11505 A_UINT32 tlv_header;
11506 /** Unique id identifying the VDEV */
11507 A_UINT32 vdev_id;
11508 /** Self NDP Role defined in wmi_ndp_self_role */
11509 A_UINT32 self_ndp_role;
11510 /** Accept policy defined in wmi_ndp_accept_policy */
11511 A_UINT32 accept_policy;
11512 /** Unique Instance Id corresponding to a service/session. */
11513 A_UINT32 service_instance_id;
11514 /** Discovery MAC addr of the peer/initiator */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011515 wmi_mac_addr peer_discovery_mac_addr;
11516 /* NDI mac address of the peer */
11517 wmi_mac_addr peer_ndi_mac_addr;
Govind Singh941bd5e2016-02-04 17:15:25 +053011518 /**
11519 * Unique token Id generated on the initiator/responder
11520 * side used for a NDP session between two NAN devices
11521 */
11522 A_UINT32 ndp_instance_id;
11523 /** Number of bytes in TLV wmi_ndp_cfg */
11524 A_UINT32 ndp_cfg_len;
11525 /** Number of bytes in TLV wmi_ndp_app_info */
11526 A_UINT32 ndp_app_info_len;
11527 /**
11528 * TLV (tag length value ) parameters follow the ndp_indication
11529 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011530 * A_UINT8 ndp_cfg[];
11531 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053011532 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011533} wmi_ndp_indication_event_fixed_param_PROTOTYPE;
11534
11535#define wmi_ndp_indication_event_fixed_param wmi_ndp_indication_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011536
11537/**
11538 * Event indication of data confirm is received on both
11539 * initiator and responder side confirming a NDP session
11540 */
11541typedef struct {
11542 /*
11543 * TLV tag and len; tag equals
11544 * WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param
11545 */
11546 A_UINT32 tlv_header;
11547 /** Unique id identifying the VDEV */
11548 A_UINT32 vdev_id;
11549 /**
11550 * Unique token Id generated on the initiator/responder
11551 * side used for a NDP session between two NAN devices
11552 */
11553 A_UINT32 ndp_instance_id;
11554 /*
11555 * NDI mac address of the peer
11556 * (required to derive target ipv6 address)
11557 */
11558 wmi_mac_addr peer_ndi_mac_addr;
11559 /** Response Code defined in wmi_ndp_rsp_code */
11560 A_UINT32 rsp_code;
11561 /** Number of bytes in TLV wmi_ndp_cfg */
11562 A_UINT32 ndp_cfg_len;
11563 /** Number of bytes in TLV wmi_ndp_app_info */
11564 A_UINT32 ndp_app_info_len;
Anurag Chouhanb36db512016-04-27 16:13:35 +053011565 /** Reason Code */
11566 A_UINT32 reason_code;
11567 /** Number of active ndps on this peer */
11568 A_UINT32 num_active_ndps_on_peer;
Govind Singh941bd5e2016-02-04 17:15:25 +053011569 /**
11570 * TLV (tag length value ) parameters follow the ndp_confirm
11571 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011572 * A_UINT8 ndp_cfg[];
11573 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053011574 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011575} wmi_ndp_confirm_event_fixed_param_PROTOTYPE;
11576
11577#define wmi_ndp_confirm_event_fixed_param wmi_ndp_confirm_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011578
11579/**
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011580 * Event indication received on the initiator/responder side terminating a NDP session
Govind Singh941bd5e2016-02-04 17:15:25 +053011581 */
11582typedef struct {
11583 /*
11584 * TLV tag and len; tag equals
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011585 * WMITLV_TAG_STRUC_wmi_ndp_end_indication
Govind Singh941bd5e2016-02-04 17:15:25 +053011586 */
11587 A_UINT32 tlv_header;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011588 /** type defined in wmi_ndp_end_type */
11589 A_UINT32 type;
11590 /* Unique id identifying the VDEV */
Govind Singh941bd5e2016-02-04 17:15:25 +053011591 A_UINT32 vdev_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011592 /** reason_code defined in wmi_ndp_end_reason_code */
11593 A_UINT32 reason_code;
11594 /** NDP instance id */
11595 A_UINT32 ndp_instance_id;
11596 /* NDI MAC addr of the peer */
11597 wmi_mac_addr peer_ndi_mac_addr;
11598 /* Number of active ndps on this peer */
11599 A_UINT32 num_active_ndps_on_peer;
11600} wmi_ndp_end_indication_PROTOTYPE;
11601
11602#define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011603
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011604typedef struct {
11605 A_UINT32 tlv_header;
11606 A_UINT32 num_data;
11607 /* followed by WMITLV_TAG_ARRAY_BYTE */
11608} wmi_diag_data_container_event_fixed_param;
11609
11610enum {
11611 WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
11612 WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
11613 WMI_PDEV_PARAM_TXPOWER_REASON_MAX
11614};
11615
11616#define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF
11617#define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
11618
11619#define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00
11620#define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
11621
11622#define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \
11623 ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
11624
11625#define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \
11626 ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
11627
11628#define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \
11629 (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
11630
11631#define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \
11632 (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
11633
11634/**
11635 * This command is sent from WLAN host driver to firmware to
11636 * notify the current modem power state. Host would receive a
11637 * message from modem when modem is powered on. Host driver
11638 * would then send this command to firmware. Firmware would then
11639 * power on WCI-2 (UART) interface for LTE/MWS Coex.
11640 *
11641 * This command is only applicable for APQ platform which has
11642 * modem on the platform. If firmware doesn't support MWS Coex,
11643 * this command can be dropped by firmware.
11644 *
11645 * This is a requirement from modem team that WCN can't toggle
11646 * UART before modem is powered on.
11647 */
11648typedef struct {
11649 /** TLV tag and len; tag equals
11650 * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
11651 A_UINT32 tlv_header;
11652
11653 /** Modem power state parameter */
11654 A_UINT32 modem_power_state;
11655} wmi_modem_power_state_cmd_param;
11656
11657enum {
11658 WMI_MODEM_STATE_OFF = 0,
11659 WMI_MODEM_STATE_ON
11660};
11661
11662#define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
11663#define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */
11664
11665/** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
11666 generated whenever firmware roamed to new AP silently and
11667 (a) If the host is awake, FW sends the event to the host immediately .
11668 (b) If host is in sleep then either
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011669 (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011670 command to FW (part of host wake up sequence from low power mode) before sending the event host.
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011671 (2) data/mgmt frame is received from roamed AP, which needs to return to host
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011672 */
11673
11674typedef struct {
11675 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
11676 A_UINT32 tlv_header;
11677
11678 A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
11679 A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
11680 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES];
11681} wmi_key_material;
11682
11683typedef struct {
11684 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */
11685 /** Unique id identifying the VDEV on which roaming is done by firmware */
11686 A_UINT32 vdev_id;
11687 /** auth_status: connected or authorized */
11688 A_UINT32 auth_status;
11689 /*
Nirav Shah439e6262015-11-05 10:53:18 +053011690 * roam_reason:
11691 * bits 0-3 for roam reason see WMI_ROAM_REASON_XXX
11692 * bits 4-5 for subnet status see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011693 */
11694 A_UINT32 roam_reason;
11695 /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
11696 A_UINT32 rssi;
11697 /** MAC address of roamed AP */
11698 wmi_mac_addr bssid; /* BSSID */
11699 /** whether the frame is beacon or probe rsp */
11700 A_UINT32 is_beacon;
11701 /** the length of beacon/probe rsp */
11702 A_UINT32 bcn_probe_rsp_len;
11703 /** the length of reassoc rsp */
11704 A_UINT32 reassoc_rsp_len;
Manikandan Mohan30728082015-12-09 12:35:24 -080011705 /** the length of reassoc req */
11706 A_UINT32 reassoc_req_len;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011707 /**
11708 * TLV (tag length value ) parameters follows roam_synch_event
11709 * The TLV's are:
11710 * A_UINT8 bcn_probe_rsp_frame[]; length identified by bcn_probe_rsp_len
11711 * A_UINT8 reassoc_rsp_frame[]; length identified by reassoc_rsp_len
11712 * wmi_channel chan;
11713 * wmi_key_material key;
11714 * A_UINT32 status; subnet changed status not being used
11715 * currently. will pass the information using roam_status.
Manikandan Mohan30728082015-12-09 12:35:24 -080011716 * A_UINT8 reassoc_req_frame[]; length identified by reassoc_req_len
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011717 **/
11718} wmi_roam_synch_event_fixed_param;
11719
11720#define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF
11721
11722typedef struct {
11723 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
11724 A_UINT32 tlv_header;
11725 /** MAC address of the peer for which the estimated link speed is required. */
11726 wmi_mac_addr peer_macaddr;
Govind Singh869c9872016-02-22 18:36:34 +053011727 /* Set to 1 only if vdev_id field is valid */
11728 A_UINT32 valid_vdev_id;
11729 /* VDEV to which the peer belongs to */
11730 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011731} wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
11732
11733typedef struct {
11734 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
11735 A_UINT32 tlv_header;
11736 /** MAC address of the peer for which the estimated link speed is required.
11737 */
11738 wmi_mac_addr peer_macaddr;
11739 /* Estimated link speed in kbps.
11740 * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
11741 */
11742 A_UINT32 est_linkspeed_kbps;
Govind Singh869c9872016-02-22 18:36:34 +053011743 /* Set to 1 only if vdev_id field is valid */
11744 A_UINT32 valid_vdev_id;
11745 /* VDEV to which the peer belongs to */
11746 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011747} wmi_peer_estimated_linkspeed_event_fixed_param;
11748
11749typedef struct {
11750 A_UINT32 tlv_header; /* TLV tag and len; tag equals */
11751 /* vdev ID */
11752 A_UINT32 vdev_id;
11753 A_UINT32 data_len;
11754 /** length in byte of data[]. */
11755 /* This structure is used to send REQ binary blobs
11756 * from application/service to firmware where Host drv is pass through .
11757 * Following this structure is the TLV:
11758 * A_UINT8 data[]; // length in byte given by field data_len.
11759 */
11760} wmi_req_stats_ext_cmd_fixed_param;
11761
11762typedef struct {
11763 A_UINT32 tlv_header;
11764 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
11765 A_UINT32 vdev_id;
11766 /** vdev ID */
11767 A_UINT32 data_len;
11768 /** length in byte of data[]. */
11769 /* This structure is used to send REQ binary blobs
11770 * from firmware to application/service where Host drv is pass through .
11771 * Following this structure is the TLV:
11772 * A_UINT8 data[]; // length in byte given by field data_len.
11773 */
11774} wmi_stats_ext_event_fixed_param;
11775
11776typedef struct {
Manikandan Mohan429a0782015-12-23 14:35:54 -080011777 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */
11778 /** unique id identifying the VDEV, generated by the caller */
11779 A_UINT32 vdev_id;
11780 /** peer MAC address */
11781 wmi_mac_addr peer_macaddr;
11782} wmi_peer_delete_resp_event_fixed_param;
11783
11784typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011785 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
11786 A_UINT32 tlv_header;
11787 A_UINT32 vdev_id; /* vdev ID */
11788 /* MAC address of the peer for which the estimated link speed is required. */
11789 wmi_mac_addr peer_macaddr;
11790 A_UINT32 state; /* peer state */
11791} wmi_peer_state_event_fixed_param;
11792
11793typedef struct {
11794 /*
11795 * TLV tag and len; tag equals
11796 * WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param
11797 */
11798 A_UINT32 tlv_header;
11799 /* unique id identifying the VDEV, generated by the caller */
11800 A_UINT32 vdev_id;
11801 /* peer MAC address */
11802 wmi_mac_addr peer_macaddr;
11803} wmi_peer_assoc_conf_event_fixed_param;
11804
11805enum {
11806 WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0,
11807 /** scan_type: passive */
11808 WMI_2G4_HT40_OBSS_SCAN_ACTIVE,
11809 /** scan_type: active */
11810};
11811
11812typedef struct {
11813 /**
11814 * TLV tag and len;
11815 * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enalbe_cmd_fixed_param
11816 */
11817 A_UINT32 tlv_header;
11818 A_UINT32 vdev_id;
11819 /**
11820 * active or passive. if active all the channels are actively scanned.
11821 * if passive then all the channels are passively scanned
11822 */
11823 A_UINT32 scan_type;
11824 /**
11825 * FW can perform multiple scans with in a OBSS scan interval.
11826 * For each scan,
11827 * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel ,
11828 * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
11829 * The unit for these 2 parameters is TUs.
11830 */
11831 A_UINT32 obss_scan_passive_dwell;
11832 A_UINT32 obss_scan_active_dwell;
11833 /**
11834 * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
11835 * both min and total per channel dwell time requirement
11836 */
11837 A_UINT32 bss_channel_width_trigger_scan_interval;
11838 /**
11839 * FW can perform multiple scans with in a OBSS scan interval.
11840 * For each scan,
11841 * the total per channel dwell time across all scans with in OBSS scan interval should be
11842 * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
11843 * for active scans and ,
11844 * The unit for these 2 parameters is TUs.
11845 */
11846 A_UINT32 obss_scan_passive_total_per_channel;
11847 A_UINT32 obss_scan_active_total_per_channel;
11848 A_UINT32 bss_width_channel_transition_delay_factor;
11849 /** parameter to check exemption from scan */
11850 A_UINT32 obss_scan_activity_threshold;
11851 /** parameter to check exemption from scan */
11852 /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
11853 A_UINT32 forty_mhz_intolerant;
11854 /** STA 40M bandwidth intolerant capability */
11855 A_UINT32 current_operating_class;
11856 /** STA current operating class */
11857 /** length of 2.4GHz channel list to scan at, channel list in tlv->channels[] */
11858 A_UINT32 channel_len;
11859 /** length of optional ie data to append to probe reqest when active scan, ie data in tlv->ie_field[] */
11860 A_UINT32 ie_len;
11861} wmi_obss_scan_enable_cmd_fixed_param;
11862
11863typedef struct {
11864 /**
11865 * TLV tag and len;
11866 * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
11867 */
11868 A_UINT32 tlv_header;
11869 A_UINT32 vdev_id;
11870} wmi_obss_scan_disable_cmd_fixed_param;
11871
11872typedef struct {
11873 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
11874 A_UINT32 tlv_header;
11875 /** unique id identifying the VDEV */
11876 A_UINT32 vdev_id;
11877 /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
11878 A_UINT32 tx_status;
11879} wmi_offload_prb_rsp_tx_status_event_fixed_param;
11880
11881typedef enum {
11882 WMI_FRAME_TX_OK, /* frame tx ok */
11883 WMI_FRAME_TX_XRETRY, /* excessivley retried */
11884 WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */
11885 WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */
11886} WMI_FRAME_TX_STATUS;
11887
11888/**
11889 * This command is sent from WLAN host driver to firmware to
11890 * request firmware to send the latest channel avoidance range
11891 * to host.
11892 *
11893 * This command is only applicable for APQ platform which has
11894 * modem on the platform. If firmware doesn't support MWS Coex,
11895 * this command can be dropped by firmware.
11896 *
11897 * Host would send this command to firmware to request a channel
11898 * avoidance information update.
11899 */
11900typedef struct {
11901 /** TLV tag and len; tag equals
11902 * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
11903 A_UINT32 tlv_header;
11904} wmi_chan_avoid_update_cmd_param;
11905
11906/* ExtScan operation mode */
11907typedef enum {
11908 WMI_EXTSCAN_MODE_NONE = 0x0000,
11909 WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */
11910 WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */
11911 WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */
11912} wmi_extscan_operation_mode;
11913
11914/* Channel Mask */
11915typedef enum {
11916 WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
11917 WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */
11918 WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */
11919 WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */
11920} wmi_channel_band_mask;
11921
11922typedef enum {
11923 WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001,
11924 WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002,
11925 WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004,
11926 WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008,
11927 WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010,
11928 WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020,
Govind Singhfad2f212016-01-21 10:55:51 +053011929 WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040,
11930 WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011931
11932 WMI_EXTSCAN_EVENT_MAX = 0x8000
11933} wmi_extscan_event_type;
11934
11935#define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \
11936 WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
11937
11938#define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \
11939 WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
11940 WMI_EXTSCAN_BUCKET_FAILED_EVENT | \
11941 WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
11942
11943typedef enum {
11944 WMI_EXTSCAN_NO_FORWARDING = 0x0000,
11945 WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
11946} wmi_extscan_forwarding_flags;
11947
11948typedef enum {
11949 /* Use Motion Sensor Detection */
11950 WMI_EXTSCAN_USE_MSD = 0x0001,
11951 /* Extscan LPASS extended batching feature is supported and enabled */
11952 WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002,
11953} wmi_extscan_configuration_flags;
11954typedef enum {
11955 /*
11956 * Cache the results of bucket whose
11957 * configuration flags has this bit set
11958 */
11959 WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001,
Govind Singhfad2f212016-01-21 10:55:51 +053011960 /* Report ext scan results to context hub or not.*/
11961 WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011962} wmi_extscan_bucket_configuration_flags;
11963
11964typedef enum {
11965 WMI_EXTSCAN_STATUS_OK = 0,
11966 WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
11967 WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
11968 WMI_EXTSCAN_STATUS_INTERNAL_ERROR
11969} wmi_extscan_start_stop_status;
11970
11971typedef struct {
11972 /** Request ID - to identify command. Cannot be 0 */
11973 A_UINT32 request_id;
11974 /** Requestor ID - client requesting ExtScan */
11975 A_UINT32 requestor_id;
11976 /** VDEV id(interface) that is requesting scan */
11977 A_UINT32 vdev_id;
11978} wmi_extscan_command_id;
11979
11980typedef struct {
11981 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
11982 /** channel number */
11983 A_UINT32 channel;
11984
11985 /** dwell time in msec - use defaults if 0 */
11986 A_UINT32 min_dwell_time;
11987 A_UINT32 max_dwell_time;
11988 /** passive/active channel and other flags */
11989 A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */
11990} wmi_extscan_bucket_channel;
11991
11992/* Scan Bucket specification */
11993typedef struct {
11994 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
11995 /** Bucket ID - 0-based */
11996 A_UINT32 bucket_id;
11997 /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
11998 A_UINT32 notify_extscan_events;
11999 /** Options to forward scan results - see wmi_extscan_forwarding_flags */
12000 A_UINT32 forwarding_flags;
12001 /*
12002 * ExtScan configuration flags -
12003 * wmi_extscan__bucket_configuration_flags
12004 */
12005 A_UINT32 configuration_flags;
12006 /** DEPRECATED member:multiplier to be applied to the periodic scan's base period */
12007 A_UINT32 base_period_multiplier;
12008 /** dwell time in msec on active channels - use defaults if 0 */
12009 A_UINT32 min_dwell_time_active;
12010 A_UINT32 max_dwell_time_active;
12011 /** dwell time in msec on passive channels - use defaults if 0 */
12012 A_UINT32 min_dwell_time_passive;
12013 A_UINT32 max_dwell_time_passive;
12014 /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
12015 A_UINT32 channel_band;
12016 /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
12017 A_UINT32 num_channels;
12018 /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
12019 A_UINT32 min_period;
12020 /** period above which exponent is not applied anymore */
12021 A_UINT32 max_period;
12022 /**
12023 * back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
12024 * new_bucket_period = last_bucket_period + last_exponent_period exp_backoff
12025 */
12026 A_UINT32 exp_backoff;
12027 /** number of scans performed at a given periodicity after which exponential back off value is
12028 * applied to current periodicity to obtain a newer one
12029 */
12030 A_UINT32 exp_max_step_count;
12031/** Followed by the variable length TLV chan_list:
12032 * wmi_extscan_bucket_channel chan_list[] */
12033} wmi_extscan_bucket;
12034
12035typedef struct {
12036 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
12037 /** Request ID - to identify command. Cannot be 0 */
12038 A_UINT32 request_id;
12039 /** Requestor ID - client requesting ExtScan */
12040 A_UINT32 requestor_id;
12041 /** VDEV id(interface) that is requesting scan */
12042 A_UINT32 vdev_id;
12043 /** table ID - to allow support for multiple simultaneous requests */
12044 A_UINT32 table_id;
12045 /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
12046 A_UINT32 base_period;
12047 /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
12048 A_UINT32 max_iterations;
12049 /** Options to forward scan results - see wmi_extscan_forwarding_flags */
12050 A_UINT32 forwarding_flags;
12051 /** ExtScan configuration flags - wmi_extscan_configuration_flags */
12052 A_UINT32 configuration_flags;
12053 /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
12054 A_UINT32 notify_extscan_events;
12055 /** Scan Priority, input to scan scheduler */
12056 A_UINT32 scan_priority;
12057 /** Maximum number of BSSIDs to cache on each scan cycle */
12058 A_UINT32 max_bssids_per_scan_cycle;
12059 /** Minimum RSSI value to report */
12060 A_UINT32 min_rssi;
12061 /** Maximum table usage in percentage */
12062 A_UINT32 max_table_usage;
12063 /** default dwell time in msec on active channels */
12064 A_UINT32 min_dwell_time_active;
12065 A_UINT32 max_dwell_time_active;
12066 /** default dwell time in msec on passive channels */
12067 A_UINT32 min_dwell_time_passive;
12068 A_UINT32 max_dwell_time_passive;
12069 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
12070 A_UINT32 min_rest_time;
12071 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
12072 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
12073 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
12074 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
12075 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
12076 * irrespective of activity. activity is determined by the idle_time parameter.
12077 */
12078 A_UINT32 max_rest_time;
12079 /** time before sending next set of probe requests.
12080 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
12081 * The number of probe requests specified depends on the ssid_list and bssid_list
12082 */
12083 /** Max number of probes to be sent */
12084 A_UINT32 n_probes;
12085 /** time in msec between 2 sets of probe requests. */
12086 A_UINT32 repeat_probe_time;
12087 /** time in msec between 2 consequetive probe requests with in a set. */
12088 A_UINT32 probe_spacing_time;
12089 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
12090 A_UINT32 idle_time;
12091 /** maximum time in msec allowed for scan */
12092 A_UINT32 max_scan_time;
12093 /** delay in msec before sending first probe request after switching to a channel */
12094 A_UINT32 probe_delay;
12095 /** Scan control flags */
12096 A_UINT32 scan_ctrl_flags;
12097 /** Burst duration time in msec*/
12098 A_UINT32 burst_duration;
12099
12100 /** number of bssids in the TLV bssid_list[] */
12101 A_UINT32 num_bssid;
12102 /** number of ssid in the TLV ssid_list[] */
12103 A_UINT32 num_ssids;
12104 /** number of bytes in TLV ie_data[] */
12105 A_UINT32 ie_len;
12106 /** number of buckets in the TLV bucket_list[] */
12107 A_UINT32 num_buckets;
12108 /** in number of scans, send notifications to host after these many scans */
12109 A_UINT32 report_threshold_num_scans;
12110
12111 /** number of channels in channel_list[] determined by the
12112 sum of wmi_extscan_bucket.num_channels in array */
12113
12114/**
12115 * TLV (tag length value ) parameters follow the extscan_cmd
12116 * structure. The TLV's are:
12117 * wmi_ssid ssid_list[];
12118 * wmi_mac_addr bssid_list[];
12119 * A_UINT8 ie_data[];
12120 * wmi_extscan_bucket bucket_list[];
12121 * wmi_extscan_bucket_channel channel_list[];
12122 */
12123} wmi_extscan_start_cmd_fixed_param;
12124
12125typedef struct {
12126 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
12127 /** Request ID - to match running command. 0 matches any request */
12128 A_UINT32 request_id;
12129 /** Requestor ID - client requesting stop */
12130 A_UINT32 requestor_id;
12131 /** VDEV id(interface) that is requesting scan */
12132 A_UINT32 vdev_id;
12133 /** table ID - to allow support for multiple simultaneous requests */
12134 A_UINT32 table_id;
12135} wmi_extscan_stop_cmd_fixed_param;
12136
12137enum wmi_extscan_get_cached_results_flags {
12138 WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000,
12139 WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
12140};
12141
12142typedef struct {
12143 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
12144 /** request ID - used to correlate command with events */
12145 A_UINT32 request_id;
12146 /** Requestor ID - client that requested results */
12147 A_UINT32 requestor_id;
12148 /** VDEV id(interface) that is requesting scan */
12149 A_UINT32 vdev_id;
12150 /** table ID - to allow support for multiple simultaneous requests */
12151 A_UINT32 table_id;
12152 /** maximum number of results to be returned */
12153 A_UINT32 max_results;
12154 /** flush BSSID list - wmi_extscan_get_cached_results_flags */
12155 A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */
12156} wmi_extscan_get_cached_results_cmd_fixed_param;
12157
12158typedef struct {
12159 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
12160 /** request ID - used to correlate command with events */
12161 A_UINT32 request_id;
12162 /** Requestor ID - client that requested results */
12163 A_UINT32 requestor_id;
12164 /** VDEV id(interface) that is requesting scan */
12165 A_UINT32 vdev_id;
12166 /** table ID - to allow support for multiple simultaneous requests */
12167 A_UINT32 table_id;
12168} wmi_extscan_get_wlan_change_results_cmd_fixed_param;
12169
12170typedef struct {
12171 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12172 /**bssid */
12173 wmi_mac_addr bssid;
12174 /**channel number */
12175 A_UINT32 channel;
12176 /**upper RSSI limit */
12177 A_UINT32 upper_rssi_limit;
12178 /**lower RSSI limit */
12179 A_UINT32 lower_rssi_limit;
12180} wmi_extscan_wlan_change_bssid_param;
12181
12182typedef struct {
12183 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
12184 /** Request ID - to identify command. Cannot be 0 */
12185 A_UINT32 request_id;
12186 /** Requestor ID - client requesting wlan change monitoring */
12187 A_UINT32 requestor_id;
12188 /** VDEV id(interface) that is requesting scan */
12189 A_UINT32 vdev_id;
12190 /** table ID - to allow support for multiple simultaneous tables */
12191 A_UINT32 table_id;
12192 /** operation mode: start/stop */
12193 A_UINT32 mode; /* wmi_extscan_operation_mode */
12194 /** number of rssi samples to store */
12195 A_UINT32 max_rssi_samples;
12196 /** number of samples to use to calculate RSSI average */
12197 A_UINT32 rssi_averaging_samples;
12198 /** number of scans to confirm loss of contact with RSSI */
12199 A_UINT32 lost_ap_scan_count;
12200 /** number of out-of-range BSSIDs necessary to send event */
12201 A_UINT32 max_out_of_range_count;
12202 /** total number of bssid signal descriptors (in all pages) */
12203 A_UINT32 total_entries;
12204 /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
12205 A_UINT32 first_entry_index;
12206 /** number of bssid signal descriptors in this page */
12207 A_UINT32 num_entries_in_page;
12208 /* Following this structure is the TLV:
12209 * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[]; // number of elements given by field num_page_entries.
12210 */
12211} wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
12212
12213typedef struct {
12214 /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12215 A_UINT32 tlv_header;
12216 /**ssid */
12217 wmi_ssid ssid;
12218 /**band */
12219 A_UINT32 band;
12220 /**RSSI threshold for reporting */
12221 A_UINT32 min_rssi;
12222 A_UINT32 max_rssi;
12223} wmi_extscan_hotlist_ssid_entry;
12224
12225typedef struct {
12226 /**
12227 * TLV tag and len; tag equals
12228 * MITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param
12229 */
12230 A_UINT32 tlv_header;
12231 /** Request ID - to identify command. Cannot be 0 */
12232 A_UINT32 request_id;
12233 /** Requestor ID - client requesting hotlist ssid monitoring */
12234 A_UINT32 requestor_id;
12235 /** VDEV id(interface) that is requesting scan */
12236 A_UINT32 vdev_id;
12237 /** table ID - to allow support for multiple simultaneous tables */
12238 A_UINT32 table_id;
12239 /** operation mode: start/stop */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012240 A_UINT32 mode; /* wmi_extscan_operation_mode */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012241 /**total number of ssids (in all pages) */
12242 A_UINT32 total_entries;
12243 /**index of the first ssid entry found in the TLV extscan_hotlist_ssid_entry*/
12244 A_UINT32 first_entry_index;
12245 /**number of ssids in this page */
12246 A_UINT32 num_entries_in_page;
12247 /** number of consecutive scans to confirm loss of an ssid **/
12248 A_UINT32 lost_ap_scan_count;
12249 /* Following this structure is the TLV:
12250 * wmi_extscan_hotlist_ssid_entry hotlist_ssid[];
12251 * number of element given by field num_page_entries.
12252 */
12253} wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
12254
12255typedef struct {
12256 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12257 /**bssid */
12258 wmi_mac_addr bssid;
12259 /**RSSI min threshold for reporting */
12260 A_UINT32 min_rssi;
12261 /**Deprecated entry channel number */
12262 A_UINT32 channel;
12263 /** RSSI max threshold for reporting */
12264 A_UINT32 max_rssi;
12265} wmi_extscan_hotlist_entry;
12266
12267typedef struct {
12268 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
12269 /** Request ID - to identify command. Cannot be 0 */
12270 A_UINT32 request_id;
12271 /** Requestor ID - client requesting hotlist monitoring */
12272 A_UINT32 requestor_id;
12273 /** VDEV id(interface) that is requesting scan */
12274 A_UINT32 vdev_id;
12275 /** table ID - to allow support for multiple simultaneous tables */
12276 A_UINT32 table_id;
12277 /** operation mode: start/stop */
12278 A_UINT32 mode; /* wmi_extscan_operation_mode */
12279 /**total number of bssids (in all pages) */
12280 A_UINT32 total_entries;
12281 /**index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry*/
12282 A_UINT32 first_entry_index;
12283 /**number of bssids in this page */
12284 A_UINT32 num_entries_in_page;
12285 /** number of consecutive scans to confirm loss of contact with AP */
12286 A_UINT32 lost_ap_scan_count;
12287 /* Following this structure is the TLV:
12288 * wmi_extscan_hotlist_entry hotlist[]; // number of elements given by field num_page_entries.
12289 */
12290} wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
12291
12292 typedef struct {
12293 /* TLV tag and len; tag equals
12294 *WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
12295 A_UINT32 tlv_header;
12296 /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
12297 A_UINT32 config_request_id;
12298 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID
12299 that configured the table */
12300 A_UINT32 config_requestor_id;
12301 /**
12302 * VDEV id(interface) of the
12303 * WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table
12304 */
12305 A_UINT32 config_vdev_id;
12306 /** table ID - to allow support for multiple simultaneous tables */
12307 A_UINT32 table_id;
12308 /**total number of ssids (in all pages) */
12309 A_UINT32 total_entries;
12310 /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
12311 A_UINT32 first_entry_index;
12312 /**number of ssids in this page */
12313 A_UINT32 num_entries_in_page;
12314 /* Following this structure is the TLV:
12315 * wmi_extscan_wlan_descriptor hotlist_match[];
12316 * number of descriptors given by field num_entries_in_page
12317 */
12318} wmi_extscan_hotlist_ssid_match_event_fixed_param;
12319
12320typedef struct {
12321 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12322 /** table ID - to allow support for multiple simultaneous tables */
12323 A_UINT32 table_id;
12324 /** size in bytes of scan cache entry */
12325 A_UINT32 scan_cache_entry_size;
12326 /** maximum number of scan cache entries */
12327 A_UINT32 max_scan_cache_entries;
12328 /** maximum number of buckets per extscan request */
12329 A_UINT32 max_buckets;
12330 /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
12331 A_UINT32 max_bssid_per_scan;
12332 /** table usage level at which indication must be sent to host */
12333 A_UINT32 max_table_usage_threshold;
12334} wmi_extscan_cache_capabilities;
12335
12336typedef struct {
12337 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12338 /** table ID - to allow support for multiple simultaneous tables */
12339 A_UINT32 table_id;
12340 /** size in bytes of wlan change entry */
12341 A_UINT32 wlan_change_entry_size;
12342 /** maximum number of entries in wlan change table */
12343 A_UINT32 max_wlan_change_entries;
12344 /** number of RSSI samples used for averaging RSSI */
12345 A_UINT32 max_rssi_averaging_samples;
12346 /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
12347 A_UINT32 max_rssi_history_entries;
12348} wmi_extscan_wlan_change_monitor_capabilities;
12349
12350typedef struct {
12351 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12352 /** table ID - to allow support for multiple simultaneous tables */
12353 A_UINT32 table_id;
12354 /** size in bytes of hotlist entry */
12355 A_UINT32 wlan_hotlist_entry_size;
12356 /** maximum number of entries in wlan change table */
12357 A_UINT32 max_hotlist_entries;
12358} wmi_extscan_hotlist_monitor_capabilities;
12359
12360typedef struct {
12361 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
12362 /** Request ID - matches request ID used to start hot list monitoring */
12363 A_UINT32 request_id;
12364 /** Requestor ID - client requesting stop */
12365 A_UINT32 requestor_id;
12366 /** number of extscan caches */
12367 A_UINT32 num_extscan_cache_tables;
12368 /** number of wlan change lists */
12369 A_UINT32 num_wlan_change_monitor_tables;
12370 /** number of hotlists */
12371 A_UINT32 num_hotlist_monitor_tables;
12372 /** if one sided rtt data collection is supported */
12373 A_UINT32 rtt_one_sided_supported;
12374 /** if 11v data collection is supported */
12375 A_UINT32 rtt_11v_supported;
12376 /** if 11mc data collection is supported */
12377 A_UINT32 rtt_ftm_supported;
12378 /** number of extscan cache capabilities (one per table) */
12379 A_UINT32 num_extscan_cache_capabilities;
12380 /** number of wlan change capabilities (one per table) */
12381 A_UINT32 num_extscan_wlan_change_capabilities;
12382 /** number of extscan hotlist capabilities (one per table) */
12383 A_UINT32 num_extscan_hotlist_capabilities;
12384 /* Following this structure is the TLV:
12385 * wmi_extscan_cache_capabilities extscan_cache_capabilities; // number of capabilities given by num_extscan_caches
12386 * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; // number of capabilities given by num_wlan_change_monitor_tables
12387 * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; // number of capabilities given by num_hotlist_monitor_tables
12388 */
12389} wmi_extscan_set_capabilities_cmd_fixed_param;
12390
12391typedef struct {
12392 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
12393 /** Request ID - matches request ID used to start hot list monitoring */
12394 A_UINT32 request_id;
12395 /** Requestor ID - client requesting capabilities */
12396 A_UINT32 requestor_id;
12397} wmi_extscan_get_capabilities_cmd_fixed_param;
12398
12399typedef struct {
12400 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
12401 /** Request ID of the operation that was started/stopped */
12402 A_UINT32 request_id;
12403 /** Requestor ID of the operation that was started/stopped */
12404 A_UINT32 requestor_id;
12405 /** VDEV id(interface) of the operation that was started/stopped */
12406 A_UINT32 vdev_id;
12407 /** extscan WMI command */
12408 A_UINT32 command;
12409 /** operation mode: start/stop */
12410 A_UINT32 mode; /* wmi_extscan_operation_mode */
12411 /**success/failure */
12412 A_UINT32 status; /* enum wmi_extscan_start_stop_status */
12413 /** table ID - to allow support for multiple simultaneous requests */
12414 A_UINT32 table_id;
12415} wmi_extscan_start_stop_event_fixed_param;
12416
12417typedef struct {
12418 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
12419 /** Request ID of the extscan operation that is currently running */
12420 A_UINT32 request_id;
12421 /** Requestor ID of the extscan operation that is currently running */
12422 A_UINT32 requestor_id;
12423 /** VDEV id(interface) of the extscan operation that is currently running */
12424 A_UINT32 vdev_id;
12425 /** scan event (wmi_scan_event_type) */
12426 A_UINT32 event; /* wmi_extscan_event_type */
12427 /** table ID - to allow support for multiple simultaneous requests */
12428 A_UINT32 table_id;
12429 /**number of buckets */
12430 A_UINT32 num_buckets;
12431 /* Following this structure is the TLV:
12432 * A_UINT32 bucket_id[]; // number of elements given by field num_buckets.
12433 */
12434} wmi_extscan_operation_event_fixed_param;
12435
12436/* Types of extscan tables */
12437typedef enum {
12438 EXTSCAN_TABLE_NONE = 0,
12439 EXTSCAN_TABLE_BSSID = 1,
12440 EXTSCAN_TABLE_RSSI = 2,
12441} wmi_extscan_table_type;
12442
12443typedef struct {
12444 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
12445 /** Request ID of the extscan operation that is currently running */
12446 A_UINT32 request_id;
12447 /** Requestor ID of the extscan operation that is currently running */
12448 A_UINT32 requestor_id;
12449 /** VDEV id(interface) of the extscan operation that is currently running */
12450 A_UINT32 vdev_id;
12451 /** table ID - to allow support for multiple simultaneous tables */
12452 A_UINT32 table_id;
12453 /**see wmi_extscan_table_type for table reporting usage */
12454 A_UINT32 table_type;
12455 /**number of entries in use */
12456 A_UINT32 entries_in_use;
12457 /**maximum number of entries in table */
12458 A_UINT32 maximum_entries;
12459} wmi_extscan_table_usage_event_fixed_param;
12460
12461typedef enum {
12462 /**
12463 * Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
12464 * this can be used to discard scan results
12465 */
12466 WMI_SCAN_STATUS_INTERRUPTED = 1
12467} wmi_scan_status_flags;
12468
12469
12470typedef struct {
12471 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
Anurag Chouhancc474b72016-04-18 17:36:23 +053012472 /** RSSI */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012473 A_UINT32 rssi;
Anurag Chouhancc474b72016-04-18 17:36:23 +053012474 /** time stamp in milliseconds */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012475 A_UINT32 tstamp;
12476 /** Extscan cycle during which this entry was scanned */
12477 A_UINT32 scan_cycle_id;
12478 /**
12479 * flag to indicate if the given result was obtained as part of
12480 * interrupted (aborted/large time gap preempted) scan
12481 */
12482 A_UINT32 flags;
Anurag Chouhancc474b72016-04-18 17:36:23 +053012483 /** Bitmask of buckets (i.e. sets of channels) scanned */
12484 A_UINT32 buckets_scanned;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012485} wmi_extscan_rssi_info;
12486
12487typedef struct {
12488 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12489 /**bssid */
12490 wmi_mac_addr bssid;
12491 /**ssid */
12492 wmi_ssid ssid;
12493 /**channel number */
12494 A_UINT32 channel;
12495 /* capabilities */
12496 A_UINT32 capabilities;
12497 /* beacon interval in TUs */
12498 A_UINT32 beacon_interval;
12499 /**time stamp in milliseconds - time last seen */
12500 A_UINT32 tstamp;
12501 /**flags - _tExtScanEntryFlags */
12502 A_UINT32 flags;
12503 /**RTT in ns */
12504 A_UINT32 rtt;
12505 /**rtt standard deviation */
12506 A_UINT32 rtt_sd;
12507 /* rssi information */
12508 A_UINT32 number_rssi_samples;
12509 /** IE length */
12510 A_UINT32 ie_length; /* length of IE data */
12511} wmi_extscan_wlan_descriptor;
12512
12513typedef struct {
12514 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
12515 /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
12516 A_UINT32 request_id;
12517 /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
12518 A_UINT32 requestor_id;
12519 /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
12520 A_UINT32 vdev_id;
12521 /** Request ID of the extscan operation that is currently running */
12522 A_UINT32 extscan_request_id;
12523 /** Requestor ID of the extscan operation that is currently running */
12524 A_UINT32 extscan_requestor_id;
12525 /** VDEV id(interface) of the extscan operation that is currently running */
12526 A_UINT32 extscan_vdev_id;
12527 /** table ID - to allow support for multiple simultaneous tables */
12528 A_UINT32 table_id;
12529 /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
12530 A_UINT32 current_tstamp;
12531 /**total number of bssids (in all pages) */
12532 A_UINT32 total_entries;
12533 /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
12534 A_UINT32 first_entry_index;
12535 /**number of bssids in this page */
12536 A_UINT32 num_entries_in_page;
Govind Singhfad2f212016-01-21 10:55:51 +053012537 /* number of buckets scanned */
12538 A_UINT32 buckets_scanned;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012539 /* Followed by the variable length TLVs
12540 * wmi_extscan_wlan_descriptor bssid_list[]
12541 * wmi_extscan_rssi_info rssi_list[]
12542 * A_UINT8 ie_list[]
12543 */
12544} wmi_extscan_cached_results_event_fixed_param;
12545
12546typedef enum {
12547 EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00,
12548 EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
12549 EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02,
12550} wmi_extscan_wlan_change_flags;
12551
12552typedef struct {
12553 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12554 /**bssid */
12555 wmi_mac_addr bssid;
12556 /**time stamp in milliseconds */
12557 A_UINT32 tstamp;
12558 /**upper RSSI limit */
12559 A_UINT32 upper_rssi_limit;
12560 /**lower RSSI limit */
12561 A_UINT32 lower_rssi_limit;
12562 /** channel */
12563 A_UINT32 channel; /* in MHz */
12564 /**current RSSI average */
12565 A_UINT32 rssi_average;
12566 /**flags - wmi_extscan_wlan_change_flags */
12567 A_UINT32 flags;
12568 /**legnth of RSSI history to follow (number of values) */
12569 A_UINT32 num_rssi_samples;
12570} wmi_extscan_wlan_change_result_bssid;
12571
12572typedef struct {
12573 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
12574 /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
12575 A_UINT32 request_id;
12576 /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
12577 A_UINT32 requestor_id;
12578 /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
12579 A_UINT32 vdev_id;
12580 /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
12581 A_UINT32 config_request_id;
12582 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
12583 A_UINT32 config_requestor_id;
12584 /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
12585 A_UINT32 config_vdev_id;
12586 /** table ID - to allow support for multiple simultaneous tables */
12587 A_UINT32 table_id;
12588 /**number of entries with RSSI out of range or BSSID not detected */
12589 A_UINT32 change_count;
12590 /**total number of bssid signal descriptors (in all pages) */
12591 A_UINT32 total_entries;
12592 /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
12593 A_UINT32 first_entry_index;
12594 /**number of bssids signal descriptors in this page */
12595 A_UINT32 num_entries_in_page;
12596 /* Following this structure is the TLV:
12597 * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[]; // number of descriptors given by field num_entries_in_page.
12598 * Following this structure is the list of RSSI values (each is an A_UINT8):
12599 * A_UINT8 rssi_list[]; // last N RSSI values.
12600 */
12601} wmi_extscan_wlan_change_results_event_fixed_param;
12602
12603enum _tExtScanEntryFlags {
12604 WMI_HOTLIST_FLAG_NONE = 0x00,
12605 WMI_HOTLIST_FLAG_PRESENCE = 0x01,
12606 WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
12607};
12608
12609typedef struct {
12610 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
12611 /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
12612 A_UINT32 config_request_id;
12613 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
12614 A_UINT32 config_requestor_id;
12615 /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
12616 A_UINT32 config_vdev_id;
12617 /** table ID - to allow support for multiple simultaneous tables */
12618 A_UINT32 table_id;
12619 /**total number of bssids (in all pages) */
12620 A_UINT32 total_entries;
12621 /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
12622 A_UINT32 first_entry_index;
12623 /**number of bssids in this page */
12624 A_UINT32 num_entries_in_page;
12625 /* Following this structure is the TLV:
12626 * wmi_extscan_wlan_descriptor hotlist_match[]; // number of descriptors given by field num_entries_in_page.
12627 */
12628} wmi_extscan_hotlist_match_event_fixed_param;
12629
12630typedef struct {
12631 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
12632 /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
12633 A_UINT32 request_id;
12634 /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
12635 A_UINT32 requestor_id;
12636 /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
12637 A_UINT32 vdev_id;
12638 /** number of extscan caches */
12639 A_UINT32 num_extscan_cache_tables;
12640 /** number of wlan change lists */
12641 A_UINT32 num_wlan_change_monitor_tables;
12642 /** number of hotlists */
12643 A_UINT32 num_hotlist_monitor_tables;
12644 /** if one sided rtt data collection is supported */
12645 A_UINT32 rtt_one_sided_supported;
12646 /** if 11v data collection is supported */
12647 A_UINT32 rtt_11v_supported;
12648 /** if 11mc data collection is supported */
12649 A_UINT32 rtt_ftm_supported;
12650 /** number of extscan cache capabilities (one per table) */
12651 A_UINT32 num_extscan_cache_capabilities;
12652 /** number of wlan change capabilities (one per table) */
12653 A_UINT32 num_extscan_wlan_change_capabilities;
12654 /** number of extscan hotlist capabilities (one per table) */
12655 A_UINT32 num_extscan_hotlist_capabilities;
12656 /* max number of roaming ssid whitelist firmware can support */
12657 A_UINT32 num_roam_ssid_whitelist;
12658 /* max number of blacklist bssid firmware can support */
12659 A_UINT32 num_roam_bssid_blacklist;
12660 /* max number of preferred list firmware can support */
12661 A_UINT32 num_roam_bssid_preferred_list;
12662 /* max number of hotlist ssids firmware can support */
12663 A_UINT32 num_extscan_hotlist_ssid;
12664 /* max number of epno networks firmware can support */
12665 A_UINT32 num_epno_networks;
12666
12667 /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
12668 * supports multiple lists of each type.
12669 *
12670 * wmi_extscan_cache_capabilities extscan_cache_capabilities[] // capabilities of extscan cache (BSSID/RSSI lists)
12671 * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] // capabilities of wlan_change_monitor_tables
12672 * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] // capabilities of hotlist_monitor_tables
12673 */
12674} wmi_extscan_capabilities_event_fixed_param;
12675
12676/* WMI_D0_WOW_DISABLE_ACK_EVENTID */
12677typedef struct {
12678 A_UINT32 tlv_header;
12679 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */
12680 A_UINT32 reserved0; /* for future need */
12681} wmi_d0_wow_disable_ack_event_fixed_param;
12682
12683/** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
12684typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053012685 /** TLV tag and len; tag equals
12686 * WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param
12687 */
12688 A_UINT32 tlv_header;
12689 /** pdev_id for identifying the MAC
12690 * See macros starting with WMI_PDEV_ID_ for values.
12691 */
12692 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012693} wmi_pdev_resume_event_fixed_param;
12694
12695/** value representing all modules */
12696#define WMI_DEBUG_LOG_MODULE_ALL 0xffff
12697
12698/* param definitions */
12699
12700/**
12701 * Log level for a given module. Value contains both module id and log level.
12702 * here is the bitmap definition for value.
12703 * module Id : 16
12704 * Flags : reserved
12705 * Level : 8
12706 * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global).
12707 * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
12708 */
12709#define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1
12710
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012711#define WMI_DBGLOG_SET_LOG_LEVEL(val, lvl) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012712 (val) |= (lvl & 0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012713} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012714
12715#define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
12716
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012717#define WMI_DBGLOG_SET_MODULE_ID(val, mid) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012718 (val) |= ((mid & 0xffff) << 16); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012719} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012720
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012721#define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012722
12723/**
12724 * Enable the debug log for a given vdev. Value is vdev id
12725 */
12726#define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2
12727
12728/**
12729 * Disable the debug log for a given vdev. Value is vdev id
12730 * All the log level for a given VDEV is disabled except the ERROR log messages
12731 */
12732
12733#define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3
12734
12735/**
12736 * set vdev enable bitmap. value is the vden enable bitmap
12737 */
12738#define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4
12739
12740/**
12741 * set a given log level to all the modules specified in the module bitmap.
12742 * and set the log levle for all other modules to DBGLOG_ERR.
12743 * value: log levelt to be set.
12744 * module_id_bitmap : identifies the modules for which the log level should be set and
12745 * modules for which the log level should be reset to DBGLOG_ERR.
12746 */
12747#define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5
12748
12749#define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
12750
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012751#define WMI_MODULE_ENABLE(pmid_bitmap, mod_id) \
12752 ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
12753 (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012754
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012755#define WMI_MODULE_DISABLE(pmid_bitmap, mod_id) \
12756 ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \
12757 (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012758
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012759#define WMI_MODULE_IS_ENABLED(pmid_bitmap, mod_id) \
12760 (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \
12761 (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012762
12763#define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
12764typedef struct {
12765 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
12766 A_UINT32 dbg_log_param;
12767 /** param types are defined above */
12768 A_UINT32 value;
12769 /* The below array will follow this tlv ->fixed length module_id_bitmap[]
12770 A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
12771 */
12772} wmi_debug_log_config_cmd_fixed_param;
12773
12774typedef struct {
12775 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */
12776 A_UINT32 param; /* Reserved for future use */
Govind Singh869c9872016-02-22 18:36:34 +053012777 /** pdev_id for identifying the MAC
12778 * See macros starting with WMI_PDEV_ID_ for values.
12779 */
12780 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012781} wmi_pdev_get_temperature_cmd_fixed_param;
12782
12783typedef struct {
12784 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
12785 A_INT32 value; /* temprature value in Celcius degree */
Govind Singh869c9872016-02-22 18:36:34 +053012786 /** pdev_id for identifying the MAC
12787 * See macros starting with WMI_PDEV_ID_ for values.
12788 */
12789 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012790} wmi_pdev_temperature_event_fixed_param;
12791
12792typedef struct {
12793 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
12794 A_UINT32 vdev_id;
12795 A_UINT32 enable;
12796 A_UINT32 srv_ipv4; /* server IP */
12797 A_UINT32 start_lsb; /* starting address assigned to client */
12798 A_UINT32 num_client; /* number of clients we support */
12799} wmi_set_dhcp_server_offload_cmd_fixed_param;
12800
12801typedef enum {
12802 AP_RX_DATA_OFFLOAD = 0x00,
12803 STA_RX_DATA_OFFLOAD = 0x01,
12804} wmi_ipa_offload_types;
12805
12806/**
12807 * This command is sent from WLAN host driver to firmware for
12808 * enabling/disabling IPA data-path offload features.
12809 *
12810 *
12811 * Enabling data path offload to IPA(based on host INI configuration), example:
12812 * when STA interface comes up,
12813 * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
12814 * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
12815 *
12816 * Disabling data path offload to IPA, example:
12817 * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
12818 * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
12819 *
12820 *
12821 * This command is applicable only on the PCIE LL systems
12822 *
12823 */
12824typedef struct {
12825 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
12826 A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
12827 A_UINT32 vdev_id;
12828 A_UINT32 enable; /* 1 == enable, 0 == disable */
12829} wmi_ipa_offload_enable_disable_cmd_fixed_param;
12830
12831typedef enum {
12832 WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0,
12833 WMI_LED_FLASHING_PATTERN_CONNECTED = 1,
12834 WMI_LED_FLASHING_PATTERN_RESERVED = 2,
12835} wmi_set_led_flashing_type;
12836
12837/**
12838 The state of the LED GPIO control is determined by two 32 bit values(X_0 and X_1) to produce a 64 bit value.
12839 Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
12840 remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
12841 with the MSB of X_0 and continues to the LSB of X_1. After executing the timer interval of the LSB of X_1, the
12842 pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to
12843 High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
12844 Zero is reached, it is skipped and moves on to the next interval.
12845 */
12846typedef struct {
12847 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */
12848 A_UINT32 pattern_id; /* pattern identifier */
12849 A_UINT32 led_x0; /* led flashing parameter0 */
12850 A_UINT32 led_x1; /* led flashing parameter1 */
12851 A_UINT32 gpio_num; /* GPIO number */
12852} wmi_set_led_flashing_cmd_fixed_param;
12853
12854/**
12855 * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
12856 * within small networks that do not include a local name server.
12857 * It utilizes essentially the same programming interfaces, packet formats and operating semantics
12858 * as the unicast DNS, and the advantage is zero configuration service while no need for central or
12859 * global server.
12860 * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
12861 * by type in a specified domain using standard DNS queries.
12862 * Here, we provide the ability to advertise the available services by responding to mDNS queries.
12863 */
12864typedef struct {
12865 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
12866 A_UINT32 vdev_id;
12867 A_UINT32 enable;
12868} wmi_mdns_offload_cmd_fixed_param;
12869
12870#define WMI_MAX_MDNS_FQDN_LEN 64
12871#define WMI_MAX_MDNS_RESP_LEN 512
12872#define WMI_MDNS_FQDN_TYPE_GENERAL 0
12873#define WMI_MDNS_FQDN_TYPE_UNIQUE 1
12874
12875typedef struct {
12876 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
12877 A_UINT32 vdev_id;
12878 /** type of fqdn, general or unique */
12879 A_UINT32 type;
12880 /** length of fqdn */
12881 A_UINT32 fqdn_len;
12882 /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
12883 * A_UINT8 fqdn_data[]; // fully-qualified domain name to check if match with the received queries
12884 */
12885} wmi_mdns_set_fqdn_cmd_fixed_param;
12886
12887typedef struct {
12888 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
12889 A_UINT32 vdev_id;
12890 /** Answer Resource Record count */
12891 A_UINT32 AR_count;
12892 /** length of response */
12893 A_UINT32 resp_len;
12894 /* Following this structure is the TLV byte stream of resp data of length resp_len
12895 * A_UINT8 resp_data[]; // responses consisits of Resource Records
12896 */
12897} wmi_mdns_set_resp_cmd_fixed_param;
12898
12899typedef struct {
12900 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
12901 A_UINT32 vdev_id;
12902} wmi_mdns_get_stats_cmd_fixed_param;
12903
12904typedef struct {
12905 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
12906 A_UINT32 vdev_id;
12907 /** curTimestamp in milliseconds */
12908 A_UINT32 curTimestamp;
12909 /** last received Query in milliseconds */
12910 A_UINT32 lastQueryTimestamp;
12911 /** last sent Response in milliseconds */
12912 A_UINT32 lastResponseTimestamp;
12913 /** stats of received queries */
12914 A_UINT32 totalQueries;
12915 /** stats of macth queries */
12916 A_UINT32 totalMatches;
12917 /** stats of responses */
12918 A_UINT32 totalResponses;
12919 /** indicate the current status of mDNS offload */
12920 A_UINT32 status;
12921} wmi_mdns_stats_event_fixed_param;
12922
12923/**
12924 * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
12925 * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
12926 * request and create/remove connection even host is suspended.
12927 * 3 major components are offloaded:
12928 * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
12929 * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
12930 * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
12931 * Current implementation only supports WPA2 CCMP.
12932 */
12933
12934typedef struct {
12935 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
12936 /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
12937 A_UINT32 vdev_id;
12938 /** enable/disable sap auth offload */
12939 A_UINT32 enable;
12940 /** sap ssid */
12941 wmi_ssid ap_ssid;
12942 /** authentication mode (defined above) */
12943 A_UINT32 rsn_authmode;
12944 /** unicast cipher set */
12945 A_UINT32 rsn_ucastcipherset;
12946 /** mcast/group cipher set */
12947 A_UINT32 rsn_mcastcipherset;
12948 /** mcast/group management frames cipher set */
12949 A_UINT32 rsn_mcastmgmtcipherset;
12950 /** sap channel */
12951 A_UINT32 channel;
12952 /** length of psk */
12953 A_UINT32 psk_len;
12954 /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
12955 * A_UINT8 psk[];
12956 */
12957} wmi_sap_ofl_enable_cmd_fixed_param;
12958
12959typedef struct {
12960 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
12961 /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
12962 A_UINT32 vdev_id;
12963 /** aid (association id) of this station */
12964 A_UINT32 assoc_id;
12965 /** peer station's mac addr */
12966 wmi_mac_addr peer_macaddr;
12967 /** length of association request frame */
12968 A_UINT32 data_len;
12969 /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
12970 * A_UINT8 bufp[];
12971 */
12972} wmi_sap_ofl_add_sta_event_fixed_param;
12973
12974typedef enum {
12975 SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
12976 SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
12977} wmi_sap_ofl_del_sta_flags;
12978
12979typedef struct {
12980 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
12981 /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
12982 A_UINT32 vdev_id;
12983 /** aid (association id) of this station */
12984 A_UINT32 assoc_id;
12985 /** peer station's mac addr */
12986 wmi_mac_addr peer_macaddr;
12987 /** disassociation reason */
12988 A_UINT32 reason;
12989 /** flags - wmi_sap_ofl_del_sta_flags */
12990 A_UINT32 flags;
12991} wmi_sap_ofl_del_sta_event_fixed_param;
12992
12993typedef struct {
12994 /*
12995 * TLV tag and len; tag equals
12996 * WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param
12997 */
12998 A_UINT32 tlv_header;
12999 A_UINT32 vdev_id;
13000 /* Number of client failure connection attempt */
13001 A_UINT32 num_retry;
13002 /*Time in milliseconds to record the client's failure connection attempts*/
13003 A_UINT32 retry_allow_time_ms;
13004 /*
13005 * Time in milliseconds to drop the connection request if
13006 * client is blacklisted
13007 */
13008 A_UINT32 blackout_time_ms;
13009} wmi_sap_set_blacklist_param_cmd_fixed_param;
13010
13011typedef struct {
13012 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
13013 A_UINT32 data_len; /** length in byte of data[]. */
13014 /** This structure is used to send REQ binary blobs
13015 * from application/service to firmware where Host drv is pass through .
13016 * Following this structure is the TLV:
13017 * A_UINT8 data[]; // length in byte given by field data_len.
13018 */
13019} wmi_apfind_cmd_param;
13020
13021typedef enum apfind_event_type_e {
13022 APFIND_MATCH_EVENT = 0,
13023 APFIND_WAKEUP_EVENT,
13024} APFIND_EVENT_TYPE;
13025
13026typedef struct {
13027 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
13028 A_UINT32 event_type; /** APFIND_EVENT_TYPE */
13029 A_UINT32 data_len; /** length in byte of data[]. */
13030 /** This structure is used to send event binary blobs
13031 * from firmware to application/service and Host drv.
13032 * Following this structure is the TLV:
13033 * A_UINT8 data[]; // length in byte given by field data_len.
13034 */
13035} wmi_apfind_event_hdr;
13036
13037/**
13038 * OCB DCC types and structures.
13039 */
13040
13041/**
13042 * DCC types as described in ETSI TS 102 687
13043 * Type Format stepSize referenceValue numBits
13044 * -------------------------------------------------------------------------
13045 * ndlType_acPrio INTEGER (0...7) 1 number 3
13046 * ndlType_controlLoop INTEGER (0...7) 1 0 3
13047 * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13
13048 * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10
13049 * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13
13050 * ndlType_datarate INTEGER (0..7) Table 8 3
13051 * ndlType_distance INTEGER (0..4095) 1 m 0 12
13052 * ndlType_numberElements INTEGER (0..63) number 6
13053 * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11
13054 * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10
13055 * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5
13056 * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7
13057 * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7
13058 * ndlType_timing INTEGER (0..4095) 10 ms 0 12
13059 * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7
13060 * ndlType_ratio INTEGER (0..100) 1 % 0 % 7
13061 * ndlType_exponent INTEGER (0..100) 0.1 0 7
13062 * ndlType_queueStatus Enumeration Table A.2 1
13063 * ndlType_dccMechanism Bitset Table A.2 6
13064 *
13065 * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
13066 * cannot be changed without breaking WMI compatibility.
13067 *
13068 * NOTE: For each of the types, one additional bit is allocated. This
13069 * leftmost bit is used to indicate that the value is invalid.
13070 */
13071#define SIZE_NDLTYPE_ACPRIO (1 + 3)
13072#define SIZE_NDLTYPE_CONTROLLOOP (1 + 3)
13073#define SIZE_NDLTYPE_ARRIVALRATE (1 + 13)
13074#define SIZE_NDLTYPE_CHANNELLOAD (1 + 10)
13075#define SIZE_NDLTYPE_CHANNELUSE (1 + 13)
13076#define SIZE_NDLTYPE_DATARATE (1 + 3)
13077#define SIZE_NDLTYPE_DISTANCE (1 + 12)
13078#define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6)
13079#define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
13080#define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
13081#define SIZE_NDLTYPE_PATHLOSS (1 + 5)
13082#define SIZE_NDLTYPE_RXPOWER (1 + 7)
13083#define SIZE_NDLTYPE_SNR (1 + 7)
13084#define SIZE_NDLTYPE_TIMING (1 + 12)
13085#define SIZE_NDLTYPE_TXPOWER (1 + 7)
13086#define SIZE_NDLTYPE_RATIO (1 + 7)
13087#define SIZE_NDLTYPE_EXPONENT (1 + 7)
13088#define SIZE_NDLTYPE_QUEUESTATUS (1 + 1)
13089#define SIZE_NDLTYPE_DCCMECHANISM (1 + 6)
13090#define SIZE_BYTE (8)
13091
13092#define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
13093#define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
13094#define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
13095#define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
13096#define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
13097#define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1)
13098#define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
13099#define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
13100#define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
13101#define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
13102#define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
13103#define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
13104#define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1)
13105#define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1)
13106#define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
13107#define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1)
13108#define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
13109#define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
13110#define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
13111
13112/**
13113 * The MCS_COUNT macro cannot be modified without breaking
13114 * WMI compatibility.
13115 */
13116#define MCS_COUNT (8)
13117
13118/**
13119 * Flags for ndlType_dccMechanism.
13120 */
13121typedef enum {
13122 DCC_MECHANISM_TPC = 1,
13123 DCC_MECHANISM_TRC = 2,
13124 DCC_MECHANISM_TDC = 4,
13125 DCC_MECHANISM_DSC = 8,
13126 DCC_MECHANISM_TAC = 16,
13127 DCC_MECHANISM_RESERVED = 32,
13128 DCC_MECHANISM_ALL = 0x3f,
13129} wmi_dcc_ndl_type_dcc_mechanism;
13130
13131/** Values for ndlType_queueStatus. */
13132typedef enum {
13133 DCC_QUEUE_CLOSED = 0,
13134 DCC_QUEUE_OPEN = 1,
13135} wmi_dcc_ndl_type_queue_status;
13136
13137/**
13138 * For ndlType_acPrio, use the values in wmi_traffic_ac.
13139 * Values for ndlType_datarate.
13140 */
13141typedef enum {
13142 DCC_DATARATE_3_MBPS = 0,
13143 DCC_DATARATE_4_5_MBPS = 1,
13144 DCC_DATARATE_6_MBPS = 2,
13145 DCC_DATARATE_9_MBPS = 3,
13146 DCC_DATARATE_12_MBPS = 4,
13147 DCC_DATARATE_18_MBPS = 5,
13148 DCC_DATARATE_24_MBPS = 6,
13149 DCC_DATARATE_27_MBPS = 7,
13150} wmi_dcc_ndl_type_datarate;
13151
13152/** Data structure for active state configuration. */
13153typedef struct {
13154 /** TLV tag and len; tag equals
13155 * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config
13156 */
13157 A_UINT32 tlv_header;
13158 /**
13159 * NDL_asStateId, ndlType_numberElements, 1+6 bits.
13160 * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
13161 */
13162 A_UINT32 state_info;
13163 /**
13164 * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
13165 * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
13166 * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
13167 * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
13168 */
13169 A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
13170 /**
13171 * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
13172 * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
13173 * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
13174 * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
13175 */
13176 A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
13177 /**
13178 * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
13179 * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
13180 * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
13181 * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
13182 */
13183 A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
13184 /**
13185 * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
13186 * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
13187 * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
13188 * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
13189 */
13190 A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
13191 /**
13192 * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
13193 * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
13194 * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
13195 * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
13196 */
13197 A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
13198} wmi_dcc_ndl_active_state_config;
13199
13200#define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7)
13201#define WMI_NDL_AS_STATE_ID_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 0, 7, val)
13202#define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11)
13203#define WMI_NDL_AS_CHAN_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 7, 11, val)
13204#define WMI_NDL_AS_DCC_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
13205#define WMI_NDL_AS_DCC_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
13206#define WMI_NDL_AS_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
13207#define WMI_NDL_AS_TX_POWER_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER, val)
13208#define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
13209#define WMI_NDL_AS_PACKET_INTERVAL_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL, val)
13210#define WMI_NDL_AS_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
13211#define WMI_NDL_AS_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
13212#define WMI_NDL_AS_CARRIER_SENSE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
13213#define WMI_NDL_AS_CARRIER_SENSE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER, val)
13214
13215/** Data structure for EDCA/QOS parameters. */
13216typedef struct {
13217 /** TLV tag and len; tag equals
13218 * WMITLV_TAG_STRUC_wmi_qos_parameter */
13219 A_UINT32 tlv_header;
13220 /** Arbitration Inter-Frame Spacing. Range: 2-15 */
13221 A_UINT32 aifsn;
13222 /** Contention Window minimum. Range: 1 - 10 */
13223 A_UINT32 cwmin;
13224 /** Contention Window maximum. Range: 1 - 10 */
13225 A_UINT32 cwmax;
13226} wmi_qos_parameter;
13227
13228/** Data structure for information specific to a channel. */
13229typedef struct {
13230 /** TLV tag and len; tag equals
13231 * WMITLV_TAG_STRUC_wmi_ocb_channel */
13232 A_UINT32 tlv_header;
13233 A_UINT32 bandwidth; /* MHz units */
13234 wmi_mac_addr mac_address;
13235} wmi_ocb_channel;
13236
13237/** Data structure for an element of the schedule array. */
13238typedef struct {
13239 /** TLV tag and len; tag equals
13240 * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
13241 A_UINT32 tlv_header;
13242 A_UINT32 channel_freq; /* MHz units */
13243 A_UINT32 total_duration; /* ms units */
13244 A_UINT32 guard_interval; /* ms units */
13245} wmi_ocb_schedule_element;
13246
13247/** Data structure for OCB configuration. */
13248typedef struct {
13249 /** TLV tag and len; tag equals
13250 * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
13251 A_UINT32 tlv_header;
13252 /** VDEV id(interface) that is being configured */
13253 A_UINT32 vdev_id;
13254 A_UINT32 channel_count;
13255 A_UINT32 schedule_size;
13256 A_UINT32 flags;
13257
13258 /** This is followed by a TLV array of wmi_channel.
13259 * This is followed by a TLV array of wmi_ocb_channel.
13260 * This is followed by a TLV array of wmi_qos_parameter.
13261 * This is followed by a TLV array of wmi_dcc_ndl_chan.
13262 * This is followed by a TLV array of wmi_dcc_ndl_active_state_config.
13263 * This is followed by a TLV array of wmi_ocb_schedule_element.
13264 */
13265} wmi_ocb_set_config_cmd_fixed_param;
13266
13267
13268#define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0
13269#define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1
13270
13271#define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) \
13272 (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
13273
13274
13275/** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
13276typedef struct {
13277 /** TLV tag and len; tag equals
13278 * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param
13279 */
13280 A_UINT32 tlv_header;
13281 /* VDEV id(interface)*/
13282 A_UINT32 vdev_id;
13283 A_UINT32 status;
13284} wmi_ocb_set_config_resp_event_fixed_param;
13285
13286/* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
13287 * WMI compatibility.
13288 */
13289/* The size of the utc time in bytes. */
13290#define SIZE_UTC_TIME (10)
13291/* The size of the utc time error in bytes. */
13292#define SIZE_UTC_TIME_ERROR (5)
13293
13294/** Data structure to set the UTC time. */
13295typedef struct {
13296 /** TLV tag and len; tag equals
13297 * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
13298 A_UINT32 tlv_header;
13299 /*VDEV Identifier*/
13300 A_UINT32 vdev_id;
13301 /** 10 bytes of the utc time. */
13302 A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME, SIZE_BYTE)];
13303 /** 5 bytes of the time error. */
13304 A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR, SIZE_BYTE)];
13305} wmi_ocb_set_utc_time_cmd_fixed_param;
13306
13307#define WMI_UTC_TIME_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
13308#define WMI_UTC_TIME_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
13309#define WMI_TIME_ERROR_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
13310#define WMI_TIME_ERROR_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
13311
13312/** Data structure start the timing advertisement. The template for the
13313 * timing advertisement frame follows this structure in the WMI command.
13314 */
13315typedef struct {
13316 /** TLV tag and len; tag equals
13317 * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
13318 A_UINT32 tlv_header;
13319 /*VDEV Identifier*/
13320 A_UINT32 vdev_id;
13321 /** Number of times the TA is sent every 5 seconds. */
13322 A_UINT32 repeat_rate;
13323 /** The frequency on which to transmit. */
13324 A_UINT32 channel_freq; /* MHz units */
13325 /** The offset into the template of the timestamp. */
13326 A_UINT32 timestamp_offset;
13327 /** The offset into the template of the time value. */
13328 A_UINT32 time_value_offset;
13329 /** The length of the timing advertisement template. The
13330 * template is in the TLV data. */
13331 A_UINT32 timing_advert_template_length;
13332 /** This is followed by a binary array containing the TA template. */
13333} wmi_ocb_start_timing_advert_cmd_fixed_param;
13334
13335/** Data structure to stop the timing advertisement. */
13336typedef struct {
13337 /** TLV tag and len; tag equals
13338 * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
13339 A_UINT32 tlv_header;
13340 /*VDEV Identifier*/
13341 A_UINT32 vdev_id;
13342 A_UINT32 channel_freq; /* MHz units */
13343} wmi_ocb_stop_timing_advert_cmd_fixed_param;
13344
13345/** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
13346typedef struct {
13347 /** TLV tag and len; tag equals
13348 * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
13349 A_UINT32 tlv_header;
13350 /*VDEV Identifier*/
13351 A_UINT32 vdev_id;
13352 A_UINT32 reserved;
13353} wmi_ocb_get_tsf_timer_cmd_fixed_param;
13354
13355/** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
13356typedef struct {
13357 /** TLV tag and len; tag equals
13358 * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
13359 A_UINT32 tlv_header;
13360 /*VDEV Identifier*/
13361 A_UINT32 vdev_id;
13362 A_UINT32 tsf_timer_high;
13363 A_UINT32 tsf_timer_low;
13364} wmi_ocb_get_tsf_timer_resp_event_fixed_param;
13365
13366/** Data structure for DCC stats configuration per channel. */
13367typedef struct {
13368 /** TLV tag and len; tag equals
13369 * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
13370 A_UINT32 tlv_header;
13371
13372 /*VDEV Identifier*/
13373 A_UINT32 vdev_id;
13374
13375 /** The channel for which this applies, 16 bits.
13376 * The dcc_stats_bitmap, 8 bits. */
13377 A_UINT32 chan_info;
13378
13379 /** Demodulation model parameters.
13380 *
13381 * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
13382 * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
13383 * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
13384 * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
13385 * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
13386 * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
13387 * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
13388 * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
13389 */
13390 A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)];
13391
13392 /** Communication ranges.
13393 *
13394 * tx_power, ndlType_txPower, 1+7 bits.
13395 * datarate, ndlType_datarate, 1+3 bits.
13396 */
13397 A_UINT32 tx_power_datarate;
13398 /**
13399 * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
13400 * NDL_estCommRange, ndlType_distance, 1+12 bits.
13401 */
13402 A_UINT32 carrier_sense_est_comm_range;
13403
13404 /** Channel load measures. */
13405 /**
13406 * dccSensitivity, ndlType_rxPower, 1+7 bits.
13407 * carrierSense, ndlType_rxPower, 1+7 bits.
13408 * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
13409 */
13410 A_UINT32 dcc_stats;
13411 /**
13412 * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
13413 * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
13414 */
13415 A_UINT32 packet_stats;
13416 /**
13417 * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
13418 */
13419 A_UINT32 channel_busy_time;
13420 /**
13421 *Transmit packet statistics.
13422 * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
13423 * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
13424 * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
13425 * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
13426 */
13427 A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
13428 /**
13429 * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
13430 * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
13431 * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
13432 * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
13433 */
13434 A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
13435 /**
13436 * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
13437 * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
13438 * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
13439 * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
13440 */
13441 A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
13442 /**
13443 * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
13444 * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
13445 * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
13446 * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
13447 */
13448 A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
13449} wmi_dcc_ndl_stats_per_channel;
13450
13451#define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
13452#define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
13453#define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
13454#define WMI_NDL_STATS_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
13455#define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8)
13456#define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
13457#define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
13458#define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
13459#define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
13460#define WMI_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
13461#define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
13462#define WMI_TX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
13463#define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
13464#define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
13465#define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
13466#define WMI_NDL_EST_COMM_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
13467#define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
13468#define WMI_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
13469#define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
13470#define WMI_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
13471#define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
13472#define WMI_NDL_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
13473#define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14)
13474#define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
13475#define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12)
13476#define WMI_NDL_PACKET_AVG_DURATION_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
13477#define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
13478#define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr, val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
13479
13480#define WMI_NDL_TX_PACKET_ARRIVAL_RATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tx_packet_arrival_rate_ac, acprio, SIZE_NDLTYPE_ARRIVALRATE)
13481#define WMI_NDL_TX_PACKET_ARRIVAL_RATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tx_packet_arrival_rate_ac, acprio, SIZE_NDLTYPE_ARRIVALRATE, val)
13482#define WMI_NDL_TX_PACKET_AVG_DURATION_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tx_packet_avg_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
13483#define WMI_NDL_TX_PACKET_AVG_DURATION_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tx_packet_avg_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION, val)
13484#define WMI_NDL_TX_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
13485#define WMI_NDL_TX_CHANNEL_USE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE, val)
13486#define WMI_NDL_TX_SIGNAL_AVG_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tx_signal_avg_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
13487#define WMI_NDL_TX_SIGNAL_AVG_POWER_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tx_signal_avg_power_ac, acprio, SIZE_NDLTYPE_TXPOWER, val)
13488
13489/** Bitmap for DCC stats. */
13490typedef enum {
13491 DCC_STATS_DEMODULATION_MODEL = 1,
13492 DCC_STATS_COMMUNICATION_RANGES = 2,
13493 DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
13494 DCC_STATS_TRANSMIT_PACKET_STATS = 8,
13495 DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
13496 DCC_STATS_ALL = 0xff,
13497} wmi_dcc_stats_bitmap;
13498
13499/** Data structure for getting the DCC stats. */
13500typedef struct {
13501 /**
13502 * TLV tag and len; tag equals
13503 * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param
13504 */
13505 A_UINT32 tlv_header;
13506 /* VDEV identifier */
13507 A_UINT32 vdev_id;
13508 /**The number of channels for which stats are being requested. */
13509 A_UINT32 num_channels;
13510 /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
13511} wmi_dcc_get_stats_cmd_fixed_param;
13512
13513typedef struct {
13514 /**
13515 * TLV tag and len; tag equals
13516 * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request.
13517 */
13518 A_UINT32 tlv_header;
13519 /** The channel for which this applies. */
13520 A_UINT32 chan_freq; /* MHz units */
13521 /** The DCC stats being requested. */
13522 A_UINT32 dcc_stats_bitmap;
13523} wmi_dcc_channel_stats_request;
13524
13525/** Data structure for the response with the DCC stats. */
13526typedef struct {
13527 /**
13528 * TLV tag and len; tag equals
13529 * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param
13530 */
13531 A_UINT32 tlv_header;
13532 /* VDEV identifier */
13533 A_UINT32 vdev_id;
13534 /** Number of channels in the response. */
13535 A_UINT32 num_channels;
13536 /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
13537} wmi_dcc_get_stats_resp_event_fixed_param;
13538
13539/** Data structure for clearing the DCC stats. */
13540typedef struct {
13541 /**
13542 * TLV tag and len; tag equals
13543 * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param
13544 */
13545 A_UINT32 tlv_header;
13546 /* VDEV identifier */
13547 A_UINT32 vdev_id;
13548 A_UINT32 dcc_stats_bitmap;
13549} wmi_dcc_clear_stats_cmd_fixed_param;
13550
13551/** Data structure for the pushed DCC stats */
13552typedef struct {
13553 /**
13554 * TLV tag and len; tag equals
13555 * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param
13556 */
13557 A_UINT32 tlv_header;
13558 /* VDEV identifier */
13559 A_UINT32 vdev_id;
13560 /** The number of channels in the response. */
13561 A_UINT32 num_channels;
13562 /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
13563} wmi_dcc_stats_event_fixed_param;
13564
13565/** Data structure for updating NDL per channel. */
13566typedef struct {
13567 /**
13568 * TLV tag and len; tag equals
13569 * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan
13570 */
13571 A_UINT32 tlv_header;
13572 /**
13573 * Channel frequency, 16 bits
13574 * NDL_numActiveState, ndlType_numberElements, 1+6 bits
13575 */
13576 A_UINT32 chan_info;
13577 /**
13578 * NDL_minDccSampling, 10 bits.
13579 * Maximum time interval between subsequent checks of the DCC rules.
13580 */
13581 A_UINT32 ndl_min_dcc_sampling;
13582 /**
13583 * dcc_enable, 1 bit.
13584 * dcc_stats_enable, 1 bit.
13585 * dcc_stats_interval, 16 bits.
13586 */
13587 A_UINT32 dcc_flags;
13588 /** General DCC configuration.
13589 * NDL_timeUp, ndlType_timing, 1+12 bits.
13590 * NDL_timeDown, ndlType_timing, 1+12 bits.
13591 */
13592 A_UINT32 general_config;
13593 /** Transmit power thresholds.
13594 * NDL_minTxPower, ndlType_txPower, 1+7 bits.
13595 * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
13596 */
13597 /* see "ETSI TS 102 687" table above for units */
13598 A_UINT32 min_max_tx_power;
13599 /**
13600 * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
13601 * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
13602 * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
13603 * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
13604 */
13605 /* see "ETSI TS 102 687" table above for units */
13606 A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
13607 /** Packet timing thresholds.
13608 * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
13609 * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
13610 * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
13611 * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
13612 */
13613 A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
13614 /**
13615 * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
13616 * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
13617 */
13618 A_UINT32 min_max_packet_interval;
13619 /**
13620 * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
13621 * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
13622 * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
13623 * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits
13624 */
13625 A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
13626 /** Packet datarate thresholds.
13627 * NDL_minDatarate, ndlType_datarate, 1+3 bits.
13628 * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
13629 */
13630 A_UINT32 min_max_datarate;
13631 /**
13632 * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
13633 * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
13634 * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
13635 * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
13636 */
13637 A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
13638 /** Receive signal thresholds.
13639 * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
13640 * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
13641 * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
13642 */
13643 A_UINT32 min_max_def_carrier_sense;
13644
13645 /** Receive model parameter.
13646 * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
13647 * NDL_maxCsRange, ndlType_distance, 1+12 bits.
13648 * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
13649 */
13650 A_UINT32 receive_model_parameter;
13651
13652 /**
13653 * NDL_minSNR, ndlType_snr, 1+7 bits.
13654 */
13655 A_UINT32 receive_model_parameter_2;
13656
13657 /** Demodulation model parameters.
13658 * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
13659 * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
13660 * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
13661 * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
13662 * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
13663 * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
13664 * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
13665 * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
13666 */
13667 A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)];
13668 /** Transmit model parameters.
13669 * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
13670 * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
13671 * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
13672 * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
13673 */
13674 A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
13675 /**
13676 * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
13677 * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
13678 * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
13679 * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
13680 */
13681 A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
13682 /**
13683 * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
13684 * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
13685 * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
13686 * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
13687 */
13688 A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
13689 /* NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits. */
13690 A_UINT32 tm_max_channel_use;
13691 /**
13692 * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
13693 * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
13694 * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
13695 * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
13696 */
13697 A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
13698 /** Channel load thresholds.
13699 * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
13700 * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
13701 */
13702 A_UINT32 min_max_channel_load;
13703 /** Transmit queue parameters.
13704 * NDL_numQueue, ndlType_acPrio, 1+3 bits.
13705 * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
13706 * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
13707 * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
13708 * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
13709 */
13710 A_UINT32 transmit_queue_parameters;
13711 /**
13712 * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
13713 * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
13714 * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
13715 * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
13716 */
13717 A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
13718} wmi_dcc_ndl_chan;
13719
13720#define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
13721#define WMI_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
13722#define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7)
13723#define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
13724
13725#define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
13726#define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
13727
13728#define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
13729#define WMI_NDL_MEASURE_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
13730
13731
13732#define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
13733#define WMI_NDL_DCC_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
13734#define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
13735#define WMI_NDL_DCC_STATS_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
13736#define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
13737#define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
13738
13739#define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13)
13740#define WMI_NDL_TIME_UP_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 0, 13, val)
13741#define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13)
13742#define WMI_NDL_TIME_DOWN_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 13, 13, val)
13743
13744#define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
13745#define WMI_NDL_MIN_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
13746#define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
13747#define WMI_NDL_MAX_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
13748
13749#define WMI_NDL_DEF_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
13750#define WMI_NDL_DEF_TX_POWER_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER, val)
13751
13752#define WMI_NDL_MAX_PACKET_DURATION_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
13753#define WMI_NDL_MAX_PACKET_DURATION_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION, val)
13754#define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
13755#define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
13756#define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
13757#define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
13758#define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
13759#define WMI_NDL_DEF_PACKET_INTERVAL_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL, val)
13760
13761#define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
13762#define WMI_NDL_MIN_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
13763#define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
13764#define WMI_NDL_MAX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
13765#define WMI_NDL_DEF_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
13766#define WMI_NDL_DEF_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
13767
13768#define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
13769#define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
13770#define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
13771#define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
13772#define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
13773#define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
13774
13775#define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
13776#define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
13777#define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
13778#define WMI_NDL_MAX_CS_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
13779#define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
13780#define WMI_NDL_REF_PATH_LOSS_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
13781
13782#define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
13783#define WMI_NDL_MIN_SNR_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
13784
13785#define WMI_NDL_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
13786#define WMI_NDL_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
13787
13788#define WMI_NDL_TM_PACKET_ARRIVAL_RATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tm_packet_arrival_rate_ac, acprio, SIZE_NDLTYPE_ARRIVALRATE)
13789#define WMI_NDL_TM_PACKET_ARRIVAL_RATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tm_packet_arrival_rate_ac, acprio, SIZE_NDLTYPE_ARRIVALRATE, val)
13790#define WMI_NDL_TM_PACKET_AVG_DURATION_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tm_packet_avg_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
13791#define WMI_NDL_TM_PACKET_AVG_DURATION_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tm_packet_avg_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION, val)
13792#define WMI_NDL_TM_SIGNAL_AVG_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tm_signal_avg_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
13793#define WMI_NDL_TM_SIGNAL_AVG_POWER_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tm_signal_avg_power_ac, acprio, SIZE_NDLTYPE_TXPOWER, val)
13794#define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
13795#define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr, val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
13796#define WMI_NDL_TM_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
13797#define WMI_NDL_TM_CHANNEL_USE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE, val)
13798
13799#define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
13800#define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
13801#define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
13802#define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
13803
13804#define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
13805#define WMI_NDL_NUM_QUEUE_SET(ptr, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
13806#define WMI_NDL_REF_QUEUE_STATUS_GET(ptr, acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
13807#define WMI_NDL_REF_QUEUE_STATUS_SET(ptr, acprio, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
13808#define WMI_NDL_REF_QUEUE_LEN_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
13809#define WMI_NDL_REF_QUEUE_LEN_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
13810
13811/** Data structure for updating the NDL. */
13812typedef struct {
13813 /** TLV tag and len; tag equals
13814 * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
13815 A_UINT32 tlv_header;
13816 /* VDEV identifier */
13817 A_UINT32 vdev_id;
13818 /** The number of channels in the request. */
13819 A_UINT32 num_channel;
13820 /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
13821 /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
13822} wmi_dcc_update_ndl_cmd_fixed_param;
13823
13824typedef struct {
13825 /**
13826 * TLV tag and len; tag equals
13827 * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param
13828 */
13829 A_UINT32 tlv_header;
13830 /* VDEV identifier */
13831 A_UINT32 vdev_id;
13832 A_UINT32 status;
13833} wmi_dcc_update_ndl_resp_event_fixed_param;
13834
13835/* Actions for TSF timestamp */
13836typedef enum {
13837 TSF_TSTAMP_CAPTURE_REQ = 1,
13838 TSF_TSTAMP_CAPTURE_RESET = 2,
13839 TSF_TSTAMP_READ_VALUE = 3,
Govind Singhd2970e32016-01-21 10:30:02 +053013840 TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013841} wmi_tsf_tstamp_action;
13842
13843typedef struct {
13844 /** TLV tag and len; tag equals
13845 * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
13846 A_UINT32 tlv_header;
13847 /** unique id identifying the VDEV, generated by the caller */
13848 A_UINT32 vdev_id;
13849 /* action type, refer to wmi_tsf_tstamp_action */
13850 A_UINT32 tsf_action;
13851} wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
13852
13853typedef struct {
13854 /* TLV tag and len; tag equals
13855 * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
13856 A_UINT32 tlv_header;
13857 /* VDEV identifier */
13858 A_UINT32 vdev_id;
13859 /* low 32bit of tsf */
13860 A_UINT32 tsf_low;
13861 /* high 32 bit of tsf */
13862 A_UINT32 tsf_high;
Krishna Kumaar Natarajan40b3c112016-03-25 14:36:18 -070013863 /* low 32 bits of qtimer */
13864 A_UINT32 qtimer_low;
13865 /* high 32 bits of qtimer */
13866 A_UINT32 qtimer_high;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013867} wmi_vdev_tsf_report_event_fixed_param;
13868
13869typedef struct {
13870 /** TLV tag and len; tag equals
13871 * WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
13872 A_UINT32 tlv_header;
13873 /* unique id identifying the VDEV, generated by the caller */
13874 A_UINT32 vdev_id;
13875 /* unique id to identify the ie_data as defined by ieee 802.11 spec */
13876 A_UINT32 ie_id;
13877 /* ie_len corresponds to num of bytes in ie_data[] */
13878 A_UINT32 ie_len;
13879 /*
13880 * Following this structure is the TLV byte stream of ie data of length
13881 * buf_len:
13882 * A_UINT8 ie_data[];
13883 */
13884} wmi_vdev_set_ie_cmd_fixed_param;
13885
Govind Singh869c9872016-02-22 18:36:34 +053013886/* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013887typedef struct {
13888 /*
13889 * TLV tag and len; tag equals
13890 * WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param
13891 * Set Preferred Channel List
13892 */
13893 A_UINT32 tlv_header;
13894
13895 /* # of channels to scan */
13896 A_UINT32 num_chan;
13897 /*
13898 * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd
13899 * structure. The TLV's are:
13900 * A_UINT32 channel_list[];
13901 */
13902} wmi_soc_set_pcl_cmd_fixed_param;
13903
13904typedef struct {
13905 /* TLV tag and len; tag equals
Govind Singh869c9872016-02-22 18:36:34 +053013906 * WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param
13907 */
13908 A_UINT32 tlv_header;
13909 /** Set Preferred Channel List **/
13910
13911 /** pdev_id for identifying the MAC
13912 * See macros starting with WMI_PDEV_ID_ for values.
13913 */
13914 A_UINT32 pdev_id;
13915
13916 /** # of channels to scan */
13917 A_UINT32 num_chan;
13918 /**
13919 * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd
13920 * structure. The TLV's are:
13921 * A_UINT32 channel_weight[];
13922 * channel order & size will be as per the list provided
13923 * in WMI_SCAN_CHAN_LIST_CMDID
13924 **/
13925} wmi_pdev_set_pcl_cmd_fixed_param;
13926
13927/* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */
13928typedef struct {
13929 /* TLV tag and len; tag equals
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013930 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param
13931 * Set Hardware Mode */
13932 A_UINT32 tlv_header;
13933
13934 /* Hardware Mode Index */
13935 A_UINT32 hw_mode_index;
13936} wmi_soc_set_hw_mode_cmd_fixed_param;
13937
13938typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053013939 /* TLV tag and len; tag equals
13940 * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param
13941 */
13942 A_UINT32 tlv_header;
13943 /** Set Hardware Mode **/
13944
13945 /** pdev_id for identifying the MAC
13946 * See macros starting with WMI_PDEV_ID_ for values.
13947 */
13948 A_UINT32 pdev_id;
13949
13950 /* Hardware Mode Index */
13951 A_UINT32 hw_mode_index;
13952} wmi_pdev_set_hw_mode_cmd_fixed_param;
13953
13954/* DEPRECATED - use wmi_pdev_set_mac_config_cmd_fixed_param instead */
13955typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013956 /*
13957 * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param
13958 * Set Dual MAC Firmware Configuration
13959 */
13960 A_UINT32 tlv_header;
13961
13962 /* Concurrent scan configuration bits */
13963 A_UINT32 concurrent_scan_config_bits;
13964 /* Firmware mode configuration bits */
13965 A_UINT32 fw_mode_config_bits;
13966} wmi_soc_set_dual_mac_config_cmd_fixed_param;
13967
13968typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053013969 /* TLV tag and len; tag equals
13970 * WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param
13971 */
13972 A_UINT32 tlv_header;
13973 /** Set Dual MAC Firmware Configuration **/
13974
13975 /** pdev_id for identifying the MAC
13976 * See macros starting with WMI_PDEV_ID_ for values.
13977 */
13978 A_UINT32 pdev_id;
13979
13980 /* Concurrent scan configuration bits */
13981 A_UINT32 concurrent_scan_config_bits;
13982 /* Firmware mode configuration bits */
13983 A_UINT32 fw_mode_config_bits;
13984} wmi_pdev_set_mac_config_cmd_fixed_param;
13985
13986typedef struct { /* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013987 A_UINT32 num_tx_chains;
13988 A_UINT32 num_rx_chains;
13989 A_UINT32 reserved[2];
13990} soc_num_tx_rx_chains;
13991
13992typedef struct {
13993 A_UINT32 num_tx_chains_2g;
13994 A_UINT32 num_rx_chains_2g;
13995 A_UINT32 num_tx_chains_5g;
13996 A_UINT32 num_rx_chains_5g;
13997} band_num_tx_rx_chains;
13998
13999typedef union {
14000 soc_num_tx_rx_chains soc_txrx_chain_setting;
14001 band_num_tx_rx_chains band_txrx_chain_setting;
14002} antenna_num_tx_rx_chains;
14003
14004typedef enum {
14005 ANTENNA_MODE_DISABLED = 0x0,
14006 ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
14007 /* reserved */
14008} antenna_mode_reason;
14009
Govind Singh869c9872016-02-22 18:36:34 +053014010/* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014011typedef struct {
14012 /*
14013 * TLV tag and len;
14014 * tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param
14015 */
14016 A_UINT32 tlv_header;
14017
14018 /* the reason for setting antenna mode, refer antenna_mode_reason */
14019 A_UINT32 reason;
14020
14021 /*
14022 * The above reason parameter will select whether the following union
14023 * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
14024 */
14025 antenna_num_tx_rx_chains num_txrx_chains_setting;
14026} wmi_soc_set_antenna_mode_cmd_fixed_param;
14027
Govind Singh869c9872016-02-22 18:36:34 +053014028typedef struct {
14029 /* TLV tag and len; tag equals
14030 * WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param
14031 */
14032 A_UINT32 tlv_header;
14033
14034 /** pdev_id for identifying the MAC
14035 * See macros starting with WMI_PDEV_ID_ for values.
14036 */
14037 A_UINT32 pdev_id;
14038
14039 /* Bits 0-15 is the number of RX chains and
14040 * 16-31 is the number of TX chains
14041 */
14042 A_UINT32 num_txrx_chains;
14043} wmi_pdev_set_antenna_mode_cmd_fixed_param;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014044
14045/** Data structure for information specific to a VDEV to MAC mapping. */
Govind Singh869c9872016-02-22 18:36:34 +053014046/* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014047typedef struct {
14048 /*
14049 * TLV tag and len; tag equals
14050 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
14051 A_UINT32 tlv_header;
14052 A_UINT32 vdev_id; /* VDEV ID */
14053 A_UINT32 mac_id; /* MAC ID */
14054} wmi_soc_set_hw_mode_response_vdev_mac_entry;
14055
Govind Singh869c9872016-02-22 18:36:34 +053014056/** Data structure for information specific to a VDEV to MAC mapping. */
14057typedef struct {
14058 /** TLV tag and len; tag equals
14059 * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */
14060 A_UINT32 tlv_header;
14061
14062 /** pdev_id for identifying the MAC
14063 * See macros starting with WMI_PDEV_ID_ for values.
14064 */
14065 A_UINT32 pdev_id;
14066
14067 A_UINT32 vdev_id;
14068} wmi_pdev_set_hw_mode_response_vdev_mac_entry;
14069
14070/* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014071typedef struct {
14072 /* TLV tag and len; tag equals
14073 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param
14074 * Set Hardware Mode Response Event **/
14075 A_UINT32 tlv_header;
14076
14077 /* Status of set_hw_mode command
14078 * Values for Status:
14079 * 0 - OK; command successful
14080 * 1 - EINVAL; Requested invalid hw_mode
14081 * 2 - ECANCELED; HW mode change canceled
14082 * 3 - ENOTSUP; HW mode not supported
14083 * 4 - EHARDWARE; HW mode change prevented by hardware
14084 * 5 - EPENDING; HW mode change is pending
14085 * 6 - ECOEX; HW mode change conflict with Coex
14086 */
14087 A_UINT32 status;
14088 /* Configured Hardware Mode */
14089 A_UINT32 cfgd_hw_mode_index;
14090 /* Number of Vdev to Mac entries */
14091 A_UINT32 num_vdev_mac_entries;
14092 /*
14093 * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event
14094 * structure. The TLV's are:
14095 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
14096 */
14097} wmi_soc_set_hw_mode_response_event_fixed_param;
14098
14099typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053014100 /* TLV tag and len; tag equals
14101 * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param
14102 */
14103 A_UINT32 tlv_header;
14104 /** Set Hardware Mode Response Event **/
14105
14106 /** pdev_id for identifying the MAC
14107 * See macros starting with WMI_PDEV_ID_ for values.
14108 */
14109 A_UINT32 pdev_id;
14110
14111 /* Status of set_hw_mode command */
14112 /*
14113 * Values for Status:
14114 * 0 - OK; command successful
14115 * 1 - EINVAL; Requested invalid hw_mode
14116 * 2 - ECANCELED; HW mode change canceled
14117 * 3 - ENOTSUP; HW mode not supported
14118 * 4 - EHARDWARE; HW mode change prevented by hardware
14119 * 5 - EPENDING; HW mode change is pending
14120 * 6 - ECOEX; HW mode change conflict with Coex
14121 */
14122 A_UINT32 status;
14123 /* Configured Hardware Mode */
14124 A_UINT32 cfgd_hw_mode_index;
14125 /* Number of Vdev to Mac entries */
14126 A_UINT32 num_vdev_mac_entries;
14127 /**
14128 * TLV (tag length value ) parameters follow the
14129 * soc_set_hw_mode_response_event structure. The TLV's are:
14130 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
14131 */
14132} wmi_pdev_set_hw_mode_response_event_fixed_param;
14133
14134/* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */
14135typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014136 /*
14137 * TLV tag and len; tag equals
14138 * WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param
14139 * Hardware Mode Transition Event
14140 */
14141 A_UINT32 tlv_header;
14142 /* Original or old Hardware mode */
14143 A_UINT32 old_hw_mode_index;
14144 /* New Hardware Mode */
14145 A_UINT32 new_hw_mode_index;
14146 /* Number of Vdev to Mac entries */
14147 A_UINT32 num_vdev_mac_entries;
14148
14149 /**
14150 * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event
14151 * structure. The TLV's are:
14152 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
14153 */
14154} wmi_soc_hw_mode_transition_event_fixed_param;
14155
Govind Singh869c9872016-02-22 18:36:34 +053014156typedef struct {
14157 /* TLV tag and len; tag equals
14158 * WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param
14159 */
14160 A_UINT32 tlv_header;
14161 /** Hardware Mode Transition Event **/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014162
Govind Singh869c9872016-02-22 18:36:34 +053014163 /** pdev_id for identifying the MAC
14164 * See macros starting with WMI_PDEV_ID_ for values.
14165 */
14166 A_UINT32 pdev_id;
14167
14168 /* Original or old Hardware mode */
14169 A_UINT32 old_hw_mode_index;
14170 /* New Hardware Mode */
14171 A_UINT32 new_hw_mode_index;
14172 /* Number of Vdev to Mac entries */
14173 A_UINT32 num_vdev_mac_entries;
14174
14175 /**
14176 * TLV (tag length value ) parameters follow the
14177 * soc_set_hw_mode_response_event structure. The TLV's are:
14178 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
14179 */
14180} wmi_pdev_hw_mode_transition_event_fixed_param;
14181
14182/* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param
14183 * instead
14184 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014185typedef struct {
14186 /*
14187 * TLV tag and len; tag equals
14188 * WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param
14189 * Set Dual MAC Config Response Event
14190 */
14191 A_UINT32 tlv_header;
14192
14193 /* Status for set_dual_mac_config command */
14194 /*
14195 * Values for Status:
14196 * 0 - OK; command successful
14197 * 1 - EINVAL; Requested invalid hw_mode
14198 * 3 - ENOTSUP; HW mode not supported
14199 * 4 - EHARDWARE; HW mode change prevented by hardware
14200 * 6 - ECOEX; HW mode change conflict with Coex
14201 */
14202 A_UINT32 status;
14203} wmi_soc_set_dual_mac_config_response_event_fixed_param;
14204
Govind Singh869c9872016-02-22 18:36:34 +053014205typedef struct {
14206 /* TLV tag and len; tag equals
14207 * WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param
14208 */
14209 A_UINT32 tlv_header;
14210 /** Set Dual MAC Config Response Event **/
14211
14212 /** pdev_id for identifying the MAC
14213 * See macros starting with WMI_PDEV_ID_ for values.
14214 */
14215 A_UINT32 pdev_id;
14216
14217 /* Status for set_dual_mac_config command */
14218 /*
14219 * Values for Status:
14220 * 0 - OK; command successful
14221 * 1 - EINVAL; Requested invalid hw_mode
14222 * 3 - ENOTSUP; HW mode not supported
14223 * 4 - EHARDWARE; HW mode change prevented by hardware
14224 * 6 - ECOEX; HW mode change conflict with Coex
14225 */
14226 A_UINT32 status;
14227} wmi_pdev_set_mac_config_response_event_fixed_param;
14228
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014229typedef enum {
14230 MAWC_MOTION_STATE_UNKNOWN,
14231 MAWC_MOTION_STATE_STATIONARY,
14232 MAWC_MOTION_STATE_WALK,
14233 MAWC_MOTION_STATE_TRANSIT,
14234} MAWC_MOTION_STATE;
14235
14236typedef enum {
14237 MAWC_SENSOR_STATUS_OK,
14238 MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
14239 MAWC_SENSOR_STATUS_SHUTDOWN,
14240} MAWC_SENSOR_STATUS;
14241
14242typedef struct {
14243 /* TLV tag and len; tag equals
14244 * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
14245 A_UINT32 tlv_header;
14246 /** new motion state, MAWC_MOTION_STATE */
14247 A_UINT32 motion_state;
14248 /** status code of sensor, MAWC_SENSOR_STATUS */
14249 A_UINT32 sensor_status;
14250} wmi_mawc_sensor_report_ind_cmd_fixed_param;
14251
Govind Singh86180292016-02-01 14:03:37 +053014252/* MBO flag field definition */
14253/*
14254 * Bit 0: 0 - Allow to connect to both MBO and non-MBO AP
14255 * 1 - Allow to connect to MBO AP only
14256 * Bit 1-31 : reserved.
14257 */
14258#define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0)
14259
14260typedef struct {
14261 /*
14262 * TLV tag and len; tag equals
14263 * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param
14264 */
14265 A_UINT32 tlv_header;
14266 /** vdev id */
14267 A_UINT32 vdev_id;
14268 /** enable or disable MBO */
14269 A_UINT32 enable;
14270 /** MBO flags, refer to definition of MBO flags*/
14271 A_UINT32 flags;
14272} wmi_roam_set_mbo_fixed_param;
14273
14274typedef struct {
14275 /*
14276 * TLV tag and len; tag equals
14277 * WMITLV_TAG_ARRAY_STRUC
14278 */
14279 A_UINT32 tlv_header;
14280 /** Current operating class number */
14281 A_UINT32 cur_op_class;
14282 /*
14283 * Country string of current reg domain,
14284 * the expected value should be same as country str defined
14285 * in country IE.
14286 * 3 octets (COUNTRY_STR) + 1 octet (always 0)
14287 * The ordering of this array must be maintained,
14288 * even when a big-endian host's WMI messages undergo
14289 * automatic byte reordering for conversion to the
14290 * little-endian ordering required by the target.
14291 * On big-endian hosts, this array may need to be byte-swapped
14292 * by the host, so the subsequent automatic byte-swap
14293 * will result in the correct final byte order.
14294 * global operating class: set country_str[0]=0
14295 */
14296 A_UINT8 country_str[4];
14297 /** Supported operating class number in current regdomain */
14298 A_UINT32 supp_op_class_num;
14299 /* The TLVs will follow. */
14300 /* A_UINT32 supp_op_class_list[] */
14301} wmi_supported_operating_class_param;
14302
14303typedef struct {
14304 /*
14305 * TLV tag and len; tag equals
14306 * WMITLV_TAG_ARRAY_STRUC
14307 */
14308 A_UINT32 tlv_header;
14309 /** non preferred channel attribute length */
14310 A_UINT32 non_prefer_ch_attr_len;
14311 /* The TLVs will follow. */
14312 /** A_UINT8 non_prefer_ch_attr[];*/
14313} wmi_mbo_non_preferred_channel_report_param;
14314
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014315typedef struct {
14316 /* TLV tag and len; tag equals
14317 * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
14318 A_UINT32 tlv_header;
14319 /* enable(1) or disable(0) */
14320 A_UINT32 enable;
14321} wmi_mawc_enable_sensor_event_fixed_param;
14322
14323typedef struct {
14324 /* TLV tag and len; tag equals
14325 * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
14326 A_UINT32 tlv_header;
14327 /* Unique id identifying the VDEV */
14328 A_UINT32 vdev_id;
14329 /* enable(1) or disable(0) MAWC */
14330 A_UINT32 enable;
14331 /* ratio of skipping suppressing scan, skip one out of x */
14332 A_UINT32 suppress_ratio;
14333} wmi_extscan_configure_mawc_cmd_fixed_param;
14334
14335typedef struct {
14336 /* TLV tag and len; tag equals
14337 * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
14338 A_UINT32 tlv_header;
14339 /* Unique id identifying the VDEV */
14340 A_UINT32 vdev_id;
14341 /* enable(1) or disable(0) MAWC */
14342 A_UINT32 enable;
14343 /* ratio of exponential backoff, next = current + current*ratio/100 */
14344 A_UINT32 exp_backoff_ratio;
14345 /* initial scan interval(msec) */
14346 A_UINT32 init_scan_interval;
14347 /* max scan interval(msec) */
14348 A_UINT32 max_scan_interval;
14349} wmi_nlo_configure_mawc_cmd_fixed_param;
14350
14351typedef struct {
14352 /* TLV tag and len; tag equals
14353 * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
14354 A_UINT32 tlv_header;
14355 /* Unique id identifying the VDEV */
14356 A_UINT32 vdev_id;
14357 /* enable(1) or disable(0) MAWC */
14358 A_UINT32 enable;
14359 /* data traffic load (kBps) to register CMC */
14360 A_UINT32 traffic_load_threshold;
14361 /* RSSI threshold (dBm) to scan for Best AP */
14362 A_UINT32 best_ap_rssi_threshold;
14363 /* high RSSI threshold adjustment in Stationary to suppress scan */
14364 A_UINT32 rssi_stationary_high_adjust;
14365 /* low RSSI threshold adjustment in Stationary to suppress scan */
14366 A_UINT32 rssi_stationary_low_adjust;
14367} wmi_roam_configure_mawc_cmd_fixed_param;
14368
14369#define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2
14370#define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 10
14371
14372typedef enum {
14373 PACKET_FILTER_TYPE_INVALID = 0,
14374 PACKET_FILTER_TYPE_FILTER_PKT,
14375 PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
14376 PACKET_FILTER_TYPE_MAX_ENUM_SIZE
14377} WMI_PACKET_FILTER_FILTER_TYPE;
14378
14379typedef enum {
14380 PACKET_FILTER_PROTO_TYPE_INVALID = 0,
14381
14382 /* L2 header */
14383 PACKET_FILTER_PROTO_TYPE_MAC,
14384 PACKET_FILTER_PROTO_TYPE_SNAP,
14385
14386 /* L3 header (EtherType) */
14387 PACKET_FILTER_PROTO_TYPE_IPV4,
14388 PACKET_FILTER_PROTO_TYPE_IPV6,
14389
14390 /* L4 header (IP protocol) */
14391 PACKET_FILTER_PROTO_TYPE_UDP,
14392 PACKET_FILTER_PROTO_TYPE_TCP,
14393 PACKET_FILTER_PROTO_TYPE_ICMPV6,
14394
14395 PACKET_FILTER_PROTO_TYPE_MAX
14396} WMI_PACKET_FILTER_PROTO_TYPE;
14397
14398typedef enum {
14399 PACKET_FILTER_CMP_TYPE_INVALID = 0,
14400 PACKET_FILTER_CMP_TYPE_EQUAL,
14401 PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
14402 PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
14403 PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
14404 PACKET_FILTER_CMP_TYPE_ADDRTYPE,
14405 PACKET_FILTER_CMP_TYPE_MAX
14406} WMI_PACKET_FILTER_CMP_TYPE;
14407
14408typedef enum {
14409 PACKET_FILTER_SET_INACTIVE = 0,
14410 PACKET_FILTER_SET_ACTIVE
14411} WMI_PACKET_FILTER_ACTION;
14412
14413typedef enum {
14414 PACKET_FILTER_SET_DISABLE = 0,
14415 PACKET_FILTER_SET_ENABLE
14416} WMI_PACKET_FILTER_RUNTIME_ENABLE;
14417
14418typedef struct {
14419 A_UINT32 proto_type;
14420 A_UINT32 cmp_type;
14421 A_UINT32 data_length; /* Length of the data to compare (units = bytes) */
14422 /*
14423 * from start of the respective frame header (
14424 * units = bytes)
14425 */
14426 A_UINT32 data_offset;
14427 /* Data to compare, little-endian order */
14428 A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD];
14429 /* Mask to be applied on rcvd packet data before compare, little-endian order */
14430 A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD];
14431} WMI_PACKET_FILTER_PARAMS_TYPE;
14432
14433typedef struct {
14434 A_UINT32 tlv_header;
14435 A_UINT32 vdev_id;
14436 A_UINT32 filter_id;
14437 A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */
14438 A_UINT32 filter_type;
14439 A_UINT32 num_params; /* how many entries in paramsData are valid */
14440 A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */
14441 WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
14442} WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
14443
14444/* enable / disable all filters within the specified vdev */
14445typedef struct {
14446 A_UINT32 tlv_header;
14447 A_UINT32 vdev_id;
14448 A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
14449} WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
14450
14451
14452#define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0
14453#define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
14454
14455#define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
14456 WMI_SET_BITS(tcp_flag_u32, \
14457 WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
14458 WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
14459 tcp_flag_values)
14460#define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
14461 WMI_GET_BITS(tcp_flag_u32, \
14462 WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
14463 WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
14464
14465#define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9
14466#define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
14467
14468#define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
14469 WMI_SET_BITS(tcp_flag_u32, \
14470 WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
14471 WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
14472 tcp_flags_mask)
14473#define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
14474 WMI_GET_BITS(tcp_flag_u32, \
14475 WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
14476 WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
14477
14478typedef struct {
14479 A_UINT32 tlv_header;
14480 /**
14481 * @brief lro_enable - indicates whether lro is enabled
14482 * [0] LRO Enable
14483 */
14484 A_UINT32 lro_enable;
14485 /**
14486 * @brief tcp_flag_u32 - mask of which TCP flags to check and
14487 * values to check for
14488 * [8:0] TCP flag values - If the TCP flags from the packet do not match
14489 * the values in this field after masking with TCP flags mask
14490 * below,LRO eligible will not be set
14491 * [17:9] TCP flags mask - Mask field for comparing the TCP values
14492 * provided above with the TCP flags field in the received packet
14493 * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
14494 * macros to isolate the mask field and values field that are packed
14495 * into this u32 "word".
14496 */
14497 A_UINT32 tcp_flag_u32;
14498 /**
14499 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
14500 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
14501 * bytes 0 to 3
14502 *
14503 * In this and all the below toeplitz_hash fields, the bytes are
14504 * specified in little-endian order. For example:
14505 * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0
14506 * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1
14507 * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
14508 * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
14509 */
14510 A_UINT32 toeplitz_hash_ipv4_0_3;
14511
14512 /**
14513 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
14514 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
14515 * bytes 4 to 7
14516 */
14517 A_UINT32 toeplitz_hash_ipv4_4_7;
14518
14519 /**
14520 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
14521 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
14522 * bytes 8 to 11
14523 */
14524 A_UINT32 toeplitz_hash_ipv4_8_11;
14525
14526 /**
14527 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
14528 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
14529 * bytes 12 to 15
14530 */
14531 A_UINT32 toeplitz_hash_ipv4_12_15;
14532
14533 /**
14534 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
14535 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
14536 * byte 16
14537 */
14538 A_UINT32 toeplitz_hash_ipv4_16;
14539
14540 /**
14541 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14542 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14543 * bytes 0 to 3
14544 */
14545 A_UINT32 toeplitz_hash_ipv6_0_3;
14546
14547 /**
14548 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14549 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14550 * bytes 4 to 7
14551 */
14552 A_UINT32 toeplitz_hash_ipv6_4_7;
14553
14554 /**
14555 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14556 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14557 * bytes 8 to 11
14558 */
14559 A_UINT32 toeplitz_hash_ipv6_8_11;
14560
14561 /**
14562 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14563 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14564 * bytes 12 to 15
14565 */
14566 A_UINT32 toeplitz_hash_ipv6_12_15;
14567
14568 /**
14569 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14570 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14571 * bytes 16 to 19
14572 */
14573 A_UINT32 toeplitz_hash_ipv6_16_19;
14574
14575 /**
14576 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14577 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14578 * bytes 20 to 22
14579 */
14580 A_UINT32 toeplitz_hash_ipv6_20_23;
14581
14582 /**
14583 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14584 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14585 * bytes 24 to 27
14586 */
14587 A_UINT32 toeplitz_hash_ipv6_24_27;
14588
14589 /**
14590 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14591 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14592 * bytes 28 to 31
14593 */
14594 A_UINT32 toeplitz_hash_ipv6_28_31;
14595
14596 /**
14597 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14598 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14599 * bytes 32 to 35
14600 */
14601 A_UINT32 toeplitz_hash_ipv6_32_35;
14602
14603 /**
14604 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14605 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14606 * bytes 36 to 39
14607 */
14608 A_UINT32 toeplitz_hash_ipv6_36_39;
14609
14610 /**
14611 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14612 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14613 * byte 40
14614 */
14615 A_UINT32 toeplitz_hash_ipv6_40;
14616} wmi_lro_info_cmd_fixed_param;
14617
Nirav Shahbf6450f2015-11-05 11:47:20 +053014618/*
14619 * This structure is used to set the pattern for WOW host wakeup pin pulse
14620 * pattern confirguration.
14621 */
14622typedef struct {
14623 /*
14624 * TLV tag and len; tag equals
14625 * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param
14626 */
14627 A_UINT32 tlv_header;
14628 /* flash offset to write, starting from 0 */
14629 A_UINT32 offset;
14630 /* vaild data length in buffer, unit: byte */
14631 A_UINT32 length;
14632} wmi_transfer_data_to_flash_cmd_fixed_param;
14633
14634typedef struct {
14635 /*
14636 * TLV tag and len; tag equals
14637 * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param
14638 */
14639 A_UINT32 tlv_header;
14640 /* Return status. 0 for success, non-zero otherwise */
14641 A_UINT32 status;
14642} wmi_transfer_data_to_flash_complete_event_fixed_param;
14643
Sreelakshmi Konamki58f4d622016-04-14 18:03:21 +053014644typedef enum {
14645 ENHANCED_MCAST_FILTER_DISABLED,
14646 ENHANCED_MCAST_FILTER_ENABLED
14647} ENHANCED_MCAST_FILTER_CONFIG;
14648
14649/*
14650 * Command to enable/disable filtering of multicast IP with unicast mac
14651 */
14652typedef struct {
14653 /*
14654 * TLV tag and len; tag equals
14655 * WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param
14656 */
14657 A_UINT32 tlv_header;
14658 /* Unique id identifying the VDEV */
14659 A_UINT32 vdev_id;
14660 /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */
14661 A_UINT32 enable;
14662} wmi_config_enhanced_mcast_filter_cmd_fixed_param;
14663
Anurag Chouhan05d05fe2016-04-18 17:09:24 +053014664typedef struct {
14665 /*
14666 * TLV tag and len; tag equals
14667 * WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param
14668 */
14669 A_UINT32 tlv_header;
14670 /* unique id identifying the VDEV, generated by the caller */
14671 A_UINT32 vdev_id;
14672 /* WISA enable / disable mode */
14673 A_UINT32 wisa_mode;
14674} wmi_vdev_wisa_cmd_fixed_param;
14675
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -080014676/*
Manikandan Mohan55c94d62015-12-04 13:47:58 -080014677 * This structure is used to report SMPS force mode set complete to host.
14678 */
14679typedef struct {
14680 /* TLV tag and len; tag equals
14681 * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param
14682 */
14683 A_UINT32 tlv_header;
14684 /* Unique id identifying the VDEV */
14685 A_UINT32 vdev_id;
14686 /* Return status. 0 for success, non-zero otherwise */
14687 A_UINT32 status;
14688} wmi_sta_smps_force_mode_complete_event_fixed_param;
14689
14690/*
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -080014691 * This structure is used to report SCPC calibrated data to host.
14692 */
14693typedef struct {
14694 /* TLV tag and len; tag equals
14695 * WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param
14696 */
14697 A_UINT32 tlv_header;
14698 /* number of BDF patches. Each patch contains offset, length and data */
14699 A_UINT32 num_patch;
14700 /* This TLV is followed by another TLV of array of bytes
14701 * A_UINT8 data[];
14702 * This data array contains, for example
14703 * patch1 offset(byte3~0), patch1 data length(byte7~4),
14704 * patch1 data(byte11~8)
14705 * patch2 offset(byte15~12), patch2 data length(byte19~16),
14706 * patch2 data(byte47~20)
14707 */
14708} wmi_scpc_event_fixed_param;
14709
Manikandan Mohan130eb572015-12-23 13:53:34 -080014710/* bpf interface structure */
14711typedef struct wmi_bpf_get_capability_cmd_s {
14712 A_UINT32 tlv_header;
14713 A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */
14714} wmi_bpf_get_capability_cmd_fixed_param;
14715
14716typedef struct wmi_bpf_capability_info_evt_s {
14717 A_UINT32 tlv_header;
14718 A_UINT32 bpf_version; /* fw's implement version */
14719 A_UINT32 max_bpf_filters; /* max filters that fw supports */
14720 A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
14721} wmi_bpf_capability_info_evt_fixed_param;
14722
14723/* bit 0 of flags: report counters */
14724#define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0
14725#define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1
14726typedef struct wmi_bpf_get_vdev_stats_cmd_s {
14727 A_UINT32 tlv_header;
14728 A_UINT32 flags;
14729 A_UINT32 vdev_id;
14730} wmi_bpf_get_vdev_stats_cmd_fixed_param;
14731
14732typedef struct wmi_bpf_vdev_stats_info_evt_s {
14733 A_UINT32 tlv_header;
14734 A_UINT32 vdev_id;
14735 A_UINT32 num_filters;
14736 A_UINT32 num_checked_pkts;
14737 A_UINT32 num_dropped_pkts;
14738 } wmi_bpf_vdev_stats_info_evt_fixed_param;
14739
14740typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
14741 A_UINT32 tlv_header;
14742 A_UINT32 vdev_id;
14743 A_UINT32 filter_id;
14744 A_UINT32 bpf_version; /* host bpf version */
14745 A_UINT32 total_length;
14746 A_UINT32 current_offset;
14747 A_UINT32 current_length;
Manikandan Mohan05ac7ee2015-12-23 14:18:36 -080014748 /*
14749 * The TLV follows:
14750 * A_UINT8 buf_inst[]; //Variable length buffer for the instuctions
14751 */
Manikandan Mohan130eb572015-12-23 13:53:34 -080014752} wmi_bpf_set_vdev_instructions_cmd_fixed_param;
14753
14754#define BPF_FILTER_ID_ALL 0xFFFFFFFF
14755typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
14756 A_UINT32 tlv_header;
14757 A_UINT32 vdev_id;
14758 A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */
14759} wmi_bpf_del_vdev_instructions_cmd_fixed_param;
14760
Govind Singhc7d51942016-02-01 12:09:31 +053014761#define AES_BLOCK_LEN 16 /* in bytes */
14762#define FIPS_KEY_LENGTH_128 16 /* in bytes */
14763#define FIPS_KEY_LENGTH_256 32 /* in bytes */
14764#define FIPS_ENCRYPT_CMD 0
14765#define FIPS_DECRYPT_CMD 1
14766#define FIPS_ENGINE_AES_CTR 0
14767#define FIPS_ENGINE_AES_MIC 1
14768#define FIPS_ERROR_OPER_TIMEOUT 1
14769
14770/* WMI_PDEV_FIPS_CMDID */
14771typedef struct {
14772 /*
14773 * TLV tag and len; tag equals
14774 * WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param
14775 */
14776 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053014777 union {
14778 /* OBSOLETE - will be removed once all refs are gone */
14779 A_UINT32 mac_id;
14780 /** pdev_id for identifying the MAC
14781 * See macros starting with WMI_PDEV_ID_ for values.
14782 */
14783 A_UINT32 pdev_id;
14784 };
Govind Singhc7d51942016-02-01 12:09:31 +053014785 A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
14786 /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
14787 A_UINT32 mode;
14788 /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
14789 A_UINT32 key_len;
14790 A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
14791 A_UINT32 data_len; /* data length */
14792 /*
14793 * Following this structure is the TLV:
14794 * A_UINT32 data[1]; - In Data (keep this in the end)
14795 */
14796} wmi_pdev_fips_cmd_fixed_param;
14797
14798typedef struct {
14799 /*
14800 * TLV tag and len; tag equals
14801 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param
14802 */
14803 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053014804 union {
14805 /* OBSOLETE - will be removed once all refs are gone */
14806 A_UINT32 mac_id;
14807 /** pdev_id for identifying the MAC
14808 * See macros starting with WMI_PDEV_ID_ for values.
14809 */
14810 A_UINT32 pdev_id;
14811 };
Govind Singhc7d51942016-02-01 12:09:31 +053014812 A_UINT32 enable; /* 1:enable, 0:disable */
14813 /* 1:GPIO parallel mode, 0:GPIO serial mode */
14814 A_UINT32 mode;
14815 A_UINT32 rx_antenna; /* rx antenna */
14816 A_UINT32 tx_default_antenna; /* tx default antenna */
14817 /*
14818 * Following this structure is the TLV:
14819 * wmi_pdev_smart_ant_gpio_handle
14820 */
14821} wmi_pdev_smart_ant_enable_cmd_fixed_param;
14822
14823/** GPIO pins/function values to control antennas */
14824typedef struct {
14825 /*
14826 * TLV tag and len; tag equals
14827 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle
14828 */
14829 A_UINT32 tlv_header;
14830 /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
14831 A_UINT32 gpio_pin;
14832 A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */
Govind Singh869c9872016-02-22 18:36:34 +053014833 /** pdev_id for identifying the MAC
14834 * See macros starting with WMI_PDEV_ID_ for values.
14835 */
14836 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053014837} wmi_pdev_smart_ant_gpio_handle;
14838
14839typedef struct {
14840 /*
14841 * TLV tag and len; tag equals
14842 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param
14843 */
14844 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053014845 union {
14846 /* OBSOLETE - will be removed once all refs are gone */
14847 A_UINT32 mac_id;
14848 /** pdev_id for identifying the MAC
14849 * See macros starting with WMI_PDEV_ID_ for values.
14850 */
14851 A_UINT32 pdev_id;
14852 };
Govind Singhc7d51942016-02-01 12:09:31 +053014853 A_UINT32 rx_antenna;
14854} wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
14855
14856typedef struct {
14857 /*
14858 * TLV tag and len; tag equals
14859 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param
14860 */
14861 A_UINT32 tlv_header;
14862 /** unique id identifying the vdev, generated by the caller */
Govind Singh869c9872016-02-22 18:36:34 +053014863 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053014864 /** peer MAC address */
14865 wmi_mac_addr peer_macaddr;
14866 /*
14867 * Following this structure is the TLV:
14868 * wmi_peer_smart_ant_set_tx_antenna_series
14869 */
14870} wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
14871
14872typedef struct {
14873 /*
14874 * TLV tag and len; tag equals
14875 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series
14876 */
14877 A_UINT32 tlv_header;
14878 /* antenna array */
14879 A_UINT32 antenna_series;
14880} wmi_peer_smart_ant_set_tx_antenna_series;
14881
14882typedef struct {
14883 /*
14884 * TLV tag and len; tag equals
14885 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param
14886 */
14887 A_UINT32 tlv_header;
14888 /* rate array */
14889 A_UINT32 train_rate_series;
14890 /* antenna array */
14891 A_UINT32 train_antenna_series;
14892 /* Rate flags */
14893 /* TODO: For future use? */
14894 A_UINT32 rc_flags;
14895} wmi_peer_smart_ant_set_train_antenna_param;
14896
14897typedef struct {
14898 /*
14899 * TLV tag and len; tag equals
14900 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param
14901 */
14902 A_UINT32 tlv_header;
14903 /** unique id identifying the VDEV, generated by the caller */
Govind Singh869c9872016-02-22 18:36:34 +053014904 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053014905 /** peer MAC address */
14906 wmi_mac_addr peer_macaddr;
14907 /* num packets; 0-stop training */
14908 A_UINT32 num_pkts;
14909 /*
14910 * Following this structure is the TLV:
14911 * wmi_peer_smart_ant_set_train_antenna_param
14912 */
14913} wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
14914
14915typedef struct {
14916 /*
14917 * TLV tag and len; tag equals
14918 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param
14919 */
14920 A_UINT32 tlv_header;
14921 /** unique id identifying the vdev, generated by the caller */
Govind Singh869c9872016-02-22 18:36:34 +053014922 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053014923 /** peer MAC address */
14924 wmi_mac_addr peer_macaddr;
14925 /* command id*/
14926 A_UINT32 cmd_id;
14927 /* number of arguments passed */
14928 A_UINT32 args_count;
14929 /*
14930 * Following this structure is the TLV:
14931 * A_UINT32 args[]; // argument list
14932 */
14933} wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
14934
14935typedef struct {
14936 /*
14937 * TLV tag and len; tag equals
14938 * WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain
14939 */
14940 A_UINT32 tlv_header;
14941 A_UINT32 antCtrlChain;
Govind Singh869c9872016-02-22 18:36:34 +053014942 /** pdev_id for identifying the MAC
14943 * See macros starting with WMI_PDEV_ID_ for values.
14944 */
14945 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053014946} wmi_pdev_set_ant_ctrl_chain;
14947
14948typedef struct {
14949 /*
14950 * TLV tag and len; tag equals
14951 * WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param
14952 */
14953 A_UINT32 tlv_header;
14954 A_UINT32 mac_id; /* MAC ID */
14955 A_UINT32 antCtrlCommon1;
14956 A_UINT32 antCtrlCommon2;
14957 /*
14958 * Following this structure is the TLV:
14959 * wmi_pdev_set_ant_ctrl_chain
14960 */
14961} wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
14962
14963typedef struct {
14964 /* TLV tag and len; tag equals
14965 * WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param
14966 */
14967 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053014968 union {
14969 /* OBSOLETE - will be removed once all refs are gone */
14970 A_UINT32 mac_id;
14971 /** pdev_id for identifying the MAC
14972 * See macros starting with WMI_PDEV_ID_ for values.
14973 */
14974 A_UINT32 pdev_id;
14975 };
Govind Singhc7d51942016-02-01 12:09:31 +053014976 /** len of CTL info */
14977 A_UINT32 ctl_len;
14978 /* ctl array (len adjusted to number of words)
14979 * Following this structure is the TLV:
14980 * A_UINT32 ctl_info[1];
14981 */
14982} wmi_pdev_set_ctl_table_cmd_fixed_param;
14983
14984typedef struct {
14985 /*
14986 * TLV tag and len; tag equals
14987 * WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param
14988 */
14989 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053014990 union {
14991 /* OBSOLETE - will be removed once all refs are gone */
14992 A_UINT32 mac_id;
14993 /** pdev_id for identifying the MAC
14994 * See macros starting with WMI_PDEV_ID_ for values.
14995 */
14996 A_UINT32 pdev_id;
14997 };
Govind Singhc7d51942016-02-01 12:09:31 +053014998 A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
14999 /*
15000 * Bit 7:0 len of array gain table
15001 * Bit 8 bypass multi chain gain or not
15002 */
15003 /*
15004 * array gain table(s) (len adjusted to number of words).
15005 * Following this structure is the TLV:
15006 * A_UINT32 arraygain_tbl[1];
15007 */
15008} wmi_pdev_set_mimogain_table_cmd_fixed_param;
15009
15010#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
15011#define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
15012#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_ARRAY_GAIN_LEN)
15013#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_ARRAY_GAIN_LEN)
15014
15015#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
15016#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
15017#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
15018#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
15019
15020
15021typedef struct {
15022 /*
15023 * TLV tag and len; tag equals
15024 * WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param
15025 */
15026 A_UINT32 tlv_header;
15027 /** parameter id */
15028 A_UINT32 param_id;
15029 /** parameter value */
15030 A_UINT32 param_value;
15031} wmi_fwtest_set_param_cmd_fixed_param;
15032
15033/* Expressed in 1 part in 1000 (permille) */
15034#define WMI_ATF_DENOMINATION 1000
15035
15036typedef struct {
15037 /*
15038 * TLV tag and len; tag equals
15039 * WMITLV_TAG_STRUC_wmi_atf_peer_info
15040 */
15041 A_UINT32 tlv_header;
15042 wmi_mac_addr peer_macaddr;
15043 A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
15044 A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
15045 /* Peer congestion threshold for future use */
15046 A_UINT32 atf_units_reserved;
15047} wmi_atf_peer_info;
15048
15049typedef struct {
15050 /*
15051 * TLV tag and len; tag equals
15052 * WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param
15053 */
15054 A_UINT32 tlv_header;
15055 A_UINT32 num_peers;
15056 /*
15057 * Following this structure is the TLV:
Himanshu Agarwal134b7362016-05-13 20:30:12 +053015058 * struct wmi_atf_peer_info peer_info[num_peers];
Govind Singhc7d51942016-02-01 12:09:31 +053015059 */
15060} wmi_peer_atf_request_fixed_param;
15061
Himanshu Agarwal134b7362016-05-13 20:30:12 +053015062/* Structure for Bandwidth Fairness peer information */
15063typedef struct {
15064 /*
15065 * TLV tag and len; tag equals
15066 * WMITLV_TAG_STRUC_wmi_bwf_peer_info
15067 */
15068 A_UINT32 tlv_header;
15069 wmi_mac_addr peer_macaddr;
15070 /* BWF guaranteed_bandwidth for the peers in mbps */
15071 A_UINT32 bwf_guaranteed_bandwidth;
15072 /*
15073 * BWF Maximum airtime percentage that can be allocated
15074 * to the peer to meet the guaranteed_bandwidth
15075 */
15076 A_UINT32 bwf_max_airtime;
15077 /* BWF priority of the peer to allocate the tokens dynamically */
15078 A_UINT32 bwf_peer_priority;
15079} wmi_bwf_peer_info;
15080
15081/* Structure for Bandwidth Fairness peer request */
15082typedef struct {
15083 /*
15084 * TLV tag and len; tag equals
15085 * WMITLV_TAG_STRUC_wmi_peer_bwf_request_fixed_param
15086 */
15087 A_UINT32 tlv_header;
15088 A_UINT32 num_peers;
15089 /*
15090 * Following this structure is the TLV:
15091 * struct wmi_bwf_peer_info peer_info[num_peers];
15092 */
15093} wmi_peer_bwf_request_fixed_param;
15094
15095
Govind Singhc7d51942016-02-01 12:09:31 +053015096/* Equal distribution of ATF air time within an VDEV. */
15097typedef struct {
15098 /*
15099 * TLV tag and len; tag equals
15100 * WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param
15101 */
15102 A_UINT32 tlv_header;
15103 A_UINT32 vdev_id;
15104 A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
15105} wmi_vdev_atf_request_fixed_param;
15106
15107typedef struct {
15108 /*
15109 * TLV tag and len; tag equals
15110 * WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param
15111 */
15112 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053015113 /** pdev_id for identifying the MAC
15114 * See macros starting with WMI_PDEV_ID_ for values.
15115 */
15116 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053015117 /** parameter */
15118 A_UINT32 param;
15119} wmi_pdev_get_ani_cck_config_cmd_fixed_param;
15120
15121typedef struct {
15122 /*
15123 * TLV tag and len; tag equals
15124 * WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param
15125 */
15126 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053015127 /** pdev_id for identifying the MAC
15128 * See macros starting with WMI_PDEV_ID_ for values.
15129 */
15130 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053015131 /** parameter */
15132 A_UINT32 param;
15133} wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
15134
15135typedef struct {
15136 /*
15137 * TLV tag and len; tag equals
15138 * WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param
15139 */
15140 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053015141 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053015142 A_UINT32 qb_enable;
15143 wmi_mac_addr peer_macaddr;
15144} WMI_QBOOST_CFG_CMD_fixed_param;
15145
15146#define WMI_INST_STATS_INVALID_RSSI 0
15147
15148typedef struct {
15149 /*
15150 * TLV tag and len; tag equals
15151 * WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param
15152 */
15153 A_UINT32 tlv_header;
15154 A_UINT32 iRSSI; /* dBm above the noise floor */
15155 /* peer MAC address */
15156 wmi_mac_addr peer_macaddr;
Govind Singh869c9872016-02-22 18:36:34 +053015157 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053015158} wmi_inst_rssi_stats_resp_fixed_param;
15159
15160typedef struct {
15161 /*
15162 * TLV tag and len; tag equals
15163 * WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info
15164 */
15165 A_UINT32 tlv_header;
15166 A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
15167} wmi_peer_cck_ofdm_rate_info;
15168
15169typedef struct {
15170 /*
15171 * TLV tag and len; tag equals
15172 * WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info
15173 */
15174 A_UINT32 tlv_header;
15175 A_UINT32 ratecode_20; /* Rate code for 20MHz BW */
15176 A_UINT32 ratecode_40; /* Rate code for 40MHz BW */
15177 A_UINT32 ratecode_80; /* Rate code for 80MHz BW */
15178} wmi_peer_mcs_rate_info;
15179
15180typedef struct {
15181 /*
15182 * TLV tag and len; tag equals
15183 * WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param
15184 */
15185 A_UINT32 tlv_header;
15186 wmi_mac_addr peer_macaddr;
15187 A_UINT32 ratecount; /* Max Rate count for each mode */
Govind Singh869c9872016-02-22 18:36:34 +053015188 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053015189 /*
15190 * Following this structure are the TLV
15191 * struct wmi_peer_cck_ofdm_rate_info;
15192 * struct wmi_peer_mcs_rate_info;
15193 */
15194} wmi_peer_ratecode_list_event_fixed_param;
15195
15196typedef struct wmi_wds_addr_event {
15197 /*
15198 * TLV tag and len; tag equals
15199 * WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param
15200 */
15201 A_UINT32 tlv_header;
15202 A_UINT32 event_type[4];
15203 wmi_mac_addr peer_mac;
15204 wmi_mac_addr dest_mac;
Govind Singh869c9872016-02-22 18:36:34 +053015205 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053015206} wmi_wds_addr_event_fixed_param;
15207
15208typedef struct {
15209 /*
15210 * TLV tag and len; tag equals
15211 * WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param
15212 */
15213 A_UINT32 tlv_header;
15214 wmi_mac_addr peer_macaddr;
15215 A_UINT32 peer_ps_state;
15216} wmi_peer_sta_ps_statechange_event_fixed_param;
15217
15218/* WMI_PDEV_FIPS_EVENTID */
15219typedef struct {
15220 /*
15221 * TLV tag and len; tag equals
15222 * WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param
15223 */
15224 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053015225 union {
15226 /* OBSOLETE - will be removed once all refs are gone */
15227 A_UINT32 mac_id;
15228 /** pdev_id for identifying the MAC
15229 * See macros starting with WMI_PDEV_ID_ for values.
15230 */
15231 A_UINT32 pdev_id;
15232 };
Govind Singhc7d51942016-02-01 12:09:31 +053015233 /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
15234 A_UINT32 error_status;
15235 A_UINT32 data_len; /* Data length */
15236 /*
15237 * Following this structure is the TLV:
15238 * A_UINT32 data[1]; // Out Data (keep this in the end)
15239 */
15240} wmi_pdev_fips_event_fixed_param;
15241
15242typedef struct {
15243 /*
15244 * TLV tag and len; tag equals
15245 * WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param
15246 */
15247 A_UINT32 tlv_header;
15248 A_UINT32 mac_id; /* MAC ID */
15249 /* Noise threshold iterations with high values */
15250 A_UINT32 noise_floor_report_iter;
15251 /* Total noise threshold iterations */
15252 A_UINT32 noise_floor_total_iter;
15253} wmi_pdev_channel_hopping_event_fixed_param;
15254
15255enum {
15256 WMI_PDEV_RESERVE_AST_ENTRY_OK,
15257 WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
15258 WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
15259};
15260
15261typedef struct {
15262 /*
15263 * TLV tag and len; tag equals
15264 * WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param
15265 */
15266 A_UINT32 tlv_header;
15267 A_UINT32 mac_id; /* MAC ID */
15268 A_UINT32 rate_flags;
15269 /**
15270 * FLAG_ONE_CHAIN 0x001 - one chain mask
15271 * FLAG_TWO_CHAIN 0x005 - two chain mask
15272 * FLAG_THREE_CHAIN 0x007 - three chain mask
15273 * FLAG_FOUR_CHAIN 0x00F - four chain mask
15274 * FLAG_STBC 0x010 - STBC is set
15275 * FLAG_40MHZ 0x020
15276 * FLAG_80MHZ 0x040
15277 * FLAG_160MHZ 0x080
15278 * FLAG_TXBF 0x0100 - Tx Bf enabled
15279 * FLAG_RTSENA 0x0200 - RTS enabled
15280 * FLAG_CTSENA 0x0400 - CTS enabled
15281 * FLAG_LDPC 0x0800 - LDPC set
15282 * FLAG_SERIES1 0x1000 -
15283 * FLAG_SGI 0x2000 - Short gaurd interval
15284 * FLAG_MU2 0x4000 - MU2 data
15285 * FLAG_MU3 0x8000 - MU3 data
15286 * */
15287 A_UINT32 nss;
15288 /**
15289 * NSS 0x0 - 0x3
15290 * */
15291 A_UINT32 preamble;
15292 /**
15293 * PREAM_OFDM - 0x0
15294 * PREAM_CCK - 0x1
15295 * PREAM_HT - 0x2
15296 * PREAM_VHT - 0x3
15297 * */
15298 A_UINT32 hw_rate;
15299 /**
15300 * *** HW_OFDM_RATE ***
15301 * OFDM_48_MBPS - 0x0
15302 * OFDM_24_MBPS - 0x1
15303 * OFDM_12_MBPS - 0x2
15304 * OFDM_6_MBPS - 0x3
15305 * OFDM_54_MBPS - 0x4
15306 * OFDM_36_MBPS - 0x5
15307 * OFDM_18_MBPS - 0x6
15308 * OFDM_9_MBPS - 0x7
15309 *
15310 * *** HW_CCK_RATE ***
15311 * CCK_11_LONG_MBPS - 0x0
15312 * CCK_5_5_LONG_MBPS - 0x1
15313 * CCK_2_LONG_MBPS - 0x2
15314 * CCK_1_LONG_MBPS - 0x3
15315 * CCK_11_SHORT_MBPS - 0x4
15316 * CCK_5_5_SHORT_MBPS - 0x5
15317 * CCK_2_SHORT_MBPS - 0x6
15318 *
15319 * *** HW_HT / VHT_RATE ***
15320 * MCS 0x0 - 0x9
15321 * */
15322} wmi_pdev_get_tpc_cmd_fixed_param;
15323
15324typedef struct {
15325 /*
15326 * TLV tag and len; tag equals
15327 * WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param
15328 */
15329 A_UINT32 tlv_header;
15330 A_UINT32 reserved0; /* for future need */
15331 /*
15332 * Following this structure is the TLV:
15333 * A_UINT32 tpc[1];
15334 */
15335} wmi_pdev_tpc_event_fixed_param;
15336
15337typedef struct {
15338 /*
15339 * TLV tag and len; tag equals
15340 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param
15341 */
15342 A_UINT32 tlv_header;
15343 A_UINT32 mac_id; /* MAC ID */
15344 A_UINT32 nfdBr_len;
15345 A_UINT32 nfdBm_len;
15346 A_UINT32 freqNum_len;
15347 /*
15348 * Following this structure is the TLV:
15349 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
15350 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
15351 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
15352 */
15353} wmi_pdev_nfcal_power_all_channels_event_fixed_param;
15354
15355typedef struct {
15356 /*
15357 * TLV tag and len; tag equals
15358 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr
15359 */
15360 A_UINT32 tlv_header;
15361 A_UINT32 nfdBr;
15362} wmi_pdev_nfcal_power_all_channels_nfdBr;
15363
15364typedef struct {
15365 /*
15366 * TLV tag and len; tag equals
15367 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm
15368 */
15369 A_UINT32 tlv_header;
15370 A_UINT32 nfdBm;
15371} wmi_pdev_nfcal_power_all_channels_nfdBm;
15372
15373typedef struct {
15374 /*
15375 * TLV tag and len; tag equals
15376 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum
15377 */
15378 A_UINT32 tlv_header;
15379 A_UINT32 freqNum;
15380} wmi_pdev_nfcal_power_all_channels_freqNum;
15381
15382typedef struct {
15383 /*
15384 * TLV tag and len; tag equals
15385 * WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param
15386 */
15387 A_UINT32 tlv_header;
15388 A_UINT32 cck_level;
15389} wmi_ani_cck_event_fixed_param;
15390
15391typedef struct {
15392 /*
15393 * TLV tag and len; tag equals
15394 * WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param
15395 */
15396 A_UINT32 tlv_header;
15397 A_UINT32 ofdm_level;
15398} wmi_ani_ofdm_event_fixed_param;
15399
Sreelakshmi Konamki02a4d7c2016-04-14 17:46:54 +053015400typedef enum wmi_coex_config_type {
15401 /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */
15402 WMI_COEX_CONFIG_PAGE_P2P_TDM = 1,
15403 /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */
15404 WMI_COEX_CONFIG_PAGE_STA_TDM = 2,
15405 /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */
15406 WMI_COEX_CONFIG_PAGE_SAP_TDM = 3,
Himanshu Agarwal800d58d2016-05-13 21:22:19 +053015407 /* config during WLAN connection */
15408 WMI_COEX_CONFIG_DURING_WLAN_CONN = 4,
15409 /* config to enable/disable BTC */
15410 WMI_COEX_CONFIG_BTC_ENABLE = 5,
Sreelakshmi Konamki02a4d7c2016-04-14 17:46:54 +053015411} WMI_COEX_CONFIG_TYPE;
15412
15413typedef struct {
15414 A_UINT32 tlv_header;
15415 A_UINT32 vdev_id;
15416 /* wmi_coex_config_type enum */
15417 A_UINT32 config_type;
15418 A_UINT32 config_arg1;
15419 A_UINT32 config_arg2;
15420} WMI_COEX_CONFIG_CMD_fixed_param;
15421
Sandeep Puligillaff55fec2016-03-09 12:54:23 -080015422/**
15423 * This command is sent from WLAN host driver to firmware to
15424 * request firmware to enable/disable channel avoidance report
15425 * to host.
15426 */
15427enum {
15428 WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0,
15429 WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1
15430};
15431
15432typedef struct {
15433 /*
15434 * TLV tag and len; tag equals
15435 * WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param
15436 */
15437 A_UINT32 tlv_header;
15438 /* Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */
15439 A_UINT32 rpt_allow;
15440} WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param;
15441
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +053015442/*
15443 * Periodic channel stats WMI command structure
15444 * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID
15445 */
15446typedef struct {
15447 /*
15448 * TLV tag and len; tag equals
15449 * WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param
15450 */
15451 A_UINT32 tlv_header;
15452 /** 1 = enable, 0 = disable */
15453 A_UINT32 enable;
15454 /** periodic stats duration (units are milliseconds) */
15455 A_UINT32 stats_period;
15456} wmi_set_periodic_channel_stats_config_fixed_param;
15457
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +053015458typedef struct {
15459 /*
15460 * TLV tag and len; tag equals
15461 * WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param
15462 */
15463 A_UINT32 tlv_header;
15464 /*
15465 * pdev_id for identifying the MAC
15466 * See macros starting with WMI_PDEV_ID_ for values.
15467 */
15468 A_UINT32 pdev_id;
15469 /* Identify the wlan module */
15470 A_UINT32 module_id;
15471 /* Num of elements in the following args[] array */
15472 A_UINT32 num_args;
15473/**
15474 * Following this structure are the TLVs:
15475 * A_UINT32 args[];
15476 **/
15477} wmi_pdev_wal_power_debug_cmd_fixed_param;
15478
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053015479typedef enum {
15480 WLAN_2G_CAPABILITY = 0x1,
15481 WLAN_5G_CAPABILITY = 0x2,
15482} WLAN_BAND_CAPABILITY;
15483
15484#define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1)
15485#define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
15486
15487#define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1)
15488#define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
15489
15490#define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1)
15491#define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
15492
15493#define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1)
15494#define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
15495
15496#define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1)
15497#define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
15498
15499#define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1)
15500#define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
15501
15502typedef struct {
15503 /*
15504 * TLV tag and len; tag equals
15505 * WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES
15506 */
15507 A_UINT32 tlv_header;
15508 /*
15509 * hw_mode_id - identify a particular set of HW characteristics, as
15510 * specified by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element
15511 * must be mapped to its parent WMI_HW_MODE_CAPABILITIES element using
15512 * hw_mode_id. No particular ordering of WMI_MAC_PHY_CAPABILITIES
15513 * elements should be assumed, though in practice the elements may
15514 * always be ordered by hw_mode_id
15515 */
15516 A_UINT32 hw_mode_id;
15517 /*
15518 * pdev_id starts with 1. pdev_id 1 => phy_id 0,
15519 * pdev_id 2 => phy_id 1
15520 */
15521 A_UINT32 pdev_id;
15522 /* phy id. Starts with 0 */
15523 A_UINT32 phy_id;
15524 /* supported modulations */
15525 union {
Himanshu Agarwale93c55e2016-05-20 12:18:15 +053015526 struct {
15527 A_UINT32 supports_11b:1,
15528 supports_11g:1,
15529 supports_11a:1,
15530 supports_11n:1,
15531 supports_11ac:1,
15532 supports_11ax:1;
15533 };
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053015534 A_UINT32 supported_flags;
15535 };
15536 /* supported bands, enum WLAN_BAND_CAPABILITY */
15537 A_UINT32 supported_bands;
15538 /*
15539 * ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us,
15540 * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us
15541 */
15542 A_UINT32 ampdu_density;
15543 /* max bw supported 2G, enum wmi_channel_width */
15544 A_UINT32 max_bw_supported_2G;
15545 /* WMI HT Capability, WMI_HT_CAP defines */
15546 A_UINT32 ht_cap_info_2G;
15547 /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
15548 A_UINT32 vht_cap_info_2G;
15549 /*
15550 * VHT Supported MCS Set field Rx/Tx same
15551 * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as
15552 * follows
15553 * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
15554 * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
15555 * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
15556 * - 3 indicates that n spatial streams is not supported
15557 */
15558 A_UINT32 vht_supp_mcs_2G;
15559 /* HE capability info field of 802.11ax, WMI_HE_CAP defines */
15560 A_UINT32 he_cap_info_2G;
15561 /* HE Supported MCS Set field Rx/Tx same */
15562 A_UINT32 he_supp_mcs_2G;
15563 /* Valid Transmit chain mask */
15564 A_UINT32 tx_chain_mask_2G;
15565 /* Valid Receive chain mask */
15566 A_UINT32 rx_chain_mask_2G;
15567 /* max bw supported 5G, enum wmi_channel_width */
15568 A_UINT32 max_bw_supported_5G;
15569 /* WMI HT Capability, WMI_HT_CAP defines */
15570 A_UINT32 ht_cap_info_5G;
15571 /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
15572 A_UINT32 vht_cap_info_5G;
15573 /*
15574 * VHT Supported MCS Set field Rx/Tx same
15575 * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as
15576 * follows
15577 * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
15578 * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
15579 * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
15580 * - 3 indicates that n spatial streams is not supported
15581 */
15582 A_UINT32 vht_supp_mcs_5G;
15583 /* HE capability info field of 802.11ax, WMI_HE_CAP defines */
15584 A_UINT32 he_cap_info_5G;
15585 /* HE Supported MCS Set field Rx/Tx same */
15586 A_UINT32 he_supp_mcs_5G;
15587 /* Valid Transmit chain mask */
15588 A_UINT32 tx_chain_mask_5G;
15589 /* Valid Receive chain mask */
15590 A_UINT32 rx_chain_mask_5G;
15591} WMI_MAC_PHY_CAPABILITIES;
15592
15593typedef struct {
15594 /*
15595 * TLV tag and len; tag equal
15596 * WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES
15597 */
15598 A_UINT32 tlv_header;
15599 /*
15600 * hw_mode_id - identify a particular set of HW characteristics,
15601 * as specified by the subsequent fields
15602 */
15603 A_UINT32 hw_mode_id;
15604 /* BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on */
15605 A_UINT32 phy_id_map;
15606 /*
15607 * number of bits set in phy_id_map represents number of
15608 * WMI_MAC_PHY_CAPABILITIES TLV's
15609 * one for each active PHY for current HW mode
15610 * identified by hw_mode_id. For example for
15611 * DBS/SBS mode there will be 2
15612 * WMI_MAC_PHY_CAPABILITIES TLVs and for
15613 * single MAC modes it
15614 * will be 1 WMI_MAC_PHY_CAPABILITIES
15615 * TLVs
15616 */
15617} WMI_HW_MODE_CAPABILITIES;
15618
15619typedef struct {
15620 /*
15621 * TLV tag and len; tag equals
15622 * WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS
15623 */
15624 A_UINT32 tlv_header;
15625 /* num HW modes */
15626 A_UINT32 num_hw_modes;
15627 /* num_hw_modes WMI_HW_MODE_CAPABILITIES TLV's */
15628} WMI_SOC_MAC_PHY_HW_MODE_CAPS;
15629
15630/*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/
15631typedef struct {
15632 /*
15633 * TLV tag and len; tag equals
15634 * WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT
15635 */
15636 A_UINT32 tlv_header;
15637 /* phy id */
15638 A_UINT32 phy_id;
15639 /* regdomain value specified in EEPROM */
15640 A_UINT32 eeprom_reg_domain;
15641 /* regdomain */
15642 A_UINT32 eeprom_reg_domain_ext;
15643 /*
15644 * CAP1 capabilities bit map, see REGDMN_CAP1_
15645 * defines
15646 */
15647 A_UINT32 regcap1;
15648 /*
15649 * REGDMN EEPROM CAP, see
15650 * REGDMN_EEPROM_EEREGCAP_ defines
15651 */
15652 A_UINT32 regcap2;
15653 /* REGDMN MODE, see REGDMN_MODE_ enum */
15654 A_UINT32 wireless_modes;
15655 A_UINT32 low_2ghz_chan;
15656 A_UINT32 high_2ghz_chan;
15657 A_UINT32 low_5ghz_chan;
15658 A_UINT32 high_5ghz_chan;
15659} WMI_HAL_REG_CAPABILITIES_EXT;
15660
15661typedef struct {
15662 /*
15663 * TLV tag and len; tag equals
15664 * WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES
15665 */
15666 A_UINT32 tlv_header;
15667 /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */
15668 A_UINT32 num_phy;
15669} WMI_SOC_HAL_REG_CAPABILITIES;
15670
Anurag Chouhanb3fa7a12016-04-18 17:26:49 +053015671typedef struct {
15672 /*
15673 * TLV tag and len; tag equals
15674 * WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv
15675 */
15676 A_UINT32 tlv_header;
15677 /*
15678 * global default adaptive dwell mode,
15679 * used when WMI_SCAN_DWELL_MODE_DEFAULT
15680 */
15681 A_UINT32 default_adaptive_dwell_mode;
15682 /*
15683 * the weight to calculate the average low pass filter for
15684 * channel congestion. 0-100
15685 */
15686 A_UINT32 adapative_lpf_weight;
15687 /* interval to monitor passive scan in msec */
15688 A_UINT32 passive_monitor_interval_ms;
15689 /* % of wifi activity to switch from passive to active 0-100 */
15690 A_UINT32 wifi_activity_threshold_pct;
15691} wmi_scan_adaptive_dwell_parameters_tlv;
15692
15693typedef struct {
15694 /*
15695 * TLV tag and len; tag equals
15696 * WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_config_fixed_param
15697 */
15698 A_UINT32 tlv_header;
15699 /* globally enable/disable adaptive dwell */
15700 A_UINT32 enable;
15701 /*
15702 * followed by TLV (tag length value) parameters array
15703 * The TLV's are:
15704 * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements)
15705 */
15706} wmi_scan_adaptive_dwell_config_fixed_param;
15707
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015708/* ADD NEW DEFS HERE */
15709
15710/*****************************************************************************
15711 * The following structures are deprecated. DO NOT USE THEM!
15712 */
15713
15714/** Max number of channels in the schedule. */
15715#define OCB_CHANNEL_MAX (5)
15716
15717/* NOTE: Make sure these data structures are identical to those 9235
15718* defined in sirApi.h */
15719
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053015720typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015721 /** Arbitration Inter-Frame Spacing. Range: 2-15 */
15722 A_UINT32 aifsn;
15723 /** Contention Window minimum. Range: 1 - 10 */
15724 A_UINT32 cwmin;
15725 /** Contention Window maximum. Range: 1 - 10 */
15726 A_UINT32 cwmax;
15727} wmi_qos_params_t;
15728
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053015729typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015730 /** Channel frequency in MHz */
15731 A_UINT32 chan_freq;
15732 /** Channel duration in ms */
15733 A_UINT32 duration;
15734 /** Start guard interval in ms */
15735 A_UINT32 start_guard_interval;
15736 /** End guard interval in ms */
15737 A_UINT32 end_guard_interval;
15738 /** Transmit power in dBm, range 0 - 23 */
15739 A_UINT32 tx_power;
15740 /** Transmit datarate in Mbps */
15741 A_UINT32 tx_rate;
15742 /** QoS parameters for each AC */
15743 wmi_qos_params_t qos_params[WLAN_MAX_AC];
15744 /** 1 to enable RX stats for this channel, 0 otherwise */
15745 A_UINT32 rx_stats;
15746} wmi_ocb_channel_t;
15747
15748typedef struct {
15749 /** TLV tag and len; tag equals
15750 * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
15751 A_UINT32 tlv_header;
15752 /* VDEV identifier */
15753 A_UINT32 vdev_id;
15754 /** Number of valid channels in the channels array */
15755 A_UINT32 num_channels;
15756 /** The array of channels */
15757 wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
15758 /** 1 to allow off-channel tx, 0 otherwise */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053015759 A_UINT32 off_channel_tx; /* Not supported */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015760} wmi_ocb_set_sched_cmd_fixed_param;
15761
15762typedef struct {
15763 /** Return status. 0 for success, non-zero otherwise */
15764 A_UINT32 status;
15765} wmi_ocb_set_sched_event_fixed_param;
15766
15767/**
15768* END DEPRECATED
15769*/
15770#ifdef __cplusplus
15771}
15772#endif
15773#endif /*_WMI_UNIFIED_H_*/
15774/**@}*/