blob: dc367aec8445b8a0354ef8531be187cf039a695c [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 */
Himanshu Agarwal29061322016-05-27 14:09:27 +053080#define WMI_MAX_CHAINS 8
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080081
82/* The WLAN_MAX_AC macro cannot be changed without breaking
83 * WMI compatibility.
84 * The maximum value of access category
85 */
86#define WLAN_MAX_AC 4
87
88/*
89 * These don't necessarily belong here; but as the MS/SM macros require
90 * ar6000_internal.h to be included, it may not be defined as yet.
91 */
92#define WMI_F_MS(_v, _f) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053093 (((_v) & (_f)) >> (_f ## _S))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080094
95/*
96 * This breaks the "good macro practice" of only referencing each
97 * macro field once (to avoid things like field++ from causing issues.)
98 */
99#define WMI_F_RMW(_var, _v, _f) \
100 do { \
101 (_var) &= ~(_f); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530102 (_var) |= (((_v) << (_f ## _S)) & (_f)); \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800103 } while (0)
104
105#define WMI_GET_BITS(_val, _index, _num_bits) \
106 (((_val) >> (_index)) & ((1 << (_num_bits)) - 1))
107
108#define WMI_SET_BITS(_var, _index, _num_bits, _val) do { \
109 (_var) &= ~(((1 << (_num_bits)) - 1) << (_index)); \
110 (_var) |= (((_val) & ((1 << (_num_bits)) - 1)) << (_index)); \
111 } while (0)
112
113/**
114 * A packed array is an array where each entry in the array is less than
115 * or equal to 16 bits, and the entries are stuffed into an A_UINT32 array.
116 * For example, if each entry in the array is 11 bits, then you can stuff
117 * an array of 4 11-bit values into an array of 2 A_UINT32 values.
118 * The first 2 11-bit values will be stored in the first A_UINT32,
119 * and the last 2 11-bit values will be stored in the second A_UINT32.
120 */
121#define WMI_PACKED_ARR_SIZE(num_entries, bits_per_entry) \
122 (((num_entries) / (32 / (bits_per_entry))) + \
123 (((num_entries) % (32 / (bits_per_entry))) ? 1 : 0))
124
Govind Singh55b8daf2016-06-09 16:02:47 +0530125static INLINE A_UINT32 wmi_packed_arr_get_bits(A_UINT32 *arr,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800126 A_UINT32 entry_index, A_UINT32 bits_per_entry)
127{
128 A_UINT32 entries_per_uint = (32 / bits_per_entry);
129 A_UINT32 uint_index = (entry_index / entries_per_uint);
130 A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
131 A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
132 A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530133 return (arr[uint_index] >> start_bit_in_uint) &
134 ((1 << bits_per_entry) - 1);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800135}
136
Govind Singh55b8daf2016-06-09 16:02:47 +0530137static INLINE void wmi_packed_arr_set_bits(A_UINT32 *arr, A_UINT32 entry_index,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800138 A_UINT32 bits_per_entry, A_UINT32 val)
139{
140 A_UINT32 entries_per_uint = (32 / bits_per_entry);
141 A_UINT32 uint_index = (entry_index / entries_per_uint);
142 A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
143 A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
144 A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
145
146 arr[uint_index] &= ~(((1 << bits_per_entry) - 1) << start_bit_in_uint);
147 arr[uint_index] |=
148 ((val & ((1 << bits_per_entry) - 1)) << start_bit_in_uint);
149}
150
151/** 2 word representation of MAC addr */
152typedef struct {
153 /** upper 4 bytes of MAC address */
154 A_UINT32 mac_addr31to0;
155 /** lower 2 bytes of MAC address */
156 A_UINT32 mac_addr47to32;
157} wmi_mac_addr;
158
159/** macro to convert MAC address from WMI word format to char array */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530160#define WMI_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr, c_macaddr) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800161 (c_macaddr)[0] = ((pwmi_mac_addr)->mac_addr31to0) & 0xff; \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530162 (c_macaddr)[1] = (((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \
163 (c_macaddr)[2] = (((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \
164 (c_macaddr)[3] = (((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff; \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800165 (c_macaddr)[4] = ((pwmi_mac_addr)->mac_addr47to32) & 0xff; \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530166 (c_macaddr)[5] = (((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \
167} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800168
169/** macro to convert MAC address from char array to WMI word format */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530170#define WMI_CHAR_ARRAY_TO_MAC_ADDR(c_macaddr, pwmi_mac_addr) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800171 (pwmi_mac_addr)->mac_addr31to0 = \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530172 ((c_macaddr)[0] | ((c_macaddr)[1] << 8) \
173 | ((c_macaddr)[2] << 16) | ((c_macaddr)[3] << 24)); \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800174 (pwmi_mac_addr)->mac_addr47to32 = \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530175 ((c_macaddr)[4] | ((c_macaddr)[5] << 8)); \
176} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800177
178/*
179 * wmi command groups.
180 */
181typedef enum {
182 /* 0 to 2 are reserved */
183 WMI_GRP_START = 0x3,
Himanshu Agarwala1438152016-05-13 21:40:19 +0530184 WMI_GRP_SCAN = WMI_GRP_START, /* 0x3 */
185 WMI_GRP_PDEV, /* 0x4 */
186 WMI_GRP_VDEV, /* 0x5 */
187 WMI_GRP_PEER, /* 0x6 */
188 WMI_GRP_MGMT, /* 0x7 */
189 WMI_GRP_BA_NEG, /* 0x8 */
190 WMI_GRP_STA_PS, /* 0x9 */
191 WMI_GRP_DFS, /* 0xa */
192 WMI_GRP_ROAM, /* 0xb */
193 WMI_GRP_OFL_SCAN, /* 0xc */
194 WMI_GRP_P2P, /* 0xd */
195 WMI_GRP_AP_PS, /* 0xe */
196 WMI_GRP_RATE_CTRL, /* 0xf */
197 WMI_GRP_PROFILE, /* 0x10 */
198 WMI_GRP_SUSPEND, /* 0x11 */
199 WMI_GRP_BCN_FILTER, /* 0x12 */
200 WMI_GRP_WOW, /* 0x13 */
201 WMI_GRP_RTT, /* 0x14 */
202 WMI_GRP_SPECTRAL, /* 0x15 */
203 WMI_GRP_STATS, /* 0x16 */
204 WMI_GRP_ARP_NS_OFL, /* 0x17 */
205 WMI_GRP_NLO_OFL, /* 0x18 */
206 WMI_GRP_GTK_OFL, /* 0x19 */
207 WMI_GRP_CSA_OFL, /* 0x1a */
208 WMI_GRP_CHATTER, /* 0x1b */
209 WMI_GRP_TID_ADDBA, /* 0x1c */
210 WMI_GRP_MISC, /* 0x1d */
211 WMI_GRP_GPIO, /* 0x1e */
212 WMI_GRP_FWTEST, /* 0x1f */
213 WMI_GRP_TDLS, /* 0x20 */
214 WMI_GRP_RESMGR, /* 0x21 */
215 WMI_GRP_STA_SMPS, /* 0x22 */
216 WMI_GRP_WLAN_HB, /* 0x23 */
217 WMI_GRP_RMC, /* 0x24 */
218 WMI_GRP_MHF_OFL, /* 0x25 */
219 WMI_GRP_LOCATION_SCAN, /* 0x26 */
220 WMI_GRP_OEM, /* 0x27 */
221 WMI_GRP_NAN, /* 0x28 */
222 WMI_GRP_COEX, /* 0x29 */
223 WMI_GRP_OBSS_OFL, /* 0x2a */
224 WMI_GRP_LPI, /* 0x2b */
225 WMI_GRP_EXTSCAN, /* 0x2c */
226 WMI_GRP_DHCP_OFL, /* 0x2d */
227 WMI_GRP_IPA, /* 0x2e */
228 WMI_GRP_MDNS_OFL, /* 0x2f */
229 WMI_GRP_SAP_OFL, /* 0x30 */
230 WMI_GRP_OCB, /* 0x31 */
231 WMI_GRP_SOC, /* 0x32 */
232 WMI_GRP_PKT_FILTER, /* 0x33 */
233 WMI_GRP_MAWC, /* 0x34 */
234 WMI_GRP_PMF_OFFLOAD, /* 0x35 */
235 WMI_GRP_BPF_OFFLOAD, /* 0x36 Berkeley Packet Filter */
236 WMI_GRP_NAN_DATA, /* 0x37 */
237 WMI_GRP_PROTOTYPE, /* 0x38 */
Anurag Chouhan11b53a12016-07-28 12:39:46 +0530238 WMI_GRP_MONITOR, /* 0x39 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800239} WMI_GRP_ID;
240
241#define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
242#define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
243
244/**
245 * Command IDs and commange events
246 */
247typedef enum {
248 /** initialize the wlan sub system */
249 WMI_INIT_CMDID = 0x1,
250
251 /* Scan specific commands */
252
253 /** start scan request to FW */
254 WMI_START_SCAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SCAN),
255 /** stop scan request to FW */
256 WMI_STOP_SCAN_CMDID,
257 /** full list of channels as defined by the regulatory that will be used by scanner */
258 WMI_SCAN_CHAN_LIST_CMDID,
259 /** overwrite default priority table in scan scheduler */
260 WMI_SCAN_SCH_PRIO_TBL_CMDID,
261 /** This command to adjust the priority and min.max_rest_time
262 * of an on ongoing scan request.
263 */
264 WMI_SCAN_UPDATE_REQUEST_CMDID,
265
266 /** set OUI to be used in probe request if enabled */
267 WMI_SCAN_PROB_REQ_OUI_CMDID,
Anurag Chouhanb3fa7a12016-04-18 17:26:49 +0530268 /** config adaptive dwell scan */
269 WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800270
271 /* PDEV(physical device) specific commands */
272 /** set regulatorty ctl id used by FW to determine the exact ctl power limits */
273 WMI_PDEV_SET_REGDOMAIN_CMDID =
274 WMI_CMD_GRP_START_ID(WMI_GRP_PDEV),
275 /** set channel. mainly used for supporting monitor mode */
276 WMI_PDEV_SET_CHANNEL_CMDID,
277 /** set pdev specific parameters */
278 WMI_PDEV_SET_PARAM_CMDID,
279 /** enable packet log */
280 WMI_PDEV_PKTLOG_ENABLE_CMDID,
281 /** disable packet log*/
282 WMI_PDEV_PKTLOG_DISABLE_CMDID,
283 /** set wmm parameters */
284 WMI_PDEV_SET_WMM_PARAMS_CMDID,
285 /** set HT cap ie that needs to be carried probe requests HT/VHT channels */
286 WMI_PDEV_SET_HT_CAP_IE_CMDID,
287 /** set VHT cap ie that needs to be carried on probe requests on VHT channels */
288 WMI_PDEV_SET_VHT_CAP_IE_CMDID,
289
290 /** Command to send the DSCP-to-TID map to the target */
291 WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
292 /** set quiet ie parameters. primarily used in AP mode */
293 WMI_PDEV_SET_QUIET_MODE_CMDID,
294 /** Enable/Disable Green AP Power Save */
295 WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
296 /** get TPC config for the current operating channel */
297 WMI_PDEV_GET_TPC_CONFIG_CMDID,
298
299 /** set the base MAC address for the physical device before a VDEV is created.
300 * For firmware that doesn't support this feature and this command, the pdev
301 * MAC address will not be changed. */
302 WMI_PDEV_SET_BASE_MACADDR_CMDID,
303
304 /* eeprom content dump , the same to bdboard data */
305 WMI_PDEV_DUMP_CMDID,
306 /* set LED configuration */
307 WMI_PDEV_SET_LED_CONFIG_CMDID,
308 /* Get Current temprature of chip in Celcius degree */
309 WMI_PDEV_GET_TEMPERATURE_CMDID,
310 /* Set LED flashing behavior */
311 WMI_PDEV_SET_LED_FLASHING_CMDID,
Govind Singhc7d51942016-02-01 12:09:31 +0530312 /** Enable/Disable Smart Antenna */
313 WMI_PDEV_SMART_ANT_ENABLE_CMDID,
314 /** Set Smart Antenna RX antenna*/
315 WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
316 /** Override the antenna switch table */
317 WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
318 /** Override the CTL table */
319 WMI_PDEV_SET_CTL_TABLE_CMDID,
320 /** Override the array gain table */
321 WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID,
322 /** FIPS test mode command */
323 WMI_PDEV_FIPS_CMDID,
324 /** get CCK ANI level */
325 WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID,
326 /** get OFDM ANI level */
327 WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID,
328 /** NF Cal Power dBr/dBm */
329 WMI_PDEV_GET_NFCAL_POWER_CMDID,
330 /** TxPPDU TPC */
331 WMI_PDEV_GET_TPC_CMDID,
Govind Singh45ef44a2016-02-01 17:45:22 +0530332 /* Set to enable MIB stats collection */
333 WMI_MIB_STATS_ENABLE_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800334
Govind Singh869c9872016-02-22 18:36:34 +0530335 /** Set preferred channel list for DBS Mgr */
336 WMI_PDEV_SET_PCL_CMDID,
337 /** Set HW mode. Eg: single MAC, DBS & SBS,
338 * see soc_hw_mode_t for values
339 */
340 WMI_PDEV_SET_HW_MODE_CMDID,
341 /** Set DFS, SCAN modes and other FW configurations */
342 WMI_PDEV_SET_MAC_CONFIG_CMDID,
343 /** Set per band and per pdev antenna chains */
344 WMI_PDEV_SET_ANTENNA_MODE_CMDID,
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +0530345 /** Periodic channel stats request command */
346 WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID,
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +0530347 /** WMI command for power debug framework */
348 WMI_PDEV_WAL_POWER_DEBUG_CMDID,
Nitesh Shah5de1cf82016-06-29 20:13:17 +0530349 /** set per-AC rx reorder timeouts */
350 WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID,
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +0530351 /** WMI command for WOW gpio and type */
352 WMI_PDEV_SET_WAKEUP_CONFIG_CMDID,
Nitesh Shahfcedd3b2016-07-21 17:24:35 +0530353 /* Get current ANT's per chain's RSSI info */
354 WMI_PDEV_GET_ANTDIV_STATUS_CMDID,
Anurag Chouhane326c922016-08-04 18:43:19 +0530355 /** WMI command for getting Chip Power Stats */
356 WMI_PDEV_GET_CHIP_POWER_STATS_CMDID,
Manjeet Singh27aa9c12016-08-24 15:38:42 +0530357 /** set stats reporting thresholds - see WMI_REPORT_STATS_EVENTID */
358 WMI_PDEV_SET_STATS_THRESHOLD_CMDID,
Govind Singh869c9872016-02-22 18:36:34 +0530359
Nitesh Shah5de1cf82016-06-29 20:13:17 +0530360 /* VDEV (virtual device) specific commands */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800361 /** vdev create */
362 WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VDEV),
363 /** vdev delete */
364 WMI_VDEV_DELETE_CMDID,
365 /** vdev start request */
366 WMI_VDEV_START_REQUEST_CMDID,
367 /** vdev restart request (RX only, NO TX, used for CAC period)*/
368 WMI_VDEV_RESTART_REQUEST_CMDID,
369 /** vdev up request */
370 WMI_VDEV_UP_CMDID,
371 /** vdev stop request */
372 WMI_VDEV_STOP_CMDID,
373 /** vdev down request */
374 WMI_VDEV_DOWN_CMDID,
375 /* set a vdev param */
376 WMI_VDEV_SET_PARAM_CMDID,
377 /* set a key (used for setting per peer unicast and per vdev multicast) */
378 WMI_VDEV_INSTALL_KEY_CMDID,
379
380 /* wnm sleep mode command */
381 WMI_VDEV_WNM_SLEEPMODE_CMDID,
382 WMI_VDEV_WMM_ADDTS_CMDID,
383 WMI_VDEV_WMM_DELTS_CMDID,
384 WMI_VDEV_SET_WMM_PARAMS_CMDID,
385 WMI_VDEV_SET_GTX_PARAMS_CMDID,
386 WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID,
387
388 WMI_VDEV_PLMREQ_START_CMDID,
389 WMI_VDEV_PLMREQ_STOP_CMDID,
390 /* TSF timestamp action for specified vdev */
391 WMI_VDEV_TSF_TSTAMP_ACTION_CMDID,
392 /*
Govind Singh86180292016-02-01 14:03:37 +0530393 * set the additional IEs in probe requests for scan or
394 * assoc req etc for frames FW locally generates
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800395 */
396 WMI_VDEV_SET_IE_CMDID,
397
Govind Singhc7d51942016-02-01 12:09:31 +0530398 WMI_VDEV_RATEMASK_CMDID,
399 /** ATF VDEV REQUEST commands. */
400 WMI_VDEV_ATF_REQUEST_CMDID,
401 /** Command to send the DSCP-to-TID map to the target for VAP */
402 WMI_VDEV_SET_DSCP_TID_MAP_CMDID,
403 /*
404 * Configure filter for Neighbor Rx Pkt
405 * (smart mesh selective listening)
406 */
407 WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID,
Govind Singh869c9872016-02-22 18:36:34 +0530408 /** set quiet ie parameters. primarily used in AP mode */
409 WMI_VDEV_SET_QUIET_MODE_CMDID,
Krishna Kumaar Natarajanea0a7962016-04-16 14:09:09 +0530410 /** To set custom aggregation size for per vdev */
411 WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID,
Govind Singh869c9872016-02-22 18:36:34 +0530412
Himanshu Agarwal7a391e02016-09-14 20:42:35 +0530413 /* DISA feature: Encrypt-decrypt data request */
414 WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID,
415
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800416 /* peer specific commands */
417
418 /** create a peer */
419 WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER),
420 /** delete a peer */
421 WMI_PEER_DELETE_CMDID,
422 /** flush specific tid queues of a peer */
423 WMI_PEER_FLUSH_TIDS_CMDID,
424 /** set a parameter of a peer */
425 WMI_PEER_SET_PARAM_CMDID,
426 /** set peer to associated state. will cary all parameters determined during assocication time */
427 WMI_PEER_ASSOC_CMDID,
428 /**add a wds (4 address ) entry. used only for testing WDS feature on AP products */
429 WMI_PEER_ADD_WDS_ENTRY_CMDID,
430 /**remove wds (4 address ) entry. used only for testing WDS feature on AP products */
431 WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
432 /** set up mcast group infor for multicast to unicast conversion */
433 WMI_PEER_MCAST_GROUP_CMDID,
434 /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */
435 WMI_PEER_INFO_REQ_CMDID,
436
437 /** request the estimated link speed for the peer. FW shall respond with
438 * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID.
439 */
440 WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID,
441 /*
442 * Set the conditions to report peer justified rate to driver
443 * The justified rate means the the user-rate is justified by PER.
444 */
445 WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID,
Govind Singhc7d51942016-02-01 12:09:31 +0530446 /** update a wds (4 address) entry */
447 WMI_PEER_UPDATE_WDS_ENTRY_CMDID,
448 /** add a proxy sta entry */
449 WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID,
450 /** Set Smart Antenna TX antenna */
451 WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
452 /** Set Smart Antenna TX train info */
453 WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
454 /** Set SA node config options */
455 WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
456 /** ATF PEER REQUEST commands */
457 WMI_PEER_ATF_REQUEST_CMDID,
Himanshu Agarwal134b7362016-05-13 20:30:12 +0530458 /** bandwidth fairness (BWF) peer configuration request command */
459 WMI_PEER_BWF_REQUEST_CMDID,
Pradeep Reddy POTTETIdead2bd2016-06-09 17:11:12 +0530460 /** rx reorder queue setup for peer/tid */
461 WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
462 /** rx reorder queue remove for peer/tid */
463 WMI_PEER_REORDER_QUEUE_REMOVE_CMDID,
Nitesh Shah5de1cf82016-06-29 20:13:17 +0530464 /** specify a limit for rx A-MPDU block size */
465 WMI_PEER_SET_RX_BLOCKSIZE_CMDID,
Nitesh Shahfcedd3b2016-07-21 17:24:35 +0530466 /**
467 * request peer antdiv info from FW. FW shall respond with
468 * PEER_ANTDIV_INFO_EVENTID
469 */
470 WMI_PEER_ANTDIV_INFO_REQ_CMDID,
Pradeep Reddy POTTETIdead2bd2016-06-09 17:11:12 +0530471
Govind Singhc7d51942016-02-01 12:09:31 +0530472
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800473 /* beacon/management specific commands */
474
475 /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */
476 WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT),
477 /** transmit beacon by value */
478 WMI_PDEV_SEND_BCN_CMDID,
479 /** set the beacon template. used in beacon offload mode to setup the
480 * the common beacon template with the FW to be used by FW to generate beacons */
481 WMI_BCN_TMPL_CMDID,
482 /** set beacon filter with FW */
483 WMI_BCN_FILTER_RX_CMDID,
484 /* enable/disable filtering of probe requests in the firmware */
485 WMI_PRB_REQ_FILTER_RX_CMDID,
486 /** transmit management frame by value. will be deprecated */
487 WMI_MGMT_TX_CMDID,
488 /** set the probe response template. used in beacon offload mode to setup the
489 * the common probe response template with the FW to be used by FW to generate
490 * probe responses */
491 WMI_PRB_TMPL_CMDID,
492 /** Transmit Mgmt frame by reference */
493 WMI_MGMT_TX_SEND_CMDID,
494
495 /** commands to directly control ba negotiation directly from host. only used in test mode */
496
497 /** turn off FW Auto addba mode and let host control addba */
498 WMI_ADDBA_CLEAR_RESP_CMDID =
499 WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG),
500 /** send add ba request */
501 WMI_ADDBA_SEND_CMDID,
502 WMI_ADDBA_STATUS_CMDID,
503 /** send del ba */
504 WMI_DELBA_SEND_CMDID,
505 /** set add ba response will be used by FW to generate addba response*/
506 WMI_ADDBA_SET_RESP_CMDID,
507 /** send single VHT MPDU with AMSDU */
508 WMI_SEND_SINGLEAMSDU_CMDID,
509
510 /** Station power save specific config */
511 /** enable/disable station powersave */
512 WMI_STA_POWERSAVE_MODE_CMDID =
513 WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS),
514 /** set station power save specific parameter */
515 WMI_STA_POWERSAVE_PARAM_CMDID,
516 /** set station mimo powersave mode */
517 WMI_STA_MIMO_PS_MODE_CMDID,
518
519 /** DFS-specific commands */
520 /** enable DFS (radar detection)*/
521 WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS),
522 /** disable DFS (radar detection)*/
523 WMI_PDEV_DFS_DISABLE_CMDID,
524 /** enable DFS phyerr/parse filter offload */
525 WMI_DFS_PHYERR_FILTER_ENA_CMDID,
526 /** enable DFS phyerr/parse filter offload */
527 WMI_DFS_PHYERR_FILTER_DIS_CMDID,
528
529 /* Roaming specific commands */
530 /** set roam scan mode */
531 WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM),
532 /** set roam scan rssi threshold below which roam scan is enabled */
533 WMI_ROAM_SCAN_RSSI_THRESHOLD,
534 /** set roam scan period for periodic roam scan mode */
535 WMI_ROAM_SCAN_PERIOD,
536 /** set roam scan trigger rssi change threshold */
537 WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
538 /** set roam AP profile */
539 WMI_ROAM_AP_PROFILE,
540 /** set channel list for roam scans */
541 WMI_ROAM_CHAN_LIST,
542 /** Stop scan command */
543 WMI_ROAM_SCAN_CMD,
544 /** roaming sme offload sync complete */
545 WMI_ROAM_SYNCH_COMPLETE,
546 /** set ric request element for 11r roaming */
547 WMI_ROAM_SET_RIC_REQUEST_CMDID,
548 /** Invoke roaming forcefully */
549 WMI_ROAM_INVOKE_CMDID,
550 /** roaming filter cmd to allow further filtering of roaming candidate */
551 WMI_ROAM_FILTER_CMDID,
552 /** set gateway ip, mac and retries for subnet change detection */
553 WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID,
554 /** configure thresholds for MAWC */
555 WMI_ROAM_CONFIGURE_MAWC_CMDID,
Govind Singh86180292016-02-01 14:03:37 +0530556 /** configure MultiBand Operation(refer WFA MBO spec) parameter */
Nitesh Shahe5aa26b2016-07-08 12:03:44 +0530557 WMI_ROAM_SET_MBO_PARAM_CMDID, /* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800558
559 /** offload scan specific commands */
560 /** set offload scan AP profile */
561 WMI_OFL_SCAN_ADD_AP_PROFILE =
562 WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN),
563 /** remove offload scan AP profile */
564 WMI_OFL_SCAN_REMOVE_AP_PROFILE,
565 /** set offload scan period */
566 WMI_OFL_SCAN_PERIOD,
567
568 /* P2P specific commands */
569 /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response
570 * generated during p2p listen and for p2p discoverability */
571 WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P),
572 /** enable/disable p2p discoverability on STA/AP VDEVs */
573 WMI_P2P_DEV_SET_DISCOVERABILITY,
574 /** set p2p ie to be carried in beacons generated by FW for GO */
575 WMI_P2P_GO_SET_BEACON_IE,
576 /** set p2p ie to be carried in probe response frames generated by FW for GO */
577 WMI_P2P_GO_SET_PROBE_RESP_IE,
578 /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA
579 * attribute in the beacons/probe responses received.
580 */
581 WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
582 /** set the configure of p2p find offload */
583 WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID,
584 /** set the vendor specific p2p ie data for p2p find offload using */
585 WMI_P2P_DISC_OFFLOAD_APPIE_CMDID,
586 /** set the BSSID/device name pattern of p2p find offload */
587 WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID,
588 /** set OppPS related parameters **/
589 WMI_P2P_SET_OPPPS_PARAM_CMDID,
Himanshu Agarwalf7bb67b2016-05-30 21:04:30 +0530590 /** set listen offload start related parameters */
591 WMI_P2P_LISTEN_OFFLOAD_START_CMDID,
592 /** set listen offload stop related parameters */
593 WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800594
595 /** AP power save specific config */
596 /** set AP power save specific param */
597 WMI_AP_PS_PEER_PARAM_CMDID =
598 WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS),
599 /** set AP UAPSD coex pecific param */
600 WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
601
602 /** set Enhanced Green AP param */
603 WMI_AP_PS_EGAP_PARAM_CMDID,
604
605 /** Rate-control specific commands */
606 WMI_PEER_RATE_RETRY_SCHED_CMDID =
607 WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL),
608
609 /** WLAN Profiling commands. */
610 WMI_WLAN_PROFILE_TRIGGER_CMDID =
611 WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE),
612 WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
613 WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
614 WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
615 WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
616
617 /** Suspend resume command Ids */
618 WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND),
619 WMI_PDEV_RESUME_CMDID,
620
621 /* Beacon filter commands */
622 /** add a beacon filter */
623 WMI_ADD_BCN_FILTER_CMDID =
624 WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER),
625 /** remove a beacon filter */
626 WMI_RMV_BCN_FILTER_CMDID,
627
628 /* WOW Specific WMI commands */
629 /** add pattern for awake */
630 WMI_WOW_ADD_WAKE_PATTERN_CMDID =
631 WMI_CMD_GRP_START_ID(WMI_GRP_WOW),
632 /** deleta a wake pattern */
633 WMI_WOW_DEL_WAKE_PATTERN_CMDID,
634 /** enable/deisable wake event */
635 WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
636 /** enable WOW */
637 WMI_WOW_ENABLE_CMDID,
638 /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */
639 WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
640 /* IOAC add keep alive cmd. */
641 WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID,
642 /* IOAC del keep alive cmd. */
643 WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID,
644 /* IOAC add pattern for awake */
645 WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID,
646 /* IOAC deleta a wake pattern */
647 WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID,
648 /* D0-WOW enable or disable cmd */
649 WMI_D0_WOW_ENABLE_DISABLE_CMDID,
650 /* enable extend WoW */
651 WMI_EXTWOW_ENABLE_CMDID,
652 /* Extend WoW command to configure app type1 parameter */
653 WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID,
654 /* Extend WoW command to configure app type2 parameter */
655 WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID,
656 /* enable ICMPv6 Network advertisement filtering */
657 WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID,
658 /*
659 * Set a pattern to match UDP packet in WOW mode.
660 * If match, construct a tx frame in a local buffer
661 * to send through the peer AP to the entity in the
662 * IP network that sent the UDP packet to this STA.
663 */
664 WMI_WOW_UDP_SVC_OFLD_CMDID,
665
666 /* configure WOW host wakeup PIN pattern */
667 WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID,
668
Anurag Chouhan86eab9b2016-04-21 16:22:47 +0530669 /* Set which action category should wake the host from suspend */
670 WMI_WOW_SET_ACTION_WAKE_UP_CMDID,
671
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800672 /* RTT measurement related cmd */
673 /** request to make an RTT measurement */
674 WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT),
675 /** request to report a tsf measurement */
676 WMI_RTT_TSF_CMDID,
677
678 /** spectral scan command */
679 /** configure spectral scan */
680 WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID =
681 WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL),
682 /** enable/disable spectral scan and trigger */
683 WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
684
685 /* F/W stats */
686 /** one time request for stats */
687 WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS),
688 /** Push MCC Adaptive Scheduler Stats to Firmware */
689 WMI_MCC_SCHED_TRAFFIC_STATS_CMDID,
690 /** one time request for txrx stats */
691 WMI_REQUEST_STATS_EXT_CMDID,
692
693 /* Link Layer stats */
694 /** Request for link layer stats */
695 WMI_REQUEST_LINK_STATS_CMDID,
696 /** Request for setting params to link layer stats */
697 WMI_START_LINK_STATS_CMDID,
698 /** Request to clear stats*/
699 WMI_CLEAR_LINK_STATS_CMDID,
700
701 /** Request for getting the Firmware Memory Dump */
702 WMI_GET_FW_MEM_DUMP_CMDID,
703
704 /** Request to flush of the buffered debug messages */
705 WMI_DEBUG_MESG_FLUSH_CMDID,
706
707 /** Cmd to configure the verbose level */
708 WMI_DIAG_EVENT_LOG_CONFIG_CMDID,
709
Manjeet Singh27aa9c12016-08-24 15:38:42 +0530710 /** One time request for wlan stats */
711 WMI_REQUEST_WLAN_STATS_CMDID,
712
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800713 /** ARP OFFLOAD REQUEST*/
714 WMI_SET_ARP_NS_OFFLOAD_CMDID =
715 WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
716
717 /** Proactive ARP Response Add Pattern Command*/
718 WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID,
719
720 /** Proactive ARP Response Del Pattern Command*/
721 WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID,
722
723 /** NS offload config*/
724 WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID =
725 WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL),
726
727 /** APFIND Config */
728 WMI_APFIND_CMDID,
729
730 /** Passpoint list config */
731 WMI_PASSPOINT_LIST_CONFIG_CMDID,
732
733 /** configure supprssing parameters for MAWC */
734 WMI_NLO_CONFIGURE_MAWC_CMDID,
735
736 /* GTK offload Specific WMI commands */
737 WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL),
738
739 /* CSA offload Specific WMI commands */
740 /** csa offload enable */
741 WMI_CSA_OFFLOAD_ENABLE_CMDID =
742 WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL),
743 /** chan switch command */
744 WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
745
746 /* Chatter commands */
747 /* Change chatter mode of operation */
748 WMI_CHATTER_SET_MODE_CMDID =
749 WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER),
750 /** chatter add coalescing filter command */
751 WMI_CHATTER_ADD_COALESCING_FILTER_CMDID,
752 /** chatter delete coalescing filter command */
753 WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID,
754 /** chatter coalecing query command */
755 WMI_CHATTER_COALESCING_QUERY_CMDID,
756
757 /**addba specific commands */
758 /** start the aggregation on this TID */
759 WMI_PEER_TID_ADDBA_CMDID =
760 WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA),
761 /** stop the aggregation on this TID */
762 WMI_PEER_TID_DELBA_CMDID,
763
764 /** set station mimo powersave method */
765 WMI_STA_DTIM_PS_METHOD_CMDID,
766 /** Configure the Station UAPSD AC Auto Trigger Parameters */
767 WMI_STA_UAPSD_AUTO_TRIG_CMDID,
768 /** Configure the Keep Alive Parameters */
769 WMI_STA_KEEPALIVE_CMDID,
770
771 /* Request ssn from target for a sta/tid pair */
772 WMI_BA_REQ_SSN_CMDID,
773 /* misc command group */
774 /** echo command mainly used for testing */
775 WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC),
776
777 /* !!IMPORTANT!!
778 * If you need to add a new WMI command to the WMI_GRP_MISC sub-group,
779 * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID,
780 * as we MUST have a fixed value here to maintain compatibility between
781 * UTF and the ART2 driver
782 */
783 /** UTF WMI commands */
784 WMI_PDEV_UTF_CMDID,
785
786 /** set debug log config */
787 WMI_DBGLOG_CFG_CMDID,
788 /* QVIT specific command id */
789 WMI_PDEV_QVIT_CMDID,
790 /* Factory Testing Mode request command
791 * used for integrated chipsets */
792 WMI_PDEV_FTM_INTG_CMDID,
793 /* set and get keepalive parameters command */
794 WMI_VDEV_SET_KEEPALIVE_CMDID,
795 WMI_VDEV_GET_KEEPALIVE_CMDID,
796 /* For fw recovery test command */
797 WMI_FORCE_FW_HANG_CMDID,
798 /* Set Mcast/Bdcast filter */
799 WMI_SET_MCASTBCAST_FILTER_CMDID,
800 /** set thermal management params **/
801 WMI_THERMAL_MGMT_CMDID,
802 /** set host auto shutdown params **/
803 WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID,
804 /** set tpc chainmask config command */
805 WMI_TPC_CHAINMASK_CONFIG_CMDID,
806 /** set Antenna diversity command */
807 WMI_SET_ANTENNA_DIVERSITY_CMDID,
808 /** Set OCB Sched Request, deprecated */
809 WMI_OCB_SET_SCHED_CMDID,
810 /* Set rssi monitoring config command */
811 WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID,
812 /* Enable/disable Large Receive Offload processing;
813 * provide cfg params */
814 WMI_LRO_CONFIG_CMDID,
Nirav Shahbf6450f2015-11-05 11:47:20 +0530815 /*transfer data from host to firmware to write flash */
816 WMI_TRANSFER_DATA_TO_FLASH_CMDID,
Sreelakshmi Konamki58f4d622016-04-14 18:03:21 +0530817 /** Command to enable/disable filtering of multicast IP with unicast mac */
818 WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID,
Anurag Chouhan05d05fe2016-04-18 17:09:24 +0530819 /** Command to control WISA mode */
820 WMI_VDEV_WISA_CMDID,
Himanshu Agarwalb0497b52016-05-13 21:03:37 +0530821 /** set debug log time stamp sync up with host */
822 WMI_DBGLOG_TIME_STAMP_SYNC_CMDID,
Krishna Kumaar Natarajan2f7a44d2016-07-08 11:24:06 -0700823 /** Command for host to set/delete multiple mcast filters */
824 WMI_SET_MULTIPLE_MCAST_FILTER_CMDID,
Pradeep Reddy POTTETI4189bf92016-06-20 14:51:55 +0530825 /** upload a requested section of data from firmware flash to host */
826 WMI_READ_DATA_FROM_FLASH_CMDID,
Anurag Chouhan05d05fe2016-04-18 17:09:24 +0530827
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800828 /* GPIO Configuration */
829 WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
830 WMI_GPIO_OUTPUT_CMDID,
831
832 /* Txbf configuration command */
833 WMI_TXBF_CMDID,
834
835 /* FWTEST Commands */
836 WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID =
837 WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
838 /** set NoA descs **/
839 WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
840 /* UNIT Tests */
841 WMI_UNIT_TEST_CMDID,
Govind Singhc7d51942016-02-01 12:09:31 +0530842 /* set debug and tuning parameters */
843 WMI_FWTEST_CMDID,
844 /* Q-Boost configuration test commands */
845 WMI_QBOOST_CFG_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800846
847 /** TDLS Configuration */
848 /** enable/disable TDLS */
849 WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS),
850 /** set tdls peer state */
851 WMI_TDLS_PEER_UPDATE_CMDID,
852 /** TDLS Offchannel control */
853 WMI_TDLS_SET_OFFCHAN_MODE_CMDID,
854
855 /** Resmgr Configuration */
856 /** Adaptive OCS is enabled by default in the FW. This command is used to
857 * disable FW based adaptive OCS.
858 */
859 WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID =
860 WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR),
861 /** set the requested channel time quota for the home channels */
862 WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID,
863 /** set the requested latency for the home channels */
864 WMI_RESMGR_SET_CHAN_LATENCY_CMDID,
865
866 /** STA SMPS Configuration */
867 /** force SMPS mode */
868 WMI_STA_SMPS_FORCE_MODE_CMDID =
869 WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS),
870 /** set SMPS parameters */
871 WMI_STA_SMPS_PARAM_CMDID,
872
873 /* Wlan HB commands */
874 /* enalbe/disable wlan HB */
875 WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB),
876 /* set tcp parameters for wlan HB */
877 WMI_HB_SET_TCP_PARAMS_CMDID,
878 /* set tcp pkt filter for wlan HB */
879 WMI_HB_SET_TCP_PKT_FILTER_CMDID,
880 /* set udp parameters for wlan HB */
881 WMI_HB_SET_UDP_PARAMS_CMDID,
882 /* set udp pkt filter for wlan HB */
883 WMI_HB_SET_UDP_PKT_FILTER_CMDID,
884
885 /** Wlan RMC commands*/
886 /** enable/disable RMC */
887 WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC),
888 /** configure action frame period */
889 WMI_RMC_SET_ACTION_PERIOD_CMDID,
890 /** For debug/future enhancement purposes only,
891 * configures/finetunes RMC algorithms */
892 WMI_RMC_CONFIG_CMDID,
893
894 /** WLAN MHF offload commands */
895 /** enable/disable MHF offload */
896 WMI_MHF_OFFLOAD_SET_MODE_CMDID =
897 WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL),
898 /** Plumb routing table for MHF offload */
899 WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID,
900
901 /*location scan commands */
902 /*start batch scan */
903 WMI_BATCH_SCAN_ENABLE_CMDID =
904 WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
905 /*stop batch scan */
906 WMI_BATCH_SCAN_DISABLE_CMDID,
907 /*get batch scan result */
908 WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID,
909 /* OEM related cmd */
Manikandan Mohan05ac7ee2015-12-23 14:18:36 -0800910 WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM),
911 WMI_OEM_REQUEST_CMDID, /* UNUSED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800912
913 /** Nan Request */
914 WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN),
915
916 /** Modem power state command */
917 WMI_MODEM_POWER_STATE_CMDID =
918 WMI_CMD_GRP_START_ID(WMI_GRP_COEX),
919 WMI_CHAN_AVOID_UPDATE_CMDID,
Sreelakshmi Konamki02a4d7c2016-04-14 17:46:54 +0530920 WMI_COEX_CONFIG_CMDID,
Sandeep Puligillaff55fec2016-03-09 12:54:23 -0800921 WMI_CHAN_AVOID_RPT_ALLOW_CMDID,
Manjeet Singh158307d2016-08-24 15:23:58 +0530922 WMI_COEX_GET_ANTENNA_ISOLATION_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800923
924 /**
925 * OBSS scan offload enable/disable commands
926 * OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true:
927 * 1. WMI_SERVICE_OBSS_SCAN is reported by FW in service ready,
928 * 2. STA connect to a 2.4Ghz ht20/ht40 AP,
929 * 3. AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response)
930 * If OBSS parameters from beacon changed, also use enable CMD to update parameters.
931 * OBSS scan disable CMD will send to FW if have enabled when tearing down connection.
932 */
933 WMI_OBSS_SCAN_ENABLE_CMDID =
934 WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL),
935 WMI_OBSS_SCAN_DISABLE_CMDID,
936
937 /**LPI commands*/
938 /**LPI mgmt snooping config command*/
939 WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID =
940 WMI_CMD_GRP_START_ID(WMI_GRP_LPI),
941 /**LPI scan start command*/
942 WMI_LPI_START_SCAN_CMDID,
943 /**LPI scan stop command*/
944 WMI_LPI_STOP_SCAN_CMDID,
945
946 /** ExtScan commands */
947 WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN),
948 WMI_EXTSCAN_STOP_CMDID,
949 WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID,
950 WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID,
951 WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID,
952 WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID,
953 WMI_EXTSCAN_SET_CAPABILITIES_CMDID,
954 WMI_EXTSCAN_GET_CAPABILITIES_CMDID,
955 WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID,
956 WMI_EXTSCAN_CONFIGURE_MAWC_CMDID,
957
958 /** DHCP server offload commands */
959 WMI_SET_DHCP_SERVER_OFFLOAD_CMDID =
960 WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL),
961
962 /** IPA Offload features related commands */
963 WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID =
964 WMI_CMD_GRP_START_ID(WMI_GRP_IPA),
965
966 /** mDNS responder offload commands */
967 WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL),
968 WMI_MDNS_SET_FQDN_CMDID,
969 WMI_MDNS_SET_RESPONSE_CMDID,
970 WMI_MDNS_GET_STATS_CMDID,
971
972 /* enable/disable AP Authentication offload */
973 WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL),
974 WMI_SAP_SET_BLACKLIST_PARAM_CMDID,
975
976 /** Out-of-context-of-BSS (OCB) commands */
977 WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB),
978 WMI_OCB_SET_UTC_TIME_CMDID,
979 WMI_OCB_START_TIMING_ADVERT_CMDID,
980 WMI_OCB_STOP_TIMING_ADVERT_CMDID,
981 WMI_OCB_GET_TSF_TIMER_CMDID,
982 WMI_DCC_GET_STATS_CMDID,
983 WMI_DCC_CLEAR_STATS_CMDID,
984 WMI_DCC_UPDATE_NDL_CMDID,
985 /* System-On-Chip commands */
986 WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
987 WMI_SOC_SET_HW_MODE_CMDID,
988 WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID,
989 WMI_SOC_SET_ANTENNA_MODE_CMDID,
990
991 /* packet filter commands */
992 WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER),
993 WMI_PACKET_FILTER_ENABLE_CMDID,
994 /** Motion Aided WiFi Connectivity (MAWC) commands */
995 WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC),
996
997 /** WMI commands related to PMF 11w Offload */
998 WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID =
999 WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD),
1000
Manikandan Mohan130eb572015-12-23 13:53:34 -08001001 /** WMI commands related to pkt filter (BPF) offload */
1002 WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
1003 WMI_BPF_GET_VDEV_STATS_CMDID,
1004 WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
1005 WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
Anurag Chouhan11b53a12016-07-28 12:39:46 +05301006
1007 /** WMI commands related to monitor mode. */
1008 WMI_MNT_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MONITOR),
1009
Govind Singh941bd5e2016-02-04 17:15:25 +05301010 /**
1011 * Nan Data commands
1012 * NDI - NAN Data Interface
1013 * NDP - NAN Data Path
1014 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +05301015 /* Commands in prototyping phase */
1016 WMI_NDI_GET_CAP_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROTOTYPE),
Govind Singh941bd5e2016-02-04 17:15:25 +05301017 WMI_NDP_INITIATOR_REQ_CMDID,
1018 WMI_NDP_RESPONDER_REQ_CMDID,
1019 WMI_NDP_END_REQ_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001020} WMI_CMD_ID;
1021
1022typedef enum {
1023 /** WMI service is ready; after this event WMI messages can be sent/received */
1024 WMI_SERVICE_READY_EVENTID = 0x1,
1025 /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */
1026 WMI_READY_EVENTID,
1027
Nitesh Shahca1b2d02016-07-21 12:59:24 +05301028 /**
1029 * Specify what WMI services the target supports
1030 * (for services beyond what fits in the WMI_SERVICE_READY_EVENT
1031 * message's wmi_service_bitmap)
1032 */
1033 WMI_SERVICE_AVAILABLE_EVENTID,
1034
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001035 /** Scan specific events */
1036 WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
1037
1038 /* PDEV specific events */
1039 /** TPC config for the current operating channel */
1040 WMI_PDEV_TPC_CONFIG_EVENTID =
1041 WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
1042 /** Channel stats event */
1043 WMI_CHAN_INFO_EVENTID,
1044
1045 /** PHY Error specific WMI event */
1046 WMI_PHYERR_EVENTID,
1047
1048 /** eeprom dump event */
1049 WMI_PDEV_DUMP_EVENTID,
1050
1051 /** traffic pause event */
1052 WMI_TX_PAUSE_EVENTID,
1053
1054 /** DFS radar event */
1055 WMI_DFS_RADAR_EVENTID,
1056
1057 /** track L1SS entry and residency event */
1058 WMI_PDEV_L1SS_TRACK_EVENTID,
1059
1060 /** Report current temprature of the chip in Celcius degree */
1061 WMI_PDEV_TEMPERATURE_EVENTID,
1062
1063 /* Extension of WMI_SERVICE_READY msg with
1064 * extra target capability info
1065 */
1066 WMI_SERVICE_READY_EXT_EVENTID,
1067
Govind Singhc7d51942016-02-01 12:09:31 +05301068 /** FIPS test mode event */
1069 WMI_PDEV_FIPS_EVENTID,
1070
1071 /** Channel hopping avoidance */
1072 WMI_PDEV_CHANNEL_HOPPING_EVENTID,
1073
1074 /** CCK ANI level event */
1075 WMI_PDEV_ANI_CCK_LEVEL_EVENTID,
1076
1077 /** OFDM ANI level event */
1078 WMI_PDEV_ANI_OFDM_LEVEL_EVENTID,
1079
1080 /** Tx PPDU params */
1081 WMI_PDEV_TPC_EVENTID,
1082
1083 /** NF Cal Power in DBR/DBM for all channels */
1084 WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
Govind Singh869c9872016-02-22 18:36:34 +05301085
1086 /** SOC/PDEV events */
1087 WMI_PDEV_SET_HW_MODE_RESP_EVENTID,
1088 WMI_PDEV_HW_MODE_TRANSITION_EVENTID,
1089 WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID,
Nitesh Shahfcedd3b2016-07-21 17:24:35 +05301090 /** Report ANT DIV feature's status */
1091 WMI_PDEV_ANTDIV_STATUS_EVENTID,
Anurag Chouhane326c922016-08-04 18:43:19 +05301092 /** Chip level Power stats */
1093 WMI_PDEV_CHIP_POWER_STATS_EVENTID,
Govind Singh869c9872016-02-22 18:36:34 +05301094
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001095 /* VDEV specific events */
1096 /** VDEV started event in response to VDEV_START request */
1097 WMI_VDEV_START_RESP_EVENTID =
1098 WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
1099 /** vdev stopped event , generated in response to VDEV_STOP request */
1100 WMI_VDEV_STOPPED_EVENTID,
1101 /* Indicate the set key (used for setting per
1102 * peer unicast and per vdev multicast)
1103 * operation has completed */
1104 WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
1105 /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please
1106 don't use this for any new implementations */
1107 /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario.
1108 This request is valid only for vdevs operating in soft AP or P2P GO mode */
1109 WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID,
1110
1111 /* Return the TSF timestamp of specified vdev */
1112 WMI_VDEV_TSF_REPORT_EVENTID,
Manikandan Mohan429a0782015-12-23 14:35:54 -08001113
1114 /* FW response to Host for vdev delete cmdid */
1115 WMI_VDEV_DELETE_RESP_EVENTID,
1116
Himanshu Agarwal7a391e02016-09-14 20:42:35 +05301117 /**
1118 * DISA feature: FW response to Host with encrypted/decrypted
1119 * 802.11 DISA frame
1120 */
1121 WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID,
1122
1123 /* peer specific events */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001124 /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
1125 WMI_PEER_STA_KICKOUT_EVENTID =
1126 WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
1127
1128 /** Peer Info Event with data_rate, rssi, tx_fail_cnt etc */
1129 WMI_PEER_INFO_EVENTID,
1130
1131 /** Event indicating that TX fail count reaching threshold */
1132 WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
1133 /** Return the estimate link speed for the Peer specified in the
1134 * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command.
1135 */
1136 WMI_PEER_ESTIMATED_LINKSPEED_EVENTID,
1137 /* Return the peer state
1138 * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE
1139 */
1140 WMI_PEER_STATE_EVENTID,
1141
1142 /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD.
1143 * After that, host will send Mx message.
1144 * Otherwise, host will pause any Mx(STA:M2/M4) message
1145 */
1146 WMI_PEER_ASSOC_CONF_EVENTID,
1147
Manikandan Mohan429a0782015-12-23 14:35:54 -08001148 /* FW response to Host for peer delete cmdid */
1149 WMI_PEER_DELETE_RESP_EVENTID,
1150
Govind Singhc7d51942016-02-01 12:09:31 +05301151 /** Valid rate code list for peer */
1152 WMI_PEER_RATECODE_LIST_EVENTID,
1153 WMI_WDS_PEER_EVENTID,
1154 WMI_PEER_STA_PS_STATECHG_EVENTID,
Nitesh Shahfcedd3b2016-07-21 17:24:35 +05301155 /** Peer Ant Div Info Event with rssi per chain, etc */
1156 WMI_PEER_ANTDIV_INFO_EVENTID,
Govind Singhc7d51942016-02-01 12:09:31 +05301157
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001158 /* beacon/mgmt specific events */
1159 /** RX management frame. the entire frame is carried along with the event. */
1160 WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
1161 /** software beacon alert event to Host requesting host to Queue a beacon for transmission
1162 use only in host beacon mode */
1163 WMI_HOST_SWBA_EVENTID,
1164 /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theritical value.
1165 tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in
1166 staggered beacon transmission mode */
1167 WMI_TBTTOFFSET_UPDATE_EVENTID,
1168
1169 /** event after the first beacon is transmitted following
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301170 a change in the template.*/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001171 WMI_OFFLOAD_BCN_TX_STATUS_EVENTID,
1172 /** event after the first probe response is transmitted following
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301173 a change in the template.*/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001174 WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID,
1175 /** Event for Mgmt TX completion event */
1176 WMI_MGMT_TX_COMPLETION_EVENTID,
Pradeep Reddy POTTETI67c778a2016-06-20 14:00:38 +05301177 /** Event for Mgmt TX bundle completion event */
1178 WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID,
1179
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001180
1181 /*ADDBA Related WMI Events */
1182 /** Indication the completion of the prior
1183 WMI_PEER_TID_DELBA_CMDID(initiator) */
1184 WMI_TX_DELBA_COMPLETE_EVENTID =
1185 WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
1186 /** Indication the completion of the prior
1187 *WMI_PEER_TID_ADDBA_CMDID(initiator) */
1188 WMI_TX_ADDBA_COMPLETE_EVENTID,
1189
1190 /* Seq num returned from hw for a sta/tid pair */
1191 WMI_BA_RSP_SSN_EVENTID,
1192
1193 /* Aggregation state requested by BTC */
1194 WMI_AGGR_STATE_TRIG_EVENTID,
1195
1196 /** Roam event to trigger roaming on host */
1197 WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
1198
1199 /** matching AP found from list of profiles */
1200 WMI_PROFILE_MATCH,
1201 /** roam synch event */
1202 WMI_ROAM_SYNCH_EVENTID,
1203
1204 /** P2P disc found */
1205 WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001206 /*send noa info to host when noa is changed for beacon tx offload enable */
1207 WMI_P2P_NOA_EVENTID,
Himanshu Agarwalf7bb67b2016-05-30 21:04:30 +05301208 /** send p2p listen offload stopped event with different reason */
1209 WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001210
1211 /** Send EGAP Info to host */
1212 WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS),
1213
1214 /* send pdev resume event to host after pdev resume. */
1215 WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND),
1216
1217 /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID.
1218 will cary wake reason */
1219 WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
1220 WMI_D0_WOW_DISABLE_ACK_EVENTID,
1221 WMI_WOW_INITIAL_WAKEUP_EVENTID,
1222
1223 /*RTT related event ID */
1224 /** RTT measurement report */
1225 WMI_RTT_MEASUREMENT_REPORT_EVENTID =
1226 WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
1227 /** TSF measurement report */
1228 WMI_TSF_MEASUREMENT_REPORT_EVENTID,
1229 /** RTT error report */
1230 WMI_RTT_ERROR_REPORT_EVENTID,
1231 /*STATS specific events */
1232 /** txrx stats event requested by host */
1233 WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS),
1234 /** FW iface link stats Event */
1235 WMI_IFACE_LINK_STATS_EVENTID,
1236 /** FW iface peer link stats Event */
1237 WMI_PEER_LINK_STATS_EVENTID,
1238 /** FW Update radio stats Event */
1239 WMI_RADIO_LINK_STATS_EVENTID,
1240 /** Firmware memory dump Complete event*/
1241 WMI_UPDATE_FW_MEM_DUMP_EVENTID,
1242
1243 /** Event indicating the DIAG logs/events supported by FW */
1244 WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID,
1245
Anurag Chouhan90c1a182016-04-18 17:20:38 +05301246 /** Instantaneous RSSI event */
Govind Singhc7d51942016-02-01 12:09:31 +05301247 WMI_INST_RSSI_STATS_EVENTID,
1248
Anurag Chouhan90c1a182016-04-18 17:20:38 +05301249 /** FW update tx power levels event */
1250 WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID,
1251
Manjeet Singh27aa9c12016-08-24 15:38:42 +05301252 /** This event is used to report wlan stats to host.
1253 * It is triggered under 3 conditions:
1254 * (a) Periodic timer timed out, based on the period specified
1255 * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
1256 * (b) Whenever any of the (enabled) stats thresholds specified
1257 * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
1258 * within the current stats period.
1259 * (c) In response to the one-time wlan stats request of
1260 * WMI_REQUEST_WLAN_STATS_CMDID from host.
1261 *
1262 * If this event is triggered by condition a or b,
1263 * the stats counters are cleared at the start of each period.
1264 * But if it is triggered by condition c, stats counters won't be cleared.
1265 */
1266 WMI_REPORT_STATS_EVENTID,
1267
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001268 /** NLO specific events */
1269 /** NLO match event after the first match */
1270 WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
1271
1272 /** NLO scan complete event */
1273 WMI_NLO_SCAN_COMPLETE_EVENTID,
1274
1275 /** APFIND specific events */
1276 WMI_APFIND_EVENTID,
1277
1278 /** passpoint network match event */
1279 WMI_PASSPOINT_MATCH_EVENTID,
1280
1281 /** GTK offload stautus event requested by host */
1282 WMI_GTK_OFFLOAD_STATUS_EVENTID =
1283 WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
1284
1285 /** GTK offload failed to rekey event */
1286 WMI_GTK_REKEY_FAIL_EVENTID,
1287 /* CSA IE received event */
1288 WMI_CSA_HANDLING_EVENTID =
1289 WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
1290
1291 /*chatter query reply event */
1292 WMI_CHATTER_PC_QUERY_EVENTID =
1293 WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER),
1294
1295 /** echo event in response to echo command */
1296 WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
1297
1298 /* !!IMPORTANT!!
1299 * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group,
1300 * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID,
1301 * as we MUST have a fixed value here to maintain compatibility between
1302 * UTF and the ART2 driver
1303 */
1304 /** UTF specific WMI event */
1305 WMI_PDEV_UTF_EVENTID,
1306
1307 /** event carries buffered debug messages */
1308 WMI_DEBUG_MESG_EVENTID,
1309 /** FW stats(periodic or on shot) */
1310 WMI_UPDATE_STATS_EVENTID,
1311 /** debug print message used for tracing FW code while debugging */
1312 WMI_DEBUG_PRINT_EVENTID,
1313 /** DCS wlan or non-wlan interference event
1314 */
1315 WMI_DCS_INTERFERENCE_EVENTID,
1316 /** VI spoecific event */
1317 WMI_PDEV_QVIT_EVENTID,
1318 /** FW code profile data in response to profile request */
1319 WMI_WLAN_PROFILE_DATA_EVENTID,
1320 /* Factory Testing Mode request event
1321 * used for integrated chipsets */
1322 WMI_PDEV_FTM_INTG_EVENTID,
1323 /* avoid list of frequencies .
1324 */
1325 WMI_WLAN_FREQ_AVOID_EVENTID,
1326 /* Indicate the keepalive parameters */
1327 WMI_VDEV_GET_KEEPALIVE_EVENTID,
1328 /* Thermal Management event */
1329 WMI_THERMAL_MGMT_EVENTID,
1330
1331 /* Container for QXDM/DIAG events */
1332 WMI_DIAG_DATA_CONTAINER_EVENTID,
1333
1334 /* host auto shutdown event */
1335 WMI_HOST_AUTO_SHUTDOWN_EVENTID,
1336
1337 /*update mib counters together with WMI_UPDATE_STATS_EVENTID */
1338 WMI_UPDATE_WHAL_MIB_STATS_EVENTID,
1339
1340 /*update ht/vht info based on vdev (rx and tx NSS and preamble) */
1341 WMI_UPDATE_VDEV_RATE_STATS_EVENTID,
1342
1343 WMI_DIAG_EVENTID,
1344
1345 /** Set OCB Sched Response, deprecated */
1346 WMI_OCB_SET_SCHED_EVENTID,
1347
1348 /* event to indicate the flush of the buffered debug messages is complete*/
1349 WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID,
1350 /* event to report mix/max RSSI breach events */
1351 WMI_RSSI_BREACH_EVENTID,
Nirav Shahbf6450f2015-11-05 11:47:20 +05301352 /* event to report completion of data storage into flash memory */
1353 WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001354
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -08001355 /** event to report SCPC calibrated data to host */
1356 WMI_PDEV_UTF_SCPC_EVENTID,
1357
Pradeep Reddy POTTETI4189bf92016-06-20 14:51:55 +05301358 /** event to provide requested data from the target's flash memory */
1359 WMI_READ_DATA_FROM_FLASH_EVENTID,
1360
Himanshu Agarwal4eefcde2016-09-09 12:59:17 +05301361 /** event to report rx aggregation failure frame information */
1362 WMI_REPORT_RX_AGGR_FAILURE_EVENTID,
1363
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001364 /* GPIO Event */
1365 WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
1366 /** upload H_CV info WMI event
1367 * to indicate uploaded H_CV info to host
1368 */
1369 WMI_UPLOADH_EVENTID,
1370
1371 /** capture H info WMI event
1372 * to indicate captured H info to host
1373 */
1374 WMI_CAPTUREH_EVENTID,
1375 /* hw RFkill */
1376 WMI_RFKILL_STATE_CHANGE_EVENTID,
1377
1378 /* TDLS Event */
1379 WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
1380
Manikandan Mohan55c94d62015-12-04 13:47:58 -08001381 /* STA SMPS Event */
1382 /* force SMPS mode */
1383 WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID =
1384 WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS),
1385
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001386 /*location scan event */
1387 /*report the firmware's capability of batch scan */
1388 WMI_BATCH_SCAN_ENABLED_EVENTID =
1389 WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
1390 /*batch scan result */
1391 WMI_BATCH_SCAN_RESULT_EVENTID,
1392 /* OEM Event */
Krishna Kumaar Natarajan1dfa3532015-11-19 16:16:20 -08001393 WMI_OEM_CAPABILITY_EVENTID = /* DEPRECATED */
1394 WMI_EVT_GRP_START_ID(WMI_GRP_OEM),
1395 WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */
1396 WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */
1397 WMI_OEM_RESPONSE_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001398
1399 /* NAN Event */
1400 WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN),
Govind Singh941bd5e2016-02-04 17:15:25 +05301401 WMI_NAN_DISC_IFACE_CREATED_EVENTID,
1402 WMI_NAN_DISC_IFACE_DELETED_EVENTID,
1403 WMI_NAN_STARTED_CLUSTER_EVENTID,
1404 WMI_NAN_JOINED_CLUSTER_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001405
Manjeet Singh158307d2016-08-24 15:23:58 +05301406 /* Coex Event */
1407 WMI_COEX_REPORT_ANTENNA_ISOLATION_EVENTID =
1408 WMI_EVT_GRP_START_ID(WMI_GRP_COEX),
1409
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001410 /* LPI Event */
1411 WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI),
1412 WMI_LPI_STATUS_EVENTID,
1413 WMI_LPI_HANDOFF_EVENTID,
1414
1415 /* ExtScan events */
1416 WMI_EXTSCAN_START_STOP_EVENTID =
1417 WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN),
1418 WMI_EXTSCAN_OPERATION_EVENTID,
1419 WMI_EXTSCAN_TABLE_USAGE_EVENTID,
1420 WMI_EXTSCAN_CACHED_RESULTS_EVENTID,
1421 WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID,
1422 WMI_EXTSCAN_HOTLIST_MATCH_EVENTID,
1423 WMI_EXTSCAN_CAPABILITIES_EVENTID,
1424 WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID,
1425
1426 /* mDNS offload events */
1427 WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL),
1428
1429 /* SAP Authentication offload events */
1430 WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL),
1431 WMI_SAP_OFL_DEL_STA_EVENTID,
1432
1433 /** Out-of-context-of-bss (OCB) events */
1434 WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB),
1435 WMI_OCB_GET_TSF_TIMER_RESP_EVENTID,
1436 WMI_DCC_GET_STATS_RESP_EVENTID,
1437 WMI_DCC_UPDATE_NDL_RESP_EVENTID,
1438 WMI_DCC_STATS_EVENTID,
1439 /* System-On-Chip events */
1440 WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
1441 WMI_SOC_HW_MODE_TRANSITION_EVENTID,
1442 WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID,
1443 /** Motion Aided WiFi Connectivity (MAWC) events */
1444 WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC),
1445
Manikandan Mohan130eb572015-12-23 13:53:34 -08001446 /** pkt filter (BPF) offload relevant events */
Anurag Chouhan08f66c62016-04-18 17:14:51 +05301447 WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
Manikandan Mohan130eb572015-12-23 13:53:34 -08001448 WMI_BPF_VDEV_STATS_INFO_EVENTID,
Govind Singh941bd5e2016-02-04 17:15:25 +05301449
Anurag Chouhan08f66c62016-04-18 17:14:51 +05301450 /* Events in Prototyping phase */
1451 WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE),
Govind Singh941bd5e2016-02-04 17:15:25 +05301452 WMI_NDP_INITIATOR_RSP_EVENTID,
1453 WMI_NDP_RESPONDER_RSP_EVENTID,
1454 WMI_NDP_END_RSP_EVENTID,
1455 WMI_NDP_INDICATION_EVENTID,
1456 WMI_NDP_CONFIRM_EVENTID,
1457 WMI_NDP_END_INDICATION_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001458} WMI_EVT_ID;
1459
1460/* defines for OEM message sub-types */
1461#define WMI_OEM_CAPABILITY_REQ 0x01
1462#define WMI_OEM_CAPABILITY_RSP 0x02
1463#define WMI_OEM_MEASUREMENT_REQ 0x03
1464#define WMI_OEM_MEASUREMENT_RSP 0x04
1465#define WMI_OEM_ERROR_REPORT_RSP 0x05
1466#define WMI_OEM_NAN_MEAS_REQ 0x06
1467#define WMI_OEM_NAN_MEAS_RSP 0x07
1468#define WMI_OEM_NAN_PEER_INFO 0x08
1469#define WMI_OEM_CONFIGURE_LCR 0x09
1470#define WMI_OEM_CONFIGURE_LCI 0x0A
1471
1472/* below message subtype is internal to CLD. Target should
1473 * never use internal response type
1474 */
1475#define WMI_OEM_INTERNAL_RSP 0xdeadbeef
1476
Govind Singh941bd5e2016-02-04 17:15:25 +05301477#define WMI_CHAN_LIST_TAG 0x1
1478#define WMI_SSID_LIST_TAG 0x2
1479#define WMI_BSSID_LIST_TAG 0x3
1480#define WMI_IE_TAG 0x4
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001481
1482typedef struct {
1483 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
1484 /** primary 20 MHz channel frequency in mhz */
1485 A_UINT32 mhz;
1486 /** Center frequency 1 in MHz*/
1487 A_UINT32 band_center_freq1;
1488 /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
1489 A_UINT32 band_center_freq2;
1490 /** channel info described below */
1491 A_UINT32 info;
1492 /** contains min power, max power, reg power and reg class id. */
1493 A_UINT32 reg_info_1;
1494 /** contains antennamax */
1495 A_UINT32 reg_info_2;
1496} wmi_channel;
1497
1498typedef enum {
1499 WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
1500 WMI_CHANNEL_CHANGE_CAUSE_CSA,
1501} wmi_channel_change_cause;
1502
1503/** channel info consists of 6 bits of channel mode */
1504
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301505#define WMI_SET_CHANNEL_MODE(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001506 (pwmi_channel)->info &= 0xffffffc0; \
1507 (pwmi_channel)->info |= (val); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301508} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001509
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301510#define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001511
1512#define WMI_CHAN_FLAG_HT40_PLUS 6
1513#define WMI_CHAN_FLAG_PASSIVE 7
1514#define WMI_CHAN_ADHOC_ALLOWED 8
1515#define WMI_CHAN_AP_DISABLED 9
1516#define WMI_CHAN_FLAG_DFS 10
1517#define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */
1518#define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */
1519#define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */
1520#define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */
1521#define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */
Govind Singh32cced32016-02-01 13:33:09 +05301522/* Enable radar event reporting for sec80 in VHT80p80 */
1523#define WMI_CHAN_FLAG_DFS_CFREQ2 16
Himanshu Agarwal2690e462016-06-03 14:26:01 +05301524#define WMI_CHAN_FLAG_ALLOW_HE 17 /* HE (11ax) is allowed on this channel */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001525
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301526#define WMI_SET_CHANNEL_FLAG(pwmi_channel, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001527 (pwmi_channel)->info |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301528} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001529
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301530#define WMI_GET_CHANNEL_FLAG(pwmi_channel, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001531 (((pwmi_channel)->info & (1 << flag)) >> flag)
1532
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301533#define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001534 (pwmi_channel)->reg_info_1 &= 0xffffff00; \
1535 (pwmi_channel)->reg_info_1 |= (val&0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301536} while (0)
1537#define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001538
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301539#define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001540 (pwmi_channel)->reg_info_1 &= 0xffff00ff; \
1541 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 8); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301542} while (0)
1543#define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001544
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301545#define WMI_SET_CHANNEL_REG_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001546 (pwmi_channel)->reg_info_1 &= 0xff00ffff; \
1547 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 16); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301548} while (0)
1549#define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
1550#define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001551 (pwmi_channel)->reg_info_1 &= 0x00ffffff; \
1552 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 24); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301553} while (0)
1554#define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001555
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301556#define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001557 (pwmi_channel)->reg_info_2 &= 0xffffff00; \
1558 (pwmi_channel)->reg_info_2 |= (val&0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301559} while (0)
1560#define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001561
1562/* max tx power is in 1 dBm units */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301563#define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001564 (pwmi_channel)->reg_info_2 &= 0xffff00ff; \
1565 (pwmi_channel)->reg_info_2 |= ((val&0xff)<<8); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301566} while (0)
1567#define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001568
1569
1570/** HT Capabilities*/
1571#define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
1572#define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
1573#define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
1574#define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
1575#define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
1576#define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
1577#define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
1578#define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
1579#define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
1580#define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
1581#define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
1582#define WMI_HT_CAP_HT40_SGI 0x0800
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301583#define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */
1584#define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001585
1586/* These macros should be used when we wish to advertise STBC support for
1587 * only 1SS or 2SS or 3SS. */
1588#define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
1589#define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
1590#define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
1591
1592#define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
1593 WMI_HT_CAP_HT20_SGI | \
1594 WMI_HT_CAP_HT40_SGI | \
1595 WMI_HT_CAP_TX_STBC | \
1596 WMI_HT_CAP_RX_STBC | \
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301597 WMI_HT_CAP_LDPC | \
1598 WMI_HT_CAP_TX_LDPC | \
1599 WMI_HT_CAP_RX_LDPC)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001600
1601/* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
1602 field. The fields not defined here are not supported, or reserved.
1603 Do not change these masks and if you have to add new one follow the
1604 bitmask as specified by 802.11ac draft.
1605 */
1606
1607#define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
1608#define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
1609#define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
1610#define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004
1611#define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008
1612#define WMI_VHT_CAP_RX_LDPC 0x00000010
1613#define WMI_VHT_CAP_SGI_80MHZ 0x00000020
1614#define WMI_VHT_CAP_SGI_160MHZ 0x00000040
1615#define WMI_VHT_CAP_TX_STBC 0x00000080
1616#define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
1617#define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
1618#define WMI_VHT_CAP_SU_BFORMER 0x00000800
1619#define WMI_VHT_CAP_SU_BFORMEE 0x00001000
1620#define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
1621#define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
1622#define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
1623#define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
1624#define WMI_VHT_CAP_MU_BFORMER 0x00080000
1625#define WMI_VHT_CAP_MU_BFORMEE 0x00100000
1626#define WMI_VHT_CAP_TXOP_PS 0x00200000
1627#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
1628#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
1629#define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
1630#define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301631#define WMI_VHT_CAP_TX_LDPC 0x40000000
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001632
1633/* TEMPORARY:
1634 * Preserve the incorrect old name as an alias for the correct new name
1635 * until all references to the old name have been removed from all hosts
1636 * and targets.
1637 */
1638#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
1639
1640/* These macros should be used when we wish to advertise STBC support for
1641 * only 1SS or 2SS or 3SS. */
1642#define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
1643#define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
1644#define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
1645
1646/* TEMPORARY:
1647 * Preserve the incorrect old name as an alias for the correct new name
1648 * until all references to the old name have been removed from all hosts
1649 * and targets.
1650 */
1651#define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
1652
1653#define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
1654 WMI_VHT_CAP_SGI_80MHZ | \
1655 WMI_VHT_CAP_TX_STBC | \
1656 WMI_VHT_CAP_RX_STBC_MASK | \
1657 WMI_VHT_CAP_RX_LDPC | \
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301658 WMI_VHT_CAP_TX_LDPC | \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001659 WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
1660 WMI_VHT_CAP_RX_FIXED_ANT | \
1661 WMI_VHT_CAP_TX_FIXED_ANT)
1662
1663/* Interested readers refer to Rx/Tx MCS Map definition as defined in
1664 802.11ac
1665 */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301666#define WMI_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001667#define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
1668#define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
1669
Govind Singhd24f5e42016-02-22 15:16:46 +05301670/** 11ax capabilities */
1671#define WMI_HE_CAP_PPE_PRESENT 0x00000001
1672#define WMI_HE_CAP_TWT_RESPONDER_SUPPORT 0x00000002
1673#define WMI_HE_CAP_TWT_REQUESTER_SUPPORT 0x00000004
1674#define WMI_HE_FRAG_SUPPORT_MASK 0x00000018
1675#define WMI_HE_FRAG_SUPPORT_SHIFT 3
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07001676
1677
1678/* fragmentation support field value */
1679enum {
1680 WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */
1681 /*
1682 * support for fragments within a VHT single MPDU,
1683 * no support for fragments within AMPDU
1684 */
1685 WMI_HE_FRAG_SUPPORT_LEVEL1,
1686 /* support for up to 1 fragment per MSDU within a single A-MPDU */
1687 WMI_HE_FRAG_SUPPORT_LEVEL2,
1688 /* support for multiple fragments per MSDU within an A-MPDU */
1689 WMI_HE_FRAG_SUPPORT_LEVEL3,
1690};
1691
1692
Govind Singhd24f5e42016-02-22 15:16:46 +05301693/** NOTE: This defs cannot be changed in the future without
1694 * breaking WMI compatibility
1695 */
Himanshu Agarwal97005de2016-09-09 12:46:04 +05301696#define WMI_MAX_NUM_SS MAX_HE_NSS
1697#define WMI_MAX_NUM_RU MAX_HE_RU
Govind Singhd24f5e42016-02-22 15:16:46 +05301698
1699/*
1700 * Figure 8 554ae: -PPE Threshold Info field format
1701 * we pack PPET16 and PPT8 for four RU's in one element of array.
1702 *
1703 * ppet16_ppet8_ru3_ru0 array element 0 holds:
Himanshu Agarwal2690e462016-06-03 14:26:01 +05301704 * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
Govind Singhd24f5e42016-02-22 15:16:46 +05301705 *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1|
1706 *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
1707 *
1708 * ppet16_ppet8_ru3_ru0 array element 1 holds:
Himanshu Agarwal2690e462016-06-03 14:26:01 +05301709 * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
Govind Singhd24f5e42016-02-22 15:16:46 +05301710 *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1|
1711 *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
1712 *
1713 * etc.
1714 */
1715
1716/*
1717 * Note that in these macros, "ru" is one-based, not zero-based, while
1718 * nssm1 is zero-based.
1719 */
Himanshu Agarwal2690e462016-06-03 14:26:01 +05301720#define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ppet, ru, nssm1) \
Govind Singhd24f5e42016-02-22 15:16:46 +05301721 do { \
1722 ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1)%4)*6)); \
1723 ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1)%4)*6)); \
1724 } while (0)
1725
Himanshu Agarwal2690e462016-06-03 14:26:01 +05301726#define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \
Govind Singhd24f5e42016-02-22 15:16:46 +05301727 ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1)%4)*6))&7)
1728
Himanshu Agarwal2690e462016-06-03 14:26:01 +05301729#define WMI_SET_PPET8(ppet16_ppet8_ru3_ru0, ppet, ru, nssm1) \
Govind Singhd24f5e42016-02-22 15:16:46 +05301730 do { \
1731 ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1)%4)*6+3)); \
1732 ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1)%4)*6+3)); \
1733 } while (0)
1734
Himanshu Agarwal2690e462016-06-03 14:26:01 +05301735#define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \
Govind Singhd24f5e42016-02-22 15:16:46 +05301736 ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1)%4)*6+3))&7)
1737
1738typedef struct _wmi_ppe_threshold {
1739 A_UINT32 numss_m1; /** NSS - 1*/
1740 A_UINT32 ru_count; /** Max RU count */
1741 /** ppet8 and ppet16 for max num ss */
1742 A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS];
1743} wmi_ppe_threshold;
1744
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001745/* WMI_SYS_CAPS_* refer to the capabilities that system support
1746 */
1747#define WMI_SYS_CAP_ENABLE 0x00000001
1748#define WMI_SYS_CAP_TXPOWER 0x00000002
1749
1750/*
1751 * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
1752 * Bits 5:0 are reserved
1753 */
1754#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
1755#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
1756#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
1757#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
1758#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
1759#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
1760#define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7)
1761#define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
1762
1763#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
1764#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
1765#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
1766#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
1767#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
1768#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
1769#define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
1770#define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
1771
1772#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
1773 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
1774#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
1775 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
1776#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
1777 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
1778#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
1779 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
1780#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
1781 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
1782#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
1783 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
1784#define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \
1785 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
1786#define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
1787 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
1788
1789#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
1790 ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
1791#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
1792 ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
1793#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
1794 ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
1795#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
1796 ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
1797#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
1798 ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
1799#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
1800 ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
1801#define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \
1802 ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
1803#define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \
1804 ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
1805
1806#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31)
1807#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30)
1808#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29)
1809
1810#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
1811#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
1812#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
1813
1814#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
1815 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
1816#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
1817 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
1818#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
1819 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
1820
1821#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \
1822 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
1823#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \
1824 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
1825#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \
1826 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
1827
1828#define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31)
1829#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30)
1830
1831#define WMI_DBS_FW_MODE_CFG_DBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
1832#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
1833
1834#define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
1835 WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
1836#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
1837 WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
1838
1839#define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \
1840 ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
1841#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \
1842 ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
1843
1844/** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
1845typedef struct _wmi_abi_version {
1846 A_UINT32 abi_version_0;
1847 /** WMI Major and Minor versions */
1848 A_UINT32 abi_version_1;
1849 /** WMI change revision */
1850 A_UINT32 abi_version_ns_0;
1851 /** ABI version namespace first four dwords */
1852 A_UINT32 abi_version_ns_1;
1853 /** ABI version namespace second four dwords */
1854 A_UINT32 abi_version_ns_2;
1855 /** ABI version namespace third four dwords */
1856 A_UINT32 abi_version_ns_3;
1857 /** ABI version namespace fourth four dwords */
1858} wmi_abi_version;
1859
1860/*
1861 * maximum number of memroy requests allowed from FW.
1862 */
1863#define WMI_MAX_MEM_REQS 16
1864
1865/* !!NOTE!!:
1866 * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
1867 * Please don't change it.
1868 */
1869#define HW_BD_INFO_SIZE 5
1870
1871/**
Govind Singh869c9872016-02-22 18:36:34 +05301872 * PDEV ID to identify the physical device,
1873 * value 0 reserved for SOC level commands/event
1874 */
1875#define WMI_PDEV_ID_SOC 0 /* SOC level, applicable to all PDEVs */
1876#define WMI_PDEV_ID_1ST 1 /* first pdev (pdev 0) */
1877#define WMI_PDEV_ID_2ND 2 /* second pdev (pdev 1) */
1878#define WMI_PDEV_ID_3RD 3 /* third pdev (pdev 2) */
1879
1880/**
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001881 * The following struct holds optional payload for
1882 * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
1883 * device capability to the host.
1884 */
1885typedef struct {
1886 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
1887 A_UINT32 fw_build_vers; /* firmware build number */
1888 wmi_abi_version fw_abi_vers;
1889 A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
1890 A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
1891 A_UINT32 num_rf_chains;
1892 /* The following field is only valid for service type WMI_SERVICE_11AC */
1893 A_UINT32 ht_cap_info; /* WMI HT Capability */
1894 A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
1895 A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
1896 A_UINT32 hw_min_tx_power;
1897 A_UINT32 hw_max_tx_power;
1898 A_UINT32 sys_cap_info;
1899 A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
1900 /** Max beacon and Probe Response IE offload size (includes
1901 * optional P2P IEs) */
1902 A_UINT32 max_bcn_ie_size;
1903 /*
1904 * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
1905 * FW uses this as FW extesnsion memory for saving its data structures. Only valid
1906 * for low latency interfaces like PCIE where FW can access this memory directly (or)
1907 * by DMA.
1908 */
1909 A_UINT32 num_mem_reqs;
1910 /* Max No. scan channels target can support
1911 * If FW is too old and doesn't indicate this number, host side value will default to
1912 * 0, and host will take the original compatible value (62) for future scan channel
1913 * setup.
1914 */
1915 A_UINT32 max_num_scan_channels;
1916
1917 /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
1918 * Default 0 means tha hw_bd_info[] is invalid(legacy board).
1919 */
1920 A_UINT32 hw_bd_id;
1921 A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
1922
1923 /*
1924 * Number of MACs supported, i.e. a DBS-capable device will return 2
1925 */
1926 A_UINT32 max_supported_macs;
1927
1928 /*
1929 * FW sub-feature capabilities to be used in concurrence with
1930 * wmi_service_bitmap
1931 * values from enum WMI_FW_SUB_FEAT_CAPS
1932 */
1933 A_UINT32 wmi_fw_sub_feat_caps;
1934 /*
1935 * Number of Dual Band Simultaneous (DBS) hardware modes
1936 */
1937 A_UINT32 num_dbs_hw_modes;
1938 /*
1939 * txrx_chainmask
1940 * [7:0] - 2G band tx chain mask
1941 * [15:8] - 2G band rx chain mask
1942 * [23:16] - 5G band tx chain mask
1943 * [31:24] - 5G band rx chain mask
1944 *
1945 */
1946 A_UINT32 txrx_chainmask;
1947
1948 /*
1949 * default Dual Band Simultaneous (DBS) hardware mode
1950 */
1951 A_UINT32 default_dbs_hw_mode_index;
1952
1953 /*
1954 * Number of msdu descriptors target would use
1955 */
1956 A_UINT32 num_msdu_desc;
1957
1958 /* The TLVs for hal_reg_capabilities, wmi_service_bitmap and mem_reqs[] will follow this TLV.
1959 * HAL_REG_CAPABILITIES hal_reg_capabilities;
1960 * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
1961 * wlan_host_mem_req mem_reqs[];
1962 * wlan_dbs_hw_mode_list[];
1963 */
1964} wmi_service_ready_event_fixed_param;
1965
Nitesh Shahca1b2d02016-07-21 12:59:24 +05301966#define WMI_SERVICE_SEGMENT_BM_SIZE32 4 /* 4x A_UINT32 = 128 bits */
1967typedef struct {
1968 /**
1969 * TLV tag and len; tag equals
1970 * WMITLV_TAG_STRUC_wmi_service_available_event_fixed_param
1971 */
1972 A_UINT32 tlv_header;
1973 /**
1974 * The wmi_service_segment offset field specifies the position
1975 * within the logical bitmap of WMI service flags at which the
1976 * WMI service flags specified within this message begin.
1977 * Since the first 128 WMI service flags are specified within
1978 * the wmi_service_bitmap field of the WMI_SERVICE_READY_EVENT
1979 * message, the wmi_service_segment_offset value is expected to
1980 * be 128 or more.
1981 */
1982 A_UINT32 wmi_service_segment_offset;
1983 A_UINT32 wmi_service_segment_bitmap[WMI_SERVICE_SEGMENT_BM_SIZE32];
1984} wmi_service_available_event_fixed_param;
1985
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001986typedef struct {
1987 /* TLV tag and len; tag equals
1988 *WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT
1989 */
1990 A_UINT32 tlv_header;
1991 /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
1992 A_UINT32 default_conc_scan_config_bits;
1993 /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
1994 A_UINT32 default_fw_config_bits;
Govind Singhd24f5e42016-02-22 15:16:46 +05301995 wmi_ppe_threshold ppet;
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07001996 /*
1997 * see section 8.4.2.213 from draft r8 of 802.11ax;
1998 * see WMI_HE_FRAG_SUPPORT enum
1999 */
Govind Singhd24f5e42016-02-22 15:16:46 +05302000 A_UINT32 he_cap_info;
Govind Singh76d82bc2016-02-22 15:39:48 +05302001 /*
2002 * An HT STA shall not allow transmission of more than one MPDU start
2003 * within the time limit described in the MPDU maximum density field.
2004 */
2005 A_UINT32 mpdu_density; /* units are microseconds */
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05302006 /*
2007 * Maximum no of BSSID based RX filters host can program
2008 * Value 0 means FW hasn't given any limit to host.
2009 */
2010 A_UINT32 max_bssid_rx_filters;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002011} wmi_service_ready_ext_event_fixed_param;
2012
2013typedef enum {
2014 WMI_HWBD_NONE = 0, /* No hw board information is given */
2015 WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */
2016 WMI_HWBD_QCA2582 = 2, /* Killer 1525 */
2017} WMI_HWBD_ID;
2018
2019typedef enum {
2020 WMI_FW_STA_RTT_INITR = 0x00000001,
2021 WMI_FW_STA_RTT_RESPR = 0x00000002,
2022 WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
2023 WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
2024 WMI_FW_P2P_GO_RTT_INITR = 0x00000010,
2025 WMI_FW_P2P_GO_RTT_RESPR = 0x00000020,
2026 WMI_FW_AP_RTT_INITR = 0x00000040,
2027 WMI_FW_AP_RTT_RESPR = 0x00000080,
2028 WMI_FW_NAN_RTT_INITR = 0x00000100,
2029 WMI_FW_NAN_RTT_RESPR = 0x00000200,
2030 /*
2031 * New fw sub feature capabilites before
2032 * WMI_FW_MAX_SUB_FEAT_CAP
2033 */
2034 WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000,
2035} WMI_FW_SUB_FEAT_CAPS;
2036
2037#define ATH_BD_DATA_REV_MASK 0x000000FF
2038#define ATH_BD_DATA_REV_SHIFT 0
2039
2040#define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00
2041#define ATH_BD_DATA_PROJ_ID_SHIFT 8
2042
2043#define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000
2044#define ATH_BD_DATA_CUST_ID_SHIFT 16
2045
2046#define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000
2047#define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
2048
2049#define SET_BD_DATA_REV(bd_data_ver, value) \
2050 ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
2051
2052#define GET_BD_DATA_REV(bd_data_ver) \
2053 (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
2054
2055#define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
2056 ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
2057
2058#define GET_BD_DATA_PROJ_ID(bd_data_ver) \
2059 (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
2060
2061#define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
2062 ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
2063
2064#define GET_BD_DATA_CUST_ID(bd_data_ver) \
2065 (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
2066
2067#define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \
2068 ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
2069
2070#define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \
2071 (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
2072
2073#ifdef ROME_LTE_COEX_FREQ_AVOID
2074typedef struct {
2075 A_UINT32 start_freq; /* start frequency, not channel center freq */
2076 A_UINT32 end_freq; /* end frequency */
2077} avoid_freq_range_desc;
2078
2079typedef struct {
2080 /* bad channel range count, multi range is allowed, 0 means all channel clear */
2081 A_UINT32 num_freq_ranges;
2082 /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
2083 avoid_freq_range_desc avd_freq_range[0];
2084} wmi_wlan_avoid_freq_ranges_event;
2085#endif
2086
2087/** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that retuned status */
2088#define WLAN_INIT_STATUS_SUCCESS 0x0
2089#define WLAN_INIT_STATUS_GEN_FAILED 0x1
2090#define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
2091#define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
2092
2093typedef A_UINT32 WLAN_INIT_STATUS;
2094
2095typedef struct {
2096 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
2097 wmi_abi_version fw_abi_vers;
2098 wmi_mac_addr mac_addr;
2099 A_UINT32 status;
Rajeev Kumare18f5282016-04-15 14:08:29 -07002100 A_UINT32 num_dscp_table;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002101} wmi_ready_event_fixed_param;
2102
2103typedef struct {
2104 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
2105/**
2106 * @brief num_vdev - number of virtual devices (VAPs) to support
2107 */
2108 A_UINT32 num_vdevs;
2109/**
2110 * @brief num_peers - number of peer nodes to support
2111 */
2112 A_UINT32 num_peers;
2113/*
2114 * @brief In offload mode target supports features like WOW, chatter and other
2115 * protocol offloads. In order to support them some functionalities like
2116 * reorder buffering, PN checking need to be done in target. This determines
2117 * maximum number of peers suported by target in offload mode
2118 */
2119 A_UINT32 num_offload_peers;
2120/* @brief Number of reorder buffers available for doing target based reorder
2121 * Rx reorder buffering
2122 */
2123 A_UINT32 num_offload_reorder_buffs;
2124/**
2125 * @brief num_peer_keys - number of keys per peer
2126 */
2127 A_UINT32 num_peer_keys;
2128/**
2129 * @brief num_peer_tids - number of TIDs to provide storage for per peer.
2130 */
2131 A_UINT32 num_tids;
2132/**
2133 * @brief ast_skid_limit - max skid for resolving hash collisions
2134 * @details
2135 * The address search table is sparse, so that if two MAC addresses
2136 * result in the same hash value, the second of these conflicting
2137 * entries can slide to the next index in the address search table,
2138 * and use it, if it is unoccupied. This ast_skid_limit parameter
2139 * specifies the upper bound on how many subsequent indices to search
2140 * over to find an unoccupied space.
2141 */
2142 A_UINT32 ast_skid_limit;
2143/**
2144 * @brief tx_chain_mask - the nominal chain mask for transmit
2145 * @details
2146 * The chain mask may be modified dynamically, e.g. to operate AP tx with
2147 * a reduced number of chains if no clients are associated.
2148 * This configuration parameter specifies the nominal chain-mask that
2149 * should be used when not operating with a reduced set of tx chains.
2150 */
2151 A_UINT32 tx_chain_mask;
2152/**
2153 * @brief rx_chain_mask - the nominal chain mask for receive
2154 * @details
2155 * The chain mask may be modified dynamically, e.g. for a client to use
2156 * a reduced number of chains for receive if the traffic to the client
2157 * is low enough that it doesn't require downlink MIMO or antenna
2158 * diversity.
2159 * This configuration parameter specifies the nominal chain-mask that
2160 * should be used when not operating with a reduced set of rx chains.
2161 */
2162 A_UINT32 rx_chain_mask;
2163/**
2164 * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
2165 * @details
2166 * Each WMM access class (voice, video, best-effort, background) will
2167 * have its own timeout value to dictate how long to wait for missing
2168 * rx MPDUs to arrive before flushing subsequent MPDUs that have already
2169 * been received.
2170 * This parameter specifies the timeout in milliseconds for each class .
2171 * NOTE: the number of class (defined as 4) cannot be
2172 * changed in the future without breaking WMI compatibility.
2173 */
2174 A_UINT32 rx_timeout_pri[4];
2175/**
2176 * @brief rx_decap mode - what mode the rx should decap packets to
2177 * @details
2178 * MAC can decap to RAW (no decap), native wifi or Ethernet types
2179 * THis setting also determines the default TX behavior, however TX
2180 * behavior can be modified on a per VAP basis during VAP init
2181 */
2182 A_UINT32 rx_decap_mode;
2183 /**
2184 * @brief scan_max_pending_req - what is the maximum scan requests than can be queued
2185 */
2186 A_UINT32 scan_max_pending_req;
2187
2188 /**
2189 * @brief maximum VDEV that could use BMISS offload
2190 */
2191 A_UINT32 bmiss_offload_max_vdev;
2192
2193 /**
2194 * @brief maximum VDEV that could use offload roaming
2195 */
2196 A_UINT32 roam_offload_max_vdev;
2197
2198 /**
2199 * @brief maximum AP profiles that would push to offload roaming
2200 */
2201 A_UINT32 roam_offload_max_ap_profiles;
2202
2203/**
2204 * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
2205 * @details
2206 * The target's WAL maintains a table to hold information regarding which
2207 * peers belong to a given multicast group, so that if multicast->unicast
2208 * conversion is enabled, the target can convert multicast tx frames to a
2209 * series of unicast tx frames, to each peer within the multicast group.
2210 * This num_mcast_groups configuration parameter tells the target how
2211 * many multicast groups to provide storage for within its multicast
2212 * group membership table.
2213 */
2214 A_UINT32 num_mcast_groups;
2215
2216/**
2217 * @brief num_mcast_table_elems - size to alloc for the mcast membership table
2218 * @details
2219 * This num_mcast_table_elems configuration parameter tells the target
2220 * how many peer elements it needs to provide storage for in its
2221 * multicast group membership table.
2222 * These multicast group membership table elements are shared by the
2223 * multicast groups stored within the table.
2224 */
2225 A_UINT32 num_mcast_table_elems;
2226
2227/**
2228 * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
2229 * @details
2230 * This configuration parameter specifies whether the target should
2231 * perform multicast --> unicast conversion on transmit, and if so,
2232 * what to do if it finds no entries in its multicast group membership
2233 * table for the multicast IP address in the tx frame.
2234 * Configuration value:
2235 * 0 -> Do not perform multicast to unicast conversion.
2236 * 1 -> Convert multicast frames to unicast, if the IP multicast address
2237 * from the tx frame is found in the multicast group membership
2238 * table. If the IP multicast address is not found, drop the frame.
2239 * 2 -> Convert multicast frames to unicast, if the IP multicast address
2240 * from the tx frame is found in the multicast group membership
2241 * table. If the IP multicast address is not found, transmit the
2242 * frame as multicast.
2243 */
2244 A_UINT32 mcast2ucast_mode;
2245
2246 /**
2247 * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
2248 * @details
2249 * This parameter controls how much memory the target will allocate to
2250 * store a log of tx PPDU meta-information (how large the PPDU was,
2251 * when it was sent, whether it was successful, etc.)
2252 */
2253 A_UINT32 tx_dbg_log_size;
2254
2255 /**
2256 * @brief num_wds_entries - how many AST entries to be allocated for WDS
2257 */
2258 A_UINT32 num_wds_entries;
2259
2260 /**
2261 * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
2262 * this limit can be 0 -default, 1 256B
2263 */
2264 A_UINT32 dma_burst_size;
2265
2266 /**
2267 * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
2268 * to account for interface latency to avoid underrun.
2269 */
2270 A_UINT32 mac_aggr_delim;
2271 /**
2272 * @brief rx_skip_defrag_timeout_dup_detection_check
2273 * @details
2274 * determine whether target is responsible for detecting duplicate
2275 * non-aggregate MPDU and timing out stale fragments.
2276 *
2277 * A-MPDU reordering is always performed on the target.
2278 *
2279 * 0: target responsible for frag timeout and dup checking
2280 * 1: host responsible for frag timeout and dup checking
2281 */
2282 A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
2283
2284 /**
2285 * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
2286 * and Max no of descriptors for each Video link (node).
2287 */
2288 A_UINT32 vow_config;
2289
2290 /**
2291 * @brief maximum VDEV that could use GTK offload
2292 */
2293 A_UINT32 gtk_offload_max_vdev;
2294
2295 /**
2296 * @brief num_msdu_desc - Number of msdu descriptors target should use
2297 */
2298 A_UINT32 num_msdu_desc; /* Number of msdu desc */
2299 /**
2300 * @brief max_frag_entry - Max. number of Tx fragments per MSDU
2301 * @details
2302 * This parameter controls the max number of Tx fragments per MSDU.
2303 * This is sent by the target as part of the WMI_SERVICE_READY event
2304 * and is overriden by the OS shim as required.
2305 */
2306 A_UINT32 max_frag_entries;
2307
2308 /**
2309 * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
2310 * @brief num_msdu_desc - Number of vdev that can support beacon offload
2311 */
2312
2313 A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
2314
2315 /**
2316 * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
2317 * @details
2318 * Each TDLS enabled vdev can track outgoing transmits/rssi/rates to/of
2319 * peers in a connection tracking table for possible TDLS link creation
2320 * or deletion. This controls the number of tracked peers per vdev.
2321 */
2322 A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
2323 A_UINT32 beacon_tx_offload_max_vdev;
2324 A_UINT32 num_multicast_filter_entries;
2325 A_UINT32 num_wow_filters; /*host can configure the number of wow filters */
2326
2327 /**
2328 * @brief num_keep_alive_pattern - Num of keep alive patterns configured
2329 * from host.
2330 */
2331 A_UINT32 num_keep_alive_pattern;
2332 /**
2333 * @brief keep_alive_pattern_size - keep alive pattern size.
2334 */
2335 A_UINT32 keep_alive_pattern_size;
2336
2337 /**
2338 * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
2339 * @details
2340 * Each TDLS STA can become a sleep STA independently. This parameter
2341 * mentions how many such sleep STAs can be supported concurrently.
2342 */
2343 A_UINT32 max_tdls_concurrent_sleep_sta;
2344
2345 /**
2346 * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
2347 * @details
2348 * Each TDLS STA can become a buffer STA independently. This parameter
2349 * mentions how many such buffer STAs can be supported concurrently.
2350 */
2351 A_UINT32 max_tdls_concurrent_buffer_sta;
2352
2353 /**
2354 * @brief wmi_send_separate - host configures fw to send the wmi separately
2355 */
2356 A_UINT32 wmi_send_separate;
2357
2358 /**
2359 * @brief num_ocb_vdevs - Number of vdevs used for OCB support
2360 */
2361 A_UINT32 num_ocb_vdevs;
2362
2363 /**
2364 * @brief num_ocb_channels - The supported number of simultaneous OCB channels
2365 */
2366 A_UINT32 num_ocb_channels;
2367
2368 /**
2369 * @brief num_ocb_schedules - The supported number of OCB schedule segments
2370 */
2371 A_UINT32 num_ocb_schedules;
Manikandan Mohan30728082015-12-09 12:35:24 -08002372 /**
2373 * @brief specific configuration from host, such as per platform configuration
2374 */
2375 #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
2376 #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002377
2378 #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
2379 #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
2380
2381 #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
2382 #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
2383
2384 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
2385 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
2386
2387 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
2388 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
2389
2390 #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
2391 #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
2392
2393 #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
2394 #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
2395
2396 #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
2397 #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
2398
2399 #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
2400 #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
2401
Pradeep Reddy POTTETI67c778a2016-06-20 14:00:38 +05302402 #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_S 9
2403 #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_M 0x200
2404
Manikandan Mohan30728082015-12-09 12:35:24 -08002405 A_UINT32 flag1;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002406
2407 /** @brief smart_ant_cap - Smart Antenna capabilities information
2408 * @details
2409 * 1 - Smart antenna is enabled.
2410 * 0 - Smart antenna is disabled.
2411 * In future this can contain smart antenna specifc capabilities.
2412 */
2413 A_UINT32 smart_ant_cap;
2414
2415 /**
2416 * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
2417 * during init
2418 */
2419 A_UINT32 BK_Minfree;
2420 A_UINT32 BE_Minfree;
2421 A_UINT32 VI_Minfree;
2422 A_UINT32 VO_Minfree;
2423
2424 /**
2425 * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
2426 * descriptor memory allocation.
2427 * 1 - Allocate fragment descriptor memory for data packet in firmware.
2428 * If host wants to transmit data packet at its desired rate,
2429 * this field must be set.
2430 * 0 - Don't allocate fragment descriptor for data packet.
2431 */
2432 A_UINT32 alloc_frag_desc_for_data_pkt;
Govind Singh86180292016-02-01 14:03:37 +05302433
2434 /*
2435 * how much space to allocate for NDP NS (neighbor solicitation)
2436 * specs
2437 */
2438 A_UINT32 num_ns_ext_tuples_cfg;
Sandeep Puligillab6ddc262016-03-09 13:06:16 -08002439 /**
2440 * size (in bytes) of the buffer the FW shall allocate to store
2441 * packet filtering instructions
2442 */
2443 A_UINT32 bpf_instruction_size;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05302444 /**
2445 * Maximum no of BSSID based RX filters host would program
2446 * Value 0 means host doesn't given any limit to FW.
2447 */
2448 A_UINT32 max_bssid_rx_filters;
Krishna Kumaar Natarajan7dde8c72016-03-25 15:11:49 -07002449 /**
2450 * Use PDEV ID instead of MAC ID, added for backward compatibility with
2451 * older host which is using MAC ID. 1 means PDEV ID, 0 means MAC ID.
2452 */
2453 A_UINT32 use_pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002454} wmi_resource_config;
2455
Manikandan Mohan30728082015-12-09 12:35:24 -08002456#define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
2457 do { \
2458 (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
2459 (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
2460 WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
2461 } while (0)
2462#define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
2463 (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
2464 WMI_RSRC_CFG_FLAG_ ## flag ## _S)
2465
2466#define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
2467 WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
2468#define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
2469 WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
2470
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002471#define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
2472 WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
2473#define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
2474 WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
2475
2476#define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
2477 WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
2478#define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
2479 WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
2480
2481#define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
2482 WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
2483#define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
2484 WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
2485
2486#define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
2487 WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
2488#define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
2489 WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
2490
2491#define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
2492 WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
2493#define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
2494 WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
2495
2496#define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
2497 WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
2498#define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
2499 WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
2500
2501#define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
2502 WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
2503#define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
2504 WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
2505
2506#define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
2507 WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
2508#define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
2509 WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
2510
Pradeep Reddy POTTETI67c778a2016-06-20 14:00:38 +05302511#define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(word32, value) \
2512 WMI_RSRC_CFG_FLAG_SET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT, (value))
2513#define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_GET(word32) \
2514 WMI_RSRC_CFG_FLAG_GET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT)
2515
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002516typedef struct {
2517 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
2518
2519 /** The following indicate the WMI versions to be supported by
2520 * the host driver. Note that the host driver decide to
2521 * "downgrade" its WMI version support and this may not be the
2522 * native version of the host driver. */
2523 wmi_abi_version host_abi_vers;
2524
2525 A_UINT32 num_host_mem_chunks;
2526 /** size of array host_mem_chunks[] */
Pradeep Reddy POTTETIa280b5c2016-06-20 14:16:23 +05302527 /* The TLVs for resource_config, host_mem_chunks[], and
2528 * hw_mode_config will follow.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002529 * wmi_resource_config resource_config;
2530 * wlan_host_memory_chunk host_mem_chunks[];
Pradeep Reddy POTTETIa280b5c2016-06-20 14:16:23 +05302531 * wmi_pdev_set_hw_mode_cmd_fixed_param hw_mode_config;
2532 * Note that the hw_mode_config, in spite of its "pdev" name,
2533 * applies to the entire target rather than for a single pdev
2534 * within the target.
2535 * To avoid specifying a HW mode for the target, the host should
2536 * fill hw_mode_config's fields with 0x0.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002537 */
2538
2539} wmi_init_cmd_fixed_param;
2540
2541/**
2542 * TLV for channel list
2543 */
2544typedef struct {
2545 /** WMI_CHAN_LIST_TAG */
2546 A_UINT32 tag;
2547 /** # of channels to scan */
2548 A_UINT32 num_chan;
2549 /** channels in Mhz */
2550 A_UINT32 channel_list[1];
2551} wmi_chan_list;
2552
2553/**
2554 * TLV for bssid list
2555 */
2556typedef struct {
2557 /** WMI_BSSID_LIST_TAG */
2558 A_UINT32 tag;
2559 /** number of bssids */
2560 A_UINT32 num_bssid;
2561 /** bssid list */
2562 wmi_mac_addr bssid_list[1];
2563} wmi_bssid_list;
2564
2565/**
2566 * TLV for ie data.
2567 */
2568typedef struct {
2569 /** WMI_IE_TAG */
2570 A_UINT32 tag;
2571 /** number of bytes in ie data */
2572 A_UINT32 ie_len;
2573 /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4 ) */
2574 A_UINT32 ie_data[1];
2575} wmi_ie_data;
2576
Nitesh Shahe5aa26b2016-07-08 12:03:44 +05302577/**
2578 * TLV used for length/buffer
2579 */
2580typedef struct {
2581 /**
2582 * TLV tag and len; tag equals
2583 * WMITLV_TAG_STRUC_wmi_tlv_buf_len_param
2584 */
2585 A_UINT32 tlv_header;
2586 A_UINT32 buf_len; /** Length of buf */
2587 /**
2588 * Following this structure is the TLV byte stream of buf
2589 * of length buf_len:
2590 * A_UINT8 buf[];
2591 *
2592 */
2593} wmi_tlv_buf_len_param;
2594
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002595typedef struct {
2596 /** Len of the SSID */
2597 A_UINT32 ssid_len;
2598 /** SSID */
2599 A_UINT32 ssid[8];
2600} wmi_ssid;
2601
2602typedef struct {
2603 /** WMI_SSID_LIST_TAG */
2604 A_UINT32 tag;
2605 A_UINT32 num_ssids;
2606 wmi_ssid ssids[1];
2607} wmi_ssid_list;
2608
2609/* prefix used by scan requestor ids on the host */
2610#define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
2611/* prefix used by scan request ids generated on the host */
2612/* host cycles through the lower 12 bits to generate ids */
2613#define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
2614
2615#define WLAN_SCAN_PARAMS_MAX_SSID 16
2616#define WLAN_SCAN_PARAMS_MAX_BSSID 4
2617#define WLAN_SCAN_PARAMS_MAX_IE_LEN 512
2618
2619typedef struct {
2620 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
2621 /** Scan ID */
2622 A_UINT32 scan_id;
2623 /** Scan requestor ID */
2624 A_UINT32 scan_req_id;
2625 /** VDEV id(interface) that is requesting scan */
2626 A_UINT32 vdev_id;
2627 /** Scan Priority, input to scan scheduler */
2628 A_UINT32 scan_priority;
2629 /** Scan events subscription */
2630 A_UINT32 notify_scan_events;
2631 /** dwell time in msec on active channels */
2632 A_UINT32 dwell_time_active;
2633 /** dwell time in msec on passive channels */
2634 A_UINT32 dwell_time_passive;
2635 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
2636 A_UINT32 min_rest_time;
2637 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
2638 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
2639 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
2640 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
2641 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
2642 * irrespective of activity. activity is determined by the idle_time parameter.
2643 */
2644 A_UINT32 max_rest_time;
2645 /** time before sending next set of probe requests.
2646 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
2647 * The number of probe requests specified depends on the ssid_list and bssid_list
2648 */
2649 A_UINT32 repeat_probe_time;
2650 /** time in msec between 2 consequetive probe requests with in a set. */
2651 A_UINT32 probe_spacing_time;
2652 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
2653 A_UINT32 idle_time;
2654 /** maximum time in msec allowed for scan */
2655 A_UINT32 max_scan_time;
2656 /** delay in msec before sending first probe request after switching to a channel */
2657 A_UINT32 probe_delay;
2658 /** Scan control flags */
2659 A_UINT32 scan_ctrl_flags;
2660 /** Burst duration time in msec*/
2661 A_UINT32 burst_duration;
2662
2663 /** # if channels to scan. In the TLV channel_list[] */
2664 A_UINT32 num_chan;
2665 /** number of bssids. In the TLV bssid_list[] */
2666 A_UINT32 num_bssid;
2667 /** number of ssid. In the TLV ssid_list[] */
2668 A_UINT32 num_ssids;
2669 /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
2670 A_UINT32 ie_len;
2671 /** Max number of probes to be sent */
2672 A_UINT32 n_probes;
2673
2674 /**
2675 * TLV (tag length value ) parameters follow the scan_cmd
2676 * structure. The TLV's are:
2677 * A_UINT32 channel_list[];
2678 * wmi_ssid ssid_list[];
2679 * wmi_mac_addr bssid_list[];
2680 * A_UINT8 ie_data[];
2681 */
2682} wmi_start_scan_cmd_fixed_param;
2683
2684/**
2685 * scan control flags.
2686 */
2687
2688/** passively scan all channels including active channels */
2689#define WMI_SCAN_FLAG_PASSIVE 0x1
2690/** add wild card ssid probe request even though ssid_list is specified. */
2691#define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
2692/** add cck rates to rates/xrate ie for the generated probe request */
2693#define WMI_SCAN_ADD_CCK_RATES 0x4
2694/** add ofdm rates to rates/xrate ie for the generated probe request */
2695#define WMI_SCAN_ADD_OFDM_RATES 0x8
2696/** To enable indication of Chan load and Noise floor to host */
2697#define WMI_SCAN_CHAN_STAT_EVENT 0x10
2698/** Filter Probe request frames */
2699#define WMI_SCAN_FILTER_PROBE_REQ 0x20
2700/**When set, not to scan DFS channels*/
2701#define WMI_SCAN_BYPASS_DFS_CHN 0x40
2702/**When set, certain errors are ignored and scan continues.
2703 * Different FW scan engine may use its own logic to decide what errors to ignore*/
2704#define WMI_SCAN_CONTINUE_ON_ERROR 0x80
2705/** Enable promiscous mode for ese */
2706#define WMI_SCAN_FILTER_PROMISCOUS 0x100
2707/** allow to send probe req on DFS channel */
2708#define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
2709/** add TPC content in probe req frame */
2710#define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400
2711/** add DS content in probe req frame */
2712#define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800
2713/** use random mac address for TA for probe request frame and add
2714 * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
2715 * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/
2716#define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000
Govind Singh32cced32016-02-01 13:33:09 +05302717/** allow mgmt transmission during off channel scan */
2718#define WMI_SCAN_OFFCHAN_MGMT_TX 0x2000
2719/** allow data transmission during off channel scan */
2720#define WMI_SCAN_OFFCHAN_DATA_TX 0x4000
2721/** allow capture ppdu with phy errrors */
2722#define WMI_SCAN_CAPTURE_PHY_ERROR 0x8000
Sandeep Puligilla1d9a8d82016-03-09 13:07:58 -08002723/** always do passive scan on passive channels */
2724#define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x1000
Pradeep Reddy POTTETIb36e8fc2016-06-20 15:10:26 +05302725/** set HALF (10MHz) rate support */
2726#define WMI_SCAN_FLAG_HALF_RATE_SUPPORT 0x20000
2727/** set Quarter (5MHz) rate support */
2728#define WMI_SCAN_FLAG_QUARTER_RATE_SUPPORT 0x40000
2729
Anurag Chouhanb3fa7a12016-04-18 17:26:49 +05302730/** for adaptive scan mode using 3 bits (21 - 23 bits) */
2731#define WMI_SCAN_DWELL_MODE_MASK 0x00E00000
2732#define WMI_SCAN_DWELL_MODE_SHIFT 21
2733
2734typedef enum {
2735 WMI_SCAN_DWELL_MODE_DEFAULT = 0,
2736 WMI_SCAN_DWELL_MODE_CONSERVATIVE = 1,
2737 WMI_SCAN_DWELL_MODE_MODERATE = 2,
2738 WMI_SCAN_DWELL_MODE_AGGRESSIVE = 3,
2739 WMI_SCAN_DWELL_MODE_STATIC = 4,
2740} WMI_SCAN_DWELL_MODE;
2741
2742#define WMI_SCAN_SET_DWELL_MODE(flag, mode) \
2743 do { \
2744 (flag) |= (((mode) << WMI_SCAN_DWELL_MODE_SHIFT) & \
2745 WMI_SCAN_DWELL_MODE_MASK); \
2746 } while (0)
2747
2748#define WMI_SCAN_GET_DWELL_MODE(flag) \
2749 (((flag) & WMI_SCAN_DWELL_MODE_MASK) >> WMI_SCAN_DWELL_MODE_SHIFT)
2750
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002751/** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
2752#define WMI_SCAN_CLASS_MASK 0xFF000000
2753
2754/*
2755 * Masks identifying types/ID of scans
2756 * Scan_Stop macros should be the same value as below defined in UMAC
2757 * #define IEEE80211_SPECIFIC_SCAN 0x00000000
2758 * #define IEEE80211_VAP_SCAN 0x01000000
2759 * #define IEEE80211_ALL_SCANS 0x04000000
2760 */
2761#define WMI_SCAN_STOP_ONE 0x00000000
2762#define WMI_SCN_STOP_VAP_ALL 0x01000000
2763#define WMI_SCAN_STOP_ALL 0x04000000
2764
2765typedef struct {
2766 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
2767 /** requestor requesting cancel */
2768 A_UINT32 requestor;
2769 /** Scan ID */
2770 A_UINT32 scan_id;
2771 /**
2772 * Req Type
2773 * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
2774 * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
2775 * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
2776 * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
2777 */
2778 A_UINT32 req_type;
2779 /**
2780 * vDev ID
2781 * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
2782 */
2783 A_UINT32 vdev_id;
2784} wmi_stop_scan_cmd_fixed_param;
2785
2786#define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */
2787#define APPEND_TO_EXISTING_CHAN_LIST 1
2788
2789typedef struct {
2790 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
2791 A_UINT32 num_scan_chans;
2792 /** no of elements in chan_info[] */
2793 A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
2794 /** Followed by the variable length TLV chan_info:
2795 * wmi_channel chan_info[] */
2796} wmi_scan_chan_list_cmd_fixed_param;
2797
2798/*
2799 * Priority numbers must be sequential, starting with 0.
2800 */
2801/* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
2802typedef enum {
2803 WMI_SCAN_PRIORITY_VERY_LOW = 0,
2804 WMI_SCAN_PRIORITY_LOW,
2805 WMI_SCAN_PRIORITY_MEDIUM,
2806 WMI_SCAN_PRIORITY_HIGH,
2807 WMI_SCAN_PRIORITY_VERY_HIGH,
2808
2809 WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
2810} wmi_scan_priority;
2811
2812/* Five Levels for Requested Priority */
2813/* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */
2814typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
2815
2816/**
2817 * 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
2818 * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
2819 * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
2820 */
2821typedef struct {
2822 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
2823 /**
2824 * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
2825 * 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
2826 */
2827 A_UINT32 vdev_type;
2828 /**
2829 * number of rows in mapping_table for a specific vdev
2830 * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
2831 */
2832 A_UINT32 number_rows;
2833 /** mapping_table for a specific vdev follows this TLV
2834 * WLAN_PRIORITY_MAPPING mapping_table[]; */
2835} wmi_scan_sch_priority_table_cmd_fixed_param;
2836
2837/** update flags */
2838#define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1
2839#define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2
2840#define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4
2841
2842typedef struct {
2843 A_UINT32 tlv_header;
2844 /** requestor requesting update scan request */
2845 A_UINT32 requestor;
2846 /** Scan ID of the scan request that need to be update */
2847 A_UINT32 scan_id;
2848 /** update flags, indicating which of the following fields are valid and need to be updated*/
2849 A_UINT32 scan_update_flags;
2850 /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
2851 A_UINT32 scan_priority;
2852 /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
2853 A_UINT32 min_rest_time;
2854 /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
2855 A_UINT32 max_rest_time;
2856} wmi_scan_update_request_cmd_fixed_param;
2857
2858typedef struct {
2859 A_UINT32 tlv_header;
2860 /** oui to be used in probe request frame when random mac addresss is
2861 * requested part of scan parameters. this is applied to both FW internal scans and
2862 * host initated scans. host can request for random mac address with
2863 * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */
2864 A_UINT32 prob_req_oui;
2865} wmi_scan_prob_req_oui_cmd_fixed_param;
2866
2867enum wmi_scan_event_type {
2868 WMI_SCAN_EVENT_STARTED = 0x1,
2869 WMI_SCAN_EVENT_COMPLETED = 0x2,
2870 WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
2871 WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
2872 WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
2873 WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
2874 WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
Manikandan Mohan46b95c02015-12-09 12:23:08 -08002875 WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
2876 WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
Govind Singh45ef44a2016-02-01 17:45:22 +05302877 WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */
2878 WMI_SCAN_EVENT_RESUMED = 0x400, /* scan request is resumed */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002879 WMI_SCAN_EVENT_MAX = 0x8000
2880};
2881
2882enum wmi_scan_completion_reason {
2883 /** scan related events */
2884 WMI_SCAN_REASON_NONE = 0xFF,
2885 WMI_SCAN_REASON_COMPLETED = 0,
2886 WMI_SCAN_REASON_CANCELLED = 1,
2887 WMI_SCAN_REASON_PREEMPTED = 2,
2888 WMI_SCAN_REASON_TIMEDOUT = 3,
2889 WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
Govind Singh45ef44a2016-02-01 17:45:22 +05302890 WMI_SCAN_REASON_SUSPENDED = 5,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002891 WMI_SCAN_REASON_MAX,
2892};
2893
2894typedef struct {
2895 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
2896 /** scan event (wmi_scan_event_type) */
2897 A_UINT32 event;
2898 /** status of the scan completion event */
2899 A_UINT32 reason;
2900 /** channel freq , only valid for FOREIGN channel event*/
2901 A_UINT32 channel_freq;
2902 /**id of the requestor whose scan is in progress */
2903 A_UINT32 requestor;
2904 /**id of the scan that is in progress */
2905 A_UINT32 scan_id;
2906 /**id of VDEV that requested the scan */
2907 A_UINT32 vdev_id;
2908} wmi_scan_event_fixed_param;
2909
2910/* WMI Diag event */
2911typedef struct {
2912 A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
2913 A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
2914 A_UINT32 count; /* Number of diag frames added to current event */
2915 A_UINT32 dropped;
2916 /* followed by WMITLV_TAG_ARRAY_BYTE */
2917} wmi_diag_event_fixed_param;
2918
2919/*
2920 * If FW has multiple active channels due to MCC(multi channel concurrency),
2921 * then these stats are combined stats for all the active channels.
2922 */
2923typedef struct {
2924 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
2925 /** ack count, it is an incremental number, not accumulated number */
2926 A_UINT32 ackRcvBad;
2927 /** bad rts count, it is an incremental number, not accumulated number */
2928 A_UINT32 rtsBad;
2929 /** good rts, it is an incremental number, not accumulated number */
2930 A_UINT32 rtsGood;
2931 /** fcs count, it is an incremental number, not accumulated number */
2932 A_UINT32 fcsBad;
2933 /** beacon count, it is an incremental number, not accumulated number */
2934 A_UINT32 noBeacons;
2935} wmi_update_whal_mib_stats_event_fixed_param;
2936
2937/*
2938 * This defines how much headroom is kept in the
2939 * receive frame between the descriptor and the
2940 * payload, in order for the WMI PHY error and
2941 * management handler to insert header contents.
2942 *
2943 * This is in bytes.
2944 */
2945#define WMI_MGMT_RX_HDR_HEADROOM sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr)
2946
2947/** This event will be used for sending scan results
2948 * as well as rx mgmt frames to the host. The rx buffer
2949 * will be sent as part of this WMI event. It would be a
2950 * good idea to pass all the fields in the RX status
2951 * descriptor up to the host.
2952 */
2953/* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
2954#define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
2955
2956/** flag indicating that the the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
2957#define WMI_MGMT_RX_HDR_EXTSCAN 0x01
2958
2959/**
2960 * flag indicating that the the mgmt frame (probe req/beacon) is received in
2961 * the context of matched network by FW ENLO
2962 */
2963#define WMI_MGMT_RX_HDR_ENLO 0x02
2964
2965typedef struct {
2966 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
2967 /** channel on which this frame is received. */
2968 A_UINT32 channel;
2969 /** snr information used to cal rssi */
2970 A_UINT32 snr;
2971 /** Rate kbps */
2972 A_UINT32 rate;
2973 /** rx phy mode WLAN_PHY_MODE */
2974 A_UINT32 phy_mode;
2975 /** length of the frame */
2976 A_UINT32 buf_len;
2977 /** rx status */
2978 A_UINT32 status;
2979 /** RSSI of PRI 20MHz for each chain. */
2980 A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
2981 /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
2982 A_UINT32 flags;
2983 /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
2984 A_INT32 rssi;
2985
2986 /** delta between local TSF(TSF timestamp when frame was RXd)
2987 * and remote TSF(TSF timestamp in the IE for mgmt frame
2988 * beacon,proberesp for e.g). If remote TSF is not available,
2989 * delta set to 0.
2990 * Although tsf_delta is stored as A_UINT32, it can be negative,
2991 * and thus would need to be sign-extended if added to a value
2992 * larger than 32 bits.
2993 */
2994 A_UINT32 tsf_delta;
Sandeep Puligilla62f7ca02016-03-24 15:48:33 -07002995 /*
2996 * The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from
2997 * TSF timestamp in the RX MAC descriptor provided by HW.
2998 */
2999 A_UINT32 rx_tsf_l32;
3000
3001 /*
3002 *The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register
3003 * after the packet is received.
3004 */
3005 A_UINT32 rx_tsf_u32;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003006 /* This TLV is followed by array of bytes:
3007 * // management frame buffer
3008 * A_UINT8 bufp[];
3009 */
3010} wmi_mgmt_rx_hdr;
3011
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003012typedef struct {
3013 /** TSF timestamp */
3014 A_UINT32 tsf_timestamp;
3015
3016 /**
3017 * Current freq1, freq2
3018 *
3019 * [7:0]: freq1[lo]
3020 * [15:8] : freq1[hi]
3021 * [23:16]: freq2[lo]
3022 * [31:24]: freq2[hi]
3023 */
3024 A_UINT32 freq_info_1;
3025
3026 /**
3027 * Combined RSSI over all chains and channel width for this PHY error
3028 *
3029 * [7:0]: RSSI combined
3030 * [15:8]: Channel width (MHz)
3031 * [23:16]: PHY error code
3032 * [24:16]: reserved (future use)
3033 */
3034 A_UINT32 freq_info_2;
3035
3036 /**
3037 * RSSI on chain 0 through 3
3038 *
3039 * This is formatted the same as the PPDU_START RX descriptor
3040 * field:
3041 *
3042 * [7:0]: pri20
3043 * [15:8]: sec20
3044 * [23:16]: sec40
3045 * [31:24]: sec80
3046 */
3047 A_UINT32 rssi_chain0;
3048 A_UINT32 rssi_chain1;
3049 A_UINT32 rssi_chain2;
3050 A_UINT32 rssi_chain3;
3051
3052 /**
3053 * Last calibrated NF value for chain 0 through 3
3054 *
3055 * nf_list_1:
3056 *
3057 * + [15:0] - chain 0
3058 * + [31:16] - chain 1
3059 *
3060 * nf_list_2:
3061 *
3062 * + [15:0] - chain 2
3063 * + [31:16] - chain 3
3064 */
3065 A_UINT32 nf_list_1;
3066 A_UINT32 nf_list_2;
3067
3068 /** Length of the frame */
3069 A_UINT32 buf_len;
3070} wmi_single_phyerr_rx_hdr;
3071
3072#define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff
3073#define WMI_UNIFIED_FREQINFO_1_LO_S 0
3074#define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00
3075#define WMI_UNIFIED_FREQINFO_1_HI_S 8
3076#define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000
3077#define WMI_UNIFIED_FREQINFO_2_LO_S 16
3078#define WMI_UNIFIED_FREQINFO_2_HI 0xff000000
3079#define WMI_UNIFIED_FREQINFO_2_HI_S 24
3080
3081/*
3082 * Please keep in mind that these _SET macros break macro side effect
3083 * assumptions; don't be clever with them.
3084 */
3085#define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05303086 (WMI_F_MS((hdr)->freq_info_1, \
3087 WMI_UNIFIED_FREQINFO_ ## f ## _LO) \
3088 | (WMI_F_MS((hdr)->freq_info_1, \
3089 WMI_UNIFIED_FREQINFO_ ## f ## _HI) << 8))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003090
3091#define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \
3092 do { \
3093 WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \
3094 WMI_UNIFIED_FREQINFO_ ## f ## _LO); \
3095 WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \
3096 WMI_UNIFIED_FREQINFO_ ## f ## _HI); \
3097 } while (0)
3098
3099#define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff
3100#define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0
3101#define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00
3102#define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8
3103#define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000
3104#define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
3105
3106#define WMI_UNIFIED_RSSI_COMB_GET(hdr) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05303107 ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003108 WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
3109
3110#define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \
3111 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
3112 WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
3113
3114#define WMI_UNIFIED_CHWIDTH_GET(hdr) \
3115 WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
3116
3117#define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \
3118 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
3119 WMI_UNIFIED_FREQINFO_2_CHWIDTH);
3120
3121#define WMI_UNIFIED_PHYERRCODE_GET(hdr) \
3122 WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
3123
3124#define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \
3125 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
3126 WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
3127
3128#define WMI_UNIFIED_CHAIN_0 0x0000ffff
3129#define WMI_UNIFIED_CHAIN_0_S 0
3130#define WMI_UNIFIED_CHAIN_1 0xffff0000
3131#define WMI_UNIFIED_CHAIN_1_S 16
3132#define WMI_UNIFIED_CHAIN_2 0x0000ffff
3133#define WMI_UNIFIED_CHAIN_2_S 0
3134#define WMI_UNIFIED_CHAIN_3 0xffff0000
3135#define WMI_UNIFIED_CHAIN_3_S 16
3136
3137#define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1
3138#define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1
3139#define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2
3140#define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2
3141
3142#define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \
3143 ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, \
3144 WMI_UNIFIED_CHAIN_ ## c)))
3145
3146#define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \
3147 WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, (nf) & 0xffff, \
3148 WMI_UNIFIED_CHAIN_ ## c);
3149
3150/*
3151 * For now, this matches what the underlying hardware is doing.
3152 * Update ar6000ProcRxDesc() to use these macros when populating
3153 * the rx descriptor and then we can just copy the field over
3154 * to the WMI PHY notification without worrying about breaking
3155 * things.
3156 */
3157#define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff
3158#define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0
3159#define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00
3160#define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8
3161#define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000
3162#define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16
3163#define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000
3164#define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24
3165
3166#define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \
3167 WMI_F_RMW((hdr)->rssi_chain ## c, (rssi) & 0xff, \
3168 WMI_UNIFIED_RSSI_CHAN_ ## ch);
3169
3170#define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \
3171 ((int8_t) (WMI_F_MS((hdr)->rssi_chain ## c, \
3172 WMI_UNIFIED_RSSI_CHAN_ ## ch)))
3173
3174typedef struct {
3175 /** Phy error event header */
3176 wmi_single_phyerr_rx_hdr hdr;
3177 /** frame buffer */
3178 A_UINT8 bufp[1];
3179} wmi_single_phyerr_rx_event;
3180
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08003181/* PHY ERROR MASK 0 */
3182/* bits 1:0 defined but not published */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05303183#define WMI_PHY_ERROR_MASK0_RADAR (1<<2)
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08003184/* bits 23:3 defined but not published */
3185#define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1<<24)
3186/* bits 25:24 defined but not published */
3187#define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1<<26)
3188/* bits 31:27 defined but not published */
3189
3190/* PHY ERROR MASK 1
3191 * bits 13:0 defined but not published
3192 * bits 31:14 reserved
3193 */
3194
3195/* PHY ERROR MASK 2
3196 * bits 31:0 reserved
3197 */
3198
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003199typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303200 /* TLV tag and len; tag equals
3201 * WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr
3202 */
3203 A_UINT32 tlv_header;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003204 /** Phy error phy error count */
3205 A_UINT32 num_phyerr_events;
3206 A_UINT32 tsf_l32;
3207 A_UINT32 tsf_u32;
3208 A_UINT32 buf_len;
Govind Singh869c9872016-02-22 18:36:34 +05303209 union {
3210 /* OBSOLETE - will be removed once all refs are gone */
3211 A_UINT32 pmac_id;
3212 /** pdev_id for identifying the MAC
3213 * See macros starting with WMI_PDEV_ID_ for values.
3214 */
3215 A_UINT32 pdev_id;
3216 };
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08003217 A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
3218 A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
3219 A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
3220
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003221 /* This TLV is followed by array of bytes:
3222 * // frame buffer - contains multiple payloads in the order:
3223 * // header - payload, header - payload...
3224 * (The header is of type: wmi_single_phyerr_rx_hdr)
3225 * A_UINT8 bufp[];
3226 */
3227} wmi_comb_phyerr_rx_hdr;
3228
3229/* WMI MGMT TX */
3230typedef struct {
3231 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
3232 /** unique id identifying the VDEV, generated by the caller */
3233 A_UINT32 vdev_id;
3234 /** peer MAC address */
3235 wmi_mac_addr peer_macaddr;
3236 /** xmit rate */
3237 A_UINT32 tx_rate;
3238 /** xmit power */
3239 A_UINT32 tx_power;
3240 /** Buffer length in bytes */
3241 A_UINT32 buf_len;
3242 /* This TLV is followed by array of bytes:
3243 * // management frame buffer
3244 * A_UINT8 bufp[];
3245 */
3246} wmi_mgmt_tx_hdr;
3247
3248typedef struct {
3249 /*
3250 * TLV tag and len;
3251 * tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param
3252 */
3253 A_UINT32 tlv_header;
3254 A_UINT32 vdev_id;
3255 /* echoed in tx_compl_event */
3256 A_UINT32 desc_id;
3257 /* MHz units */
3258 A_UINT32 chanfreq;
3259 A_UINT32 paddr_lo;
3260 A_UINT32 paddr_hi;
3261 A_UINT32 frame_len;
3262 /* Buffer length in bytes */
3263 A_UINT32 buf_len;
3264 /*
3265 * This TLV is followed by array of bytes:
3266 * First 64 bytes of management frame
3267 * A_UINT8 bufp[];
3268 */
3269} wmi_mgmt_tx_send_cmd_fixed_param;
3270
3271typedef struct {
3272 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
3273 A_UINT32 value;
3274} wmi_echo_event_fixed_param;
3275
3276typedef struct {
3277 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
3278 A_UINT32 value;
3279} wmi_echo_cmd_fixed_param;
3280
3281typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303282 /* TLV tag and len; tag equals
3283 * WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param
3284 */
3285 A_UINT32 tlv_header;
3286 /** pdev_id for identifying the MAC
3287 * See macros starting with WMI_PDEV_ID_ for values.
3288 */
3289 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003290 /** reg domain code */
3291 A_UINT32 reg_domain;
3292 A_UINT32 reg_domain_2G;
3293 A_UINT32 reg_domain_5G;
3294 A_UINT32 conformance_test_limit_2G;
3295 A_UINT32 conformance_test_limit_5G;
Govind Singh32cced32016-02-01 13:33:09 +05303296 A_UINT32 dfs_domain;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003297} wmi_pdev_set_regdomain_cmd_fixed_param;
3298
3299typedef struct {
3300 /** true for scan start and flase for scan end */
3301 A_UINT32 scan_start;
3302} wmi_pdev_scan_cmd;
3303
Govind Singhc7d51942016-02-01 12:09:31 +05303304/* WMI support for setting ratemask in target */
3305
3306typedef struct {
3307 A_UINT32 tlv_header;
3308 /*
3309 * TLV tag and len; tag equals
3310 * WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param
3311 */
3312 A_UINT32 vdev_id;
3313 /*
3314 * 0 - cck/ofdm
3315 * 1 - HT
3316 * 2 - VHT */
3317 A_UINT32 type;
3318
3319 A_UINT32 mask_lower32;
3320 A_UINT32 mask_higher32;
3321} wmi_vdev_config_ratemask_cmd_fixed_param;
3322
3323/* nrp action - Filter Neighbor Rx Packets - add/remove filter */
3324enum {
3325 WMI_FILTER_NRP_ACTION_ADD = 0x1,
3326 WMI_FILTER_NRP_ACTION_REMOVE = 0x2,
3327 WMI_FILTER_NRP_ACTION_GET_LIST = 0x3,
3328}; /* nrp - Neighbor Rx Packets */
3329
3330/* nrp type - Filter Neighbor Rx Packets - ap/client addr */
3331enum {
3332 WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1,
3333 WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2,
3334};
3335
3336/* nrp flag - Filter Neighbor Rx Packets
3337 * (capture flag, 2 & 3 not initially supported)
3338 */
3339enum {
3340 WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1,
3341 WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2,
3342 WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3,
3343};
3344
3345/* Filter for Neighbor Rx Packets */
3346typedef struct {
3347 A_UINT32 tlv_header;
3348 /*
3349 * TLV tag and len; tag equals
3350 * WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param
3351 */
3352 A_UINT32 vdev_id;
3353 /* AP Bssid or Client Mac-addr */
3354 wmi_mac_addr addr;
3355 /* Add/Remove NRF Filter */
3356 A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
3357 /* client/ap filter */
3358 A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
3359 /* optional - tx/rx capture */
3360 A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
3361 /* BSSID index - index of the BSSID register */
3362 A_UINT32 bssid_idx;
3363} wmi_vdev_filter_nrp_config_cmd_fixed_param;
3364
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003365/*Command to set/unset chip in quiet mode*/
3366typedef struct {
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05303367 /*
3368 * TLV tag and len; tag equals
3369 * WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param
3370 */
3371 A_UINT32 tlv_header;
3372 /*
3373 * pdev_id for identifying the MAC, See macros
3374 * starting with WMI_PDEV_ID_ for values.
3375 */
3376 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003377 A_UINT32 period; /*period in TUs */
3378 A_UINT32 duration; /*duration in TUs */
3379 A_UINT32 next_start; /*offset in TUs */
3380 A_UINT32 enabled; /*enable/disable */
3381} wmi_pdev_set_quiet_cmd_fixed_param;
3382
Govind Singh869c9872016-02-22 18:36:34 +05303383typedef struct {
3384 /* TLV tag and len; tag equals
3385 * WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param
3386 */
3387 A_UINT32 tlv_header;
3388 A_UINT32 vdev_id; /* Virtual interface ID */
3389 A_UINT32 period; /* period in TUs */
3390 A_UINT32 duration; /* duration in TUs */
3391 A_UINT32 next_start; /* offset in TUs */
3392 A_UINT32 enabled; /* enable/disable */
3393} wmi_vdev_set_quiet_cmd_fixed_param;
3394
Krishna Kumaar Natarajanea0a7962016-04-16 14:09:09 +05303395typedef struct {
3396 /*
3397 * TLV tag and len; tag equals
3398 * WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param
3399 */
3400 A_UINT32 tlv_header;
3401 /*
3402 * vdev id indicating to which the vdev custom aggregation size
3403 * will be applied.
3404 */
3405 A_UINT32 vdev_id;
3406 /*
3407 * Size for tx aggregation (max MPDUs per A-MPDU) for the vdev
3408 * mentioned in vdev id
3409 */
3410 A_UINT32 tx_aggr_size;
3411 /*
3412 * Size for rx aggregation (block ack window size limit) for
3413 * the vdev mentioned in vdev id
3414 */
3415 A_UINT32 rx_aggr_size;
3416} wmi_vdev_set_custom_aggr_size_cmd_fixed_param;
3417
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003418/*
3419 * Command to enable/disable Green AP Power Save.
3420 * This helps conserve power during AP operation. When the AP has no
3421 * stations associated with it, the host can enable Green AP Power Save
3422 * to request the firmware to shut down all but one transmit and receive
3423 * chains.
3424 */
3425typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303426 /** TLV tag and len; tag equals
3427 * WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param
3428 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003429 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303430 /** pdev_id for identifying the MAC
3431 * See macros starting with WMI_PDEV_ID_ for values.
3432 */
3433 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003434 A_UINT32 enable; /*1:enable, 0:disable */
3435} wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
3436
3437#define MAX_HT_IE_LEN 32
Govind Singh869c9872016-02-22 18:36:34 +05303438/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003439typedef struct {
3440 A_UINT32 tlv_header;
3441 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
3442 A_UINT32 reserved0;
3443 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3444 A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
3445 A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
3446 A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
3447 /** The TLV for the HT IE follows:
3448 * A_UINT32 ie_data[];
3449 */
3450} wmi_pdev_set_ht_ie_cmd_fixed_param;
3451
3452#define MAX_VHT_IE_LEN 32
Govind Singh869c9872016-02-22 18:36:34 +05303453/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003454typedef struct {
3455 A_UINT32 tlv_header;
3456 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
3457 A_UINT32 reserved0;
3458 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3459 A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
3460 A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
3461 A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
3462 /** The TLV for the VHT IE follows:
3463 * A_UINT32 ie_data[];
3464 */
3465} wmi_pdev_set_vht_ie_cmd_fixed_param;
3466
3467typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303468 /** TLV tag and len; tag equals
3469 * WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param
3470 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003471 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303472 /** pdev_id for identifying the MAC
3473 * See macros starting with WMI_PDEV_ID_ for values.
3474 */
3475 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003476 wmi_mac_addr base_macaddr;
3477} wmi_pdev_set_base_macaddr_cmd_fixed_param;
3478
3479/*
3480 * For now, the spectral configuration is global rather than
3481 * per-vdev. The vdev is a placeholder and will be ignored
3482 * by the firmware.
3483 */
3484typedef struct {
3485 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
3486 A_UINT32 vdev_id;
3487 A_UINT32 spectral_scan_count;
3488 A_UINT32 spectral_scan_period;
3489 A_UINT32 spectral_scan_priority;
3490 A_UINT32 spectral_scan_fft_size;
3491 A_UINT32 spectral_scan_gc_ena;
3492 A_UINT32 spectral_scan_restart_ena;
3493 A_UINT32 spectral_scan_noise_floor_ref;
3494 A_UINT32 spectral_scan_init_delay;
3495 A_UINT32 spectral_scan_nb_tone_thr;
3496 A_UINT32 spectral_scan_str_bin_thr;
3497 A_UINT32 spectral_scan_wb_rpt_mode;
3498 A_UINT32 spectral_scan_rssi_rpt_mode;
3499 A_UINT32 spectral_scan_rssi_thr;
3500 A_UINT32 spectral_scan_pwr_format;
3501 A_UINT32 spectral_scan_rpt_mode;
3502 A_UINT32 spectral_scan_bin_scale;
3503 A_UINT32 spectral_scan_dBm_adj;
3504 A_UINT32 spectral_scan_chn_mask;
3505} wmi_vdev_spectral_configure_cmd_fixed_param;
3506
3507/*
3508 * Enabling, disabling and triggering the spectral scan
3509 * is a per-vdev operation. That is, it will set channel
3510 * flags per vdev rather than globally; so concurrent scan/run
3511 * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
3512 */
3513typedef struct {
3514 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
3515 A_UINT32 vdev_id;
3516 /* 0 - ignore; 1 - trigger, 2 - clear trigger */
3517 A_UINT32 trigger_cmd;
3518 /* 0 - ignore; 1 - enable, 2 - disable */
3519 A_UINT32 enable_cmd;
3520} wmi_vdev_spectral_enable_cmd_fixed_param;
3521
3522typedef enum {
3523 WMI_CSA_IE_PRESENT = 0x00000001,
3524 WMI_XCSA_IE_PRESENT = 0x00000002,
3525 WMI_WBW_IE_PRESENT = 0x00000004,
3526 WMI_CSWARP_IE_PRESENT = 0x00000008,
3527} WMI_CSA_EVENT_IES_PRESENT_FLAG;
3528
3529/* wmi CSA receive event from beacon frame */
3530typedef struct {
3531 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
3532 A_UINT32 i_fc_dur;
3533/* Bit 0-15: FC */
3534/* Bit 16-31: DUR */
3535 wmi_mac_addr i_addr1;
3536 wmi_mac_addr i_addr2;
3537 /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
3538 * changed in the future without breaking WMI compatibility */
3539 A_UINT32 csa_ie[2];
3540 A_UINT32 xcsa_ie[2];
3541 A_UINT32 wb_ie[2];
3542 A_UINT32 cswarp_ie;
3543 A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
3544} wmi_csa_event_fixed_param;
3545
3546typedef enum {
Govind Singh32cced32016-02-01 13:33:09 +05303547 WAL_PEER_MCAST2UCAST_DISABLED = 0,
3548 /* Drop the frames if match is not found */
3549 WAL_PEER_MCAST2UCAST_DROP_EMPTY = 1,
3550 /* Send as mcast if match is not found */
3551 WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2,
3552} WMI_PEER_MCAST2UCAST_MODE;
3553
3554typedef enum {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003555 /** TX chain mask */
3556 WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
3557 /** RX chain mask */
3558 WMI_PDEV_PARAM_RX_CHAIN_MASK,
3559 /** TX power limit for 2G Radio */
3560 WMI_PDEV_PARAM_TXPOWER_LIMIT2G,
3561 /** TX power limit for 5G Radio */
3562 WMI_PDEV_PARAM_TXPOWER_LIMIT5G,
3563 /** TX power scale */
3564 WMI_PDEV_PARAM_TXPOWER_SCALE,
3565 /** Beacon generation mode . 0: host, 1: target */
3566 WMI_PDEV_PARAM_BEACON_GEN_MODE,
3567 /** Beacon generation mode . 0: staggered 1: bursted */
3568 WMI_PDEV_PARAM_BEACON_TX_MODE,
3569 /** Resource manager off chan mode .
3570 * 0: turn off off chan mode. 1: turn on offchan mode
3571 */
3572 WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
3573 /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */
3574 WMI_PDEV_PARAM_PROTECTION_MODE,
3575 /** Dynamic bandwidth 0: disable 1: enable */
3576 WMI_PDEV_PARAM_DYNAMIC_BW,
3577 /** Non aggregrate/ 11g sw retry threshold.0-disable */
3578 WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
3579 /** aggregrate sw retry threshold. 0-disable*/
3580 WMI_PDEV_PARAM_AGG_SW_RETRY_TH,
3581 /** Station kickout threshold (non of consecutive failures).0-disable */
3582 WMI_PDEV_PARAM_STA_KICKOUT_TH,
3583 /** Aggerate size scaling configuration per AC */
3584 WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING,
3585 /** LTR enable */
3586 WMI_PDEV_PARAM_LTR_ENABLE,
3587 /** LTR latency for BE, in us */
3588 WMI_PDEV_PARAM_LTR_AC_LATENCY_BE,
3589 /** LTR latency for BK, in us */
3590 WMI_PDEV_PARAM_LTR_AC_LATENCY_BK,
3591 /** LTR latency for VI, in us */
3592 WMI_PDEV_PARAM_LTR_AC_LATENCY_VI,
3593 /** LTR latency for VO, in us */
3594 WMI_PDEV_PARAM_LTR_AC_LATENCY_VO,
3595 /** LTR AC latency timeout, in ms */
3596 WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
3597 /** LTR platform latency override, in us */
3598 WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
3599 /** LTR-M override, in us */
3600 WMI_PDEV_PARAM_LTR_RX_OVERRIDE,
3601 /** Tx activity timeout for LTR, in us */
3602 WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
3603 /** L1SS state machine enable */
3604 WMI_PDEV_PARAM_L1SS_ENABLE,
3605 /** Deep sleep state machine enable */
3606 WMI_PDEV_PARAM_DSLEEP_ENABLE,
3607 /** RX buffering flush enable */
3608 WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
3609 /** RX buffering matermark */
3610 WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
3611 /** RX buffering timeout enable */
3612 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
3613 /** RX buffering timeout value */
3614 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
3615 /** pdev level stats update period in ms */
3616 WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
3617 /** vdev level stats update period in ms */
3618 WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
3619 /** peer level stats update period in ms */
3620 WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
3621 /** beacon filter status update period */
3622 WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
3623 /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
3624 WMI_PDEV_PARAM_PMF_QOS,
3625 /** Access category on which ARP frames are sent */
3626 WMI_PDEV_PARAM_ARP_AC_OVERRIDE,
3627 /** DCS configuration */
3628 WMI_PDEV_PARAM_DCS,
3629 /** Enable/Disable ANI on target */
3630 WMI_PDEV_PARAM_ANI_ENABLE,
3631 /** configure the ANI polling period */
3632 WMI_PDEV_PARAM_ANI_POLL_PERIOD,
3633 /** configure the ANI listening period */
3634 WMI_PDEV_PARAM_ANI_LISTEN_PERIOD,
3635 /** configure OFDM immunity level */
3636 WMI_PDEV_PARAM_ANI_OFDM_LEVEL,
3637 /** configure CCK immunity level */
3638 WMI_PDEV_PARAM_ANI_CCK_LEVEL,
3639 /** Enable/Disable CDD for 1x1 STAs in rate control module */
3640 WMI_PDEV_PARAM_DYNTXCHAIN,
3641 /** Enable/Disable proxy STA */
3642 WMI_PDEV_PARAM_PROXY_STA,
3643 /** Enable/Disable low power state when all VDEVs are inactive/idle. */
3644 WMI_PDEV_PARAM_IDLE_PS_CONFIG,
3645 /** Enable/Disable power gating sleep */
3646 WMI_PDEV_PARAM_POWER_GATING_SLEEP,
3647 /** Enable/Disable Rfkill */
3648 WMI_PDEV_PARAM_RFKILL_ENABLE,
3649 /** Set Bursting DUR */
3650 WMI_PDEV_PARAM_BURST_DUR,
3651 /** Set Bursting ENABLE */
3652 WMI_PDEV_PARAM_BURST_ENABLE,
3653 /** HW rfkill config */
3654 WMI_PDEV_PARAM_HW_RFKILL_CONFIG,
3655 /** Enable radio low power features */
3656 WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE,
3657 /** L1SS entry and residency time track */
3658 WMI_PDEV_PARAM_L1SS_TRACK,
3659 /** set hyst at runtime, requirement from SS */
3660 WMI_PDEV_PARAM_HYST_EN,
3661 /** Enable/ Disable POWER COLLAPSE */
3662 WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE,
3663 /** configure LED system state */
3664 WMI_PDEV_PARAM_LED_SYS_STATE,
3665 /** Enable/Disable LED */
3666 WMI_PDEV_PARAM_LED_ENABLE,
3667 /** set DIRECT AUDIO time latency */
Govind Singh869c9872016-02-22 18:36:34 +05303668 WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003669 /** set DIRECT AUDIO Feature ENABLE */
Govind Singh869c9872016-02-22 18:36:34 +05303670 WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003671 /** pdev level whal mib stats update enable */
3672 WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE,
3673 /** ht/vht info based on vdev */
3674 WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD,
3675 /** Set CTS channel BW for dynamic BW adjustment feature */
3676 WMI_PDEV_PARAM_CTS_CBW,
3677 /** Set GPIO pin info used by WNTS */
3678 WMI_PDEV_PARAM_WNTS_CONFIG,
3679 /** Enable/Disable hardware adaptive early rx feature */
3680 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE,
3681 /** The minimum early rx duration, to ensure early rx duration is non-zero */
3682 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP,
3683 /** Increasing/decreasing step used by hardware */
3684 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP,
3685 /** The fixed early rx duration when adaptive early rx is disabled */
3686 WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP,
3687 /** Enable/Disable bmiss based adaptive beacon timeout feature */
3688 WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE,
3689 /*
3690 * The minimum beacon timeout duration, to ensure beacon timeout
3691 * duration is non-zero
3692 */
3693 WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT,
3694 /** Increasing/decreasing step used by hardware */
3695 WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP,
3696 /*
3697 * The fixed beacon timeout duration when bmiss based adaptive beacon
3698 * timeout is disabled
3699 */
3700 WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT,
3701 /*
3702 * Enable/Disable Congestion Estimator based adaptive beacon
3703 * timeout feature */
3704 WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE,
3705 /*
3706 * combo value of ce_id, ce_threshold, ce_time, refer
3707 * to WMI_CE_BTO_CE_ID_MASK
3708 */
3709 WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE,
3710 /** 2G TX chain mask */
3711 WMI_PDEV_PARAM_TX_CHAIN_MASK_2G,
3712 /** 2G RX chain mask */
3713 WMI_PDEV_PARAM_RX_CHAIN_MASK_2G,
3714 /** 5G TX chain mask */
3715 WMI_PDEV_PARAM_TX_CHAIN_MASK_5G,
3716 /** 5G RX chain mask */
3717 WMI_PDEV_PARAM_RX_CHAIN_MASK_5G,
3718 /* Set tx chain mask for CCK rates */
3719 WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK,
3720 /* Set tx chain mask for 1SS stream */
3721 WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS,
Nirav Shahe1e4a812015-11-05 11:15:54 +05303722 /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected*/
3723 WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG,
Nirav Shah47062ff2015-11-05 11:21:08 +05303724 /* TX power backoff in dB: tx power -= param value
3725 * Host passes values(DB) to Halphy, Halphy reduces the power table by
3726 * the values. Safety check will happen in Halphy
3727 */
3728 WMI_PDEV_PARAM_TXPOWER_DECR_DB,
Govind Singh32cced32016-02-01 13:33:09 +05303729 /** enable and disable aggregate burst along with duration */
3730 WMI_PDEV_PARAM_AGGR_BURST,
3731 /** Set the global RX decap mode */
3732 WMI_PDEV_PARAM_RX_DECAP_MODE,
3733 /** Enable/Disable Fast channel reset */
3734 WMI_PDEV_PARAM_FAST_CHANNEL_RESET,
3735 /** Default antenna for Smart antenna */
3736 WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA,
3737 /** Set the user-specified antenna gain */
3738 WMI_PDEV_PARAM_ANTENNA_GAIN,
3739 /** Set the user-specified RX filter */
3740 WMI_PDEV_PARAM_RX_FILTER,
3741 /*
3742 * configure the user-specified MCAST tid for managed mcast feature
3743 * 0-15 is the valid range. 0xff will clear the tid setting
3744 */
3745 WMI_PDEV_SET_MCAST_TO_UCAST_TID,
3746 /** Enable/Disable Proxy sta mode */
3747 WMI_PDEV_PARAM_PROXY_STA_MODE,
3748 /*
3749 * configure the mcast2ucast mode for the pdev->peer_mcast.
3750 * See WMI_PEER_MCAST2UCAST_MODE for possible values
3751 */
3752 WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE,
3753 /** Sets the Mcast buffers for cloning, to support Mcast enhancement */
3754 WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER,
3755 /** Remove the Mcast buffers added by host */
3756 WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER,
3757 /** En/disable station power save state indication */
3758 WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE,
3759 /** Access category on which ARP frames are sent */
3760 WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE,
3761 /** allow or disallow interbss frame forwarding */
3762 WMI_PDEV_PARAM_BLOCK_INTERBSS,
3763 /** Enable/Disable reset */
3764 WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID,
3765 /** Enable/Disable/Set MSDU_TTL in milliseconds. */
3766 WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID,
3767 /** Set global PPDU duration limit (usec). */
3768 WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID,
3769 /** set txbf sounding period of vap in milliseconds */
3770 WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID,
3771 /** Set promiscuous mode */
3772 WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID,
3773 /** Set burst mode */
3774 WMI_PDEV_PARAM_SET_BURST_MODE_CMDID,
3775 /** enable enhanced stats */
3776 WMI_PDEV_PARAM_EN_STATS,
3777 /** Set mu-grouping policy */
3778 WMI_PDEV_PARAM_MU_GROUP_POLICY,
3779 /** Channel Hopping Enable */
3780 WMI_PDEV_PARAM_NOISE_DETECTION,
3781 /** Set Channel Hopping NF threshold in dBm */
3782 WMI_PDEV_PARAM_NOISE_THRESHOLD,
3783 /** Set PAPRD policy */
3784 WMI_PDEV_PARAM_DPD_ENABLE,
3785 /** Enable/disable mcast/bcast echo, used by ProxySTA */
3786 WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO,
3787 /** ATF enable/disable strict schedule */
3788 WMI_PDEV_PARAM_ATF_STRICT_SCH,
3789 /** ATF set access category duration, B0-B29 duration, B30-B31: AC */
3790 WMI_PDEV_PARAM_ATF_SCHED_DURATION,
3791 /** Default antenna polarization */
3792 WMI_PDEV_PARAM_ANT_PLZN,
3793 /** Set mgmt retry limit */
3794 WMI_PDEV_PARAM_MGMT_RETRY_LIMIT,
3795 /** Set CCA sensitivity level in dBm */
3796 WMI_PDEV_PARAM_SENSITIVITY_LEVEL,
3797 /** Set 2G positive and negative Tx power in 0.5dBm units */
3798 WMI_PDEV_PARAM_SIGNED_TXPOWER_2G,
3799 /** Set 5G positive and negative Tx power in 0.5dBm units */
3800 WMI_PDEV_PARAM_SIGNED_TXPOWER_5G,
3801 /** Enable/disble AMSDU for tids */
3802 WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU,
3803 /** Enable/disable AMPDU for tids */
3804 WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU,
3805 /** Set CCA threshold in dBm */
3806 WMI_PDEV_PARAM_CCA_THRESHOLD,
3807 /** RTS Fixed rate setting */
3808 WMI_PDEV_PARAM_RTS_FIXED_RATE,
3809 /** Pdev reset */
3810 WMI_PDEV_PARAM_PDEV_RESET,
3811 /** wapi mbssid offset **/
3812 WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET,
3813 /** ARP DEBUG source address*/
3814 WMI_PDEV_PARAM_ARP_DBG_SRCADDR,
3815 /** ARP DEBUG destination address*/
3816 WMI_PDEV_PARAM_ARP_DBG_DSTADDR,
3817 /** ATF enable/disable obss noise scheduling */
3818 WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH,
3819 /** ATF obss noise scaling factor */
3820 WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR,
3821 /**
3822 * TX power reduction scaling exponent - final tx power is the
3823 * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by
3824 * 2^(scale exponent). For example:
3825 * If this scale exponent is 0, the power is unchanged (divided by 2^0)
3826 * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB
3827 * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB
3828 * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB
3829 */
3830 WMI_PDEV_PARAM_CUST_TXPOWER_SCALE,
3831 /** ATF enabe/disabe dynamically */
3832 WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE,
Nitesh Shah49eecf02016-06-29 20:36:58 +05303833 /** Set tx retry limit for control frames. 0 = disable, 31 = max */
3834 WMI_PDEV_PARAM_CTRL_RETRY_LIMIT,
3835 /** Set propagation delay for 2G / 5G band.
3836 * The propagation delay is fundamentally a per-peer property, but
3837 * the target may not support per-peer settings for ack timeouts.
3838 * This pdev parameter allows the MAC-level ack timeout to be set to
3839 * a value suitable for the worst-case propagation delay of any peer
3840 * within that pdev.
3841 * Units are microseconds.
3842 */
3843 WMI_PDEV_PARAM_PROPAGATION_DELAY,
Nitesh Shaha43b09d2016-07-20 17:20:07 +05303844 /**
3845 * Host can enable/disable ANT DIV feature
3846 * if it's been enabled in BDF
3847 */
3848 WMI_PDEV_PARAM_ENA_ANT_DIV,
3849 /** Host can force one chain to select a specific ANT */
3850 WMI_PDEV_PARAM_FORCE_CHAIN_ANT,
3851 /**
3852 * Start a cycle ANT self test periodically.
3853 * In the test, the FW would select each ANT pair
3854 * one by one, the cycle time could be configured
3855 * via WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL
3856 */
3857 WMI_PDEV_PARAM_ANT_DIV_SELFTEST,
3858 /**
3859 * Configure the cycle time of ANT self test,
3860 * the unit is micro second. Per the timer
3861 * limitation, too small value could be not so
3862 * accurate.
3863 */
3864 WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL,
Manjeet Singh27aa9c12016-08-24 15:38:42 +05303865 /**
3866 * wlan stats observation period, the unit is millisecond.
3867 * The value of 0 is used to turn off periodic stats report.
3868 */
3869 WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD,
3870 /**
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05303871 * Set tx_delay[] bin size to specify how many
3872 * milliseconds each bin of the wmi_tx_stats.tx_delay[]
Manjeet Singh27aa9c12016-08-24 15:38:42 +05303873 * histogram represents.
3874 */
3875 WMI_PDEV_PARAM_TX_DELAY_BIN_SIZE_MS,
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05303876 /** set wmi_tx_stats.tx_delay[] array length */
3877 WMI_PDEV_PARAM_TX_DELAY_ARRAY_LEN,
3878 /** set wmi_tx_stats.tx_mpdu_aggr[] array length */
3879 WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN,
3880 /** set wmi_rx_stats.rx_mpdu_aggr[] array length */
3881 WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003882} WMI_PDEV_PARAM;
3883
3884typedef enum {
3885 /** Set the loglevel */
3886 WMI_DBGLOG_LOG_LEVEL = 0x1,
3887 /** Enable VAP level debug */
3888 WMI_DBGLOG_VAP_ENABLE,
3889 /** Disable VAP level debug */
3890 WMI_DBGLOG_VAP_DISABLE,
3891 /** Enable MODULE level debug */
3892 WMI_DBGLOG_MODULE_ENABLE,
3893 /** Disable MODULE level debug */
3894 WMI_DBGLOG_MODULE_DISABLE,
3895 /** Enable MODULE level debug */
3896 WMI_DBGLOG_MOD_LOG_LEVEL,
3897 /** set type of the debug output */
3898 WMI_DBGLOG_TYPE,
3899 /** Enable Disable debug */
3900 WMI_DBGLOG_REPORT_ENABLE
3901} WMI_DBG_PARAM;
3902
3903/* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
3904typedef enum {
3905 WMI_CTS_CBW_INVALID = 0,
3906 WMI_CTS_CBW_20,
3907 WMI_CTS_CBW_40,
3908 WMI_CTS_CBW_80,
3909 WMI_CTS_CBW_80_80,
3910 WMI_CTS_CBW_160,
3911} WMI_CTS_CBW;
3912
3913typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303914 /** TLV tag and len; tag equals
3915 * WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param
3916 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003917 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303918 /** pdev_id for identifying the MAC
3919 * See macros starting with WMI_PDEV_ID_ for values.
3920 */
3921 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003922 /** parameter id */
3923 A_UINT32 param_id;
3924 /** parametr value */
3925 A_UINT32 param_value;
3926} wmi_pdev_set_param_cmd_fixed_param;
3927
3928typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303929 /** TLV tag and len; tag equals
3930 * WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param
3931 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003932 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303933 /** pdev_id for identifying the MAC
3934 * See macros starting with WMI_PDEV_ID_ for values.
3935 */
3936 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003937 /** parameter */
3938 A_UINT32 param;
3939} wmi_pdev_get_tpc_config_cmd_fixed_param;
3940
3941#define WMI_FAST_DIVERSITY_BIT_OFFSET 0
3942#define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
3943
Himanshu Agarwal86319542016-05-24 09:00:39 +05303944#define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT 2
3945#define WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK \
3946 (0xf << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
3947#define WMI_SLOW_DIVERSITY_CH0_WEIGHT_GET_BITS(word32) \
3948 (((word32) & WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK) >> \
3949 WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
3950#define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SET_BITS(word32, value) \
3951 do { \
3952 (word32) &= ~WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
3953 (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) & \
3954 WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
3955 } while (0)
3956
3957#define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT 6
3958#define WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK \
3959 (0xf << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
3960#define WMI_SLOW_DIVERSITY_CH1_WEIGHT_GET_BITS(word32) \
3961 (((word32) & WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK) >> \
3962 WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
3963#define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SET_BITS(word32, value) \
3964 do { \
3965 (word32) &= ~WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
3966 (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) & \
3967 WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
3968 } while (0)
3969
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003970typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303971 /** TLV tag and len; tag equals
3972 * WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param
3973 */
3974 A_UINT32 tlv_header;
3975 union {
3976 /* OBSOLETE - will be removed once all refs are gone */
3977 A_UINT32 mac_id;
3978 /** pdev_id for identifying the MAC
3979 * See macros starting with WMI_PDEV_ID_ for values.
3980 */
3981 A_UINT32 pdev_id;
3982 };
Himanshu Agarwal86319542016-05-24 09:00:39 +05303983 /*
3984 * The following "value" field is divided into bit fields as follows:
3985 * bits | purpose
3986 * -----+---------------------------------------
3987 * 0 | enable/disable FAST diversity
3988 * 1 | enable/disable SLOW diversity
3989 * 5:2 | chain0 slow-diversity weighting factor
3990 * 9:6 | chain1 slow-diversity weighting factor
3991 * 31:10| currenty unused (set to 0x0)
3992 * Refer to the above WMI_[FAST/SLOW]_DIVERSITY constants.
Govind Singh869c9872016-02-22 18:36:34 +05303993 */
3994 A_UINT32 value;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003995} wmi_pdev_set_antenna_diversity_cmd_fixed_param;
3996
3997#define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
3998
3999typedef struct {
4000 /*
4001 * TLV tag and len; tag equals
4002 * WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param
4003 */
4004 A_UINT32 tlv_header;
4005 /* vdev_id, where RSSI monitoring will take place */
4006 A_UINT32 vdev_id;
4007 /*
4008 * host will configure request_id and firmware echo
4009 * this id in RSSI_BREACH_EVENT
4010 */
4011 A_UINT32 request_id;
4012 /*
4013 * bit [0-2] = low_rssi_breach_enabled[0-2]
4014 * enabled, bit [3-5] = hi_rssi_breach_enabled[0-2]
4015 */
4016 A_UINT32 enabled_bitmap;
4017 /* unit dBm. host driver to make sure [0] > [1] > [2] */
4018 A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED];
4019 /* unit dBm. host driver to make sure [0] < [1] < [2] */
4020 A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED];
4021 /*
4022 * unit dBm. once low rssi[] breached, same event
4023 * bitmap will be generated only after signal gets better
4024 * than this level. This value is adopted for all low_rssi_breach_threshold[3]
4025 */
4026 A_UINT32 lo_rssi_reenable_hysteresis;
4027 /*
4028 * unit dBm. once hi rssi[] breached, same event bitmap
4029 * will be generated only after signal gets worse than this
4030 * level. This value is adopted for all hi_rssi_breach_threshold[3]
4031 */
4032 A_UINT32 hi_rssi_reenable_histeresis;
4033 /*
4034 * After last event is generated, we wait
4035 * until this interval to generate next event
4036 */
4037 A_UINT32 min_report_interval;
4038 /* this is to suppress number of event to be generated */
4039 A_UINT32 max_num_report;
4040} wmi_rssi_breach_monitor_config_fixed_param;
4041
4042typedef struct {
4043 /** parameter */
4044 A_UINT32 param;
4045} wmi_pdev_dump_cmd;
4046
4047typedef enum {
4048 PAUSE_TYPE_CHOP = 0x1,
4049 /** for MCC (switch channel), only vdev_map is valid */
4050 PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */
4051 PAUSE_TYPE_UAPSD = 0x3,
4052 /** for uapsd, only peer_id and tid_map are valid. */
4053 PAUSE_TYPE_P2P_CLIENT_NOA = 0x4,
4054 /** only vdev_map is valid, actually only one vdev id is set at one time */
4055 PAUSE_TYPE_P2P_GO_PS = 0x5,
4056 /** only vdev_map is valid, actually only one vdev id is set at one time */
4057 PAUSE_TYPE_STA_ADD_BA = 0x6,
4058 /** only peer_id and tid_map are valid, actually only one tid is set at one time */
4059 PAUSE_TYPE_AP_PS = 0x7,
4060 /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
4061 PAUSE_TYPE_IBSS_PS = 0x8,
4062 /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +05304063 PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9,
4064 /*
4065 * for TDLS offchannel MCC (switch channel), only vdev_map is valid,
4066 * TDLS connection tracker needs to be notified
4067 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004068 PAUSE_TYPE_HOST = 0x15,
4069 /** host is requesting vdev pause */
4070} wmi_tx_pause_type;
4071
4072typedef enum {
4073 ACTION_PAUSE = 0x0,
4074 ACTION_UNPAUSE = 0x1,
4075} wmi_tx_pause_action;
4076
4077typedef struct {
4078 A_UINT32 tlv_header;
4079 A_UINT32 pause_type;
4080 A_UINT32 action;
4081 A_UINT32 vdev_map;
4082 A_UINT32 peer_id;
4083 A_UINT32 tid_map;
4084} wmi_tx_pause_event_fixed_param;
4085
4086typedef enum {
4087 WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
4088 WMI_MGMT_TX_COMP_TYPE_DISCARD,
4089 WMI_MGMT_TX_COMP_TYPE_INSPECT,
4090 WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
4091 WMI_MGMT_TX_COMP_TYPE_MAX,
4092} WMI_MGMT_TX_COMP_STATUS_TYPE;
4093
4094typedef struct {
4095 A_UINT32 tlv_header;
4096 A_UINT32 desc_id; /* from tx_send_cmd */
4097 A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */
4098} wmi_mgmt_tx_compl_event_fixed_param;
4099
Pradeep Reddy POTTETI67c778a2016-06-20 14:00:38 +05304100typedef struct {
4101 A_UINT32 tlv_header;
4102 A_UINT32 num_reports;
4103 /* tlv for completion
4104 * A_UINT32 desc_ids[num_reports]; <- from tx_send_cmd
4105 * A_UINT32 status[num_reports]; <- WMI_MGMT_TX_COMP_STATUS_TYPE
4106 */
4107} wmi_mgmt_tx_compl_bundle_event_fixed_param;
4108
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004109#define WMI_TPC_RATE_MAX 160
4110/* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
4111#define WMI_TPC_TX_NUM_CHAIN 4
4112
4113typedef enum {
4114 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
4115 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
4116 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
4117} WMI_TPC_CONFIG_EVENT_FLAG;
4118
4119typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05304120 /* TLV tag and len; tag equals
4121 * WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param
4122 */
4123 A_UINT32 tlv_header;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004124 A_UINT32 regDomain;
4125 A_UINT32 chanFreq;
4126 A_UINT32 phyMode;
4127 A_UINT32 twiceAntennaReduction;
4128 A_UINT32 twiceMaxRDPower;
4129 A_INT32 twiceAntennaGain;
4130 A_UINT32 powerLimit;
4131 A_UINT32 rateMax;
4132 A_UINT32 numTxChain;
4133 A_UINT32 ctl;
4134 A_UINT32 flags;
Govind Singh869c9872016-02-22 18:36:34 +05304135 /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without
4136 * breaking the WMI compatibility
4137 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004138 A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
4139 A_INT8
4140 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN]
4141 [WMI_TPC_TX_NUM_CHAIN];
4142 A_INT8
4143 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN]
4144 [WMI_TPC_TX_NUM_CHAIN];
4145 A_INT8
4146 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN]
4147 [WMI_TPC_TX_NUM_CHAIN];
Govind Singh869c9872016-02-22 18:36:34 +05304148 /** pdev_id for identifying the MAC
4149 * See macros starting with WMI_PDEV_ID_ for values.
4150 */
4151 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004152 /* This TLV is followed by a byte array:
4153 * A_UINT8 ratesArray[];
4154 */
4155} wmi_pdev_tpc_config_event_fixed_param;
4156
4157typedef struct {
4158 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */
4159 A_UINT32 periodCnt;
4160 A_UINT32 L1Cnt;
4161 A_UINT32 L11Cnt;
4162 A_UINT32 L12Cnt;
4163 A_UINT32 L1Entry;
4164 A_UINT32 L11Entry;
4165 A_UINT32 L12Entry;
Govind Singh869c9872016-02-22 18:36:34 +05304166 /** pdev_id for identifying the MAC
4167 * See macros starting with WMI_PDEV_ID_ for values.
4168 */
4169 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004170} wmi_pdev_l1ss_track_event_fixed_param;
4171
4172typedef struct {
4173 A_UINT32 len;
4174 A_UINT32 msgref;
4175 A_UINT32 segmentInfo;
4176} wmi_pdev_seg_hdr_info;
4177
4178/*
4179 * Transmit power scale factor.
4180 *
4181 */
4182typedef enum {
4183 WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
4184 WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
4185 WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
4186 WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
4187 WMI_TP_SCALE_MIN = 4, /* min, but still on */
4188 WMI_TP_SCALE_SIZE = 5, /* max num of enum */
4189} WMI_TP_SCALE;
4190
4191#define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
4192
4193typedef struct {
4194 /** message buffer, NULL terminated */
4195 char bufp[WMI_MAX_DEBUG_MESG];
4196} wmi_debug_mesg_event;
4197
4198enum {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004199 /** P2P device */
4200 VDEV_SUBTYPE_P2PDEV = 0,
4201 /** P2P client */
4202 VDEV_SUBTYPE_P2PCLI,
4203 /** P2P GO */
4204 VDEV_SUBTYPE_P2PGO,
4205 /** BT3.0 HS */
4206 VDEV_SUBTYPE_BT,
4207};
4208
4209typedef struct {
4210 /** idnore power , only use flags , mode and freq */
4211 wmi_channel chan;
4212} wmi_pdev_set_channel_cmd;
4213
4214typedef enum {
4215 WMI_PKTLOG_EVENT_RX = 0x1,
4216 WMI_PKTLOG_EVENT_TX = 0x2,
4217 WMI_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
4218 WMI_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
4219 /* 0x10 used by deprecated DBG_PRINT */
4220 WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x20, /* To support Smart Antenna */
Anurag Chouhane28b1f02016-07-29 11:15:29 +05304221 WMI_PKTLOG_EVENT_SW = 0x40, /* To support SW defined events */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004222} WMI_PKTLOG_EVENT;
4223
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07004224typedef enum {
4225 /* (default) FW will decide under what conditions to enable pktlog */
4226 WMI_PKTLOG_ENABLE_AUTO = 0,
4227 WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */
4228} WMI_PKTLOG_ENABLE;
4229
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004230typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05304231 /** TLV tag and len; tag equals
4232 * WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param
4233 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004234 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05304235 /** pdev_id for identifying the MAC
4236 * See macros starting with WMI_PDEV_ID_ for values.
4237 */
4238 A_UINT32 pdev_id;
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07004239 A_UINT32 evlist; /* WMI_PKTLOG_EVENT */
4240 A_UINT32 enable; /* WMI_PKTLOG_ENABLE */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004241} wmi_pdev_pktlog_enable_cmd_fixed_param;
4242
4243typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05304244 /** TLV tag and len; tag equals
4245 * WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param
4246 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004247 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05304248 /** pdev_id for identifying the MAC
4249 * See macros starting with WMI_PDEV_ID_ for values.
4250 */
4251 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004252} wmi_pdev_pktlog_disable_cmd_fixed_param;
4253
Govind Singh45ef44a2016-02-01 17:45:22 +05304254typedef struct {
4255 /*
4256 * TLV tag and len; tag equals
4257 * WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param
4258 */
4259 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05304260 /** pdev_id for identifying the MAC
4261 * See macros starting with WMI_PDEV_ID_ for values.
4262 */
4263 A_UINT32 pdev_id;
Govind Singh45ef44a2016-02-01 17:45:22 +05304264 /*
4265 * enable for mib stats collection.
4266 * Stats are delivered to host in wmi_mib_stats structure.
4267 * If enable_Mib=1, stats collection is enabled.
4268 * If enable_Mib=0, stats collection does not happen
4269 */
4270 A_UINT32 enable_Mib;
4271} wmi_mib_stats_enable_cmd_fixed_param;
4272
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004273/** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
4274 * NOTE: This constant cannot be changed without breaking
4275 * WMI Compatibility. */
4276
4277#define WMI_DSCP_MAP_MAX (64)
4278/*
4279 * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
4280 * @details
4281 * Create an API for sending the custom DSCP-to-TID map to the target
4282 * If this is a request from the user space or from above the UMAC
4283 * then the best place to implement this is in the umac_if_offload of the OL path.
4284 * Provide a place holder for this API in the ieee80211com (ic).
4285 *
4286 * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
4287 * in the target should be directed to the function pointer in the ic.
4288 *
4289 * Implementation details of the API to send the map to the target are as described-
4290 *
4291 * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
4292 * DSCP-to-TID map is a one dimensional uint32_t array of length 64 to accomodate
4293 * 64 TID values for 2^6 (64) DSCP ids.
4294 * Example:
4295 * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
4296 * 0, 0, 0, 0, 0, 0, 0, 0,
4297 * 1, 1, 1, 1, 1, 1, 1, 1,
4298 * 2, 2, 2, 2, 2, 2, 2, 2,
4299 * 3, 3, 3, 3, 3, 3, 3, 3,
4300 * 4, 4, 4, 4, 4, 4, 4, 4,
4301 * 5, 5, 5, 5, 5, 5, 5, 5,
4302 * 6, 6, 6, 6, 6, 6, 6, 6,
4303 * 7, 7, 7, 7, 7, 7, 7, 7,
4304 * };
4305 *
4306 * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
4307 *
4308 * 3. Copy the DSCP-to-TID map into the WMI buffer.
4309 *
4310 * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
4311 * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
4312 * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
4313 * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
4314 *
4315 */
Govind Singh869c9872016-02-22 18:36:34 +05304316
4317/* DEPRECATED - use VDEV level command instead
4318 * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param)
4319 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004320typedef struct {
4321 A_UINT32 tlv_header;
4322 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
4323 A_UINT32 reserved0;
4324 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
4325 /* map indicating DSCP to TID conversion */
4326 A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
4327} wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
4328
Govind Singhc7d51942016-02-01 12:09:31 +05304329typedef struct {
4330 A_UINT32 tlv_header;
4331 /*
4332 * TLV tag and len; tag equals
4333 * WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param
4334 */
4335 A_UINT32 vdev_id;
4336 /** map indicating DSCP to TID conversion */
4337 A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
Rajeev Kumare18f5282016-04-15 14:08:29 -07004338 A_UINT32 enable_override;
Govind Singhc7d51942016-02-01 12:09:31 +05304339} wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
4340
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +05304341enum WMI_WAKE_GPIO_TYPE {
4342 WMI_WAKE_GPIO_LOW = 1,
4343 WMI_WAKE_GPIO_HIGH = 2,
4344 WMI_WAKE_GPIO_RISING_EDGE = 3,
4345 WMI_WAKE_GPIO_FALLING_EDGE = 4,
4346};
4347
4348/**
4349 * Set GPIO numbers used to wakeup host and wakeup target.
4350 */
4351typedef struct {
4352 /**
4353 * TLV tag and len; tag equals
4354 * WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param
4355 */
4356 A_UINT32 tlv_header;
4357 /* gpio num used to wakeup host, 0xff disable wakeup gpio */
4358 A_UINT32 host_wakeup_gpio;
4359 /* refer to WMI_WAKE_GPIO_TYPE */
4360 A_UINT32 host_wakeup_type;
4361 /* gpio num used to wakeup target, 0xff disable wakeup gpio */
4362 A_UINT32 target_wakeup_gpio;
4363 /* refer to WMI_WAKE_GPIO_TYPE */
4364 A_UINT32 target_wakeup_type;
4365} WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param;
4366
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004367/** Fixed rate (rate-code) for broadcast/ multicast data frames */
4368/* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
4369 * @details
4370 * Create an API for setting the custom rate for the MCAST and BCAST frames
4371 * in the target. If this is a request from the user space or from above the UMAC
4372 * then the best place to implement this is in the umac_if_offload of the OL path.
4373 * Provide a place holder for this API in the ieee80211com (ic).
4374 *
4375 * Implementation details of the API to set custom rates for MCAST and BCAST in
4376 * the target are as described-
4377 *
4378 * 1. The function will have 3 arguments-
4379 * vap structure,
4380 * MCAST/ BCAST identifier code,
4381 * 8 bit rate code
4382 *
4383 * The rate-code is a 1-byte field in which:for given rate, nss and preamble
4384 * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
4385 * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
4386 * b'3-b'0 indicate the rate, which is indicated as follows:
4387 * OFDM : 0: OFDM 48 Mbps
4388 * 1: OFDM 24 Mbps
4389 * 2: OFDM 12 Mbps
4390 * 3: OFDM 6 Mbps
4391 * 4: OFDM 54 Mbps
4392 * 5: OFDM 36 Mbps
4393 * 6: OFDM 18 Mbps
4394 * 7: OFDM 9 Mbps
4395 * CCK (pream == 1)
4396 * 0: CCK 11 Mbps Long
4397 * 1: CCK 5.5 Mbps Long
4398 * 2: CCK 2 Mbps Long
4399 * 3: CCK 1 Mbps Long
4400 * 4: CCK 11 Mbps Short
4401 * 5: CCK 5.5 Mbps Short
4402 * 6: CCK 2 Mbps Short
4403 * HT/VHT (pream == 2/3)
4404 * 0..7: MCS0..MCS7 (HT)
4405 * 0..9: MCS0..MCS9 (VHT)
4406 *
4407 * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
4408 * to the target.
4409 * Arguments to the API are-
4410 * wmi handle,
4411 * VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
4412 * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
4413 * rate value.
4414 */
4415typedef enum {
4416 WMI_SET_MCAST_RATE,
4417 WMI_SET_BCAST_RATE
4418} MCAST_BCAST_RATE_ID;
4419
4420typedef struct {
4421 MCAST_BCAST_RATE_ID rate_id;
4422 A_UINT32 rate;
4423} mcast_bcast_rate;
4424
4425typedef struct {
4426 A_UINT32 tlv_header;
4427 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
4428 A_UINT32 cwmin;
4429 A_UINT32 cwmax;
4430 A_UINT32 aifs;
4431 A_UINT32 txoplimit;
4432 A_UINT32 acm;
4433 A_UINT32 no_ack;
4434} wmi_wmm_params;
4435
Govind Singh869c9872016-02-22 18:36:34 +05304436/* DEPRECATED - use VDEV level command instead
4437 * (wmi_vdev_set_wmm_params_cmd_fixed_param)
4438 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004439typedef struct {
4440 A_UINT32 tlv_header;
4441 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
4442 A_UINT32 reserved0;
4443 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
4444 A_UINT32 dg_type;
4445
4446 /* The TLVs for the 4 AC follows:
4447 * wmi_wmm_params wmm_params_ac_be;
4448 * wmi_wmm_params wmm_params_ac_bk;
4449 * wmi_wmm_params wmm_params_ac_vi;
4450 * wmi_wmm_params wmm_params_ac_vo;
4451 */
4452} wmi_pdev_set_wmm_params_cmd_fixed_param;
4453
4454typedef enum {
4455 WMI_REQUEST_PEER_STAT = 0x01,
4456 WMI_REQUEST_AP_STAT = 0x02,
4457 WMI_REQUEST_PDEV_STAT = 0x04,
4458 WMI_REQUEST_VDEV_STAT = 0x08,
4459 WMI_REQUEST_BCNFLT_STAT = 0x10,
4460 WMI_REQUEST_VDEV_RATE_STAT = 0x20,
Govind Singh32cced32016-02-01 13:33:09 +05304461 WMI_REQUEST_INST_STAT = 0x40,
Govind Singh45ef44a2016-02-01 17:45:22 +05304462 WMI_REQUEST_MIB_STAT = 0x80,
Himanshu Agarwal86319542016-05-24 09:00:39 +05304463 WMI_REQUEST_RSSI_PER_CHAIN_STAT = 0x100,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004464} wmi_stats_id;
4465
4466typedef struct {
4467 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
4468 wmi_stats_id stats_id;
4469 /** unique id identifying the VDEV, generated by the caller */
4470 A_UINT32 vdev_id;
4471 /** peer MAC address */
4472 wmi_mac_addr peer_macaddr;
4473} wmi_request_stats_cmd_fixed_param;
4474
4475/* stats type bitmap */
4476#define WMI_LINK_STATS_RADIO 0x00000001
4477#define WMI_LINK_STATS_IFACE 0x00000002
4478#define WMI_LINK_STATS_ALL_PEER 0x00000004
4479#define WMI_LINK_STATS_PER_PEER 0x00000008
4480
4481/* wifi clear statistics bitmap */
4482#define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
4483#define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
4484#define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
4485#define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
4486#define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
4487#define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
4488#define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
4489#define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
4490#define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */
4491#define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */
4492
4493/** Default value for stats if the stats collection has not started */
4494#define WMI_STATS_VALUE_INVALID 0xffffffff
4495
4496#define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16)
4497#define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value)
4498#define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1)
4499#define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value)
4500#define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
4501#define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
4502
4503typedef struct {
4504 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
4505 A_UINT32 num_of_diag_events_logs;
4506/* The TLVs will follow.
4507 * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
4508 * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
4509 * Bit 17 Indicate if the DIAG type is Enabled/Disabled.
4510 */
4511} wmi_diag_event_log_config_fixed_param;
4512
4513#define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
4514#define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
4515#define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1)
4516#define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
4517
4518typedef struct {
4519 A_UINT32 tlv_header;
4520 A_UINT32 num_of_diag_events_logs;
4521/* The TLVs will follow.
4522 * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
4523 * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
4524 * Bit 17 - Frequncy of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
4525 * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
4526 */
4527} wmi_diag_event_log_supported_event_fixed_params;
4528
4529typedef struct {
4530 /**
4531 * TLV tag and len; tag equals
4532 * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param
4533 */
4534 A_UINT32 tlv_header;
4535 /** placeholder for future */
4536 A_UINT32 reserved0;
4537} wmi_debug_mesg_flush_fixed_param;
4538
4539typedef struct {
4540 /**
4541 * TLV tag and len; tag equals
4542 * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param
4543 */
4544 A_UINT32 tlv_header;
4545 /** placeholder for future */
4546 A_UINT32 reserved0;
4547} wmi_debug_mesg_flush_complete_fixed_param;
4548
4549
4550typedef struct {
4551 /*
4552 * TLV tag and len; tag equals
4553 * WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param
4554 * vdev_id, where RSSI breach event occurred
4555 */
4556 A_UINT32 tlv_header;
4557 A_UINT32 vdev_id;
4558 /* request id */
4559 A_UINT32 request_id;
4560 /*
4561 * bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is
4562 * corresponding to hi_rssi[0-2]
4563 */
4564 A_UINT32 event_bitmap;
4565 /* rssi at the time of RSSI breach. Unit dBm */
4566 A_UINT32 rssi;
4567 /* bssid of the monitored AP's */
4568 wmi_mac_addr bssid;
4569} wmi_rssi_breach_event_fixed_param;
4570
4571
4572typedef struct {
4573 /** TLV tag and len; tag equals
4574 * WMITLV_TAG_STRUC_wmi_fw_mem_dump */
4575 A_UINT32 tlv_header;
4576 /** unique id identifying the segment */
4577 A_UINT32 seg_id;
4578 /** Start address of the segment to be read */
4579 A_UINT32 seg_start_addr_lo;
4580 A_UINT32 seg_start_addr_hi;
4581 /** Length of the segment to be read */
4582 A_UINT32 seg_length;
4583 /** Host bufeer address to which the segment will be read and dumped */
4584 A_UINT32 dest_addr_lo;
4585 A_UINT32 dest_addr_hi;
4586} wmi_fw_mem_dump;
4587
4588/* Command to get firmware memory dump*/
4589typedef struct {
4590 /** TLV tag and len; tag equals
4591 * WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
4592 A_UINT32 tlv_header;
4593 /** unique id identifying the request */
4594 A_UINT32 request_id;
4595 /** number of memory dump segments */
4596 A_UINT32 num_fw_mem_dump_segs;
4597 /**
4598 * This TLV is followed by another TLV
4599 * wmi_fw_mem_dump fw_mem_dump[];
4600 */
4601} wmi_get_fw_mem_dump_fixed_param;
4602
4603/** Event to indicate the completion of fw mem dump */
4604typedef struct {
4605 /* TLV tag and len; tag equals
4606 * WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
4607 A_UINT32 tlv_header;
4608 /** unique id identifying the request, given
4609 * in the request stats command */
4610 A_UINT32 request_id;
4611 /*In case of Firmware memory dump */
4612 A_UINT32 fw_mem_dump_complete;
4613} wmi_update_fw_mem_dump_fixed_param;
4614
4615typedef enum {
4616 WMI_ROAMING_IDLE = 0,
4617 WMI_ROAMING_ACTIVE = 1,
4618} wmi_roam_state;
4619
4620/* access categories */
4621typedef enum {
4622 WMI_AC_VO = 0,
4623 WMI_AC_VI = 1,
4624 WMI_AC_BE = 2,
4625 WMI_AC_BK = 3,
4626 WMI_AC_MAX = 4,
4627} wmi_traffic_ac;
4628
4629typedef enum {
4630 WMI_STA_STATS = 0,
4631 WMI_SOFTAP_STATS = 1,
4632 WMI_IBSS_STATS = 2,
4633 WMI_P2P_CLIENT_STATS = 3,
4634 WMI_P2P_GO_STATS = 4,
4635 WMI_NAN_STATS = 5,
4636 WMI_MESH_STATS = 6,
4637} wmi_link_iface_type;
4638
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004639/*Clear stats*/
4640typedef struct {
4641 A_UINT32 tlv_header;
4642 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
4643 /** unique id identifying the VDEV, generated by the caller */
4644 A_UINT32 vdev_id;
4645 /** stop_stats_collection_req = 1 will imply stop the statistics collection */
4646 A_UINT32 stop_stats_collection_req;
4647 /** identifies what stats to be cleared */
4648 A_UINT32 stats_clear_req_mask;
4649 /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
4650 wmi_mac_addr peer_macaddr;
4651} wmi_clear_link_stats_cmd_fixed_param;
4652
4653/* Link Stats configuration params. Trigger the link layer statistics collection*/
4654typedef struct {
4655 A_UINT32 tlv_header;
4656 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
4657 /** threshold to classify the pkts as short or long */
4658 A_UINT32 mpdu_size_threshold;
4659 /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
4660 A_UINT32 aggressive_statistics_gathering;
4661} wmi_start_link_stats_cmd_fixed_param;
4662
4663typedef struct {
4664 A_UINT32 tlv_header;
4665 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
4666 /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
4667 A_UINT32 stats_type;
4668 /** unique id identifying the VDEV, generated by the caller */
4669 A_UINT32 vdev_id;
4670 /** unique id identifying the request, generated by the caller */
4671 A_UINT32 request_id;
4672 /** peer MAC address */
4673 wmi_mac_addr peer_macaddr;
4674} wmi_request_link_stats_cmd_fixed_param;
4675
4676/* channel statistics */
4677typedef struct {
4678 A_UINT32 tlv_header;
4679 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
4680 /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
4681 A_UINT32 channel_width;
4682 /** Primary 20 MHz channel */
4683 A_UINT32 center_freq;
4684 /** center frequency (MHz) first segment */
4685 A_UINT32 center_freq0;
4686 /** center frequency (MHz) second segment */
4687 A_UINT32 center_freq1;
4688 /** msecs the radio is awake (32 bits number accruing over time) */
4689 A_UINT32 radio_awake_time;
4690 /** msecs the CCA register is busy (32 bits number accruing over time) */
4691 A_UINT32 cca_busy_time;
4692} wmi_channel_stats;
4693
Krishna Kumaar Natarajanee6cfa72016-03-25 14:05:03 -07004694/*
4695 * Each step represents 0.5 dB. The starting value is 0 dBm.
4696 * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps.
4697 */
4698#define MAX_TPC_LEVELS 64
4699
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004700/* radio statistics */
4701typedef struct {
4702 A_UINT32 tlv_header;
4703 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
4704 /** Wifi radio (if multiple radio supported) */
4705 A_UINT32 radio_id;
4706 /** msecs the radio is awake (32 bits number accruing over time) */
4707 A_UINT32 on_time;
4708 /** msecs the radio is transmitting (32 bits number accruing over time) */
4709 A_UINT32 tx_time;
4710 /** msecs the radio is in active receive (32 bits number accruing over time) */
4711 A_UINT32 rx_time;
4712 /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
4713 A_UINT32 on_time_scan;
4714 /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
4715 A_UINT32 on_time_nbd;
4716 /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
4717 A_UINT32 on_time_gscan;
4718 /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
4719 A_UINT32 on_time_roam_scan;
4720 /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
4721 A_UINT32 on_time_pno_scan;
4722 /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
4723 A_UINT32 on_time_hs20;
4724 /** number of channels */
4725 A_UINT32 num_channels;
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304726 /*
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304727 * tx time per TPC level - DEPRECATED
4728 * This field is deprecated.
4729 * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID
4730 * message.
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304731 */
Krishna Kumaar Natarajanee6cfa72016-03-25 14:05:03 -07004732 A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS];
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304733} wmi_radio_link_stats;
4734
4735/** tx time per power level statistics */
4736typedef struct {
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304737 /*
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304738 * TLV tag and len; tag equals
4739 * WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304740 */
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304741 A_UINT32 tlv_header;
4742 /* total number of tx power levels */
4743 A_UINT32 total_num_tx_power_levels;
4744 /* number of tx power levels that are carried in this event */
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304745 A_UINT32 num_tx_power_levels;
4746 /*
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304747 * offset of current stats
4748 * If ((num_tx_power_levels + power_level_offset)) ==
4749 * total_num_tx_power_levels)
4750 * this message completes the report of tx time per power levels.
4751 * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID
4752 * messages will be sent by the target to deliver the remainder of the
4753 * tx time per power level stats.
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304754 */
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304755 A_UINT32 power_level_offset;
4756 /*
4757 * This TLV will be followed by a TLV containing a variable-length
4758 * array of A_UINT32 with tx time per power level data
4759 * A_UINT32 tx_time_per_power_level[num_tx_power_levels]
4760 * The tx time is in units of milliseconds.
4761 * The power levels are board-specific values; a board-specific
4762 * translation has to be applied to determine what actual power
4763 * corresponds to each power level.
4764 * Just as the host has a BDF file available, the host should also have
4765 * a data file available that provides the power level to power
4766 * translations.
4767 */
4768} wmi_tx_power_level_stats_evt_fixed_param;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004769
4770/** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
4771typedef struct {
4772 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
4773 /** unique id identifying the request, given in the request stats command */
4774 A_UINT32 request_id;
4775 /** Number of radios*/
4776 A_UINT32 num_radio;
4777 /** more_data will be set depending on the number of radios */
4778 A_UINT32 more_radio_events;
4779/*
4780 * This TLV is followed by another TLV of array of bytes
4781 * size of(struct wmi_radio_link_stats);
4782 *
4783 * This TLV is followed by another TLV of array of bytes
4784 * num_channels * size of(struct wmi_channel_stats)
4785 */
4786
4787} wmi_radio_link_stats_event_fixed_param;
4788
4789/* per rate statistics */
4790typedef struct {
4791 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
4792 /** rate information
4793 * The rate-code is a 1-byte field in which:for given rate, nss and preamble
4794 * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
4795 * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
4796 * b'3-b'0 indicate the rate, which is indicated as follows:
4797 * OFDM : 0: OFDM 48 Mbps
4798 * 1: OFDM 24 Mbps
4799 * 2: OFDM 12 Mbps
4800 * 3: OFDM 6 Mbps
4801 * 4: OFDM 54 Mbps
4802 * 5: OFDM 36 Mbps
4803 * 6: OFDM 18 Mbps
4804 * 7: OFDM 9 Mbps
4805 * CCK (pream == 1)
4806 * 0: CCK 11 Mbps Long
4807 * 1: CCK 5.5 Mbps Long
4808 * 2: CCK 2 Mbps Long
4809 * 3: CCK 1 Mbps Long
4810 * 4: CCK 11 Mbps Short
4811 * 5: CCK 5.5 Mbps Short
4812 * 6: CCK 2 Mbps Short
4813 * HT/VHT (pream == 2/3)
4814 * 0..7: MCS0..MCS7 (HT)
4815 * 0..9: MCS0..MCS9 (VHT)
4816 */
4817 A_UINT32 rate;
4818 /** units of 100 Kbps */
4819 A_UINT32 bitrate;
4820 /** number of successfully transmitted data pkts (ACK rcvd) */
4821 A_UINT32 tx_mpdu;
4822 /** number of received data pkts */
4823 A_UINT32 rx_mpdu;
4824 /** number of data packet losses (no ACK) */
4825 A_UINT32 mpdu_lost;
4826 /** total number of data pkt retries */
4827 A_UINT32 retries;
4828 /** number of short data pkt retries */
4829 A_UINT32 retries_short;
4830 /** number of long data pkt retries */
4831 A_UINT32 retries_long;
4832} wmi_rate_stats;
4833
4834typedef struct {
4835 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
4836 /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
4837 A_UINT32 peer_type;
4838 /** mac address */
4839 wmi_mac_addr peer_mac_address;
4840 /** peer wmi_CAPABILITY_XXX */
4841 A_UINT32 capabilities;
4842 /** number of rates */
4843 A_UINT32 num_rates;
4844} wmi_peer_link_stats;
4845
4846/** PEER statistics (once started) reset and start afresh after each connection */
4847typedef struct {
4848 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
4849 /** unique id identifying the request, given in the request stats command */
4850 A_UINT32 request_id;
4851 /** number of peers accomidated in this particular event */
4852 A_UINT32 num_peers;
4853 /** Indicates the fragment number */
4854 A_UINT32 peer_event_number;
4855 /** Indicates if there are more peers which will be sent as seperate peer_stats event */
4856 A_UINT32 more_data;
4857
4858/**
4859 * This TLV is followed by another TLV
4860 * num_peers * size of(struct wmi_peer_stats)
4861 * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
4862 */
4863} wmi_peer_stats_event_fixed_param;
4864
4865/* per access category statistics */
4866typedef struct {
4867 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
4868 /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
4869 A_UINT32 ac_type;
4870 /** number of successfully transmitted unicast data pkts (ACK rcvd) */
4871 A_UINT32 tx_mpdu;
4872 /** number of received unicast mpdus */
4873 A_UINT32 rx_mpdu;
4874 /** number of succesfully transmitted multicast data packets */
4875 /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
4876 A_UINT32 tx_mcast;
4877 /** number of received multicast data packets */
4878 A_UINT32 rx_mcast;
4879 /** number of received unicast a-mpdus */
4880 A_UINT32 rx_ampdu;
4881 /** number of transmitted unicast a-mpdus */
4882 A_UINT32 tx_ampdu;
4883 /** number of data pkt losses (no ACK) */
4884 A_UINT32 mpdu_lost;
4885 /** total number of data pkt retries */
4886 A_UINT32 retries;
4887 /** number of short data pkt retries */
4888 A_UINT32 retries_short;
4889 /** number of long data pkt retries */
4890 A_UINT32 retries_long;
4891 /** data pkt min contention time (usecs) */
4892 A_UINT32 contention_time_min;
4893 /** data pkt max contention time (usecs) */
4894 A_UINT32 contention_time_max;
4895 /** data pkt avg contention time (usecs) */
4896 A_UINT32 contention_time_avg;
4897 /** num of data pkts used for contention statistics */
4898 A_UINT32 contention_num_samples;
4899} wmi_wmm_ac_stats;
4900
4901/* interface statistics */
4902typedef struct {
4903 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
4904 /** access point beacon received count from connected AP */
4905 A_UINT32 beacon_rx;
4906 /** access point mgmt frames received count from connected AP (including Beacon) */
4907 A_UINT32 mgmt_rx;
4908 /** action frames received count */
4909 A_UINT32 mgmt_action_rx;
4910 /** action frames transmit count */
4911 A_UINT32 mgmt_action_tx;
4912 /** access Point Beacon and Management frames RSSI (averaged) */
4913 A_UINT32 rssi_mgmt;
4914 /** access Point Data Frames RSSI (averaged) from connected AP */
4915 A_UINT32 rssi_data;
4916 /** access Point ACK RSSI (averaged) from connected AP */
4917 A_UINT32 rssi_ack;
4918 /** number of peers */
4919 A_UINT32 num_peers;
4920 /** Indicates how many peer_stats events will be sent depending on the num_peers. */
4921 A_UINT32 num_peer_events;
4922 /** number of ac */
4923 A_UINT32 num_ac;
4924 /** Roaming Stat */
4925 A_UINT32 roam_state;
4926 /**
4927 * Average Beacon spread offset is the averaged time delay between TBTT
4928 * and beacon TSF */
4929 /** Upper 32 bits of averaged 64 bit beacon spread offset */
4930 A_UINT32 avg_bcn_spread_offset_high;
4931 /** Lower 32 bits of averaged 64 bit beacon spread offset */
4932 A_UINT32 avg_bcn_spread_offset_low;
4933 /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
4934 A_UINT32 is_leaky_ap;
4935 /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
4936 A_UINT32 avg_rx_frms_leaked;
4937 /** Rx leak watch window currently in force to minimize data loss
4938 * because of leaky AP. Rx leak window is the
4939 * time driver waits before shutting down the radio or switching the
4940 * channel and after receiving an ACK for
4941 * a data frame with PM bit set) */
4942 A_UINT32 rx_leak_window;
4943} wmi_iface_link_stats;
4944
4945/** Interface statistics (once started) reset and start afresh after each connection */
4946typedef struct {
4947 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
4948 /** unique id identifying the request, given in the request stats command */
4949 A_UINT32 request_id;
4950 /** unique id identifying the VDEV, generated by the caller */
4951 A_UINT32 vdev_id;
4952/*
4953 * This TLV is followed by another TLV
4954 * wmi_iface_link_stats iface_link_stats;
4955 * num_ac * size of(struct wmi_wmm_ac_stats)
4956 */
4957} wmi_iface_link_stats_event_fixed_param;
4958
4959/** Suspend option */
4960enum {
4961 WMI_PDEV_SUSPEND, /* suspend */
4962 WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
4963};
4964
4965typedef struct {
4966 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */
4967 /* suspend option sent to target */
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05304968 /*
4969 * pdev_id for identifying the MAC, See macros
4970 * starting with WMI_PDEV_ID_ for values.
4971 */
4972 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004973 A_UINT32 suspend_opt;
4974} wmi_pdev_suspend_cmd_fixed_param;
4975
4976typedef struct {
4977 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 +05304978 /*
4979 * pdev_id for identifying the MAC, See macros
4980 * starting with WMI_PDEV_ID_ for values.
4981 */
4982 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004983} wmi_pdev_resume_cmd_fixed_param;
4984
4985typedef struct {
4986 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */
4987 A_UINT32 num_vdev_stats; /* number of vdevs */
4988} wmi_vdev_rate_stats_event_fixed_param;
4989
4990typedef struct {
4991 A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info */
4992 A_UINT32 vdevid; /* Id of the wlan vdev */
4993 A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted */
4994 A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above */
4995 A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
4996 A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
4997} wmi_vdev_rate_ht_info;
4998
4999typedef struct {
Himanshu Agarwal4eefcde2016-09-09 12:59:17 +05305000 /**
5001 * TLV tag and len, tag equals
5002 * WMITLV_TAG_STRUC_wmi_rx_aggr_failure_event_fixed_param
5003 */
5004 A_UINT32 tlv_header;
5005 A_UINT32 num_failure_info; /* How many holes on rx aggregation */
5006} wmi_rx_aggr_failure_event_fixed_param;
5007
5008typedef struct {
5009 /**
5010 * TLV tag and len, tag equals
5011 * WMITLV_wmi_rx_aggr_failure_info
5012 */
5013 A_UINT32 tlv_header;
5014 A_UINT32 start_seq; /* start sequence number of the hole */
5015 A_UINT32 end_seq; /* end sequence number of the hole */
5016} wmi_rx_aggr_failure_info;
5017
5018typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005019 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
5020 wmi_stats_id stats_id;
5021 /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
5022 A_UINT32 num_pdev_stats;
5023 /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */
5024 A_UINT32 num_vdev_stats;
5025 /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */
5026 A_UINT32 num_peer_stats;
5027 A_UINT32 num_bcnflt_stats;
5028 /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */
5029 A_UINT32 num_chan_stats;
Govind Singh45ef44a2016-02-01 17:45:22 +05305030 /** number of MIB stats event structures (wmi_mib_stats) */
5031 A_UINT32 num_mib_stats;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005032 /* This TLV is followed by another TLV of array of bytes
5033 * A_UINT8 data[];
5034 * This data array contains
5035 * num_pdev_stats * size of(struct wmi_pdev_stats)
5036 * num_vdev_stats * size of(struct wmi_vdev_stats)
5037 * num_peer_stats * size of(struct wmi_peer_stats)
5038 * num_bcnflt_stats * size_of()
5039 * num_chan_stats * size of(struct wmi_chan_stats)
Govind Singh45ef44a2016-02-01 17:45:22 +05305040 * num_mib_stats * size of(struct wmi_mib_stats)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005041 *
5042 */
5043} wmi_stats_event_fixed_param;
5044
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305045/* WLAN channel CCA stats bitmap */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305046#define WLAN_STATS_IDLE_TIME_SHIFT 0
5047#define WLAN_STATS_IDLE_TIME_TIME 0x00000001
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305048
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305049#define WLAN_STATS_TX_TIME_SHIFT 1
5050#define WLAN_STATS_TX_TIME_MASK 0x00000002
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305051
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305052#define WLAN_STATS_RX_IN_BSS_TIME_SHIFT 2
5053#define WLAN_STATS_RX_IN_BSS_TIME_MASK 0x00000004
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305054
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305055#define WLAN_STATS_RX_OUT_BSS_TIME_SHIFT 3
5056#define WLAN_STATS_RX_OUT_BSS_TIME_MASK 0x00000008
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305057
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305058#define WLAN_STATS_RX_BUSY_TIME_SHIFT 4
5059#define WLAN_STATS_RX_BUSY_TIME_MASK 0x00000010
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305060
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305061#define WLAN_STATS_RX_IN_BAD_COND_TIME_SHIFT 5
5062#define WLAN_STATS_RX_IN_BAD_COND_TIME_MASK 0x00000020
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305063
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305064#define WLAN_STATS_TX_IN_BAD_COND_TIME_SHIFT 6
5065#define WLAN_STATS_TX_IN_BAD_COND_TIME_MASK 0x00000040
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305066
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305067#define WLAN_STATS_WLAN_NOT_AVAIL_TIME_SHIFT 7
5068#define WLAN_STATS_WLAN_NOT_AVAIL_TIME_MASK 0x00000080
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305069
5070/* WLAN peer signal stats bitmap */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305071#define WLAN_STATS_PER_CHAIN_SNR_SHIFT 0
5072#define WLAN_STATS_PER_CHAIN_SNR_MASK 0x00000001
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305073
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305074#define WLAN_STATS_PER_CHAIN_NF_SHIFT 1
5075#define WLAN_STATS_PER_CHAIN_NF_MASK 0x00000002
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305076
5077/* WLAN TX stats bitmap */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305078#define WLAN_STATS_TX_MSDU_CNT_SHIFT 0
5079#define WLAN_STATS_TX_MSDU_CNT_MASK 0x00000001
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305080
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305081#define WLAN_STATS_TX_MPDU_CNT_SHIFT 1
5082#define WLAN_STATS_TX_MPDU_CNT_MASK 0x00000002
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305083
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305084#define WLAN_STATS_TX_PPDU_CNT_SHIFT 2
5085#define WLAN_STATS_TX_PPDU_CNT_MASK 0x00000004
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305086
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305087#define WLAN_STATS_TX_BYTES_SHIFT 3
5088#define WLAN_STATS_TX_BYTES_MASK 0x00000008
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305089
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305090#define WLAN_STATS_TX_MSDU_DROP_CNT_SHIFT 4
5091#define WLAN_STATS_TX_MSDU_DROP_CNT_MASK 0x00000010
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305092
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305093#define WLAN_STATS_TX_DROP_BYTES_SHIFT 5
5094#define WLAN_STATS_TX_DROP_BYTES_MASK 0x00000020
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305095
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305096#define WLAN_STATS_TX_MPDU_RETRY_CNT_SHIFT 6
5097#define WLAN_STATS_TX_MPDU_RETRY_CNT_MASK 0x00000040
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305098
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305099#define WLAN_STATS_TX_MPDU_FAIL_CNT_SHIFT 7
5100#define WLAN_STATS_TX_MPDU_FAIL_CNT_MASK 0x00000080
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305101
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305102#define WLAN_STATS_TX_PPDU_FAIL_CNT_SHIFT 8
5103#define WLAN_STATS_TX_PPDU_FAIL_CNT_MASK 0x00000100
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305104
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305105#define WLAN_STATS_TX_MPDU_AGGR_SHIFT 9
5106#define WLAN_STATS_TX_MPDU_AGGR_MASK 0x00000200
5107
5108#define WLAN_STATS_TX_SUCC_MCS_SHIFT 10
5109#define WLAN_STATS_TX_SUCC_MCS_MASK 0x00000400
5110
5111#define WLAN_STATS_TX_FAIL_MCS_SHIFT 11
5112#define WLAN_STATS_TX_FAIL_MCS_MASK 0x00000800
5113
5114#define WLAN_STATS_TX_DELAY_SHIFT 12
5115#define WLAN_STATS_TX_DELAY_MASK 0x00001000
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305116
5117/* WLAN RX stats bitmap */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305118#define WLAN_STATS_MAC_RX_MPDU_CNT_SHIFT 0
5119#define WLAN_STATS_MAC_RX_MPDU_CNT_MASK 0x00000001
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305120
5121#define WLAN_STATS_MAC_RX_BYTES_SHIFT 1
5122#define WLAN_STATS_MAC_RX_BYTES_MASK 0x00000002
5123
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305124#define WLAN_STATS_PHY_RX_PPDU_CNT_SHIFT 2
5125#define WLAN_STATS_PHY_RX_PPDU_CNT_MASK 0x00000004
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305126
5127#define WLAN_STATS_PHY_RX_BYTES_SHIFT 3
5128#define WLAN_STATS_PHY_RX_BYTES_MASK 0x00000008
5129
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305130#define WLAN_STATS_RX_DISORDER_CNT_SHIFT 4
5131#define WLAN_STATS_RX_DISORDER_CNT_MASK 0x00000010
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305132
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305133#define WLAN_STATS_RX_RETRY_CNT_SHIFT 5
5134#define WLAN_STATS_RX_RETRY_CNT_MASK 0x00000020
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305135
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305136#define WLAN_STATS_RX_DUP_CNT_SHIFT 6
5137#define WLAN_STATS_RX_DUP_CNT_MASK 0x00000040
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305138
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305139#define WLAN_STATS_RX_DISCARD_CNT_SHIFT 7
5140#define WLAN_STATS_RX_DISCARD_CNT_MASK 0x00000080
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305141
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305142#define WLAN_STATS_RX_MPDU_AGGR_SHIFT 8
5143#define WLAN_STATS_RX_MPDU_AGGR_MASK 0x00000100
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305144
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305145#define WLAN_STATS_RX_MCS_SHIFT 9
5146#define WLAN_STATS_RX_MCS_MASK 0x00000200
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305147
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305148#define WLAN_STATS_STA_PS_INDS_SHIFT 10
5149#define WLAN_STATS_STA_PS_INDS_MASK 0x00000400
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305150
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305151#define WLAN_STATS_STA_PS_DURS_SHIFT 11
5152#define WLAN_STATS_STA_PS_DURS_MASK 0x00000800
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305153
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305154#define WLAN_STATS_RX_PROBE_REQS_SHIFT 12
5155#define WLAN_STATS_RX_PROBE_REQS_MASK 0x00001000
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305156
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305157#define WLAN_STATS_RX_OTH_MGMTS_SHIFT 13
5158#define WLAN_STATS_RX_OTH_MGMTS_MASK 0x00002000
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305159
5160typedef struct {
5161 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats */
5162 A_UINT32 vdev_id;
5163 /** Percentage of idle time, no TX, no RX, no interference */
5164 A_UINT32 idle_time;
5165 /** Percentage of time transmitting packets */
5166 A_UINT32 tx_time;
5167 /** Percentage of time receiving packets in current BSSs */
5168 A_UINT32 rx_in_bss_time;
5169 /** Percentage of time receiving packets not in current BSSs */
5170 A_UINT32 rx_out_bss_time;
5171 /** Percentage of time interference detected. */
5172 A_UINT32 rx_busy_time;
5173 /** Percentage of time receiving packets with errors
5174 * or packets flagged as retransmission or seqnum discontinued. */
5175 A_UINT32 rx_in_bad_cond_time;
5176 /** Percentage of time the device transmitted packets that haven't been ACKed. */
5177 A_UINT32 tx_in_bad_cond_time;
5178 /** Percentage of time the chip is unable to work in normal conditions. */
5179 A_UINT32 wlan_not_avail_time;
5180} wmi_chan_cca_stats;
5181
5182/** Thresholds of cca stats, stands for percentages of stats variation.
5183 * Check wmi_chan_cca_stats for each stats's meaning.
5184 */
5185typedef struct {
5186 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats_thresh */
5187 A_UINT32 idle_time; /* units = percent */
5188 A_UINT32 tx_time; /* units = percent */
5189 A_UINT32 rx_in_bss_time; /* units = percent */
5190 A_UINT32 rx_out_bss_time; /* units = percent */
5191 A_UINT32 rx_busy_time; /* units = percent */
5192 A_UINT32 rx_in_bad_cond_time; /* units = percent */
5193 A_UINT32 tx_in_bad_cond_time; /* units = percent */
5194 A_UINT32 wlan_not_avail_time; /* units = percent */
5195} wmi_chan_cca_stats_thresh;
5196
5197typedef struct {
5198 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats */
5199 A_UINT32 vdev_id;
5200 A_UINT32 peer_id;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305201 /** per chain SNR in current bss, units are dB */
5202 A_INT32 per_chain_snr[WMI_MAX_CHAINS];
5203 /** per chain background noise, units are dBm */
5204 A_INT32 per_chain_nf[WMI_MAX_CHAINS];
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305205} wmi_peer_signal_stats;
5206
5207/** Thresholds of signal stats, stand for percentage of stats variation.
5208 * Check wmi_peer_signal_stats for each stats's meaning.
5209 */
5210typedef struct {
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +05305211 /**
5212 * TLV tag and len; tag equals
5213 * WMITLV_TAG_STRUC_wmi_peer_signal_stats_thresh
5214 */
5215 A_UINT32 tlv_header;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305216 A_UINT32 per_chain_snr; /* units = dB */
5217 A_UINT32 per_chain_nf; /* units = dBm */
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305218} wmi_peer_signal_stats_thresh;
5219
5220typedef struct {
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305221 /**
5222 * TLV tag and len; tag equals
5223 * WMITLV_TAG_STRUC_wmi_tx_stats
5224 */
5225 A_UINT32 tlv_header;
5226 /** Number of total TX MSDUs on MAC layer in the period */
5227 A_UINT32 tx_msdu_cnt;
5228 /** Number of total TX MPDUs on MAC layer in the period */
5229 A_UINT32 tx_mpdu_cnt;
5230 /** Number of total TX PPDUs on MAC layer in the period */
5231 A_UINT32 tx_ppdu_cnt;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305232 /** Bytes of tx data on MAC layer in the period */
5233 A_UINT32 tx_bytes;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305234 /**
5235 * Number of TX MSDUs cancelled due to any reason in the period,
5236 * such as WMM limitation/bandwidth limitation/radio congestion
5237 */
5238 A_UINT32 tx_msdu_drop_cnt;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305239 /** Bytes of dropped TX packets in the period */
5240 A_UINT32 tx_drop_bytes;
5241 /** Number of unacked transmissions of MPDUs */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305242 A_UINT32 tx_mpdu_retry_cnt;
5243 /** Number of MPDUs have not been ACKed despite retried */
5244 A_UINT32 tx_mpdu_fail_cnt;
5245 /** Number of PPDUs which received no block ack */
5246 A_UINT32 tx_ppdu_fail_cnt;
5247 /**
5248 * This TLV is followed by TLVs below: :
5249 * A_UINT32 tx_mpdu_aggr[tx_mpdu_aggr_array_len];
5250 * A_UINT32 tx_succ_mcs[tx_msdu_acked_mcs_array_len];
5251 * A_UINT32 tx_fail_mcs[tx_msdu_failed_mcs_array_len];
5252 * A_UINT32 tx_delay[tx_msdu_delay_array_len];
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305253 */
5254} wmi_tx_stats;
5255
5256/** Thresholds of tx stats, stand for percentage of stats variation.
5257 * Check wmi_tx_stats for each stats's meaning.
5258 */
5259typedef struct {
5260 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats_thresh */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305261 A_UINT32 tx_msdu_cnt;
5262 A_UINT32 tx_mpdu_cnt;
5263 A_UINT32 tx_ppdu_cnt;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305264 A_UINT32 tx_bytes;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305265 A_UINT32 tx_msdu_drop_cnt;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305266 A_UINT32 tx_drop_bytes;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305267 A_UINT32 tx_mpdu_retry_cnt;
5268 A_UINT32 tx_mpdu_fail_cnt;
5269 A_UINT32 tx_ppdu_fail_cnt;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305270 A_UINT32 tx_mpdu_aggr;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305271 A_UINT32 tx_succ_mcs;
5272 A_UINT32 tx_fail_mcs;
5273 A_UINT32 tx_delay;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305274} wmi_tx_stats_thresh;
5275
5276typedef struct {
5277 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_tx_stats */
5278 A_UINT32 vdev_id;
5279 A_UINT32 peer_id;
5280 /* The TLVs for the 4 AC follows:
5281 * wmi_tx_stats tx_stats[]; wmi_tx_stats for BE/BK/VI/VO
5282 */
5283} wmi_peer_ac_tx_stats;
5284
5285typedef struct {
5286 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats */
5287 A_UINT32 tlv_header;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305288 /** Number of RX MSDUs on MAC layer */
5289 A_UINT32 mac_rx_msdu_cnt;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305290 /** Bytes of RX packets on MAC layer */
5291 A_UINT32 mac_rx_bytes;
5292 /** Number of RX packets on PHY layer */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305293 A_UINT32 phy_rx_ppdu_cnt;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305294 /** Bytes of RX packets on PHY layer */
5295 A_UINT32 phy_rx_bytes;
5296 /** Number of discontinuity in seqnum */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305297 A_UINT32 rx_disorder_cnt;
5298 /** Number of RX MPDUs flagged as retransmissions */
5299 A_UINT32 rx_retry_cnt;
5300 /** Number of RX MPDUs identified as duplicates */
5301 A_UINT32 rx_dup_cnt;
5302 /** Number of RX MSDUs discarded */
5303 A_UINT32 rx_msdu_discard_cnt;
5304 /**
5305 * This TLV is followed by TLVs below:
5306 * A_UINT32 rx_mpdu_aggr[rx_mpdu_aggr_array_len];
5307 * A_UINT32 rx_mcs[rx_msdu_mcs_array_len];
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305308 */
5309} wmi_rx_stats;
5310
5311/** Thresholds of rx stats, stands for percentage of stats variation.
5312 * Check wmi_rx_stats for each stats's meaning.
5313 */
5314typedef struct {
5315 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats_thresh */
5316 A_UINT32 tlv_header;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305317 A_UINT32 mac_rx_mpdu_cnt;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305318 A_UINT32 mac_rx_bytes;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305319 A_UINT32 phy_rx_ppdu_cnt;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305320 A_UINT32 phy_rx_bytes;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305321 A_UINT32 rx_disorder_cnt;
5322 A_UINT32 rx_retry_cnt;
5323 A_UINT32 rx_dup_cnt;
5324 A_UINT32 rx_discard_cnt;
5325 A_UINT32 rx_mpdu_aggr;
5326 A_UINT32 rx_mcs;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305327 A_UINT32 sta_ps_inds;
5328 A_UINT32 sta_ps_durs;
5329 A_UINT32 rx_probe_reqs;
5330 A_UINT32 rx_oth_mgmts;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305331} wmi_rx_stats_thresh;
5332
5333typedef struct {
5334 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_rx_stats */
5335 A_UINT32 tlv_header;
5336 A_UINT32 vdev_id;
5337 A_UINT32 peer_id;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305338 /** How many times STAs go to sleep */
5339 A_UINT32 sta_ps_inds;
5340 /** Total sleep time of STAs, milliseconds units */
5341 A_UINT32 sta_ps_durs;
5342 /** Number of probe requests received */
5343 A_UINT32 rx_probe_reqs;
5344 /**
5345 * Number of other management frames received, not including probe
5346 * requests
5347 */
5348 A_UINT32 rx_oth_mgmts;
5349 /**
5350 * The TLVs for the 4 AC follows:
5351 * wmi_rx_stats rx_stats[]; wmi_rx_stats for BE/BK/VI/VO
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305352 */
5353} wmi_peer_ac_rx_stats;
5354
5355typedef enum {
5356 /** Periodic timer timed out, based on the period specified
5357 * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
5358 */
5359 TRIGGER_COND_ID_TIMER_TIMED_OUT = 0x1,
5360 /** Any of the (enabled) stats thresholds specified
5361 * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
5362 * within the current stats period.
5363 */
5364 TRIGGER_COND_ID_THRESH_EXCEEDED = 0x2,
5365 /** In Response to the one-time wlan stats request of
5366 * WMI_REQUEST_WLAN_STATS_CMDID from host.
5367 */
5368 TRIGGER_COND_ID_ONE_TIME_REQUEST = 0x3,
5369} wmi_report_stats_event_trigger_cond_id;
5370
5371typedef struct {
5372 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_report_stats_event_fixed_param */
5373 /** Indicate what triggered this event, check wmi_report_stats_event_trigger_cond_id for details */
5374 A_UINT32 trigger_cond_id;
5375 /** Bitmap to indicate changed channel CCA stats which exceeded the thresholds */
5376 A_UINT32 cca_chgd_bitmap;
5377 /** Bitmap to indicate changed peer signal stats which exceeded the thresholds */
5378 A_UINT32 sig_chgd_bitmap;
5379 /** Bitmap to indicate changed TX counters which exceeded the thresholds */
5380 A_UINT32 tx_chgd_bitmap;
5381 /** Bitmap to indicate changed RX counters which exceeded the thresholds */
5382 A_UINT32 rx_chgd_bitmap;
5383 /** number of per channel CCA stats structures (wmi_chan_cca_stats), 0 to max vdevs*/
5384 A_UINT32 num_chan_cca_stats;
5385 /** number of per peer signal stats structures (wmi_peer_signal_stats), 0 to max peers*/
5386 A_UINT32 num_peer_signal_stats;
5387 /** number of per peer ac TX stats structures (wmi_peer_ac_tx_stats), 0 to max peers*/
5388 A_UINT32 num_peer_ac_tx_stats;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305389 /**
5390 * Array length of tx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
5391 * The array indicates number of MPDUs sent on specified aggregation size
5392 * (per number of MPDUs per AMPDUs / 1 to 7 and 8+).
5393 * Array length can be set per WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN
5394 */
5395 A_UINT32 tx_mpdu_aggr_array_len;
5396 /**
5397 * Array length of tx_succ_mcs[] which is histogram of encoding rate.
5398 * The array indicates number of acked PPDUs sent at a specific rate
5399 */
5400 A_UINT32 tx_succ_mcs_array_len;
5401 /**
5402 * Array length of tx_fail_mcs[] which is histogram of encoding rate.
5403 * The array indicates number of unacked PPDUs sent at a specific rate
5404 */
5405 A_UINT32 tx_fail_mcs_array_len;
5406 /**
5407 * tx_delay[]is a histogram of delays on MAC layer.
5408 * The array counts numbers of PPDUs encountering different TX time delays.
5409 * TX delay here means time interval between the time the packet has been received
5410 * at the MAC layer and the time lower layers returns a tx status (<10ms to >100ms)
5411 *
5412 * The bin size tx_delay_bin_size_ms specifies how many milliseconds
5413 * each bin of the tx_delay histogram represents.
5414 * By default the bin size is 10ms.
5415 * tx_delay[0] -> delays between 0-9 ms
5416 * tx_delay[1] -> delays between 10-19 ms
5417 * ...
5418 * tx_delay[9] -> delays between 90-99 ms
5419 * tx_delay[10] -> delays >= 100 ms
5420 * Bin size can be set per WMI_PDEV_PARAM_TX_DELAY_BIN_SIZE_MS.
5421 */
5422 A_UINT32 tx_delay_bin_size_ms;
5423 /** Array length of tx_delay[]. It can be set per WMI_PDEV_PARAM_TX_DELAY_ARRAY_LEN */
5424 A_UINT32 tx_delay_array_len;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305425 /** number of per peer ac RX stats structures (wmi_peer_ac_rx_stats), 0 to max peers*/
5426 A_UINT32 num_peer_ac_rx_stats;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305427 /**
5428 * Array length of rx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
5429 * It can be set per WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN
5430 */
5431 A_UINT32 rx_mpdu_aggr_array_len;
5432 /**
5433 * Array size of rx_mcs[] which is histogram of encoding rate.
5434 * The array indicates number of PPDUs received at a specific rate
5435 */
5436 A_UINT32 rx_mcs_array_size;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305437
5438 /**
5439 * This TLV is followed by TLVs below:
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305440 * wmi_chan_cca_stats chan_cca_stats[]; Array length is specified by num_chan_cca_stats
5441 * wmi_peer_signal_stats peer_signal_stats[]; Array length is specified by num_peer_signal_stats
5442 * wmi_peer_ac_tx_stats peer_ac_tx_stats[]; Array length is specified by num_peer_ac_tx_stats
5443 * wmi_tx_stats tx_stats[][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC, array index is (peer_index * WLAN_MAX_AC + ac_index)
5444 * A_UINT32 tx_mpdu_aggr[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_mpdu_aggr_array_len,
5445 * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_mpdu_aggr_array_len + A-MPDU aggregation index
5446 * A_UINT32 tx_succ_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_succ_mcs_array_len,
5447 * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_succ_mcs_array_len + MCS index
5448 * A_UINT32 tx_fail_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_fail_mcs_array_len,
5449 * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_fail_mcs_array_len + MCS index
5450 * A_UINT32 tx_delay[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_delay_array_len,
5451 * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_delay_array_len + tx delay index
5452 * wmi_peer_ac_rx_stats peer_ac_rx_stats[]; Array length is specified by num_peer_ac_rx_stats
5453 * wmi_rx_stats rx_stats[][]; Array length is num_peer_ac_rx_stats * WLAN_MAX_AC, array index is (peer_index * WLAN_MAX_AC + ac_index)
5454 * A_UINT32 rx_mpdu_aggr[][][]; Array length is num_peer_ac_rx_stats * WLAN_MAX_AC * rx_mpdu_aggr_array_len,
5455 * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mpdu_aggr_array_len + A-MPDU aggregation index
5456 * A_UINT32 rx_mcs[][][]; Array length is (num_peer_ac_rx_stats * WLAN_MAX_AC) * rx_mcs_array_len,
5457 * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mcs_array_len + MCS index
5458 */
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305459} wmi_report_stats_event_fixed_param;
5460
5461
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005462/**
5463 * PDEV statistics
5464 * @todo
5465 * add all PDEV stats here
5466 */
5467typedef struct {
5468 /** Channel noise floor */
5469 A_INT32 chan_nf;
5470 /** TX frame count */
5471 A_UINT32 tx_frame_count;
5472 /** RX frame count */
5473 A_UINT32 rx_frame_count;
5474 /** rx clear count */
5475 A_UINT32 rx_clear_count;
5476 /** cycle count */
5477 A_UINT32 cycle_count;
5478 /** Phy error count */
5479 A_UINT32 phy_err_count;
5480 /** Channel Tx Power */
5481 A_UINT32 chan_tx_pwr;
5482 /** WAL dbg stats */
5483 struct wlan_dbg_stats pdev_stats;
5484
5485} wmi_pdev_stats;
5486
5487/**
5488 * VDEV statistics
5489 * @todo
5490 * add all VDEV stats here
5491 */
5492
5493typedef struct {
5494 A_INT32 bcn_snr;
5495 A_INT32 dat_snr;
5496} wmi_snr_info;
5497
5498typedef struct {
5499 /** unique id identifying the VDEV, generated by the caller */
5500 A_UINT32 vdev_id;
5501 wmi_snr_info vdev_snr;
5502 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) */
5503 A_UINT32 rx_frm_cnt; /* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast) */
5504 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 +05305505 that the 802.11 station successfully transmitted after more than one retransmission attempt */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005506 A_UINT32 fail_cnt[WLAN_MAX_AC]; /*Total number packets(per AC) failed to transmit */
5507 A_UINT32 rts_fail_cnt; /*Total number of RTS/CTS sequence failures for transmission of a packet */
5508 A_UINT32 rts_succ_cnt; /*Total number of RTS/CTS sequence success for transmission of a packet */
5509 A_UINT32 rx_err_cnt; /*The receive error count. HAL will provide the RxP FCS error global */
5510 A_UINT32 rx_discard_cnt; /* The sum of the receive error count and dropped-receive-buffer error count. (FCS error) */
5511 A_UINT32 ack_fail_cnt; /*Total number packets failed transmit because of no ACK from the remote entity */
5512 A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES]; /*History of last ten transmit rate, in units of 500 kbit/sec */
5513 A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES]; /*History of last ten Beacon rssi of the connected Bss */
5514} wmi_vdev_stats;
5515
5516/**
5517 * peer statistics.
5518 *
5519 * @todo
5520 * add more stats
5521 *
5522 */
5523typedef struct {
5524 /** peer MAC address */
5525 wmi_mac_addr peer_macaddr;
5526 /** rssi */
5527 A_UINT32 peer_rssi;
5528 /** last tx data rate used for peer */
5529 A_UINT32 peer_tx_rate;
5530 /** last rx data rate used for peer */
5531 A_UINT32 peer_rx_rate;
5532} wmi_peer_stats;
5533
5534typedef struct {
5535 /** Primary channel freq of the channel for which stats are sent */
5536 A_UINT32 chan_mhz;
5537 /** Time spent on the channel */
5538 A_UINT32 sampling_period_us;
5539 /** Aggregate duration over a sampling period for which channel activity was observed */
5540 A_UINT32 rx_clear_count;
5541 /** Accumalation of the TX PPDU duration over a sampling period */
5542 A_UINT32 tx_duration_us;
5543 /** Accumalation of the RX PPDU duration over a sampling period */
5544 A_UINT32 rx_duration_us;
5545} wmi_chan_stats;
5546
5547typedef struct {
Govind Singh45ef44a2016-02-01 17:45:22 +05305548 A_UINT32 tx_mpdu_grp_frag_cnt; /*dot11TransmittedFragmentCount */
5549 A_UINT32 tx_msdu_grp_frm_cnt; /*dot11GroupTransmittedFrameCount */
5550 A_UINT32 tx_msdu_fail_cnt; /*dot11FailedCount*/
5551 A_UINT32 rx_mpdu_frag_cnt; /*dot11ReceivedFragmentCount*/
5552 A_UINT32 rx_msdu_grp_frm_cnt; /*dot11GroupReceivedFrameCount*/
5553 A_UINT32 rx_mpdu_fcs_err; /*dot11FCSErrorCount*/
5554 A_UINT32 tx_msdu_frm_cnt; /*dot11TransmittedFrameCount*/
5555 A_UINT32 tx_msdu_retry_cnt; /*dot11RetryCount*/
5556 A_UINT32 rx_frm_dup_cnt; /*dot11FrameDuplicateCount */
5557 A_UINT32 tx_rts_success_cnt; /*dot11RTSSuccessCount*/
5558 A_UINT32 tx_rts_fail_cnt; /*dot11RTSFailureCount*/
5559 /*dot11QosTransmittedFragmentCount */
5560 A_UINT32 tx_Qos_mpdu_grp_frag_cnt;
5561 A_UINT32 tx_Qos_msdu_fail_UP; /*dot11QosFailedCount */
5562 A_UINT32 tx_Qos_msdu_retry_UP; /*dot11QosRetryCount */
5563 A_UINT32 rx_Qos_frm_dup_cnt_UP; /*dot11QosFrameDuplicateCount*/
5564 A_UINT32 tx_Qos_rts_success_cnt_UP; /*dot11QosRTSSuccessCount*/
5565 A_UINT32 tx_Qos_rts_fail_cnt_UP; /*dot11QosRTSFailureCount*/
5566 A_UINT32 rx_Qos_mpdu_frag_cnt_UP; /*dot11QosReceivedFragmentCount*/
5567 A_UINT32 tx_Qos_msdu_frm_cnt_UP; /*dot11QosTransmittedFrameCount*/
5568 A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/
5569 A_UINT32 rx_Qos_mpdu_cnt; /*dot11QosMPDUsReceivedCount*/
5570 A_UINT32 rx_Qos_mpdu_retryBit_cnt; /*dot11QosRetriesReceivedCount*/
5571 /*dot11RSNAStatsRobustMgmtCCMPReplays */
5572 A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt;
5573 A_UINT32 rsna_TKIP_icv_err_cnt; /*dot11RSNAStatsTKIPICVErrors*/
5574 A_UINT32 rsna_TKIP_replay_err_cnt; /*dot11RSNAStatsTKIPReplays*/
5575 /*dot11RSNAStatsCCMPDecryptErrors */
5576 A_UINT32 rsna_CCMP_decrypt_err_cnt;
5577 A_UINT32 rsna_CCMP_replay_err_cnt; /*dot11RSNAStatsCCMPReplays*/
5578 A_UINT32 tx_ampdu_cnt; /*dot11TransmittedAMPDUCount*/
5579 /*dot11TransmittedMPDUsInAMPDUCount*/
5580 A_UINT32 tx_mpdu_cnt_in_ampdu;
5581 /*dot11TransmittedOctetsInAMPDUCount*/
5582 union {
5583 A_UINT64 counter; /* for use by target only */
5584 struct {
5585 A_UINT32 low;
5586 A_UINT32 high;
5587 } upload; /* for use by host */
5588 } tx_octets_in_ampdu;
5589 A_UINT32 rx_ampdu_cnt; /*dot11AMPDUReceivedCount*/
5590 A_UINT32 rx_mpdu_cnt_in_ampdu; /*dot11MPDUInReceivedAMPDUCount*/
5591 union {
5592 A_UINT64 counter; /* for use by target only */
5593 struct {
5594 A_UINT32 rx_octets_in_ampdu_low;
5595 A_UINT32 rx_octets_in_ampdu_high;
5596 } upload; /* for use by host */
5597 } rx_octets_in_ampdu; /*dot11ReceivedOctetsInAMPDUCount*/
5598 A_UINT32 reserved_1;
5599 A_UINT32 reserved_2;
5600 A_UINT32 reserved_3;
5601 A_UINT32 reserved_4;
5602} wmi_mib_stats;
5603
5604typedef struct {
Himanshu Agarwal86319542016-05-24 09:00:39 +05305605 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_stats */
5606 A_UINT32 tlv_header;
5607 A_UINT32 vdev_id;
Himanshu Agarwal29061322016-05-27 14:09:27 +05305608 A_INT32 rssi_avg_beacon[WMI_MAX_CHAINS];
5609 A_INT32 rssi_avg_data[WMI_MAX_CHAINS];
Himanshu Agarwal86319542016-05-24 09:00:39 +05305610 wmi_mac_addr peer_macaddr;
5611} wmi_rssi_stats;
5612
5613typedef struct {
5614 /*
5615 * TLV tag and len; tag equals
5616 * WMITLV_TAG_STRUC_wmi_per_chain_rssi_stats
5617 */
5618 A_UINT32 tlv_header;
5619 A_UINT32 num_per_chain_rssi_stats;
5620 /*
5621 * This TLV is followed by another TLV of array of structs:
5622 * wmi_rssi_stats rssi_stats[num_per_chain_rssi_stats];
5623 */
5624} wmi_per_chain_rssi_stats;
5625
5626typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005627 A_UINT32 tlv_header;
5628 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
5629 /** unique id identifying the VDEV, generated by the caller */
5630 A_UINT32 vdev_id;
5631 /** VDEV type (AP,STA,IBSS,MONITOR) */
5632 A_UINT32 vdev_type;
5633 /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0)*/
5634 A_UINT32 vdev_subtype;
5635 /** VDEV MAC address */
5636 wmi_mac_addr vdev_macaddr;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05305637 /** Number of configured txrx streams */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005638 A_UINT32 num_cfg_txrx_streams;
5639 /*
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05305640 * pdev_id for identifying the MAC,
5641 * See macros starting with WMI_PDEV_ID_ for values.
5642 */
5643 A_UINT32 pdev_id;
5644 /*
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005645 * This TLV is followed by another TLV of array of structures
5646 * wmi_vdev_txrx_streams cfg_txrx_streams[];
5647 */
5648} wmi_vdev_create_cmd_fixed_param;
5649
5650typedef struct {
5651 /*
5652 * TLV tag and len; tag equals
5653 * WMITLV_TAG_STRUC_wmi_vdev_txrx_streams
5654 */
5655 A_UINT32 tlv_header;
5656 /* band - Should take values from wmi_channel_band_mask */
5657 A_UINT32 band;
5658 /* max supported tx streams per given band for this vdev */
5659 A_UINT32 supported_tx_streams;
5660 /* max supported rx streams per given band for this vdev */
5661 A_UINT32 supported_rx_streams;
5662} wmi_vdev_txrx_streams;
5663
5664/* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
5665typedef struct {
5666 A_UINT32 tlv_header;
5667 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
5668 A_UINT32 type_count;
5669 /** 255: continuous schedule, 0: reserved */
5670 A_UINT32 duration;
5671 /** Absent period duration in micro seconds */
5672 A_UINT32 interval;
5673 /** Absent period interval in micro seconds */
5674 A_UINT32 start_time;
5675 /** 32 bit tsf time when in starts */
5676} wmi_p2p_noa_descriptor;
5677
5678/** values for vdev_type */
5679#define WMI_VDEV_TYPE_AP 0x1
5680#define WMI_VDEV_TYPE_STA 0x2
5681#define WMI_VDEV_TYPE_IBSS 0x3
5682#define WMI_VDEV_TYPE_MONITOR 0x4
5683
5684/** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
5685 * by FW to execute the NAN specific WMI commands and also implement NAN specific
5686 * operations like Network discovery, service provisioning and service
5687 * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create
5688 * WMI command to create this VDEV once during initialization and host is not
5689 * expected to use any VDEV specific WMI commands on this VDEV.
5690 **/
5691#define WMI_VDEV_TYPE_NAN 0x5
5692
5693#define WMI_VDEV_TYPE_OCB 0x6
5694
Govind Singh941bd5e2016-02-04 17:15:25 +05305695/* NAN Data Interface */
5696#define WMI_VDEV_TYPE_NDI 0x7
5697
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005698/** values for vdev_subtype */
5699#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
5700#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
5701#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3
Govind Singh32cced32016-02-01 13:33:09 +05305702#define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA 0x4
5703#define WMI_UNIFIED_VDEV_SUBTYPE_MESH 0x5
Sandeep Puligilla62f7ca02016-03-24 15:48:33 -07005704/*
5705 * new subtype for 11S mesh is required as 11S functionality differs
5706 * in many ways from proprietary mesh
5707 * 11S uses 6-addr frame format and supports peering between mesh
5708 * stations and dynamic best path selection between mesh stations.
5709 * While in proprietary mesh, neighboring mesh station MAC is manually
5710 * added to AST table for traffic flow between mesh stations
5711 */
5712#define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S 0x6
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005713
5714/** values for vdev_start_request flags */
5715/** Indicates that AP VDEV uses hidden ssid. only valid for
5716 * AP/GO */
5717#define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0)
5718/** Indicates if robust management frame/management frame
5719 * protection is enabled. For GO/AP vdevs, it indicates that
5720 * it may support station/client associations with RMF enabled.
5721 * For STA/client vdevs, it indicates that sta will
5722 * associate with AP with RMF enabled. */
5723#define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1)
5724
5725/*
5726 * Host is sending bcn_tx_rate to override the beacon tx rates.
5727 */
5728#define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
5729
Himanshu Agarwal97005de2016-09-09 12:46:04 +05305730#define WMI_HEOPS_COLOR_GET(he_ops) WMI_GET_BITS(he_ops, 0, 6)
5731#define WMI_HEOPS_COLOR_SET(he_ops, value) WMI_SET_BITS(he_ops, 0, 6, value)
5732
5733#define WMI_HEOPS_DEFPE_GET(he_ops) WMI_GET_BITS(he_ops, 6, 3)
5734#define WMI_HEOPS_DEFPE_SET(he_ops, value) WMI_SET_BITS(he_ops, 6, 3, value)
5735
5736#define WMI_HEOPS_TWT_GET(he_ops) WMI_GET_BITS(he_ops, 9, 1)
5737#define WMI_HEOPS_TWT_SET(he_ops, value) WMI_SET_BITS(he_ops, 9, 1, value)
5738
5739#define WMI_HEOPS_RTSTHLD_GET(he_ops) WMI_GET_BITS(he_ops, 10, 7)
5740#define WMI_HEOPS_RTSTHLD_SET(he_ops, value) WMI_SET_BITS(he_ops, 10, 7, value)
5741
5742#define WMI_HEOPS_PDMIN_GET(he_ops) WMI_GET_BITS(he_ops, 17, 5)
5743#define WMI_HEOPS_PDMIN_SET(he_ops, value) WMI_SET_BITS(he_ops, 17, 5, value)
5744
5745#define WMI_HEOPS_PDMAX_GET(he_ops) WMI_GET_BITS(he_ops, 22, 5)
5746#define WMI_HEOPS_PDMAX_SET(he_ops, value) WMI_SET_BITS(he_ops, 22, 5, value)
5747
5748#define WMI_MAX_HECAP_PHY_SIZE (3)
5749#define WMI_HECAP_PHY_COD_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 0, 1)
5750#define WMI_HECAP_PHY_COD_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 0, 1, value)
5751
5752#define WMI_HECAP_PHY_TXLDPC_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 1)
5753#define WMI_HECAP_PHY_TXLDPC_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 1, value)
5754
5755#define WMI_HECAP_PHY_RXLDPC_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 2, 1)
5756#define WMI_HECAP_PHY_RXLDPC_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 2, 1, value)
5757
5758#define WMI_HECAP_PHY_DCM_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 3, 3)
5759#define WMI_HECAP_PHY_DCM_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 3, 3, value)
5760
5761#define WMI_HECAP_PHY_OLTF_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 6, 1)
5762#define WMI_HECAP_PHY_OLTF_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 6, 1, value)
5763
5764#define WMI_HECAP_PHY_CBW_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 7, 3)
5765#define WMI_HECAP_PHY_CBW_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 7, 3, value)
5766
5767#define WMI_HECAP_PHY_TXSTBC_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 10, 1)
5768#define WMI_HECAP_PHY_TXSTBC_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 10, 1, value)
5769
5770#define WMI_HECAP_PHY_RXSTBC_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 11, 1)
5771#define WMI_HECAP_PHY_RXSTBC_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 11, 1, value)
5772
5773#define WMI_HECAP_PHY_DLOFMAMUMIMO_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
5774#define WMI_HECAP_PHY_DLOFDMAMUMIO_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
5775
5776#define WMI_HECAP_PHY_UL_MU_MIMO_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
5777#define WMI_HECAP_PHY_UL_MU_MIMO_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
5778
5779#define WMI_HECAP_PHY_ULOFDMA_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
5780#define WMI_HECAP_PHY_ULOFDMA_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
5781
5782#define WMI_HECAP_PHY_TXDOPPLER_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 1)
5783#define WMI_HECAP_PHY_TXDOPPLER_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 1, value)
5784
5785#define WMI_HECAP_PHY_RXDOPPLER_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 16, 1)
5786#define WMI_HECAP_PHY_RXDOPPLER_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 16, 1, value)
5787
5788#define WMI_HECAP_PHY_CBMODE_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 8)
5789#define WMI_HECAP_PHY_CBMODE_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 8, value)
5790
5791#define WMI_HECAP_PHY_PADDING_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 25, 2)
5792#define WMI_HECAP_PHY_PADDING_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 25, 2, value)
5793
5794#define WMI_HECAP_PHY_32GI_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 26)
5795#define WMI_HECAP_PHY_32GI_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 26, value)
5796
5797#define WMI_HECAP_PHY_SUBFMR_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
5798#define WMI_HECAP_PHY_SUBFMR_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
5799
5800#define WMI_HECAP_PHY_SUBFME_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 1)
5801#define WMI_HECAP_PHY_SUBFME_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 1, value)
5802
5803#define WMI_HECAP_PHY_SUBFMESTS_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 28, 3)
5804#define WMI_HECAP_PHY_SUBFMESTS_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 28, 3, value)
5805
5806#define WMI_HECAP_PHY_NOSUNDIMENS_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 3)
5807#define WMI_HECAP_PHY_NOSUNDIMENS_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 3, value)
5808
5809#define WMI_HECAP_PHY_MUBFMR_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
5810#define WMI_HECAP_PHY_MUBFMR_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
5811
5812#define WMI_HECAP_PHY_40MHZNSS_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 18)
5813#define WMI_HECAP_PHY_40MHZNSS_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 18, value)
5814
5815#define WMI_HECAP_MAC_MTID_GET(he_cap) WMI_GET_BITS(he_cap, 0, 3)
5816#define WMI_HECAP_MAC_MTID_SET(he_cap, value) WMI_SET_BITS(he_cap, 0, 3, value)
5817
5818#define WMI_HECAP_MAC_AACK_GET(he_cap) WMI_GET_BITS(he_cap, 3, 1)
5819#define WMI_HECAP_MAC_AACK_SET(he_cap, value) WMI_SET_BITS(he_cap, 3, 1, value)
5820
5821#define WMI_HECAP_MAC_MINFRAGSZ_GET(he_cap) WMI_GET_BITS(he_cap, 4, 2)
5822#define WMI_HECAP_MAC_MINFRAGSZ_SET(he_cap, value) WMI_SET_BITS(he_cap, 4, 2, value)
5823
5824#define WMI_HECAP_MAC_HEFRAG_GET(he_cap) WMI_GET_BITS(he_cap, 6, 2)
5825#define WMI_HECAP_MAC_HEFRAG_SET(he_cap, value) WMI_SET_BITS(he_cap, 6, 2, value)
5826
5827#define WMI_HECAP_MAC_MURTS_GET(he_cap) WMI_GET_BITS(he_cap, 8, 1)
5828#define WMI_HECAP_MAC_MURTS_SET(he_cap, value) WMI_SET_BITS(he_cap, 8, 1, value)
5829
5830#define WMI_HECAP_MAC_OMI_GET(he_cap) WMI_GET_BITS(he_cap, 9, 1)
5831#define WMI_HECAP_MAC_OMI_SET(he_cap, value) WMI_SET_BITS(he_cap, 9, 1, value)
5832
5833#define WMI_HECAP_MAC_HECTRL_GET(he_cap) WMI_GET_BITS(he_cap, 10, 1)
5834#define WMI_HECAP_MAC_HECTRL_SET(he_cap, value) WMI_SET_BITS(he_cap, 10, 1, value)
5835
5836#define WMI_HECAP_MAC_MBAHECTRL_GET(he_cap) WMI_GET_BITS(he_cap, 11, 1)
5837#define WMI_HECAP_MAC_MBAHECTRL_SET(he_cap, value) WMI_SET_BITS(he_cap, 11, 1, value)
5838
5839#define WMI_HECAP_MAC_ULMURSP_GET(he_cap) WMI_GET_BITS(he_cap, 12, 1)
5840#define WMI_HECAP_MAC_ULMURSP_SET(he_cap, value) WMI_SET_BITS(he_cap, 12, 1, value)
5841
5842#define WMI_HECAP_MAC_HELKAD_GET(he_cap) WMI_GET_BITS(he_cap, 13, 2)
5843#define WMI_HECAP_MAC_HELKAD_SET(he_cap, value) WMI_SET_BITS(he_cap, 13, 2, value)
5844
5845#define WMI_HECAP_MAC_BSR_GET(he_cap) WMI_GET_BITS(he_cap, 15, 1)
5846#define WMI_HECAP_MAC_BSR_SET(he_cap, value) WMI_SET_BITS(he_cap, 15, 1, value)
5847
5848#define WMI_HECAP_MAC_TWTREQ_GET(he_cap) WMI_GET_BITS(he_cap, 16, 1)
5849#define WMI_HECAP_MAC_TWTREQ_SET(he_cap, value) WMI_SET_BITS(he_cap, 16, 1, value)
5850
5851#define WMI_HECAP_MAC_TWTRSP_GET(he_cap) WMI_GET_BITS(he_cap, 17, 1)
5852#define WMI_HECAP_MAC_TWTRSP_SET(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
5853
5854#define WMI_HECAP_MAC_BCSTTWT_GET(he_cap) WMI_GET_BITS(he_cap, 18, 1)
5855#define WMI_HECAP_MAC_BCSTTWT_SET(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
5856
5857#define WMI_HECAP_MAC_MBSS_GET(he_cap) WMI_GET_BITS(he_cap, 19, 1)
5858#define WMI_HECAP_MAC_MBSS_SET(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
5859
5860#define WMI_HECAP_MAC_TRIGPADDUR_GET(he_cap) WMI_GET_BITS(he_cap, 20, 2)
5861#define WMI_HECAP_MAC_TRIGPADDUR_SET(he_cap, value) WMI_SET_BITS(he_cap, 20, 2, value)
5862
5863#define WMI_HECAP_MAC_MAXFRAGMSDU_GET(he_cap) WMI_GET_BITS(he_cap, 22, 3)
5864#define WMI_HECAP_MAC_MAXFRAGMSDU_SET(he_cap, value) WMI_SET_BITS(he_cap, 22, 3, value)
5865
5866#define WMI_HECAP_MAC_32BITBA_GET(he_cap) WMI_GET_BITS(he_cap, 25, 1)
5867#define WMI_HECAP_MAC_32BITBA_SET(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
5868
5869#define WMI_HECAP_MAC_MUCASCADE_GET(he_cap) WMI_GET_BITS(he_cap, 26, 1)
5870#define WMI_HECAP_MAC_MUCASCADE_SET(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
5871
5872#define WMI_HECAP_MAC_ACKMTIDAMPDU_GET(he_cap) WMI_GET_BITS(he_cap, 27, 1)
5873#define WMI_HECAP_MAC_ACKMTIDAMPDU_SET(he_cap, value) WMI_SET_BITS(he_cap, 27, 1, value)
5874
5875#define WMI_HECAP_MAC_GROUPMSTABA_GET(he_cap) WMI_GET_BITS(he_cap, 28, 1)
5876#define WMI_HECAP_MAC_GROUPMSTABA_SET(he_cap, value) WMI_SET_BITS(he_cap, 28, 1, value)
5877
5878#define WMI_HECAP_MAC_OFDMARA_GET(he_cap) WMI_GET_BITS(he_cap, 29, 1)
5879#define WMI_HECAP_MAC_OFDMARA_SET(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
5880
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005881typedef struct {
5882 A_UINT32 tlv_header;
5883 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
5884 /** unique id identifying the VDEV, generated by the caller */
5885 A_UINT32 vdev_id;
5886 /** requestor id identifying the caller module */
5887 A_UINT32 requestor_id;
5888 /** beacon interval from received beacon */
5889 A_UINT32 beacon_interval;
5890 /** DTIM Period from the received beacon */
5891 A_UINT32 dtim_period;
5892 /** Flags */
5893 A_UINT32 flags;
5894 /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
5895 wmi_ssid ssid;
5896 /** beacon/probe reponse xmit rate. Applicable for SoftAP. */
5897 /** This field will be invalid and ignored unless the */
5898 /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
5899 /** When valid, this field contains the fixed tx rate for the beacon */
5900 /** and probe response frames send by the GO or SoftAP */
5901 A_UINT32 bcn_tx_rate;
5902 /** beacon/probe reponse xmit power. Applicable for SoftAP. */
5903 A_UINT32 bcn_txPower;
5904 /** number of p2p NOA descriptor(s) from scan entry */
5905 A_UINT32 num_noa_descriptors;
5906 /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
5907 During CAC, Our HW shouldn't ack ditected frames */
5908 A_UINT32 disable_hw_ack;
5909 /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
5910 /** The DBS policy manager indicates the preferred number of transmit streams. */
5911 A_UINT32 preferred_tx_streams;
5912 /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
5913 /** the DBS policy manager indicates the preferred number of receive streams. */
5914 A_UINT32 preferred_rx_streams;
Himanshu Agarwal97005de2016-09-09 12:46:04 +05305915 A_UINT32 he_ops; /* refer to WMI_HEOPS_xxx macros */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005916 /* The TLVs follows this structure:
5917 * wmi_channel chan; //WMI channel
5918 * wmi_p2p_noa_descriptor noa_descriptors[]; //actual p2p NOA descriptor from scan entry
5919 */
5920} wmi_vdev_start_request_cmd_fixed_param;
5921
5922typedef struct {
5923 A_UINT32 tlv_header;
5924 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
5925 /** unique id identifying the VDEV, generated by the caller */
5926 A_UINT32 vdev_id;
5927} wmi_vdev_delete_cmd_fixed_param;
5928
5929typedef struct {
5930 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
5931 /** unique id identifying the VDEV, generated by the caller */
5932 A_UINT32 vdev_id;
5933 /** aid (assoc id) received in association response for STA VDEV */
5934 A_UINT32 vdev_assoc_id;
5935 /** bssid of the BSS the VDEV is joining */
5936 wmi_mac_addr vdev_bssid;
5937} wmi_vdev_up_cmd_fixed_param;
5938
5939typedef struct {
5940 A_UINT32 tlv_header;
5941 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
5942 /** unique id identifying the VDEV, generated by the caller */
5943 A_UINT32 vdev_id;
5944} wmi_vdev_stop_cmd_fixed_param;
5945
5946typedef struct {
5947 A_UINT32 tlv_header;
5948 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
5949 /** unique id identifying the VDEV, generated by the caller */
5950 A_UINT32 vdev_id;
5951} wmi_vdev_down_cmd_fixed_param;
5952
5953typedef struct {
5954 /** unique id identifying the VDEV, generated by the caller */
5955 A_UINT32 vdev_id;
5956} wmi_vdev_standby_response_cmd;
5957
5958typedef struct {
5959 /** unique id identifying the VDEV, generated by the caller */
5960 A_UINT32 vdev_id;
5961} wmi_vdev_resume_response_cmd;
5962
5963typedef struct {
5964 A_UINT32 tlv_header;
5965 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
5966 /** unique id identifying the VDEV, generated by the caller */
5967 A_UINT32 vdev_id;
5968 /** parameter id */
5969 A_UINT32 param_id;
5970 /** parameter value */
5971 A_UINT32 param_value;
5972} wmi_vdev_set_param_cmd_fixed_param;
5973
5974typedef struct {
5975 A_UINT32 key_seq_counter_l;
5976 A_UINT32 key_seq_counter_h;
5977} wmi_key_seq_counter;
5978
5979#define WMI_CIPHER_NONE 0x0 /* clear key */
5980#define WMI_CIPHER_WEP 0x1
5981#define WMI_CIPHER_TKIP 0x2
5982#define WMI_CIPHER_AES_OCB 0x3
5983#define WMI_CIPHER_AES_CCM 0x4
5984#define WMI_CIPHER_WAPI 0x5
5985#define WMI_CIPHER_CKIP 0x6
5986#define WMI_CIPHER_AES_CMAC 0x7
5987#define WMI_CIPHER_ANY 0x8
Govind Singh869c9872016-02-22 18:36:34 +05305988#define WMI_CIPHER_AES_GCM 0x9
5989#define WMI_CIPHER_AES_GMAC 0xa
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005990
5991typedef struct {
5992 A_UINT32 tlv_header;
5993 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
5994 /** unique id identifying the VDEV, generated by the caller */
5995 A_UINT32 vdev_id;
5996 /** MAC address used for installing */
5997 wmi_mac_addr peer_macaddr;
5998 /** key index */
5999 A_UINT32 key_ix;
6000 /** key flags */
6001 A_UINT32 key_flags;
6002 /** key cipher, defined above */
6003 A_UINT32 key_cipher;
6004 /** key rsc counter */
6005 wmi_key_seq_counter key_rsc_counter;
6006 /** global key rsc counter */
6007 wmi_key_seq_counter key_global_rsc_counter;
6008 /** global key tsc counter */
6009 wmi_key_seq_counter key_tsc_counter;
6010 /** WAPI key rsc counter */
6011 A_UINT8 wpi_key_rsc_counter[16];
6012 /** WAPI key tsc counter */
6013 A_UINT8 wpi_key_tsc_counter[16];
6014 /** key length */
6015 A_UINT32 key_len;
6016 /** key tx mic length */
6017 A_UINT32 key_txmic_len;
6018 /** key rx mic length */
6019 A_UINT32 key_rxmic_len;
6020 /*
6021 * Following this struct are this TLV.
6022 * // actual key data
6023 * A_UINT8 key_data[]; // contains key followed by tx mic followed by rx mic
6024 */
6025} wmi_vdev_install_key_cmd_fixed_param;
6026
6027/** Preamble types to be used with VDEV fixed rate configuration */
6028typedef enum {
6029 WMI_RATE_PREAMBLE_OFDM,
6030 WMI_RATE_PREAMBLE_CCK,
6031 WMI_RATE_PREAMBLE_HT,
6032 WMI_RATE_PREAMBLE_VHT,
6033} WMI_RATE_PREAMBLE;
6034
6035/** Value to disable fixed rate setting */
6036#define WMI_FIXED_RATE_NONE (0xff)
6037
6038/** the definition of different VDEV parameters */
6039typedef enum {
6040 /** RTS Threshold */
6041 WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
6042 /** Fragmentation threshold */
6043 WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
6044 /** beacon interval in TUs */
6045 WMI_VDEV_PARAM_BEACON_INTERVAL,
6046 /** Listen interval in TUs */
6047 WMI_VDEV_PARAM_LISTEN_INTERVAL,
6048 /** muticast rate in Mbps */
6049 WMI_VDEV_PARAM_MULTICAST_RATE,
6050 /** management frame rate in Mbps */
6051 WMI_VDEV_PARAM_MGMT_TX_RATE,
6052 /** slot time (long vs short) */
6053 WMI_VDEV_PARAM_SLOT_TIME,
6054 /** preamble (long vs short) */
6055 WMI_VDEV_PARAM_PREAMBLE,
6056 /** SWBA time (time before tbtt in msec) */
6057 WMI_VDEV_PARAM_SWBA_TIME,
6058 /** time period for updating VDEV stats */
6059 WMI_VDEV_STATS_UPDATE_PERIOD,
6060 /** age out time in msec for frames queued for station in power save*/
6061 WMI_VDEV_PWRSAVE_AGEOUT_TIME,
6062 /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
6063 WMI_VDEV_HOST_SWBA_INTERVAL,
6064 /** DTIM period (specified in units of num beacon intervals) */
6065 WMI_VDEV_PARAM_DTIM_PERIOD,
6066 /** scheduler air time limit for this VDEV. used by off chan scheduler */
6067 WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
6068 /** enable/dsiable WDS for this VDEV */
6069 WMI_VDEV_PARAM_WDS,
6070 /** ATIM Window */
6071 WMI_VDEV_PARAM_ATIM_WINDOW,
6072 /** BMISS max */
6073 WMI_VDEV_PARAM_BMISS_COUNT_MAX,
6074 /** BMISS first time */
6075 WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
6076 /** BMISS final time */
6077 WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
6078 /** WMM enables/disabled */
6079 WMI_VDEV_PARAM_FEATURE_WMM,
6080 /** Channel width */
6081 WMI_VDEV_PARAM_CHWIDTH,
6082 /** Channel Offset */
6083 WMI_VDEV_PARAM_CHEXTOFFSET,
6084 /** Disable HT Protection */
6085 WMI_VDEV_PARAM_DISABLE_HTPROTECTION,
6086 /** Quick STA Kickout */
6087 WMI_VDEV_PARAM_STA_QUICKKICKOUT,
6088 /** Rate to be used with Management frames */
6089 WMI_VDEV_PARAM_MGMT_RATE,
6090 /** Protection Mode */
6091 WMI_VDEV_PARAM_PROTECTION_MODE,
6092 /** Fixed rate setting */
6093 WMI_VDEV_PARAM_FIXED_RATE,
6094 /** Short GI Enable/Disable */
6095 WMI_VDEV_PARAM_SGI,
6096 /** Enable LDPC */
6097 WMI_VDEV_PARAM_LDPC,
6098 /** Enable Tx STBC */
6099 WMI_VDEV_PARAM_TX_STBC,
6100 /** Enable Rx STBC */
6101 WMI_VDEV_PARAM_RX_STBC,
6102 /** Intra BSS forwarding */
6103 WMI_VDEV_PARAM_INTRA_BSS_FWD,
6104 /** Setting Default xmit key for Vdev */
6105 WMI_VDEV_PARAM_DEF_KEYID,
6106 /** NSS width */
6107 WMI_VDEV_PARAM_NSS,
6108 /** Set the custom rate for the broadcast data frames */
6109 WMI_VDEV_PARAM_BCAST_DATA_RATE,
6110 /** Set the custom rate (rate-code) for multicast data frames */
6111 WMI_VDEV_PARAM_MCAST_DATA_RATE,
6112 /** Tx multicast packet indicate Enable/Disable */
6113 WMI_VDEV_PARAM_MCAST_INDICATE,
6114 /** Tx DHCP packet indicate Enable/Disable */
6115 WMI_VDEV_PARAM_DHCP_INDICATE,
6116 /** Enable host inspection of Tx unicast packet to unknown destination */
6117 WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
6118
6119 /* The minimum amount of time AP begins to consider STA inactive */
6120 WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
6121
6122 /* An associated STA is considered inactive when there is no recent TX/RX
6123 * activity and no downlink frames are buffered for it. Once a STA exceeds
6124 * the maximum idle inactive time, the AP will send an 802.11 data-null as
6125 * a keep alive to verify the STA is still associated. If the STA does ACK
6126 * the data-null, or if the data-null is buffered and the STA does not
6127 * retrieve it, the STA will be considered unresponsive (see
6128 * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
6129 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
6130
6131 /* An associated STA is considered unresponsive if there is no recent
6132 * TX/RX activity and downlink frames are buffered for it. Once a STA
6133 * exceeds the maximum unresponsive time, the AP will send a
6134 * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
6135 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
6136
6137 /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
6138 WMI_VDEV_PARAM_AP_ENABLE_NAWDS,
6139 /** Enable/Disable RTS-CTS */
6140 WMI_VDEV_PARAM_ENABLE_RTSCTS,
6141 /* Enable TXBFee/er */
6142 WMI_VDEV_PARAM_TXBF,
6143
6144 /**Set packet power save */
6145 WMI_VDEV_PARAM_PACKET_POWERSAVE,
6146
6147 /**Drops un-encrypted packets if any received in an encryted connection
6148 * otherwise forwards to host
6149 */
6150 WMI_VDEV_PARAM_DROP_UNENCRY,
6151
6152 /*
6153 * Set TX encap type.
6154 *
6155 * enum wmi_pkt_type is to be used as the parameter
6156 * specifying the encap type.
6157 */
6158 WMI_VDEV_PARAM_TX_ENCAP_TYPE,
6159
6160 /*
6161 * Try to detect stations that woke-up and exited power save but did not
6162 * successfully transmit data-null with PM=0 to AP. When this happens,
6163 * STA and AP power save state are out-of-sync. Use buffered but
6164 * undelivered MSDU to the STA as a hint that the STA is really awake
6165 * and expecting normal ASAP delivery, rather than retrieving BU with
6166 * PS-Poll, U-APSD trigger, etc.
6167 *
6168 * 0 disables out-of-sync detection. Maximum time is 255 seconds.
6169 */
6170 WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,
6171
6172 /* Enable/Disable early rx dynamic adjust feature.
6173 * Early-rx dynamic adjust is a advance power save feature.
6174 * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
6175 * timing discrepancies in the system.
6176 * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
6177 * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
6178 * properly to minimum the power consume.*/
6179 WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE,
6180
6181 /* set target bmiss number per sample cycle if bmiss adjust was chosen.
6182 * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
6183 * which can be set by user through WMI command.
6184 */
6185 WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM,
6186
6187 /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
6188 WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE,
6189
6190 /* set slop_step */
6191 WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP,
6192
6193 /* set init slop */
6194 WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP,
6195
6196 /* pause adjust enable/disable */
6197 WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE,
6198
6199 /* Set channel pwr limit value of the vdev the minimal value of all
6200 * vdevs operating on this channel will be set as channel tx power
6201 * limit, which is used to configure ratearray
6202 */
6203 WMI_VDEV_PARAM_TX_PWRLIMIT,
6204
6205 /* set the count of snr value for calculation in snr monitor */
6206 WMI_VDEV_PARAM_SNR_NUM_FOR_CAL,
6207
6208 /** Roaming offload */
6209 WMI_VDEV_PARAM_ROAM_FW_OFFLOAD,
6210
6211 /** Enable Leader request RX functionality for RMC */
6212 WMI_VDEV_PARAM_ENABLE_RMC,
6213
6214 /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
6215 * by himself. If the beacon lost time exceed this threshold, the peer is
6216 * thought to be gone. */
6217 WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS,
6218
6219 /** max rate in kpbs, transmit rate can't go beyond it */
6220 WMI_VDEV_PARAM_MAX_RATE,
6221
6222 /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift */
6223 WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE,
6224 /* set Tx failure count threshold for the vdev */
6225 WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR,
6226
6227 /* set ebt resync timeout value, in the unit of TU */
6228 WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT,
6229
6230 /* Enable Aggregation State Trigger Event */
6231 WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE,
6232
6233 /* This parameter indicates whether IBSS station can enter into power save
6234 * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
6235 * awake all the time and should never set PM=1 in its transmitted frames.
6236 * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
6237 * is non-zero. */
6238 WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED,
6239
6240 /* This parameter indicates if this station can enter into power collapse
6241 * for the remaining beacon interval after the ATIM window.
6242 * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
6243 * is set to true. */
6244 WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED,
6245
6246 /* This parameter indicates whether IBSS station exit power save mode and
6247 * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
6248 * whenever there is a TX/RX activity. */
6249 WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED,
6250
6251 /* If Awake on TX/RX activity is enabled, this parameter indicates
6252 * the data inactivity time in number of beacon intervals after which
6253 * IBSS station reenters power save by sending Null frame with PM=1. */
6254 WMI_VDEV_PARAM_INACTIVITY_CNT,
6255
6256 /* Inactivity time in msec after which TX Service Period (SP) is
6257 * terminated by sending a Qos Null frame with EOSP.
6258 * If value is 0, TX SP is terminated with the last buffered packet itself
6259 * instead of waiting for the inactivity timeout. */
6260 WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS,
6261
6262 /** DTIM policy */
6263 WMI_VDEV_PARAM_DTIM_POLICY,
6264
6265 /* When IBSS network is initialized, PS-supporting device
6266 * does not enter protocol sleep state during first
6267 * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
6268 WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS,
6269
6270 /* Enable/Disable 1 RX chain usage during the ATIM window */
6271 WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE,
6272 /**
6273 * RX Leak window is the time driver waits before shutting down
6274 * the radio or switching the channel and after receiving an ACK
6275 * for a data frame with PM bit set)
6276 */
6277 WMI_VDEV_PARAM_RX_LEAK_WINDOW,
6278
6279 /**
6280 * Averaging factor(16 bit value) is used in the calculations to
6281 * perform averaging of different link level statistics like average
6282 * beacon spread or average number of frames leaked
6283 */
6284 WMI_VDEV_PARAM_STATS_AVG_FACTOR,
6285 /*
6286 * disconnect threshold, once the consecutive error for specific peer
6287 * exceed this threhold, FW will send kickout event to host
6288 */
6289 WMI_VDEV_PARAM_DISCONNECT_TH,
6290 /*
6291 * The rate_code of RTS_CTS changed by host. Now FW can support
6292 * more non-HT rates rather than 1Mbps or 6Mbps */
6293 WMI_VDEV_PARAM_RTSCTS_RATE,
6294
6295 /** This parameter indicates whether using a long duration RTS-CTS
6296 * protection when a SAP goes off channel in MCC mode */
6297 WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE,
6298
6299 /*
6300 * This parameter indicates whether using a broadcast probe response
6301 * to increase the detectability of SAP in MCC mode
6302 */
6303 WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE,
Nirav Shah47062ff2015-11-05 11:21:08 +05306304
6305 /* This parameter indicates the power backoff in percentage
6306 * currently supports 100%, 50%, 25%, 12.5%, and minimum
6307 * Host passes 0, 1, 2, 3, 4 to Firmware
6308 * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
6309 * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
6310 */
6311 WMI_VDEV_PARAM_TXPOWER_SCALE,
6312
6313 /* TX power backoff in dB: tx power -= param value
6314 * Host passes values(DB) to Halphy, Halphy reduces the power table
6315 * by the values. Safety check will happen in Halphy.
6316 */
6317 WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB,
Govind Singh32cced32016-02-01 13:33:09 +05306318 /** Multicast to Unicast conversion setting */
6319 WMI_VDEV_PARAM_MCAST2UCAST_SET,
6320
6321 /** Total number of HW retries */
6322 WMI_VDEV_PARAM_RC_NUM_RETRIES,
6323
6324 /** Max tx percentage for cabq */
6325 WMI_VDEV_PARAM_CABQ_MAXDUR,
6326
6327 /** MFPTEST settings */
6328 WMI_VDEV_PARAM_MFPTEST_SET,
6329
6330 /** RTS Fixed rate setting */
6331 WMI_VDEV_PARAM_RTS_FIXED_RATE,
6332
6333 /** VHT SGI MASK */
6334 WMI_VDEV_PARAM_VHT_SGIMASK,
6335
6336 /** VHT80 Auto Rate MASK */
6337 WMI_VDEV_PARAM_VHT80_RATEMASK,
6338
6339 /** set Proxy STA features for this vap */
6340 WMI_VDEV_PARAM_PROXY_STA,
6341
6342 /** set virtual cell mode - enable/disable */
6343 WMI_VDEV_PARAM_VIRTUAL_CELL_MODE,
6344
6345 /** Set receive packet type */
6346 WMI_VDEV_PARAM_RX_DECAP_TYPE,
6347
6348 /** Set ratemask with specific Bandwidth and NSS */
6349 WMI_VDEV_PARAM_BW_NSS_RATEMASK,
6350
6351 /** Set SENSOR Support */
6352 WMI_VDEV_PARAM_SENSOR_AP,
6353
6354 /** Set beacon rate */
6355 WMI_VDEV_PARAM_BEACON_RATE,
6356
6357 /** Enable CTS to self for DTIM beacon */
6358 WMI_VDEV_PARAM_DTIM_ENABLE_CTS,
6359
6360 /** Disable station kickout at Vap level */
6361 WMI_VDEV_PARAM_STA_KICKOUT,
Nirav Shah47062ff2015-11-05 11:21:08 +05306362
Govind Singh869c9872016-02-22 18:36:34 +05306363 /* VDEV capabilities */
6364 WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */
Sandeep Puligilla62f7ca02016-03-24 15:48:33 -07006365 /*
6366 * Increment TSF in micro seconds to avoid beacon collision on mesh VAP
6367 * The host must ensure that either no other vdevs share the TSF with
6368 * this vdev, or else that it is acceptable to apply this TSF adjustment
6369 * to all vdevs sharing the TSF
6370 */
6371 WMI_VDEV_PARAM_TSF_INCREMENT,
Himanshu Agarwalb953a262016-06-03 10:48:23 +05306372 WMI_VDEV_PARAM_PLACE_HOLDER_1,
Himanshu Agarwala1438152016-05-13 21:40:19 +05306373
6374 /*
6375 * Vdev level rx filter of from-ds / to-ds / no-ds / ta / ra frames.
6376 * Used mainly for mesh-vap.
6377 * The parameter value delivered with the RX_FILTER vdev param contains
6378 * a bit-or mask of wmi_vdev_param_filter enum values.
6379 */
6380 WMI_VDEV_PARAM_RX_FILTER,
Himanshu Agarwale93c55e2016-05-20 12:18:15 +05306381 /* vdev-specific mgmt tx power in dBm units (signed integer value) */
6382 WMI_VDEV_PARAM_MGMT_TX_POWER,
Himanshu Agarwal2690e462016-06-03 14:26:01 +05306383
6384 /*
Himanshu Agarwal5e9ed452016-06-08 15:09:16 +05306385 * Vdev level non aggregration/11g sw retry threshold.
6386 * 0-disable, min:0, max:31, default:15
6387 */
6388 WMI_VDEV_PARAM_NON_AGG_SW_RETRY_TH,
6389 /*
6390 * Vdev level aggregration sw retry threshold.
6391 * 0-disable, min:0, max:31, default:15
6392 */
6393 WMI_VDEV_PARAM_AGG_SW_RETRY_TH,
6394
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +05306395 /** disable dynamic bw RTS **/
6396 WMI_VDEV_PARAM_DISABLE_DYN_BW_RTS,
6397
Himanshu Agarwal5e9ed452016-06-08 15:09:16 +05306398 /*
Nitesh Shah0f933b82016-07-20 16:05:03 +05306399 * Per ssid (vdev) based ATF strict/fair scheduling policy
6400 * Param values are WMI_ATF_SSID_FAIR_SCHED or
6401 * WMI_ATF_SSID_STRICT_SCHED
6402 */
6403 WMI_VDEV_PARAM_ATF_SSID_SCHED_POLICY,
6404
6405 /*
Himanshu Agarwal2690e462016-06-03 14:26:01 +05306406 * === ADD NEW VDEV PARAM TYPES ABOVE THIS LINE ===
6407 * The below vdev param types are used for prototyping, and are
6408 * prone to change.
6409 */
6410 WMI_VDEV_PARAM_PROTOTYPE = 0x8000,
6411 /* 11AX SPECIFIC defines */
6412 WMI_VDEV_PARAM_BSS_COLOR,
Himanshu Agarwal2690e462016-06-03 14:26:01 +05306413 /*
Himanshu Agarwal97005de2016-09-09 12:46:04 +05306414 * Enable / disable trigger access for a AP vdev's peers.
Himanshu Agarwal2690e462016-06-03 14:26:01 +05306415 * For a STA mode vdev this will enable/disable triggered access
6416 * and enable/disable Multi User mode of operation.
Himanshu Agarwal97005de2016-09-09 12:46:04 +05306417 * 0 - Disable MU OFDMA and MU MIMO
6418 * 1 - Disable DL OFDMA
6419 * 2 - Disable DL MUMIMO
6420 * 3 - Disable UL OFDMA
6421 * 4 - Disable UL MUMIMO
6422 * 5 - Enable MU OFDMA and MU MIMO
6423 * 6 - Enable DL OFDMA
6424 * 7 - Enable DL MUMIMO
6425 * 8 - Enable UL OFDMA
6426 * 9 - Enable UL MUMIMO
Himanshu Agarwal2690e462016-06-03 14:26:01 +05306427 */
6428 WMI_VDEV_PARAM_SET_HEMU_MODE,
6429 /*
6430 * For Tx OFDMA this will set values of CP length or guard interval
6431 * to be
6432 * 0: Auto
6433 * 1: 0.8 us
6434 * 2: 1.6 us
6435 * 3: 3.2 us
6436 * Similar to Guard Interval
6437 */
6438 WMI_VDEV_PARAM_TX_OFDMA_CPLEN,
6439 /*=== END VDEV_PARAM_PROTOTYPE SECTION ===*/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006440} WMI_VDEV_PARAM;
6441
Govind Singh869c9872016-02-22 18:36:34 +05306442/* vdev capabilities bit mask */
Himanshu Agarwal800d58d2016-05-13 21:22:19 +05306443#define WMI_VDEV_BEACON_SUPPORT 0x1
Govind Singh869c9872016-02-22 18:36:34 +05306444#define WMI_VDEV_WDS_LRN_ENABLED 0x2
Himanshu Agarwal800d58d2016-05-13 21:22:19 +05306445#define WMI_VDEV_VOW_ENABLED 0x4
6446
Govind Singh869c9872016-02-22 18:36:34 +05306447#define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT)
6448#define WMI_VDEV_IS_WDS_LRN_ENABLED(param) ((param) & WMI_VDEV_WDS_LRN_ENABLED)
Himanshu Agarwal800d58d2016-05-13 21:22:19 +05306449#define WMI_VDEV_IS_VOW_ENABLED(param) ((param) & WMI_VDEV_VOW_ENABLED)
Govind Singh869c9872016-02-22 18:36:34 +05306450
6451/* TXBF capabilities masks */
6452#define WMI_TXBF_CONF_SU_TX_BFEE_S 0
6453#define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1
6454#define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << \
6455 WMI_TXBF_CONF_SU_TX_BFEE_S)
6456#define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_SU_TX_BFEE)
6457#define WMI_TXBF_CONF_SU_TX_BFEE_SET(x, z) WMI_F_RMW(x, z,\
6458 WMI_TXBF_CONF_SU_TX_BFEE)
6459
6460#define WMI_TXBF_CONF_MU_TX_BFEE_S 1
6461#define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1
6462#define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << \
6463 WMI_TXBF_CONF_MU_TX_BFEE_S)
6464#define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_MU_TX_BFEE)
6465#define WMI_TXBF_CONF_MU_TX_BFEE_SET(x, z) WMI_F_RMW(x, z, \
6466 WMI_TXBF_CONF_MU_TX_BFEE)
6467
6468#define WMI_TXBF_CONF_SU_TX_BFER_S 2
6469#define WMI_TXBF_CONF_SU_TX_BFER_M 0x1
6470#define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << \
6471 WMI_TXBF_CONF_SU_TX_BFER_S)
6472#define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_SU_TX_BFER)
6473#define WMI_TXBF_CONF_SU_TX_BFER_SET(x, z) WMI_F_RMW(x, z, \
6474 WMI_TXBF_CONF_SU_TX_BFER)
6475
6476#define WMI_TXBF_CONF_MU_TX_BFER_S 3
6477#define WMI_TXBF_CONF_MU_TX_BFER_M 0x1
6478#define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << \
6479 WMI_TXBF_CONF_MU_TX_BFER_S)
6480#define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_MU_TX_BFER)
6481#define WMI_TXBF_CONF_MU_TX_BFER_SET(x, z) WMI_F_RMW(x, z, \
6482 WMI_TXBF_CONF_MU_TX_BFER)
6483
6484#define WMI_TXBF_CONF_STS_CAP_S 4
6485#define WMI_TXBF_CONF_STS_CAP_M 0x7
6486#define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << \
6487 WMI_TXBF_CONF_STS_CAP_S)
6488#define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_STS_CAP);
6489#define WMI_TXBF_CONF_STS_CAP_SET(x, z) WMI_F_RMW(x, z, \
6490 WMI_TXBF_CONF_STS_CAP)
6491
6492#define WMI_TXBF_CONF_IMPLICIT_BF_S 7
6493#define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1
6494#define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << \
6495 WMI_TXBF_CONF_IMPLICIT_BF_S)
6496#define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_IMPLICIT_BF)
6497#define WMI_TXBF_CONF_IMPLICIT_BF_SET(x, z) WMI_F_RMW(x, z, \
6498 WMI_TXBF_CONF_IMPLICIT_BF)
6499
6500#define WMI_TXBF_CONF_BF_SND_DIM_S 8
6501#define WMI_TXBF_CONF_BF_SND_DIM_M 0x7
6502#define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << \
6503 WMI_TXBF_CONF_BF_SND_DIM_S)
6504#define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_BF_SND_DIM)
6505#define WMI_TXBF_CONF_BF_SND_DIM_SET(x, z) WMI_F_RMW(x, z, \
6506 WMI_TXBF_CONF_BF_SND_DIM)
6507
6508/* TXBF capabilities */
6509typedef struct {
6510 A_UINT32 txbf_cap;
6511} wmi_vdev_txbf_cap;
6512
Himanshu Agarwala1438152016-05-13 21:40:19 +05306513/* vdev rx filters (for mesh) */
6514typedef enum {
6515 /* Don't drop any frames - Default */
6516 WMI_VDEV_RX_ALLOW_ALL_FRAMES = 0x0,
6517 /* Drop FromDS frames */
6518 WMI_VDEV_RX_FILTER_OUT_FROMDS = 0x1,
6519 /* Drop ToDS frames */
6520 WMI_VDEV_RX_FILTER_OUT_TODS = 0x2,
6521 /* Drop NODS frames */
6522 WMI_VDEV_RX_FILTER_OUT_NODS = 0x4,
6523 /* Drop RA frames */
6524 WMI_VDEV_RX_FILTER_OUT_RA = 0x8,
6525 /* Drop TA frames */
6526 WMI_VDEV_RX_FILTER_OUT_TA = 0x10,
6527} wmi_vdev_param_filter;
6528
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006529/* Length of ATIM Window in TU */
6530#define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
6531
6532enum wmi_pkt_type {
6533 WMI_PKT_TYPE_RAW = 0,
6534 WMI_PKT_TYPE_NATIVE_WIFI = 1,
6535 WMI_PKT_TYPE_ETHERNET = 2,
6536};
6537
Govind Singh869c9872016-02-22 18:36:34 +05306538/*******************************************************************
6539 * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap
6540 * Do not use it!
6541 *******************************************************************/
6542
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006543typedef struct {
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306544 A_UINT8 sutxbfee:1, mutxbfee:1, sutxbfer:1, mutxbfer:1,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006545#if defined(AR900B)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306546 txb_sts_cap:3, implicit_bf:1;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006547#else
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306548 reserved:4;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006549#endif
6550} wmi_vdev_txbf_en;
6551
6552/** Upto 8 bits are available for Roaming module to be sent along with
6553 WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
6554/* Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
6555#define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1
6556/* Enable Roaming module in FW to do scan based on Final BMISS */
6557#define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2
6558
6559/** slot time long */
6560#define WMI_VDEV_SLOT_TIME_LONG 0x1
6561/** slot time short */
6562#define WMI_VDEV_SLOT_TIME_SHORT 0x2
6563/** preablbe long */
6564#define WMI_VDEV_PREAMBLE_LONG 0x1
6565/** preablbe short */
6566#define WMI_VDEV_PREAMBLE_SHORT 0x2
6567
6568/** the definition of different START/RESTART Event response */
6569typedef enum {
6570 /* Event respose of START CMD */
6571 WMI_VDEV_START_RESP_EVENT = 0,
6572 /* Event respose of RESTART CMD */
6573 WMI_VDEV_RESTART_RESP_EVENT,
6574} WMI_START_EVENT_PARAM;
6575
6576typedef struct {
6577 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */
6578 /** unique id identifying the VDEV, generated by the caller */
6579 A_UINT32 vdev_id;
6580 /** requestor id that requested the VDEV start request */
6581 A_UINT32 requestor_id;
6582 /* Respose of Event type START/RESTART */
6583 WMI_START_EVENT_PARAM resp_type;
6584 /** status of the response */
6585 A_UINT32 status;
6586 /** Vdev chain mask */
6587 A_UINT32 chain_mask;
6588 /** Vdev mimo power save mode */
6589 A_UINT32 smps_mode;
Govind Singh869c9872016-02-22 18:36:34 +05306590 union {
6591 /* OBSOLETE - will be removed once all refs are gone */
6592 A_UINT32 mac_id;
6593 /** pdev_id for identifying the MAC
6594 * See macros starting with WMI_PDEV_ID_ for values.
6595 */
6596 A_UINT32 pdev_id;
6597 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006598 /** Configured Transmit Streams **/
6599 A_UINT32 cfgd_tx_streams;
6600 /** Configured Receive Streams **/
6601 A_UINT32 cfgd_rx_streams;
6602} wmi_vdev_start_response_event_fixed_param;
6603
6604typedef struct {
6605 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */
6606 /** unique id identifying the VDEV, generated by the caller */
6607 A_UINT32 vdev_id;
6608} wmi_vdev_stopped_event_fixed_param;
6609
Manikandan Mohan429a0782015-12-23 14:35:54 -08006610typedef struct {
6611 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */
6612 /** unique id identifying the VDEV, generated by the caller */
6613 A_UINT32 vdev_id;
6614} wmi_vdev_delete_resp_event_fixed_param;
6615
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006616/** common structure used for simple events (stopped, resume_req, standby response) */
6617typedef struct {
6618 A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */
6619 /** unique id identifying the VDEV, generated by the caller */
6620 A_UINT32 vdev_id;
6621} wmi_vdev_simple_event_fixed_param;
6622
6623/** VDEV start response status codes */
6624#define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV succesfully started */
6625#define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */
6626#define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */
6627
6628/** Beacon processing related command and event structures */
6629typedef struct {
6630 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
6631 /** unique id identifying the VDEV, generated by the caller */
6632 A_UINT32 vdev_id;
6633 /** xmit rate */
6634 A_UINT32 tx_rate;
6635 /** xmit power */
6636 A_UINT32 txPower;
6637 /** beacon buffer length in bytes */
6638 A_UINT32 buf_len;
6639 /* This TLV is followed by array of bytes:
6640 * // beacon frame buffer
6641 * A_UINT8 bufp[];
6642 */
6643} wmi_bcn_tx_hdr;
6644
6645/* Beacon filter */
6646#define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
6647#define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
6648#define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
6649#define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
6650#define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
6651
6652typedef struct {
6653 /** Filter ID */
6654 A_UINT32 bcn_filter_id;
6655 /** Filter type - wmi_bcn_filter */
6656 A_UINT32 bcn_filter;
6657 /** Buffer len */
6658 A_UINT32 bcn_filter_len;
6659 /** Filter info (threshold, BSSID, RSSI) */
6660 A_UINT8 *bcn_filter_buf;
6661} wmi_bcn_filter_rx_cmd;
6662
6663/** Capabilities and IEs to be passed to firmware */
6664typedef struct {
6665 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
6666 /** Capabilities */
6667 A_UINT32 caps;
6668 /** ERP info */
6669 A_UINT32 erp;
6670 /** Advanced capabilities */
6671 /** HT capabilities */
6672 /** HT Info */
6673 /** ibss_dfs */
6674 /** wpa Info */
6675 /** rsn Info */
6676 /** rrm info */
6677 /** ath_ext */
6678 /** app IE */
6679} wmi_bcn_prb_info;
6680
6681typedef struct {
6682 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
6683 /** unique id identifying the VDEV, generated by the caller */
6684 A_UINT32 vdev_id;
6685 /** TIM IE offset from the beginning of the template. */
6686 A_UINT32 tim_ie_offset;
6687 /** beacon buffer length. data is in TLV data[] */
6688 A_UINT32 buf_len;
6689 /*
6690 * The TLVs follows:
6691 * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs
6692 * A_UINT8 data[]; //Variable length data
6693 */
6694} wmi_bcn_tmpl_cmd_fixed_param;
6695
6696typedef struct {
6697 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
6698 /** unique id identifying the VDEV, generated by the caller */
6699 A_UINT32 vdev_id;
6700 /** beacon buffer length. data is in TLV data[] */
6701 A_UINT32 buf_len;
6702 /*
6703 * The TLVs follows:
6704 * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs
6705 * A_UINT8 data[]; //Variable length data
6706 */
6707} wmi_prb_tmpl_cmd_fixed_param;
6708
6709typedef struct {
6710 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
6711 A_UINT32 tlv_header;
6712 /** unique id identifying the VDEV */
6713 A_UINT32 vdev_id;
6714 /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
6715 A_UINT32 tx_status;
6716} wmi_offload_bcn_tx_status_event_fixed_param;
6717
6718enum wmi_sta_ps_mode {
6719 /** enable power save for the given STA VDEV */
6720 WMI_STA_PS_MODE_DISABLED = 0,
6721 /** disable power save for a given STA VDEV */
6722 WMI_STA_PS_MODE_ENABLED = 1,
6723};
6724
6725typedef struct {
6726 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
6727 /** unique id identifying the VDEV, generated by the caller */
6728 A_UINT32 vdev_id;
6729
6730 /** Power save mode
6731 *
6732 * (see enum wmi_sta_ps_mode)
6733 */
6734 A_UINT32 sta_ps_mode;
6735} wmi_sta_powersave_mode_cmd_fixed_param;
6736
6737enum wmi_csa_offload_en {
6738 WMI_CSA_OFFLOAD_DISABLE = 0,
6739 WMI_CSA_OFFLOAD_ENABLE = 1,
6740};
6741
6742typedef struct {
6743 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */
6744 A_UINT32 vdev_id;
6745 A_UINT32 csa_offload_enable;
6746} wmi_csa_offload_enable_cmd_fixed_param;
6747
6748typedef struct {
6749 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */
6750 A_UINT32 vdev_id;
6751 /*
6752 * The TLVs follows:
6753 * wmi_channel chan;
6754 */
6755} wmi_csa_offload_chanswitch_cmd_fixed_param;
6756/**
6757 * This parameter controls the policy for retrieving frames from AP while the
6758 * STA is in sleep state.
6759 *
6760 * Only takes affect if the sta_ps_mode is enabled
6761 */
6762enum wmi_sta_ps_param_rx_wake_policy {
6763 /* Wake up when ever there is an RX activity on the VDEV. In this mode
6764 * the Power save SM(state machine) will come out of sleep by either
6765 * sending null frame (or) a data frame (with PS==0) in response to TIM
6766 * bit set in the received beacon frame from AP.
6767 */
6768 WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
6769
6770 /* Here the power save state machine will not wakeup in response to TIM
6771 * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
6772 * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
6773 * access categories are delivery-enabled, the station will send a UAPSD
6774 * trigger frame, otherwise it will send a PS-Poll.
6775 */
6776 WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
6777};
6778
6779/** Number of tx frames/beacon that cause the power save SM to wake up.
6780 *
6781 * Value 1 causes the SM to wake up for every TX. Value 0 has a special
6782 * meaning, It will cause the SM to never wake up. This is useful if you want
6783 * to keep the system to sleep all the time for some kind of test mode . host
6784 * can change this parameter any time. It will affect at the next tx frame.
6785 */
6786enum wmi_sta_ps_param_tx_wake_threshold {
6787 WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
6788 WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
6789
6790 /* Values greater than one indicate that many TX attempts per beacon
6791 * interval before the STA will wake up
6792 */
6793};
6794
6795/**
6796 * The maximum number of PS-Poll frames the FW will send in response to
6797 * traffic advertised in TIM before waking up (by sending a null frame with PS
6798 * = 0). Value 0 has a special meaning: there is no maximum count and the FW
6799 * will send as many PS-Poll as are necessary to retrieve buffered BU. This
6800 * parameter is used when the RX wake policy is
6801 * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
6802 * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
6803 */
6804enum wmi_sta_ps_param_pspoll_count {
6805 WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
6806 /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
6807 * will send before waking up.
6808 */
6809};
6810
6811/*
6812 * This will include the delivery and trigger enabled state for every AC.
6813 * This is the negotiated state with AP. The host MLME needs to set this based
6814 * on AP capability and the state Set in the association request by the
6815 * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
6816 */
6817#define WMI_UAPSD_AC_TYPE_DELI 0
6818#define WMI_UAPSD_AC_TYPE_TRIG 1
6819
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306820#define WMI_UAPSD_AC_BIT_MASK(ac, type) \
6821 do { \
6822 (type == WMI_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) : \
6823 (1<<((ac<<1)+1)) \
6824 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006825
6826enum wmi_sta_ps_param_uapsd {
6827 WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
6828 WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
6829 WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
6830 WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
6831 WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
6832 WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
6833 WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
6834 WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
6835};
6836
6837enum wmi_sta_powersave_param {
6838 /**
6839 * Controls how frames are retrievd from AP while STA is sleeping
6840 *
6841 * (see enum wmi_sta_ps_param_rx_wake_policy)
6842 */
6843 WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
6844
6845 /**
6846 * The STA will go active after this many TX
6847 *
6848 * (see enum wmi_sta_ps_param_tx_wake_threshold)
6849 */
6850 WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
6851
6852 /**
6853 * Number of PS-Poll to send before STA wakes up
6854 *
6855 * (see enum wmi_sta_ps_param_pspoll_count)
6856 *
6857 */
6858 WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
6859
6860 /**
6861 * TX/RX inactivity time in msec before going to sleep.
6862 *
6863 * The power save SM will monitor tx/rx activity on the VDEV, if no
6864 * activity for the specified msec of the parameter the Power save SM will
6865 * go to sleep.
6866 */
6867 WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
6868
6869 /**
6870 * Set uapsd configuration.
6871 *
6872 * (see enum wmi_sta_ps_param_uapsd)
6873 */
6874 WMI_STA_PS_PARAM_UAPSD = 4,
6875 /**
6876 * Number of PS-Poll to send before STA wakes up in QPower Mode
6877 */
6878 WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
6879
6880 /**
6881 * Enable QPower
6882 */
6883 WMI_STA_PS_ENABLE_QPOWER = 6,
6884
6885 /**
6886 * Number of TX frames before the entering the Active state
6887 */
6888 WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
6889
6890 /**
6891 * QPower SPEC PSPOLL interval
6892 */
6893 WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
6894
6895 /**
6896 * Max SPEC PSPOLL to be sent when the PSPOLL response has
6897 * no-data bit set
6898 */
6899 WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
6900};
6901
6902typedef struct {
6903 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
6904 /** unique id identifying the VDEV, generated by the caller */
6905 A_UINT32 vdev_id;
6906 /** station power save parameter (see enum wmi_sta_powersave_param) */
6907 A_UINT32 param;
6908 A_UINT32 value;
6909} wmi_sta_powersave_param_cmd_fixed_param;
6910
6911/** No MIMO power save */
6912#define WMI_STA_MIMO_PS_MODE_DISABLE
6913/** mimo powersave mode static*/
6914#define WMI_STA_MIMO_PS_MODE_STATIC
6915/** mimo powersave mode dynamic */
6916#define WMI_STA_MIMO_PS_MODE_DYNAMI
6917
6918typedef struct {
6919 /** unique id identifying the VDEV, generated by the caller */
6920 A_UINT32 vdev_id;
6921 /** mimo powersave mode as defined above */
6922 A_UINT32 mimo_pwrsave_mode;
6923} wmi_sta_mimo_ps_mode_cmd;
6924
6925/** U-APSD configuration of peer station from (re)assoc request and TSPECs */
6926enum wmi_ap_ps_param_uapsd {
6927 WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
6928 WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
6929 WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
6930 WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
6931 WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
6932 WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
6933 WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
6934 WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
6935};
6936
6937/** U-APSD maximum service period of peer station */
6938enum wmi_ap_ps_peer_param_max_sp {
6939 WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
6940 WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
6941 WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
6942 WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
6943
6944 /* keep last! */
6945 MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
6946};
6947
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05306948/** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */
6949enum wmi_ap_ps_param_sifs_resp_frmtype {
6950 WMI_SIFS_RESP_PSPOLL = (1 << 0),
6951 WMI_SIFS_RESP_UAPSD = (1 << 1),
6952 WMI_SIFS_RESP_QBST_EXP = (1 << 2),
6953 WMI_SIFS_RESP_QBST_DATA = (1 << 3),
6954 WMI_SIFS_RESP_QBST_BAR = (1 << 4),
6955};
6956
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006957/**
6958 * AP power save parameter
6959 * Set a power save specific parameter for a peer station
6960 */
6961enum wmi_ap_ps_peer_param {
6962 /** Set uapsd configuration for a given peer.
6963 *
6964 * This will include the delivery and trigger enabled state for every AC.
6965 * The host MLME needs to set this based on AP capability and stations
6966 * request Set in the association request received from the station.
6967 *
6968 * Lower 8 bits of the value specify the UAPSD configuration.
6969 *
6970 * (see enum wmi_ap_ps_param_uapsd)
6971 * The default value is 0.
6972 */
6973 WMI_AP_PS_PEER_PARAM_UAPSD = 0,
6974
6975 /**
6976 * Set the service period for a UAPSD capable station
6977 *
6978 * The service period from wme ie in the (re)assoc request frame.
6979 *
6980 * (see enum wmi_ap_ps_peer_param_max_sp)
6981 */
6982 WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
6983
6984 /** Time in seconds for aging out buffered frames for STA in power save */
6985 WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05306986 /**
6987 * Specify frame types that are considered SIFS RESP trigger frame
6988 * (see enum wmi_ap_ps_param_sifs_resp_frmtype)
6989 */
Govind Singh32cced32016-02-01 13:33:09 +05306990 WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
6991
6992 /*
6993 * Specifies the trigger state of TID.
6994 * Valid only for UAPSD frame type
6995 */
6996 WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
6997
6998 /** Specifies the WNM sleep state of a STA */
6999 WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007000};
7001
7002typedef struct {
7003 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
7004 /** unique id identifying the VDEV, generated by the caller */
7005 A_UINT32 vdev_id;
7006 /** peer MAC address */
7007 wmi_mac_addr peer_macaddr;
7008 /** AP powersave param (see enum wmi_ap_ps_peer_param) */
7009 A_UINT32 param;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05307010 /** AP powersave param value (see defines) */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007011 A_UINT32 value;
7012} wmi_ap_ps_peer_cmd_fixed_param;
7013
7014/** Configure peer station 11v U-APSD coexistance
7015 *
7016 * Two parameters from uaspd coexistence ie info (as specified in 11v) are
7017 * sent down to FW along with this command.
7018 *
7019 * The semantics of these fields are described in the following text extracted
7020 * from 802.11v.
7021 *
7022 * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the
7023 * U-APSD Coexistence element, the AP should not transmit frames to the
7024 * non-AP STA outside of the U-APSD Coexistence Service Period, which
7025 * begins when the AP receives the U-APSD trigger frame and ends after
7026 * the transmission period specified by the result of the following
7027 * calculation:
7028 *
7029 * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
7030 *
7031 * Where T is the time the U-APSD trigger frame was received at the AP
7032 * Interval is the UAPSD Coexistence element Duration/Interval field
7033 * value (see 7.3.2.91) or upon the successful transmission of a frame
7034 * with EOSP bit set to 1, whichever is earlier.
7035 *
7036 *
7037 * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
7038 * Coexistence element, the AP should not transmit frames to the non-AP
7039 * STA outside of the U-APSD Coexistence Service Period, which begins
7040 * when the AP receives a U-APSD trigger frame and ends after the
7041 * transmission period specified by the result of the following
7042 * calculation: End of transmission period = T + Duration
7043 */
7044typedef struct {
7045 /** unique id identifying the VDEV, generated by the caller */
7046 A_UINT32 vdev_id;
7047 /** peer MAC address */
7048 wmi_mac_addr peer_macaddr;
7049 /** Enable U-APSD coexistence support for this peer
7050 *
7051 * 0 -> disabled (default)
7052 * 1 -> enabled
7053 */
7054 A_UINT32 enabled;
7055 /** Duration/Interval as defined by 11v U-ASPD coexistance */
7056 A_UINT32 duration_interval;
7057 /** Upper 32 bits of 64-bit TSF offset */
7058 A_UINT32 tsf_offset_high;
7059 /** Lower 32 bits of 64-bit TSF offset */
7060 A_UINT32 tsf_offset_low;
7061} wmi_ap_powersave_peer_uapsd_coex_cmd;
7062
7063typedef enum {
7064 WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001,
7065 WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002,
7066 WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
7067
7068 WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
7069} wmi_ap_ps_egap_flag_type;
7070
7071/**
7072 * configure ehanced green ap parameters
7073 */
7074typedef struct {
7075 /*
7076 * TLV tag and len; tag equals
7077 * wmi_ap_powersave_egap_param_cmd_fixed_param
7078 */
7079 A_UINT32 tlv_header;
7080 /** Enable enhanced green ap
7081 * 0 -> disabled
7082 * 1 -> enabled
7083 */
7084 A_UINT32 enable;
7085 /** The param indicates a duration that all STAs connected
7086 * to S-AP have no traffic.
7087 */
7088 A_UINT32 inactivity_time; /* in unit of milliseconds */
7089 /** The param indicates a duration that all STAs connected
7090 * to S-AP have no traffic, after all STAs have entered powersave.
7091 */
7092 A_UINT32 wait_time; /* in unit of milliseconds */
7093 /** The param is used to turn on/off some functions within E-GAP.
7094 */
7095 A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
7096} wmi_ap_ps_egap_param_cmd_fixed_param;
7097
7098typedef enum {
7099 WMI_AP_PS_EGAP_STATUS_IDLE = 1,
7100 WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
7101 WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3,
7102
7103 WMI_AP_PS_EGAP_STATUS_MAX = 15
7104} wmi_ap_ps_egap_status_type;
7105
7106/**
7107 * send ehanced green ap status to host
7108 */
7109typedef struct {
Manikandan Mohan0c7ae402015-12-03 17:56:41 -08007110 /* TLV tag and len; tag equals
7111 * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list
7112 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007113 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05307114 union {
7115 /* OBSOLETE - will be removed once all refs are gone */
7116 A_UINT32 mac_id;
7117 /** pdev_id for identifying the MAC
7118 * See macros starting with WMI_PDEV_ID_ for values.
7119 */
7120 A_UINT32 pdev_id;
7121 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007122 /** The param indicates the current tx chainmask with the mac id. */
7123 A_UINT32 tx_chainmask;
7124 /** The param indicates the current rx chainmask with the mac id. */
7125 A_UINT32 rx_chainmask;
7126} wmi_ap_ps_egap_info_chainmask_list;
7127
7128typedef struct {
7129 /*
7130 * TLV tag and len; tag equals
7131 * wmi_ap_powersave_egap_param_cmd_fixed_param
7132 */
7133 A_UINT32 tlv_header;
7134 /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
7135 A_UINT32 status;
7136 /* This TLV is followed by
7137 * wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
7138 */
7139} wmi_ap_ps_egap_info_event_fixed_param;
7140
7141
7142/* 128 clients = 4 words */
7143/* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
7144#define WMI_TIM_BITMAP_ARRAY_SIZE 4
7145
7146typedef struct {
7147 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
7148 /** TIM bitmap len (in bytes)*/
7149 A_UINT32 tim_len;
7150 /** TIM Partial Virtual Bitmap */
7151 A_UINT32 tim_mcast;
7152 A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
7153 A_UINT32 tim_changed;
7154 A_UINT32 tim_num_ps_pending;
7155} wmi_tim_info;
7156
7157typedef struct {
7158 /** Flag to enable quiet period IE support */
7159 A_UINT32 is_enabled;
7160 /** Quiet start */
7161 A_UINT32 tbttcount;
7162 /** Beacon intervals between quiets*/
7163 A_UINT32 period;
7164 /** TUs of each quiet*/
7165 A_UINT32 duration;
7166 /** TUs of from TBTT of quiet start*/
7167 A_UINT32 offset;
7168} wmi_quiet_info;
7169
7170/* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
7171#define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
7172
7173typedef struct {
7174 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
7175 /** Bit 0: Flag to indicate an update in NOA schedule
7176 * Bits 7-1: Reserved
7177 * Bits 15-8: Index (identifies the instance of NOA sub element)
7178 * Bit 16: Opp PS state of the AP
7179 * Bits 23-17: Ctwindow in TUs
7180 * Bits 31-24: Number of NOA descriptors
7181 */
7182 A_UINT32 noa_attributes;
7183 wmi_p2p_noa_descriptor
7184 noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
7185} wmi_p2p_noa_info;
7186
7187#define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
7188#define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
7189
7190#define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \
7191 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
7192
7193#define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \
7194 WMI_F_RMW((hdr)->noa_attributes, 0x1, \
7195 WMI_UNIFIED_NOA_ATTR_MODIFIED);
7196
7197#define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00
7198#define WMI_UNIFIED_NOA_ATTR_INDEX_S 8
7199
7200#define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \
7201 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
7202
7203#define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \
7204 WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
7205 WMI_UNIFIED_NOA_ATTR_INDEX);
7206
7207#define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000
7208#define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16
7209
7210#define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \
7211 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
7212
7213#define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \
7214 WMI_F_RMW((hdr)->noa_attributes, 0x1, \
7215 WMI_UNIFIED_NOA_ATTR_OPP_PS);
7216
7217#define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000
7218#define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17
7219
7220#define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \
7221 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
7222
7223#define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \
7224 WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \
7225 WMI_UNIFIED_NOA_ATTR_CTWIN);
7226
7227#define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000
7228#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24
7229
7230#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \
7231 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
7232
7233#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \
7234 WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
7235 WMI_UNIFIED_NOA_ATTR_NUM_DESC);
7236
7237typedef struct {
7238 /** TIM info */
7239 wmi_tim_info tim_info;
7240 /** P2P NOA info */
7241 wmi_p2p_noa_info p2p_noa_info;
7242 /* TBD: More info elements to be added later */
7243} wmi_bcn_info;
7244
7245typedef struct {
7246 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
7247 /** bitmap identifying the VDEVs, generated by the caller */
7248 A_UINT32 vdev_map;
7249 /* This TLV is followed by tim_info and p2p_noa_info for each vdev in vdevmap :
7250 * wmi_tim_info tim_info[];
7251 * wmi_p2p_noa_info p2p_noa_info[];
7252 *
7253 */
7254} wmi_host_swba_event_fixed_param;
7255
7256#define WMI_MAX_AP_VDEV 16
7257
7258typedef struct {
7259 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
7260 /** bimtap of VDEVs that has tbtt offset updated */
7261 A_UINT32 vdev_map;
7262 /* The TLVs for tbttoffset_list will follow this TLV.
7263 * tbtt offset list in the order of the LSB to MSB in the vdev_map bitmap
7264 * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
7265 */
7266} wmi_tbtt_offset_event_fixed_param;
7267
7268/* Peer Specific commands and events */
7269
7270typedef struct {
7271 A_UINT32 percentage; /* in unit of 12.5% */
7272 A_UINT32 min_delta; /* in unit of Mbps */
7273} rate_delta_t;
7274
7275#define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01
7276#define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02
7277#define MAX_NUM_OF_RATE_THRESH 4
7278
7279typedef struct {
7280 /*
7281 * PEER_RATE_REPORT_COND_FLAG_DELTA,
7282 * PEER_RATE_REPORT_COND_FLAG_THRESHOLD
7283 * Any of these two conditions or both of
7284 * them can be set.
7285 */
7286 A_UINT32 val_cond_flags;
7287 rate_delta_t rate_delta;
7288 /*
7289 * In unit of Mbps. There are at most 4 thresholds
7290 * If the threshold count is less than 4, set zero to
7291 * the one following the last threshold
7292 */
7293 A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH];
7294} report_cond_per_phy_t;
7295
7296
7297enum peer_rate_report_cond_phy_type {
7298 PEER_RATE_REPORT_COND_11B = 0,
7299 PEER_RATE_REPORT_COND_11A_G,
7300 PEER_RATE_REPORT_COND_11N,
7301 PEER_RATE_REPORT_COND_11AC,
7302 PEER_RATE_REPORT_COND_MAX_NUM
7303};
7304
7305typedef struct {
7306 /*
7307 * TLV tag and len; tag equals
7308 * WMITLV_TAG_STRUC_wmi_peer_rate_report_condtion_fixed_param
7309 */
7310 A_UINT32 tlv_header;
7311 /* 1= enable, 0=disable */
7312 A_UINT32 enable_rate_report;
7313 A_UINT32 report_backoff_time; /* in unit of msecond */
7314 A_UINT32 report_timer_period; /* in unit of msecond */
7315 /*
7316 *In the following field, the array index means the phy type,
7317 * please see enum peer_rate_report_cond_phy_type for detail
7318 */
7319 report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
7320} wmi_peer_set_rate_report_condition_fixed_param;
7321
7322/* Peer Type:
7323 * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
7324 * on address and vdev opmode. This is largely here to allow host to indicate that
7325 * peer is explicitly a TDLS peer
7326 */
7327enum wmi_peer_type {
7328 WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
7329 WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
7330 WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
7331 WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
Govind Singh941bd5e2016-02-04 17:15:25 +05307332 WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007333 WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307334 * is assigned up to 127 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007335 /* Reserved from 128 - 255 for
7336 * target internal use.*/
7337 WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
7338};
7339
7340typedef struct {
7341 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
7342 /** unique id identifying the VDEV, generated by the caller */
7343 A_UINT32 vdev_id;
7344 /** peer MAC address */
7345 wmi_mac_addr peer_macaddr;
7346 /** peer type: see enum values above */
7347 A_UINT32 peer_type;
7348} wmi_peer_create_cmd_fixed_param;
7349
7350typedef struct {
7351 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
7352 /** unique id identifying the VDEV, generated by the caller */
7353 A_UINT32 vdev_id;
7354 /** peer MAC address */
7355 wmi_mac_addr peer_macaddr;
7356} wmi_peer_delete_cmd_fixed_param;
7357
7358typedef struct {
Nitesh Shah5de1cf82016-06-29 20:13:17 +05307359 /**
7360 * TLV tag and len; tag equals
7361 * WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param
7362 */
7363 A_UINT32 tlv_header;
7364 /** unique id identifying the VDEV, generated by the caller */
7365 A_UINT32 vdev_id;
7366 /** peer MAC address */
7367 wmi_mac_addr peer_macaddr;
7368 /**
7369 * maximum block ack window size to use during a rx block ack
7370 * negotiation, i.e. the maximum number of MPDUs per A-MPDU
7371 * that will be received
7372 */
7373 A_UINT32 rx_block_ack_win_limit;
7374} wmi_peer_set_rx_blocksize_cmd_fixed_param;
7375
7376typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007377 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
7378 /** unique id identifying the VDEV, generated by the caller */
7379 A_UINT32 vdev_id;
7380 /** peer MAC address */
7381 wmi_mac_addr peer_macaddr;
7382 /** tid bitmap identifying the tids to flush */
7383 A_UINT32 peer_tid_bitmap;
7384} wmi_peer_flush_tids_cmd_fixed_param;
7385
7386typedef struct {
7387 /** rate mode . 0: disable fixed rate (auto rate)
7388 * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
7389 * 2: ht20 11n rate specified as mcs index
7390 * 3: ht40 11n rate specified as mcs index
7391 */
7392 A_UINT32 rate_mode;
7393 /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
7394 * and series 3 is stored at byte 3 (MSB) */
7395 A_UINT32 rate_series;
7396 /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
7397 * and retry count for rate 3 is stored at byte 3 (MSB) */
7398 A_UINT32 rate_retries;
7399} wmi_fixed_rate;
7400
7401typedef struct {
7402 /** unique id identifying the VDEV, generated by the caller */
7403 A_UINT32 vdev_id;
7404 /** peer MAC address */
7405 wmi_mac_addr peer_macaddr;
7406 /** fixed rate */
7407 wmi_fixed_rate peer_fixed_rate;
7408} wmi_peer_fixed_rate_cmd;
7409
7410#define WMI_MGMT_TID 17
7411
7412typedef struct {
7413 A_UINT32 tlv_header;
7414 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
7415 /** unique id identifying the VDEV, generated by the caller */
7416 A_UINT32 vdev_id;
7417 /** peer MAC address */
7418 wmi_mac_addr peer_macaddr;
7419} wmi_addba_clear_resp_cmd_fixed_param;
7420
7421typedef struct {
7422 A_UINT32 tlv_header;
7423 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */
7424 /** unique id identifying the VDEV, generated by the caller */
7425 A_UINT32 vdev_id;
7426 /** peer MAC address */
7427 wmi_mac_addr peer_macaddr;
7428 /** Tid number */
7429 A_UINT32 tid;
7430 /** Buffer/Window size*/
7431 A_UINT32 buffersize;
7432} wmi_addba_send_cmd_fixed_param;
7433
7434typedef struct {
7435 A_UINT32 tlv_header;
7436 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
7437 /** unique id identifying the VDEV, generated by the caller */
7438 A_UINT32 vdev_id;
7439 /** peer MAC address */
7440 wmi_mac_addr peer_macaddr;
7441 /** Tid number */
7442 A_UINT32 tid;
7443 /** Is Initiator */
7444 A_UINT32 initiator;
7445 /** Reason code */
7446 A_UINT32 reasoncode;
7447} wmi_delba_send_cmd_fixed_param;
7448
7449typedef struct {
7450 A_UINT32 tlv_header;
7451 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
7452 /** unique id identifying the vdev, generated by the caller */
7453 A_UINT32 vdev_id;
7454 /** peer mac address */
7455 wmi_mac_addr peer_macaddr;
7456 /** Tid number */
7457 A_UINT32 tid;
7458 /** status code */
7459 A_UINT32 statuscode;
7460} wmi_addba_setresponse_cmd_fixed_param;
7461
7462typedef struct {
7463 A_UINT32 tlv_header;
7464 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
7465 /** unique id identifying the vdev, generated by the caller */
7466 A_UINT32 vdev_id;
7467 /** peer mac address */
7468 wmi_mac_addr peer_macaddr;
7469 /** Tid number */
7470 A_UINT32 tid;
7471} wmi_send_singleamsdu_cmd_fixed_param;
7472
7473/* Type of Station DTIM Power Save method */
7474enum {
7475 /* For NORMAL DTIM, the parameter is the number of beacon intervals and
7476 * also the same value as the listen interval. For this method, the
7477 * station will wake up based on the listen interval. If this
7478 * listen interval is not equal to DTIM, then the station may
7479 * miss certain DTIM beacons. If this value is 1, then the
7480 * station will wake up for every beacon.
7481 */
7482 WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
7483 /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
7484 * When this value is 1, then the station will wake at every DTIM beacon.
7485 * If this value is >1, then the station will skip certain DTIM beacons.
7486 * This value is the multiple of DTIM intervals that the station will
7487 * wake up to receive the DTIM beacons.
7488 */
7489 WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
7490};
7491
7492/* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
7493typedef struct {
7494 A_UINT32 tlv_header;
7495 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
7496 /** unique id identifying the VDEV, generated by the caller */
7497 A_UINT32 vdev_id;
7498 /* Station DTIM Power Save method as defined above */
7499 A_UINT32 dtim_pwrsave_method;
7500 /* DTIM PS value. Contents depends on the method */
7501 A_UINT32 value;
7502 /* Modulated DTIM value */
7503 A_UINT32 MaxLIModulatedDTIM;
7504} wmi_sta_dtim_ps_method_cmd_fixed_param;
7505
7506/*
7507 * For Station UAPSD Auto Trigger feature, the Firmware monitors the
7508 * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
7509 * If there is no uplink/download for the specified service interval (field service_interval),
7510 * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
7511 * specified in the UP (field user_priority).
7512 * Firmware also monitors the responses for these QOS-NULL triggers.
7513 * If the peer does not have any delivery frames, it will respond with
7514 * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
7515 * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
7516 * are unused and should be set to 0.
7517 * When service_interval is 0, then the firmware will not send any trigger frames. This is for
7518 * certain host-based implementations that don't want this firmware offload.
7519 * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
7520 * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
7521 * and rest of the AC default to 300 ms.
7522 *
7523 * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
7524 * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
7525 * the more advanced monitoring method.
7526 * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
7527 * suspend interval (field suspend_interval), firmware will change its auto trigger interval
7528 * to delay interval (field delay_interval). This way, when there is no traffic, the station
7529 * will save more power by waking up less and sending less trigger frames.
7530 * The (service_interval < suspend_interval) and (service_interval < delay_interval).
7531 * If this variable auto trigger is not required, then the suspend_interval and delay_interval
7532 * should be 0.
7533 */
7534typedef struct {
7535 A_UINT32 tlv_header;
7536 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
7537 /** WMM Access category from 0 to 3 */
7538 A_UINT32 wmm_ac;
7539 /** User priority to use in trigger frames. It is the TID
7540 * value. This field needs to be specified and may not be
7541 * equivalent to AC since some implementation may use the TSPEC
7542 * to enable UAPSD and negotiate a particular user priority. */
7543 A_UINT32 user_priority;
7544 /** service interval in ms */
7545 A_UINT32 service_interval;
7546 /** Suspend interval in ms */
7547 A_UINT32 suspend_interval;
7548 /** delay interval in ms */
7549 A_UINT32 delay_interval;
7550} wmi_sta_uapsd_auto_trig_param;
7551
7552typedef struct {
7553 A_UINT32 tlv_header;
7554 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
7555 /** unique id identifying the VDEV, generated by the caller */
7556 A_UINT32 vdev_id;
7557 /** peer mac address */
7558 wmi_mac_addr peer_macaddr;
7559 /** Number of AC to specify */
7560 A_UINT32 num_ac;
7561 /*
7562 * Following this struc is the TLV:
7563 * wmi_sta_uapsd_auto_trig_param ac_param[]; //Variable number of AC parameters (defined by field num_ac)
7564 */
7565
7566} wmi_sta_uapsd_auto_trig_cmd_fixed_param;
7567
7568/** mimo powersave state */
7569#define WMI_PEER_MIMO_PS_STATE 0x1
7570/** enable/disable AMPDU . initial value (enabled) */
7571#define WMI_PEER_AMPDU 0x2
7572/** authorize/unauthorize peer. initial value is unauthorized (0) */
7573#define WMI_PEER_AUTHORIZE 0x3
7574/** peer channel bandwidth */
7575#define WMI_PEER_CHWIDTH 0x4
7576/** peer NSS */
7577#define WMI_PEER_NSS 0x5
7578/** USE 4 ADDR */
7579#define WMI_PEER_USE_4ADDR 0x6
7580/* set group membership status */
7581#define WMI_PEER_MEMBERSHIP 0x7
7582#define WMI_PEER_USERPOS 0x8
7583/*
7584 * A critical high-level protocol is being used with this peer. Target
7585 * should take appropriate measures (if possible) to ensure more
7586 * reliable link with minimal latency. This *may* include modifying the
7587 * station power save policy, enabling more RX chains, increased
7588 * priority of channel scheduling, etc.
7589 *
7590 * NOTE: This parameter should only be considered a hint as specific
7591 * behavior will depend on many factors including current network load
7592 * and vdev/peer configuration.
7593 *
7594 * For STA VDEV this peer corresponds to the AP's BSS peer.
7595 * For AP VDEV this peer corresponds to the remote peer STA.
7596 */
7597#define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9
7598/* set Tx failure count threshold for the peer - Currently unused */
7599#define WMI_PEER_TX_FAIL_CNT_THR 0xA
7600/* Enable H/W retry and Enable H/W Send CTS2S before Data */
7601#define WMI_PEER_SET_HW_RETRY_CTS2S 0xB
7602
7603/* Set peer advertised IBSS atim window length */
7604#define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC
7605
7606/** peer phy mode */
7607#define WMI_PEER_PHYMODE 0xD
Govind Singh32cced32016-02-01 13:33:09 +05307608/** Use FIXED Pwr */
7609#define WMI_PEER_USE_FIXED_PWR 0xE
7610/** Set peer fixed rate */
7611#define WMI_PEER_PARAM_FIXED_RATE 0xF
7612/** Whitelist peer TIDs */
7613#define WMI_PEER_SET_MU_WHITELIST 0x10
Govind Singh67b83b82016-02-01 19:26:59 +05307614/** Set peer max tx rate (MCS) in adaptive rate ctrl */
7615#define WMI_PEER_SET_MAX_TX_RATE 0x11
7616/** Set peer minimal tx rate (MCS) in adaptive rate ctrl */
7617#define WMI_PEER_SET_MIN_TX_RATE 0x12
Pradeep Reddy POTTETIdead2bd2016-06-09 17:11:12 +05307618/**
7619 * default ring routing for peer data packets,
7620 * param_value = bit 0 for hash based routing enabled or not
7621 * (value 1 is enabled, value 0 is disabled)
7622 * bits 1:5 are for ring 32 (i.e. ring id value
7623 * selected from 0 to 31 values)
7624 */
7625#define WMI_PEER_SET_DEFAULT_ROUTING 0x13
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007626
7627/** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
7628#define WMI_PEER_MIMO_PS_NONE 0x0
7629#define WMI_PEER_MIMO_PS_STATIC 0x1
7630#define WMI_PEER_MIMO_PS_DYNAMIC 0x2
7631
7632typedef struct {
7633 A_UINT32 tlv_header;
7634 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */
7635 /** unique id identifying the VDEV, generated by the caller */
7636 A_UINT32 vdev_id;
7637 /** peer MAC address */
7638 wmi_mac_addr peer_macaddr;
7639 /** parameter id */
7640 A_UINT32 param_id;
7641 /** parametr value */
7642 A_UINT32 param_value;
7643} wmi_peer_set_param_cmd_fixed_param;
7644
Govind Singh67b83b82016-02-01 19:26:59 +05307645typedef union {
7646 /*
7647 * The A_UINT16 "mode" and "tx_rate" fields can only be directly used
7648 * by the target or a little-endian host.
7649 * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET
7650 * macros on the A_UINT32 "value" field.
7651 */
7652 struct {
7653 /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */
7654 A_UINT16 mode;
7655 A_UINT16 tx_rate; /* see per-mode specs below */
7656 };
7657 A_UINT32 value; /* for use by big-endian host */
7658} wmi_peer_max_min_tx_rate;
7659
7660/*
7661 * Any access to the mode/tx_rate in an big endian system should use
7662 * the below Macros on the wmi_peer_max_min_tx_rate.value field.
7663 */
7664#define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16)
7665#define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode)
7666
7667#define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16)
7668#define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode)
7669
7670/*
7671 * CCK max/min tx Rate description
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +05307672 * tx_rate = 0: 1 Mbps
7673 * tx_rate = 1: 2 Mbps
7674 * tx_rate = 2: 5.5 Mbps
7675 * tx_rate = 3: 11 Mbps
7676 * tx_rate = else: invalid
Govind Singh67b83b82016-02-01 19:26:59 +05307677 */
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +05307678enum {
7679 WMI_MAX_CCK_TX_RATE_1M, /* up to 1M CCK Rate avaliable */
7680 WMI_MAX_CCK_TX_RATE_2M, /* up to 2M CCK Rate avaliable */
7681 WMI_MAX_CCK_TX_RATE_5_5M, /* up to 5.5M CCK Rate avaliable */
7682 WMI_MAX_CCK_TX_RATE_11M, /* up to 11M CCK Rate avaliable */
7683 WMI_MAX_CCK_TX_RATE = WMI_MAX_CCK_TX_RATE_11M,
7684};
Govind Singh67b83b82016-02-01 19:26:59 +05307685
7686/*
7687 * OFDM max/min tx Rate description
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +05307688 * tx_rate = 0: 6 Mbps
7689 * tx_rate = 1: 9 Mbps
7690 * tx_rate = 2: 12 Mbps
7691 * tx_rate = 3: 18 Mbps
7692 * tx_rate = 4: 24 Mbps
7693 * tx_rate = 5: 32 Mbps
7694 * tx_rate = 6: 48 Mbps
7695 * tx_rate = 7: 54 Mbps
7696 * tx_rate = else: invalid
Govind Singh67b83b82016-02-01 19:26:59 +05307697 */
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +05307698enum {
7699 WMI_MAX_OFDM_TX_RATE_6M, /* up to 6M OFDM Rate avaliable */
7700 WMI_MAX_OFDM_TX_RATE_9M, /* up to 9M OFDM Rate avaliable */
7701 WMI_MAX_OFDM_TX_RATE_12M, /* up to 12M OFDM Rate avaliable */
7702 WMI_MAX_OFDM_TX_RATE_18M, /* up to 18M OFDM Rate avaliable */
7703 WMI_MAX_OFDM_TX_RATE_24M, /* up to 24M OFDM Rate avaliable */
7704 WMI_MAX_OFDM_TX_RATE_36M, /* up to 36M OFDM Rate avaliable */
7705 WMI_MAX_OFDM_TX_RATE_48M, /* up to 48M OFDM Rate avaliable */
7706 WMI_MAX_OFDM_TX_RATE_54M, /* up to 54M OFDM Rate avaliable */
7707 WMI_MAX_OFDM_TX_RATE = WMI_MAX_OFDM_TX_RATE_54M,
7708};
Govind Singh67b83b82016-02-01 19:26:59 +05307709
7710/*
7711 * HT max/min tx rate description
7712 * tx_rate = 0~7 : MCS Rate 0~7
7713 * tx_rate=else : invalid.
7714 */
7715#define WMI_MAX_HT_TX_MCS 0x07
7716
7717/*
7718 * VHT max/min tx rate description
7719 * tx_rate = 0~9 : MCS Rate 0~9
7720 * tx_rate=else : invalid.
7721 */
7722#define WMI_MAX_VHT_TX_MCS 0x09
7723
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007724#define MAX_SUPPORTED_RATES 128
7725
7726typedef struct {
7727 /** total number of rates */
7728 A_UINT32 num_rates;
7729 /**
7730 * rates (each 8bit value) packed into a 32 bit word.
7731 * the rates are filled from least significant byte to most
7732 * significant byte.
7733 */
7734 A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
7735} wmi_rate_set;
7736
7737/* NOTE: It would bea good idea to represent the Tx MCS
7738 * info in one word and Rx in another word. This is split
7739 * into multiple words for convenience
7740 */
7741typedef struct {
7742 A_UINT32 tlv_header;
7743 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
7744 A_UINT32 rx_max_rate; /* Max Rx data rate */
7745 A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
7746 A_UINT32 tx_max_rate; /* Max Tx data rate */
7747 A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
Govind Singh32cced32016-02-01 13:33:09 +05307748 A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007749} wmi_vht_rate_set;
7750
7751/*
7752 * IMPORTANT: Make sure the bit definitions here are consistent
7753 * with the ni_flags definitions in wlan_peer.h
7754 */
7755#define WMI_PEER_AUTH 0x00000001 /* Authorized for data */
7756#define WMI_PEER_QOS 0x00000002 /* QoS enabled */
7757#define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */
7758#define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */
Himanshu Agarwal97005de2016-09-09 12:46:04 +05307759#define WMI_PEER_HE 0x00000400 /* HE Enabled */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007760#define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */
7761#define WMI_PEER_HT 0x00001000 /* HT enabled */
7762#define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */
7763#define WMI_PEER_STBC 0x00008000 /* STBC Enabled */
7764#define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */
7765#define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */
7766#define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */
7767#define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */
7768#define WMI_PEER_VHT 0x02000000 /* VHT Enabled */
7769#define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */
7770#define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */
7771/** CAUTION TODO: Place holder for WLAN_PEER_F_PS_PRESEND_REQUIRED = 0x10000000. Need to be clean up */
7772#define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */
7773#define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */
7774#define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */
7775
7776/**
7777 * Peer rate capabilities.
7778 *
7779 * This is of interest to the ratecontrol
7780 * module which resides in the firmware. The bit definitions are
7781 * consistent with that defined in if_athrate.c.
7782 *
7783 * @todo
7784 * Move this to a common header file later so there is no need to
7785 * duplicate the definitions or maintain consistency.
7786 */
7787#define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */
7788#define WMI_RC_CW40_FLAG 0x02 /* CW 40 */
7789#define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */
7790#define WMI_RC_HT_FLAG 0x08 /* HT */
7791#define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
7792#define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */
7793#define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */
7794#define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
7795#define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
7796#define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
7797#define WMI_RC_TS_FLAG 0x200 /* Three stream flag */
7798#define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
7799
7800typedef struct {
7801 A_UINT32 tlv_header;
7802 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
7803 /** peer MAC address */
7804 wmi_mac_addr peer_macaddr;
7805 /** VDEV id */
7806 A_UINT32 vdev_id;
7807 /** assoc = 1 reassoc = 0 */
7808 A_UINT32 peer_new_assoc;
7809 /** peer associd (16 bits) */
7810 A_UINT32 peer_associd;
7811 /** peer station flags: see definition above */
7812 A_UINT32 peer_flags;
7813 /** negotiated capabilities (lower 16 bits)*/
7814 A_UINT32 peer_caps;
7815 /** Listen interval */
7816 A_UINT32 peer_listen_intval;
7817 /** HT capabilties of the peer */
7818 A_UINT32 peer_ht_caps;
7819 /** maximum rx A-MPDU length */
7820 A_UINT32 peer_max_mpdu;
7821 /** mpdu density of the peer in usec(0 to 16) */
7822 A_UINT32 peer_mpdu_density;
7823 /** peer rate capabilties see flags above */
7824 A_UINT32 peer_rate_caps;
7825 /** num spatial streams */
7826 A_UINT32 peer_nss;
7827 /** VHT capabilties of the peer */
7828 A_UINT32 peer_vht_caps;
7829 /** phy mode */
7830 A_UINT32 peer_phymode;
7831 /** HT Operation Element of the peer. Five bytes packed in 2
7832 * INT32 array and filled from lsb to msb.
7833 * Note that the size of array peer_ht_info[] cannotbe changed
7834 * without breaking WMI Compatibility. */
7835 A_UINT32 peer_ht_info[2];
7836 /** total number of negotiated legacy rate set. Also the sizeof
7837 * peer_legacy_rates[] */
7838 A_UINT32 num_peer_legacy_rates;
7839 /** total number of negotiated ht rate set. Also the sizeof
7840 * peer_ht_rates[] */
7841 A_UINT32 num_peer_ht_rates;
Anurag Chouhan08f66c62016-04-18 17:14:51 +05307842 /*
7843 * Bitmap providing customized mapping of bandwidths to max Rx NSS
Govind Singh32cced32016-02-01 13:33:09 +05307844 * for this peer.
7845 * This is required since 802.11 standard currently facilitates peer to
7846 * be able to advertise only a single max Rx NSS value across all
7847 * bandwidths.
7848 * Some QCA chipsets might need to be able to advertise a different max
7849 * Rx NSS value for 160 MHz, than that for 80 MHz and lower.
7850 *
7851 * bit[2:0] : Represents value of Rx NSS for VHT 160 MHz
7852 * bit[30:3]: Reserved
7853 * bit[31] : MSB(0/1): 1 in case of valid data else all bits will be
7854 * set to 0 by host
7855 */
7856 A_UINT32 peer_bw_rxnss_override;
Govind Singhd24f5e42016-02-22 15:16:46 +05307857 /* 802.11ax capabilities */
7858 wmi_ppe_threshold peer_ppet;
7859 /* protocol-defined HE / 11ax capability flags */
7860 A_UINT32 peer_he_cap_info;
7861 A_UINT32 peer_he_ops; /* HE operation contains BSS color */
Himanshu Agarwal97005de2016-09-09 12:46:04 +05307862 A_UINT32 peer_he_cap_phy[WMI_MAX_HECAP_PHY_SIZE];
7863 A_UINT32 peer_he_mcs; /* HE MCS/NSS set */
7864 /* Following this struct are the TLV's:
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007865 * A_UINT8 peer_legacy_rates[];
7866 * A_UINT8 peer_ht_rates[];
7867 * wmi_vht_rate_set peer_vht_rates; //VHT capabilties of the peer
7868 */
7869} wmi_peer_assoc_complete_cmd_fixed_param;
7870
Govind Singh32cced32016-02-01 13:33:09 +05307871/* WDS Entry Flags */
7872#define WMI_WDS_FLAG_STATIC 0x1 /* Disable aging & learning */
7873
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007874typedef struct {
7875 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
7876 /** peer MAC address */
7877 wmi_mac_addr peer_macaddr;
7878 /** wds MAC addr */
7879 wmi_mac_addr wds_macaddr;
Govind Singh32cced32016-02-01 13:33:09 +05307880 /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */
7881 A_UINT32 flags;
Govind Singh869c9872016-02-22 18:36:34 +05307882 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007883} wmi_peer_add_wds_entry_cmd_fixed_param;
7884
Himanshu Agarwala24c0fe2016-09-13 22:39:20 +05307885#define WMI_CHAN_INFO_START_RESP 0
7886#define WMI_CHAN_INFO_END_RESP 1
7887
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007888typedef struct {
7889 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
7890 /** wds MAC addr */
7891 wmi_mac_addr wds_macaddr;
Govind Singh869c9872016-02-22 18:36:34 +05307892 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007893} wmi_peer_remove_wds_entry_cmd_fixed_param;
7894
7895typedef struct {
7896 /** peer MAC address */
7897 wmi_mac_addr peer_macaddr;
7898} wmi_peer_q_empty_callback_event;
7899
Govind Singhc7d51942016-02-01 12:09:31 +05307900/*
7901 * Command to update an already existing WDS entry. Different address setting
7902 * combinations are possible.
7903 *
7904 * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated.
7905 * Valid wds and null peer -> Associated WDS entry flags will be updated.
7906 * Null wds and Valid peer-> Flags will be updated for all WDS entries
7907 * behind the peer.
7908 * Null wds and peer -> Flags will be updated for all WDS entries.
7909 */
7910typedef struct {
7911 /*
7912 * TLV tag and len; tag equals
7913 * WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param
7914 */
7915 A_UINT32 tlv_header;
7916 /** peer MAC address */
7917 wmi_mac_addr peer_macaddr;
7918 /** wds MAC addr */
7919 wmi_mac_addr wds_macaddr;
7920 /* Flags associated with WDS entry */
7921 A_UINT32 flags;
Govind Singh869c9872016-02-22 18:36:34 +05307922 A_UINT32 vdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +05307923} wmi_peer_update_wds_entry_cmd_fixed_param;
7924
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007925/**
7926 * Channel info WMI event
7927 */
7928typedef struct {
7929 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
7930 /** Error code */
7931 A_UINT32 err_code;
7932 /** Channel freq */
7933 A_UINT32 freq;
7934 /** Read flags */
7935 A_UINT32 cmd_flags;
7936 /** Noise Floor value */
7937 A_UINT32 noise_floor;
7938 /** rx clear count */
7939 A_UINT32 rx_clear_count;
7940 /** cycle count */
7941 A_UINT32 cycle_count;
Govind Singh32cced32016-02-01 13:33:09 +05307942 /** channel tx power per range in 0.5dBm steps */
7943 A_UINT32 chan_tx_pwr_range;
7944 /** channel tx power per throughput */
7945 A_UINT32 chan_tx_pwr_tp;
7946 /** rx frame count (cumulative) */
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +05307947 A_UINT32 rx_frame_count;
7948 /** BSS rx cycle count */
7949 A_UINT32 my_bss_rx_cycle_count;
7950 /** b-mode data rx time (units are microseconds) */
7951 A_UINT32 rx_11b_mode_data_duration;
Himanshu Agarwala24c0fe2016-09-13 22:39:20 +05307952 /** tx frame count */
7953 A_UINT32 tx_frame_cnt;
7954 /** mac clock */
7955 A_UINT32 mac_clk_mhz;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007956} wmi_chan_info_event_fixed_param;
7957
7958/**
7959 * Non wlan interference event
7960 */
7961typedef struct {
7962 A_UINT32 tlv_header;
7963 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_ath_dcs_cw_int */
7964 A_UINT32 channel; /* either number or freq in mhz */
Govind Singh869c9872016-02-22 18:36:34 +05307965} wlan_dcs_cw_int;
7966#define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007967
7968/**
7969 * wlan_dcs_im_tgt_stats
7970 *
7971 */
7972typedef struct _wlan_dcs_im_tgt_stats {
Govind Singh869c9872016-02-22 18:36:34 +05307973 /** TLV tag and len; tag equals
7974 * WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t
7975 */
7976 A_UINT32 tlv_header;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007977 /** current running TSF from the TSF-1 */
7978 A_UINT32 reg_tsf32;
7979
7980 /** Known last frame rssi, in case of multiple stations, if
7981 * and at different ranges, this would not gaurantee that
7982 * this is the least rssi.
7983 */
7984 A_UINT32 last_ack_rssi;
7985
7986 /** Sum of all the failed durations in the last one second interval.
7987 */
7988 A_UINT32 tx_waste_time;
7989 /** count how many times the hal_rxerr_phy is marked, in this
7990 * time period
7991 */
7992 A_UINT32 rx_time;
7993 A_UINT32 phyerr_cnt;
7994
7995 /**
7996 * WLAN IM stats from target to host
7997 *
7998 * Below statistics are sent from target to host periodically.
7999 * These are collected at target as long as target is running
8000 * and target chip is not in sleep.
8001 *
8002 */
8003
8004 /** listen time from ANI */
8005 A_INT32 listen_time;
8006
8007 /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
8008 A_UINT32 reg_tx_frame_cnt;
8009
8010 /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
8011 A_UINT32 reg_rx_frame_cnt;
8012
8013 /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
8014 A_UINT32 reg_rxclr_cnt;
8015
8016 /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
8017 A_UINT32 reg_cycle_cnt; /* delta cycle count */
8018
8019 /** extenstion channel rx clear count */
8020 A_UINT32 reg_rxclr_ext_cnt;
8021
8022 /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
8023 A_UINT32 reg_ofdm_phyerr_cnt;
8024
8025 /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
8026 A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +05308027 /** Channel noise floor (units are dBm) */
8028 A_INT32 chan_nf;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008029
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +05308030 /** BSS rx cycle count */
8031 A_UINT32 my_bss_rx_cycle_count;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008032} wlan_dcs_im_tgt_stats_t;
8033
8034/**
8035 * wmi_dcs_interference_event_t
8036 *
8037 * Right now this is event and stats together. Partly this is
8038 * because cw interference is handled in target now. This
8039 * can be done at host itself, if we can carry the NF alone
8040 * as a stats event. In future this would be done and this
8041 * event would carry only stats.
8042 */
8043typedef struct {
8044 A_UINT32 tlv_header;
8045 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
8046 /**
8047 * Type of the event present, either the cw interference event, or the wlan_im stats
8048 */
8049 A_UINT32 interference_type; /* type of interference, wlan or cw */
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05308050 /** pdev_id for identifying the MAC
8051 * See macros starting with WMI_PDEV_ID_ for values.
8052 */
8053 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008054 /*
8055 * Following this struct are these TLVs. Note that they are both array of structures
8056 * but can have at most one element. Which TLV is empty or has one element depends
8057 * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
Govind Singh869c9872016-02-22 18:36:34 +05308058 * elements (not arrays). union { wlan_dcs_cw_int cw_int;
8059 * wlan_dcs_im_tgt_stats_t wlan_stat; }
8060 * int_event;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008061 *
8062 * //cw_interference event
Govind Singh869c9872016-02-22 18:36:34 +05308063 * wlan_dcs_cw_int cw_int[]; this element
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008064 * // wlan im interfernce stats
8065 * wlan_dcs_im_tgt_stats_t wlan_stat[];
8066 */
8067} wmi_dcs_interference_event_fixed_param;
8068
8069enum wmi_peer_mcast_group_action {
8070 wmi_peer_mcast_group_action_add = 0,
8071 wmi_peer_mcast_group_action_del = 1
8072};
8073#define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1
8074#define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0
8075#define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
8076#define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
Govind Singh32cced32016-02-01 13:33:09 +05308077/* flag to exclude an ip while filtering.set to exclude */
8078#define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4
8079#define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2
8080/* flag to say ipv4/ipv6. Will be set for ipv6 */
8081#define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8
8082#define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3
8083/* delete all mcast table entries. */
8084#define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10
8085#define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4
8086
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008087/* multicast group membership commands */
8088/* TODO: Converting this will be tricky since it uses an union.
8089 Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
8090typedef struct {
8091 A_UINT32 tlv_header;
8092 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
8093 A_UINT32 flags;
8094 wmi_mac_addr ucast_mac_addr;
Govind Singh32cced32016-02-01 13:33:09 +05308095 /*
8096 * for ipv4, bytes (12-15) should contain ip address and
8097 * other lower bytes 0. ipv6 should have all bytes valid
8098 */
8099 A_UINT8 mcast_ip_addr[16]; /* in network byte order */
8100 /*
8101 * for ipv6, all 16 bytes has to be valid;
8102 * for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s
8103 */
8104 A_UINT8 mcast_ip_mask[16]; /* zero out lower bytes if ipv4 */
8105 /* number of address filters - irrespective of ipv4/ipv6 addresses */
8106 A_UINT32 num_filter_addr;
8107 /*
8108 * this array should contain the src IPs that are to be filtered
8109 * during find. The array should be packed. If there are 2 ipv4
8110 * addresses, there should be 8 bytes and rest all 0s
8111 */
8112 A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */
8113 A_UINT8 vdev_id; /* vdev of this mcast group */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008114} wmi_peer_mcast_group_cmd_fixed_param;
8115
8116/** Offload Scan and Roaming related commands */
8117/** The FW performs 2 different kinds of offload scans independent
8118 * of host. One is Roam scan which is primarily performed on a
8119 * station VDEV after association to look for a better AP that
8120 * the station VDEV can roam to. The second scan is connect scan
8121 * which is mainly performed when the station is not associated
8122 * and to look for a matching AP profile from a list of
8123 * configured profiles. */
8124
8125/**
8126 * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
8127 * the roam scan mode is one of the periodic, rssi change, both, none.
8128 * None : Disable Roam scan. No Roam scan at all.
8129 * Periodic : Scan periodically with a configurable period.
8130 * Rssi change : Scan when ever rssi to current AP changes by the threshold value
8131 * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
8132 * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount)
8133 *
8134 */
8135typedef struct {
8136 A_UINT32 tlv_header;
8137 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
8138 A_UINT32 roam_scan_mode;
8139 A_UINT32 vdev_id;
8140} wmi_roam_scan_mode_fixed_param;
8141
8142#define WMI_ROAM_SCAN_MODE_NONE 0x0
8143#define WMI_ROAM_SCAN_MODE_PERIODIC 0x1
8144#define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
8145#define WMI_ROAM_SCAN_MODE_BOTH 0x3
8146/* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
8147#define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
8148
8149typedef struct {
8150 A_UINT32 tlv_header;
8151 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
8152 A_UINT32 vdev_id;
8153 A_UINT32 command_arg;
8154} wmi_roam_scan_cmd_fixed_param;
8155
8156#define WMI_ROAM_SCAN_STOP_CMD 0x1
8157
8158/**
8159 * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan rssi thresold
8160 * scan rssi threshold is the rssi threshold below which the FW will start running Roam scans.
8161 * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
8162 */
8163typedef struct {
8164 A_UINT32 tlv_header;
8165 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
8166 /** unique id identifying the VDEV, generated by the caller */
8167 A_UINT32 vdev_id;
8168 /** roam scan rssi threshold */
8169 A_UINT32 roam_scan_rssi_thresh;
8170 /** When using Hw generated beacon RSSI interrupts */
8171 A_UINT32 roam_rssi_thresh_diff;
8172 /** 5G scan max count */
8173 A_UINT32 hirssi_scan_max_count;
8174 /** 5G scan rssi change threshold value */
8175 A_UINT32 hirssi_scan_delta;
8176 /** 5G scan upper bound */
8177 A_UINT32 hirssi_upper_bound;
8178 /* The TLVs will follow.
8179 * wmi_roam_scan_extended_threshold_param extended_param;
8180 * wmi_roam_earlystop_rssi_thres_param earlystop_param;
Govind Singhce8fd912016-01-21 10:24:19 +05308181 * wmi_roam_dense_thres_param dense_param;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008182 */
8183} wmi_roam_scan_rssi_threshold_fixed_param;
8184
8185#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0
8186#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
8187#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2
8188#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3
8189
8190typedef struct {
8191 /** TLV tag and len; tag equals
8192 *WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
8193 A_UINT32 tlv_header;
8194 A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
8195 A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
8196 A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
8197 A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
8198 A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
8199 A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
8200 A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
8201 A_UINT32 max_penalty_5g; /** maximum penality that can be applied to a 5GHz RSSI */
8202 /**
8203 * RSSI below which roam is kicked in by background scan
8204 * although rssi is still good
8205 */
8206 A_UINT32 good_rssi_threshold;
8207} wmi_roam_scan_extended_threshold_param;
8208
8209
8210/**
8211 * WMI_ROAM_SCAN_PERIOD: period for roam scan.
8212 * Applicable when the scan mode is Periodic or both.
8213 */
8214typedef struct {
8215 A_UINT32 tlv_header;
8216 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
8217 /** unique id identifying the VDEV, generated by the caller */
8218 A_UINT32 vdev_id;
8219 /** roam scan period value */
8220 A_UINT32 roam_scan_period;
8221 /** Aging for Roam scans */
8222 A_UINT32 roam_scan_age;
8223} wmi_roam_scan_period_fixed_param;
8224
8225/**
8226 * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : rssi delta to trigger the roam scan.
8227 * Rssi change threshold used when mode is Rssi change (or) Both.
8228 * The FW will run the roam scan when ever the rssi changes (up or down) by the value set by this parameter.
8229 * Note scan is triggered based on the rssi threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
8230 */
8231typedef struct {
8232 A_UINT32 tlv_header;
8233 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
8234 /** unique id identifying the VDEV, generated by the caller */
8235 A_UINT32 vdev_id;
8236 /** roam scan rssi change threshold value */
8237 A_UINT32 roam_scan_rssi_change_thresh;
8238 /** When using Hw generated beacon RSSI interrupts */
8239 A_UINT32 bcn_rssi_weight;
8240 /** Minimum delay between two 5G scans */
8241 A_UINT32 hirssi_delay_btw_scans;
8242} wmi_roam_scan_rssi_change_threshold_fixed_param;
8243
8244#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
8245#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
8246#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
8247/**
8248 * TLV for roaming channel list
8249 */
8250typedef struct {
8251 A_UINT32 tlv_header;
8252 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
8253 /** unique id identifying the VDEV, generated by the caller */
8254 A_UINT32 vdev_id;
8255 /** WMI_CHAN_LIST_TAG */
8256 A_UINT32 chan_list_type;
8257 /** # if channels to scan */
8258 A_UINT32 num_chan;
8259/**
8260 * TLV (tag length value ) parameters follow the wmi_roam_chan_list
8261 * structure. The TLV's are:
8262 * A_UINT32 channel_list[];
8263 **/
8264} wmi_roam_chan_list_fixed_param;
8265
8266/** Authentication modes */
8267enum {
8268 WMI_AUTH_NONE, /* no upper level auth */
8269 WMI_AUTH_OPEN, /* open */
8270 WMI_AUTH_SHARED, /* shared-key */
8271 WMI_AUTH_8021X, /* 802.1x */
8272 WMI_AUTH_AUTO, /* Auto */
8273 WMI_AUTH_WPA, /* WPA */
8274 WMI_AUTH_RSNA, /* WPA2/RSNA */
Himanshu Agarwal82972fd2016-05-20 12:23:43 +05308275 WMI_AUTH_CCKM, /* CCKM */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008276 WMI_AUTH_WAPI, /* WAPI */
8277 WMI_AUTH_AUTO_PSK,
8278 WMI_AUTH_WPA_PSK,
8279 WMI_AUTH_RSNA_PSK,
8280 WMI_AUTH_WAPI_PSK,
8281 WMI_AUTH_FT_RSNA, /* 11r FT */
8282 WMI_AUTH_FT_RSNA_PSK,
8283 WMI_AUTH_RSNA_PSK_SHA256,
8284 WMI_AUTH_RSNA_8021X_SHA256,
Himanshu Agarwal82972fd2016-05-20 12:23:43 +05308285 WMI_AUTH_CCKM_WPA,
8286 WMI_AUTH_CCKM_RSNA,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008287};
8288
8289typedef struct {
8290 /** authentication mode (defined above) */
8291 A_UINT32 rsn_authmode;
8292 /** unicast cipher set */
8293 A_UINT32 rsn_ucastcipherset;
8294 /** mcast/group cipher set */
8295 A_UINT32 rsn_mcastcipherset;
8296 /** mcast/group management frames cipher set */
8297 A_UINT32 rsn_mcastmgmtcipherset;
8298} wmi_rsn_params;
8299
8300/** looking for a wps enabled AP */
8301#define WMI_AP_PROFILE_FLAG_WPS 0x1
8302/** looking for a secure AP */
8303#define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
8304/** looking for a PMF enabled AP */
8305#define WMI_AP_PROFILE_FLAG_PMF 0x4
8306
8307/** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
8308 * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
8309 * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
8310 * and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
8311 */
8312
8313typedef struct {
8314 A_UINT32 tlv_header;
8315 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
8316 /** flags as defined above */
8317 A_UINT32 flags;
8318 /**
8319 * rssi thresold value: the value of the the candidate AP should
8320 * higher by this threshold than the rssi of the currrently associated AP.
8321 */
8322 A_UINT32 rssi_threshold;
8323 /**
8324 * ssid vlaue to be matched.
8325 */
8326 wmi_ssid ssid;
8327
8328 /**
8329 * security params to be matched.
8330 */
8331 /** authentication mode (defined above) */
8332 A_UINT32 rsn_authmode;
8333 /** unicast cipher set */
8334 A_UINT32 rsn_ucastcipherset;
8335 /** mcast/group cipher set */
8336 A_UINT32 rsn_mcastcipherset;
8337 /** mcast/group management frames cipher set */
8338 A_UINT32 rsn_mcastmgmtcipherset;
8339} wmi_ap_profile;
8340
8341/** Support early stop roaming scanning when finding a strong candidate AP
8342 * A 'strong' candidate is
8343 * 1) Is eligible candidate
8344 * (all conditions are met in existing candidate selection).
8345 * 2) Its rssi is better than earlystop threshold.
8346 * Earlystop threshold will be relaxed as each channel is scanned.
8347 */
8348typedef struct {
8349 A_UINT32 tlv_header;
8350 /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
8351 A_UINT32 roam_earlystop_thres_min;
8352 /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
8353 A_UINT32 roam_earlystop_thres_max;
8354} wmi_roam_earlystop_rssi_thres_param;
8355
Govind Singhce8fd912016-01-21 10:24:19 +05308356typedef struct {
8357 /* TLV tag and len;
8358 * tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param
8359 */
8360 A_UINT32 tlv_header;
8361 /* rssi threshold offset under trffic and dense env */
8362 A_UINT32 roam_dense_rssi_thres_offset;
8363 /* minimum number of APs to determine dense env */
8364 A_UINT32 roam_dense_min_aps;
8365 /* initial dense status detected by host
8366 * at the time of initial connection */
8367 A_UINT32 roam_dense_status;
8368 /* traffic threshold to enable aggressive roaming in dense env;
8369 * units are percent of medium occupancy, 0 - 100
8370 */
8371 A_UINT32 roam_dense_traffic_thres;
8372} wmi_roam_dense_thres_param;
8373
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008374/** Beacon filter wmi command info */
8375
8376#define BCN_FLT_MAX_SUPPORTED_IES 256
8377#define BCN_FLT_MAX_ELEMS_IE_LIST BCN_FLT_MAX_SUPPORTED_IES/32
8378
8379typedef struct bss_bcn_stats {
8380 A_UINT32 vdev_id;
8381 A_UINT32 bss_bcnsdropped;
8382 A_UINT32 bss_bcnsdelivered;
8383} wmi_bss_bcn_stats_t;
8384
8385typedef struct bcn_filter_stats {
8386 A_UINT32 bcns_dropped;
8387 A_UINT32 bcns_delivered;
8388 A_UINT32 activefilters;
8389 wmi_bss_bcn_stats_t bss_stats;
8390} wmi_bcnfilter_stats_t;
8391
8392typedef struct wmi_add_bcn_filter_cmd {
8393 A_UINT32 tlv_header;
8394 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
8395 A_UINT32 vdev_id;
8396 /*
8397 * Following this structure is the TLV:
8398 * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
8399 */
8400} wmi_add_bcn_filter_cmd_fixed_param;
8401
8402typedef struct wmi_rmv_bcn_filter_cmd {
8403 A_UINT32 tlv_header;
8404 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
8405 A_UINT32 vdev_id;
8406} wmi_rmv_bcn_filter_cmd_fixed_param;
8407
8408#define WMI_BCN_SEND_DTIM_ZERO 1
8409#define WMI_BCN_SEND_DTIM_BITCTL_SET 2
8410typedef struct wmi_bcn_send_from_host {
8411 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */
8412 A_UINT32 vdev_id;
8413 A_UINT32 data_len;
Krishna Kumaar Natarajan7dde8c72016-03-25 15:11:49 -07008414 union {
8415 A_UINT32 frag_ptr; /* Physical address of the frame */
8416 A_UINT32 frag_ptr_lo; /* LSB of physical address of the frame */
8417 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008418 A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
8419 A_UINT32 dtim_flag; /* to control CABQ traffic */
Govind Singh32cced32016-02-01 13:33:09 +05308420 A_UINT32 bcn_antenna; /* Antenna for beacon transmission */
Krishna Kumaar Natarajan7dde8c72016-03-25 15:11:49 -07008421 A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008422} wmi_bcn_send_from_host_cmd_fixed_param;
8423
8424/* cmd to support bcn snd for all vaps at once */
8425typedef struct wmi_pdev_send_bcn {
8426 A_UINT32 num_vdevs;
8427 wmi_bcn_send_from_host_cmd_fixed_param bcn_cmd[1];
8428} wmi_pdev_send_bcn_cmd_t;
8429
8430/*
8431 * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming.
8432 */
8433typedef struct {
8434 A_UINT32 tlv_header;
8435 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
8436 /** id of AP criteria */
8437 A_UINT32 id;
8438
8439 /** unique id identifying the VDEV, generated by the caller */
8440 A_UINT32 vdev_id;
8441
8442 /*
8443 * Following this structure is the TLV:
8444 * wmi_ap_profile ap_profile; //AP profile info
8445 */
8446} wmi_roam_ap_profile_fixed_param;
8447
8448/**
8449 * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
8450 */
8451typedef struct {
8452 /** id of AP criteria */
8453 A_UINT32 id;
8454
8455 /** unique id identifying the VDEV, generated by the caller */
8456 A_UINT32 vdev_id;
8457
8458 /** AP profile info */
8459 wmi_ap_profile ap_profile;
8460
8461} wmi_ofl_scan_add_ap_profile;
8462
8463/**
8464 * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
8465 */
8466typedef struct {
8467 /** id of AP criteria */
8468 A_UINT32 id;
8469 /** unique id identifying the VDEV, generated by the caller */
8470 A_UINT32 vdev_id;
8471} wmi_ofl_scan_remove_ap_profile;
8472
8473/**
8474 * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
8475 * 0 will disable ofload scan and a very low value will perform a continous
8476 * scan.
8477 */
8478typedef struct {
8479 /** offload scan period value, used for scans used when not connected */
8480 A_UINT32 ofl_scan_period;
8481} wmi_ofl_scan_period;
8482
8483/* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
8484#define ROAM_OFFLOAD_PMK_BYTES (32)
8485#define ROAM_OFFLOAD_PSK_MSK_BYTES (32)
8486#define ROAM_OFFLOAD_KRK_BYTES (16)
8487#define ROAM_OFFLOAD_BTK_BYTES (32)
8488#define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
8489#define ROAM_OFFLOAD_NUM_MCS_SET (16)
8490
8491/* This TLV will be filled only in case roam offload
8492 * for wpa2-psk/okc/ese/11r is enabled */
8493typedef struct {
8494 A_UINT32 tlv_header;
8495 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
8496 A_UINT32 rssi_cat_gap; /* gap for every category bucket */
8497 A_UINT32 prefer_5g; /* prefer select 5G candidate */
8498 A_UINT32 select_5g_margin;
8499 A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */
8500 A_UINT32 capability;
8501 A_UINT32 ht_caps_info;
8502 A_UINT32 ampdu_param;
8503 A_UINT32 ht_ext_cap;
8504 A_UINT32 ht_txbf;
8505 A_UINT32 asel_cap;
8506 A_UINT32 qos_enabled;
8507 A_UINT32 qos_caps;
8508 A_UINT32 wmm_caps;
8509 A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET >> 2]; /* since this 4 byte aligned,
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308510 * we don't declare it as
8511 * tlv array */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008512} wmi_roam_offload_tlv_param;
8513
8514/* flags for 11i offload */
8515#define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */
8516/* from bit 1 to bit 31 are reserved */
8517
8518#define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
8519 (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308520} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008521
8522#define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
8523 (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308524} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008525
8526#define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \
8527 ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
8528
8529/* This TLV will be filled only in case of wpa-psk/wpa2-psk */
8530typedef struct {
8531 A_UINT32 tlv_header;
8532 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
8533 A_UINT32 flags;
8534 /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
8535 A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES >> 2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
8536 A_UINT32 pmk_len;
8537 /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
8538} wmi_roam_11i_offload_tlv_param;
8539
8540/* This TLV will be filled only in case of 11R*/
8541typedef struct {
8542 A_UINT32 tlv_header;
8543 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
8544 A_UINT32 mdie_present;
8545 A_UINT32 mdid;
8546 A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN >> 2];
8547 A_UINT32 r0kh_id_len;
8548 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 */
8549 A_UINT32 psk_msk_len;
8550 /**length of psk_msk*/
8551} wmi_roam_11r_offload_tlv_param;
8552
8553/* This TLV will be filled only in case of ESE */
8554typedef struct {
8555 A_UINT32 tlv_header;
8556 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
8557 A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES >> 2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
8558 A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES >> 2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
8559} wmi_roam_ese_offload_tlv_param;
8560
8561/** WMI_ROAM_EVENT: roam event triggering the host roam logic.
8562 * generated when ever a better AP is found in the recent roam scan (or)
8563 * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
8564 * from the current AP.
8565 */
8566typedef struct {
8567 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */
8568 /** unique id identifying the VDEV, generated by the caller */
8569 A_UINT32 vdev_id;
8570 /** reason for roam event */
8571 A_UINT32 reason;
8572 /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI*/
8573 A_UINT32 rssi;
Krishna Kumaar Natarajan79a2a082016-03-25 15:07:07 -07008574 /** roam notification */
8575 A_UINT32 notif;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008576
8577} wmi_roam_event_fixed_param;
8578
Nirav Shah439e6262015-11-05 10:53:18 +05308579/* roam_reason: bits 0-3 */
Krishna Kumaar Natarajan79a2a082016-03-25 15:07:07 -07008580
8581/** invalid reason. Do not interpret reason field */
8582#define WMI_ROAM_REASON_INVALID 0x0
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008583#define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
8584#define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */
8585#define WMI_ROAM_REASON_DEAUTH 0x2 /** deauth/disassoc received */
8586#define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */
8587#define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308588 SSID and Security profile in
8589 WMI_ROAM_AP_PROFILE, found during scan
8590 triggered upon FINAL_BMISS **/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008591#define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */
Govind Singhd0c80a32016-02-01 17:57:48 +05308592
8593/*
8594 * WMI_ROAM_REASON_INVOKE_ROAM_FAIL:
8595 * Result code of WMI_ROAM_INVOKE_CMDID.
8596 * Any roaming failure before reassociation will be indicated to host
8597 * with this reason.
8598 * Any roaming failure after reassociation will be indicated to host with
8599 * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not.
8600 */
8601#define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6
Nirav Shah439e6262015-11-05 10:53:18 +05308602/* reserved up through 0xF */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008603
Nirav Shah439e6262015-11-05 10:53:18 +05308604/* subnet status: bits 4-5 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008605typedef enum {
8606 WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
8607 WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
8608 WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
8609} wmi_roam_subnet_change_status;
8610
Nirav Shah439e6262015-11-05 10:53:18 +05308611#define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30
8612#define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4
8613
8614#define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
8615 do { \
8616 (roam_reason) |= \
8617 (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
8618 WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
8619 } while (0)
8620
8621#define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
8622 (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
8623 WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
8624
Krishna Kumaar Natarajan79a2a082016-03-25 15:07:07 -07008625/* roaming notification */
8626/** invalid notification. Do not interpret notif field */
8627#define WMI_ROAM_NOTIF_INVALID 0x0
8628/** indicate that roaming is started. sent only in non WOW state */
8629#define WMI_ROAM_NOTIF_ROAM_START 0x1
8630/** indicate that roaming is aborted. sent only in non WOW state */
8631#define WMI_ROAM_NOTIF_ROAM_ABORT 0x2
8632
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008633/**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
8634 * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations
8635 */
8636typedef struct {
8637 A_UINT32 tlv_header;
8638 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
8639 A_UINT32 vdev_id;
8640 /**unique id identifying the VDEV, generated by the caller*/
8641 A_UINT32 num_ric_request;
8642 /**number of ric request ie send to firmware.(max value is 2 now)*/
8643 A_UINT32 is_add_ric;
8644 /**support add ric or delete ric*/
8645} wmi_ric_request_fixed_param;
8646
8647/**tspec element: refer to 8.4.2.32 of 802.11 2012 spec
8648 * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
8649 */
8650typedef struct {
8651 A_UINT32 tlv_header;
8652 A_UINT32 ts_info; /** bits value of TS Info field.*/
8653 A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/
8654 A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/
8655 A_UINT32 min_service_interval; /**The Minimum Service Interval field*/
8656 A_UINT32 max_service_interval; /**The Maximum Service Interval field*/
8657 A_UINT32 inactivity_interval; /**The Inactivity Interval field*/
8658 A_UINT32 suspension_interval; /**The Suspension Interval field*/
8659 A_UINT32 svc_start_time; /**The Service Start Time field*/
8660 A_UINT32 min_data_rate; /**The Minimum Data Rate field*/
8661 A_UINT32 mean_data_rate; /**The Mean Data Rate field*/
8662 A_UINT32 peak_data_rate; /**The Peak Data Rate field*/
8663 A_UINT32 max_burst_size; /**The Burst Size field*/
8664 A_UINT32 delay_bound; /**The Delay Bound field*/
8665 A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/
8666 A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
8667 A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/
8668} wmi_ric_tspec;
8669
8670/* flags for roam_invoke_cmd */
8671/* add this channel into roam cache channel list after this command is finished */
8672#define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0
Govind Singhd0c80a32016-02-01 17:57:48 +05308673/* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */
8674#define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE 1
Nitesh Shah3a943062016-06-29 20:28:43 +05308675/* during host-invoked roaming, don't send null data frame to AP */
8676#define WMI_ROAM_INVOKE_FLAG_NO_NULL_FRAME_TO_AP 2
8677/* from bit 3 to bit 31 are reserved */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008678
8679#define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
8680 (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308681 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008682
8683#define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
8684 (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308685 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008686
8687#define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308688 ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008689
8690
8691#define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */
8692#define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */
8693#define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */
8694
8695#define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */
8696#define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */
8697
8698/** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
8699 *
8700 * if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
8701 * if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
8702 *
8703 * This command can be used to add specific channel into roam cached channel list by following
8704 * <roam_scan_ch_mode> = 0
8705 * <roam_ap_sel_mode> = 0
8706 * <roam_delay> = 0
8707 * <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
8708 * <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
8709 * <channel_no> = channel list to be added
8710 */
8711typedef struct {
8712 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
8713 A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
8714 A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
8715 A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
8716 A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
8717 A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
8718 A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
8719 A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */
8720 /**
8721 * TLV (tag length value ) parameters follows roam_invoke_req
8722 * The TLV's are:
8723 * A_UINT32 channel_list[];
8724 * wmi_mac_addr bssid_list[];
8725 */
8726} wmi_roam_invoke_cmd_fixed_param;
8727
8728/* Definition for op_bitmap */
8729enum {
8730 ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1,
8731 ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2,
8732 ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
8733};
8734
8735typedef struct {
8736 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
8737 A_UINT32 tlv_header;
8738 /** Unique id identifying the VDEV on which roaming filter is adopted */
8739 A_UINT32 vdev_id;
8740 A_UINT32 flags; /** flags for filter */
8741 /** 32 bit bitmap to be set on.
8742 * bit0 = first param,
8743 * bit 1 = second param...etc. Can be or'ed
8744 */
8745 A_UINT32 op_bitmap;
8746 /* number of blacklist in the TLV variable bssid_black_list */
8747 A_UINT32 num_bssid_black_list;
8748 /* number of whitelist in the TLV variable ssid_white_list */
8749 A_UINT32 num_ssid_white_list;
8750 /* only for lfr 3.0. number of preferred list & factor in the TLV */
8751 A_UINT32 num_bssid_preferred_list;
8752 /**
8753 * TLV (tag length value ) parameters follows roam_filter_list_cmd
8754 * The TLV's are:
8755 * wmi_mac_addr bssid_black_list[];
8756 * wmi_ssid ssid_white_list[];
8757 * wmi_mac_addr bssid_preferred_list[];
8758 * A_UINT32 bssid_preferred_factor[];
8759 */
8760} wmi_roam_filter_fixed_param;
8761
8762typedef struct {
8763 A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
8764} WMI_IPV4_ADDR;
8765
8766typedef struct _WMI_IPV6_ADDR {
8767 A_UINT8 address[16]; /* IPV6 in Network Byte Order */
8768} WMI_IPV6_ADDR;
8769
8770/* flags for subnet change detection */
8771#define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
8772#define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
8773/* bit 2 to bit 31 are reserved */
8774
8775/* set IPv4 enabled/disabled flag and get the flag */
8776#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
8777 (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
8778} while (0)
8779
8780#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
8781 (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
8782} while (0)
8783
8784#define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
8785 ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
8786
8787/* set IPv6 enabled flag, disabled and get the flag */
8788#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
8789 (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
8790} while (0)
8791
8792#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
8793 (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
8794} while (0)
8795
8796#define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
8797 ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
8798
8799/**
8800 * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
8801 * to FW. FW uses these parameters for subnet change detection.
8802 */
8803typedef struct {
8804 /*
8805 * TLV tag and len; tag equals
8806 * WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param
8807 */
8808 A_UINT32 tlv_header;
8809 /** unique id identifying the VDEV, generated by the caller */
8810 A_UINT32 vdev_id;
8811 /** IPv4/IPv6 enabled/disabled */
8812 /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/
8813 DISABLED */
8814 A_UINT32 flag;
8815 /** Gateway MAC address */
8816 wmi_mac_addr inet_gw_mac_addr;
8817 /** IP addresses */
8818 WMI_IPV4_ADDR inet_gw_ip_v4_addr;
8819 WMI_IPV6_ADDR inet_gw_ip_v6_addr;
8820 /** Number of software retries for ARP/Neighbor solicitation request */
8821 A_UINT32 max_retries;
8822 /** timeout in milliseconds for each ARP request*/
8823 A_UINT32 timeout;
8824 /** number of skipped aps **/
8825 A_UINT32 num_skip_subnet_change_detection_bssid_list;
8826/**
8827 * TLV (tag length value ) parameters follows roam_subnet_change_config_cmd
8828 * structure. The TLV's are:
8829 * wmi_mac_addr skip_subnet_change_detection_bssid_list [];
8830 **/
8831} wmi_roam_subnet_change_config_fixed_param;
8832
8833/** WMI_PROFILE_MATCH_EVENT: offload scan
8834 * generated when ever atleast one of the matching profiles is found
8835 * in recent NLO scan. no data is carried with the event.
8836 */
8837
8838/** P2P specific commands */
8839
8840/**
8841 * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
8842 * FW to generate P2P IE tobe carried in probe response frames.
8843 * FW will respond to probe requests while in listen state.
8844 */
8845typedef struct {
8846 /* number of secondary device types,supported */
8847 A_UINT32 num_secondary_dev_types;
8848 /**
8849 * followed by 8 bytes of primary device id and
8850 * num_secondary_dev_types * 8 bytes of secondary device
8851 * id.
8852 */
8853} wmi_p2p_dev_set_device_info;
8854
8855/** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
8856 * state. if enabled, an active STA/AP will respond to P2P probe requests on
8857 * the operating channel of the VDEV.
8858 */
8859
8860typedef struct {
8861 /* 1:enable disoverability, 0:disable discoverability */
8862 A_UINT32 enable_discoverability;
8863} wmi_p2p_set_discoverability;
8864
8865/** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
8866 * beacons generated by FW. used in FW beacon mode.
8867 * the FW will add this IE to beacon in addition to the beacon
8868 * template set by WMI_BCN_TMPL_CMDID command.
8869 */
8870typedef struct {
8871 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */
8872 /** unique id identifying the VDEV, generated by the caller */
8873 A_UINT32 vdev_id;
8874 /* ie length */
8875 A_UINT32 ie_buf_len;
8876 /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
8877 * A_UINT8 ie_data[]; // length in byte given by field num_data.
8878 */
8879
8880} wmi_p2p_go_set_beacon_ie_fixed_param;
8881
8882/** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
8883 * probe response generated by FW. used in FW beacon mode.
8884 * the FW will add this IE to probe response in addition to the probe response
8885 * template set by WMI_PRB_TMPL_CMDID command.
8886 */
8887typedef struct {
8888 /** unique id identifying the VDEV, generated by the caller */
8889 A_UINT32 vdev_id;
8890 /* ie length */
8891 A_UINT32 ie_buf_len;
8892 /*followed by byte stream of ie data of length ie_buf_len */
8893} wmi_p2p_go_set_probe_resp_ie;
8894
8895/** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
8896 * be used by the FW to parse the P2P NoA attribute in beacons, probe resposes
8897 * and action frames received by the P2P Client.
8898 */
8899typedef struct {
8900 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
8901 /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */
8902 A_UINT32 p2p_ie_oui_type;
8903 /** OS specific NoA Attribute ID */
8904 A_UINT32 p2p_noa_attribute;
8905} wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
8906
8907/*----P2P disc offload definition ----*/
8908
8909typedef struct {
8910 A_UINT32 pattern_type;
8911 /**
8912 * TLV (tag length value ) paramerters follow the pattern structure.
8913 * TLV can contain bssid list, ssid list and
8914 * ie. the TLV tags are defined above;
8915 */
8916} wmi_p2p_disc_offload_pattern_cmd;
8917
8918typedef struct {
8919 /* unique id identifying the VDEV, generated by the caller */
8920 A_UINT32 vdev_id;
8921 /* mgmt type of the ie */
8922 A_UINT32 mgmt_type;
8923 /* ie length */
8924 A_UINT32 ie_buf_len;
8925 /*followed by byte stream of ie data of length ie_buf_len */
8926} wmi_p2p_disc_offload_appie_cmd;
8927
8928typedef struct {
8929 /* enable/disable p2p find offload */
8930 A_UINT32 enable;
8931 /* unique id identifying the VDEV, generated by the caller */
8932 A_UINT32 vdev_id;
8933 /* p2p find type */
8934 A_UINT32 disc_type;
8935 /* p2p find perodic */
8936 A_UINT32 perodic;
8937 /* p2p find listen channel */
8938 A_UINT32 listen_channel;
8939 /* p2p find full channel number */
8940 A_UINT32 num_scan_chans;
8941 /**
8942 * TLV (tag length value ) paramerters follow the pattern structure.
8943 * TLV contain channel list
8944 */
8945} wmi_p2p_disc_offload_config_cmd;
8946
8947/*----P2P OppPS definition ----*/
8948typedef struct {
8949 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */
8950 A_UINT32 tlv_header;
8951 /* unique id identifying the VDEV, generated by the caller */
8952 A_UINT32 vdev_id;
8953 /* OppPS attributes */
8954 /** Bit 0: Indicate enable/disable of OppPS
8955 * Bits 7-1: Ctwindow in TUs
8956 * Bits 31-8: Reserved
8957 */
8958 A_UINT32 oppps_attr;
8959} wmi_p2p_set_oppps_cmd_fixed_param;
8960
8961#define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1
8962#define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0
8963
8964#define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \
8965 WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
8966
8967#define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \
8968 WMI_F_RMW((hdr)->oppps_attr, 0x1, \
8969 WMI_UNIFIED_OPPPS_ATTR_ENALBED);
8970
8971#define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe
8972#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1
8973
8974#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \
8975 WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
8976
8977#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \
8978 WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \
8979 WMI_UNIFIED_OPPPS_ATTR_CTWIN);
8980
Himanshu Agarwalf7bb67b2016-05-30 21:04:30 +05308981typedef enum p2p_lo_start_ctrl_flags_e {
8982 /* flush prob. req when host is awake */
8983 P2P_LO_START_CTRL_FLAG_FLUSH_LISTEN_RESULT = 1 << 0,
8984} p2p_lo_start_ctrl_flags;
8985
8986typedef struct {
8987 A_UINT32 tlv_header;
8988 A_UINT32 vdev_id;
8989 A_UINT32 ctl_flags; /* refer to enum_p2p_lo_start_ctrl_flags_e */
8990 A_UINT32 channel; /* MHz */
8991 A_UINT32 period; /* ms */
8992 A_UINT32 interval; /* ms, interval should be larger than period */
8993 A_UINT32 count; /* 0 means forever */
8994 /*
8995 * device_types_len specifies the number of bytes in the
8996 * device_types_data[] byte-array TLV that follows this TLV.
8997 * The data in device_types_data[] is in 8-byte elements, so
8998 * device_types_len will be a multiple of 8.
8999 */
9000 A_UINT32 device_types_len;
9001 /*
9002 * prob_resp_len specifies the number of bytes in the
9003 * prob_resp_data[] byte-array TLV that follows this TLV.
9004 */
9005 A_UINT32 prob_resp_len;
9006 /*
9007 * Two other TLVs follow this TLV:
9008 * A_UINT8 device_types_data[device_types_len];
9009 * A_UINT8 prob_resp_data[prob_resp_len];
9010 * The information in device_types_data[] and prob_resp_data[]
9011 * needs to be provided to the target in over-the-air byte order.
9012 * On a big-endian host, if device_types_data and prob_resp_data
9013 * are initially in the correct over-the-air byte order,
9014 * the automatic byteswap for endianness-correction during WMI
9015 * message download will mess up the byte order.
9016 * Thus, a big-endian host needs to explicitly byte-swap the bytes
9017 * within each quad-byte segment of device_types_data[] and
9018 * prob_resp_data[], so that the automatic byte-swap applied during
9019 * WMI download from a big-endian host to the little-endian target
9020 * will restore device_types_data and prob_resp_data into the
9021 * correct byte ordering.
9022 */
9023} wmi_p2p_lo_start_cmd_fixed_param;
9024
9025typedef struct {
9026 A_UINT32 tlv_header;
9027 A_UINT32 vdev_id;
9028} wmi_p2p_lo_stop_cmd_fixed_param;
9029
9030typedef enum p2p_lo_stopped_reason_e {
9031 /* finished as scheduled */
9032 P2P_LO_STOPPED_REASON_COMPLETE = 0,
9033 /* host stops it */
9034 P2P_LO_STOPPED_REASON_RECV_STOP_CMD,
9035 /* invalid listen offload par */
9036 P2P_LO_STOPPED_REASON_INVALID_LO_PAR,
9037 /* vdev cannot support it right now */
9038 P2P_LO_STOPPED_REASON_FW_NOT_SUPPORT,
9039} p2p_lo_stopped_reason;
9040
9041typedef struct {
9042 A_UINT32 tlv_header;
9043 A_UINT32 vdev_id;
9044 A_UINT32 reason; /* refer to p2p_lo_stopped_reason_e */
9045} wmi_p2p_lo_stopped_event_fixed_param;
9046
Anurag Chouhan11b53a12016-07-28 12:39:46 +05309047typedef enum {
9048 WMI_MNT_FILTER_CONFIG_MANAGER,
9049 WMI_MNT_FILTER_CONFIG_CONTROL,
9050 WMI_MNT_FILTER_CONFIG_DATA,
9051 WMI_MNT_FILTER_CONFIG_ALL,
9052 WMI_MNT_FILTER_CONFIG_UNKNOWN,
9053} WMI_MNT_FILTER_CONFIG_TYPE;
9054
9055typedef struct {
9056 A_UINT32 tlv_header;
9057 A_UINT32 vdev_id;
9058 A_UINT32 clear_or_set;
9059 A_UINT32 configure_type; /* see WMI_MNT_FILTER_CONFIG_TYPE */
9060} wmi_mnt_filter_cmd_fixed_param;
9061
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009062typedef struct {
9063 A_UINT32 time32; /* upper 32 bits of time stamp */
9064 A_UINT32 time0; /* lower 32 bits of time stamp */
9065} A_TIME64;
9066
9067typedef enum wmi_peer_sta_kickout_reason {
9068 WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */
9069 WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
9070 WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
9071 WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
9072 WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */
9073 WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
9074} PEER_KICKOUT_REASON;
9075
9076typedef struct {
9077 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */
9078 /** peer mac address */
9079 wmi_mac_addr peer_macaddr;
9080 /** Reason code, defined as above */
9081 A_UINT32 reason;
9082 /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
9083 A_UINT32 rssi;
9084} wmi_peer_sta_kickout_event_fixed_param;
9085
9086#define WMI_WLAN_PROFILE_MAX_HIST 3
9087#define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
9088
9089typedef struct _wmi_wlan_profile_t {
9090 A_UINT32 tlv_header;
9091 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
9092 A_UINT32 id;
9093 A_UINT32 cnt;
9094 A_UINT32 tot;
9095 A_UINT32 min;
9096 A_UINT32 max;
9097 A_UINT32 hist_intvl;
9098 A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
9099} wmi_wlan_profile_t;
9100
9101typedef struct _wmi_wlan_profile_ctx_t {
9102 A_UINT32 tlv_header;
9103 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
9104 A_UINT32 tot; /* time in us */
9105 A_UINT32 tx_msdu_cnt;
9106 A_UINT32 tx_mpdu_cnt;
9107 A_UINT32 tx_ppdu_cnt;
9108 A_UINT32 rx_msdu_cnt;
9109 A_UINT32 rx_mpdu_cnt;
9110 A_UINT32 bin_count;
9111} wmi_wlan_profile_ctx_t;
9112
9113typedef struct {
9114 A_UINT32 tlv_header;
9115 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
9116 A_UINT32 enable;
9117} wmi_wlan_profile_trigger_cmd_fixed_param;
9118
9119typedef struct {
9120 A_UINT32 tlv_header;
9121 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
9122 A_UINT32 value;
9123} wmi_wlan_profile_get_prof_data_cmd_fixed_param;
9124
9125typedef struct {
9126 A_UINT32 tlv_header;
9127 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
9128 A_UINT32 profile_id;
9129 A_UINT32 value;
9130} wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
9131
9132typedef struct {
9133 A_UINT32 tlv_header;
9134 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
9135 A_UINT32 profile_id;
9136 A_UINT32 enable;
9137} wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
9138
9139/*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
9140 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
9141 when comparing wifi header.*/
9142/* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
9143#define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146
9144#define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
9145#define WOW_DEFAULT_BITMASK_SIZE 146
9146#define WOW_DEFAULT_BITMASK_SIZE_DWORD 37
9147#define WOW_MAX_BITMAP_FILTERS 32
9148#define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16
9149#define WOW_EXTEND_PATTERN_MATCH_CNT 16
9150#define WOW_SHORT_PATTERN_MATCH_CNT 8
9151#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 +05309152 The 148 comes from (128 - 14 ) payload size + 8bytes LLC + 26bytes MAC header */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009153#define WOW_DEFAULT_IOAC_PATTERN_SIZE 6
9154#define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
9155#define WOW_DEFAULT_IOAC_RANDOM_SIZE 6
9156#define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
9157#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120
9158#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
9159#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32
9160#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
9161#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32
9162#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08009163#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128
9164#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009165
9166typedef enum pattern_type_e {
9167 WOW_PATTERN_MIN = 0,
9168 WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
9169 WOW_IPV4_SYNC_PATTERN,
9170 WOW_IPV6_SYNC_PATTERN,
9171 WOW_WILD_CARD_PATTERN,
9172 WOW_TIMER_PATTERN,
9173 WOW_MAGIC_PATTERN,
9174 WOW_IPV6_RA_PATTERN,
9175 WOW_IOAC_PKT_PATTERN,
9176 WOW_IOAC_TMR_PATTERN,
9177 WOW_IOAC_SOCK_PATTERN,
9178 WOW_PATTERN_MAX
9179} WOW_PATTERN_TYPE;
9180
9181typedef enum event_type_e {
9182 WOW_BMISS_EVENT = 0,
9183 WOW_BETTER_AP_EVENT,
9184 WOW_DEAUTH_RECVD_EVENT,
9185 WOW_MAGIC_PKT_RECVD_EVENT,
9186 WOW_GTK_ERR_EVENT,
9187 WOW_FOURWAY_HSHAKE_EVENT,
9188 WOW_EAPOL_RECVD_EVENT,
9189 WOW_NLO_DETECTED_EVENT,
9190 WOW_DISASSOC_RECVD_EVENT,
9191 WOW_PATTERN_MATCH_EVENT,
9192 WOW_CSA_IE_EVENT,
9193 WOW_PROBE_REQ_WPS_IE_EVENT,
9194 WOW_AUTH_REQ_EVENT,
9195 WOW_ASSOC_REQ_EVENT,
9196 WOW_HTT_EVENT,
9197 WOW_RA_MATCH_EVENT,
9198 WOW_HOST_AUTO_SHUTDOWN_EVENT,
9199 WOW_IOAC_MAGIC_EVENT,
9200 WOW_IOAC_SHORT_EVENT,
9201 WOW_IOAC_EXTEND_EVENT,
9202 WOW_IOAC_TIMER_EVENT,
9203 WOW_DFS_PHYERR_RADAR_EVENT,
9204 WOW_BEACON_EVENT,
9205 WOW_CLIENT_KICKOUT_EVENT,
9206 WOW_NAN_EVENT,
9207 WOW_EXTSCAN_EVENT,
9208 WOW_IOAC_REV_KA_FAIL_EVENT,
9209 WOW_IOAC_SOCK_EVENT,
9210 WOW_NLO_SCAN_COMPLETE_EVENT,
Govind Singh941bd5e2016-02-04 17:15:25 +05309211 WOW_NAN_DATA_EVENT,
Himanshu Agarwal82972fd2016-05-20 12:23:43 +05309212 WOW_NAN_RTT_EVENT, /* DEPRECATED, UNUSED */
9213 /* reuse deprecated event value */
9214 WOW_OEM_RESPONSE_EVENT = WOW_NAN_RTT_EVENT,
Krishna Kumaar Natarajan3bd73642016-03-25 13:59:54 -07009215 WOW_TDLS_CONN_TRACKER_EVENT,
Anurag Chouhan05d05fe2016-04-18 17:09:24 +05309216 WOW_CRITICAL_LOG_EVENT,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009217} WOW_WAKE_EVENT_TYPE;
9218
9219typedef enum wake_reason_e {
9220 WOW_REASON_UNSPECIFIED = -1,
9221 WOW_REASON_NLOD = 0,
9222 WOW_REASON_AP_ASSOC_LOST,
9223 WOW_REASON_LOW_RSSI,
9224 WOW_REASON_DEAUTH_RECVD,
9225 WOW_REASON_DISASSOC_RECVD,
9226 WOW_REASON_GTK_HS_ERR,
9227 WOW_REASON_EAP_REQ,
9228 WOW_REASON_FOURWAY_HS_RECV,
9229 WOW_REASON_TIMER_INTR_RECV,
9230 WOW_REASON_PATTERN_MATCH_FOUND,
9231 WOW_REASON_RECV_MAGIC_PATTERN,
9232 WOW_REASON_P2P_DISC,
9233 WOW_REASON_WLAN_HB,
9234 WOW_REASON_CSA_EVENT,
9235 WOW_REASON_PROBE_REQ_WPS_IE_RECV,
9236 WOW_REASON_AUTH_REQ_RECV,
9237 WOW_REASON_ASSOC_REQ_RECV,
9238 WOW_REASON_HTT_EVENT,
9239 WOW_REASON_RA_MATCH,
9240 WOW_REASON_HOST_AUTO_SHUTDOWN,
9241 WOW_REASON_IOAC_MAGIC_EVENT,
9242 WOW_REASON_IOAC_SHORT_EVENT,
9243 WOW_REASON_IOAC_EXTEND_EVENT,
9244 WOW_REASON_IOAC_TIMER_EVENT,
9245 WOW_REASON_ROAM_HO,
9246 WOW_REASON_DFS_PHYERR_RADADR_EVENT,
9247 WOW_REASON_BEACON_RECV,
9248 WOW_REASON_CLIENT_KICKOUT_EVENT,
9249 WOW_REASON_NAN_EVENT,
9250 WOW_REASON_EXTSCAN,
9251 WOW_REASON_RSSI_BREACH_EVENT,
9252 WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
9253 WOW_REASON_IOAC_SOCK_EVENT,
9254 WOW_REASON_NLO_SCAN_COMPLETE,
9255 WOW_REASON_PACKET_FILTER_MATCH,
9256 WOW_REASON_ASSOC_RES_RECV,
9257 WOW_REASON_REASSOC_REQ_RECV,
9258 WOW_REASON_REASSOC_RES_RECV,
9259 WOW_REASON_ACTION_FRAME_RECV,
Manikandan Mohan130eb572015-12-23 13:53:34 -08009260 WOW_REASON_BPF_ALLOW,
Govind Singh941bd5e2016-02-04 17:15:25 +05309261 WOW_REASON_NAN_DATA,
Himanshu Agarwal82972fd2016-05-20 12:23:43 +05309262 WOW_REASON_NAN_RTT, /* DEPRECATED, UNUSED */
9263 /* reuse deprecated reason value */
9264 WOW_REASON_OEM_RESPONSE_EVENT = WOW_REASON_NAN_RTT,
Krishna Kumaar Natarajan3bd73642016-03-25 13:59:54 -07009265 WOW_REASON_TDLS_CONN_TRACKER_EVENT,
Anurag Chouhan05d05fe2016-04-18 17:09:24 +05309266 WOW_REASON_CRITICAL_LOG,
Himanshu Agarwalf7bb67b2016-05-30 21:04:30 +05309267 WOW_REASON_P2P_LISTEN_OFFLOAD,
Nitesh Shah44611be2016-07-21 15:27:37 +05309268 WOW_REASON_NAN_EVENT_WAKE_HOST,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009269 WOW_REASON_DEBUG_TEST = 0xFF,
9270} WOW_WAKE_REASON_TYPE;
9271
9272typedef enum {
9273 WOW_IFACE_PAUSE_ENABLED,
9274 WOW_IFACE_PAUSE_DISABLED
9275} WOW_IFACE_STATUS;
9276
9277enum {
9278 /* some win10 platfrom will not assert pcie_reset for wow.*/
9279 WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001,
Govind Singhb5158e22016-02-04 15:38:30 +05309280 /*
9281 * WMI_WOW_FLAG_SEND_PM_PME
9282 * Some platforms have issues if the PM_PME message is sent after WoW,
9283 * so don't send PM_PME after WoW unless the host uses this flag
9284 * to request it.
9285 */
9286 WMI_WOW_FLAG_SEND_PM_PME = 0x00000002,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009287};
9288
9289
9290typedef struct {
9291 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */
9292 A_UINT32 enable;
9293 A_UINT32 pause_iface_config;
9294 A_UINT32 flags; /* WMI_WOW_FLAG enums */
9295} wmi_wow_enable_cmd_fixed_param;
9296
9297typedef struct {
9298 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */
9299 /** Reserved for future use */
9300 A_UINT32 reserved0;
9301} wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
9302
9303#define WOW_ICMPV6_NA_FILTER_DISABLE 0
9304#define WOW_ICMPV6_NA_FILTER_ENABLE 1
9305
9306typedef struct {
9307 /* TLV tag and len;
9308 * tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param
9309 */
9310 A_UINT32 tlv_header;
9311 A_UINT32 vdev_id;
9312 A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
9313} wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
9314
9315typedef struct bitmap_pattern_s {
9316 A_UINT32 tlv_header;
9317 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
9318 A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
9319 A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
9320 A_UINT32 pattern_offset;
9321 A_UINT32 pattern_len;
9322 A_UINT32 bitmask_len;
9323 A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
9324} WOW_BITMAP_PATTERN_T;
9325
9326typedef struct ipv4_sync_s {
9327 A_UINT32 tlv_header;
9328 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
9329 A_UINT32 ipv4_src_addr;
9330 A_UINT32 ipv4_dst_addr;
9331 A_UINT32 tcp_src_prt;
9332 A_UINT32 tcp_dst_prt;
9333} WOW_IPV4_SYNC_PATTERN_T;
9334
9335typedef struct ipv6_sync_s {
9336 A_UINT32 tlv_header;
9337 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
9338 A_UINT32 ipv6_src_addr[4];
9339 A_UINT32 ipv6_dst_addr[4];
9340 A_UINT32 tcp_src_prt;
9341 A_UINT32 tcp_dst_prt;
9342} WOW_IPV6_SYNC_PATTERN_T;
9343
9344typedef struct WOW_MAGIC_PATTERN_CMD {
9345 A_UINT32 tlv_header;
9346 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
9347 wmi_mac_addr macaddr;
9348} WOW_MAGIC_PATTERN_CMD;
9349
9350typedef enum wow_ioac_pattern_type {
9351 WOW_IOAC_MAGIC_PATTERN = 1,
9352 WOW_IOAC_SHORT_PATTERN,
9353 WOW_IOAC_EXTEND_PATTERN,
9354} WOW_IOAC_PATTERN_TYPE;
9355
9356typedef struct ioac_sock_pattern_s {
9357 /**
9358 * TLV tag and len;
9359 * tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T
9360 */
9361 A_UINT32 tlv_header;
9362 A_UINT32 id;
9363 A_UINT32 local_ipv4;
9364 A_UINT32 remote_ipv4;
9365 A_UINT32 local_port;
9366 A_UINT32 remote_port;
9367 A_UINT32 pattern_len; /* units = bytes */
9368 A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08009369 WMI_IPV6_ADDR local_ipv6;
9370 WMI_IPV6_ADDR remote_ipv6;
9371 A_UINT32 ack_nak_len;
9372 A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
9373 A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009374} WOW_IOAC_SOCK_PATTERN_T;
9375
9376typedef struct ioac_pkt_pattern_s {
9377 A_UINT32 tlv_header;
9378 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
9379 A_UINT32 pattern_type;
9380 A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
9381 A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
9382 A_UINT32 pattern_len;
9383 A_UINT32 random_len;
9384} WOW_IOAC_PKT_PATTERN_T;
9385
9386typedef struct ioac_tmr_pattern_s {
9387 A_UINT32 tlv_header;
9388 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
9389 A_UINT32 wake_in_s;
9390 A_UINT32 vdev_id;
9391} WOW_IOAC_TMR_PATTERN_T;
9392
9393typedef struct {
9394 A_UINT32 tlv_header;
9395 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
9396 A_UINT32 nID;
9397} WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
9398
9399typedef struct {
9400 A_UINT32 tlv_header;
9401 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
9402 A_UINT32 nID;
9403} WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
9404
9405typedef struct ioac_keepalive_s {
9406 A_UINT32 tlv_header;
9407 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
9408 A_UINT32
9409 keepalive_pkt_buf
9410 [WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
9411 A_UINT32 keepalive_pkt_len;
9412 A_UINT32 period_in_ms;
9413 A_UINT32 vdev_id;
9414 A_UINT32 max_loss_cnt;
9415 A_UINT32 local_ipv4;
9416 A_UINT32 remote_ipv4;
9417 A_UINT32 local_port;
9418 A_UINT32 remote_port;
9419 A_UINT32 recv_period_in_ms;
9420 A_UINT32 rev_ka_size;
9421 A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08009422 WMI_IPV6_ADDR local_ipv6;
9423 WMI_IPV6_ADDR remote_ipv6;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009424} WMI_WOW_IOAC_KEEPALIVE_T;
9425
9426typedef struct {
9427 A_UINT32 tlv_header;
9428 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
9429 A_UINT32 vdev_id;
9430 A_UINT32 pattern_type;
9431/*
9432 * Following this struct are these TLVs. Note that they are all array of structures
9433 * but can have at most one element. Which TLV is empty or has one element depends
9434 * on the field pattern_type. This is to emulate an union.
9435 * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
9436 * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
9437 */
9438} WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
9439
9440typedef struct {
9441 A_UINT32 tlv_header;
9442 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
9443 A_UINT32 vdev_id;
9444 A_UINT32 pattern_type;
9445 A_UINT32 pattern_id;
9446} WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
9447
9448typedef struct {
9449 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
9450 A_UINT32 vdev_id;
9451 A_UINT32 pattern_id;
9452 A_UINT32 pattern_type;
9453 /*
9454 * Following this struct are these TLVs. Note that they are all array of structures
9455 * but can have at most one element. Which TLV is empty or has one element depends
9456 * on the field pattern_type. This is to emulate an union.
9457 * WOW_BITMAP_PATTERN_T pattern_info_bitmap[];
9458 * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[];
9459 * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[];
9460 * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[];
9461 * A_UINT32 pattern_info_timeout[];
9462 * A_UINT32 ra_ratelimit_interval;
9463 */
9464} WMI_WOW_ADD_PATTERN_CMD_fixed_param;
9465
9466typedef struct {
9467 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
9468 A_UINT32 vdev_id;
9469 A_UINT32 pattern_id;
9470 A_UINT32 pattern_type;
9471} WMI_WOW_DEL_PATTERN_CMD_fixed_param;
9472
Himanshu Agarwal2690e462016-06-03 14:26:01 +05309473#define WMI_WOW_MAX_EVENT_BM_LEN 4
9474
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009475typedef struct {
9476 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */
9477 A_UINT32 vdev_id;
9478 A_UINT32 is_add;
Himanshu Agarwal2690e462016-06-03 14:26:01 +05309479 union {
9480 A_UINT32 event_bitmap;
9481 A_UINT32 event_bitmaps[WMI_WOW_MAX_EVENT_BM_LEN];
9482 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009483} WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
9484
9485/*
9486 * This structure is used to set the pattern to check UDP packet in WOW mode.
9487 * If match, construct a tx frame in a local buffer to send through the peer
9488 * AP to the entity in the IP network that sent the UDP packet to this STA.
9489 */
9490typedef struct {
9491 /*
9492 * TLV tag and len;
9493 * tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param
9494 */
9495 A_UINT32 tlv_header;
9496 A_UINT32 vdev_id;
9497 A_UINT32 enable; /* 1: enable, 0: disable */
9498 /*
9499 * dest_port -
9500 * bits 7:0 contain the LSB of the UDP dest port,
9501 * bits 15:8 contain the MSB of the UDP dest port
9502 */
9503 A_UINT32 dest_port;
9504 A_UINT32 pattern_len; /* length in byte of pattern[] */
9505 A_UINT32 response_len; /* length in byte of response[] */
9506 /*
9507 * Following this struct are the TLV's:
9508 * payload of UDP packet to be checked, network byte order
9509 * A_UINT8 pattern[];
9510 * payload of UDP packet to be response, network byte order
9511 * A_UINT8 response[];
9512 */
9513} WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
9514
9515/*
9516 * This structure is used to set the pattern for WOW host wakeup pin pulse
9517 * pattern confirguration.
9518 */
9519typedef struct {
9520 /*
9521 * TLV tag and len; tag equals
9522 * WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param
9523 */
9524 A_UINT32 tlv_header;
9525
9526 /* 1: enable, 0: disable */
9527 A_UINT32 enable;
9528
9529 /* pin for host wakeup */
9530 A_UINT32 pin;
9531
9532 /* interval for keeping low voltage, unit: ms */
9533 A_UINT32 interval_low;
9534
9535 /* interval for keeping high voltage, unit: ms */
9536 A_UINT32 interval_high;
9537
9538 /* repeat times for pulse (0xffffffff means forever) */
9539 A_UINT32 repeat_cnt;
9540} WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
9541
Anurag Chouhan86eab9b2016-04-21 16:22:47 +05309542#define MAX_SUPPORTED_ACTION_CATEGORY 256
9543#define MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST (MAX_SUPPORTED_ACTION_CATEGORY/32)
9544
9545typedef enum {
9546 WOW_ACTION_WAKEUP_OPERATION_RESET = 0,
9547 WOW_ACTION_WAKEUP_OPERATION_SET,
9548 WOW_ACTION_WAKEUP_OPERATION_ADD_SET,
9549 WOW_ACTION_WAKEUP_OPERATION_DELETE_SET,
9550} WOW_ACTION_WAKEUP_OPERATION;
9551
9552typedef struct {
9553 /*
9554 * TLV tag and len; tag equals
9555 * WMITLV_TAG_STRUC_WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param
9556 */
9557 A_UINT32 tlv_header;
9558 A_UINT32 vdev_id;
9559 /*
9560 * 0 reset to fw default, 1 set the bits, 2 add the setting bits,
9561 * 3 delete the setting bits
9562 */
9563 A_UINT32 operation;
9564 A_UINT32 action_category_map[MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST];
9565} WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param;
9566
9567
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009568typedef struct wow_event_info_s {
9569 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */
9570 A_UINT32 vdev_id;
9571 A_UINT32 flag; /*This is current reserved. */
9572 A_INT32 wake_reason;
9573 A_UINT32 data_len;
9574} WOW_EVENT_INFO_fixed_param;
9575
9576typedef struct wow_initial_wakeup_event_s {
9577 /*
9578 * TLV tag and len; tag equals
9579 * WOW_INITIAL_WAKEUP_EVENT_fixed_param
9580 */
9581 A_UINT32 tlv_header;
9582 A_UINT32 vdev_id;
9583} WOW_INITIAL_WAKEUP_EVENT_fixed_param;
9584
9585typedef enum {
9586 WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
9587 WOW_EVENT_INFO_TYPE_BITMAP,
9588 WOW_EVENT_INFO_TYPE_GTKIGTK,
9589} WOW_EVENT_INFO_TYPE;
9590
9591typedef struct wow_event_info_section_s {
9592 A_UINT32 data_type;
9593 A_UINT32 data_len;
9594} WOW_EVENT_INFO_SECTION;
9595
9596typedef struct wow_event_info_section_packet_s {
9597 A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
9598} WOW_EVENT_INFO_SECTION_PACKET;
9599
9600typedef struct wow_event_info_section_bitmap_s {
9601 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */
9602 A_UINT32 flag; /*This is current reserved. */
9603 A_UINT32 value; /*This could be the pattern id for bitmap pattern. */
9604 A_UINT32 org_len; /*The length of the orginal packet. */
9605} WOW_EVENT_INFO_SECTION_BITMAP;
9606
9607/**
9608 * This command is sent from WLAN host driver to firmware to
9609 * enable or disable D0-WOW. D0-WOW means APSS suspend with
9610 * PCIe link and DDR being active.
9611 *
9612 *
9613 * Entering D0-WOW Mode (based on kernel suspend request):
9614 * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
9615 * target: Take action (e.g. dbglog suspend)
9616 * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
9617 *
9618 * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
9619 * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
9620 * target: Take action (e.g. dbglog resume)
9621 * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
9622 *
9623 * This command is applicable only on the PCIE LL systems
9624 * Host can enter either D0-WOW or WOW mode, but NOT both at same time
9625 * Decision to enter D0-WOW or WOW is based on active interfaces
9626 *
9627 */
9628typedef struct {
9629 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */
9630 A_UINT32 enable; /* 1 = enable, 0 = disable */
9631} wmi_d0_wow_enable_disable_cmd_fixed_param;
9632
9633typedef enum extend_wow_type_e {
9634 EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */
9635 EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */
9636 EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08009637 EXTWOW_TYPE_APP_PULSETEST,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009638 EXTWOW_DISABLED = 255,
9639} EXTWOW_TYPE;
9640
9641typedef struct {
9642 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */
9643 A_UINT32 vdev_id;
9644 A_UINT32 type;
9645 A_UINT32 wakeup_pin_num;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08009646 A_UINT32 swol_pulsetest_type;
9647 A_UINT32 swol_pulsetest_application;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009648} wmi_extwow_enable_cmd_fixed_param;
9649
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08009650#define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
9651#define SWOL_INDOOR_KEY_LEN 16
9652
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009653typedef struct {
9654 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */
9655 A_UINT32 vdev_id;
9656 wmi_mac_addr wakee_mac;
9657 A_UINT8 ident[8];
9658 A_UINT8 passwd[16];
9659 A_UINT32 ident_len;
9660 A_UINT32 passwd_len;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08009661
9662 /* indoor check parameters */
9663 /* key for mac addresses specified in swol_indoor_key_mac
9664 * Big-endian hosts need to byte-swap the bytes within each 4-byte
9665 * segment of this array, so the bytes will return to their original
9666 * order when the entire WMI message contents are byte-swapped to
9667 * convert from big-endian to little-endian format.
9668 */
9669 A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
9670 /* key length for specified mac address index
9671 * Big-endian hosts need to byte-swap the bytes within each 4-byte
9672 * segment of this array, so the bytes will return to their original
9673 * order when the entire WMI message contents are byte-swapped to
9674 * convert from big-endian to little-endian format.
9675 */
9676 A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
9677 /* mac address array allowed to wakeup host*/
9678 wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
9679 /* app mask for the mac addresses specified in swol_indoor_key_mac */
9680 A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
9681 A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
9682 A_UINT32 swol_indoor_pw_check; /* whether to check password */
9683 A_UINT32 swol_indoor_pattern; /* wakeup pattern */
9684 A_UINT32 swol_indoor_exception; /* wakeup when exception happens */
9685 A_UINT32 swol_indoor_exception_app;
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +05309686 A_UINT32 swol_assist_enable; /* whether to enable IoT mode */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009687} wmi_extwow_set_app_type1_params_cmd_fixed_param;
9688
9689typedef struct {
9690 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */
9691 A_UINT32 vdev_id;
9692
9693 A_UINT8 rc4_key[16];
9694 A_UINT32 rc4_key_len;
9695
9696 /** ip header parameter */
9697 A_UINT32 ip_id; /* NC id */
9698 A_UINT32 ip_device_ip; /* NC IP address */
9699 A_UINT32 ip_server_ip; /* Push server IP address */
9700
9701 /** tcp header parameter */
9702 A_UINT16 tcp_src_port; /* NC TCP port */
9703 A_UINT16 tcp_dst_port; /* Push server TCP port */
9704 A_UINT32 tcp_seq;
9705 A_UINT32 tcp_ack_seq;
9706
9707 A_UINT32 keepalive_init; /* Initial ping interval */
9708 A_UINT32 keepalive_min; /* Minimum ping interval */
9709 A_UINT32 keepalive_max; /* Maximum ping interval */
9710 A_UINT32 keepalive_inc; /* Increment of ping interval */
9711
9712 wmi_mac_addr gateway_mac;
9713 A_UINT32 tcp_tx_timeout_val;
9714 A_UINT32 tcp_rx_timeout_val;
9715
9716 /** add extra parameter for backward-compatible */
9717 /*
9718 * For all byte arrays, natural order is used. E.g.
9719 * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
9720 * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
9721 */
9722
9723 /* used to encrypt transmit packet such as keep-alive */
9724 A_UINT8 rc4_write_sandbox[256];
9725 A_UINT32 rc4_write_x;
9726 A_UINT32 rc4_write_y;
9727
9728 /* used to decrypt received packet such as wow data */
9729 A_UINT8 rc4_read_sandbox[256];
9730 A_UINT32 rc4_read_x;
9731 A_UINT32 rc4_read_y;
9732
9733 /* used to caculate HMAC hash for transmit packet such as keep-alive */
9734 A_UINT8 ssl_write_seq[8];
9735 A_UINT8 ssl_sha1_write_key[64];
9736 A_UINT32 ssl_sha1_write_key_len;
9737
9738 /* used to calculate HAMC hash for receive packet such as wow data */
9739 A_UINT8 ssl_read_seq[8];
9740 A_UINT8 ssl_sha1_read_key[64];
9741 A_UINT32 ssl_sha1_read_key_len;
9742
9743 /* optional element for specifying TCP options data to include in
9744 * transmit packets such as keep-alive
9745 */
9746 A_UINT32 tcp_options_len;
9747 A_UINT8 tcp_options[40];
9748
9749 A_UINT32 async_id; /* keep-alive request id */
9750} wmi_extwow_set_app_type2_params_cmd_fixed_param;
9751
9752#define WMI_RXERR_CRC 0x01 /* CRC error on frame */
9753#define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
9754#define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */
9755#define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
9756
9757typedef enum {
9758 PKT_PWR_SAVE_PAID_MATCH = 0x0001,
9759 PKT_PWR_SAVE_GID_MATCH = 0x0002,
9760 PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x0004,
9761 PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x0008,
9762 PKT_PWR_SAVE_EOF_PAD_DELIM = 0x0010,
9763 PKT_PWR_SAVE_MACADDR_MISMATCH = 0x0020,
9764 PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x0040,
9765 PKT_PWR_SAVE_GID_NSTS_ZERO = 0x0080,
9766 PKT_PWR_SAVE_RSSI_CHECK = 0x0100,
9767 PKT_PWR_SAVE_5G_EBT = 0x0200,
9768 PKT_PWR_SAVE_2G_EBT = 0x0400,
9769 WMI_PKT_PWR_SAVE_MAX = 0x0800,
9770} WMI_PKT_PWR_SAVE_TYPE;
9771
9772typedef struct {
9773 A_UINT32 tlv_header;
9774 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
9775 A_UINT32 num_data;
9776 /** length in byte of data[]. */
Govind Singh869c9872016-02-22 18:36:34 +05309777 /** pdev_id for identifying the MAC
9778 * See macros starting with WMI_PDEV_ID_ for values.
9779 */
9780 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009781 /* This structure is used to send Factory Test Mode [FTM] command
9782 * from host to firmware for integrated chips which are binary blobs.
9783 * Following this structure is the TLV:
9784 * A_UINT8 data[]; // length in byte given by field num_data.
9785 */
9786} wmi_ftm_intg_cmd_fixed_param;
9787
9788typedef struct {
9789 A_UINT32 tlv_header;
9790 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
9791 A_UINT32 num_data;
9792 /** length in byte of data[]. */
9793 /* This structure is used to receive Factory Test Mode [FTM] event
9794 * from firmware to host for integrated chips which are binary blobs.
9795 * Following this structure is the TLV:
9796 * A_UINT8 data[]; // length in byte given by field num_data.
9797 */
9798} wmi_ftm_intg_event_fixed_param;
9799
9800#define WMI_MAX_NS_OFFLOADS 2
9801#define WMI_MAX_ARP_OFFLOADS 2
9802
9803#define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
9804#define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
9805#define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
9806
9807typedef struct {
9808 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
9809 A_UINT32 flags; /* flags */
9810 A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node */
9811 A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
9812 wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
9813} WMI_ARP_OFFLOAD_TUPLE;
9814
9815#define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
9816#define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
9817#define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
Govind Singh86180292016-02-01 14:03:37 +05309818/* whether the configured IPv6 address is anycast */
9819#define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009820
9821#define WMI_NSOFF_MAX_TARGET_IPS 2
9822
9823typedef struct {
9824 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
9825 A_UINT32 flags; /* flags */
9826 /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
9827 WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */
9828 WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
9829 WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
9830 wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
9831} WMI_NS_OFFLOAD_TUPLE;
9832
9833typedef struct {
9834 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
9835 A_UINT32 flags;
9836 A_UINT32 vdev_id;
9837 A_UINT32 num_ns_ext_tuples;
9838 /* Following this structure are the TLVs:
9839 * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS];
9840 * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
9841 * size of ns_ext_tuples is based on num_ns_ext_tuples
9842 * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[];
9843 */
9844} WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
9845
9846typedef struct {
9847 A_UINT32 tlv_header;
9848 A_UINT32 vdev_id;
9849 A_UINT32 pattern_id;
9850 A_UINT32 timeout;
9851 A_UINT32 length;
9852 /* Following this would be the pattern
9853 A_UINT8 pattern[] of length specifed by length
9854 field in the structure. */
9855} WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
9856
9857typedef struct {
9858 A_UINT32 tlv_header;
9859 A_UINT32 vdev_id;
9860 A_UINT32 pattern_id;
9861} WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
9862
9863typedef struct {
9864 A_UINT32 tlv_header;
9865 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
9866 /** unique id identifying the VDEV, generated by the caller */
9867 A_UINT32 vdev_id;
9868 /** peer MAC address */
9869 wmi_mac_addr peer_macaddr;
9870 /** Tid number */
9871 A_UINT32 tid;
9872 /** Initiator (1) or Responder (0) for this aggregation */
9873 A_UINT32 initiator;
9874 /** size of the negotiated window */
9875 A_UINT32 window_size;
9876 /** starting sequence number (only valid for initiator) */
9877 A_UINT32 ssn;
9878 /** timeout field represents the time to wait for Block Ack in
9879 * initiator case and the time to wait for BAR in responder
9880 * case. 0 represents no timeout. */
9881 A_UINT32 timeout;
9882 /* BA policy: immediate ACK (0) or delayed ACK (1) */
9883 A_UINT32 policy;
9884} wmi_peer_tid_addba_cmd_fixed_param;
9885
9886typedef struct {
9887 A_UINT32 tlv_header;
9888 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
9889 /** unique id identifying the VDEV, generated by the caller */
9890 A_UINT32 vdev_id;
9891 /** peer MAC address */
9892 wmi_mac_addr peer_macaddr;
9893 /** Tid number */
9894 A_UINT32 tid;
9895 /** Initiator (1) or Responder (0) for this aggregation */
9896 A_UINT32 initiator;
9897} wmi_peer_tid_delba_cmd_fixed_param;
9898
9899typedef struct {
9900 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
9901 /** unique id identifying the VDEV, generated by the caller */
9902 A_UINT32 vdev_id;
9903 /** peer MAC address */
9904 wmi_mac_addr peer_macaddr;
9905 /** Tid number */
9906 A_UINT32 tid;
9907 /** Event status */
9908 A_UINT32 status;
9909} wmi_tx_addba_complete_event_fixed_param;
9910
9911typedef struct {
9912 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
9913 /** unique id identifying the VDEV, generated by the caller */
9914 A_UINT32 vdev_id;
9915 /** peer MAC address */
9916 wmi_mac_addr peer_macaddr;
9917 /** Tid number */
9918 A_UINT32 tid;
9919 /** Event status */
9920 A_UINT32 status;
9921} wmi_tx_delba_complete_event_fixed_param;
9922/*
9923 * Structure to request sequence numbers for a given
9924 * peer station on different TIDs. The TIDs are
9925 * indicated in the tidBitMap, tid 0 would
9926 * be represented by LSB bit 0. tid 1 would be
9927 * represented by LSB bit 1 etc.
9928 * The target will retrieve the current sequence
9929 * numbers for the peer on all the TIDs requested
9930 * and send back a response in a WMI event.
9931 */
9932typedef struct {
9933 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309934 WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009935 wmi_mac_addr peer_macaddr;
9936 A_UINT32 tidBitmap;
9937} wmi_ba_req_ssn;
9938
9939typedef struct {
9940 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309941 WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009942 /** unique id identifying the VDEV, generated by the caller */
9943 A_UINT32 vdev_id;
9944 /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
9945 A_UINT32 num_ba_req_ssn;
9946/* Following this struc are the TLV's:
9947 * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
9948 */
9949} wmi_ba_req_ssn_cmd_fixed_param;
9950
9951/*
9952 * Max transmit categories
9953 *
9954 * Note: In future if we need to increase WMI_MAX_TC definition
9955 * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
9956 */
9957#define WMI_MAX_TC 8
9958
9959/*
9960 * Structure to send response sequence numbers
9961 * for a give peer and tidmap.
9962 */
9963typedef struct {
9964 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309965 WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009966 wmi_mac_addr peer_macaddr;
9967 /* A bool to indicate if ssn is present */
9968 A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
9969 /* The ssn from target, valid only if
9970 * ssn_present_for_tid[tidn] equals 1
9971 */
9972 A_UINT32 ssn_for_tid[WMI_MAX_TC];
9973} wmi_ba_event_ssn;
9974
9975typedef struct {
9976 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309977 WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009978 /** unique id identifying the VDEV, generated by the caller */
9979 A_UINT32 vdev_id;
9980 /** Event status, success or failure of the overall operation */
9981 A_UINT32 status;
9982 /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
9983 A_UINT32 num_ba_event_ssn;
9984/* Following this struc are the TLV's:
9985 * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
9986 */
9987} wmi_ba_rsp_ssn_event_fixed_param;
9988
9989enum wmi_aggr_state_req_type {
9990 WMI_DISABLE_AGGREGATION,
9991 WMI_ENABLE_AGGREGATION
9992};
9993
9994/*
9995 * This event is generated by the COEX module
9996 * when esco call is begins the coex module in fw genrated this event to host to
9997 * disable the RX aggregation and after completion of the esco call fw will indicate to
9998 * enable back the Rx aggregation .
9999 */
10000
10001typedef struct {
10002 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
10003 /** unique id identifying the VDEV, generated by the caller */
10004 A_UINT32 vdev_id;
10005 /** req_type contains values from enum
10006 * wmi_aggr_state_req_type; 0 (disable) 1(enable) */
10007 A_UINT32 req_type;
10008} wmi_aggr_state_trig_event_fixed_param;
10009
10010typedef struct {
10011 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
10012 /** unique id identifying the VDEV, generated by the caller */
10013 A_UINT32 vdev_id;
10014 /** MAC address used for installing */
10015 wmi_mac_addr peer_macaddr;
10016 /** key index */
10017 A_UINT32 key_ix;
10018 /** key flags */
10019 A_UINT32 key_flags;
10020 /** Event status */
10021 A_UINT32 status;
10022} wmi_vdev_install_key_complete_event_fixed_param;
10023
10024typedef enum _WMI_NLO_AUTH_ALGORITHM {
10025 WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
10026 WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
10027 WMI_NLO_AUTH_ALGO_WPA = 3,
10028 WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
10029 WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
10030 WMI_NLO_AUTH_ALGO_RSNA = 6,
10031 WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
10032} WMI_NLO_AUTH_ALGORITHM;
10033
10034typedef enum _WMI_NLO_CIPHER_ALGORITHM {
10035 WMI_NLO_CIPHER_ALGO_NONE = 0x00,
10036 WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
10037 WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
10038 WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
10039 WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
10040 WMI_NLO_CIPHER_ALGO_BIP = 0x06,
10041 WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
10042 WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
10043 WMI_NLO_CIPHER_ALGO_WEP = 0x101,
10044} WMI_NLO_CIPHER_ALGORITHM;
10045
10046/* SSID broadcast type passed in NLO params */
10047typedef enum _WMI_NLO_SSID_BcastNwType {
10048 WMI_NLO_BCAST_UNKNOWN = 0,
10049 WMI_NLO_BCAST_NORMAL = 1,
10050 WMI_NLO_BCAST_HIDDEN = 2,
10051} WMI_NLO_SSID_BcastNwType;
10052
10053#define WMI_NLO_MAX_SSIDS 16
10054#define WMI_NLO_MAX_CHAN 48
10055
10056#define WMI_NLO_CONFIG_STOP (0x1 << 0)
10057#define WMI_NLO_CONFIG_START (0x1 << 1)
10058#define WMI_NLO_CONFIG_RESET (0x1 << 2)
10059#define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4)
10060#define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5)
10061#define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6)
10062/* This bit is used to indicate if EPNO or supplicant PNO is enabled. Only
10063 * one of them can be enabled at a given time */
10064#define WMI_NLO_CONFIG_ENLO (0x1 << 7)
10065#define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8)
Govind Singh42f71542016-03-14 16:32:33 +053010066#define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010067
10068/* Whether directed scan needs to be performed (for hidden SSIDs) */
10069#define WMI_ENLO_FLAG_DIRECTED_SCAN 1
10070/* Whether PNO event shall be triggered if the network is found on A band */
10071#define WMI_ENLO_FLAG_A_BAND 2
10072/* Whether PNO event shall be triggered if the network is found on G band */
10073#define WMI_ENLO_FLAG_G_BAND 4
10074/* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
10075#define WMI_ENLO_FLAG_STRICT_MATCH 8
10076/* Code for matching the beacon AUTH IE - additional codes TBD open */
10077#define WMI_ENLO_AUTH_CODE_OPEN 1
10078/* WPA_PSK or WPA2PSK */
10079#define WMI_ENLO_AUTH_CODE_PSK 2
10080/* any EAPOL */
10081#define WMI_ENLO_AUTH_CODE_EAPOL 4
10082
10083/* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
10084typedef struct wmi_nlo_ssid_param {
10085 A_UINT32 valid;
10086 wmi_ssid ssid;
10087} wmi_nlo_ssid_param;
10088
10089/* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
10090typedef struct wmi_nlo_enc_param {
10091 A_UINT32 valid;
10092 A_UINT32 enc_type;
10093} wmi_nlo_enc_param;
10094
10095/* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
10096typedef struct wmi_nlo_auth_param {
10097 A_UINT32 valid;
10098 A_UINT32 auth_type;
10099} wmi_nlo_auth_param;
10100
10101/* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
10102typedef struct wmi_nlo_bcast_nw_param {
10103 A_UINT32 valid;
10104 /**
10105 * If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value
10106 * should be true/false.Otherwise EPNO is enabled. bcast_nw_type would be used
10107 * as a bit flag contains WMI_ENLO_FLAG_XXX
10108 */
10109 A_UINT32 bcast_nw_type;
10110} wmi_nlo_bcast_nw_param;
10111
10112/* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
10113typedef struct wmi_nlo_rssi_param {
10114 A_UINT32 valid;
10115 A_INT32 rssi;
10116} wmi_nlo_rssi_param;
10117
10118typedef struct nlo_configured_parameters {
10119 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
10120 wmi_nlo_ssid_param ssid;
10121 wmi_nlo_enc_param enc_type;
10122 wmi_nlo_auth_param auth_type;
10123 wmi_nlo_rssi_param rssi_cond;
10124 wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
10125} nlo_configured_parameters;
10126
10127/* Support channel prediction for PNO scan after scanning top_k_num channels
10128 * if stationary_threshold is met.
10129 */
10130typedef struct nlo_channel_prediction_cfg {
10131 A_UINT32 tlv_header;
10132 /* Enable or disable this feature. */
10133 A_UINT32 enable;
10134 /* Top K channels will be scanned before deciding whether to further
10135 * scan or stop. Minimum value is 3 and maximum is 5. */
10136 A_UINT32 top_k_num;
10137 /* Preconfigured stationary threshold. Lesser value means more
10138 * conservative. Bigger value means more aggressive.
10139 * Maximum is 100 and mininum is 0. */
10140 A_UINT32 stationary_threshold;
10141 /* Periodic full channel scan in milliseconds unit.
10142 * After full_scan_period_ms since last full scan, channel prediction
10143 * scan is suppressed and will do full scan.
10144 * This is to help detecting sudden AP power-on or -off.
10145 * Value 0 means no full scan at all (not recommended).
10146 */
10147 A_UINT32 full_scan_period_ms;
10148} nlo_channel_prediction_cfg;
10149
Govind Singh42f71542016-03-14 16:32:33 +053010150typedef struct enlo_candidate_score_params_t {
10151 /*
10152 * TLV tag and len;
10153 * tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param
10154 */
10155 A_UINT32 tlv_header;
10156 /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
10157 A_INT32 min5GHz_rssi;
10158 /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
10159 A_INT32 min24GHz_rssi;
10160 /* the maximum score that a network can have before bonuses */
10161 A_UINT32 initial_score_max;
10162 /* current_connection_bonus:
10163 * only report when there is a network's score this much higher
10164 * than the current connection
10165 */
10166 A_UINT32 current_connection_bonus;
10167 /* score bonus for all networks with the same network flag */
10168 A_UINT32 same_network_bonus;
10169 /* score bonus for networks that are not open */
10170 A_UINT32 secure_bonus;
10171 /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
10172 A_UINT32 band5GHz_bonus;
10173} enlo_candidate_score_params;
10174
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010175typedef struct wmi_nlo_config {
10176 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
10177 A_UINT32 flags;
10178 A_UINT32 vdev_id;
10179 A_UINT32 fast_scan_max_cycles;
10180 A_UINT32 active_dwell_time;
10181 A_UINT32 passive_dwell_time; /* PDT in msecs */
10182 A_UINT32 probe_bundle_size;
10183 A_UINT32 rest_time; /* ART = IRT */
10184 A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
10185 A_UINT32 scan_backoff_multiplier; /* SBM */
10186 A_UINT32 fast_scan_period; /* SCBM */
10187 A_UINT32 slow_scan_period; /* specific to windows */
10188 A_UINT32 no_of_ssids;
10189 A_UINT32 num_of_channels;
10190 A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
10191 /* The TLVs will follow.
10192 * nlo_configured_parameters nlo_list[];
10193 * A_UINT32 channel_list[];
10194 * nlo_channel_prediction_cfg ch_prediction_cfg;
Govind Singh42f71542016-03-14 16:32:33 +053010195 * enlo_candidate_score_params candidate_score_params;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010196 */
10197
10198} wmi_nlo_config_cmd_fixed_param;
10199
10200typedef struct wmi_nlo_event {
10201 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
10202 A_UINT32 vdev_id;
10203} wmi_nlo_event;
10204
10205/* WMI_PASSPOINT_CONFIG_SET
10206 * Sets a list for passpoint networks for PNO purposes;
10207 * it should be matched against any passpoint networks found
10208 * during regular PNO scan.
10209 */
10210#define WMI_PASSPOINT_CONFIG_SET (0x1 << 0)
10211/* WMI_PASSPOINT_CONFIG_RESET
10212 * Reset passpoint network list -
10213 * no Passpoint networks should be matched after this.
10214 */
10215#define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1)
10216#define PASSPOINT_REALM_LEN 256
10217#define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5
10218#define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
10219#define PASSPOINT_PLMN_ID_LEN 3
10220#define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
10221 (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
10222
10223/*
10224 * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
10225 * A_UINT8 realm[PASSPOINT_REALM_LEN]
10226 * array will end on a 4-byte boundary.
10227 * (This 4-byte alignment simplifies endianness-correction byte swapping.)
10228 */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010229A_COMPILE_TIME_ASSERT(check_passpoint_realm_size, (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010230
10231/*
10232 * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
10233 * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
10234 * roaming_consortium_ids array below will end on a 4-byte boundary.
10235 * (This 4-byte alignment simplifies endianness-correction byte swapping.)
10236 */
10237A_COMPILE_TIME_ASSERT(check_passpoint_roaming_consortium_ids_size,
10238((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
10239
10240/* wildcard ID to allow an action (reset) to apply to all networks */
10241#define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
10242typedef struct wmi_passpoint_config {
10243 /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
10244 A_UINT32 tlv_header;
10245 /* (network) id
10246 * identifier of the matched network, report this in event
10247 * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
10248 * that indicates the action should be applied to all networks.
10249 * Currently, the only action that is applied to all networks is "reset".
10250 * If a non-wildcard ID is specified, that particular network is configured.
10251 * If a wildcard ID is specified, all networks are reset.
10252 */
10253 A_UINT32 id;
10254 A_UINT32 req_id;
10255 /*null terminated UTF8 encoded realm, 0 if unspecified*/
10256 A_UINT8 realm[PASSPOINT_REALM_LEN];
10257 /*roaming consortium ids to match, 0s if unspecified*/
10258 A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN];
10259 /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
10260 /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
10261 A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN];
10262} wmi_passpoint_config_cmd_fixed_param;
10263
10264typedef struct {
10265 A_UINT32 tlv_header; /* TLV tag and len; tag equals
10266wmi_passpoint_event_hdr */
10267 A_UINT32 id; /* identifier of the matched network */
10268 A_UINT32 vdev_id;
10269 A_UINT32 timestamp; /* time since boot (in microsecond) when the
10270result was retrieved*/
10271 wmi_ssid ssid;
10272 wmi_mac_addr bssid; /* bssid of the network */
10273 A_UINT32 channel_mhz; /* channel frequency in MHz */
10274 A_UINT32 rssi; /* rssi value */
10275 A_UINT32 rtt; /* timestamp in nanoseconds*/
10276 A_UINT32 rtt_sd; /* standard deviation in rtt */
10277 A_UINT32 beacon_period; /* beacon advertised in the beacon */
10278 A_UINT32 capability; /* capabilities advertised in the beacon */
10279 A_UINT32 ie_length; /* size of the ie_data blob */
10280 A_UINT32 anqp_length; /* length of ANQP blob */
10281 /**
10282 * Following this structure is the byte stream of ie data of length ie_buf_len:
10283 * A_UINT8 ie_data[]; // length in byte given by field ie_length, blob of ie data in beacon
10284 * A_UINT8 anqp_ie[]; // length in byte given by field anqp_len, blob of anqp data of IE
10285 * Implicitly, combing ie_data and anqp_ie into a single bufp, and the bytes
10286 * stream of each ie should be same as BEACON/Action-frm by 802.11 spec
10287 */
10288} wmi_passpoint_event_hdr;
10289
10290#define GTK_OFFLOAD_OPCODE_MASK 0xFF000000
10291/** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
10292#define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000
10293/** Disable GTK offload */
10294#define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000
10295/** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
10296#define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000
10297enum wmi_chatter_mode {
10298 /* Chatter enter/exit happens
10299 * automatically based on preset
10300 * params
10301 */
10302 WMI_CHATTER_MODE_AUTO,
10303 /* Chatter enter is triggered
10304 * manually by the user
10305 */
10306 WMI_CHATTER_MODE_MANUAL_ENTER,
10307 /* Chatter exit is triggered
10308 * manually by the user
10309 */
10310 WMI_CHATTER_MODE_MANUAL_EXIT,
10311 /* Placeholder max value, always last */
10312 WMI_CHATTER_MODE_MAX
10313};
10314
10315enum wmi_chatter_query_type {
10316 /*query coalescing filter match counter */
10317 WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
10318 WMI_CHATTER_QUERY_MAX
10319};
10320
10321typedef struct {
10322 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */
10323 A_UINT32 chatter_mode;
10324} wmi_chatter_set_mode_cmd_fixed_param;
10325
10326/** maximum number of filter supported*/
10327#define CHATTER_MAX_COALESCING_RULES 11
10328/** maximum number of field tests per filter*/
10329#define CHATTER_MAX_FIELD_TEST 5
10330/** maximum field length in number of DWORDS*/
10331#define CHATTER_MAX_TEST_FIELD_LEN32 2
10332
10333/** field test kinds*/
10334#define CHATTER_COALESCING_TEST_EQUAL 1
10335#define CHATTER_COALESCING_TEST_MASKED_EQUAL 2
10336#define CHATTER_COALESCING_TEST_NOT_EQUAL 3
10337
10338/** packet type*/
10339#define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0)
10340#define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1)
10341#define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2)
10342
10343/** coalescing field test*/
10344typedef struct _chatter_pkt_coalescing_hdr_test {
10345 /** offset from start of mac header, for windows native wifi host driver
10346 * should assume standard 802.11 frame format without QoS info and address4
10347 * FW would account for any non-stand fields for final offset value.
10348 */
10349 A_UINT32 offset;
10350 A_UINT32 length; /* length of test field */
10351 A_UINT32 test; /*equal, not equal or masked equal */
10352 A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream */
10353 A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream */
10354} chatter_pkt_coalescing_hdr_test;
10355
10356/** packet coalescing filter*/
10357typedef struct _chatter_pkt_coalescing_filter {
10358 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
10359 A_UINT32 filter_id; /*unique id assigned by OS */
10360 A_UINT32 max_coalescing_delay; /*max miliseconds 1st pkt can be hold */
10361 A_UINT32 pkt_type; /*unicast/multicast/broadcast */
10362 A_UINT32 num_of_test_field; /*number of field test in table */
10363 chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /*field test tbl */
10364} chatter_pkt_coalescing_filter;
10365
10366/** packet coalescing filter add command*/
10367typedef struct {
10368 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
10369 A_UINT32 num_of_filters;
10370 /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
10371 chatter_pkt_coalescing_filter rx_filter[1]; */
10372} wmi_chatter_coalescing_add_filter_cmd_fixed_param;
10373/** packet coalescing filter delete command*/
10374typedef struct {
10375 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
10376 A_UINT32 filter_id; /*filter id which will be deleted */
10377} wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
10378/** packet coalescing query command*/
10379typedef struct {
10380 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
10381 A_UINT32 type; /*type of query */
10382} wmi_chatter_coalescing_query_cmd_fixed_param;
10383/** chatter query reply event*/
10384typedef struct {
10385 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */
10386 A_UINT32 type; /*query type */
10387 A_UINT32 filter_match_cnt; /*coalescing filter match counter */
10388} wmi_chatter_query_reply_event_fixed_param;
10389
10390/* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
10391 * cannot be changed without breaking WMI compatibility. */
10392#define GTK_OFFLOAD_KEK_BYTES 16
10393#define GTK_OFFLOAD_KCK_BYTES 16
10394/* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
10395#define GTK_REPLAY_COUNTER_BYTES 8
10396#define WMI_MAX_KEY_LEN 32
10397#define IGTK_PN_SIZE 6
10398
10399typedef struct {
10400 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
10401 A_UINT32 vdev_id;
10402 /** unique id identifying the VDEV */
10403 A_UINT32 flags; /* status flags */
10404 A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
10405 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
10406 A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
10407 A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
10408 A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
10409 A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
10410} WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
10411
10412typedef struct {
10413 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
10414 A_UINT32 vdev_id; /** unique id identifying the VDEV */
10415 A_UINT32 flags; /* control flags, GTK offload command use high byte */
10416 /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
10417 A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
10418 A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
10419 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
10420} WMI_GTK_OFFLOAD_CMD_fixed_param;
10421
10422typedef struct {
10423 /* TLV tag and len; tag equals
10424 * WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param
10425 */
10426 A_UINT32 tlv_header;
10427 A_UINT32 vdev_id;
10428 A_UINT32 sa_query_retry_interval; /* in msec */
10429 A_UINT32 sa_query_max_retry_count;
10430} WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
10431
10432typedef enum {
10433 WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
10434 WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
10435 WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK */
10436 /* gratuitous ARP req*/
10437 WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4,
10438} WMI_STA_KEEPALIVE_METHOD;
10439
10440typedef struct {
10441 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
10442 WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
10443 WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
10444 wmi_mac_addr dest_mac_addr; /* destination MAC address */
10445} WMI_STA_KEEPALVE_ARP_RESPONSE;
10446
10447typedef struct {
10448 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
10449 A_UINT32 vdev_id;
10450 A_UINT32 enable; /* 1 - Enable, 0 - disable */
10451 A_UINT32 method; /* keep alive method */
10452 A_UINT32 interval; /* time interval in seconds */
10453 /*
10454 * NOTE: following this structure is the TLV for ARP Resonse:
10455 * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; // ARP response
10456 */
10457} WMI_STA_KEEPALIVE_CMD_fixed_param;
10458
10459typedef struct {
10460 A_UINT32 tlv_header;
10461 A_UINT32 vdev_id;
10462 A_UINT32 action;
10463} WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
10464typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
10465
10466typedef struct {
10467 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
10468 A_UINT32 vdev_id;
10469 A_UINT32 keepaliveInterval; /* seconds */
10470 A_UINT32 keepaliveMethod;
10471} wmi_vdev_set_keepalive_cmd_fixed_param;
10472
10473typedef struct {
10474 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
10475 A_UINT32 vdev_id;
10476} wmi_vdev_get_keepalive_cmd_fixed_param;
10477
10478typedef struct {
10479 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
10480 A_UINT32 vdev_id;
10481 A_UINT32 keepaliveInterval; /* seconds */
10482 A_UINT32 keepaliveMethod; /* seconds */
10483} wmi_vdev_get_keepalive_event_fixed_param;
10484
10485#define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
10486#define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
10487
10488typedef struct {
10489 A_UINT32 tlv_header;
10490 A_UINT32 vdev_id;
10491 A_UINT32 action;
10492} WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
10493
10494typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param
10495WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
10496
10497typedef struct {
10498 A_UINT32 tlv_header;
10499 A_UINT32 vdev_id;
10500 A_UINT32 mcc_tbttmode;
10501 wmi_mac_addr mcc_bssid;
10502} wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
10503
10504typedef struct {
10505 A_UINT32 tlv_header;
10506 A_UINT32 vdev_id; /* home vdev id */
10507 A_UINT32 meas_token; /* from measure request frame */
10508 A_UINT32 dialog_token;
10509 A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
10510 A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst */
10511 A_UINT32 burst_cycle; /* times cycle through within one burst */
10512 A_UINT32 tx_power; /* for path frame */
10513 A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */
10514 wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
10515 A_UINT32 num_chans;
10516} wmi_vdev_plmreq_start_cmd_fixed_param;
10517
10518typedef struct {
10519 A_UINT32 tlv_header;
10520 A_UINT32 vdev_id;
10521 A_UINT32 meas_token; /* same value from req */
10522} wmi_vdev_plmreq_stop_cmd_fixed_param;
10523
10524typedef struct {
10525 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */
10526 A_UINT32 tlv_header;
10527 /* unique id identifying the VDEV, generated by the caller */
10528 A_UINT32 vdev_id;
10529 /* enable/disable NoA */
10530 A_UINT32 enable;
10531 /** number of NoA desc. In the TLV noa_descriptor[] */
10532 A_UINT32 num_noa;
10533 /**
10534 * TLV (tag length value ) paramerters follow the pattern structure.
10535 * TLV contain NoA desc with num of num_noa
10536 */
10537} wmi_p2p_set_noa_cmd_fixed_param;
10538
10539typedef struct {
10540 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */
10541 A_UINT32 tlv_header;
10542 /* unique id identifying the VDEV, generated by the caller */
10543 A_UINT32 vdev_id;
10544 /* Identify the wlan module */
10545 A_UINT32 module_id;
10546 /* Num of test arguments passed */
10547 A_UINT32 num_args;
10548/**
10549 * TLV (tag length value ) parameters follow the wmi_roam_chan_list
10550 * structure. The TLV's are:
10551 * A_UINT32 args[];
10552 **/
10553} wmi_unit_test_cmd_fixed_param;
10554
10555/** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
10556 * after it received WMI_ROAM_SYNCH_EVENTID.
10557 */
10558typedef struct {
10559 A_UINT32 tlv_header;
10560 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
10561 /** unique id identifying the VDEV, generated by the caller */
10562 A_UINT32 vdev_id;
10563} wmi_roam_synch_complete_fixed_param;
10564
10565typedef enum {
10566 RECOVERY_SIM_ASSERT = 0x01,
10567 RECOVERY_SIM_NO_DETECT = 0x02,
10568 RECOVERY_SIM_CTR_EP_FULL = 0x03,
10569 RECOVERY_SIM_EMPTY_POINT = 0x04,
10570 RECOVERY_SIM_STACK_OV = 0x05,
10571 RECOVERY_SIM_INFINITE_LOOP = 0x06,
10572 RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
10573 RECOVERY_SIM_SELF_RECOVERY = 0x08,
10574} RECOVERY_SIM_TYPE;
10575
10576/* WMI_FORCE_FW_HANG_CMDID */
10577typedef struct {
10578 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
10579 A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:... */
10580 A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms) */
10581} WMI_FORCE_FW_HANG_CMD_fixed_param;
Krishna Kumaar Natarajan2f7a44d2016-07-08 11:24:06 -070010582
10583typedef enum {
10584 WMI_MCAST_FILTER_SET = 1,
10585 WMI_MCAST_FILTER_DELETE
10586} WMI_SET_SINGLE_MCAST_FILTER_OP;
10587
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010588typedef struct {
10589 A_UINT32 tlv_header;
10590 A_UINT32 vdev_id;
10591 A_UINT32 index;
10592 A_UINT32 action;
10593 wmi_mac_addr mcastbdcastaddr;
10594} WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
10595
Krishna Kumaar Natarajan2f7a44d2016-07-08 11:24:06 -070010596typedef enum {
10597 WMI_MULTIPLE_MCAST_FILTER_CLEAR = 1, /* clear all previous mc list */
10598 /* clear all previous mc list, and set new list */
10599 WMI_MULTIPLE_MCAST_FILTER_SET,
10600 WMI_MULTIPLE_MCAST_FILTER_DELETE, /* delete one/multiple mc list */
10601 WMI_MULTIPLE_MCAST_FILTER_ADD /* add one/multiple mc list */
10602} WMI_MULTIPLE_MCAST_FILTER_OP;
10603
10604typedef struct {
10605 A_UINT32 tlv_header;
10606 A_UINT32 vdev_id;
10607 A_UINT32 operation; /* refer WMI_MULTIPLE_MCAST_FILTER_OP */
10608 /* number of elements in the subsequent mcast addr list */
10609 A_UINT32 num_mcastaddrs;
10610 /**
10611 * TLV (tag length value) parameters follow the
10612 * structure. The TLV's are:
10613 * wmi_mac_addr mcastaddr_list[num_mcastaddrs];
10614 */
10615} WMI_SET_MULTIPLE_MCAST_FILTER_CMD_fixed_param;
10616
10617
Himanshu Agarwalb0497b52016-05-13 21:03:37 +053010618/* WMI_DBGLOG_TIME_STAMP_SYNC_CMDID */
10619typedef enum {
10620 WMI_TIME_STAMP_SYNC_MODE_MS, /* millisecond units */
10621 WMI_TIME_STAMP_SYNC_MODE_US, /* microsecond units */
10622} WMI_TIME_STAMP_SYNC_MODE;
10623
10624typedef struct {
10625 /*
10626 * TLV tag and len; tag equals
10627 * WMITLV_TAG_STRUC_wmi_dbglog_time_stamp_sync_cmd_fixed_param
10628 */
10629 A_UINT32 tlv_header;
10630 /* 0: millisec, 1: microsec (see WMI_TIME_STAMP_SYNC_MODE) */
10631 A_UINT32 mode;
10632 A_UINT32 time_stamp_low; /* lower 32 bits of remote time stamp */
10633 A_UINT32 time_stamp_high; /* higher 32 bits of remote time stamp */
10634} WMI_DBGLOG_TIME_STAMP_SYNC_CMD_fixed_param;
10635
10636
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010637/* GPIO Command and Event data structures */
10638
10639/* WMI_GPIO_CONFIG_CMDID */
10640enum {
10641 WMI_GPIO_PULL_NONE,
10642 WMI_GPIO_PULL_UP,
10643 WMI_GPIO_PULL_DOWN,
10644};
10645
10646enum {
10647 WMI_GPIO_INTTYPE_DISABLE,
10648 WMI_GPIO_INTTYPE_RISING_EDGE,
10649 WMI_GPIO_INTTYPE_FALLING_EDGE,
10650 WMI_GPIO_INTTYPE_BOTH_EDGE,
10651 WMI_GPIO_INTTYPE_LEVEL_LOW,
10652 WMI_GPIO_INTTYPE_LEVEL_HIGH
10653};
10654
10655typedef struct {
10656 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
10657 A_UINT32 gpio_num; /* GPIO number to be setup */
10658 A_UINT32 input; /* 0 - Output/ 1 - Input */
10659 A_UINT32 pull_type; /* Pull type defined above */
10660 A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
10661} wmi_gpio_config_cmd_fixed_param;
10662
10663/* WMI_GPIO_OUTPUT_CMDID */
10664typedef struct {
10665 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
10666 A_UINT32 gpio_num; /* GPIO number to be setup */
10667 A_UINT32 set; /* Set the GPIO pin */
10668} wmi_gpio_output_cmd_fixed_param;
10669
10670/* WMI_GPIO_INPUT_EVENTID */
10671typedef struct {
10672 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
10673 A_UINT32 gpio_num; /* GPIO number which changed state */
10674} wmi_gpio_input_event_fixed_param;
10675
10676/* WMI_P2P_DISC_EVENTID */
10677enum {
10678 P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
10679 P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
10680};
10681
10682enum {
10683 P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload */
10684 P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload */
10685 P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload */
10686};
10687
10688enum {
10689 P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
10690 P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
10691};
10692
10693typedef struct {
10694 A_UINT32 vdev_id;
10695 A_UINT32 reason; /* P2P DISC wake up reason */
10696} wmi_p2p_disc_event;
10697
10698typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param
10699WOW_EVENT_INFO_SECTION_GTKIGTK;
10700
10701typedef enum {
10702 WMI_FAKE_TXBFER_SEND_NDPA,
10703 WMI_FAKE_TXBFER_SEND_MU,
10704 WMI_FAKE_TXBFER_NDPA_FBTYPE,
10705 WMI_FAKE_TXBFER_NDPA_NCIDX,
10706 WMI_FAKE_TXBFER_NDPA_POLL,
10707 WMI_FAKE_TXBFER_NDPA_BW,
10708 WMI_FAKE_TXBFER_NDPA_PREAMBLE,
10709 WMI_FAKE_TXBFER_NDPA_RATE,
10710 WMI_FAKE_TXBFER_NDP_BW,
10711 WMI_FAKE_TXBFER_NDP_NSS,
10712 WMI_TXBFEE_ENABLE_UPLOAD_H,
10713 WMI_TXBFEE_ENABLE_CAPTURE_H,
10714 WMI_TXBFEE_SET_CBF_TBL,
10715 WMI_TXBFEE_CBF_TBL_LSIG,
10716 WMI_TXBFEE_CBF_TBL_SIGA1,
10717 WMI_TXBFEE_CBF_TBL_SIGA2,
10718 WMI_TXBFEE_CBF_TBL_SIGB,
10719 WMI_TXBFEE_CBF_TBL_PAD,
10720 WMI_TXBFEE_CBF_TBL_DUR,
10721 WMI_TXBFEE_SU_NCIDX,
10722 WMI_TXBFEE_CBIDX,
10723 WMI_TXBFEE_NGIDX,
10724} WMI_TXBF_PARAM_ID;
10725
10726typedef struct {
10727 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
10728 /** parameter id */
10729 A_UINT32 param_id;
10730 /** parameter value */
10731 A_UINT32 param_value;
10732} wmi_txbf_cmd_fixed_param;
10733
10734typedef struct {
10735 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
10736 A_UINT32 h_length;
10737 A_UINT32 cv_length;
10738 /* This TLV is followed by array of bytes:
10739 * // h_cv info buffer
10740 * A_UINT8 bufp[];
10741 */
10742} wmi_upload_h_hdr;
10743
10744typedef struct {
10745 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
10746 A_UINT32 svd_num;
10747 A_UINT32 tone_num;
10748 A_UINT32 reserved;
10749} wmi_capture_h_event_hdr;
10750
10751typedef struct {
10752 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
10753 A_UINT32 start_freq; /* start frequency, not channel center freq */
10754 A_UINT32 end_freq; /* end frequency */
10755} wmi_avoid_freq_range_desc;
10756
10757typedef struct {
10758 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
10759 /* bad channel range count, multi range is allowed, 0 means all channel clear */
10760 A_UINT32 num_freq_ranges;
10761
10762 /* The TLVs will follow.
10763 * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
10764 * wmi_avoid_freq_range_desc avd_freq_range[]; // message buffer, NULL terminated
10765 */
10766} wmi_avoid_freq_ranges_event_fixed_param;
10767
10768typedef struct {
10769 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */
10770 /** Reserved for future use */
10771 A_UINT32 reserved0;
10772 A_UINT32 vdev_id;
10773} wmi_gtk_rekey_fail_event_fixed_param;
10774
10775enum wmm_ac_downgrade_policy {
10776 WMM_AC_DOWNGRADE_DEPRIO,
10777 WMM_AC_DOWNGRADE_DROP,
10778 WMM_AC_DOWNGRADE_INVALID,
10779};
10780
Himanshu Agarwal2690e462016-06-03 14:26:01 +053010781/* WMM EDCA Params type */
10782#define WMM_PARAM_TYPE_LEGACY 0
10783/* Relaxed EDCA parameters for 11ax to be used in case of triggered access */
10784#define WMM_PARAM_TYPE_11AX_EDCA 1
10785
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010786typedef struct {
10787 A_UINT32 tlv_header;
10788 A_UINT32 cwmin;
10789 A_UINT32 cwmax;
10790 A_UINT32 aifs;
10791 A_UINT32 txoplimit;
10792 A_UINT32 acm;
10793 A_UINT32 no_ack;
10794} wmi_wmm_vparams;
10795
10796typedef struct {
10797 A_UINT32 tlv_header;
10798 A_UINT32 vdev_id;
10799 wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
Himanshu Agarwal2690e462016-06-03 14:26:01 +053010800 A_UINT32 wmm_param_type; /* see WMM_PARAM_TYPE_xxx defs */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010801} wmi_vdev_set_wmm_params_cmd_fixed_param;
10802
10803typedef struct {
10804 A_UINT32 tlv_header;
10805 A_UINT32 vdev_id;
10806 A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */
10807 A_UINT32 userGtxMask; /* host request for GTX mask */
10808 A_UINT32 gtxPERThreshold; /* default: 10% */
10809 A_UINT32 gtxPERMargin; /* default: 2% */
10810 A_UINT32 gtxTPCstep; /* default: 1 */
10811 A_UINT32 gtxTPCMin; /* default: 5 */
10812 A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */
10813} wmi_vdev_set_gtx_params_cmd_fixed_param;
10814
10815typedef struct {
10816 A_UINT32 tlv_header;
10817 A_UINT32 vdev_id;
10818 A_UINT32 ac;
10819 A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
10820 A_UINT32 downgrade_type;
10821} wmi_vdev_wmm_addts_cmd_fixed_param;
10822
10823typedef struct {
10824 A_UINT32 tlv_header;
10825 A_UINT32 vdev_id;
10826 A_UINT32 ac;
10827} wmi_vdev_wmm_delts_cmd_fixed_param;
10828
Govind Singh869c9872016-02-22 18:36:34 +053010829/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010830typedef struct {
10831 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */
10832 /** Reserved for future use */
10833 A_UINT32 reserved0;
10834} wmi_pdev_dfs_enable_cmd_fixed_param;
10835
Govind Singh869c9872016-02-22 18:36:34 +053010836/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010837typedef struct {
10838 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 +053010839 /** pdev_id for identifying the MAC
10840 * See macros starting with WMI_PDEV_ID_ for values.
10841 */
10842 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010843} wmi_pdev_dfs_disable_cmd_fixed_param;
10844
10845typedef struct {
10846 /** TLV tag and len; tag equals
10847 * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
10848 */
10849 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053010850 /** pdev_id for identifying the MAC
10851 * See macros starting with WMI_PDEV_ID_ for values.
10852 */
10853 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010854} wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
10855
10856typedef struct {
10857 /** TLV tag and len; tag equals
10858 * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
10859 */
10860 A_UINT32 tlv_header;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +053010861 /** pdev_id for identifying the MAC
10862 * See macros starting with WMI_PDEV_ID_ for values.
10863 */
10864 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010865} wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
10866
10867/** TDLS COMMANDS */
10868
10869/* WMI_TDLS_SET_STATE_CMDID */
10870/* TDLS State */
10871enum wmi_tdls_state {
10872 /** TDLS disable */
10873 WMI_TDLS_DISABLE,
10874 /** TDLS enabled - no firmware connection tracking/notifications */
10875 WMI_TDLS_ENABLE_PASSIVE,
10876 /** TDLS enabled - with firmware connection tracking/notifications */
10877 WMI_TDLS_ENABLE_ACTIVE,
10878 /* TDLS enabled - firmware waits for peer mac for connection tracking */
10879 WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +053010880 /** TDLS enabled - TDLS connection tracking is done in host */
10881 WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010882};
10883
10884/* TDLS Options */
10885#define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */
10886#define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */
10887#define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */
10888
10889typedef struct {
10890 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */
10891 A_UINT32 tlv_header;
10892 /** unique id identifying the VDEV */
10893 A_UINT32 vdev_id;
10894 /** Enable/Disable TDLS (wmi_tdls_state) */
10895 A_UINT32 state;
10896 /* Duration (in ms) over which to calculate tx/rx threshold
10897 * to trigger TDLS Discovery
10898 */
10899 A_UINT32 notification_interval_ms;
10900 /** number of packets OVER which notify/suggest TDLS Discovery:
10901 * if current tx pps counter / notification interval >= threshold
10902 * then a notification will be sent to host to advise TDLS Discovery */
10903 A_UINT32 tx_discovery_threshold;
10904 /** number of packets UNDER which notify/suggest TDLS Teardown:
10905 * if current tx pps counter / notification interval < threshold
10906 * then a notification will be sent to host to advise TDLS Tear down */
10907 A_UINT32 tx_teardown_threshold;
10908 /** Absolute RSSI value under which notify/suggest TDLS Teardown */
10909 A_INT32 rssi_teardown_threshold;
10910 /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
10911 A_INT32 rssi_delta;
10912 /** TDLS Option Control
10913 * Off-Channel, Buffer STA, (later)Sleep STA support */
10914 A_UINT32 tdls_options;
10915 /* Buffering time in number of beacon intervals */
10916 A_UINT32 tdls_peer_traffic_ind_window;
10917 /* Wait time for PTR frame */
10918 A_UINT32 tdls_peer_traffic_response_timeout_ms;
10919 /* Self PUAPSD mask */
10920 A_UINT32 tdls_puapsd_mask;
10921 /* Inactivity timeout */
10922 A_UINT32 tdls_puapsd_inactivity_time_ms;
10923 /* Max of rx frame during SP */
10924 A_UINT32 tdls_puapsd_rx_frame_threshold;
10925 /* Duration (in ms) over which to check whether TDLS link
10926 * needs to be torn down
10927 */
10928 A_UINT32 teardown_notification_ms;
10929 /* STA kickout threshold for TDLS peer */
10930 A_UINT32 tdls_peer_kickout_threshold;
10931} wmi_tdls_set_state_cmd_fixed_param;
10932
10933/* WMI_TDLS_PEER_UPDATE_CMDID */
10934
10935enum wmi_tdls_peer_state {
10936 /** tx peer TDLS link setup now starting, traffic to DA should be
10937 * paused (except TDLS frames) until state is moved to CONNECTED (or
10938 * TEARDOWN on setup failure) */
10939 WMI_TDLS_PEER_STATE_PEERING,
10940 /** tx peer TDLS link established, running (all traffic to DA unpaused) */
10941 WMI_TDLS_PEER_STATE_CONNECTED,
10942 /** tx peer TDLS link tear down started (link paused, any frames
10943 * queued for DA will be requeued back through the AP)*/
10944 WMI_TDLS_PEER_STATE_TEARDOWN,
10945 /* Add peer mac into connection table */
10946 WMI_TDLS_PEER_ADD_MAC_ADDR,
10947 /* Remove peer mac from connection table */
10948 WMI_TDLS_PEER_REMOVE_MAC_ADDR,
10949};
10950
10951/* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
10952#define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
10953typedef struct {
10954 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */
10955 A_UINT32 tlv_header;
10956 /* Peer's QoS Info - for U-APSD */
10957 /* AC FLAGS - accessed through macros below */
10958 /* Ack, SP, More Data Ack - accessed through macros below */
10959 A_UINT32 peer_qos;
10960 /*TDLS Peer's U-APSD Buffer STA Support */
10961 A_UINT32 buff_sta_support;
10962 /*TDLS off channel related params */
10963 A_UINT32 off_chan_support;
10964 A_UINT32 peer_curr_operclass;
10965 A_UINT32 self_curr_operclass;
10966 /* Number of channels available for off channel operation */
10967 A_UINT32 peer_chan_len;
10968 A_UINT32 peer_operclass_len;
10969 A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
10970 /* Is peer initiator or responder of TDLS setup request */
10971 A_UINT32 is_peer_responder;
10972 /* Preferred off channel number as configured by user */
10973 A_UINT32 pref_offchan_num;
10974 /* Preferred off channel bandwidth as configured by user */
10975 A_UINT32 pref_offchan_bw;
10976
10977 /** Followed by the variable length TLV peer_chan_list:
10978 * wmi_channel peer_chan_list[].
10979 * Array size would be peer_chan_len.
10980 * This array is intersected channels which is supported by both peer
10981 * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
10982 * FW shall compute BW for an offchan based on peer's ht/vht cap
10983 * received in peer_assoc cmd during change STA operation
10984 */
10985} wmi_tdls_peer_capabilities;
10986
10987#define WMI_TDLS_QOS_VO_FLAG 0
10988#define WMI_TDLS_QOS_VI_FLAG 1
10989#define WMI_TDLS_QOS_BK_FLAG 2
10990#define WMI_TDLS_QOS_BE_FLAG 3
10991#define WMI_TDLS_QOS_ACK_FLAG 4
10992#define WMI_TDLS_QOS_SP_FLAG 5
10993#define WMI_TDLS_QOS_MOREDATA_FLAG 7
10994
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010995#define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010996 (ppeer_caps)->peer_qos |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010997} while (0)
10998#define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010999 (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
11000
11001#define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
11002 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
11003#define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
11004 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
11005#define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
11006 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
11007#define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
11008 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
11009#define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
11010 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
11011#define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
11012 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
11013#define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
11014 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
11015#define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
11016 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
11017#define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
11018 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
11019#define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
11020 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
11021/* SP has 2 bits */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011022#define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011023 (ppeer_caps)->peer_qos |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011024} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011025#define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
11026 (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
11027
11028#define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
11029 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
11030#define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
11031 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
11032
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011033#define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011034 (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011035} while (0)
11036#define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011037 (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
11038
11039#define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
11040 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
11041#define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
11042 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
11043#define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
11044 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
11045#define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
11046 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
11047#define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
11048 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
11049#define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
11050 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
11051#define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
11052 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
11053#define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
11054 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
11055#define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
11056 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
11057#define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
11058 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
11059/* SP has 2 bits */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011060#define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011061 (pset_cmd)->tdls_puapsd_mask |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011062} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011063#define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
11064 (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
11065
11066#define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
11067 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
11068#define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
11069 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
11070
11071typedef struct {
11072 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */
11073 A_UINT32 tlv_header;
11074 /** unique id identifying the VDEV */
11075 A_UINT32 vdev_id;
11076 /** peer MAC address */
11077 wmi_mac_addr peer_macaddr;
11078 /** new TDLS state for peer (wmi_tdls_peer_state) */
11079 A_UINT32 peer_state;
11080 /* The TLV for wmi_tdls_peer_capabilities will follow.
11081 * wmi_tdls_peer_capabilities peer_caps;
11082 */
11083 /** Followed by the variable length TLV chan_info:
11084 * wmi_channel chan_info[] */
11085} wmi_tdls_peer_update_cmd_fixed_param;
11086
11087/* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
11088
11089/* bitmap 20, 40, 80 or 160 MHz wide channel */
11090#define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */
11091#define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */
11092#define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */
11093#define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */
11094
11095enum wmi_tdls_offchan_mode {
11096 WMI_TDLS_ENABLE_OFFCHANNEL,
11097 WMI_TDLS_DISABLE_OFFCHANNEL
11098};
11099
11100typedef struct {
11101 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */
11102 A_UINT32 tlv_header;
11103 /** unique id identifying the VDEV */
11104 A_UINT32 vdev_id;
11105 /** Enable/Disable TDLS offchannel */
11106 A_UINT32 offchan_mode;
11107 /** peer MAC address */
11108 wmi_mac_addr peer_macaddr;
11109 /* Is peer initiator or responder of TDLS setup request */
11110 A_UINT32 is_peer_responder;
11111 /* off channel number */
11112 A_UINT32 offchan_num;
11113 /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
11114 A_UINT32 offchan_bw_bitmap;
11115 /* operating class for offchan */
11116 A_UINT32 offchan_oper_class;
11117} wmi_tdls_set_offchan_mode_cmd_fixed_param;
11118
11119/** TDLS EVENTS */
11120enum wmi_tdls_peer_notification {
11121 /** tdls discovery recommended for peer (based
11122 * on tx bytes per second > tx_discover threshold) */
11123 WMI_TDLS_SHOULD_DISCOVER,
11124 /** tdls link tear down recommended for peer
11125 * due to tx bytes per second below tx_teardown_threshold
11126 * NB: this notification sent once */
11127 WMI_TDLS_SHOULD_TEARDOWN,
11128 /** tx peer TDLS link tear down complete */
11129 WMI_TDLS_PEER_DISCONNECTED,
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +053011130 /** TDLS/BT role change notification for connection tracker */
11131 WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011132};
11133
11134enum wmi_tdls_peer_reason {
11135 /** tdls teardown recommended due to low transmits */
11136 WMI_TDLS_TEARDOWN_REASON_TX,
11137 /** tdls link tear down recommended due to poor RSSI */
11138 WMI_TDLS_TEARDOWN_REASON_RSSI,
11139 /** tdls link tear down recommended due to offchannel scan */
11140 WMI_TDLS_TEARDOWN_REASON_SCAN,
11141 /** tdls peer disconnected due to peer deletion */
11142 WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
11143 /** tdls peer disconnected due to PTR timeout */
11144 WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
11145 /** tdls peer disconnected due wrong PTR format */
11146 WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
11147 /** tdls peer not responding */
11148 WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +053011149 /*
11150 * tdls entered buffer STA role, TDLS connection tracker
11151 * needs to handle this
11152 */
11153 WMI_TDLS_ENTER_BUF_STA,
11154 /*
11155 * tdls exited buffer STA role, TDLS connection tracker
11156 * needs to handle this
11157 */
11158 WMI_TDLS_EXIT_BUF_STA,
11159 /* BT entered busy mode, TDLS connection tracker needs to handle this */
11160 WMI_TDLS_ENTER_BT_BUSY_MODE,
11161 /** BT exited busy mode, TDLS connection tracker needs to handle this */
11162 WMI_TDLS_EXIT_BT_BUSY_MODE,
Selvaraj, Sridhar217e9a92016-06-28 14:49:13 +053011163 /*
11164 * TDLS module received a scan start event, TDLS connection tracker
11165 * needs to handle this
11166 */
11167 WMI_TDLS_SCAN_STARTED_EVENT,
11168 /*
11169 * TDLS module received a scan complete event, TDLS connection tracker
11170 * needs to handle this
11171 */
11172 WMI_TDLS_SCAN_COMPLETED_EVENT,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011173};
11174
11175/* WMI_TDLS_PEER_EVENTID */
11176typedef struct {
11177 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */
11178 A_UINT32 tlv_header;
11179 /** peer MAC address */
11180 wmi_mac_addr peer_macaddr;
11181 /** TDLS peer status (wmi_tdls_peer_notification)*/
11182 A_UINT32 peer_status;
11183 /** TDLS peer reason (wmi_tdls_peer_reason) */
11184 A_UINT32 peer_reason;
11185 /** unique id identifying the VDEV */
11186 A_UINT32 vdev_id;
11187} wmi_tdls_peer_event_fixed_param;
11188
11189/* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
11190 don't use this for any new implementations */
11191typedef struct {
11192 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */
11193 /** unique id identifying the VDEV, generated by the caller */
11194 A_UINT32 vdev_id;
11195 /* New beacon interval to be used for the specified VDEV suggested by firmware */
11196 A_UINT32 new_bcn_intvl;
11197} wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
11198
11199/* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
11200typedef struct {
11201 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
11202 A_UINT32 tlv_header;
11203 /** 1: enable fw based adaptive ocs,
11204 * 0: disable fw based adaptive ocs
11205 */
11206 A_UINT32 enable;
11207 /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
Govind Singh869c9872016-02-22 18:36:34 +053011208 union {
11209 /* OBSOLETE - will be removed once all refs are gone */
11210 A_UINT32 mac_id;
11211 /** pdev_id for identifying the MAC
11212 * See macros starting with WMI_PDEV_ID_ for values.
11213 */
11214 A_UINT32 pdev_id;
11215 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011216} wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
11217
11218/* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
11219typedef struct {
11220 /* Frequency of the channel for which the quota is set */
11221 A_UINT32 chan_mhz;
11222 /* Requested channel time quota expressed as percentage */
11223 A_UINT32 channel_time_quota;
11224} wmi_resmgr_chan_time_quota;
11225
11226typedef struct {
11227 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
11228 A_UINT32 tlv_header;
11229 /** number of channel time quota command structures
11230 * (wmi_resmgr_chan_time_quota) 1 or 2
11231 */
11232 A_UINT32 num_chans;
11233/* This TLV is followed by another TLV of array of bytes
11234 * A_UINT8 data[];
11235 * This data array contains
11236 * num_chans * size of(struct wmi_resmgr_chan_time_quota)
11237 */
11238} wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
11239
11240/* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
11241typedef struct {
11242 /* Frequency of the channel for which the latency is set */
11243 A_UINT32 chan_mhz;
11244 /* Requested channel latency in milliseconds */
11245 A_UINT32 latency;
11246} wmi_resmgr_chan_latency;
11247
11248typedef struct {
11249 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
11250 A_UINT32 tlv_header;
11251 /** number of channel latency command structures
11252 * (wmi_resmgr_chan_latency) 1 or 2
11253 */
11254 A_UINT32 num_chans;
11255/* This TLV is followed by another TLV of array of bytes
11256 * A_UINT8 data[];
11257 * This data array contains
11258 * num_chans * size of(struct wmi_resmgr_chan_latency)
11259 */
11260} wmi_resmgr_set_chan_latency_cmd_fixed_param;
11261
11262/* WMI_STA_SMPS_FORCE_MODE_CMDID */
11263
11264/** STA SMPS Forced Mode */
11265typedef enum {
11266 WMI_SMPS_FORCED_MODE_NONE = 0,
11267 WMI_SMPS_FORCED_MODE_DISABLED,
11268 WMI_SMPS_FORCED_MODE_STATIC,
11269 WMI_SMPS_FORCED_MODE_DYNAMIC
11270} wmi_sta_smps_forced_mode;
11271
11272typedef struct {
11273 /** TLV tag and len; tag equals
11274 * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
11275 A_UINT32 tlv_header;
11276 /** Unique id identifying the VDEV */
11277 A_UINT32 vdev_id;
11278 /** The mode of SMPS that is to be forced in the FW. */
11279 A_UINT32 forced_mode;
11280} wmi_sta_smps_force_mode_cmd_fixed_param;
11281
11282/** wlan HB commands */
11283#define WMI_WLAN_HB_ITEM_UDP 0x1
11284#define WMI_WLAN_HB_ITEM_TCP 0x2
11285#define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE, must be a multiple of 4 bytes */
11286
11287typedef struct {
11288 /** TLV tag and len; tag equals
11289 * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
11290 A_UINT32 tlv_header;
11291 A_UINT32 vdev_id;
11292 A_UINT32 enable;
11293 A_UINT32 item;
11294 A_UINT32 session;
11295} wmi_hb_set_enable_cmd_fixed_param;
11296
11297typedef struct {
11298 /** TLV tag and len; tag equals
11299 * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
11300 A_UINT32 tlv_header;
11301 A_UINT32 vdev_id;
11302 A_UINT32 srv_ip;
11303 A_UINT32 dev_ip;
11304 A_UINT32 seq;
11305 A_UINT32 src_port;
11306 A_UINT32 dst_port;
11307 A_UINT32 interval;
11308 A_UINT32 timeout;
11309 A_UINT32 session;
11310 wmi_mac_addr gateway_mac;
11311} wmi_hb_set_tcp_params_cmd_fixed_param;
11312
11313typedef struct {
11314 /** TLV tag and len; tag equals
11315 * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
11316 A_UINT32 tlv_header;
11317 A_UINT32 vdev_id;
11318 A_UINT32 length;
11319 A_UINT32 offset;
11320 A_UINT32 session;
11321 A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
11322} wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
11323
11324typedef struct {
11325 /** TLV tag and len; tag equals
11326 * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
11327 A_UINT32 tlv_header;
11328 A_UINT32 vdev_id;
11329 A_UINT32 srv_ip;
11330 A_UINT32 dev_ip;
11331 A_UINT32 src_port;
11332 A_UINT32 dst_port;
11333 A_UINT32 interval;
11334 A_UINT32 timeout;
11335 A_UINT32 session;
11336 wmi_mac_addr gateway_mac;
11337} wmi_hb_set_udp_params_cmd_fixed_param;
11338
11339typedef struct {
11340 /** TLV tag and len; tag equals
11341 * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
11342 A_UINT32 tlv_header;
11343 A_UINT32 vdev_id;
11344 A_UINT32 length;
11345 A_UINT32 offset;
11346 A_UINT32 session;
11347 A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
11348} wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
11349
11350/** wlan HB events */
11351typedef enum {
11352 WMI_WLAN_HB_REASON_UNKNOWN = 0,
11353 WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1,
11354 WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2,
11355} WMI_HB_WAKEUP_REASON;
11356
11357typedef struct {
11358 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
11359 A_UINT32 vdev_id; /* unique id identifying the VDEV */
11360 A_UINT32 session; /* Session ID from driver */
11361 A_UINT32 reason; /* wakeup reason */
11362} wmi_hb_ind_event_fixed_param;
11363
11364/** WMI_STA_SMPS_PARAM_CMDID */
11365typedef enum {
11366 /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
11367 WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
11368 /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
11369 * to enter D-SMPS mode from Stalled-D-SMPS mode */
11370 WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
11371 /** RSSI threshold to disable SMPS modes */
11372 WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
11373 /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
11374 WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
11375 /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
11376 WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
11377 /** Enable/Disable DTIM 1chRx feature */
11378 WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5
11379} wmi_sta_smps_param;
11380
11381typedef struct {
11382 /** TLV tag and len; tag equals
11383 * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
11384 A_UINT32 tlv_header;
11385 /** Unique id identifying the VDEV */
11386 A_UINT32 vdev_id;
11387 /** SMPS parameter (see wmi_sta_smps_param) */
11388 A_UINT32 param;
11389 /** Value of SMPS parameter */
11390 A_UINT32 value;
11391} wmi_sta_smps_param_cmd_fixed_param;
11392
11393typedef struct {
11394 /** TLV tag and len; tag equals
11395 * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
11396 A_UINT32 tlv_header;
11397 /* TX stats */
11398 A_UINT32 txBytesPushed;
11399 A_UINT32 txPacketsPushed;
11400 /* RX stats */
11401 A_UINT32 rxBytesRcvd;
11402 A_UINT32 rxPacketsRcvd;
11403 A_UINT32 rxTimeTotal;
11404 /** peer MAC address */
11405 wmi_mac_addr peer_macaddr;
11406} wmi_mcc_sched_sta_traffic_stats;
11407
11408typedef struct {
11409 /** TLV tag and len; tag equals
11410 * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
11411 A_UINT32 tlv_header;
11412 /** Duration over which the host stats were collected */
11413 A_UINT32 duration;
11414 /** Number of stations filled in following stats array */
11415 A_UINT32 num_sta;
11416 /* Following this struct are the TLVs:
11417 * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
11418 */
11419} wmi_mcc_sched_traffic_stats_cmd_fixed_param;
11420
11421typedef struct {
11422 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
11423 /* unique id identifying the VDEV, generated by the caller */
11424 A_UINT32 vdev_id;
11425 /*Batch scan enable command parameters */
11426 A_UINT32 scanInterval;
11427 A_UINT32 numScan2Batch;
11428 A_UINT32 bestNetworks;
11429 A_UINT32 rfBand;
11430 A_UINT32 rtt;
11431} wmi_batch_scan_enable_cmd_fixed_param;
11432
11433typedef struct {
11434 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */
11435 A_UINT32 supportedMscan;
11436} wmi_batch_scan_enabled_event_fixed_param;
11437
11438typedef struct {
11439 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
11440/* unique id identifying the VDEV, generated by the caller */
11441 A_UINT32 vdev_id;
11442 A_UINT32 param;
11443} wmi_batch_scan_disable_cmd_fixed_param;
11444
11445typedef struct {
11446 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
11447 /** unique id identifying the VDEV, generated by the caller */
11448 A_UINT32 vdev_id;
11449 A_UINT32 param;
11450} wmi_batch_scan_trigger_result_cmd_fixed_param;
11451
11452typedef struct {
11453 A_UINT32 tlv_header;
11454 wmi_mac_addr bssid; /* BSSID */
11455 wmi_ssid ssid; /* SSID */
11456 A_UINT32 ch; /* Channel */
11457 A_UINT32 rssi; /* RSSI or Level */
11458 /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
11459 A_UINT32 timestamp;
11460} wmi_batch_scan_result_network_info;
11461
11462typedef struct {
11463 A_UINT32 tlv_header;
11464 A_UINT32 scanId; /* Scan List ID. */
11465 /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
11466 A_UINT32 numNetworksInScanList;
11467 A_UINT32 netWorkStartIndex; /* indicate the start index of network info */
11468} wmi_batch_scan_result_scan_list;
11469
11470#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.*/
11471#define LPI_IE_BITMAP_IS_PROBE 0x00000002 /*send true or false based on scan response frame being a Probe Rsp or not*/
11472#define LPI_IE_BITMAP_SSID 0x00000004 /*send ssid from received scan response frame*/
11473#define LPI_IE_BITMAP_RSSI 0x00000008 /* end RSSI value reported by HW for the received scan response after adjusting with noise floor*/
11474#define LPI_IE_BITMAP_CHAN 0x00000010 /*send channel number from the received scan response*/
11475#define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* sen Tx power from TPC IE of scan rsp*/
11476#define LPI_IE_BITMAP_TX_RATE 0x00000040 /*send rate of the received frame as reported by HW.*/
11477#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.*/
11478#define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /*send timestamp reported in the received scan rsp frame.*/
11479#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.*/
11480/*
11481 * TEMPORARY alias of incorrect old name the correct name.
11482 * This alias will be removed once all references to the old name have been fixed.
11483 */
11484#define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
11485#define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false.*/
11486#define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP*/
11487#define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled*/
11488#define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device.*/
11489#define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel*/
11490#define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received.*/
11491#define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz*/
11492#define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above*/
11493#define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations*/
11494#define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan*/
11495#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.*/
11496#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*/
11497#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 +053011498/*
11499 * extscan will use this field to indicate to
11500 * LOWI LP whether to report result to context hub or not
11501 */
11502#define LPI_IE_BITMAP_REPORT_CONTEXT_HUB 0x00800000
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011503#define LPI_IE_BITMAP_ALL 0xFFFFFFFF
11504
11505typedef struct {
11506 A_UINT32 tlv_header;
11507 /**A_BOOL indicates LPI mgmt snooping enable/disable*/
11508 A_UINT32 enable;
11509 /**LPI snooping mode*/
11510 A_UINT32 snooping_mode;
11511 /** LPI interested IEs in snooping context */
11512 A_UINT32 ie_bitmap;
11513} wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
11514
11515typedef struct {
11516 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
11517 /** Scan ID */
11518 A_UINT32 scan_id;
11519 /** Scan requestor ID */
11520 A_UINT32 scan_req_id;
11521 /** VDEV id(interface) that is requesting scan */
11522 A_UINT32 vdev_id;
11523 /** LPI interested IEs in scan context */
11524 A_UINT32 ie_bitmap;
11525 /** Scan Priority, input to scan scheduler */
11526 A_UINT32 scan_priority;
11527 /** dwell time in msec on active channels */
11528 A_UINT32 dwell_time_active;
11529 /** dwell time in msec on passive channels */
11530 A_UINT32 dwell_time_passive;
11531 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
11532 A_UINT32 min_rest_time;
11533 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
11534 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
11535 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
11536 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
11537 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
11538 * irrespective of activity. activity is determined by the idle_time parameter.
11539 */
11540 A_UINT32 max_rest_time;
11541 /** time before sending next set of probe requests.
11542 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
11543 * The number of probe requests specified depends on the ssid_list and bssid_list
11544 */
11545 A_UINT32 repeat_probe_time;
11546 /** time in msec between 2 consequetive probe requests with in a set. */
11547 A_UINT32 probe_spacing_time;
11548 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
11549 A_UINT32 idle_time;
11550 /** maximum time in msec allowed for scan */
11551 A_UINT32 max_scan_time;
11552 /** delay in msec before sending first probe request after switching to a channel */
11553 A_UINT32 probe_delay;
11554 /** Scan control flags */
11555 A_UINT32 scan_ctrl_flags;
11556 /** Burst duration time in msec*/
11557 A_UINT32 burst_duration;
11558
11559 /** # if channels to scan. In the TLV channel_list[] */
11560 A_UINT32 num_chan;
11561 /** number of bssids. In the TLV bssid_list[] */
11562 A_UINT32 num_bssid;
11563 /** number of ssid. In the TLV ssid_list[] */
11564 A_UINT32 num_ssids;
11565 /** number of bytes in ie data. In the TLV ie_data[] */
11566 A_UINT32 ie_len;
11567
11568/**
11569 * TLV (tag length value ) parameters follow the scan_cmd
11570 * structure. The TLV's are:
11571 * A_UINT32 channel_list[];
11572 * wmi_ssid ssid_list[];
11573 * wmi_mac_addr bssid_list[];
11574 * A_UINT8 ie_data[];
11575 */
11576} wmi_lpi_start_scan_cmd_fixed_param;
11577
11578typedef struct {
11579 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
11580 /** Scan requestor ID */
11581 A_UINT32 scan_req_id;
11582 /** Scan ID */
11583 A_UINT32 scan_id;
11584 /**
11585 * Req Type
11586 * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
11587 * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
11588 * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
11589 * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
11590 */
11591 A_UINT32 req_type;
11592 /**
11593 * vDev ID
11594 * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
11595 */
11596 A_UINT32 vdev_id;
11597} wmi_lpi_stop_scan_cmd_fixed_param;
11598
11599typedef enum {
11600 WMI_LPI_DEVICE_TYPE_AP = 1,
11601 WMI_LPI_DEVICE_TYPE_P2P = 2,
11602 WMI_LPI_DEVICE_TYPE_NAN = 3,
11603} wmi_lpi_device_type;
11604
11605typedef struct {
11606 A_UINT32 tlv_header;
11607 /** Scan requestor ID */
11608 A_UINT32 scan_req_id;
11609 A_UINT32 ie_bitmap;
11610 A_UINT32 data_len;
11611} wmi_lpi_result_event_fixed_param;
11612
11613typedef enum {
11614 /** User scan Request completed */
11615 WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
11616 /** User Request was never serviced */
11617 WMI_LPI_STATUS_DROPPED_REQ = 1,
11618 /** Illegal channel Req */
11619 WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
11620 /** Illegal Operation Req */
11621 WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
11622 /** Request Aborted */
11623 WMI_LPI_STATUS_REQ_ABORTED = 4,
11624 /** Request Timed Out */
11625 WMI_LPI_STATUS_REQ_TIME_OUT = 5,
11626 /** Medium Busy, already there
11627 * is a scan is going on */
11628 WMI_LPI_STATUS_MEDIUM_BUSY = 6,
11629 /* Extscan is the scan client whose scan complete event is triggered */
11630 WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
11631} wmi_lpi_staus;
11632
11633typedef struct {
11634 A_UINT32 tlv_header;
11635 wmi_lpi_staus status;
11636 /** Scan requestor ID */
11637 A_UINT32 scan_req_id;
11638} wmi_lpi_status_event_fixed_param;
11639
11640typedef struct {
11641 A_UINT32 tlv_header;
11642 wmi_mac_addr bssid;
11643 wmi_ssid ssid;
11644 A_UINT32 freq;
11645 A_UINT32 rssi;
11646 A_UINT32 vdev_id;
11647} wmi_lpi_handoff_event_fixed_param;
11648
11649typedef struct {
11650 A_UINT32 tlv_header;
11651 A_UINT32 timestamp; /*timestamp of batch scan event */
11652 A_UINT32 numScanLists; /*number of scan in this event */
11653 A_UINT32 isLastResult; /*is this event a last event of the whole batch scan */
11654} wmi_batch_scan_result_event_fixed_param;
11655
11656typedef struct {
11657 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */
11658 A_UINT32 vdev_id;
11659 /* This TLV is followed by p2p_noa_info for vdev :
11660 * wmi_p2p_noa_info p2p_noa_info;
11661 */
11662} wmi_p2p_noa_event_fixed_param;
11663
11664#define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6
11665#define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1
11666
11667#define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0
11668#define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f
11669
11670#define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7
11671#define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf
11672
11673typedef struct {
11674 /** TLV tag and len; tag equals
11675 * */
11676 A_UINT32 tlv_header;
11677 /** gpip pin number */
11678 A_UINT32 gpio_pin_num;
11679 /** gpio interupt type */
11680 A_UINT32 int_type;
11681 /** RF radio status */
11682 A_UINT32 radio_state;
11683} wmi_rfkill_mode_param;
11684
11685typedef enum {
11686 WMI_SET_LED_SYS_POWEROFF,
11687 WMI_SET_LED_SYS_S3_SUSPEND,
11688 WMI_SET_LED_SYS_S4_S5,
11689 WMI_SET_LED_SYS_DRIVER_DISABLE,
11690 WMI_SET_LED_SYS_WAKEUP,
11691 WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
11692 WMI_SET_LED_SYS_POWERON,
11693} wmi_led_sys_state_param;
11694
11695typedef enum {
11696 WMI_CONFIG_LED_TO_VDD = 0,
11697 WMI_CONFIG_LED_TO_GND = 1,
11698} wmi_config_led_connect_type;
11699
11700typedef enum {
11701 WMI_CONFIG_LED_NOT_WITH_BT = 0,
11702 WMI_CONFIG_LED_WITH_BT = 1,
11703} wmi_config_led_with_bt_flag;
11704
11705typedef enum {
11706 WMI_CONFIG_LED_DISABLE = 0,
11707 WMI_CONFIG_LED_ENABLE = 1,
11708} wmi_config_led_enable_flag;
11709
Sreelakshmi Konamkif9bde842016-03-03 19:03:02 +053011710typedef enum {
11711 WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0,
11712 WMI_CONFIG_LED_HIGH_OFF = 1,
11713 WMI_CONFIG_LED_HIGH_ON = 2,
11714} wmi_config_led_on_flag;
11715
11716typedef enum {
11717 WMI_CONFIG_LED_UNSPECIFIED = 0,
11718 WMI_CONFIG_LED_ON = 1,
11719 WMI_CONFIG_LED_OFF = 2,
11720 WMI_CONFIG_LED_DIM = 3,
11721 WMI_CONFIG_LED_BLINK = 4,
11722 WMI_CONFIG_LED_TXRX = 5,
11723} wmi_config_led_operation_type;
11724
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011725typedef struct {
11726 /** TLV tag and len; tag equals
Govind Singh869c9872016-02-22 18:36:34 +053011727 * WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011728 A_UINT32 tlv_header;
11729 /* Set GPIO pin */
11730 A_UINT32 led_gpio_pin;
11731 /* Set connect type defined in wmi_config_led_connect_type */
11732 A_UINT32 connect_type;
11733 /* Set flag defined in wmi_config_led_with_bt_flag */
11734 A_UINT32 with_bt;
11735 /* Set LED enablement defined in wmi_config_led_enable_flag */
11736 A_UINT32 led_enable;
Govind Singh869c9872016-02-22 18:36:34 +053011737 /** pdev_id for identifying the MAC
11738 * See macros starting with WMI_PDEV_ID_ for values.
11739 */
11740 A_UINT32 pdev_id;
Sreelakshmi Konamkif9bde842016-03-03 19:03:02 +053011741 /* see wmi_config_led_operation_type enum */
11742 A_UINT32 led_operation_type;
11743 /* see wmi_config_led_on_flag enum */
11744 A_UINT32 led_on_flag; /* configure high/low on/off sense */
11745 A_UINT32 led_on_interval; /* for blink function; unit: ms */
11746 A_UINT32 led_off_interval; /* for blink function; unit: ms */
11747 A_UINT32 led_repeat_cnt; /* for blink function: how many blinks */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011748} wmi_pdev_set_led_config_cmd_fixed_param;
11749
11750#define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
11751#define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff
11752
11753/** WMI_PEER_INFO_REQ_CMDID
11754 * Request FW to provide peer info */
11755typedef struct {
11756 /** TLV tag and len; tag equals
11757 * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
11758 A_UINT32 tlv_header;
11759 /** In order to get the peer info for a single peer, host shall
11760 * issue the peer_mac_address of that peer. For getting the
11761 * info all peers, the host shall issue 0xFFFFFFFF as the mac
11762 * address. The firmware will return the peer info for all the
11763 * peers on the specified vdev_id */
11764 wmi_mac_addr peer_mac_address;
11765 /** vdev id */
11766 A_UINT32 vdev_id;
11767} wmi_peer_info_req_cmd_fixed_param;
11768
11769typedef struct {
11770 /** TLV tag and len; tag equals
11771 * WMITLV_TAG_STRUC_wmi_peer_info */
11772 A_UINT32 tlv_header;
11773 /** mac addr of the peer */
11774 wmi_mac_addr peer_mac_address;
11775 /** data_rate of the peer */
11776 A_UINT32 data_rate;
11777 /** rssi of the peer */
11778 A_UINT32 rssi;
11779 /** tx fail count */
11780 A_UINT32 tx_fail_cnt;
11781} wmi_peer_info;
11782
11783/** FW response with the peer info */
11784typedef struct {
11785 /** TLV tag and len; tag equals
11786 * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */
11787 A_UINT32 tlv_header;
11788 /** number of peers in peer_info */
11789 A_UINT32 num_peers;
Govind Singh869c9872016-02-22 18:36:34 +053011790 /* Set to 1 only if vdev_id field is valid */
11791 A_UINT32 valid_vdev_id;
11792 /* VDEV to which the peer belongs to */
11793 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011794 /* This TLV is followed by another TLV of array of structs
11795 * wmi_peer_info peer_info[];
11796 */
11797} wmi_peer_info_event_fixed_param;
11798
Nitesh Shahfcedd3b2016-07-21 17:24:35 +053011799/**
11800 * WMI_PEER_ANTDIV_INFO_REQ_CMDID
11801 * Request FW to provide peer info
11802 */
11803typedef struct {
11804 /**
11805 * TLV tag and len; tag equals
11806 * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_req_cmd_fixed_param
11807 */
11808 A_UINT32 tlv_header;
11809 /**
11810 * In order to get the peer antdiv info for a single peer, host shall
11811 * issue the peer_mac_address of that peer. For getting the
11812 * info all peers, the host shall issue 0xFFFFFFFF as the mac
11813 * address. The firmware will return the peer info for all the
11814 * peers on the specified vdev_id
11815 */
11816 wmi_mac_addr peer_mac_address;
11817 /** vdev id */
11818 A_UINT32 vdev_id;
11819} wmi_peer_antdiv_info_req_cmd_fixed_param;
11820
11821/** FW response with the peer antdiv info */
11822typedef struct {
11823 /** TLV tag and len; tag equals
11824 * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_event_fixed_param
11825 */
11826 A_UINT32 tlv_header;
11827 /** number of peers in peer_info */
11828 A_UINT32 num_peers;
11829 /** VDEV to which the peer belongs to */
11830 A_UINT32 vdev_id;
11831 /**
11832 * This TLV is followed by another TLV of array of structs
11833 * wmi_peer_antdiv_info peer_antdiv_info[];
11834 */
11835} wmi_peer_antdiv_info_event_fixed_param;
11836
11837typedef struct {
11838 /**
11839 * TLV tag and len; tag equals
11840 * WMITLV_TAG_STRUC_wmi_peer_antdiv_info
11841 */
11842 A_UINT32 tlv_header;
11843 /** mac addr of the peer */
11844 wmi_mac_addr peer_mac_address;
11845 /**
11846 * per chain rssi of the peer, for up to 8 chains.
11847 * Each chain's entry reports the RSSI for different bandwidths:
11848 * bits 7:0 -> primary 20 MHz
11849 * bits 15:8 -> secondary 20 MHz of 40 MHz channel (if applicable)
11850 * bits 23:16 -> secondary 40 MHz of 80 MHz channel (if applicable)
11851 * bits 31:24 -> secondary 80 MHz of 160 MHz channel (if applicable)
11852 * Each of these 8-bit RSSI reports is in dB units, with respect to
11853 * the noise floor.
11854 * 0x80 means invalid.
11855 * All unused bytes within used chain_rssi indices shall be
11856 * set to 0x80.
11857 * All unused chain_rssi indices shall be set to 0x80808080.
11858 */
11859 A_INT32 chain_rssi[8];
11860} wmi_peer_antdiv_info;
11861
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011862/** FW response when tx failure count has reached threshold
11863 * for a peer */
11864typedef struct {
11865 /** TLV tag and len; tag equals
11866 * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
11867 A_UINT32 tlv_header;
11868 /** vdev id*/
11869 A_UINT32 vdev_id;
11870 /** mac address */
11871 wmi_mac_addr peer_mac_address;
11872 /** tx failure count- will eventually be removed and not used * */
11873 A_UINT32 tx_fail_cnt;
11874 /** seq number of the nth tx_fail_event */
11875 A_UINT32 seq_no;
11876} wmi_peer_tx_fail_cnt_thr_event_fixed_param;
11877
11878enum wmi_rmc_mode {
11879 /** Disable RMC */
11880 WMI_RMC_MODE_DISABLED = 0,
11881 /** Enable RMC */
11882 WMI_RMC_MODE_ENABLED = 1,
11883};
11884
11885/** Enable RMC transmitter functionality. Upon
11886 * receiving this, the FW shall mutlicast frames with
11887 * reliablity. This is a vendor
11888 * proprietary feature. */
11889typedef struct {
11890 /** TLV tag and len; tag equals
11891 * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */
11892 A_UINT32 tlv_header;
11893 /** vdev id*/
11894 A_UINT32 vdev_id;
11895 /** enable_rmc contains values from enum wmi_rmc_mode;
11896 * Default value: 0 (disabled) */
11897 A_UINT32 enable_rmc;
11898} wmi_rmc_set_mode_cmd_fixed_param;
11899
11900/** Configure transmission periodicity of action frames in a
11901 * RMC network for the multicast transmitter */
11902typedef struct {
11903 /** TLV tag and len; tag equals
11904 * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
11905 A_UINT32 tlv_header;
11906 /** vdev id */
11907 A_UINT32 vdev_id;
11908 /** time period in milliseconds. Default: 300 ms.
11909 An action frame indicating the current leader is transmitted by the
11910 RMC transmitter once every 'periodity_msec' */
11911 A_UINT32 periodicity_msec;
11912} wmi_rmc_set_action_period_cmd_fixed_param;
11913
11914/** Optimise Leader selection process in RMC functionality. For
11915 * Enhancement/Debug purposes only */
11916typedef struct {
11917 /** TLV tag and len; tag equals
11918 * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */
11919 A_UINT32 tlv_header;
11920 /** vdev id */
11921 A_UINT32 vdev_id;
11922 /** flags ::
11923 * 0x0001 - Enable beacon averaging
11924 * 0x0002 - Force leader selection
11925 * 0x0004 - Enable Timer based leader switch
11926 * 0x0008 - Use qos/NULL based for multicast reliability */
11927 A_UINT32 flags;
11928 /** control leader change timeperiod (in seconds) */
11929 A_UINT32 peridocity_leader_switch;
11930 /** control activity timeout value for data rx (in seconds) */
11931 A_UINT32 data_activity_timeout;
11932 /** mac address of leader */
11933 wmi_mac_addr forced_leader_mac_addr;
11934} wmi_rmc_config_cmd_fixed_param;
11935
11936/** MHF is generally implemented in
11937 * the kernel. To decrease system power consumption, the
11938 * driver can enable offloading this to the chipset. In
11939 * order for the offload, the firmware needs the routing table.
11940 * The host shall plumb the routing table into FW. The firmware
11941 * shall perform an IP address lookup and forward the packet to
11942 * the next hop using next hop's mac address. This is a vendor
11943 * proprietary feature. */
11944enum wmi_mhf_ofl_mode {
11945 /** Disable MHF offload */
11946 WMI_MHF_OFL_MODE_DISABLED = 0,
11947 /** Enable MHF offload */
11948 WMI_MHF_OFL_MODE_ENABLED = 1,
11949};
11950
11951typedef struct {
11952 /** TLV tag and len; tag equals
11953 * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
11954 A_UINT32 tlv_header;
11955 /** vdev id*/
11956 A_UINT32 vdev_id;
11957 /** enable_mhf_ofl contains values from enum
11958 * wmi_mhf_ofl_mode; Default value: 0 (disabled) */
11959 A_UINT32 enable_mhf_ofl;
11960} wmi_mhf_offload_set_mode_cmd_fixed_param;
11961
11962enum wmi_mhf_ofl_table_action {
11963 /** Create forwarding offload table in FW */
11964 WMI_MHF_OFL_TBL_CREATE = 0,
11965 /** Append to existing MHF offload table */
11966 WMI_MHF_OFL_TBL_APPEND = 1,
11967 /** Flush entire MHF offload table in FW */
11968 WMI_MHF_OFL_TBL_FLUSH = 2,
11969};
11970
11971typedef struct {
11972 /** TLV tag and len; tag equals
11973 * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
11974 A_UINT32 tlv_header;
11975 /** vdev id*/
11976 A_UINT32 vdev_id;
11977 /** action corresponds to values from enum
11978 * wmi_mhf_ofl_table_action */
11979 A_UINT32 action;
11980 /** number of entries in the table */
11981 A_UINT32 num_entries;
11982/** Followed by the variable length TLV
11983 * wmi_mhf_offload_routing_table_entry entries[] */
11984} wmi_mhf_offload_plumb_routing_table_cmd;
11985
11986typedef struct {
11987 /** TLV tag and len; tag equals
11988 * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
11989 A_UINT32 tlv_header;
11990 /** Destination node's IP address */
11991 WMI_IPV4_ADDR dest_ipv4_addr;
11992 /** Next hop node's MAC address */
11993 wmi_mac_addr next_hop_mac_addr;
11994} wmi_mhf_offload_routing_table_entry;
11995
11996typedef struct {
11997 /** tlv tag and len, tag equals
11998 * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
11999 A_UINT32 tlv_header;
12000
12001 /** full 64 tsf timestamp get from MAC tsf timer indicates
12002 * the time that the radar event uploading to host, split
12003 * it to high 32 bit and lower 32 bit in fulltsf_high and
12004 * full_tsf_low
12005 */
12006 A_UINT32 upload_fullts_low;
12007 A_UINT32 upload_fullts_high;
12008
12009 /** timestamp indicates the time when DFS pulse is detected
12010 * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
12011 */
12012 A_UINT32 pulse_detect_ts;
12013
12014 /** the duaration of the pulse in us */
12015 A_UINT32 pulse_duration;
12016
12017 /** the center frequency of the radar pulse detected, KHz */
12018 A_UINT32 pulse_center_freq;
12019
12020 /** bandwidth of current DFS channel, MHz */
12021 A_UINT32 ch_bandwidth;
12022
12023 /** center channel frequency1 of current DFS channel, MHz */
12024 A_UINT16 ch_center_freq1;
12025
12026 /** center channel frequency2 of current DFS channel, MHz,
12027 * reserved for 160 BW mode
12028 */
12029 A_UINT16 ch_center_freq2;
12030
12031 /** flag to indicate if this pulse is chirp */
12032 A_UINT8 pulse_is_chirp;
12033
12034 /** RSSI recorded in the ppdu */
12035 A_UINT8 rssi;
12036
12037 /** extened RSSI info */
12038 A_UINT8 rssi_ext;
12039
12040 /** For 4-byte aligment padding */
12041 A_UINT8 reserved;
12042
Govind Singh869c9872016-02-22 18:36:34 +053012043 union {
12044 /* OBSOLETE - will be removed once all refs are gone */
12045 A_UINT8 pmac_id;
12046 /** pdev_id for identifying the MAC
12047 * See macros starting with WMI_PDEV_ID_ for values.
12048 */
12049 A_UINT8 pdev_id;
12050 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012051
12052 /** index of peak magnitude bin (signed) */
12053 A_INT32 peak_sidx;
12054
12055} wmi_dfs_radar_event_fixed_param;
12056
12057typedef struct {
12058 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */
12059
12060 /*Thermal thresholds */
12061 A_UINT32 lower_thresh_degreeC; /* in degree C */
12062 A_UINT32 upper_thresh_degreeC; /* in degree C */
12063
12064 /*Enable/Disable Thermal Monitoring for Mitigation */
12065 A_UINT32 enable;
12066} wmi_thermal_mgmt_cmd_fixed_param;
12067
12068typedef struct {
12069 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */
12070
12071 A_UINT32 temperature_degreeC; /* temperature in degree C */
12072} wmi_thermal_mgmt_event_fixed_param;
12073
12074/**
12075 * This command is sent from WLAN host driver to firmware to
12076 * request firmware to configure auto shutdown timer in fw
12077 * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
12078 */
12079typedef struct {
12080 A_UINT32 tlv_header;
12081 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */
12082 A_UINT32 timer_value;
12083 /** timer value; 0=disable */
12084} wmi_host_auto_shutdown_cfg_cmd_fixed_param;
12085
12086enum wmi_host_auto_shutdown_reason {
12087 WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
12088 WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
12089 WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
12090};
12091
12092/* WMI_HOST_AUTO_SHUTDOWN_EVENTID */
12093typedef struct {
12094 A_UINT32 tlv_header;
12095 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */
12096 A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
12097} wmi_host_auto_shutdown_event_fixed_param;
12098
12099/** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
12100 * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
12101 * This command is only used by some customer for verification test. It is not for end-user.
12102 *
12103 * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
12104 *
12105 * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
12106 * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condtion only. When multiple
12107 * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
12108 * <channel, ack_offset> pair is unique.
12109 *
12110 * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
12111 * called basic_config_info by bitmap
12112 * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
12113 *
12114 * '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
12115 * is ignored.
12116 * disable will remove preious conditions from FW.
12117 * conditions from the later command will over write conditions stored from a previous command.
12118 *
12119 */
12120
12121#define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */
12122#define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */
12123#define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */
12124#define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */
12125
12126#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */
12127#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */
12128#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */
12129#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */
12130
12131#define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */
12132#define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */
12133#define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */
12134#define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */
12135
12136#define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */
12137#define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */
12138
12139#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */
12140#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */
12141#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */
12142#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */
12143#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */
12144#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */
12145#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */
12146#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */
12147
12148#define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */
12149#define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */
12150
12151#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */
12152#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */
12153
12154#define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */
12155#define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */
12156
12157/** Bit map definition for basic_config_info starts */
12158#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0
12159#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012160#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
12161#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 -080012162
12163#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5
12164#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012165#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
12166#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 -080012167
12168#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10
12169#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012170#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
12171#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 -080012172
12173#define WMI_TPC_CHAINMASK_CONFIG_BT_S 12
12174#define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012175#define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BT)
12176#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 -080012177
12178#define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14
12179#define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012180#define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STBC)
12181#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 -080012182
12183#define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16
12184#define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012185#define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BAND)
12186#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 -080012187
12188#define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17
12189#define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012190#define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STREAM)
12191#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 -080012192
12193#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18
12194#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012195#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
12196#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 -080012197
12198#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21
12199/*
12200 * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
12201 * is temporarily maintained as an alias for the correct name
12202 * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
12203 */
12204#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
12205#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012206#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
12207#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 -080012208
12209#define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22
12210/*
12211 * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
12212 * is temporarily maintained as an alias for the correct name
12213 * (WMI_TPC_CHAINMASK_CONFIG_RATE)
12214 */
12215#define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
12216#define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
12217#define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012218#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 -080012219
12220/** Bit map definition for basic_config_info ends */
12221
12222typedef struct {
12223 A_UINT32 tlv_header;
12224 /** Basic condition defined as bit map above, bitmap is chosen to save memory.
12225 * Bit0 ~ Bit4: tpc offset which will be adjusted if condtion matches, the unit is 0.5dB. bit4 indicates signed
12226 * Bit5 ~ Bit9: ack offset which will be adjusted if condtion matches, the unit is 0.5dB. bit9 indicates signed
12227 * 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
12228 * 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
12229 * 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
12230 * Bit16 : band condition b'0: 2G, b'1: 5G
12231 * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams
12232 * 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
12233 * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
12234 * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
12235 * Bit23 ~ Bit31: reserved
12236 */
12237 A_UINT32 basic_config_info;
12238
12239 /** channel mapping bit rule: The lower bit corresponds with smaller channel.
12240 * it depends on Bit14 of basic_config_info
12241 * Total 24 channels for 5G
12242 * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
12243 * Total 14 channels for 2G
12244 * 1 ~ 14
12245 */
12246 A_UINT32 channel;
12247
12248 /** rate mapping bit rule: The lower bit corresponds with lower rate.
12249 * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
12250 * Legacy rates , 11b, 11g, 11A
12251 * 11n one stream ( ht20, ht40 ) 8+8
12252 * 11n two streams ( ht20, ht40 ) 8+8
12253 * 11ac one stream ( vht20, vht40, vht80 ) 10+10+10
12254 * 11ac two streams (vht20, vht40, vht80 ) 10+10+10
12255 */
12256 A_UINT32 rate0;
12257 /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
12258 * 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
12259 */
12260
12261 /** 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
12262 */
12263 A_UINT32 rate1;
12264} wmi_tpc_chainmask_config;
12265
12266#define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/
12267#define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/
12268
12269typedef struct {
12270 A_UINT32 tlv_header;
12271 A_UINT32 enable;
12272 /** enable to set tpc & chainmask when condtions meet, 0: disabled, 1: enabled. */
12273 A_UINT32 num_tpc_chainmask_configs;
12274 /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */
12275} wmi_tpc_chainmask_config_cmd_fixed_param;
12276
12277typedef struct {
12278 A_UINT32 tlv_header;
12279 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
12280 A_UINT32 data_len;
12281 /** length in byte of data[]. */
12282 /* This structure is used to send REQ binary blobs
12283 * from application/service to firmware where Host drv is pass through .
12284 * Following this structure is the TLV:
12285 * A_UINT8 data[]; // length in byte given by field data_len.
12286 */
12287} wmi_nan_cmd_param;
12288
12289typedef struct {
12290 A_UINT32 tlv_header;
12291 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
12292 A_UINT32 data_len;
12293 /** length in byte of data[]. */
12294 /* This structure is used to send REQ binary blobs
12295 * from firmware to application/service where Host drv is pass through .
12296 * Following this structure is the TLV:
12297 * A_UINT8 data[]; // length in byte given by field data_len.
12298 */
12299} wmi_nan_event_hdr;
12300
Govind Singh941bd5e2016-02-04 17:15:25 +053012301/**
12302 * Event to indicate NAN discovery interface created
12303 */
12304typedef struct {
12305 /*
12306 * TLV tag and len; tag equals
12307 * WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param
12308 */
12309 A_UINT32 tlv_header;
12310 /** Unique id identifying the VDEV */
12311 A_UINT32 vdev_id;
12312 /** NAN interface MAC address */
12313 wmi_mac_addr nan_interface_macaddr;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012314} wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE;
12315
12316#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 +053012317
12318/**
12319 * Event to indicate NAN discovery interface deleted
12320 */
12321typedef struct {
12322 /*
12323 * TLV tag and len; tag equals
12324 * WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param
12325 */
12326 A_UINT32 tlv_header;
12327 /** Unique id identifying the VDEV */
12328 A_UINT32 vdev_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012329} wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE;
12330
12331#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 +053012332
12333/**
12334 * Event to indicate NAN device started new cluster
12335 */
12336typedef struct {
12337 /*
12338 * TLV tag and len; tag equals
12339 * WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param
12340 */
12341 A_UINT32 tlv_header;
12342 /** Unique id identifying the VDEV */
12343 A_UINT32 vdev_id;
12344 /** NAN Cluster ID */
12345 A_UINT32 nan_cluster_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012346} wmi_nan_started_cluster_event_fixed_param_PROTOTYPE;
12347
12348#define wmi_nan_started_cluster_event_fixed_param wmi_nan_started_cluster_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012349
12350/**
12351 * Event to indicate NAN device joined to cluster
12352 */
12353typedef struct {
12354 /*
12355 * TLV tag and len; tag equals
12356 * WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param
12357 */
12358 A_UINT32 tlv_header;
12359 /** Unique id identifying the VDEV */
12360 A_UINT32 vdev_id;
12361 /** NAN Cluster ID */
12362 A_UINT32 nan_cluster_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012363} wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE;
12364
12365#define wmi_nan_joined_cluster_event_fixed_param wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012366
12367/** NAN DATA CMD's */
12368
12369/**
12370 * NAN Data get capabilities req
12371 */
12372typedef struct {
12373 /*
12374 * TLV tag and len; tag equals
12375 * WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param
12376 */
12377 A_UINT32 tlv_header;
12378 /** unique id generated in upper layer for the transaction */
12379 A_UINT32 transaction_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012380} wmi_ndi_get_cap_req_fixed_param_PROTOTYPE;
Govind Singh941bd5e2016-02-04 17:15:25 +053012381
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012382#define wmi_ndi_get_cap_req_fixed_param wmi_ndi_get_cap_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012383
12384/**
12385 * NDP Response code
12386 */
12387typedef enum {
12388 NDP_RSP_CODE_REQUEST_ACCEPT = 0x00,
12389 NDP_RSP_CODE_REQUEST_REJECT = 0x01,
12390 NDP_RSP_CODE_REQUEST_DEFER = 0x02,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012391} wmi_ndp_rsp_code_PROTOTYPE;
12392
12393#define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012394
12395/**
12396 * NDP Initiator requesting a data session
12397 */
12398typedef struct {
12399 /*
12400 * TLV tag and len; tag equals
12401 * WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param
12402 */
12403 A_UINT32 tlv_header;
12404 /** Unique id identifying the VDEV */
12405 A_UINT32 vdev_id;
12406 /** unique id generated in upper layer for the transaction */
12407 A_UINT32 transaction_id;
12408 /** Unique Instance Id identifying the Responder's service */
12409 A_UINT32 service_instance_id;
12410 /** Discovery MAC addr of the publisher/peer */
12411 wmi_mac_addr peer_discovery_mac_addr;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012412 /* Actual number of bytes in TLV ndp_cfg */
Govind Singh941bd5e2016-02-04 17:15:25 +053012413 A_UINT32 ndp_cfg_len;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012414 /* Actual number of bytes in TLV ndp_app_info */
Govind Singh941bd5e2016-02-04 17:15:25 +053012415 A_UINT32 ndp_app_info_len;
12416 /**
12417 * TLV (tag length value ) parameters follow the ndp_initiator_req
12418 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012419 * wmi_channel channel;
12420 * A_UINT8 ndp_cfg[];
12421 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053012422 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012423} wmi_ndp_initiator_req_fixed_param_PROTOTYPE;
12424
12425#define wmi_ndp_initiator_req_fixed_param wmi_ndp_initiator_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012426
12427/**
12428 * Initiate a data response on the responder side
12429 * for data request indication from the peer
12430 */
12431typedef struct {
12432 /*
12433 * TLV tag and len; tag equals
12434 * WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param
12435 */
12436 A_UINT32 tlv_header;
12437 /** Unique id identifying the VDEV */
12438 A_UINT32 vdev_id;
12439 /** unique id generated in upper layer for the transaction */
12440 A_UINT32 transaction_id;
12441 /**
12442 * Unique token Id generated on the initiator/responder
12443 * side used for a NDP session between two NAN devices
12444 */
12445 A_UINT32 ndp_instance_id;
12446 /** Response Code defined in wmi_ndp_rsp_code */
12447 A_UINT32 rsp_code;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012448 /** Number of bytes in TLV ndp_cfg */
Govind Singh941bd5e2016-02-04 17:15:25 +053012449 A_UINT32 ndp_cfg_len;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012450 /** Number of bytes in TLV ndp_app_info */
Govind Singh941bd5e2016-02-04 17:15:25 +053012451 A_UINT32 ndp_app_info_len;
12452 /**
12453 * TLV (tag length value ) parameters follow the ndp_responder_req
12454 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012455 * A_UINT8 ndp_cfg[];
12456 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053012457 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012458} wmi_ndp_responder_req_fixed_param_PROTOTYPE;
12459
12460#define wmi_ndp_responder_req_fixed_param wmi_ndp_responder_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012461
12462/**
12463 * NDP end type
12464 */
12465typedef enum {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012466 WMI_NDP_END_TYPE_UNSPECIFIED = 0x00,
12467 WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01,
12468 WMI_NDP_END_TYPE_OTA_FRAME = 0x02,
12469} wmi_ndp_end_type_PROTOTYPE;
12470
12471#define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012472
12473/**
12474 * NDP end reason code
12475 */
12476typedef enum {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012477 WMI_NDP_END_REASON_UNSPECIFIED = 0x00,
12478 WMI_NDP_END_REASON_INACTIVITY = 0x01,
12479 WMI_NDP_END_REASON_PEER_DATA_END = 0x02,
12480} wmi_ndp_end_reason_code_PROTOTYPE;
12481
12482#define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012483
12484/**
12485 * NDP end request
12486 */
12487typedef struct {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012488 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */
12489 A_UINT32 tlv_header;
Govind Singh941bd5e2016-02-04 17:15:25 +053012490 /** NDP instance id */
12491 A_UINT32 ndp_instance_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012492} wmi_ndp_end_req_PROTOTYPE;
Govind Singh941bd5e2016-02-04 17:15:25 +053012493
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012494#define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012495
12496/**
12497 * NDP End request
12498 */
12499typedef struct {
12500 /*
12501 * TLV tag and len; tag equals
12502 * WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param
12503 */
12504 A_UINT32 tlv_header;
12505 /** unique id generated in upper layer for the transaction */
12506 A_UINT32 transaction_id;
Govind Singh941bd5e2016-02-04 17:15:25 +053012507 /**
12508 * TLV (tag length value ) parameters follow the ndp_end_req
12509 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012510 * wmi_ndp_end_req ndp_end_req_list[];
Govind Singh941bd5e2016-02-04 17:15:25 +053012511 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012512} wmi_ndp_end_req_fixed_param_PROTOTYPE;
12513
12514#define wmi_ndp_end_req_fixed_param wmi_ndp_end_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012515
12516/* NAN DATA RSP EVENTS */
12517
12518/**
12519 * Event to indicate NAN Data Interface capabilities cmd
12520 */
12521typedef struct {
12522 /*
12523 * TLV tag and len; tag equals
12524 * WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param
12525 */
12526 A_UINT32 tlv_header;
12527 /** Copy of transaction_id received in wmi_ndi_get_cap_req */
12528 A_UINT32 transaction_id;
12529 /** Max ndi interface support */
12530 A_UINT32 max_ndi_interfaces;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012531 /** Max ndp sessions can support */
12532 A_UINT32 max_ndp_sessions;
Govind Singh941bd5e2016-02-04 17:15:25 +053012533 /** Max number of peer's per ndi */
12534 A_UINT32 max_peers_per_ndi;
Anurag Chouhan19aa3bf2016-08-04 19:10:12 +053012535 /** which combination of bands is supported - see NAN_DATA_SUPPORTED_BAND enums */
12536 A_UINT32 nan_data_supported_bands;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012537} wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE;
12538
12539#define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012540
12541/**
12542 * NDP command response code
12543 */
12544typedef enum {
12545 NDP_CMD_RSP_STATUS_SUCCESS = 0x00,
12546 NDP_CMD_RSP_STATUS_ERROR = 0x01,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012547} wmi_ndp_cmd_rsp_status_PROTOTYPE;
12548
12549#define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012550
12551/**
Govind Singh941bd5e2016-02-04 17:15:25 +053012552 * Event response for wmi_ndp_initiator_req
12553 */
12554typedef struct {
12555 /*
12556 * TLV tag and len; tag equals
12557 * WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param
12558 */
12559 A_UINT32 tlv_header;
12560 /** Unique id identifying the VDEV */
12561 A_UINT32 vdev_id;
12562 /** Copy of transaction_id received in wmi_ndp_initiator_req */
12563 A_UINT32 transaction_id;
12564 /** Response status defined in wmi_ndp_cmd_rsp_status*/
12565 A_UINT32 rsp_status;
Govind Singh941bd5e2016-02-04 17:15:25 +053012566 A_UINT32 reason_code;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012567 /*
12568 * Unique token Id generated on the initiator/responder
12569 * side used for a NDP session between two NAN devices
12570 */
12571 A_UINT32 ndp_instance_id;
12572} wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE;
12573
12574#define wmi_ndp_initiator_rsp_event_fixed_param wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012575
12576/**
12577 * Event response for wmi_ndp_responder_req cmd
12578 */
12579typedef struct {
12580 /*
12581 * TLV tag and len; tag equals
12582 * WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param
12583 */
12584 A_UINT32 tlv_header;
12585 /** Unique id identifying the VDEV */
12586 A_UINT32 vdev_id;
12587 /** Copy of transaction_id received in wmi_ndp_responder_req */
12588 A_UINT32 transaction_id;
12589 /** Response status defined in wmi_ndp_cmd_rsp_status*/
12590 A_UINT32 rsp_status;
Govind Singh941bd5e2016-02-04 17:15:25 +053012591 A_UINT32 reason_code;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012592 /*
12593 * Unique token Id generated on the initiator/responder
12594 * side used for a NDP session between two NAN devices
12595 */
12596 A_UINT32 ndp_instance_id;
12597 /* NDI mac address of the peer */
12598 wmi_mac_addr peer_ndi_mac_addr;
12599} wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE;
12600
12601#define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE
12602/**
12603 * Active ndp instance id
12604 */
12605typedef struct {
12606 /*
12607 * TLV tag and len; tag equals
12608 * WMITLV_TAG_STRUC_wmi_active_ndp_instance_id
12609 */
12610 A_UINT32 tlv_header;
12611 /* NDP instance id */
12612 A_UINT32 ndp_instance_id;
12613} wmi_active_ndp_instance_id_PROTOTYPE;
12614
12615#define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012616
12617/**
12618 * NDP end response per ndi
12619 */
12620typedef struct {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012621 /*
12622 * TLV tag and len; tag equals
12623 * WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi
12624 */
12625 A_UINT32 tlv_header;
Govind Singh941bd5e2016-02-04 17:15:25 +053012626 /** Unique id identifying the VDEV */
12627 A_UINT32 vdev_id;
12628 /** Peer MAC addr */
12629 wmi_mac_addr peer_mac_addr;
12630 /** Number of active ndps on this ndi */
12631 A_UINT32 num_active_ndps_on_ndi;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012632} wmi_ndp_end_rsp_per_ndi_PROTOTYPE;
Govind Singh941bd5e2016-02-04 17:15:25 +053012633
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012634#define wmi_ndp_end_rsp_per_ndi wmi_ndp_end_rsp_per_ndi_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012635
12636/**
12637 * Event response for wmi_ndp_end_req cmd
12638 */
12639typedef struct {
12640 /*
12641 * TLV tag and len; tag equals
12642 * WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param
12643 */
12644 A_UINT32 tlv_header;
12645 /** Copy of transaction_id received in wmi_ndp_end_req */
12646 A_UINT32 transaction_id;
12647 /** Response status defined in wmi_ndp_cmd_rsp_status*/
12648 A_UINT32 rsp_status;
Govind Singh941bd5e2016-02-04 17:15:25 +053012649 A_UINT32 reason_code;
Govind Singh941bd5e2016-02-04 17:15:25 +053012650 /**
12651 * TLV (tag length value ) parameters follow the ndp_end_rsp
12652 * structure. The TLV's are:
12653 * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[];
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012654 * wmi_active_ndp_instance_id active_ndp_instances_id[];
Govind Singh941bd5e2016-02-04 17:15:25 +053012655 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012656} wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE;
12657
12658#define wmi_ndp_end_rsp_event_fixed_param wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012659
12660/** NAN DATA EVENTS */
12661
12662/**
12663 * NDP self role
12664 */
12665typedef enum {
12666 WMI_NDP_INITIATOR_ROLE,
12667 WMI_NDP_RESPONDER_ROLE,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012668} wmi_ndp_self_role_PROTOTYPE;
12669
12670#define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012671
12672/**
12673 * NDP accept policy
12674 */
12675typedef enum {
12676 WMI_NDP_ACCEPT_POLICY_NONE,
12677 WMI_NDP_ACCEPT_POLICY_ALL,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012678} wmi_ndp_accept_policy_PROTOTYPE;
12679
12680#define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012681
12682/**
12683 * Event indication received on the responder side when a NDP Initiator request/
12684 * NDP session is initiated on the Initiator side
12685 * (self role will be NDP_RESPONDER_ROLE)
12686 *
12687 * Event indication received on the initiator side when a
12688 * NDP responder request on the Initiator side
12689 * (self role will be NDP_INITIATOR_ROLE)
12690 */
12691typedef struct {
12692 /*
12693 * TLV tag and len; tag equals
12694 * WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param
12695 */
12696 A_UINT32 tlv_header;
12697 /** Unique id identifying the VDEV */
12698 A_UINT32 vdev_id;
12699 /** Self NDP Role defined in wmi_ndp_self_role */
12700 A_UINT32 self_ndp_role;
12701 /** Accept policy defined in wmi_ndp_accept_policy */
12702 A_UINT32 accept_policy;
12703 /** Unique Instance Id corresponding to a service/session. */
12704 A_UINT32 service_instance_id;
12705 /** Discovery MAC addr of the peer/initiator */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012706 wmi_mac_addr peer_discovery_mac_addr;
12707 /* NDI mac address of the peer */
12708 wmi_mac_addr peer_ndi_mac_addr;
Govind Singh941bd5e2016-02-04 17:15:25 +053012709 /**
12710 * Unique token Id generated on the initiator/responder
12711 * side used for a NDP session between two NAN devices
12712 */
12713 A_UINT32 ndp_instance_id;
12714 /** Number of bytes in TLV wmi_ndp_cfg */
12715 A_UINT32 ndp_cfg_len;
12716 /** Number of bytes in TLV wmi_ndp_app_info */
12717 A_UINT32 ndp_app_info_len;
12718 /**
12719 * TLV (tag length value ) parameters follow the ndp_indication
12720 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012721 * A_UINT8 ndp_cfg[];
12722 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053012723 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012724} wmi_ndp_indication_event_fixed_param_PROTOTYPE;
12725
12726#define wmi_ndp_indication_event_fixed_param wmi_ndp_indication_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012727
12728/**
12729 * Event indication of data confirm is received on both
12730 * initiator and responder side confirming a NDP session
12731 */
12732typedef struct {
12733 /*
12734 * TLV tag and len; tag equals
12735 * WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param
12736 */
12737 A_UINT32 tlv_header;
12738 /** Unique id identifying the VDEV */
12739 A_UINT32 vdev_id;
12740 /**
12741 * Unique token Id generated on the initiator/responder
12742 * side used for a NDP session between two NAN devices
12743 */
12744 A_UINT32 ndp_instance_id;
12745 /*
12746 * NDI mac address of the peer
12747 * (required to derive target ipv6 address)
12748 */
12749 wmi_mac_addr peer_ndi_mac_addr;
12750 /** Response Code defined in wmi_ndp_rsp_code */
12751 A_UINT32 rsp_code;
12752 /** Number of bytes in TLV wmi_ndp_cfg */
12753 A_UINT32 ndp_cfg_len;
12754 /** Number of bytes in TLV wmi_ndp_app_info */
12755 A_UINT32 ndp_app_info_len;
Anurag Chouhanb36db512016-04-27 16:13:35 +053012756 /** Reason Code */
12757 A_UINT32 reason_code;
12758 /** Number of active ndps on this peer */
12759 A_UINT32 num_active_ndps_on_peer;
Govind Singh941bd5e2016-02-04 17:15:25 +053012760 /**
12761 * TLV (tag length value ) parameters follow the ndp_confirm
12762 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012763 * A_UINT8 ndp_cfg[];
12764 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053012765 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012766} wmi_ndp_confirm_event_fixed_param_PROTOTYPE;
12767
12768#define wmi_ndp_confirm_event_fixed_param wmi_ndp_confirm_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012769
12770/**
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012771 * Event indication received on the initiator/responder side terminating a NDP session
Govind Singh941bd5e2016-02-04 17:15:25 +053012772 */
12773typedef struct {
12774 /*
12775 * TLV tag and len; tag equals
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012776 * WMITLV_TAG_STRUC_wmi_ndp_end_indication
Govind Singh941bd5e2016-02-04 17:15:25 +053012777 */
12778 A_UINT32 tlv_header;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012779 /** type defined in wmi_ndp_end_type */
12780 A_UINT32 type;
12781 /* Unique id identifying the VDEV */
Govind Singh941bd5e2016-02-04 17:15:25 +053012782 A_UINT32 vdev_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012783 /** reason_code defined in wmi_ndp_end_reason_code */
12784 A_UINT32 reason_code;
12785 /** NDP instance id */
12786 A_UINT32 ndp_instance_id;
12787 /* NDI MAC addr of the peer */
12788 wmi_mac_addr peer_ndi_mac_addr;
12789 /* Number of active ndps on this peer */
12790 A_UINT32 num_active_ndps_on_peer;
12791} wmi_ndp_end_indication_PROTOTYPE;
12792
12793#define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012794
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012795typedef struct {
12796 A_UINT32 tlv_header;
12797 A_UINT32 num_data;
12798 /* followed by WMITLV_TAG_ARRAY_BYTE */
12799} wmi_diag_data_container_event_fixed_param;
12800
12801enum {
12802 WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
12803 WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
12804 WMI_PDEV_PARAM_TXPOWER_REASON_MAX
12805};
12806
12807#define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF
12808#define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
12809
12810#define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00
12811#define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
12812
12813#define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \
12814 ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
12815
12816#define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \
12817 ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
12818
12819#define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \
12820 (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
12821
12822#define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \
12823 (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
12824
12825/**
12826 * This command is sent from WLAN host driver to firmware to
12827 * notify the current modem power state. Host would receive a
12828 * message from modem when modem is powered on. Host driver
12829 * would then send this command to firmware. Firmware would then
12830 * power on WCI-2 (UART) interface for LTE/MWS Coex.
12831 *
12832 * This command is only applicable for APQ platform which has
12833 * modem on the platform. If firmware doesn't support MWS Coex,
12834 * this command can be dropped by firmware.
12835 *
12836 * This is a requirement from modem team that WCN can't toggle
12837 * UART before modem is powered on.
12838 */
12839typedef struct {
12840 /** TLV tag and len; tag equals
12841 * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
12842 A_UINT32 tlv_header;
12843
12844 /** Modem power state parameter */
12845 A_UINT32 modem_power_state;
12846} wmi_modem_power_state_cmd_param;
12847
12848enum {
12849 WMI_MODEM_STATE_OFF = 0,
12850 WMI_MODEM_STATE_ON
12851};
12852
12853#define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
12854#define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */
12855
12856/** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
12857 generated whenever firmware roamed to new AP silently and
12858 (a) If the host is awake, FW sends the event to the host immediately .
12859 (b) If host is in sleep then either
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012860 (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012861 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 +053012862 (2) data/mgmt frame is received from roamed AP, which needs to return to host
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012863 */
12864
12865typedef struct {
12866 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
12867 A_UINT32 tlv_header;
12868
12869 A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
12870 A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
12871 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES];
12872} wmi_key_material;
12873
12874typedef struct {
12875 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */
12876 /** Unique id identifying the VDEV on which roaming is done by firmware */
12877 A_UINT32 vdev_id;
12878 /** auth_status: connected or authorized */
12879 A_UINT32 auth_status;
12880 /*
Nirav Shah439e6262015-11-05 10:53:18 +053012881 * roam_reason:
12882 * bits 0-3 for roam reason see WMI_ROAM_REASON_XXX
12883 * bits 4-5 for subnet status see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012884 */
12885 A_UINT32 roam_reason;
12886 /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
12887 A_UINT32 rssi;
12888 /** MAC address of roamed AP */
12889 wmi_mac_addr bssid; /* BSSID */
12890 /** whether the frame is beacon or probe rsp */
12891 A_UINT32 is_beacon;
12892 /** the length of beacon/probe rsp */
12893 A_UINT32 bcn_probe_rsp_len;
12894 /** the length of reassoc rsp */
12895 A_UINT32 reassoc_rsp_len;
Manikandan Mohan30728082015-12-09 12:35:24 -080012896 /** the length of reassoc req */
12897 A_UINT32 reassoc_req_len;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012898 /**
12899 * TLV (tag length value ) parameters follows roam_synch_event
12900 * The TLV's are:
12901 * A_UINT8 bcn_probe_rsp_frame[]; length identified by bcn_probe_rsp_len
12902 * A_UINT8 reassoc_rsp_frame[]; length identified by reassoc_rsp_len
12903 * wmi_channel chan;
12904 * wmi_key_material key;
12905 * A_UINT32 status; subnet changed status not being used
12906 * currently. will pass the information using roam_status.
Manikandan Mohan30728082015-12-09 12:35:24 -080012907 * A_UINT8 reassoc_req_frame[]; length identified by reassoc_req_len
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012908 **/
12909} wmi_roam_synch_event_fixed_param;
12910
12911#define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF
12912
12913typedef struct {
12914 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
12915 A_UINT32 tlv_header;
12916 /** MAC address of the peer for which the estimated link speed is required. */
12917 wmi_mac_addr peer_macaddr;
Govind Singh869c9872016-02-22 18:36:34 +053012918 /* Set to 1 only if vdev_id field is valid */
12919 A_UINT32 valid_vdev_id;
12920 /* VDEV to which the peer belongs to */
12921 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012922} wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
12923
12924typedef struct {
12925 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
12926 A_UINT32 tlv_header;
12927 /** MAC address of the peer for which the estimated link speed is required.
12928 */
12929 wmi_mac_addr peer_macaddr;
12930 /* Estimated link speed in kbps.
12931 * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
12932 */
12933 A_UINT32 est_linkspeed_kbps;
Govind Singh869c9872016-02-22 18:36:34 +053012934 /* Set to 1 only if vdev_id field is valid */
12935 A_UINT32 valid_vdev_id;
12936 /* VDEV to which the peer belongs to */
12937 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012938} wmi_peer_estimated_linkspeed_event_fixed_param;
12939
12940typedef struct {
12941 A_UINT32 tlv_header; /* TLV tag and len; tag equals */
12942 /* vdev ID */
12943 A_UINT32 vdev_id;
12944 A_UINT32 data_len;
12945 /** length in byte of data[]. */
12946 /* This structure is used to send REQ binary blobs
12947 * from application/service to firmware where Host drv is pass through .
12948 * Following this structure is the TLV:
12949 * A_UINT8 data[]; // length in byte given by field data_len.
12950 */
12951} wmi_req_stats_ext_cmd_fixed_param;
12952
12953typedef struct {
12954 A_UINT32 tlv_header;
12955 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
12956 A_UINT32 vdev_id;
12957 /** vdev ID */
12958 A_UINT32 data_len;
12959 /** length in byte of data[]. */
12960 /* This structure is used to send REQ binary blobs
12961 * from firmware to application/service where Host drv is pass through .
12962 * Following this structure is the TLV:
12963 * A_UINT8 data[]; // length in byte given by field data_len.
12964 */
12965} wmi_stats_ext_event_fixed_param;
12966
12967typedef struct {
Manikandan Mohan429a0782015-12-23 14:35:54 -080012968 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */
12969 /** unique id identifying the VDEV, generated by the caller */
12970 A_UINT32 vdev_id;
12971 /** peer MAC address */
12972 wmi_mac_addr peer_macaddr;
12973} wmi_peer_delete_resp_event_fixed_param;
12974
12975typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012976 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
12977 A_UINT32 tlv_header;
12978 A_UINT32 vdev_id; /* vdev ID */
12979 /* MAC address of the peer for which the estimated link speed is required. */
12980 wmi_mac_addr peer_macaddr;
12981 A_UINT32 state; /* peer state */
12982} wmi_peer_state_event_fixed_param;
12983
12984typedef struct {
12985 /*
12986 * TLV tag and len; tag equals
12987 * WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param
12988 */
12989 A_UINT32 tlv_header;
12990 /* unique id identifying the VDEV, generated by the caller */
12991 A_UINT32 vdev_id;
12992 /* peer MAC address */
12993 wmi_mac_addr peer_macaddr;
12994} wmi_peer_assoc_conf_event_fixed_param;
12995
12996enum {
12997 WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0,
12998 /** scan_type: passive */
12999 WMI_2G4_HT40_OBSS_SCAN_ACTIVE,
13000 /** scan_type: active */
13001};
13002
13003typedef struct {
13004 /**
13005 * TLV tag and len;
13006 * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enalbe_cmd_fixed_param
13007 */
13008 A_UINT32 tlv_header;
13009 A_UINT32 vdev_id;
13010 /**
13011 * active or passive. if active all the channels are actively scanned.
13012 * if passive then all the channels are passively scanned
13013 */
13014 A_UINT32 scan_type;
13015 /**
13016 * FW can perform multiple scans with in a OBSS scan interval.
13017 * For each scan,
13018 * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel ,
13019 * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
13020 * The unit for these 2 parameters is TUs.
13021 */
13022 A_UINT32 obss_scan_passive_dwell;
13023 A_UINT32 obss_scan_active_dwell;
13024 /**
13025 * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
13026 * both min and total per channel dwell time requirement
13027 */
13028 A_UINT32 bss_channel_width_trigger_scan_interval;
13029 /**
13030 * FW can perform multiple scans with in a OBSS scan interval.
13031 * For each scan,
13032 * the total per channel dwell time across all scans with in OBSS scan interval should be
13033 * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
13034 * for active scans and ,
13035 * The unit for these 2 parameters is TUs.
13036 */
13037 A_UINT32 obss_scan_passive_total_per_channel;
13038 A_UINT32 obss_scan_active_total_per_channel;
13039 A_UINT32 bss_width_channel_transition_delay_factor;
13040 /** parameter to check exemption from scan */
13041 A_UINT32 obss_scan_activity_threshold;
13042 /** parameter to check exemption from scan */
13043 /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
13044 A_UINT32 forty_mhz_intolerant;
13045 /** STA 40M bandwidth intolerant capability */
13046 A_UINT32 current_operating_class;
13047 /** STA current operating class */
13048 /** length of 2.4GHz channel list to scan at, channel list in tlv->channels[] */
13049 A_UINT32 channel_len;
13050 /** length of optional ie data to append to probe reqest when active scan, ie data in tlv->ie_field[] */
13051 A_UINT32 ie_len;
13052} wmi_obss_scan_enable_cmd_fixed_param;
13053
13054typedef struct {
13055 /**
13056 * TLV tag and len;
13057 * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
13058 */
13059 A_UINT32 tlv_header;
13060 A_UINT32 vdev_id;
13061} wmi_obss_scan_disable_cmd_fixed_param;
13062
13063typedef struct {
13064 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
13065 A_UINT32 tlv_header;
13066 /** unique id identifying the VDEV */
13067 A_UINT32 vdev_id;
13068 /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
13069 A_UINT32 tx_status;
13070} wmi_offload_prb_rsp_tx_status_event_fixed_param;
13071
13072typedef enum {
13073 WMI_FRAME_TX_OK, /* frame tx ok */
13074 WMI_FRAME_TX_XRETRY, /* excessivley retried */
13075 WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */
13076 WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */
13077} WMI_FRAME_TX_STATUS;
13078
13079/**
13080 * This command is sent from WLAN host driver to firmware to
13081 * request firmware to send the latest channel avoidance range
13082 * to host.
13083 *
13084 * This command is only applicable for APQ platform which has
13085 * modem on the platform. If firmware doesn't support MWS Coex,
13086 * this command can be dropped by firmware.
13087 *
13088 * Host would send this command to firmware to request a channel
13089 * avoidance information update.
13090 */
13091typedef struct {
13092 /** TLV tag and len; tag equals
13093 * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
13094 A_UINT32 tlv_header;
13095} wmi_chan_avoid_update_cmd_param;
13096
13097/* ExtScan operation mode */
13098typedef enum {
13099 WMI_EXTSCAN_MODE_NONE = 0x0000,
13100 WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */
13101 WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */
13102 WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */
13103} wmi_extscan_operation_mode;
13104
13105/* Channel Mask */
13106typedef enum {
13107 WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
13108 WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */
13109 WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */
13110 WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */
13111} wmi_channel_band_mask;
13112
13113typedef enum {
13114 WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001,
13115 WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002,
13116 WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004,
13117 WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008,
13118 WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010,
13119 WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020,
Govind Singhfad2f212016-01-21 10:55:51 +053013120 WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040,
13121 WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013122
13123 WMI_EXTSCAN_EVENT_MAX = 0x8000
13124} wmi_extscan_event_type;
13125
13126#define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \
13127 WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
13128
13129#define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \
13130 WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
13131 WMI_EXTSCAN_BUCKET_FAILED_EVENT | \
13132 WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
13133
13134typedef enum {
13135 WMI_EXTSCAN_NO_FORWARDING = 0x0000,
13136 WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
13137} wmi_extscan_forwarding_flags;
13138
13139typedef enum {
13140 /* Use Motion Sensor Detection */
13141 WMI_EXTSCAN_USE_MSD = 0x0001,
13142 /* Extscan LPASS extended batching feature is supported and enabled */
13143 WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002,
13144} wmi_extscan_configuration_flags;
13145typedef enum {
13146 /*
13147 * Cache the results of bucket whose
13148 * configuration flags has this bit set
13149 */
13150 WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001,
Govind Singhfad2f212016-01-21 10:55:51 +053013151 /* Report ext scan results to context hub or not.*/
13152 WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013153} wmi_extscan_bucket_configuration_flags;
13154
13155typedef enum {
13156 WMI_EXTSCAN_STATUS_OK = 0,
13157 WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
13158 WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
13159 WMI_EXTSCAN_STATUS_INTERNAL_ERROR
13160} wmi_extscan_start_stop_status;
13161
13162typedef struct {
13163 /** Request ID - to identify command. Cannot be 0 */
13164 A_UINT32 request_id;
13165 /** Requestor ID - client requesting ExtScan */
13166 A_UINT32 requestor_id;
13167 /** VDEV id(interface) that is requesting scan */
13168 A_UINT32 vdev_id;
13169} wmi_extscan_command_id;
13170
13171typedef struct {
13172 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13173 /** channel number */
13174 A_UINT32 channel;
13175
13176 /** dwell time in msec - use defaults if 0 */
13177 A_UINT32 min_dwell_time;
13178 A_UINT32 max_dwell_time;
13179 /** passive/active channel and other flags */
13180 A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */
13181} wmi_extscan_bucket_channel;
13182
13183/* Scan Bucket specification */
13184typedef struct {
13185 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13186 /** Bucket ID - 0-based */
13187 A_UINT32 bucket_id;
13188 /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
13189 A_UINT32 notify_extscan_events;
13190 /** Options to forward scan results - see wmi_extscan_forwarding_flags */
13191 A_UINT32 forwarding_flags;
13192 /*
13193 * ExtScan configuration flags -
13194 * wmi_extscan__bucket_configuration_flags
13195 */
13196 A_UINT32 configuration_flags;
13197 /** DEPRECATED member:multiplier to be applied to the periodic scan's base period */
13198 A_UINT32 base_period_multiplier;
13199 /** dwell time in msec on active channels - use defaults if 0 */
13200 A_UINT32 min_dwell_time_active;
13201 A_UINT32 max_dwell_time_active;
13202 /** dwell time in msec on passive channels - use defaults if 0 */
13203 A_UINT32 min_dwell_time_passive;
13204 A_UINT32 max_dwell_time_passive;
13205 /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
13206 A_UINT32 channel_band;
13207 /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
13208 A_UINT32 num_channels;
13209 /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
13210 A_UINT32 min_period;
13211 /** period above which exponent is not applied anymore */
13212 A_UINT32 max_period;
13213 /**
13214 * back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
13215 * new_bucket_period = last_bucket_period + last_exponent_period exp_backoff
13216 */
13217 A_UINT32 exp_backoff;
13218 /** number of scans performed at a given periodicity after which exponential back off value is
13219 * applied to current periodicity to obtain a newer one
13220 */
13221 A_UINT32 exp_max_step_count;
13222/** Followed by the variable length TLV chan_list:
13223 * wmi_extscan_bucket_channel chan_list[] */
13224} wmi_extscan_bucket;
13225
13226typedef struct {
13227 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
13228 /** Request ID - to identify command. Cannot be 0 */
13229 A_UINT32 request_id;
13230 /** Requestor ID - client requesting ExtScan */
13231 A_UINT32 requestor_id;
13232 /** VDEV id(interface) that is requesting scan */
13233 A_UINT32 vdev_id;
13234 /** table ID - to allow support for multiple simultaneous requests */
13235 A_UINT32 table_id;
13236 /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
13237 A_UINT32 base_period;
13238 /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
13239 A_UINT32 max_iterations;
13240 /** Options to forward scan results - see wmi_extscan_forwarding_flags */
13241 A_UINT32 forwarding_flags;
13242 /** ExtScan configuration flags - wmi_extscan_configuration_flags */
13243 A_UINT32 configuration_flags;
13244 /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
13245 A_UINT32 notify_extscan_events;
13246 /** Scan Priority, input to scan scheduler */
13247 A_UINT32 scan_priority;
13248 /** Maximum number of BSSIDs to cache on each scan cycle */
13249 A_UINT32 max_bssids_per_scan_cycle;
13250 /** Minimum RSSI value to report */
13251 A_UINT32 min_rssi;
13252 /** Maximum table usage in percentage */
13253 A_UINT32 max_table_usage;
13254 /** default dwell time in msec on active channels */
13255 A_UINT32 min_dwell_time_active;
13256 A_UINT32 max_dwell_time_active;
13257 /** default dwell time in msec on passive channels */
13258 A_UINT32 min_dwell_time_passive;
13259 A_UINT32 max_dwell_time_passive;
13260 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
13261 A_UINT32 min_rest_time;
13262 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
13263 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
13264 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
13265 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
13266 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
13267 * irrespective of activity. activity is determined by the idle_time parameter.
13268 */
13269 A_UINT32 max_rest_time;
13270 /** time before sending next set of probe requests.
13271 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
13272 * The number of probe requests specified depends on the ssid_list and bssid_list
13273 */
13274 /** Max number of probes to be sent */
13275 A_UINT32 n_probes;
13276 /** time in msec between 2 sets of probe requests. */
13277 A_UINT32 repeat_probe_time;
13278 /** time in msec between 2 consequetive probe requests with in a set. */
13279 A_UINT32 probe_spacing_time;
13280 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
13281 A_UINT32 idle_time;
13282 /** maximum time in msec allowed for scan */
13283 A_UINT32 max_scan_time;
13284 /** delay in msec before sending first probe request after switching to a channel */
13285 A_UINT32 probe_delay;
13286 /** Scan control flags */
13287 A_UINT32 scan_ctrl_flags;
13288 /** Burst duration time in msec*/
13289 A_UINT32 burst_duration;
13290
13291 /** number of bssids in the TLV bssid_list[] */
13292 A_UINT32 num_bssid;
13293 /** number of ssid in the TLV ssid_list[] */
13294 A_UINT32 num_ssids;
13295 /** number of bytes in TLV ie_data[] */
13296 A_UINT32 ie_len;
13297 /** number of buckets in the TLV bucket_list[] */
13298 A_UINT32 num_buckets;
13299 /** in number of scans, send notifications to host after these many scans */
13300 A_UINT32 report_threshold_num_scans;
13301
13302 /** number of channels in channel_list[] determined by the
13303 sum of wmi_extscan_bucket.num_channels in array */
13304
13305/**
13306 * TLV (tag length value ) parameters follow the extscan_cmd
13307 * structure. The TLV's are:
13308 * wmi_ssid ssid_list[];
13309 * wmi_mac_addr bssid_list[];
13310 * A_UINT8 ie_data[];
13311 * wmi_extscan_bucket bucket_list[];
13312 * wmi_extscan_bucket_channel channel_list[];
13313 */
13314} wmi_extscan_start_cmd_fixed_param;
13315
13316typedef struct {
13317 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
13318 /** Request ID - to match running command. 0 matches any request */
13319 A_UINT32 request_id;
13320 /** Requestor ID - client requesting stop */
13321 A_UINT32 requestor_id;
13322 /** VDEV id(interface) that is requesting scan */
13323 A_UINT32 vdev_id;
13324 /** table ID - to allow support for multiple simultaneous requests */
13325 A_UINT32 table_id;
13326} wmi_extscan_stop_cmd_fixed_param;
13327
13328enum wmi_extscan_get_cached_results_flags {
13329 WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000,
13330 WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
13331};
13332
13333typedef struct {
13334 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
13335 /** request ID - used to correlate command with events */
13336 A_UINT32 request_id;
13337 /** Requestor ID - client that requested results */
13338 A_UINT32 requestor_id;
13339 /** VDEV id(interface) that is requesting scan */
13340 A_UINT32 vdev_id;
13341 /** table ID - to allow support for multiple simultaneous requests */
13342 A_UINT32 table_id;
13343 /** maximum number of results to be returned */
13344 A_UINT32 max_results;
13345 /** flush BSSID list - wmi_extscan_get_cached_results_flags */
13346 A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */
13347} wmi_extscan_get_cached_results_cmd_fixed_param;
13348
13349typedef struct {
13350 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
13351 /** request ID - used to correlate command with events */
13352 A_UINT32 request_id;
13353 /** Requestor ID - client that requested results */
13354 A_UINT32 requestor_id;
13355 /** VDEV id(interface) that is requesting scan */
13356 A_UINT32 vdev_id;
13357 /** table ID - to allow support for multiple simultaneous requests */
13358 A_UINT32 table_id;
13359} wmi_extscan_get_wlan_change_results_cmd_fixed_param;
13360
13361typedef struct {
13362 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13363 /**bssid */
13364 wmi_mac_addr bssid;
13365 /**channel number */
13366 A_UINT32 channel;
13367 /**upper RSSI limit */
13368 A_UINT32 upper_rssi_limit;
13369 /**lower RSSI limit */
13370 A_UINT32 lower_rssi_limit;
13371} wmi_extscan_wlan_change_bssid_param;
13372
13373typedef struct {
13374 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
13375 /** Request ID - to identify command. Cannot be 0 */
13376 A_UINT32 request_id;
13377 /** Requestor ID - client requesting wlan change monitoring */
13378 A_UINT32 requestor_id;
13379 /** VDEV id(interface) that is requesting scan */
13380 A_UINT32 vdev_id;
13381 /** table ID - to allow support for multiple simultaneous tables */
13382 A_UINT32 table_id;
13383 /** operation mode: start/stop */
13384 A_UINT32 mode; /* wmi_extscan_operation_mode */
13385 /** number of rssi samples to store */
13386 A_UINT32 max_rssi_samples;
13387 /** number of samples to use to calculate RSSI average */
13388 A_UINT32 rssi_averaging_samples;
13389 /** number of scans to confirm loss of contact with RSSI */
13390 A_UINT32 lost_ap_scan_count;
13391 /** number of out-of-range BSSIDs necessary to send event */
13392 A_UINT32 max_out_of_range_count;
13393 /** total number of bssid signal descriptors (in all pages) */
13394 A_UINT32 total_entries;
13395 /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
13396 A_UINT32 first_entry_index;
13397 /** number of bssid signal descriptors in this page */
13398 A_UINT32 num_entries_in_page;
13399 /* Following this structure is the TLV:
13400 * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[]; // number of elements given by field num_page_entries.
13401 */
13402} wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
13403
13404typedef struct {
13405 /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13406 A_UINT32 tlv_header;
13407 /**ssid */
13408 wmi_ssid ssid;
13409 /**band */
13410 A_UINT32 band;
13411 /**RSSI threshold for reporting */
13412 A_UINT32 min_rssi;
13413 A_UINT32 max_rssi;
13414} wmi_extscan_hotlist_ssid_entry;
13415
13416typedef struct {
13417 /**
13418 * TLV tag and len; tag equals
13419 * MITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param
13420 */
13421 A_UINT32 tlv_header;
13422 /** Request ID - to identify command. Cannot be 0 */
13423 A_UINT32 request_id;
13424 /** Requestor ID - client requesting hotlist ssid monitoring */
13425 A_UINT32 requestor_id;
13426 /** VDEV id(interface) that is requesting scan */
13427 A_UINT32 vdev_id;
13428 /** table ID - to allow support for multiple simultaneous tables */
13429 A_UINT32 table_id;
13430 /** operation mode: start/stop */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013431 A_UINT32 mode; /* wmi_extscan_operation_mode */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013432 /**total number of ssids (in all pages) */
13433 A_UINT32 total_entries;
13434 /**index of the first ssid entry found in the TLV extscan_hotlist_ssid_entry*/
13435 A_UINT32 first_entry_index;
13436 /**number of ssids in this page */
13437 A_UINT32 num_entries_in_page;
13438 /** number of consecutive scans to confirm loss of an ssid **/
13439 A_UINT32 lost_ap_scan_count;
13440 /* Following this structure is the TLV:
13441 * wmi_extscan_hotlist_ssid_entry hotlist_ssid[];
13442 * number of element given by field num_page_entries.
13443 */
13444} wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
13445
13446typedef struct {
13447 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13448 /**bssid */
13449 wmi_mac_addr bssid;
13450 /**RSSI min threshold for reporting */
13451 A_UINT32 min_rssi;
13452 /**Deprecated entry channel number */
13453 A_UINT32 channel;
13454 /** RSSI max threshold for reporting */
13455 A_UINT32 max_rssi;
13456} wmi_extscan_hotlist_entry;
13457
13458typedef struct {
13459 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
13460 /** Request ID - to identify command. Cannot be 0 */
13461 A_UINT32 request_id;
13462 /** Requestor ID - client requesting hotlist monitoring */
13463 A_UINT32 requestor_id;
13464 /** VDEV id(interface) that is requesting scan */
13465 A_UINT32 vdev_id;
13466 /** table ID - to allow support for multiple simultaneous tables */
13467 A_UINT32 table_id;
13468 /** operation mode: start/stop */
13469 A_UINT32 mode; /* wmi_extscan_operation_mode */
13470 /**total number of bssids (in all pages) */
13471 A_UINT32 total_entries;
13472 /**index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry*/
13473 A_UINT32 first_entry_index;
13474 /**number of bssids in this page */
13475 A_UINT32 num_entries_in_page;
13476 /** number of consecutive scans to confirm loss of contact with AP */
13477 A_UINT32 lost_ap_scan_count;
13478 /* Following this structure is the TLV:
13479 * wmi_extscan_hotlist_entry hotlist[]; // number of elements given by field num_page_entries.
13480 */
13481} wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
13482
13483 typedef struct {
13484 /* TLV tag and len; tag equals
13485 *WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
13486 A_UINT32 tlv_header;
13487 /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
13488 A_UINT32 config_request_id;
13489 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID
13490 that configured the table */
13491 A_UINT32 config_requestor_id;
13492 /**
13493 * VDEV id(interface) of the
13494 * WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table
13495 */
13496 A_UINT32 config_vdev_id;
13497 /** table ID - to allow support for multiple simultaneous tables */
13498 A_UINT32 table_id;
13499 /**total number of ssids (in all pages) */
13500 A_UINT32 total_entries;
13501 /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
13502 A_UINT32 first_entry_index;
13503 /**number of ssids in this page */
13504 A_UINT32 num_entries_in_page;
13505 /* Following this structure is the TLV:
13506 * wmi_extscan_wlan_descriptor hotlist_match[];
13507 * number of descriptors given by field num_entries_in_page
13508 */
13509} wmi_extscan_hotlist_ssid_match_event_fixed_param;
13510
13511typedef struct {
13512 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13513 /** table ID - to allow support for multiple simultaneous tables */
13514 A_UINT32 table_id;
13515 /** size in bytes of scan cache entry */
13516 A_UINT32 scan_cache_entry_size;
13517 /** maximum number of scan cache entries */
13518 A_UINT32 max_scan_cache_entries;
13519 /** maximum number of buckets per extscan request */
13520 A_UINT32 max_buckets;
13521 /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
13522 A_UINT32 max_bssid_per_scan;
13523 /** table usage level at which indication must be sent to host */
13524 A_UINT32 max_table_usage_threshold;
13525} wmi_extscan_cache_capabilities;
13526
13527typedef struct {
13528 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13529 /** table ID - to allow support for multiple simultaneous tables */
13530 A_UINT32 table_id;
13531 /** size in bytes of wlan change entry */
13532 A_UINT32 wlan_change_entry_size;
13533 /** maximum number of entries in wlan change table */
13534 A_UINT32 max_wlan_change_entries;
13535 /** number of RSSI samples used for averaging RSSI */
13536 A_UINT32 max_rssi_averaging_samples;
13537 /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
13538 A_UINT32 max_rssi_history_entries;
13539} wmi_extscan_wlan_change_monitor_capabilities;
13540
13541typedef struct {
13542 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13543 /** table ID - to allow support for multiple simultaneous tables */
13544 A_UINT32 table_id;
13545 /** size in bytes of hotlist entry */
13546 A_UINT32 wlan_hotlist_entry_size;
13547 /** maximum number of entries in wlan change table */
13548 A_UINT32 max_hotlist_entries;
13549} wmi_extscan_hotlist_monitor_capabilities;
13550
13551typedef struct {
13552 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
13553 /** Request ID - matches request ID used to start hot list monitoring */
13554 A_UINT32 request_id;
13555 /** Requestor ID - client requesting stop */
13556 A_UINT32 requestor_id;
13557 /** number of extscan caches */
13558 A_UINT32 num_extscan_cache_tables;
13559 /** number of wlan change lists */
13560 A_UINT32 num_wlan_change_monitor_tables;
13561 /** number of hotlists */
13562 A_UINT32 num_hotlist_monitor_tables;
13563 /** if one sided rtt data collection is supported */
13564 A_UINT32 rtt_one_sided_supported;
13565 /** if 11v data collection is supported */
13566 A_UINT32 rtt_11v_supported;
13567 /** if 11mc data collection is supported */
13568 A_UINT32 rtt_ftm_supported;
13569 /** number of extscan cache capabilities (one per table) */
13570 A_UINT32 num_extscan_cache_capabilities;
13571 /** number of wlan change capabilities (one per table) */
13572 A_UINT32 num_extscan_wlan_change_capabilities;
13573 /** number of extscan hotlist capabilities (one per table) */
13574 A_UINT32 num_extscan_hotlist_capabilities;
13575 /* Following this structure is the TLV:
13576 * wmi_extscan_cache_capabilities extscan_cache_capabilities; // number of capabilities given by num_extscan_caches
13577 * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; // number of capabilities given by num_wlan_change_monitor_tables
13578 * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; // number of capabilities given by num_hotlist_monitor_tables
13579 */
13580} wmi_extscan_set_capabilities_cmd_fixed_param;
13581
13582typedef struct {
13583 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
13584 /** Request ID - matches request ID used to start hot list monitoring */
13585 A_UINT32 request_id;
13586 /** Requestor ID - client requesting capabilities */
13587 A_UINT32 requestor_id;
13588} wmi_extscan_get_capabilities_cmd_fixed_param;
13589
13590typedef struct {
13591 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
13592 /** Request ID of the operation that was started/stopped */
13593 A_UINT32 request_id;
13594 /** Requestor ID of the operation that was started/stopped */
13595 A_UINT32 requestor_id;
13596 /** VDEV id(interface) of the operation that was started/stopped */
13597 A_UINT32 vdev_id;
13598 /** extscan WMI command */
13599 A_UINT32 command;
13600 /** operation mode: start/stop */
13601 A_UINT32 mode; /* wmi_extscan_operation_mode */
13602 /**success/failure */
13603 A_UINT32 status; /* enum wmi_extscan_start_stop_status */
13604 /** table ID - to allow support for multiple simultaneous requests */
13605 A_UINT32 table_id;
13606} wmi_extscan_start_stop_event_fixed_param;
13607
13608typedef struct {
13609 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
13610 /** Request ID of the extscan operation that is currently running */
13611 A_UINT32 request_id;
13612 /** Requestor ID of the extscan operation that is currently running */
13613 A_UINT32 requestor_id;
13614 /** VDEV id(interface) of the extscan operation that is currently running */
13615 A_UINT32 vdev_id;
13616 /** scan event (wmi_scan_event_type) */
13617 A_UINT32 event; /* wmi_extscan_event_type */
13618 /** table ID - to allow support for multiple simultaneous requests */
13619 A_UINT32 table_id;
13620 /**number of buckets */
13621 A_UINT32 num_buckets;
13622 /* Following this structure is the TLV:
13623 * A_UINT32 bucket_id[]; // number of elements given by field num_buckets.
13624 */
13625} wmi_extscan_operation_event_fixed_param;
13626
13627/* Types of extscan tables */
13628typedef enum {
13629 EXTSCAN_TABLE_NONE = 0,
13630 EXTSCAN_TABLE_BSSID = 1,
13631 EXTSCAN_TABLE_RSSI = 2,
13632} wmi_extscan_table_type;
13633
13634typedef struct {
13635 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
13636 /** Request ID of the extscan operation that is currently running */
13637 A_UINT32 request_id;
13638 /** Requestor ID of the extscan operation that is currently running */
13639 A_UINT32 requestor_id;
13640 /** VDEV id(interface) of the extscan operation that is currently running */
13641 A_UINT32 vdev_id;
13642 /** table ID - to allow support for multiple simultaneous tables */
13643 A_UINT32 table_id;
13644 /**see wmi_extscan_table_type for table reporting usage */
13645 A_UINT32 table_type;
13646 /**number of entries in use */
13647 A_UINT32 entries_in_use;
13648 /**maximum number of entries in table */
13649 A_UINT32 maximum_entries;
13650} wmi_extscan_table_usage_event_fixed_param;
13651
13652typedef enum {
13653 /**
13654 * Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
13655 * this can be used to discard scan results
13656 */
13657 WMI_SCAN_STATUS_INTERRUPTED = 1
13658} wmi_scan_status_flags;
13659
13660
13661typedef struct {
13662 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
Anurag Chouhancc474b72016-04-18 17:36:23 +053013663 /** RSSI */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013664 A_UINT32 rssi;
Anurag Chouhancc474b72016-04-18 17:36:23 +053013665 /** time stamp in milliseconds */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013666 A_UINT32 tstamp;
13667 /** Extscan cycle during which this entry was scanned */
13668 A_UINT32 scan_cycle_id;
13669 /**
13670 * flag to indicate if the given result was obtained as part of
13671 * interrupted (aborted/large time gap preempted) scan
13672 */
13673 A_UINT32 flags;
Anurag Chouhancc474b72016-04-18 17:36:23 +053013674 /** Bitmask of buckets (i.e. sets of channels) scanned */
13675 A_UINT32 buckets_scanned;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013676} wmi_extscan_rssi_info;
13677
13678typedef struct {
13679 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13680 /**bssid */
13681 wmi_mac_addr bssid;
13682 /**ssid */
13683 wmi_ssid ssid;
13684 /**channel number */
13685 A_UINT32 channel;
13686 /* capabilities */
13687 A_UINT32 capabilities;
13688 /* beacon interval in TUs */
13689 A_UINT32 beacon_interval;
13690 /**time stamp in milliseconds - time last seen */
13691 A_UINT32 tstamp;
13692 /**flags - _tExtScanEntryFlags */
13693 A_UINT32 flags;
13694 /**RTT in ns */
13695 A_UINT32 rtt;
13696 /**rtt standard deviation */
13697 A_UINT32 rtt_sd;
13698 /* rssi information */
13699 A_UINT32 number_rssi_samples;
13700 /** IE length */
13701 A_UINT32 ie_length; /* length of IE data */
13702} wmi_extscan_wlan_descriptor;
13703
13704typedef struct {
13705 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
13706 /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
13707 A_UINT32 request_id;
13708 /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
13709 A_UINT32 requestor_id;
13710 /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
13711 A_UINT32 vdev_id;
13712 /** Request ID of the extscan operation that is currently running */
13713 A_UINT32 extscan_request_id;
13714 /** Requestor ID of the extscan operation that is currently running */
13715 A_UINT32 extscan_requestor_id;
13716 /** VDEV id(interface) of the extscan operation that is currently running */
13717 A_UINT32 extscan_vdev_id;
13718 /** table ID - to allow support for multiple simultaneous tables */
13719 A_UINT32 table_id;
13720 /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
13721 A_UINT32 current_tstamp;
13722 /**total number of bssids (in all pages) */
13723 A_UINT32 total_entries;
13724 /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
13725 A_UINT32 first_entry_index;
13726 /**number of bssids in this page */
13727 A_UINT32 num_entries_in_page;
Govind Singhfad2f212016-01-21 10:55:51 +053013728 /* number of buckets scanned */
13729 A_UINT32 buckets_scanned;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013730 /* Followed by the variable length TLVs
13731 * wmi_extscan_wlan_descriptor bssid_list[]
13732 * wmi_extscan_rssi_info rssi_list[]
13733 * A_UINT8 ie_list[]
13734 */
13735} wmi_extscan_cached_results_event_fixed_param;
13736
13737typedef enum {
13738 EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00,
13739 EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
13740 EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02,
13741} wmi_extscan_wlan_change_flags;
13742
13743typedef struct {
13744 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13745 /**bssid */
13746 wmi_mac_addr bssid;
13747 /**time stamp in milliseconds */
13748 A_UINT32 tstamp;
13749 /**upper RSSI limit */
13750 A_UINT32 upper_rssi_limit;
13751 /**lower RSSI limit */
13752 A_UINT32 lower_rssi_limit;
13753 /** channel */
13754 A_UINT32 channel; /* in MHz */
13755 /**current RSSI average */
13756 A_UINT32 rssi_average;
13757 /**flags - wmi_extscan_wlan_change_flags */
13758 A_UINT32 flags;
13759 /**legnth of RSSI history to follow (number of values) */
13760 A_UINT32 num_rssi_samples;
13761} wmi_extscan_wlan_change_result_bssid;
13762
13763typedef struct {
13764 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
13765 /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
13766 A_UINT32 request_id;
13767 /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
13768 A_UINT32 requestor_id;
13769 /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
13770 A_UINT32 vdev_id;
13771 /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
13772 A_UINT32 config_request_id;
13773 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
13774 A_UINT32 config_requestor_id;
13775 /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
13776 A_UINT32 config_vdev_id;
13777 /** table ID - to allow support for multiple simultaneous tables */
13778 A_UINT32 table_id;
13779 /**number of entries with RSSI out of range or BSSID not detected */
13780 A_UINT32 change_count;
13781 /**total number of bssid signal descriptors (in all pages) */
13782 A_UINT32 total_entries;
13783 /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
13784 A_UINT32 first_entry_index;
13785 /**number of bssids signal descriptors in this page */
13786 A_UINT32 num_entries_in_page;
13787 /* Following this structure is the TLV:
13788 * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[]; // number of descriptors given by field num_entries_in_page.
13789 * Following this structure is the list of RSSI values (each is an A_UINT8):
13790 * A_UINT8 rssi_list[]; // last N RSSI values.
13791 */
13792} wmi_extscan_wlan_change_results_event_fixed_param;
13793
13794enum _tExtScanEntryFlags {
13795 WMI_HOTLIST_FLAG_NONE = 0x00,
13796 WMI_HOTLIST_FLAG_PRESENCE = 0x01,
13797 WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
13798};
13799
13800typedef struct {
13801 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
13802 /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
13803 A_UINT32 config_request_id;
13804 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
13805 A_UINT32 config_requestor_id;
13806 /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
13807 A_UINT32 config_vdev_id;
13808 /** table ID - to allow support for multiple simultaneous tables */
13809 A_UINT32 table_id;
13810 /**total number of bssids (in all pages) */
13811 A_UINT32 total_entries;
13812 /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
13813 A_UINT32 first_entry_index;
13814 /**number of bssids in this page */
13815 A_UINT32 num_entries_in_page;
13816 /* Following this structure is the TLV:
13817 * wmi_extscan_wlan_descriptor hotlist_match[]; // number of descriptors given by field num_entries_in_page.
13818 */
13819} wmi_extscan_hotlist_match_event_fixed_param;
13820
13821typedef struct {
13822 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
13823 /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
13824 A_UINT32 request_id;
13825 /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
13826 A_UINT32 requestor_id;
13827 /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
13828 A_UINT32 vdev_id;
13829 /** number of extscan caches */
13830 A_UINT32 num_extscan_cache_tables;
13831 /** number of wlan change lists */
13832 A_UINT32 num_wlan_change_monitor_tables;
13833 /** number of hotlists */
13834 A_UINT32 num_hotlist_monitor_tables;
13835 /** if one sided rtt data collection is supported */
13836 A_UINT32 rtt_one_sided_supported;
13837 /** if 11v data collection is supported */
13838 A_UINT32 rtt_11v_supported;
13839 /** if 11mc data collection is supported */
13840 A_UINT32 rtt_ftm_supported;
13841 /** number of extscan cache capabilities (one per table) */
13842 A_UINT32 num_extscan_cache_capabilities;
13843 /** number of wlan change capabilities (one per table) */
13844 A_UINT32 num_extscan_wlan_change_capabilities;
13845 /** number of extscan hotlist capabilities (one per table) */
13846 A_UINT32 num_extscan_hotlist_capabilities;
13847 /* max number of roaming ssid whitelist firmware can support */
13848 A_UINT32 num_roam_ssid_whitelist;
13849 /* max number of blacklist bssid firmware can support */
13850 A_UINT32 num_roam_bssid_blacklist;
13851 /* max number of preferred list firmware can support */
13852 A_UINT32 num_roam_bssid_preferred_list;
13853 /* max number of hotlist ssids firmware can support */
13854 A_UINT32 num_extscan_hotlist_ssid;
13855 /* max number of epno networks firmware can support */
13856 A_UINT32 num_epno_networks;
13857
13858 /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
13859 * supports multiple lists of each type.
13860 *
13861 * wmi_extscan_cache_capabilities extscan_cache_capabilities[] // capabilities of extscan cache (BSSID/RSSI lists)
13862 * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] // capabilities of wlan_change_monitor_tables
13863 * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] // capabilities of hotlist_monitor_tables
13864 */
13865} wmi_extscan_capabilities_event_fixed_param;
13866
13867/* WMI_D0_WOW_DISABLE_ACK_EVENTID */
13868typedef struct {
13869 A_UINT32 tlv_header;
13870 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */
13871 A_UINT32 reserved0; /* for future need */
13872} wmi_d0_wow_disable_ack_event_fixed_param;
13873
13874/** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
13875typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053013876 /** TLV tag and len; tag equals
13877 * WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param
13878 */
13879 A_UINT32 tlv_header;
13880 /** pdev_id for identifying the MAC
13881 * See macros starting with WMI_PDEV_ID_ for values.
13882 */
13883 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013884} wmi_pdev_resume_event_fixed_param;
13885
13886/** value representing all modules */
13887#define WMI_DEBUG_LOG_MODULE_ALL 0xffff
13888
13889/* param definitions */
13890
13891/**
13892 * Log level for a given module. Value contains both module id and log level.
13893 * here is the bitmap definition for value.
13894 * module Id : 16
13895 * Flags : reserved
13896 * Level : 8
13897 * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global).
13898 * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
13899 */
13900#define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1
13901
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013902#define WMI_DBGLOG_SET_LOG_LEVEL(val, lvl) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013903 (val) |= (lvl & 0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013904} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013905
13906#define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
13907
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013908#define WMI_DBGLOG_SET_MODULE_ID(val, mid) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013909 (val) |= ((mid & 0xffff) << 16); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013910} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013911
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013912#define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013913
13914/**
13915 * Enable the debug log for a given vdev. Value is vdev id
13916 */
13917#define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2
13918
13919/**
13920 * Disable the debug log for a given vdev. Value is vdev id
13921 * All the log level for a given VDEV is disabled except the ERROR log messages
13922 */
13923
13924#define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3
13925
13926/**
13927 * set vdev enable bitmap. value is the vden enable bitmap
13928 */
13929#define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4
13930
13931/**
13932 * set a given log level to all the modules specified in the module bitmap.
13933 * and set the log levle for all other modules to DBGLOG_ERR.
13934 * value: log levelt to be set.
13935 * module_id_bitmap : identifies the modules for which the log level should be set and
13936 * modules for which the log level should be reset to DBGLOG_ERR.
13937 */
13938#define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5
13939
13940#define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
13941
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013942#define WMI_MODULE_ENABLE(pmid_bitmap, mod_id) \
13943 ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
13944 (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013945
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013946#define WMI_MODULE_DISABLE(pmid_bitmap, mod_id) \
13947 ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \
13948 (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013949
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013950#define WMI_MODULE_IS_ENABLED(pmid_bitmap, mod_id) \
13951 (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \
13952 (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013953
13954#define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
13955typedef struct {
13956 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
13957 A_UINT32 dbg_log_param;
13958 /** param types are defined above */
13959 A_UINT32 value;
13960 /* The below array will follow this tlv ->fixed length module_id_bitmap[]
13961 A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
13962 */
13963} wmi_debug_log_config_cmd_fixed_param;
13964
13965typedef struct {
13966 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */
13967 A_UINT32 param; /* Reserved for future use */
Govind Singh869c9872016-02-22 18:36:34 +053013968 /** pdev_id for identifying the MAC
13969 * See macros starting with WMI_PDEV_ID_ for values.
13970 */
13971 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013972} wmi_pdev_get_temperature_cmd_fixed_param;
13973
13974typedef struct {
13975 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
13976 A_INT32 value; /* temprature value in Celcius degree */
Govind Singh869c9872016-02-22 18:36:34 +053013977 /** pdev_id for identifying the MAC
13978 * See macros starting with WMI_PDEV_ID_ for values.
13979 */
13980 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013981} wmi_pdev_temperature_event_fixed_param;
13982
Nitesh Shahfcedd3b2016-07-21 17:24:35 +053013983typedef enum {
13984 ANTDIV_HW_CFG_STATUS,
13985 ANTDIV_SW_CFG_STATUS,
13986 ANTDIV_MAX_STATUS_TYPE_NUM
13987} ANTDIV_STATUS_TYPE;
13988
13989typedef struct {
13990 /**
13991 * TLV tag and len; tag equals
13992 * WMITLV_TAG_STRUC_wmi_pdev_get_antdiv_status_cmd_fixed_param
13993 */
13994 A_UINT32 tlv_header;
13995 /* Status event ID - see ANTDIV_STATUS_TYPE */
13996 A_UINT32 status_event_id;
13997 /**
13998 * pdev_id for identifying the MAC
13999 * See macros starting with WMI_PDEV_ID_ for values.
14000 */
14001 A_UINT32 pdev_id;
14002} wmi_pdev_get_antdiv_status_cmd_fixed_param;
14003
14004typedef struct {
14005 /**
14006 * TLV tag and len; tag equals
14007 * WMITLV_TAG_STRUC_wmi_pdev_antdiv_status_event_fixed_param
14008 */
14009 A_UINT32 tlv_header;
14010 /* ANT DIV feature enabled or not */
14011 A_UINT32 support;
14012 A_UINT32 chain_num; /* how many chain supported */
14013 /* how many ANT supported, 32 max */
14014 A_UINT32 ant_num;
14015 /**
14016 * Each entry is for a tx/rx chain, and contains a bitmap
14017 * identifying the antennas attached to that tx/rx chain.
14018 */
14019 A_UINT32 selectable_ant_mask[8];
14020 /**
14021 * pdev_id for identifying the MAC
14022 * See macros starting with WMI_PDEV_ID_ for values.
14023 */
14024 A_UINT32 pdev_id;
14025} wmi_pdev_antdiv_status_event_fixed_param;
14026
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014027typedef struct {
14028 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
14029 A_UINT32 vdev_id;
14030 A_UINT32 enable;
14031 A_UINT32 srv_ipv4; /* server IP */
14032 A_UINT32 start_lsb; /* starting address assigned to client */
14033 A_UINT32 num_client; /* number of clients we support */
14034} wmi_set_dhcp_server_offload_cmd_fixed_param;
14035
14036typedef enum {
14037 AP_RX_DATA_OFFLOAD = 0x00,
14038 STA_RX_DATA_OFFLOAD = 0x01,
14039} wmi_ipa_offload_types;
14040
14041/**
14042 * This command is sent from WLAN host driver to firmware for
14043 * enabling/disabling IPA data-path offload features.
14044 *
14045 *
14046 * Enabling data path offload to IPA(based on host INI configuration), example:
14047 * when STA interface comes up,
14048 * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
14049 * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
14050 *
14051 * Disabling data path offload to IPA, example:
14052 * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
14053 * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
14054 *
14055 *
14056 * This command is applicable only on the PCIE LL systems
14057 *
14058 */
14059typedef struct {
14060 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
14061 A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
14062 A_UINT32 vdev_id;
14063 A_UINT32 enable; /* 1 == enable, 0 == disable */
14064} wmi_ipa_offload_enable_disable_cmd_fixed_param;
14065
14066typedef enum {
14067 WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0,
14068 WMI_LED_FLASHING_PATTERN_CONNECTED = 1,
14069 WMI_LED_FLASHING_PATTERN_RESERVED = 2,
14070} wmi_set_led_flashing_type;
14071
14072/**
14073 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.
14074 Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
14075 remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
14076 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
14077 pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to
14078 High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
14079 Zero is reached, it is skipped and moves on to the next interval.
14080 */
14081typedef struct {
14082 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */
14083 A_UINT32 pattern_id; /* pattern identifier */
14084 A_UINT32 led_x0; /* led flashing parameter0 */
14085 A_UINT32 led_x1; /* led flashing parameter1 */
14086 A_UINT32 gpio_num; /* GPIO number */
14087} wmi_set_led_flashing_cmd_fixed_param;
14088
14089/**
14090 * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
14091 * within small networks that do not include a local name server.
14092 * It utilizes essentially the same programming interfaces, packet formats and operating semantics
14093 * as the unicast DNS, and the advantage is zero configuration service while no need for central or
14094 * global server.
14095 * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
14096 * by type in a specified domain using standard DNS queries.
14097 * Here, we provide the ability to advertise the available services by responding to mDNS queries.
14098 */
14099typedef struct {
14100 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
14101 A_UINT32 vdev_id;
14102 A_UINT32 enable;
14103} wmi_mdns_offload_cmd_fixed_param;
14104
14105#define WMI_MAX_MDNS_FQDN_LEN 64
14106#define WMI_MAX_MDNS_RESP_LEN 512
14107#define WMI_MDNS_FQDN_TYPE_GENERAL 0
14108#define WMI_MDNS_FQDN_TYPE_UNIQUE 1
14109
14110typedef struct {
14111 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
14112 A_UINT32 vdev_id;
14113 /** type of fqdn, general or unique */
14114 A_UINT32 type;
14115 /** length of fqdn */
14116 A_UINT32 fqdn_len;
14117 /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
14118 * A_UINT8 fqdn_data[]; // fully-qualified domain name to check if match with the received queries
14119 */
14120} wmi_mdns_set_fqdn_cmd_fixed_param;
14121
14122typedef struct {
14123 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
14124 A_UINT32 vdev_id;
14125 /** Answer Resource Record count */
14126 A_UINT32 AR_count;
14127 /** length of response */
14128 A_UINT32 resp_len;
14129 /* Following this structure is the TLV byte stream of resp data of length resp_len
14130 * A_UINT8 resp_data[]; // responses consisits of Resource Records
14131 */
14132} wmi_mdns_set_resp_cmd_fixed_param;
14133
14134typedef struct {
14135 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
14136 A_UINT32 vdev_id;
14137} wmi_mdns_get_stats_cmd_fixed_param;
14138
14139typedef struct {
14140 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
14141 A_UINT32 vdev_id;
14142 /** curTimestamp in milliseconds */
14143 A_UINT32 curTimestamp;
14144 /** last received Query in milliseconds */
14145 A_UINT32 lastQueryTimestamp;
14146 /** last sent Response in milliseconds */
14147 A_UINT32 lastResponseTimestamp;
14148 /** stats of received queries */
14149 A_UINT32 totalQueries;
14150 /** stats of macth queries */
14151 A_UINT32 totalMatches;
14152 /** stats of responses */
14153 A_UINT32 totalResponses;
14154 /** indicate the current status of mDNS offload */
14155 A_UINT32 status;
14156} wmi_mdns_stats_event_fixed_param;
14157
14158/**
14159 * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
14160 * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
14161 * request and create/remove connection even host is suspended.
14162 * 3 major components are offloaded:
14163 * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
14164 * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
14165 * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
14166 * Current implementation only supports WPA2 CCMP.
14167 */
14168
14169typedef struct {
14170 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
14171 /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
14172 A_UINT32 vdev_id;
14173 /** enable/disable sap auth offload */
14174 A_UINT32 enable;
14175 /** sap ssid */
14176 wmi_ssid ap_ssid;
14177 /** authentication mode (defined above) */
14178 A_UINT32 rsn_authmode;
14179 /** unicast cipher set */
14180 A_UINT32 rsn_ucastcipherset;
14181 /** mcast/group cipher set */
14182 A_UINT32 rsn_mcastcipherset;
14183 /** mcast/group management frames cipher set */
14184 A_UINT32 rsn_mcastmgmtcipherset;
14185 /** sap channel */
14186 A_UINT32 channel;
14187 /** length of psk */
14188 A_UINT32 psk_len;
14189 /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
14190 * A_UINT8 psk[];
14191 */
14192} wmi_sap_ofl_enable_cmd_fixed_param;
14193
14194typedef struct {
14195 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
14196 /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
14197 A_UINT32 vdev_id;
14198 /** aid (association id) of this station */
14199 A_UINT32 assoc_id;
14200 /** peer station's mac addr */
14201 wmi_mac_addr peer_macaddr;
14202 /** length of association request frame */
14203 A_UINT32 data_len;
14204 /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
14205 * A_UINT8 bufp[];
14206 */
14207} wmi_sap_ofl_add_sta_event_fixed_param;
14208
14209typedef enum {
14210 SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
14211 SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
14212} wmi_sap_ofl_del_sta_flags;
14213
14214typedef struct {
14215 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
14216 /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
14217 A_UINT32 vdev_id;
14218 /** aid (association id) of this station */
14219 A_UINT32 assoc_id;
14220 /** peer station's mac addr */
14221 wmi_mac_addr peer_macaddr;
14222 /** disassociation reason */
14223 A_UINT32 reason;
14224 /** flags - wmi_sap_ofl_del_sta_flags */
14225 A_UINT32 flags;
14226} wmi_sap_ofl_del_sta_event_fixed_param;
14227
14228typedef struct {
14229 /*
14230 * TLV tag and len; tag equals
14231 * WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param
14232 */
14233 A_UINT32 tlv_header;
14234 A_UINT32 vdev_id;
14235 /* Number of client failure connection attempt */
14236 A_UINT32 num_retry;
14237 /*Time in milliseconds to record the client's failure connection attempts*/
14238 A_UINT32 retry_allow_time_ms;
14239 /*
14240 * Time in milliseconds to drop the connection request if
14241 * client is blacklisted
14242 */
14243 A_UINT32 blackout_time_ms;
14244} wmi_sap_set_blacklist_param_cmd_fixed_param;
14245
14246typedef struct {
14247 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
14248 A_UINT32 data_len; /** length in byte of data[]. */
14249 /** This structure is used to send REQ binary blobs
14250 * from application/service to firmware where Host drv is pass through .
14251 * Following this structure is the TLV:
14252 * A_UINT8 data[]; // length in byte given by field data_len.
14253 */
14254} wmi_apfind_cmd_param;
14255
14256typedef enum apfind_event_type_e {
14257 APFIND_MATCH_EVENT = 0,
14258 APFIND_WAKEUP_EVENT,
14259} APFIND_EVENT_TYPE;
14260
14261typedef struct {
14262 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
14263 A_UINT32 event_type; /** APFIND_EVENT_TYPE */
14264 A_UINT32 data_len; /** length in byte of data[]. */
14265 /** This structure is used to send event binary blobs
14266 * from firmware to application/service and Host drv.
14267 * Following this structure is the TLV:
14268 * A_UINT8 data[]; // length in byte given by field data_len.
14269 */
14270} wmi_apfind_event_hdr;
14271
14272/**
14273 * OCB DCC types and structures.
14274 */
14275
14276/**
14277 * DCC types as described in ETSI TS 102 687
14278 * Type Format stepSize referenceValue numBits
14279 * -------------------------------------------------------------------------
14280 * ndlType_acPrio INTEGER (0...7) 1 number 3
14281 * ndlType_controlLoop INTEGER (0...7) 1 0 3
14282 * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13
14283 * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10
14284 * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13
14285 * ndlType_datarate INTEGER (0..7) Table 8 3
14286 * ndlType_distance INTEGER (0..4095) 1 m 0 12
14287 * ndlType_numberElements INTEGER (0..63) number 6
14288 * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11
14289 * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10
14290 * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5
14291 * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7
14292 * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7
14293 * ndlType_timing INTEGER (0..4095) 10 ms 0 12
14294 * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7
14295 * ndlType_ratio INTEGER (0..100) 1 % 0 % 7
14296 * ndlType_exponent INTEGER (0..100) 0.1 0 7
14297 * ndlType_queueStatus Enumeration Table A.2 1
14298 * ndlType_dccMechanism Bitset Table A.2 6
14299 *
14300 * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
14301 * cannot be changed without breaking WMI compatibility.
14302 *
14303 * NOTE: For each of the types, one additional bit is allocated. This
14304 * leftmost bit is used to indicate that the value is invalid.
14305 */
14306#define SIZE_NDLTYPE_ACPRIO (1 + 3)
14307#define SIZE_NDLTYPE_CONTROLLOOP (1 + 3)
14308#define SIZE_NDLTYPE_ARRIVALRATE (1 + 13)
14309#define SIZE_NDLTYPE_CHANNELLOAD (1 + 10)
14310#define SIZE_NDLTYPE_CHANNELUSE (1 + 13)
14311#define SIZE_NDLTYPE_DATARATE (1 + 3)
14312#define SIZE_NDLTYPE_DISTANCE (1 + 12)
14313#define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6)
14314#define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
14315#define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
14316#define SIZE_NDLTYPE_PATHLOSS (1 + 5)
14317#define SIZE_NDLTYPE_RXPOWER (1 + 7)
14318#define SIZE_NDLTYPE_SNR (1 + 7)
14319#define SIZE_NDLTYPE_TIMING (1 + 12)
14320#define SIZE_NDLTYPE_TXPOWER (1 + 7)
14321#define SIZE_NDLTYPE_RATIO (1 + 7)
14322#define SIZE_NDLTYPE_EXPONENT (1 + 7)
14323#define SIZE_NDLTYPE_QUEUESTATUS (1 + 1)
14324#define SIZE_NDLTYPE_DCCMECHANISM (1 + 6)
14325#define SIZE_BYTE (8)
14326
14327#define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
14328#define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
14329#define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
14330#define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
14331#define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
14332#define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1)
14333#define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
14334#define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
14335#define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
14336#define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
14337#define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
14338#define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
14339#define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1)
14340#define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1)
14341#define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
14342#define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1)
14343#define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
14344#define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
14345#define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
14346
14347/**
14348 * The MCS_COUNT macro cannot be modified without breaking
14349 * WMI compatibility.
14350 */
14351#define MCS_COUNT (8)
14352
14353/**
14354 * Flags for ndlType_dccMechanism.
14355 */
14356typedef enum {
14357 DCC_MECHANISM_TPC = 1,
14358 DCC_MECHANISM_TRC = 2,
14359 DCC_MECHANISM_TDC = 4,
14360 DCC_MECHANISM_DSC = 8,
14361 DCC_MECHANISM_TAC = 16,
14362 DCC_MECHANISM_RESERVED = 32,
14363 DCC_MECHANISM_ALL = 0x3f,
14364} wmi_dcc_ndl_type_dcc_mechanism;
14365
14366/** Values for ndlType_queueStatus. */
14367typedef enum {
14368 DCC_QUEUE_CLOSED = 0,
14369 DCC_QUEUE_OPEN = 1,
14370} wmi_dcc_ndl_type_queue_status;
14371
14372/**
14373 * For ndlType_acPrio, use the values in wmi_traffic_ac.
14374 * Values for ndlType_datarate.
14375 */
14376typedef enum {
14377 DCC_DATARATE_3_MBPS = 0,
14378 DCC_DATARATE_4_5_MBPS = 1,
14379 DCC_DATARATE_6_MBPS = 2,
14380 DCC_DATARATE_9_MBPS = 3,
14381 DCC_DATARATE_12_MBPS = 4,
14382 DCC_DATARATE_18_MBPS = 5,
14383 DCC_DATARATE_24_MBPS = 6,
14384 DCC_DATARATE_27_MBPS = 7,
14385} wmi_dcc_ndl_type_datarate;
14386
14387/** Data structure for active state configuration. */
14388typedef struct {
14389 /** TLV tag and len; tag equals
14390 * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config
14391 */
14392 A_UINT32 tlv_header;
14393 /**
14394 * NDL_asStateId, ndlType_numberElements, 1+6 bits.
14395 * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
14396 */
14397 A_UINT32 state_info;
14398 /**
14399 * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
14400 * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
14401 * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
14402 * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
14403 */
14404 A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
14405 /**
14406 * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
14407 * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
14408 * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
14409 * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
14410 */
14411 A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
14412 /**
14413 * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
14414 * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
14415 * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
14416 * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
14417 */
14418 A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
14419 /**
14420 * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
14421 * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
14422 * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
14423 * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
14424 */
14425 A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
14426 /**
14427 * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
14428 * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
14429 * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
14430 * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
14431 */
14432 A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
14433} wmi_dcc_ndl_active_state_config;
14434
14435#define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7)
14436#define WMI_NDL_AS_STATE_ID_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 0, 7, val)
14437#define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11)
14438#define WMI_NDL_AS_CHAN_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 7, 11, val)
14439#define WMI_NDL_AS_DCC_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
14440#define WMI_NDL_AS_DCC_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
14441#define WMI_NDL_AS_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
14442#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)
14443#define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
14444#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)
14445#define WMI_NDL_AS_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
14446#define WMI_NDL_AS_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
14447#define WMI_NDL_AS_CARRIER_SENSE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
14448#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)
14449
14450/** Data structure for EDCA/QOS parameters. */
14451typedef struct {
14452 /** TLV tag and len; tag equals
14453 * WMITLV_TAG_STRUC_wmi_qos_parameter */
14454 A_UINT32 tlv_header;
14455 /** Arbitration Inter-Frame Spacing. Range: 2-15 */
14456 A_UINT32 aifsn;
14457 /** Contention Window minimum. Range: 1 - 10 */
14458 A_UINT32 cwmin;
14459 /** Contention Window maximum. Range: 1 - 10 */
14460 A_UINT32 cwmax;
14461} wmi_qos_parameter;
14462
14463/** Data structure for information specific to a channel. */
14464typedef struct {
14465 /** TLV tag and len; tag equals
14466 * WMITLV_TAG_STRUC_wmi_ocb_channel */
14467 A_UINT32 tlv_header;
14468 A_UINT32 bandwidth; /* MHz units */
14469 wmi_mac_addr mac_address;
14470} wmi_ocb_channel;
14471
14472/** Data structure for an element of the schedule array. */
14473typedef struct {
14474 /** TLV tag and len; tag equals
14475 * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
14476 A_UINT32 tlv_header;
14477 A_UINT32 channel_freq; /* MHz units */
14478 A_UINT32 total_duration; /* ms units */
14479 A_UINT32 guard_interval; /* ms units */
14480} wmi_ocb_schedule_element;
14481
14482/** Data structure for OCB configuration. */
14483typedef struct {
14484 /** TLV tag and len; tag equals
14485 * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
14486 A_UINT32 tlv_header;
14487 /** VDEV id(interface) that is being configured */
14488 A_UINT32 vdev_id;
14489 A_UINT32 channel_count;
14490 A_UINT32 schedule_size;
14491 A_UINT32 flags;
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053014492 /**
14493 * Max duration of continuing multichannel operation without
14494 * receiving a TA frame (units = seconds)
14495 */
14496 A_UINT32 ta_max_duration;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014497
14498 /** This is followed by a TLV array of wmi_channel.
14499 * This is followed by a TLV array of wmi_ocb_channel.
14500 * This is followed by a TLV array of wmi_qos_parameter.
14501 * This is followed by a TLV array of wmi_dcc_ndl_chan.
14502 * This is followed by a TLV array of wmi_dcc_ndl_active_state_config.
14503 * This is followed by a TLV array of wmi_ocb_schedule_element.
14504 */
14505} wmi_ocb_set_config_cmd_fixed_param;
14506
14507
14508#define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0
14509#define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1
14510
14511#define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) \
14512 (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
14513
14514
14515/** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
14516typedef struct {
14517 /** TLV tag and len; tag equals
14518 * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param
14519 */
14520 A_UINT32 tlv_header;
14521 /* VDEV id(interface)*/
14522 A_UINT32 vdev_id;
14523 A_UINT32 status;
14524} wmi_ocb_set_config_resp_event_fixed_param;
14525
14526/* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
14527 * WMI compatibility.
14528 */
14529/* The size of the utc time in bytes. */
14530#define SIZE_UTC_TIME (10)
14531/* The size of the utc time error in bytes. */
14532#define SIZE_UTC_TIME_ERROR (5)
14533
14534/** Data structure to set the UTC time. */
14535typedef struct {
14536 /** TLV tag and len; tag equals
14537 * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
14538 A_UINT32 tlv_header;
14539 /*VDEV Identifier*/
14540 A_UINT32 vdev_id;
14541 /** 10 bytes of the utc time. */
14542 A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME, SIZE_BYTE)];
14543 /** 5 bytes of the time error. */
14544 A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR, SIZE_BYTE)];
14545} wmi_ocb_set_utc_time_cmd_fixed_param;
14546
14547#define WMI_UTC_TIME_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
14548#define WMI_UTC_TIME_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
14549#define WMI_TIME_ERROR_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
14550#define WMI_TIME_ERROR_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
14551
14552/** Data structure start the timing advertisement. The template for the
14553 * timing advertisement frame follows this structure in the WMI command.
14554 */
14555typedef struct {
14556 /** TLV tag and len; tag equals
14557 * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
14558 A_UINT32 tlv_header;
14559 /*VDEV Identifier*/
14560 A_UINT32 vdev_id;
14561 /** Number of times the TA is sent every 5 seconds. */
14562 A_UINT32 repeat_rate;
14563 /** The frequency on which to transmit. */
14564 A_UINT32 channel_freq; /* MHz units */
14565 /** The offset into the template of the timestamp. */
14566 A_UINT32 timestamp_offset;
14567 /** The offset into the template of the time value. */
14568 A_UINT32 time_value_offset;
14569 /** The length of the timing advertisement template. The
14570 * template is in the TLV data. */
14571 A_UINT32 timing_advert_template_length;
14572 /** This is followed by a binary array containing the TA template. */
14573} wmi_ocb_start_timing_advert_cmd_fixed_param;
14574
14575/** Data structure to stop the timing advertisement. */
14576typedef struct {
14577 /** TLV tag and len; tag equals
14578 * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
14579 A_UINT32 tlv_header;
14580 /*VDEV Identifier*/
14581 A_UINT32 vdev_id;
14582 A_UINT32 channel_freq; /* MHz units */
14583} wmi_ocb_stop_timing_advert_cmd_fixed_param;
14584
14585/** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
14586typedef struct {
14587 /** TLV tag and len; tag equals
14588 * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
14589 A_UINT32 tlv_header;
14590 /*VDEV Identifier*/
14591 A_UINT32 vdev_id;
14592 A_UINT32 reserved;
14593} wmi_ocb_get_tsf_timer_cmd_fixed_param;
14594
14595/** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
14596typedef struct {
14597 /** TLV tag and len; tag equals
14598 * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
14599 A_UINT32 tlv_header;
14600 /*VDEV Identifier*/
14601 A_UINT32 vdev_id;
14602 A_UINT32 tsf_timer_high;
14603 A_UINT32 tsf_timer_low;
14604} wmi_ocb_get_tsf_timer_resp_event_fixed_param;
14605
14606/** Data structure for DCC stats configuration per channel. */
14607typedef struct {
14608 /** TLV tag and len; tag equals
14609 * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
14610 A_UINT32 tlv_header;
14611
14612 /*VDEV Identifier*/
14613 A_UINT32 vdev_id;
14614
14615 /** The channel for which this applies, 16 bits.
14616 * The dcc_stats_bitmap, 8 bits. */
14617 A_UINT32 chan_info;
14618
14619 /** Demodulation model parameters.
14620 *
14621 * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
14622 * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
14623 * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
14624 * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
14625 * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
14626 * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
14627 * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
14628 * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
14629 */
14630 A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)];
14631
14632 /** Communication ranges.
14633 *
14634 * tx_power, ndlType_txPower, 1+7 bits.
14635 * datarate, ndlType_datarate, 1+3 bits.
14636 */
14637 A_UINT32 tx_power_datarate;
14638 /**
14639 * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
14640 * NDL_estCommRange, ndlType_distance, 1+12 bits.
14641 */
14642 A_UINT32 carrier_sense_est_comm_range;
14643
14644 /** Channel load measures. */
14645 /**
14646 * dccSensitivity, ndlType_rxPower, 1+7 bits.
14647 * carrierSense, ndlType_rxPower, 1+7 bits.
14648 * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
14649 */
14650 A_UINT32 dcc_stats;
14651 /**
14652 * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
14653 * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
14654 */
14655 A_UINT32 packet_stats;
14656 /**
14657 * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
14658 */
14659 A_UINT32 channel_busy_time;
14660 /**
14661 *Transmit packet statistics.
14662 * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
14663 * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
14664 * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
14665 * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
14666 */
14667 A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
14668 /**
14669 * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
14670 * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
14671 * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
14672 * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
14673 */
14674 A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
14675 /**
14676 * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
14677 * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
14678 * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
14679 * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
14680 */
14681 A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
14682 /**
14683 * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
14684 * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
14685 * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
14686 * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
14687 */
14688 A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
14689} wmi_dcc_ndl_stats_per_channel;
14690
14691#define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
14692#define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
14693#define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
14694#define WMI_NDL_STATS_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
14695#define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8)
14696#define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
14697#define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
14698#define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
14699#define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
14700#define WMI_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
14701#define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
14702#define WMI_TX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
14703#define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
14704#define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
14705#define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
14706#define WMI_NDL_EST_COMM_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
14707#define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
14708#define WMI_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
14709#define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
14710#define WMI_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
14711#define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
14712#define WMI_NDL_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
14713#define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14)
14714#define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
14715#define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12)
14716#define WMI_NDL_PACKET_AVG_DURATION_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
14717#define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
14718#define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr, val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
14719
14720#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)
14721#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)
14722#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)
14723#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)
14724#define WMI_NDL_TX_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
14725#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)
14726#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)
14727#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)
14728
14729/** Bitmap for DCC stats. */
14730typedef enum {
14731 DCC_STATS_DEMODULATION_MODEL = 1,
14732 DCC_STATS_COMMUNICATION_RANGES = 2,
14733 DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
14734 DCC_STATS_TRANSMIT_PACKET_STATS = 8,
14735 DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
14736 DCC_STATS_ALL = 0xff,
14737} wmi_dcc_stats_bitmap;
14738
14739/** Data structure for getting the DCC stats. */
14740typedef struct {
14741 /**
14742 * TLV tag and len; tag equals
14743 * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param
14744 */
14745 A_UINT32 tlv_header;
14746 /* VDEV identifier */
14747 A_UINT32 vdev_id;
14748 /**The number of channels for which stats are being requested. */
14749 A_UINT32 num_channels;
14750 /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
14751} wmi_dcc_get_stats_cmd_fixed_param;
14752
14753typedef struct {
14754 /**
14755 * TLV tag and len; tag equals
14756 * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request.
14757 */
14758 A_UINT32 tlv_header;
14759 /** The channel for which this applies. */
14760 A_UINT32 chan_freq; /* MHz units */
14761 /** The DCC stats being requested. */
14762 A_UINT32 dcc_stats_bitmap;
14763} wmi_dcc_channel_stats_request;
14764
14765/** Data structure for the response with the DCC stats. */
14766typedef struct {
14767 /**
14768 * TLV tag and len; tag equals
14769 * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param
14770 */
14771 A_UINT32 tlv_header;
14772 /* VDEV identifier */
14773 A_UINT32 vdev_id;
14774 /** Number of channels in the response. */
14775 A_UINT32 num_channels;
14776 /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
14777} wmi_dcc_get_stats_resp_event_fixed_param;
14778
14779/** Data structure for clearing the DCC stats. */
14780typedef struct {
14781 /**
14782 * TLV tag and len; tag equals
14783 * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param
14784 */
14785 A_UINT32 tlv_header;
14786 /* VDEV identifier */
14787 A_UINT32 vdev_id;
14788 A_UINT32 dcc_stats_bitmap;
14789} wmi_dcc_clear_stats_cmd_fixed_param;
14790
14791/** Data structure for the pushed DCC stats */
14792typedef struct {
14793 /**
14794 * TLV tag and len; tag equals
14795 * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param
14796 */
14797 A_UINT32 tlv_header;
14798 /* VDEV identifier */
14799 A_UINT32 vdev_id;
14800 /** The number of channels in the response. */
14801 A_UINT32 num_channels;
14802 /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
14803} wmi_dcc_stats_event_fixed_param;
14804
14805/** Data structure for updating NDL per channel. */
14806typedef struct {
14807 /**
14808 * TLV tag and len; tag equals
14809 * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan
14810 */
14811 A_UINT32 tlv_header;
14812 /**
14813 * Channel frequency, 16 bits
14814 * NDL_numActiveState, ndlType_numberElements, 1+6 bits
14815 */
14816 A_UINT32 chan_info;
14817 /**
14818 * NDL_minDccSampling, 10 bits.
14819 * Maximum time interval between subsequent checks of the DCC rules.
14820 */
14821 A_UINT32 ndl_min_dcc_sampling;
14822 /**
14823 * dcc_enable, 1 bit.
14824 * dcc_stats_enable, 1 bit.
14825 * dcc_stats_interval, 16 bits.
14826 */
14827 A_UINT32 dcc_flags;
14828 /** General DCC configuration.
14829 * NDL_timeUp, ndlType_timing, 1+12 bits.
14830 * NDL_timeDown, ndlType_timing, 1+12 bits.
14831 */
14832 A_UINT32 general_config;
14833 /** Transmit power thresholds.
14834 * NDL_minTxPower, ndlType_txPower, 1+7 bits.
14835 * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
14836 */
14837 /* see "ETSI TS 102 687" table above for units */
14838 A_UINT32 min_max_tx_power;
14839 /**
14840 * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
14841 * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
14842 * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
14843 * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
14844 */
14845 /* see "ETSI TS 102 687" table above for units */
14846 A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
14847 /** Packet timing thresholds.
14848 * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
14849 * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
14850 * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
14851 * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
14852 */
14853 A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
14854 /**
14855 * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
14856 * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
14857 */
14858 A_UINT32 min_max_packet_interval;
14859 /**
14860 * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
14861 * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
14862 * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
14863 * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits
14864 */
14865 A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
14866 /** Packet datarate thresholds.
14867 * NDL_minDatarate, ndlType_datarate, 1+3 bits.
14868 * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
14869 */
14870 A_UINT32 min_max_datarate;
14871 /**
14872 * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
14873 * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
14874 * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
14875 * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
14876 */
14877 A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
14878 /** Receive signal thresholds.
14879 * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
14880 * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
14881 * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
14882 */
14883 A_UINT32 min_max_def_carrier_sense;
14884
14885 /** Receive model parameter.
14886 * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
14887 * NDL_maxCsRange, ndlType_distance, 1+12 bits.
14888 * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
14889 */
14890 A_UINT32 receive_model_parameter;
14891
14892 /**
14893 * NDL_minSNR, ndlType_snr, 1+7 bits.
14894 */
14895 A_UINT32 receive_model_parameter_2;
14896
14897 /** Demodulation model parameters.
14898 * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
14899 * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
14900 * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
14901 * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
14902 * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
14903 * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
14904 * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
14905 * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
14906 */
14907 A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)];
14908 /** Transmit model parameters.
14909 * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
14910 * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
14911 * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
14912 * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
14913 */
14914 A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
14915 /**
14916 * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
14917 * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
14918 * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
14919 * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
14920 */
14921 A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
14922 /**
14923 * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
14924 * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
14925 * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
14926 * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
14927 */
14928 A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
14929 /* NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits. */
14930 A_UINT32 tm_max_channel_use;
14931 /**
14932 * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
14933 * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
14934 * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
14935 * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
14936 */
14937 A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
14938 /** Channel load thresholds.
14939 * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
14940 * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
14941 */
14942 A_UINT32 min_max_channel_load;
14943 /** Transmit queue parameters.
14944 * NDL_numQueue, ndlType_acPrio, 1+3 bits.
14945 * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
14946 * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
14947 * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
14948 * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
14949 */
14950 A_UINT32 transmit_queue_parameters;
14951 /**
14952 * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
14953 * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
14954 * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
14955 * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
14956 */
14957 A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
14958} wmi_dcc_ndl_chan;
14959
14960#define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
14961#define WMI_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
14962#define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7)
14963#define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
14964
14965#define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
14966#define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
14967
14968#define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
14969#define WMI_NDL_MEASURE_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
14970
14971
14972#define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
14973#define WMI_NDL_DCC_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
14974#define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
14975#define WMI_NDL_DCC_STATS_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
14976#define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
14977#define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
14978
14979#define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13)
14980#define WMI_NDL_TIME_UP_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 0, 13, val)
14981#define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13)
14982#define WMI_NDL_TIME_DOWN_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 13, 13, val)
14983
14984#define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
14985#define WMI_NDL_MIN_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
14986#define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
14987#define WMI_NDL_MAX_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
14988
14989#define WMI_NDL_DEF_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
14990#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)
14991
14992#define WMI_NDL_MAX_PACKET_DURATION_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
14993#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)
14994#define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
14995#define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
14996#define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
14997#define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
14998#define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
14999#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)
15000
15001#define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
15002#define WMI_NDL_MIN_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
15003#define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
15004#define WMI_NDL_MAX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
15005#define WMI_NDL_DEF_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
15006#define WMI_NDL_DEF_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
15007
15008#define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
15009#define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
15010#define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
15011#define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
15012#define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
15013#define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
15014
15015#define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
15016#define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
15017#define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
15018#define WMI_NDL_MAX_CS_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
15019#define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
15020#define WMI_NDL_REF_PATH_LOSS_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
15021
15022#define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
15023#define WMI_NDL_MIN_SNR_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
15024
15025#define WMI_NDL_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
15026#define WMI_NDL_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
15027
15028#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)
15029#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)
15030#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)
15031#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)
15032#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)
15033#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)
15034#define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
15035#define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr, val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
15036#define WMI_NDL_TM_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
15037#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)
15038
15039#define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
15040#define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
15041#define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
15042#define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
15043
15044#define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
15045#define WMI_NDL_NUM_QUEUE_SET(ptr, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
15046#define WMI_NDL_REF_QUEUE_STATUS_GET(ptr, acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
15047#define WMI_NDL_REF_QUEUE_STATUS_SET(ptr, acprio, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
15048#define WMI_NDL_REF_QUEUE_LEN_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
15049#define WMI_NDL_REF_QUEUE_LEN_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
15050
15051/** Data structure for updating the NDL. */
15052typedef struct {
15053 /** TLV tag and len; tag equals
15054 * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
15055 A_UINT32 tlv_header;
15056 /* VDEV identifier */
15057 A_UINT32 vdev_id;
15058 /** The number of channels in the request. */
15059 A_UINT32 num_channel;
15060 /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
15061 /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
15062} wmi_dcc_update_ndl_cmd_fixed_param;
15063
15064typedef struct {
15065 /**
15066 * TLV tag and len; tag equals
15067 * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param
15068 */
15069 A_UINT32 tlv_header;
15070 /* VDEV identifier */
15071 A_UINT32 vdev_id;
15072 A_UINT32 status;
15073} wmi_dcc_update_ndl_resp_event_fixed_param;
15074
15075/* Actions for TSF timestamp */
15076typedef enum {
15077 TSF_TSTAMP_CAPTURE_REQ = 1,
15078 TSF_TSTAMP_CAPTURE_RESET = 2,
15079 TSF_TSTAMP_READ_VALUE = 3,
Govind Singhd2970e32016-01-21 10:30:02 +053015080 TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015081} wmi_tsf_tstamp_action;
15082
15083typedef struct {
15084 /** TLV tag and len; tag equals
15085 * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
15086 A_UINT32 tlv_header;
15087 /** unique id identifying the VDEV, generated by the caller */
15088 A_UINT32 vdev_id;
15089 /* action type, refer to wmi_tsf_tstamp_action */
15090 A_UINT32 tsf_action;
15091} wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
15092
15093typedef struct {
15094 /* TLV tag and len; tag equals
15095 * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
15096 A_UINT32 tlv_header;
15097 /* VDEV identifier */
15098 A_UINT32 vdev_id;
15099 /* low 32bit of tsf */
15100 A_UINT32 tsf_low;
15101 /* high 32 bit of tsf */
15102 A_UINT32 tsf_high;
Krishna Kumaar Natarajan40b3c112016-03-25 14:36:18 -070015103 /* low 32 bits of qtimer */
15104 A_UINT32 qtimer_low;
15105 /* high 32 bits of qtimer */
15106 A_UINT32 qtimer_high;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015107} wmi_vdev_tsf_report_event_fixed_param;
15108
Nitesh Shahe5aa26b2016-07-08 12:03:44 +053015109/**
15110 * ie_id values:
15111 * 0 to 255 are used for individual IEEE802.11 Information Element types
15112 */
15113#define WMI_SET_VDEV_IE_ID_SCAN_SET_DEFAULT_IE 256
15114
15115/* source values: */
15116#define WMI_SET_VDEV_IE_SOURCE_HOST 0x0
15117
Anurag Chouhanbfed5292016-08-09 11:17:40 +053015118/* band values: */
15119typedef enum {
15120 WMI_SET_VDEV_IE_BAND_ALL = 0,
15121 WMI_SET_VDEV_IE_BAND_2_4GHZ,
15122 WMI_SET_VDEV_IE_BAND_5GHZ,
15123} wmi_set_vdev_ie_band;
15124
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015125typedef struct {
15126 /** TLV tag and len; tag equals
15127 * WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
15128 A_UINT32 tlv_header;
15129 /* unique id identifying the VDEV, generated by the caller */
15130 A_UINT32 vdev_id;
15131 /* unique id to identify the ie_data as defined by ieee 802.11 spec */
15132 A_UINT32 ie_id;
15133 /* ie_len corresponds to num of bytes in ie_data[] */
15134 A_UINT32 ie_len;
Nitesh Shahe5aa26b2016-07-08 12:03:44 +053015135 /** source of this command */
15136 A_UINT32 ie_source; /* see WMI_SET_VDEV_IE_SOURCE_ defs */
Anurag Chouhanbfed5292016-08-09 11:17:40 +053015137 /** band for this IE - se wmi_set_vdev_ie_band enum */
15138 A_UINT32 band;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015139 /*
15140 * Following this structure is the TLV byte stream of ie data of length
15141 * buf_len:
15142 * A_UINT8 ie_data[];
15143 */
15144} wmi_vdev_set_ie_cmd_fixed_param;
15145
Himanshu Agarwal7a391e02016-09-14 20:42:35 +053015146/* DISA feature related data structures */
15147#define MAX_MAC_HEADER_LEN 32
15148typedef enum {
15149 INVALID,
15150 ENCRYPT = 1,
15151 DECRYPT = 2,
15152} ENCRYPT_DECRYPT_FLAG;
15153
15154typedef struct {
15155 /**
15156 * TLV tag and len; tag equals
15157 * WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param
15158 */
15159 A_UINT32 tlv_header;
15160 /** unique id identifying the VDEV, generated by the caller */
15161 A_UINT32 vdev_id;
15162 ENCRYPT_DECRYPT_FLAG key_flag;
15163 A_UINT32 key_idx;
15164 A_UINT32 key_cipher;
15165 A_UINT32 key_len; /* units = bytes */
15166 A_UINT32 key_txmic_len; /* units = bytes */
15167 A_UINT32 key_rxmic_len; /* units = bytes */
15168 /** Key: This array needs to be provided in little-endian order */
15169 A_UINT8 key_data[WMI_MAX_KEY_LEN];
15170 /**
15171 * Packet number: This array needs to be provided in little-endian
15172 * order.
15173 * If the PN is less than 8 bytes, the PN data shall be placed into this
15174 * pn[] array starting at byte 0, leaving the MSBs empty.
15175 */
15176 A_UINT8 pn[8];
15177 /**
15178 * 802.11 MAC header to be typecast to struct ieee80211_qosframe_addr4
15179 * This array needs to be provided in little-endian order.
15180 */
15181 A_UINT8 mac_hdr[MAX_MAC_HEADER_LEN];
15182 A_UINT32 data_len; /** Payload length, units = bytes */
15183 /**
15184 * Following this struct are this TLV:
15185 * A_UINT8 data[]; <-- actual data to be encrypted,
15186 * needs to be provided in little-endian order
15187 */
15188} wmi_vdev_encrypt_decrypt_data_req_cmd_fixed_param;
15189
15190/**
15191 * This event is generated in response to
15192 * WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from HOST.
15193 * On receiving WMI command WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID from
15194 * HOST with DISA test vectors, DISA frame will prepared and submitted to HW,
15195 * then on receiving the tx completion for the DISA frame this WMI event
15196 * will be delivered to HOST with the encrypted frame.
15197 */
15198typedef struct {
15199 /**
15200 * TLV tag and len; tag equals
15201 * WMITLV_TAG_STRUC_wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param
15202 */
15203 A_UINT32 tlv_header;
15204 /* VDEV identifier */
15205 A_UINT32 vdev_id;
15206 A_INT32 status; /* 0: success, -1: Failure, */
15207 /* 802.11 header length + encrypted payload length (units = bytes) */
15208 A_UINT32 data_length;
15209 /**
15210 * Following this struct is this TLV:
15211 * A_UINT8 enc80211_frame[]; <-- Encrypted 802.11 frame;
15212 * 802.11 header + encrypted payload,
15213 * provided in little-endian order
15214 */
15215} wmi_vdev_encrypt_decrypt_data_resp_event_fixed_param;
15216
Govind Singh869c9872016-02-22 18:36:34 +053015217/* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015218typedef struct {
15219 /*
15220 * TLV tag and len; tag equals
15221 * WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param
15222 * Set Preferred Channel List
15223 */
15224 A_UINT32 tlv_header;
15225
15226 /* # of channels to scan */
15227 A_UINT32 num_chan;
15228 /*
15229 * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd
15230 * structure. The TLV's are:
15231 * A_UINT32 channel_list[];
15232 */
15233} wmi_soc_set_pcl_cmd_fixed_param;
15234
Anurag Chouhan11b53a12016-07-28 12:39:46 +053015235/* Values for channel_weight */
15236typedef enum {
15237 WMI_PCL_WEIGHT_DISALLOW = 0,
15238 WMI_PCL_WEIGHT_LOW = 1,
15239 WMI_PCL_WEIGHT_MEDIUM = 2,
15240 WMI_PCL_WEIGHT_HIGH = 3,
15241 WMI_PCL_WEIGHT_VERY_HIGH = 4,
15242} wmi_pcl_chan_weight;
15243
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015244typedef struct {
15245 /* TLV tag and len; tag equals
Govind Singh869c9872016-02-22 18:36:34 +053015246 * WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param
15247 */
15248 A_UINT32 tlv_header;
15249 /** Set Preferred Channel List **/
15250
15251 /** pdev_id for identifying the MAC
15252 * See macros starting with WMI_PDEV_ID_ for values.
15253 */
15254 A_UINT32 pdev_id;
15255
15256 /** # of channels to scan */
15257 A_UINT32 num_chan;
15258 /**
15259 * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd
15260 * structure. The TLV's are:
15261 * A_UINT32 channel_weight[];
15262 * channel order & size will be as per the list provided
15263 * in WMI_SCAN_CHAN_LIST_CMDID
15264 **/
15265} wmi_pdev_set_pcl_cmd_fixed_param;
15266
15267/* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */
15268typedef struct {
15269 /* TLV tag and len; tag equals
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015270 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param
15271 * Set Hardware Mode */
15272 A_UINT32 tlv_header;
15273
15274 /* Hardware Mode Index */
15275 A_UINT32 hw_mode_index;
15276} wmi_soc_set_hw_mode_cmd_fixed_param;
15277
15278typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053015279 /* TLV tag and len; tag equals
15280 * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param
15281 */
15282 A_UINT32 tlv_header;
15283 /** Set Hardware Mode **/
15284
15285 /** pdev_id for identifying the MAC
15286 * See macros starting with WMI_PDEV_ID_ for values.
15287 */
15288 A_UINT32 pdev_id;
15289
15290 /* Hardware Mode Index */
15291 A_UINT32 hw_mode_index;
15292} wmi_pdev_set_hw_mode_cmd_fixed_param;
15293
15294/* DEPRECATED - use wmi_pdev_set_mac_config_cmd_fixed_param instead */
15295typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015296 /*
15297 * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param
15298 * Set Dual MAC Firmware Configuration
15299 */
15300 A_UINT32 tlv_header;
15301
15302 /* Concurrent scan configuration bits */
15303 A_UINT32 concurrent_scan_config_bits;
15304 /* Firmware mode configuration bits */
15305 A_UINT32 fw_mode_config_bits;
15306} wmi_soc_set_dual_mac_config_cmd_fixed_param;
15307
15308typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053015309 /* TLV tag and len; tag equals
15310 * WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param
15311 */
15312 A_UINT32 tlv_header;
15313 /** Set Dual MAC Firmware Configuration **/
15314
15315 /** pdev_id for identifying the MAC
15316 * See macros starting with WMI_PDEV_ID_ for values.
15317 */
15318 A_UINT32 pdev_id;
15319
15320 /* Concurrent scan configuration bits */
15321 A_UINT32 concurrent_scan_config_bits;
15322 /* Firmware mode configuration bits */
15323 A_UINT32 fw_mode_config_bits;
15324} wmi_pdev_set_mac_config_cmd_fixed_param;
15325
15326typedef struct { /* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015327 A_UINT32 num_tx_chains;
15328 A_UINT32 num_rx_chains;
15329 A_UINT32 reserved[2];
15330} soc_num_tx_rx_chains;
15331
15332typedef struct {
15333 A_UINT32 num_tx_chains_2g;
15334 A_UINT32 num_rx_chains_2g;
15335 A_UINT32 num_tx_chains_5g;
15336 A_UINT32 num_rx_chains_5g;
15337} band_num_tx_rx_chains;
15338
15339typedef union {
15340 soc_num_tx_rx_chains soc_txrx_chain_setting;
15341 band_num_tx_rx_chains band_txrx_chain_setting;
15342} antenna_num_tx_rx_chains;
15343
15344typedef enum {
15345 ANTENNA_MODE_DISABLED = 0x0,
15346 ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
15347 /* reserved */
15348} antenna_mode_reason;
15349
Govind Singh869c9872016-02-22 18:36:34 +053015350/* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015351typedef struct {
15352 /*
15353 * TLV tag and len;
15354 * tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param
15355 */
15356 A_UINT32 tlv_header;
15357
15358 /* the reason for setting antenna mode, refer antenna_mode_reason */
15359 A_UINT32 reason;
15360
15361 /*
15362 * The above reason parameter will select whether the following union
15363 * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
15364 */
15365 antenna_num_tx_rx_chains num_txrx_chains_setting;
15366} wmi_soc_set_antenna_mode_cmd_fixed_param;
15367
Govind Singh869c9872016-02-22 18:36:34 +053015368typedef struct {
15369 /* TLV tag and len; tag equals
15370 * WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param
15371 */
15372 A_UINT32 tlv_header;
15373
15374 /** pdev_id for identifying the MAC
15375 * See macros starting with WMI_PDEV_ID_ for values.
15376 */
15377 A_UINT32 pdev_id;
15378
15379 /* Bits 0-15 is the number of RX chains and
15380 * 16-31 is the number of TX chains
15381 */
15382 A_UINT32 num_txrx_chains;
15383} wmi_pdev_set_antenna_mode_cmd_fixed_param;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015384
15385/** Data structure for information specific to a VDEV to MAC mapping. */
Govind Singh869c9872016-02-22 18:36:34 +053015386/* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015387typedef struct {
15388 /*
15389 * TLV tag and len; tag equals
15390 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
15391 A_UINT32 tlv_header;
15392 A_UINT32 vdev_id; /* VDEV ID */
15393 A_UINT32 mac_id; /* MAC ID */
15394} wmi_soc_set_hw_mode_response_vdev_mac_entry;
15395
Govind Singh869c9872016-02-22 18:36:34 +053015396/** Data structure for information specific to a VDEV to MAC mapping. */
15397typedef struct {
15398 /** TLV tag and len; tag equals
15399 * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */
15400 A_UINT32 tlv_header;
15401
15402 /** pdev_id for identifying the MAC
15403 * See macros starting with WMI_PDEV_ID_ for values.
15404 */
15405 A_UINT32 pdev_id;
15406
15407 A_UINT32 vdev_id;
15408} wmi_pdev_set_hw_mode_response_vdev_mac_entry;
15409
15410/* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015411typedef struct {
15412 /* TLV tag and len; tag equals
15413 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param
15414 * Set Hardware Mode Response Event **/
15415 A_UINT32 tlv_header;
15416
15417 /* Status of set_hw_mode command
15418 * Values for Status:
15419 * 0 - OK; command successful
15420 * 1 - EINVAL; Requested invalid hw_mode
15421 * 2 - ECANCELED; HW mode change canceled
15422 * 3 - ENOTSUP; HW mode not supported
15423 * 4 - EHARDWARE; HW mode change prevented by hardware
15424 * 5 - EPENDING; HW mode change is pending
15425 * 6 - ECOEX; HW mode change conflict with Coex
15426 */
15427 A_UINT32 status;
15428 /* Configured Hardware Mode */
15429 A_UINT32 cfgd_hw_mode_index;
15430 /* Number of Vdev to Mac entries */
15431 A_UINT32 num_vdev_mac_entries;
15432 /*
15433 * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event
15434 * structure. The TLV's are:
15435 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
15436 */
15437} wmi_soc_set_hw_mode_response_event_fixed_param;
15438
15439typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053015440 /* TLV tag and len; tag equals
15441 * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param
15442 */
15443 A_UINT32 tlv_header;
15444 /** Set Hardware Mode Response Event **/
15445
15446 /** pdev_id for identifying the MAC
15447 * See macros starting with WMI_PDEV_ID_ for values.
15448 */
15449 A_UINT32 pdev_id;
15450
15451 /* Status of set_hw_mode command */
15452 /*
15453 * Values for Status:
15454 * 0 - OK; command successful
15455 * 1 - EINVAL; Requested invalid hw_mode
15456 * 2 - ECANCELED; HW mode change canceled
15457 * 3 - ENOTSUP; HW mode not supported
15458 * 4 - EHARDWARE; HW mode change prevented by hardware
15459 * 5 - EPENDING; HW mode change is pending
15460 * 6 - ECOEX; HW mode change conflict with Coex
15461 */
15462 A_UINT32 status;
15463 /* Configured Hardware Mode */
15464 A_UINT32 cfgd_hw_mode_index;
15465 /* Number of Vdev to Mac entries */
15466 A_UINT32 num_vdev_mac_entries;
15467 /**
15468 * TLV (tag length value ) parameters follow the
15469 * soc_set_hw_mode_response_event structure. The TLV's are:
15470 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
15471 */
15472} wmi_pdev_set_hw_mode_response_event_fixed_param;
15473
15474/* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */
15475typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015476 /*
15477 * TLV tag and len; tag equals
15478 * WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param
15479 * Hardware Mode Transition Event
15480 */
15481 A_UINT32 tlv_header;
15482 /* Original or old Hardware mode */
15483 A_UINT32 old_hw_mode_index;
15484 /* New Hardware Mode */
15485 A_UINT32 new_hw_mode_index;
15486 /* Number of Vdev to Mac entries */
15487 A_UINT32 num_vdev_mac_entries;
15488
15489 /**
15490 * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event
15491 * structure. The TLV's are:
15492 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
15493 */
15494} wmi_soc_hw_mode_transition_event_fixed_param;
15495
Govind Singh869c9872016-02-22 18:36:34 +053015496typedef struct {
15497 /* TLV tag and len; tag equals
15498 * WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param
15499 */
15500 A_UINT32 tlv_header;
15501 /** Hardware Mode Transition Event **/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015502
Govind Singh869c9872016-02-22 18:36:34 +053015503 /** pdev_id for identifying the MAC
15504 * See macros starting with WMI_PDEV_ID_ for values.
15505 */
15506 A_UINT32 pdev_id;
15507
15508 /* Original or old Hardware mode */
15509 A_UINT32 old_hw_mode_index;
15510 /* New Hardware Mode */
15511 A_UINT32 new_hw_mode_index;
15512 /* Number of Vdev to Mac entries */
15513 A_UINT32 num_vdev_mac_entries;
15514
15515 /**
15516 * TLV (tag length value ) parameters follow the
15517 * soc_set_hw_mode_response_event structure. The TLV's are:
15518 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
15519 */
15520} wmi_pdev_hw_mode_transition_event_fixed_param;
15521
Pradeep Reddy POTTETIdead2bd2016-06-09 17:11:12 +053015522/**
15523 * This command is sent from WLAN host driver to firmware for
15524 * plugging in reorder queue desc to lithium hw.
15525 *
15526 * Example: plug-in queue desc for TID 5
15527 * host->target: WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
15528 * (vdev_id = PEER vdev id,
15529 * peer_macaddr = PEER mac addr,
15530 * tid = 5,
15531 * queue_ptr_lo = queue desc addr lower 32 bits,
15532 * queue_ptr_hi = queue desc addr higher 32 bits,
15533 * queue_no = 16-bit number assigned by host for queue,
15534 * stored in bits 15:0 of queue_no field)
15535 */
15536typedef struct {
15537 /* TLV tag and len; tag equals
15538 * WMITLV_TAG_STRUC_wmi_peer_reorder_queue_setup_cmd_fixed_param
15539 */
15540 A_UINT32 tlv_header;
15541 A_UINT32 vdev_id;
15542 /* peer mac address */
15543 wmi_mac_addr peer_macaddr;
15544 /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
15545 A_UINT32 tid;
15546 /* lower 32 bits of queue desc adddress */
15547 A_UINT32 queue_ptr_lo;
15548 /* upper 32 bits of queue desc adddress */
15549 A_UINT32 queue_ptr_hi;
15550 /* 16-bit number assigned by host for queue,
15551 * stored in bits 15:0 of queue_no field
15552 */
15553 A_UINT32 queue_no;
15554} wmi_peer_reorder_queue_setup_cmd_fixed_param;
15555
15556/**
15557 * This command is sent from WLAN host driver to firmware for
15558 * removing one or more reorder queue desc to lithium hw.
15559 *
15560 * Example: remove queue desc for all TIDs
15561 * host->target: WMI_PEER_REORDER_REMOVE_CMDID,
15562 * (vdev_id = PEER vdev id,
15563 * peer_macaddr = PEER mac addr,
15564 * tid = 0x1FFFF,
15565 */
15566typedef struct {
15567 /* TLV tag and len;
15568 * tag equals
15569 * WMITLV_TAG_STRUC_wmi_peer_reorder_queue_remove_cmd_fixed_param
15570 */
15571 A_UINT32 tlv_header;
15572 A_UINT32 vdev_id;
15573 /* peer mac address */
15574 wmi_mac_addr peer_macaddr;
15575 /* bits 0 to 15 = QoS TIDs, bit 16 = non-qos TID */
15576 A_UINT32 tid_mask;
15577} wmi_peer_reorder_queue_remove_cmd_fixed_param;
15578
15579
Govind Singh869c9872016-02-22 18:36:34 +053015580/* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param
15581 * instead
15582 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015583typedef struct {
15584 /*
15585 * TLV tag and len; tag equals
15586 * WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param
15587 * Set Dual MAC Config Response Event
15588 */
15589 A_UINT32 tlv_header;
15590
15591 /* Status for set_dual_mac_config command */
15592 /*
15593 * Values for Status:
15594 * 0 - OK; command successful
15595 * 1 - EINVAL; Requested invalid hw_mode
15596 * 3 - ENOTSUP; HW mode not supported
15597 * 4 - EHARDWARE; HW mode change prevented by hardware
15598 * 6 - ECOEX; HW mode change conflict with Coex
15599 */
15600 A_UINT32 status;
15601} wmi_soc_set_dual_mac_config_response_event_fixed_param;
15602
Govind Singh869c9872016-02-22 18:36:34 +053015603typedef struct {
15604 /* TLV tag and len; tag equals
15605 * WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param
15606 */
15607 A_UINT32 tlv_header;
15608 /** Set Dual MAC Config Response Event **/
15609
15610 /** pdev_id for identifying the MAC
15611 * See macros starting with WMI_PDEV_ID_ for values.
15612 */
15613 A_UINT32 pdev_id;
15614
15615 /* Status for set_dual_mac_config command */
15616 /*
15617 * Values for Status:
15618 * 0 - OK; command successful
15619 * 1 - EINVAL; Requested invalid hw_mode
15620 * 3 - ENOTSUP; HW mode not supported
15621 * 4 - EHARDWARE; HW mode change prevented by hardware
15622 * 6 - ECOEX; HW mode change conflict with Coex
15623 */
15624 A_UINT32 status;
15625} wmi_pdev_set_mac_config_response_event_fixed_param;
15626
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015627typedef enum {
15628 MAWC_MOTION_STATE_UNKNOWN,
15629 MAWC_MOTION_STATE_STATIONARY,
15630 MAWC_MOTION_STATE_WALK,
15631 MAWC_MOTION_STATE_TRANSIT,
15632} MAWC_MOTION_STATE;
15633
15634typedef enum {
15635 MAWC_SENSOR_STATUS_OK,
15636 MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
15637 MAWC_SENSOR_STATUS_SHUTDOWN,
15638} MAWC_SENSOR_STATUS;
15639
15640typedef struct {
15641 /* TLV tag and len; tag equals
15642 * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
15643 A_UINT32 tlv_header;
15644 /** new motion state, MAWC_MOTION_STATE */
15645 A_UINT32 motion_state;
15646 /** status code of sensor, MAWC_SENSOR_STATUS */
15647 A_UINT32 sensor_status;
15648} wmi_mawc_sensor_report_ind_cmd_fixed_param;
15649
Govind Singh86180292016-02-01 14:03:37 +053015650/* MBO flag field definition */
15651/*
15652 * Bit 0: 0 - Allow to connect to both MBO and non-MBO AP
15653 * 1 - Allow to connect to MBO AP only
15654 * Bit 1-31 : reserved.
15655 */
Nitesh Shahe5aa26b2016-07-08 12:03:44 +053015656#define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0) /* DEPRECATED */
Govind Singh86180292016-02-01 14:03:37 +053015657
15658typedef struct {
15659 /*
15660 * TLV tag and len; tag equals
15661 * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param
15662 */
15663 A_UINT32 tlv_header;
15664 /** vdev id */
15665 A_UINT32 vdev_id;
15666 /** enable or disable MBO */
15667 A_UINT32 enable;
15668 /** MBO flags, refer to definition of MBO flags*/
15669 A_UINT32 flags;
Nitesh Shahe5aa26b2016-07-08 12:03:44 +053015670} wmi_roam_set_mbo_fixed_param; /* DEPRECATED */
Govind Singh86180292016-02-01 14:03:37 +053015671
15672typedef struct {
15673 /*
15674 * TLV tag and len; tag equals
15675 * WMITLV_TAG_ARRAY_STRUC
15676 */
15677 A_UINT32 tlv_header;
15678 /** Current operating class number */
15679 A_UINT32 cur_op_class;
15680 /*
15681 * Country string of current reg domain,
15682 * the expected value should be same as country str defined
15683 * in country IE.
15684 * 3 octets (COUNTRY_STR) + 1 octet (always 0)
15685 * The ordering of this array must be maintained,
15686 * even when a big-endian host's WMI messages undergo
15687 * automatic byte reordering for conversion to the
15688 * little-endian ordering required by the target.
15689 * On big-endian hosts, this array may need to be byte-swapped
15690 * by the host, so the subsequent automatic byte-swap
15691 * will result in the correct final byte order.
15692 * global operating class: set country_str[0]=0
15693 */
15694 A_UINT8 country_str[4];
15695 /** Supported operating class number in current regdomain */
15696 A_UINT32 supp_op_class_num;
15697 /* The TLVs will follow. */
15698 /* A_UINT32 supp_op_class_list[] */
15699} wmi_supported_operating_class_param;
15700
15701typedef struct {
15702 /*
15703 * TLV tag and len; tag equals
15704 * WMITLV_TAG_ARRAY_STRUC
15705 */
15706 A_UINT32 tlv_header;
15707 /** non preferred channel attribute length */
15708 A_UINT32 non_prefer_ch_attr_len;
15709 /* The TLVs will follow. */
15710 /** A_UINT8 non_prefer_ch_attr[];*/
15711} wmi_mbo_non_preferred_channel_report_param;
15712
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015713typedef struct {
15714 /* TLV tag and len; tag equals
15715 * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
15716 A_UINT32 tlv_header;
15717 /* enable(1) or disable(0) */
15718 A_UINT32 enable;
15719} wmi_mawc_enable_sensor_event_fixed_param;
15720
15721typedef struct {
15722 /* TLV tag and len; tag equals
15723 * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
15724 A_UINT32 tlv_header;
15725 /* Unique id identifying the VDEV */
15726 A_UINT32 vdev_id;
15727 /* enable(1) or disable(0) MAWC */
15728 A_UINT32 enable;
15729 /* ratio of skipping suppressing scan, skip one out of x */
15730 A_UINT32 suppress_ratio;
15731} wmi_extscan_configure_mawc_cmd_fixed_param;
15732
15733typedef struct {
15734 /* TLV tag and len; tag equals
15735 * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
15736 A_UINT32 tlv_header;
15737 /* Unique id identifying the VDEV */
15738 A_UINT32 vdev_id;
15739 /* enable(1) or disable(0) MAWC */
15740 A_UINT32 enable;
15741 /* ratio of exponential backoff, next = current + current*ratio/100 */
15742 A_UINT32 exp_backoff_ratio;
15743 /* initial scan interval(msec) */
15744 A_UINT32 init_scan_interval;
15745 /* max scan interval(msec) */
15746 A_UINT32 max_scan_interval;
15747} wmi_nlo_configure_mawc_cmd_fixed_param;
15748
15749typedef struct {
15750 /* TLV tag and len; tag equals
15751 * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
15752 A_UINT32 tlv_header;
15753 /* Unique id identifying the VDEV */
15754 A_UINT32 vdev_id;
15755 /* enable(1) or disable(0) MAWC */
15756 A_UINT32 enable;
15757 /* data traffic load (kBps) to register CMC */
15758 A_UINT32 traffic_load_threshold;
15759 /* RSSI threshold (dBm) to scan for Best AP */
15760 A_UINT32 best_ap_rssi_threshold;
15761 /* high RSSI threshold adjustment in Stationary to suppress scan */
15762 A_UINT32 rssi_stationary_high_adjust;
15763 /* low RSSI threshold adjustment in Stationary to suppress scan */
15764 A_UINT32 rssi_stationary_low_adjust;
15765} wmi_roam_configure_mawc_cmd_fixed_param;
15766
15767#define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2
Himanshu Agarwal2690e462016-06-03 14:26:01 +053015768#define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 5
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015769
15770typedef enum {
15771 PACKET_FILTER_TYPE_INVALID = 0,
15772 PACKET_FILTER_TYPE_FILTER_PKT,
15773 PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
15774 PACKET_FILTER_TYPE_MAX_ENUM_SIZE
15775} WMI_PACKET_FILTER_FILTER_TYPE;
15776
15777typedef enum {
15778 PACKET_FILTER_PROTO_TYPE_INVALID = 0,
15779
15780 /* L2 header */
15781 PACKET_FILTER_PROTO_TYPE_MAC,
15782 PACKET_FILTER_PROTO_TYPE_SNAP,
15783
15784 /* L3 header (EtherType) */
15785 PACKET_FILTER_PROTO_TYPE_IPV4,
15786 PACKET_FILTER_PROTO_TYPE_IPV6,
15787
15788 /* L4 header (IP protocol) */
15789 PACKET_FILTER_PROTO_TYPE_UDP,
15790 PACKET_FILTER_PROTO_TYPE_TCP,
15791 PACKET_FILTER_PROTO_TYPE_ICMPV6,
15792
15793 PACKET_FILTER_PROTO_TYPE_MAX
15794} WMI_PACKET_FILTER_PROTO_TYPE;
15795
15796typedef enum {
15797 PACKET_FILTER_CMP_TYPE_INVALID = 0,
15798 PACKET_FILTER_CMP_TYPE_EQUAL,
15799 PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
15800 PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
15801 PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
15802 PACKET_FILTER_CMP_TYPE_ADDRTYPE,
15803 PACKET_FILTER_CMP_TYPE_MAX
15804} WMI_PACKET_FILTER_CMP_TYPE;
15805
15806typedef enum {
15807 PACKET_FILTER_SET_INACTIVE = 0,
15808 PACKET_FILTER_SET_ACTIVE
15809} WMI_PACKET_FILTER_ACTION;
15810
15811typedef enum {
15812 PACKET_FILTER_SET_DISABLE = 0,
15813 PACKET_FILTER_SET_ENABLE
15814} WMI_PACKET_FILTER_RUNTIME_ENABLE;
15815
15816typedef struct {
15817 A_UINT32 proto_type;
15818 A_UINT32 cmp_type;
15819 A_UINT32 data_length; /* Length of the data to compare (units = bytes) */
15820 /*
15821 * from start of the respective frame header (
15822 * units = bytes)
15823 */
15824 A_UINT32 data_offset;
15825 /* Data to compare, little-endian order */
15826 A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD];
15827 /* Mask to be applied on rcvd packet data before compare, little-endian order */
15828 A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD];
15829} WMI_PACKET_FILTER_PARAMS_TYPE;
15830
15831typedef struct {
15832 A_UINT32 tlv_header;
15833 A_UINT32 vdev_id;
15834 A_UINT32 filter_id;
15835 A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */
15836 A_UINT32 filter_type;
15837 A_UINT32 num_params; /* how many entries in paramsData are valid */
15838 A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */
15839 WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
Himanshu Agarwal2690e462016-06-03 14:26:01 +053015840 /*
15841 * deprecated0:
15842 * This field simply provides filler space to retain the
15843 * original message format while reducing
15844 * WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER from 10 to 5.
15845 */
15846 WMI_PACKET_FILTER_PARAMS_TYPE deprecated0[5];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015847} WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
15848
15849/* enable / disable all filters within the specified vdev */
15850typedef struct {
15851 A_UINT32 tlv_header;
15852 A_UINT32 vdev_id;
15853 A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
15854} WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
15855
15856
15857#define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0
15858#define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
15859
15860#define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
15861 WMI_SET_BITS(tcp_flag_u32, \
15862 WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
15863 WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
15864 tcp_flag_values)
15865#define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
15866 WMI_GET_BITS(tcp_flag_u32, \
15867 WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
15868 WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
15869
15870#define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9
15871#define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
15872
15873#define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
15874 WMI_SET_BITS(tcp_flag_u32, \
15875 WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
15876 WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
15877 tcp_flags_mask)
15878#define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
15879 WMI_GET_BITS(tcp_flag_u32, \
15880 WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
15881 WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
15882
15883typedef struct {
15884 A_UINT32 tlv_header;
15885 /**
15886 * @brief lro_enable - indicates whether lro is enabled
15887 * [0] LRO Enable
15888 */
15889 A_UINT32 lro_enable;
15890 /**
15891 * @brief tcp_flag_u32 - mask of which TCP flags to check and
15892 * values to check for
15893 * [8:0] TCP flag values - If the TCP flags from the packet do not match
15894 * the values in this field after masking with TCP flags mask
15895 * below,LRO eligible will not be set
15896 * [17:9] TCP flags mask - Mask field for comparing the TCP values
15897 * provided above with the TCP flags field in the received packet
15898 * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
15899 * macros to isolate the mask field and values field that are packed
15900 * into this u32 "word".
15901 */
15902 A_UINT32 tcp_flag_u32;
15903 /**
15904 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
15905 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
15906 * bytes 0 to 3
15907 *
15908 * In this and all the below toeplitz_hash fields, the bytes are
15909 * specified in little-endian order. For example:
15910 * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0
15911 * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1
15912 * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
15913 * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
15914 */
15915 A_UINT32 toeplitz_hash_ipv4_0_3;
15916
15917 /**
15918 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
15919 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
15920 * bytes 4 to 7
15921 */
15922 A_UINT32 toeplitz_hash_ipv4_4_7;
15923
15924 /**
15925 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
15926 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
15927 * bytes 8 to 11
15928 */
15929 A_UINT32 toeplitz_hash_ipv4_8_11;
15930
15931 /**
15932 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
15933 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
15934 * bytes 12 to 15
15935 */
15936 A_UINT32 toeplitz_hash_ipv4_12_15;
15937
15938 /**
15939 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
15940 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
15941 * byte 16
15942 */
15943 A_UINT32 toeplitz_hash_ipv4_16;
15944
15945 /**
15946 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15947 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15948 * bytes 0 to 3
15949 */
15950 A_UINT32 toeplitz_hash_ipv6_0_3;
15951
15952 /**
15953 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15954 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15955 * bytes 4 to 7
15956 */
15957 A_UINT32 toeplitz_hash_ipv6_4_7;
15958
15959 /**
15960 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15961 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15962 * bytes 8 to 11
15963 */
15964 A_UINT32 toeplitz_hash_ipv6_8_11;
15965
15966 /**
15967 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15968 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15969 * bytes 12 to 15
15970 */
15971 A_UINT32 toeplitz_hash_ipv6_12_15;
15972
15973 /**
15974 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15975 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15976 * bytes 16 to 19
15977 */
15978 A_UINT32 toeplitz_hash_ipv6_16_19;
15979
15980 /**
15981 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15982 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15983 * bytes 20 to 22
15984 */
15985 A_UINT32 toeplitz_hash_ipv6_20_23;
15986
15987 /**
15988 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15989 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15990 * bytes 24 to 27
15991 */
15992 A_UINT32 toeplitz_hash_ipv6_24_27;
15993
15994 /**
15995 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15996 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15997 * bytes 28 to 31
15998 */
15999 A_UINT32 toeplitz_hash_ipv6_28_31;
16000
16001 /**
16002 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
16003 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
16004 * bytes 32 to 35
16005 */
16006 A_UINT32 toeplitz_hash_ipv6_32_35;
16007
16008 /**
16009 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
16010 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
16011 * bytes 36 to 39
16012 */
16013 A_UINT32 toeplitz_hash_ipv6_36_39;
16014
16015 /**
16016 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
16017 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
16018 * byte 40
16019 */
16020 A_UINT32 toeplitz_hash_ipv6_40;
16021} wmi_lro_info_cmd_fixed_param;
16022
Nirav Shahbf6450f2015-11-05 11:47:20 +053016023typedef struct {
16024 /*
16025 * TLV tag and len; tag equals
16026 * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param
16027 */
16028 A_UINT32 tlv_header;
16029 /* flash offset to write, starting from 0 */
16030 A_UINT32 offset;
16031 /* vaild data length in buffer, unit: byte */
16032 A_UINT32 length;
16033} wmi_transfer_data_to_flash_cmd_fixed_param;
16034
16035typedef struct {
16036 /*
16037 * TLV tag and len; tag equals
16038 * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param
16039 */
16040 A_UINT32 tlv_header;
16041 /* Return status. 0 for success, non-zero otherwise */
16042 A_UINT32 status;
16043} wmi_transfer_data_to_flash_complete_event_fixed_param;
16044
Pradeep Reddy POTTETI4189bf92016-06-20 14:51:55 +053016045typedef struct {
16046 /*
16047 * TLV tag and len; tag equals
16048 * WMITLV_TAG_STRUC_wmi_read_data_from_flash_cmd_fixed_param
16049 */
16050 A_UINT32 tlv_header;
16051 A_UINT32 offset; /* flash offset to read, starting from 0 */
16052 A_UINT32 length; /* data length to read, unit: byte */
16053} wmi_read_data_from_flash_cmd_fixed_param;
16054
16055typedef struct {
16056 /*
16057 * TLV tag and len; tag equals
16058 * WMITLV_TAG_STRUC_wmi_read_data_from_flash_event_fixed_param
16059 */
16060 A_UINT32 tlv_header;
16061 A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */
16062 A_UINT32 offset; /* flash offset reading from, starting from 0 */
16063 A_UINT32 length; /* length of data being reported, unit: byte */
16064} wmi_read_data_from_flash_event_fixed_param;
16065
Sreelakshmi Konamki58f4d622016-04-14 18:03:21 +053016066typedef enum {
16067 ENHANCED_MCAST_FILTER_DISABLED,
16068 ENHANCED_MCAST_FILTER_ENABLED
16069} ENHANCED_MCAST_FILTER_CONFIG;
16070
16071/*
16072 * Command to enable/disable filtering of multicast IP with unicast mac
16073 */
16074typedef struct {
16075 /*
16076 * TLV tag and len; tag equals
16077 * WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param
16078 */
16079 A_UINT32 tlv_header;
16080 /* Unique id identifying the VDEV */
16081 A_UINT32 vdev_id;
16082 /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */
16083 A_UINT32 enable;
16084} wmi_config_enhanced_mcast_filter_cmd_fixed_param;
16085
Anurag Chouhan05d05fe2016-04-18 17:09:24 +053016086typedef struct {
16087 /*
16088 * TLV tag and len; tag equals
16089 * WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param
16090 */
16091 A_UINT32 tlv_header;
16092 /* unique id identifying the VDEV, generated by the caller */
16093 A_UINT32 vdev_id;
16094 /* WISA enable / disable mode */
16095 A_UINT32 wisa_mode;
16096} wmi_vdev_wisa_cmd_fixed_param;
16097
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -080016098/*
Manikandan Mohan55c94d62015-12-04 13:47:58 -080016099 * This structure is used to report SMPS force mode set complete to host.
16100 */
16101typedef struct {
16102 /* TLV tag and len; tag equals
16103 * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param
16104 */
16105 A_UINT32 tlv_header;
16106 /* Unique id identifying the VDEV */
16107 A_UINT32 vdev_id;
16108 /* Return status. 0 for success, non-zero otherwise */
16109 A_UINT32 status;
16110} wmi_sta_smps_force_mode_complete_event_fixed_param;
16111
16112/*
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -080016113 * This structure is used to report SCPC calibrated data to host.
16114 */
16115typedef struct {
16116 /* TLV tag and len; tag equals
16117 * WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param
16118 */
16119 A_UINT32 tlv_header;
16120 /* number of BDF patches. Each patch contains offset, length and data */
16121 A_UINT32 num_patch;
16122 /* This TLV is followed by another TLV of array of bytes
16123 * A_UINT8 data[];
16124 * This data array contains, for example
16125 * patch1 offset(byte3~0), patch1 data length(byte7~4),
16126 * patch1 data(byte11~8)
16127 * patch2 offset(byte15~12), patch2 data length(byte19~16),
16128 * patch2 data(byte47~20)
16129 */
16130} wmi_scpc_event_fixed_param;
16131
Manikandan Mohan130eb572015-12-23 13:53:34 -080016132/* bpf interface structure */
16133typedef struct wmi_bpf_get_capability_cmd_s {
16134 A_UINT32 tlv_header;
16135 A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */
16136} wmi_bpf_get_capability_cmd_fixed_param;
16137
16138typedef struct wmi_bpf_capability_info_evt_s {
16139 A_UINT32 tlv_header;
16140 A_UINT32 bpf_version; /* fw's implement version */
16141 A_UINT32 max_bpf_filters; /* max filters that fw supports */
16142 A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
16143} wmi_bpf_capability_info_evt_fixed_param;
16144
16145/* bit 0 of flags: report counters */
16146#define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0
16147#define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1
16148typedef struct wmi_bpf_get_vdev_stats_cmd_s {
16149 A_UINT32 tlv_header;
16150 A_UINT32 flags;
16151 A_UINT32 vdev_id;
16152} wmi_bpf_get_vdev_stats_cmd_fixed_param;
16153
16154typedef struct wmi_bpf_vdev_stats_info_evt_s {
16155 A_UINT32 tlv_header;
16156 A_UINT32 vdev_id;
16157 A_UINT32 num_filters;
16158 A_UINT32 num_checked_pkts;
16159 A_UINT32 num_dropped_pkts;
16160 } wmi_bpf_vdev_stats_info_evt_fixed_param;
16161
16162typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
16163 A_UINT32 tlv_header;
16164 A_UINT32 vdev_id;
16165 A_UINT32 filter_id;
16166 A_UINT32 bpf_version; /* host bpf version */
16167 A_UINT32 total_length;
16168 A_UINT32 current_offset;
16169 A_UINT32 current_length;
Manikandan Mohan05ac7ee2015-12-23 14:18:36 -080016170 /*
16171 * The TLV follows:
16172 * A_UINT8 buf_inst[]; //Variable length buffer for the instuctions
16173 */
Manikandan Mohan130eb572015-12-23 13:53:34 -080016174} wmi_bpf_set_vdev_instructions_cmd_fixed_param;
16175
16176#define BPF_FILTER_ID_ALL 0xFFFFFFFF
16177typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
16178 A_UINT32 tlv_header;
16179 A_UINT32 vdev_id;
16180 A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */
16181} wmi_bpf_del_vdev_instructions_cmd_fixed_param;
16182
Govind Singhc7d51942016-02-01 12:09:31 +053016183#define AES_BLOCK_LEN 16 /* in bytes */
16184#define FIPS_KEY_LENGTH_128 16 /* in bytes */
16185#define FIPS_KEY_LENGTH_256 32 /* in bytes */
16186#define FIPS_ENCRYPT_CMD 0
16187#define FIPS_DECRYPT_CMD 1
16188#define FIPS_ENGINE_AES_CTR 0
16189#define FIPS_ENGINE_AES_MIC 1
16190#define FIPS_ERROR_OPER_TIMEOUT 1
16191
16192/* WMI_PDEV_FIPS_CMDID */
16193typedef struct {
16194 /*
16195 * TLV tag and len; tag equals
16196 * WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param
16197 */
16198 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016199 union {
16200 /* OBSOLETE - will be removed once all refs are gone */
16201 A_UINT32 mac_id;
16202 /** pdev_id for identifying the MAC
16203 * See macros starting with WMI_PDEV_ID_ for values.
16204 */
16205 A_UINT32 pdev_id;
16206 };
Govind Singhc7d51942016-02-01 12:09:31 +053016207 A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
16208 /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
16209 A_UINT32 mode;
16210 /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
16211 A_UINT32 key_len;
16212 A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
16213 A_UINT32 data_len; /* data length */
16214 /*
16215 * Following this structure is the TLV:
16216 * A_UINT32 data[1]; - In Data (keep this in the end)
16217 */
16218} wmi_pdev_fips_cmd_fixed_param;
16219
16220typedef struct {
16221 /*
16222 * TLV tag and len; tag equals
16223 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param
16224 */
16225 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016226 union {
16227 /* OBSOLETE - will be removed once all refs are gone */
16228 A_UINT32 mac_id;
16229 /** pdev_id for identifying the MAC
16230 * See macros starting with WMI_PDEV_ID_ for values.
16231 */
16232 A_UINT32 pdev_id;
16233 };
Govind Singhc7d51942016-02-01 12:09:31 +053016234 A_UINT32 enable; /* 1:enable, 0:disable */
16235 /* 1:GPIO parallel mode, 0:GPIO serial mode */
16236 A_UINT32 mode;
16237 A_UINT32 rx_antenna; /* rx antenna */
16238 A_UINT32 tx_default_antenna; /* tx default antenna */
16239 /*
16240 * Following this structure is the TLV:
16241 * wmi_pdev_smart_ant_gpio_handle
16242 */
16243} wmi_pdev_smart_ant_enable_cmd_fixed_param;
16244
16245/** GPIO pins/function values to control antennas */
16246typedef struct {
16247 /*
16248 * TLV tag and len; tag equals
16249 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle
16250 */
16251 A_UINT32 tlv_header;
16252 /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
16253 A_UINT32 gpio_pin;
16254 A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */
Govind Singh869c9872016-02-22 18:36:34 +053016255 /** pdev_id for identifying the MAC
16256 * See macros starting with WMI_PDEV_ID_ for values.
16257 */
16258 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053016259} wmi_pdev_smart_ant_gpio_handle;
16260
16261typedef struct {
16262 /*
16263 * TLV tag and len; tag equals
16264 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param
16265 */
16266 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016267 union {
16268 /* OBSOLETE - will be removed once all refs are gone */
16269 A_UINT32 mac_id;
16270 /** pdev_id for identifying the MAC
16271 * See macros starting with WMI_PDEV_ID_ for values.
16272 */
16273 A_UINT32 pdev_id;
16274 };
Govind Singhc7d51942016-02-01 12:09:31 +053016275 A_UINT32 rx_antenna;
16276} wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
16277
16278typedef struct {
16279 /*
16280 * TLV tag and len; tag equals
16281 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param
16282 */
16283 A_UINT32 tlv_header;
16284 /** unique id identifying the vdev, generated by the caller */
Govind Singh869c9872016-02-22 18:36:34 +053016285 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053016286 /** peer MAC address */
16287 wmi_mac_addr peer_macaddr;
16288 /*
16289 * Following this structure is the TLV:
16290 * wmi_peer_smart_ant_set_tx_antenna_series
16291 */
16292} wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
16293
16294typedef struct {
16295 /*
16296 * TLV tag and len; tag equals
16297 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series
16298 */
16299 A_UINT32 tlv_header;
16300 /* antenna array */
16301 A_UINT32 antenna_series;
16302} wmi_peer_smart_ant_set_tx_antenna_series;
16303
16304typedef struct {
16305 /*
16306 * TLV tag and len; tag equals
16307 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param
16308 */
16309 A_UINT32 tlv_header;
16310 /* rate array */
16311 A_UINT32 train_rate_series;
16312 /* antenna array */
16313 A_UINT32 train_antenna_series;
16314 /* Rate flags */
16315 /* TODO: For future use? */
16316 A_UINT32 rc_flags;
16317} wmi_peer_smart_ant_set_train_antenna_param;
16318
16319typedef struct {
16320 /*
16321 * TLV tag and len; tag equals
16322 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param
16323 */
16324 A_UINT32 tlv_header;
16325 /** unique id identifying the VDEV, generated by the caller */
Govind Singh869c9872016-02-22 18:36:34 +053016326 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053016327 /** peer MAC address */
16328 wmi_mac_addr peer_macaddr;
16329 /* num packets; 0-stop training */
16330 A_UINT32 num_pkts;
16331 /*
16332 * Following this structure is the TLV:
16333 * wmi_peer_smart_ant_set_train_antenna_param
16334 */
16335} wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
16336
16337typedef struct {
16338 /*
16339 * TLV tag and len; tag equals
16340 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param
16341 */
16342 A_UINT32 tlv_header;
16343 /** unique id identifying the vdev, generated by the caller */
Govind Singh869c9872016-02-22 18:36:34 +053016344 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053016345 /** peer MAC address */
16346 wmi_mac_addr peer_macaddr;
16347 /* command id*/
16348 A_UINT32 cmd_id;
16349 /* number of arguments passed */
16350 A_UINT32 args_count;
16351 /*
16352 * Following this structure is the TLV:
16353 * A_UINT32 args[]; // argument list
16354 */
16355} wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
16356
16357typedef struct {
16358 /*
16359 * TLV tag and len; tag equals
16360 * WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain
16361 */
16362 A_UINT32 tlv_header;
16363 A_UINT32 antCtrlChain;
Govind Singh869c9872016-02-22 18:36:34 +053016364 /** pdev_id for identifying the MAC
16365 * See macros starting with WMI_PDEV_ID_ for values.
16366 */
16367 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053016368} wmi_pdev_set_ant_ctrl_chain;
16369
16370typedef struct {
16371 /*
16372 * TLV tag and len; tag equals
16373 * WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param
16374 */
16375 A_UINT32 tlv_header;
16376 A_UINT32 mac_id; /* MAC ID */
16377 A_UINT32 antCtrlCommon1;
16378 A_UINT32 antCtrlCommon2;
16379 /*
16380 * Following this structure is the TLV:
16381 * wmi_pdev_set_ant_ctrl_chain
16382 */
16383} wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
16384
16385typedef struct {
16386 /* TLV tag and len; tag equals
16387 * WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param
16388 */
16389 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016390 union {
16391 /* OBSOLETE - will be removed once all refs are gone */
16392 A_UINT32 mac_id;
16393 /** pdev_id for identifying the MAC
16394 * See macros starting with WMI_PDEV_ID_ for values.
16395 */
16396 A_UINT32 pdev_id;
16397 };
Govind Singhc7d51942016-02-01 12:09:31 +053016398 /** len of CTL info */
16399 A_UINT32 ctl_len;
16400 /* ctl array (len adjusted to number of words)
16401 * Following this structure is the TLV:
16402 * A_UINT32 ctl_info[1];
16403 */
16404} wmi_pdev_set_ctl_table_cmd_fixed_param;
16405
16406typedef struct {
16407 /*
16408 * TLV tag and len; tag equals
16409 * WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param
16410 */
16411 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016412 union {
16413 /* OBSOLETE - will be removed once all refs are gone */
16414 A_UINT32 mac_id;
16415 /** pdev_id for identifying the MAC
16416 * See macros starting with WMI_PDEV_ID_ for values.
16417 */
16418 A_UINT32 pdev_id;
16419 };
Govind Singhc7d51942016-02-01 12:09:31 +053016420 A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
16421 /*
16422 * Bit 7:0 len of array gain table
16423 * Bit 8 bypass multi chain gain or not
16424 */
16425 /*
16426 * array gain table(s) (len adjusted to number of words).
16427 * Following this structure is the TLV:
16428 * A_UINT32 arraygain_tbl[1];
16429 */
16430} wmi_pdev_set_mimogain_table_cmd_fixed_param;
16431
16432#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
16433#define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
16434#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_ARRAY_GAIN_LEN)
16435#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_ARRAY_GAIN_LEN)
16436
16437#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
16438#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
16439#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
16440#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
16441
16442
16443typedef struct {
16444 /*
16445 * TLV tag and len; tag equals
16446 * WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param
16447 */
16448 A_UINT32 tlv_header;
16449 /** parameter id */
16450 A_UINT32 param_id;
16451 /** parameter value */
16452 A_UINT32 param_value;
16453} wmi_fwtest_set_param_cmd_fixed_param;
16454
16455/* Expressed in 1 part in 1000 (permille) */
16456#define WMI_ATF_DENOMINATION 1000
16457
Nitesh Shah0f933b82016-07-20 16:05:03 +053016458#define WMI_ATF_SSID_FAIR_SCHED 0 /** Fair ATF scheduling for vdev */
16459#define WMI_ATF_SSID_STRICT_SCHED 1 /** Strict ATF scheduling for vdev */
16460
Govind Singhc7d51942016-02-01 12:09:31 +053016461typedef struct {
16462 /*
16463 * TLV tag and len; tag equals
16464 * WMITLV_TAG_STRUC_wmi_atf_peer_info
16465 */
16466 A_UINT32 tlv_header;
16467 wmi_mac_addr peer_macaddr;
16468 A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
16469 A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
16470 /* Peer congestion threshold for future use */
16471 A_UINT32 atf_units_reserved;
16472} wmi_atf_peer_info;
16473
16474typedef struct {
16475 /*
16476 * TLV tag and len; tag equals
16477 * WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param
16478 */
16479 A_UINT32 tlv_header;
16480 A_UINT32 num_peers;
16481 /*
16482 * Following this structure is the TLV:
Himanshu Agarwal134b7362016-05-13 20:30:12 +053016483 * struct wmi_atf_peer_info peer_info[num_peers];
Govind Singhc7d51942016-02-01 12:09:31 +053016484 */
16485} wmi_peer_atf_request_fixed_param;
16486
Himanshu Agarwal134b7362016-05-13 20:30:12 +053016487/* Structure for Bandwidth Fairness peer information */
16488typedef struct {
16489 /*
16490 * TLV tag and len; tag equals
16491 * WMITLV_TAG_STRUC_wmi_bwf_peer_info
16492 */
16493 A_UINT32 tlv_header;
16494 wmi_mac_addr peer_macaddr;
16495 /* BWF guaranteed_bandwidth for the peers in mbps */
16496 A_UINT32 bwf_guaranteed_bandwidth;
16497 /*
16498 * BWF Maximum airtime percentage that can be allocated
16499 * to the peer to meet the guaranteed_bandwidth
16500 */
16501 A_UINT32 bwf_max_airtime;
16502 /* BWF priority of the peer to allocate the tokens dynamically */
16503 A_UINT32 bwf_peer_priority;
16504} wmi_bwf_peer_info;
16505
16506/* Structure for Bandwidth Fairness peer request */
16507typedef struct {
16508 /*
16509 * TLV tag and len; tag equals
16510 * WMITLV_TAG_STRUC_wmi_peer_bwf_request_fixed_param
16511 */
16512 A_UINT32 tlv_header;
16513 A_UINT32 num_peers;
16514 /*
16515 * Following this structure is the TLV:
16516 * struct wmi_bwf_peer_info peer_info[num_peers];
16517 */
16518} wmi_peer_bwf_request_fixed_param;
16519
16520
Govind Singhc7d51942016-02-01 12:09:31 +053016521/* Equal distribution of ATF air time within an VDEV. */
16522typedef struct {
16523 /*
16524 * TLV tag and len; tag equals
16525 * WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param
16526 */
16527 A_UINT32 tlv_header;
16528 A_UINT32 vdev_id;
16529 A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
16530} wmi_vdev_atf_request_fixed_param;
16531
16532typedef struct {
16533 /*
16534 * TLV tag and len; tag equals
16535 * WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param
16536 */
16537 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016538 /** pdev_id for identifying the MAC
16539 * See macros starting with WMI_PDEV_ID_ for values.
16540 */
16541 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053016542 /** parameter */
16543 A_UINT32 param;
16544} wmi_pdev_get_ani_cck_config_cmd_fixed_param;
16545
16546typedef struct {
16547 /*
16548 * TLV tag and len; tag equals
16549 * WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param
16550 */
16551 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016552 /** pdev_id for identifying the MAC
16553 * See macros starting with WMI_PDEV_ID_ for values.
16554 */
16555 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053016556 /** parameter */
16557 A_UINT32 param;
16558} wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
16559
16560typedef struct {
16561 /*
16562 * TLV tag and len; tag equals
16563 * WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param
16564 */
16565 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016566 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053016567 A_UINT32 qb_enable;
16568 wmi_mac_addr peer_macaddr;
16569} WMI_QBOOST_CFG_CMD_fixed_param;
16570
16571#define WMI_INST_STATS_INVALID_RSSI 0
16572
16573typedef struct {
16574 /*
16575 * TLV tag and len; tag equals
16576 * WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param
16577 */
16578 A_UINT32 tlv_header;
16579 A_UINT32 iRSSI; /* dBm above the noise floor */
16580 /* peer MAC address */
16581 wmi_mac_addr peer_macaddr;
Govind Singh869c9872016-02-22 18:36:34 +053016582 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053016583} wmi_inst_rssi_stats_resp_fixed_param;
16584
16585typedef struct {
16586 /*
16587 * TLV tag and len; tag equals
16588 * WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info
16589 */
16590 A_UINT32 tlv_header;
16591 A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
16592} wmi_peer_cck_ofdm_rate_info;
16593
16594typedef struct {
16595 /*
16596 * TLV tag and len; tag equals
16597 * WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info
16598 */
16599 A_UINT32 tlv_header;
16600 A_UINT32 ratecode_20; /* Rate code for 20MHz BW */
16601 A_UINT32 ratecode_40; /* Rate code for 40MHz BW */
16602 A_UINT32 ratecode_80; /* Rate code for 80MHz BW */
16603} wmi_peer_mcs_rate_info;
16604
16605typedef struct {
16606 /*
16607 * TLV tag and len; tag equals
16608 * WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param
16609 */
16610 A_UINT32 tlv_header;
16611 wmi_mac_addr peer_macaddr;
16612 A_UINT32 ratecount; /* Max Rate count for each mode */
Govind Singh869c9872016-02-22 18:36:34 +053016613 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053016614 /*
16615 * Following this structure are the TLV
16616 * struct wmi_peer_cck_ofdm_rate_info;
16617 * struct wmi_peer_mcs_rate_info;
16618 */
16619} wmi_peer_ratecode_list_event_fixed_param;
16620
16621typedef struct wmi_wds_addr_event {
16622 /*
16623 * TLV tag and len; tag equals
16624 * WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param
16625 */
16626 A_UINT32 tlv_header;
16627 A_UINT32 event_type[4];
16628 wmi_mac_addr peer_mac;
16629 wmi_mac_addr dest_mac;
Govind Singh869c9872016-02-22 18:36:34 +053016630 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053016631} wmi_wds_addr_event_fixed_param;
16632
16633typedef struct {
16634 /*
16635 * TLV tag and len; tag equals
16636 * WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param
16637 */
16638 A_UINT32 tlv_header;
16639 wmi_mac_addr peer_macaddr;
16640 A_UINT32 peer_ps_state;
16641} wmi_peer_sta_ps_statechange_event_fixed_param;
16642
16643/* WMI_PDEV_FIPS_EVENTID */
16644typedef struct {
16645 /*
16646 * TLV tag and len; tag equals
16647 * WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param
16648 */
16649 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016650 union {
16651 /* OBSOLETE - will be removed once all refs are gone */
16652 A_UINT32 mac_id;
16653 /** pdev_id for identifying the MAC
16654 * See macros starting with WMI_PDEV_ID_ for values.
16655 */
16656 A_UINT32 pdev_id;
16657 };
Govind Singhc7d51942016-02-01 12:09:31 +053016658 /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
16659 A_UINT32 error_status;
16660 A_UINT32 data_len; /* Data length */
16661 /*
16662 * Following this structure is the TLV:
16663 * A_UINT32 data[1]; // Out Data (keep this in the end)
16664 */
16665} wmi_pdev_fips_event_fixed_param;
16666
16667typedef struct {
16668 /*
16669 * TLV tag and len; tag equals
16670 * WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param
16671 */
16672 A_UINT32 tlv_header;
16673 A_UINT32 mac_id; /* MAC ID */
16674 /* Noise threshold iterations with high values */
16675 A_UINT32 noise_floor_report_iter;
16676 /* Total noise threshold iterations */
16677 A_UINT32 noise_floor_total_iter;
16678} wmi_pdev_channel_hopping_event_fixed_param;
16679
16680enum {
16681 WMI_PDEV_RESERVE_AST_ENTRY_OK,
16682 WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
16683 WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
16684};
16685
16686typedef struct {
16687 /*
16688 * TLV tag and len; tag equals
16689 * WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param
16690 */
16691 A_UINT32 tlv_header;
16692 A_UINT32 mac_id; /* MAC ID */
16693 A_UINT32 rate_flags;
16694 /**
16695 * FLAG_ONE_CHAIN 0x001 - one chain mask
16696 * FLAG_TWO_CHAIN 0x005 - two chain mask
16697 * FLAG_THREE_CHAIN 0x007 - three chain mask
16698 * FLAG_FOUR_CHAIN 0x00F - four chain mask
16699 * FLAG_STBC 0x010 - STBC is set
16700 * FLAG_40MHZ 0x020
16701 * FLAG_80MHZ 0x040
16702 * FLAG_160MHZ 0x080
16703 * FLAG_TXBF 0x0100 - Tx Bf enabled
16704 * FLAG_RTSENA 0x0200 - RTS enabled
16705 * FLAG_CTSENA 0x0400 - CTS enabled
16706 * FLAG_LDPC 0x0800 - LDPC set
16707 * FLAG_SERIES1 0x1000 -
16708 * FLAG_SGI 0x2000 - Short gaurd interval
16709 * FLAG_MU2 0x4000 - MU2 data
16710 * FLAG_MU3 0x8000 - MU3 data
16711 * */
16712 A_UINT32 nss;
16713 /**
16714 * NSS 0x0 - 0x3
16715 * */
16716 A_UINT32 preamble;
16717 /**
16718 * PREAM_OFDM - 0x0
16719 * PREAM_CCK - 0x1
16720 * PREAM_HT - 0x2
16721 * PREAM_VHT - 0x3
16722 * */
16723 A_UINT32 hw_rate;
16724 /**
16725 * *** HW_OFDM_RATE ***
16726 * OFDM_48_MBPS - 0x0
16727 * OFDM_24_MBPS - 0x1
16728 * OFDM_12_MBPS - 0x2
16729 * OFDM_6_MBPS - 0x3
16730 * OFDM_54_MBPS - 0x4
16731 * OFDM_36_MBPS - 0x5
16732 * OFDM_18_MBPS - 0x6
16733 * OFDM_9_MBPS - 0x7
16734 *
16735 * *** HW_CCK_RATE ***
16736 * CCK_11_LONG_MBPS - 0x0
16737 * CCK_5_5_LONG_MBPS - 0x1
16738 * CCK_2_LONG_MBPS - 0x2
16739 * CCK_1_LONG_MBPS - 0x3
16740 * CCK_11_SHORT_MBPS - 0x4
16741 * CCK_5_5_SHORT_MBPS - 0x5
16742 * CCK_2_SHORT_MBPS - 0x6
16743 *
16744 * *** HW_HT / VHT_RATE ***
16745 * MCS 0x0 - 0x9
16746 * */
16747} wmi_pdev_get_tpc_cmd_fixed_param;
16748
16749typedef struct {
Anurag Chouhane326c922016-08-04 18:43:19 +053016750 A_UINT32 tlv_header; /* TLV tag and len; tag equals
16751 WMITLV_TAG_STRUC_wmi_pdev_get_chip_power_stats_cmd_fixed_param */
16752 /**
16753 * pdev_id for identifying the MAC See macros
16754 * starting with WMI_PDEV_ID_ for values.
16755 */
16756 A_UINT32 pdev_id;
16757} wmi_pdev_get_chip_power_stats_cmd_fixed_param;
16758
16759
16760typedef struct {
Govind Singhc7d51942016-02-01 12:09:31 +053016761 /*
16762 * TLV tag and len; tag equals
16763 * WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param
16764 */
16765 A_UINT32 tlv_header;
16766 A_UINT32 reserved0; /* for future need */
16767 /*
16768 * Following this structure is the TLV:
16769 * A_UINT32 tpc[1];
16770 */
16771} wmi_pdev_tpc_event_fixed_param;
16772
16773typedef struct {
16774 /*
16775 * TLV tag and len; tag equals
16776 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param
16777 */
16778 A_UINT32 tlv_header;
16779 A_UINT32 mac_id; /* MAC ID */
16780 A_UINT32 nfdBr_len;
16781 A_UINT32 nfdBm_len;
16782 A_UINT32 freqNum_len;
16783 /*
16784 * Following this structure is the TLV:
16785 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
16786 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
16787 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
16788 */
16789} wmi_pdev_nfcal_power_all_channels_event_fixed_param;
16790
16791typedef struct {
16792 /*
16793 * TLV tag and len; tag equals
16794 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr
16795 */
16796 A_UINT32 tlv_header;
16797 A_UINT32 nfdBr;
16798} wmi_pdev_nfcal_power_all_channels_nfdBr;
16799
16800typedef struct {
16801 /*
16802 * TLV tag and len; tag equals
16803 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm
16804 */
16805 A_UINT32 tlv_header;
16806 A_UINT32 nfdBm;
16807} wmi_pdev_nfcal_power_all_channels_nfdBm;
16808
16809typedef struct {
16810 /*
16811 * TLV tag and len; tag equals
16812 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum
16813 */
16814 A_UINT32 tlv_header;
16815 A_UINT32 freqNum;
16816} wmi_pdev_nfcal_power_all_channels_freqNum;
16817
16818typedef struct {
16819 /*
16820 * TLV tag and len; tag equals
16821 * WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param
16822 */
16823 A_UINT32 tlv_header;
16824 A_UINT32 cck_level;
16825} wmi_ani_cck_event_fixed_param;
16826
Anurag Chouhane326c922016-08-04 18:43:19 +053016827typedef enum wmi_power_debug_reg_fmt_type {
16828 /* WMI_POWER_DEBUG_REG_FMT_TYPE_ROME -> Dumps following 12 Registers
16829 * SOC_SYSTEM_SLEEP
16830 * WLAN_SYSTEM_SLEEP
16831 * RTC_SYNC_FORCE_WAKE
16832 * MAC_DMA_ISR
16833 * MAC_DMA_TXRX_ISR
16834 * MAC_DMA_ISR_S1
16835 * MAC_DMA_ISR_S2
16836 * MAC_DMA_ISR_S3
16837 * MAC_DMA_ISR_S4
16838 * MAC_DMA_ISR_S5
16839 * MAC_DMA_ISR_S6
16840 * MAC_DMA_ISR_S7
16841 */
16842 WMI_POWER_DEBUG_REG_FMT_TYPE_ROME,
16843 WMI_POWER_DEBUG_REG_FMT_TYPE_MAX = 0xf,
16844} WMI_POWER_DEBUG_REG_FMT_TYPE;
16845
16846typedef struct {
16847 A_UINT32 tlv_header; /* TLV tag and len; tag equals
16848 WMITLV_TAG_STRUC_wmi_chip_power_stats_event_fixed_param */
16849 /*
16850 * maximum range is 35 hours, due to conversion from internal
16851 * 0.03215 ms units to ms
16852 */
16853 A_UINT32 cumulative_sleep_time_ms;
16854 /*
16855 * maximum range is 35 hours, due to conversion from internal
16856 * 0.03215 ms units to ms
16857 */
16858 A_UINT32 cumulative_total_on_time_ms;
16859 /* count of number of times chip enterred deep sleep */
16860 A_UINT32 deep_sleep_enter_counter;
16861 /* Last Timestamp when Chip went to deep sleep */
16862 A_UINT32 last_deep_sleep_enter_tstamp_ms;
16863 /*
16864 * WMI_POWER_DEBUG_REG_FMT_TYPE enum, describes debug registers
16865 * being dumped as part of the event
16866 */
16867 A_UINT32 debug_register_fmt;
16868 /* number of debug registers being sent to host */
16869 A_UINT32 num_debug_register;
16870 /*
16871 * Following this structure is the TLV:
16872 * A_UINT32 debug_registers[num_debug_registers];
16873 */
16874} wmi_pdev_chip_power_stats_event_fixed_param;
16875
16876
Govind Singhc7d51942016-02-01 12:09:31 +053016877typedef struct {
16878 /*
16879 * TLV tag and len; tag equals
16880 * WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param
16881 */
16882 A_UINT32 tlv_header;
16883 A_UINT32 ofdm_level;
16884} wmi_ani_ofdm_event_fixed_param;
16885
Sreelakshmi Konamki02a4d7c2016-04-14 17:46:54 +053016886typedef enum wmi_coex_config_type {
16887 /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */
16888 WMI_COEX_CONFIG_PAGE_P2P_TDM = 1,
16889 /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */
16890 WMI_COEX_CONFIG_PAGE_STA_TDM = 2,
16891 /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */
16892 WMI_COEX_CONFIG_PAGE_SAP_TDM = 3,
Himanshu Agarwal800d58d2016-05-13 21:22:19 +053016893 /* config during WLAN connection */
16894 WMI_COEX_CONFIG_DURING_WLAN_CONN = 4,
16895 /* config to enable/disable BTC */
16896 WMI_COEX_CONFIG_BTC_ENABLE = 5,
Himanshu Agarwalb4e1a492016-09-13 22:42:27 +053016897 /* config of COEX debug setting */
16898 WMI_COEX_CONFIG_COEX_DBG = 6,
Sreelakshmi Konamki02a4d7c2016-04-14 17:46:54 +053016899} WMI_COEX_CONFIG_TYPE;
16900
16901typedef struct {
16902 A_UINT32 tlv_header;
16903 A_UINT32 vdev_id;
16904 /* wmi_coex_config_type enum */
16905 A_UINT32 config_type;
16906 A_UINT32 config_arg1;
16907 A_UINT32 config_arg2;
16908} WMI_COEX_CONFIG_CMD_fixed_param;
16909
Sandeep Puligillaff55fec2016-03-09 12:54:23 -080016910/**
16911 * This command is sent from WLAN host driver to firmware to
16912 * request firmware to enable/disable channel avoidance report
16913 * to host.
16914 */
16915enum {
16916 WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0,
16917 WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1
16918};
16919
16920typedef struct {
16921 /*
16922 * TLV tag and len; tag equals
16923 * WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param
16924 */
16925 A_UINT32 tlv_header;
16926 /* Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */
16927 A_UINT32 rpt_allow;
16928} WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param;
16929
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +053016930/*
16931 * Periodic channel stats WMI command structure
16932 * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID
16933 */
16934typedef struct {
16935 /*
16936 * TLV tag and len; tag equals
16937 * WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param
16938 */
16939 A_UINT32 tlv_header;
16940 /** 1 = enable, 0 = disable */
16941 A_UINT32 enable;
16942 /** periodic stats duration (units are milliseconds) */
16943 A_UINT32 stats_period;
16944} wmi_set_periodic_channel_stats_config_fixed_param;
16945
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +053016946typedef struct {
16947 /*
16948 * TLV tag and len; tag equals
16949 * WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param
16950 */
16951 A_UINT32 tlv_header;
16952 /*
16953 * pdev_id for identifying the MAC
16954 * See macros starting with WMI_PDEV_ID_ for values.
16955 */
16956 A_UINT32 pdev_id;
16957 /* Identify the wlan module */
16958 A_UINT32 module_id;
16959 /* Num of elements in the following args[] array */
16960 A_UINT32 num_args;
16961/**
16962 * Following this structure are the TLVs:
16963 * A_UINT32 args[];
16964 **/
16965} wmi_pdev_wal_power_debug_cmd_fixed_param;
16966
Nitesh Shah5de1cf82016-06-29 20:13:17 +053016967typedef struct {
16968 /*
16969 * TLV tag and len; tag equals
16970 * WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param
16971 */
16972 A_UINT32 tlv_header;
16973 /**
16974 * @brief rx_timeout_pri - what rx reorder timeout (ms) to use
16975 * for the AC
16976 * @details
16977 * Each WMM access category (voice, video, best-effort,
16978 * background) will have its own timeout value to dictate
16979 * how long to wait for missing rx MPDUs to arrive before
16980 * releasing subsequent MPDUs that have already been
16981 * received.
16982 * This parameter specifies the timeout in milliseconds
16983 * for each access category.
16984 * The array elements are indexed by the WMI_AC enum to
16985 * identify which array element corresponds to which AC /
16986 * traffic type.
16987 */
16988 A_UINT32 rx_timeout_pri[WMI_AC_MAX];
16989} wmi_pdev_set_reorder_timeout_val_cmd_fixed_param;
16990
Manjeet Singh27aa9c12016-08-24 15:38:42 +053016991/**
16992 * wlan stats shall be understood as per period.
16993 * Generally, it is reported periodically based on the period specified by host.
16994 * But if the variation of one stats of compared to the
16995 * pervious notification exceeds a threshold,
16996 * FW will report the wlan stats immediately.
16997 * The values of the stats becomes the new reference to compute variations.
16998 * This threshold can be a global setting or per category.
16999 * Host can enable/disable the mechanism for any stats per bitmap.
17000 * TX/RX thresholds (percentage value) are shared across ACs,
17001 * and TX/RX stats comprisons are processed per AC of each peer.
17002 * For example, if bit 0 (stand for tx_mpdus) of tx_thresh_bitmap is set to 1,
17003 * and the detailed tx_mpdus threshold value is set to 10%,
17004 * suppose tx_mpdus value of BE of peer 0 is 100 in first period,
17005 * and it reaches 110 during the second period,
17006 * FW will generate and send out a wlan stats event immediately.
17007 */
17008typedef struct {
17009 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_stats_threshold_cmd_fixed_param */
17010 /** Indicate if threshold mechnism is enabled or disabled.
17011 * It is disabled by default.
17012 * Host can enable and disable it dynamically.
17013 */
17014 A_UINT32 enable_thresh;
17015 /** use_thresh_bitmap equals 0 means gbl_thresh is used.
17016 * when use_thresh_bitmap equals 1, ignore gbl_thresh and use stats bitmap indicated thresholds.
17017 */
17018 A_UINT32 use_thresh_bitmap;
17019 /** global threshold, valid when use_thresh_bitmap equals 0.
17020 * It takes effect for all counters.
17021 * If use_thresh_bitmap ==0 && gbl_thresh == 0, disable threshold mechanism.
17022 */
17023 A_UINT32 gbl_thresh;
17024 /** Enable/disable bitmap for threshold mechanism of CCA stats */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +053017025 A_UINT32 cca_thresh_enable_bitmap;
Manjeet Singh27aa9c12016-08-24 15:38:42 +053017026 /** Enable/disable bitmap for threshold mechanism of signal stats */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +053017027 A_UINT32 signal_thresh_enable_bitmap;
Manjeet Singh27aa9c12016-08-24 15:38:42 +053017028 /** Enable/disable bitmap for threshold mechanism of TX stats */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +053017029 A_UINT32 tx_thresh_enable_bitmap;
Manjeet Singh27aa9c12016-08-24 15:38:42 +053017030 /** Enable/disable bitmap for threshold mechanism of RX stats */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +053017031 A_UINT32 rx_thresh_enable_bitmap;
Manjeet Singh27aa9c12016-08-24 15:38:42 +053017032 /* This TLV is followed by TLVs below:
17033 * wmi_chan_cca_stats_thresh cca_thresh;
17034 * wmi_peer_signal_stats_thresh signal_thresh;
17035 * wmi_tx_stats_thresh tx_thresh;
17036 * wmi_rx_stats_thresh rx_thresh;
17037 */
17038} wmi_pdev_set_stats_threshold_cmd_fixed_param;
17039
17040typedef enum {
17041 WMI_REQUEST_WLAN_TX_STAT = 0x01,
17042 WMI_REQUEST_WLAN_RX_STAT = 0x02,
17043 WMI_REQUEST_WLAN_CCA_STAT = 0x04,
17044 WMI_REQUEST_WLAN_SIGNAL_STAT = 0x08,
17045} wmi_wlan_stats_id;
17046
17047typedef struct {
17048 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlan_stats_cmd_fixed_param */
17049 wmi_wlan_stats_id stats_id;
17050} wmi_request_wlan_stats_cmd_fixed_param;
17051
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053017052typedef enum {
17053 WLAN_2G_CAPABILITY = 0x1,
17054 WLAN_5G_CAPABILITY = 0x2,
17055} WLAN_BAND_CAPABILITY;
17056
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053017057typedef enum wmi_hw_mode_config_type {
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053017058 /* Only one PHY is active. */
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053017059 WMI_HW_MODE_SINGLE = 0,
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053017060 /**
17061 * Both PHYs are active in different bands, one in 2G
17062 * and another in 5G.
17063 */
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053017064 WMI_HW_MODE_DBS = 1,
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053017065 /**
17066 * Both PHYs are in passive mode (only rx) in same band;
17067 * no tx allowed.
17068 */
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053017069 WMI_HW_MODE_SBS_PASSIVE = 2,
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053017070 /**
17071 * Both PHYs are active in the same band.
17072 * Support for both PHYs within one band is planned for 5G only
17073 * (as indicated in WMI_MAC_PHY_CAPABILITIES),
17074 * but could be extended to other bands in the future.
17075 * The separation of the band between the two PHYs needs to be
17076 * communicated separately.
17077 */
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053017078 WMI_HW_MODE_SBS = 3,
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053017079 /**
17080 * 3 PHYs, with 2 on the same band doing SBS
17081 * as in WMI_HW_MODE_SBS, and 3rd on the other band
17082 */
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053017083 WMI_HW_MODE_DBS_SBS = 4,
17084} WMI_HW_MODE_CONFIG_TYPE;
17085
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053017086#define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1)
17087#define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
17088
17089#define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1)
17090#define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
17091
17092#define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1)
17093#define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
17094
17095#define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1)
17096#define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
17097
17098#define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1)
17099#define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
17100
17101#define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1)
17102#define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
17103
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053017104#define WMI_MAX_MUBFEE_GET(flags) WMI_GET_BITS(flags, 28, 4)
17105#define WMI_MAX_MUBFEE_SET(flags, value) WMI_SET_BITS(flags, 28, 4, value)
17106
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053017107typedef struct {
17108 /*
17109 * TLV tag and len; tag equals
17110 * WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES
17111 */
17112 A_UINT32 tlv_header;
17113 /*
17114 * hw_mode_id - identify a particular set of HW characteristics, as
17115 * specified by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element
17116 * must be mapped to its parent WMI_HW_MODE_CAPABILITIES element using
17117 * hw_mode_id. No particular ordering of WMI_MAC_PHY_CAPABILITIES
17118 * elements should be assumed, though in practice the elements may
17119 * always be ordered by hw_mode_id
17120 */
17121 A_UINT32 hw_mode_id;
17122 /*
17123 * pdev_id starts with 1. pdev_id 1 => phy_id 0,
17124 * pdev_id 2 => phy_id 1
17125 */
17126 A_UINT32 pdev_id;
17127 /* phy id. Starts with 0 */
17128 A_UINT32 phy_id;
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053017129 /* supported modulations and number of MU beamformees */
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053017130 union {
Himanshu Agarwale93c55e2016-05-20 12:18:15 +053017131 struct {
17132 A_UINT32 supports_11b:1,
17133 supports_11g:1,
17134 supports_11a:1,
17135 supports_11n:1,
17136 supports_11ac:1,
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053017137 supports_11ax:1,
17138
17139 unused:22,
17140
17141 /* max MU beamformees supported per MAC */
17142 max_mubfee:4;
Himanshu Agarwale93c55e2016-05-20 12:18:15 +053017143 };
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053017144 A_UINT32 supported_flags;
17145 };
17146 /* supported bands, enum WLAN_BAND_CAPABILITY */
17147 A_UINT32 supported_bands;
17148 /*
17149 * ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us,
17150 * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us
17151 */
17152 A_UINT32 ampdu_density;
17153 /* max bw supported 2G, enum wmi_channel_width */
17154 A_UINT32 max_bw_supported_2G;
17155 /* WMI HT Capability, WMI_HT_CAP defines */
17156 A_UINT32 ht_cap_info_2G;
17157 /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
17158 A_UINT32 vht_cap_info_2G;
17159 /*
17160 * VHT Supported MCS Set field Rx/Tx same
17161 * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as
17162 * follows
17163 * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
17164 * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
17165 * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
17166 * - 3 indicates that n spatial streams is not supported
17167 */
17168 A_UINT32 vht_supp_mcs_2G;
17169 /* HE capability info field of 802.11ax, WMI_HE_CAP defines */
17170 A_UINT32 he_cap_info_2G;
17171 /* HE Supported MCS Set field Rx/Tx same */
17172 A_UINT32 he_supp_mcs_2G;
17173 /* Valid Transmit chain mask */
17174 A_UINT32 tx_chain_mask_2G;
17175 /* Valid Receive chain mask */
17176 A_UINT32 rx_chain_mask_2G;
17177 /* max bw supported 5G, enum wmi_channel_width */
17178 A_UINT32 max_bw_supported_5G;
17179 /* WMI HT Capability, WMI_HT_CAP defines */
17180 A_UINT32 ht_cap_info_5G;
17181 /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
17182 A_UINT32 vht_cap_info_5G;
17183 /*
17184 * VHT Supported MCS Set field Rx/Tx same
17185 * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as
17186 * follows
17187 * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
17188 * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
17189 * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
17190 * - 3 indicates that n spatial streams is not supported
17191 */
17192 A_UINT32 vht_supp_mcs_5G;
17193 /* HE capability info field of 802.11ax, WMI_HE_CAP defines */
17194 A_UINT32 he_cap_info_5G;
17195 /* HE Supported MCS Set field Rx/Tx same */
17196 A_UINT32 he_supp_mcs_5G;
17197 /* Valid Transmit chain mask */
17198 A_UINT32 tx_chain_mask_5G;
17199 /* Valid Receive chain mask */
17200 A_UINT32 rx_chain_mask_5G;
Himanshu Agarwal97005de2016-09-09 12:46:04 +053017201 /* HE capability phy field of 802.11ax, WMI_HE_CAP defines */
17202 A_UINT32 he_cap_phy_info_2G[WMI_MAX_HECAP_PHY_SIZE];
17203 A_UINT32 he_cap_phy_info_5G[WMI_MAX_HECAP_PHY_SIZE];
17204 wmi_ppe_threshold he_ppet2G;
17205 wmi_ppe_threshold he_ppet5G;
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053017206} WMI_MAC_PHY_CAPABILITIES;
17207
17208typedef struct {
17209 /*
17210 * TLV tag and len; tag equal
17211 * WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES
17212 */
17213 A_UINT32 tlv_header;
17214 /*
17215 * hw_mode_id - identify a particular set of HW characteristics,
17216 * as specified by the subsequent fields
17217 */
17218 A_UINT32 hw_mode_id;
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053017219 /**
17220 * BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on.
17221 * Number of bits set in phy_id_map represents number of
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053017222 * WMI_MAC_PHY_CAPABILITIES TLV's
17223 * one for each active PHY for current HW mode
17224 * identified by hw_mode_id. For example for
17225 * DBS/SBS mode there will be 2
17226 * WMI_MAC_PHY_CAPABILITIES TLVs and for
17227 * single MAC modes it
17228 * will be 1 WMI_MAC_PHY_CAPABILITIES
17229 * TLVs
17230 */
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053017231 A_UINT32 phy_id_map;
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053017232 /**
17233 * hw_mode_config_type
17234 * Identify a particular type of HW mode such as SBS, DBS etc.
17235 * Refer to WMI_HW_MODE_CONFIG_TYPE values.
17236 */
17237 A_UINT32 hw_mode_config_type;
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053017238} WMI_HW_MODE_CAPABILITIES;
17239
17240typedef struct {
17241 /*
17242 * TLV tag and len; tag equals
17243 * WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS
17244 */
17245 A_UINT32 tlv_header;
17246 /* num HW modes */
17247 A_UINT32 num_hw_modes;
17248 /* num_hw_modes WMI_HW_MODE_CAPABILITIES TLV's */
17249} WMI_SOC_MAC_PHY_HW_MODE_CAPS;
17250
17251/*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/
17252typedef struct {
17253 /*
17254 * TLV tag and len; tag equals
17255 * WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT
17256 */
17257 A_UINT32 tlv_header;
17258 /* phy id */
17259 A_UINT32 phy_id;
17260 /* regdomain value specified in EEPROM */
17261 A_UINT32 eeprom_reg_domain;
17262 /* regdomain */
17263 A_UINT32 eeprom_reg_domain_ext;
17264 /*
17265 * CAP1 capabilities bit map, see REGDMN_CAP1_
17266 * defines
17267 */
17268 A_UINT32 regcap1;
17269 /*
17270 * REGDMN EEPROM CAP, see
17271 * REGDMN_EEPROM_EEREGCAP_ defines
17272 */
17273 A_UINT32 regcap2;
17274 /* REGDMN MODE, see REGDMN_MODE_ enum */
17275 A_UINT32 wireless_modes;
17276 A_UINT32 low_2ghz_chan;
17277 A_UINT32 high_2ghz_chan;
17278 A_UINT32 low_5ghz_chan;
17279 A_UINT32 high_5ghz_chan;
17280} WMI_HAL_REG_CAPABILITIES_EXT;
17281
17282typedef struct {
17283 /*
17284 * TLV tag and len; tag equals
17285 * WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES
17286 */
17287 A_UINT32 tlv_header;
17288 /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */
17289 A_UINT32 num_phy;
17290} WMI_SOC_HAL_REG_CAPABILITIES;
17291
Anurag Chouhanb3fa7a12016-04-18 17:26:49 +053017292typedef struct {
17293 /*
17294 * TLV tag and len; tag equals
17295 * WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv
17296 */
17297 A_UINT32 tlv_header;
17298 /*
17299 * global default adaptive dwell mode,
17300 * used when WMI_SCAN_DWELL_MODE_DEFAULT
17301 */
17302 A_UINT32 default_adaptive_dwell_mode;
17303 /*
17304 * the weight to calculate the average low pass filter for
17305 * channel congestion. 0-100
17306 */
17307 A_UINT32 adapative_lpf_weight;
17308 /* interval to monitor passive scan in msec */
17309 A_UINT32 passive_monitor_interval_ms;
17310 /* % of wifi activity to switch from passive to active 0-100 */
17311 A_UINT32 wifi_activity_threshold_pct;
17312} wmi_scan_adaptive_dwell_parameters_tlv;
17313
17314typedef struct {
17315 /*
17316 * TLV tag and len; tag equals
17317 * WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_config_fixed_param
17318 */
17319 A_UINT32 tlv_header;
17320 /* globally enable/disable adaptive dwell */
17321 A_UINT32 enable;
17322 /*
17323 * followed by TLV (tag length value) parameters array
17324 * The TLV's are:
17325 * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements)
17326 */
17327} wmi_scan_adaptive_dwell_config_fixed_param;
17328
Manjeet Singh158307d2016-08-24 15:23:58 +053017329typedef struct {
17330 /** TLV tag and len; tag equals
17331 * WMITLV_TAG_STRUC_wmi_coex_get_antenna_isolation_cmd_fixed_param */
17332 A_UINT32 tlv_header;
17333 /* Currently there are no parameters for this message. */
17334} wmi_coex_get_antenna_isolation_cmd_fixed_param;
17335
17336typedef struct {
17337 /** TLV tag and len; tag equals
17338 * WMITLV_TAG_STRUC_wmi_coex_report_isolation_event_fixed_param */
17339 A_UINT32 tlv_header;
17340 /** Antenna isolation value in dB units, none zero value is valid while 0 means failed to do isolation measurement or corresponding chain is not active.
17341 * Currently the HW descriptor only supports 4 chains at most.
17342 * Further isolation_chainX elements can be added in the future
17343 * for additional chains, if needed.
17344 */
17345 A_UINT32 isolation_chain0:8, /* [7:0], isolation value for chain 0 */
17346 isolation_chain1:8, /* [15:8], isolation value for chain 1 */
17347 isolation_chain2:8, /* [23:16], isolation value for chain 2 */
17348 isolation_chain3:8; /* [31:24], isolation value for chain 3 */
17349} wmi_coex_report_isolation_event_fixed_param;
17350
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080017351/* ADD NEW DEFS HERE */
17352
17353/*****************************************************************************
17354 * The following structures are deprecated. DO NOT USE THEM!
17355 */
17356
17357/** Max number of channels in the schedule. */
17358#define OCB_CHANNEL_MAX (5)
17359
17360/* NOTE: Make sure these data structures are identical to those 9235
17361* defined in sirApi.h */
17362
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053017363typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080017364 /** Arbitration Inter-Frame Spacing. Range: 2-15 */
17365 A_UINT32 aifsn;
17366 /** Contention Window minimum. Range: 1 - 10 */
17367 A_UINT32 cwmin;
17368 /** Contention Window maximum. Range: 1 - 10 */
17369 A_UINT32 cwmax;
17370} wmi_qos_params_t;
17371
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053017372typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080017373 /** Channel frequency in MHz */
17374 A_UINT32 chan_freq;
17375 /** Channel duration in ms */
17376 A_UINT32 duration;
17377 /** Start guard interval in ms */
17378 A_UINT32 start_guard_interval;
17379 /** End guard interval in ms */
17380 A_UINT32 end_guard_interval;
17381 /** Transmit power in dBm, range 0 - 23 */
17382 A_UINT32 tx_power;
17383 /** Transmit datarate in Mbps */
17384 A_UINT32 tx_rate;
17385 /** QoS parameters for each AC */
17386 wmi_qos_params_t qos_params[WLAN_MAX_AC];
17387 /** 1 to enable RX stats for this channel, 0 otherwise */
17388 A_UINT32 rx_stats;
17389} wmi_ocb_channel_t;
17390
17391typedef struct {
17392 /** TLV tag and len; tag equals
17393 * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
17394 A_UINT32 tlv_header;
17395 /* VDEV identifier */
17396 A_UINT32 vdev_id;
17397 /** Number of valid channels in the channels array */
17398 A_UINT32 num_channels;
17399 /** The array of channels */
17400 wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
17401 /** 1 to allow off-channel tx, 0 otherwise */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053017402 A_UINT32 off_channel_tx; /* Not supported */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080017403} wmi_ocb_set_sched_cmd_fixed_param;
17404
17405typedef struct {
17406 /** Return status. 0 for success, non-zero otherwise */
17407 A_UINT32 status;
17408} wmi_ocb_set_sched_event_fixed_param;
17409
17410/**
17411* END DEPRECATED
17412*/
17413#ifdef __cplusplus
17414}
17415#endif
17416#endif /*_WMI_UNIFIED_H_*/
17417/**@}*/