blob: 26f00506f2529f9dc1e70b6f4659617c23946f55 [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
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800413 /* peer specific commands */
414
415 /** create a peer */
416 WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER),
417 /** delete a peer */
418 WMI_PEER_DELETE_CMDID,
419 /** flush specific tid queues of a peer */
420 WMI_PEER_FLUSH_TIDS_CMDID,
421 /** set a parameter of a peer */
422 WMI_PEER_SET_PARAM_CMDID,
423 /** set peer to associated state. will cary all parameters determined during assocication time */
424 WMI_PEER_ASSOC_CMDID,
425 /**add a wds (4 address ) entry. used only for testing WDS feature on AP products */
426 WMI_PEER_ADD_WDS_ENTRY_CMDID,
427 /**remove wds (4 address ) entry. used only for testing WDS feature on AP products */
428 WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
429 /** set up mcast group infor for multicast to unicast conversion */
430 WMI_PEER_MCAST_GROUP_CMDID,
431 /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */
432 WMI_PEER_INFO_REQ_CMDID,
433
434 /** request the estimated link speed for the peer. FW shall respond with
435 * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID.
436 */
437 WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID,
438 /*
439 * Set the conditions to report peer justified rate to driver
440 * The justified rate means the the user-rate is justified by PER.
441 */
442 WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID,
Govind Singhc7d51942016-02-01 12:09:31 +0530443 /** update a wds (4 address) entry */
444 WMI_PEER_UPDATE_WDS_ENTRY_CMDID,
445 /** add a proxy sta entry */
446 WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID,
447 /** Set Smart Antenna TX antenna */
448 WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
449 /** Set Smart Antenna TX train info */
450 WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
451 /** Set SA node config options */
452 WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
453 /** ATF PEER REQUEST commands */
454 WMI_PEER_ATF_REQUEST_CMDID,
Himanshu Agarwal134b7362016-05-13 20:30:12 +0530455 /** bandwidth fairness (BWF) peer configuration request command */
456 WMI_PEER_BWF_REQUEST_CMDID,
Pradeep Reddy POTTETIdead2bd2016-06-09 17:11:12 +0530457 /** rx reorder queue setup for peer/tid */
458 WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
459 /** rx reorder queue remove for peer/tid */
460 WMI_PEER_REORDER_QUEUE_REMOVE_CMDID,
Nitesh Shah5de1cf82016-06-29 20:13:17 +0530461 /** specify a limit for rx A-MPDU block size */
462 WMI_PEER_SET_RX_BLOCKSIZE_CMDID,
Nitesh Shahfcedd3b2016-07-21 17:24:35 +0530463 /**
464 * request peer antdiv info from FW. FW shall respond with
465 * PEER_ANTDIV_INFO_EVENTID
466 */
467 WMI_PEER_ANTDIV_INFO_REQ_CMDID,
Pradeep Reddy POTTETIdead2bd2016-06-09 17:11:12 +0530468
Govind Singhc7d51942016-02-01 12:09:31 +0530469
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800470 /* beacon/management specific commands */
471
472 /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */
473 WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT),
474 /** transmit beacon by value */
475 WMI_PDEV_SEND_BCN_CMDID,
476 /** set the beacon template. used in beacon offload mode to setup the
477 * the common beacon template with the FW to be used by FW to generate beacons */
478 WMI_BCN_TMPL_CMDID,
479 /** set beacon filter with FW */
480 WMI_BCN_FILTER_RX_CMDID,
481 /* enable/disable filtering of probe requests in the firmware */
482 WMI_PRB_REQ_FILTER_RX_CMDID,
483 /** transmit management frame by value. will be deprecated */
484 WMI_MGMT_TX_CMDID,
485 /** set the probe response template. used in beacon offload mode to setup the
486 * the common probe response template with the FW to be used by FW to generate
487 * probe responses */
488 WMI_PRB_TMPL_CMDID,
489 /** Transmit Mgmt frame by reference */
490 WMI_MGMT_TX_SEND_CMDID,
491
492 /** commands to directly control ba negotiation directly from host. only used in test mode */
493
494 /** turn off FW Auto addba mode and let host control addba */
495 WMI_ADDBA_CLEAR_RESP_CMDID =
496 WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG),
497 /** send add ba request */
498 WMI_ADDBA_SEND_CMDID,
499 WMI_ADDBA_STATUS_CMDID,
500 /** send del ba */
501 WMI_DELBA_SEND_CMDID,
502 /** set add ba response will be used by FW to generate addba response*/
503 WMI_ADDBA_SET_RESP_CMDID,
504 /** send single VHT MPDU with AMSDU */
505 WMI_SEND_SINGLEAMSDU_CMDID,
506
507 /** Station power save specific config */
508 /** enable/disable station powersave */
509 WMI_STA_POWERSAVE_MODE_CMDID =
510 WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS),
511 /** set station power save specific parameter */
512 WMI_STA_POWERSAVE_PARAM_CMDID,
513 /** set station mimo powersave mode */
514 WMI_STA_MIMO_PS_MODE_CMDID,
515
516 /** DFS-specific commands */
517 /** enable DFS (radar detection)*/
518 WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS),
519 /** disable DFS (radar detection)*/
520 WMI_PDEV_DFS_DISABLE_CMDID,
521 /** enable DFS phyerr/parse filter offload */
522 WMI_DFS_PHYERR_FILTER_ENA_CMDID,
523 /** enable DFS phyerr/parse filter offload */
524 WMI_DFS_PHYERR_FILTER_DIS_CMDID,
525
526 /* Roaming specific commands */
527 /** set roam scan mode */
528 WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM),
529 /** set roam scan rssi threshold below which roam scan is enabled */
530 WMI_ROAM_SCAN_RSSI_THRESHOLD,
531 /** set roam scan period for periodic roam scan mode */
532 WMI_ROAM_SCAN_PERIOD,
533 /** set roam scan trigger rssi change threshold */
534 WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
535 /** set roam AP profile */
536 WMI_ROAM_AP_PROFILE,
537 /** set channel list for roam scans */
538 WMI_ROAM_CHAN_LIST,
539 /** Stop scan command */
540 WMI_ROAM_SCAN_CMD,
541 /** roaming sme offload sync complete */
542 WMI_ROAM_SYNCH_COMPLETE,
543 /** set ric request element for 11r roaming */
544 WMI_ROAM_SET_RIC_REQUEST_CMDID,
545 /** Invoke roaming forcefully */
546 WMI_ROAM_INVOKE_CMDID,
547 /** roaming filter cmd to allow further filtering of roaming candidate */
548 WMI_ROAM_FILTER_CMDID,
549 /** set gateway ip, mac and retries for subnet change detection */
550 WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID,
551 /** configure thresholds for MAWC */
552 WMI_ROAM_CONFIGURE_MAWC_CMDID,
Govind Singh86180292016-02-01 14:03:37 +0530553 /** configure MultiBand Operation(refer WFA MBO spec) parameter */
Nitesh Shahe5aa26b2016-07-08 12:03:44 +0530554 WMI_ROAM_SET_MBO_PARAM_CMDID, /* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800555
556 /** offload scan specific commands */
557 /** set offload scan AP profile */
558 WMI_OFL_SCAN_ADD_AP_PROFILE =
559 WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN),
560 /** remove offload scan AP profile */
561 WMI_OFL_SCAN_REMOVE_AP_PROFILE,
562 /** set offload scan period */
563 WMI_OFL_SCAN_PERIOD,
564
565 /* P2P specific commands */
566 /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response
567 * generated during p2p listen and for p2p discoverability */
568 WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P),
569 /** enable/disable p2p discoverability on STA/AP VDEVs */
570 WMI_P2P_DEV_SET_DISCOVERABILITY,
571 /** set p2p ie to be carried in beacons generated by FW for GO */
572 WMI_P2P_GO_SET_BEACON_IE,
573 /** set p2p ie to be carried in probe response frames generated by FW for GO */
574 WMI_P2P_GO_SET_PROBE_RESP_IE,
575 /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA
576 * attribute in the beacons/probe responses received.
577 */
578 WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
579 /** set the configure of p2p find offload */
580 WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID,
581 /** set the vendor specific p2p ie data for p2p find offload using */
582 WMI_P2P_DISC_OFFLOAD_APPIE_CMDID,
583 /** set the BSSID/device name pattern of p2p find offload */
584 WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID,
585 /** set OppPS related parameters **/
586 WMI_P2P_SET_OPPPS_PARAM_CMDID,
Himanshu Agarwalf7bb67b2016-05-30 21:04:30 +0530587 /** set listen offload start related parameters */
588 WMI_P2P_LISTEN_OFFLOAD_START_CMDID,
589 /** set listen offload stop related parameters */
590 WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800591
592 /** AP power save specific config */
593 /** set AP power save specific param */
594 WMI_AP_PS_PEER_PARAM_CMDID =
595 WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS),
596 /** set AP UAPSD coex pecific param */
597 WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
598
599 /** set Enhanced Green AP param */
600 WMI_AP_PS_EGAP_PARAM_CMDID,
601
602 /** Rate-control specific commands */
603 WMI_PEER_RATE_RETRY_SCHED_CMDID =
604 WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL),
605
606 /** WLAN Profiling commands. */
607 WMI_WLAN_PROFILE_TRIGGER_CMDID =
608 WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE),
609 WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
610 WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
611 WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
612 WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
613
614 /** Suspend resume command Ids */
615 WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND),
616 WMI_PDEV_RESUME_CMDID,
617
618 /* Beacon filter commands */
619 /** add a beacon filter */
620 WMI_ADD_BCN_FILTER_CMDID =
621 WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER),
622 /** remove a beacon filter */
623 WMI_RMV_BCN_FILTER_CMDID,
624
625 /* WOW Specific WMI commands */
626 /** add pattern for awake */
627 WMI_WOW_ADD_WAKE_PATTERN_CMDID =
628 WMI_CMD_GRP_START_ID(WMI_GRP_WOW),
629 /** deleta a wake pattern */
630 WMI_WOW_DEL_WAKE_PATTERN_CMDID,
631 /** enable/deisable wake event */
632 WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
633 /** enable WOW */
634 WMI_WOW_ENABLE_CMDID,
635 /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */
636 WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
637 /* IOAC add keep alive cmd. */
638 WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID,
639 /* IOAC del keep alive cmd. */
640 WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID,
641 /* IOAC add pattern for awake */
642 WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID,
643 /* IOAC deleta a wake pattern */
644 WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID,
645 /* D0-WOW enable or disable cmd */
646 WMI_D0_WOW_ENABLE_DISABLE_CMDID,
647 /* enable extend WoW */
648 WMI_EXTWOW_ENABLE_CMDID,
649 /* Extend WoW command to configure app type1 parameter */
650 WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID,
651 /* Extend WoW command to configure app type2 parameter */
652 WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID,
653 /* enable ICMPv6 Network advertisement filtering */
654 WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID,
655 /*
656 * Set a pattern to match UDP packet in WOW mode.
657 * If match, construct a tx frame in a local buffer
658 * to send through the peer AP to the entity in the
659 * IP network that sent the UDP packet to this STA.
660 */
661 WMI_WOW_UDP_SVC_OFLD_CMDID,
662
663 /* configure WOW host wakeup PIN pattern */
664 WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID,
665
Anurag Chouhan86eab9b2016-04-21 16:22:47 +0530666 /* Set which action category should wake the host from suspend */
667 WMI_WOW_SET_ACTION_WAKE_UP_CMDID,
668
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800669 /* RTT measurement related cmd */
670 /** request to make an RTT measurement */
671 WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT),
672 /** request to report a tsf measurement */
673 WMI_RTT_TSF_CMDID,
674
675 /** spectral scan command */
676 /** configure spectral scan */
677 WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID =
678 WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL),
679 /** enable/disable spectral scan and trigger */
680 WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
681
682 /* F/W stats */
683 /** one time request for stats */
684 WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS),
685 /** Push MCC Adaptive Scheduler Stats to Firmware */
686 WMI_MCC_SCHED_TRAFFIC_STATS_CMDID,
687 /** one time request for txrx stats */
688 WMI_REQUEST_STATS_EXT_CMDID,
689
690 /* Link Layer stats */
691 /** Request for link layer stats */
692 WMI_REQUEST_LINK_STATS_CMDID,
693 /** Request for setting params to link layer stats */
694 WMI_START_LINK_STATS_CMDID,
695 /** Request to clear stats*/
696 WMI_CLEAR_LINK_STATS_CMDID,
697
698 /** Request for getting the Firmware Memory Dump */
699 WMI_GET_FW_MEM_DUMP_CMDID,
700
701 /** Request to flush of the buffered debug messages */
702 WMI_DEBUG_MESG_FLUSH_CMDID,
703
704 /** Cmd to configure the verbose level */
705 WMI_DIAG_EVENT_LOG_CONFIG_CMDID,
706
Manjeet Singh27aa9c12016-08-24 15:38:42 +0530707 /** One time request for wlan stats */
708 WMI_REQUEST_WLAN_STATS_CMDID,
709
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800710 /** ARP OFFLOAD REQUEST*/
711 WMI_SET_ARP_NS_OFFLOAD_CMDID =
712 WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
713
714 /** Proactive ARP Response Add Pattern Command*/
715 WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID,
716
717 /** Proactive ARP Response Del Pattern Command*/
718 WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID,
719
720 /** NS offload config*/
721 WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID =
722 WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL),
723
724 /** APFIND Config */
725 WMI_APFIND_CMDID,
726
727 /** Passpoint list config */
728 WMI_PASSPOINT_LIST_CONFIG_CMDID,
729
730 /** configure supprssing parameters for MAWC */
731 WMI_NLO_CONFIGURE_MAWC_CMDID,
732
733 /* GTK offload Specific WMI commands */
734 WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL),
735
736 /* CSA offload Specific WMI commands */
737 /** csa offload enable */
738 WMI_CSA_OFFLOAD_ENABLE_CMDID =
739 WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL),
740 /** chan switch command */
741 WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
742
743 /* Chatter commands */
744 /* Change chatter mode of operation */
745 WMI_CHATTER_SET_MODE_CMDID =
746 WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER),
747 /** chatter add coalescing filter command */
748 WMI_CHATTER_ADD_COALESCING_FILTER_CMDID,
749 /** chatter delete coalescing filter command */
750 WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID,
751 /** chatter coalecing query command */
752 WMI_CHATTER_COALESCING_QUERY_CMDID,
753
754 /**addba specific commands */
755 /** start the aggregation on this TID */
756 WMI_PEER_TID_ADDBA_CMDID =
757 WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA),
758 /** stop the aggregation on this TID */
759 WMI_PEER_TID_DELBA_CMDID,
760
761 /** set station mimo powersave method */
762 WMI_STA_DTIM_PS_METHOD_CMDID,
763 /** Configure the Station UAPSD AC Auto Trigger Parameters */
764 WMI_STA_UAPSD_AUTO_TRIG_CMDID,
765 /** Configure the Keep Alive Parameters */
766 WMI_STA_KEEPALIVE_CMDID,
767
768 /* Request ssn from target for a sta/tid pair */
769 WMI_BA_REQ_SSN_CMDID,
770 /* misc command group */
771 /** echo command mainly used for testing */
772 WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC),
773
774 /* !!IMPORTANT!!
775 * If you need to add a new WMI command to the WMI_GRP_MISC sub-group,
776 * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID,
777 * as we MUST have a fixed value here to maintain compatibility between
778 * UTF and the ART2 driver
779 */
780 /** UTF WMI commands */
781 WMI_PDEV_UTF_CMDID,
782
783 /** set debug log config */
784 WMI_DBGLOG_CFG_CMDID,
785 /* QVIT specific command id */
786 WMI_PDEV_QVIT_CMDID,
787 /* Factory Testing Mode request command
788 * used for integrated chipsets */
789 WMI_PDEV_FTM_INTG_CMDID,
790 /* set and get keepalive parameters command */
791 WMI_VDEV_SET_KEEPALIVE_CMDID,
792 WMI_VDEV_GET_KEEPALIVE_CMDID,
793 /* For fw recovery test command */
794 WMI_FORCE_FW_HANG_CMDID,
795 /* Set Mcast/Bdcast filter */
796 WMI_SET_MCASTBCAST_FILTER_CMDID,
797 /** set thermal management params **/
798 WMI_THERMAL_MGMT_CMDID,
799 /** set host auto shutdown params **/
800 WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID,
801 /** set tpc chainmask config command */
802 WMI_TPC_CHAINMASK_CONFIG_CMDID,
803 /** set Antenna diversity command */
804 WMI_SET_ANTENNA_DIVERSITY_CMDID,
805 /** Set OCB Sched Request, deprecated */
806 WMI_OCB_SET_SCHED_CMDID,
807 /* Set rssi monitoring config command */
808 WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID,
809 /* Enable/disable Large Receive Offload processing;
810 * provide cfg params */
811 WMI_LRO_CONFIG_CMDID,
Nirav Shahbf6450f2015-11-05 11:47:20 +0530812 /*transfer data from host to firmware to write flash */
813 WMI_TRANSFER_DATA_TO_FLASH_CMDID,
Sreelakshmi Konamki58f4d622016-04-14 18:03:21 +0530814 /** Command to enable/disable filtering of multicast IP with unicast mac */
815 WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID,
Anurag Chouhan05d05fe2016-04-18 17:09:24 +0530816 /** Command to control WISA mode */
817 WMI_VDEV_WISA_CMDID,
Himanshu Agarwalb0497b52016-05-13 21:03:37 +0530818 /** set debug log time stamp sync up with host */
819 WMI_DBGLOG_TIME_STAMP_SYNC_CMDID,
Krishna Kumaar Natarajan2f7a44d2016-07-08 11:24:06 -0700820 /** Command for host to set/delete multiple mcast filters */
821 WMI_SET_MULTIPLE_MCAST_FILTER_CMDID,
Pradeep Reddy POTTETI4189bf92016-06-20 14:51:55 +0530822 /** upload a requested section of data from firmware flash to host */
823 WMI_READ_DATA_FROM_FLASH_CMDID,
Anurag Chouhan05d05fe2016-04-18 17:09:24 +0530824
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800825 /* GPIO Configuration */
826 WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
827 WMI_GPIO_OUTPUT_CMDID,
828
829 /* Txbf configuration command */
830 WMI_TXBF_CMDID,
831
832 /* FWTEST Commands */
833 WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID =
834 WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
835 /** set NoA descs **/
836 WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
837 /* UNIT Tests */
838 WMI_UNIT_TEST_CMDID,
Govind Singhc7d51942016-02-01 12:09:31 +0530839 /* set debug and tuning parameters */
840 WMI_FWTEST_CMDID,
841 /* Q-Boost configuration test commands */
842 WMI_QBOOST_CFG_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800843
844 /** TDLS Configuration */
845 /** enable/disable TDLS */
846 WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS),
847 /** set tdls peer state */
848 WMI_TDLS_PEER_UPDATE_CMDID,
849 /** TDLS Offchannel control */
850 WMI_TDLS_SET_OFFCHAN_MODE_CMDID,
851
852 /** Resmgr Configuration */
853 /** Adaptive OCS is enabled by default in the FW. This command is used to
854 * disable FW based adaptive OCS.
855 */
856 WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID =
857 WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR),
858 /** set the requested channel time quota for the home channels */
859 WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID,
860 /** set the requested latency for the home channels */
861 WMI_RESMGR_SET_CHAN_LATENCY_CMDID,
862
863 /** STA SMPS Configuration */
864 /** force SMPS mode */
865 WMI_STA_SMPS_FORCE_MODE_CMDID =
866 WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS),
867 /** set SMPS parameters */
868 WMI_STA_SMPS_PARAM_CMDID,
869
870 /* Wlan HB commands */
871 /* enalbe/disable wlan HB */
872 WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB),
873 /* set tcp parameters for wlan HB */
874 WMI_HB_SET_TCP_PARAMS_CMDID,
875 /* set tcp pkt filter for wlan HB */
876 WMI_HB_SET_TCP_PKT_FILTER_CMDID,
877 /* set udp parameters for wlan HB */
878 WMI_HB_SET_UDP_PARAMS_CMDID,
879 /* set udp pkt filter for wlan HB */
880 WMI_HB_SET_UDP_PKT_FILTER_CMDID,
881
882 /** Wlan RMC commands*/
883 /** enable/disable RMC */
884 WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC),
885 /** configure action frame period */
886 WMI_RMC_SET_ACTION_PERIOD_CMDID,
887 /** For debug/future enhancement purposes only,
888 * configures/finetunes RMC algorithms */
889 WMI_RMC_CONFIG_CMDID,
890
891 /** WLAN MHF offload commands */
892 /** enable/disable MHF offload */
893 WMI_MHF_OFFLOAD_SET_MODE_CMDID =
894 WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL),
895 /** Plumb routing table for MHF offload */
896 WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID,
897
898 /*location scan commands */
899 /*start batch scan */
900 WMI_BATCH_SCAN_ENABLE_CMDID =
901 WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
902 /*stop batch scan */
903 WMI_BATCH_SCAN_DISABLE_CMDID,
904 /*get batch scan result */
905 WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID,
906 /* OEM related cmd */
Manikandan Mohan05ac7ee2015-12-23 14:18:36 -0800907 WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM),
908 WMI_OEM_REQUEST_CMDID, /* UNUSED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800909
910 /** Nan Request */
911 WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN),
912
913 /** Modem power state command */
914 WMI_MODEM_POWER_STATE_CMDID =
915 WMI_CMD_GRP_START_ID(WMI_GRP_COEX),
916 WMI_CHAN_AVOID_UPDATE_CMDID,
Sreelakshmi Konamki02a4d7c2016-04-14 17:46:54 +0530917 WMI_COEX_CONFIG_CMDID,
Sandeep Puligillaff55fec2016-03-09 12:54:23 -0800918 WMI_CHAN_AVOID_RPT_ALLOW_CMDID,
Manjeet Singh158307d2016-08-24 15:23:58 +0530919 WMI_COEX_GET_ANTENNA_ISOLATION_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800920
921 /**
922 * OBSS scan offload enable/disable commands
923 * OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true:
924 * 1. WMI_SERVICE_OBSS_SCAN is reported by FW in service ready,
925 * 2. STA connect to a 2.4Ghz ht20/ht40 AP,
926 * 3. AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response)
927 * If OBSS parameters from beacon changed, also use enable CMD to update parameters.
928 * OBSS scan disable CMD will send to FW if have enabled when tearing down connection.
929 */
930 WMI_OBSS_SCAN_ENABLE_CMDID =
931 WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL),
932 WMI_OBSS_SCAN_DISABLE_CMDID,
933
934 /**LPI commands*/
935 /**LPI mgmt snooping config command*/
936 WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID =
937 WMI_CMD_GRP_START_ID(WMI_GRP_LPI),
938 /**LPI scan start command*/
939 WMI_LPI_START_SCAN_CMDID,
940 /**LPI scan stop command*/
941 WMI_LPI_STOP_SCAN_CMDID,
942
943 /** ExtScan commands */
944 WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN),
945 WMI_EXTSCAN_STOP_CMDID,
946 WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID,
947 WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID,
948 WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID,
949 WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID,
950 WMI_EXTSCAN_SET_CAPABILITIES_CMDID,
951 WMI_EXTSCAN_GET_CAPABILITIES_CMDID,
952 WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID,
953 WMI_EXTSCAN_CONFIGURE_MAWC_CMDID,
954
955 /** DHCP server offload commands */
956 WMI_SET_DHCP_SERVER_OFFLOAD_CMDID =
957 WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL),
958
959 /** IPA Offload features related commands */
960 WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID =
961 WMI_CMD_GRP_START_ID(WMI_GRP_IPA),
962
963 /** mDNS responder offload commands */
964 WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL),
965 WMI_MDNS_SET_FQDN_CMDID,
966 WMI_MDNS_SET_RESPONSE_CMDID,
967 WMI_MDNS_GET_STATS_CMDID,
968
969 /* enable/disable AP Authentication offload */
970 WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL),
971 WMI_SAP_SET_BLACKLIST_PARAM_CMDID,
972
973 /** Out-of-context-of-BSS (OCB) commands */
974 WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB),
975 WMI_OCB_SET_UTC_TIME_CMDID,
976 WMI_OCB_START_TIMING_ADVERT_CMDID,
977 WMI_OCB_STOP_TIMING_ADVERT_CMDID,
978 WMI_OCB_GET_TSF_TIMER_CMDID,
979 WMI_DCC_GET_STATS_CMDID,
980 WMI_DCC_CLEAR_STATS_CMDID,
981 WMI_DCC_UPDATE_NDL_CMDID,
982 /* System-On-Chip commands */
983 WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
984 WMI_SOC_SET_HW_MODE_CMDID,
985 WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID,
986 WMI_SOC_SET_ANTENNA_MODE_CMDID,
987
988 /* packet filter commands */
989 WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER),
990 WMI_PACKET_FILTER_ENABLE_CMDID,
991 /** Motion Aided WiFi Connectivity (MAWC) commands */
992 WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC),
993
994 /** WMI commands related to PMF 11w Offload */
995 WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID =
996 WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD),
997
Manikandan Mohan130eb572015-12-23 13:53:34 -0800998 /** WMI commands related to pkt filter (BPF) offload */
999 WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
1000 WMI_BPF_GET_VDEV_STATS_CMDID,
1001 WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
1002 WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
Anurag Chouhan11b53a12016-07-28 12:39:46 +05301003
1004 /** WMI commands related to monitor mode. */
1005 WMI_MNT_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MONITOR),
1006
Govind Singh941bd5e2016-02-04 17:15:25 +05301007 /**
1008 * Nan Data commands
1009 * NDI - NAN Data Interface
1010 * NDP - NAN Data Path
1011 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +05301012 /* Commands in prototyping phase */
1013 WMI_NDI_GET_CAP_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROTOTYPE),
Govind Singh941bd5e2016-02-04 17:15:25 +05301014 WMI_NDP_INITIATOR_REQ_CMDID,
1015 WMI_NDP_RESPONDER_REQ_CMDID,
1016 WMI_NDP_END_REQ_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001017} WMI_CMD_ID;
1018
1019typedef enum {
1020 /** WMI service is ready; after this event WMI messages can be sent/received */
1021 WMI_SERVICE_READY_EVENTID = 0x1,
1022 /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */
1023 WMI_READY_EVENTID,
1024
Nitesh Shahca1b2d02016-07-21 12:59:24 +05301025 /**
1026 * Specify what WMI services the target supports
1027 * (for services beyond what fits in the WMI_SERVICE_READY_EVENT
1028 * message's wmi_service_bitmap)
1029 */
1030 WMI_SERVICE_AVAILABLE_EVENTID,
1031
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001032 /** Scan specific events */
1033 WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
1034
1035 /* PDEV specific events */
1036 /** TPC config for the current operating channel */
1037 WMI_PDEV_TPC_CONFIG_EVENTID =
1038 WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
1039 /** Channel stats event */
1040 WMI_CHAN_INFO_EVENTID,
1041
1042 /** PHY Error specific WMI event */
1043 WMI_PHYERR_EVENTID,
1044
1045 /** eeprom dump event */
1046 WMI_PDEV_DUMP_EVENTID,
1047
1048 /** traffic pause event */
1049 WMI_TX_PAUSE_EVENTID,
1050
1051 /** DFS radar event */
1052 WMI_DFS_RADAR_EVENTID,
1053
1054 /** track L1SS entry and residency event */
1055 WMI_PDEV_L1SS_TRACK_EVENTID,
1056
1057 /** Report current temprature of the chip in Celcius degree */
1058 WMI_PDEV_TEMPERATURE_EVENTID,
1059
1060 /* Extension of WMI_SERVICE_READY msg with
1061 * extra target capability info
1062 */
1063 WMI_SERVICE_READY_EXT_EVENTID,
1064
Govind Singhc7d51942016-02-01 12:09:31 +05301065 /** FIPS test mode event */
1066 WMI_PDEV_FIPS_EVENTID,
1067
1068 /** Channel hopping avoidance */
1069 WMI_PDEV_CHANNEL_HOPPING_EVENTID,
1070
1071 /** CCK ANI level event */
1072 WMI_PDEV_ANI_CCK_LEVEL_EVENTID,
1073
1074 /** OFDM ANI level event */
1075 WMI_PDEV_ANI_OFDM_LEVEL_EVENTID,
1076
1077 /** Tx PPDU params */
1078 WMI_PDEV_TPC_EVENTID,
1079
1080 /** NF Cal Power in DBR/DBM for all channels */
1081 WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
Govind Singh869c9872016-02-22 18:36:34 +05301082
1083 /** SOC/PDEV events */
1084 WMI_PDEV_SET_HW_MODE_RESP_EVENTID,
1085 WMI_PDEV_HW_MODE_TRANSITION_EVENTID,
1086 WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID,
Nitesh Shahfcedd3b2016-07-21 17:24:35 +05301087 /** Report ANT DIV feature's status */
1088 WMI_PDEV_ANTDIV_STATUS_EVENTID,
Anurag Chouhane326c922016-08-04 18:43:19 +05301089 /** Chip level Power stats */
1090 WMI_PDEV_CHIP_POWER_STATS_EVENTID,
Govind Singh869c9872016-02-22 18:36:34 +05301091
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001092 /* VDEV specific events */
1093 /** VDEV started event in response to VDEV_START request */
1094 WMI_VDEV_START_RESP_EVENTID =
1095 WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
1096 /** vdev stopped event , generated in response to VDEV_STOP request */
1097 WMI_VDEV_STOPPED_EVENTID,
1098 /* Indicate the set key (used for setting per
1099 * peer unicast and per vdev multicast)
1100 * operation has completed */
1101 WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
1102 /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please
1103 don't use this for any new implementations */
1104 /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario.
1105 This request is valid only for vdevs operating in soft AP or P2P GO mode */
1106 WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID,
1107
1108 /* Return the TSF timestamp of specified vdev */
1109 WMI_VDEV_TSF_REPORT_EVENTID,
Manikandan Mohan429a0782015-12-23 14:35:54 -08001110
1111 /* FW response to Host for vdev delete cmdid */
1112 WMI_VDEV_DELETE_RESP_EVENTID,
1113
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001114 /* peer specific events */
1115 /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
1116 WMI_PEER_STA_KICKOUT_EVENTID =
1117 WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
1118
1119 /** Peer Info Event with data_rate, rssi, tx_fail_cnt etc */
1120 WMI_PEER_INFO_EVENTID,
1121
1122 /** Event indicating that TX fail count reaching threshold */
1123 WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
1124 /** Return the estimate link speed for the Peer specified in the
1125 * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command.
1126 */
1127 WMI_PEER_ESTIMATED_LINKSPEED_EVENTID,
1128 /* Return the peer state
1129 * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE
1130 */
1131 WMI_PEER_STATE_EVENTID,
1132
1133 /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD.
1134 * After that, host will send Mx message.
1135 * Otherwise, host will pause any Mx(STA:M2/M4) message
1136 */
1137 WMI_PEER_ASSOC_CONF_EVENTID,
1138
Manikandan Mohan429a0782015-12-23 14:35:54 -08001139 /* FW response to Host for peer delete cmdid */
1140 WMI_PEER_DELETE_RESP_EVENTID,
1141
Govind Singhc7d51942016-02-01 12:09:31 +05301142 /** Valid rate code list for peer */
1143 WMI_PEER_RATECODE_LIST_EVENTID,
1144 WMI_WDS_PEER_EVENTID,
1145 WMI_PEER_STA_PS_STATECHG_EVENTID,
Nitesh Shahfcedd3b2016-07-21 17:24:35 +05301146 /** Peer Ant Div Info Event with rssi per chain, etc */
1147 WMI_PEER_ANTDIV_INFO_EVENTID,
Govind Singhc7d51942016-02-01 12:09:31 +05301148
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001149 /* beacon/mgmt specific events */
1150 /** RX management frame. the entire frame is carried along with the event. */
1151 WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
1152 /** software beacon alert event to Host requesting host to Queue a beacon for transmission
1153 use only in host beacon mode */
1154 WMI_HOST_SWBA_EVENTID,
1155 /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theritical value.
1156 tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in
1157 staggered beacon transmission mode */
1158 WMI_TBTTOFFSET_UPDATE_EVENTID,
1159
1160 /** event after the first beacon is transmitted following
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301161 a change in the template.*/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001162 WMI_OFFLOAD_BCN_TX_STATUS_EVENTID,
1163 /** event after the first probe response is transmitted following
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301164 a change in the template.*/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001165 WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID,
1166 /** Event for Mgmt TX completion event */
1167 WMI_MGMT_TX_COMPLETION_EVENTID,
Pradeep Reddy POTTETI67c778a2016-06-20 14:00:38 +05301168 /** Event for Mgmt TX bundle completion event */
1169 WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID,
1170
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001171
1172 /*ADDBA Related WMI Events */
1173 /** Indication the completion of the prior
1174 WMI_PEER_TID_DELBA_CMDID(initiator) */
1175 WMI_TX_DELBA_COMPLETE_EVENTID =
1176 WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
1177 /** Indication the completion of the prior
1178 *WMI_PEER_TID_ADDBA_CMDID(initiator) */
1179 WMI_TX_ADDBA_COMPLETE_EVENTID,
1180
1181 /* Seq num returned from hw for a sta/tid pair */
1182 WMI_BA_RSP_SSN_EVENTID,
1183
1184 /* Aggregation state requested by BTC */
1185 WMI_AGGR_STATE_TRIG_EVENTID,
1186
1187 /** Roam event to trigger roaming on host */
1188 WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
1189
1190 /** matching AP found from list of profiles */
1191 WMI_PROFILE_MATCH,
1192 /** roam synch event */
1193 WMI_ROAM_SYNCH_EVENTID,
1194
1195 /** P2P disc found */
1196 WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001197 /*send noa info to host when noa is changed for beacon tx offload enable */
1198 WMI_P2P_NOA_EVENTID,
Himanshu Agarwalf7bb67b2016-05-30 21:04:30 +05301199 /** send p2p listen offload stopped event with different reason */
1200 WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001201
1202 /** Send EGAP Info to host */
1203 WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS),
1204
1205 /* send pdev resume event to host after pdev resume. */
1206 WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND),
1207
1208 /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID.
1209 will cary wake reason */
1210 WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
1211 WMI_D0_WOW_DISABLE_ACK_EVENTID,
1212 WMI_WOW_INITIAL_WAKEUP_EVENTID,
1213
1214 /*RTT related event ID */
1215 /** RTT measurement report */
1216 WMI_RTT_MEASUREMENT_REPORT_EVENTID =
1217 WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
1218 /** TSF measurement report */
1219 WMI_TSF_MEASUREMENT_REPORT_EVENTID,
1220 /** RTT error report */
1221 WMI_RTT_ERROR_REPORT_EVENTID,
1222 /*STATS specific events */
1223 /** txrx stats event requested by host */
1224 WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS),
1225 /** FW iface link stats Event */
1226 WMI_IFACE_LINK_STATS_EVENTID,
1227 /** FW iface peer link stats Event */
1228 WMI_PEER_LINK_STATS_EVENTID,
1229 /** FW Update radio stats Event */
1230 WMI_RADIO_LINK_STATS_EVENTID,
1231 /** Firmware memory dump Complete event*/
1232 WMI_UPDATE_FW_MEM_DUMP_EVENTID,
1233
1234 /** Event indicating the DIAG logs/events supported by FW */
1235 WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID,
1236
Anurag Chouhan90c1a182016-04-18 17:20:38 +05301237 /** Instantaneous RSSI event */
Govind Singhc7d51942016-02-01 12:09:31 +05301238 WMI_INST_RSSI_STATS_EVENTID,
1239
Anurag Chouhan90c1a182016-04-18 17:20:38 +05301240 /** FW update tx power levels event */
1241 WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID,
1242
Manjeet Singh27aa9c12016-08-24 15:38:42 +05301243 /** This event is used to report wlan stats to host.
1244 * It is triggered under 3 conditions:
1245 * (a) Periodic timer timed out, based on the period specified
1246 * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
1247 * (b) Whenever any of the (enabled) stats thresholds specified
1248 * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
1249 * within the current stats period.
1250 * (c) In response to the one-time wlan stats request of
1251 * WMI_REQUEST_WLAN_STATS_CMDID from host.
1252 *
1253 * If this event is triggered by condition a or b,
1254 * the stats counters are cleared at the start of each period.
1255 * But if it is triggered by condition c, stats counters won't be cleared.
1256 */
1257 WMI_REPORT_STATS_EVENTID,
1258
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001259 /** NLO specific events */
1260 /** NLO match event after the first match */
1261 WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
1262
1263 /** NLO scan complete event */
1264 WMI_NLO_SCAN_COMPLETE_EVENTID,
1265
1266 /** APFIND specific events */
1267 WMI_APFIND_EVENTID,
1268
1269 /** passpoint network match event */
1270 WMI_PASSPOINT_MATCH_EVENTID,
1271
1272 /** GTK offload stautus event requested by host */
1273 WMI_GTK_OFFLOAD_STATUS_EVENTID =
1274 WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
1275
1276 /** GTK offload failed to rekey event */
1277 WMI_GTK_REKEY_FAIL_EVENTID,
1278 /* CSA IE received event */
1279 WMI_CSA_HANDLING_EVENTID =
1280 WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
1281
1282 /*chatter query reply event */
1283 WMI_CHATTER_PC_QUERY_EVENTID =
1284 WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER),
1285
1286 /** echo event in response to echo command */
1287 WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
1288
1289 /* !!IMPORTANT!!
1290 * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group,
1291 * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID,
1292 * as we MUST have a fixed value here to maintain compatibility between
1293 * UTF and the ART2 driver
1294 */
1295 /** UTF specific WMI event */
1296 WMI_PDEV_UTF_EVENTID,
1297
1298 /** event carries buffered debug messages */
1299 WMI_DEBUG_MESG_EVENTID,
1300 /** FW stats(periodic or on shot) */
1301 WMI_UPDATE_STATS_EVENTID,
1302 /** debug print message used for tracing FW code while debugging */
1303 WMI_DEBUG_PRINT_EVENTID,
1304 /** DCS wlan or non-wlan interference event
1305 */
1306 WMI_DCS_INTERFERENCE_EVENTID,
1307 /** VI spoecific event */
1308 WMI_PDEV_QVIT_EVENTID,
1309 /** FW code profile data in response to profile request */
1310 WMI_WLAN_PROFILE_DATA_EVENTID,
1311 /* Factory Testing Mode request event
1312 * used for integrated chipsets */
1313 WMI_PDEV_FTM_INTG_EVENTID,
1314 /* avoid list of frequencies .
1315 */
1316 WMI_WLAN_FREQ_AVOID_EVENTID,
1317 /* Indicate the keepalive parameters */
1318 WMI_VDEV_GET_KEEPALIVE_EVENTID,
1319 /* Thermal Management event */
1320 WMI_THERMAL_MGMT_EVENTID,
1321
1322 /* Container for QXDM/DIAG events */
1323 WMI_DIAG_DATA_CONTAINER_EVENTID,
1324
1325 /* host auto shutdown event */
1326 WMI_HOST_AUTO_SHUTDOWN_EVENTID,
1327
1328 /*update mib counters together with WMI_UPDATE_STATS_EVENTID */
1329 WMI_UPDATE_WHAL_MIB_STATS_EVENTID,
1330
1331 /*update ht/vht info based on vdev (rx and tx NSS and preamble) */
1332 WMI_UPDATE_VDEV_RATE_STATS_EVENTID,
1333
1334 WMI_DIAG_EVENTID,
1335
1336 /** Set OCB Sched Response, deprecated */
1337 WMI_OCB_SET_SCHED_EVENTID,
1338
1339 /* event to indicate the flush of the buffered debug messages is complete*/
1340 WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID,
1341 /* event to report mix/max RSSI breach events */
1342 WMI_RSSI_BREACH_EVENTID,
Nirav Shahbf6450f2015-11-05 11:47:20 +05301343 /* event to report completion of data storage into flash memory */
1344 WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001345
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -08001346 /** event to report SCPC calibrated data to host */
1347 WMI_PDEV_UTF_SCPC_EVENTID,
1348
Pradeep Reddy POTTETI4189bf92016-06-20 14:51:55 +05301349 /** event to provide requested data from the target's flash memory */
1350 WMI_READ_DATA_FROM_FLASH_EVENTID,
1351
Himanshu Agarwal4eefcde2016-09-09 12:59:17 +05301352 /** event to report rx aggregation failure frame information */
1353 WMI_REPORT_RX_AGGR_FAILURE_EVENTID,
1354
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001355 /* GPIO Event */
1356 WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
1357 /** upload H_CV info WMI event
1358 * to indicate uploaded H_CV info to host
1359 */
1360 WMI_UPLOADH_EVENTID,
1361
1362 /** capture H info WMI event
1363 * to indicate captured H info to host
1364 */
1365 WMI_CAPTUREH_EVENTID,
1366 /* hw RFkill */
1367 WMI_RFKILL_STATE_CHANGE_EVENTID,
1368
1369 /* TDLS Event */
1370 WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
1371
Manikandan Mohan55c94d62015-12-04 13:47:58 -08001372 /* STA SMPS Event */
1373 /* force SMPS mode */
1374 WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID =
1375 WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS),
1376
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001377 /*location scan event */
1378 /*report the firmware's capability of batch scan */
1379 WMI_BATCH_SCAN_ENABLED_EVENTID =
1380 WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
1381 /*batch scan result */
1382 WMI_BATCH_SCAN_RESULT_EVENTID,
1383 /* OEM Event */
Krishna Kumaar Natarajan1dfa3532015-11-19 16:16:20 -08001384 WMI_OEM_CAPABILITY_EVENTID = /* DEPRECATED */
1385 WMI_EVT_GRP_START_ID(WMI_GRP_OEM),
1386 WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */
1387 WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */
1388 WMI_OEM_RESPONSE_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001389
1390 /* NAN Event */
1391 WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN),
Govind Singh941bd5e2016-02-04 17:15:25 +05301392 WMI_NAN_DISC_IFACE_CREATED_EVENTID,
1393 WMI_NAN_DISC_IFACE_DELETED_EVENTID,
1394 WMI_NAN_STARTED_CLUSTER_EVENTID,
1395 WMI_NAN_JOINED_CLUSTER_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001396
Manjeet Singh158307d2016-08-24 15:23:58 +05301397 /* Coex Event */
1398 WMI_COEX_REPORT_ANTENNA_ISOLATION_EVENTID =
1399 WMI_EVT_GRP_START_ID(WMI_GRP_COEX),
1400
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001401 /* LPI Event */
1402 WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI),
1403 WMI_LPI_STATUS_EVENTID,
1404 WMI_LPI_HANDOFF_EVENTID,
1405
1406 /* ExtScan events */
1407 WMI_EXTSCAN_START_STOP_EVENTID =
1408 WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN),
1409 WMI_EXTSCAN_OPERATION_EVENTID,
1410 WMI_EXTSCAN_TABLE_USAGE_EVENTID,
1411 WMI_EXTSCAN_CACHED_RESULTS_EVENTID,
1412 WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID,
1413 WMI_EXTSCAN_HOTLIST_MATCH_EVENTID,
1414 WMI_EXTSCAN_CAPABILITIES_EVENTID,
1415 WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID,
1416
1417 /* mDNS offload events */
1418 WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL),
1419
1420 /* SAP Authentication offload events */
1421 WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL),
1422 WMI_SAP_OFL_DEL_STA_EVENTID,
1423
1424 /** Out-of-context-of-bss (OCB) events */
1425 WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB),
1426 WMI_OCB_GET_TSF_TIMER_RESP_EVENTID,
1427 WMI_DCC_GET_STATS_RESP_EVENTID,
1428 WMI_DCC_UPDATE_NDL_RESP_EVENTID,
1429 WMI_DCC_STATS_EVENTID,
1430 /* System-On-Chip events */
1431 WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
1432 WMI_SOC_HW_MODE_TRANSITION_EVENTID,
1433 WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID,
1434 /** Motion Aided WiFi Connectivity (MAWC) events */
1435 WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC),
1436
Manikandan Mohan130eb572015-12-23 13:53:34 -08001437 /** pkt filter (BPF) offload relevant events */
Anurag Chouhan08f66c62016-04-18 17:14:51 +05301438 WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
Manikandan Mohan130eb572015-12-23 13:53:34 -08001439 WMI_BPF_VDEV_STATS_INFO_EVENTID,
Govind Singh941bd5e2016-02-04 17:15:25 +05301440
Anurag Chouhan08f66c62016-04-18 17:14:51 +05301441 /* Events in Prototyping phase */
1442 WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE),
Govind Singh941bd5e2016-02-04 17:15:25 +05301443 WMI_NDP_INITIATOR_RSP_EVENTID,
1444 WMI_NDP_RESPONDER_RSP_EVENTID,
1445 WMI_NDP_END_RSP_EVENTID,
1446 WMI_NDP_INDICATION_EVENTID,
1447 WMI_NDP_CONFIRM_EVENTID,
1448 WMI_NDP_END_INDICATION_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001449} WMI_EVT_ID;
1450
1451/* defines for OEM message sub-types */
1452#define WMI_OEM_CAPABILITY_REQ 0x01
1453#define WMI_OEM_CAPABILITY_RSP 0x02
1454#define WMI_OEM_MEASUREMENT_REQ 0x03
1455#define WMI_OEM_MEASUREMENT_RSP 0x04
1456#define WMI_OEM_ERROR_REPORT_RSP 0x05
1457#define WMI_OEM_NAN_MEAS_REQ 0x06
1458#define WMI_OEM_NAN_MEAS_RSP 0x07
1459#define WMI_OEM_NAN_PEER_INFO 0x08
1460#define WMI_OEM_CONFIGURE_LCR 0x09
1461#define WMI_OEM_CONFIGURE_LCI 0x0A
1462
1463/* below message subtype is internal to CLD. Target should
1464 * never use internal response type
1465 */
1466#define WMI_OEM_INTERNAL_RSP 0xdeadbeef
1467
Govind Singh941bd5e2016-02-04 17:15:25 +05301468#define WMI_CHAN_LIST_TAG 0x1
1469#define WMI_SSID_LIST_TAG 0x2
1470#define WMI_BSSID_LIST_TAG 0x3
1471#define WMI_IE_TAG 0x4
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001472
1473typedef struct {
1474 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
1475 /** primary 20 MHz channel frequency in mhz */
1476 A_UINT32 mhz;
1477 /** Center frequency 1 in MHz*/
1478 A_UINT32 band_center_freq1;
1479 /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
1480 A_UINT32 band_center_freq2;
1481 /** channel info described below */
1482 A_UINT32 info;
1483 /** contains min power, max power, reg power and reg class id. */
1484 A_UINT32 reg_info_1;
1485 /** contains antennamax */
1486 A_UINT32 reg_info_2;
1487} wmi_channel;
1488
1489typedef enum {
1490 WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
1491 WMI_CHANNEL_CHANGE_CAUSE_CSA,
1492} wmi_channel_change_cause;
1493
1494/** channel info consists of 6 bits of channel mode */
1495
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301496#define WMI_SET_CHANNEL_MODE(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001497 (pwmi_channel)->info &= 0xffffffc0; \
1498 (pwmi_channel)->info |= (val); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301499} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001500
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301501#define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001502
1503#define WMI_CHAN_FLAG_HT40_PLUS 6
1504#define WMI_CHAN_FLAG_PASSIVE 7
1505#define WMI_CHAN_ADHOC_ALLOWED 8
1506#define WMI_CHAN_AP_DISABLED 9
1507#define WMI_CHAN_FLAG_DFS 10
1508#define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */
1509#define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */
1510#define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */
1511#define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */
1512#define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */
Govind Singh32cced32016-02-01 13:33:09 +05301513/* Enable radar event reporting for sec80 in VHT80p80 */
1514#define WMI_CHAN_FLAG_DFS_CFREQ2 16
Himanshu Agarwal2690e462016-06-03 14:26:01 +05301515#define WMI_CHAN_FLAG_ALLOW_HE 17 /* HE (11ax) is allowed on this channel */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001516
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301517#define WMI_SET_CHANNEL_FLAG(pwmi_channel, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001518 (pwmi_channel)->info |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301519} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001520
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301521#define WMI_GET_CHANNEL_FLAG(pwmi_channel, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001522 (((pwmi_channel)->info & (1 << flag)) >> flag)
1523
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301524#define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001525 (pwmi_channel)->reg_info_1 &= 0xffffff00; \
1526 (pwmi_channel)->reg_info_1 |= (val&0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301527} while (0)
1528#define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001529
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301530#define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001531 (pwmi_channel)->reg_info_1 &= 0xffff00ff; \
1532 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 8); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301533} while (0)
1534#define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001535
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301536#define WMI_SET_CHANNEL_REG_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001537 (pwmi_channel)->reg_info_1 &= 0xff00ffff; \
1538 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 16); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301539} while (0)
1540#define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
1541#define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001542 (pwmi_channel)->reg_info_1 &= 0x00ffffff; \
1543 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 24); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301544} while (0)
1545#define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001546
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301547#define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001548 (pwmi_channel)->reg_info_2 &= 0xffffff00; \
1549 (pwmi_channel)->reg_info_2 |= (val&0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301550} while (0)
1551#define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001552
1553/* max tx power is in 1 dBm units */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301554#define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001555 (pwmi_channel)->reg_info_2 &= 0xffff00ff; \
1556 (pwmi_channel)->reg_info_2 |= ((val&0xff)<<8); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301557} while (0)
1558#define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001559
1560
1561/** HT Capabilities*/
1562#define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
1563#define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
1564#define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
1565#define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
1566#define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
1567#define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
1568#define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
1569#define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
1570#define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
1571#define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
1572#define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
1573#define WMI_HT_CAP_HT40_SGI 0x0800
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301574#define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */
1575#define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001576
1577/* These macros should be used when we wish to advertise STBC support for
1578 * only 1SS or 2SS or 3SS. */
1579#define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
1580#define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
1581#define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
1582
1583#define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
1584 WMI_HT_CAP_HT20_SGI | \
1585 WMI_HT_CAP_HT40_SGI | \
1586 WMI_HT_CAP_TX_STBC | \
1587 WMI_HT_CAP_RX_STBC | \
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301588 WMI_HT_CAP_LDPC | \
1589 WMI_HT_CAP_TX_LDPC | \
1590 WMI_HT_CAP_RX_LDPC)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001591
1592/* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
1593 field. The fields not defined here are not supported, or reserved.
1594 Do not change these masks and if you have to add new one follow the
1595 bitmask as specified by 802.11ac draft.
1596 */
1597
1598#define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
1599#define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
1600#define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
1601#define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004
1602#define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008
1603#define WMI_VHT_CAP_RX_LDPC 0x00000010
1604#define WMI_VHT_CAP_SGI_80MHZ 0x00000020
1605#define WMI_VHT_CAP_SGI_160MHZ 0x00000040
1606#define WMI_VHT_CAP_TX_STBC 0x00000080
1607#define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
1608#define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
1609#define WMI_VHT_CAP_SU_BFORMER 0x00000800
1610#define WMI_VHT_CAP_SU_BFORMEE 0x00001000
1611#define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
1612#define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
1613#define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
1614#define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
1615#define WMI_VHT_CAP_MU_BFORMER 0x00080000
1616#define WMI_VHT_CAP_MU_BFORMEE 0x00100000
1617#define WMI_VHT_CAP_TXOP_PS 0x00200000
1618#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
1619#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
1620#define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
1621#define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301622#define WMI_VHT_CAP_TX_LDPC 0x40000000
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001623
1624/* TEMPORARY:
1625 * Preserve the incorrect old name as an alias for the correct new name
1626 * until all references to the old name have been removed from all hosts
1627 * and targets.
1628 */
1629#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
1630
1631/* These macros should be used when we wish to advertise STBC support for
1632 * only 1SS or 2SS or 3SS. */
1633#define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
1634#define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
1635#define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
1636
1637/* TEMPORARY:
1638 * Preserve the incorrect old name as an alias for the correct new name
1639 * until all references to the old name have been removed from all hosts
1640 * and targets.
1641 */
1642#define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
1643
1644#define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
1645 WMI_VHT_CAP_SGI_80MHZ | \
1646 WMI_VHT_CAP_TX_STBC | \
1647 WMI_VHT_CAP_RX_STBC_MASK | \
1648 WMI_VHT_CAP_RX_LDPC | \
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301649 WMI_VHT_CAP_TX_LDPC | \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001650 WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
1651 WMI_VHT_CAP_RX_FIXED_ANT | \
1652 WMI_VHT_CAP_TX_FIXED_ANT)
1653
1654/* Interested readers refer to Rx/Tx MCS Map definition as defined in
1655 802.11ac
1656 */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301657#define WMI_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001658#define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
1659#define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
1660
Govind Singhd24f5e42016-02-22 15:16:46 +05301661/** 11ax capabilities */
1662#define WMI_HE_CAP_PPE_PRESENT 0x00000001
1663#define WMI_HE_CAP_TWT_RESPONDER_SUPPORT 0x00000002
1664#define WMI_HE_CAP_TWT_REQUESTER_SUPPORT 0x00000004
1665#define WMI_HE_FRAG_SUPPORT_MASK 0x00000018
1666#define WMI_HE_FRAG_SUPPORT_SHIFT 3
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07001667
1668
1669/* fragmentation support field value */
1670enum {
1671 WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */
1672 /*
1673 * support for fragments within a VHT single MPDU,
1674 * no support for fragments within AMPDU
1675 */
1676 WMI_HE_FRAG_SUPPORT_LEVEL1,
1677 /* support for up to 1 fragment per MSDU within a single A-MPDU */
1678 WMI_HE_FRAG_SUPPORT_LEVEL2,
1679 /* support for multiple fragments per MSDU within an A-MPDU */
1680 WMI_HE_FRAG_SUPPORT_LEVEL3,
1681};
1682
1683
Govind Singhd24f5e42016-02-22 15:16:46 +05301684/** NOTE: This defs cannot be changed in the future without
1685 * breaking WMI compatibility
1686 */
Himanshu Agarwal97005de2016-09-09 12:46:04 +05301687#define WMI_MAX_NUM_SS MAX_HE_NSS
1688#define WMI_MAX_NUM_RU MAX_HE_RU
Govind Singhd24f5e42016-02-22 15:16:46 +05301689
1690/*
1691 * Figure 8 554ae: -PPE Threshold Info field format
1692 * we pack PPET16 and PPT8 for four RU's in one element of array.
1693 *
1694 * ppet16_ppet8_ru3_ru0 array element 0 holds:
Himanshu Agarwal2690e462016-06-03 14:26:01 +05301695 * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
Govind Singhd24f5e42016-02-22 15:16:46 +05301696 *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1|
1697 *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
1698 *
1699 * ppet16_ppet8_ru3_ru0 array element 1 holds:
Himanshu Agarwal2690e462016-06-03 14:26:01 +05301700 * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
Govind Singhd24f5e42016-02-22 15:16:46 +05301701 *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1|
1702 *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
1703 *
1704 * etc.
1705 */
1706
1707/*
1708 * Note that in these macros, "ru" is one-based, not zero-based, while
1709 * nssm1 is zero-based.
1710 */
Himanshu Agarwal2690e462016-06-03 14:26:01 +05301711#define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ppet, ru, nssm1) \
Govind Singhd24f5e42016-02-22 15:16:46 +05301712 do { \
1713 ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1)%4)*6)); \
1714 ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1)%4)*6)); \
1715 } while (0)
1716
Himanshu Agarwal2690e462016-06-03 14:26:01 +05301717#define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \
Govind Singhd24f5e42016-02-22 15:16:46 +05301718 ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1)%4)*6))&7)
1719
Himanshu Agarwal2690e462016-06-03 14:26:01 +05301720#define WMI_SET_PPET8(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+3)); \
1723 ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1)%4)*6+3)); \
1724 } while (0)
1725
Himanshu Agarwal2690e462016-06-03 14:26:01 +05301726#define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \
Govind Singhd24f5e42016-02-22 15:16:46 +05301727 ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1)%4)*6+3))&7)
1728
1729typedef struct _wmi_ppe_threshold {
1730 A_UINT32 numss_m1; /** NSS - 1*/
1731 A_UINT32 ru_count; /** Max RU count */
1732 /** ppet8 and ppet16 for max num ss */
1733 A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS];
1734} wmi_ppe_threshold;
1735
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001736/* WMI_SYS_CAPS_* refer to the capabilities that system support
1737 */
1738#define WMI_SYS_CAP_ENABLE 0x00000001
1739#define WMI_SYS_CAP_TXPOWER 0x00000002
1740
1741/*
1742 * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
1743 * Bits 5:0 are reserved
1744 */
1745#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
1746#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
1747#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
1748#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
1749#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
1750#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
1751#define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7)
1752#define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
1753
1754#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
1755#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
1756#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
1757#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
1758#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
1759#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
1760#define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
1761#define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
1762
1763#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
1764 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
1765#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
1766 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
1767#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
1768 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
1769#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
1770 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
1771#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
1772 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
1773#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
1774 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
1775#define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \
1776 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
1777#define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
1778 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
1779
1780#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
1781 ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
1782#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
1783 ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
1784#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
1785 ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
1786#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
1787 ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
1788#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
1789 ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
1790#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
1791 ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
1792#define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \
1793 ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
1794#define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \
1795 ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
1796
1797#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31)
1798#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30)
1799#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29)
1800
1801#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
1802#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
1803#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
1804
1805#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
1806 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
1807#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
1808 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
1809#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
1810 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
1811
1812#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \
1813 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
1814#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \
1815 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
1816#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \
1817 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
1818
1819#define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31)
1820#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30)
1821
1822#define WMI_DBS_FW_MODE_CFG_DBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
1823#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
1824
1825#define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
1826 WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
1827#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
1828 WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
1829
1830#define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \
1831 ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
1832#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \
1833 ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
1834
1835/** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
1836typedef struct _wmi_abi_version {
1837 A_UINT32 abi_version_0;
1838 /** WMI Major and Minor versions */
1839 A_UINT32 abi_version_1;
1840 /** WMI change revision */
1841 A_UINT32 abi_version_ns_0;
1842 /** ABI version namespace first four dwords */
1843 A_UINT32 abi_version_ns_1;
1844 /** ABI version namespace second four dwords */
1845 A_UINT32 abi_version_ns_2;
1846 /** ABI version namespace third four dwords */
1847 A_UINT32 abi_version_ns_3;
1848 /** ABI version namespace fourth four dwords */
1849} wmi_abi_version;
1850
1851/*
1852 * maximum number of memroy requests allowed from FW.
1853 */
1854#define WMI_MAX_MEM_REQS 16
1855
1856/* !!NOTE!!:
1857 * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
1858 * Please don't change it.
1859 */
1860#define HW_BD_INFO_SIZE 5
1861
1862/**
Govind Singh869c9872016-02-22 18:36:34 +05301863 * PDEV ID to identify the physical device,
1864 * value 0 reserved for SOC level commands/event
1865 */
1866#define WMI_PDEV_ID_SOC 0 /* SOC level, applicable to all PDEVs */
1867#define WMI_PDEV_ID_1ST 1 /* first pdev (pdev 0) */
1868#define WMI_PDEV_ID_2ND 2 /* second pdev (pdev 1) */
1869#define WMI_PDEV_ID_3RD 3 /* third pdev (pdev 2) */
1870
1871/**
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001872 * The following struct holds optional payload for
1873 * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
1874 * device capability to the host.
1875 */
1876typedef struct {
1877 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
1878 A_UINT32 fw_build_vers; /* firmware build number */
1879 wmi_abi_version fw_abi_vers;
1880 A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
1881 A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
1882 A_UINT32 num_rf_chains;
1883 /* The following field is only valid for service type WMI_SERVICE_11AC */
1884 A_UINT32 ht_cap_info; /* WMI HT Capability */
1885 A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
1886 A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
1887 A_UINT32 hw_min_tx_power;
1888 A_UINT32 hw_max_tx_power;
1889 A_UINT32 sys_cap_info;
1890 A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
1891 /** Max beacon and Probe Response IE offload size (includes
1892 * optional P2P IEs) */
1893 A_UINT32 max_bcn_ie_size;
1894 /*
1895 * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
1896 * FW uses this as FW extesnsion memory for saving its data structures. Only valid
1897 * for low latency interfaces like PCIE where FW can access this memory directly (or)
1898 * by DMA.
1899 */
1900 A_UINT32 num_mem_reqs;
1901 /* Max No. scan channels target can support
1902 * If FW is too old and doesn't indicate this number, host side value will default to
1903 * 0, and host will take the original compatible value (62) for future scan channel
1904 * setup.
1905 */
1906 A_UINT32 max_num_scan_channels;
1907
1908 /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
1909 * Default 0 means tha hw_bd_info[] is invalid(legacy board).
1910 */
1911 A_UINT32 hw_bd_id;
1912 A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
1913
1914 /*
1915 * Number of MACs supported, i.e. a DBS-capable device will return 2
1916 */
1917 A_UINT32 max_supported_macs;
1918
1919 /*
1920 * FW sub-feature capabilities to be used in concurrence with
1921 * wmi_service_bitmap
1922 * values from enum WMI_FW_SUB_FEAT_CAPS
1923 */
1924 A_UINT32 wmi_fw_sub_feat_caps;
1925 /*
1926 * Number of Dual Band Simultaneous (DBS) hardware modes
1927 */
1928 A_UINT32 num_dbs_hw_modes;
1929 /*
1930 * txrx_chainmask
1931 * [7:0] - 2G band tx chain mask
1932 * [15:8] - 2G band rx chain mask
1933 * [23:16] - 5G band tx chain mask
1934 * [31:24] - 5G band rx chain mask
1935 *
1936 */
1937 A_UINT32 txrx_chainmask;
1938
1939 /*
1940 * default Dual Band Simultaneous (DBS) hardware mode
1941 */
1942 A_UINT32 default_dbs_hw_mode_index;
1943
1944 /*
1945 * Number of msdu descriptors target would use
1946 */
1947 A_UINT32 num_msdu_desc;
1948
1949 /* The TLVs for hal_reg_capabilities, wmi_service_bitmap and mem_reqs[] will follow this TLV.
1950 * HAL_REG_CAPABILITIES hal_reg_capabilities;
1951 * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
1952 * wlan_host_mem_req mem_reqs[];
1953 * wlan_dbs_hw_mode_list[];
1954 */
1955} wmi_service_ready_event_fixed_param;
1956
Nitesh Shahca1b2d02016-07-21 12:59:24 +05301957#define WMI_SERVICE_SEGMENT_BM_SIZE32 4 /* 4x A_UINT32 = 128 bits */
1958typedef struct {
1959 /**
1960 * TLV tag and len; tag equals
1961 * WMITLV_TAG_STRUC_wmi_service_available_event_fixed_param
1962 */
1963 A_UINT32 tlv_header;
1964 /**
1965 * The wmi_service_segment offset field specifies the position
1966 * within the logical bitmap of WMI service flags at which the
1967 * WMI service flags specified within this message begin.
1968 * Since the first 128 WMI service flags are specified within
1969 * the wmi_service_bitmap field of the WMI_SERVICE_READY_EVENT
1970 * message, the wmi_service_segment_offset value is expected to
1971 * be 128 or more.
1972 */
1973 A_UINT32 wmi_service_segment_offset;
1974 A_UINT32 wmi_service_segment_bitmap[WMI_SERVICE_SEGMENT_BM_SIZE32];
1975} wmi_service_available_event_fixed_param;
1976
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001977typedef struct {
1978 /* TLV tag and len; tag equals
1979 *WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT
1980 */
1981 A_UINT32 tlv_header;
1982 /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
1983 A_UINT32 default_conc_scan_config_bits;
1984 /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
1985 A_UINT32 default_fw_config_bits;
Govind Singhd24f5e42016-02-22 15:16:46 +05301986 wmi_ppe_threshold ppet;
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07001987 /*
1988 * see section 8.4.2.213 from draft r8 of 802.11ax;
1989 * see WMI_HE_FRAG_SUPPORT enum
1990 */
Govind Singhd24f5e42016-02-22 15:16:46 +05301991 A_UINT32 he_cap_info;
Govind Singh76d82bc2016-02-22 15:39:48 +05301992 /*
1993 * An HT STA shall not allow transmission of more than one MPDU start
1994 * within the time limit described in the MPDU maximum density field.
1995 */
1996 A_UINT32 mpdu_density; /* units are microseconds */
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05301997 /*
1998 * Maximum no of BSSID based RX filters host can program
1999 * Value 0 means FW hasn't given any limit to host.
2000 */
2001 A_UINT32 max_bssid_rx_filters;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002002} wmi_service_ready_ext_event_fixed_param;
2003
2004typedef enum {
2005 WMI_HWBD_NONE = 0, /* No hw board information is given */
2006 WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */
2007 WMI_HWBD_QCA2582 = 2, /* Killer 1525 */
2008} WMI_HWBD_ID;
2009
2010typedef enum {
2011 WMI_FW_STA_RTT_INITR = 0x00000001,
2012 WMI_FW_STA_RTT_RESPR = 0x00000002,
2013 WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
2014 WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
2015 WMI_FW_P2P_GO_RTT_INITR = 0x00000010,
2016 WMI_FW_P2P_GO_RTT_RESPR = 0x00000020,
2017 WMI_FW_AP_RTT_INITR = 0x00000040,
2018 WMI_FW_AP_RTT_RESPR = 0x00000080,
2019 WMI_FW_NAN_RTT_INITR = 0x00000100,
2020 WMI_FW_NAN_RTT_RESPR = 0x00000200,
2021 /*
2022 * New fw sub feature capabilites before
2023 * WMI_FW_MAX_SUB_FEAT_CAP
2024 */
2025 WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000,
2026} WMI_FW_SUB_FEAT_CAPS;
2027
2028#define ATH_BD_DATA_REV_MASK 0x000000FF
2029#define ATH_BD_DATA_REV_SHIFT 0
2030
2031#define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00
2032#define ATH_BD_DATA_PROJ_ID_SHIFT 8
2033
2034#define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000
2035#define ATH_BD_DATA_CUST_ID_SHIFT 16
2036
2037#define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000
2038#define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
2039
2040#define SET_BD_DATA_REV(bd_data_ver, value) \
2041 ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
2042
2043#define GET_BD_DATA_REV(bd_data_ver) \
2044 (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
2045
2046#define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
2047 ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
2048
2049#define GET_BD_DATA_PROJ_ID(bd_data_ver) \
2050 (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
2051
2052#define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
2053 ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
2054
2055#define GET_BD_DATA_CUST_ID(bd_data_ver) \
2056 (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
2057
2058#define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \
2059 ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
2060
2061#define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \
2062 (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
2063
2064#ifdef ROME_LTE_COEX_FREQ_AVOID
2065typedef struct {
2066 A_UINT32 start_freq; /* start frequency, not channel center freq */
2067 A_UINT32 end_freq; /* end frequency */
2068} avoid_freq_range_desc;
2069
2070typedef struct {
2071 /* bad channel range count, multi range is allowed, 0 means all channel clear */
2072 A_UINT32 num_freq_ranges;
2073 /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
2074 avoid_freq_range_desc avd_freq_range[0];
2075} wmi_wlan_avoid_freq_ranges_event;
2076#endif
2077
2078/** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that retuned status */
2079#define WLAN_INIT_STATUS_SUCCESS 0x0
2080#define WLAN_INIT_STATUS_GEN_FAILED 0x1
2081#define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
2082#define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
2083
2084typedef A_UINT32 WLAN_INIT_STATUS;
2085
2086typedef struct {
2087 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
2088 wmi_abi_version fw_abi_vers;
2089 wmi_mac_addr mac_addr;
2090 A_UINT32 status;
Rajeev Kumare18f5282016-04-15 14:08:29 -07002091 A_UINT32 num_dscp_table;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002092} wmi_ready_event_fixed_param;
2093
2094typedef struct {
2095 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
2096/**
2097 * @brief num_vdev - number of virtual devices (VAPs) to support
2098 */
2099 A_UINT32 num_vdevs;
2100/**
2101 * @brief num_peers - number of peer nodes to support
2102 */
2103 A_UINT32 num_peers;
2104/*
2105 * @brief In offload mode target supports features like WOW, chatter and other
2106 * protocol offloads. In order to support them some functionalities like
2107 * reorder buffering, PN checking need to be done in target. This determines
2108 * maximum number of peers suported by target in offload mode
2109 */
2110 A_UINT32 num_offload_peers;
2111/* @brief Number of reorder buffers available for doing target based reorder
2112 * Rx reorder buffering
2113 */
2114 A_UINT32 num_offload_reorder_buffs;
2115/**
2116 * @brief num_peer_keys - number of keys per peer
2117 */
2118 A_UINT32 num_peer_keys;
2119/**
2120 * @brief num_peer_tids - number of TIDs to provide storage for per peer.
2121 */
2122 A_UINT32 num_tids;
2123/**
2124 * @brief ast_skid_limit - max skid for resolving hash collisions
2125 * @details
2126 * The address search table is sparse, so that if two MAC addresses
2127 * result in the same hash value, the second of these conflicting
2128 * entries can slide to the next index in the address search table,
2129 * and use it, if it is unoccupied. This ast_skid_limit parameter
2130 * specifies the upper bound on how many subsequent indices to search
2131 * over to find an unoccupied space.
2132 */
2133 A_UINT32 ast_skid_limit;
2134/**
2135 * @brief tx_chain_mask - the nominal chain mask for transmit
2136 * @details
2137 * The chain mask may be modified dynamically, e.g. to operate AP tx with
2138 * a reduced number of chains if no clients are associated.
2139 * This configuration parameter specifies the nominal chain-mask that
2140 * should be used when not operating with a reduced set of tx chains.
2141 */
2142 A_UINT32 tx_chain_mask;
2143/**
2144 * @brief rx_chain_mask - the nominal chain mask for receive
2145 * @details
2146 * The chain mask may be modified dynamically, e.g. for a client to use
2147 * a reduced number of chains for receive if the traffic to the client
2148 * is low enough that it doesn't require downlink MIMO or antenna
2149 * diversity.
2150 * This configuration parameter specifies the nominal chain-mask that
2151 * should be used when not operating with a reduced set of rx chains.
2152 */
2153 A_UINT32 rx_chain_mask;
2154/**
2155 * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
2156 * @details
2157 * Each WMM access class (voice, video, best-effort, background) will
2158 * have its own timeout value to dictate how long to wait for missing
2159 * rx MPDUs to arrive before flushing subsequent MPDUs that have already
2160 * been received.
2161 * This parameter specifies the timeout in milliseconds for each class .
2162 * NOTE: the number of class (defined as 4) cannot be
2163 * changed in the future without breaking WMI compatibility.
2164 */
2165 A_UINT32 rx_timeout_pri[4];
2166/**
2167 * @brief rx_decap mode - what mode the rx should decap packets to
2168 * @details
2169 * MAC can decap to RAW (no decap), native wifi or Ethernet types
2170 * THis setting also determines the default TX behavior, however TX
2171 * behavior can be modified on a per VAP basis during VAP init
2172 */
2173 A_UINT32 rx_decap_mode;
2174 /**
2175 * @brief scan_max_pending_req - what is the maximum scan requests than can be queued
2176 */
2177 A_UINT32 scan_max_pending_req;
2178
2179 /**
2180 * @brief maximum VDEV that could use BMISS offload
2181 */
2182 A_UINT32 bmiss_offload_max_vdev;
2183
2184 /**
2185 * @brief maximum VDEV that could use offload roaming
2186 */
2187 A_UINT32 roam_offload_max_vdev;
2188
2189 /**
2190 * @brief maximum AP profiles that would push to offload roaming
2191 */
2192 A_UINT32 roam_offload_max_ap_profiles;
2193
2194/**
2195 * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
2196 * @details
2197 * The target's WAL maintains a table to hold information regarding which
2198 * peers belong to a given multicast group, so that if multicast->unicast
2199 * conversion is enabled, the target can convert multicast tx frames to a
2200 * series of unicast tx frames, to each peer within the multicast group.
2201 * This num_mcast_groups configuration parameter tells the target how
2202 * many multicast groups to provide storage for within its multicast
2203 * group membership table.
2204 */
2205 A_UINT32 num_mcast_groups;
2206
2207/**
2208 * @brief num_mcast_table_elems - size to alloc for the mcast membership table
2209 * @details
2210 * This num_mcast_table_elems configuration parameter tells the target
2211 * how many peer elements it needs to provide storage for in its
2212 * multicast group membership table.
2213 * These multicast group membership table elements are shared by the
2214 * multicast groups stored within the table.
2215 */
2216 A_UINT32 num_mcast_table_elems;
2217
2218/**
2219 * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
2220 * @details
2221 * This configuration parameter specifies whether the target should
2222 * perform multicast --> unicast conversion on transmit, and if so,
2223 * what to do if it finds no entries in its multicast group membership
2224 * table for the multicast IP address in the tx frame.
2225 * Configuration value:
2226 * 0 -> Do not perform multicast to unicast conversion.
2227 * 1 -> Convert multicast frames to unicast, if the IP multicast address
2228 * from the tx frame is found in the multicast group membership
2229 * table. If the IP multicast address is not found, drop the frame.
2230 * 2 -> Convert multicast frames to unicast, if the IP multicast address
2231 * from the tx frame is found in the multicast group membership
2232 * table. If the IP multicast address is not found, transmit the
2233 * frame as multicast.
2234 */
2235 A_UINT32 mcast2ucast_mode;
2236
2237 /**
2238 * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
2239 * @details
2240 * This parameter controls how much memory the target will allocate to
2241 * store a log of tx PPDU meta-information (how large the PPDU was,
2242 * when it was sent, whether it was successful, etc.)
2243 */
2244 A_UINT32 tx_dbg_log_size;
2245
2246 /**
2247 * @brief num_wds_entries - how many AST entries to be allocated for WDS
2248 */
2249 A_UINT32 num_wds_entries;
2250
2251 /**
2252 * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
2253 * this limit can be 0 -default, 1 256B
2254 */
2255 A_UINT32 dma_burst_size;
2256
2257 /**
2258 * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
2259 * to account for interface latency to avoid underrun.
2260 */
2261 A_UINT32 mac_aggr_delim;
2262 /**
2263 * @brief rx_skip_defrag_timeout_dup_detection_check
2264 * @details
2265 * determine whether target is responsible for detecting duplicate
2266 * non-aggregate MPDU and timing out stale fragments.
2267 *
2268 * A-MPDU reordering is always performed on the target.
2269 *
2270 * 0: target responsible for frag timeout and dup checking
2271 * 1: host responsible for frag timeout and dup checking
2272 */
2273 A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
2274
2275 /**
2276 * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
2277 * and Max no of descriptors for each Video link (node).
2278 */
2279 A_UINT32 vow_config;
2280
2281 /**
2282 * @brief maximum VDEV that could use GTK offload
2283 */
2284 A_UINT32 gtk_offload_max_vdev;
2285
2286 /**
2287 * @brief num_msdu_desc - Number of msdu descriptors target should use
2288 */
2289 A_UINT32 num_msdu_desc; /* Number of msdu desc */
2290 /**
2291 * @brief max_frag_entry - Max. number of Tx fragments per MSDU
2292 * @details
2293 * This parameter controls the max number of Tx fragments per MSDU.
2294 * This is sent by the target as part of the WMI_SERVICE_READY event
2295 * and is overriden by the OS shim as required.
2296 */
2297 A_UINT32 max_frag_entries;
2298
2299 /**
2300 * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
2301 * @brief num_msdu_desc - Number of vdev that can support beacon offload
2302 */
2303
2304 A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
2305
2306 /**
2307 * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
2308 * @details
2309 * Each TDLS enabled vdev can track outgoing transmits/rssi/rates to/of
2310 * peers in a connection tracking table for possible TDLS link creation
2311 * or deletion. This controls the number of tracked peers per vdev.
2312 */
2313 A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
2314 A_UINT32 beacon_tx_offload_max_vdev;
2315 A_UINT32 num_multicast_filter_entries;
2316 A_UINT32 num_wow_filters; /*host can configure the number of wow filters */
2317
2318 /**
2319 * @brief num_keep_alive_pattern - Num of keep alive patterns configured
2320 * from host.
2321 */
2322 A_UINT32 num_keep_alive_pattern;
2323 /**
2324 * @brief keep_alive_pattern_size - keep alive pattern size.
2325 */
2326 A_UINT32 keep_alive_pattern_size;
2327
2328 /**
2329 * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
2330 * @details
2331 * Each TDLS STA can become a sleep STA independently. This parameter
2332 * mentions how many such sleep STAs can be supported concurrently.
2333 */
2334 A_UINT32 max_tdls_concurrent_sleep_sta;
2335
2336 /**
2337 * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
2338 * @details
2339 * Each TDLS STA can become a buffer STA independently. This parameter
2340 * mentions how many such buffer STAs can be supported concurrently.
2341 */
2342 A_UINT32 max_tdls_concurrent_buffer_sta;
2343
2344 /**
2345 * @brief wmi_send_separate - host configures fw to send the wmi separately
2346 */
2347 A_UINT32 wmi_send_separate;
2348
2349 /**
2350 * @brief num_ocb_vdevs - Number of vdevs used for OCB support
2351 */
2352 A_UINT32 num_ocb_vdevs;
2353
2354 /**
2355 * @brief num_ocb_channels - The supported number of simultaneous OCB channels
2356 */
2357 A_UINT32 num_ocb_channels;
2358
2359 /**
2360 * @brief num_ocb_schedules - The supported number of OCB schedule segments
2361 */
2362 A_UINT32 num_ocb_schedules;
Manikandan Mohan30728082015-12-09 12:35:24 -08002363 /**
2364 * @brief specific configuration from host, such as per platform configuration
2365 */
2366 #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
2367 #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002368
2369 #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
2370 #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
2371
2372 #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
2373 #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
2374
2375 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
2376 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
2377
2378 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
2379 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
2380
2381 #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
2382 #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
2383
2384 #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
2385 #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
2386
2387 #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
2388 #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
2389
2390 #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
2391 #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
2392
Pradeep Reddy POTTETI67c778a2016-06-20 14:00:38 +05302393 #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_S 9
2394 #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_M 0x200
2395
Manikandan Mohan30728082015-12-09 12:35:24 -08002396 A_UINT32 flag1;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002397
2398 /** @brief smart_ant_cap - Smart Antenna capabilities information
2399 * @details
2400 * 1 - Smart antenna is enabled.
2401 * 0 - Smart antenna is disabled.
2402 * In future this can contain smart antenna specifc capabilities.
2403 */
2404 A_UINT32 smart_ant_cap;
2405
2406 /**
2407 * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
2408 * during init
2409 */
2410 A_UINT32 BK_Minfree;
2411 A_UINT32 BE_Minfree;
2412 A_UINT32 VI_Minfree;
2413 A_UINT32 VO_Minfree;
2414
2415 /**
2416 * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
2417 * descriptor memory allocation.
2418 * 1 - Allocate fragment descriptor memory for data packet in firmware.
2419 * If host wants to transmit data packet at its desired rate,
2420 * this field must be set.
2421 * 0 - Don't allocate fragment descriptor for data packet.
2422 */
2423 A_UINT32 alloc_frag_desc_for_data_pkt;
Govind Singh86180292016-02-01 14:03:37 +05302424
2425 /*
2426 * how much space to allocate for NDP NS (neighbor solicitation)
2427 * specs
2428 */
2429 A_UINT32 num_ns_ext_tuples_cfg;
Sandeep Puligillab6ddc262016-03-09 13:06:16 -08002430 /**
2431 * size (in bytes) of the buffer the FW shall allocate to store
2432 * packet filtering instructions
2433 */
2434 A_UINT32 bpf_instruction_size;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05302435 /**
2436 * Maximum no of BSSID based RX filters host would program
2437 * Value 0 means host doesn't given any limit to FW.
2438 */
2439 A_UINT32 max_bssid_rx_filters;
Krishna Kumaar Natarajan7dde8c72016-03-25 15:11:49 -07002440 /**
2441 * Use PDEV ID instead of MAC ID, added for backward compatibility with
2442 * older host which is using MAC ID. 1 means PDEV ID, 0 means MAC ID.
2443 */
2444 A_UINT32 use_pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002445} wmi_resource_config;
2446
Manikandan Mohan30728082015-12-09 12:35:24 -08002447#define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
2448 do { \
2449 (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
2450 (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
2451 WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
2452 } while (0)
2453#define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
2454 (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
2455 WMI_RSRC_CFG_FLAG_ ## flag ## _S)
2456
2457#define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
2458 WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
2459#define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
2460 WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
2461
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002462#define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
2463 WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
2464#define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
2465 WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
2466
2467#define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
2468 WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
2469#define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
2470 WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
2471
2472#define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
2473 WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
2474#define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
2475 WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
2476
2477#define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
2478 WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
2479#define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
2480 WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
2481
2482#define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
2483 WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
2484#define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
2485 WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
2486
2487#define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
2488 WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
2489#define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
2490 WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
2491
2492#define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
2493 WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
2494#define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
2495 WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
2496
2497#define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
2498 WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
2499#define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
2500 WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
2501
Pradeep Reddy POTTETI67c778a2016-06-20 14:00:38 +05302502#define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(word32, value) \
2503 WMI_RSRC_CFG_FLAG_SET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT, (value))
2504#define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_GET(word32) \
2505 WMI_RSRC_CFG_FLAG_GET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT)
2506
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002507typedef struct {
2508 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
2509
2510 /** The following indicate the WMI versions to be supported by
2511 * the host driver. Note that the host driver decide to
2512 * "downgrade" its WMI version support and this may not be the
2513 * native version of the host driver. */
2514 wmi_abi_version host_abi_vers;
2515
2516 A_UINT32 num_host_mem_chunks;
2517 /** size of array host_mem_chunks[] */
Pradeep Reddy POTTETIa280b5c2016-06-20 14:16:23 +05302518 /* The TLVs for resource_config, host_mem_chunks[], and
2519 * hw_mode_config will follow.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002520 * wmi_resource_config resource_config;
2521 * wlan_host_memory_chunk host_mem_chunks[];
Pradeep Reddy POTTETIa280b5c2016-06-20 14:16:23 +05302522 * wmi_pdev_set_hw_mode_cmd_fixed_param hw_mode_config;
2523 * Note that the hw_mode_config, in spite of its "pdev" name,
2524 * applies to the entire target rather than for a single pdev
2525 * within the target.
2526 * To avoid specifying a HW mode for the target, the host should
2527 * fill hw_mode_config's fields with 0x0.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002528 */
2529
2530} wmi_init_cmd_fixed_param;
2531
2532/**
2533 * TLV for channel list
2534 */
2535typedef struct {
2536 /** WMI_CHAN_LIST_TAG */
2537 A_UINT32 tag;
2538 /** # of channels to scan */
2539 A_UINT32 num_chan;
2540 /** channels in Mhz */
2541 A_UINT32 channel_list[1];
2542} wmi_chan_list;
2543
2544/**
2545 * TLV for bssid list
2546 */
2547typedef struct {
2548 /** WMI_BSSID_LIST_TAG */
2549 A_UINT32 tag;
2550 /** number of bssids */
2551 A_UINT32 num_bssid;
2552 /** bssid list */
2553 wmi_mac_addr bssid_list[1];
2554} wmi_bssid_list;
2555
2556/**
2557 * TLV for ie data.
2558 */
2559typedef struct {
2560 /** WMI_IE_TAG */
2561 A_UINT32 tag;
2562 /** number of bytes in ie data */
2563 A_UINT32 ie_len;
2564 /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4 ) */
2565 A_UINT32 ie_data[1];
2566} wmi_ie_data;
2567
Nitesh Shahe5aa26b2016-07-08 12:03:44 +05302568/**
2569 * TLV used for length/buffer
2570 */
2571typedef struct {
2572 /**
2573 * TLV tag and len; tag equals
2574 * WMITLV_TAG_STRUC_wmi_tlv_buf_len_param
2575 */
2576 A_UINT32 tlv_header;
2577 A_UINT32 buf_len; /** Length of buf */
2578 /**
2579 * Following this structure is the TLV byte stream of buf
2580 * of length buf_len:
2581 * A_UINT8 buf[];
2582 *
2583 */
2584} wmi_tlv_buf_len_param;
2585
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002586typedef struct {
2587 /** Len of the SSID */
2588 A_UINT32 ssid_len;
2589 /** SSID */
2590 A_UINT32 ssid[8];
2591} wmi_ssid;
2592
2593typedef struct {
2594 /** WMI_SSID_LIST_TAG */
2595 A_UINT32 tag;
2596 A_UINT32 num_ssids;
2597 wmi_ssid ssids[1];
2598} wmi_ssid_list;
2599
2600/* prefix used by scan requestor ids on the host */
2601#define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
2602/* prefix used by scan request ids generated on the host */
2603/* host cycles through the lower 12 bits to generate ids */
2604#define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
2605
2606#define WLAN_SCAN_PARAMS_MAX_SSID 16
2607#define WLAN_SCAN_PARAMS_MAX_BSSID 4
2608#define WLAN_SCAN_PARAMS_MAX_IE_LEN 512
2609
2610typedef struct {
2611 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
2612 /** Scan ID */
2613 A_UINT32 scan_id;
2614 /** Scan requestor ID */
2615 A_UINT32 scan_req_id;
2616 /** VDEV id(interface) that is requesting scan */
2617 A_UINT32 vdev_id;
2618 /** Scan Priority, input to scan scheduler */
2619 A_UINT32 scan_priority;
2620 /** Scan events subscription */
2621 A_UINT32 notify_scan_events;
2622 /** dwell time in msec on active channels */
2623 A_UINT32 dwell_time_active;
2624 /** dwell time in msec on passive channels */
2625 A_UINT32 dwell_time_passive;
2626 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
2627 A_UINT32 min_rest_time;
2628 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
2629 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
2630 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
2631 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
2632 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
2633 * irrespective of activity. activity is determined by the idle_time parameter.
2634 */
2635 A_UINT32 max_rest_time;
2636 /** time before sending next set of probe requests.
2637 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
2638 * The number of probe requests specified depends on the ssid_list and bssid_list
2639 */
2640 A_UINT32 repeat_probe_time;
2641 /** time in msec between 2 consequetive probe requests with in a set. */
2642 A_UINT32 probe_spacing_time;
2643 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
2644 A_UINT32 idle_time;
2645 /** maximum time in msec allowed for scan */
2646 A_UINT32 max_scan_time;
2647 /** delay in msec before sending first probe request after switching to a channel */
2648 A_UINT32 probe_delay;
2649 /** Scan control flags */
2650 A_UINT32 scan_ctrl_flags;
2651 /** Burst duration time in msec*/
2652 A_UINT32 burst_duration;
2653
2654 /** # if channels to scan. In the TLV channel_list[] */
2655 A_UINT32 num_chan;
2656 /** number of bssids. In the TLV bssid_list[] */
2657 A_UINT32 num_bssid;
2658 /** number of ssid. In the TLV ssid_list[] */
2659 A_UINT32 num_ssids;
2660 /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
2661 A_UINT32 ie_len;
2662 /** Max number of probes to be sent */
2663 A_UINT32 n_probes;
2664
2665 /**
2666 * TLV (tag length value ) parameters follow the scan_cmd
2667 * structure. The TLV's are:
2668 * A_UINT32 channel_list[];
2669 * wmi_ssid ssid_list[];
2670 * wmi_mac_addr bssid_list[];
2671 * A_UINT8 ie_data[];
2672 */
2673} wmi_start_scan_cmd_fixed_param;
2674
2675/**
2676 * scan control flags.
2677 */
2678
2679/** passively scan all channels including active channels */
2680#define WMI_SCAN_FLAG_PASSIVE 0x1
2681/** add wild card ssid probe request even though ssid_list is specified. */
2682#define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
2683/** add cck rates to rates/xrate ie for the generated probe request */
2684#define WMI_SCAN_ADD_CCK_RATES 0x4
2685/** add ofdm rates to rates/xrate ie for the generated probe request */
2686#define WMI_SCAN_ADD_OFDM_RATES 0x8
2687/** To enable indication of Chan load and Noise floor to host */
2688#define WMI_SCAN_CHAN_STAT_EVENT 0x10
2689/** Filter Probe request frames */
2690#define WMI_SCAN_FILTER_PROBE_REQ 0x20
2691/**When set, not to scan DFS channels*/
2692#define WMI_SCAN_BYPASS_DFS_CHN 0x40
2693/**When set, certain errors are ignored and scan continues.
2694 * Different FW scan engine may use its own logic to decide what errors to ignore*/
2695#define WMI_SCAN_CONTINUE_ON_ERROR 0x80
2696/** Enable promiscous mode for ese */
2697#define WMI_SCAN_FILTER_PROMISCOUS 0x100
2698/** allow to send probe req on DFS channel */
2699#define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
2700/** add TPC content in probe req frame */
2701#define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400
2702/** add DS content in probe req frame */
2703#define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800
2704/** use random mac address for TA for probe request frame and add
2705 * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
2706 * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/
2707#define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000
Govind Singh32cced32016-02-01 13:33:09 +05302708/** allow mgmt transmission during off channel scan */
2709#define WMI_SCAN_OFFCHAN_MGMT_TX 0x2000
2710/** allow data transmission during off channel scan */
2711#define WMI_SCAN_OFFCHAN_DATA_TX 0x4000
2712/** allow capture ppdu with phy errrors */
2713#define WMI_SCAN_CAPTURE_PHY_ERROR 0x8000
Sandeep Puligilla1d9a8d82016-03-09 13:07:58 -08002714/** always do passive scan on passive channels */
2715#define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x1000
Pradeep Reddy POTTETIb36e8fc2016-06-20 15:10:26 +05302716/** set HALF (10MHz) rate support */
2717#define WMI_SCAN_FLAG_HALF_RATE_SUPPORT 0x20000
2718/** set Quarter (5MHz) rate support */
2719#define WMI_SCAN_FLAG_QUARTER_RATE_SUPPORT 0x40000
2720
Anurag Chouhanb3fa7a12016-04-18 17:26:49 +05302721/** for adaptive scan mode using 3 bits (21 - 23 bits) */
2722#define WMI_SCAN_DWELL_MODE_MASK 0x00E00000
2723#define WMI_SCAN_DWELL_MODE_SHIFT 21
2724
2725typedef enum {
2726 WMI_SCAN_DWELL_MODE_DEFAULT = 0,
2727 WMI_SCAN_DWELL_MODE_CONSERVATIVE = 1,
2728 WMI_SCAN_DWELL_MODE_MODERATE = 2,
2729 WMI_SCAN_DWELL_MODE_AGGRESSIVE = 3,
2730 WMI_SCAN_DWELL_MODE_STATIC = 4,
2731} WMI_SCAN_DWELL_MODE;
2732
2733#define WMI_SCAN_SET_DWELL_MODE(flag, mode) \
2734 do { \
2735 (flag) |= (((mode) << WMI_SCAN_DWELL_MODE_SHIFT) & \
2736 WMI_SCAN_DWELL_MODE_MASK); \
2737 } while (0)
2738
2739#define WMI_SCAN_GET_DWELL_MODE(flag) \
2740 (((flag) & WMI_SCAN_DWELL_MODE_MASK) >> WMI_SCAN_DWELL_MODE_SHIFT)
2741
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002742/** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
2743#define WMI_SCAN_CLASS_MASK 0xFF000000
2744
2745/*
2746 * Masks identifying types/ID of scans
2747 * Scan_Stop macros should be the same value as below defined in UMAC
2748 * #define IEEE80211_SPECIFIC_SCAN 0x00000000
2749 * #define IEEE80211_VAP_SCAN 0x01000000
2750 * #define IEEE80211_ALL_SCANS 0x04000000
2751 */
2752#define WMI_SCAN_STOP_ONE 0x00000000
2753#define WMI_SCN_STOP_VAP_ALL 0x01000000
2754#define WMI_SCAN_STOP_ALL 0x04000000
2755
2756typedef struct {
2757 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
2758 /** requestor requesting cancel */
2759 A_UINT32 requestor;
2760 /** Scan ID */
2761 A_UINT32 scan_id;
2762 /**
2763 * Req Type
2764 * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
2765 * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
2766 * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
2767 * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
2768 */
2769 A_UINT32 req_type;
2770 /**
2771 * vDev ID
2772 * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
2773 */
2774 A_UINT32 vdev_id;
2775} wmi_stop_scan_cmd_fixed_param;
2776
2777#define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */
2778#define APPEND_TO_EXISTING_CHAN_LIST 1
2779
2780typedef struct {
2781 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
2782 A_UINT32 num_scan_chans;
2783 /** no of elements in chan_info[] */
2784 A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
2785 /** Followed by the variable length TLV chan_info:
2786 * wmi_channel chan_info[] */
2787} wmi_scan_chan_list_cmd_fixed_param;
2788
2789/*
2790 * Priority numbers must be sequential, starting with 0.
2791 */
2792/* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
2793typedef enum {
2794 WMI_SCAN_PRIORITY_VERY_LOW = 0,
2795 WMI_SCAN_PRIORITY_LOW,
2796 WMI_SCAN_PRIORITY_MEDIUM,
2797 WMI_SCAN_PRIORITY_HIGH,
2798 WMI_SCAN_PRIORITY_VERY_HIGH,
2799
2800 WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
2801} wmi_scan_priority;
2802
2803/* Five Levels for Requested Priority */
2804/* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */
2805typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
2806
2807/**
2808 * 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
2809 * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
2810 * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
2811 */
2812typedef struct {
2813 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
2814 /**
2815 * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
2816 * 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
2817 */
2818 A_UINT32 vdev_type;
2819 /**
2820 * number of rows in mapping_table for a specific vdev
2821 * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
2822 */
2823 A_UINT32 number_rows;
2824 /** mapping_table for a specific vdev follows this TLV
2825 * WLAN_PRIORITY_MAPPING mapping_table[]; */
2826} wmi_scan_sch_priority_table_cmd_fixed_param;
2827
2828/** update flags */
2829#define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1
2830#define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2
2831#define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4
2832
2833typedef struct {
2834 A_UINT32 tlv_header;
2835 /** requestor requesting update scan request */
2836 A_UINT32 requestor;
2837 /** Scan ID of the scan request that need to be update */
2838 A_UINT32 scan_id;
2839 /** update flags, indicating which of the following fields are valid and need to be updated*/
2840 A_UINT32 scan_update_flags;
2841 /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
2842 A_UINT32 scan_priority;
2843 /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
2844 A_UINT32 min_rest_time;
2845 /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
2846 A_UINT32 max_rest_time;
2847} wmi_scan_update_request_cmd_fixed_param;
2848
2849typedef struct {
2850 A_UINT32 tlv_header;
2851 /** oui to be used in probe request frame when random mac addresss is
2852 * requested part of scan parameters. this is applied to both FW internal scans and
2853 * host initated scans. host can request for random mac address with
2854 * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */
2855 A_UINT32 prob_req_oui;
2856} wmi_scan_prob_req_oui_cmd_fixed_param;
2857
2858enum wmi_scan_event_type {
2859 WMI_SCAN_EVENT_STARTED = 0x1,
2860 WMI_SCAN_EVENT_COMPLETED = 0x2,
2861 WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
2862 WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
2863 WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
2864 WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
2865 WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
Manikandan Mohan46b95c02015-12-09 12:23:08 -08002866 WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
2867 WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
Govind Singh45ef44a2016-02-01 17:45:22 +05302868 WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */
2869 WMI_SCAN_EVENT_RESUMED = 0x400, /* scan request is resumed */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002870 WMI_SCAN_EVENT_MAX = 0x8000
2871};
2872
2873enum wmi_scan_completion_reason {
2874 /** scan related events */
2875 WMI_SCAN_REASON_NONE = 0xFF,
2876 WMI_SCAN_REASON_COMPLETED = 0,
2877 WMI_SCAN_REASON_CANCELLED = 1,
2878 WMI_SCAN_REASON_PREEMPTED = 2,
2879 WMI_SCAN_REASON_TIMEDOUT = 3,
2880 WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
Govind Singh45ef44a2016-02-01 17:45:22 +05302881 WMI_SCAN_REASON_SUSPENDED = 5,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002882 WMI_SCAN_REASON_MAX,
2883};
2884
2885typedef struct {
2886 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
2887 /** scan event (wmi_scan_event_type) */
2888 A_UINT32 event;
2889 /** status of the scan completion event */
2890 A_UINT32 reason;
2891 /** channel freq , only valid for FOREIGN channel event*/
2892 A_UINT32 channel_freq;
2893 /**id of the requestor whose scan is in progress */
2894 A_UINT32 requestor;
2895 /**id of the scan that is in progress */
2896 A_UINT32 scan_id;
2897 /**id of VDEV that requested the scan */
2898 A_UINT32 vdev_id;
2899} wmi_scan_event_fixed_param;
2900
2901/* WMI Diag event */
2902typedef struct {
2903 A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
2904 A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
2905 A_UINT32 count; /* Number of diag frames added to current event */
2906 A_UINT32 dropped;
2907 /* followed by WMITLV_TAG_ARRAY_BYTE */
2908} wmi_diag_event_fixed_param;
2909
2910/*
2911 * If FW has multiple active channels due to MCC(multi channel concurrency),
2912 * then these stats are combined stats for all the active channels.
2913 */
2914typedef struct {
2915 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
2916 /** ack count, it is an incremental number, not accumulated number */
2917 A_UINT32 ackRcvBad;
2918 /** bad rts count, it is an incremental number, not accumulated number */
2919 A_UINT32 rtsBad;
2920 /** good rts, it is an incremental number, not accumulated number */
2921 A_UINT32 rtsGood;
2922 /** fcs count, it is an incremental number, not accumulated number */
2923 A_UINT32 fcsBad;
2924 /** beacon count, it is an incremental number, not accumulated number */
2925 A_UINT32 noBeacons;
2926} wmi_update_whal_mib_stats_event_fixed_param;
2927
2928/*
2929 * This defines how much headroom is kept in the
2930 * receive frame between the descriptor and the
2931 * payload, in order for the WMI PHY error and
2932 * management handler to insert header contents.
2933 *
2934 * This is in bytes.
2935 */
2936#define WMI_MGMT_RX_HDR_HEADROOM sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr)
2937
2938/** This event will be used for sending scan results
2939 * as well as rx mgmt frames to the host. The rx buffer
2940 * will be sent as part of this WMI event. It would be a
2941 * good idea to pass all the fields in the RX status
2942 * descriptor up to the host.
2943 */
2944/* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
2945#define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
2946
2947/** flag indicating that the the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
2948#define WMI_MGMT_RX_HDR_EXTSCAN 0x01
2949
2950/**
2951 * flag indicating that the the mgmt frame (probe req/beacon) is received in
2952 * the context of matched network by FW ENLO
2953 */
2954#define WMI_MGMT_RX_HDR_ENLO 0x02
2955
2956typedef struct {
2957 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
2958 /** channel on which this frame is received. */
2959 A_UINT32 channel;
2960 /** snr information used to cal rssi */
2961 A_UINT32 snr;
2962 /** Rate kbps */
2963 A_UINT32 rate;
2964 /** rx phy mode WLAN_PHY_MODE */
2965 A_UINT32 phy_mode;
2966 /** length of the frame */
2967 A_UINT32 buf_len;
2968 /** rx status */
2969 A_UINT32 status;
2970 /** RSSI of PRI 20MHz for each chain. */
2971 A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
2972 /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
2973 A_UINT32 flags;
2974 /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
2975 A_INT32 rssi;
2976
2977 /** delta between local TSF(TSF timestamp when frame was RXd)
2978 * and remote TSF(TSF timestamp in the IE for mgmt frame
2979 * beacon,proberesp for e.g). If remote TSF is not available,
2980 * delta set to 0.
2981 * Although tsf_delta is stored as A_UINT32, it can be negative,
2982 * and thus would need to be sign-extended if added to a value
2983 * larger than 32 bits.
2984 */
2985 A_UINT32 tsf_delta;
Sandeep Puligilla62f7ca02016-03-24 15:48:33 -07002986 /*
2987 * The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from
2988 * TSF timestamp in the RX MAC descriptor provided by HW.
2989 */
2990 A_UINT32 rx_tsf_l32;
2991
2992 /*
2993 *The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register
2994 * after the packet is received.
2995 */
2996 A_UINT32 rx_tsf_u32;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002997 /* This TLV is followed by array of bytes:
2998 * // management frame buffer
2999 * A_UINT8 bufp[];
3000 */
3001} wmi_mgmt_rx_hdr;
3002
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003003typedef struct {
3004 /** TSF timestamp */
3005 A_UINT32 tsf_timestamp;
3006
3007 /**
3008 * Current freq1, freq2
3009 *
3010 * [7:0]: freq1[lo]
3011 * [15:8] : freq1[hi]
3012 * [23:16]: freq2[lo]
3013 * [31:24]: freq2[hi]
3014 */
3015 A_UINT32 freq_info_1;
3016
3017 /**
3018 * Combined RSSI over all chains and channel width for this PHY error
3019 *
3020 * [7:0]: RSSI combined
3021 * [15:8]: Channel width (MHz)
3022 * [23:16]: PHY error code
3023 * [24:16]: reserved (future use)
3024 */
3025 A_UINT32 freq_info_2;
3026
3027 /**
3028 * RSSI on chain 0 through 3
3029 *
3030 * This is formatted the same as the PPDU_START RX descriptor
3031 * field:
3032 *
3033 * [7:0]: pri20
3034 * [15:8]: sec20
3035 * [23:16]: sec40
3036 * [31:24]: sec80
3037 */
3038 A_UINT32 rssi_chain0;
3039 A_UINT32 rssi_chain1;
3040 A_UINT32 rssi_chain2;
3041 A_UINT32 rssi_chain3;
3042
3043 /**
3044 * Last calibrated NF value for chain 0 through 3
3045 *
3046 * nf_list_1:
3047 *
3048 * + [15:0] - chain 0
3049 * + [31:16] - chain 1
3050 *
3051 * nf_list_2:
3052 *
3053 * + [15:0] - chain 2
3054 * + [31:16] - chain 3
3055 */
3056 A_UINT32 nf_list_1;
3057 A_UINT32 nf_list_2;
3058
3059 /** Length of the frame */
3060 A_UINT32 buf_len;
3061} wmi_single_phyerr_rx_hdr;
3062
3063#define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff
3064#define WMI_UNIFIED_FREQINFO_1_LO_S 0
3065#define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00
3066#define WMI_UNIFIED_FREQINFO_1_HI_S 8
3067#define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000
3068#define WMI_UNIFIED_FREQINFO_2_LO_S 16
3069#define WMI_UNIFIED_FREQINFO_2_HI 0xff000000
3070#define WMI_UNIFIED_FREQINFO_2_HI_S 24
3071
3072/*
3073 * Please keep in mind that these _SET macros break macro side effect
3074 * assumptions; don't be clever with them.
3075 */
3076#define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05303077 (WMI_F_MS((hdr)->freq_info_1, \
3078 WMI_UNIFIED_FREQINFO_ ## f ## _LO) \
3079 | (WMI_F_MS((hdr)->freq_info_1, \
3080 WMI_UNIFIED_FREQINFO_ ## f ## _HI) << 8))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003081
3082#define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \
3083 do { \
3084 WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \
3085 WMI_UNIFIED_FREQINFO_ ## f ## _LO); \
3086 WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \
3087 WMI_UNIFIED_FREQINFO_ ## f ## _HI); \
3088 } while (0)
3089
3090#define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff
3091#define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0
3092#define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00
3093#define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8
3094#define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000
3095#define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
3096
3097#define WMI_UNIFIED_RSSI_COMB_GET(hdr) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05303098 ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003099 WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
3100
3101#define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \
3102 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
3103 WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
3104
3105#define WMI_UNIFIED_CHWIDTH_GET(hdr) \
3106 WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
3107
3108#define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \
3109 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
3110 WMI_UNIFIED_FREQINFO_2_CHWIDTH);
3111
3112#define WMI_UNIFIED_PHYERRCODE_GET(hdr) \
3113 WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
3114
3115#define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \
3116 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
3117 WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
3118
3119#define WMI_UNIFIED_CHAIN_0 0x0000ffff
3120#define WMI_UNIFIED_CHAIN_0_S 0
3121#define WMI_UNIFIED_CHAIN_1 0xffff0000
3122#define WMI_UNIFIED_CHAIN_1_S 16
3123#define WMI_UNIFIED_CHAIN_2 0x0000ffff
3124#define WMI_UNIFIED_CHAIN_2_S 0
3125#define WMI_UNIFIED_CHAIN_3 0xffff0000
3126#define WMI_UNIFIED_CHAIN_3_S 16
3127
3128#define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1
3129#define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1
3130#define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2
3131#define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2
3132
3133#define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \
3134 ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, \
3135 WMI_UNIFIED_CHAIN_ ## c)))
3136
3137#define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \
3138 WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, (nf) & 0xffff, \
3139 WMI_UNIFIED_CHAIN_ ## c);
3140
3141/*
3142 * For now, this matches what the underlying hardware is doing.
3143 * Update ar6000ProcRxDesc() to use these macros when populating
3144 * the rx descriptor and then we can just copy the field over
3145 * to the WMI PHY notification without worrying about breaking
3146 * things.
3147 */
3148#define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff
3149#define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0
3150#define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00
3151#define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8
3152#define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000
3153#define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16
3154#define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000
3155#define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24
3156
3157#define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \
3158 WMI_F_RMW((hdr)->rssi_chain ## c, (rssi) & 0xff, \
3159 WMI_UNIFIED_RSSI_CHAN_ ## ch);
3160
3161#define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \
3162 ((int8_t) (WMI_F_MS((hdr)->rssi_chain ## c, \
3163 WMI_UNIFIED_RSSI_CHAN_ ## ch)))
3164
3165typedef struct {
3166 /** Phy error event header */
3167 wmi_single_phyerr_rx_hdr hdr;
3168 /** frame buffer */
3169 A_UINT8 bufp[1];
3170} wmi_single_phyerr_rx_event;
3171
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08003172/* PHY ERROR MASK 0 */
3173/* bits 1:0 defined but not published */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05303174#define WMI_PHY_ERROR_MASK0_RADAR (1<<2)
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08003175/* bits 23:3 defined but not published */
3176#define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1<<24)
3177/* bits 25:24 defined but not published */
3178#define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1<<26)
3179/* bits 31:27 defined but not published */
3180
3181/* PHY ERROR MASK 1
3182 * bits 13:0 defined but not published
3183 * bits 31:14 reserved
3184 */
3185
3186/* PHY ERROR MASK 2
3187 * bits 31:0 reserved
3188 */
3189
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003190typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303191 /* TLV tag and len; tag equals
3192 * WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr
3193 */
3194 A_UINT32 tlv_header;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003195 /** Phy error phy error count */
3196 A_UINT32 num_phyerr_events;
3197 A_UINT32 tsf_l32;
3198 A_UINT32 tsf_u32;
3199 A_UINT32 buf_len;
Govind Singh869c9872016-02-22 18:36:34 +05303200 union {
3201 /* OBSOLETE - will be removed once all refs are gone */
3202 A_UINT32 pmac_id;
3203 /** pdev_id for identifying the MAC
3204 * See macros starting with WMI_PDEV_ID_ for values.
3205 */
3206 A_UINT32 pdev_id;
3207 };
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08003208 A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
3209 A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
3210 A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
3211
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003212 /* This TLV is followed by array of bytes:
3213 * // frame buffer - contains multiple payloads in the order:
3214 * // header - payload, header - payload...
3215 * (The header is of type: wmi_single_phyerr_rx_hdr)
3216 * A_UINT8 bufp[];
3217 */
3218} wmi_comb_phyerr_rx_hdr;
3219
3220/* WMI MGMT TX */
3221typedef struct {
3222 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
3223 /** unique id identifying the VDEV, generated by the caller */
3224 A_UINT32 vdev_id;
3225 /** peer MAC address */
3226 wmi_mac_addr peer_macaddr;
3227 /** xmit rate */
3228 A_UINT32 tx_rate;
3229 /** xmit power */
3230 A_UINT32 tx_power;
3231 /** Buffer length in bytes */
3232 A_UINT32 buf_len;
3233 /* This TLV is followed by array of bytes:
3234 * // management frame buffer
3235 * A_UINT8 bufp[];
3236 */
3237} wmi_mgmt_tx_hdr;
3238
3239typedef struct {
3240 /*
3241 * TLV tag and len;
3242 * tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param
3243 */
3244 A_UINT32 tlv_header;
3245 A_UINT32 vdev_id;
3246 /* echoed in tx_compl_event */
3247 A_UINT32 desc_id;
3248 /* MHz units */
3249 A_UINT32 chanfreq;
3250 A_UINT32 paddr_lo;
3251 A_UINT32 paddr_hi;
3252 A_UINT32 frame_len;
3253 /* Buffer length in bytes */
3254 A_UINT32 buf_len;
3255 /*
3256 * This TLV is followed by array of bytes:
3257 * First 64 bytes of management frame
3258 * A_UINT8 bufp[];
3259 */
3260} wmi_mgmt_tx_send_cmd_fixed_param;
3261
3262typedef struct {
3263 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
3264 A_UINT32 value;
3265} wmi_echo_event_fixed_param;
3266
3267typedef struct {
3268 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
3269 A_UINT32 value;
3270} wmi_echo_cmd_fixed_param;
3271
3272typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303273 /* TLV tag and len; tag equals
3274 * WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param
3275 */
3276 A_UINT32 tlv_header;
3277 /** pdev_id for identifying the MAC
3278 * See macros starting with WMI_PDEV_ID_ for values.
3279 */
3280 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003281 /** reg domain code */
3282 A_UINT32 reg_domain;
3283 A_UINT32 reg_domain_2G;
3284 A_UINT32 reg_domain_5G;
3285 A_UINT32 conformance_test_limit_2G;
3286 A_UINT32 conformance_test_limit_5G;
Govind Singh32cced32016-02-01 13:33:09 +05303287 A_UINT32 dfs_domain;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003288} wmi_pdev_set_regdomain_cmd_fixed_param;
3289
3290typedef struct {
3291 /** true for scan start and flase for scan end */
3292 A_UINT32 scan_start;
3293} wmi_pdev_scan_cmd;
3294
Govind Singhc7d51942016-02-01 12:09:31 +05303295/* WMI support for setting ratemask in target */
3296
3297typedef struct {
3298 A_UINT32 tlv_header;
3299 /*
3300 * TLV tag and len; tag equals
3301 * WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param
3302 */
3303 A_UINT32 vdev_id;
3304 /*
3305 * 0 - cck/ofdm
3306 * 1 - HT
3307 * 2 - VHT */
3308 A_UINT32 type;
3309
3310 A_UINT32 mask_lower32;
3311 A_UINT32 mask_higher32;
3312} wmi_vdev_config_ratemask_cmd_fixed_param;
3313
3314/* nrp action - Filter Neighbor Rx Packets - add/remove filter */
3315enum {
3316 WMI_FILTER_NRP_ACTION_ADD = 0x1,
3317 WMI_FILTER_NRP_ACTION_REMOVE = 0x2,
3318 WMI_FILTER_NRP_ACTION_GET_LIST = 0x3,
3319}; /* nrp - Neighbor Rx Packets */
3320
3321/* nrp type - Filter Neighbor Rx Packets - ap/client addr */
3322enum {
3323 WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1,
3324 WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2,
3325};
3326
3327/* nrp flag - Filter Neighbor Rx Packets
3328 * (capture flag, 2 & 3 not initially supported)
3329 */
3330enum {
3331 WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1,
3332 WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2,
3333 WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3,
3334};
3335
3336/* Filter for Neighbor Rx Packets */
3337typedef struct {
3338 A_UINT32 tlv_header;
3339 /*
3340 * TLV tag and len; tag equals
3341 * WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param
3342 */
3343 A_UINT32 vdev_id;
3344 /* AP Bssid or Client Mac-addr */
3345 wmi_mac_addr addr;
3346 /* Add/Remove NRF Filter */
3347 A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
3348 /* client/ap filter */
3349 A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
3350 /* optional - tx/rx capture */
3351 A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
3352 /* BSSID index - index of the BSSID register */
3353 A_UINT32 bssid_idx;
3354} wmi_vdev_filter_nrp_config_cmd_fixed_param;
3355
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003356/*Command to set/unset chip in quiet mode*/
3357typedef struct {
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05303358 /*
3359 * TLV tag and len; tag equals
3360 * WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param
3361 */
3362 A_UINT32 tlv_header;
3363 /*
3364 * pdev_id for identifying the MAC, See macros
3365 * starting with WMI_PDEV_ID_ for values.
3366 */
3367 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003368 A_UINT32 period; /*period in TUs */
3369 A_UINT32 duration; /*duration in TUs */
3370 A_UINT32 next_start; /*offset in TUs */
3371 A_UINT32 enabled; /*enable/disable */
3372} wmi_pdev_set_quiet_cmd_fixed_param;
3373
Govind Singh869c9872016-02-22 18:36:34 +05303374typedef struct {
3375 /* TLV tag and len; tag equals
3376 * WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param
3377 */
3378 A_UINT32 tlv_header;
3379 A_UINT32 vdev_id; /* Virtual interface ID */
3380 A_UINT32 period; /* period in TUs */
3381 A_UINT32 duration; /* duration in TUs */
3382 A_UINT32 next_start; /* offset in TUs */
3383 A_UINT32 enabled; /* enable/disable */
3384} wmi_vdev_set_quiet_cmd_fixed_param;
3385
Krishna Kumaar Natarajanea0a7962016-04-16 14:09:09 +05303386typedef struct {
3387 /*
3388 * TLV tag and len; tag equals
3389 * WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param
3390 */
3391 A_UINT32 tlv_header;
3392 /*
3393 * vdev id indicating to which the vdev custom aggregation size
3394 * will be applied.
3395 */
3396 A_UINT32 vdev_id;
3397 /*
3398 * Size for tx aggregation (max MPDUs per A-MPDU) for the vdev
3399 * mentioned in vdev id
3400 */
3401 A_UINT32 tx_aggr_size;
3402 /*
3403 * Size for rx aggregation (block ack window size limit) for
3404 * the vdev mentioned in vdev id
3405 */
3406 A_UINT32 rx_aggr_size;
3407} wmi_vdev_set_custom_aggr_size_cmd_fixed_param;
3408
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003409/*
3410 * Command to enable/disable Green AP Power Save.
3411 * This helps conserve power during AP operation. When the AP has no
3412 * stations associated with it, the host can enable Green AP Power Save
3413 * to request the firmware to shut down all but one transmit and receive
3414 * chains.
3415 */
3416typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303417 /** TLV tag and len; tag equals
3418 * WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param
3419 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003420 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303421 /** pdev_id for identifying the MAC
3422 * See macros starting with WMI_PDEV_ID_ for values.
3423 */
3424 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003425 A_UINT32 enable; /*1:enable, 0:disable */
3426} wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
3427
3428#define MAX_HT_IE_LEN 32
Govind Singh869c9872016-02-22 18:36:34 +05303429/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003430typedef struct {
3431 A_UINT32 tlv_header;
3432 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
3433 A_UINT32 reserved0;
3434 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3435 A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
3436 A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
3437 A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
3438 /** The TLV for the HT IE follows:
3439 * A_UINT32 ie_data[];
3440 */
3441} wmi_pdev_set_ht_ie_cmd_fixed_param;
3442
3443#define MAX_VHT_IE_LEN 32
Govind Singh869c9872016-02-22 18:36:34 +05303444/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003445typedef struct {
3446 A_UINT32 tlv_header;
3447 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
3448 A_UINT32 reserved0;
3449 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3450 A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
3451 A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
3452 A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
3453 /** The TLV for the VHT IE follows:
3454 * A_UINT32 ie_data[];
3455 */
3456} wmi_pdev_set_vht_ie_cmd_fixed_param;
3457
3458typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303459 /** TLV tag and len; tag equals
3460 * WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param
3461 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003462 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303463 /** pdev_id for identifying the MAC
3464 * See macros starting with WMI_PDEV_ID_ for values.
3465 */
3466 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003467 wmi_mac_addr base_macaddr;
3468} wmi_pdev_set_base_macaddr_cmd_fixed_param;
3469
3470/*
3471 * For now, the spectral configuration is global rather than
3472 * per-vdev. The vdev is a placeholder and will be ignored
3473 * by the firmware.
3474 */
3475typedef struct {
3476 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
3477 A_UINT32 vdev_id;
3478 A_UINT32 spectral_scan_count;
3479 A_UINT32 spectral_scan_period;
3480 A_UINT32 spectral_scan_priority;
3481 A_UINT32 spectral_scan_fft_size;
3482 A_UINT32 spectral_scan_gc_ena;
3483 A_UINT32 spectral_scan_restart_ena;
3484 A_UINT32 spectral_scan_noise_floor_ref;
3485 A_UINT32 spectral_scan_init_delay;
3486 A_UINT32 spectral_scan_nb_tone_thr;
3487 A_UINT32 spectral_scan_str_bin_thr;
3488 A_UINT32 spectral_scan_wb_rpt_mode;
3489 A_UINT32 spectral_scan_rssi_rpt_mode;
3490 A_UINT32 spectral_scan_rssi_thr;
3491 A_UINT32 spectral_scan_pwr_format;
3492 A_UINT32 spectral_scan_rpt_mode;
3493 A_UINT32 spectral_scan_bin_scale;
3494 A_UINT32 spectral_scan_dBm_adj;
3495 A_UINT32 spectral_scan_chn_mask;
3496} wmi_vdev_spectral_configure_cmd_fixed_param;
3497
3498/*
3499 * Enabling, disabling and triggering the spectral scan
3500 * is a per-vdev operation. That is, it will set channel
3501 * flags per vdev rather than globally; so concurrent scan/run
3502 * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
3503 */
3504typedef struct {
3505 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
3506 A_UINT32 vdev_id;
3507 /* 0 - ignore; 1 - trigger, 2 - clear trigger */
3508 A_UINT32 trigger_cmd;
3509 /* 0 - ignore; 1 - enable, 2 - disable */
3510 A_UINT32 enable_cmd;
3511} wmi_vdev_spectral_enable_cmd_fixed_param;
3512
3513typedef enum {
3514 WMI_CSA_IE_PRESENT = 0x00000001,
3515 WMI_XCSA_IE_PRESENT = 0x00000002,
3516 WMI_WBW_IE_PRESENT = 0x00000004,
3517 WMI_CSWARP_IE_PRESENT = 0x00000008,
3518} WMI_CSA_EVENT_IES_PRESENT_FLAG;
3519
3520/* wmi CSA receive event from beacon frame */
3521typedef struct {
3522 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
3523 A_UINT32 i_fc_dur;
3524/* Bit 0-15: FC */
3525/* Bit 16-31: DUR */
3526 wmi_mac_addr i_addr1;
3527 wmi_mac_addr i_addr2;
3528 /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
3529 * changed in the future without breaking WMI compatibility */
3530 A_UINT32 csa_ie[2];
3531 A_UINT32 xcsa_ie[2];
3532 A_UINT32 wb_ie[2];
3533 A_UINT32 cswarp_ie;
3534 A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
3535} wmi_csa_event_fixed_param;
3536
3537typedef enum {
Govind Singh32cced32016-02-01 13:33:09 +05303538 WAL_PEER_MCAST2UCAST_DISABLED = 0,
3539 /* Drop the frames if match is not found */
3540 WAL_PEER_MCAST2UCAST_DROP_EMPTY = 1,
3541 /* Send as mcast if match is not found */
3542 WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2,
3543} WMI_PEER_MCAST2UCAST_MODE;
3544
3545typedef enum {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003546 /** TX chain mask */
3547 WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
3548 /** RX chain mask */
3549 WMI_PDEV_PARAM_RX_CHAIN_MASK,
3550 /** TX power limit for 2G Radio */
3551 WMI_PDEV_PARAM_TXPOWER_LIMIT2G,
3552 /** TX power limit for 5G Radio */
3553 WMI_PDEV_PARAM_TXPOWER_LIMIT5G,
3554 /** TX power scale */
3555 WMI_PDEV_PARAM_TXPOWER_SCALE,
3556 /** Beacon generation mode . 0: host, 1: target */
3557 WMI_PDEV_PARAM_BEACON_GEN_MODE,
3558 /** Beacon generation mode . 0: staggered 1: bursted */
3559 WMI_PDEV_PARAM_BEACON_TX_MODE,
3560 /** Resource manager off chan mode .
3561 * 0: turn off off chan mode. 1: turn on offchan mode
3562 */
3563 WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
3564 /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */
3565 WMI_PDEV_PARAM_PROTECTION_MODE,
3566 /** Dynamic bandwidth 0: disable 1: enable */
3567 WMI_PDEV_PARAM_DYNAMIC_BW,
3568 /** Non aggregrate/ 11g sw retry threshold.0-disable */
3569 WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
3570 /** aggregrate sw retry threshold. 0-disable*/
3571 WMI_PDEV_PARAM_AGG_SW_RETRY_TH,
3572 /** Station kickout threshold (non of consecutive failures).0-disable */
3573 WMI_PDEV_PARAM_STA_KICKOUT_TH,
3574 /** Aggerate size scaling configuration per AC */
3575 WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING,
3576 /** LTR enable */
3577 WMI_PDEV_PARAM_LTR_ENABLE,
3578 /** LTR latency for BE, in us */
3579 WMI_PDEV_PARAM_LTR_AC_LATENCY_BE,
3580 /** LTR latency for BK, in us */
3581 WMI_PDEV_PARAM_LTR_AC_LATENCY_BK,
3582 /** LTR latency for VI, in us */
3583 WMI_PDEV_PARAM_LTR_AC_LATENCY_VI,
3584 /** LTR latency for VO, in us */
3585 WMI_PDEV_PARAM_LTR_AC_LATENCY_VO,
3586 /** LTR AC latency timeout, in ms */
3587 WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
3588 /** LTR platform latency override, in us */
3589 WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
3590 /** LTR-M override, in us */
3591 WMI_PDEV_PARAM_LTR_RX_OVERRIDE,
3592 /** Tx activity timeout for LTR, in us */
3593 WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
3594 /** L1SS state machine enable */
3595 WMI_PDEV_PARAM_L1SS_ENABLE,
3596 /** Deep sleep state machine enable */
3597 WMI_PDEV_PARAM_DSLEEP_ENABLE,
3598 /** RX buffering flush enable */
3599 WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
3600 /** RX buffering matermark */
3601 WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
3602 /** RX buffering timeout enable */
3603 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
3604 /** RX buffering timeout value */
3605 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
3606 /** pdev level stats update period in ms */
3607 WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
3608 /** vdev level stats update period in ms */
3609 WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
3610 /** peer level stats update period in ms */
3611 WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
3612 /** beacon filter status update period */
3613 WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
3614 /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
3615 WMI_PDEV_PARAM_PMF_QOS,
3616 /** Access category on which ARP frames are sent */
3617 WMI_PDEV_PARAM_ARP_AC_OVERRIDE,
3618 /** DCS configuration */
3619 WMI_PDEV_PARAM_DCS,
3620 /** Enable/Disable ANI on target */
3621 WMI_PDEV_PARAM_ANI_ENABLE,
3622 /** configure the ANI polling period */
3623 WMI_PDEV_PARAM_ANI_POLL_PERIOD,
3624 /** configure the ANI listening period */
3625 WMI_PDEV_PARAM_ANI_LISTEN_PERIOD,
3626 /** configure OFDM immunity level */
3627 WMI_PDEV_PARAM_ANI_OFDM_LEVEL,
3628 /** configure CCK immunity level */
3629 WMI_PDEV_PARAM_ANI_CCK_LEVEL,
3630 /** Enable/Disable CDD for 1x1 STAs in rate control module */
3631 WMI_PDEV_PARAM_DYNTXCHAIN,
3632 /** Enable/Disable proxy STA */
3633 WMI_PDEV_PARAM_PROXY_STA,
3634 /** Enable/Disable low power state when all VDEVs are inactive/idle. */
3635 WMI_PDEV_PARAM_IDLE_PS_CONFIG,
3636 /** Enable/Disable power gating sleep */
3637 WMI_PDEV_PARAM_POWER_GATING_SLEEP,
3638 /** Enable/Disable Rfkill */
3639 WMI_PDEV_PARAM_RFKILL_ENABLE,
3640 /** Set Bursting DUR */
3641 WMI_PDEV_PARAM_BURST_DUR,
3642 /** Set Bursting ENABLE */
3643 WMI_PDEV_PARAM_BURST_ENABLE,
3644 /** HW rfkill config */
3645 WMI_PDEV_PARAM_HW_RFKILL_CONFIG,
3646 /** Enable radio low power features */
3647 WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE,
3648 /** L1SS entry and residency time track */
3649 WMI_PDEV_PARAM_L1SS_TRACK,
3650 /** set hyst at runtime, requirement from SS */
3651 WMI_PDEV_PARAM_HYST_EN,
3652 /** Enable/ Disable POWER COLLAPSE */
3653 WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE,
3654 /** configure LED system state */
3655 WMI_PDEV_PARAM_LED_SYS_STATE,
3656 /** Enable/Disable LED */
3657 WMI_PDEV_PARAM_LED_ENABLE,
3658 /** set DIRECT AUDIO time latency */
Govind Singh869c9872016-02-22 18:36:34 +05303659 WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003660 /** set DIRECT AUDIO Feature ENABLE */
Govind Singh869c9872016-02-22 18:36:34 +05303661 WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003662 /** pdev level whal mib stats update enable */
3663 WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE,
3664 /** ht/vht info based on vdev */
3665 WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD,
3666 /** Set CTS channel BW for dynamic BW adjustment feature */
3667 WMI_PDEV_PARAM_CTS_CBW,
3668 /** Set GPIO pin info used by WNTS */
3669 WMI_PDEV_PARAM_WNTS_CONFIG,
3670 /** Enable/Disable hardware adaptive early rx feature */
3671 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE,
3672 /** The minimum early rx duration, to ensure early rx duration is non-zero */
3673 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP,
3674 /** Increasing/decreasing step used by hardware */
3675 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP,
3676 /** The fixed early rx duration when adaptive early rx is disabled */
3677 WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP,
3678 /** Enable/Disable bmiss based adaptive beacon timeout feature */
3679 WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE,
3680 /*
3681 * The minimum beacon timeout duration, to ensure beacon timeout
3682 * duration is non-zero
3683 */
3684 WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT,
3685 /** Increasing/decreasing step used by hardware */
3686 WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP,
3687 /*
3688 * The fixed beacon timeout duration when bmiss based adaptive beacon
3689 * timeout is disabled
3690 */
3691 WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT,
3692 /*
3693 * Enable/Disable Congestion Estimator based adaptive beacon
3694 * timeout feature */
3695 WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE,
3696 /*
3697 * combo value of ce_id, ce_threshold, ce_time, refer
3698 * to WMI_CE_BTO_CE_ID_MASK
3699 */
3700 WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE,
3701 /** 2G TX chain mask */
3702 WMI_PDEV_PARAM_TX_CHAIN_MASK_2G,
3703 /** 2G RX chain mask */
3704 WMI_PDEV_PARAM_RX_CHAIN_MASK_2G,
3705 /** 5G TX chain mask */
3706 WMI_PDEV_PARAM_TX_CHAIN_MASK_5G,
3707 /** 5G RX chain mask */
3708 WMI_PDEV_PARAM_RX_CHAIN_MASK_5G,
3709 /* Set tx chain mask for CCK rates */
3710 WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK,
3711 /* Set tx chain mask for 1SS stream */
3712 WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS,
Nirav Shahe1e4a812015-11-05 11:15:54 +05303713 /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected*/
3714 WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG,
Nirav Shah47062ff2015-11-05 11:21:08 +05303715 /* TX power backoff in dB: tx power -= param value
3716 * Host passes values(DB) to Halphy, Halphy reduces the power table by
3717 * the values. Safety check will happen in Halphy
3718 */
3719 WMI_PDEV_PARAM_TXPOWER_DECR_DB,
Govind Singh32cced32016-02-01 13:33:09 +05303720 /** enable and disable aggregate burst along with duration */
3721 WMI_PDEV_PARAM_AGGR_BURST,
3722 /** Set the global RX decap mode */
3723 WMI_PDEV_PARAM_RX_DECAP_MODE,
3724 /** Enable/Disable Fast channel reset */
3725 WMI_PDEV_PARAM_FAST_CHANNEL_RESET,
3726 /** Default antenna for Smart antenna */
3727 WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA,
3728 /** Set the user-specified antenna gain */
3729 WMI_PDEV_PARAM_ANTENNA_GAIN,
3730 /** Set the user-specified RX filter */
3731 WMI_PDEV_PARAM_RX_FILTER,
3732 /*
3733 * configure the user-specified MCAST tid for managed mcast feature
3734 * 0-15 is the valid range. 0xff will clear the tid setting
3735 */
3736 WMI_PDEV_SET_MCAST_TO_UCAST_TID,
3737 /** Enable/Disable Proxy sta mode */
3738 WMI_PDEV_PARAM_PROXY_STA_MODE,
3739 /*
3740 * configure the mcast2ucast mode for the pdev->peer_mcast.
3741 * See WMI_PEER_MCAST2UCAST_MODE for possible values
3742 */
3743 WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE,
3744 /** Sets the Mcast buffers for cloning, to support Mcast enhancement */
3745 WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER,
3746 /** Remove the Mcast buffers added by host */
3747 WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER,
3748 /** En/disable station power save state indication */
3749 WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE,
3750 /** Access category on which ARP frames are sent */
3751 WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE,
3752 /** allow or disallow interbss frame forwarding */
3753 WMI_PDEV_PARAM_BLOCK_INTERBSS,
3754 /** Enable/Disable reset */
3755 WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID,
3756 /** Enable/Disable/Set MSDU_TTL in milliseconds. */
3757 WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID,
3758 /** Set global PPDU duration limit (usec). */
3759 WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID,
3760 /** set txbf sounding period of vap in milliseconds */
3761 WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID,
3762 /** Set promiscuous mode */
3763 WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID,
3764 /** Set burst mode */
3765 WMI_PDEV_PARAM_SET_BURST_MODE_CMDID,
3766 /** enable enhanced stats */
3767 WMI_PDEV_PARAM_EN_STATS,
3768 /** Set mu-grouping policy */
3769 WMI_PDEV_PARAM_MU_GROUP_POLICY,
3770 /** Channel Hopping Enable */
3771 WMI_PDEV_PARAM_NOISE_DETECTION,
3772 /** Set Channel Hopping NF threshold in dBm */
3773 WMI_PDEV_PARAM_NOISE_THRESHOLD,
3774 /** Set PAPRD policy */
3775 WMI_PDEV_PARAM_DPD_ENABLE,
3776 /** Enable/disable mcast/bcast echo, used by ProxySTA */
3777 WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO,
3778 /** ATF enable/disable strict schedule */
3779 WMI_PDEV_PARAM_ATF_STRICT_SCH,
3780 /** ATF set access category duration, B0-B29 duration, B30-B31: AC */
3781 WMI_PDEV_PARAM_ATF_SCHED_DURATION,
3782 /** Default antenna polarization */
3783 WMI_PDEV_PARAM_ANT_PLZN,
3784 /** Set mgmt retry limit */
3785 WMI_PDEV_PARAM_MGMT_RETRY_LIMIT,
3786 /** Set CCA sensitivity level in dBm */
3787 WMI_PDEV_PARAM_SENSITIVITY_LEVEL,
3788 /** Set 2G positive and negative Tx power in 0.5dBm units */
3789 WMI_PDEV_PARAM_SIGNED_TXPOWER_2G,
3790 /** Set 5G positive and negative Tx power in 0.5dBm units */
3791 WMI_PDEV_PARAM_SIGNED_TXPOWER_5G,
3792 /** Enable/disble AMSDU for tids */
3793 WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU,
3794 /** Enable/disable AMPDU for tids */
3795 WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU,
3796 /** Set CCA threshold in dBm */
3797 WMI_PDEV_PARAM_CCA_THRESHOLD,
3798 /** RTS Fixed rate setting */
3799 WMI_PDEV_PARAM_RTS_FIXED_RATE,
3800 /** Pdev reset */
3801 WMI_PDEV_PARAM_PDEV_RESET,
3802 /** wapi mbssid offset **/
3803 WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET,
3804 /** ARP DEBUG source address*/
3805 WMI_PDEV_PARAM_ARP_DBG_SRCADDR,
3806 /** ARP DEBUG destination address*/
3807 WMI_PDEV_PARAM_ARP_DBG_DSTADDR,
3808 /** ATF enable/disable obss noise scheduling */
3809 WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH,
3810 /** ATF obss noise scaling factor */
3811 WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR,
3812 /**
3813 * TX power reduction scaling exponent - final tx power is the
3814 * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by
3815 * 2^(scale exponent). For example:
3816 * If this scale exponent is 0, the power is unchanged (divided by 2^0)
3817 * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB
3818 * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB
3819 * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB
3820 */
3821 WMI_PDEV_PARAM_CUST_TXPOWER_SCALE,
3822 /** ATF enabe/disabe dynamically */
3823 WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE,
Nitesh Shah49eecf02016-06-29 20:36:58 +05303824 /** Set tx retry limit for control frames. 0 = disable, 31 = max */
3825 WMI_PDEV_PARAM_CTRL_RETRY_LIMIT,
3826 /** Set propagation delay for 2G / 5G band.
3827 * The propagation delay is fundamentally a per-peer property, but
3828 * the target may not support per-peer settings for ack timeouts.
3829 * This pdev parameter allows the MAC-level ack timeout to be set to
3830 * a value suitable for the worst-case propagation delay of any peer
3831 * within that pdev.
3832 * Units are microseconds.
3833 */
3834 WMI_PDEV_PARAM_PROPAGATION_DELAY,
Nitesh Shaha43b09d2016-07-20 17:20:07 +05303835 /**
3836 * Host can enable/disable ANT DIV feature
3837 * if it's been enabled in BDF
3838 */
3839 WMI_PDEV_PARAM_ENA_ANT_DIV,
3840 /** Host can force one chain to select a specific ANT */
3841 WMI_PDEV_PARAM_FORCE_CHAIN_ANT,
3842 /**
3843 * Start a cycle ANT self test periodically.
3844 * In the test, the FW would select each ANT pair
3845 * one by one, the cycle time could be configured
3846 * via WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL
3847 */
3848 WMI_PDEV_PARAM_ANT_DIV_SELFTEST,
3849 /**
3850 * Configure the cycle time of ANT self test,
3851 * the unit is micro second. Per the timer
3852 * limitation, too small value could be not so
3853 * accurate.
3854 */
3855 WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL,
Manjeet Singh27aa9c12016-08-24 15:38:42 +05303856 /**
3857 * wlan stats observation period, the unit is millisecond.
3858 * The value of 0 is used to turn off periodic stats report.
3859 */
3860 WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD,
3861 /**
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05303862 * Set tx_delay[] bin size to specify how many
3863 * milliseconds each bin of the wmi_tx_stats.tx_delay[]
Manjeet Singh27aa9c12016-08-24 15:38:42 +05303864 * histogram represents.
3865 */
3866 WMI_PDEV_PARAM_TX_DELAY_BIN_SIZE_MS,
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05303867 /** set wmi_tx_stats.tx_delay[] array length */
3868 WMI_PDEV_PARAM_TX_DELAY_ARRAY_LEN,
3869 /** set wmi_tx_stats.tx_mpdu_aggr[] array length */
3870 WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN,
3871 /** set wmi_rx_stats.rx_mpdu_aggr[] array length */
3872 WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003873} WMI_PDEV_PARAM;
3874
3875typedef enum {
3876 /** Set the loglevel */
3877 WMI_DBGLOG_LOG_LEVEL = 0x1,
3878 /** Enable VAP level debug */
3879 WMI_DBGLOG_VAP_ENABLE,
3880 /** Disable VAP level debug */
3881 WMI_DBGLOG_VAP_DISABLE,
3882 /** Enable MODULE level debug */
3883 WMI_DBGLOG_MODULE_ENABLE,
3884 /** Disable MODULE level debug */
3885 WMI_DBGLOG_MODULE_DISABLE,
3886 /** Enable MODULE level debug */
3887 WMI_DBGLOG_MOD_LOG_LEVEL,
3888 /** set type of the debug output */
3889 WMI_DBGLOG_TYPE,
3890 /** Enable Disable debug */
3891 WMI_DBGLOG_REPORT_ENABLE
3892} WMI_DBG_PARAM;
3893
3894/* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
3895typedef enum {
3896 WMI_CTS_CBW_INVALID = 0,
3897 WMI_CTS_CBW_20,
3898 WMI_CTS_CBW_40,
3899 WMI_CTS_CBW_80,
3900 WMI_CTS_CBW_80_80,
3901 WMI_CTS_CBW_160,
3902} WMI_CTS_CBW;
3903
3904typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303905 /** TLV tag and len; tag equals
3906 * WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param
3907 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003908 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303909 /** pdev_id for identifying the MAC
3910 * See macros starting with WMI_PDEV_ID_ for values.
3911 */
3912 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003913 /** parameter id */
3914 A_UINT32 param_id;
3915 /** parametr value */
3916 A_UINT32 param_value;
3917} wmi_pdev_set_param_cmd_fixed_param;
3918
3919typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303920 /** TLV tag and len; tag equals
3921 * WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param
3922 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003923 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303924 /** pdev_id for identifying the MAC
3925 * See macros starting with WMI_PDEV_ID_ for values.
3926 */
3927 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003928 /** parameter */
3929 A_UINT32 param;
3930} wmi_pdev_get_tpc_config_cmd_fixed_param;
3931
3932#define WMI_FAST_DIVERSITY_BIT_OFFSET 0
3933#define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
3934
Himanshu Agarwal86319542016-05-24 09:00:39 +05303935#define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT 2
3936#define WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK \
3937 (0xf << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
3938#define WMI_SLOW_DIVERSITY_CH0_WEIGHT_GET_BITS(word32) \
3939 (((word32) & WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK) >> \
3940 WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
3941#define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SET_BITS(word32, value) \
3942 do { \
3943 (word32) &= ~WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
3944 (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) & \
3945 WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
3946 } while (0)
3947
3948#define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT 6
3949#define WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK \
3950 (0xf << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
3951#define WMI_SLOW_DIVERSITY_CH1_WEIGHT_GET_BITS(word32) \
3952 (((word32) & WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK) >> \
3953 WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
3954#define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SET_BITS(word32, value) \
3955 do { \
3956 (word32) &= ~WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
3957 (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) & \
3958 WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
3959 } while (0)
3960
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003961typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303962 /** TLV tag and len; tag equals
3963 * WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param
3964 */
3965 A_UINT32 tlv_header;
3966 union {
3967 /* OBSOLETE - will be removed once all refs are gone */
3968 A_UINT32 mac_id;
3969 /** pdev_id for identifying the MAC
3970 * See macros starting with WMI_PDEV_ID_ for values.
3971 */
3972 A_UINT32 pdev_id;
3973 };
Himanshu Agarwal86319542016-05-24 09:00:39 +05303974 /*
3975 * The following "value" field is divided into bit fields as follows:
3976 * bits | purpose
3977 * -----+---------------------------------------
3978 * 0 | enable/disable FAST diversity
3979 * 1 | enable/disable SLOW diversity
3980 * 5:2 | chain0 slow-diversity weighting factor
3981 * 9:6 | chain1 slow-diversity weighting factor
3982 * 31:10| currenty unused (set to 0x0)
3983 * Refer to the above WMI_[FAST/SLOW]_DIVERSITY constants.
Govind Singh869c9872016-02-22 18:36:34 +05303984 */
3985 A_UINT32 value;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003986} wmi_pdev_set_antenna_diversity_cmd_fixed_param;
3987
3988#define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
3989
3990typedef struct {
3991 /*
3992 * TLV tag and len; tag equals
3993 * WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param
3994 */
3995 A_UINT32 tlv_header;
3996 /* vdev_id, where RSSI monitoring will take place */
3997 A_UINT32 vdev_id;
3998 /*
3999 * host will configure request_id and firmware echo
4000 * this id in RSSI_BREACH_EVENT
4001 */
4002 A_UINT32 request_id;
4003 /*
4004 * bit [0-2] = low_rssi_breach_enabled[0-2]
4005 * enabled, bit [3-5] = hi_rssi_breach_enabled[0-2]
4006 */
4007 A_UINT32 enabled_bitmap;
4008 /* unit dBm. host driver to make sure [0] > [1] > [2] */
4009 A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED];
4010 /* unit dBm. host driver to make sure [0] < [1] < [2] */
4011 A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED];
4012 /*
4013 * unit dBm. once low rssi[] breached, same event
4014 * bitmap will be generated only after signal gets better
4015 * than this level. This value is adopted for all low_rssi_breach_threshold[3]
4016 */
4017 A_UINT32 lo_rssi_reenable_hysteresis;
4018 /*
4019 * unit dBm. once hi rssi[] breached, same event bitmap
4020 * will be generated only after signal gets worse than this
4021 * level. This value is adopted for all hi_rssi_breach_threshold[3]
4022 */
4023 A_UINT32 hi_rssi_reenable_histeresis;
4024 /*
4025 * After last event is generated, we wait
4026 * until this interval to generate next event
4027 */
4028 A_UINT32 min_report_interval;
4029 /* this is to suppress number of event to be generated */
4030 A_UINT32 max_num_report;
4031} wmi_rssi_breach_monitor_config_fixed_param;
4032
4033typedef struct {
4034 /** parameter */
4035 A_UINT32 param;
4036} wmi_pdev_dump_cmd;
4037
4038typedef enum {
4039 PAUSE_TYPE_CHOP = 0x1,
4040 /** for MCC (switch channel), only vdev_map is valid */
4041 PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */
4042 PAUSE_TYPE_UAPSD = 0x3,
4043 /** for uapsd, only peer_id and tid_map are valid. */
4044 PAUSE_TYPE_P2P_CLIENT_NOA = 0x4,
4045 /** only vdev_map is valid, actually only one vdev id is set at one time */
4046 PAUSE_TYPE_P2P_GO_PS = 0x5,
4047 /** only vdev_map is valid, actually only one vdev id is set at one time */
4048 PAUSE_TYPE_STA_ADD_BA = 0x6,
4049 /** only peer_id and tid_map are valid, actually only one tid is set at one time */
4050 PAUSE_TYPE_AP_PS = 0x7,
4051 /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
4052 PAUSE_TYPE_IBSS_PS = 0x8,
4053 /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +05304054 PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9,
4055 /*
4056 * for TDLS offchannel MCC (switch channel), only vdev_map is valid,
4057 * TDLS connection tracker needs to be notified
4058 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004059 PAUSE_TYPE_HOST = 0x15,
4060 /** host is requesting vdev pause */
4061} wmi_tx_pause_type;
4062
4063typedef enum {
4064 ACTION_PAUSE = 0x0,
4065 ACTION_UNPAUSE = 0x1,
4066} wmi_tx_pause_action;
4067
4068typedef struct {
4069 A_UINT32 tlv_header;
4070 A_UINT32 pause_type;
4071 A_UINT32 action;
4072 A_UINT32 vdev_map;
4073 A_UINT32 peer_id;
4074 A_UINT32 tid_map;
4075} wmi_tx_pause_event_fixed_param;
4076
4077typedef enum {
4078 WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
4079 WMI_MGMT_TX_COMP_TYPE_DISCARD,
4080 WMI_MGMT_TX_COMP_TYPE_INSPECT,
4081 WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
4082 WMI_MGMT_TX_COMP_TYPE_MAX,
4083} WMI_MGMT_TX_COMP_STATUS_TYPE;
4084
4085typedef struct {
4086 A_UINT32 tlv_header;
4087 A_UINT32 desc_id; /* from tx_send_cmd */
4088 A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */
4089} wmi_mgmt_tx_compl_event_fixed_param;
4090
Pradeep Reddy POTTETI67c778a2016-06-20 14:00:38 +05304091typedef struct {
4092 A_UINT32 tlv_header;
4093 A_UINT32 num_reports;
4094 /* tlv for completion
4095 * A_UINT32 desc_ids[num_reports]; <- from tx_send_cmd
4096 * A_UINT32 status[num_reports]; <- WMI_MGMT_TX_COMP_STATUS_TYPE
4097 */
4098} wmi_mgmt_tx_compl_bundle_event_fixed_param;
4099
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004100#define WMI_TPC_RATE_MAX 160
4101/* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
4102#define WMI_TPC_TX_NUM_CHAIN 4
4103
4104typedef enum {
4105 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
4106 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
4107 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
4108} WMI_TPC_CONFIG_EVENT_FLAG;
4109
4110typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05304111 /* TLV tag and len; tag equals
4112 * WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param
4113 */
4114 A_UINT32 tlv_header;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004115 A_UINT32 regDomain;
4116 A_UINT32 chanFreq;
4117 A_UINT32 phyMode;
4118 A_UINT32 twiceAntennaReduction;
4119 A_UINT32 twiceMaxRDPower;
4120 A_INT32 twiceAntennaGain;
4121 A_UINT32 powerLimit;
4122 A_UINT32 rateMax;
4123 A_UINT32 numTxChain;
4124 A_UINT32 ctl;
4125 A_UINT32 flags;
Govind Singh869c9872016-02-22 18:36:34 +05304126 /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without
4127 * breaking the WMI compatibility
4128 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004129 A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
4130 A_INT8
4131 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN]
4132 [WMI_TPC_TX_NUM_CHAIN];
4133 A_INT8
4134 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN]
4135 [WMI_TPC_TX_NUM_CHAIN];
4136 A_INT8
4137 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN]
4138 [WMI_TPC_TX_NUM_CHAIN];
Govind Singh869c9872016-02-22 18:36:34 +05304139 /** pdev_id for identifying the MAC
4140 * See macros starting with WMI_PDEV_ID_ for values.
4141 */
4142 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004143 /* This TLV is followed by a byte array:
4144 * A_UINT8 ratesArray[];
4145 */
4146} wmi_pdev_tpc_config_event_fixed_param;
4147
4148typedef struct {
4149 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */
4150 A_UINT32 periodCnt;
4151 A_UINT32 L1Cnt;
4152 A_UINT32 L11Cnt;
4153 A_UINT32 L12Cnt;
4154 A_UINT32 L1Entry;
4155 A_UINT32 L11Entry;
4156 A_UINT32 L12Entry;
Govind Singh869c9872016-02-22 18:36:34 +05304157 /** pdev_id for identifying the MAC
4158 * See macros starting with WMI_PDEV_ID_ for values.
4159 */
4160 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004161} wmi_pdev_l1ss_track_event_fixed_param;
4162
4163typedef struct {
4164 A_UINT32 len;
4165 A_UINT32 msgref;
4166 A_UINT32 segmentInfo;
4167} wmi_pdev_seg_hdr_info;
4168
4169/*
4170 * Transmit power scale factor.
4171 *
4172 */
4173typedef enum {
4174 WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
4175 WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
4176 WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
4177 WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
4178 WMI_TP_SCALE_MIN = 4, /* min, but still on */
4179 WMI_TP_SCALE_SIZE = 5, /* max num of enum */
4180} WMI_TP_SCALE;
4181
4182#define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
4183
4184typedef struct {
4185 /** message buffer, NULL terminated */
4186 char bufp[WMI_MAX_DEBUG_MESG];
4187} wmi_debug_mesg_event;
4188
4189enum {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004190 /** P2P device */
4191 VDEV_SUBTYPE_P2PDEV = 0,
4192 /** P2P client */
4193 VDEV_SUBTYPE_P2PCLI,
4194 /** P2P GO */
4195 VDEV_SUBTYPE_P2PGO,
4196 /** BT3.0 HS */
4197 VDEV_SUBTYPE_BT,
4198};
4199
4200typedef struct {
4201 /** idnore power , only use flags , mode and freq */
4202 wmi_channel chan;
4203} wmi_pdev_set_channel_cmd;
4204
4205typedef enum {
4206 WMI_PKTLOG_EVENT_RX = 0x1,
4207 WMI_PKTLOG_EVENT_TX = 0x2,
4208 WMI_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
4209 WMI_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
4210 /* 0x10 used by deprecated DBG_PRINT */
4211 WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x20, /* To support Smart Antenna */
Anurag Chouhane28b1f02016-07-29 11:15:29 +05304212 WMI_PKTLOG_EVENT_SW = 0x40, /* To support SW defined events */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004213} WMI_PKTLOG_EVENT;
4214
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07004215typedef enum {
4216 /* (default) FW will decide under what conditions to enable pktlog */
4217 WMI_PKTLOG_ENABLE_AUTO = 0,
4218 WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */
4219} WMI_PKTLOG_ENABLE;
4220
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004221typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05304222 /** TLV tag and len; tag equals
4223 * WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param
4224 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004225 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05304226 /** pdev_id for identifying the MAC
4227 * See macros starting with WMI_PDEV_ID_ for values.
4228 */
4229 A_UINT32 pdev_id;
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07004230 A_UINT32 evlist; /* WMI_PKTLOG_EVENT */
4231 A_UINT32 enable; /* WMI_PKTLOG_ENABLE */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004232} wmi_pdev_pktlog_enable_cmd_fixed_param;
4233
4234typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05304235 /** TLV tag and len; tag equals
4236 * WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param
4237 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004238 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05304239 /** pdev_id for identifying the MAC
4240 * See macros starting with WMI_PDEV_ID_ for values.
4241 */
4242 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004243} wmi_pdev_pktlog_disable_cmd_fixed_param;
4244
Govind Singh45ef44a2016-02-01 17:45:22 +05304245typedef struct {
4246 /*
4247 * TLV tag and len; tag equals
4248 * WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param
4249 */
4250 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05304251 /** pdev_id for identifying the MAC
4252 * See macros starting with WMI_PDEV_ID_ for values.
4253 */
4254 A_UINT32 pdev_id;
Govind Singh45ef44a2016-02-01 17:45:22 +05304255 /*
4256 * enable for mib stats collection.
4257 * Stats are delivered to host in wmi_mib_stats structure.
4258 * If enable_Mib=1, stats collection is enabled.
4259 * If enable_Mib=0, stats collection does not happen
4260 */
4261 A_UINT32 enable_Mib;
4262} wmi_mib_stats_enable_cmd_fixed_param;
4263
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004264/** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
4265 * NOTE: This constant cannot be changed without breaking
4266 * WMI Compatibility. */
4267
4268#define WMI_DSCP_MAP_MAX (64)
4269/*
4270 * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
4271 * @details
4272 * Create an API for sending the custom DSCP-to-TID map to the target
4273 * If this is a request from the user space or from above the UMAC
4274 * then the best place to implement this is in the umac_if_offload of the OL path.
4275 * Provide a place holder for this API in the ieee80211com (ic).
4276 *
4277 * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
4278 * in the target should be directed to the function pointer in the ic.
4279 *
4280 * Implementation details of the API to send the map to the target are as described-
4281 *
4282 * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
4283 * DSCP-to-TID map is a one dimensional uint32_t array of length 64 to accomodate
4284 * 64 TID values for 2^6 (64) DSCP ids.
4285 * Example:
4286 * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
4287 * 0, 0, 0, 0, 0, 0, 0, 0,
4288 * 1, 1, 1, 1, 1, 1, 1, 1,
4289 * 2, 2, 2, 2, 2, 2, 2, 2,
4290 * 3, 3, 3, 3, 3, 3, 3, 3,
4291 * 4, 4, 4, 4, 4, 4, 4, 4,
4292 * 5, 5, 5, 5, 5, 5, 5, 5,
4293 * 6, 6, 6, 6, 6, 6, 6, 6,
4294 * 7, 7, 7, 7, 7, 7, 7, 7,
4295 * };
4296 *
4297 * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
4298 *
4299 * 3. Copy the DSCP-to-TID map into the WMI buffer.
4300 *
4301 * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
4302 * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
4303 * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
4304 * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
4305 *
4306 */
Govind Singh869c9872016-02-22 18:36:34 +05304307
4308/* DEPRECATED - use VDEV level command instead
4309 * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param)
4310 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004311typedef struct {
4312 A_UINT32 tlv_header;
4313 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
4314 A_UINT32 reserved0;
4315 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
4316 /* map indicating DSCP to TID conversion */
4317 A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
4318} wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
4319
Govind Singhc7d51942016-02-01 12:09:31 +05304320typedef struct {
4321 A_UINT32 tlv_header;
4322 /*
4323 * TLV tag and len; tag equals
4324 * WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param
4325 */
4326 A_UINT32 vdev_id;
4327 /** map indicating DSCP to TID conversion */
4328 A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
Rajeev Kumare18f5282016-04-15 14:08:29 -07004329 A_UINT32 enable_override;
Govind Singhc7d51942016-02-01 12:09:31 +05304330} wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
4331
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +05304332enum WMI_WAKE_GPIO_TYPE {
4333 WMI_WAKE_GPIO_LOW = 1,
4334 WMI_WAKE_GPIO_HIGH = 2,
4335 WMI_WAKE_GPIO_RISING_EDGE = 3,
4336 WMI_WAKE_GPIO_FALLING_EDGE = 4,
4337};
4338
4339/**
4340 * Set GPIO numbers used to wakeup host and wakeup target.
4341 */
4342typedef struct {
4343 /**
4344 * TLV tag and len; tag equals
4345 * WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param
4346 */
4347 A_UINT32 tlv_header;
4348 /* gpio num used to wakeup host, 0xff disable wakeup gpio */
4349 A_UINT32 host_wakeup_gpio;
4350 /* refer to WMI_WAKE_GPIO_TYPE */
4351 A_UINT32 host_wakeup_type;
4352 /* gpio num used to wakeup target, 0xff disable wakeup gpio */
4353 A_UINT32 target_wakeup_gpio;
4354 /* refer to WMI_WAKE_GPIO_TYPE */
4355 A_UINT32 target_wakeup_type;
4356} WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param;
4357
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004358/** Fixed rate (rate-code) for broadcast/ multicast data frames */
4359/* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
4360 * @details
4361 * Create an API for setting the custom rate for the MCAST and BCAST frames
4362 * in the target. If this is a request from the user space or from above the UMAC
4363 * then the best place to implement this is in the umac_if_offload of the OL path.
4364 * Provide a place holder for this API in the ieee80211com (ic).
4365 *
4366 * Implementation details of the API to set custom rates for MCAST and BCAST in
4367 * the target are as described-
4368 *
4369 * 1. The function will have 3 arguments-
4370 * vap structure,
4371 * MCAST/ BCAST identifier code,
4372 * 8 bit rate code
4373 *
4374 * The rate-code is a 1-byte field in which:for given rate, nss and preamble
4375 * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
4376 * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
4377 * b'3-b'0 indicate the rate, which is indicated as follows:
4378 * OFDM : 0: OFDM 48 Mbps
4379 * 1: OFDM 24 Mbps
4380 * 2: OFDM 12 Mbps
4381 * 3: OFDM 6 Mbps
4382 * 4: OFDM 54 Mbps
4383 * 5: OFDM 36 Mbps
4384 * 6: OFDM 18 Mbps
4385 * 7: OFDM 9 Mbps
4386 * CCK (pream == 1)
4387 * 0: CCK 11 Mbps Long
4388 * 1: CCK 5.5 Mbps Long
4389 * 2: CCK 2 Mbps Long
4390 * 3: CCK 1 Mbps Long
4391 * 4: CCK 11 Mbps Short
4392 * 5: CCK 5.5 Mbps Short
4393 * 6: CCK 2 Mbps Short
4394 * HT/VHT (pream == 2/3)
4395 * 0..7: MCS0..MCS7 (HT)
4396 * 0..9: MCS0..MCS9 (VHT)
4397 *
4398 * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
4399 * to the target.
4400 * Arguments to the API are-
4401 * wmi handle,
4402 * VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
4403 * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
4404 * rate value.
4405 */
4406typedef enum {
4407 WMI_SET_MCAST_RATE,
4408 WMI_SET_BCAST_RATE
4409} MCAST_BCAST_RATE_ID;
4410
4411typedef struct {
4412 MCAST_BCAST_RATE_ID rate_id;
4413 A_UINT32 rate;
4414} mcast_bcast_rate;
4415
4416typedef struct {
4417 A_UINT32 tlv_header;
4418 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
4419 A_UINT32 cwmin;
4420 A_UINT32 cwmax;
4421 A_UINT32 aifs;
4422 A_UINT32 txoplimit;
4423 A_UINT32 acm;
4424 A_UINT32 no_ack;
4425} wmi_wmm_params;
4426
Govind Singh869c9872016-02-22 18:36:34 +05304427/* DEPRECATED - use VDEV level command instead
4428 * (wmi_vdev_set_wmm_params_cmd_fixed_param)
4429 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004430typedef struct {
4431 A_UINT32 tlv_header;
4432 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
4433 A_UINT32 reserved0;
4434 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
4435 A_UINT32 dg_type;
4436
4437 /* The TLVs for the 4 AC follows:
4438 * wmi_wmm_params wmm_params_ac_be;
4439 * wmi_wmm_params wmm_params_ac_bk;
4440 * wmi_wmm_params wmm_params_ac_vi;
4441 * wmi_wmm_params wmm_params_ac_vo;
4442 */
4443} wmi_pdev_set_wmm_params_cmd_fixed_param;
4444
4445typedef enum {
4446 WMI_REQUEST_PEER_STAT = 0x01,
4447 WMI_REQUEST_AP_STAT = 0x02,
4448 WMI_REQUEST_PDEV_STAT = 0x04,
4449 WMI_REQUEST_VDEV_STAT = 0x08,
4450 WMI_REQUEST_BCNFLT_STAT = 0x10,
4451 WMI_REQUEST_VDEV_RATE_STAT = 0x20,
Govind Singh32cced32016-02-01 13:33:09 +05304452 WMI_REQUEST_INST_STAT = 0x40,
Govind Singh45ef44a2016-02-01 17:45:22 +05304453 WMI_REQUEST_MIB_STAT = 0x80,
Himanshu Agarwal86319542016-05-24 09:00:39 +05304454 WMI_REQUEST_RSSI_PER_CHAIN_STAT = 0x100,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004455} wmi_stats_id;
4456
4457typedef struct {
4458 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
4459 wmi_stats_id stats_id;
4460 /** unique id identifying the VDEV, generated by the caller */
4461 A_UINT32 vdev_id;
4462 /** peer MAC address */
4463 wmi_mac_addr peer_macaddr;
4464} wmi_request_stats_cmd_fixed_param;
4465
4466/* stats type bitmap */
4467#define WMI_LINK_STATS_RADIO 0x00000001
4468#define WMI_LINK_STATS_IFACE 0x00000002
4469#define WMI_LINK_STATS_ALL_PEER 0x00000004
4470#define WMI_LINK_STATS_PER_PEER 0x00000008
4471
4472/* wifi clear statistics bitmap */
4473#define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
4474#define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
4475#define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
4476#define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
4477#define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
4478#define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
4479#define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
4480#define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
4481#define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */
4482#define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */
4483
4484/** Default value for stats if the stats collection has not started */
4485#define WMI_STATS_VALUE_INVALID 0xffffffff
4486
4487#define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16)
4488#define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value)
4489#define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1)
4490#define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value)
4491#define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
4492#define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
4493
4494typedef struct {
4495 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
4496 A_UINT32 num_of_diag_events_logs;
4497/* The TLVs will follow.
4498 * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
4499 * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
4500 * Bit 17 Indicate if the DIAG type is Enabled/Disabled.
4501 */
4502} wmi_diag_event_log_config_fixed_param;
4503
4504#define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
4505#define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
4506#define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1)
4507#define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
4508
4509typedef struct {
4510 A_UINT32 tlv_header;
4511 A_UINT32 num_of_diag_events_logs;
4512/* The TLVs will follow.
4513 * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
4514 * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
4515 * Bit 17 - Frequncy of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
4516 * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
4517 */
4518} wmi_diag_event_log_supported_event_fixed_params;
4519
4520typedef struct {
4521 /**
4522 * TLV tag and len; tag equals
4523 * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param
4524 */
4525 A_UINT32 tlv_header;
4526 /** placeholder for future */
4527 A_UINT32 reserved0;
4528} wmi_debug_mesg_flush_fixed_param;
4529
4530typedef struct {
4531 /**
4532 * TLV tag and len; tag equals
4533 * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param
4534 */
4535 A_UINT32 tlv_header;
4536 /** placeholder for future */
4537 A_UINT32 reserved0;
4538} wmi_debug_mesg_flush_complete_fixed_param;
4539
4540
4541typedef struct {
4542 /*
4543 * TLV tag and len; tag equals
4544 * WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param
4545 * vdev_id, where RSSI breach event occurred
4546 */
4547 A_UINT32 tlv_header;
4548 A_UINT32 vdev_id;
4549 /* request id */
4550 A_UINT32 request_id;
4551 /*
4552 * bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is
4553 * corresponding to hi_rssi[0-2]
4554 */
4555 A_UINT32 event_bitmap;
4556 /* rssi at the time of RSSI breach. Unit dBm */
4557 A_UINT32 rssi;
4558 /* bssid of the monitored AP's */
4559 wmi_mac_addr bssid;
4560} wmi_rssi_breach_event_fixed_param;
4561
4562
4563typedef struct {
4564 /** TLV tag and len; tag equals
4565 * WMITLV_TAG_STRUC_wmi_fw_mem_dump */
4566 A_UINT32 tlv_header;
4567 /** unique id identifying the segment */
4568 A_UINT32 seg_id;
4569 /** Start address of the segment to be read */
4570 A_UINT32 seg_start_addr_lo;
4571 A_UINT32 seg_start_addr_hi;
4572 /** Length of the segment to be read */
4573 A_UINT32 seg_length;
4574 /** Host bufeer address to which the segment will be read and dumped */
4575 A_UINT32 dest_addr_lo;
4576 A_UINT32 dest_addr_hi;
4577} wmi_fw_mem_dump;
4578
4579/* Command to get firmware memory dump*/
4580typedef struct {
4581 /** TLV tag and len; tag equals
4582 * WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
4583 A_UINT32 tlv_header;
4584 /** unique id identifying the request */
4585 A_UINT32 request_id;
4586 /** number of memory dump segments */
4587 A_UINT32 num_fw_mem_dump_segs;
4588 /**
4589 * This TLV is followed by another TLV
4590 * wmi_fw_mem_dump fw_mem_dump[];
4591 */
4592} wmi_get_fw_mem_dump_fixed_param;
4593
4594/** Event to indicate the completion of fw mem dump */
4595typedef struct {
4596 /* TLV tag and len; tag equals
4597 * WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
4598 A_UINT32 tlv_header;
4599 /** unique id identifying the request, given
4600 * in the request stats command */
4601 A_UINT32 request_id;
4602 /*In case of Firmware memory dump */
4603 A_UINT32 fw_mem_dump_complete;
4604} wmi_update_fw_mem_dump_fixed_param;
4605
4606typedef enum {
4607 WMI_ROAMING_IDLE = 0,
4608 WMI_ROAMING_ACTIVE = 1,
4609} wmi_roam_state;
4610
4611/* access categories */
4612typedef enum {
4613 WMI_AC_VO = 0,
4614 WMI_AC_VI = 1,
4615 WMI_AC_BE = 2,
4616 WMI_AC_BK = 3,
4617 WMI_AC_MAX = 4,
4618} wmi_traffic_ac;
4619
4620typedef enum {
4621 WMI_STA_STATS = 0,
4622 WMI_SOFTAP_STATS = 1,
4623 WMI_IBSS_STATS = 2,
4624 WMI_P2P_CLIENT_STATS = 3,
4625 WMI_P2P_GO_STATS = 4,
4626 WMI_NAN_STATS = 5,
4627 WMI_MESH_STATS = 6,
4628} wmi_link_iface_type;
4629
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004630/*Clear stats*/
4631typedef struct {
4632 A_UINT32 tlv_header;
4633 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
4634 /** unique id identifying the VDEV, generated by the caller */
4635 A_UINT32 vdev_id;
4636 /** stop_stats_collection_req = 1 will imply stop the statistics collection */
4637 A_UINT32 stop_stats_collection_req;
4638 /** identifies what stats to be cleared */
4639 A_UINT32 stats_clear_req_mask;
4640 /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
4641 wmi_mac_addr peer_macaddr;
4642} wmi_clear_link_stats_cmd_fixed_param;
4643
4644/* Link Stats configuration params. Trigger the link layer statistics collection*/
4645typedef struct {
4646 A_UINT32 tlv_header;
4647 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
4648 /** threshold to classify the pkts as short or long */
4649 A_UINT32 mpdu_size_threshold;
4650 /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
4651 A_UINT32 aggressive_statistics_gathering;
4652} wmi_start_link_stats_cmd_fixed_param;
4653
4654typedef struct {
4655 A_UINT32 tlv_header;
4656 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
4657 /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
4658 A_UINT32 stats_type;
4659 /** unique id identifying the VDEV, generated by the caller */
4660 A_UINT32 vdev_id;
4661 /** unique id identifying the request, generated by the caller */
4662 A_UINT32 request_id;
4663 /** peer MAC address */
4664 wmi_mac_addr peer_macaddr;
4665} wmi_request_link_stats_cmd_fixed_param;
4666
4667/* channel statistics */
4668typedef struct {
4669 A_UINT32 tlv_header;
4670 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
4671 /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
4672 A_UINT32 channel_width;
4673 /** Primary 20 MHz channel */
4674 A_UINT32 center_freq;
4675 /** center frequency (MHz) first segment */
4676 A_UINT32 center_freq0;
4677 /** center frequency (MHz) second segment */
4678 A_UINT32 center_freq1;
4679 /** msecs the radio is awake (32 bits number accruing over time) */
4680 A_UINT32 radio_awake_time;
4681 /** msecs the CCA register is busy (32 bits number accruing over time) */
4682 A_UINT32 cca_busy_time;
4683} wmi_channel_stats;
4684
Krishna Kumaar Natarajanee6cfa72016-03-25 14:05:03 -07004685/*
4686 * Each step represents 0.5 dB. The starting value is 0 dBm.
4687 * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps.
4688 */
4689#define MAX_TPC_LEVELS 64
4690
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004691/* radio statistics */
4692typedef struct {
4693 A_UINT32 tlv_header;
4694 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
4695 /** Wifi radio (if multiple radio supported) */
4696 A_UINT32 radio_id;
4697 /** msecs the radio is awake (32 bits number accruing over time) */
4698 A_UINT32 on_time;
4699 /** msecs the radio is transmitting (32 bits number accruing over time) */
4700 A_UINT32 tx_time;
4701 /** msecs the radio is in active receive (32 bits number accruing over time) */
4702 A_UINT32 rx_time;
4703 /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
4704 A_UINT32 on_time_scan;
4705 /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
4706 A_UINT32 on_time_nbd;
4707 /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
4708 A_UINT32 on_time_gscan;
4709 /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
4710 A_UINT32 on_time_roam_scan;
4711 /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
4712 A_UINT32 on_time_pno_scan;
4713 /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
4714 A_UINT32 on_time_hs20;
4715 /** number of channels */
4716 A_UINT32 num_channels;
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304717 /*
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304718 * tx time per TPC level - DEPRECATED
4719 * This field is deprecated.
4720 * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID
4721 * message.
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304722 */
Krishna Kumaar Natarajanee6cfa72016-03-25 14:05:03 -07004723 A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS];
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304724} wmi_radio_link_stats;
4725
4726/** tx time per power level statistics */
4727typedef struct {
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304728 /*
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304729 * TLV tag and len; tag equals
4730 * WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304731 */
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304732 A_UINT32 tlv_header;
4733 /* total number of tx power levels */
4734 A_UINT32 total_num_tx_power_levels;
4735 /* number of tx power levels that are carried in this event */
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304736 A_UINT32 num_tx_power_levels;
4737 /*
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304738 * offset of current stats
4739 * If ((num_tx_power_levels + power_level_offset)) ==
4740 * total_num_tx_power_levels)
4741 * this message completes the report of tx time per power levels.
4742 * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID
4743 * messages will be sent by the target to deliver the remainder of the
4744 * tx time per power level stats.
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304745 */
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304746 A_UINT32 power_level_offset;
4747 /*
4748 * This TLV will be followed by a TLV containing a variable-length
4749 * array of A_UINT32 with tx time per power level data
4750 * A_UINT32 tx_time_per_power_level[num_tx_power_levels]
4751 * The tx time is in units of milliseconds.
4752 * The power levels are board-specific values; a board-specific
4753 * translation has to be applied to determine what actual power
4754 * corresponds to each power level.
4755 * Just as the host has a BDF file available, the host should also have
4756 * a data file available that provides the power level to power
4757 * translations.
4758 */
4759} wmi_tx_power_level_stats_evt_fixed_param;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004760
4761/** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
4762typedef struct {
4763 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
4764 /** unique id identifying the request, given in the request stats command */
4765 A_UINT32 request_id;
4766 /** Number of radios*/
4767 A_UINT32 num_radio;
4768 /** more_data will be set depending on the number of radios */
4769 A_UINT32 more_radio_events;
4770/*
4771 * This TLV is followed by another TLV of array of bytes
4772 * size of(struct wmi_radio_link_stats);
4773 *
4774 * This TLV is followed by another TLV of array of bytes
4775 * num_channels * size of(struct wmi_channel_stats)
4776 */
4777
4778} wmi_radio_link_stats_event_fixed_param;
4779
4780/* per rate statistics */
4781typedef struct {
4782 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
4783 /** rate information
4784 * The rate-code is a 1-byte field in which:for given rate, nss and preamble
4785 * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
4786 * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
4787 * b'3-b'0 indicate the rate, which is indicated as follows:
4788 * OFDM : 0: OFDM 48 Mbps
4789 * 1: OFDM 24 Mbps
4790 * 2: OFDM 12 Mbps
4791 * 3: OFDM 6 Mbps
4792 * 4: OFDM 54 Mbps
4793 * 5: OFDM 36 Mbps
4794 * 6: OFDM 18 Mbps
4795 * 7: OFDM 9 Mbps
4796 * CCK (pream == 1)
4797 * 0: CCK 11 Mbps Long
4798 * 1: CCK 5.5 Mbps Long
4799 * 2: CCK 2 Mbps Long
4800 * 3: CCK 1 Mbps Long
4801 * 4: CCK 11 Mbps Short
4802 * 5: CCK 5.5 Mbps Short
4803 * 6: CCK 2 Mbps Short
4804 * HT/VHT (pream == 2/3)
4805 * 0..7: MCS0..MCS7 (HT)
4806 * 0..9: MCS0..MCS9 (VHT)
4807 */
4808 A_UINT32 rate;
4809 /** units of 100 Kbps */
4810 A_UINT32 bitrate;
4811 /** number of successfully transmitted data pkts (ACK rcvd) */
4812 A_UINT32 tx_mpdu;
4813 /** number of received data pkts */
4814 A_UINT32 rx_mpdu;
4815 /** number of data packet losses (no ACK) */
4816 A_UINT32 mpdu_lost;
4817 /** total number of data pkt retries */
4818 A_UINT32 retries;
4819 /** number of short data pkt retries */
4820 A_UINT32 retries_short;
4821 /** number of long data pkt retries */
4822 A_UINT32 retries_long;
4823} wmi_rate_stats;
4824
4825typedef struct {
4826 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
4827 /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
4828 A_UINT32 peer_type;
4829 /** mac address */
4830 wmi_mac_addr peer_mac_address;
4831 /** peer wmi_CAPABILITY_XXX */
4832 A_UINT32 capabilities;
4833 /** number of rates */
4834 A_UINT32 num_rates;
4835} wmi_peer_link_stats;
4836
4837/** PEER statistics (once started) reset and start afresh after each connection */
4838typedef struct {
4839 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
4840 /** unique id identifying the request, given in the request stats command */
4841 A_UINT32 request_id;
4842 /** number of peers accomidated in this particular event */
4843 A_UINT32 num_peers;
4844 /** Indicates the fragment number */
4845 A_UINT32 peer_event_number;
4846 /** Indicates if there are more peers which will be sent as seperate peer_stats event */
4847 A_UINT32 more_data;
4848
4849/**
4850 * This TLV is followed by another TLV
4851 * num_peers * size of(struct wmi_peer_stats)
4852 * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
4853 */
4854} wmi_peer_stats_event_fixed_param;
4855
4856/* per access category statistics */
4857typedef struct {
4858 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
4859 /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
4860 A_UINT32 ac_type;
4861 /** number of successfully transmitted unicast data pkts (ACK rcvd) */
4862 A_UINT32 tx_mpdu;
4863 /** number of received unicast mpdus */
4864 A_UINT32 rx_mpdu;
4865 /** number of succesfully transmitted multicast data packets */
4866 /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
4867 A_UINT32 tx_mcast;
4868 /** number of received multicast data packets */
4869 A_UINT32 rx_mcast;
4870 /** number of received unicast a-mpdus */
4871 A_UINT32 rx_ampdu;
4872 /** number of transmitted unicast a-mpdus */
4873 A_UINT32 tx_ampdu;
4874 /** number of data pkt losses (no ACK) */
4875 A_UINT32 mpdu_lost;
4876 /** total number of data pkt retries */
4877 A_UINT32 retries;
4878 /** number of short data pkt retries */
4879 A_UINT32 retries_short;
4880 /** number of long data pkt retries */
4881 A_UINT32 retries_long;
4882 /** data pkt min contention time (usecs) */
4883 A_UINT32 contention_time_min;
4884 /** data pkt max contention time (usecs) */
4885 A_UINT32 contention_time_max;
4886 /** data pkt avg contention time (usecs) */
4887 A_UINT32 contention_time_avg;
4888 /** num of data pkts used for contention statistics */
4889 A_UINT32 contention_num_samples;
4890} wmi_wmm_ac_stats;
4891
4892/* interface statistics */
4893typedef struct {
4894 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
4895 /** access point beacon received count from connected AP */
4896 A_UINT32 beacon_rx;
4897 /** access point mgmt frames received count from connected AP (including Beacon) */
4898 A_UINT32 mgmt_rx;
4899 /** action frames received count */
4900 A_UINT32 mgmt_action_rx;
4901 /** action frames transmit count */
4902 A_UINT32 mgmt_action_tx;
4903 /** access Point Beacon and Management frames RSSI (averaged) */
4904 A_UINT32 rssi_mgmt;
4905 /** access Point Data Frames RSSI (averaged) from connected AP */
4906 A_UINT32 rssi_data;
4907 /** access Point ACK RSSI (averaged) from connected AP */
4908 A_UINT32 rssi_ack;
4909 /** number of peers */
4910 A_UINT32 num_peers;
4911 /** Indicates how many peer_stats events will be sent depending on the num_peers. */
4912 A_UINT32 num_peer_events;
4913 /** number of ac */
4914 A_UINT32 num_ac;
4915 /** Roaming Stat */
4916 A_UINT32 roam_state;
4917 /**
4918 * Average Beacon spread offset is the averaged time delay between TBTT
4919 * and beacon TSF */
4920 /** Upper 32 bits of averaged 64 bit beacon spread offset */
4921 A_UINT32 avg_bcn_spread_offset_high;
4922 /** Lower 32 bits of averaged 64 bit beacon spread offset */
4923 A_UINT32 avg_bcn_spread_offset_low;
4924 /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
4925 A_UINT32 is_leaky_ap;
4926 /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
4927 A_UINT32 avg_rx_frms_leaked;
4928 /** Rx leak watch window currently in force to minimize data loss
4929 * because of leaky AP. Rx leak window is the
4930 * time driver waits before shutting down the radio or switching the
4931 * channel and after receiving an ACK for
4932 * a data frame with PM bit set) */
4933 A_UINT32 rx_leak_window;
4934} wmi_iface_link_stats;
4935
4936/** Interface statistics (once started) reset and start afresh after each connection */
4937typedef struct {
4938 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
4939 /** unique id identifying the request, given in the request stats command */
4940 A_UINT32 request_id;
4941 /** unique id identifying the VDEV, generated by the caller */
4942 A_UINT32 vdev_id;
4943/*
4944 * This TLV is followed by another TLV
4945 * wmi_iface_link_stats iface_link_stats;
4946 * num_ac * size of(struct wmi_wmm_ac_stats)
4947 */
4948} wmi_iface_link_stats_event_fixed_param;
4949
4950/** Suspend option */
4951enum {
4952 WMI_PDEV_SUSPEND, /* suspend */
4953 WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
4954};
4955
4956typedef struct {
4957 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */
4958 /* suspend option sent to target */
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05304959 /*
4960 * pdev_id for identifying the MAC, See macros
4961 * starting with WMI_PDEV_ID_ for values.
4962 */
4963 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004964 A_UINT32 suspend_opt;
4965} wmi_pdev_suspend_cmd_fixed_param;
4966
4967typedef struct {
4968 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 +05304969 /*
4970 * pdev_id for identifying the MAC, See macros
4971 * starting with WMI_PDEV_ID_ for values.
4972 */
4973 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004974} wmi_pdev_resume_cmd_fixed_param;
4975
4976typedef struct {
4977 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */
4978 A_UINT32 num_vdev_stats; /* number of vdevs */
4979} wmi_vdev_rate_stats_event_fixed_param;
4980
4981typedef struct {
4982 A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info */
4983 A_UINT32 vdevid; /* Id of the wlan vdev */
4984 A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted */
4985 A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above */
4986 A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
4987 A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
4988} wmi_vdev_rate_ht_info;
4989
4990typedef struct {
Himanshu Agarwal4eefcde2016-09-09 12:59:17 +05304991 /**
4992 * TLV tag and len, tag equals
4993 * WMITLV_TAG_STRUC_wmi_rx_aggr_failure_event_fixed_param
4994 */
4995 A_UINT32 tlv_header;
4996 A_UINT32 num_failure_info; /* How many holes on rx aggregation */
4997} wmi_rx_aggr_failure_event_fixed_param;
4998
4999typedef struct {
5000 /**
5001 * TLV tag and len, tag equals
5002 * WMITLV_wmi_rx_aggr_failure_info
5003 */
5004 A_UINT32 tlv_header;
5005 A_UINT32 start_seq; /* start sequence number of the hole */
5006 A_UINT32 end_seq; /* end sequence number of the hole */
5007} wmi_rx_aggr_failure_info;
5008
5009typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005010 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
5011 wmi_stats_id stats_id;
5012 /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
5013 A_UINT32 num_pdev_stats;
5014 /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */
5015 A_UINT32 num_vdev_stats;
5016 /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */
5017 A_UINT32 num_peer_stats;
5018 A_UINT32 num_bcnflt_stats;
5019 /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */
5020 A_UINT32 num_chan_stats;
Govind Singh45ef44a2016-02-01 17:45:22 +05305021 /** number of MIB stats event structures (wmi_mib_stats) */
5022 A_UINT32 num_mib_stats;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005023 /* This TLV is followed by another TLV of array of bytes
5024 * A_UINT8 data[];
5025 * This data array contains
5026 * num_pdev_stats * size of(struct wmi_pdev_stats)
5027 * num_vdev_stats * size of(struct wmi_vdev_stats)
5028 * num_peer_stats * size of(struct wmi_peer_stats)
5029 * num_bcnflt_stats * size_of()
5030 * num_chan_stats * size of(struct wmi_chan_stats)
Govind Singh45ef44a2016-02-01 17:45:22 +05305031 * num_mib_stats * size of(struct wmi_mib_stats)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005032 *
5033 */
5034} wmi_stats_event_fixed_param;
5035
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305036/* WLAN channel CCA stats bitmap */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305037#define WLAN_STATS_IDLE_TIME_SHIFT 0
5038#define WLAN_STATS_IDLE_TIME_TIME 0x00000001
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305039
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305040#define WLAN_STATS_TX_TIME_SHIFT 1
5041#define WLAN_STATS_TX_TIME_MASK 0x00000002
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305042
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305043#define WLAN_STATS_RX_IN_BSS_TIME_SHIFT 2
5044#define WLAN_STATS_RX_IN_BSS_TIME_MASK 0x00000004
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305045
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305046#define WLAN_STATS_RX_OUT_BSS_TIME_SHIFT 3
5047#define WLAN_STATS_RX_OUT_BSS_TIME_MASK 0x00000008
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305048
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305049#define WLAN_STATS_RX_BUSY_TIME_SHIFT 4
5050#define WLAN_STATS_RX_BUSY_TIME_MASK 0x00000010
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305051
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305052#define WLAN_STATS_RX_IN_BAD_COND_TIME_SHIFT 5
5053#define WLAN_STATS_RX_IN_BAD_COND_TIME_MASK 0x00000020
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305054
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305055#define WLAN_STATS_TX_IN_BAD_COND_TIME_SHIFT 6
5056#define WLAN_STATS_TX_IN_BAD_COND_TIME_MASK 0x00000040
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305057
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305058#define WLAN_STATS_WLAN_NOT_AVAIL_TIME_SHIFT 7
5059#define WLAN_STATS_WLAN_NOT_AVAIL_TIME_MASK 0x00000080
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305060
5061/* WLAN peer signal stats bitmap */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305062#define WLAN_STATS_PER_CHAIN_SNR_SHIFT 0
5063#define WLAN_STATS_PER_CHAIN_SNR_MASK 0x00000001
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305064
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305065#define WLAN_STATS_PER_CHAIN_NF_SHIFT 1
5066#define WLAN_STATS_PER_CHAIN_NF_MASK 0x00000002
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305067
5068/* WLAN TX stats bitmap */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305069#define WLAN_STATS_TX_MSDU_CNT_SHIFT 0
5070#define WLAN_STATS_TX_MSDU_CNT_MASK 0x00000001
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305071
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305072#define WLAN_STATS_TX_MPDU_CNT_SHIFT 1
5073#define WLAN_STATS_TX_MPDU_CNT_MASK 0x00000002
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305074
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305075#define WLAN_STATS_TX_PPDU_CNT_SHIFT 2
5076#define WLAN_STATS_TX_PPDU_CNT_MASK 0x00000004
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305077
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305078#define WLAN_STATS_TX_BYTES_SHIFT 3
5079#define WLAN_STATS_TX_BYTES_MASK 0x00000008
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305080
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305081#define WLAN_STATS_TX_MSDU_DROP_CNT_SHIFT 4
5082#define WLAN_STATS_TX_MSDU_DROP_CNT_MASK 0x00000010
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305083
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305084#define WLAN_STATS_TX_DROP_BYTES_SHIFT 5
5085#define WLAN_STATS_TX_DROP_BYTES_MASK 0x00000020
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305086
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305087#define WLAN_STATS_TX_MPDU_RETRY_CNT_SHIFT 6
5088#define WLAN_STATS_TX_MPDU_RETRY_CNT_MASK 0x00000040
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305089
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305090#define WLAN_STATS_TX_MPDU_FAIL_CNT_SHIFT 7
5091#define WLAN_STATS_TX_MPDU_FAIL_CNT_MASK 0x00000080
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305092
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305093#define WLAN_STATS_TX_PPDU_FAIL_CNT_SHIFT 8
5094#define WLAN_STATS_TX_PPDU_FAIL_CNT_MASK 0x00000100
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305095
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305096#define WLAN_STATS_TX_MPDU_AGGR_SHIFT 9
5097#define WLAN_STATS_TX_MPDU_AGGR_MASK 0x00000200
5098
5099#define WLAN_STATS_TX_SUCC_MCS_SHIFT 10
5100#define WLAN_STATS_TX_SUCC_MCS_MASK 0x00000400
5101
5102#define WLAN_STATS_TX_FAIL_MCS_SHIFT 11
5103#define WLAN_STATS_TX_FAIL_MCS_MASK 0x00000800
5104
5105#define WLAN_STATS_TX_DELAY_SHIFT 12
5106#define WLAN_STATS_TX_DELAY_MASK 0x00001000
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305107
5108/* WLAN RX stats bitmap */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305109#define WLAN_STATS_MAC_RX_MPDU_CNT_SHIFT 0
5110#define WLAN_STATS_MAC_RX_MPDU_CNT_MASK 0x00000001
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305111
5112#define WLAN_STATS_MAC_RX_BYTES_SHIFT 1
5113#define WLAN_STATS_MAC_RX_BYTES_MASK 0x00000002
5114
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305115#define WLAN_STATS_PHY_RX_PPDU_CNT_SHIFT 2
5116#define WLAN_STATS_PHY_RX_PPDU_CNT_MASK 0x00000004
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305117
5118#define WLAN_STATS_PHY_RX_BYTES_SHIFT 3
5119#define WLAN_STATS_PHY_RX_BYTES_MASK 0x00000008
5120
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305121#define WLAN_STATS_RX_DISORDER_CNT_SHIFT 4
5122#define WLAN_STATS_RX_DISORDER_CNT_MASK 0x00000010
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305123
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305124#define WLAN_STATS_RX_RETRY_CNT_SHIFT 5
5125#define WLAN_STATS_RX_RETRY_CNT_MASK 0x00000020
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305126
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305127#define WLAN_STATS_RX_DUP_CNT_SHIFT 6
5128#define WLAN_STATS_RX_DUP_CNT_MASK 0x00000040
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305129
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305130#define WLAN_STATS_RX_DISCARD_CNT_SHIFT 7
5131#define WLAN_STATS_RX_DISCARD_CNT_MASK 0x00000080
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305132
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305133#define WLAN_STATS_RX_MPDU_AGGR_SHIFT 8
5134#define WLAN_STATS_RX_MPDU_AGGR_MASK 0x00000100
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305135
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305136#define WLAN_STATS_RX_MCS_SHIFT 9
5137#define WLAN_STATS_RX_MCS_MASK 0x00000200
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305138
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305139#define WLAN_STATS_STA_PS_INDS_SHIFT 10
5140#define WLAN_STATS_STA_PS_INDS_MASK 0x00000400
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305141
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305142#define WLAN_STATS_STA_PS_DURS_SHIFT 11
5143#define WLAN_STATS_STA_PS_DURS_MASK 0x00000800
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305144
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305145#define WLAN_STATS_RX_PROBE_REQS_SHIFT 12
5146#define WLAN_STATS_RX_PROBE_REQS_MASK 0x00001000
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305147
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305148#define WLAN_STATS_RX_OTH_MGMTS_SHIFT 13
5149#define WLAN_STATS_RX_OTH_MGMTS_MASK 0x00002000
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305150
5151typedef struct {
5152 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats */
5153 A_UINT32 vdev_id;
5154 /** Percentage of idle time, no TX, no RX, no interference */
5155 A_UINT32 idle_time;
5156 /** Percentage of time transmitting packets */
5157 A_UINT32 tx_time;
5158 /** Percentage of time receiving packets in current BSSs */
5159 A_UINT32 rx_in_bss_time;
5160 /** Percentage of time receiving packets not in current BSSs */
5161 A_UINT32 rx_out_bss_time;
5162 /** Percentage of time interference detected. */
5163 A_UINT32 rx_busy_time;
5164 /** Percentage of time receiving packets with errors
5165 * or packets flagged as retransmission or seqnum discontinued. */
5166 A_UINT32 rx_in_bad_cond_time;
5167 /** Percentage of time the device transmitted packets that haven't been ACKed. */
5168 A_UINT32 tx_in_bad_cond_time;
5169 /** Percentage of time the chip is unable to work in normal conditions. */
5170 A_UINT32 wlan_not_avail_time;
5171} wmi_chan_cca_stats;
5172
5173/** Thresholds of cca stats, stands for percentages of stats variation.
5174 * Check wmi_chan_cca_stats for each stats's meaning.
5175 */
5176typedef struct {
5177 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats_thresh */
5178 A_UINT32 idle_time; /* units = percent */
5179 A_UINT32 tx_time; /* units = percent */
5180 A_UINT32 rx_in_bss_time; /* units = percent */
5181 A_UINT32 rx_out_bss_time; /* units = percent */
5182 A_UINT32 rx_busy_time; /* units = percent */
5183 A_UINT32 rx_in_bad_cond_time; /* units = percent */
5184 A_UINT32 tx_in_bad_cond_time; /* units = percent */
5185 A_UINT32 wlan_not_avail_time; /* units = percent */
5186} wmi_chan_cca_stats_thresh;
5187
5188typedef struct {
5189 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats */
5190 A_UINT32 vdev_id;
5191 A_UINT32 peer_id;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305192 /** per chain SNR in current bss, units are dB */
5193 A_INT32 per_chain_snr[WMI_MAX_CHAINS];
5194 /** per chain background noise, units are dBm */
5195 A_INT32 per_chain_nf[WMI_MAX_CHAINS];
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305196} wmi_peer_signal_stats;
5197
5198/** Thresholds of signal stats, stand for percentage of stats variation.
5199 * Check wmi_peer_signal_stats for each stats's meaning.
5200 */
5201typedef struct {
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +05305202 /**
5203 * TLV tag and len; tag equals
5204 * WMITLV_TAG_STRUC_wmi_peer_signal_stats_thresh
5205 */
5206 A_UINT32 tlv_header;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305207 A_UINT32 per_chain_snr; /* units = dB */
5208 A_UINT32 per_chain_nf; /* units = dBm */
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305209} wmi_peer_signal_stats_thresh;
5210
5211typedef struct {
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305212 /**
5213 * TLV tag and len; tag equals
5214 * WMITLV_TAG_STRUC_wmi_tx_stats
5215 */
5216 A_UINT32 tlv_header;
5217 /** Number of total TX MSDUs on MAC layer in the period */
5218 A_UINT32 tx_msdu_cnt;
5219 /** Number of total TX MPDUs on MAC layer in the period */
5220 A_UINT32 tx_mpdu_cnt;
5221 /** Number of total TX PPDUs on MAC layer in the period */
5222 A_UINT32 tx_ppdu_cnt;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305223 /** Bytes of tx data on MAC layer in the period */
5224 A_UINT32 tx_bytes;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305225 /**
5226 * Number of TX MSDUs cancelled due to any reason in the period,
5227 * such as WMM limitation/bandwidth limitation/radio congestion
5228 */
5229 A_UINT32 tx_msdu_drop_cnt;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305230 /** Bytes of dropped TX packets in the period */
5231 A_UINT32 tx_drop_bytes;
5232 /** Number of unacked transmissions of MPDUs */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305233 A_UINT32 tx_mpdu_retry_cnt;
5234 /** Number of MPDUs have not been ACKed despite retried */
5235 A_UINT32 tx_mpdu_fail_cnt;
5236 /** Number of PPDUs which received no block ack */
5237 A_UINT32 tx_ppdu_fail_cnt;
5238 /**
5239 * This TLV is followed by TLVs below: :
5240 * A_UINT32 tx_mpdu_aggr[tx_mpdu_aggr_array_len];
5241 * A_UINT32 tx_succ_mcs[tx_msdu_acked_mcs_array_len];
5242 * A_UINT32 tx_fail_mcs[tx_msdu_failed_mcs_array_len];
5243 * A_UINT32 tx_delay[tx_msdu_delay_array_len];
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305244 */
5245} wmi_tx_stats;
5246
5247/** Thresholds of tx stats, stand for percentage of stats variation.
5248 * Check wmi_tx_stats for each stats's meaning.
5249 */
5250typedef struct {
5251 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats_thresh */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305252 A_UINT32 tx_msdu_cnt;
5253 A_UINT32 tx_mpdu_cnt;
5254 A_UINT32 tx_ppdu_cnt;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305255 A_UINT32 tx_bytes;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305256 A_UINT32 tx_msdu_drop_cnt;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305257 A_UINT32 tx_drop_bytes;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305258 A_UINT32 tx_mpdu_retry_cnt;
5259 A_UINT32 tx_mpdu_fail_cnt;
5260 A_UINT32 tx_ppdu_fail_cnt;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305261 A_UINT32 tx_mpdu_aggr;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305262 A_UINT32 tx_succ_mcs;
5263 A_UINT32 tx_fail_mcs;
5264 A_UINT32 tx_delay;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305265} wmi_tx_stats_thresh;
5266
5267typedef struct {
5268 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_tx_stats */
5269 A_UINT32 vdev_id;
5270 A_UINT32 peer_id;
5271 /* The TLVs for the 4 AC follows:
5272 * wmi_tx_stats tx_stats[]; wmi_tx_stats for BE/BK/VI/VO
5273 */
5274} wmi_peer_ac_tx_stats;
5275
5276typedef struct {
5277 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats */
5278 A_UINT32 tlv_header;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305279 /** Number of RX MSDUs on MAC layer */
5280 A_UINT32 mac_rx_msdu_cnt;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305281 /** Bytes of RX packets on MAC layer */
5282 A_UINT32 mac_rx_bytes;
5283 /** Number of RX packets on PHY layer */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305284 A_UINT32 phy_rx_ppdu_cnt;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305285 /** Bytes of RX packets on PHY layer */
5286 A_UINT32 phy_rx_bytes;
5287 /** Number of discontinuity in seqnum */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305288 A_UINT32 rx_disorder_cnt;
5289 /** Number of RX MPDUs flagged as retransmissions */
5290 A_UINT32 rx_retry_cnt;
5291 /** Number of RX MPDUs identified as duplicates */
5292 A_UINT32 rx_dup_cnt;
5293 /** Number of RX MSDUs discarded */
5294 A_UINT32 rx_msdu_discard_cnt;
5295 /**
5296 * This TLV is followed by TLVs below:
5297 * A_UINT32 rx_mpdu_aggr[rx_mpdu_aggr_array_len];
5298 * A_UINT32 rx_mcs[rx_msdu_mcs_array_len];
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305299 */
5300} wmi_rx_stats;
5301
5302/** Thresholds of rx stats, stands for percentage of stats variation.
5303 * Check wmi_rx_stats for each stats's meaning.
5304 */
5305typedef struct {
5306 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats_thresh */
5307 A_UINT32 tlv_header;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305308 A_UINT32 mac_rx_mpdu_cnt;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305309 A_UINT32 mac_rx_bytes;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305310 A_UINT32 phy_rx_ppdu_cnt;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305311 A_UINT32 phy_rx_bytes;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305312 A_UINT32 rx_disorder_cnt;
5313 A_UINT32 rx_retry_cnt;
5314 A_UINT32 rx_dup_cnt;
5315 A_UINT32 rx_discard_cnt;
5316 A_UINT32 rx_mpdu_aggr;
5317 A_UINT32 rx_mcs;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305318 A_UINT32 sta_ps_inds;
5319 A_UINT32 sta_ps_durs;
5320 A_UINT32 rx_probe_reqs;
5321 A_UINT32 rx_oth_mgmts;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305322} wmi_rx_stats_thresh;
5323
5324typedef struct {
5325 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_rx_stats */
5326 A_UINT32 tlv_header;
5327 A_UINT32 vdev_id;
5328 A_UINT32 peer_id;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305329 /** How many times STAs go to sleep */
5330 A_UINT32 sta_ps_inds;
5331 /** Total sleep time of STAs, milliseconds units */
5332 A_UINT32 sta_ps_durs;
5333 /** Number of probe requests received */
5334 A_UINT32 rx_probe_reqs;
5335 /**
5336 * Number of other management frames received, not including probe
5337 * requests
5338 */
5339 A_UINT32 rx_oth_mgmts;
5340 /**
5341 * The TLVs for the 4 AC follows:
5342 * wmi_rx_stats rx_stats[]; wmi_rx_stats for BE/BK/VI/VO
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305343 */
5344} wmi_peer_ac_rx_stats;
5345
5346typedef enum {
5347 /** Periodic timer timed out, based on the period specified
5348 * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
5349 */
5350 TRIGGER_COND_ID_TIMER_TIMED_OUT = 0x1,
5351 /** Any of the (enabled) stats thresholds specified
5352 * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
5353 * within the current stats period.
5354 */
5355 TRIGGER_COND_ID_THRESH_EXCEEDED = 0x2,
5356 /** In Response to the one-time wlan stats request of
5357 * WMI_REQUEST_WLAN_STATS_CMDID from host.
5358 */
5359 TRIGGER_COND_ID_ONE_TIME_REQUEST = 0x3,
5360} wmi_report_stats_event_trigger_cond_id;
5361
5362typedef struct {
5363 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_report_stats_event_fixed_param */
5364 /** Indicate what triggered this event, check wmi_report_stats_event_trigger_cond_id for details */
5365 A_UINT32 trigger_cond_id;
5366 /** Bitmap to indicate changed channel CCA stats which exceeded the thresholds */
5367 A_UINT32 cca_chgd_bitmap;
5368 /** Bitmap to indicate changed peer signal stats which exceeded the thresholds */
5369 A_UINT32 sig_chgd_bitmap;
5370 /** Bitmap to indicate changed TX counters which exceeded the thresholds */
5371 A_UINT32 tx_chgd_bitmap;
5372 /** Bitmap to indicate changed RX counters which exceeded the thresholds */
5373 A_UINT32 rx_chgd_bitmap;
5374 /** number of per channel CCA stats structures (wmi_chan_cca_stats), 0 to max vdevs*/
5375 A_UINT32 num_chan_cca_stats;
5376 /** number of per peer signal stats structures (wmi_peer_signal_stats), 0 to max peers*/
5377 A_UINT32 num_peer_signal_stats;
5378 /** number of per peer ac TX stats structures (wmi_peer_ac_tx_stats), 0 to max peers*/
5379 A_UINT32 num_peer_ac_tx_stats;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305380 /**
5381 * Array length of tx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
5382 * The array indicates number of MPDUs sent on specified aggregation size
5383 * (per number of MPDUs per AMPDUs / 1 to 7 and 8+).
5384 * Array length can be set per WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_LEN
5385 */
5386 A_UINT32 tx_mpdu_aggr_array_len;
5387 /**
5388 * Array length of tx_succ_mcs[] which is histogram of encoding rate.
5389 * The array indicates number of acked PPDUs sent at a specific rate
5390 */
5391 A_UINT32 tx_succ_mcs_array_len;
5392 /**
5393 * Array length of tx_fail_mcs[] which is histogram of encoding rate.
5394 * The array indicates number of unacked PPDUs sent at a specific rate
5395 */
5396 A_UINT32 tx_fail_mcs_array_len;
5397 /**
5398 * tx_delay[]is a histogram of delays on MAC layer.
5399 * The array counts numbers of PPDUs encountering different TX time delays.
5400 * TX delay here means time interval between the time the packet has been received
5401 * at the MAC layer and the time lower layers returns a tx status (<10ms to >100ms)
5402 *
5403 * The bin size tx_delay_bin_size_ms specifies how many milliseconds
5404 * each bin of the tx_delay histogram represents.
5405 * By default the bin size is 10ms.
5406 * tx_delay[0] -> delays between 0-9 ms
5407 * tx_delay[1] -> delays between 10-19 ms
5408 * ...
5409 * tx_delay[9] -> delays between 90-99 ms
5410 * tx_delay[10] -> delays >= 100 ms
5411 * Bin size can be set per WMI_PDEV_PARAM_TX_DELAY_BIN_SIZE_MS.
5412 */
5413 A_UINT32 tx_delay_bin_size_ms;
5414 /** Array length of tx_delay[]. It can be set per WMI_PDEV_PARAM_TX_DELAY_ARRAY_LEN */
5415 A_UINT32 tx_delay_array_len;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305416 /** number of per peer ac RX stats structures (wmi_peer_ac_rx_stats), 0 to max peers*/
5417 A_UINT32 num_peer_ac_rx_stats;
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305418 /**
5419 * Array length of rx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
5420 * It can be set per WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_LEN
5421 */
5422 A_UINT32 rx_mpdu_aggr_array_len;
5423 /**
5424 * Array size of rx_mcs[] which is histogram of encoding rate.
5425 * The array indicates number of PPDUs received at a specific rate
5426 */
5427 A_UINT32 rx_mcs_array_size;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305428
5429 /**
5430 * This TLV is followed by TLVs below:
Himanshu Agarwal5fd83432016-09-14 20:09:41 +05305431 * wmi_chan_cca_stats chan_cca_stats[]; Array length is specified by num_chan_cca_stats
5432 * wmi_peer_signal_stats peer_signal_stats[]; Array length is specified by num_peer_signal_stats
5433 * wmi_peer_ac_tx_stats peer_ac_tx_stats[]; Array length is specified by num_peer_ac_tx_stats
5434 * 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)
5435 * A_UINT32 tx_mpdu_aggr[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_mpdu_aggr_array_len,
5436 * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_mpdu_aggr_array_len + A-MPDU aggregation index
5437 * A_UINT32 tx_succ_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_succ_mcs_array_len,
5438 * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_succ_mcs_array_len + MCS index
5439 * A_UINT32 tx_fail_mcs[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_fail_mcs_array_len,
5440 * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_fail_mcs_array_len + MCS index
5441 * A_UINT32 tx_delay[][][]; Array length is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_delay_array_len,
5442 * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_delay_array_len + tx delay index
5443 * wmi_peer_ac_rx_stats peer_ac_rx_stats[]; Array length is specified by num_peer_ac_rx_stats
5444 * 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)
5445 * A_UINT32 rx_mpdu_aggr[][][]; Array length is num_peer_ac_rx_stats * WLAN_MAX_AC * rx_mpdu_aggr_array_len,
5446 * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mpdu_aggr_array_len + A-MPDU aggregation index
5447 * A_UINT32 rx_mcs[][][]; Array length is (num_peer_ac_rx_stats * WLAN_MAX_AC) * rx_mcs_array_len,
5448 * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mcs_array_len + MCS index
5449 */
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305450} wmi_report_stats_event_fixed_param;
5451
5452
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005453/**
5454 * PDEV statistics
5455 * @todo
5456 * add all PDEV stats here
5457 */
5458typedef struct {
5459 /** Channel noise floor */
5460 A_INT32 chan_nf;
5461 /** TX frame count */
5462 A_UINT32 tx_frame_count;
5463 /** RX frame count */
5464 A_UINT32 rx_frame_count;
5465 /** rx clear count */
5466 A_UINT32 rx_clear_count;
5467 /** cycle count */
5468 A_UINT32 cycle_count;
5469 /** Phy error count */
5470 A_UINT32 phy_err_count;
5471 /** Channel Tx Power */
5472 A_UINT32 chan_tx_pwr;
5473 /** WAL dbg stats */
5474 struct wlan_dbg_stats pdev_stats;
5475
5476} wmi_pdev_stats;
5477
5478/**
5479 * VDEV statistics
5480 * @todo
5481 * add all VDEV stats here
5482 */
5483
5484typedef struct {
5485 A_INT32 bcn_snr;
5486 A_INT32 dat_snr;
5487} wmi_snr_info;
5488
5489typedef struct {
5490 /** unique id identifying the VDEV, generated by the caller */
5491 A_UINT32 vdev_id;
5492 wmi_snr_info vdev_snr;
5493 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) */
5494 A_UINT32 rx_frm_cnt; /* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast) */
5495 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 +05305496 that the 802.11 station successfully transmitted after more than one retransmission attempt */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005497 A_UINT32 fail_cnt[WLAN_MAX_AC]; /*Total number packets(per AC) failed to transmit */
5498 A_UINT32 rts_fail_cnt; /*Total number of RTS/CTS sequence failures for transmission of a packet */
5499 A_UINT32 rts_succ_cnt; /*Total number of RTS/CTS sequence success for transmission of a packet */
5500 A_UINT32 rx_err_cnt; /*The receive error count. HAL will provide the RxP FCS error global */
5501 A_UINT32 rx_discard_cnt; /* The sum of the receive error count and dropped-receive-buffer error count. (FCS error) */
5502 A_UINT32 ack_fail_cnt; /*Total number packets failed transmit because of no ACK from the remote entity */
5503 A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES]; /*History of last ten transmit rate, in units of 500 kbit/sec */
5504 A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES]; /*History of last ten Beacon rssi of the connected Bss */
5505} wmi_vdev_stats;
5506
5507/**
5508 * peer statistics.
5509 *
5510 * @todo
5511 * add more stats
5512 *
5513 */
5514typedef struct {
5515 /** peer MAC address */
5516 wmi_mac_addr peer_macaddr;
5517 /** rssi */
5518 A_UINT32 peer_rssi;
5519 /** last tx data rate used for peer */
5520 A_UINT32 peer_tx_rate;
5521 /** last rx data rate used for peer */
5522 A_UINT32 peer_rx_rate;
5523} wmi_peer_stats;
5524
5525typedef struct {
5526 /** Primary channel freq of the channel for which stats are sent */
5527 A_UINT32 chan_mhz;
5528 /** Time spent on the channel */
5529 A_UINT32 sampling_period_us;
5530 /** Aggregate duration over a sampling period for which channel activity was observed */
5531 A_UINT32 rx_clear_count;
5532 /** Accumalation of the TX PPDU duration over a sampling period */
5533 A_UINT32 tx_duration_us;
5534 /** Accumalation of the RX PPDU duration over a sampling period */
5535 A_UINT32 rx_duration_us;
5536} wmi_chan_stats;
5537
5538typedef struct {
Govind Singh45ef44a2016-02-01 17:45:22 +05305539 A_UINT32 tx_mpdu_grp_frag_cnt; /*dot11TransmittedFragmentCount */
5540 A_UINT32 tx_msdu_grp_frm_cnt; /*dot11GroupTransmittedFrameCount */
5541 A_UINT32 tx_msdu_fail_cnt; /*dot11FailedCount*/
5542 A_UINT32 rx_mpdu_frag_cnt; /*dot11ReceivedFragmentCount*/
5543 A_UINT32 rx_msdu_grp_frm_cnt; /*dot11GroupReceivedFrameCount*/
5544 A_UINT32 rx_mpdu_fcs_err; /*dot11FCSErrorCount*/
5545 A_UINT32 tx_msdu_frm_cnt; /*dot11TransmittedFrameCount*/
5546 A_UINT32 tx_msdu_retry_cnt; /*dot11RetryCount*/
5547 A_UINT32 rx_frm_dup_cnt; /*dot11FrameDuplicateCount */
5548 A_UINT32 tx_rts_success_cnt; /*dot11RTSSuccessCount*/
5549 A_UINT32 tx_rts_fail_cnt; /*dot11RTSFailureCount*/
5550 /*dot11QosTransmittedFragmentCount */
5551 A_UINT32 tx_Qos_mpdu_grp_frag_cnt;
5552 A_UINT32 tx_Qos_msdu_fail_UP; /*dot11QosFailedCount */
5553 A_UINT32 tx_Qos_msdu_retry_UP; /*dot11QosRetryCount */
5554 A_UINT32 rx_Qos_frm_dup_cnt_UP; /*dot11QosFrameDuplicateCount*/
5555 A_UINT32 tx_Qos_rts_success_cnt_UP; /*dot11QosRTSSuccessCount*/
5556 A_UINT32 tx_Qos_rts_fail_cnt_UP; /*dot11QosRTSFailureCount*/
5557 A_UINT32 rx_Qos_mpdu_frag_cnt_UP; /*dot11QosReceivedFragmentCount*/
5558 A_UINT32 tx_Qos_msdu_frm_cnt_UP; /*dot11QosTransmittedFrameCount*/
5559 A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/
5560 A_UINT32 rx_Qos_mpdu_cnt; /*dot11QosMPDUsReceivedCount*/
5561 A_UINT32 rx_Qos_mpdu_retryBit_cnt; /*dot11QosRetriesReceivedCount*/
5562 /*dot11RSNAStatsRobustMgmtCCMPReplays */
5563 A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt;
5564 A_UINT32 rsna_TKIP_icv_err_cnt; /*dot11RSNAStatsTKIPICVErrors*/
5565 A_UINT32 rsna_TKIP_replay_err_cnt; /*dot11RSNAStatsTKIPReplays*/
5566 /*dot11RSNAStatsCCMPDecryptErrors */
5567 A_UINT32 rsna_CCMP_decrypt_err_cnt;
5568 A_UINT32 rsna_CCMP_replay_err_cnt; /*dot11RSNAStatsCCMPReplays*/
5569 A_UINT32 tx_ampdu_cnt; /*dot11TransmittedAMPDUCount*/
5570 /*dot11TransmittedMPDUsInAMPDUCount*/
5571 A_UINT32 tx_mpdu_cnt_in_ampdu;
5572 /*dot11TransmittedOctetsInAMPDUCount*/
5573 union {
5574 A_UINT64 counter; /* for use by target only */
5575 struct {
5576 A_UINT32 low;
5577 A_UINT32 high;
5578 } upload; /* for use by host */
5579 } tx_octets_in_ampdu;
5580 A_UINT32 rx_ampdu_cnt; /*dot11AMPDUReceivedCount*/
5581 A_UINT32 rx_mpdu_cnt_in_ampdu; /*dot11MPDUInReceivedAMPDUCount*/
5582 union {
5583 A_UINT64 counter; /* for use by target only */
5584 struct {
5585 A_UINT32 rx_octets_in_ampdu_low;
5586 A_UINT32 rx_octets_in_ampdu_high;
5587 } upload; /* for use by host */
5588 } rx_octets_in_ampdu; /*dot11ReceivedOctetsInAMPDUCount*/
5589 A_UINT32 reserved_1;
5590 A_UINT32 reserved_2;
5591 A_UINT32 reserved_3;
5592 A_UINT32 reserved_4;
5593} wmi_mib_stats;
5594
5595typedef struct {
Himanshu Agarwal86319542016-05-24 09:00:39 +05305596 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_stats */
5597 A_UINT32 tlv_header;
5598 A_UINT32 vdev_id;
Himanshu Agarwal29061322016-05-27 14:09:27 +05305599 A_INT32 rssi_avg_beacon[WMI_MAX_CHAINS];
5600 A_INT32 rssi_avg_data[WMI_MAX_CHAINS];
Himanshu Agarwal86319542016-05-24 09:00:39 +05305601 wmi_mac_addr peer_macaddr;
5602} wmi_rssi_stats;
5603
5604typedef struct {
5605 /*
5606 * TLV tag and len; tag equals
5607 * WMITLV_TAG_STRUC_wmi_per_chain_rssi_stats
5608 */
5609 A_UINT32 tlv_header;
5610 A_UINT32 num_per_chain_rssi_stats;
5611 /*
5612 * This TLV is followed by another TLV of array of structs:
5613 * wmi_rssi_stats rssi_stats[num_per_chain_rssi_stats];
5614 */
5615} wmi_per_chain_rssi_stats;
5616
5617typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005618 A_UINT32 tlv_header;
5619 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
5620 /** unique id identifying the VDEV, generated by the caller */
5621 A_UINT32 vdev_id;
5622 /** VDEV type (AP,STA,IBSS,MONITOR) */
5623 A_UINT32 vdev_type;
5624 /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0)*/
5625 A_UINT32 vdev_subtype;
5626 /** VDEV MAC address */
5627 wmi_mac_addr vdev_macaddr;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05305628 /** Number of configured txrx streams */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005629 A_UINT32 num_cfg_txrx_streams;
5630 /*
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05305631 * pdev_id for identifying the MAC,
5632 * See macros starting with WMI_PDEV_ID_ for values.
5633 */
5634 A_UINT32 pdev_id;
5635 /*
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005636 * This TLV is followed by another TLV of array of structures
5637 * wmi_vdev_txrx_streams cfg_txrx_streams[];
5638 */
5639} wmi_vdev_create_cmd_fixed_param;
5640
5641typedef struct {
5642 /*
5643 * TLV tag and len; tag equals
5644 * WMITLV_TAG_STRUC_wmi_vdev_txrx_streams
5645 */
5646 A_UINT32 tlv_header;
5647 /* band - Should take values from wmi_channel_band_mask */
5648 A_UINT32 band;
5649 /* max supported tx streams per given band for this vdev */
5650 A_UINT32 supported_tx_streams;
5651 /* max supported rx streams per given band for this vdev */
5652 A_UINT32 supported_rx_streams;
5653} wmi_vdev_txrx_streams;
5654
5655/* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
5656typedef struct {
5657 A_UINT32 tlv_header;
5658 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
5659 A_UINT32 type_count;
5660 /** 255: continuous schedule, 0: reserved */
5661 A_UINT32 duration;
5662 /** Absent period duration in micro seconds */
5663 A_UINT32 interval;
5664 /** Absent period interval in micro seconds */
5665 A_UINT32 start_time;
5666 /** 32 bit tsf time when in starts */
5667} wmi_p2p_noa_descriptor;
5668
5669/** values for vdev_type */
5670#define WMI_VDEV_TYPE_AP 0x1
5671#define WMI_VDEV_TYPE_STA 0x2
5672#define WMI_VDEV_TYPE_IBSS 0x3
5673#define WMI_VDEV_TYPE_MONITOR 0x4
5674
5675/** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
5676 * by FW to execute the NAN specific WMI commands and also implement NAN specific
5677 * operations like Network discovery, service provisioning and service
5678 * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create
5679 * WMI command to create this VDEV once during initialization and host is not
5680 * expected to use any VDEV specific WMI commands on this VDEV.
5681 **/
5682#define WMI_VDEV_TYPE_NAN 0x5
5683
5684#define WMI_VDEV_TYPE_OCB 0x6
5685
Govind Singh941bd5e2016-02-04 17:15:25 +05305686/* NAN Data Interface */
5687#define WMI_VDEV_TYPE_NDI 0x7
5688
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005689/** values for vdev_subtype */
5690#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
5691#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
5692#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3
Govind Singh32cced32016-02-01 13:33:09 +05305693#define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA 0x4
5694#define WMI_UNIFIED_VDEV_SUBTYPE_MESH 0x5
Sandeep Puligilla62f7ca02016-03-24 15:48:33 -07005695/*
5696 * new subtype for 11S mesh is required as 11S functionality differs
5697 * in many ways from proprietary mesh
5698 * 11S uses 6-addr frame format and supports peering between mesh
5699 * stations and dynamic best path selection between mesh stations.
5700 * While in proprietary mesh, neighboring mesh station MAC is manually
5701 * added to AST table for traffic flow between mesh stations
5702 */
5703#define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S 0x6
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005704
5705/** values for vdev_start_request flags */
5706/** Indicates that AP VDEV uses hidden ssid. only valid for
5707 * AP/GO */
5708#define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0)
5709/** Indicates if robust management frame/management frame
5710 * protection is enabled. For GO/AP vdevs, it indicates that
5711 * it may support station/client associations with RMF enabled.
5712 * For STA/client vdevs, it indicates that sta will
5713 * associate with AP with RMF enabled. */
5714#define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1)
5715
5716/*
5717 * Host is sending bcn_tx_rate to override the beacon tx rates.
5718 */
5719#define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
5720
Himanshu Agarwal97005de2016-09-09 12:46:04 +05305721#define WMI_HEOPS_COLOR_GET(he_ops) WMI_GET_BITS(he_ops, 0, 6)
5722#define WMI_HEOPS_COLOR_SET(he_ops, value) WMI_SET_BITS(he_ops, 0, 6, value)
5723
5724#define WMI_HEOPS_DEFPE_GET(he_ops) WMI_GET_BITS(he_ops, 6, 3)
5725#define WMI_HEOPS_DEFPE_SET(he_ops, value) WMI_SET_BITS(he_ops, 6, 3, value)
5726
5727#define WMI_HEOPS_TWT_GET(he_ops) WMI_GET_BITS(he_ops, 9, 1)
5728#define WMI_HEOPS_TWT_SET(he_ops, value) WMI_SET_BITS(he_ops, 9, 1, value)
5729
5730#define WMI_HEOPS_RTSTHLD_GET(he_ops) WMI_GET_BITS(he_ops, 10, 7)
5731#define WMI_HEOPS_RTSTHLD_SET(he_ops, value) WMI_SET_BITS(he_ops, 10, 7, value)
5732
5733#define WMI_HEOPS_PDMIN_GET(he_ops) WMI_GET_BITS(he_ops, 17, 5)
5734#define WMI_HEOPS_PDMIN_SET(he_ops, value) WMI_SET_BITS(he_ops, 17, 5, value)
5735
5736#define WMI_HEOPS_PDMAX_GET(he_ops) WMI_GET_BITS(he_ops, 22, 5)
5737#define WMI_HEOPS_PDMAX_SET(he_ops, value) WMI_SET_BITS(he_ops, 22, 5, value)
5738
5739#define WMI_MAX_HECAP_PHY_SIZE (3)
5740#define WMI_HECAP_PHY_COD_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 0, 1)
5741#define WMI_HECAP_PHY_COD_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 0, 1, value)
5742
5743#define WMI_HECAP_PHY_TXLDPC_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 1, 1)
5744#define WMI_HECAP_PHY_TXLDPC_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 1, 1, value)
5745
5746#define WMI_HECAP_PHY_RXLDPC_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 2, 1)
5747#define WMI_HECAP_PHY_RXLDPC_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 2, 1, value)
5748
5749#define WMI_HECAP_PHY_DCM_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 3, 3)
5750#define WMI_HECAP_PHY_DCM_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 3, 3, value)
5751
5752#define WMI_HECAP_PHY_OLTF_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 6, 1)
5753#define WMI_HECAP_PHY_OLTF_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 6, 1, value)
5754
5755#define WMI_HECAP_PHY_CBW_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 7, 3)
5756#define WMI_HECAP_PHY_CBW_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 7, 3, value)
5757
5758#define WMI_HECAP_PHY_TXSTBC_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 10, 1)
5759#define WMI_HECAP_PHY_TXSTBC_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 10, 1, value)
5760
5761#define WMI_HECAP_PHY_RXSTBC_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 11, 1)
5762#define WMI_HECAP_PHY_RXSTBC_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 11, 1, value)
5763
5764#define WMI_HECAP_PHY_DLOFMAMUMIMO_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 12, 1)
5765#define WMI_HECAP_PHY_DLOFDMAMUMIO_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 12, 1, value)
5766
5767#define WMI_HECAP_PHY_UL_MU_MIMO_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 13, 1)
5768#define WMI_HECAP_PHY_UL_MU_MIMO_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 13, 1, value)
5769
5770#define WMI_HECAP_PHY_ULOFDMA_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 14, 1)
5771#define WMI_HECAP_PHY_ULOFDMA_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 14, 1, value)
5772
5773#define WMI_HECAP_PHY_TXDOPPLER_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 15, 1)
5774#define WMI_HECAP_PHY_TXDOPPLER_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 15, 1, value)
5775
5776#define WMI_HECAP_PHY_RXDOPPLER_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 16, 1)
5777#define WMI_HECAP_PHY_RXDOPPLER_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 16, 1, value)
5778
5779#define WMI_HECAP_PHY_CBMODE_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 8)
5780#define WMI_HECAP_PHY_CBMODE_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 8, value)
5781
5782#define WMI_HECAP_PHY_PADDING_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 25, 2)
5783#define WMI_HECAP_PHY_PADDING_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 25, 2, value)
5784
5785#define WMI_HECAP_PHY_32GI_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 0, 26)
5786#define WMI_HECAP_PHY_32GI_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 0, 26, value)
5787
5788#define WMI_HECAP_PHY_SUBFMR_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 26, 1)
5789#define WMI_HECAP_PHY_SUBFMR_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 26, 1, value)
5790
5791#define WMI_HECAP_PHY_SUBFME_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 27, 1)
5792#define WMI_HECAP_PHY_SUBFME_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 27, 1, value)
5793
5794#define WMI_HECAP_PHY_SUBFMESTS_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 28, 3)
5795#define WMI_HECAP_PHY_SUBFMESTS_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 28, 3, value)
5796
5797#define WMI_HECAP_PHY_NOSUNDIMENS_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 0, 3)
5798#define WMI_HECAP_PHY_NOSUNDIMENS_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 0, 3, value)
5799
5800#define WMI_HECAP_PHY_MUBFMR_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 3, 1)
5801#define WMI_HECAP_PHY_MUBFMR_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 3, 1, value)
5802
5803#define WMI_HECAP_PHY_40MHZNSS_GET(he_cap_phy) WMI_GET_BITS(he_cap_phy[2], 4, 18)
5804#define WMI_HECAP_PHY_40MHZNSS_SET(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[2], 4, 18, value)
5805
5806#define WMI_HECAP_MAC_MTID_GET(he_cap) WMI_GET_BITS(he_cap, 0, 3)
5807#define WMI_HECAP_MAC_MTID_SET(he_cap, value) WMI_SET_BITS(he_cap, 0, 3, value)
5808
5809#define WMI_HECAP_MAC_AACK_GET(he_cap) WMI_GET_BITS(he_cap, 3, 1)
5810#define WMI_HECAP_MAC_AACK_SET(he_cap, value) WMI_SET_BITS(he_cap, 3, 1, value)
5811
5812#define WMI_HECAP_MAC_MINFRAGSZ_GET(he_cap) WMI_GET_BITS(he_cap, 4, 2)
5813#define WMI_HECAP_MAC_MINFRAGSZ_SET(he_cap, value) WMI_SET_BITS(he_cap, 4, 2, value)
5814
5815#define WMI_HECAP_MAC_HEFRAG_GET(he_cap) WMI_GET_BITS(he_cap, 6, 2)
5816#define WMI_HECAP_MAC_HEFRAG_SET(he_cap, value) WMI_SET_BITS(he_cap, 6, 2, value)
5817
5818#define WMI_HECAP_MAC_MURTS_GET(he_cap) WMI_GET_BITS(he_cap, 8, 1)
5819#define WMI_HECAP_MAC_MURTS_SET(he_cap, value) WMI_SET_BITS(he_cap, 8, 1, value)
5820
5821#define WMI_HECAP_MAC_OMI_GET(he_cap) WMI_GET_BITS(he_cap, 9, 1)
5822#define WMI_HECAP_MAC_OMI_SET(he_cap, value) WMI_SET_BITS(he_cap, 9, 1, value)
5823
5824#define WMI_HECAP_MAC_HECTRL_GET(he_cap) WMI_GET_BITS(he_cap, 10, 1)
5825#define WMI_HECAP_MAC_HECTRL_SET(he_cap, value) WMI_SET_BITS(he_cap, 10, 1, value)
5826
5827#define WMI_HECAP_MAC_MBAHECTRL_GET(he_cap) WMI_GET_BITS(he_cap, 11, 1)
5828#define WMI_HECAP_MAC_MBAHECTRL_SET(he_cap, value) WMI_SET_BITS(he_cap, 11, 1, value)
5829
5830#define WMI_HECAP_MAC_ULMURSP_GET(he_cap) WMI_GET_BITS(he_cap, 12, 1)
5831#define WMI_HECAP_MAC_ULMURSP_SET(he_cap, value) WMI_SET_BITS(he_cap, 12, 1, value)
5832
5833#define WMI_HECAP_MAC_HELKAD_GET(he_cap) WMI_GET_BITS(he_cap, 13, 2)
5834#define WMI_HECAP_MAC_HELKAD_SET(he_cap, value) WMI_SET_BITS(he_cap, 13, 2, value)
5835
5836#define WMI_HECAP_MAC_BSR_GET(he_cap) WMI_GET_BITS(he_cap, 15, 1)
5837#define WMI_HECAP_MAC_BSR_SET(he_cap, value) WMI_SET_BITS(he_cap, 15, 1, value)
5838
5839#define WMI_HECAP_MAC_TWTREQ_GET(he_cap) WMI_GET_BITS(he_cap, 16, 1)
5840#define WMI_HECAP_MAC_TWTREQ_SET(he_cap, value) WMI_SET_BITS(he_cap, 16, 1, value)
5841
5842#define WMI_HECAP_MAC_TWTRSP_GET(he_cap) WMI_GET_BITS(he_cap, 17, 1)
5843#define WMI_HECAP_MAC_TWTRSP_SET(he_cap, value) WMI_SET_BITS(he_cap, 17, 1, value)
5844
5845#define WMI_HECAP_MAC_BCSTTWT_GET(he_cap) WMI_GET_BITS(he_cap, 18, 1)
5846#define WMI_HECAP_MAC_BCSTTWT_SET(he_cap, value) WMI_SET_BITS(he_cap, 18, 1, value)
5847
5848#define WMI_HECAP_MAC_MBSS_GET(he_cap) WMI_GET_BITS(he_cap, 19, 1)
5849#define WMI_HECAP_MAC_MBSS_SET(he_cap, value) WMI_SET_BITS(he_cap, 19, 1, value)
5850
5851#define WMI_HECAP_MAC_TRIGPADDUR_GET(he_cap) WMI_GET_BITS(he_cap, 20, 2)
5852#define WMI_HECAP_MAC_TRIGPADDUR_SET(he_cap, value) WMI_SET_BITS(he_cap, 20, 2, value)
5853
5854#define WMI_HECAP_MAC_MAXFRAGMSDU_GET(he_cap) WMI_GET_BITS(he_cap, 22, 3)
5855#define WMI_HECAP_MAC_MAXFRAGMSDU_SET(he_cap, value) WMI_SET_BITS(he_cap, 22, 3, value)
5856
5857#define WMI_HECAP_MAC_32BITBA_GET(he_cap) WMI_GET_BITS(he_cap, 25, 1)
5858#define WMI_HECAP_MAC_32BITBA_SET(he_cap, value) WMI_SET_BITS(he_cap, 25, 1, value)
5859
5860#define WMI_HECAP_MAC_MUCASCADE_GET(he_cap) WMI_GET_BITS(he_cap, 26, 1)
5861#define WMI_HECAP_MAC_MUCASCADE_SET(he_cap, value) WMI_SET_BITS(he_cap, 26, 1, value)
5862
5863#define WMI_HECAP_MAC_ACKMTIDAMPDU_GET(he_cap) WMI_GET_BITS(he_cap, 27, 1)
5864#define WMI_HECAP_MAC_ACKMTIDAMPDU_SET(he_cap, value) WMI_SET_BITS(he_cap, 27, 1, value)
5865
5866#define WMI_HECAP_MAC_GROUPMSTABA_GET(he_cap) WMI_GET_BITS(he_cap, 28, 1)
5867#define WMI_HECAP_MAC_GROUPMSTABA_SET(he_cap, value) WMI_SET_BITS(he_cap, 28, 1, value)
5868
5869#define WMI_HECAP_MAC_OFDMARA_GET(he_cap) WMI_GET_BITS(he_cap, 29, 1)
5870#define WMI_HECAP_MAC_OFDMARA_SET(he_cap, value) WMI_SET_BITS(he_cap, 29, 1, value)
5871
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005872typedef struct {
5873 A_UINT32 tlv_header;
5874 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
5875 /** unique id identifying the VDEV, generated by the caller */
5876 A_UINT32 vdev_id;
5877 /** requestor id identifying the caller module */
5878 A_UINT32 requestor_id;
5879 /** beacon interval from received beacon */
5880 A_UINT32 beacon_interval;
5881 /** DTIM Period from the received beacon */
5882 A_UINT32 dtim_period;
5883 /** Flags */
5884 A_UINT32 flags;
5885 /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
5886 wmi_ssid ssid;
5887 /** beacon/probe reponse xmit rate. Applicable for SoftAP. */
5888 /** This field will be invalid and ignored unless the */
5889 /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
5890 /** When valid, this field contains the fixed tx rate for the beacon */
5891 /** and probe response frames send by the GO or SoftAP */
5892 A_UINT32 bcn_tx_rate;
5893 /** beacon/probe reponse xmit power. Applicable for SoftAP. */
5894 A_UINT32 bcn_txPower;
5895 /** number of p2p NOA descriptor(s) from scan entry */
5896 A_UINT32 num_noa_descriptors;
5897 /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
5898 During CAC, Our HW shouldn't ack ditected frames */
5899 A_UINT32 disable_hw_ack;
5900 /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
5901 /** The DBS policy manager indicates the preferred number of transmit streams. */
5902 A_UINT32 preferred_tx_streams;
5903 /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
5904 /** the DBS policy manager indicates the preferred number of receive streams. */
5905 A_UINT32 preferred_rx_streams;
Himanshu Agarwal97005de2016-09-09 12:46:04 +05305906 A_UINT32 he_ops; /* refer to WMI_HEOPS_xxx macros */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005907 /* The TLVs follows this structure:
5908 * wmi_channel chan; //WMI channel
5909 * wmi_p2p_noa_descriptor noa_descriptors[]; //actual p2p NOA descriptor from scan entry
5910 */
5911} wmi_vdev_start_request_cmd_fixed_param;
5912
5913typedef struct {
5914 A_UINT32 tlv_header;
5915 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
5916 /** unique id identifying the VDEV, generated by the caller */
5917 A_UINT32 vdev_id;
5918} wmi_vdev_delete_cmd_fixed_param;
5919
5920typedef struct {
5921 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
5922 /** unique id identifying the VDEV, generated by the caller */
5923 A_UINT32 vdev_id;
5924 /** aid (assoc id) received in association response for STA VDEV */
5925 A_UINT32 vdev_assoc_id;
5926 /** bssid of the BSS the VDEV is joining */
5927 wmi_mac_addr vdev_bssid;
5928} wmi_vdev_up_cmd_fixed_param;
5929
5930typedef struct {
5931 A_UINT32 tlv_header;
5932 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
5933 /** unique id identifying the VDEV, generated by the caller */
5934 A_UINT32 vdev_id;
5935} wmi_vdev_stop_cmd_fixed_param;
5936
5937typedef struct {
5938 A_UINT32 tlv_header;
5939 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
5940 /** unique id identifying the VDEV, generated by the caller */
5941 A_UINT32 vdev_id;
5942} wmi_vdev_down_cmd_fixed_param;
5943
5944typedef struct {
5945 /** unique id identifying the VDEV, generated by the caller */
5946 A_UINT32 vdev_id;
5947} wmi_vdev_standby_response_cmd;
5948
5949typedef struct {
5950 /** unique id identifying the VDEV, generated by the caller */
5951 A_UINT32 vdev_id;
5952} wmi_vdev_resume_response_cmd;
5953
5954typedef struct {
5955 A_UINT32 tlv_header;
5956 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
5957 /** unique id identifying the VDEV, generated by the caller */
5958 A_UINT32 vdev_id;
5959 /** parameter id */
5960 A_UINT32 param_id;
5961 /** parameter value */
5962 A_UINT32 param_value;
5963} wmi_vdev_set_param_cmd_fixed_param;
5964
5965typedef struct {
5966 A_UINT32 key_seq_counter_l;
5967 A_UINT32 key_seq_counter_h;
5968} wmi_key_seq_counter;
5969
5970#define WMI_CIPHER_NONE 0x0 /* clear key */
5971#define WMI_CIPHER_WEP 0x1
5972#define WMI_CIPHER_TKIP 0x2
5973#define WMI_CIPHER_AES_OCB 0x3
5974#define WMI_CIPHER_AES_CCM 0x4
5975#define WMI_CIPHER_WAPI 0x5
5976#define WMI_CIPHER_CKIP 0x6
5977#define WMI_CIPHER_AES_CMAC 0x7
5978#define WMI_CIPHER_ANY 0x8
Govind Singh869c9872016-02-22 18:36:34 +05305979#define WMI_CIPHER_AES_GCM 0x9
5980#define WMI_CIPHER_AES_GMAC 0xa
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005981
5982typedef struct {
5983 A_UINT32 tlv_header;
5984 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
5985 /** unique id identifying the VDEV, generated by the caller */
5986 A_UINT32 vdev_id;
5987 /** MAC address used for installing */
5988 wmi_mac_addr peer_macaddr;
5989 /** key index */
5990 A_UINT32 key_ix;
5991 /** key flags */
5992 A_UINT32 key_flags;
5993 /** key cipher, defined above */
5994 A_UINT32 key_cipher;
5995 /** key rsc counter */
5996 wmi_key_seq_counter key_rsc_counter;
5997 /** global key rsc counter */
5998 wmi_key_seq_counter key_global_rsc_counter;
5999 /** global key tsc counter */
6000 wmi_key_seq_counter key_tsc_counter;
6001 /** WAPI key rsc counter */
6002 A_UINT8 wpi_key_rsc_counter[16];
6003 /** WAPI key tsc counter */
6004 A_UINT8 wpi_key_tsc_counter[16];
6005 /** key length */
6006 A_UINT32 key_len;
6007 /** key tx mic length */
6008 A_UINT32 key_txmic_len;
6009 /** key rx mic length */
6010 A_UINT32 key_rxmic_len;
6011 /*
6012 * Following this struct are this TLV.
6013 * // actual key data
6014 * A_UINT8 key_data[]; // contains key followed by tx mic followed by rx mic
6015 */
6016} wmi_vdev_install_key_cmd_fixed_param;
6017
6018/** Preamble types to be used with VDEV fixed rate configuration */
6019typedef enum {
6020 WMI_RATE_PREAMBLE_OFDM,
6021 WMI_RATE_PREAMBLE_CCK,
6022 WMI_RATE_PREAMBLE_HT,
6023 WMI_RATE_PREAMBLE_VHT,
6024} WMI_RATE_PREAMBLE;
6025
6026/** Value to disable fixed rate setting */
6027#define WMI_FIXED_RATE_NONE (0xff)
6028
6029/** the definition of different VDEV parameters */
6030typedef enum {
6031 /** RTS Threshold */
6032 WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
6033 /** Fragmentation threshold */
6034 WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
6035 /** beacon interval in TUs */
6036 WMI_VDEV_PARAM_BEACON_INTERVAL,
6037 /** Listen interval in TUs */
6038 WMI_VDEV_PARAM_LISTEN_INTERVAL,
6039 /** muticast rate in Mbps */
6040 WMI_VDEV_PARAM_MULTICAST_RATE,
6041 /** management frame rate in Mbps */
6042 WMI_VDEV_PARAM_MGMT_TX_RATE,
6043 /** slot time (long vs short) */
6044 WMI_VDEV_PARAM_SLOT_TIME,
6045 /** preamble (long vs short) */
6046 WMI_VDEV_PARAM_PREAMBLE,
6047 /** SWBA time (time before tbtt in msec) */
6048 WMI_VDEV_PARAM_SWBA_TIME,
6049 /** time period for updating VDEV stats */
6050 WMI_VDEV_STATS_UPDATE_PERIOD,
6051 /** age out time in msec for frames queued for station in power save*/
6052 WMI_VDEV_PWRSAVE_AGEOUT_TIME,
6053 /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
6054 WMI_VDEV_HOST_SWBA_INTERVAL,
6055 /** DTIM period (specified in units of num beacon intervals) */
6056 WMI_VDEV_PARAM_DTIM_PERIOD,
6057 /** scheduler air time limit for this VDEV. used by off chan scheduler */
6058 WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
6059 /** enable/dsiable WDS for this VDEV */
6060 WMI_VDEV_PARAM_WDS,
6061 /** ATIM Window */
6062 WMI_VDEV_PARAM_ATIM_WINDOW,
6063 /** BMISS max */
6064 WMI_VDEV_PARAM_BMISS_COUNT_MAX,
6065 /** BMISS first time */
6066 WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
6067 /** BMISS final time */
6068 WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
6069 /** WMM enables/disabled */
6070 WMI_VDEV_PARAM_FEATURE_WMM,
6071 /** Channel width */
6072 WMI_VDEV_PARAM_CHWIDTH,
6073 /** Channel Offset */
6074 WMI_VDEV_PARAM_CHEXTOFFSET,
6075 /** Disable HT Protection */
6076 WMI_VDEV_PARAM_DISABLE_HTPROTECTION,
6077 /** Quick STA Kickout */
6078 WMI_VDEV_PARAM_STA_QUICKKICKOUT,
6079 /** Rate to be used with Management frames */
6080 WMI_VDEV_PARAM_MGMT_RATE,
6081 /** Protection Mode */
6082 WMI_VDEV_PARAM_PROTECTION_MODE,
6083 /** Fixed rate setting */
6084 WMI_VDEV_PARAM_FIXED_RATE,
6085 /** Short GI Enable/Disable */
6086 WMI_VDEV_PARAM_SGI,
6087 /** Enable LDPC */
6088 WMI_VDEV_PARAM_LDPC,
6089 /** Enable Tx STBC */
6090 WMI_VDEV_PARAM_TX_STBC,
6091 /** Enable Rx STBC */
6092 WMI_VDEV_PARAM_RX_STBC,
6093 /** Intra BSS forwarding */
6094 WMI_VDEV_PARAM_INTRA_BSS_FWD,
6095 /** Setting Default xmit key for Vdev */
6096 WMI_VDEV_PARAM_DEF_KEYID,
6097 /** NSS width */
6098 WMI_VDEV_PARAM_NSS,
6099 /** Set the custom rate for the broadcast data frames */
6100 WMI_VDEV_PARAM_BCAST_DATA_RATE,
6101 /** Set the custom rate (rate-code) for multicast data frames */
6102 WMI_VDEV_PARAM_MCAST_DATA_RATE,
6103 /** Tx multicast packet indicate Enable/Disable */
6104 WMI_VDEV_PARAM_MCAST_INDICATE,
6105 /** Tx DHCP packet indicate Enable/Disable */
6106 WMI_VDEV_PARAM_DHCP_INDICATE,
6107 /** Enable host inspection of Tx unicast packet to unknown destination */
6108 WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
6109
6110 /* The minimum amount of time AP begins to consider STA inactive */
6111 WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
6112
6113 /* An associated STA is considered inactive when there is no recent TX/RX
6114 * activity and no downlink frames are buffered for it. Once a STA exceeds
6115 * the maximum idle inactive time, the AP will send an 802.11 data-null as
6116 * a keep alive to verify the STA is still associated. If the STA does ACK
6117 * the data-null, or if the data-null is buffered and the STA does not
6118 * retrieve it, the STA will be considered unresponsive (see
6119 * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
6120 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
6121
6122 /* An associated STA is considered unresponsive if there is no recent
6123 * TX/RX activity and downlink frames are buffered for it. Once a STA
6124 * exceeds the maximum unresponsive time, the AP will send a
6125 * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
6126 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
6127
6128 /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
6129 WMI_VDEV_PARAM_AP_ENABLE_NAWDS,
6130 /** Enable/Disable RTS-CTS */
6131 WMI_VDEV_PARAM_ENABLE_RTSCTS,
6132 /* Enable TXBFee/er */
6133 WMI_VDEV_PARAM_TXBF,
6134
6135 /**Set packet power save */
6136 WMI_VDEV_PARAM_PACKET_POWERSAVE,
6137
6138 /**Drops un-encrypted packets if any received in an encryted connection
6139 * otherwise forwards to host
6140 */
6141 WMI_VDEV_PARAM_DROP_UNENCRY,
6142
6143 /*
6144 * Set TX encap type.
6145 *
6146 * enum wmi_pkt_type is to be used as the parameter
6147 * specifying the encap type.
6148 */
6149 WMI_VDEV_PARAM_TX_ENCAP_TYPE,
6150
6151 /*
6152 * Try to detect stations that woke-up and exited power save but did not
6153 * successfully transmit data-null with PM=0 to AP. When this happens,
6154 * STA and AP power save state are out-of-sync. Use buffered but
6155 * undelivered MSDU to the STA as a hint that the STA is really awake
6156 * and expecting normal ASAP delivery, rather than retrieving BU with
6157 * PS-Poll, U-APSD trigger, etc.
6158 *
6159 * 0 disables out-of-sync detection. Maximum time is 255 seconds.
6160 */
6161 WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,
6162
6163 /* Enable/Disable early rx dynamic adjust feature.
6164 * Early-rx dynamic adjust is a advance power save feature.
6165 * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
6166 * timing discrepancies in the system.
6167 * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
6168 * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
6169 * properly to minimum the power consume.*/
6170 WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE,
6171
6172 /* set target bmiss number per sample cycle if bmiss adjust was chosen.
6173 * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
6174 * which can be set by user through WMI command.
6175 */
6176 WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM,
6177
6178 /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
6179 WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE,
6180
6181 /* set slop_step */
6182 WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP,
6183
6184 /* set init slop */
6185 WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP,
6186
6187 /* pause adjust enable/disable */
6188 WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE,
6189
6190 /* Set channel pwr limit value of the vdev the minimal value of all
6191 * vdevs operating on this channel will be set as channel tx power
6192 * limit, which is used to configure ratearray
6193 */
6194 WMI_VDEV_PARAM_TX_PWRLIMIT,
6195
6196 /* set the count of snr value for calculation in snr monitor */
6197 WMI_VDEV_PARAM_SNR_NUM_FOR_CAL,
6198
6199 /** Roaming offload */
6200 WMI_VDEV_PARAM_ROAM_FW_OFFLOAD,
6201
6202 /** Enable Leader request RX functionality for RMC */
6203 WMI_VDEV_PARAM_ENABLE_RMC,
6204
6205 /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
6206 * by himself. If the beacon lost time exceed this threshold, the peer is
6207 * thought to be gone. */
6208 WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS,
6209
6210 /** max rate in kpbs, transmit rate can't go beyond it */
6211 WMI_VDEV_PARAM_MAX_RATE,
6212
6213 /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift */
6214 WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE,
6215 /* set Tx failure count threshold for the vdev */
6216 WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR,
6217
6218 /* set ebt resync timeout value, in the unit of TU */
6219 WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT,
6220
6221 /* Enable Aggregation State Trigger Event */
6222 WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE,
6223
6224 /* This parameter indicates whether IBSS station can enter into power save
6225 * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
6226 * awake all the time and should never set PM=1 in its transmitted frames.
6227 * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
6228 * is non-zero. */
6229 WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED,
6230
6231 /* This parameter indicates if this station can enter into power collapse
6232 * for the remaining beacon interval after the ATIM window.
6233 * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
6234 * is set to true. */
6235 WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED,
6236
6237 /* This parameter indicates whether IBSS station exit power save mode and
6238 * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
6239 * whenever there is a TX/RX activity. */
6240 WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED,
6241
6242 /* If Awake on TX/RX activity is enabled, this parameter indicates
6243 * the data inactivity time in number of beacon intervals after which
6244 * IBSS station reenters power save by sending Null frame with PM=1. */
6245 WMI_VDEV_PARAM_INACTIVITY_CNT,
6246
6247 /* Inactivity time in msec after which TX Service Period (SP) is
6248 * terminated by sending a Qos Null frame with EOSP.
6249 * If value is 0, TX SP is terminated with the last buffered packet itself
6250 * instead of waiting for the inactivity timeout. */
6251 WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS,
6252
6253 /** DTIM policy */
6254 WMI_VDEV_PARAM_DTIM_POLICY,
6255
6256 /* When IBSS network is initialized, PS-supporting device
6257 * does not enter protocol sleep state during first
6258 * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
6259 WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS,
6260
6261 /* Enable/Disable 1 RX chain usage during the ATIM window */
6262 WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE,
6263 /**
6264 * RX Leak window is the time driver waits before shutting down
6265 * the radio or switching the channel and after receiving an ACK
6266 * for a data frame with PM bit set)
6267 */
6268 WMI_VDEV_PARAM_RX_LEAK_WINDOW,
6269
6270 /**
6271 * Averaging factor(16 bit value) is used in the calculations to
6272 * perform averaging of different link level statistics like average
6273 * beacon spread or average number of frames leaked
6274 */
6275 WMI_VDEV_PARAM_STATS_AVG_FACTOR,
6276 /*
6277 * disconnect threshold, once the consecutive error for specific peer
6278 * exceed this threhold, FW will send kickout event to host
6279 */
6280 WMI_VDEV_PARAM_DISCONNECT_TH,
6281 /*
6282 * The rate_code of RTS_CTS changed by host. Now FW can support
6283 * more non-HT rates rather than 1Mbps or 6Mbps */
6284 WMI_VDEV_PARAM_RTSCTS_RATE,
6285
6286 /** This parameter indicates whether using a long duration RTS-CTS
6287 * protection when a SAP goes off channel in MCC mode */
6288 WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE,
6289
6290 /*
6291 * This parameter indicates whether using a broadcast probe response
6292 * to increase the detectability of SAP in MCC mode
6293 */
6294 WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE,
Nirav Shah47062ff2015-11-05 11:21:08 +05306295
6296 /* This parameter indicates the power backoff in percentage
6297 * currently supports 100%, 50%, 25%, 12.5%, and minimum
6298 * Host passes 0, 1, 2, 3, 4 to Firmware
6299 * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
6300 * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
6301 */
6302 WMI_VDEV_PARAM_TXPOWER_SCALE,
6303
6304 /* TX power backoff in dB: tx power -= param value
6305 * Host passes values(DB) to Halphy, Halphy reduces the power table
6306 * by the values. Safety check will happen in Halphy.
6307 */
6308 WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB,
Govind Singh32cced32016-02-01 13:33:09 +05306309 /** Multicast to Unicast conversion setting */
6310 WMI_VDEV_PARAM_MCAST2UCAST_SET,
6311
6312 /** Total number of HW retries */
6313 WMI_VDEV_PARAM_RC_NUM_RETRIES,
6314
6315 /** Max tx percentage for cabq */
6316 WMI_VDEV_PARAM_CABQ_MAXDUR,
6317
6318 /** MFPTEST settings */
6319 WMI_VDEV_PARAM_MFPTEST_SET,
6320
6321 /** RTS Fixed rate setting */
6322 WMI_VDEV_PARAM_RTS_FIXED_RATE,
6323
6324 /** VHT SGI MASK */
6325 WMI_VDEV_PARAM_VHT_SGIMASK,
6326
6327 /** VHT80 Auto Rate MASK */
6328 WMI_VDEV_PARAM_VHT80_RATEMASK,
6329
6330 /** set Proxy STA features for this vap */
6331 WMI_VDEV_PARAM_PROXY_STA,
6332
6333 /** set virtual cell mode - enable/disable */
6334 WMI_VDEV_PARAM_VIRTUAL_CELL_MODE,
6335
6336 /** Set receive packet type */
6337 WMI_VDEV_PARAM_RX_DECAP_TYPE,
6338
6339 /** Set ratemask with specific Bandwidth and NSS */
6340 WMI_VDEV_PARAM_BW_NSS_RATEMASK,
6341
6342 /** Set SENSOR Support */
6343 WMI_VDEV_PARAM_SENSOR_AP,
6344
6345 /** Set beacon rate */
6346 WMI_VDEV_PARAM_BEACON_RATE,
6347
6348 /** Enable CTS to self for DTIM beacon */
6349 WMI_VDEV_PARAM_DTIM_ENABLE_CTS,
6350
6351 /** Disable station kickout at Vap level */
6352 WMI_VDEV_PARAM_STA_KICKOUT,
Nirav Shah47062ff2015-11-05 11:21:08 +05306353
Govind Singh869c9872016-02-22 18:36:34 +05306354 /* VDEV capabilities */
6355 WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */
Sandeep Puligilla62f7ca02016-03-24 15:48:33 -07006356 /*
6357 * Increment TSF in micro seconds to avoid beacon collision on mesh VAP
6358 * The host must ensure that either no other vdevs share the TSF with
6359 * this vdev, or else that it is acceptable to apply this TSF adjustment
6360 * to all vdevs sharing the TSF
6361 */
6362 WMI_VDEV_PARAM_TSF_INCREMENT,
Himanshu Agarwalb953a262016-06-03 10:48:23 +05306363 WMI_VDEV_PARAM_PLACE_HOLDER_1,
Himanshu Agarwala1438152016-05-13 21:40:19 +05306364
6365 /*
6366 * Vdev level rx filter of from-ds / to-ds / no-ds / ta / ra frames.
6367 * Used mainly for mesh-vap.
6368 * The parameter value delivered with the RX_FILTER vdev param contains
6369 * a bit-or mask of wmi_vdev_param_filter enum values.
6370 */
6371 WMI_VDEV_PARAM_RX_FILTER,
Himanshu Agarwale93c55e2016-05-20 12:18:15 +05306372 /* vdev-specific mgmt tx power in dBm units (signed integer value) */
6373 WMI_VDEV_PARAM_MGMT_TX_POWER,
Himanshu Agarwal2690e462016-06-03 14:26:01 +05306374
6375 /*
Himanshu Agarwal5e9ed452016-06-08 15:09:16 +05306376 * Vdev level non aggregration/11g sw retry threshold.
6377 * 0-disable, min:0, max:31, default:15
6378 */
6379 WMI_VDEV_PARAM_NON_AGG_SW_RETRY_TH,
6380 /*
6381 * Vdev level aggregration sw retry threshold.
6382 * 0-disable, min:0, max:31, default:15
6383 */
6384 WMI_VDEV_PARAM_AGG_SW_RETRY_TH,
6385
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +05306386 /** disable dynamic bw RTS **/
6387 WMI_VDEV_PARAM_DISABLE_DYN_BW_RTS,
6388
Himanshu Agarwal5e9ed452016-06-08 15:09:16 +05306389 /*
Nitesh Shah0f933b82016-07-20 16:05:03 +05306390 * Per ssid (vdev) based ATF strict/fair scheduling policy
6391 * Param values are WMI_ATF_SSID_FAIR_SCHED or
6392 * WMI_ATF_SSID_STRICT_SCHED
6393 */
6394 WMI_VDEV_PARAM_ATF_SSID_SCHED_POLICY,
6395
6396 /*
Himanshu Agarwal2690e462016-06-03 14:26:01 +05306397 * === ADD NEW VDEV PARAM TYPES ABOVE THIS LINE ===
6398 * The below vdev param types are used for prototyping, and are
6399 * prone to change.
6400 */
6401 WMI_VDEV_PARAM_PROTOTYPE = 0x8000,
6402 /* 11AX SPECIFIC defines */
6403 WMI_VDEV_PARAM_BSS_COLOR,
Himanshu Agarwal2690e462016-06-03 14:26:01 +05306404 /*
Himanshu Agarwal97005de2016-09-09 12:46:04 +05306405 * Enable / disable trigger access for a AP vdev's peers.
Himanshu Agarwal2690e462016-06-03 14:26:01 +05306406 * For a STA mode vdev this will enable/disable triggered access
6407 * and enable/disable Multi User mode of operation.
Himanshu Agarwal97005de2016-09-09 12:46:04 +05306408 * 0 - Disable MU OFDMA and MU MIMO
6409 * 1 - Disable DL OFDMA
6410 * 2 - Disable DL MUMIMO
6411 * 3 - Disable UL OFDMA
6412 * 4 - Disable UL MUMIMO
6413 * 5 - Enable MU OFDMA and MU MIMO
6414 * 6 - Enable DL OFDMA
6415 * 7 - Enable DL MUMIMO
6416 * 8 - Enable UL OFDMA
6417 * 9 - Enable UL MUMIMO
Himanshu Agarwal2690e462016-06-03 14:26:01 +05306418 */
6419 WMI_VDEV_PARAM_SET_HEMU_MODE,
6420 /*
6421 * For Tx OFDMA this will set values of CP length or guard interval
6422 * to be
6423 * 0: Auto
6424 * 1: 0.8 us
6425 * 2: 1.6 us
6426 * 3: 3.2 us
6427 * Similar to Guard Interval
6428 */
6429 WMI_VDEV_PARAM_TX_OFDMA_CPLEN,
6430 /*=== END VDEV_PARAM_PROTOTYPE SECTION ===*/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006431} WMI_VDEV_PARAM;
6432
Govind Singh869c9872016-02-22 18:36:34 +05306433/* vdev capabilities bit mask */
Himanshu Agarwal800d58d2016-05-13 21:22:19 +05306434#define WMI_VDEV_BEACON_SUPPORT 0x1
Govind Singh869c9872016-02-22 18:36:34 +05306435#define WMI_VDEV_WDS_LRN_ENABLED 0x2
Himanshu Agarwal800d58d2016-05-13 21:22:19 +05306436#define WMI_VDEV_VOW_ENABLED 0x4
6437
Govind Singh869c9872016-02-22 18:36:34 +05306438#define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT)
6439#define WMI_VDEV_IS_WDS_LRN_ENABLED(param) ((param) & WMI_VDEV_WDS_LRN_ENABLED)
Himanshu Agarwal800d58d2016-05-13 21:22:19 +05306440#define WMI_VDEV_IS_VOW_ENABLED(param) ((param) & WMI_VDEV_VOW_ENABLED)
Govind Singh869c9872016-02-22 18:36:34 +05306441
6442/* TXBF capabilities masks */
6443#define WMI_TXBF_CONF_SU_TX_BFEE_S 0
6444#define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1
6445#define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << \
6446 WMI_TXBF_CONF_SU_TX_BFEE_S)
6447#define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_SU_TX_BFEE)
6448#define WMI_TXBF_CONF_SU_TX_BFEE_SET(x, z) WMI_F_RMW(x, z,\
6449 WMI_TXBF_CONF_SU_TX_BFEE)
6450
6451#define WMI_TXBF_CONF_MU_TX_BFEE_S 1
6452#define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1
6453#define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << \
6454 WMI_TXBF_CONF_MU_TX_BFEE_S)
6455#define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_MU_TX_BFEE)
6456#define WMI_TXBF_CONF_MU_TX_BFEE_SET(x, z) WMI_F_RMW(x, z, \
6457 WMI_TXBF_CONF_MU_TX_BFEE)
6458
6459#define WMI_TXBF_CONF_SU_TX_BFER_S 2
6460#define WMI_TXBF_CONF_SU_TX_BFER_M 0x1
6461#define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << \
6462 WMI_TXBF_CONF_SU_TX_BFER_S)
6463#define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_SU_TX_BFER)
6464#define WMI_TXBF_CONF_SU_TX_BFER_SET(x, z) WMI_F_RMW(x, z, \
6465 WMI_TXBF_CONF_SU_TX_BFER)
6466
6467#define WMI_TXBF_CONF_MU_TX_BFER_S 3
6468#define WMI_TXBF_CONF_MU_TX_BFER_M 0x1
6469#define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << \
6470 WMI_TXBF_CONF_MU_TX_BFER_S)
6471#define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_MU_TX_BFER)
6472#define WMI_TXBF_CONF_MU_TX_BFER_SET(x, z) WMI_F_RMW(x, z, \
6473 WMI_TXBF_CONF_MU_TX_BFER)
6474
6475#define WMI_TXBF_CONF_STS_CAP_S 4
6476#define WMI_TXBF_CONF_STS_CAP_M 0x7
6477#define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << \
6478 WMI_TXBF_CONF_STS_CAP_S)
6479#define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_STS_CAP);
6480#define WMI_TXBF_CONF_STS_CAP_SET(x, z) WMI_F_RMW(x, z, \
6481 WMI_TXBF_CONF_STS_CAP)
6482
6483#define WMI_TXBF_CONF_IMPLICIT_BF_S 7
6484#define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1
6485#define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << \
6486 WMI_TXBF_CONF_IMPLICIT_BF_S)
6487#define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_IMPLICIT_BF)
6488#define WMI_TXBF_CONF_IMPLICIT_BF_SET(x, z) WMI_F_RMW(x, z, \
6489 WMI_TXBF_CONF_IMPLICIT_BF)
6490
6491#define WMI_TXBF_CONF_BF_SND_DIM_S 8
6492#define WMI_TXBF_CONF_BF_SND_DIM_M 0x7
6493#define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << \
6494 WMI_TXBF_CONF_BF_SND_DIM_S)
6495#define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_BF_SND_DIM)
6496#define WMI_TXBF_CONF_BF_SND_DIM_SET(x, z) WMI_F_RMW(x, z, \
6497 WMI_TXBF_CONF_BF_SND_DIM)
6498
6499/* TXBF capabilities */
6500typedef struct {
6501 A_UINT32 txbf_cap;
6502} wmi_vdev_txbf_cap;
6503
Himanshu Agarwala1438152016-05-13 21:40:19 +05306504/* vdev rx filters (for mesh) */
6505typedef enum {
6506 /* Don't drop any frames - Default */
6507 WMI_VDEV_RX_ALLOW_ALL_FRAMES = 0x0,
6508 /* Drop FromDS frames */
6509 WMI_VDEV_RX_FILTER_OUT_FROMDS = 0x1,
6510 /* Drop ToDS frames */
6511 WMI_VDEV_RX_FILTER_OUT_TODS = 0x2,
6512 /* Drop NODS frames */
6513 WMI_VDEV_RX_FILTER_OUT_NODS = 0x4,
6514 /* Drop RA frames */
6515 WMI_VDEV_RX_FILTER_OUT_RA = 0x8,
6516 /* Drop TA frames */
6517 WMI_VDEV_RX_FILTER_OUT_TA = 0x10,
6518} wmi_vdev_param_filter;
6519
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006520/* Length of ATIM Window in TU */
6521#define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
6522
6523enum wmi_pkt_type {
6524 WMI_PKT_TYPE_RAW = 0,
6525 WMI_PKT_TYPE_NATIVE_WIFI = 1,
6526 WMI_PKT_TYPE_ETHERNET = 2,
6527};
6528
Govind Singh869c9872016-02-22 18:36:34 +05306529/*******************************************************************
6530 * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap
6531 * Do not use it!
6532 *******************************************************************/
6533
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006534typedef struct {
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306535 A_UINT8 sutxbfee:1, mutxbfee:1, sutxbfer:1, mutxbfer:1,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006536#if defined(AR900B)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306537 txb_sts_cap:3, implicit_bf:1;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006538#else
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306539 reserved:4;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006540#endif
6541} wmi_vdev_txbf_en;
6542
6543/** Upto 8 bits are available for Roaming module to be sent along with
6544 WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
6545/* Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
6546#define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1
6547/* Enable Roaming module in FW to do scan based on Final BMISS */
6548#define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2
6549
6550/** slot time long */
6551#define WMI_VDEV_SLOT_TIME_LONG 0x1
6552/** slot time short */
6553#define WMI_VDEV_SLOT_TIME_SHORT 0x2
6554/** preablbe long */
6555#define WMI_VDEV_PREAMBLE_LONG 0x1
6556/** preablbe short */
6557#define WMI_VDEV_PREAMBLE_SHORT 0x2
6558
6559/** the definition of different START/RESTART Event response */
6560typedef enum {
6561 /* Event respose of START CMD */
6562 WMI_VDEV_START_RESP_EVENT = 0,
6563 /* Event respose of RESTART CMD */
6564 WMI_VDEV_RESTART_RESP_EVENT,
6565} WMI_START_EVENT_PARAM;
6566
6567typedef struct {
6568 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */
6569 /** unique id identifying the VDEV, generated by the caller */
6570 A_UINT32 vdev_id;
6571 /** requestor id that requested the VDEV start request */
6572 A_UINT32 requestor_id;
6573 /* Respose of Event type START/RESTART */
6574 WMI_START_EVENT_PARAM resp_type;
6575 /** status of the response */
6576 A_UINT32 status;
6577 /** Vdev chain mask */
6578 A_UINT32 chain_mask;
6579 /** Vdev mimo power save mode */
6580 A_UINT32 smps_mode;
Govind Singh869c9872016-02-22 18:36:34 +05306581 union {
6582 /* OBSOLETE - will be removed once all refs are gone */
6583 A_UINT32 mac_id;
6584 /** pdev_id for identifying the MAC
6585 * See macros starting with WMI_PDEV_ID_ for values.
6586 */
6587 A_UINT32 pdev_id;
6588 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006589 /** Configured Transmit Streams **/
6590 A_UINT32 cfgd_tx_streams;
6591 /** Configured Receive Streams **/
6592 A_UINT32 cfgd_rx_streams;
6593} wmi_vdev_start_response_event_fixed_param;
6594
6595typedef struct {
6596 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */
6597 /** unique id identifying the VDEV, generated by the caller */
6598 A_UINT32 vdev_id;
6599} wmi_vdev_stopped_event_fixed_param;
6600
Manikandan Mohan429a0782015-12-23 14:35:54 -08006601typedef struct {
6602 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */
6603 /** unique id identifying the VDEV, generated by the caller */
6604 A_UINT32 vdev_id;
6605} wmi_vdev_delete_resp_event_fixed_param;
6606
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006607/** common structure used for simple events (stopped, resume_req, standby response) */
6608typedef struct {
6609 A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */
6610 /** unique id identifying the VDEV, generated by the caller */
6611 A_UINT32 vdev_id;
6612} wmi_vdev_simple_event_fixed_param;
6613
6614/** VDEV start response status codes */
6615#define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV succesfully started */
6616#define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */
6617#define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */
6618
6619/** Beacon processing related command and event structures */
6620typedef struct {
6621 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
6622 /** unique id identifying the VDEV, generated by the caller */
6623 A_UINT32 vdev_id;
6624 /** xmit rate */
6625 A_UINT32 tx_rate;
6626 /** xmit power */
6627 A_UINT32 txPower;
6628 /** beacon buffer length in bytes */
6629 A_UINT32 buf_len;
6630 /* This TLV is followed by array of bytes:
6631 * // beacon frame buffer
6632 * A_UINT8 bufp[];
6633 */
6634} wmi_bcn_tx_hdr;
6635
6636/* Beacon filter */
6637#define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
6638#define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
6639#define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
6640#define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
6641#define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
6642
6643typedef struct {
6644 /** Filter ID */
6645 A_UINT32 bcn_filter_id;
6646 /** Filter type - wmi_bcn_filter */
6647 A_UINT32 bcn_filter;
6648 /** Buffer len */
6649 A_UINT32 bcn_filter_len;
6650 /** Filter info (threshold, BSSID, RSSI) */
6651 A_UINT8 *bcn_filter_buf;
6652} wmi_bcn_filter_rx_cmd;
6653
6654/** Capabilities and IEs to be passed to firmware */
6655typedef struct {
6656 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
6657 /** Capabilities */
6658 A_UINT32 caps;
6659 /** ERP info */
6660 A_UINT32 erp;
6661 /** Advanced capabilities */
6662 /** HT capabilities */
6663 /** HT Info */
6664 /** ibss_dfs */
6665 /** wpa Info */
6666 /** rsn Info */
6667 /** rrm info */
6668 /** ath_ext */
6669 /** app IE */
6670} wmi_bcn_prb_info;
6671
6672typedef struct {
6673 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
6674 /** unique id identifying the VDEV, generated by the caller */
6675 A_UINT32 vdev_id;
6676 /** TIM IE offset from the beginning of the template. */
6677 A_UINT32 tim_ie_offset;
6678 /** beacon buffer length. data is in TLV data[] */
6679 A_UINT32 buf_len;
6680 /*
6681 * The TLVs follows:
6682 * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs
6683 * A_UINT8 data[]; //Variable length data
6684 */
6685} wmi_bcn_tmpl_cmd_fixed_param;
6686
6687typedef struct {
6688 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
6689 /** unique id identifying the VDEV, generated by the caller */
6690 A_UINT32 vdev_id;
6691 /** beacon buffer length. data is in TLV data[] */
6692 A_UINT32 buf_len;
6693 /*
6694 * The TLVs follows:
6695 * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs
6696 * A_UINT8 data[]; //Variable length data
6697 */
6698} wmi_prb_tmpl_cmd_fixed_param;
6699
6700typedef struct {
6701 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
6702 A_UINT32 tlv_header;
6703 /** unique id identifying the VDEV */
6704 A_UINT32 vdev_id;
6705 /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
6706 A_UINT32 tx_status;
6707} wmi_offload_bcn_tx_status_event_fixed_param;
6708
6709enum wmi_sta_ps_mode {
6710 /** enable power save for the given STA VDEV */
6711 WMI_STA_PS_MODE_DISABLED = 0,
6712 /** disable power save for a given STA VDEV */
6713 WMI_STA_PS_MODE_ENABLED = 1,
6714};
6715
6716typedef struct {
6717 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
6718 /** unique id identifying the VDEV, generated by the caller */
6719 A_UINT32 vdev_id;
6720
6721 /** Power save mode
6722 *
6723 * (see enum wmi_sta_ps_mode)
6724 */
6725 A_UINT32 sta_ps_mode;
6726} wmi_sta_powersave_mode_cmd_fixed_param;
6727
6728enum wmi_csa_offload_en {
6729 WMI_CSA_OFFLOAD_DISABLE = 0,
6730 WMI_CSA_OFFLOAD_ENABLE = 1,
6731};
6732
6733typedef struct {
6734 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */
6735 A_UINT32 vdev_id;
6736 A_UINT32 csa_offload_enable;
6737} wmi_csa_offload_enable_cmd_fixed_param;
6738
6739typedef struct {
6740 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */
6741 A_UINT32 vdev_id;
6742 /*
6743 * The TLVs follows:
6744 * wmi_channel chan;
6745 */
6746} wmi_csa_offload_chanswitch_cmd_fixed_param;
6747/**
6748 * This parameter controls the policy for retrieving frames from AP while the
6749 * STA is in sleep state.
6750 *
6751 * Only takes affect if the sta_ps_mode is enabled
6752 */
6753enum wmi_sta_ps_param_rx_wake_policy {
6754 /* Wake up when ever there is an RX activity on the VDEV. In this mode
6755 * the Power save SM(state machine) will come out of sleep by either
6756 * sending null frame (or) a data frame (with PS==0) in response to TIM
6757 * bit set in the received beacon frame from AP.
6758 */
6759 WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
6760
6761 /* Here the power save state machine will not wakeup in response to TIM
6762 * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
6763 * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
6764 * access categories are delivery-enabled, the station will send a UAPSD
6765 * trigger frame, otherwise it will send a PS-Poll.
6766 */
6767 WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
6768};
6769
6770/** Number of tx frames/beacon that cause the power save SM to wake up.
6771 *
6772 * Value 1 causes the SM to wake up for every TX. Value 0 has a special
6773 * meaning, It will cause the SM to never wake up. This is useful if you want
6774 * to keep the system to sleep all the time for some kind of test mode . host
6775 * can change this parameter any time. It will affect at the next tx frame.
6776 */
6777enum wmi_sta_ps_param_tx_wake_threshold {
6778 WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
6779 WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
6780
6781 /* Values greater than one indicate that many TX attempts per beacon
6782 * interval before the STA will wake up
6783 */
6784};
6785
6786/**
6787 * The maximum number of PS-Poll frames the FW will send in response to
6788 * traffic advertised in TIM before waking up (by sending a null frame with PS
6789 * = 0). Value 0 has a special meaning: there is no maximum count and the FW
6790 * will send as many PS-Poll as are necessary to retrieve buffered BU. This
6791 * parameter is used when the RX wake policy is
6792 * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
6793 * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
6794 */
6795enum wmi_sta_ps_param_pspoll_count {
6796 WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
6797 /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
6798 * will send before waking up.
6799 */
6800};
6801
6802/*
6803 * This will include the delivery and trigger enabled state for every AC.
6804 * This is the negotiated state with AP. The host MLME needs to set this based
6805 * on AP capability and the state Set in the association request by the
6806 * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
6807 */
6808#define WMI_UAPSD_AC_TYPE_DELI 0
6809#define WMI_UAPSD_AC_TYPE_TRIG 1
6810
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306811#define WMI_UAPSD_AC_BIT_MASK(ac, type) \
6812 do { \
6813 (type == WMI_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) : \
6814 (1<<((ac<<1)+1)) \
6815 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006816
6817enum wmi_sta_ps_param_uapsd {
6818 WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
6819 WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
6820 WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
6821 WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
6822 WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
6823 WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
6824 WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
6825 WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
6826};
6827
6828enum wmi_sta_powersave_param {
6829 /**
6830 * Controls how frames are retrievd from AP while STA is sleeping
6831 *
6832 * (see enum wmi_sta_ps_param_rx_wake_policy)
6833 */
6834 WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
6835
6836 /**
6837 * The STA will go active after this many TX
6838 *
6839 * (see enum wmi_sta_ps_param_tx_wake_threshold)
6840 */
6841 WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
6842
6843 /**
6844 * Number of PS-Poll to send before STA wakes up
6845 *
6846 * (see enum wmi_sta_ps_param_pspoll_count)
6847 *
6848 */
6849 WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
6850
6851 /**
6852 * TX/RX inactivity time in msec before going to sleep.
6853 *
6854 * The power save SM will monitor tx/rx activity on the VDEV, if no
6855 * activity for the specified msec of the parameter the Power save SM will
6856 * go to sleep.
6857 */
6858 WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
6859
6860 /**
6861 * Set uapsd configuration.
6862 *
6863 * (see enum wmi_sta_ps_param_uapsd)
6864 */
6865 WMI_STA_PS_PARAM_UAPSD = 4,
6866 /**
6867 * Number of PS-Poll to send before STA wakes up in QPower Mode
6868 */
6869 WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
6870
6871 /**
6872 * Enable QPower
6873 */
6874 WMI_STA_PS_ENABLE_QPOWER = 6,
6875
6876 /**
6877 * Number of TX frames before the entering the Active state
6878 */
6879 WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
6880
6881 /**
6882 * QPower SPEC PSPOLL interval
6883 */
6884 WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
6885
6886 /**
6887 * Max SPEC PSPOLL to be sent when the PSPOLL response has
6888 * no-data bit set
6889 */
6890 WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
6891};
6892
6893typedef struct {
6894 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
6895 /** unique id identifying the VDEV, generated by the caller */
6896 A_UINT32 vdev_id;
6897 /** station power save parameter (see enum wmi_sta_powersave_param) */
6898 A_UINT32 param;
6899 A_UINT32 value;
6900} wmi_sta_powersave_param_cmd_fixed_param;
6901
6902/** No MIMO power save */
6903#define WMI_STA_MIMO_PS_MODE_DISABLE
6904/** mimo powersave mode static*/
6905#define WMI_STA_MIMO_PS_MODE_STATIC
6906/** mimo powersave mode dynamic */
6907#define WMI_STA_MIMO_PS_MODE_DYNAMI
6908
6909typedef struct {
6910 /** unique id identifying the VDEV, generated by the caller */
6911 A_UINT32 vdev_id;
6912 /** mimo powersave mode as defined above */
6913 A_UINT32 mimo_pwrsave_mode;
6914} wmi_sta_mimo_ps_mode_cmd;
6915
6916/** U-APSD configuration of peer station from (re)assoc request and TSPECs */
6917enum wmi_ap_ps_param_uapsd {
6918 WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
6919 WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
6920 WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
6921 WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
6922 WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
6923 WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
6924 WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
6925 WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
6926};
6927
6928/** U-APSD maximum service period of peer station */
6929enum wmi_ap_ps_peer_param_max_sp {
6930 WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
6931 WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
6932 WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
6933 WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
6934
6935 /* keep last! */
6936 MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
6937};
6938
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05306939/** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */
6940enum wmi_ap_ps_param_sifs_resp_frmtype {
6941 WMI_SIFS_RESP_PSPOLL = (1 << 0),
6942 WMI_SIFS_RESP_UAPSD = (1 << 1),
6943 WMI_SIFS_RESP_QBST_EXP = (1 << 2),
6944 WMI_SIFS_RESP_QBST_DATA = (1 << 3),
6945 WMI_SIFS_RESP_QBST_BAR = (1 << 4),
6946};
6947
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006948/**
6949 * AP power save parameter
6950 * Set a power save specific parameter for a peer station
6951 */
6952enum wmi_ap_ps_peer_param {
6953 /** Set uapsd configuration for a given peer.
6954 *
6955 * This will include the delivery and trigger enabled state for every AC.
6956 * The host MLME needs to set this based on AP capability and stations
6957 * request Set in the association request received from the station.
6958 *
6959 * Lower 8 bits of the value specify the UAPSD configuration.
6960 *
6961 * (see enum wmi_ap_ps_param_uapsd)
6962 * The default value is 0.
6963 */
6964 WMI_AP_PS_PEER_PARAM_UAPSD = 0,
6965
6966 /**
6967 * Set the service period for a UAPSD capable station
6968 *
6969 * The service period from wme ie in the (re)assoc request frame.
6970 *
6971 * (see enum wmi_ap_ps_peer_param_max_sp)
6972 */
6973 WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
6974
6975 /** Time in seconds for aging out buffered frames for STA in power save */
6976 WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05306977 /**
6978 * Specify frame types that are considered SIFS RESP trigger frame
6979 * (see enum wmi_ap_ps_param_sifs_resp_frmtype)
6980 */
Govind Singh32cced32016-02-01 13:33:09 +05306981 WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
6982
6983 /*
6984 * Specifies the trigger state of TID.
6985 * Valid only for UAPSD frame type
6986 */
6987 WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
6988
6989 /** Specifies the WNM sleep state of a STA */
6990 WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006991};
6992
6993typedef struct {
6994 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
6995 /** unique id identifying the VDEV, generated by the caller */
6996 A_UINT32 vdev_id;
6997 /** peer MAC address */
6998 wmi_mac_addr peer_macaddr;
6999 /** AP powersave param (see enum wmi_ap_ps_peer_param) */
7000 A_UINT32 param;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05307001 /** AP powersave param value (see defines) */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007002 A_UINT32 value;
7003} wmi_ap_ps_peer_cmd_fixed_param;
7004
7005/** Configure peer station 11v U-APSD coexistance
7006 *
7007 * Two parameters from uaspd coexistence ie info (as specified in 11v) are
7008 * sent down to FW along with this command.
7009 *
7010 * The semantics of these fields are described in the following text extracted
7011 * from 802.11v.
7012 *
7013 * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the
7014 * U-APSD Coexistence element, the AP should not transmit frames to the
7015 * non-AP STA outside of the U-APSD Coexistence Service Period, which
7016 * begins when the AP receives the U-APSD trigger frame and ends after
7017 * the transmission period specified by the result of the following
7018 * calculation:
7019 *
7020 * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
7021 *
7022 * Where T is the time the U-APSD trigger frame was received at the AP
7023 * Interval is the UAPSD Coexistence element Duration/Interval field
7024 * value (see 7.3.2.91) or upon the successful transmission of a frame
7025 * with EOSP bit set to 1, whichever is earlier.
7026 *
7027 *
7028 * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
7029 * Coexistence element, the AP should not transmit frames to the non-AP
7030 * STA outside of the U-APSD Coexistence Service Period, which begins
7031 * when the AP receives a U-APSD trigger frame and ends after the
7032 * transmission period specified by the result of the following
7033 * calculation: End of transmission period = T + Duration
7034 */
7035typedef struct {
7036 /** unique id identifying the VDEV, generated by the caller */
7037 A_UINT32 vdev_id;
7038 /** peer MAC address */
7039 wmi_mac_addr peer_macaddr;
7040 /** Enable U-APSD coexistence support for this peer
7041 *
7042 * 0 -> disabled (default)
7043 * 1 -> enabled
7044 */
7045 A_UINT32 enabled;
7046 /** Duration/Interval as defined by 11v U-ASPD coexistance */
7047 A_UINT32 duration_interval;
7048 /** Upper 32 bits of 64-bit TSF offset */
7049 A_UINT32 tsf_offset_high;
7050 /** Lower 32 bits of 64-bit TSF offset */
7051 A_UINT32 tsf_offset_low;
7052} wmi_ap_powersave_peer_uapsd_coex_cmd;
7053
7054typedef enum {
7055 WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001,
7056 WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002,
7057 WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
7058
7059 WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
7060} wmi_ap_ps_egap_flag_type;
7061
7062/**
7063 * configure ehanced green ap parameters
7064 */
7065typedef struct {
7066 /*
7067 * TLV tag and len; tag equals
7068 * wmi_ap_powersave_egap_param_cmd_fixed_param
7069 */
7070 A_UINT32 tlv_header;
7071 /** Enable enhanced green ap
7072 * 0 -> disabled
7073 * 1 -> enabled
7074 */
7075 A_UINT32 enable;
7076 /** The param indicates a duration that all STAs connected
7077 * to S-AP have no traffic.
7078 */
7079 A_UINT32 inactivity_time; /* in unit of milliseconds */
7080 /** The param indicates a duration that all STAs connected
7081 * to S-AP have no traffic, after all STAs have entered powersave.
7082 */
7083 A_UINT32 wait_time; /* in unit of milliseconds */
7084 /** The param is used to turn on/off some functions within E-GAP.
7085 */
7086 A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
7087} wmi_ap_ps_egap_param_cmd_fixed_param;
7088
7089typedef enum {
7090 WMI_AP_PS_EGAP_STATUS_IDLE = 1,
7091 WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
7092 WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3,
7093
7094 WMI_AP_PS_EGAP_STATUS_MAX = 15
7095} wmi_ap_ps_egap_status_type;
7096
7097/**
7098 * send ehanced green ap status to host
7099 */
7100typedef struct {
Manikandan Mohan0c7ae402015-12-03 17:56:41 -08007101 /* TLV tag and len; tag equals
7102 * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list
7103 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007104 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05307105 union {
7106 /* OBSOLETE - will be removed once all refs are gone */
7107 A_UINT32 mac_id;
7108 /** pdev_id for identifying the MAC
7109 * See macros starting with WMI_PDEV_ID_ for values.
7110 */
7111 A_UINT32 pdev_id;
7112 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007113 /** The param indicates the current tx chainmask with the mac id. */
7114 A_UINT32 tx_chainmask;
7115 /** The param indicates the current rx chainmask with the mac id. */
7116 A_UINT32 rx_chainmask;
7117} wmi_ap_ps_egap_info_chainmask_list;
7118
7119typedef struct {
7120 /*
7121 * TLV tag and len; tag equals
7122 * wmi_ap_powersave_egap_param_cmd_fixed_param
7123 */
7124 A_UINT32 tlv_header;
7125 /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
7126 A_UINT32 status;
7127 /* This TLV is followed by
7128 * wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
7129 */
7130} wmi_ap_ps_egap_info_event_fixed_param;
7131
7132
7133/* 128 clients = 4 words */
7134/* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
7135#define WMI_TIM_BITMAP_ARRAY_SIZE 4
7136
7137typedef struct {
7138 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
7139 /** TIM bitmap len (in bytes)*/
7140 A_UINT32 tim_len;
7141 /** TIM Partial Virtual Bitmap */
7142 A_UINT32 tim_mcast;
7143 A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
7144 A_UINT32 tim_changed;
7145 A_UINT32 tim_num_ps_pending;
7146} wmi_tim_info;
7147
7148typedef struct {
7149 /** Flag to enable quiet period IE support */
7150 A_UINT32 is_enabled;
7151 /** Quiet start */
7152 A_UINT32 tbttcount;
7153 /** Beacon intervals between quiets*/
7154 A_UINT32 period;
7155 /** TUs of each quiet*/
7156 A_UINT32 duration;
7157 /** TUs of from TBTT of quiet start*/
7158 A_UINT32 offset;
7159} wmi_quiet_info;
7160
7161/* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
7162#define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
7163
7164typedef struct {
7165 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
7166 /** Bit 0: Flag to indicate an update in NOA schedule
7167 * Bits 7-1: Reserved
7168 * Bits 15-8: Index (identifies the instance of NOA sub element)
7169 * Bit 16: Opp PS state of the AP
7170 * Bits 23-17: Ctwindow in TUs
7171 * Bits 31-24: Number of NOA descriptors
7172 */
7173 A_UINT32 noa_attributes;
7174 wmi_p2p_noa_descriptor
7175 noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
7176} wmi_p2p_noa_info;
7177
7178#define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
7179#define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
7180
7181#define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \
7182 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
7183
7184#define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \
7185 WMI_F_RMW((hdr)->noa_attributes, 0x1, \
7186 WMI_UNIFIED_NOA_ATTR_MODIFIED);
7187
7188#define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00
7189#define WMI_UNIFIED_NOA_ATTR_INDEX_S 8
7190
7191#define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \
7192 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
7193
7194#define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \
7195 WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
7196 WMI_UNIFIED_NOA_ATTR_INDEX);
7197
7198#define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000
7199#define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16
7200
7201#define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \
7202 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
7203
7204#define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \
7205 WMI_F_RMW((hdr)->noa_attributes, 0x1, \
7206 WMI_UNIFIED_NOA_ATTR_OPP_PS);
7207
7208#define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000
7209#define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17
7210
7211#define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \
7212 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
7213
7214#define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \
7215 WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \
7216 WMI_UNIFIED_NOA_ATTR_CTWIN);
7217
7218#define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000
7219#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24
7220
7221#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \
7222 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
7223
7224#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \
7225 WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
7226 WMI_UNIFIED_NOA_ATTR_NUM_DESC);
7227
7228typedef struct {
7229 /** TIM info */
7230 wmi_tim_info tim_info;
7231 /** P2P NOA info */
7232 wmi_p2p_noa_info p2p_noa_info;
7233 /* TBD: More info elements to be added later */
7234} wmi_bcn_info;
7235
7236typedef struct {
7237 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
7238 /** bitmap identifying the VDEVs, generated by the caller */
7239 A_UINT32 vdev_map;
7240 /* This TLV is followed by tim_info and p2p_noa_info for each vdev in vdevmap :
7241 * wmi_tim_info tim_info[];
7242 * wmi_p2p_noa_info p2p_noa_info[];
7243 *
7244 */
7245} wmi_host_swba_event_fixed_param;
7246
7247#define WMI_MAX_AP_VDEV 16
7248
7249typedef struct {
7250 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
7251 /** bimtap of VDEVs that has tbtt offset updated */
7252 A_UINT32 vdev_map;
7253 /* The TLVs for tbttoffset_list will follow this TLV.
7254 * tbtt offset list in the order of the LSB to MSB in the vdev_map bitmap
7255 * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
7256 */
7257} wmi_tbtt_offset_event_fixed_param;
7258
7259/* Peer Specific commands and events */
7260
7261typedef struct {
7262 A_UINT32 percentage; /* in unit of 12.5% */
7263 A_UINT32 min_delta; /* in unit of Mbps */
7264} rate_delta_t;
7265
7266#define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01
7267#define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02
7268#define MAX_NUM_OF_RATE_THRESH 4
7269
7270typedef struct {
7271 /*
7272 * PEER_RATE_REPORT_COND_FLAG_DELTA,
7273 * PEER_RATE_REPORT_COND_FLAG_THRESHOLD
7274 * Any of these two conditions or both of
7275 * them can be set.
7276 */
7277 A_UINT32 val_cond_flags;
7278 rate_delta_t rate_delta;
7279 /*
7280 * In unit of Mbps. There are at most 4 thresholds
7281 * If the threshold count is less than 4, set zero to
7282 * the one following the last threshold
7283 */
7284 A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH];
7285} report_cond_per_phy_t;
7286
7287
7288enum peer_rate_report_cond_phy_type {
7289 PEER_RATE_REPORT_COND_11B = 0,
7290 PEER_RATE_REPORT_COND_11A_G,
7291 PEER_RATE_REPORT_COND_11N,
7292 PEER_RATE_REPORT_COND_11AC,
7293 PEER_RATE_REPORT_COND_MAX_NUM
7294};
7295
7296typedef struct {
7297 /*
7298 * TLV tag and len; tag equals
7299 * WMITLV_TAG_STRUC_wmi_peer_rate_report_condtion_fixed_param
7300 */
7301 A_UINT32 tlv_header;
7302 /* 1= enable, 0=disable */
7303 A_UINT32 enable_rate_report;
7304 A_UINT32 report_backoff_time; /* in unit of msecond */
7305 A_UINT32 report_timer_period; /* in unit of msecond */
7306 /*
7307 *In the following field, the array index means the phy type,
7308 * please see enum peer_rate_report_cond_phy_type for detail
7309 */
7310 report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
7311} wmi_peer_set_rate_report_condition_fixed_param;
7312
7313/* Peer Type:
7314 * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
7315 * on address and vdev opmode. This is largely here to allow host to indicate that
7316 * peer is explicitly a TDLS peer
7317 */
7318enum wmi_peer_type {
7319 WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
7320 WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
7321 WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
7322 WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
Govind Singh941bd5e2016-02-04 17:15:25 +05307323 WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007324 WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307325 * is assigned up to 127 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007326 /* Reserved from 128 - 255 for
7327 * target internal use.*/
7328 WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
7329};
7330
7331typedef struct {
7332 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
7333 /** unique id identifying the VDEV, generated by the caller */
7334 A_UINT32 vdev_id;
7335 /** peer MAC address */
7336 wmi_mac_addr peer_macaddr;
7337 /** peer type: see enum values above */
7338 A_UINT32 peer_type;
7339} wmi_peer_create_cmd_fixed_param;
7340
7341typedef struct {
7342 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
7343 /** unique id identifying the VDEV, generated by the caller */
7344 A_UINT32 vdev_id;
7345 /** peer MAC address */
7346 wmi_mac_addr peer_macaddr;
7347} wmi_peer_delete_cmd_fixed_param;
7348
7349typedef struct {
Nitesh Shah5de1cf82016-06-29 20:13:17 +05307350 /**
7351 * TLV tag and len; tag equals
7352 * WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param
7353 */
7354 A_UINT32 tlv_header;
7355 /** unique id identifying the VDEV, generated by the caller */
7356 A_UINT32 vdev_id;
7357 /** peer MAC address */
7358 wmi_mac_addr peer_macaddr;
7359 /**
7360 * maximum block ack window size to use during a rx block ack
7361 * negotiation, i.e. the maximum number of MPDUs per A-MPDU
7362 * that will be received
7363 */
7364 A_UINT32 rx_block_ack_win_limit;
7365} wmi_peer_set_rx_blocksize_cmd_fixed_param;
7366
7367typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007368 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
7369 /** unique id identifying the VDEV, generated by the caller */
7370 A_UINT32 vdev_id;
7371 /** peer MAC address */
7372 wmi_mac_addr peer_macaddr;
7373 /** tid bitmap identifying the tids to flush */
7374 A_UINT32 peer_tid_bitmap;
7375} wmi_peer_flush_tids_cmd_fixed_param;
7376
7377typedef struct {
7378 /** rate mode . 0: disable fixed rate (auto rate)
7379 * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
7380 * 2: ht20 11n rate specified as mcs index
7381 * 3: ht40 11n rate specified as mcs index
7382 */
7383 A_UINT32 rate_mode;
7384 /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
7385 * and series 3 is stored at byte 3 (MSB) */
7386 A_UINT32 rate_series;
7387 /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
7388 * and retry count for rate 3 is stored at byte 3 (MSB) */
7389 A_UINT32 rate_retries;
7390} wmi_fixed_rate;
7391
7392typedef struct {
7393 /** unique id identifying the VDEV, generated by the caller */
7394 A_UINT32 vdev_id;
7395 /** peer MAC address */
7396 wmi_mac_addr peer_macaddr;
7397 /** fixed rate */
7398 wmi_fixed_rate peer_fixed_rate;
7399} wmi_peer_fixed_rate_cmd;
7400
7401#define WMI_MGMT_TID 17
7402
7403typedef struct {
7404 A_UINT32 tlv_header;
7405 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
7406 /** unique id identifying the VDEV, generated by the caller */
7407 A_UINT32 vdev_id;
7408 /** peer MAC address */
7409 wmi_mac_addr peer_macaddr;
7410} wmi_addba_clear_resp_cmd_fixed_param;
7411
7412typedef struct {
7413 A_UINT32 tlv_header;
7414 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_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 /** Tid number */
7420 A_UINT32 tid;
7421 /** Buffer/Window size*/
7422 A_UINT32 buffersize;
7423} wmi_addba_send_cmd_fixed_param;
7424
7425typedef struct {
7426 A_UINT32 tlv_header;
7427 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
7428 /** unique id identifying the VDEV, generated by the caller */
7429 A_UINT32 vdev_id;
7430 /** peer MAC address */
7431 wmi_mac_addr peer_macaddr;
7432 /** Tid number */
7433 A_UINT32 tid;
7434 /** Is Initiator */
7435 A_UINT32 initiator;
7436 /** Reason code */
7437 A_UINT32 reasoncode;
7438} wmi_delba_send_cmd_fixed_param;
7439
7440typedef struct {
7441 A_UINT32 tlv_header;
7442 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
7443 /** unique id identifying the vdev, generated by the caller */
7444 A_UINT32 vdev_id;
7445 /** peer mac address */
7446 wmi_mac_addr peer_macaddr;
7447 /** Tid number */
7448 A_UINT32 tid;
7449 /** status code */
7450 A_UINT32 statuscode;
7451} wmi_addba_setresponse_cmd_fixed_param;
7452
7453typedef struct {
7454 A_UINT32 tlv_header;
7455 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
7456 /** unique id identifying the vdev, generated by the caller */
7457 A_UINT32 vdev_id;
7458 /** peer mac address */
7459 wmi_mac_addr peer_macaddr;
7460 /** Tid number */
7461 A_UINT32 tid;
7462} wmi_send_singleamsdu_cmd_fixed_param;
7463
7464/* Type of Station DTIM Power Save method */
7465enum {
7466 /* For NORMAL DTIM, the parameter is the number of beacon intervals and
7467 * also the same value as the listen interval. For this method, the
7468 * station will wake up based on the listen interval. If this
7469 * listen interval is not equal to DTIM, then the station may
7470 * miss certain DTIM beacons. If this value is 1, then the
7471 * station will wake up for every beacon.
7472 */
7473 WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
7474 /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
7475 * When this value is 1, then the station will wake at every DTIM beacon.
7476 * If this value is >1, then the station will skip certain DTIM beacons.
7477 * This value is the multiple of DTIM intervals that the station will
7478 * wake up to receive the DTIM beacons.
7479 */
7480 WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
7481};
7482
7483/* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
7484typedef struct {
7485 A_UINT32 tlv_header;
7486 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
7487 /** unique id identifying the VDEV, generated by the caller */
7488 A_UINT32 vdev_id;
7489 /* Station DTIM Power Save method as defined above */
7490 A_UINT32 dtim_pwrsave_method;
7491 /* DTIM PS value. Contents depends on the method */
7492 A_UINT32 value;
7493 /* Modulated DTIM value */
7494 A_UINT32 MaxLIModulatedDTIM;
7495} wmi_sta_dtim_ps_method_cmd_fixed_param;
7496
7497/*
7498 * For Station UAPSD Auto Trigger feature, the Firmware monitors the
7499 * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
7500 * If there is no uplink/download for the specified service interval (field service_interval),
7501 * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
7502 * specified in the UP (field user_priority).
7503 * Firmware also monitors the responses for these QOS-NULL triggers.
7504 * If the peer does not have any delivery frames, it will respond with
7505 * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
7506 * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
7507 * are unused and should be set to 0.
7508 * When service_interval is 0, then the firmware will not send any trigger frames. This is for
7509 * certain host-based implementations that don't want this firmware offload.
7510 * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
7511 * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
7512 * and rest of the AC default to 300 ms.
7513 *
7514 * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
7515 * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
7516 * the more advanced monitoring method.
7517 * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
7518 * suspend interval (field suspend_interval), firmware will change its auto trigger interval
7519 * to delay interval (field delay_interval). This way, when there is no traffic, the station
7520 * will save more power by waking up less and sending less trigger frames.
7521 * The (service_interval < suspend_interval) and (service_interval < delay_interval).
7522 * If this variable auto trigger is not required, then the suspend_interval and delay_interval
7523 * should be 0.
7524 */
7525typedef struct {
7526 A_UINT32 tlv_header;
7527 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
7528 /** WMM Access category from 0 to 3 */
7529 A_UINT32 wmm_ac;
7530 /** User priority to use in trigger frames. It is the TID
7531 * value. This field needs to be specified and may not be
7532 * equivalent to AC since some implementation may use the TSPEC
7533 * to enable UAPSD and negotiate a particular user priority. */
7534 A_UINT32 user_priority;
7535 /** service interval in ms */
7536 A_UINT32 service_interval;
7537 /** Suspend interval in ms */
7538 A_UINT32 suspend_interval;
7539 /** delay interval in ms */
7540 A_UINT32 delay_interval;
7541} wmi_sta_uapsd_auto_trig_param;
7542
7543typedef struct {
7544 A_UINT32 tlv_header;
7545 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
7546 /** unique id identifying the VDEV, generated by the caller */
7547 A_UINT32 vdev_id;
7548 /** peer mac address */
7549 wmi_mac_addr peer_macaddr;
7550 /** Number of AC to specify */
7551 A_UINT32 num_ac;
7552 /*
7553 * Following this struc is the TLV:
7554 * wmi_sta_uapsd_auto_trig_param ac_param[]; //Variable number of AC parameters (defined by field num_ac)
7555 */
7556
7557} wmi_sta_uapsd_auto_trig_cmd_fixed_param;
7558
7559/** mimo powersave state */
7560#define WMI_PEER_MIMO_PS_STATE 0x1
7561/** enable/disable AMPDU . initial value (enabled) */
7562#define WMI_PEER_AMPDU 0x2
7563/** authorize/unauthorize peer. initial value is unauthorized (0) */
7564#define WMI_PEER_AUTHORIZE 0x3
7565/** peer channel bandwidth */
7566#define WMI_PEER_CHWIDTH 0x4
7567/** peer NSS */
7568#define WMI_PEER_NSS 0x5
7569/** USE 4 ADDR */
7570#define WMI_PEER_USE_4ADDR 0x6
7571/* set group membership status */
7572#define WMI_PEER_MEMBERSHIP 0x7
7573#define WMI_PEER_USERPOS 0x8
7574/*
7575 * A critical high-level protocol is being used with this peer. Target
7576 * should take appropriate measures (if possible) to ensure more
7577 * reliable link with minimal latency. This *may* include modifying the
7578 * station power save policy, enabling more RX chains, increased
7579 * priority of channel scheduling, etc.
7580 *
7581 * NOTE: This parameter should only be considered a hint as specific
7582 * behavior will depend on many factors including current network load
7583 * and vdev/peer configuration.
7584 *
7585 * For STA VDEV this peer corresponds to the AP's BSS peer.
7586 * For AP VDEV this peer corresponds to the remote peer STA.
7587 */
7588#define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9
7589/* set Tx failure count threshold for the peer - Currently unused */
7590#define WMI_PEER_TX_FAIL_CNT_THR 0xA
7591/* Enable H/W retry and Enable H/W Send CTS2S before Data */
7592#define WMI_PEER_SET_HW_RETRY_CTS2S 0xB
7593
7594/* Set peer advertised IBSS atim window length */
7595#define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC
7596
7597/** peer phy mode */
7598#define WMI_PEER_PHYMODE 0xD
Govind Singh32cced32016-02-01 13:33:09 +05307599/** Use FIXED Pwr */
7600#define WMI_PEER_USE_FIXED_PWR 0xE
7601/** Set peer fixed rate */
7602#define WMI_PEER_PARAM_FIXED_RATE 0xF
7603/** Whitelist peer TIDs */
7604#define WMI_PEER_SET_MU_WHITELIST 0x10
Govind Singh67b83b82016-02-01 19:26:59 +05307605/** Set peer max tx rate (MCS) in adaptive rate ctrl */
7606#define WMI_PEER_SET_MAX_TX_RATE 0x11
7607/** Set peer minimal tx rate (MCS) in adaptive rate ctrl */
7608#define WMI_PEER_SET_MIN_TX_RATE 0x12
Pradeep Reddy POTTETIdead2bd2016-06-09 17:11:12 +05307609/**
7610 * default ring routing for peer data packets,
7611 * param_value = bit 0 for hash based routing enabled or not
7612 * (value 1 is enabled, value 0 is disabled)
7613 * bits 1:5 are for ring 32 (i.e. ring id value
7614 * selected from 0 to 31 values)
7615 */
7616#define WMI_PEER_SET_DEFAULT_ROUTING 0x13
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007617
7618/** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
7619#define WMI_PEER_MIMO_PS_NONE 0x0
7620#define WMI_PEER_MIMO_PS_STATIC 0x1
7621#define WMI_PEER_MIMO_PS_DYNAMIC 0x2
7622
7623typedef struct {
7624 A_UINT32 tlv_header;
7625 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */
7626 /** unique id identifying the VDEV, generated by the caller */
7627 A_UINT32 vdev_id;
7628 /** peer MAC address */
7629 wmi_mac_addr peer_macaddr;
7630 /** parameter id */
7631 A_UINT32 param_id;
7632 /** parametr value */
7633 A_UINT32 param_value;
7634} wmi_peer_set_param_cmd_fixed_param;
7635
Govind Singh67b83b82016-02-01 19:26:59 +05307636typedef union {
7637 /*
7638 * The A_UINT16 "mode" and "tx_rate" fields can only be directly used
7639 * by the target or a little-endian host.
7640 * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET
7641 * macros on the A_UINT32 "value" field.
7642 */
7643 struct {
7644 /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */
7645 A_UINT16 mode;
7646 A_UINT16 tx_rate; /* see per-mode specs below */
7647 };
7648 A_UINT32 value; /* for use by big-endian host */
7649} wmi_peer_max_min_tx_rate;
7650
7651/*
7652 * Any access to the mode/tx_rate in an big endian system should use
7653 * the below Macros on the wmi_peer_max_min_tx_rate.value field.
7654 */
7655#define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16)
7656#define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode)
7657
7658#define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16)
7659#define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode)
7660
7661/*
7662 * CCK max/min tx Rate description
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +05307663 * tx_rate = 0: 1 Mbps
7664 * tx_rate = 1: 2 Mbps
7665 * tx_rate = 2: 5.5 Mbps
7666 * tx_rate = 3: 11 Mbps
7667 * tx_rate = else: invalid
Govind Singh67b83b82016-02-01 19:26:59 +05307668 */
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +05307669enum {
7670 WMI_MAX_CCK_TX_RATE_1M, /* up to 1M CCK Rate avaliable */
7671 WMI_MAX_CCK_TX_RATE_2M, /* up to 2M CCK Rate avaliable */
7672 WMI_MAX_CCK_TX_RATE_5_5M, /* up to 5.5M CCK Rate avaliable */
7673 WMI_MAX_CCK_TX_RATE_11M, /* up to 11M CCK Rate avaliable */
7674 WMI_MAX_CCK_TX_RATE = WMI_MAX_CCK_TX_RATE_11M,
7675};
Govind Singh67b83b82016-02-01 19:26:59 +05307676
7677/*
7678 * OFDM max/min tx Rate description
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +05307679 * tx_rate = 0: 6 Mbps
7680 * tx_rate = 1: 9 Mbps
7681 * tx_rate = 2: 12 Mbps
7682 * tx_rate = 3: 18 Mbps
7683 * tx_rate = 4: 24 Mbps
7684 * tx_rate = 5: 32 Mbps
7685 * tx_rate = 6: 48 Mbps
7686 * tx_rate = 7: 54 Mbps
7687 * tx_rate = else: invalid
Govind Singh67b83b82016-02-01 19:26:59 +05307688 */
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +05307689enum {
7690 WMI_MAX_OFDM_TX_RATE_6M, /* up to 6M OFDM Rate avaliable */
7691 WMI_MAX_OFDM_TX_RATE_9M, /* up to 9M OFDM Rate avaliable */
7692 WMI_MAX_OFDM_TX_RATE_12M, /* up to 12M OFDM Rate avaliable */
7693 WMI_MAX_OFDM_TX_RATE_18M, /* up to 18M OFDM Rate avaliable */
7694 WMI_MAX_OFDM_TX_RATE_24M, /* up to 24M OFDM Rate avaliable */
7695 WMI_MAX_OFDM_TX_RATE_36M, /* up to 36M OFDM Rate avaliable */
7696 WMI_MAX_OFDM_TX_RATE_48M, /* up to 48M OFDM Rate avaliable */
7697 WMI_MAX_OFDM_TX_RATE_54M, /* up to 54M OFDM Rate avaliable */
7698 WMI_MAX_OFDM_TX_RATE = WMI_MAX_OFDM_TX_RATE_54M,
7699};
Govind Singh67b83b82016-02-01 19:26:59 +05307700
7701/*
7702 * HT max/min tx rate description
7703 * tx_rate = 0~7 : MCS Rate 0~7
7704 * tx_rate=else : invalid.
7705 */
7706#define WMI_MAX_HT_TX_MCS 0x07
7707
7708/*
7709 * VHT max/min tx rate description
7710 * tx_rate = 0~9 : MCS Rate 0~9
7711 * tx_rate=else : invalid.
7712 */
7713#define WMI_MAX_VHT_TX_MCS 0x09
7714
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007715#define MAX_SUPPORTED_RATES 128
7716
7717typedef struct {
7718 /** total number of rates */
7719 A_UINT32 num_rates;
7720 /**
7721 * rates (each 8bit value) packed into a 32 bit word.
7722 * the rates are filled from least significant byte to most
7723 * significant byte.
7724 */
7725 A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
7726} wmi_rate_set;
7727
7728/* NOTE: It would bea good idea to represent the Tx MCS
7729 * info in one word and Rx in another word. This is split
7730 * into multiple words for convenience
7731 */
7732typedef struct {
7733 A_UINT32 tlv_header;
7734 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
7735 A_UINT32 rx_max_rate; /* Max Rx data rate */
7736 A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
7737 A_UINT32 tx_max_rate; /* Max Tx data rate */
7738 A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
Govind Singh32cced32016-02-01 13:33:09 +05307739 A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007740} wmi_vht_rate_set;
7741
7742/*
7743 * IMPORTANT: Make sure the bit definitions here are consistent
7744 * with the ni_flags definitions in wlan_peer.h
7745 */
7746#define WMI_PEER_AUTH 0x00000001 /* Authorized for data */
7747#define WMI_PEER_QOS 0x00000002 /* QoS enabled */
7748#define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */
7749#define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */
Himanshu Agarwal97005de2016-09-09 12:46:04 +05307750#define WMI_PEER_HE 0x00000400 /* HE Enabled */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007751#define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */
7752#define WMI_PEER_HT 0x00001000 /* HT enabled */
7753#define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */
7754#define WMI_PEER_STBC 0x00008000 /* STBC Enabled */
7755#define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */
7756#define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */
7757#define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */
7758#define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */
7759#define WMI_PEER_VHT 0x02000000 /* VHT Enabled */
7760#define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */
7761#define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */
7762/** CAUTION TODO: Place holder for WLAN_PEER_F_PS_PRESEND_REQUIRED = 0x10000000. Need to be clean up */
7763#define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */
7764#define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */
7765#define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */
7766
7767/**
7768 * Peer rate capabilities.
7769 *
7770 * This is of interest to the ratecontrol
7771 * module which resides in the firmware. The bit definitions are
7772 * consistent with that defined in if_athrate.c.
7773 *
7774 * @todo
7775 * Move this to a common header file later so there is no need to
7776 * duplicate the definitions or maintain consistency.
7777 */
7778#define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */
7779#define WMI_RC_CW40_FLAG 0x02 /* CW 40 */
7780#define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */
7781#define WMI_RC_HT_FLAG 0x08 /* HT */
7782#define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
7783#define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */
7784#define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */
7785#define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
7786#define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
7787#define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
7788#define WMI_RC_TS_FLAG 0x200 /* Three stream flag */
7789#define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
7790
7791typedef struct {
7792 A_UINT32 tlv_header;
7793 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
7794 /** peer MAC address */
7795 wmi_mac_addr peer_macaddr;
7796 /** VDEV id */
7797 A_UINT32 vdev_id;
7798 /** assoc = 1 reassoc = 0 */
7799 A_UINT32 peer_new_assoc;
7800 /** peer associd (16 bits) */
7801 A_UINT32 peer_associd;
7802 /** peer station flags: see definition above */
7803 A_UINT32 peer_flags;
7804 /** negotiated capabilities (lower 16 bits)*/
7805 A_UINT32 peer_caps;
7806 /** Listen interval */
7807 A_UINT32 peer_listen_intval;
7808 /** HT capabilties of the peer */
7809 A_UINT32 peer_ht_caps;
7810 /** maximum rx A-MPDU length */
7811 A_UINT32 peer_max_mpdu;
7812 /** mpdu density of the peer in usec(0 to 16) */
7813 A_UINT32 peer_mpdu_density;
7814 /** peer rate capabilties see flags above */
7815 A_UINT32 peer_rate_caps;
7816 /** num spatial streams */
7817 A_UINT32 peer_nss;
7818 /** VHT capabilties of the peer */
7819 A_UINT32 peer_vht_caps;
7820 /** phy mode */
7821 A_UINT32 peer_phymode;
7822 /** HT Operation Element of the peer. Five bytes packed in 2
7823 * INT32 array and filled from lsb to msb.
7824 * Note that the size of array peer_ht_info[] cannotbe changed
7825 * without breaking WMI Compatibility. */
7826 A_UINT32 peer_ht_info[2];
7827 /** total number of negotiated legacy rate set. Also the sizeof
7828 * peer_legacy_rates[] */
7829 A_UINT32 num_peer_legacy_rates;
7830 /** total number of negotiated ht rate set. Also the sizeof
7831 * peer_ht_rates[] */
7832 A_UINT32 num_peer_ht_rates;
Anurag Chouhan08f66c62016-04-18 17:14:51 +05307833 /*
7834 * Bitmap providing customized mapping of bandwidths to max Rx NSS
Govind Singh32cced32016-02-01 13:33:09 +05307835 * for this peer.
7836 * This is required since 802.11 standard currently facilitates peer to
7837 * be able to advertise only a single max Rx NSS value across all
7838 * bandwidths.
7839 * Some QCA chipsets might need to be able to advertise a different max
7840 * Rx NSS value for 160 MHz, than that for 80 MHz and lower.
7841 *
7842 * bit[2:0] : Represents value of Rx NSS for VHT 160 MHz
7843 * bit[30:3]: Reserved
7844 * bit[31] : MSB(0/1): 1 in case of valid data else all bits will be
7845 * set to 0 by host
7846 */
7847 A_UINT32 peer_bw_rxnss_override;
Govind Singhd24f5e42016-02-22 15:16:46 +05307848 /* 802.11ax capabilities */
7849 wmi_ppe_threshold peer_ppet;
7850 /* protocol-defined HE / 11ax capability flags */
7851 A_UINT32 peer_he_cap_info;
7852 A_UINT32 peer_he_ops; /* HE operation contains BSS color */
Himanshu Agarwal97005de2016-09-09 12:46:04 +05307853 A_UINT32 peer_he_cap_phy[WMI_MAX_HECAP_PHY_SIZE];
7854 A_UINT32 peer_he_mcs; /* HE MCS/NSS set */
7855 /* Following this struct are the TLV's:
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007856 * A_UINT8 peer_legacy_rates[];
7857 * A_UINT8 peer_ht_rates[];
7858 * wmi_vht_rate_set peer_vht_rates; //VHT capabilties of the peer
7859 */
7860} wmi_peer_assoc_complete_cmd_fixed_param;
7861
Govind Singh32cced32016-02-01 13:33:09 +05307862/* WDS Entry Flags */
7863#define WMI_WDS_FLAG_STATIC 0x1 /* Disable aging & learning */
7864
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007865typedef struct {
7866 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
7867 /** peer MAC address */
7868 wmi_mac_addr peer_macaddr;
7869 /** wds MAC addr */
7870 wmi_mac_addr wds_macaddr;
Govind Singh32cced32016-02-01 13:33:09 +05307871 /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */
7872 A_UINT32 flags;
Govind Singh869c9872016-02-22 18:36:34 +05307873 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007874} wmi_peer_add_wds_entry_cmd_fixed_param;
7875
Himanshu Agarwala24c0fe2016-09-13 22:39:20 +05307876#define WMI_CHAN_INFO_START_RESP 0
7877#define WMI_CHAN_INFO_END_RESP 1
7878
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007879typedef struct {
7880 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
7881 /** wds MAC addr */
7882 wmi_mac_addr wds_macaddr;
Govind Singh869c9872016-02-22 18:36:34 +05307883 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007884} wmi_peer_remove_wds_entry_cmd_fixed_param;
7885
7886typedef struct {
7887 /** peer MAC address */
7888 wmi_mac_addr peer_macaddr;
7889} wmi_peer_q_empty_callback_event;
7890
Govind Singhc7d51942016-02-01 12:09:31 +05307891/*
7892 * Command to update an already existing WDS entry. Different address setting
7893 * combinations are possible.
7894 *
7895 * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated.
7896 * Valid wds and null peer -> Associated WDS entry flags will be updated.
7897 * Null wds and Valid peer-> Flags will be updated for all WDS entries
7898 * behind the peer.
7899 * Null wds and peer -> Flags will be updated for all WDS entries.
7900 */
7901typedef struct {
7902 /*
7903 * TLV tag and len; tag equals
7904 * WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param
7905 */
7906 A_UINT32 tlv_header;
7907 /** peer MAC address */
7908 wmi_mac_addr peer_macaddr;
7909 /** wds MAC addr */
7910 wmi_mac_addr wds_macaddr;
7911 /* Flags associated with WDS entry */
7912 A_UINT32 flags;
Govind Singh869c9872016-02-22 18:36:34 +05307913 A_UINT32 vdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +05307914} wmi_peer_update_wds_entry_cmd_fixed_param;
7915
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007916/**
7917 * Channel info WMI event
7918 */
7919typedef struct {
7920 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
7921 /** Error code */
7922 A_UINT32 err_code;
7923 /** Channel freq */
7924 A_UINT32 freq;
7925 /** Read flags */
7926 A_UINT32 cmd_flags;
7927 /** Noise Floor value */
7928 A_UINT32 noise_floor;
7929 /** rx clear count */
7930 A_UINT32 rx_clear_count;
7931 /** cycle count */
7932 A_UINT32 cycle_count;
Govind Singh32cced32016-02-01 13:33:09 +05307933 /** channel tx power per range in 0.5dBm steps */
7934 A_UINT32 chan_tx_pwr_range;
7935 /** channel tx power per throughput */
7936 A_UINT32 chan_tx_pwr_tp;
7937 /** rx frame count (cumulative) */
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +05307938 A_UINT32 rx_frame_count;
7939 /** BSS rx cycle count */
7940 A_UINT32 my_bss_rx_cycle_count;
7941 /** b-mode data rx time (units are microseconds) */
7942 A_UINT32 rx_11b_mode_data_duration;
Himanshu Agarwala24c0fe2016-09-13 22:39:20 +05307943 /** tx frame count */
7944 A_UINT32 tx_frame_cnt;
7945 /** mac clock */
7946 A_UINT32 mac_clk_mhz;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007947} wmi_chan_info_event_fixed_param;
7948
7949/**
7950 * Non wlan interference event
7951 */
7952typedef struct {
7953 A_UINT32 tlv_header;
7954 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_ath_dcs_cw_int */
7955 A_UINT32 channel; /* either number or freq in mhz */
Govind Singh869c9872016-02-22 18:36:34 +05307956} wlan_dcs_cw_int;
7957#define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007958
7959/**
7960 * wlan_dcs_im_tgt_stats
7961 *
7962 */
7963typedef struct _wlan_dcs_im_tgt_stats {
Govind Singh869c9872016-02-22 18:36:34 +05307964 /** TLV tag and len; tag equals
7965 * WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t
7966 */
7967 A_UINT32 tlv_header;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007968 /** current running TSF from the TSF-1 */
7969 A_UINT32 reg_tsf32;
7970
7971 /** Known last frame rssi, in case of multiple stations, if
7972 * and at different ranges, this would not gaurantee that
7973 * this is the least rssi.
7974 */
7975 A_UINT32 last_ack_rssi;
7976
7977 /** Sum of all the failed durations in the last one second interval.
7978 */
7979 A_UINT32 tx_waste_time;
7980 /** count how many times the hal_rxerr_phy is marked, in this
7981 * time period
7982 */
7983 A_UINT32 rx_time;
7984 A_UINT32 phyerr_cnt;
7985
7986 /**
7987 * WLAN IM stats from target to host
7988 *
7989 * Below statistics are sent from target to host periodically.
7990 * These are collected at target as long as target is running
7991 * and target chip is not in sleep.
7992 *
7993 */
7994
7995 /** listen time from ANI */
7996 A_INT32 listen_time;
7997
7998 /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
7999 A_UINT32 reg_tx_frame_cnt;
8000
8001 /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
8002 A_UINT32 reg_rx_frame_cnt;
8003
8004 /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
8005 A_UINT32 reg_rxclr_cnt;
8006
8007 /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
8008 A_UINT32 reg_cycle_cnt; /* delta cycle count */
8009
8010 /** extenstion channel rx clear count */
8011 A_UINT32 reg_rxclr_ext_cnt;
8012
8013 /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
8014 A_UINT32 reg_ofdm_phyerr_cnt;
8015
8016 /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
8017 A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +05308018 /** Channel noise floor (units are dBm) */
8019 A_INT32 chan_nf;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008020
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +05308021 /** BSS rx cycle count */
8022 A_UINT32 my_bss_rx_cycle_count;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008023} wlan_dcs_im_tgt_stats_t;
8024
8025/**
8026 * wmi_dcs_interference_event_t
8027 *
8028 * Right now this is event and stats together. Partly this is
8029 * because cw interference is handled in target now. This
8030 * can be done at host itself, if we can carry the NF alone
8031 * as a stats event. In future this would be done and this
8032 * event would carry only stats.
8033 */
8034typedef struct {
8035 A_UINT32 tlv_header;
8036 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
8037 /**
8038 * Type of the event present, either the cw interference event, or the wlan_im stats
8039 */
8040 A_UINT32 interference_type; /* type of interference, wlan or cw */
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05308041 /** pdev_id for identifying the MAC
8042 * See macros starting with WMI_PDEV_ID_ for values.
8043 */
8044 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008045 /*
8046 * Following this struct are these TLVs. Note that they are both array of structures
8047 * but can have at most one element. Which TLV is empty or has one element depends
8048 * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
Govind Singh869c9872016-02-22 18:36:34 +05308049 * elements (not arrays). union { wlan_dcs_cw_int cw_int;
8050 * wlan_dcs_im_tgt_stats_t wlan_stat; }
8051 * int_event;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008052 *
8053 * //cw_interference event
Govind Singh869c9872016-02-22 18:36:34 +05308054 * wlan_dcs_cw_int cw_int[]; this element
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008055 * // wlan im interfernce stats
8056 * wlan_dcs_im_tgt_stats_t wlan_stat[];
8057 */
8058} wmi_dcs_interference_event_fixed_param;
8059
8060enum wmi_peer_mcast_group_action {
8061 wmi_peer_mcast_group_action_add = 0,
8062 wmi_peer_mcast_group_action_del = 1
8063};
8064#define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1
8065#define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0
8066#define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
8067#define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
Govind Singh32cced32016-02-01 13:33:09 +05308068/* flag to exclude an ip while filtering.set to exclude */
8069#define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4
8070#define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2
8071/* flag to say ipv4/ipv6. Will be set for ipv6 */
8072#define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8
8073#define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3
8074/* delete all mcast table entries. */
8075#define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10
8076#define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4
8077
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008078/* multicast group membership commands */
8079/* TODO: Converting this will be tricky since it uses an union.
8080 Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
8081typedef struct {
8082 A_UINT32 tlv_header;
8083 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
8084 A_UINT32 flags;
8085 wmi_mac_addr ucast_mac_addr;
Govind Singh32cced32016-02-01 13:33:09 +05308086 /*
8087 * for ipv4, bytes (12-15) should contain ip address and
8088 * other lower bytes 0. ipv6 should have all bytes valid
8089 */
8090 A_UINT8 mcast_ip_addr[16]; /* in network byte order */
8091 /*
8092 * for ipv6, all 16 bytes has to be valid;
8093 * for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s
8094 */
8095 A_UINT8 mcast_ip_mask[16]; /* zero out lower bytes if ipv4 */
8096 /* number of address filters - irrespective of ipv4/ipv6 addresses */
8097 A_UINT32 num_filter_addr;
8098 /*
8099 * this array should contain the src IPs that are to be filtered
8100 * during find. The array should be packed. If there are 2 ipv4
8101 * addresses, there should be 8 bytes and rest all 0s
8102 */
8103 A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */
8104 A_UINT8 vdev_id; /* vdev of this mcast group */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008105} wmi_peer_mcast_group_cmd_fixed_param;
8106
8107/** Offload Scan and Roaming related commands */
8108/** The FW performs 2 different kinds of offload scans independent
8109 * of host. One is Roam scan which is primarily performed on a
8110 * station VDEV after association to look for a better AP that
8111 * the station VDEV can roam to. The second scan is connect scan
8112 * which is mainly performed when the station is not associated
8113 * and to look for a matching AP profile from a list of
8114 * configured profiles. */
8115
8116/**
8117 * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
8118 * the roam scan mode is one of the periodic, rssi change, both, none.
8119 * None : Disable Roam scan. No Roam scan at all.
8120 * Periodic : Scan periodically with a configurable period.
8121 * Rssi change : Scan when ever rssi to current AP changes by the threshold value
8122 * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
8123 * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount)
8124 *
8125 */
8126typedef struct {
8127 A_UINT32 tlv_header;
8128 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
8129 A_UINT32 roam_scan_mode;
8130 A_UINT32 vdev_id;
8131} wmi_roam_scan_mode_fixed_param;
8132
8133#define WMI_ROAM_SCAN_MODE_NONE 0x0
8134#define WMI_ROAM_SCAN_MODE_PERIODIC 0x1
8135#define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
8136#define WMI_ROAM_SCAN_MODE_BOTH 0x3
8137/* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
8138#define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
8139
8140typedef struct {
8141 A_UINT32 tlv_header;
8142 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
8143 A_UINT32 vdev_id;
8144 A_UINT32 command_arg;
8145} wmi_roam_scan_cmd_fixed_param;
8146
8147#define WMI_ROAM_SCAN_STOP_CMD 0x1
8148
8149/**
8150 * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan rssi thresold
8151 * scan rssi threshold is the rssi threshold below which the FW will start running Roam scans.
8152 * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
8153 */
8154typedef struct {
8155 A_UINT32 tlv_header;
8156 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
8157 /** unique id identifying the VDEV, generated by the caller */
8158 A_UINT32 vdev_id;
8159 /** roam scan rssi threshold */
8160 A_UINT32 roam_scan_rssi_thresh;
8161 /** When using Hw generated beacon RSSI interrupts */
8162 A_UINT32 roam_rssi_thresh_diff;
8163 /** 5G scan max count */
8164 A_UINT32 hirssi_scan_max_count;
8165 /** 5G scan rssi change threshold value */
8166 A_UINT32 hirssi_scan_delta;
8167 /** 5G scan upper bound */
8168 A_UINT32 hirssi_upper_bound;
8169 /* The TLVs will follow.
8170 * wmi_roam_scan_extended_threshold_param extended_param;
8171 * wmi_roam_earlystop_rssi_thres_param earlystop_param;
Govind Singhce8fd912016-01-21 10:24:19 +05308172 * wmi_roam_dense_thres_param dense_param;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008173 */
8174} wmi_roam_scan_rssi_threshold_fixed_param;
8175
8176#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0
8177#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
8178#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2
8179#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3
8180
8181typedef struct {
8182 /** TLV tag and len; tag equals
8183 *WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
8184 A_UINT32 tlv_header;
8185 A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
8186 A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
8187 A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
8188 A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
8189 A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
8190 A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
8191 A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
8192 A_UINT32 max_penalty_5g; /** maximum penality that can be applied to a 5GHz RSSI */
8193 /**
8194 * RSSI below which roam is kicked in by background scan
8195 * although rssi is still good
8196 */
8197 A_UINT32 good_rssi_threshold;
8198} wmi_roam_scan_extended_threshold_param;
8199
8200
8201/**
8202 * WMI_ROAM_SCAN_PERIOD: period for roam scan.
8203 * Applicable when the scan mode is Periodic or both.
8204 */
8205typedef struct {
8206 A_UINT32 tlv_header;
8207 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
8208 /** unique id identifying the VDEV, generated by the caller */
8209 A_UINT32 vdev_id;
8210 /** roam scan period value */
8211 A_UINT32 roam_scan_period;
8212 /** Aging for Roam scans */
8213 A_UINT32 roam_scan_age;
8214} wmi_roam_scan_period_fixed_param;
8215
8216/**
8217 * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : rssi delta to trigger the roam scan.
8218 * Rssi change threshold used when mode is Rssi change (or) Both.
8219 * The FW will run the roam scan when ever the rssi changes (up or down) by the value set by this parameter.
8220 * Note scan is triggered based on the rssi threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
8221 */
8222typedef struct {
8223 A_UINT32 tlv_header;
8224 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
8225 /** unique id identifying the VDEV, generated by the caller */
8226 A_UINT32 vdev_id;
8227 /** roam scan rssi change threshold value */
8228 A_UINT32 roam_scan_rssi_change_thresh;
8229 /** When using Hw generated beacon RSSI interrupts */
8230 A_UINT32 bcn_rssi_weight;
8231 /** Minimum delay between two 5G scans */
8232 A_UINT32 hirssi_delay_btw_scans;
8233} wmi_roam_scan_rssi_change_threshold_fixed_param;
8234
8235#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
8236#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
8237#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
8238/**
8239 * TLV for roaming channel list
8240 */
8241typedef struct {
8242 A_UINT32 tlv_header;
8243 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
8244 /** unique id identifying the VDEV, generated by the caller */
8245 A_UINT32 vdev_id;
8246 /** WMI_CHAN_LIST_TAG */
8247 A_UINT32 chan_list_type;
8248 /** # if channels to scan */
8249 A_UINT32 num_chan;
8250/**
8251 * TLV (tag length value ) parameters follow the wmi_roam_chan_list
8252 * structure. The TLV's are:
8253 * A_UINT32 channel_list[];
8254 **/
8255} wmi_roam_chan_list_fixed_param;
8256
8257/** Authentication modes */
8258enum {
8259 WMI_AUTH_NONE, /* no upper level auth */
8260 WMI_AUTH_OPEN, /* open */
8261 WMI_AUTH_SHARED, /* shared-key */
8262 WMI_AUTH_8021X, /* 802.1x */
8263 WMI_AUTH_AUTO, /* Auto */
8264 WMI_AUTH_WPA, /* WPA */
8265 WMI_AUTH_RSNA, /* WPA2/RSNA */
Himanshu Agarwal82972fd2016-05-20 12:23:43 +05308266 WMI_AUTH_CCKM, /* CCKM */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008267 WMI_AUTH_WAPI, /* WAPI */
8268 WMI_AUTH_AUTO_PSK,
8269 WMI_AUTH_WPA_PSK,
8270 WMI_AUTH_RSNA_PSK,
8271 WMI_AUTH_WAPI_PSK,
8272 WMI_AUTH_FT_RSNA, /* 11r FT */
8273 WMI_AUTH_FT_RSNA_PSK,
8274 WMI_AUTH_RSNA_PSK_SHA256,
8275 WMI_AUTH_RSNA_8021X_SHA256,
Himanshu Agarwal82972fd2016-05-20 12:23:43 +05308276 WMI_AUTH_CCKM_WPA,
8277 WMI_AUTH_CCKM_RSNA,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008278};
8279
8280typedef struct {
8281 /** authentication mode (defined above) */
8282 A_UINT32 rsn_authmode;
8283 /** unicast cipher set */
8284 A_UINT32 rsn_ucastcipherset;
8285 /** mcast/group cipher set */
8286 A_UINT32 rsn_mcastcipherset;
8287 /** mcast/group management frames cipher set */
8288 A_UINT32 rsn_mcastmgmtcipherset;
8289} wmi_rsn_params;
8290
8291/** looking for a wps enabled AP */
8292#define WMI_AP_PROFILE_FLAG_WPS 0x1
8293/** looking for a secure AP */
8294#define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
8295/** looking for a PMF enabled AP */
8296#define WMI_AP_PROFILE_FLAG_PMF 0x4
8297
8298/** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
8299 * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
8300 * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
8301 * and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
8302 */
8303
8304typedef struct {
8305 A_UINT32 tlv_header;
8306 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
8307 /** flags as defined above */
8308 A_UINT32 flags;
8309 /**
8310 * rssi thresold value: the value of the the candidate AP should
8311 * higher by this threshold than the rssi of the currrently associated AP.
8312 */
8313 A_UINT32 rssi_threshold;
8314 /**
8315 * ssid vlaue to be matched.
8316 */
8317 wmi_ssid ssid;
8318
8319 /**
8320 * security params to be matched.
8321 */
8322 /** authentication mode (defined above) */
8323 A_UINT32 rsn_authmode;
8324 /** unicast cipher set */
8325 A_UINT32 rsn_ucastcipherset;
8326 /** mcast/group cipher set */
8327 A_UINT32 rsn_mcastcipherset;
8328 /** mcast/group management frames cipher set */
8329 A_UINT32 rsn_mcastmgmtcipherset;
8330} wmi_ap_profile;
8331
8332/** Support early stop roaming scanning when finding a strong candidate AP
8333 * A 'strong' candidate is
8334 * 1) Is eligible candidate
8335 * (all conditions are met in existing candidate selection).
8336 * 2) Its rssi is better than earlystop threshold.
8337 * Earlystop threshold will be relaxed as each channel is scanned.
8338 */
8339typedef struct {
8340 A_UINT32 tlv_header;
8341 /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
8342 A_UINT32 roam_earlystop_thres_min;
8343 /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
8344 A_UINT32 roam_earlystop_thres_max;
8345} wmi_roam_earlystop_rssi_thres_param;
8346
Govind Singhce8fd912016-01-21 10:24:19 +05308347typedef struct {
8348 /* TLV tag and len;
8349 * tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param
8350 */
8351 A_UINT32 tlv_header;
8352 /* rssi threshold offset under trffic and dense env */
8353 A_UINT32 roam_dense_rssi_thres_offset;
8354 /* minimum number of APs to determine dense env */
8355 A_UINT32 roam_dense_min_aps;
8356 /* initial dense status detected by host
8357 * at the time of initial connection */
8358 A_UINT32 roam_dense_status;
8359 /* traffic threshold to enable aggressive roaming in dense env;
8360 * units are percent of medium occupancy, 0 - 100
8361 */
8362 A_UINT32 roam_dense_traffic_thres;
8363} wmi_roam_dense_thres_param;
8364
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008365/** Beacon filter wmi command info */
8366
8367#define BCN_FLT_MAX_SUPPORTED_IES 256
8368#define BCN_FLT_MAX_ELEMS_IE_LIST BCN_FLT_MAX_SUPPORTED_IES/32
8369
8370typedef struct bss_bcn_stats {
8371 A_UINT32 vdev_id;
8372 A_UINT32 bss_bcnsdropped;
8373 A_UINT32 bss_bcnsdelivered;
8374} wmi_bss_bcn_stats_t;
8375
8376typedef struct bcn_filter_stats {
8377 A_UINT32 bcns_dropped;
8378 A_UINT32 bcns_delivered;
8379 A_UINT32 activefilters;
8380 wmi_bss_bcn_stats_t bss_stats;
8381} wmi_bcnfilter_stats_t;
8382
8383typedef struct wmi_add_bcn_filter_cmd {
8384 A_UINT32 tlv_header;
8385 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
8386 A_UINT32 vdev_id;
8387 /*
8388 * Following this structure is the TLV:
8389 * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
8390 */
8391} wmi_add_bcn_filter_cmd_fixed_param;
8392
8393typedef struct wmi_rmv_bcn_filter_cmd {
8394 A_UINT32 tlv_header;
8395 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
8396 A_UINT32 vdev_id;
8397} wmi_rmv_bcn_filter_cmd_fixed_param;
8398
8399#define WMI_BCN_SEND_DTIM_ZERO 1
8400#define WMI_BCN_SEND_DTIM_BITCTL_SET 2
8401typedef struct wmi_bcn_send_from_host {
8402 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */
8403 A_UINT32 vdev_id;
8404 A_UINT32 data_len;
Krishna Kumaar Natarajan7dde8c72016-03-25 15:11:49 -07008405 union {
8406 A_UINT32 frag_ptr; /* Physical address of the frame */
8407 A_UINT32 frag_ptr_lo; /* LSB of physical address of the frame */
8408 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008409 A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
8410 A_UINT32 dtim_flag; /* to control CABQ traffic */
Govind Singh32cced32016-02-01 13:33:09 +05308411 A_UINT32 bcn_antenna; /* Antenna for beacon transmission */
Krishna Kumaar Natarajan7dde8c72016-03-25 15:11:49 -07008412 A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008413} wmi_bcn_send_from_host_cmd_fixed_param;
8414
8415/* cmd to support bcn snd for all vaps at once */
8416typedef struct wmi_pdev_send_bcn {
8417 A_UINT32 num_vdevs;
8418 wmi_bcn_send_from_host_cmd_fixed_param bcn_cmd[1];
8419} wmi_pdev_send_bcn_cmd_t;
8420
8421/*
8422 * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming.
8423 */
8424typedef struct {
8425 A_UINT32 tlv_header;
8426 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
8427 /** id of AP criteria */
8428 A_UINT32 id;
8429
8430 /** unique id identifying the VDEV, generated by the caller */
8431 A_UINT32 vdev_id;
8432
8433 /*
8434 * Following this structure is the TLV:
8435 * wmi_ap_profile ap_profile; //AP profile info
8436 */
8437} wmi_roam_ap_profile_fixed_param;
8438
8439/**
8440 * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
8441 */
8442typedef struct {
8443 /** id of AP criteria */
8444 A_UINT32 id;
8445
8446 /** unique id identifying the VDEV, generated by the caller */
8447 A_UINT32 vdev_id;
8448
8449 /** AP profile info */
8450 wmi_ap_profile ap_profile;
8451
8452} wmi_ofl_scan_add_ap_profile;
8453
8454/**
8455 * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
8456 */
8457typedef struct {
8458 /** id of AP criteria */
8459 A_UINT32 id;
8460 /** unique id identifying the VDEV, generated by the caller */
8461 A_UINT32 vdev_id;
8462} wmi_ofl_scan_remove_ap_profile;
8463
8464/**
8465 * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
8466 * 0 will disable ofload scan and a very low value will perform a continous
8467 * scan.
8468 */
8469typedef struct {
8470 /** offload scan period value, used for scans used when not connected */
8471 A_UINT32 ofl_scan_period;
8472} wmi_ofl_scan_period;
8473
8474/* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
8475#define ROAM_OFFLOAD_PMK_BYTES (32)
8476#define ROAM_OFFLOAD_PSK_MSK_BYTES (32)
8477#define ROAM_OFFLOAD_KRK_BYTES (16)
8478#define ROAM_OFFLOAD_BTK_BYTES (32)
8479#define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
8480#define ROAM_OFFLOAD_NUM_MCS_SET (16)
8481
8482/* This TLV will be filled only in case roam offload
8483 * for wpa2-psk/okc/ese/11r is enabled */
8484typedef struct {
8485 A_UINT32 tlv_header;
8486 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
8487 A_UINT32 rssi_cat_gap; /* gap for every category bucket */
8488 A_UINT32 prefer_5g; /* prefer select 5G candidate */
8489 A_UINT32 select_5g_margin;
8490 A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */
8491 A_UINT32 capability;
8492 A_UINT32 ht_caps_info;
8493 A_UINT32 ampdu_param;
8494 A_UINT32 ht_ext_cap;
8495 A_UINT32 ht_txbf;
8496 A_UINT32 asel_cap;
8497 A_UINT32 qos_enabled;
8498 A_UINT32 qos_caps;
8499 A_UINT32 wmm_caps;
8500 A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET >> 2]; /* since this 4 byte aligned,
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308501 * we don't declare it as
8502 * tlv array */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008503} wmi_roam_offload_tlv_param;
8504
8505/* flags for 11i offload */
8506#define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */
8507/* from bit 1 to bit 31 are reserved */
8508
8509#define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
8510 (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308511} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008512
8513#define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
8514 (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308515} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008516
8517#define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \
8518 ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
8519
8520/* This TLV will be filled only in case of wpa-psk/wpa2-psk */
8521typedef struct {
8522 A_UINT32 tlv_header;
8523 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
8524 A_UINT32 flags;
8525 /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
8526 A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES >> 2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
8527 A_UINT32 pmk_len;
8528 /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
8529} wmi_roam_11i_offload_tlv_param;
8530
8531/* This TLV will be filled only in case of 11R*/
8532typedef struct {
8533 A_UINT32 tlv_header;
8534 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
8535 A_UINT32 mdie_present;
8536 A_UINT32 mdid;
8537 A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN >> 2];
8538 A_UINT32 r0kh_id_len;
8539 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 */
8540 A_UINT32 psk_msk_len;
8541 /**length of psk_msk*/
8542} wmi_roam_11r_offload_tlv_param;
8543
8544/* This TLV will be filled only in case of ESE */
8545typedef struct {
8546 A_UINT32 tlv_header;
8547 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
8548 A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES >> 2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
8549 A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES >> 2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
8550} wmi_roam_ese_offload_tlv_param;
8551
8552/** WMI_ROAM_EVENT: roam event triggering the host roam logic.
8553 * generated when ever a better AP is found in the recent roam scan (or)
8554 * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
8555 * from the current AP.
8556 */
8557typedef struct {
8558 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */
8559 /** unique id identifying the VDEV, generated by the caller */
8560 A_UINT32 vdev_id;
8561 /** reason for roam event */
8562 A_UINT32 reason;
8563 /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI*/
8564 A_UINT32 rssi;
Krishna Kumaar Natarajan79a2a082016-03-25 15:07:07 -07008565 /** roam notification */
8566 A_UINT32 notif;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008567
8568} wmi_roam_event_fixed_param;
8569
Nirav Shah439e6262015-11-05 10:53:18 +05308570/* roam_reason: bits 0-3 */
Krishna Kumaar Natarajan79a2a082016-03-25 15:07:07 -07008571
8572/** invalid reason. Do not interpret reason field */
8573#define WMI_ROAM_REASON_INVALID 0x0
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008574#define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
8575#define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */
8576#define WMI_ROAM_REASON_DEAUTH 0x2 /** deauth/disassoc received */
8577#define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */
8578#define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308579 SSID and Security profile in
8580 WMI_ROAM_AP_PROFILE, found during scan
8581 triggered upon FINAL_BMISS **/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008582#define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */
Govind Singhd0c80a32016-02-01 17:57:48 +05308583
8584/*
8585 * WMI_ROAM_REASON_INVOKE_ROAM_FAIL:
8586 * Result code of WMI_ROAM_INVOKE_CMDID.
8587 * Any roaming failure before reassociation will be indicated to host
8588 * with this reason.
8589 * Any roaming failure after reassociation will be indicated to host with
8590 * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not.
8591 */
8592#define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6
Nirav Shah439e6262015-11-05 10:53:18 +05308593/* reserved up through 0xF */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008594
Nirav Shah439e6262015-11-05 10:53:18 +05308595/* subnet status: bits 4-5 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008596typedef enum {
8597 WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
8598 WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
8599 WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
8600} wmi_roam_subnet_change_status;
8601
Nirav Shah439e6262015-11-05 10:53:18 +05308602#define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30
8603#define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4
8604
8605#define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
8606 do { \
8607 (roam_reason) |= \
8608 (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
8609 WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
8610 } while (0)
8611
8612#define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
8613 (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
8614 WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
8615
Krishna Kumaar Natarajan79a2a082016-03-25 15:07:07 -07008616/* roaming notification */
8617/** invalid notification. Do not interpret notif field */
8618#define WMI_ROAM_NOTIF_INVALID 0x0
8619/** indicate that roaming is started. sent only in non WOW state */
8620#define WMI_ROAM_NOTIF_ROAM_START 0x1
8621/** indicate that roaming is aborted. sent only in non WOW state */
8622#define WMI_ROAM_NOTIF_ROAM_ABORT 0x2
8623
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008624/**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
8625 * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations
8626 */
8627typedef struct {
8628 A_UINT32 tlv_header;
8629 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
8630 A_UINT32 vdev_id;
8631 /**unique id identifying the VDEV, generated by the caller*/
8632 A_UINT32 num_ric_request;
8633 /**number of ric request ie send to firmware.(max value is 2 now)*/
8634 A_UINT32 is_add_ric;
8635 /**support add ric or delete ric*/
8636} wmi_ric_request_fixed_param;
8637
8638/**tspec element: refer to 8.4.2.32 of 802.11 2012 spec
8639 * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
8640 */
8641typedef struct {
8642 A_UINT32 tlv_header;
8643 A_UINT32 ts_info; /** bits value of TS Info field.*/
8644 A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/
8645 A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/
8646 A_UINT32 min_service_interval; /**The Minimum Service Interval field*/
8647 A_UINT32 max_service_interval; /**The Maximum Service Interval field*/
8648 A_UINT32 inactivity_interval; /**The Inactivity Interval field*/
8649 A_UINT32 suspension_interval; /**The Suspension Interval field*/
8650 A_UINT32 svc_start_time; /**The Service Start Time field*/
8651 A_UINT32 min_data_rate; /**The Minimum Data Rate field*/
8652 A_UINT32 mean_data_rate; /**The Mean Data Rate field*/
8653 A_UINT32 peak_data_rate; /**The Peak Data Rate field*/
8654 A_UINT32 max_burst_size; /**The Burst Size field*/
8655 A_UINT32 delay_bound; /**The Delay Bound field*/
8656 A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/
8657 A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
8658 A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/
8659} wmi_ric_tspec;
8660
8661/* flags for roam_invoke_cmd */
8662/* add this channel into roam cache channel list after this command is finished */
8663#define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0
Govind Singhd0c80a32016-02-01 17:57:48 +05308664/* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */
8665#define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE 1
Nitesh Shah3a943062016-06-29 20:28:43 +05308666/* during host-invoked roaming, don't send null data frame to AP */
8667#define WMI_ROAM_INVOKE_FLAG_NO_NULL_FRAME_TO_AP 2
8668/* from bit 3 to bit 31 are reserved */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008669
8670#define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
8671 (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308672 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008673
8674#define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
8675 (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308676 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008677
8678#define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308679 ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008680
8681
8682#define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */
8683#define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */
8684#define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */
8685
8686#define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */
8687#define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */
8688
8689/** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
8690 *
8691 * if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
8692 * if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
8693 *
8694 * This command can be used to add specific channel into roam cached channel list by following
8695 * <roam_scan_ch_mode> = 0
8696 * <roam_ap_sel_mode> = 0
8697 * <roam_delay> = 0
8698 * <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
8699 * <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
8700 * <channel_no> = channel list to be added
8701 */
8702typedef struct {
8703 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
8704 A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
8705 A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
8706 A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
8707 A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
8708 A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
8709 A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
8710 A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */
8711 /**
8712 * TLV (tag length value ) parameters follows roam_invoke_req
8713 * The TLV's are:
8714 * A_UINT32 channel_list[];
8715 * wmi_mac_addr bssid_list[];
8716 */
8717} wmi_roam_invoke_cmd_fixed_param;
8718
8719/* Definition for op_bitmap */
8720enum {
8721 ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1,
8722 ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2,
8723 ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
8724};
8725
8726typedef struct {
8727 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
8728 A_UINT32 tlv_header;
8729 /** Unique id identifying the VDEV on which roaming filter is adopted */
8730 A_UINT32 vdev_id;
8731 A_UINT32 flags; /** flags for filter */
8732 /** 32 bit bitmap to be set on.
8733 * bit0 = first param,
8734 * bit 1 = second param...etc. Can be or'ed
8735 */
8736 A_UINT32 op_bitmap;
8737 /* number of blacklist in the TLV variable bssid_black_list */
8738 A_UINT32 num_bssid_black_list;
8739 /* number of whitelist in the TLV variable ssid_white_list */
8740 A_UINT32 num_ssid_white_list;
8741 /* only for lfr 3.0. number of preferred list & factor in the TLV */
8742 A_UINT32 num_bssid_preferred_list;
8743 /**
8744 * TLV (tag length value ) parameters follows roam_filter_list_cmd
8745 * The TLV's are:
8746 * wmi_mac_addr bssid_black_list[];
8747 * wmi_ssid ssid_white_list[];
8748 * wmi_mac_addr bssid_preferred_list[];
8749 * A_UINT32 bssid_preferred_factor[];
8750 */
8751} wmi_roam_filter_fixed_param;
8752
8753typedef struct {
8754 A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
8755} WMI_IPV4_ADDR;
8756
8757typedef struct _WMI_IPV6_ADDR {
8758 A_UINT8 address[16]; /* IPV6 in Network Byte Order */
8759} WMI_IPV6_ADDR;
8760
8761/* flags for subnet change detection */
8762#define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
8763#define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
8764/* bit 2 to bit 31 are reserved */
8765
8766/* set IPv4 enabled/disabled flag and get the flag */
8767#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
8768 (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
8769} while (0)
8770
8771#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
8772 (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
8773} while (0)
8774
8775#define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
8776 ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
8777
8778/* set IPv6 enabled flag, disabled and get the flag */
8779#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
8780 (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
8781} while (0)
8782
8783#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
8784 (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
8785} while (0)
8786
8787#define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
8788 ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
8789
8790/**
8791 * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
8792 * to FW. FW uses these parameters for subnet change detection.
8793 */
8794typedef struct {
8795 /*
8796 * TLV tag and len; tag equals
8797 * WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param
8798 */
8799 A_UINT32 tlv_header;
8800 /** unique id identifying the VDEV, generated by the caller */
8801 A_UINT32 vdev_id;
8802 /** IPv4/IPv6 enabled/disabled */
8803 /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/
8804 DISABLED */
8805 A_UINT32 flag;
8806 /** Gateway MAC address */
8807 wmi_mac_addr inet_gw_mac_addr;
8808 /** IP addresses */
8809 WMI_IPV4_ADDR inet_gw_ip_v4_addr;
8810 WMI_IPV6_ADDR inet_gw_ip_v6_addr;
8811 /** Number of software retries for ARP/Neighbor solicitation request */
8812 A_UINT32 max_retries;
8813 /** timeout in milliseconds for each ARP request*/
8814 A_UINT32 timeout;
8815 /** number of skipped aps **/
8816 A_UINT32 num_skip_subnet_change_detection_bssid_list;
8817/**
8818 * TLV (tag length value ) parameters follows roam_subnet_change_config_cmd
8819 * structure. The TLV's are:
8820 * wmi_mac_addr skip_subnet_change_detection_bssid_list [];
8821 **/
8822} wmi_roam_subnet_change_config_fixed_param;
8823
8824/** WMI_PROFILE_MATCH_EVENT: offload scan
8825 * generated when ever atleast one of the matching profiles is found
8826 * in recent NLO scan. no data is carried with the event.
8827 */
8828
8829/** P2P specific commands */
8830
8831/**
8832 * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
8833 * FW to generate P2P IE tobe carried in probe response frames.
8834 * FW will respond to probe requests while in listen state.
8835 */
8836typedef struct {
8837 /* number of secondary device types,supported */
8838 A_UINT32 num_secondary_dev_types;
8839 /**
8840 * followed by 8 bytes of primary device id and
8841 * num_secondary_dev_types * 8 bytes of secondary device
8842 * id.
8843 */
8844} wmi_p2p_dev_set_device_info;
8845
8846/** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
8847 * state. if enabled, an active STA/AP will respond to P2P probe requests on
8848 * the operating channel of the VDEV.
8849 */
8850
8851typedef struct {
8852 /* 1:enable disoverability, 0:disable discoverability */
8853 A_UINT32 enable_discoverability;
8854} wmi_p2p_set_discoverability;
8855
8856/** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
8857 * beacons generated by FW. used in FW beacon mode.
8858 * the FW will add this IE to beacon in addition to the beacon
8859 * template set by WMI_BCN_TMPL_CMDID command.
8860 */
8861typedef struct {
8862 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */
8863 /** unique id identifying the VDEV, generated by the caller */
8864 A_UINT32 vdev_id;
8865 /* ie length */
8866 A_UINT32 ie_buf_len;
8867 /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
8868 * A_UINT8 ie_data[]; // length in byte given by field num_data.
8869 */
8870
8871} wmi_p2p_go_set_beacon_ie_fixed_param;
8872
8873/** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
8874 * probe response generated by FW. used in FW beacon mode.
8875 * the FW will add this IE to probe response in addition to the probe response
8876 * template set by WMI_PRB_TMPL_CMDID command.
8877 */
8878typedef struct {
8879 /** unique id identifying the VDEV, generated by the caller */
8880 A_UINT32 vdev_id;
8881 /* ie length */
8882 A_UINT32 ie_buf_len;
8883 /*followed by byte stream of ie data of length ie_buf_len */
8884} wmi_p2p_go_set_probe_resp_ie;
8885
8886/** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
8887 * be used by the FW to parse the P2P NoA attribute in beacons, probe resposes
8888 * and action frames received by the P2P Client.
8889 */
8890typedef struct {
8891 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
8892 /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */
8893 A_UINT32 p2p_ie_oui_type;
8894 /** OS specific NoA Attribute ID */
8895 A_UINT32 p2p_noa_attribute;
8896} wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
8897
8898/*----P2P disc offload definition ----*/
8899
8900typedef struct {
8901 A_UINT32 pattern_type;
8902 /**
8903 * TLV (tag length value ) paramerters follow the pattern structure.
8904 * TLV can contain bssid list, ssid list and
8905 * ie. the TLV tags are defined above;
8906 */
8907} wmi_p2p_disc_offload_pattern_cmd;
8908
8909typedef struct {
8910 /* unique id identifying the VDEV, generated by the caller */
8911 A_UINT32 vdev_id;
8912 /* mgmt type of the ie */
8913 A_UINT32 mgmt_type;
8914 /* ie length */
8915 A_UINT32 ie_buf_len;
8916 /*followed by byte stream of ie data of length ie_buf_len */
8917} wmi_p2p_disc_offload_appie_cmd;
8918
8919typedef struct {
8920 /* enable/disable p2p find offload */
8921 A_UINT32 enable;
8922 /* unique id identifying the VDEV, generated by the caller */
8923 A_UINT32 vdev_id;
8924 /* p2p find type */
8925 A_UINT32 disc_type;
8926 /* p2p find perodic */
8927 A_UINT32 perodic;
8928 /* p2p find listen channel */
8929 A_UINT32 listen_channel;
8930 /* p2p find full channel number */
8931 A_UINT32 num_scan_chans;
8932 /**
8933 * TLV (tag length value ) paramerters follow the pattern structure.
8934 * TLV contain channel list
8935 */
8936} wmi_p2p_disc_offload_config_cmd;
8937
8938/*----P2P OppPS definition ----*/
8939typedef struct {
8940 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */
8941 A_UINT32 tlv_header;
8942 /* unique id identifying the VDEV, generated by the caller */
8943 A_UINT32 vdev_id;
8944 /* OppPS attributes */
8945 /** Bit 0: Indicate enable/disable of OppPS
8946 * Bits 7-1: Ctwindow in TUs
8947 * Bits 31-8: Reserved
8948 */
8949 A_UINT32 oppps_attr;
8950} wmi_p2p_set_oppps_cmd_fixed_param;
8951
8952#define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1
8953#define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0
8954
8955#define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \
8956 WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
8957
8958#define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \
8959 WMI_F_RMW((hdr)->oppps_attr, 0x1, \
8960 WMI_UNIFIED_OPPPS_ATTR_ENALBED);
8961
8962#define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe
8963#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1
8964
8965#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \
8966 WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
8967
8968#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \
8969 WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \
8970 WMI_UNIFIED_OPPPS_ATTR_CTWIN);
8971
Himanshu Agarwalf7bb67b2016-05-30 21:04:30 +05308972typedef enum p2p_lo_start_ctrl_flags_e {
8973 /* flush prob. req when host is awake */
8974 P2P_LO_START_CTRL_FLAG_FLUSH_LISTEN_RESULT = 1 << 0,
8975} p2p_lo_start_ctrl_flags;
8976
8977typedef struct {
8978 A_UINT32 tlv_header;
8979 A_UINT32 vdev_id;
8980 A_UINT32 ctl_flags; /* refer to enum_p2p_lo_start_ctrl_flags_e */
8981 A_UINT32 channel; /* MHz */
8982 A_UINT32 period; /* ms */
8983 A_UINT32 interval; /* ms, interval should be larger than period */
8984 A_UINT32 count; /* 0 means forever */
8985 /*
8986 * device_types_len specifies the number of bytes in the
8987 * device_types_data[] byte-array TLV that follows this TLV.
8988 * The data in device_types_data[] is in 8-byte elements, so
8989 * device_types_len will be a multiple of 8.
8990 */
8991 A_UINT32 device_types_len;
8992 /*
8993 * prob_resp_len specifies the number of bytes in the
8994 * prob_resp_data[] byte-array TLV that follows this TLV.
8995 */
8996 A_UINT32 prob_resp_len;
8997 /*
8998 * Two other TLVs follow this TLV:
8999 * A_UINT8 device_types_data[device_types_len];
9000 * A_UINT8 prob_resp_data[prob_resp_len];
9001 * The information in device_types_data[] and prob_resp_data[]
9002 * needs to be provided to the target in over-the-air byte order.
9003 * On a big-endian host, if device_types_data and prob_resp_data
9004 * are initially in the correct over-the-air byte order,
9005 * the automatic byteswap for endianness-correction during WMI
9006 * message download will mess up the byte order.
9007 * Thus, a big-endian host needs to explicitly byte-swap the bytes
9008 * within each quad-byte segment of device_types_data[] and
9009 * prob_resp_data[], so that the automatic byte-swap applied during
9010 * WMI download from a big-endian host to the little-endian target
9011 * will restore device_types_data and prob_resp_data into the
9012 * correct byte ordering.
9013 */
9014} wmi_p2p_lo_start_cmd_fixed_param;
9015
9016typedef struct {
9017 A_UINT32 tlv_header;
9018 A_UINT32 vdev_id;
9019} wmi_p2p_lo_stop_cmd_fixed_param;
9020
9021typedef enum p2p_lo_stopped_reason_e {
9022 /* finished as scheduled */
9023 P2P_LO_STOPPED_REASON_COMPLETE = 0,
9024 /* host stops it */
9025 P2P_LO_STOPPED_REASON_RECV_STOP_CMD,
9026 /* invalid listen offload par */
9027 P2P_LO_STOPPED_REASON_INVALID_LO_PAR,
9028 /* vdev cannot support it right now */
9029 P2P_LO_STOPPED_REASON_FW_NOT_SUPPORT,
9030} p2p_lo_stopped_reason;
9031
9032typedef struct {
9033 A_UINT32 tlv_header;
9034 A_UINT32 vdev_id;
9035 A_UINT32 reason; /* refer to p2p_lo_stopped_reason_e */
9036} wmi_p2p_lo_stopped_event_fixed_param;
9037
Anurag Chouhan11b53a12016-07-28 12:39:46 +05309038typedef enum {
9039 WMI_MNT_FILTER_CONFIG_MANAGER,
9040 WMI_MNT_FILTER_CONFIG_CONTROL,
9041 WMI_MNT_FILTER_CONFIG_DATA,
9042 WMI_MNT_FILTER_CONFIG_ALL,
9043 WMI_MNT_FILTER_CONFIG_UNKNOWN,
9044} WMI_MNT_FILTER_CONFIG_TYPE;
9045
9046typedef struct {
9047 A_UINT32 tlv_header;
9048 A_UINT32 vdev_id;
9049 A_UINT32 clear_or_set;
9050 A_UINT32 configure_type; /* see WMI_MNT_FILTER_CONFIG_TYPE */
9051} wmi_mnt_filter_cmd_fixed_param;
9052
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009053typedef struct {
9054 A_UINT32 time32; /* upper 32 bits of time stamp */
9055 A_UINT32 time0; /* lower 32 bits of time stamp */
9056} A_TIME64;
9057
9058typedef enum wmi_peer_sta_kickout_reason {
9059 WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */
9060 WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
9061 WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
9062 WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
9063 WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */
9064 WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
9065} PEER_KICKOUT_REASON;
9066
9067typedef struct {
9068 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */
9069 /** peer mac address */
9070 wmi_mac_addr peer_macaddr;
9071 /** Reason code, defined as above */
9072 A_UINT32 reason;
9073 /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
9074 A_UINT32 rssi;
9075} wmi_peer_sta_kickout_event_fixed_param;
9076
9077#define WMI_WLAN_PROFILE_MAX_HIST 3
9078#define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
9079
9080typedef struct _wmi_wlan_profile_t {
9081 A_UINT32 tlv_header;
9082 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
9083 A_UINT32 id;
9084 A_UINT32 cnt;
9085 A_UINT32 tot;
9086 A_UINT32 min;
9087 A_UINT32 max;
9088 A_UINT32 hist_intvl;
9089 A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
9090} wmi_wlan_profile_t;
9091
9092typedef struct _wmi_wlan_profile_ctx_t {
9093 A_UINT32 tlv_header;
9094 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
9095 A_UINT32 tot; /* time in us */
9096 A_UINT32 tx_msdu_cnt;
9097 A_UINT32 tx_mpdu_cnt;
9098 A_UINT32 tx_ppdu_cnt;
9099 A_UINT32 rx_msdu_cnt;
9100 A_UINT32 rx_mpdu_cnt;
9101 A_UINT32 bin_count;
9102} wmi_wlan_profile_ctx_t;
9103
9104typedef struct {
9105 A_UINT32 tlv_header;
9106 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
9107 A_UINT32 enable;
9108} wmi_wlan_profile_trigger_cmd_fixed_param;
9109
9110typedef struct {
9111 A_UINT32 tlv_header;
9112 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
9113 A_UINT32 value;
9114} wmi_wlan_profile_get_prof_data_cmd_fixed_param;
9115
9116typedef struct {
9117 A_UINT32 tlv_header;
9118 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
9119 A_UINT32 profile_id;
9120 A_UINT32 value;
9121} wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
9122
9123typedef struct {
9124 A_UINT32 tlv_header;
9125 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
9126 A_UINT32 profile_id;
9127 A_UINT32 enable;
9128} wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
9129
9130/*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
9131 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
9132 when comparing wifi header.*/
9133/* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
9134#define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146
9135#define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
9136#define WOW_DEFAULT_BITMASK_SIZE 146
9137#define WOW_DEFAULT_BITMASK_SIZE_DWORD 37
9138#define WOW_MAX_BITMAP_FILTERS 32
9139#define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16
9140#define WOW_EXTEND_PATTERN_MATCH_CNT 16
9141#define WOW_SHORT_PATTERN_MATCH_CNT 8
9142#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 +05309143 The 148 comes from (128 - 14 ) payload size + 8bytes LLC + 26bytes MAC header */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009144#define WOW_DEFAULT_IOAC_PATTERN_SIZE 6
9145#define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
9146#define WOW_DEFAULT_IOAC_RANDOM_SIZE 6
9147#define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
9148#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120
9149#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
9150#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32
9151#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
9152#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32
9153#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08009154#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128
9155#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009156
9157typedef enum pattern_type_e {
9158 WOW_PATTERN_MIN = 0,
9159 WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
9160 WOW_IPV4_SYNC_PATTERN,
9161 WOW_IPV6_SYNC_PATTERN,
9162 WOW_WILD_CARD_PATTERN,
9163 WOW_TIMER_PATTERN,
9164 WOW_MAGIC_PATTERN,
9165 WOW_IPV6_RA_PATTERN,
9166 WOW_IOAC_PKT_PATTERN,
9167 WOW_IOAC_TMR_PATTERN,
9168 WOW_IOAC_SOCK_PATTERN,
9169 WOW_PATTERN_MAX
9170} WOW_PATTERN_TYPE;
9171
9172typedef enum event_type_e {
9173 WOW_BMISS_EVENT = 0,
9174 WOW_BETTER_AP_EVENT,
9175 WOW_DEAUTH_RECVD_EVENT,
9176 WOW_MAGIC_PKT_RECVD_EVENT,
9177 WOW_GTK_ERR_EVENT,
9178 WOW_FOURWAY_HSHAKE_EVENT,
9179 WOW_EAPOL_RECVD_EVENT,
9180 WOW_NLO_DETECTED_EVENT,
9181 WOW_DISASSOC_RECVD_EVENT,
9182 WOW_PATTERN_MATCH_EVENT,
9183 WOW_CSA_IE_EVENT,
9184 WOW_PROBE_REQ_WPS_IE_EVENT,
9185 WOW_AUTH_REQ_EVENT,
9186 WOW_ASSOC_REQ_EVENT,
9187 WOW_HTT_EVENT,
9188 WOW_RA_MATCH_EVENT,
9189 WOW_HOST_AUTO_SHUTDOWN_EVENT,
9190 WOW_IOAC_MAGIC_EVENT,
9191 WOW_IOAC_SHORT_EVENT,
9192 WOW_IOAC_EXTEND_EVENT,
9193 WOW_IOAC_TIMER_EVENT,
9194 WOW_DFS_PHYERR_RADAR_EVENT,
9195 WOW_BEACON_EVENT,
9196 WOW_CLIENT_KICKOUT_EVENT,
9197 WOW_NAN_EVENT,
9198 WOW_EXTSCAN_EVENT,
9199 WOW_IOAC_REV_KA_FAIL_EVENT,
9200 WOW_IOAC_SOCK_EVENT,
9201 WOW_NLO_SCAN_COMPLETE_EVENT,
Govind Singh941bd5e2016-02-04 17:15:25 +05309202 WOW_NAN_DATA_EVENT,
Himanshu Agarwal82972fd2016-05-20 12:23:43 +05309203 WOW_NAN_RTT_EVENT, /* DEPRECATED, UNUSED */
9204 /* reuse deprecated event value */
9205 WOW_OEM_RESPONSE_EVENT = WOW_NAN_RTT_EVENT,
Krishna Kumaar Natarajan3bd73642016-03-25 13:59:54 -07009206 WOW_TDLS_CONN_TRACKER_EVENT,
Anurag Chouhan05d05fe2016-04-18 17:09:24 +05309207 WOW_CRITICAL_LOG_EVENT,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009208} WOW_WAKE_EVENT_TYPE;
9209
9210typedef enum wake_reason_e {
9211 WOW_REASON_UNSPECIFIED = -1,
9212 WOW_REASON_NLOD = 0,
9213 WOW_REASON_AP_ASSOC_LOST,
9214 WOW_REASON_LOW_RSSI,
9215 WOW_REASON_DEAUTH_RECVD,
9216 WOW_REASON_DISASSOC_RECVD,
9217 WOW_REASON_GTK_HS_ERR,
9218 WOW_REASON_EAP_REQ,
9219 WOW_REASON_FOURWAY_HS_RECV,
9220 WOW_REASON_TIMER_INTR_RECV,
9221 WOW_REASON_PATTERN_MATCH_FOUND,
9222 WOW_REASON_RECV_MAGIC_PATTERN,
9223 WOW_REASON_P2P_DISC,
9224 WOW_REASON_WLAN_HB,
9225 WOW_REASON_CSA_EVENT,
9226 WOW_REASON_PROBE_REQ_WPS_IE_RECV,
9227 WOW_REASON_AUTH_REQ_RECV,
9228 WOW_REASON_ASSOC_REQ_RECV,
9229 WOW_REASON_HTT_EVENT,
9230 WOW_REASON_RA_MATCH,
9231 WOW_REASON_HOST_AUTO_SHUTDOWN,
9232 WOW_REASON_IOAC_MAGIC_EVENT,
9233 WOW_REASON_IOAC_SHORT_EVENT,
9234 WOW_REASON_IOAC_EXTEND_EVENT,
9235 WOW_REASON_IOAC_TIMER_EVENT,
9236 WOW_REASON_ROAM_HO,
9237 WOW_REASON_DFS_PHYERR_RADADR_EVENT,
9238 WOW_REASON_BEACON_RECV,
9239 WOW_REASON_CLIENT_KICKOUT_EVENT,
9240 WOW_REASON_NAN_EVENT,
9241 WOW_REASON_EXTSCAN,
9242 WOW_REASON_RSSI_BREACH_EVENT,
9243 WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
9244 WOW_REASON_IOAC_SOCK_EVENT,
9245 WOW_REASON_NLO_SCAN_COMPLETE,
9246 WOW_REASON_PACKET_FILTER_MATCH,
9247 WOW_REASON_ASSOC_RES_RECV,
9248 WOW_REASON_REASSOC_REQ_RECV,
9249 WOW_REASON_REASSOC_RES_RECV,
9250 WOW_REASON_ACTION_FRAME_RECV,
Manikandan Mohan130eb572015-12-23 13:53:34 -08009251 WOW_REASON_BPF_ALLOW,
Govind Singh941bd5e2016-02-04 17:15:25 +05309252 WOW_REASON_NAN_DATA,
Himanshu Agarwal82972fd2016-05-20 12:23:43 +05309253 WOW_REASON_NAN_RTT, /* DEPRECATED, UNUSED */
9254 /* reuse deprecated reason value */
9255 WOW_REASON_OEM_RESPONSE_EVENT = WOW_REASON_NAN_RTT,
Krishna Kumaar Natarajan3bd73642016-03-25 13:59:54 -07009256 WOW_REASON_TDLS_CONN_TRACKER_EVENT,
Anurag Chouhan05d05fe2016-04-18 17:09:24 +05309257 WOW_REASON_CRITICAL_LOG,
Himanshu Agarwalf7bb67b2016-05-30 21:04:30 +05309258 WOW_REASON_P2P_LISTEN_OFFLOAD,
Nitesh Shah44611be2016-07-21 15:27:37 +05309259 WOW_REASON_NAN_EVENT_WAKE_HOST,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009260 WOW_REASON_DEBUG_TEST = 0xFF,
9261} WOW_WAKE_REASON_TYPE;
9262
9263typedef enum {
9264 WOW_IFACE_PAUSE_ENABLED,
9265 WOW_IFACE_PAUSE_DISABLED
9266} WOW_IFACE_STATUS;
9267
9268enum {
9269 /* some win10 platfrom will not assert pcie_reset for wow.*/
9270 WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001,
Govind Singhb5158e22016-02-04 15:38:30 +05309271 /*
9272 * WMI_WOW_FLAG_SEND_PM_PME
9273 * Some platforms have issues if the PM_PME message is sent after WoW,
9274 * so don't send PM_PME after WoW unless the host uses this flag
9275 * to request it.
9276 */
9277 WMI_WOW_FLAG_SEND_PM_PME = 0x00000002,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009278};
9279
9280
9281typedef struct {
9282 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */
9283 A_UINT32 enable;
9284 A_UINT32 pause_iface_config;
9285 A_UINT32 flags; /* WMI_WOW_FLAG enums */
9286} wmi_wow_enable_cmd_fixed_param;
9287
9288typedef struct {
9289 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */
9290 /** Reserved for future use */
9291 A_UINT32 reserved0;
9292} wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
9293
9294#define WOW_ICMPV6_NA_FILTER_DISABLE 0
9295#define WOW_ICMPV6_NA_FILTER_ENABLE 1
9296
9297typedef struct {
9298 /* TLV tag and len;
9299 * tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param
9300 */
9301 A_UINT32 tlv_header;
9302 A_UINT32 vdev_id;
9303 A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
9304} wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
9305
9306typedef struct bitmap_pattern_s {
9307 A_UINT32 tlv_header;
9308 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
9309 A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
9310 A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
9311 A_UINT32 pattern_offset;
9312 A_UINT32 pattern_len;
9313 A_UINT32 bitmask_len;
9314 A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
9315} WOW_BITMAP_PATTERN_T;
9316
9317typedef struct ipv4_sync_s {
9318 A_UINT32 tlv_header;
9319 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
9320 A_UINT32 ipv4_src_addr;
9321 A_UINT32 ipv4_dst_addr;
9322 A_UINT32 tcp_src_prt;
9323 A_UINT32 tcp_dst_prt;
9324} WOW_IPV4_SYNC_PATTERN_T;
9325
9326typedef struct ipv6_sync_s {
9327 A_UINT32 tlv_header;
9328 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
9329 A_UINT32 ipv6_src_addr[4];
9330 A_UINT32 ipv6_dst_addr[4];
9331 A_UINT32 tcp_src_prt;
9332 A_UINT32 tcp_dst_prt;
9333} WOW_IPV6_SYNC_PATTERN_T;
9334
9335typedef struct WOW_MAGIC_PATTERN_CMD {
9336 A_UINT32 tlv_header;
9337 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
9338 wmi_mac_addr macaddr;
9339} WOW_MAGIC_PATTERN_CMD;
9340
9341typedef enum wow_ioac_pattern_type {
9342 WOW_IOAC_MAGIC_PATTERN = 1,
9343 WOW_IOAC_SHORT_PATTERN,
9344 WOW_IOAC_EXTEND_PATTERN,
9345} WOW_IOAC_PATTERN_TYPE;
9346
9347typedef struct ioac_sock_pattern_s {
9348 /**
9349 * TLV tag and len;
9350 * tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T
9351 */
9352 A_UINT32 tlv_header;
9353 A_UINT32 id;
9354 A_UINT32 local_ipv4;
9355 A_UINT32 remote_ipv4;
9356 A_UINT32 local_port;
9357 A_UINT32 remote_port;
9358 A_UINT32 pattern_len; /* units = bytes */
9359 A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08009360 WMI_IPV6_ADDR local_ipv6;
9361 WMI_IPV6_ADDR remote_ipv6;
9362 A_UINT32 ack_nak_len;
9363 A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
9364 A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009365} WOW_IOAC_SOCK_PATTERN_T;
9366
9367typedef struct ioac_pkt_pattern_s {
9368 A_UINT32 tlv_header;
9369 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
9370 A_UINT32 pattern_type;
9371 A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
9372 A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
9373 A_UINT32 pattern_len;
9374 A_UINT32 random_len;
9375} WOW_IOAC_PKT_PATTERN_T;
9376
9377typedef struct ioac_tmr_pattern_s {
9378 A_UINT32 tlv_header;
9379 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
9380 A_UINT32 wake_in_s;
9381 A_UINT32 vdev_id;
9382} WOW_IOAC_TMR_PATTERN_T;
9383
9384typedef struct {
9385 A_UINT32 tlv_header;
9386 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
9387 A_UINT32 nID;
9388} WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
9389
9390typedef struct {
9391 A_UINT32 tlv_header;
9392 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
9393 A_UINT32 nID;
9394} WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
9395
9396typedef struct ioac_keepalive_s {
9397 A_UINT32 tlv_header;
9398 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
9399 A_UINT32
9400 keepalive_pkt_buf
9401 [WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
9402 A_UINT32 keepalive_pkt_len;
9403 A_UINT32 period_in_ms;
9404 A_UINT32 vdev_id;
9405 A_UINT32 max_loss_cnt;
9406 A_UINT32 local_ipv4;
9407 A_UINT32 remote_ipv4;
9408 A_UINT32 local_port;
9409 A_UINT32 remote_port;
9410 A_UINT32 recv_period_in_ms;
9411 A_UINT32 rev_ka_size;
9412 A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08009413 WMI_IPV6_ADDR local_ipv6;
9414 WMI_IPV6_ADDR remote_ipv6;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009415} WMI_WOW_IOAC_KEEPALIVE_T;
9416
9417typedef struct {
9418 A_UINT32 tlv_header;
9419 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
9420 A_UINT32 vdev_id;
9421 A_UINT32 pattern_type;
9422/*
9423 * Following this struct are these TLVs. Note that they are all array of structures
9424 * but can have at most one element. Which TLV is empty or has one element depends
9425 * on the field pattern_type. This is to emulate an union.
9426 * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
9427 * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
9428 */
9429} WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
9430
9431typedef struct {
9432 A_UINT32 tlv_header;
9433 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
9434 A_UINT32 vdev_id;
9435 A_UINT32 pattern_type;
9436 A_UINT32 pattern_id;
9437} WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
9438
9439typedef struct {
9440 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
9441 A_UINT32 vdev_id;
9442 A_UINT32 pattern_id;
9443 A_UINT32 pattern_type;
9444 /*
9445 * Following this struct are these TLVs. Note that they are all array of structures
9446 * but can have at most one element. Which TLV is empty or has one element depends
9447 * on the field pattern_type. This is to emulate an union.
9448 * WOW_BITMAP_PATTERN_T pattern_info_bitmap[];
9449 * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[];
9450 * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[];
9451 * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[];
9452 * A_UINT32 pattern_info_timeout[];
9453 * A_UINT32 ra_ratelimit_interval;
9454 */
9455} WMI_WOW_ADD_PATTERN_CMD_fixed_param;
9456
9457typedef struct {
9458 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
9459 A_UINT32 vdev_id;
9460 A_UINT32 pattern_id;
9461 A_UINT32 pattern_type;
9462} WMI_WOW_DEL_PATTERN_CMD_fixed_param;
9463
Himanshu Agarwal2690e462016-06-03 14:26:01 +05309464#define WMI_WOW_MAX_EVENT_BM_LEN 4
9465
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009466typedef struct {
9467 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */
9468 A_UINT32 vdev_id;
9469 A_UINT32 is_add;
Himanshu Agarwal2690e462016-06-03 14:26:01 +05309470 union {
9471 A_UINT32 event_bitmap;
9472 A_UINT32 event_bitmaps[WMI_WOW_MAX_EVENT_BM_LEN];
9473 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009474} WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
9475
9476/*
9477 * This structure is used to set the pattern to check UDP packet in WOW mode.
9478 * If match, construct a tx frame in a local buffer to send through the peer
9479 * AP to the entity in the IP network that sent the UDP packet to this STA.
9480 */
9481typedef struct {
9482 /*
9483 * TLV tag and len;
9484 * tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param
9485 */
9486 A_UINT32 tlv_header;
9487 A_UINT32 vdev_id;
9488 A_UINT32 enable; /* 1: enable, 0: disable */
9489 /*
9490 * dest_port -
9491 * bits 7:0 contain the LSB of the UDP dest port,
9492 * bits 15:8 contain the MSB of the UDP dest port
9493 */
9494 A_UINT32 dest_port;
9495 A_UINT32 pattern_len; /* length in byte of pattern[] */
9496 A_UINT32 response_len; /* length in byte of response[] */
9497 /*
9498 * Following this struct are the TLV's:
9499 * payload of UDP packet to be checked, network byte order
9500 * A_UINT8 pattern[];
9501 * payload of UDP packet to be response, network byte order
9502 * A_UINT8 response[];
9503 */
9504} WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
9505
9506/*
9507 * This structure is used to set the pattern for WOW host wakeup pin pulse
9508 * pattern confirguration.
9509 */
9510typedef struct {
9511 /*
9512 * TLV tag and len; tag equals
9513 * WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param
9514 */
9515 A_UINT32 tlv_header;
9516
9517 /* 1: enable, 0: disable */
9518 A_UINT32 enable;
9519
9520 /* pin for host wakeup */
9521 A_UINT32 pin;
9522
9523 /* interval for keeping low voltage, unit: ms */
9524 A_UINT32 interval_low;
9525
9526 /* interval for keeping high voltage, unit: ms */
9527 A_UINT32 interval_high;
9528
9529 /* repeat times for pulse (0xffffffff means forever) */
9530 A_UINT32 repeat_cnt;
9531} WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
9532
Anurag Chouhan86eab9b2016-04-21 16:22:47 +05309533#define MAX_SUPPORTED_ACTION_CATEGORY 256
9534#define MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST (MAX_SUPPORTED_ACTION_CATEGORY/32)
9535
9536typedef enum {
9537 WOW_ACTION_WAKEUP_OPERATION_RESET = 0,
9538 WOW_ACTION_WAKEUP_OPERATION_SET,
9539 WOW_ACTION_WAKEUP_OPERATION_ADD_SET,
9540 WOW_ACTION_WAKEUP_OPERATION_DELETE_SET,
9541} WOW_ACTION_WAKEUP_OPERATION;
9542
9543typedef struct {
9544 /*
9545 * TLV tag and len; tag equals
9546 * WMITLV_TAG_STRUC_WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param
9547 */
9548 A_UINT32 tlv_header;
9549 A_UINT32 vdev_id;
9550 /*
9551 * 0 reset to fw default, 1 set the bits, 2 add the setting bits,
9552 * 3 delete the setting bits
9553 */
9554 A_UINT32 operation;
9555 A_UINT32 action_category_map[MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST];
9556} WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param;
9557
9558
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009559typedef struct wow_event_info_s {
9560 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */
9561 A_UINT32 vdev_id;
9562 A_UINT32 flag; /*This is current reserved. */
9563 A_INT32 wake_reason;
9564 A_UINT32 data_len;
9565} WOW_EVENT_INFO_fixed_param;
9566
9567typedef struct wow_initial_wakeup_event_s {
9568 /*
9569 * TLV tag and len; tag equals
9570 * WOW_INITIAL_WAKEUP_EVENT_fixed_param
9571 */
9572 A_UINT32 tlv_header;
9573 A_UINT32 vdev_id;
9574} WOW_INITIAL_WAKEUP_EVENT_fixed_param;
9575
9576typedef enum {
9577 WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
9578 WOW_EVENT_INFO_TYPE_BITMAP,
9579 WOW_EVENT_INFO_TYPE_GTKIGTK,
9580} WOW_EVENT_INFO_TYPE;
9581
9582typedef struct wow_event_info_section_s {
9583 A_UINT32 data_type;
9584 A_UINT32 data_len;
9585} WOW_EVENT_INFO_SECTION;
9586
9587typedef struct wow_event_info_section_packet_s {
9588 A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
9589} WOW_EVENT_INFO_SECTION_PACKET;
9590
9591typedef struct wow_event_info_section_bitmap_s {
9592 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */
9593 A_UINT32 flag; /*This is current reserved. */
9594 A_UINT32 value; /*This could be the pattern id for bitmap pattern. */
9595 A_UINT32 org_len; /*The length of the orginal packet. */
9596} WOW_EVENT_INFO_SECTION_BITMAP;
9597
9598/**
9599 * This command is sent from WLAN host driver to firmware to
9600 * enable or disable D0-WOW. D0-WOW means APSS suspend with
9601 * PCIe link and DDR being active.
9602 *
9603 *
9604 * Entering D0-WOW Mode (based on kernel suspend request):
9605 * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
9606 * target: Take action (e.g. dbglog suspend)
9607 * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
9608 *
9609 * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
9610 * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
9611 * target: Take action (e.g. dbglog resume)
9612 * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
9613 *
9614 * This command is applicable only on the PCIE LL systems
9615 * Host can enter either D0-WOW or WOW mode, but NOT both at same time
9616 * Decision to enter D0-WOW or WOW is based on active interfaces
9617 *
9618 */
9619typedef struct {
9620 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */
9621 A_UINT32 enable; /* 1 = enable, 0 = disable */
9622} wmi_d0_wow_enable_disable_cmd_fixed_param;
9623
9624typedef enum extend_wow_type_e {
9625 EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */
9626 EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */
9627 EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08009628 EXTWOW_TYPE_APP_PULSETEST,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009629 EXTWOW_DISABLED = 255,
9630} EXTWOW_TYPE;
9631
9632typedef struct {
9633 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */
9634 A_UINT32 vdev_id;
9635 A_UINT32 type;
9636 A_UINT32 wakeup_pin_num;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08009637 A_UINT32 swol_pulsetest_type;
9638 A_UINT32 swol_pulsetest_application;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009639} wmi_extwow_enable_cmd_fixed_param;
9640
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08009641#define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
9642#define SWOL_INDOOR_KEY_LEN 16
9643
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009644typedef struct {
9645 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */
9646 A_UINT32 vdev_id;
9647 wmi_mac_addr wakee_mac;
9648 A_UINT8 ident[8];
9649 A_UINT8 passwd[16];
9650 A_UINT32 ident_len;
9651 A_UINT32 passwd_len;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08009652
9653 /* indoor check parameters */
9654 /* key for mac addresses specified in swol_indoor_key_mac
9655 * Big-endian hosts need to byte-swap the bytes within each 4-byte
9656 * segment of this array, so the bytes will return to their original
9657 * order when the entire WMI message contents are byte-swapped to
9658 * convert from big-endian to little-endian format.
9659 */
9660 A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
9661 /* key length for specified mac address index
9662 * Big-endian hosts need to byte-swap the bytes within each 4-byte
9663 * segment of this array, so the bytes will return to their original
9664 * order when the entire WMI message contents are byte-swapped to
9665 * convert from big-endian to little-endian format.
9666 */
9667 A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
9668 /* mac address array allowed to wakeup host*/
9669 wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
9670 /* app mask for the mac addresses specified in swol_indoor_key_mac */
9671 A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
9672 A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
9673 A_UINT32 swol_indoor_pw_check; /* whether to check password */
9674 A_UINT32 swol_indoor_pattern; /* wakeup pattern */
9675 A_UINT32 swol_indoor_exception; /* wakeup when exception happens */
9676 A_UINT32 swol_indoor_exception_app;
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +05309677 A_UINT32 swol_assist_enable; /* whether to enable IoT mode */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009678} wmi_extwow_set_app_type1_params_cmd_fixed_param;
9679
9680typedef struct {
9681 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */
9682 A_UINT32 vdev_id;
9683
9684 A_UINT8 rc4_key[16];
9685 A_UINT32 rc4_key_len;
9686
9687 /** ip header parameter */
9688 A_UINT32 ip_id; /* NC id */
9689 A_UINT32 ip_device_ip; /* NC IP address */
9690 A_UINT32 ip_server_ip; /* Push server IP address */
9691
9692 /** tcp header parameter */
9693 A_UINT16 tcp_src_port; /* NC TCP port */
9694 A_UINT16 tcp_dst_port; /* Push server TCP port */
9695 A_UINT32 tcp_seq;
9696 A_UINT32 tcp_ack_seq;
9697
9698 A_UINT32 keepalive_init; /* Initial ping interval */
9699 A_UINT32 keepalive_min; /* Minimum ping interval */
9700 A_UINT32 keepalive_max; /* Maximum ping interval */
9701 A_UINT32 keepalive_inc; /* Increment of ping interval */
9702
9703 wmi_mac_addr gateway_mac;
9704 A_UINT32 tcp_tx_timeout_val;
9705 A_UINT32 tcp_rx_timeout_val;
9706
9707 /** add extra parameter for backward-compatible */
9708 /*
9709 * For all byte arrays, natural order is used. E.g.
9710 * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
9711 * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
9712 */
9713
9714 /* used to encrypt transmit packet such as keep-alive */
9715 A_UINT8 rc4_write_sandbox[256];
9716 A_UINT32 rc4_write_x;
9717 A_UINT32 rc4_write_y;
9718
9719 /* used to decrypt received packet such as wow data */
9720 A_UINT8 rc4_read_sandbox[256];
9721 A_UINT32 rc4_read_x;
9722 A_UINT32 rc4_read_y;
9723
9724 /* used to caculate HMAC hash for transmit packet such as keep-alive */
9725 A_UINT8 ssl_write_seq[8];
9726 A_UINT8 ssl_sha1_write_key[64];
9727 A_UINT32 ssl_sha1_write_key_len;
9728
9729 /* used to calculate HAMC hash for receive packet such as wow data */
9730 A_UINT8 ssl_read_seq[8];
9731 A_UINT8 ssl_sha1_read_key[64];
9732 A_UINT32 ssl_sha1_read_key_len;
9733
9734 /* optional element for specifying TCP options data to include in
9735 * transmit packets such as keep-alive
9736 */
9737 A_UINT32 tcp_options_len;
9738 A_UINT8 tcp_options[40];
9739
9740 A_UINT32 async_id; /* keep-alive request id */
9741} wmi_extwow_set_app_type2_params_cmd_fixed_param;
9742
9743#define WMI_RXERR_CRC 0x01 /* CRC error on frame */
9744#define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
9745#define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */
9746#define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
9747
9748typedef enum {
9749 PKT_PWR_SAVE_PAID_MATCH = 0x0001,
9750 PKT_PWR_SAVE_GID_MATCH = 0x0002,
9751 PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x0004,
9752 PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x0008,
9753 PKT_PWR_SAVE_EOF_PAD_DELIM = 0x0010,
9754 PKT_PWR_SAVE_MACADDR_MISMATCH = 0x0020,
9755 PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x0040,
9756 PKT_PWR_SAVE_GID_NSTS_ZERO = 0x0080,
9757 PKT_PWR_SAVE_RSSI_CHECK = 0x0100,
9758 PKT_PWR_SAVE_5G_EBT = 0x0200,
9759 PKT_PWR_SAVE_2G_EBT = 0x0400,
9760 WMI_PKT_PWR_SAVE_MAX = 0x0800,
9761} WMI_PKT_PWR_SAVE_TYPE;
9762
9763typedef struct {
9764 A_UINT32 tlv_header;
9765 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
9766 A_UINT32 num_data;
9767 /** length in byte of data[]. */
Govind Singh869c9872016-02-22 18:36:34 +05309768 /** pdev_id for identifying the MAC
9769 * See macros starting with WMI_PDEV_ID_ for values.
9770 */
9771 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009772 /* This structure is used to send Factory Test Mode [FTM] command
9773 * from host to firmware for integrated chips which are binary blobs.
9774 * Following this structure is the TLV:
9775 * A_UINT8 data[]; // length in byte given by field num_data.
9776 */
9777} wmi_ftm_intg_cmd_fixed_param;
9778
9779typedef struct {
9780 A_UINT32 tlv_header;
9781 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
9782 A_UINT32 num_data;
9783 /** length in byte of data[]. */
9784 /* This structure is used to receive Factory Test Mode [FTM] event
9785 * from firmware to host for integrated chips which are binary blobs.
9786 * Following this structure is the TLV:
9787 * A_UINT8 data[]; // length in byte given by field num_data.
9788 */
9789} wmi_ftm_intg_event_fixed_param;
9790
9791#define WMI_MAX_NS_OFFLOADS 2
9792#define WMI_MAX_ARP_OFFLOADS 2
9793
9794#define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
9795#define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
9796#define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
9797
9798typedef struct {
9799 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
9800 A_UINT32 flags; /* flags */
9801 A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node */
9802 A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
9803 wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
9804} WMI_ARP_OFFLOAD_TUPLE;
9805
9806#define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
9807#define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
9808#define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
Govind Singh86180292016-02-01 14:03:37 +05309809/* whether the configured IPv6 address is anycast */
9810#define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009811
9812#define WMI_NSOFF_MAX_TARGET_IPS 2
9813
9814typedef struct {
9815 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
9816 A_UINT32 flags; /* flags */
9817 /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
9818 WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */
9819 WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
9820 WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
9821 wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
9822} WMI_NS_OFFLOAD_TUPLE;
9823
9824typedef struct {
9825 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
9826 A_UINT32 flags;
9827 A_UINT32 vdev_id;
9828 A_UINT32 num_ns_ext_tuples;
9829 /* Following this structure are the TLVs:
9830 * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS];
9831 * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
9832 * size of ns_ext_tuples is based on num_ns_ext_tuples
9833 * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[];
9834 */
9835} WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
9836
9837typedef struct {
9838 A_UINT32 tlv_header;
9839 A_UINT32 vdev_id;
9840 A_UINT32 pattern_id;
9841 A_UINT32 timeout;
9842 A_UINT32 length;
9843 /* Following this would be the pattern
9844 A_UINT8 pattern[] of length specifed by length
9845 field in the structure. */
9846} WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
9847
9848typedef struct {
9849 A_UINT32 tlv_header;
9850 A_UINT32 vdev_id;
9851 A_UINT32 pattern_id;
9852} WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
9853
9854typedef struct {
9855 A_UINT32 tlv_header;
9856 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
9857 /** unique id identifying the VDEV, generated by the caller */
9858 A_UINT32 vdev_id;
9859 /** peer MAC address */
9860 wmi_mac_addr peer_macaddr;
9861 /** Tid number */
9862 A_UINT32 tid;
9863 /** Initiator (1) or Responder (0) for this aggregation */
9864 A_UINT32 initiator;
9865 /** size of the negotiated window */
9866 A_UINT32 window_size;
9867 /** starting sequence number (only valid for initiator) */
9868 A_UINT32 ssn;
9869 /** timeout field represents the time to wait for Block Ack in
9870 * initiator case and the time to wait for BAR in responder
9871 * case. 0 represents no timeout. */
9872 A_UINT32 timeout;
9873 /* BA policy: immediate ACK (0) or delayed ACK (1) */
9874 A_UINT32 policy;
9875} wmi_peer_tid_addba_cmd_fixed_param;
9876
9877typedef struct {
9878 A_UINT32 tlv_header;
9879 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
9880 /** unique id identifying the VDEV, generated by the caller */
9881 A_UINT32 vdev_id;
9882 /** peer MAC address */
9883 wmi_mac_addr peer_macaddr;
9884 /** Tid number */
9885 A_UINT32 tid;
9886 /** Initiator (1) or Responder (0) for this aggregation */
9887 A_UINT32 initiator;
9888} wmi_peer_tid_delba_cmd_fixed_param;
9889
9890typedef struct {
9891 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
9892 /** unique id identifying the VDEV, generated by the caller */
9893 A_UINT32 vdev_id;
9894 /** peer MAC address */
9895 wmi_mac_addr peer_macaddr;
9896 /** Tid number */
9897 A_UINT32 tid;
9898 /** Event status */
9899 A_UINT32 status;
9900} wmi_tx_addba_complete_event_fixed_param;
9901
9902typedef struct {
9903 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
9904 /** unique id identifying the VDEV, generated by the caller */
9905 A_UINT32 vdev_id;
9906 /** peer MAC address */
9907 wmi_mac_addr peer_macaddr;
9908 /** Tid number */
9909 A_UINT32 tid;
9910 /** Event status */
9911 A_UINT32 status;
9912} wmi_tx_delba_complete_event_fixed_param;
9913/*
9914 * Structure to request sequence numbers for a given
9915 * peer station on different TIDs. The TIDs are
9916 * indicated in the tidBitMap, tid 0 would
9917 * be represented by LSB bit 0. tid 1 would be
9918 * represented by LSB bit 1 etc.
9919 * The target will retrieve the current sequence
9920 * numbers for the peer on all the TIDs requested
9921 * and send back a response in a WMI event.
9922 */
9923typedef struct {
9924 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309925 WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009926 wmi_mac_addr peer_macaddr;
9927 A_UINT32 tidBitmap;
9928} wmi_ba_req_ssn;
9929
9930typedef struct {
9931 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309932 WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009933 /** unique id identifying the VDEV, generated by the caller */
9934 A_UINT32 vdev_id;
9935 /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
9936 A_UINT32 num_ba_req_ssn;
9937/* Following this struc are the TLV's:
9938 * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
9939 */
9940} wmi_ba_req_ssn_cmd_fixed_param;
9941
9942/*
9943 * Max transmit categories
9944 *
9945 * Note: In future if we need to increase WMI_MAX_TC definition
9946 * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
9947 */
9948#define WMI_MAX_TC 8
9949
9950/*
9951 * Structure to send response sequence numbers
9952 * for a give peer and tidmap.
9953 */
9954typedef struct {
9955 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309956 WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009957 wmi_mac_addr peer_macaddr;
9958 /* A bool to indicate if ssn is present */
9959 A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
9960 /* The ssn from target, valid only if
9961 * ssn_present_for_tid[tidn] equals 1
9962 */
9963 A_UINT32 ssn_for_tid[WMI_MAX_TC];
9964} wmi_ba_event_ssn;
9965
9966typedef struct {
9967 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309968 WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009969 /** unique id identifying the VDEV, generated by the caller */
9970 A_UINT32 vdev_id;
9971 /** Event status, success or failure of the overall operation */
9972 A_UINT32 status;
9973 /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
9974 A_UINT32 num_ba_event_ssn;
9975/* Following this struc are the TLV's:
9976 * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
9977 */
9978} wmi_ba_rsp_ssn_event_fixed_param;
9979
9980enum wmi_aggr_state_req_type {
9981 WMI_DISABLE_AGGREGATION,
9982 WMI_ENABLE_AGGREGATION
9983};
9984
9985/*
9986 * This event is generated by the COEX module
9987 * when esco call is begins the coex module in fw genrated this event to host to
9988 * disable the RX aggregation and after completion of the esco call fw will indicate to
9989 * enable back the Rx aggregation .
9990 */
9991
9992typedef struct {
9993 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
9994 /** unique id identifying the VDEV, generated by the caller */
9995 A_UINT32 vdev_id;
9996 /** req_type contains values from enum
9997 * wmi_aggr_state_req_type; 0 (disable) 1(enable) */
9998 A_UINT32 req_type;
9999} wmi_aggr_state_trig_event_fixed_param;
10000
10001typedef struct {
10002 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
10003 /** unique id identifying the VDEV, generated by the caller */
10004 A_UINT32 vdev_id;
10005 /** MAC address used for installing */
10006 wmi_mac_addr peer_macaddr;
10007 /** key index */
10008 A_UINT32 key_ix;
10009 /** key flags */
10010 A_UINT32 key_flags;
10011 /** Event status */
10012 A_UINT32 status;
10013} wmi_vdev_install_key_complete_event_fixed_param;
10014
10015typedef enum _WMI_NLO_AUTH_ALGORITHM {
10016 WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
10017 WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
10018 WMI_NLO_AUTH_ALGO_WPA = 3,
10019 WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
10020 WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
10021 WMI_NLO_AUTH_ALGO_RSNA = 6,
10022 WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
10023} WMI_NLO_AUTH_ALGORITHM;
10024
10025typedef enum _WMI_NLO_CIPHER_ALGORITHM {
10026 WMI_NLO_CIPHER_ALGO_NONE = 0x00,
10027 WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
10028 WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
10029 WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
10030 WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
10031 WMI_NLO_CIPHER_ALGO_BIP = 0x06,
10032 WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
10033 WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
10034 WMI_NLO_CIPHER_ALGO_WEP = 0x101,
10035} WMI_NLO_CIPHER_ALGORITHM;
10036
10037/* SSID broadcast type passed in NLO params */
10038typedef enum _WMI_NLO_SSID_BcastNwType {
10039 WMI_NLO_BCAST_UNKNOWN = 0,
10040 WMI_NLO_BCAST_NORMAL = 1,
10041 WMI_NLO_BCAST_HIDDEN = 2,
10042} WMI_NLO_SSID_BcastNwType;
10043
10044#define WMI_NLO_MAX_SSIDS 16
10045#define WMI_NLO_MAX_CHAN 48
10046
10047#define WMI_NLO_CONFIG_STOP (0x1 << 0)
10048#define WMI_NLO_CONFIG_START (0x1 << 1)
10049#define WMI_NLO_CONFIG_RESET (0x1 << 2)
10050#define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4)
10051#define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5)
10052#define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6)
10053/* This bit is used to indicate if EPNO or supplicant PNO is enabled. Only
10054 * one of them can be enabled at a given time */
10055#define WMI_NLO_CONFIG_ENLO (0x1 << 7)
10056#define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8)
Govind Singh42f71542016-03-14 16:32:33 +053010057#define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010058
10059/* Whether directed scan needs to be performed (for hidden SSIDs) */
10060#define WMI_ENLO_FLAG_DIRECTED_SCAN 1
10061/* Whether PNO event shall be triggered if the network is found on A band */
10062#define WMI_ENLO_FLAG_A_BAND 2
10063/* Whether PNO event shall be triggered if the network is found on G band */
10064#define WMI_ENLO_FLAG_G_BAND 4
10065/* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
10066#define WMI_ENLO_FLAG_STRICT_MATCH 8
10067/* Code for matching the beacon AUTH IE - additional codes TBD open */
10068#define WMI_ENLO_AUTH_CODE_OPEN 1
10069/* WPA_PSK or WPA2PSK */
10070#define WMI_ENLO_AUTH_CODE_PSK 2
10071/* any EAPOL */
10072#define WMI_ENLO_AUTH_CODE_EAPOL 4
10073
10074/* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
10075typedef struct wmi_nlo_ssid_param {
10076 A_UINT32 valid;
10077 wmi_ssid ssid;
10078} wmi_nlo_ssid_param;
10079
10080/* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
10081typedef struct wmi_nlo_enc_param {
10082 A_UINT32 valid;
10083 A_UINT32 enc_type;
10084} wmi_nlo_enc_param;
10085
10086/* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
10087typedef struct wmi_nlo_auth_param {
10088 A_UINT32 valid;
10089 A_UINT32 auth_type;
10090} wmi_nlo_auth_param;
10091
10092/* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
10093typedef struct wmi_nlo_bcast_nw_param {
10094 A_UINT32 valid;
10095 /**
10096 * If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value
10097 * should be true/false.Otherwise EPNO is enabled. bcast_nw_type would be used
10098 * as a bit flag contains WMI_ENLO_FLAG_XXX
10099 */
10100 A_UINT32 bcast_nw_type;
10101} wmi_nlo_bcast_nw_param;
10102
10103/* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
10104typedef struct wmi_nlo_rssi_param {
10105 A_UINT32 valid;
10106 A_INT32 rssi;
10107} wmi_nlo_rssi_param;
10108
10109typedef struct nlo_configured_parameters {
10110 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
10111 wmi_nlo_ssid_param ssid;
10112 wmi_nlo_enc_param enc_type;
10113 wmi_nlo_auth_param auth_type;
10114 wmi_nlo_rssi_param rssi_cond;
10115 wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
10116} nlo_configured_parameters;
10117
10118/* Support channel prediction for PNO scan after scanning top_k_num channels
10119 * if stationary_threshold is met.
10120 */
10121typedef struct nlo_channel_prediction_cfg {
10122 A_UINT32 tlv_header;
10123 /* Enable or disable this feature. */
10124 A_UINT32 enable;
10125 /* Top K channels will be scanned before deciding whether to further
10126 * scan or stop. Minimum value is 3 and maximum is 5. */
10127 A_UINT32 top_k_num;
10128 /* Preconfigured stationary threshold. Lesser value means more
10129 * conservative. Bigger value means more aggressive.
10130 * Maximum is 100 and mininum is 0. */
10131 A_UINT32 stationary_threshold;
10132 /* Periodic full channel scan in milliseconds unit.
10133 * After full_scan_period_ms since last full scan, channel prediction
10134 * scan is suppressed and will do full scan.
10135 * This is to help detecting sudden AP power-on or -off.
10136 * Value 0 means no full scan at all (not recommended).
10137 */
10138 A_UINT32 full_scan_period_ms;
10139} nlo_channel_prediction_cfg;
10140
Govind Singh42f71542016-03-14 16:32:33 +053010141typedef struct enlo_candidate_score_params_t {
10142 /*
10143 * TLV tag and len;
10144 * tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param
10145 */
10146 A_UINT32 tlv_header;
10147 /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
10148 A_INT32 min5GHz_rssi;
10149 /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
10150 A_INT32 min24GHz_rssi;
10151 /* the maximum score that a network can have before bonuses */
10152 A_UINT32 initial_score_max;
10153 /* current_connection_bonus:
10154 * only report when there is a network's score this much higher
10155 * than the current connection
10156 */
10157 A_UINT32 current_connection_bonus;
10158 /* score bonus for all networks with the same network flag */
10159 A_UINT32 same_network_bonus;
10160 /* score bonus for networks that are not open */
10161 A_UINT32 secure_bonus;
10162 /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
10163 A_UINT32 band5GHz_bonus;
10164} enlo_candidate_score_params;
10165
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010166typedef struct wmi_nlo_config {
10167 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
10168 A_UINT32 flags;
10169 A_UINT32 vdev_id;
10170 A_UINT32 fast_scan_max_cycles;
10171 A_UINT32 active_dwell_time;
10172 A_UINT32 passive_dwell_time; /* PDT in msecs */
10173 A_UINT32 probe_bundle_size;
10174 A_UINT32 rest_time; /* ART = IRT */
10175 A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
10176 A_UINT32 scan_backoff_multiplier; /* SBM */
10177 A_UINT32 fast_scan_period; /* SCBM */
10178 A_UINT32 slow_scan_period; /* specific to windows */
10179 A_UINT32 no_of_ssids;
10180 A_UINT32 num_of_channels;
10181 A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
10182 /* The TLVs will follow.
10183 * nlo_configured_parameters nlo_list[];
10184 * A_UINT32 channel_list[];
10185 * nlo_channel_prediction_cfg ch_prediction_cfg;
Govind Singh42f71542016-03-14 16:32:33 +053010186 * enlo_candidate_score_params candidate_score_params;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010187 */
10188
10189} wmi_nlo_config_cmd_fixed_param;
10190
10191typedef struct wmi_nlo_event {
10192 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
10193 A_UINT32 vdev_id;
10194} wmi_nlo_event;
10195
10196/* WMI_PASSPOINT_CONFIG_SET
10197 * Sets a list for passpoint networks for PNO purposes;
10198 * it should be matched against any passpoint networks found
10199 * during regular PNO scan.
10200 */
10201#define WMI_PASSPOINT_CONFIG_SET (0x1 << 0)
10202/* WMI_PASSPOINT_CONFIG_RESET
10203 * Reset passpoint network list -
10204 * no Passpoint networks should be matched after this.
10205 */
10206#define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1)
10207#define PASSPOINT_REALM_LEN 256
10208#define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5
10209#define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
10210#define PASSPOINT_PLMN_ID_LEN 3
10211#define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
10212 (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
10213
10214/*
10215 * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
10216 * A_UINT8 realm[PASSPOINT_REALM_LEN]
10217 * array will end on a 4-byte boundary.
10218 * (This 4-byte alignment simplifies endianness-correction byte swapping.)
10219 */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010220A_COMPILE_TIME_ASSERT(check_passpoint_realm_size, (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010221
10222/*
10223 * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
10224 * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
10225 * roaming_consortium_ids array below will end on a 4-byte boundary.
10226 * (This 4-byte alignment simplifies endianness-correction byte swapping.)
10227 */
10228A_COMPILE_TIME_ASSERT(check_passpoint_roaming_consortium_ids_size,
10229((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
10230
10231/* wildcard ID to allow an action (reset) to apply to all networks */
10232#define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
10233typedef struct wmi_passpoint_config {
10234 /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
10235 A_UINT32 tlv_header;
10236 /* (network) id
10237 * identifier of the matched network, report this in event
10238 * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
10239 * that indicates the action should be applied to all networks.
10240 * Currently, the only action that is applied to all networks is "reset".
10241 * If a non-wildcard ID is specified, that particular network is configured.
10242 * If a wildcard ID is specified, all networks are reset.
10243 */
10244 A_UINT32 id;
10245 A_UINT32 req_id;
10246 /*null terminated UTF8 encoded realm, 0 if unspecified*/
10247 A_UINT8 realm[PASSPOINT_REALM_LEN];
10248 /*roaming consortium ids to match, 0s if unspecified*/
10249 A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN];
10250 /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
10251 /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
10252 A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN];
10253} wmi_passpoint_config_cmd_fixed_param;
10254
10255typedef struct {
10256 A_UINT32 tlv_header; /* TLV tag and len; tag equals
10257wmi_passpoint_event_hdr */
10258 A_UINT32 id; /* identifier of the matched network */
10259 A_UINT32 vdev_id;
10260 A_UINT32 timestamp; /* time since boot (in microsecond) when the
10261result was retrieved*/
10262 wmi_ssid ssid;
10263 wmi_mac_addr bssid; /* bssid of the network */
10264 A_UINT32 channel_mhz; /* channel frequency in MHz */
10265 A_UINT32 rssi; /* rssi value */
10266 A_UINT32 rtt; /* timestamp in nanoseconds*/
10267 A_UINT32 rtt_sd; /* standard deviation in rtt */
10268 A_UINT32 beacon_period; /* beacon advertised in the beacon */
10269 A_UINT32 capability; /* capabilities advertised in the beacon */
10270 A_UINT32 ie_length; /* size of the ie_data blob */
10271 A_UINT32 anqp_length; /* length of ANQP blob */
10272 /**
10273 * Following this structure is the byte stream of ie data of length ie_buf_len:
10274 * A_UINT8 ie_data[]; // length in byte given by field ie_length, blob of ie data in beacon
10275 * A_UINT8 anqp_ie[]; // length in byte given by field anqp_len, blob of anqp data of IE
10276 * Implicitly, combing ie_data and anqp_ie into a single bufp, and the bytes
10277 * stream of each ie should be same as BEACON/Action-frm by 802.11 spec
10278 */
10279} wmi_passpoint_event_hdr;
10280
10281#define GTK_OFFLOAD_OPCODE_MASK 0xFF000000
10282/** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
10283#define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000
10284/** Disable GTK offload */
10285#define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000
10286/** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
10287#define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000
10288enum wmi_chatter_mode {
10289 /* Chatter enter/exit happens
10290 * automatically based on preset
10291 * params
10292 */
10293 WMI_CHATTER_MODE_AUTO,
10294 /* Chatter enter is triggered
10295 * manually by the user
10296 */
10297 WMI_CHATTER_MODE_MANUAL_ENTER,
10298 /* Chatter exit is triggered
10299 * manually by the user
10300 */
10301 WMI_CHATTER_MODE_MANUAL_EXIT,
10302 /* Placeholder max value, always last */
10303 WMI_CHATTER_MODE_MAX
10304};
10305
10306enum wmi_chatter_query_type {
10307 /*query coalescing filter match counter */
10308 WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
10309 WMI_CHATTER_QUERY_MAX
10310};
10311
10312typedef struct {
10313 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */
10314 A_UINT32 chatter_mode;
10315} wmi_chatter_set_mode_cmd_fixed_param;
10316
10317/** maximum number of filter supported*/
10318#define CHATTER_MAX_COALESCING_RULES 11
10319/** maximum number of field tests per filter*/
10320#define CHATTER_MAX_FIELD_TEST 5
10321/** maximum field length in number of DWORDS*/
10322#define CHATTER_MAX_TEST_FIELD_LEN32 2
10323
10324/** field test kinds*/
10325#define CHATTER_COALESCING_TEST_EQUAL 1
10326#define CHATTER_COALESCING_TEST_MASKED_EQUAL 2
10327#define CHATTER_COALESCING_TEST_NOT_EQUAL 3
10328
10329/** packet type*/
10330#define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0)
10331#define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1)
10332#define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2)
10333
10334/** coalescing field test*/
10335typedef struct _chatter_pkt_coalescing_hdr_test {
10336 /** offset from start of mac header, for windows native wifi host driver
10337 * should assume standard 802.11 frame format without QoS info and address4
10338 * FW would account for any non-stand fields for final offset value.
10339 */
10340 A_UINT32 offset;
10341 A_UINT32 length; /* length of test field */
10342 A_UINT32 test; /*equal, not equal or masked equal */
10343 A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream */
10344 A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream */
10345} chatter_pkt_coalescing_hdr_test;
10346
10347/** packet coalescing filter*/
10348typedef struct _chatter_pkt_coalescing_filter {
10349 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
10350 A_UINT32 filter_id; /*unique id assigned by OS */
10351 A_UINT32 max_coalescing_delay; /*max miliseconds 1st pkt can be hold */
10352 A_UINT32 pkt_type; /*unicast/multicast/broadcast */
10353 A_UINT32 num_of_test_field; /*number of field test in table */
10354 chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /*field test tbl */
10355} chatter_pkt_coalescing_filter;
10356
10357/** packet coalescing filter add command*/
10358typedef struct {
10359 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
10360 A_UINT32 num_of_filters;
10361 /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
10362 chatter_pkt_coalescing_filter rx_filter[1]; */
10363} wmi_chatter_coalescing_add_filter_cmd_fixed_param;
10364/** packet coalescing filter delete command*/
10365typedef struct {
10366 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
10367 A_UINT32 filter_id; /*filter id which will be deleted */
10368} wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
10369/** packet coalescing query command*/
10370typedef struct {
10371 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
10372 A_UINT32 type; /*type of query */
10373} wmi_chatter_coalescing_query_cmd_fixed_param;
10374/** chatter query reply event*/
10375typedef struct {
10376 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */
10377 A_UINT32 type; /*query type */
10378 A_UINT32 filter_match_cnt; /*coalescing filter match counter */
10379} wmi_chatter_query_reply_event_fixed_param;
10380
10381/* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
10382 * cannot be changed without breaking WMI compatibility. */
10383#define GTK_OFFLOAD_KEK_BYTES 16
10384#define GTK_OFFLOAD_KCK_BYTES 16
10385/* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
10386#define GTK_REPLAY_COUNTER_BYTES 8
10387#define WMI_MAX_KEY_LEN 32
10388#define IGTK_PN_SIZE 6
10389
10390typedef struct {
10391 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
10392 A_UINT32 vdev_id;
10393 /** unique id identifying the VDEV */
10394 A_UINT32 flags; /* status flags */
10395 A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
10396 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
10397 A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
10398 A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
10399 A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
10400 A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
10401} WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
10402
10403typedef struct {
10404 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
10405 A_UINT32 vdev_id; /** unique id identifying the VDEV */
10406 A_UINT32 flags; /* control flags, GTK offload command use high byte */
10407 /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
10408 A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
10409 A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
10410 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
10411} WMI_GTK_OFFLOAD_CMD_fixed_param;
10412
10413typedef struct {
10414 /* TLV tag and len; tag equals
10415 * WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param
10416 */
10417 A_UINT32 tlv_header;
10418 A_UINT32 vdev_id;
10419 A_UINT32 sa_query_retry_interval; /* in msec */
10420 A_UINT32 sa_query_max_retry_count;
10421} WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
10422
10423typedef enum {
10424 WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
10425 WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
10426 WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK */
10427 /* gratuitous ARP req*/
10428 WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4,
10429} WMI_STA_KEEPALIVE_METHOD;
10430
10431typedef struct {
10432 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
10433 WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
10434 WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
10435 wmi_mac_addr dest_mac_addr; /* destination MAC address */
10436} WMI_STA_KEEPALVE_ARP_RESPONSE;
10437
10438typedef struct {
10439 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
10440 A_UINT32 vdev_id;
10441 A_UINT32 enable; /* 1 - Enable, 0 - disable */
10442 A_UINT32 method; /* keep alive method */
10443 A_UINT32 interval; /* time interval in seconds */
10444 /*
10445 * NOTE: following this structure is the TLV for ARP Resonse:
10446 * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; // ARP response
10447 */
10448} WMI_STA_KEEPALIVE_CMD_fixed_param;
10449
10450typedef struct {
10451 A_UINT32 tlv_header;
10452 A_UINT32 vdev_id;
10453 A_UINT32 action;
10454} WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
10455typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
10456
10457typedef struct {
10458 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
10459 A_UINT32 vdev_id;
10460 A_UINT32 keepaliveInterval; /* seconds */
10461 A_UINT32 keepaliveMethod;
10462} wmi_vdev_set_keepalive_cmd_fixed_param;
10463
10464typedef struct {
10465 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
10466 A_UINT32 vdev_id;
10467} wmi_vdev_get_keepalive_cmd_fixed_param;
10468
10469typedef struct {
10470 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
10471 A_UINT32 vdev_id;
10472 A_UINT32 keepaliveInterval; /* seconds */
10473 A_UINT32 keepaliveMethod; /* seconds */
10474} wmi_vdev_get_keepalive_event_fixed_param;
10475
10476#define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
10477#define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
10478
10479typedef struct {
10480 A_UINT32 tlv_header;
10481 A_UINT32 vdev_id;
10482 A_UINT32 action;
10483} WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
10484
10485typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param
10486WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
10487
10488typedef struct {
10489 A_UINT32 tlv_header;
10490 A_UINT32 vdev_id;
10491 A_UINT32 mcc_tbttmode;
10492 wmi_mac_addr mcc_bssid;
10493} wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
10494
10495typedef struct {
10496 A_UINT32 tlv_header;
10497 A_UINT32 vdev_id; /* home vdev id */
10498 A_UINT32 meas_token; /* from measure request frame */
10499 A_UINT32 dialog_token;
10500 A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
10501 A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst */
10502 A_UINT32 burst_cycle; /* times cycle through within one burst */
10503 A_UINT32 tx_power; /* for path frame */
10504 A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */
10505 wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
10506 A_UINT32 num_chans;
10507} wmi_vdev_plmreq_start_cmd_fixed_param;
10508
10509typedef struct {
10510 A_UINT32 tlv_header;
10511 A_UINT32 vdev_id;
10512 A_UINT32 meas_token; /* same value from req */
10513} wmi_vdev_plmreq_stop_cmd_fixed_param;
10514
10515typedef struct {
10516 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */
10517 A_UINT32 tlv_header;
10518 /* unique id identifying the VDEV, generated by the caller */
10519 A_UINT32 vdev_id;
10520 /* enable/disable NoA */
10521 A_UINT32 enable;
10522 /** number of NoA desc. In the TLV noa_descriptor[] */
10523 A_UINT32 num_noa;
10524 /**
10525 * TLV (tag length value ) paramerters follow the pattern structure.
10526 * TLV contain NoA desc with num of num_noa
10527 */
10528} wmi_p2p_set_noa_cmd_fixed_param;
10529
10530typedef struct {
10531 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */
10532 A_UINT32 tlv_header;
10533 /* unique id identifying the VDEV, generated by the caller */
10534 A_UINT32 vdev_id;
10535 /* Identify the wlan module */
10536 A_UINT32 module_id;
10537 /* Num of test arguments passed */
10538 A_UINT32 num_args;
10539/**
10540 * TLV (tag length value ) parameters follow the wmi_roam_chan_list
10541 * structure. The TLV's are:
10542 * A_UINT32 args[];
10543 **/
10544} wmi_unit_test_cmd_fixed_param;
10545
10546/** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
10547 * after it received WMI_ROAM_SYNCH_EVENTID.
10548 */
10549typedef struct {
10550 A_UINT32 tlv_header;
10551 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
10552 /** unique id identifying the VDEV, generated by the caller */
10553 A_UINT32 vdev_id;
10554} wmi_roam_synch_complete_fixed_param;
10555
10556typedef enum {
10557 RECOVERY_SIM_ASSERT = 0x01,
10558 RECOVERY_SIM_NO_DETECT = 0x02,
10559 RECOVERY_SIM_CTR_EP_FULL = 0x03,
10560 RECOVERY_SIM_EMPTY_POINT = 0x04,
10561 RECOVERY_SIM_STACK_OV = 0x05,
10562 RECOVERY_SIM_INFINITE_LOOP = 0x06,
10563 RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
10564 RECOVERY_SIM_SELF_RECOVERY = 0x08,
10565} RECOVERY_SIM_TYPE;
10566
10567/* WMI_FORCE_FW_HANG_CMDID */
10568typedef struct {
10569 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
10570 A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:... */
10571 A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms) */
10572} WMI_FORCE_FW_HANG_CMD_fixed_param;
Krishna Kumaar Natarajan2f7a44d2016-07-08 11:24:06 -070010573
10574typedef enum {
10575 WMI_MCAST_FILTER_SET = 1,
10576 WMI_MCAST_FILTER_DELETE
10577} WMI_SET_SINGLE_MCAST_FILTER_OP;
10578
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010579typedef struct {
10580 A_UINT32 tlv_header;
10581 A_UINT32 vdev_id;
10582 A_UINT32 index;
10583 A_UINT32 action;
10584 wmi_mac_addr mcastbdcastaddr;
10585} WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
10586
Krishna Kumaar Natarajan2f7a44d2016-07-08 11:24:06 -070010587typedef enum {
10588 WMI_MULTIPLE_MCAST_FILTER_CLEAR = 1, /* clear all previous mc list */
10589 /* clear all previous mc list, and set new list */
10590 WMI_MULTIPLE_MCAST_FILTER_SET,
10591 WMI_MULTIPLE_MCAST_FILTER_DELETE, /* delete one/multiple mc list */
10592 WMI_MULTIPLE_MCAST_FILTER_ADD /* add one/multiple mc list */
10593} WMI_MULTIPLE_MCAST_FILTER_OP;
10594
10595typedef struct {
10596 A_UINT32 tlv_header;
10597 A_UINT32 vdev_id;
10598 A_UINT32 operation; /* refer WMI_MULTIPLE_MCAST_FILTER_OP */
10599 /* number of elements in the subsequent mcast addr list */
10600 A_UINT32 num_mcastaddrs;
10601 /**
10602 * TLV (tag length value) parameters follow the
10603 * structure. The TLV's are:
10604 * wmi_mac_addr mcastaddr_list[num_mcastaddrs];
10605 */
10606} WMI_SET_MULTIPLE_MCAST_FILTER_CMD_fixed_param;
10607
10608
Himanshu Agarwalb0497b52016-05-13 21:03:37 +053010609/* WMI_DBGLOG_TIME_STAMP_SYNC_CMDID */
10610typedef enum {
10611 WMI_TIME_STAMP_SYNC_MODE_MS, /* millisecond units */
10612 WMI_TIME_STAMP_SYNC_MODE_US, /* microsecond units */
10613} WMI_TIME_STAMP_SYNC_MODE;
10614
10615typedef struct {
10616 /*
10617 * TLV tag and len; tag equals
10618 * WMITLV_TAG_STRUC_wmi_dbglog_time_stamp_sync_cmd_fixed_param
10619 */
10620 A_UINT32 tlv_header;
10621 /* 0: millisec, 1: microsec (see WMI_TIME_STAMP_SYNC_MODE) */
10622 A_UINT32 mode;
10623 A_UINT32 time_stamp_low; /* lower 32 bits of remote time stamp */
10624 A_UINT32 time_stamp_high; /* higher 32 bits of remote time stamp */
10625} WMI_DBGLOG_TIME_STAMP_SYNC_CMD_fixed_param;
10626
10627
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010628/* GPIO Command and Event data structures */
10629
10630/* WMI_GPIO_CONFIG_CMDID */
10631enum {
10632 WMI_GPIO_PULL_NONE,
10633 WMI_GPIO_PULL_UP,
10634 WMI_GPIO_PULL_DOWN,
10635};
10636
10637enum {
10638 WMI_GPIO_INTTYPE_DISABLE,
10639 WMI_GPIO_INTTYPE_RISING_EDGE,
10640 WMI_GPIO_INTTYPE_FALLING_EDGE,
10641 WMI_GPIO_INTTYPE_BOTH_EDGE,
10642 WMI_GPIO_INTTYPE_LEVEL_LOW,
10643 WMI_GPIO_INTTYPE_LEVEL_HIGH
10644};
10645
10646typedef struct {
10647 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
10648 A_UINT32 gpio_num; /* GPIO number to be setup */
10649 A_UINT32 input; /* 0 - Output/ 1 - Input */
10650 A_UINT32 pull_type; /* Pull type defined above */
10651 A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
10652} wmi_gpio_config_cmd_fixed_param;
10653
10654/* WMI_GPIO_OUTPUT_CMDID */
10655typedef struct {
10656 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
10657 A_UINT32 gpio_num; /* GPIO number to be setup */
10658 A_UINT32 set; /* Set the GPIO pin */
10659} wmi_gpio_output_cmd_fixed_param;
10660
10661/* WMI_GPIO_INPUT_EVENTID */
10662typedef struct {
10663 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
10664 A_UINT32 gpio_num; /* GPIO number which changed state */
10665} wmi_gpio_input_event_fixed_param;
10666
10667/* WMI_P2P_DISC_EVENTID */
10668enum {
10669 P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
10670 P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
10671};
10672
10673enum {
10674 P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload */
10675 P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload */
10676 P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload */
10677};
10678
10679enum {
10680 P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
10681 P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
10682};
10683
10684typedef struct {
10685 A_UINT32 vdev_id;
10686 A_UINT32 reason; /* P2P DISC wake up reason */
10687} wmi_p2p_disc_event;
10688
10689typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param
10690WOW_EVENT_INFO_SECTION_GTKIGTK;
10691
10692typedef enum {
10693 WMI_FAKE_TXBFER_SEND_NDPA,
10694 WMI_FAKE_TXBFER_SEND_MU,
10695 WMI_FAKE_TXBFER_NDPA_FBTYPE,
10696 WMI_FAKE_TXBFER_NDPA_NCIDX,
10697 WMI_FAKE_TXBFER_NDPA_POLL,
10698 WMI_FAKE_TXBFER_NDPA_BW,
10699 WMI_FAKE_TXBFER_NDPA_PREAMBLE,
10700 WMI_FAKE_TXBFER_NDPA_RATE,
10701 WMI_FAKE_TXBFER_NDP_BW,
10702 WMI_FAKE_TXBFER_NDP_NSS,
10703 WMI_TXBFEE_ENABLE_UPLOAD_H,
10704 WMI_TXBFEE_ENABLE_CAPTURE_H,
10705 WMI_TXBFEE_SET_CBF_TBL,
10706 WMI_TXBFEE_CBF_TBL_LSIG,
10707 WMI_TXBFEE_CBF_TBL_SIGA1,
10708 WMI_TXBFEE_CBF_TBL_SIGA2,
10709 WMI_TXBFEE_CBF_TBL_SIGB,
10710 WMI_TXBFEE_CBF_TBL_PAD,
10711 WMI_TXBFEE_CBF_TBL_DUR,
10712 WMI_TXBFEE_SU_NCIDX,
10713 WMI_TXBFEE_CBIDX,
10714 WMI_TXBFEE_NGIDX,
10715} WMI_TXBF_PARAM_ID;
10716
10717typedef struct {
10718 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
10719 /** parameter id */
10720 A_UINT32 param_id;
10721 /** parameter value */
10722 A_UINT32 param_value;
10723} wmi_txbf_cmd_fixed_param;
10724
10725typedef struct {
10726 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
10727 A_UINT32 h_length;
10728 A_UINT32 cv_length;
10729 /* This TLV is followed by array of bytes:
10730 * // h_cv info buffer
10731 * A_UINT8 bufp[];
10732 */
10733} wmi_upload_h_hdr;
10734
10735typedef struct {
10736 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
10737 A_UINT32 svd_num;
10738 A_UINT32 tone_num;
10739 A_UINT32 reserved;
10740} wmi_capture_h_event_hdr;
10741
10742typedef struct {
10743 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
10744 A_UINT32 start_freq; /* start frequency, not channel center freq */
10745 A_UINT32 end_freq; /* end frequency */
10746} wmi_avoid_freq_range_desc;
10747
10748typedef struct {
10749 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
10750 /* bad channel range count, multi range is allowed, 0 means all channel clear */
10751 A_UINT32 num_freq_ranges;
10752
10753 /* The TLVs will follow.
10754 * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
10755 * wmi_avoid_freq_range_desc avd_freq_range[]; // message buffer, NULL terminated
10756 */
10757} wmi_avoid_freq_ranges_event_fixed_param;
10758
10759typedef struct {
10760 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */
10761 /** Reserved for future use */
10762 A_UINT32 reserved0;
10763 A_UINT32 vdev_id;
10764} wmi_gtk_rekey_fail_event_fixed_param;
10765
10766enum wmm_ac_downgrade_policy {
10767 WMM_AC_DOWNGRADE_DEPRIO,
10768 WMM_AC_DOWNGRADE_DROP,
10769 WMM_AC_DOWNGRADE_INVALID,
10770};
10771
Himanshu Agarwal2690e462016-06-03 14:26:01 +053010772/* WMM EDCA Params type */
10773#define WMM_PARAM_TYPE_LEGACY 0
10774/* Relaxed EDCA parameters for 11ax to be used in case of triggered access */
10775#define WMM_PARAM_TYPE_11AX_EDCA 1
10776
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010777typedef struct {
10778 A_UINT32 tlv_header;
10779 A_UINT32 cwmin;
10780 A_UINT32 cwmax;
10781 A_UINT32 aifs;
10782 A_UINT32 txoplimit;
10783 A_UINT32 acm;
10784 A_UINT32 no_ack;
10785} wmi_wmm_vparams;
10786
10787typedef struct {
10788 A_UINT32 tlv_header;
10789 A_UINT32 vdev_id;
10790 wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
Himanshu Agarwal2690e462016-06-03 14:26:01 +053010791 A_UINT32 wmm_param_type; /* see WMM_PARAM_TYPE_xxx defs */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010792} wmi_vdev_set_wmm_params_cmd_fixed_param;
10793
10794typedef struct {
10795 A_UINT32 tlv_header;
10796 A_UINT32 vdev_id;
10797 A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */
10798 A_UINT32 userGtxMask; /* host request for GTX mask */
10799 A_UINT32 gtxPERThreshold; /* default: 10% */
10800 A_UINT32 gtxPERMargin; /* default: 2% */
10801 A_UINT32 gtxTPCstep; /* default: 1 */
10802 A_UINT32 gtxTPCMin; /* default: 5 */
10803 A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */
10804} wmi_vdev_set_gtx_params_cmd_fixed_param;
10805
10806typedef struct {
10807 A_UINT32 tlv_header;
10808 A_UINT32 vdev_id;
10809 A_UINT32 ac;
10810 A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
10811 A_UINT32 downgrade_type;
10812} wmi_vdev_wmm_addts_cmd_fixed_param;
10813
10814typedef struct {
10815 A_UINT32 tlv_header;
10816 A_UINT32 vdev_id;
10817 A_UINT32 ac;
10818} wmi_vdev_wmm_delts_cmd_fixed_param;
10819
Govind Singh869c9872016-02-22 18:36:34 +053010820/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010821typedef struct {
10822 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */
10823 /** Reserved for future use */
10824 A_UINT32 reserved0;
10825} wmi_pdev_dfs_enable_cmd_fixed_param;
10826
Govind Singh869c9872016-02-22 18:36:34 +053010827/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010828typedef struct {
10829 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 +053010830 /** pdev_id for identifying the MAC
10831 * See macros starting with WMI_PDEV_ID_ for values.
10832 */
10833 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010834} wmi_pdev_dfs_disable_cmd_fixed_param;
10835
10836typedef struct {
10837 /** TLV tag and len; tag equals
10838 * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
10839 */
10840 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053010841 /** pdev_id for identifying the MAC
10842 * See macros starting with WMI_PDEV_ID_ for values.
10843 */
10844 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010845} wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
10846
10847typedef struct {
10848 /** TLV tag and len; tag equals
10849 * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
10850 */
10851 A_UINT32 tlv_header;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +053010852 /** pdev_id for identifying the MAC
10853 * See macros starting with WMI_PDEV_ID_ for values.
10854 */
10855 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010856} wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
10857
10858/** TDLS COMMANDS */
10859
10860/* WMI_TDLS_SET_STATE_CMDID */
10861/* TDLS State */
10862enum wmi_tdls_state {
10863 /** TDLS disable */
10864 WMI_TDLS_DISABLE,
10865 /** TDLS enabled - no firmware connection tracking/notifications */
10866 WMI_TDLS_ENABLE_PASSIVE,
10867 /** TDLS enabled - with firmware connection tracking/notifications */
10868 WMI_TDLS_ENABLE_ACTIVE,
10869 /* TDLS enabled - firmware waits for peer mac for connection tracking */
10870 WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +053010871 /** TDLS enabled - TDLS connection tracking is done in host */
10872 WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010873};
10874
10875/* TDLS Options */
10876#define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */
10877#define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */
10878#define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */
10879
10880typedef struct {
10881 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */
10882 A_UINT32 tlv_header;
10883 /** unique id identifying the VDEV */
10884 A_UINT32 vdev_id;
10885 /** Enable/Disable TDLS (wmi_tdls_state) */
10886 A_UINT32 state;
10887 /* Duration (in ms) over which to calculate tx/rx threshold
10888 * to trigger TDLS Discovery
10889 */
10890 A_UINT32 notification_interval_ms;
10891 /** number of packets OVER which notify/suggest TDLS Discovery:
10892 * if current tx pps counter / notification interval >= threshold
10893 * then a notification will be sent to host to advise TDLS Discovery */
10894 A_UINT32 tx_discovery_threshold;
10895 /** number of packets UNDER which notify/suggest TDLS Teardown:
10896 * if current tx pps counter / notification interval < threshold
10897 * then a notification will be sent to host to advise TDLS Tear down */
10898 A_UINT32 tx_teardown_threshold;
10899 /** Absolute RSSI value under which notify/suggest TDLS Teardown */
10900 A_INT32 rssi_teardown_threshold;
10901 /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
10902 A_INT32 rssi_delta;
10903 /** TDLS Option Control
10904 * Off-Channel, Buffer STA, (later)Sleep STA support */
10905 A_UINT32 tdls_options;
10906 /* Buffering time in number of beacon intervals */
10907 A_UINT32 tdls_peer_traffic_ind_window;
10908 /* Wait time for PTR frame */
10909 A_UINT32 tdls_peer_traffic_response_timeout_ms;
10910 /* Self PUAPSD mask */
10911 A_UINT32 tdls_puapsd_mask;
10912 /* Inactivity timeout */
10913 A_UINT32 tdls_puapsd_inactivity_time_ms;
10914 /* Max of rx frame during SP */
10915 A_UINT32 tdls_puapsd_rx_frame_threshold;
10916 /* Duration (in ms) over which to check whether TDLS link
10917 * needs to be torn down
10918 */
10919 A_UINT32 teardown_notification_ms;
10920 /* STA kickout threshold for TDLS peer */
10921 A_UINT32 tdls_peer_kickout_threshold;
10922} wmi_tdls_set_state_cmd_fixed_param;
10923
10924/* WMI_TDLS_PEER_UPDATE_CMDID */
10925
10926enum wmi_tdls_peer_state {
10927 /** tx peer TDLS link setup now starting, traffic to DA should be
10928 * paused (except TDLS frames) until state is moved to CONNECTED (or
10929 * TEARDOWN on setup failure) */
10930 WMI_TDLS_PEER_STATE_PEERING,
10931 /** tx peer TDLS link established, running (all traffic to DA unpaused) */
10932 WMI_TDLS_PEER_STATE_CONNECTED,
10933 /** tx peer TDLS link tear down started (link paused, any frames
10934 * queued for DA will be requeued back through the AP)*/
10935 WMI_TDLS_PEER_STATE_TEARDOWN,
10936 /* Add peer mac into connection table */
10937 WMI_TDLS_PEER_ADD_MAC_ADDR,
10938 /* Remove peer mac from connection table */
10939 WMI_TDLS_PEER_REMOVE_MAC_ADDR,
10940};
10941
10942/* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
10943#define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
10944typedef struct {
10945 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */
10946 A_UINT32 tlv_header;
10947 /* Peer's QoS Info - for U-APSD */
10948 /* AC FLAGS - accessed through macros below */
10949 /* Ack, SP, More Data Ack - accessed through macros below */
10950 A_UINT32 peer_qos;
10951 /*TDLS Peer's U-APSD Buffer STA Support */
10952 A_UINT32 buff_sta_support;
10953 /*TDLS off channel related params */
10954 A_UINT32 off_chan_support;
10955 A_UINT32 peer_curr_operclass;
10956 A_UINT32 self_curr_operclass;
10957 /* Number of channels available for off channel operation */
10958 A_UINT32 peer_chan_len;
10959 A_UINT32 peer_operclass_len;
10960 A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
10961 /* Is peer initiator or responder of TDLS setup request */
10962 A_UINT32 is_peer_responder;
10963 /* Preferred off channel number as configured by user */
10964 A_UINT32 pref_offchan_num;
10965 /* Preferred off channel bandwidth as configured by user */
10966 A_UINT32 pref_offchan_bw;
10967
10968 /** Followed by the variable length TLV peer_chan_list:
10969 * wmi_channel peer_chan_list[].
10970 * Array size would be peer_chan_len.
10971 * This array is intersected channels which is supported by both peer
10972 * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
10973 * FW shall compute BW for an offchan based on peer's ht/vht cap
10974 * received in peer_assoc cmd during change STA operation
10975 */
10976} wmi_tdls_peer_capabilities;
10977
10978#define WMI_TDLS_QOS_VO_FLAG 0
10979#define WMI_TDLS_QOS_VI_FLAG 1
10980#define WMI_TDLS_QOS_BK_FLAG 2
10981#define WMI_TDLS_QOS_BE_FLAG 3
10982#define WMI_TDLS_QOS_ACK_FLAG 4
10983#define WMI_TDLS_QOS_SP_FLAG 5
10984#define WMI_TDLS_QOS_MOREDATA_FLAG 7
10985
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010986#define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010987 (ppeer_caps)->peer_qos |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010988} while (0)
10989#define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010990 (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
10991
10992#define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
10993 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
10994#define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
10995 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
10996#define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
10997 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
10998#define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
10999 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
11000#define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
11001 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
11002#define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
11003 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
11004#define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
11005 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
11006#define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
11007 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
11008#define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
11009 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
11010#define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
11011 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
11012/* SP has 2 bits */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011013#define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011014 (ppeer_caps)->peer_qos |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011015} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011016#define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
11017 (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
11018
11019#define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
11020 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
11021#define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
11022 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
11023
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011024#define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011025 (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011026} while (0)
11027#define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011028 (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
11029
11030#define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
11031 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
11032#define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
11033 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
11034#define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
11035 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
11036#define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
11037 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
11038#define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
11039 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
11040#define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
11041 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
11042#define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
11043 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
11044#define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
11045 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
11046#define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
11047 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
11048#define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
11049 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
11050/* SP has 2 bits */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011051#define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011052 (pset_cmd)->tdls_puapsd_mask |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011053} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011054#define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
11055 (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
11056
11057#define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
11058 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
11059#define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
11060 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
11061
11062typedef struct {
11063 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */
11064 A_UINT32 tlv_header;
11065 /** unique id identifying the VDEV */
11066 A_UINT32 vdev_id;
11067 /** peer MAC address */
11068 wmi_mac_addr peer_macaddr;
11069 /** new TDLS state for peer (wmi_tdls_peer_state) */
11070 A_UINT32 peer_state;
11071 /* The TLV for wmi_tdls_peer_capabilities will follow.
11072 * wmi_tdls_peer_capabilities peer_caps;
11073 */
11074 /** Followed by the variable length TLV chan_info:
11075 * wmi_channel chan_info[] */
11076} wmi_tdls_peer_update_cmd_fixed_param;
11077
11078/* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
11079
11080/* bitmap 20, 40, 80 or 160 MHz wide channel */
11081#define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */
11082#define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */
11083#define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */
11084#define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */
11085
11086enum wmi_tdls_offchan_mode {
11087 WMI_TDLS_ENABLE_OFFCHANNEL,
11088 WMI_TDLS_DISABLE_OFFCHANNEL
11089};
11090
11091typedef struct {
11092 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */
11093 A_UINT32 tlv_header;
11094 /** unique id identifying the VDEV */
11095 A_UINT32 vdev_id;
11096 /** Enable/Disable TDLS offchannel */
11097 A_UINT32 offchan_mode;
11098 /** peer MAC address */
11099 wmi_mac_addr peer_macaddr;
11100 /* Is peer initiator or responder of TDLS setup request */
11101 A_UINT32 is_peer_responder;
11102 /* off channel number */
11103 A_UINT32 offchan_num;
11104 /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
11105 A_UINT32 offchan_bw_bitmap;
11106 /* operating class for offchan */
11107 A_UINT32 offchan_oper_class;
11108} wmi_tdls_set_offchan_mode_cmd_fixed_param;
11109
11110/** TDLS EVENTS */
11111enum wmi_tdls_peer_notification {
11112 /** tdls discovery recommended for peer (based
11113 * on tx bytes per second > tx_discover threshold) */
11114 WMI_TDLS_SHOULD_DISCOVER,
11115 /** tdls link tear down recommended for peer
11116 * due to tx bytes per second below tx_teardown_threshold
11117 * NB: this notification sent once */
11118 WMI_TDLS_SHOULD_TEARDOWN,
11119 /** tx peer TDLS link tear down complete */
11120 WMI_TDLS_PEER_DISCONNECTED,
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +053011121 /** TDLS/BT role change notification for connection tracker */
11122 WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011123};
11124
11125enum wmi_tdls_peer_reason {
11126 /** tdls teardown recommended due to low transmits */
11127 WMI_TDLS_TEARDOWN_REASON_TX,
11128 /** tdls link tear down recommended due to poor RSSI */
11129 WMI_TDLS_TEARDOWN_REASON_RSSI,
11130 /** tdls link tear down recommended due to offchannel scan */
11131 WMI_TDLS_TEARDOWN_REASON_SCAN,
11132 /** tdls peer disconnected due to peer deletion */
11133 WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
11134 /** tdls peer disconnected due to PTR timeout */
11135 WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
11136 /** tdls peer disconnected due wrong PTR format */
11137 WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
11138 /** tdls peer not responding */
11139 WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +053011140 /*
11141 * tdls entered buffer STA role, TDLS connection tracker
11142 * needs to handle this
11143 */
11144 WMI_TDLS_ENTER_BUF_STA,
11145 /*
11146 * tdls exited buffer STA role, TDLS connection tracker
11147 * needs to handle this
11148 */
11149 WMI_TDLS_EXIT_BUF_STA,
11150 /* BT entered busy mode, TDLS connection tracker needs to handle this */
11151 WMI_TDLS_ENTER_BT_BUSY_MODE,
11152 /** BT exited busy mode, TDLS connection tracker needs to handle this */
11153 WMI_TDLS_EXIT_BT_BUSY_MODE,
Selvaraj, Sridhar217e9a92016-06-28 14:49:13 +053011154 /*
11155 * TDLS module received a scan start event, TDLS connection tracker
11156 * needs to handle this
11157 */
11158 WMI_TDLS_SCAN_STARTED_EVENT,
11159 /*
11160 * TDLS module received a scan complete event, TDLS connection tracker
11161 * needs to handle this
11162 */
11163 WMI_TDLS_SCAN_COMPLETED_EVENT,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011164};
11165
11166/* WMI_TDLS_PEER_EVENTID */
11167typedef struct {
11168 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */
11169 A_UINT32 tlv_header;
11170 /** peer MAC address */
11171 wmi_mac_addr peer_macaddr;
11172 /** TDLS peer status (wmi_tdls_peer_notification)*/
11173 A_UINT32 peer_status;
11174 /** TDLS peer reason (wmi_tdls_peer_reason) */
11175 A_UINT32 peer_reason;
11176 /** unique id identifying the VDEV */
11177 A_UINT32 vdev_id;
11178} wmi_tdls_peer_event_fixed_param;
11179
11180/* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
11181 don't use this for any new implementations */
11182typedef struct {
11183 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */
11184 /** unique id identifying the VDEV, generated by the caller */
11185 A_UINT32 vdev_id;
11186 /* New beacon interval to be used for the specified VDEV suggested by firmware */
11187 A_UINT32 new_bcn_intvl;
11188} wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
11189
11190/* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
11191typedef struct {
11192 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
11193 A_UINT32 tlv_header;
11194 /** 1: enable fw based adaptive ocs,
11195 * 0: disable fw based adaptive ocs
11196 */
11197 A_UINT32 enable;
11198 /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
Govind Singh869c9872016-02-22 18:36:34 +053011199 union {
11200 /* OBSOLETE - will be removed once all refs are gone */
11201 A_UINT32 mac_id;
11202 /** pdev_id for identifying the MAC
11203 * See macros starting with WMI_PDEV_ID_ for values.
11204 */
11205 A_UINT32 pdev_id;
11206 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011207} wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
11208
11209/* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
11210typedef struct {
11211 /* Frequency of the channel for which the quota is set */
11212 A_UINT32 chan_mhz;
11213 /* Requested channel time quota expressed as percentage */
11214 A_UINT32 channel_time_quota;
11215} wmi_resmgr_chan_time_quota;
11216
11217typedef struct {
11218 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
11219 A_UINT32 tlv_header;
11220 /** number of channel time quota command structures
11221 * (wmi_resmgr_chan_time_quota) 1 or 2
11222 */
11223 A_UINT32 num_chans;
11224/* This TLV is followed by another TLV of array of bytes
11225 * A_UINT8 data[];
11226 * This data array contains
11227 * num_chans * size of(struct wmi_resmgr_chan_time_quota)
11228 */
11229} wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
11230
11231/* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
11232typedef struct {
11233 /* Frequency of the channel for which the latency is set */
11234 A_UINT32 chan_mhz;
11235 /* Requested channel latency in milliseconds */
11236 A_UINT32 latency;
11237} wmi_resmgr_chan_latency;
11238
11239typedef struct {
11240 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
11241 A_UINT32 tlv_header;
11242 /** number of channel latency command structures
11243 * (wmi_resmgr_chan_latency) 1 or 2
11244 */
11245 A_UINT32 num_chans;
11246/* This TLV is followed by another TLV of array of bytes
11247 * A_UINT8 data[];
11248 * This data array contains
11249 * num_chans * size of(struct wmi_resmgr_chan_latency)
11250 */
11251} wmi_resmgr_set_chan_latency_cmd_fixed_param;
11252
11253/* WMI_STA_SMPS_FORCE_MODE_CMDID */
11254
11255/** STA SMPS Forced Mode */
11256typedef enum {
11257 WMI_SMPS_FORCED_MODE_NONE = 0,
11258 WMI_SMPS_FORCED_MODE_DISABLED,
11259 WMI_SMPS_FORCED_MODE_STATIC,
11260 WMI_SMPS_FORCED_MODE_DYNAMIC
11261} wmi_sta_smps_forced_mode;
11262
11263typedef struct {
11264 /** TLV tag and len; tag equals
11265 * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
11266 A_UINT32 tlv_header;
11267 /** Unique id identifying the VDEV */
11268 A_UINT32 vdev_id;
11269 /** The mode of SMPS that is to be forced in the FW. */
11270 A_UINT32 forced_mode;
11271} wmi_sta_smps_force_mode_cmd_fixed_param;
11272
11273/** wlan HB commands */
11274#define WMI_WLAN_HB_ITEM_UDP 0x1
11275#define WMI_WLAN_HB_ITEM_TCP 0x2
11276#define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE, must be a multiple of 4 bytes */
11277
11278typedef struct {
11279 /** TLV tag and len; tag equals
11280 * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
11281 A_UINT32 tlv_header;
11282 A_UINT32 vdev_id;
11283 A_UINT32 enable;
11284 A_UINT32 item;
11285 A_UINT32 session;
11286} wmi_hb_set_enable_cmd_fixed_param;
11287
11288typedef struct {
11289 /** TLV tag and len; tag equals
11290 * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
11291 A_UINT32 tlv_header;
11292 A_UINT32 vdev_id;
11293 A_UINT32 srv_ip;
11294 A_UINT32 dev_ip;
11295 A_UINT32 seq;
11296 A_UINT32 src_port;
11297 A_UINT32 dst_port;
11298 A_UINT32 interval;
11299 A_UINT32 timeout;
11300 A_UINT32 session;
11301 wmi_mac_addr gateway_mac;
11302} wmi_hb_set_tcp_params_cmd_fixed_param;
11303
11304typedef struct {
11305 /** TLV tag and len; tag equals
11306 * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
11307 A_UINT32 tlv_header;
11308 A_UINT32 vdev_id;
11309 A_UINT32 length;
11310 A_UINT32 offset;
11311 A_UINT32 session;
11312 A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
11313} wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
11314
11315typedef struct {
11316 /** TLV tag and len; tag equals
11317 * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
11318 A_UINT32 tlv_header;
11319 A_UINT32 vdev_id;
11320 A_UINT32 srv_ip;
11321 A_UINT32 dev_ip;
11322 A_UINT32 src_port;
11323 A_UINT32 dst_port;
11324 A_UINT32 interval;
11325 A_UINT32 timeout;
11326 A_UINT32 session;
11327 wmi_mac_addr gateway_mac;
11328} wmi_hb_set_udp_params_cmd_fixed_param;
11329
11330typedef struct {
11331 /** TLV tag and len; tag equals
11332 * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
11333 A_UINT32 tlv_header;
11334 A_UINT32 vdev_id;
11335 A_UINT32 length;
11336 A_UINT32 offset;
11337 A_UINT32 session;
11338 A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
11339} wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
11340
11341/** wlan HB events */
11342typedef enum {
11343 WMI_WLAN_HB_REASON_UNKNOWN = 0,
11344 WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1,
11345 WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2,
11346} WMI_HB_WAKEUP_REASON;
11347
11348typedef struct {
11349 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
11350 A_UINT32 vdev_id; /* unique id identifying the VDEV */
11351 A_UINT32 session; /* Session ID from driver */
11352 A_UINT32 reason; /* wakeup reason */
11353} wmi_hb_ind_event_fixed_param;
11354
11355/** WMI_STA_SMPS_PARAM_CMDID */
11356typedef enum {
11357 /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
11358 WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
11359 /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
11360 * to enter D-SMPS mode from Stalled-D-SMPS mode */
11361 WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
11362 /** RSSI threshold to disable SMPS modes */
11363 WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
11364 /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
11365 WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
11366 /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
11367 WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
11368 /** Enable/Disable DTIM 1chRx feature */
11369 WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5
11370} wmi_sta_smps_param;
11371
11372typedef struct {
11373 /** TLV tag and len; tag equals
11374 * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
11375 A_UINT32 tlv_header;
11376 /** Unique id identifying the VDEV */
11377 A_UINT32 vdev_id;
11378 /** SMPS parameter (see wmi_sta_smps_param) */
11379 A_UINT32 param;
11380 /** Value of SMPS parameter */
11381 A_UINT32 value;
11382} wmi_sta_smps_param_cmd_fixed_param;
11383
11384typedef struct {
11385 /** TLV tag and len; tag equals
11386 * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
11387 A_UINT32 tlv_header;
11388 /* TX stats */
11389 A_UINT32 txBytesPushed;
11390 A_UINT32 txPacketsPushed;
11391 /* RX stats */
11392 A_UINT32 rxBytesRcvd;
11393 A_UINT32 rxPacketsRcvd;
11394 A_UINT32 rxTimeTotal;
11395 /** peer MAC address */
11396 wmi_mac_addr peer_macaddr;
11397} wmi_mcc_sched_sta_traffic_stats;
11398
11399typedef struct {
11400 /** TLV tag and len; tag equals
11401 * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
11402 A_UINT32 tlv_header;
11403 /** Duration over which the host stats were collected */
11404 A_UINT32 duration;
11405 /** Number of stations filled in following stats array */
11406 A_UINT32 num_sta;
11407 /* Following this struct are the TLVs:
11408 * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
11409 */
11410} wmi_mcc_sched_traffic_stats_cmd_fixed_param;
11411
11412typedef struct {
11413 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
11414 /* unique id identifying the VDEV, generated by the caller */
11415 A_UINT32 vdev_id;
11416 /*Batch scan enable command parameters */
11417 A_UINT32 scanInterval;
11418 A_UINT32 numScan2Batch;
11419 A_UINT32 bestNetworks;
11420 A_UINT32 rfBand;
11421 A_UINT32 rtt;
11422} wmi_batch_scan_enable_cmd_fixed_param;
11423
11424typedef struct {
11425 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */
11426 A_UINT32 supportedMscan;
11427} wmi_batch_scan_enabled_event_fixed_param;
11428
11429typedef struct {
11430 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
11431/* unique id identifying the VDEV, generated by the caller */
11432 A_UINT32 vdev_id;
11433 A_UINT32 param;
11434} wmi_batch_scan_disable_cmd_fixed_param;
11435
11436typedef struct {
11437 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
11438 /** unique id identifying the VDEV, generated by the caller */
11439 A_UINT32 vdev_id;
11440 A_UINT32 param;
11441} wmi_batch_scan_trigger_result_cmd_fixed_param;
11442
11443typedef struct {
11444 A_UINT32 tlv_header;
11445 wmi_mac_addr bssid; /* BSSID */
11446 wmi_ssid ssid; /* SSID */
11447 A_UINT32 ch; /* Channel */
11448 A_UINT32 rssi; /* RSSI or Level */
11449 /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
11450 A_UINT32 timestamp;
11451} wmi_batch_scan_result_network_info;
11452
11453typedef struct {
11454 A_UINT32 tlv_header;
11455 A_UINT32 scanId; /* Scan List ID. */
11456 /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
11457 A_UINT32 numNetworksInScanList;
11458 A_UINT32 netWorkStartIndex; /* indicate the start index of network info */
11459} wmi_batch_scan_result_scan_list;
11460
11461#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.*/
11462#define LPI_IE_BITMAP_IS_PROBE 0x00000002 /*send true or false based on scan response frame being a Probe Rsp or not*/
11463#define LPI_IE_BITMAP_SSID 0x00000004 /*send ssid from received scan response frame*/
11464#define LPI_IE_BITMAP_RSSI 0x00000008 /* end RSSI value reported by HW for the received scan response after adjusting with noise floor*/
11465#define LPI_IE_BITMAP_CHAN 0x00000010 /*send channel number from the received scan response*/
11466#define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* sen Tx power from TPC IE of scan rsp*/
11467#define LPI_IE_BITMAP_TX_RATE 0x00000040 /*send rate of the received frame as reported by HW.*/
11468#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.*/
11469#define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /*send timestamp reported in the received scan rsp frame.*/
11470#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.*/
11471/*
11472 * TEMPORARY alias of incorrect old name the correct name.
11473 * This alias will be removed once all references to the old name have been fixed.
11474 */
11475#define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
11476#define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false.*/
11477#define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP*/
11478#define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled*/
11479#define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device.*/
11480#define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel*/
11481#define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received.*/
11482#define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz*/
11483#define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above*/
11484#define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations*/
11485#define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan*/
11486#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.*/
11487#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*/
11488#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 +053011489/*
11490 * extscan will use this field to indicate to
11491 * LOWI LP whether to report result to context hub or not
11492 */
11493#define LPI_IE_BITMAP_REPORT_CONTEXT_HUB 0x00800000
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011494#define LPI_IE_BITMAP_ALL 0xFFFFFFFF
11495
11496typedef struct {
11497 A_UINT32 tlv_header;
11498 /**A_BOOL indicates LPI mgmt snooping enable/disable*/
11499 A_UINT32 enable;
11500 /**LPI snooping mode*/
11501 A_UINT32 snooping_mode;
11502 /** LPI interested IEs in snooping context */
11503 A_UINT32 ie_bitmap;
11504} wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
11505
11506typedef struct {
11507 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
11508 /** Scan ID */
11509 A_UINT32 scan_id;
11510 /** Scan requestor ID */
11511 A_UINT32 scan_req_id;
11512 /** VDEV id(interface) that is requesting scan */
11513 A_UINT32 vdev_id;
11514 /** LPI interested IEs in scan context */
11515 A_UINT32 ie_bitmap;
11516 /** Scan Priority, input to scan scheduler */
11517 A_UINT32 scan_priority;
11518 /** dwell time in msec on active channels */
11519 A_UINT32 dwell_time_active;
11520 /** dwell time in msec on passive channels */
11521 A_UINT32 dwell_time_passive;
11522 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
11523 A_UINT32 min_rest_time;
11524 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
11525 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
11526 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
11527 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
11528 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
11529 * irrespective of activity. activity is determined by the idle_time parameter.
11530 */
11531 A_UINT32 max_rest_time;
11532 /** time before sending next set of probe requests.
11533 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
11534 * The number of probe requests specified depends on the ssid_list and bssid_list
11535 */
11536 A_UINT32 repeat_probe_time;
11537 /** time in msec between 2 consequetive probe requests with in a set. */
11538 A_UINT32 probe_spacing_time;
11539 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
11540 A_UINT32 idle_time;
11541 /** maximum time in msec allowed for scan */
11542 A_UINT32 max_scan_time;
11543 /** delay in msec before sending first probe request after switching to a channel */
11544 A_UINT32 probe_delay;
11545 /** Scan control flags */
11546 A_UINT32 scan_ctrl_flags;
11547 /** Burst duration time in msec*/
11548 A_UINT32 burst_duration;
11549
11550 /** # if channels to scan. In the TLV channel_list[] */
11551 A_UINT32 num_chan;
11552 /** number of bssids. In the TLV bssid_list[] */
11553 A_UINT32 num_bssid;
11554 /** number of ssid. In the TLV ssid_list[] */
11555 A_UINT32 num_ssids;
11556 /** number of bytes in ie data. In the TLV ie_data[] */
11557 A_UINT32 ie_len;
11558
11559/**
11560 * TLV (tag length value ) parameters follow the scan_cmd
11561 * structure. The TLV's are:
11562 * A_UINT32 channel_list[];
11563 * wmi_ssid ssid_list[];
11564 * wmi_mac_addr bssid_list[];
11565 * A_UINT8 ie_data[];
11566 */
11567} wmi_lpi_start_scan_cmd_fixed_param;
11568
11569typedef struct {
11570 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
11571 /** Scan requestor ID */
11572 A_UINT32 scan_req_id;
11573 /** Scan ID */
11574 A_UINT32 scan_id;
11575 /**
11576 * Req Type
11577 * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
11578 * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
11579 * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
11580 * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
11581 */
11582 A_UINT32 req_type;
11583 /**
11584 * vDev ID
11585 * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
11586 */
11587 A_UINT32 vdev_id;
11588} wmi_lpi_stop_scan_cmd_fixed_param;
11589
11590typedef enum {
11591 WMI_LPI_DEVICE_TYPE_AP = 1,
11592 WMI_LPI_DEVICE_TYPE_P2P = 2,
11593 WMI_LPI_DEVICE_TYPE_NAN = 3,
11594} wmi_lpi_device_type;
11595
11596typedef struct {
11597 A_UINT32 tlv_header;
11598 /** Scan requestor ID */
11599 A_UINT32 scan_req_id;
11600 A_UINT32 ie_bitmap;
11601 A_UINT32 data_len;
11602} wmi_lpi_result_event_fixed_param;
11603
11604typedef enum {
11605 /** User scan Request completed */
11606 WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
11607 /** User Request was never serviced */
11608 WMI_LPI_STATUS_DROPPED_REQ = 1,
11609 /** Illegal channel Req */
11610 WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
11611 /** Illegal Operation Req */
11612 WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
11613 /** Request Aborted */
11614 WMI_LPI_STATUS_REQ_ABORTED = 4,
11615 /** Request Timed Out */
11616 WMI_LPI_STATUS_REQ_TIME_OUT = 5,
11617 /** Medium Busy, already there
11618 * is a scan is going on */
11619 WMI_LPI_STATUS_MEDIUM_BUSY = 6,
11620 /* Extscan is the scan client whose scan complete event is triggered */
11621 WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
11622} wmi_lpi_staus;
11623
11624typedef struct {
11625 A_UINT32 tlv_header;
11626 wmi_lpi_staus status;
11627 /** Scan requestor ID */
11628 A_UINT32 scan_req_id;
11629} wmi_lpi_status_event_fixed_param;
11630
11631typedef struct {
11632 A_UINT32 tlv_header;
11633 wmi_mac_addr bssid;
11634 wmi_ssid ssid;
11635 A_UINT32 freq;
11636 A_UINT32 rssi;
11637 A_UINT32 vdev_id;
11638} wmi_lpi_handoff_event_fixed_param;
11639
11640typedef struct {
11641 A_UINT32 tlv_header;
11642 A_UINT32 timestamp; /*timestamp of batch scan event */
11643 A_UINT32 numScanLists; /*number of scan in this event */
11644 A_UINT32 isLastResult; /*is this event a last event of the whole batch scan */
11645} wmi_batch_scan_result_event_fixed_param;
11646
11647typedef struct {
11648 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */
11649 A_UINT32 vdev_id;
11650 /* This TLV is followed by p2p_noa_info for vdev :
11651 * wmi_p2p_noa_info p2p_noa_info;
11652 */
11653} wmi_p2p_noa_event_fixed_param;
11654
11655#define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6
11656#define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1
11657
11658#define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0
11659#define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f
11660
11661#define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7
11662#define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf
11663
11664typedef struct {
11665 /** TLV tag and len; tag equals
11666 * */
11667 A_UINT32 tlv_header;
11668 /** gpip pin number */
11669 A_UINT32 gpio_pin_num;
11670 /** gpio interupt type */
11671 A_UINT32 int_type;
11672 /** RF radio status */
11673 A_UINT32 radio_state;
11674} wmi_rfkill_mode_param;
11675
11676typedef enum {
11677 WMI_SET_LED_SYS_POWEROFF,
11678 WMI_SET_LED_SYS_S3_SUSPEND,
11679 WMI_SET_LED_SYS_S4_S5,
11680 WMI_SET_LED_SYS_DRIVER_DISABLE,
11681 WMI_SET_LED_SYS_WAKEUP,
11682 WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
11683 WMI_SET_LED_SYS_POWERON,
11684} wmi_led_sys_state_param;
11685
11686typedef enum {
11687 WMI_CONFIG_LED_TO_VDD = 0,
11688 WMI_CONFIG_LED_TO_GND = 1,
11689} wmi_config_led_connect_type;
11690
11691typedef enum {
11692 WMI_CONFIG_LED_NOT_WITH_BT = 0,
11693 WMI_CONFIG_LED_WITH_BT = 1,
11694} wmi_config_led_with_bt_flag;
11695
11696typedef enum {
11697 WMI_CONFIG_LED_DISABLE = 0,
11698 WMI_CONFIG_LED_ENABLE = 1,
11699} wmi_config_led_enable_flag;
11700
Sreelakshmi Konamkif9bde842016-03-03 19:03:02 +053011701typedef enum {
11702 WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0,
11703 WMI_CONFIG_LED_HIGH_OFF = 1,
11704 WMI_CONFIG_LED_HIGH_ON = 2,
11705} wmi_config_led_on_flag;
11706
11707typedef enum {
11708 WMI_CONFIG_LED_UNSPECIFIED = 0,
11709 WMI_CONFIG_LED_ON = 1,
11710 WMI_CONFIG_LED_OFF = 2,
11711 WMI_CONFIG_LED_DIM = 3,
11712 WMI_CONFIG_LED_BLINK = 4,
11713 WMI_CONFIG_LED_TXRX = 5,
11714} wmi_config_led_operation_type;
11715
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011716typedef struct {
11717 /** TLV tag and len; tag equals
Govind Singh869c9872016-02-22 18:36:34 +053011718 * WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011719 A_UINT32 tlv_header;
11720 /* Set GPIO pin */
11721 A_UINT32 led_gpio_pin;
11722 /* Set connect type defined in wmi_config_led_connect_type */
11723 A_UINT32 connect_type;
11724 /* Set flag defined in wmi_config_led_with_bt_flag */
11725 A_UINT32 with_bt;
11726 /* Set LED enablement defined in wmi_config_led_enable_flag */
11727 A_UINT32 led_enable;
Govind Singh869c9872016-02-22 18:36:34 +053011728 /** pdev_id for identifying the MAC
11729 * See macros starting with WMI_PDEV_ID_ for values.
11730 */
11731 A_UINT32 pdev_id;
Sreelakshmi Konamkif9bde842016-03-03 19:03:02 +053011732 /* see wmi_config_led_operation_type enum */
11733 A_UINT32 led_operation_type;
11734 /* see wmi_config_led_on_flag enum */
11735 A_UINT32 led_on_flag; /* configure high/low on/off sense */
11736 A_UINT32 led_on_interval; /* for blink function; unit: ms */
11737 A_UINT32 led_off_interval; /* for blink function; unit: ms */
11738 A_UINT32 led_repeat_cnt; /* for blink function: how many blinks */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011739} wmi_pdev_set_led_config_cmd_fixed_param;
11740
11741#define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
11742#define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff
11743
11744/** WMI_PEER_INFO_REQ_CMDID
11745 * Request FW to provide peer info */
11746typedef struct {
11747 /** TLV tag and len; tag equals
11748 * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
11749 A_UINT32 tlv_header;
11750 /** In order to get the peer info for a single peer, host shall
11751 * issue the peer_mac_address of that peer. For getting the
11752 * info all peers, the host shall issue 0xFFFFFFFF as the mac
11753 * address. The firmware will return the peer info for all the
11754 * peers on the specified vdev_id */
11755 wmi_mac_addr peer_mac_address;
11756 /** vdev id */
11757 A_UINT32 vdev_id;
11758} wmi_peer_info_req_cmd_fixed_param;
11759
11760typedef struct {
11761 /** TLV tag and len; tag equals
11762 * WMITLV_TAG_STRUC_wmi_peer_info */
11763 A_UINT32 tlv_header;
11764 /** mac addr of the peer */
11765 wmi_mac_addr peer_mac_address;
11766 /** data_rate of the peer */
11767 A_UINT32 data_rate;
11768 /** rssi of the peer */
11769 A_UINT32 rssi;
11770 /** tx fail count */
11771 A_UINT32 tx_fail_cnt;
11772} wmi_peer_info;
11773
11774/** FW response with the peer info */
11775typedef struct {
11776 /** TLV tag and len; tag equals
11777 * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */
11778 A_UINT32 tlv_header;
11779 /** number of peers in peer_info */
11780 A_UINT32 num_peers;
Govind Singh869c9872016-02-22 18:36:34 +053011781 /* Set to 1 only if vdev_id field is valid */
11782 A_UINT32 valid_vdev_id;
11783 /* VDEV to which the peer belongs to */
11784 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011785 /* This TLV is followed by another TLV of array of structs
11786 * wmi_peer_info peer_info[];
11787 */
11788} wmi_peer_info_event_fixed_param;
11789
Nitesh Shahfcedd3b2016-07-21 17:24:35 +053011790/**
11791 * WMI_PEER_ANTDIV_INFO_REQ_CMDID
11792 * Request FW to provide peer info
11793 */
11794typedef struct {
11795 /**
11796 * TLV tag and len; tag equals
11797 * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_req_cmd_fixed_param
11798 */
11799 A_UINT32 tlv_header;
11800 /**
11801 * In order to get the peer antdiv info for a single peer, host shall
11802 * issue the peer_mac_address of that peer. For getting the
11803 * info all peers, the host shall issue 0xFFFFFFFF as the mac
11804 * address. The firmware will return the peer info for all the
11805 * peers on the specified vdev_id
11806 */
11807 wmi_mac_addr peer_mac_address;
11808 /** vdev id */
11809 A_UINT32 vdev_id;
11810} wmi_peer_antdiv_info_req_cmd_fixed_param;
11811
11812/** FW response with the peer antdiv info */
11813typedef struct {
11814 /** TLV tag and len; tag equals
11815 * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_event_fixed_param
11816 */
11817 A_UINT32 tlv_header;
11818 /** number of peers in peer_info */
11819 A_UINT32 num_peers;
11820 /** VDEV to which the peer belongs to */
11821 A_UINT32 vdev_id;
11822 /**
11823 * This TLV is followed by another TLV of array of structs
11824 * wmi_peer_antdiv_info peer_antdiv_info[];
11825 */
11826} wmi_peer_antdiv_info_event_fixed_param;
11827
11828typedef struct {
11829 /**
11830 * TLV tag and len; tag equals
11831 * WMITLV_TAG_STRUC_wmi_peer_antdiv_info
11832 */
11833 A_UINT32 tlv_header;
11834 /** mac addr of the peer */
11835 wmi_mac_addr peer_mac_address;
11836 /**
11837 * per chain rssi of the peer, for up to 8 chains.
11838 * Each chain's entry reports the RSSI for different bandwidths:
11839 * bits 7:0 -> primary 20 MHz
11840 * bits 15:8 -> secondary 20 MHz of 40 MHz channel (if applicable)
11841 * bits 23:16 -> secondary 40 MHz of 80 MHz channel (if applicable)
11842 * bits 31:24 -> secondary 80 MHz of 160 MHz channel (if applicable)
11843 * Each of these 8-bit RSSI reports is in dB units, with respect to
11844 * the noise floor.
11845 * 0x80 means invalid.
11846 * All unused bytes within used chain_rssi indices shall be
11847 * set to 0x80.
11848 * All unused chain_rssi indices shall be set to 0x80808080.
11849 */
11850 A_INT32 chain_rssi[8];
11851} wmi_peer_antdiv_info;
11852
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011853/** FW response when tx failure count has reached threshold
11854 * for a peer */
11855typedef struct {
11856 /** TLV tag and len; tag equals
11857 * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
11858 A_UINT32 tlv_header;
11859 /** vdev id*/
11860 A_UINT32 vdev_id;
11861 /** mac address */
11862 wmi_mac_addr peer_mac_address;
11863 /** tx failure count- will eventually be removed and not used * */
11864 A_UINT32 tx_fail_cnt;
11865 /** seq number of the nth tx_fail_event */
11866 A_UINT32 seq_no;
11867} wmi_peer_tx_fail_cnt_thr_event_fixed_param;
11868
11869enum wmi_rmc_mode {
11870 /** Disable RMC */
11871 WMI_RMC_MODE_DISABLED = 0,
11872 /** Enable RMC */
11873 WMI_RMC_MODE_ENABLED = 1,
11874};
11875
11876/** Enable RMC transmitter functionality. Upon
11877 * receiving this, the FW shall mutlicast frames with
11878 * reliablity. This is a vendor
11879 * proprietary feature. */
11880typedef struct {
11881 /** TLV tag and len; tag equals
11882 * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */
11883 A_UINT32 tlv_header;
11884 /** vdev id*/
11885 A_UINT32 vdev_id;
11886 /** enable_rmc contains values from enum wmi_rmc_mode;
11887 * Default value: 0 (disabled) */
11888 A_UINT32 enable_rmc;
11889} wmi_rmc_set_mode_cmd_fixed_param;
11890
11891/** Configure transmission periodicity of action frames in a
11892 * RMC network for the multicast transmitter */
11893typedef struct {
11894 /** TLV tag and len; tag equals
11895 * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
11896 A_UINT32 tlv_header;
11897 /** vdev id */
11898 A_UINT32 vdev_id;
11899 /** time period in milliseconds. Default: 300 ms.
11900 An action frame indicating the current leader is transmitted by the
11901 RMC transmitter once every 'periodity_msec' */
11902 A_UINT32 periodicity_msec;
11903} wmi_rmc_set_action_period_cmd_fixed_param;
11904
11905/** Optimise Leader selection process in RMC functionality. For
11906 * Enhancement/Debug purposes only */
11907typedef struct {
11908 /** TLV tag and len; tag equals
11909 * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */
11910 A_UINT32 tlv_header;
11911 /** vdev id */
11912 A_UINT32 vdev_id;
11913 /** flags ::
11914 * 0x0001 - Enable beacon averaging
11915 * 0x0002 - Force leader selection
11916 * 0x0004 - Enable Timer based leader switch
11917 * 0x0008 - Use qos/NULL based for multicast reliability */
11918 A_UINT32 flags;
11919 /** control leader change timeperiod (in seconds) */
11920 A_UINT32 peridocity_leader_switch;
11921 /** control activity timeout value for data rx (in seconds) */
11922 A_UINT32 data_activity_timeout;
11923 /** mac address of leader */
11924 wmi_mac_addr forced_leader_mac_addr;
11925} wmi_rmc_config_cmd_fixed_param;
11926
11927/** MHF is generally implemented in
11928 * the kernel. To decrease system power consumption, the
11929 * driver can enable offloading this to the chipset. In
11930 * order for the offload, the firmware needs the routing table.
11931 * The host shall plumb the routing table into FW. The firmware
11932 * shall perform an IP address lookup and forward the packet to
11933 * the next hop using next hop's mac address. This is a vendor
11934 * proprietary feature. */
11935enum wmi_mhf_ofl_mode {
11936 /** Disable MHF offload */
11937 WMI_MHF_OFL_MODE_DISABLED = 0,
11938 /** Enable MHF offload */
11939 WMI_MHF_OFL_MODE_ENABLED = 1,
11940};
11941
11942typedef struct {
11943 /** TLV tag and len; tag equals
11944 * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
11945 A_UINT32 tlv_header;
11946 /** vdev id*/
11947 A_UINT32 vdev_id;
11948 /** enable_mhf_ofl contains values from enum
11949 * wmi_mhf_ofl_mode; Default value: 0 (disabled) */
11950 A_UINT32 enable_mhf_ofl;
11951} wmi_mhf_offload_set_mode_cmd_fixed_param;
11952
11953enum wmi_mhf_ofl_table_action {
11954 /** Create forwarding offload table in FW */
11955 WMI_MHF_OFL_TBL_CREATE = 0,
11956 /** Append to existing MHF offload table */
11957 WMI_MHF_OFL_TBL_APPEND = 1,
11958 /** Flush entire MHF offload table in FW */
11959 WMI_MHF_OFL_TBL_FLUSH = 2,
11960};
11961
11962typedef struct {
11963 /** TLV tag and len; tag equals
11964 * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
11965 A_UINT32 tlv_header;
11966 /** vdev id*/
11967 A_UINT32 vdev_id;
11968 /** action corresponds to values from enum
11969 * wmi_mhf_ofl_table_action */
11970 A_UINT32 action;
11971 /** number of entries in the table */
11972 A_UINT32 num_entries;
11973/** Followed by the variable length TLV
11974 * wmi_mhf_offload_routing_table_entry entries[] */
11975} wmi_mhf_offload_plumb_routing_table_cmd;
11976
11977typedef struct {
11978 /** TLV tag and len; tag equals
11979 * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
11980 A_UINT32 tlv_header;
11981 /** Destination node's IP address */
11982 WMI_IPV4_ADDR dest_ipv4_addr;
11983 /** Next hop node's MAC address */
11984 wmi_mac_addr next_hop_mac_addr;
11985} wmi_mhf_offload_routing_table_entry;
11986
11987typedef struct {
11988 /** tlv tag and len, tag equals
11989 * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
11990 A_UINT32 tlv_header;
11991
11992 /** full 64 tsf timestamp get from MAC tsf timer indicates
11993 * the time that the radar event uploading to host, split
11994 * it to high 32 bit and lower 32 bit in fulltsf_high and
11995 * full_tsf_low
11996 */
11997 A_UINT32 upload_fullts_low;
11998 A_UINT32 upload_fullts_high;
11999
12000 /** timestamp indicates the time when DFS pulse is detected
12001 * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
12002 */
12003 A_UINT32 pulse_detect_ts;
12004
12005 /** the duaration of the pulse in us */
12006 A_UINT32 pulse_duration;
12007
12008 /** the center frequency of the radar pulse detected, KHz */
12009 A_UINT32 pulse_center_freq;
12010
12011 /** bandwidth of current DFS channel, MHz */
12012 A_UINT32 ch_bandwidth;
12013
12014 /** center channel frequency1 of current DFS channel, MHz */
12015 A_UINT16 ch_center_freq1;
12016
12017 /** center channel frequency2 of current DFS channel, MHz,
12018 * reserved for 160 BW mode
12019 */
12020 A_UINT16 ch_center_freq2;
12021
12022 /** flag to indicate if this pulse is chirp */
12023 A_UINT8 pulse_is_chirp;
12024
12025 /** RSSI recorded in the ppdu */
12026 A_UINT8 rssi;
12027
12028 /** extened RSSI info */
12029 A_UINT8 rssi_ext;
12030
12031 /** For 4-byte aligment padding */
12032 A_UINT8 reserved;
12033
Govind Singh869c9872016-02-22 18:36:34 +053012034 union {
12035 /* OBSOLETE - will be removed once all refs are gone */
12036 A_UINT8 pmac_id;
12037 /** pdev_id for identifying the MAC
12038 * See macros starting with WMI_PDEV_ID_ for values.
12039 */
12040 A_UINT8 pdev_id;
12041 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012042
12043 /** index of peak magnitude bin (signed) */
12044 A_INT32 peak_sidx;
12045
12046} wmi_dfs_radar_event_fixed_param;
12047
12048typedef struct {
12049 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */
12050
12051 /*Thermal thresholds */
12052 A_UINT32 lower_thresh_degreeC; /* in degree C */
12053 A_UINT32 upper_thresh_degreeC; /* in degree C */
12054
12055 /*Enable/Disable Thermal Monitoring for Mitigation */
12056 A_UINT32 enable;
12057} wmi_thermal_mgmt_cmd_fixed_param;
12058
12059typedef struct {
12060 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */
12061
12062 A_UINT32 temperature_degreeC; /* temperature in degree C */
12063} wmi_thermal_mgmt_event_fixed_param;
12064
12065/**
12066 * This command is sent from WLAN host driver to firmware to
12067 * request firmware to configure auto shutdown timer in fw
12068 * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
12069 */
12070typedef struct {
12071 A_UINT32 tlv_header;
12072 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */
12073 A_UINT32 timer_value;
12074 /** timer value; 0=disable */
12075} wmi_host_auto_shutdown_cfg_cmd_fixed_param;
12076
12077enum wmi_host_auto_shutdown_reason {
12078 WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
12079 WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
12080 WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
12081};
12082
12083/* WMI_HOST_AUTO_SHUTDOWN_EVENTID */
12084typedef struct {
12085 A_UINT32 tlv_header;
12086 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */
12087 A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
12088} wmi_host_auto_shutdown_event_fixed_param;
12089
12090/** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
12091 * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
12092 * This command is only used by some customer for verification test. It is not for end-user.
12093 *
12094 * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
12095 *
12096 * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
12097 * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condtion only. When multiple
12098 * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
12099 * <channel, ack_offset> pair is unique.
12100 *
12101 * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
12102 * called basic_config_info by bitmap
12103 * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
12104 *
12105 * '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
12106 * is ignored.
12107 * disable will remove preious conditions from FW.
12108 * conditions from the later command will over write conditions stored from a previous command.
12109 *
12110 */
12111
12112#define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */
12113#define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */
12114#define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */
12115#define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */
12116
12117#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */
12118#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */
12119#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */
12120#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */
12121
12122#define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */
12123#define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */
12124#define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */
12125#define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */
12126
12127#define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */
12128#define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */
12129
12130#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */
12131#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */
12132#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */
12133#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */
12134#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */
12135#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */
12136#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */
12137#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */
12138
12139#define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */
12140#define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */
12141
12142#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */
12143#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */
12144
12145#define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */
12146#define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */
12147
12148/** Bit map definition for basic_config_info starts */
12149#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0
12150#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012151#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
12152#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 -080012153
12154#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5
12155#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012156#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
12157#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 -080012158
12159#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10
12160#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012161#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
12162#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 -080012163
12164#define WMI_TPC_CHAINMASK_CONFIG_BT_S 12
12165#define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012166#define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BT)
12167#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 -080012168
12169#define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14
12170#define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012171#define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STBC)
12172#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 -080012173
12174#define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16
12175#define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012176#define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BAND)
12177#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 -080012178
12179#define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17
12180#define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012181#define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STREAM)
12182#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 -080012183
12184#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18
12185#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012186#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
12187#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 -080012188
12189#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21
12190/*
12191 * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
12192 * is temporarily maintained as an alias for the correct name
12193 * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
12194 */
12195#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
12196#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012197#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
12198#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 -080012199
12200#define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22
12201/*
12202 * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
12203 * is temporarily maintained as an alias for the correct name
12204 * (WMI_TPC_CHAINMASK_CONFIG_RATE)
12205 */
12206#define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
12207#define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
12208#define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012209#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 -080012210
12211/** Bit map definition for basic_config_info ends */
12212
12213typedef struct {
12214 A_UINT32 tlv_header;
12215 /** Basic condition defined as bit map above, bitmap is chosen to save memory.
12216 * Bit0 ~ Bit4: tpc offset which will be adjusted if condtion matches, the unit is 0.5dB. bit4 indicates signed
12217 * Bit5 ~ Bit9: ack offset which will be adjusted if condtion matches, the unit is 0.5dB. bit9 indicates signed
12218 * 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
12219 * 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
12220 * 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
12221 * Bit16 : band condition b'0: 2G, b'1: 5G
12222 * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams
12223 * 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
12224 * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
12225 * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
12226 * Bit23 ~ Bit31: reserved
12227 */
12228 A_UINT32 basic_config_info;
12229
12230 /** channel mapping bit rule: The lower bit corresponds with smaller channel.
12231 * it depends on Bit14 of basic_config_info
12232 * Total 24 channels for 5G
12233 * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
12234 * Total 14 channels for 2G
12235 * 1 ~ 14
12236 */
12237 A_UINT32 channel;
12238
12239 /** rate mapping bit rule: The lower bit corresponds with lower rate.
12240 * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
12241 * Legacy rates , 11b, 11g, 11A
12242 * 11n one stream ( ht20, ht40 ) 8+8
12243 * 11n two streams ( ht20, ht40 ) 8+8
12244 * 11ac one stream ( vht20, vht40, vht80 ) 10+10+10
12245 * 11ac two streams (vht20, vht40, vht80 ) 10+10+10
12246 */
12247 A_UINT32 rate0;
12248 /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
12249 * 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
12250 */
12251
12252 /** 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
12253 */
12254 A_UINT32 rate1;
12255} wmi_tpc_chainmask_config;
12256
12257#define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/
12258#define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/
12259
12260typedef struct {
12261 A_UINT32 tlv_header;
12262 A_UINT32 enable;
12263 /** enable to set tpc & chainmask when condtions meet, 0: disabled, 1: enabled. */
12264 A_UINT32 num_tpc_chainmask_configs;
12265 /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */
12266} wmi_tpc_chainmask_config_cmd_fixed_param;
12267
12268typedef struct {
12269 A_UINT32 tlv_header;
12270 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
12271 A_UINT32 data_len;
12272 /** length in byte of data[]. */
12273 /* This structure is used to send REQ binary blobs
12274 * from application/service to firmware where Host drv is pass through .
12275 * Following this structure is the TLV:
12276 * A_UINT8 data[]; // length in byte given by field data_len.
12277 */
12278} wmi_nan_cmd_param;
12279
12280typedef struct {
12281 A_UINT32 tlv_header;
12282 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
12283 A_UINT32 data_len;
12284 /** length in byte of data[]. */
12285 /* This structure is used to send REQ binary blobs
12286 * from firmware to application/service where Host drv is pass through .
12287 * Following this structure is the TLV:
12288 * A_UINT8 data[]; // length in byte given by field data_len.
12289 */
12290} wmi_nan_event_hdr;
12291
Govind Singh941bd5e2016-02-04 17:15:25 +053012292/**
12293 * Event to indicate NAN discovery interface created
12294 */
12295typedef struct {
12296 /*
12297 * TLV tag and len; tag equals
12298 * WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param
12299 */
12300 A_UINT32 tlv_header;
12301 /** Unique id identifying the VDEV */
12302 A_UINT32 vdev_id;
12303 /** NAN interface MAC address */
12304 wmi_mac_addr nan_interface_macaddr;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012305} wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE;
12306
12307#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 +053012308
12309/**
12310 * Event to indicate NAN discovery interface deleted
12311 */
12312typedef struct {
12313 /*
12314 * TLV tag and len; tag equals
12315 * WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param
12316 */
12317 A_UINT32 tlv_header;
12318 /** Unique id identifying the VDEV */
12319 A_UINT32 vdev_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012320} wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE;
12321
12322#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 +053012323
12324/**
12325 * Event to indicate NAN device started new cluster
12326 */
12327typedef struct {
12328 /*
12329 * TLV tag and len; tag equals
12330 * WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param
12331 */
12332 A_UINT32 tlv_header;
12333 /** Unique id identifying the VDEV */
12334 A_UINT32 vdev_id;
12335 /** NAN Cluster ID */
12336 A_UINT32 nan_cluster_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012337} wmi_nan_started_cluster_event_fixed_param_PROTOTYPE;
12338
12339#define wmi_nan_started_cluster_event_fixed_param wmi_nan_started_cluster_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012340
12341/**
12342 * Event to indicate NAN device joined to cluster
12343 */
12344typedef struct {
12345 /*
12346 * TLV tag and len; tag equals
12347 * WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param
12348 */
12349 A_UINT32 tlv_header;
12350 /** Unique id identifying the VDEV */
12351 A_UINT32 vdev_id;
12352 /** NAN Cluster ID */
12353 A_UINT32 nan_cluster_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012354} wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE;
12355
12356#define wmi_nan_joined_cluster_event_fixed_param wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012357
12358/** NAN DATA CMD's */
12359
12360/**
12361 * NAN Data get capabilities req
12362 */
12363typedef struct {
12364 /*
12365 * TLV tag and len; tag equals
12366 * WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param
12367 */
12368 A_UINT32 tlv_header;
12369 /** unique id generated in upper layer for the transaction */
12370 A_UINT32 transaction_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012371} wmi_ndi_get_cap_req_fixed_param_PROTOTYPE;
Govind Singh941bd5e2016-02-04 17:15:25 +053012372
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012373#define wmi_ndi_get_cap_req_fixed_param wmi_ndi_get_cap_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012374
12375/**
12376 * NDP Response code
12377 */
12378typedef enum {
12379 NDP_RSP_CODE_REQUEST_ACCEPT = 0x00,
12380 NDP_RSP_CODE_REQUEST_REJECT = 0x01,
12381 NDP_RSP_CODE_REQUEST_DEFER = 0x02,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012382} wmi_ndp_rsp_code_PROTOTYPE;
12383
12384#define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012385
12386/**
12387 * NDP Initiator requesting a data session
12388 */
12389typedef struct {
12390 /*
12391 * TLV tag and len; tag equals
12392 * WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param
12393 */
12394 A_UINT32 tlv_header;
12395 /** Unique id identifying the VDEV */
12396 A_UINT32 vdev_id;
12397 /** unique id generated in upper layer for the transaction */
12398 A_UINT32 transaction_id;
12399 /** Unique Instance Id identifying the Responder's service */
12400 A_UINT32 service_instance_id;
12401 /** Discovery MAC addr of the publisher/peer */
12402 wmi_mac_addr peer_discovery_mac_addr;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012403 /* Actual number of bytes in TLV ndp_cfg */
Govind Singh941bd5e2016-02-04 17:15:25 +053012404 A_UINT32 ndp_cfg_len;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012405 /* Actual number of bytes in TLV ndp_app_info */
Govind Singh941bd5e2016-02-04 17:15:25 +053012406 A_UINT32 ndp_app_info_len;
12407 /**
12408 * TLV (tag length value ) parameters follow the ndp_initiator_req
12409 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012410 * wmi_channel channel;
12411 * A_UINT8 ndp_cfg[];
12412 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053012413 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012414} wmi_ndp_initiator_req_fixed_param_PROTOTYPE;
12415
12416#define wmi_ndp_initiator_req_fixed_param wmi_ndp_initiator_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012417
12418/**
12419 * Initiate a data response on the responder side
12420 * for data request indication from the peer
12421 */
12422typedef struct {
12423 /*
12424 * TLV tag and len; tag equals
12425 * WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param
12426 */
12427 A_UINT32 tlv_header;
12428 /** Unique id identifying the VDEV */
12429 A_UINT32 vdev_id;
12430 /** unique id generated in upper layer for the transaction */
12431 A_UINT32 transaction_id;
12432 /**
12433 * Unique token Id generated on the initiator/responder
12434 * side used for a NDP session between two NAN devices
12435 */
12436 A_UINT32 ndp_instance_id;
12437 /** Response Code defined in wmi_ndp_rsp_code */
12438 A_UINT32 rsp_code;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012439 /** Number of bytes in TLV ndp_cfg */
Govind Singh941bd5e2016-02-04 17:15:25 +053012440 A_UINT32 ndp_cfg_len;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012441 /** Number of bytes in TLV ndp_app_info */
Govind Singh941bd5e2016-02-04 17:15:25 +053012442 A_UINT32 ndp_app_info_len;
12443 /**
12444 * TLV (tag length value ) parameters follow the ndp_responder_req
12445 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012446 * A_UINT8 ndp_cfg[];
12447 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053012448 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012449} wmi_ndp_responder_req_fixed_param_PROTOTYPE;
12450
12451#define wmi_ndp_responder_req_fixed_param wmi_ndp_responder_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012452
12453/**
12454 * NDP end type
12455 */
12456typedef enum {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012457 WMI_NDP_END_TYPE_UNSPECIFIED = 0x00,
12458 WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01,
12459 WMI_NDP_END_TYPE_OTA_FRAME = 0x02,
12460} wmi_ndp_end_type_PROTOTYPE;
12461
12462#define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012463
12464/**
12465 * NDP end reason code
12466 */
12467typedef enum {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012468 WMI_NDP_END_REASON_UNSPECIFIED = 0x00,
12469 WMI_NDP_END_REASON_INACTIVITY = 0x01,
12470 WMI_NDP_END_REASON_PEER_DATA_END = 0x02,
12471} wmi_ndp_end_reason_code_PROTOTYPE;
12472
12473#define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012474
12475/**
12476 * NDP end request
12477 */
12478typedef struct {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012479 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */
12480 A_UINT32 tlv_header;
Govind Singh941bd5e2016-02-04 17:15:25 +053012481 /** NDP instance id */
12482 A_UINT32 ndp_instance_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012483} wmi_ndp_end_req_PROTOTYPE;
Govind Singh941bd5e2016-02-04 17:15:25 +053012484
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012485#define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012486
12487/**
12488 * NDP End request
12489 */
12490typedef struct {
12491 /*
12492 * TLV tag and len; tag equals
12493 * WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param
12494 */
12495 A_UINT32 tlv_header;
12496 /** unique id generated in upper layer for the transaction */
12497 A_UINT32 transaction_id;
Govind Singh941bd5e2016-02-04 17:15:25 +053012498 /**
12499 * TLV (tag length value ) parameters follow the ndp_end_req
12500 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012501 * wmi_ndp_end_req ndp_end_req_list[];
Govind Singh941bd5e2016-02-04 17:15:25 +053012502 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012503} wmi_ndp_end_req_fixed_param_PROTOTYPE;
12504
12505#define wmi_ndp_end_req_fixed_param wmi_ndp_end_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012506
12507/* NAN DATA RSP EVENTS */
12508
12509/**
12510 * Event to indicate NAN Data Interface capabilities cmd
12511 */
12512typedef struct {
12513 /*
12514 * TLV tag and len; tag equals
12515 * WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param
12516 */
12517 A_UINT32 tlv_header;
12518 /** Copy of transaction_id received in wmi_ndi_get_cap_req */
12519 A_UINT32 transaction_id;
12520 /** Max ndi interface support */
12521 A_UINT32 max_ndi_interfaces;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012522 /** Max ndp sessions can support */
12523 A_UINT32 max_ndp_sessions;
Govind Singh941bd5e2016-02-04 17:15:25 +053012524 /** Max number of peer's per ndi */
12525 A_UINT32 max_peers_per_ndi;
Anurag Chouhan19aa3bf2016-08-04 19:10:12 +053012526 /** which combination of bands is supported - see NAN_DATA_SUPPORTED_BAND enums */
12527 A_UINT32 nan_data_supported_bands;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012528} wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE;
12529
12530#define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012531
12532/**
12533 * NDP command response code
12534 */
12535typedef enum {
12536 NDP_CMD_RSP_STATUS_SUCCESS = 0x00,
12537 NDP_CMD_RSP_STATUS_ERROR = 0x01,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012538} wmi_ndp_cmd_rsp_status_PROTOTYPE;
12539
12540#define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012541
12542/**
Govind Singh941bd5e2016-02-04 17:15:25 +053012543 * Event response for wmi_ndp_initiator_req
12544 */
12545typedef struct {
12546 /*
12547 * TLV tag and len; tag equals
12548 * WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param
12549 */
12550 A_UINT32 tlv_header;
12551 /** Unique id identifying the VDEV */
12552 A_UINT32 vdev_id;
12553 /** Copy of transaction_id received in wmi_ndp_initiator_req */
12554 A_UINT32 transaction_id;
12555 /** Response status defined in wmi_ndp_cmd_rsp_status*/
12556 A_UINT32 rsp_status;
Govind Singh941bd5e2016-02-04 17:15:25 +053012557 A_UINT32 reason_code;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012558 /*
12559 * Unique token Id generated on the initiator/responder
12560 * side used for a NDP session between two NAN devices
12561 */
12562 A_UINT32 ndp_instance_id;
12563} wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE;
12564
12565#define wmi_ndp_initiator_rsp_event_fixed_param wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012566
12567/**
12568 * Event response for wmi_ndp_responder_req cmd
12569 */
12570typedef struct {
12571 /*
12572 * TLV tag and len; tag equals
12573 * WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param
12574 */
12575 A_UINT32 tlv_header;
12576 /** Unique id identifying the VDEV */
12577 A_UINT32 vdev_id;
12578 /** Copy of transaction_id received in wmi_ndp_responder_req */
12579 A_UINT32 transaction_id;
12580 /** Response status defined in wmi_ndp_cmd_rsp_status*/
12581 A_UINT32 rsp_status;
Govind Singh941bd5e2016-02-04 17:15:25 +053012582 A_UINT32 reason_code;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012583 /*
12584 * Unique token Id generated on the initiator/responder
12585 * side used for a NDP session between two NAN devices
12586 */
12587 A_UINT32 ndp_instance_id;
12588 /* NDI mac address of the peer */
12589 wmi_mac_addr peer_ndi_mac_addr;
12590} wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE;
12591
12592#define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE
12593/**
12594 * Active ndp instance id
12595 */
12596typedef struct {
12597 /*
12598 * TLV tag and len; tag equals
12599 * WMITLV_TAG_STRUC_wmi_active_ndp_instance_id
12600 */
12601 A_UINT32 tlv_header;
12602 /* NDP instance id */
12603 A_UINT32 ndp_instance_id;
12604} wmi_active_ndp_instance_id_PROTOTYPE;
12605
12606#define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012607
12608/**
12609 * NDP end response per ndi
12610 */
12611typedef struct {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012612 /*
12613 * TLV tag and len; tag equals
12614 * WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi
12615 */
12616 A_UINT32 tlv_header;
Govind Singh941bd5e2016-02-04 17:15:25 +053012617 /** Unique id identifying the VDEV */
12618 A_UINT32 vdev_id;
12619 /** Peer MAC addr */
12620 wmi_mac_addr peer_mac_addr;
12621 /** Number of active ndps on this ndi */
12622 A_UINT32 num_active_ndps_on_ndi;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012623} wmi_ndp_end_rsp_per_ndi_PROTOTYPE;
Govind Singh941bd5e2016-02-04 17:15:25 +053012624
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012625#define wmi_ndp_end_rsp_per_ndi wmi_ndp_end_rsp_per_ndi_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012626
12627/**
12628 * Event response for wmi_ndp_end_req cmd
12629 */
12630typedef struct {
12631 /*
12632 * TLV tag and len; tag equals
12633 * WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param
12634 */
12635 A_UINT32 tlv_header;
12636 /** Copy of transaction_id received in wmi_ndp_end_req */
12637 A_UINT32 transaction_id;
12638 /** Response status defined in wmi_ndp_cmd_rsp_status*/
12639 A_UINT32 rsp_status;
Govind Singh941bd5e2016-02-04 17:15:25 +053012640 A_UINT32 reason_code;
Govind Singh941bd5e2016-02-04 17:15:25 +053012641 /**
12642 * TLV (tag length value ) parameters follow the ndp_end_rsp
12643 * structure. The TLV's are:
12644 * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[];
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012645 * wmi_active_ndp_instance_id active_ndp_instances_id[];
Govind Singh941bd5e2016-02-04 17:15:25 +053012646 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012647} wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE;
12648
12649#define wmi_ndp_end_rsp_event_fixed_param wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012650
12651/** NAN DATA EVENTS */
12652
12653/**
12654 * NDP self role
12655 */
12656typedef enum {
12657 WMI_NDP_INITIATOR_ROLE,
12658 WMI_NDP_RESPONDER_ROLE,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012659} wmi_ndp_self_role_PROTOTYPE;
12660
12661#define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012662
12663/**
12664 * NDP accept policy
12665 */
12666typedef enum {
12667 WMI_NDP_ACCEPT_POLICY_NONE,
12668 WMI_NDP_ACCEPT_POLICY_ALL,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012669} wmi_ndp_accept_policy_PROTOTYPE;
12670
12671#define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012672
12673/**
12674 * Event indication received on the responder side when a NDP Initiator request/
12675 * NDP session is initiated on the Initiator side
12676 * (self role will be NDP_RESPONDER_ROLE)
12677 *
12678 * Event indication received on the initiator side when a
12679 * NDP responder request on the Initiator side
12680 * (self role will be NDP_INITIATOR_ROLE)
12681 */
12682typedef struct {
12683 /*
12684 * TLV tag and len; tag equals
12685 * WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param
12686 */
12687 A_UINT32 tlv_header;
12688 /** Unique id identifying the VDEV */
12689 A_UINT32 vdev_id;
12690 /** Self NDP Role defined in wmi_ndp_self_role */
12691 A_UINT32 self_ndp_role;
12692 /** Accept policy defined in wmi_ndp_accept_policy */
12693 A_UINT32 accept_policy;
12694 /** Unique Instance Id corresponding to a service/session. */
12695 A_UINT32 service_instance_id;
12696 /** Discovery MAC addr of the peer/initiator */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012697 wmi_mac_addr peer_discovery_mac_addr;
12698 /* NDI mac address of the peer */
12699 wmi_mac_addr peer_ndi_mac_addr;
Govind Singh941bd5e2016-02-04 17:15:25 +053012700 /**
12701 * Unique token Id generated on the initiator/responder
12702 * side used for a NDP session between two NAN devices
12703 */
12704 A_UINT32 ndp_instance_id;
12705 /** Number of bytes in TLV wmi_ndp_cfg */
12706 A_UINT32 ndp_cfg_len;
12707 /** Number of bytes in TLV wmi_ndp_app_info */
12708 A_UINT32 ndp_app_info_len;
12709 /**
12710 * TLV (tag length value ) parameters follow the ndp_indication
12711 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012712 * A_UINT8 ndp_cfg[];
12713 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053012714 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012715} wmi_ndp_indication_event_fixed_param_PROTOTYPE;
12716
12717#define wmi_ndp_indication_event_fixed_param wmi_ndp_indication_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012718
12719/**
12720 * Event indication of data confirm is received on both
12721 * initiator and responder side confirming a NDP session
12722 */
12723typedef struct {
12724 /*
12725 * TLV tag and len; tag equals
12726 * WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param
12727 */
12728 A_UINT32 tlv_header;
12729 /** Unique id identifying the VDEV */
12730 A_UINT32 vdev_id;
12731 /**
12732 * Unique token Id generated on the initiator/responder
12733 * side used for a NDP session between two NAN devices
12734 */
12735 A_UINT32 ndp_instance_id;
12736 /*
12737 * NDI mac address of the peer
12738 * (required to derive target ipv6 address)
12739 */
12740 wmi_mac_addr peer_ndi_mac_addr;
12741 /** Response Code defined in wmi_ndp_rsp_code */
12742 A_UINT32 rsp_code;
12743 /** Number of bytes in TLV wmi_ndp_cfg */
12744 A_UINT32 ndp_cfg_len;
12745 /** Number of bytes in TLV wmi_ndp_app_info */
12746 A_UINT32 ndp_app_info_len;
Anurag Chouhanb36db512016-04-27 16:13:35 +053012747 /** Reason Code */
12748 A_UINT32 reason_code;
12749 /** Number of active ndps on this peer */
12750 A_UINT32 num_active_ndps_on_peer;
Govind Singh941bd5e2016-02-04 17:15:25 +053012751 /**
12752 * TLV (tag length value ) parameters follow the ndp_confirm
12753 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012754 * A_UINT8 ndp_cfg[];
12755 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053012756 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012757} wmi_ndp_confirm_event_fixed_param_PROTOTYPE;
12758
12759#define wmi_ndp_confirm_event_fixed_param wmi_ndp_confirm_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012760
12761/**
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012762 * Event indication received on the initiator/responder side terminating a NDP session
Govind Singh941bd5e2016-02-04 17:15:25 +053012763 */
12764typedef struct {
12765 /*
12766 * TLV tag and len; tag equals
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012767 * WMITLV_TAG_STRUC_wmi_ndp_end_indication
Govind Singh941bd5e2016-02-04 17:15:25 +053012768 */
12769 A_UINT32 tlv_header;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012770 /** type defined in wmi_ndp_end_type */
12771 A_UINT32 type;
12772 /* Unique id identifying the VDEV */
Govind Singh941bd5e2016-02-04 17:15:25 +053012773 A_UINT32 vdev_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012774 /** reason_code defined in wmi_ndp_end_reason_code */
12775 A_UINT32 reason_code;
12776 /** NDP instance id */
12777 A_UINT32 ndp_instance_id;
12778 /* NDI MAC addr of the peer */
12779 wmi_mac_addr peer_ndi_mac_addr;
12780 /* Number of active ndps on this peer */
12781 A_UINT32 num_active_ndps_on_peer;
12782} wmi_ndp_end_indication_PROTOTYPE;
12783
12784#define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012785
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012786typedef struct {
12787 A_UINT32 tlv_header;
12788 A_UINT32 num_data;
12789 /* followed by WMITLV_TAG_ARRAY_BYTE */
12790} wmi_diag_data_container_event_fixed_param;
12791
12792enum {
12793 WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
12794 WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
12795 WMI_PDEV_PARAM_TXPOWER_REASON_MAX
12796};
12797
12798#define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF
12799#define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
12800
12801#define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00
12802#define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
12803
12804#define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \
12805 ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
12806
12807#define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \
12808 ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
12809
12810#define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \
12811 (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
12812
12813#define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \
12814 (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
12815
12816/**
12817 * This command is sent from WLAN host driver to firmware to
12818 * notify the current modem power state. Host would receive a
12819 * message from modem when modem is powered on. Host driver
12820 * would then send this command to firmware. Firmware would then
12821 * power on WCI-2 (UART) interface for LTE/MWS Coex.
12822 *
12823 * This command is only applicable for APQ platform which has
12824 * modem on the platform. If firmware doesn't support MWS Coex,
12825 * this command can be dropped by firmware.
12826 *
12827 * This is a requirement from modem team that WCN can't toggle
12828 * UART before modem is powered on.
12829 */
12830typedef struct {
12831 /** TLV tag and len; tag equals
12832 * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
12833 A_UINT32 tlv_header;
12834
12835 /** Modem power state parameter */
12836 A_UINT32 modem_power_state;
12837} wmi_modem_power_state_cmd_param;
12838
12839enum {
12840 WMI_MODEM_STATE_OFF = 0,
12841 WMI_MODEM_STATE_ON
12842};
12843
12844#define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
12845#define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */
12846
12847/** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
12848 generated whenever firmware roamed to new AP silently and
12849 (a) If the host is awake, FW sends the event to the host immediately .
12850 (b) If host is in sleep then either
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012851 (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012852 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 +053012853 (2) data/mgmt frame is received from roamed AP, which needs to return to host
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012854 */
12855
12856typedef struct {
12857 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
12858 A_UINT32 tlv_header;
12859
12860 A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
12861 A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
12862 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES];
12863} wmi_key_material;
12864
12865typedef struct {
12866 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */
12867 /** Unique id identifying the VDEV on which roaming is done by firmware */
12868 A_UINT32 vdev_id;
12869 /** auth_status: connected or authorized */
12870 A_UINT32 auth_status;
12871 /*
Nirav Shah439e6262015-11-05 10:53:18 +053012872 * roam_reason:
12873 * bits 0-3 for roam reason see WMI_ROAM_REASON_XXX
12874 * bits 4-5 for subnet status see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012875 */
12876 A_UINT32 roam_reason;
12877 /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
12878 A_UINT32 rssi;
12879 /** MAC address of roamed AP */
12880 wmi_mac_addr bssid; /* BSSID */
12881 /** whether the frame is beacon or probe rsp */
12882 A_UINT32 is_beacon;
12883 /** the length of beacon/probe rsp */
12884 A_UINT32 bcn_probe_rsp_len;
12885 /** the length of reassoc rsp */
12886 A_UINT32 reassoc_rsp_len;
Manikandan Mohan30728082015-12-09 12:35:24 -080012887 /** the length of reassoc req */
12888 A_UINT32 reassoc_req_len;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012889 /**
12890 * TLV (tag length value ) parameters follows roam_synch_event
12891 * The TLV's are:
12892 * A_UINT8 bcn_probe_rsp_frame[]; length identified by bcn_probe_rsp_len
12893 * A_UINT8 reassoc_rsp_frame[]; length identified by reassoc_rsp_len
12894 * wmi_channel chan;
12895 * wmi_key_material key;
12896 * A_UINT32 status; subnet changed status not being used
12897 * currently. will pass the information using roam_status.
Manikandan Mohan30728082015-12-09 12:35:24 -080012898 * A_UINT8 reassoc_req_frame[]; length identified by reassoc_req_len
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012899 **/
12900} wmi_roam_synch_event_fixed_param;
12901
12902#define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF
12903
12904typedef struct {
12905 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
12906 A_UINT32 tlv_header;
12907 /** MAC address of the peer for which the estimated link speed is required. */
12908 wmi_mac_addr peer_macaddr;
Govind Singh869c9872016-02-22 18:36:34 +053012909 /* Set to 1 only if vdev_id field is valid */
12910 A_UINT32 valid_vdev_id;
12911 /* VDEV to which the peer belongs to */
12912 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012913} wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
12914
12915typedef struct {
12916 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
12917 A_UINT32 tlv_header;
12918 /** MAC address of the peer for which the estimated link speed is required.
12919 */
12920 wmi_mac_addr peer_macaddr;
12921 /* Estimated link speed in kbps.
12922 * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
12923 */
12924 A_UINT32 est_linkspeed_kbps;
Govind Singh869c9872016-02-22 18:36:34 +053012925 /* Set to 1 only if vdev_id field is valid */
12926 A_UINT32 valid_vdev_id;
12927 /* VDEV to which the peer belongs to */
12928 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012929} wmi_peer_estimated_linkspeed_event_fixed_param;
12930
12931typedef struct {
12932 A_UINT32 tlv_header; /* TLV tag and len; tag equals */
12933 /* vdev ID */
12934 A_UINT32 vdev_id;
12935 A_UINT32 data_len;
12936 /** length in byte of data[]. */
12937 /* This structure is used to send REQ binary blobs
12938 * from application/service to firmware where Host drv is pass through .
12939 * Following this structure is the TLV:
12940 * A_UINT8 data[]; // length in byte given by field data_len.
12941 */
12942} wmi_req_stats_ext_cmd_fixed_param;
12943
12944typedef struct {
12945 A_UINT32 tlv_header;
12946 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
12947 A_UINT32 vdev_id;
12948 /** vdev ID */
12949 A_UINT32 data_len;
12950 /** length in byte of data[]. */
12951 /* This structure is used to send REQ binary blobs
12952 * from firmware to application/service where Host drv is pass through .
12953 * Following this structure is the TLV:
12954 * A_UINT8 data[]; // length in byte given by field data_len.
12955 */
12956} wmi_stats_ext_event_fixed_param;
12957
12958typedef struct {
Manikandan Mohan429a0782015-12-23 14:35:54 -080012959 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */
12960 /** unique id identifying the VDEV, generated by the caller */
12961 A_UINT32 vdev_id;
12962 /** peer MAC address */
12963 wmi_mac_addr peer_macaddr;
12964} wmi_peer_delete_resp_event_fixed_param;
12965
12966typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012967 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
12968 A_UINT32 tlv_header;
12969 A_UINT32 vdev_id; /* vdev ID */
12970 /* MAC address of the peer for which the estimated link speed is required. */
12971 wmi_mac_addr peer_macaddr;
12972 A_UINT32 state; /* peer state */
12973} wmi_peer_state_event_fixed_param;
12974
12975typedef struct {
12976 /*
12977 * TLV tag and len; tag equals
12978 * WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param
12979 */
12980 A_UINT32 tlv_header;
12981 /* unique id identifying the VDEV, generated by the caller */
12982 A_UINT32 vdev_id;
12983 /* peer MAC address */
12984 wmi_mac_addr peer_macaddr;
12985} wmi_peer_assoc_conf_event_fixed_param;
12986
12987enum {
12988 WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0,
12989 /** scan_type: passive */
12990 WMI_2G4_HT40_OBSS_SCAN_ACTIVE,
12991 /** scan_type: active */
12992};
12993
12994typedef struct {
12995 /**
12996 * TLV tag and len;
12997 * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enalbe_cmd_fixed_param
12998 */
12999 A_UINT32 tlv_header;
13000 A_UINT32 vdev_id;
13001 /**
13002 * active or passive. if active all the channels are actively scanned.
13003 * if passive then all the channels are passively scanned
13004 */
13005 A_UINT32 scan_type;
13006 /**
13007 * FW can perform multiple scans with in a OBSS scan interval.
13008 * For each scan,
13009 * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel ,
13010 * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
13011 * The unit for these 2 parameters is TUs.
13012 */
13013 A_UINT32 obss_scan_passive_dwell;
13014 A_UINT32 obss_scan_active_dwell;
13015 /**
13016 * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
13017 * both min and total per channel dwell time requirement
13018 */
13019 A_UINT32 bss_channel_width_trigger_scan_interval;
13020 /**
13021 * FW can perform multiple scans with in a OBSS scan interval.
13022 * For each scan,
13023 * the total per channel dwell time across all scans with in OBSS scan interval should be
13024 * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
13025 * for active scans and ,
13026 * The unit for these 2 parameters is TUs.
13027 */
13028 A_UINT32 obss_scan_passive_total_per_channel;
13029 A_UINT32 obss_scan_active_total_per_channel;
13030 A_UINT32 bss_width_channel_transition_delay_factor;
13031 /** parameter to check exemption from scan */
13032 A_UINT32 obss_scan_activity_threshold;
13033 /** parameter to check exemption from scan */
13034 /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
13035 A_UINT32 forty_mhz_intolerant;
13036 /** STA 40M bandwidth intolerant capability */
13037 A_UINT32 current_operating_class;
13038 /** STA current operating class */
13039 /** length of 2.4GHz channel list to scan at, channel list in tlv->channels[] */
13040 A_UINT32 channel_len;
13041 /** length of optional ie data to append to probe reqest when active scan, ie data in tlv->ie_field[] */
13042 A_UINT32 ie_len;
13043} wmi_obss_scan_enable_cmd_fixed_param;
13044
13045typedef struct {
13046 /**
13047 * TLV tag and len;
13048 * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
13049 */
13050 A_UINT32 tlv_header;
13051 A_UINT32 vdev_id;
13052} wmi_obss_scan_disable_cmd_fixed_param;
13053
13054typedef struct {
13055 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
13056 A_UINT32 tlv_header;
13057 /** unique id identifying the VDEV */
13058 A_UINT32 vdev_id;
13059 /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
13060 A_UINT32 tx_status;
13061} wmi_offload_prb_rsp_tx_status_event_fixed_param;
13062
13063typedef enum {
13064 WMI_FRAME_TX_OK, /* frame tx ok */
13065 WMI_FRAME_TX_XRETRY, /* excessivley retried */
13066 WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */
13067 WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */
13068} WMI_FRAME_TX_STATUS;
13069
13070/**
13071 * This command is sent from WLAN host driver to firmware to
13072 * request firmware to send the latest channel avoidance range
13073 * to host.
13074 *
13075 * This command is only applicable for APQ platform which has
13076 * modem on the platform. If firmware doesn't support MWS Coex,
13077 * this command can be dropped by firmware.
13078 *
13079 * Host would send this command to firmware to request a channel
13080 * avoidance information update.
13081 */
13082typedef struct {
13083 /** TLV tag and len; tag equals
13084 * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
13085 A_UINT32 tlv_header;
13086} wmi_chan_avoid_update_cmd_param;
13087
13088/* ExtScan operation mode */
13089typedef enum {
13090 WMI_EXTSCAN_MODE_NONE = 0x0000,
13091 WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */
13092 WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */
13093 WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */
13094} wmi_extscan_operation_mode;
13095
13096/* Channel Mask */
13097typedef enum {
13098 WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
13099 WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */
13100 WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */
13101 WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */
13102} wmi_channel_band_mask;
13103
13104typedef enum {
13105 WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001,
13106 WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002,
13107 WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004,
13108 WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008,
13109 WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010,
13110 WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020,
Govind Singhfad2f212016-01-21 10:55:51 +053013111 WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040,
13112 WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013113
13114 WMI_EXTSCAN_EVENT_MAX = 0x8000
13115} wmi_extscan_event_type;
13116
13117#define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \
13118 WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
13119
13120#define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \
13121 WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
13122 WMI_EXTSCAN_BUCKET_FAILED_EVENT | \
13123 WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
13124
13125typedef enum {
13126 WMI_EXTSCAN_NO_FORWARDING = 0x0000,
13127 WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
13128} wmi_extscan_forwarding_flags;
13129
13130typedef enum {
13131 /* Use Motion Sensor Detection */
13132 WMI_EXTSCAN_USE_MSD = 0x0001,
13133 /* Extscan LPASS extended batching feature is supported and enabled */
13134 WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002,
13135} wmi_extscan_configuration_flags;
13136typedef enum {
13137 /*
13138 * Cache the results of bucket whose
13139 * configuration flags has this bit set
13140 */
13141 WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001,
Govind Singhfad2f212016-01-21 10:55:51 +053013142 /* Report ext scan results to context hub or not.*/
13143 WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013144} wmi_extscan_bucket_configuration_flags;
13145
13146typedef enum {
13147 WMI_EXTSCAN_STATUS_OK = 0,
13148 WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
13149 WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
13150 WMI_EXTSCAN_STATUS_INTERNAL_ERROR
13151} wmi_extscan_start_stop_status;
13152
13153typedef struct {
13154 /** Request ID - to identify command. Cannot be 0 */
13155 A_UINT32 request_id;
13156 /** Requestor ID - client requesting ExtScan */
13157 A_UINT32 requestor_id;
13158 /** VDEV id(interface) that is requesting scan */
13159 A_UINT32 vdev_id;
13160} wmi_extscan_command_id;
13161
13162typedef struct {
13163 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13164 /** channel number */
13165 A_UINT32 channel;
13166
13167 /** dwell time in msec - use defaults if 0 */
13168 A_UINT32 min_dwell_time;
13169 A_UINT32 max_dwell_time;
13170 /** passive/active channel and other flags */
13171 A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */
13172} wmi_extscan_bucket_channel;
13173
13174/* Scan Bucket specification */
13175typedef struct {
13176 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13177 /** Bucket ID - 0-based */
13178 A_UINT32 bucket_id;
13179 /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
13180 A_UINT32 notify_extscan_events;
13181 /** Options to forward scan results - see wmi_extscan_forwarding_flags */
13182 A_UINT32 forwarding_flags;
13183 /*
13184 * ExtScan configuration flags -
13185 * wmi_extscan__bucket_configuration_flags
13186 */
13187 A_UINT32 configuration_flags;
13188 /** DEPRECATED member:multiplier to be applied to the periodic scan's base period */
13189 A_UINT32 base_period_multiplier;
13190 /** dwell time in msec on active channels - use defaults if 0 */
13191 A_UINT32 min_dwell_time_active;
13192 A_UINT32 max_dwell_time_active;
13193 /** dwell time in msec on passive channels - use defaults if 0 */
13194 A_UINT32 min_dwell_time_passive;
13195 A_UINT32 max_dwell_time_passive;
13196 /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
13197 A_UINT32 channel_band;
13198 /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
13199 A_UINT32 num_channels;
13200 /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
13201 A_UINT32 min_period;
13202 /** period above which exponent is not applied anymore */
13203 A_UINT32 max_period;
13204 /**
13205 * back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
13206 * new_bucket_period = last_bucket_period + last_exponent_period exp_backoff
13207 */
13208 A_UINT32 exp_backoff;
13209 /** number of scans performed at a given periodicity after which exponential back off value is
13210 * applied to current periodicity to obtain a newer one
13211 */
13212 A_UINT32 exp_max_step_count;
13213/** Followed by the variable length TLV chan_list:
13214 * wmi_extscan_bucket_channel chan_list[] */
13215} wmi_extscan_bucket;
13216
13217typedef struct {
13218 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
13219 /** Request ID - to identify command. Cannot be 0 */
13220 A_UINT32 request_id;
13221 /** Requestor ID - client requesting ExtScan */
13222 A_UINT32 requestor_id;
13223 /** VDEV id(interface) that is requesting scan */
13224 A_UINT32 vdev_id;
13225 /** table ID - to allow support for multiple simultaneous requests */
13226 A_UINT32 table_id;
13227 /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
13228 A_UINT32 base_period;
13229 /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
13230 A_UINT32 max_iterations;
13231 /** Options to forward scan results - see wmi_extscan_forwarding_flags */
13232 A_UINT32 forwarding_flags;
13233 /** ExtScan configuration flags - wmi_extscan_configuration_flags */
13234 A_UINT32 configuration_flags;
13235 /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
13236 A_UINT32 notify_extscan_events;
13237 /** Scan Priority, input to scan scheduler */
13238 A_UINT32 scan_priority;
13239 /** Maximum number of BSSIDs to cache on each scan cycle */
13240 A_UINT32 max_bssids_per_scan_cycle;
13241 /** Minimum RSSI value to report */
13242 A_UINT32 min_rssi;
13243 /** Maximum table usage in percentage */
13244 A_UINT32 max_table_usage;
13245 /** default dwell time in msec on active channels */
13246 A_UINT32 min_dwell_time_active;
13247 A_UINT32 max_dwell_time_active;
13248 /** default dwell time in msec on passive channels */
13249 A_UINT32 min_dwell_time_passive;
13250 A_UINT32 max_dwell_time_passive;
13251 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
13252 A_UINT32 min_rest_time;
13253 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
13254 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
13255 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
13256 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
13257 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
13258 * irrespective of activity. activity is determined by the idle_time parameter.
13259 */
13260 A_UINT32 max_rest_time;
13261 /** time before sending next set of probe requests.
13262 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
13263 * The number of probe requests specified depends on the ssid_list and bssid_list
13264 */
13265 /** Max number of probes to be sent */
13266 A_UINT32 n_probes;
13267 /** time in msec between 2 sets of probe requests. */
13268 A_UINT32 repeat_probe_time;
13269 /** time in msec between 2 consequetive probe requests with in a set. */
13270 A_UINT32 probe_spacing_time;
13271 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
13272 A_UINT32 idle_time;
13273 /** maximum time in msec allowed for scan */
13274 A_UINT32 max_scan_time;
13275 /** delay in msec before sending first probe request after switching to a channel */
13276 A_UINT32 probe_delay;
13277 /** Scan control flags */
13278 A_UINT32 scan_ctrl_flags;
13279 /** Burst duration time in msec*/
13280 A_UINT32 burst_duration;
13281
13282 /** number of bssids in the TLV bssid_list[] */
13283 A_UINT32 num_bssid;
13284 /** number of ssid in the TLV ssid_list[] */
13285 A_UINT32 num_ssids;
13286 /** number of bytes in TLV ie_data[] */
13287 A_UINT32 ie_len;
13288 /** number of buckets in the TLV bucket_list[] */
13289 A_UINT32 num_buckets;
13290 /** in number of scans, send notifications to host after these many scans */
13291 A_UINT32 report_threshold_num_scans;
13292
13293 /** number of channels in channel_list[] determined by the
13294 sum of wmi_extscan_bucket.num_channels in array */
13295
13296/**
13297 * TLV (tag length value ) parameters follow the extscan_cmd
13298 * structure. The TLV's are:
13299 * wmi_ssid ssid_list[];
13300 * wmi_mac_addr bssid_list[];
13301 * A_UINT8 ie_data[];
13302 * wmi_extscan_bucket bucket_list[];
13303 * wmi_extscan_bucket_channel channel_list[];
13304 */
13305} wmi_extscan_start_cmd_fixed_param;
13306
13307typedef struct {
13308 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
13309 /** Request ID - to match running command. 0 matches any request */
13310 A_UINT32 request_id;
13311 /** Requestor ID - client requesting stop */
13312 A_UINT32 requestor_id;
13313 /** VDEV id(interface) that is requesting scan */
13314 A_UINT32 vdev_id;
13315 /** table ID - to allow support for multiple simultaneous requests */
13316 A_UINT32 table_id;
13317} wmi_extscan_stop_cmd_fixed_param;
13318
13319enum wmi_extscan_get_cached_results_flags {
13320 WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000,
13321 WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
13322};
13323
13324typedef struct {
13325 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
13326 /** request ID - used to correlate command with events */
13327 A_UINT32 request_id;
13328 /** Requestor ID - client that requested results */
13329 A_UINT32 requestor_id;
13330 /** VDEV id(interface) that is requesting scan */
13331 A_UINT32 vdev_id;
13332 /** table ID - to allow support for multiple simultaneous requests */
13333 A_UINT32 table_id;
13334 /** maximum number of results to be returned */
13335 A_UINT32 max_results;
13336 /** flush BSSID list - wmi_extscan_get_cached_results_flags */
13337 A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */
13338} wmi_extscan_get_cached_results_cmd_fixed_param;
13339
13340typedef struct {
13341 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
13342 /** request ID - used to correlate command with events */
13343 A_UINT32 request_id;
13344 /** Requestor ID - client that requested results */
13345 A_UINT32 requestor_id;
13346 /** VDEV id(interface) that is requesting scan */
13347 A_UINT32 vdev_id;
13348 /** table ID - to allow support for multiple simultaneous requests */
13349 A_UINT32 table_id;
13350} wmi_extscan_get_wlan_change_results_cmd_fixed_param;
13351
13352typedef struct {
13353 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13354 /**bssid */
13355 wmi_mac_addr bssid;
13356 /**channel number */
13357 A_UINT32 channel;
13358 /**upper RSSI limit */
13359 A_UINT32 upper_rssi_limit;
13360 /**lower RSSI limit */
13361 A_UINT32 lower_rssi_limit;
13362} wmi_extscan_wlan_change_bssid_param;
13363
13364typedef struct {
13365 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
13366 /** Request ID - to identify command. Cannot be 0 */
13367 A_UINT32 request_id;
13368 /** Requestor ID - client requesting wlan change monitoring */
13369 A_UINT32 requestor_id;
13370 /** VDEV id(interface) that is requesting scan */
13371 A_UINT32 vdev_id;
13372 /** table ID - to allow support for multiple simultaneous tables */
13373 A_UINT32 table_id;
13374 /** operation mode: start/stop */
13375 A_UINT32 mode; /* wmi_extscan_operation_mode */
13376 /** number of rssi samples to store */
13377 A_UINT32 max_rssi_samples;
13378 /** number of samples to use to calculate RSSI average */
13379 A_UINT32 rssi_averaging_samples;
13380 /** number of scans to confirm loss of contact with RSSI */
13381 A_UINT32 lost_ap_scan_count;
13382 /** number of out-of-range BSSIDs necessary to send event */
13383 A_UINT32 max_out_of_range_count;
13384 /** total number of bssid signal descriptors (in all pages) */
13385 A_UINT32 total_entries;
13386 /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
13387 A_UINT32 first_entry_index;
13388 /** number of bssid signal descriptors in this page */
13389 A_UINT32 num_entries_in_page;
13390 /* Following this structure is the TLV:
13391 * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[]; // number of elements given by field num_page_entries.
13392 */
13393} wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
13394
13395typedef struct {
13396 /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13397 A_UINT32 tlv_header;
13398 /**ssid */
13399 wmi_ssid ssid;
13400 /**band */
13401 A_UINT32 band;
13402 /**RSSI threshold for reporting */
13403 A_UINT32 min_rssi;
13404 A_UINT32 max_rssi;
13405} wmi_extscan_hotlist_ssid_entry;
13406
13407typedef struct {
13408 /**
13409 * TLV tag and len; tag equals
13410 * MITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param
13411 */
13412 A_UINT32 tlv_header;
13413 /** Request ID - to identify command. Cannot be 0 */
13414 A_UINT32 request_id;
13415 /** Requestor ID - client requesting hotlist ssid monitoring */
13416 A_UINT32 requestor_id;
13417 /** VDEV id(interface) that is requesting scan */
13418 A_UINT32 vdev_id;
13419 /** table ID - to allow support for multiple simultaneous tables */
13420 A_UINT32 table_id;
13421 /** operation mode: start/stop */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013422 A_UINT32 mode; /* wmi_extscan_operation_mode */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013423 /**total number of ssids (in all pages) */
13424 A_UINT32 total_entries;
13425 /**index of the first ssid entry found in the TLV extscan_hotlist_ssid_entry*/
13426 A_UINT32 first_entry_index;
13427 /**number of ssids in this page */
13428 A_UINT32 num_entries_in_page;
13429 /** number of consecutive scans to confirm loss of an ssid **/
13430 A_UINT32 lost_ap_scan_count;
13431 /* Following this structure is the TLV:
13432 * wmi_extscan_hotlist_ssid_entry hotlist_ssid[];
13433 * number of element given by field num_page_entries.
13434 */
13435} wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
13436
13437typedef struct {
13438 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13439 /**bssid */
13440 wmi_mac_addr bssid;
13441 /**RSSI min threshold for reporting */
13442 A_UINT32 min_rssi;
13443 /**Deprecated entry channel number */
13444 A_UINT32 channel;
13445 /** RSSI max threshold for reporting */
13446 A_UINT32 max_rssi;
13447} wmi_extscan_hotlist_entry;
13448
13449typedef struct {
13450 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
13451 /** Request ID - to identify command. Cannot be 0 */
13452 A_UINT32 request_id;
13453 /** Requestor ID - client requesting hotlist monitoring */
13454 A_UINT32 requestor_id;
13455 /** VDEV id(interface) that is requesting scan */
13456 A_UINT32 vdev_id;
13457 /** table ID - to allow support for multiple simultaneous tables */
13458 A_UINT32 table_id;
13459 /** operation mode: start/stop */
13460 A_UINT32 mode; /* wmi_extscan_operation_mode */
13461 /**total number of bssids (in all pages) */
13462 A_UINT32 total_entries;
13463 /**index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry*/
13464 A_UINT32 first_entry_index;
13465 /**number of bssids in this page */
13466 A_UINT32 num_entries_in_page;
13467 /** number of consecutive scans to confirm loss of contact with AP */
13468 A_UINT32 lost_ap_scan_count;
13469 /* Following this structure is the TLV:
13470 * wmi_extscan_hotlist_entry hotlist[]; // number of elements given by field num_page_entries.
13471 */
13472} wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
13473
13474 typedef struct {
13475 /* TLV tag and len; tag equals
13476 *WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
13477 A_UINT32 tlv_header;
13478 /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
13479 A_UINT32 config_request_id;
13480 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID
13481 that configured the table */
13482 A_UINT32 config_requestor_id;
13483 /**
13484 * VDEV id(interface) of the
13485 * WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table
13486 */
13487 A_UINT32 config_vdev_id;
13488 /** table ID - to allow support for multiple simultaneous tables */
13489 A_UINT32 table_id;
13490 /**total number of ssids (in all pages) */
13491 A_UINT32 total_entries;
13492 /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
13493 A_UINT32 first_entry_index;
13494 /**number of ssids in this page */
13495 A_UINT32 num_entries_in_page;
13496 /* Following this structure is the TLV:
13497 * wmi_extscan_wlan_descriptor hotlist_match[];
13498 * number of descriptors given by field num_entries_in_page
13499 */
13500} wmi_extscan_hotlist_ssid_match_event_fixed_param;
13501
13502typedef struct {
13503 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13504 /** table ID - to allow support for multiple simultaneous tables */
13505 A_UINT32 table_id;
13506 /** size in bytes of scan cache entry */
13507 A_UINT32 scan_cache_entry_size;
13508 /** maximum number of scan cache entries */
13509 A_UINT32 max_scan_cache_entries;
13510 /** maximum number of buckets per extscan request */
13511 A_UINT32 max_buckets;
13512 /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
13513 A_UINT32 max_bssid_per_scan;
13514 /** table usage level at which indication must be sent to host */
13515 A_UINT32 max_table_usage_threshold;
13516} wmi_extscan_cache_capabilities;
13517
13518typedef struct {
13519 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13520 /** table ID - to allow support for multiple simultaneous tables */
13521 A_UINT32 table_id;
13522 /** size in bytes of wlan change entry */
13523 A_UINT32 wlan_change_entry_size;
13524 /** maximum number of entries in wlan change table */
13525 A_UINT32 max_wlan_change_entries;
13526 /** number of RSSI samples used for averaging RSSI */
13527 A_UINT32 max_rssi_averaging_samples;
13528 /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
13529 A_UINT32 max_rssi_history_entries;
13530} wmi_extscan_wlan_change_monitor_capabilities;
13531
13532typedef struct {
13533 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13534 /** table ID - to allow support for multiple simultaneous tables */
13535 A_UINT32 table_id;
13536 /** size in bytes of hotlist entry */
13537 A_UINT32 wlan_hotlist_entry_size;
13538 /** maximum number of entries in wlan change table */
13539 A_UINT32 max_hotlist_entries;
13540} wmi_extscan_hotlist_monitor_capabilities;
13541
13542typedef struct {
13543 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
13544 /** Request ID - matches request ID used to start hot list monitoring */
13545 A_UINT32 request_id;
13546 /** Requestor ID - client requesting stop */
13547 A_UINT32 requestor_id;
13548 /** number of extscan caches */
13549 A_UINT32 num_extscan_cache_tables;
13550 /** number of wlan change lists */
13551 A_UINT32 num_wlan_change_monitor_tables;
13552 /** number of hotlists */
13553 A_UINT32 num_hotlist_monitor_tables;
13554 /** if one sided rtt data collection is supported */
13555 A_UINT32 rtt_one_sided_supported;
13556 /** if 11v data collection is supported */
13557 A_UINT32 rtt_11v_supported;
13558 /** if 11mc data collection is supported */
13559 A_UINT32 rtt_ftm_supported;
13560 /** number of extscan cache capabilities (one per table) */
13561 A_UINT32 num_extscan_cache_capabilities;
13562 /** number of wlan change capabilities (one per table) */
13563 A_UINT32 num_extscan_wlan_change_capabilities;
13564 /** number of extscan hotlist capabilities (one per table) */
13565 A_UINT32 num_extscan_hotlist_capabilities;
13566 /* Following this structure is the TLV:
13567 * wmi_extscan_cache_capabilities extscan_cache_capabilities; // number of capabilities given by num_extscan_caches
13568 * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; // number of capabilities given by num_wlan_change_monitor_tables
13569 * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; // number of capabilities given by num_hotlist_monitor_tables
13570 */
13571} wmi_extscan_set_capabilities_cmd_fixed_param;
13572
13573typedef struct {
13574 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
13575 /** Request ID - matches request ID used to start hot list monitoring */
13576 A_UINT32 request_id;
13577 /** Requestor ID - client requesting capabilities */
13578 A_UINT32 requestor_id;
13579} wmi_extscan_get_capabilities_cmd_fixed_param;
13580
13581typedef struct {
13582 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
13583 /** Request ID of the operation that was started/stopped */
13584 A_UINT32 request_id;
13585 /** Requestor ID of the operation that was started/stopped */
13586 A_UINT32 requestor_id;
13587 /** VDEV id(interface) of the operation that was started/stopped */
13588 A_UINT32 vdev_id;
13589 /** extscan WMI command */
13590 A_UINT32 command;
13591 /** operation mode: start/stop */
13592 A_UINT32 mode; /* wmi_extscan_operation_mode */
13593 /**success/failure */
13594 A_UINT32 status; /* enum wmi_extscan_start_stop_status */
13595 /** table ID - to allow support for multiple simultaneous requests */
13596 A_UINT32 table_id;
13597} wmi_extscan_start_stop_event_fixed_param;
13598
13599typedef struct {
13600 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
13601 /** Request ID of the extscan operation that is currently running */
13602 A_UINT32 request_id;
13603 /** Requestor ID of the extscan operation that is currently running */
13604 A_UINT32 requestor_id;
13605 /** VDEV id(interface) of the extscan operation that is currently running */
13606 A_UINT32 vdev_id;
13607 /** scan event (wmi_scan_event_type) */
13608 A_UINT32 event; /* wmi_extscan_event_type */
13609 /** table ID - to allow support for multiple simultaneous requests */
13610 A_UINT32 table_id;
13611 /**number of buckets */
13612 A_UINT32 num_buckets;
13613 /* Following this structure is the TLV:
13614 * A_UINT32 bucket_id[]; // number of elements given by field num_buckets.
13615 */
13616} wmi_extscan_operation_event_fixed_param;
13617
13618/* Types of extscan tables */
13619typedef enum {
13620 EXTSCAN_TABLE_NONE = 0,
13621 EXTSCAN_TABLE_BSSID = 1,
13622 EXTSCAN_TABLE_RSSI = 2,
13623} wmi_extscan_table_type;
13624
13625typedef struct {
13626 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
13627 /** Request ID of the extscan operation that is currently running */
13628 A_UINT32 request_id;
13629 /** Requestor ID of the extscan operation that is currently running */
13630 A_UINT32 requestor_id;
13631 /** VDEV id(interface) of the extscan operation that is currently running */
13632 A_UINT32 vdev_id;
13633 /** table ID - to allow support for multiple simultaneous tables */
13634 A_UINT32 table_id;
13635 /**see wmi_extscan_table_type for table reporting usage */
13636 A_UINT32 table_type;
13637 /**number of entries in use */
13638 A_UINT32 entries_in_use;
13639 /**maximum number of entries in table */
13640 A_UINT32 maximum_entries;
13641} wmi_extscan_table_usage_event_fixed_param;
13642
13643typedef enum {
13644 /**
13645 * Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
13646 * this can be used to discard scan results
13647 */
13648 WMI_SCAN_STATUS_INTERRUPTED = 1
13649} wmi_scan_status_flags;
13650
13651
13652typedef struct {
13653 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
Anurag Chouhancc474b72016-04-18 17:36:23 +053013654 /** RSSI */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013655 A_UINT32 rssi;
Anurag Chouhancc474b72016-04-18 17:36:23 +053013656 /** time stamp in milliseconds */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013657 A_UINT32 tstamp;
13658 /** Extscan cycle during which this entry was scanned */
13659 A_UINT32 scan_cycle_id;
13660 /**
13661 * flag to indicate if the given result was obtained as part of
13662 * interrupted (aborted/large time gap preempted) scan
13663 */
13664 A_UINT32 flags;
Anurag Chouhancc474b72016-04-18 17:36:23 +053013665 /** Bitmask of buckets (i.e. sets of channels) scanned */
13666 A_UINT32 buckets_scanned;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013667} wmi_extscan_rssi_info;
13668
13669typedef struct {
13670 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13671 /**bssid */
13672 wmi_mac_addr bssid;
13673 /**ssid */
13674 wmi_ssid ssid;
13675 /**channel number */
13676 A_UINT32 channel;
13677 /* capabilities */
13678 A_UINT32 capabilities;
13679 /* beacon interval in TUs */
13680 A_UINT32 beacon_interval;
13681 /**time stamp in milliseconds - time last seen */
13682 A_UINT32 tstamp;
13683 /**flags - _tExtScanEntryFlags */
13684 A_UINT32 flags;
13685 /**RTT in ns */
13686 A_UINT32 rtt;
13687 /**rtt standard deviation */
13688 A_UINT32 rtt_sd;
13689 /* rssi information */
13690 A_UINT32 number_rssi_samples;
13691 /** IE length */
13692 A_UINT32 ie_length; /* length of IE data */
13693} wmi_extscan_wlan_descriptor;
13694
13695typedef struct {
13696 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
13697 /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
13698 A_UINT32 request_id;
13699 /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
13700 A_UINT32 requestor_id;
13701 /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
13702 A_UINT32 vdev_id;
13703 /** Request ID of the extscan operation that is currently running */
13704 A_UINT32 extscan_request_id;
13705 /** Requestor ID of the extscan operation that is currently running */
13706 A_UINT32 extscan_requestor_id;
13707 /** VDEV id(interface) of the extscan operation that is currently running */
13708 A_UINT32 extscan_vdev_id;
13709 /** table ID - to allow support for multiple simultaneous tables */
13710 A_UINT32 table_id;
13711 /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
13712 A_UINT32 current_tstamp;
13713 /**total number of bssids (in all pages) */
13714 A_UINT32 total_entries;
13715 /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
13716 A_UINT32 first_entry_index;
13717 /**number of bssids in this page */
13718 A_UINT32 num_entries_in_page;
Govind Singhfad2f212016-01-21 10:55:51 +053013719 /* number of buckets scanned */
13720 A_UINT32 buckets_scanned;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013721 /* Followed by the variable length TLVs
13722 * wmi_extscan_wlan_descriptor bssid_list[]
13723 * wmi_extscan_rssi_info rssi_list[]
13724 * A_UINT8 ie_list[]
13725 */
13726} wmi_extscan_cached_results_event_fixed_param;
13727
13728typedef enum {
13729 EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00,
13730 EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
13731 EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02,
13732} wmi_extscan_wlan_change_flags;
13733
13734typedef struct {
13735 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13736 /**bssid */
13737 wmi_mac_addr bssid;
13738 /**time stamp in milliseconds */
13739 A_UINT32 tstamp;
13740 /**upper RSSI limit */
13741 A_UINT32 upper_rssi_limit;
13742 /**lower RSSI limit */
13743 A_UINT32 lower_rssi_limit;
13744 /** channel */
13745 A_UINT32 channel; /* in MHz */
13746 /**current RSSI average */
13747 A_UINT32 rssi_average;
13748 /**flags - wmi_extscan_wlan_change_flags */
13749 A_UINT32 flags;
13750 /**legnth of RSSI history to follow (number of values) */
13751 A_UINT32 num_rssi_samples;
13752} wmi_extscan_wlan_change_result_bssid;
13753
13754typedef struct {
13755 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
13756 /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
13757 A_UINT32 request_id;
13758 /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
13759 A_UINT32 requestor_id;
13760 /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
13761 A_UINT32 vdev_id;
13762 /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
13763 A_UINT32 config_request_id;
13764 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
13765 A_UINT32 config_requestor_id;
13766 /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
13767 A_UINT32 config_vdev_id;
13768 /** table ID - to allow support for multiple simultaneous tables */
13769 A_UINT32 table_id;
13770 /**number of entries with RSSI out of range or BSSID not detected */
13771 A_UINT32 change_count;
13772 /**total number of bssid signal descriptors (in all pages) */
13773 A_UINT32 total_entries;
13774 /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
13775 A_UINT32 first_entry_index;
13776 /**number of bssids signal descriptors in this page */
13777 A_UINT32 num_entries_in_page;
13778 /* Following this structure is the TLV:
13779 * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[]; // number of descriptors given by field num_entries_in_page.
13780 * Following this structure is the list of RSSI values (each is an A_UINT8):
13781 * A_UINT8 rssi_list[]; // last N RSSI values.
13782 */
13783} wmi_extscan_wlan_change_results_event_fixed_param;
13784
13785enum _tExtScanEntryFlags {
13786 WMI_HOTLIST_FLAG_NONE = 0x00,
13787 WMI_HOTLIST_FLAG_PRESENCE = 0x01,
13788 WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
13789};
13790
13791typedef struct {
13792 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
13793 /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
13794 A_UINT32 config_request_id;
13795 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
13796 A_UINT32 config_requestor_id;
13797 /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
13798 A_UINT32 config_vdev_id;
13799 /** table ID - to allow support for multiple simultaneous tables */
13800 A_UINT32 table_id;
13801 /**total number of bssids (in all pages) */
13802 A_UINT32 total_entries;
13803 /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
13804 A_UINT32 first_entry_index;
13805 /**number of bssids in this page */
13806 A_UINT32 num_entries_in_page;
13807 /* Following this structure is the TLV:
13808 * wmi_extscan_wlan_descriptor hotlist_match[]; // number of descriptors given by field num_entries_in_page.
13809 */
13810} wmi_extscan_hotlist_match_event_fixed_param;
13811
13812typedef struct {
13813 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
13814 /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
13815 A_UINT32 request_id;
13816 /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
13817 A_UINT32 requestor_id;
13818 /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
13819 A_UINT32 vdev_id;
13820 /** number of extscan caches */
13821 A_UINT32 num_extscan_cache_tables;
13822 /** number of wlan change lists */
13823 A_UINT32 num_wlan_change_monitor_tables;
13824 /** number of hotlists */
13825 A_UINT32 num_hotlist_monitor_tables;
13826 /** if one sided rtt data collection is supported */
13827 A_UINT32 rtt_one_sided_supported;
13828 /** if 11v data collection is supported */
13829 A_UINT32 rtt_11v_supported;
13830 /** if 11mc data collection is supported */
13831 A_UINT32 rtt_ftm_supported;
13832 /** number of extscan cache capabilities (one per table) */
13833 A_UINT32 num_extscan_cache_capabilities;
13834 /** number of wlan change capabilities (one per table) */
13835 A_UINT32 num_extscan_wlan_change_capabilities;
13836 /** number of extscan hotlist capabilities (one per table) */
13837 A_UINT32 num_extscan_hotlist_capabilities;
13838 /* max number of roaming ssid whitelist firmware can support */
13839 A_UINT32 num_roam_ssid_whitelist;
13840 /* max number of blacklist bssid firmware can support */
13841 A_UINT32 num_roam_bssid_blacklist;
13842 /* max number of preferred list firmware can support */
13843 A_UINT32 num_roam_bssid_preferred_list;
13844 /* max number of hotlist ssids firmware can support */
13845 A_UINT32 num_extscan_hotlist_ssid;
13846 /* max number of epno networks firmware can support */
13847 A_UINT32 num_epno_networks;
13848
13849 /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
13850 * supports multiple lists of each type.
13851 *
13852 * wmi_extscan_cache_capabilities extscan_cache_capabilities[] // capabilities of extscan cache (BSSID/RSSI lists)
13853 * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] // capabilities of wlan_change_monitor_tables
13854 * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] // capabilities of hotlist_monitor_tables
13855 */
13856} wmi_extscan_capabilities_event_fixed_param;
13857
13858/* WMI_D0_WOW_DISABLE_ACK_EVENTID */
13859typedef struct {
13860 A_UINT32 tlv_header;
13861 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */
13862 A_UINT32 reserved0; /* for future need */
13863} wmi_d0_wow_disable_ack_event_fixed_param;
13864
13865/** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
13866typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053013867 /** TLV tag and len; tag equals
13868 * WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param
13869 */
13870 A_UINT32 tlv_header;
13871 /** pdev_id for identifying the MAC
13872 * See macros starting with WMI_PDEV_ID_ for values.
13873 */
13874 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013875} wmi_pdev_resume_event_fixed_param;
13876
13877/** value representing all modules */
13878#define WMI_DEBUG_LOG_MODULE_ALL 0xffff
13879
13880/* param definitions */
13881
13882/**
13883 * Log level for a given module. Value contains both module id and log level.
13884 * here is the bitmap definition for value.
13885 * module Id : 16
13886 * Flags : reserved
13887 * Level : 8
13888 * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global).
13889 * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
13890 */
13891#define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1
13892
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013893#define WMI_DBGLOG_SET_LOG_LEVEL(val, lvl) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013894 (val) |= (lvl & 0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013895} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013896
13897#define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
13898
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013899#define WMI_DBGLOG_SET_MODULE_ID(val, mid) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013900 (val) |= ((mid & 0xffff) << 16); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013901} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013902
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013903#define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013904
13905/**
13906 * Enable the debug log for a given vdev. Value is vdev id
13907 */
13908#define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2
13909
13910/**
13911 * Disable the debug log for a given vdev. Value is vdev id
13912 * All the log level for a given VDEV is disabled except the ERROR log messages
13913 */
13914
13915#define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3
13916
13917/**
13918 * set vdev enable bitmap. value is the vden enable bitmap
13919 */
13920#define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4
13921
13922/**
13923 * set a given log level to all the modules specified in the module bitmap.
13924 * and set the log levle for all other modules to DBGLOG_ERR.
13925 * value: log levelt to be set.
13926 * module_id_bitmap : identifies the modules for which the log level should be set and
13927 * modules for which the log level should be reset to DBGLOG_ERR.
13928 */
13929#define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5
13930
13931#define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
13932
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013933#define WMI_MODULE_ENABLE(pmid_bitmap, mod_id) \
13934 ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
13935 (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013936
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013937#define WMI_MODULE_DISABLE(pmid_bitmap, mod_id) \
13938 ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \
13939 (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013940
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013941#define WMI_MODULE_IS_ENABLED(pmid_bitmap, mod_id) \
13942 (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \
13943 (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013944
13945#define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
13946typedef struct {
13947 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
13948 A_UINT32 dbg_log_param;
13949 /** param types are defined above */
13950 A_UINT32 value;
13951 /* The below array will follow this tlv ->fixed length module_id_bitmap[]
13952 A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
13953 */
13954} wmi_debug_log_config_cmd_fixed_param;
13955
13956typedef struct {
13957 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */
13958 A_UINT32 param; /* Reserved for future use */
Govind Singh869c9872016-02-22 18:36:34 +053013959 /** pdev_id for identifying the MAC
13960 * See macros starting with WMI_PDEV_ID_ for values.
13961 */
13962 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013963} wmi_pdev_get_temperature_cmd_fixed_param;
13964
13965typedef struct {
13966 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
13967 A_INT32 value; /* temprature value in Celcius degree */
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_temperature_event_fixed_param;
13973
Nitesh Shahfcedd3b2016-07-21 17:24:35 +053013974typedef enum {
13975 ANTDIV_HW_CFG_STATUS,
13976 ANTDIV_SW_CFG_STATUS,
13977 ANTDIV_MAX_STATUS_TYPE_NUM
13978} ANTDIV_STATUS_TYPE;
13979
13980typedef struct {
13981 /**
13982 * TLV tag and len; tag equals
13983 * WMITLV_TAG_STRUC_wmi_pdev_get_antdiv_status_cmd_fixed_param
13984 */
13985 A_UINT32 tlv_header;
13986 /* Status event ID - see ANTDIV_STATUS_TYPE */
13987 A_UINT32 status_event_id;
13988 /**
13989 * pdev_id for identifying the MAC
13990 * See macros starting with WMI_PDEV_ID_ for values.
13991 */
13992 A_UINT32 pdev_id;
13993} wmi_pdev_get_antdiv_status_cmd_fixed_param;
13994
13995typedef struct {
13996 /**
13997 * TLV tag and len; tag equals
13998 * WMITLV_TAG_STRUC_wmi_pdev_antdiv_status_event_fixed_param
13999 */
14000 A_UINT32 tlv_header;
14001 /* ANT DIV feature enabled or not */
14002 A_UINT32 support;
14003 A_UINT32 chain_num; /* how many chain supported */
14004 /* how many ANT supported, 32 max */
14005 A_UINT32 ant_num;
14006 /**
14007 * Each entry is for a tx/rx chain, and contains a bitmap
14008 * identifying the antennas attached to that tx/rx chain.
14009 */
14010 A_UINT32 selectable_ant_mask[8];
14011 /**
14012 * pdev_id for identifying the MAC
14013 * See macros starting with WMI_PDEV_ID_ for values.
14014 */
14015 A_UINT32 pdev_id;
14016} wmi_pdev_antdiv_status_event_fixed_param;
14017
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014018typedef struct {
14019 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
14020 A_UINT32 vdev_id;
14021 A_UINT32 enable;
14022 A_UINT32 srv_ipv4; /* server IP */
14023 A_UINT32 start_lsb; /* starting address assigned to client */
14024 A_UINT32 num_client; /* number of clients we support */
14025} wmi_set_dhcp_server_offload_cmd_fixed_param;
14026
14027typedef enum {
14028 AP_RX_DATA_OFFLOAD = 0x00,
14029 STA_RX_DATA_OFFLOAD = 0x01,
14030} wmi_ipa_offload_types;
14031
14032/**
14033 * This command is sent from WLAN host driver to firmware for
14034 * enabling/disabling IPA data-path offload features.
14035 *
14036 *
14037 * Enabling data path offload to IPA(based on host INI configuration), example:
14038 * when STA interface comes up,
14039 * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
14040 * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
14041 *
14042 * Disabling data path offload to IPA, example:
14043 * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
14044 * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
14045 *
14046 *
14047 * This command is applicable only on the PCIE LL systems
14048 *
14049 */
14050typedef struct {
14051 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
14052 A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
14053 A_UINT32 vdev_id;
14054 A_UINT32 enable; /* 1 == enable, 0 == disable */
14055} wmi_ipa_offload_enable_disable_cmd_fixed_param;
14056
14057typedef enum {
14058 WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0,
14059 WMI_LED_FLASHING_PATTERN_CONNECTED = 1,
14060 WMI_LED_FLASHING_PATTERN_RESERVED = 2,
14061} wmi_set_led_flashing_type;
14062
14063/**
14064 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.
14065 Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
14066 remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
14067 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
14068 pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to
14069 High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
14070 Zero is reached, it is skipped and moves on to the next interval.
14071 */
14072typedef struct {
14073 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */
14074 A_UINT32 pattern_id; /* pattern identifier */
14075 A_UINT32 led_x0; /* led flashing parameter0 */
14076 A_UINT32 led_x1; /* led flashing parameter1 */
14077 A_UINT32 gpio_num; /* GPIO number */
14078} wmi_set_led_flashing_cmd_fixed_param;
14079
14080/**
14081 * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
14082 * within small networks that do not include a local name server.
14083 * It utilizes essentially the same programming interfaces, packet formats and operating semantics
14084 * as the unicast DNS, and the advantage is zero configuration service while no need for central or
14085 * global server.
14086 * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
14087 * by type in a specified domain using standard DNS queries.
14088 * Here, we provide the ability to advertise the available services by responding to mDNS queries.
14089 */
14090typedef struct {
14091 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
14092 A_UINT32 vdev_id;
14093 A_UINT32 enable;
14094} wmi_mdns_offload_cmd_fixed_param;
14095
14096#define WMI_MAX_MDNS_FQDN_LEN 64
14097#define WMI_MAX_MDNS_RESP_LEN 512
14098#define WMI_MDNS_FQDN_TYPE_GENERAL 0
14099#define WMI_MDNS_FQDN_TYPE_UNIQUE 1
14100
14101typedef struct {
14102 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
14103 A_UINT32 vdev_id;
14104 /** type of fqdn, general or unique */
14105 A_UINT32 type;
14106 /** length of fqdn */
14107 A_UINT32 fqdn_len;
14108 /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
14109 * A_UINT8 fqdn_data[]; // fully-qualified domain name to check if match with the received queries
14110 */
14111} wmi_mdns_set_fqdn_cmd_fixed_param;
14112
14113typedef struct {
14114 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
14115 A_UINT32 vdev_id;
14116 /** Answer Resource Record count */
14117 A_UINT32 AR_count;
14118 /** length of response */
14119 A_UINT32 resp_len;
14120 /* Following this structure is the TLV byte stream of resp data of length resp_len
14121 * A_UINT8 resp_data[]; // responses consisits of Resource Records
14122 */
14123} wmi_mdns_set_resp_cmd_fixed_param;
14124
14125typedef struct {
14126 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
14127 A_UINT32 vdev_id;
14128} wmi_mdns_get_stats_cmd_fixed_param;
14129
14130typedef struct {
14131 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
14132 A_UINT32 vdev_id;
14133 /** curTimestamp in milliseconds */
14134 A_UINT32 curTimestamp;
14135 /** last received Query in milliseconds */
14136 A_UINT32 lastQueryTimestamp;
14137 /** last sent Response in milliseconds */
14138 A_UINT32 lastResponseTimestamp;
14139 /** stats of received queries */
14140 A_UINT32 totalQueries;
14141 /** stats of macth queries */
14142 A_UINT32 totalMatches;
14143 /** stats of responses */
14144 A_UINT32 totalResponses;
14145 /** indicate the current status of mDNS offload */
14146 A_UINT32 status;
14147} wmi_mdns_stats_event_fixed_param;
14148
14149/**
14150 * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
14151 * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
14152 * request and create/remove connection even host is suspended.
14153 * 3 major components are offloaded:
14154 * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
14155 * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
14156 * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
14157 * Current implementation only supports WPA2 CCMP.
14158 */
14159
14160typedef struct {
14161 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
14162 /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
14163 A_UINT32 vdev_id;
14164 /** enable/disable sap auth offload */
14165 A_UINT32 enable;
14166 /** sap ssid */
14167 wmi_ssid ap_ssid;
14168 /** authentication mode (defined above) */
14169 A_UINT32 rsn_authmode;
14170 /** unicast cipher set */
14171 A_UINT32 rsn_ucastcipherset;
14172 /** mcast/group cipher set */
14173 A_UINT32 rsn_mcastcipherset;
14174 /** mcast/group management frames cipher set */
14175 A_UINT32 rsn_mcastmgmtcipherset;
14176 /** sap channel */
14177 A_UINT32 channel;
14178 /** length of psk */
14179 A_UINT32 psk_len;
14180 /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
14181 * A_UINT8 psk[];
14182 */
14183} wmi_sap_ofl_enable_cmd_fixed_param;
14184
14185typedef struct {
14186 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
14187 /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
14188 A_UINT32 vdev_id;
14189 /** aid (association id) of this station */
14190 A_UINT32 assoc_id;
14191 /** peer station's mac addr */
14192 wmi_mac_addr peer_macaddr;
14193 /** length of association request frame */
14194 A_UINT32 data_len;
14195 /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
14196 * A_UINT8 bufp[];
14197 */
14198} wmi_sap_ofl_add_sta_event_fixed_param;
14199
14200typedef enum {
14201 SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
14202 SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
14203} wmi_sap_ofl_del_sta_flags;
14204
14205typedef struct {
14206 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
14207 /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
14208 A_UINT32 vdev_id;
14209 /** aid (association id) of this station */
14210 A_UINT32 assoc_id;
14211 /** peer station's mac addr */
14212 wmi_mac_addr peer_macaddr;
14213 /** disassociation reason */
14214 A_UINT32 reason;
14215 /** flags - wmi_sap_ofl_del_sta_flags */
14216 A_UINT32 flags;
14217} wmi_sap_ofl_del_sta_event_fixed_param;
14218
14219typedef struct {
14220 /*
14221 * TLV tag and len; tag equals
14222 * WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param
14223 */
14224 A_UINT32 tlv_header;
14225 A_UINT32 vdev_id;
14226 /* Number of client failure connection attempt */
14227 A_UINT32 num_retry;
14228 /*Time in milliseconds to record the client's failure connection attempts*/
14229 A_UINT32 retry_allow_time_ms;
14230 /*
14231 * Time in milliseconds to drop the connection request if
14232 * client is blacklisted
14233 */
14234 A_UINT32 blackout_time_ms;
14235} wmi_sap_set_blacklist_param_cmd_fixed_param;
14236
14237typedef struct {
14238 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
14239 A_UINT32 data_len; /** length in byte of data[]. */
14240 /** This structure is used to send REQ binary blobs
14241 * from application/service to firmware where Host drv is pass through .
14242 * Following this structure is the TLV:
14243 * A_UINT8 data[]; // length in byte given by field data_len.
14244 */
14245} wmi_apfind_cmd_param;
14246
14247typedef enum apfind_event_type_e {
14248 APFIND_MATCH_EVENT = 0,
14249 APFIND_WAKEUP_EVENT,
14250} APFIND_EVENT_TYPE;
14251
14252typedef struct {
14253 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
14254 A_UINT32 event_type; /** APFIND_EVENT_TYPE */
14255 A_UINT32 data_len; /** length in byte of data[]. */
14256 /** This structure is used to send event binary blobs
14257 * from firmware to application/service and Host drv.
14258 * Following this structure is the TLV:
14259 * A_UINT8 data[]; // length in byte given by field data_len.
14260 */
14261} wmi_apfind_event_hdr;
14262
14263/**
14264 * OCB DCC types and structures.
14265 */
14266
14267/**
14268 * DCC types as described in ETSI TS 102 687
14269 * Type Format stepSize referenceValue numBits
14270 * -------------------------------------------------------------------------
14271 * ndlType_acPrio INTEGER (0...7) 1 number 3
14272 * ndlType_controlLoop INTEGER (0...7) 1 0 3
14273 * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13
14274 * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10
14275 * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13
14276 * ndlType_datarate INTEGER (0..7) Table 8 3
14277 * ndlType_distance INTEGER (0..4095) 1 m 0 12
14278 * ndlType_numberElements INTEGER (0..63) number 6
14279 * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11
14280 * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10
14281 * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5
14282 * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7
14283 * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7
14284 * ndlType_timing INTEGER (0..4095) 10 ms 0 12
14285 * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7
14286 * ndlType_ratio INTEGER (0..100) 1 % 0 % 7
14287 * ndlType_exponent INTEGER (0..100) 0.1 0 7
14288 * ndlType_queueStatus Enumeration Table A.2 1
14289 * ndlType_dccMechanism Bitset Table A.2 6
14290 *
14291 * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
14292 * cannot be changed without breaking WMI compatibility.
14293 *
14294 * NOTE: For each of the types, one additional bit is allocated. This
14295 * leftmost bit is used to indicate that the value is invalid.
14296 */
14297#define SIZE_NDLTYPE_ACPRIO (1 + 3)
14298#define SIZE_NDLTYPE_CONTROLLOOP (1 + 3)
14299#define SIZE_NDLTYPE_ARRIVALRATE (1 + 13)
14300#define SIZE_NDLTYPE_CHANNELLOAD (1 + 10)
14301#define SIZE_NDLTYPE_CHANNELUSE (1 + 13)
14302#define SIZE_NDLTYPE_DATARATE (1 + 3)
14303#define SIZE_NDLTYPE_DISTANCE (1 + 12)
14304#define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6)
14305#define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
14306#define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
14307#define SIZE_NDLTYPE_PATHLOSS (1 + 5)
14308#define SIZE_NDLTYPE_RXPOWER (1 + 7)
14309#define SIZE_NDLTYPE_SNR (1 + 7)
14310#define SIZE_NDLTYPE_TIMING (1 + 12)
14311#define SIZE_NDLTYPE_TXPOWER (1 + 7)
14312#define SIZE_NDLTYPE_RATIO (1 + 7)
14313#define SIZE_NDLTYPE_EXPONENT (1 + 7)
14314#define SIZE_NDLTYPE_QUEUESTATUS (1 + 1)
14315#define SIZE_NDLTYPE_DCCMECHANISM (1 + 6)
14316#define SIZE_BYTE (8)
14317
14318#define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
14319#define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
14320#define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
14321#define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
14322#define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
14323#define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1)
14324#define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
14325#define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
14326#define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
14327#define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
14328#define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
14329#define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
14330#define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1)
14331#define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1)
14332#define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
14333#define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1)
14334#define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
14335#define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
14336#define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
14337
14338/**
14339 * The MCS_COUNT macro cannot be modified without breaking
14340 * WMI compatibility.
14341 */
14342#define MCS_COUNT (8)
14343
14344/**
14345 * Flags for ndlType_dccMechanism.
14346 */
14347typedef enum {
14348 DCC_MECHANISM_TPC = 1,
14349 DCC_MECHANISM_TRC = 2,
14350 DCC_MECHANISM_TDC = 4,
14351 DCC_MECHANISM_DSC = 8,
14352 DCC_MECHANISM_TAC = 16,
14353 DCC_MECHANISM_RESERVED = 32,
14354 DCC_MECHANISM_ALL = 0x3f,
14355} wmi_dcc_ndl_type_dcc_mechanism;
14356
14357/** Values for ndlType_queueStatus. */
14358typedef enum {
14359 DCC_QUEUE_CLOSED = 0,
14360 DCC_QUEUE_OPEN = 1,
14361} wmi_dcc_ndl_type_queue_status;
14362
14363/**
14364 * For ndlType_acPrio, use the values in wmi_traffic_ac.
14365 * Values for ndlType_datarate.
14366 */
14367typedef enum {
14368 DCC_DATARATE_3_MBPS = 0,
14369 DCC_DATARATE_4_5_MBPS = 1,
14370 DCC_DATARATE_6_MBPS = 2,
14371 DCC_DATARATE_9_MBPS = 3,
14372 DCC_DATARATE_12_MBPS = 4,
14373 DCC_DATARATE_18_MBPS = 5,
14374 DCC_DATARATE_24_MBPS = 6,
14375 DCC_DATARATE_27_MBPS = 7,
14376} wmi_dcc_ndl_type_datarate;
14377
14378/** Data structure for active state configuration. */
14379typedef struct {
14380 /** TLV tag and len; tag equals
14381 * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config
14382 */
14383 A_UINT32 tlv_header;
14384 /**
14385 * NDL_asStateId, ndlType_numberElements, 1+6 bits.
14386 * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
14387 */
14388 A_UINT32 state_info;
14389 /**
14390 * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
14391 * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
14392 * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
14393 * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
14394 */
14395 A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
14396 /**
14397 * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
14398 * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
14399 * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
14400 * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
14401 */
14402 A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
14403 /**
14404 * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
14405 * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
14406 * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
14407 * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
14408 */
14409 A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
14410 /**
14411 * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
14412 * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
14413 * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
14414 * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
14415 */
14416 A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
14417 /**
14418 * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
14419 * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
14420 * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
14421 * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
14422 */
14423 A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
14424} wmi_dcc_ndl_active_state_config;
14425
14426#define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7)
14427#define WMI_NDL_AS_STATE_ID_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 0, 7, val)
14428#define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11)
14429#define WMI_NDL_AS_CHAN_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 7, 11, val)
14430#define WMI_NDL_AS_DCC_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
14431#define WMI_NDL_AS_DCC_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
14432#define WMI_NDL_AS_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
14433#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)
14434#define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
14435#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)
14436#define WMI_NDL_AS_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
14437#define WMI_NDL_AS_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
14438#define WMI_NDL_AS_CARRIER_SENSE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
14439#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)
14440
14441/** Data structure for EDCA/QOS parameters. */
14442typedef struct {
14443 /** TLV tag and len; tag equals
14444 * WMITLV_TAG_STRUC_wmi_qos_parameter */
14445 A_UINT32 tlv_header;
14446 /** Arbitration Inter-Frame Spacing. Range: 2-15 */
14447 A_UINT32 aifsn;
14448 /** Contention Window minimum. Range: 1 - 10 */
14449 A_UINT32 cwmin;
14450 /** Contention Window maximum. Range: 1 - 10 */
14451 A_UINT32 cwmax;
14452} wmi_qos_parameter;
14453
14454/** Data structure for information specific to a channel. */
14455typedef struct {
14456 /** TLV tag and len; tag equals
14457 * WMITLV_TAG_STRUC_wmi_ocb_channel */
14458 A_UINT32 tlv_header;
14459 A_UINT32 bandwidth; /* MHz units */
14460 wmi_mac_addr mac_address;
14461} wmi_ocb_channel;
14462
14463/** Data structure for an element of the schedule array. */
14464typedef struct {
14465 /** TLV tag and len; tag equals
14466 * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
14467 A_UINT32 tlv_header;
14468 A_UINT32 channel_freq; /* MHz units */
14469 A_UINT32 total_duration; /* ms units */
14470 A_UINT32 guard_interval; /* ms units */
14471} wmi_ocb_schedule_element;
14472
14473/** Data structure for OCB configuration. */
14474typedef struct {
14475 /** TLV tag and len; tag equals
14476 * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
14477 A_UINT32 tlv_header;
14478 /** VDEV id(interface) that is being configured */
14479 A_UINT32 vdev_id;
14480 A_UINT32 channel_count;
14481 A_UINT32 schedule_size;
14482 A_UINT32 flags;
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053014483 /**
14484 * Max duration of continuing multichannel operation without
14485 * receiving a TA frame (units = seconds)
14486 */
14487 A_UINT32 ta_max_duration;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014488
14489 /** This is followed by a TLV array of wmi_channel.
14490 * This is followed by a TLV array of wmi_ocb_channel.
14491 * This is followed by a TLV array of wmi_qos_parameter.
14492 * This is followed by a TLV array of wmi_dcc_ndl_chan.
14493 * This is followed by a TLV array of wmi_dcc_ndl_active_state_config.
14494 * This is followed by a TLV array of wmi_ocb_schedule_element.
14495 */
14496} wmi_ocb_set_config_cmd_fixed_param;
14497
14498
14499#define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0
14500#define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1
14501
14502#define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) \
14503 (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
14504
14505
14506/** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
14507typedef struct {
14508 /** TLV tag and len; tag equals
14509 * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param
14510 */
14511 A_UINT32 tlv_header;
14512 /* VDEV id(interface)*/
14513 A_UINT32 vdev_id;
14514 A_UINT32 status;
14515} wmi_ocb_set_config_resp_event_fixed_param;
14516
14517/* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
14518 * WMI compatibility.
14519 */
14520/* The size of the utc time in bytes. */
14521#define SIZE_UTC_TIME (10)
14522/* The size of the utc time error in bytes. */
14523#define SIZE_UTC_TIME_ERROR (5)
14524
14525/** Data structure to set the UTC time. */
14526typedef struct {
14527 /** TLV tag and len; tag equals
14528 * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
14529 A_UINT32 tlv_header;
14530 /*VDEV Identifier*/
14531 A_UINT32 vdev_id;
14532 /** 10 bytes of the utc time. */
14533 A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME, SIZE_BYTE)];
14534 /** 5 bytes of the time error. */
14535 A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR, SIZE_BYTE)];
14536} wmi_ocb_set_utc_time_cmd_fixed_param;
14537
14538#define WMI_UTC_TIME_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
14539#define WMI_UTC_TIME_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
14540#define WMI_TIME_ERROR_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
14541#define WMI_TIME_ERROR_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
14542
14543/** Data structure start the timing advertisement. The template for the
14544 * timing advertisement frame follows this structure in the WMI command.
14545 */
14546typedef struct {
14547 /** TLV tag and len; tag equals
14548 * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
14549 A_UINT32 tlv_header;
14550 /*VDEV Identifier*/
14551 A_UINT32 vdev_id;
14552 /** Number of times the TA is sent every 5 seconds. */
14553 A_UINT32 repeat_rate;
14554 /** The frequency on which to transmit. */
14555 A_UINT32 channel_freq; /* MHz units */
14556 /** The offset into the template of the timestamp. */
14557 A_UINT32 timestamp_offset;
14558 /** The offset into the template of the time value. */
14559 A_UINT32 time_value_offset;
14560 /** The length of the timing advertisement template. The
14561 * template is in the TLV data. */
14562 A_UINT32 timing_advert_template_length;
14563 /** This is followed by a binary array containing the TA template. */
14564} wmi_ocb_start_timing_advert_cmd_fixed_param;
14565
14566/** Data structure to stop the timing advertisement. */
14567typedef struct {
14568 /** TLV tag and len; tag equals
14569 * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
14570 A_UINT32 tlv_header;
14571 /*VDEV Identifier*/
14572 A_UINT32 vdev_id;
14573 A_UINT32 channel_freq; /* MHz units */
14574} wmi_ocb_stop_timing_advert_cmd_fixed_param;
14575
14576/** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
14577typedef struct {
14578 /** TLV tag and len; tag equals
14579 * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
14580 A_UINT32 tlv_header;
14581 /*VDEV Identifier*/
14582 A_UINT32 vdev_id;
14583 A_UINT32 reserved;
14584} wmi_ocb_get_tsf_timer_cmd_fixed_param;
14585
14586/** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
14587typedef struct {
14588 /** TLV tag and len; tag equals
14589 * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
14590 A_UINT32 tlv_header;
14591 /*VDEV Identifier*/
14592 A_UINT32 vdev_id;
14593 A_UINT32 tsf_timer_high;
14594 A_UINT32 tsf_timer_low;
14595} wmi_ocb_get_tsf_timer_resp_event_fixed_param;
14596
14597/** Data structure for DCC stats configuration per channel. */
14598typedef struct {
14599 /** TLV tag and len; tag equals
14600 * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
14601 A_UINT32 tlv_header;
14602
14603 /*VDEV Identifier*/
14604 A_UINT32 vdev_id;
14605
14606 /** The channel for which this applies, 16 bits.
14607 * The dcc_stats_bitmap, 8 bits. */
14608 A_UINT32 chan_info;
14609
14610 /** Demodulation model parameters.
14611 *
14612 * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
14613 * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
14614 * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
14615 * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
14616 * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
14617 * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
14618 * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
14619 * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
14620 */
14621 A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)];
14622
14623 /** Communication ranges.
14624 *
14625 * tx_power, ndlType_txPower, 1+7 bits.
14626 * datarate, ndlType_datarate, 1+3 bits.
14627 */
14628 A_UINT32 tx_power_datarate;
14629 /**
14630 * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
14631 * NDL_estCommRange, ndlType_distance, 1+12 bits.
14632 */
14633 A_UINT32 carrier_sense_est_comm_range;
14634
14635 /** Channel load measures. */
14636 /**
14637 * dccSensitivity, ndlType_rxPower, 1+7 bits.
14638 * carrierSense, ndlType_rxPower, 1+7 bits.
14639 * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
14640 */
14641 A_UINT32 dcc_stats;
14642 /**
14643 * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
14644 * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
14645 */
14646 A_UINT32 packet_stats;
14647 /**
14648 * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
14649 */
14650 A_UINT32 channel_busy_time;
14651 /**
14652 *Transmit packet statistics.
14653 * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
14654 * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
14655 * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
14656 * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
14657 */
14658 A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
14659 /**
14660 * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
14661 * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
14662 * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
14663 * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
14664 */
14665 A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
14666 /**
14667 * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
14668 * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
14669 * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
14670 * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
14671 */
14672 A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
14673 /**
14674 * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
14675 * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
14676 * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
14677 * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
14678 */
14679 A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
14680} wmi_dcc_ndl_stats_per_channel;
14681
14682#define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
14683#define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
14684#define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
14685#define WMI_NDL_STATS_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
14686#define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8)
14687#define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
14688#define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
14689#define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
14690#define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
14691#define WMI_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
14692#define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
14693#define WMI_TX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
14694#define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
14695#define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
14696#define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
14697#define WMI_NDL_EST_COMM_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
14698#define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
14699#define WMI_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
14700#define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
14701#define WMI_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
14702#define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
14703#define WMI_NDL_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
14704#define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14)
14705#define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
14706#define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12)
14707#define WMI_NDL_PACKET_AVG_DURATION_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
14708#define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
14709#define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr, val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
14710
14711#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)
14712#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)
14713#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)
14714#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)
14715#define WMI_NDL_TX_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
14716#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)
14717#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)
14718#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)
14719
14720/** Bitmap for DCC stats. */
14721typedef enum {
14722 DCC_STATS_DEMODULATION_MODEL = 1,
14723 DCC_STATS_COMMUNICATION_RANGES = 2,
14724 DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
14725 DCC_STATS_TRANSMIT_PACKET_STATS = 8,
14726 DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
14727 DCC_STATS_ALL = 0xff,
14728} wmi_dcc_stats_bitmap;
14729
14730/** Data structure for getting the DCC stats. */
14731typedef struct {
14732 /**
14733 * TLV tag and len; tag equals
14734 * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param
14735 */
14736 A_UINT32 tlv_header;
14737 /* VDEV identifier */
14738 A_UINT32 vdev_id;
14739 /**The number of channels for which stats are being requested. */
14740 A_UINT32 num_channels;
14741 /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
14742} wmi_dcc_get_stats_cmd_fixed_param;
14743
14744typedef struct {
14745 /**
14746 * TLV tag and len; tag equals
14747 * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request.
14748 */
14749 A_UINT32 tlv_header;
14750 /** The channel for which this applies. */
14751 A_UINT32 chan_freq; /* MHz units */
14752 /** The DCC stats being requested. */
14753 A_UINT32 dcc_stats_bitmap;
14754} wmi_dcc_channel_stats_request;
14755
14756/** Data structure for the response with the DCC stats. */
14757typedef struct {
14758 /**
14759 * TLV tag and len; tag equals
14760 * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param
14761 */
14762 A_UINT32 tlv_header;
14763 /* VDEV identifier */
14764 A_UINT32 vdev_id;
14765 /** Number of channels in the response. */
14766 A_UINT32 num_channels;
14767 /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
14768} wmi_dcc_get_stats_resp_event_fixed_param;
14769
14770/** Data structure for clearing the DCC stats. */
14771typedef struct {
14772 /**
14773 * TLV tag and len; tag equals
14774 * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param
14775 */
14776 A_UINT32 tlv_header;
14777 /* VDEV identifier */
14778 A_UINT32 vdev_id;
14779 A_UINT32 dcc_stats_bitmap;
14780} wmi_dcc_clear_stats_cmd_fixed_param;
14781
14782/** Data structure for the pushed DCC stats */
14783typedef struct {
14784 /**
14785 * TLV tag and len; tag equals
14786 * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param
14787 */
14788 A_UINT32 tlv_header;
14789 /* VDEV identifier */
14790 A_UINT32 vdev_id;
14791 /** The number of channels in the response. */
14792 A_UINT32 num_channels;
14793 /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
14794} wmi_dcc_stats_event_fixed_param;
14795
14796/** Data structure for updating NDL per channel. */
14797typedef struct {
14798 /**
14799 * TLV tag and len; tag equals
14800 * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan
14801 */
14802 A_UINT32 tlv_header;
14803 /**
14804 * Channel frequency, 16 bits
14805 * NDL_numActiveState, ndlType_numberElements, 1+6 bits
14806 */
14807 A_UINT32 chan_info;
14808 /**
14809 * NDL_minDccSampling, 10 bits.
14810 * Maximum time interval between subsequent checks of the DCC rules.
14811 */
14812 A_UINT32 ndl_min_dcc_sampling;
14813 /**
14814 * dcc_enable, 1 bit.
14815 * dcc_stats_enable, 1 bit.
14816 * dcc_stats_interval, 16 bits.
14817 */
14818 A_UINT32 dcc_flags;
14819 /** General DCC configuration.
14820 * NDL_timeUp, ndlType_timing, 1+12 bits.
14821 * NDL_timeDown, ndlType_timing, 1+12 bits.
14822 */
14823 A_UINT32 general_config;
14824 /** Transmit power thresholds.
14825 * NDL_minTxPower, ndlType_txPower, 1+7 bits.
14826 * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
14827 */
14828 /* see "ETSI TS 102 687" table above for units */
14829 A_UINT32 min_max_tx_power;
14830 /**
14831 * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
14832 * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
14833 * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
14834 * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
14835 */
14836 /* see "ETSI TS 102 687" table above for units */
14837 A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
14838 /** Packet timing thresholds.
14839 * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
14840 * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
14841 * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
14842 * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
14843 */
14844 A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
14845 /**
14846 * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
14847 * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
14848 */
14849 A_UINT32 min_max_packet_interval;
14850 /**
14851 * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
14852 * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
14853 * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
14854 * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits
14855 */
14856 A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
14857 /** Packet datarate thresholds.
14858 * NDL_minDatarate, ndlType_datarate, 1+3 bits.
14859 * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
14860 */
14861 A_UINT32 min_max_datarate;
14862 /**
14863 * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
14864 * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
14865 * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
14866 * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
14867 */
14868 A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
14869 /** Receive signal thresholds.
14870 * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
14871 * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
14872 * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
14873 */
14874 A_UINT32 min_max_def_carrier_sense;
14875
14876 /** Receive model parameter.
14877 * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
14878 * NDL_maxCsRange, ndlType_distance, 1+12 bits.
14879 * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
14880 */
14881 A_UINT32 receive_model_parameter;
14882
14883 /**
14884 * NDL_minSNR, ndlType_snr, 1+7 bits.
14885 */
14886 A_UINT32 receive_model_parameter_2;
14887
14888 /** Demodulation model parameters.
14889 * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
14890 * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
14891 * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
14892 * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
14893 * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
14894 * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
14895 * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
14896 * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
14897 */
14898 A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)];
14899 /** Transmit model parameters.
14900 * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
14901 * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
14902 * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
14903 * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
14904 */
14905 A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
14906 /**
14907 * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
14908 * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
14909 * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
14910 * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
14911 */
14912 A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
14913 /**
14914 * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
14915 * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
14916 * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
14917 * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
14918 */
14919 A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
14920 /* NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits. */
14921 A_UINT32 tm_max_channel_use;
14922 /**
14923 * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
14924 * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
14925 * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
14926 * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
14927 */
14928 A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
14929 /** Channel load thresholds.
14930 * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
14931 * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
14932 */
14933 A_UINT32 min_max_channel_load;
14934 /** Transmit queue parameters.
14935 * NDL_numQueue, ndlType_acPrio, 1+3 bits.
14936 * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
14937 * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
14938 * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
14939 * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
14940 */
14941 A_UINT32 transmit_queue_parameters;
14942 /**
14943 * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
14944 * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
14945 * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
14946 * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
14947 */
14948 A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
14949} wmi_dcc_ndl_chan;
14950
14951#define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
14952#define WMI_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
14953#define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7)
14954#define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
14955
14956#define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
14957#define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
14958
14959#define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
14960#define WMI_NDL_MEASURE_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
14961
14962
14963#define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
14964#define WMI_NDL_DCC_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
14965#define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
14966#define WMI_NDL_DCC_STATS_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
14967#define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
14968#define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
14969
14970#define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13)
14971#define WMI_NDL_TIME_UP_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 0, 13, val)
14972#define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13)
14973#define WMI_NDL_TIME_DOWN_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 13, 13, val)
14974
14975#define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
14976#define WMI_NDL_MIN_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
14977#define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
14978#define WMI_NDL_MAX_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
14979
14980#define WMI_NDL_DEF_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
14981#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)
14982
14983#define WMI_NDL_MAX_PACKET_DURATION_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
14984#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)
14985#define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
14986#define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
14987#define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
14988#define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
14989#define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
14990#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)
14991
14992#define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
14993#define WMI_NDL_MIN_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
14994#define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
14995#define WMI_NDL_MAX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
14996#define WMI_NDL_DEF_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
14997#define WMI_NDL_DEF_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
14998
14999#define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
15000#define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
15001#define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
15002#define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
15003#define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
15004#define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
15005
15006#define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
15007#define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
15008#define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
15009#define WMI_NDL_MAX_CS_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
15010#define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
15011#define WMI_NDL_REF_PATH_LOSS_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
15012
15013#define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
15014#define WMI_NDL_MIN_SNR_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
15015
15016#define WMI_NDL_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
15017#define WMI_NDL_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
15018
15019#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)
15020#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)
15021#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)
15022#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)
15023#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)
15024#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)
15025#define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
15026#define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr, val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
15027#define WMI_NDL_TM_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
15028#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)
15029
15030#define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
15031#define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
15032#define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
15033#define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
15034
15035#define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
15036#define WMI_NDL_NUM_QUEUE_SET(ptr, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
15037#define WMI_NDL_REF_QUEUE_STATUS_GET(ptr, acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
15038#define WMI_NDL_REF_QUEUE_STATUS_SET(ptr, acprio, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
15039#define WMI_NDL_REF_QUEUE_LEN_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
15040#define WMI_NDL_REF_QUEUE_LEN_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
15041
15042/** Data structure for updating the NDL. */
15043typedef struct {
15044 /** TLV tag and len; tag equals
15045 * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
15046 A_UINT32 tlv_header;
15047 /* VDEV identifier */
15048 A_UINT32 vdev_id;
15049 /** The number of channels in the request. */
15050 A_UINT32 num_channel;
15051 /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
15052 /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
15053} wmi_dcc_update_ndl_cmd_fixed_param;
15054
15055typedef struct {
15056 /**
15057 * TLV tag and len; tag equals
15058 * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param
15059 */
15060 A_UINT32 tlv_header;
15061 /* VDEV identifier */
15062 A_UINT32 vdev_id;
15063 A_UINT32 status;
15064} wmi_dcc_update_ndl_resp_event_fixed_param;
15065
15066/* Actions for TSF timestamp */
15067typedef enum {
15068 TSF_TSTAMP_CAPTURE_REQ = 1,
15069 TSF_TSTAMP_CAPTURE_RESET = 2,
15070 TSF_TSTAMP_READ_VALUE = 3,
Govind Singhd2970e32016-01-21 10:30:02 +053015071 TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015072} wmi_tsf_tstamp_action;
15073
15074typedef struct {
15075 /** TLV tag and len; tag equals
15076 * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
15077 A_UINT32 tlv_header;
15078 /** unique id identifying the VDEV, generated by the caller */
15079 A_UINT32 vdev_id;
15080 /* action type, refer to wmi_tsf_tstamp_action */
15081 A_UINT32 tsf_action;
15082} wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
15083
15084typedef struct {
15085 /* TLV tag and len; tag equals
15086 * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
15087 A_UINT32 tlv_header;
15088 /* VDEV identifier */
15089 A_UINT32 vdev_id;
15090 /* low 32bit of tsf */
15091 A_UINT32 tsf_low;
15092 /* high 32 bit of tsf */
15093 A_UINT32 tsf_high;
Krishna Kumaar Natarajan40b3c112016-03-25 14:36:18 -070015094 /* low 32 bits of qtimer */
15095 A_UINT32 qtimer_low;
15096 /* high 32 bits of qtimer */
15097 A_UINT32 qtimer_high;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015098} wmi_vdev_tsf_report_event_fixed_param;
15099
Nitesh Shahe5aa26b2016-07-08 12:03:44 +053015100/**
15101 * ie_id values:
15102 * 0 to 255 are used for individual IEEE802.11 Information Element types
15103 */
15104#define WMI_SET_VDEV_IE_ID_SCAN_SET_DEFAULT_IE 256
15105
15106/* source values: */
15107#define WMI_SET_VDEV_IE_SOURCE_HOST 0x0
15108
Anurag Chouhanbfed5292016-08-09 11:17:40 +053015109/* band values: */
15110typedef enum {
15111 WMI_SET_VDEV_IE_BAND_ALL = 0,
15112 WMI_SET_VDEV_IE_BAND_2_4GHZ,
15113 WMI_SET_VDEV_IE_BAND_5GHZ,
15114} wmi_set_vdev_ie_band;
15115
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015116typedef struct {
15117 /** TLV tag and len; tag equals
15118 * WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
15119 A_UINT32 tlv_header;
15120 /* unique id identifying the VDEV, generated by the caller */
15121 A_UINT32 vdev_id;
15122 /* unique id to identify the ie_data as defined by ieee 802.11 spec */
15123 A_UINT32 ie_id;
15124 /* ie_len corresponds to num of bytes in ie_data[] */
15125 A_UINT32 ie_len;
Nitesh Shahe5aa26b2016-07-08 12:03:44 +053015126 /** source of this command */
15127 A_UINT32 ie_source; /* see WMI_SET_VDEV_IE_SOURCE_ defs */
Anurag Chouhanbfed5292016-08-09 11:17:40 +053015128 /** band for this IE - se wmi_set_vdev_ie_band enum */
15129 A_UINT32 band;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015130 /*
15131 * Following this structure is the TLV byte stream of ie data of length
15132 * buf_len:
15133 * A_UINT8 ie_data[];
15134 */
15135} wmi_vdev_set_ie_cmd_fixed_param;
15136
Govind Singh869c9872016-02-22 18:36:34 +053015137/* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015138typedef struct {
15139 /*
15140 * TLV tag and len; tag equals
15141 * WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param
15142 * Set Preferred Channel List
15143 */
15144 A_UINT32 tlv_header;
15145
15146 /* # of channels to scan */
15147 A_UINT32 num_chan;
15148 /*
15149 * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd
15150 * structure. The TLV's are:
15151 * A_UINT32 channel_list[];
15152 */
15153} wmi_soc_set_pcl_cmd_fixed_param;
15154
Anurag Chouhan11b53a12016-07-28 12:39:46 +053015155/* Values for channel_weight */
15156typedef enum {
15157 WMI_PCL_WEIGHT_DISALLOW = 0,
15158 WMI_PCL_WEIGHT_LOW = 1,
15159 WMI_PCL_WEIGHT_MEDIUM = 2,
15160 WMI_PCL_WEIGHT_HIGH = 3,
15161 WMI_PCL_WEIGHT_VERY_HIGH = 4,
15162} wmi_pcl_chan_weight;
15163
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015164typedef struct {
15165 /* TLV tag and len; tag equals
Govind Singh869c9872016-02-22 18:36:34 +053015166 * WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param
15167 */
15168 A_UINT32 tlv_header;
15169 /** Set Preferred Channel List **/
15170
15171 /** pdev_id for identifying the MAC
15172 * See macros starting with WMI_PDEV_ID_ for values.
15173 */
15174 A_UINT32 pdev_id;
15175
15176 /** # of channels to scan */
15177 A_UINT32 num_chan;
15178 /**
15179 * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd
15180 * structure. The TLV's are:
15181 * A_UINT32 channel_weight[];
15182 * channel order & size will be as per the list provided
15183 * in WMI_SCAN_CHAN_LIST_CMDID
15184 **/
15185} wmi_pdev_set_pcl_cmd_fixed_param;
15186
15187/* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */
15188typedef struct {
15189 /* TLV tag and len; tag equals
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015190 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param
15191 * Set Hardware Mode */
15192 A_UINT32 tlv_header;
15193
15194 /* Hardware Mode Index */
15195 A_UINT32 hw_mode_index;
15196} wmi_soc_set_hw_mode_cmd_fixed_param;
15197
15198typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053015199 /* TLV tag and len; tag equals
15200 * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param
15201 */
15202 A_UINT32 tlv_header;
15203 /** Set Hardware Mode **/
15204
15205 /** pdev_id for identifying the MAC
15206 * See macros starting with WMI_PDEV_ID_ for values.
15207 */
15208 A_UINT32 pdev_id;
15209
15210 /* Hardware Mode Index */
15211 A_UINT32 hw_mode_index;
15212} wmi_pdev_set_hw_mode_cmd_fixed_param;
15213
15214/* DEPRECATED - use wmi_pdev_set_mac_config_cmd_fixed_param instead */
15215typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015216 /*
15217 * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param
15218 * Set Dual MAC Firmware Configuration
15219 */
15220 A_UINT32 tlv_header;
15221
15222 /* Concurrent scan configuration bits */
15223 A_UINT32 concurrent_scan_config_bits;
15224 /* Firmware mode configuration bits */
15225 A_UINT32 fw_mode_config_bits;
15226} wmi_soc_set_dual_mac_config_cmd_fixed_param;
15227
15228typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053015229 /* TLV tag and len; tag equals
15230 * WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param
15231 */
15232 A_UINT32 tlv_header;
15233 /** Set Dual MAC Firmware Configuration **/
15234
15235 /** pdev_id for identifying the MAC
15236 * See macros starting with WMI_PDEV_ID_ for values.
15237 */
15238 A_UINT32 pdev_id;
15239
15240 /* Concurrent scan configuration bits */
15241 A_UINT32 concurrent_scan_config_bits;
15242 /* Firmware mode configuration bits */
15243 A_UINT32 fw_mode_config_bits;
15244} wmi_pdev_set_mac_config_cmd_fixed_param;
15245
15246typedef struct { /* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015247 A_UINT32 num_tx_chains;
15248 A_UINT32 num_rx_chains;
15249 A_UINT32 reserved[2];
15250} soc_num_tx_rx_chains;
15251
15252typedef struct {
15253 A_UINT32 num_tx_chains_2g;
15254 A_UINT32 num_rx_chains_2g;
15255 A_UINT32 num_tx_chains_5g;
15256 A_UINT32 num_rx_chains_5g;
15257} band_num_tx_rx_chains;
15258
15259typedef union {
15260 soc_num_tx_rx_chains soc_txrx_chain_setting;
15261 band_num_tx_rx_chains band_txrx_chain_setting;
15262} antenna_num_tx_rx_chains;
15263
15264typedef enum {
15265 ANTENNA_MODE_DISABLED = 0x0,
15266 ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
15267 /* reserved */
15268} antenna_mode_reason;
15269
Govind Singh869c9872016-02-22 18:36:34 +053015270/* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015271typedef struct {
15272 /*
15273 * TLV tag and len;
15274 * tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param
15275 */
15276 A_UINT32 tlv_header;
15277
15278 /* the reason for setting antenna mode, refer antenna_mode_reason */
15279 A_UINT32 reason;
15280
15281 /*
15282 * The above reason parameter will select whether the following union
15283 * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
15284 */
15285 antenna_num_tx_rx_chains num_txrx_chains_setting;
15286} wmi_soc_set_antenna_mode_cmd_fixed_param;
15287
Govind Singh869c9872016-02-22 18:36:34 +053015288typedef struct {
15289 /* TLV tag and len; tag equals
15290 * WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param
15291 */
15292 A_UINT32 tlv_header;
15293
15294 /** pdev_id for identifying the MAC
15295 * See macros starting with WMI_PDEV_ID_ for values.
15296 */
15297 A_UINT32 pdev_id;
15298
15299 /* Bits 0-15 is the number of RX chains and
15300 * 16-31 is the number of TX chains
15301 */
15302 A_UINT32 num_txrx_chains;
15303} wmi_pdev_set_antenna_mode_cmd_fixed_param;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015304
15305/** Data structure for information specific to a VDEV to MAC mapping. */
Govind Singh869c9872016-02-22 18:36:34 +053015306/* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015307typedef struct {
15308 /*
15309 * TLV tag and len; tag equals
15310 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
15311 A_UINT32 tlv_header;
15312 A_UINT32 vdev_id; /* VDEV ID */
15313 A_UINT32 mac_id; /* MAC ID */
15314} wmi_soc_set_hw_mode_response_vdev_mac_entry;
15315
Govind Singh869c9872016-02-22 18:36:34 +053015316/** Data structure for information specific to a VDEV to MAC mapping. */
15317typedef struct {
15318 /** TLV tag and len; tag equals
15319 * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */
15320 A_UINT32 tlv_header;
15321
15322 /** pdev_id for identifying the MAC
15323 * See macros starting with WMI_PDEV_ID_ for values.
15324 */
15325 A_UINT32 pdev_id;
15326
15327 A_UINT32 vdev_id;
15328} wmi_pdev_set_hw_mode_response_vdev_mac_entry;
15329
15330/* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015331typedef struct {
15332 /* TLV tag and len; tag equals
15333 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param
15334 * Set Hardware Mode Response Event **/
15335 A_UINT32 tlv_header;
15336
15337 /* Status of set_hw_mode command
15338 * Values for Status:
15339 * 0 - OK; command successful
15340 * 1 - EINVAL; Requested invalid hw_mode
15341 * 2 - ECANCELED; HW mode change canceled
15342 * 3 - ENOTSUP; HW mode not supported
15343 * 4 - EHARDWARE; HW mode change prevented by hardware
15344 * 5 - EPENDING; HW mode change is pending
15345 * 6 - ECOEX; HW mode change conflict with Coex
15346 */
15347 A_UINT32 status;
15348 /* Configured Hardware Mode */
15349 A_UINT32 cfgd_hw_mode_index;
15350 /* Number of Vdev to Mac entries */
15351 A_UINT32 num_vdev_mac_entries;
15352 /*
15353 * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event
15354 * structure. The TLV's are:
15355 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
15356 */
15357} wmi_soc_set_hw_mode_response_event_fixed_param;
15358
15359typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053015360 /* TLV tag and len; tag equals
15361 * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param
15362 */
15363 A_UINT32 tlv_header;
15364 /** Set Hardware Mode Response Event **/
15365
15366 /** pdev_id for identifying the MAC
15367 * See macros starting with WMI_PDEV_ID_ for values.
15368 */
15369 A_UINT32 pdev_id;
15370
15371 /* Status of set_hw_mode command */
15372 /*
15373 * Values for Status:
15374 * 0 - OK; command successful
15375 * 1 - EINVAL; Requested invalid hw_mode
15376 * 2 - ECANCELED; HW mode change canceled
15377 * 3 - ENOTSUP; HW mode not supported
15378 * 4 - EHARDWARE; HW mode change prevented by hardware
15379 * 5 - EPENDING; HW mode change is pending
15380 * 6 - ECOEX; HW mode change conflict with Coex
15381 */
15382 A_UINT32 status;
15383 /* Configured Hardware Mode */
15384 A_UINT32 cfgd_hw_mode_index;
15385 /* Number of Vdev to Mac entries */
15386 A_UINT32 num_vdev_mac_entries;
15387 /**
15388 * TLV (tag length value ) parameters follow the
15389 * soc_set_hw_mode_response_event structure. The TLV's are:
15390 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
15391 */
15392} wmi_pdev_set_hw_mode_response_event_fixed_param;
15393
15394/* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */
15395typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015396 /*
15397 * TLV tag and len; tag equals
15398 * WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param
15399 * Hardware Mode Transition Event
15400 */
15401 A_UINT32 tlv_header;
15402 /* Original or old Hardware mode */
15403 A_UINT32 old_hw_mode_index;
15404 /* New Hardware Mode */
15405 A_UINT32 new_hw_mode_index;
15406 /* Number of Vdev to Mac entries */
15407 A_UINT32 num_vdev_mac_entries;
15408
15409 /**
15410 * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event
15411 * structure. The TLV's are:
15412 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
15413 */
15414} wmi_soc_hw_mode_transition_event_fixed_param;
15415
Govind Singh869c9872016-02-22 18:36:34 +053015416typedef struct {
15417 /* TLV tag and len; tag equals
15418 * WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param
15419 */
15420 A_UINT32 tlv_header;
15421 /** Hardware Mode Transition Event **/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015422
Govind Singh869c9872016-02-22 18:36:34 +053015423 /** pdev_id for identifying the MAC
15424 * See macros starting with WMI_PDEV_ID_ for values.
15425 */
15426 A_UINT32 pdev_id;
15427
15428 /* Original or old Hardware mode */
15429 A_UINT32 old_hw_mode_index;
15430 /* New Hardware Mode */
15431 A_UINT32 new_hw_mode_index;
15432 /* Number of Vdev to Mac entries */
15433 A_UINT32 num_vdev_mac_entries;
15434
15435 /**
15436 * TLV (tag length value ) parameters follow the
15437 * soc_set_hw_mode_response_event structure. The TLV's are:
15438 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
15439 */
15440} wmi_pdev_hw_mode_transition_event_fixed_param;
15441
Pradeep Reddy POTTETIdead2bd2016-06-09 17:11:12 +053015442/**
15443 * This command is sent from WLAN host driver to firmware for
15444 * plugging in reorder queue desc to lithium hw.
15445 *
15446 * Example: plug-in queue desc for TID 5
15447 * host->target: WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
15448 * (vdev_id = PEER vdev id,
15449 * peer_macaddr = PEER mac addr,
15450 * tid = 5,
15451 * queue_ptr_lo = queue desc addr lower 32 bits,
15452 * queue_ptr_hi = queue desc addr higher 32 bits,
15453 * queue_no = 16-bit number assigned by host for queue,
15454 * stored in bits 15:0 of queue_no field)
15455 */
15456typedef struct {
15457 /* TLV tag and len; tag equals
15458 * WMITLV_TAG_STRUC_wmi_peer_reorder_queue_setup_cmd_fixed_param
15459 */
15460 A_UINT32 tlv_header;
15461 A_UINT32 vdev_id;
15462 /* peer mac address */
15463 wmi_mac_addr peer_macaddr;
15464 /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
15465 A_UINT32 tid;
15466 /* lower 32 bits of queue desc adddress */
15467 A_UINT32 queue_ptr_lo;
15468 /* upper 32 bits of queue desc adddress */
15469 A_UINT32 queue_ptr_hi;
15470 /* 16-bit number assigned by host for queue,
15471 * stored in bits 15:0 of queue_no field
15472 */
15473 A_UINT32 queue_no;
15474} wmi_peer_reorder_queue_setup_cmd_fixed_param;
15475
15476/**
15477 * This command is sent from WLAN host driver to firmware for
15478 * removing one or more reorder queue desc to lithium hw.
15479 *
15480 * Example: remove queue desc for all TIDs
15481 * host->target: WMI_PEER_REORDER_REMOVE_CMDID,
15482 * (vdev_id = PEER vdev id,
15483 * peer_macaddr = PEER mac addr,
15484 * tid = 0x1FFFF,
15485 */
15486typedef struct {
15487 /* TLV tag and len;
15488 * tag equals
15489 * WMITLV_TAG_STRUC_wmi_peer_reorder_queue_remove_cmd_fixed_param
15490 */
15491 A_UINT32 tlv_header;
15492 A_UINT32 vdev_id;
15493 /* peer mac address */
15494 wmi_mac_addr peer_macaddr;
15495 /* bits 0 to 15 = QoS TIDs, bit 16 = non-qos TID */
15496 A_UINT32 tid_mask;
15497} wmi_peer_reorder_queue_remove_cmd_fixed_param;
15498
15499
Govind Singh869c9872016-02-22 18:36:34 +053015500/* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param
15501 * instead
15502 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015503typedef struct {
15504 /*
15505 * TLV tag and len; tag equals
15506 * WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param
15507 * Set Dual MAC Config Response Event
15508 */
15509 A_UINT32 tlv_header;
15510
15511 /* Status for set_dual_mac_config command */
15512 /*
15513 * Values for Status:
15514 * 0 - OK; command successful
15515 * 1 - EINVAL; Requested invalid hw_mode
15516 * 3 - ENOTSUP; HW mode not supported
15517 * 4 - EHARDWARE; HW mode change prevented by hardware
15518 * 6 - ECOEX; HW mode change conflict with Coex
15519 */
15520 A_UINT32 status;
15521} wmi_soc_set_dual_mac_config_response_event_fixed_param;
15522
Govind Singh869c9872016-02-22 18:36:34 +053015523typedef struct {
15524 /* TLV tag and len; tag equals
15525 * WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param
15526 */
15527 A_UINT32 tlv_header;
15528 /** Set Dual MAC Config Response Event **/
15529
15530 /** pdev_id for identifying the MAC
15531 * See macros starting with WMI_PDEV_ID_ for values.
15532 */
15533 A_UINT32 pdev_id;
15534
15535 /* Status for set_dual_mac_config command */
15536 /*
15537 * Values for Status:
15538 * 0 - OK; command successful
15539 * 1 - EINVAL; Requested invalid hw_mode
15540 * 3 - ENOTSUP; HW mode not supported
15541 * 4 - EHARDWARE; HW mode change prevented by hardware
15542 * 6 - ECOEX; HW mode change conflict with Coex
15543 */
15544 A_UINT32 status;
15545} wmi_pdev_set_mac_config_response_event_fixed_param;
15546
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015547typedef enum {
15548 MAWC_MOTION_STATE_UNKNOWN,
15549 MAWC_MOTION_STATE_STATIONARY,
15550 MAWC_MOTION_STATE_WALK,
15551 MAWC_MOTION_STATE_TRANSIT,
15552} MAWC_MOTION_STATE;
15553
15554typedef enum {
15555 MAWC_SENSOR_STATUS_OK,
15556 MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
15557 MAWC_SENSOR_STATUS_SHUTDOWN,
15558} MAWC_SENSOR_STATUS;
15559
15560typedef struct {
15561 /* TLV tag and len; tag equals
15562 * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
15563 A_UINT32 tlv_header;
15564 /** new motion state, MAWC_MOTION_STATE */
15565 A_UINT32 motion_state;
15566 /** status code of sensor, MAWC_SENSOR_STATUS */
15567 A_UINT32 sensor_status;
15568} wmi_mawc_sensor_report_ind_cmd_fixed_param;
15569
Govind Singh86180292016-02-01 14:03:37 +053015570/* MBO flag field definition */
15571/*
15572 * Bit 0: 0 - Allow to connect to both MBO and non-MBO AP
15573 * 1 - Allow to connect to MBO AP only
15574 * Bit 1-31 : reserved.
15575 */
Nitesh Shahe5aa26b2016-07-08 12:03:44 +053015576#define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0) /* DEPRECATED */
Govind Singh86180292016-02-01 14:03:37 +053015577
15578typedef struct {
15579 /*
15580 * TLV tag and len; tag equals
15581 * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param
15582 */
15583 A_UINT32 tlv_header;
15584 /** vdev id */
15585 A_UINT32 vdev_id;
15586 /** enable or disable MBO */
15587 A_UINT32 enable;
15588 /** MBO flags, refer to definition of MBO flags*/
15589 A_UINT32 flags;
Nitesh Shahe5aa26b2016-07-08 12:03:44 +053015590} wmi_roam_set_mbo_fixed_param; /* DEPRECATED */
Govind Singh86180292016-02-01 14:03:37 +053015591
15592typedef struct {
15593 /*
15594 * TLV tag and len; tag equals
15595 * WMITLV_TAG_ARRAY_STRUC
15596 */
15597 A_UINT32 tlv_header;
15598 /** Current operating class number */
15599 A_UINT32 cur_op_class;
15600 /*
15601 * Country string of current reg domain,
15602 * the expected value should be same as country str defined
15603 * in country IE.
15604 * 3 octets (COUNTRY_STR) + 1 octet (always 0)
15605 * The ordering of this array must be maintained,
15606 * even when a big-endian host's WMI messages undergo
15607 * automatic byte reordering for conversion to the
15608 * little-endian ordering required by the target.
15609 * On big-endian hosts, this array may need to be byte-swapped
15610 * by the host, so the subsequent automatic byte-swap
15611 * will result in the correct final byte order.
15612 * global operating class: set country_str[0]=0
15613 */
15614 A_UINT8 country_str[4];
15615 /** Supported operating class number in current regdomain */
15616 A_UINT32 supp_op_class_num;
15617 /* The TLVs will follow. */
15618 /* A_UINT32 supp_op_class_list[] */
15619} wmi_supported_operating_class_param;
15620
15621typedef struct {
15622 /*
15623 * TLV tag and len; tag equals
15624 * WMITLV_TAG_ARRAY_STRUC
15625 */
15626 A_UINT32 tlv_header;
15627 /** non preferred channel attribute length */
15628 A_UINT32 non_prefer_ch_attr_len;
15629 /* The TLVs will follow. */
15630 /** A_UINT8 non_prefer_ch_attr[];*/
15631} wmi_mbo_non_preferred_channel_report_param;
15632
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015633typedef struct {
15634 /* TLV tag and len; tag equals
15635 * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
15636 A_UINT32 tlv_header;
15637 /* enable(1) or disable(0) */
15638 A_UINT32 enable;
15639} wmi_mawc_enable_sensor_event_fixed_param;
15640
15641typedef struct {
15642 /* TLV tag and len; tag equals
15643 * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
15644 A_UINT32 tlv_header;
15645 /* Unique id identifying the VDEV */
15646 A_UINT32 vdev_id;
15647 /* enable(1) or disable(0) MAWC */
15648 A_UINT32 enable;
15649 /* ratio of skipping suppressing scan, skip one out of x */
15650 A_UINT32 suppress_ratio;
15651} wmi_extscan_configure_mawc_cmd_fixed_param;
15652
15653typedef struct {
15654 /* TLV tag and len; tag equals
15655 * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
15656 A_UINT32 tlv_header;
15657 /* Unique id identifying the VDEV */
15658 A_UINT32 vdev_id;
15659 /* enable(1) or disable(0) MAWC */
15660 A_UINT32 enable;
15661 /* ratio of exponential backoff, next = current + current*ratio/100 */
15662 A_UINT32 exp_backoff_ratio;
15663 /* initial scan interval(msec) */
15664 A_UINT32 init_scan_interval;
15665 /* max scan interval(msec) */
15666 A_UINT32 max_scan_interval;
15667} wmi_nlo_configure_mawc_cmd_fixed_param;
15668
15669typedef struct {
15670 /* TLV tag and len; tag equals
15671 * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
15672 A_UINT32 tlv_header;
15673 /* Unique id identifying the VDEV */
15674 A_UINT32 vdev_id;
15675 /* enable(1) or disable(0) MAWC */
15676 A_UINT32 enable;
15677 /* data traffic load (kBps) to register CMC */
15678 A_UINT32 traffic_load_threshold;
15679 /* RSSI threshold (dBm) to scan for Best AP */
15680 A_UINT32 best_ap_rssi_threshold;
15681 /* high RSSI threshold adjustment in Stationary to suppress scan */
15682 A_UINT32 rssi_stationary_high_adjust;
15683 /* low RSSI threshold adjustment in Stationary to suppress scan */
15684 A_UINT32 rssi_stationary_low_adjust;
15685} wmi_roam_configure_mawc_cmd_fixed_param;
15686
15687#define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2
Himanshu Agarwal2690e462016-06-03 14:26:01 +053015688#define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 5
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015689
15690typedef enum {
15691 PACKET_FILTER_TYPE_INVALID = 0,
15692 PACKET_FILTER_TYPE_FILTER_PKT,
15693 PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
15694 PACKET_FILTER_TYPE_MAX_ENUM_SIZE
15695} WMI_PACKET_FILTER_FILTER_TYPE;
15696
15697typedef enum {
15698 PACKET_FILTER_PROTO_TYPE_INVALID = 0,
15699
15700 /* L2 header */
15701 PACKET_FILTER_PROTO_TYPE_MAC,
15702 PACKET_FILTER_PROTO_TYPE_SNAP,
15703
15704 /* L3 header (EtherType) */
15705 PACKET_FILTER_PROTO_TYPE_IPV4,
15706 PACKET_FILTER_PROTO_TYPE_IPV6,
15707
15708 /* L4 header (IP protocol) */
15709 PACKET_FILTER_PROTO_TYPE_UDP,
15710 PACKET_FILTER_PROTO_TYPE_TCP,
15711 PACKET_FILTER_PROTO_TYPE_ICMPV6,
15712
15713 PACKET_FILTER_PROTO_TYPE_MAX
15714} WMI_PACKET_FILTER_PROTO_TYPE;
15715
15716typedef enum {
15717 PACKET_FILTER_CMP_TYPE_INVALID = 0,
15718 PACKET_FILTER_CMP_TYPE_EQUAL,
15719 PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
15720 PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
15721 PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
15722 PACKET_FILTER_CMP_TYPE_ADDRTYPE,
15723 PACKET_FILTER_CMP_TYPE_MAX
15724} WMI_PACKET_FILTER_CMP_TYPE;
15725
15726typedef enum {
15727 PACKET_FILTER_SET_INACTIVE = 0,
15728 PACKET_FILTER_SET_ACTIVE
15729} WMI_PACKET_FILTER_ACTION;
15730
15731typedef enum {
15732 PACKET_FILTER_SET_DISABLE = 0,
15733 PACKET_FILTER_SET_ENABLE
15734} WMI_PACKET_FILTER_RUNTIME_ENABLE;
15735
15736typedef struct {
15737 A_UINT32 proto_type;
15738 A_UINT32 cmp_type;
15739 A_UINT32 data_length; /* Length of the data to compare (units = bytes) */
15740 /*
15741 * from start of the respective frame header (
15742 * units = bytes)
15743 */
15744 A_UINT32 data_offset;
15745 /* Data to compare, little-endian order */
15746 A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD];
15747 /* Mask to be applied on rcvd packet data before compare, little-endian order */
15748 A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD];
15749} WMI_PACKET_FILTER_PARAMS_TYPE;
15750
15751typedef struct {
15752 A_UINT32 tlv_header;
15753 A_UINT32 vdev_id;
15754 A_UINT32 filter_id;
15755 A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */
15756 A_UINT32 filter_type;
15757 A_UINT32 num_params; /* how many entries in paramsData are valid */
15758 A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */
15759 WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
Himanshu Agarwal2690e462016-06-03 14:26:01 +053015760 /*
15761 * deprecated0:
15762 * This field simply provides filler space to retain the
15763 * original message format while reducing
15764 * WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER from 10 to 5.
15765 */
15766 WMI_PACKET_FILTER_PARAMS_TYPE deprecated0[5];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015767} WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
15768
15769/* enable / disable all filters within the specified vdev */
15770typedef struct {
15771 A_UINT32 tlv_header;
15772 A_UINT32 vdev_id;
15773 A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
15774} WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
15775
15776
15777#define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0
15778#define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
15779
15780#define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
15781 WMI_SET_BITS(tcp_flag_u32, \
15782 WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
15783 WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
15784 tcp_flag_values)
15785#define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
15786 WMI_GET_BITS(tcp_flag_u32, \
15787 WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
15788 WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
15789
15790#define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9
15791#define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
15792
15793#define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
15794 WMI_SET_BITS(tcp_flag_u32, \
15795 WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
15796 WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
15797 tcp_flags_mask)
15798#define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
15799 WMI_GET_BITS(tcp_flag_u32, \
15800 WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
15801 WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
15802
15803typedef struct {
15804 A_UINT32 tlv_header;
15805 /**
15806 * @brief lro_enable - indicates whether lro is enabled
15807 * [0] LRO Enable
15808 */
15809 A_UINT32 lro_enable;
15810 /**
15811 * @brief tcp_flag_u32 - mask of which TCP flags to check and
15812 * values to check for
15813 * [8:0] TCP flag values - If the TCP flags from the packet do not match
15814 * the values in this field after masking with TCP flags mask
15815 * below,LRO eligible will not be set
15816 * [17:9] TCP flags mask - Mask field for comparing the TCP values
15817 * provided above with the TCP flags field in the received packet
15818 * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
15819 * macros to isolate the mask field and values field that are packed
15820 * into this u32 "word".
15821 */
15822 A_UINT32 tcp_flag_u32;
15823 /**
15824 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
15825 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
15826 * bytes 0 to 3
15827 *
15828 * In this and all the below toeplitz_hash fields, the bytes are
15829 * specified in little-endian order. For example:
15830 * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0
15831 * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1
15832 * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
15833 * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
15834 */
15835 A_UINT32 toeplitz_hash_ipv4_0_3;
15836
15837 /**
15838 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
15839 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
15840 * bytes 4 to 7
15841 */
15842 A_UINT32 toeplitz_hash_ipv4_4_7;
15843
15844 /**
15845 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
15846 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
15847 * bytes 8 to 11
15848 */
15849 A_UINT32 toeplitz_hash_ipv4_8_11;
15850
15851 /**
15852 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
15853 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
15854 * bytes 12 to 15
15855 */
15856 A_UINT32 toeplitz_hash_ipv4_12_15;
15857
15858 /**
15859 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
15860 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
15861 * byte 16
15862 */
15863 A_UINT32 toeplitz_hash_ipv4_16;
15864
15865 /**
15866 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15867 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15868 * bytes 0 to 3
15869 */
15870 A_UINT32 toeplitz_hash_ipv6_0_3;
15871
15872 /**
15873 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15874 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15875 * bytes 4 to 7
15876 */
15877 A_UINT32 toeplitz_hash_ipv6_4_7;
15878
15879 /**
15880 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15881 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15882 * bytes 8 to 11
15883 */
15884 A_UINT32 toeplitz_hash_ipv6_8_11;
15885
15886 /**
15887 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15888 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15889 * bytes 12 to 15
15890 */
15891 A_UINT32 toeplitz_hash_ipv6_12_15;
15892
15893 /**
15894 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15895 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15896 * bytes 16 to 19
15897 */
15898 A_UINT32 toeplitz_hash_ipv6_16_19;
15899
15900 /**
15901 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15902 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15903 * bytes 20 to 22
15904 */
15905 A_UINT32 toeplitz_hash_ipv6_20_23;
15906
15907 /**
15908 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15909 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15910 * bytes 24 to 27
15911 */
15912 A_UINT32 toeplitz_hash_ipv6_24_27;
15913
15914 /**
15915 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15916 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15917 * bytes 28 to 31
15918 */
15919 A_UINT32 toeplitz_hash_ipv6_28_31;
15920
15921 /**
15922 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15923 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15924 * bytes 32 to 35
15925 */
15926 A_UINT32 toeplitz_hash_ipv6_32_35;
15927
15928 /**
15929 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15930 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15931 * bytes 36 to 39
15932 */
15933 A_UINT32 toeplitz_hash_ipv6_36_39;
15934
15935 /**
15936 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15937 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15938 * byte 40
15939 */
15940 A_UINT32 toeplitz_hash_ipv6_40;
15941} wmi_lro_info_cmd_fixed_param;
15942
Nirav Shahbf6450f2015-11-05 11:47:20 +053015943typedef struct {
15944 /*
15945 * TLV tag and len; tag equals
15946 * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param
15947 */
15948 A_UINT32 tlv_header;
15949 /* flash offset to write, starting from 0 */
15950 A_UINT32 offset;
15951 /* vaild data length in buffer, unit: byte */
15952 A_UINT32 length;
15953} wmi_transfer_data_to_flash_cmd_fixed_param;
15954
15955typedef struct {
15956 /*
15957 * TLV tag and len; tag equals
15958 * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param
15959 */
15960 A_UINT32 tlv_header;
15961 /* Return status. 0 for success, non-zero otherwise */
15962 A_UINT32 status;
15963} wmi_transfer_data_to_flash_complete_event_fixed_param;
15964
Pradeep Reddy POTTETI4189bf92016-06-20 14:51:55 +053015965typedef struct {
15966 /*
15967 * TLV tag and len; tag equals
15968 * WMITLV_TAG_STRUC_wmi_read_data_from_flash_cmd_fixed_param
15969 */
15970 A_UINT32 tlv_header;
15971 A_UINT32 offset; /* flash offset to read, starting from 0 */
15972 A_UINT32 length; /* data length to read, unit: byte */
15973} wmi_read_data_from_flash_cmd_fixed_param;
15974
15975typedef struct {
15976 /*
15977 * TLV tag and len; tag equals
15978 * WMITLV_TAG_STRUC_wmi_read_data_from_flash_event_fixed_param
15979 */
15980 A_UINT32 tlv_header;
15981 A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */
15982 A_UINT32 offset; /* flash offset reading from, starting from 0 */
15983 A_UINT32 length; /* length of data being reported, unit: byte */
15984} wmi_read_data_from_flash_event_fixed_param;
15985
Sreelakshmi Konamki58f4d622016-04-14 18:03:21 +053015986typedef enum {
15987 ENHANCED_MCAST_FILTER_DISABLED,
15988 ENHANCED_MCAST_FILTER_ENABLED
15989} ENHANCED_MCAST_FILTER_CONFIG;
15990
15991/*
15992 * Command to enable/disable filtering of multicast IP with unicast mac
15993 */
15994typedef struct {
15995 /*
15996 * TLV tag and len; tag equals
15997 * WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param
15998 */
15999 A_UINT32 tlv_header;
16000 /* Unique id identifying the VDEV */
16001 A_UINT32 vdev_id;
16002 /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */
16003 A_UINT32 enable;
16004} wmi_config_enhanced_mcast_filter_cmd_fixed_param;
16005
Anurag Chouhan05d05fe2016-04-18 17:09:24 +053016006typedef struct {
16007 /*
16008 * TLV tag and len; tag equals
16009 * WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param
16010 */
16011 A_UINT32 tlv_header;
16012 /* unique id identifying the VDEV, generated by the caller */
16013 A_UINT32 vdev_id;
16014 /* WISA enable / disable mode */
16015 A_UINT32 wisa_mode;
16016} wmi_vdev_wisa_cmd_fixed_param;
16017
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -080016018/*
Manikandan Mohan55c94d62015-12-04 13:47:58 -080016019 * This structure is used to report SMPS force mode set complete to host.
16020 */
16021typedef struct {
16022 /* TLV tag and len; tag equals
16023 * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param
16024 */
16025 A_UINT32 tlv_header;
16026 /* Unique id identifying the VDEV */
16027 A_UINT32 vdev_id;
16028 /* Return status. 0 for success, non-zero otherwise */
16029 A_UINT32 status;
16030} wmi_sta_smps_force_mode_complete_event_fixed_param;
16031
16032/*
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -080016033 * This structure is used to report SCPC calibrated data to host.
16034 */
16035typedef struct {
16036 /* TLV tag and len; tag equals
16037 * WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param
16038 */
16039 A_UINT32 tlv_header;
16040 /* number of BDF patches. Each patch contains offset, length and data */
16041 A_UINT32 num_patch;
16042 /* This TLV is followed by another TLV of array of bytes
16043 * A_UINT8 data[];
16044 * This data array contains, for example
16045 * patch1 offset(byte3~0), patch1 data length(byte7~4),
16046 * patch1 data(byte11~8)
16047 * patch2 offset(byte15~12), patch2 data length(byte19~16),
16048 * patch2 data(byte47~20)
16049 */
16050} wmi_scpc_event_fixed_param;
16051
Manikandan Mohan130eb572015-12-23 13:53:34 -080016052/* bpf interface structure */
16053typedef struct wmi_bpf_get_capability_cmd_s {
16054 A_UINT32 tlv_header;
16055 A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */
16056} wmi_bpf_get_capability_cmd_fixed_param;
16057
16058typedef struct wmi_bpf_capability_info_evt_s {
16059 A_UINT32 tlv_header;
16060 A_UINT32 bpf_version; /* fw's implement version */
16061 A_UINT32 max_bpf_filters; /* max filters that fw supports */
16062 A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
16063} wmi_bpf_capability_info_evt_fixed_param;
16064
16065/* bit 0 of flags: report counters */
16066#define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0
16067#define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1
16068typedef struct wmi_bpf_get_vdev_stats_cmd_s {
16069 A_UINT32 tlv_header;
16070 A_UINT32 flags;
16071 A_UINT32 vdev_id;
16072} wmi_bpf_get_vdev_stats_cmd_fixed_param;
16073
16074typedef struct wmi_bpf_vdev_stats_info_evt_s {
16075 A_UINT32 tlv_header;
16076 A_UINT32 vdev_id;
16077 A_UINT32 num_filters;
16078 A_UINT32 num_checked_pkts;
16079 A_UINT32 num_dropped_pkts;
16080 } wmi_bpf_vdev_stats_info_evt_fixed_param;
16081
16082typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
16083 A_UINT32 tlv_header;
16084 A_UINT32 vdev_id;
16085 A_UINT32 filter_id;
16086 A_UINT32 bpf_version; /* host bpf version */
16087 A_UINT32 total_length;
16088 A_UINT32 current_offset;
16089 A_UINT32 current_length;
Manikandan Mohan05ac7ee2015-12-23 14:18:36 -080016090 /*
16091 * The TLV follows:
16092 * A_UINT8 buf_inst[]; //Variable length buffer for the instuctions
16093 */
Manikandan Mohan130eb572015-12-23 13:53:34 -080016094} wmi_bpf_set_vdev_instructions_cmd_fixed_param;
16095
16096#define BPF_FILTER_ID_ALL 0xFFFFFFFF
16097typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
16098 A_UINT32 tlv_header;
16099 A_UINT32 vdev_id;
16100 A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */
16101} wmi_bpf_del_vdev_instructions_cmd_fixed_param;
16102
Govind Singhc7d51942016-02-01 12:09:31 +053016103#define AES_BLOCK_LEN 16 /* in bytes */
16104#define FIPS_KEY_LENGTH_128 16 /* in bytes */
16105#define FIPS_KEY_LENGTH_256 32 /* in bytes */
16106#define FIPS_ENCRYPT_CMD 0
16107#define FIPS_DECRYPT_CMD 1
16108#define FIPS_ENGINE_AES_CTR 0
16109#define FIPS_ENGINE_AES_MIC 1
16110#define FIPS_ERROR_OPER_TIMEOUT 1
16111
16112/* WMI_PDEV_FIPS_CMDID */
16113typedef struct {
16114 /*
16115 * TLV tag and len; tag equals
16116 * WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param
16117 */
16118 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016119 union {
16120 /* OBSOLETE - will be removed once all refs are gone */
16121 A_UINT32 mac_id;
16122 /** pdev_id for identifying the MAC
16123 * See macros starting with WMI_PDEV_ID_ for values.
16124 */
16125 A_UINT32 pdev_id;
16126 };
Govind Singhc7d51942016-02-01 12:09:31 +053016127 A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
16128 /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
16129 A_UINT32 mode;
16130 /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
16131 A_UINT32 key_len;
16132 A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
16133 A_UINT32 data_len; /* data length */
16134 /*
16135 * Following this structure is the TLV:
16136 * A_UINT32 data[1]; - In Data (keep this in the end)
16137 */
16138} wmi_pdev_fips_cmd_fixed_param;
16139
16140typedef struct {
16141 /*
16142 * TLV tag and len; tag equals
16143 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param
16144 */
16145 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016146 union {
16147 /* OBSOLETE - will be removed once all refs are gone */
16148 A_UINT32 mac_id;
16149 /** pdev_id for identifying the MAC
16150 * See macros starting with WMI_PDEV_ID_ for values.
16151 */
16152 A_UINT32 pdev_id;
16153 };
Govind Singhc7d51942016-02-01 12:09:31 +053016154 A_UINT32 enable; /* 1:enable, 0:disable */
16155 /* 1:GPIO parallel mode, 0:GPIO serial mode */
16156 A_UINT32 mode;
16157 A_UINT32 rx_antenna; /* rx antenna */
16158 A_UINT32 tx_default_antenna; /* tx default antenna */
16159 /*
16160 * Following this structure is the TLV:
16161 * wmi_pdev_smart_ant_gpio_handle
16162 */
16163} wmi_pdev_smart_ant_enable_cmd_fixed_param;
16164
16165/** GPIO pins/function values to control antennas */
16166typedef struct {
16167 /*
16168 * TLV tag and len; tag equals
16169 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle
16170 */
16171 A_UINT32 tlv_header;
16172 /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
16173 A_UINT32 gpio_pin;
16174 A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */
Govind Singh869c9872016-02-22 18:36:34 +053016175 /** pdev_id for identifying the MAC
16176 * See macros starting with WMI_PDEV_ID_ for values.
16177 */
16178 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053016179} wmi_pdev_smart_ant_gpio_handle;
16180
16181typedef struct {
16182 /*
16183 * TLV tag and len; tag equals
16184 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param
16185 */
16186 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016187 union {
16188 /* OBSOLETE - will be removed once all refs are gone */
16189 A_UINT32 mac_id;
16190 /** pdev_id for identifying the MAC
16191 * See macros starting with WMI_PDEV_ID_ for values.
16192 */
16193 A_UINT32 pdev_id;
16194 };
Govind Singhc7d51942016-02-01 12:09:31 +053016195 A_UINT32 rx_antenna;
16196} wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
16197
16198typedef struct {
16199 /*
16200 * TLV tag and len; tag equals
16201 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param
16202 */
16203 A_UINT32 tlv_header;
16204 /** unique id identifying the vdev, generated by the caller */
Govind Singh869c9872016-02-22 18:36:34 +053016205 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053016206 /** peer MAC address */
16207 wmi_mac_addr peer_macaddr;
16208 /*
16209 * Following this structure is the TLV:
16210 * wmi_peer_smart_ant_set_tx_antenna_series
16211 */
16212} wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
16213
16214typedef struct {
16215 /*
16216 * TLV tag and len; tag equals
16217 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series
16218 */
16219 A_UINT32 tlv_header;
16220 /* antenna array */
16221 A_UINT32 antenna_series;
16222} wmi_peer_smart_ant_set_tx_antenna_series;
16223
16224typedef struct {
16225 /*
16226 * TLV tag and len; tag equals
16227 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param
16228 */
16229 A_UINT32 tlv_header;
16230 /* rate array */
16231 A_UINT32 train_rate_series;
16232 /* antenna array */
16233 A_UINT32 train_antenna_series;
16234 /* Rate flags */
16235 /* TODO: For future use? */
16236 A_UINT32 rc_flags;
16237} wmi_peer_smart_ant_set_train_antenna_param;
16238
16239typedef struct {
16240 /*
16241 * TLV tag and len; tag equals
16242 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param
16243 */
16244 A_UINT32 tlv_header;
16245 /** unique id identifying the VDEV, generated by the caller */
Govind Singh869c9872016-02-22 18:36:34 +053016246 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053016247 /** peer MAC address */
16248 wmi_mac_addr peer_macaddr;
16249 /* num packets; 0-stop training */
16250 A_UINT32 num_pkts;
16251 /*
16252 * Following this structure is the TLV:
16253 * wmi_peer_smart_ant_set_train_antenna_param
16254 */
16255} wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
16256
16257typedef struct {
16258 /*
16259 * TLV tag and len; tag equals
16260 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param
16261 */
16262 A_UINT32 tlv_header;
16263 /** unique id identifying the vdev, generated by the caller */
Govind Singh869c9872016-02-22 18:36:34 +053016264 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053016265 /** peer MAC address */
16266 wmi_mac_addr peer_macaddr;
16267 /* command id*/
16268 A_UINT32 cmd_id;
16269 /* number of arguments passed */
16270 A_UINT32 args_count;
16271 /*
16272 * Following this structure is the TLV:
16273 * A_UINT32 args[]; // argument list
16274 */
16275} wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
16276
16277typedef struct {
16278 /*
16279 * TLV tag and len; tag equals
16280 * WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain
16281 */
16282 A_UINT32 tlv_header;
16283 A_UINT32 antCtrlChain;
Govind Singh869c9872016-02-22 18:36:34 +053016284 /** pdev_id for identifying the MAC
16285 * See macros starting with WMI_PDEV_ID_ for values.
16286 */
16287 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053016288} wmi_pdev_set_ant_ctrl_chain;
16289
16290typedef struct {
16291 /*
16292 * TLV tag and len; tag equals
16293 * WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param
16294 */
16295 A_UINT32 tlv_header;
16296 A_UINT32 mac_id; /* MAC ID */
16297 A_UINT32 antCtrlCommon1;
16298 A_UINT32 antCtrlCommon2;
16299 /*
16300 * Following this structure is the TLV:
16301 * wmi_pdev_set_ant_ctrl_chain
16302 */
16303} wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
16304
16305typedef struct {
16306 /* TLV tag and len; tag equals
16307 * WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param
16308 */
16309 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016310 union {
16311 /* OBSOLETE - will be removed once all refs are gone */
16312 A_UINT32 mac_id;
16313 /** pdev_id for identifying the MAC
16314 * See macros starting with WMI_PDEV_ID_ for values.
16315 */
16316 A_UINT32 pdev_id;
16317 };
Govind Singhc7d51942016-02-01 12:09:31 +053016318 /** len of CTL info */
16319 A_UINT32 ctl_len;
16320 /* ctl array (len adjusted to number of words)
16321 * Following this structure is the TLV:
16322 * A_UINT32 ctl_info[1];
16323 */
16324} wmi_pdev_set_ctl_table_cmd_fixed_param;
16325
16326typedef struct {
16327 /*
16328 * TLV tag and len; tag equals
16329 * WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param
16330 */
16331 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016332 union {
16333 /* OBSOLETE - will be removed once all refs are gone */
16334 A_UINT32 mac_id;
16335 /** pdev_id for identifying the MAC
16336 * See macros starting with WMI_PDEV_ID_ for values.
16337 */
16338 A_UINT32 pdev_id;
16339 };
Govind Singhc7d51942016-02-01 12:09:31 +053016340 A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
16341 /*
16342 * Bit 7:0 len of array gain table
16343 * Bit 8 bypass multi chain gain or not
16344 */
16345 /*
16346 * array gain table(s) (len adjusted to number of words).
16347 * Following this structure is the TLV:
16348 * A_UINT32 arraygain_tbl[1];
16349 */
16350} wmi_pdev_set_mimogain_table_cmd_fixed_param;
16351
16352#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
16353#define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
16354#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_ARRAY_GAIN_LEN)
16355#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_ARRAY_GAIN_LEN)
16356
16357#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
16358#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
16359#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
16360#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
16361
16362
16363typedef struct {
16364 /*
16365 * TLV tag and len; tag equals
16366 * WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param
16367 */
16368 A_UINT32 tlv_header;
16369 /** parameter id */
16370 A_UINT32 param_id;
16371 /** parameter value */
16372 A_UINT32 param_value;
16373} wmi_fwtest_set_param_cmd_fixed_param;
16374
16375/* Expressed in 1 part in 1000 (permille) */
16376#define WMI_ATF_DENOMINATION 1000
16377
Nitesh Shah0f933b82016-07-20 16:05:03 +053016378#define WMI_ATF_SSID_FAIR_SCHED 0 /** Fair ATF scheduling for vdev */
16379#define WMI_ATF_SSID_STRICT_SCHED 1 /** Strict ATF scheduling for vdev */
16380
Govind Singhc7d51942016-02-01 12:09:31 +053016381typedef struct {
16382 /*
16383 * TLV tag and len; tag equals
16384 * WMITLV_TAG_STRUC_wmi_atf_peer_info
16385 */
16386 A_UINT32 tlv_header;
16387 wmi_mac_addr peer_macaddr;
16388 A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
16389 A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
16390 /* Peer congestion threshold for future use */
16391 A_UINT32 atf_units_reserved;
16392} wmi_atf_peer_info;
16393
16394typedef struct {
16395 /*
16396 * TLV tag and len; tag equals
16397 * WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param
16398 */
16399 A_UINT32 tlv_header;
16400 A_UINT32 num_peers;
16401 /*
16402 * Following this structure is the TLV:
Himanshu Agarwal134b7362016-05-13 20:30:12 +053016403 * struct wmi_atf_peer_info peer_info[num_peers];
Govind Singhc7d51942016-02-01 12:09:31 +053016404 */
16405} wmi_peer_atf_request_fixed_param;
16406
Himanshu Agarwal134b7362016-05-13 20:30:12 +053016407/* Structure for Bandwidth Fairness peer information */
16408typedef struct {
16409 /*
16410 * TLV tag and len; tag equals
16411 * WMITLV_TAG_STRUC_wmi_bwf_peer_info
16412 */
16413 A_UINT32 tlv_header;
16414 wmi_mac_addr peer_macaddr;
16415 /* BWF guaranteed_bandwidth for the peers in mbps */
16416 A_UINT32 bwf_guaranteed_bandwidth;
16417 /*
16418 * BWF Maximum airtime percentage that can be allocated
16419 * to the peer to meet the guaranteed_bandwidth
16420 */
16421 A_UINT32 bwf_max_airtime;
16422 /* BWF priority of the peer to allocate the tokens dynamically */
16423 A_UINT32 bwf_peer_priority;
16424} wmi_bwf_peer_info;
16425
16426/* Structure for Bandwidth Fairness peer request */
16427typedef struct {
16428 /*
16429 * TLV tag and len; tag equals
16430 * WMITLV_TAG_STRUC_wmi_peer_bwf_request_fixed_param
16431 */
16432 A_UINT32 tlv_header;
16433 A_UINT32 num_peers;
16434 /*
16435 * Following this structure is the TLV:
16436 * struct wmi_bwf_peer_info peer_info[num_peers];
16437 */
16438} wmi_peer_bwf_request_fixed_param;
16439
16440
Govind Singhc7d51942016-02-01 12:09:31 +053016441/* Equal distribution of ATF air time within an VDEV. */
16442typedef struct {
16443 /*
16444 * TLV tag and len; tag equals
16445 * WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param
16446 */
16447 A_UINT32 tlv_header;
16448 A_UINT32 vdev_id;
16449 A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
16450} wmi_vdev_atf_request_fixed_param;
16451
16452typedef struct {
16453 /*
16454 * TLV tag and len; tag equals
16455 * WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param
16456 */
16457 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016458 /** pdev_id for identifying the MAC
16459 * See macros starting with WMI_PDEV_ID_ for values.
16460 */
16461 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053016462 /** parameter */
16463 A_UINT32 param;
16464} wmi_pdev_get_ani_cck_config_cmd_fixed_param;
16465
16466typedef struct {
16467 /*
16468 * TLV tag and len; tag equals
16469 * WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param
16470 */
16471 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016472 /** pdev_id for identifying the MAC
16473 * See macros starting with WMI_PDEV_ID_ for values.
16474 */
16475 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053016476 /** parameter */
16477 A_UINT32 param;
16478} wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
16479
16480typedef struct {
16481 /*
16482 * TLV tag and len; tag equals
16483 * WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param
16484 */
16485 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016486 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053016487 A_UINT32 qb_enable;
16488 wmi_mac_addr peer_macaddr;
16489} WMI_QBOOST_CFG_CMD_fixed_param;
16490
16491#define WMI_INST_STATS_INVALID_RSSI 0
16492
16493typedef struct {
16494 /*
16495 * TLV tag and len; tag equals
16496 * WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param
16497 */
16498 A_UINT32 tlv_header;
16499 A_UINT32 iRSSI; /* dBm above the noise floor */
16500 /* peer MAC address */
16501 wmi_mac_addr peer_macaddr;
Govind Singh869c9872016-02-22 18:36:34 +053016502 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053016503} wmi_inst_rssi_stats_resp_fixed_param;
16504
16505typedef struct {
16506 /*
16507 * TLV tag and len; tag equals
16508 * WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info
16509 */
16510 A_UINT32 tlv_header;
16511 A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
16512} wmi_peer_cck_ofdm_rate_info;
16513
16514typedef struct {
16515 /*
16516 * TLV tag and len; tag equals
16517 * WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info
16518 */
16519 A_UINT32 tlv_header;
16520 A_UINT32 ratecode_20; /* Rate code for 20MHz BW */
16521 A_UINT32 ratecode_40; /* Rate code for 40MHz BW */
16522 A_UINT32 ratecode_80; /* Rate code for 80MHz BW */
16523} wmi_peer_mcs_rate_info;
16524
16525typedef struct {
16526 /*
16527 * TLV tag and len; tag equals
16528 * WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param
16529 */
16530 A_UINT32 tlv_header;
16531 wmi_mac_addr peer_macaddr;
16532 A_UINT32 ratecount; /* Max Rate count for each mode */
Govind Singh869c9872016-02-22 18:36:34 +053016533 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053016534 /*
16535 * Following this structure are the TLV
16536 * struct wmi_peer_cck_ofdm_rate_info;
16537 * struct wmi_peer_mcs_rate_info;
16538 */
16539} wmi_peer_ratecode_list_event_fixed_param;
16540
16541typedef struct wmi_wds_addr_event {
16542 /*
16543 * TLV tag and len; tag equals
16544 * WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param
16545 */
16546 A_UINT32 tlv_header;
16547 A_UINT32 event_type[4];
16548 wmi_mac_addr peer_mac;
16549 wmi_mac_addr dest_mac;
Govind Singh869c9872016-02-22 18:36:34 +053016550 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053016551} wmi_wds_addr_event_fixed_param;
16552
16553typedef struct {
16554 /*
16555 * TLV tag and len; tag equals
16556 * WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param
16557 */
16558 A_UINT32 tlv_header;
16559 wmi_mac_addr peer_macaddr;
16560 A_UINT32 peer_ps_state;
16561} wmi_peer_sta_ps_statechange_event_fixed_param;
16562
16563/* WMI_PDEV_FIPS_EVENTID */
16564typedef struct {
16565 /*
16566 * TLV tag and len; tag equals
16567 * WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param
16568 */
16569 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016570 union {
16571 /* OBSOLETE - will be removed once all refs are gone */
16572 A_UINT32 mac_id;
16573 /** pdev_id for identifying the MAC
16574 * See macros starting with WMI_PDEV_ID_ for values.
16575 */
16576 A_UINT32 pdev_id;
16577 };
Govind Singhc7d51942016-02-01 12:09:31 +053016578 /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
16579 A_UINT32 error_status;
16580 A_UINT32 data_len; /* Data length */
16581 /*
16582 * Following this structure is the TLV:
16583 * A_UINT32 data[1]; // Out Data (keep this in the end)
16584 */
16585} wmi_pdev_fips_event_fixed_param;
16586
16587typedef struct {
16588 /*
16589 * TLV tag and len; tag equals
16590 * WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param
16591 */
16592 A_UINT32 tlv_header;
16593 A_UINT32 mac_id; /* MAC ID */
16594 /* Noise threshold iterations with high values */
16595 A_UINT32 noise_floor_report_iter;
16596 /* Total noise threshold iterations */
16597 A_UINT32 noise_floor_total_iter;
16598} wmi_pdev_channel_hopping_event_fixed_param;
16599
16600enum {
16601 WMI_PDEV_RESERVE_AST_ENTRY_OK,
16602 WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
16603 WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
16604};
16605
16606typedef struct {
16607 /*
16608 * TLV tag and len; tag equals
16609 * WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param
16610 */
16611 A_UINT32 tlv_header;
16612 A_UINT32 mac_id; /* MAC ID */
16613 A_UINT32 rate_flags;
16614 /**
16615 * FLAG_ONE_CHAIN 0x001 - one chain mask
16616 * FLAG_TWO_CHAIN 0x005 - two chain mask
16617 * FLAG_THREE_CHAIN 0x007 - three chain mask
16618 * FLAG_FOUR_CHAIN 0x00F - four chain mask
16619 * FLAG_STBC 0x010 - STBC is set
16620 * FLAG_40MHZ 0x020
16621 * FLAG_80MHZ 0x040
16622 * FLAG_160MHZ 0x080
16623 * FLAG_TXBF 0x0100 - Tx Bf enabled
16624 * FLAG_RTSENA 0x0200 - RTS enabled
16625 * FLAG_CTSENA 0x0400 - CTS enabled
16626 * FLAG_LDPC 0x0800 - LDPC set
16627 * FLAG_SERIES1 0x1000 -
16628 * FLAG_SGI 0x2000 - Short gaurd interval
16629 * FLAG_MU2 0x4000 - MU2 data
16630 * FLAG_MU3 0x8000 - MU3 data
16631 * */
16632 A_UINT32 nss;
16633 /**
16634 * NSS 0x0 - 0x3
16635 * */
16636 A_UINT32 preamble;
16637 /**
16638 * PREAM_OFDM - 0x0
16639 * PREAM_CCK - 0x1
16640 * PREAM_HT - 0x2
16641 * PREAM_VHT - 0x3
16642 * */
16643 A_UINT32 hw_rate;
16644 /**
16645 * *** HW_OFDM_RATE ***
16646 * OFDM_48_MBPS - 0x0
16647 * OFDM_24_MBPS - 0x1
16648 * OFDM_12_MBPS - 0x2
16649 * OFDM_6_MBPS - 0x3
16650 * OFDM_54_MBPS - 0x4
16651 * OFDM_36_MBPS - 0x5
16652 * OFDM_18_MBPS - 0x6
16653 * OFDM_9_MBPS - 0x7
16654 *
16655 * *** HW_CCK_RATE ***
16656 * CCK_11_LONG_MBPS - 0x0
16657 * CCK_5_5_LONG_MBPS - 0x1
16658 * CCK_2_LONG_MBPS - 0x2
16659 * CCK_1_LONG_MBPS - 0x3
16660 * CCK_11_SHORT_MBPS - 0x4
16661 * CCK_5_5_SHORT_MBPS - 0x5
16662 * CCK_2_SHORT_MBPS - 0x6
16663 *
16664 * *** HW_HT / VHT_RATE ***
16665 * MCS 0x0 - 0x9
16666 * */
16667} wmi_pdev_get_tpc_cmd_fixed_param;
16668
16669typedef struct {
Anurag Chouhane326c922016-08-04 18:43:19 +053016670 A_UINT32 tlv_header; /* TLV tag and len; tag equals
16671 WMITLV_TAG_STRUC_wmi_pdev_get_chip_power_stats_cmd_fixed_param */
16672 /**
16673 * pdev_id for identifying the MAC See macros
16674 * starting with WMI_PDEV_ID_ for values.
16675 */
16676 A_UINT32 pdev_id;
16677} wmi_pdev_get_chip_power_stats_cmd_fixed_param;
16678
16679
16680typedef struct {
Govind Singhc7d51942016-02-01 12:09:31 +053016681 /*
16682 * TLV tag and len; tag equals
16683 * WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param
16684 */
16685 A_UINT32 tlv_header;
16686 A_UINT32 reserved0; /* for future need */
16687 /*
16688 * Following this structure is the TLV:
16689 * A_UINT32 tpc[1];
16690 */
16691} wmi_pdev_tpc_event_fixed_param;
16692
16693typedef struct {
16694 /*
16695 * TLV tag and len; tag equals
16696 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param
16697 */
16698 A_UINT32 tlv_header;
16699 A_UINT32 mac_id; /* MAC ID */
16700 A_UINT32 nfdBr_len;
16701 A_UINT32 nfdBm_len;
16702 A_UINT32 freqNum_len;
16703 /*
16704 * Following this structure is the TLV:
16705 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
16706 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
16707 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
16708 */
16709} wmi_pdev_nfcal_power_all_channels_event_fixed_param;
16710
16711typedef struct {
16712 /*
16713 * TLV tag and len; tag equals
16714 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr
16715 */
16716 A_UINT32 tlv_header;
16717 A_UINT32 nfdBr;
16718} wmi_pdev_nfcal_power_all_channels_nfdBr;
16719
16720typedef struct {
16721 /*
16722 * TLV tag and len; tag equals
16723 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm
16724 */
16725 A_UINT32 tlv_header;
16726 A_UINT32 nfdBm;
16727} wmi_pdev_nfcal_power_all_channels_nfdBm;
16728
16729typedef struct {
16730 /*
16731 * TLV tag and len; tag equals
16732 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum
16733 */
16734 A_UINT32 tlv_header;
16735 A_UINT32 freqNum;
16736} wmi_pdev_nfcal_power_all_channels_freqNum;
16737
16738typedef struct {
16739 /*
16740 * TLV tag and len; tag equals
16741 * WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param
16742 */
16743 A_UINT32 tlv_header;
16744 A_UINT32 cck_level;
16745} wmi_ani_cck_event_fixed_param;
16746
Anurag Chouhane326c922016-08-04 18:43:19 +053016747typedef enum wmi_power_debug_reg_fmt_type {
16748 /* WMI_POWER_DEBUG_REG_FMT_TYPE_ROME -> Dumps following 12 Registers
16749 * SOC_SYSTEM_SLEEP
16750 * WLAN_SYSTEM_SLEEP
16751 * RTC_SYNC_FORCE_WAKE
16752 * MAC_DMA_ISR
16753 * MAC_DMA_TXRX_ISR
16754 * MAC_DMA_ISR_S1
16755 * MAC_DMA_ISR_S2
16756 * MAC_DMA_ISR_S3
16757 * MAC_DMA_ISR_S4
16758 * MAC_DMA_ISR_S5
16759 * MAC_DMA_ISR_S6
16760 * MAC_DMA_ISR_S7
16761 */
16762 WMI_POWER_DEBUG_REG_FMT_TYPE_ROME,
16763 WMI_POWER_DEBUG_REG_FMT_TYPE_MAX = 0xf,
16764} WMI_POWER_DEBUG_REG_FMT_TYPE;
16765
16766typedef struct {
16767 A_UINT32 tlv_header; /* TLV tag and len; tag equals
16768 WMITLV_TAG_STRUC_wmi_chip_power_stats_event_fixed_param */
16769 /*
16770 * maximum range is 35 hours, due to conversion from internal
16771 * 0.03215 ms units to ms
16772 */
16773 A_UINT32 cumulative_sleep_time_ms;
16774 /*
16775 * maximum range is 35 hours, due to conversion from internal
16776 * 0.03215 ms units to ms
16777 */
16778 A_UINT32 cumulative_total_on_time_ms;
16779 /* count of number of times chip enterred deep sleep */
16780 A_UINT32 deep_sleep_enter_counter;
16781 /* Last Timestamp when Chip went to deep sleep */
16782 A_UINT32 last_deep_sleep_enter_tstamp_ms;
16783 /*
16784 * WMI_POWER_DEBUG_REG_FMT_TYPE enum, describes debug registers
16785 * being dumped as part of the event
16786 */
16787 A_UINT32 debug_register_fmt;
16788 /* number of debug registers being sent to host */
16789 A_UINT32 num_debug_register;
16790 /*
16791 * Following this structure is the TLV:
16792 * A_UINT32 debug_registers[num_debug_registers];
16793 */
16794} wmi_pdev_chip_power_stats_event_fixed_param;
16795
16796
Govind Singhc7d51942016-02-01 12:09:31 +053016797typedef struct {
16798 /*
16799 * TLV tag and len; tag equals
16800 * WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param
16801 */
16802 A_UINT32 tlv_header;
16803 A_UINT32 ofdm_level;
16804} wmi_ani_ofdm_event_fixed_param;
16805
Sreelakshmi Konamki02a4d7c2016-04-14 17:46:54 +053016806typedef enum wmi_coex_config_type {
16807 /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */
16808 WMI_COEX_CONFIG_PAGE_P2P_TDM = 1,
16809 /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */
16810 WMI_COEX_CONFIG_PAGE_STA_TDM = 2,
16811 /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */
16812 WMI_COEX_CONFIG_PAGE_SAP_TDM = 3,
Himanshu Agarwal800d58d2016-05-13 21:22:19 +053016813 /* config during WLAN connection */
16814 WMI_COEX_CONFIG_DURING_WLAN_CONN = 4,
16815 /* config to enable/disable BTC */
16816 WMI_COEX_CONFIG_BTC_ENABLE = 5,
Himanshu Agarwalb4e1a492016-09-13 22:42:27 +053016817 /* config of COEX debug setting */
16818 WMI_COEX_CONFIG_COEX_DBG = 6,
Sreelakshmi Konamki02a4d7c2016-04-14 17:46:54 +053016819} WMI_COEX_CONFIG_TYPE;
16820
16821typedef struct {
16822 A_UINT32 tlv_header;
16823 A_UINT32 vdev_id;
16824 /* wmi_coex_config_type enum */
16825 A_UINT32 config_type;
16826 A_UINT32 config_arg1;
16827 A_UINT32 config_arg2;
16828} WMI_COEX_CONFIG_CMD_fixed_param;
16829
Sandeep Puligillaff55fec2016-03-09 12:54:23 -080016830/**
16831 * This command is sent from WLAN host driver to firmware to
16832 * request firmware to enable/disable channel avoidance report
16833 * to host.
16834 */
16835enum {
16836 WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0,
16837 WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1
16838};
16839
16840typedef struct {
16841 /*
16842 * TLV tag and len; tag equals
16843 * WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param
16844 */
16845 A_UINT32 tlv_header;
16846 /* Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */
16847 A_UINT32 rpt_allow;
16848} WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param;
16849
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +053016850/*
16851 * Periodic channel stats WMI command structure
16852 * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID
16853 */
16854typedef struct {
16855 /*
16856 * TLV tag and len; tag equals
16857 * WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param
16858 */
16859 A_UINT32 tlv_header;
16860 /** 1 = enable, 0 = disable */
16861 A_UINT32 enable;
16862 /** periodic stats duration (units are milliseconds) */
16863 A_UINT32 stats_period;
16864} wmi_set_periodic_channel_stats_config_fixed_param;
16865
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +053016866typedef struct {
16867 /*
16868 * TLV tag and len; tag equals
16869 * WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param
16870 */
16871 A_UINT32 tlv_header;
16872 /*
16873 * pdev_id for identifying the MAC
16874 * See macros starting with WMI_PDEV_ID_ for values.
16875 */
16876 A_UINT32 pdev_id;
16877 /* Identify the wlan module */
16878 A_UINT32 module_id;
16879 /* Num of elements in the following args[] array */
16880 A_UINT32 num_args;
16881/**
16882 * Following this structure are the TLVs:
16883 * A_UINT32 args[];
16884 **/
16885} wmi_pdev_wal_power_debug_cmd_fixed_param;
16886
Nitesh Shah5de1cf82016-06-29 20:13:17 +053016887typedef struct {
16888 /*
16889 * TLV tag and len; tag equals
16890 * WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param
16891 */
16892 A_UINT32 tlv_header;
16893 /**
16894 * @brief rx_timeout_pri - what rx reorder timeout (ms) to use
16895 * for the AC
16896 * @details
16897 * Each WMM access category (voice, video, best-effort,
16898 * background) will have its own timeout value to dictate
16899 * how long to wait for missing rx MPDUs to arrive before
16900 * releasing subsequent MPDUs that have already been
16901 * received.
16902 * This parameter specifies the timeout in milliseconds
16903 * for each access category.
16904 * The array elements are indexed by the WMI_AC enum to
16905 * identify which array element corresponds to which AC /
16906 * traffic type.
16907 */
16908 A_UINT32 rx_timeout_pri[WMI_AC_MAX];
16909} wmi_pdev_set_reorder_timeout_val_cmd_fixed_param;
16910
Manjeet Singh27aa9c12016-08-24 15:38:42 +053016911/**
16912 * wlan stats shall be understood as per period.
16913 * Generally, it is reported periodically based on the period specified by host.
16914 * But if the variation of one stats of compared to the
16915 * pervious notification exceeds a threshold,
16916 * FW will report the wlan stats immediately.
16917 * The values of the stats becomes the new reference to compute variations.
16918 * This threshold can be a global setting or per category.
16919 * Host can enable/disable the mechanism for any stats per bitmap.
16920 * TX/RX thresholds (percentage value) are shared across ACs,
16921 * and TX/RX stats comprisons are processed per AC of each peer.
16922 * For example, if bit 0 (stand for tx_mpdus) of tx_thresh_bitmap is set to 1,
16923 * and the detailed tx_mpdus threshold value is set to 10%,
16924 * suppose tx_mpdus value of BE of peer 0 is 100 in first period,
16925 * and it reaches 110 during the second period,
16926 * FW will generate and send out a wlan stats event immediately.
16927 */
16928typedef struct {
16929 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_stats_threshold_cmd_fixed_param */
16930 /** Indicate if threshold mechnism is enabled or disabled.
16931 * It is disabled by default.
16932 * Host can enable and disable it dynamically.
16933 */
16934 A_UINT32 enable_thresh;
16935 /** use_thresh_bitmap equals 0 means gbl_thresh is used.
16936 * when use_thresh_bitmap equals 1, ignore gbl_thresh and use stats bitmap indicated thresholds.
16937 */
16938 A_UINT32 use_thresh_bitmap;
16939 /** global threshold, valid when use_thresh_bitmap equals 0.
16940 * It takes effect for all counters.
16941 * If use_thresh_bitmap ==0 && gbl_thresh == 0, disable threshold mechanism.
16942 */
16943 A_UINT32 gbl_thresh;
16944 /** Enable/disable bitmap for threshold mechanism of CCA stats */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +053016945 A_UINT32 cca_thresh_enable_bitmap;
Manjeet Singh27aa9c12016-08-24 15:38:42 +053016946 /** Enable/disable bitmap for threshold mechanism of signal stats */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +053016947 A_UINT32 signal_thresh_enable_bitmap;
Manjeet Singh27aa9c12016-08-24 15:38:42 +053016948 /** Enable/disable bitmap for threshold mechanism of TX stats */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +053016949 A_UINT32 tx_thresh_enable_bitmap;
Manjeet Singh27aa9c12016-08-24 15:38:42 +053016950 /** Enable/disable bitmap for threshold mechanism of RX stats */
Himanshu Agarwal5fd83432016-09-14 20:09:41 +053016951 A_UINT32 rx_thresh_enable_bitmap;
Manjeet Singh27aa9c12016-08-24 15:38:42 +053016952 /* This TLV is followed by TLVs below:
16953 * wmi_chan_cca_stats_thresh cca_thresh;
16954 * wmi_peer_signal_stats_thresh signal_thresh;
16955 * wmi_tx_stats_thresh tx_thresh;
16956 * wmi_rx_stats_thresh rx_thresh;
16957 */
16958} wmi_pdev_set_stats_threshold_cmd_fixed_param;
16959
16960typedef enum {
16961 WMI_REQUEST_WLAN_TX_STAT = 0x01,
16962 WMI_REQUEST_WLAN_RX_STAT = 0x02,
16963 WMI_REQUEST_WLAN_CCA_STAT = 0x04,
16964 WMI_REQUEST_WLAN_SIGNAL_STAT = 0x08,
16965} wmi_wlan_stats_id;
16966
16967typedef struct {
16968 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlan_stats_cmd_fixed_param */
16969 wmi_wlan_stats_id stats_id;
16970} wmi_request_wlan_stats_cmd_fixed_param;
16971
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053016972typedef enum {
16973 WLAN_2G_CAPABILITY = 0x1,
16974 WLAN_5G_CAPABILITY = 0x2,
16975} WLAN_BAND_CAPABILITY;
16976
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053016977typedef enum wmi_hw_mode_config_type {
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053016978 /* Only one PHY is active. */
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053016979 WMI_HW_MODE_SINGLE = 0,
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053016980 /**
16981 * Both PHYs are active in different bands, one in 2G
16982 * and another in 5G.
16983 */
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053016984 WMI_HW_MODE_DBS = 1,
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053016985 /**
16986 * Both PHYs are in passive mode (only rx) in same band;
16987 * no tx allowed.
16988 */
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053016989 WMI_HW_MODE_SBS_PASSIVE = 2,
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053016990 /**
16991 * Both PHYs are active in the same band.
16992 * Support for both PHYs within one band is planned for 5G only
16993 * (as indicated in WMI_MAC_PHY_CAPABILITIES),
16994 * but could be extended to other bands in the future.
16995 * The separation of the band between the two PHYs needs to be
16996 * communicated separately.
16997 */
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053016998 WMI_HW_MODE_SBS = 3,
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053016999 /**
17000 * 3 PHYs, with 2 on the same band doing SBS
17001 * as in WMI_HW_MODE_SBS, and 3rd on the other band
17002 */
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053017003 WMI_HW_MODE_DBS_SBS = 4,
17004} WMI_HW_MODE_CONFIG_TYPE;
17005
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053017006#define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1)
17007#define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
17008
17009#define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1)
17010#define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
17011
17012#define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1)
17013#define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
17014
17015#define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1)
17016#define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
17017
17018#define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1)
17019#define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
17020
17021#define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1)
17022#define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
17023
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053017024#define WMI_MAX_MUBFEE_GET(flags) WMI_GET_BITS(flags, 28, 4)
17025#define WMI_MAX_MUBFEE_SET(flags, value) WMI_SET_BITS(flags, 28, 4, value)
17026
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053017027typedef struct {
17028 /*
17029 * TLV tag and len; tag equals
17030 * WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES
17031 */
17032 A_UINT32 tlv_header;
17033 /*
17034 * hw_mode_id - identify a particular set of HW characteristics, as
17035 * specified by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element
17036 * must be mapped to its parent WMI_HW_MODE_CAPABILITIES element using
17037 * hw_mode_id. No particular ordering of WMI_MAC_PHY_CAPABILITIES
17038 * elements should be assumed, though in practice the elements may
17039 * always be ordered by hw_mode_id
17040 */
17041 A_UINT32 hw_mode_id;
17042 /*
17043 * pdev_id starts with 1. pdev_id 1 => phy_id 0,
17044 * pdev_id 2 => phy_id 1
17045 */
17046 A_UINT32 pdev_id;
17047 /* phy id. Starts with 0 */
17048 A_UINT32 phy_id;
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053017049 /* supported modulations and number of MU beamformees */
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053017050 union {
Himanshu Agarwale93c55e2016-05-20 12:18:15 +053017051 struct {
17052 A_UINT32 supports_11b:1,
17053 supports_11g:1,
17054 supports_11a:1,
17055 supports_11n:1,
17056 supports_11ac:1,
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053017057 supports_11ax:1,
17058
17059 unused:22,
17060
17061 /* max MU beamformees supported per MAC */
17062 max_mubfee:4;
Himanshu Agarwale93c55e2016-05-20 12:18:15 +053017063 };
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053017064 A_UINT32 supported_flags;
17065 };
17066 /* supported bands, enum WLAN_BAND_CAPABILITY */
17067 A_UINT32 supported_bands;
17068 /*
17069 * ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us,
17070 * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us
17071 */
17072 A_UINT32 ampdu_density;
17073 /* max bw supported 2G, enum wmi_channel_width */
17074 A_UINT32 max_bw_supported_2G;
17075 /* WMI HT Capability, WMI_HT_CAP defines */
17076 A_UINT32 ht_cap_info_2G;
17077 /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
17078 A_UINT32 vht_cap_info_2G;
17079 /*
17080 * VHT Supported MCS Set field Rx/Tx same
17081 * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as
17082 * follows
17083 * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
17084 * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
17085 * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
17086 * - 3 indicates that n spatial streams is not supported
17087 */
17088 A_UINT32 vht_supp_mcs_2G;
17089 /* HE capability info field of 802.11ax, WMI_HE_CAP defines */
17090 A_UINT32 he_cap_info_2G;
17091 /* HE Supported MCS Set field Rx/Tx same */
17092 A_UINT32 he_supp_mcs_2G;
17093 /* Valid Transmit chain mask */
17094 A_UINT32 tx_chain_mask_2G;
17095 /* Valid Receive chain mask */
17096 A_UINT32 rx_chain_mask_2G;
17097 /* max bw supported 5G, enum wmi_channel_width */
17098 A_UINT32 max_bw_supported_5G;
17099 /* WMI HT Capability, WMI_HT_CAP defines */
17100 A_UINT32 ht_cap_info_5G;
17101 /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
17102 A_UINT32 vht_cap_info_5G;
17103 /*
17104 * VHT Supported MCS Set field Rx/Tx same
17105 * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as
17106 * follows
17107 * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
17108 * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
17109 * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
17110 * - 3 indicates that n spatial streams is not supported
17111 */
17112 A_UINT32 vht_supp_mcs_5G;
17113 /* HE capability info field of 802.11ax, WMI_HE_CAP defines */
17114 A_UINT32 he_cap_info_5G;
17115 /* HE Supported MCS Set field Rx/Tx same */
17116 A_UINT32 he_supp_mcs_5G;
17117 /* Valid Transmit chain mask */
17118 A_UINT32 tx_chain_mask_5G;
17119 /* Valid Receive chain mask */
17120 A_UINT32 rx_chain_mask_5G;
Himanshu Agarwal97005de2016-09-09 12:46:04 +053017121 /* HE capability phy field of 802.11ax, WMI_HE_CAP defines */
17122 A_UINT32 he_cap_phy_info_2G[WMI_MAX_HECAP_PHY_SIZE];
17123 A_UINT32 he_cap_phy_info_5G[WMI_MAX_HECAP_PHY_SIZE];
17124 wmi_ppe_threshold he_ppet2G;
17125 wmi_ppe_threshold he_ppet5G;
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053017126} WMI_MAC_PHY_CAPABILITIES;
17127
17128typedef struct {
17129 /*
17130 * TLV tag and len; tag equal
17131 * WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES
17132 */
17133 A_UINT32 tlv_header;
17134 /*
17135 * hw_mode_id - identify a particular set of HW characteristics,
17136 * as specified by the subsequent fields
17137 */
17138 A_UINT32 hw_mode_id;
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053017139 /**
17140 * BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on.
17141 * Number of bits set in phy_id_map represents number of
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053017142 * WMI_MAC_PHY_CAPABILITIES TLV's
17143 * one for each active PHY for current HW mode
17144 * identified by hw_mode_id. For example for
17145 * DBS/SBS mode there will be 2
17146 * WMI_MAC_PHY_CAPABILITIES TLVs and for
17147 * single MAC modes it
17148 * will be 1 WMI_MAC_PHY_CAPABILITIES
17149 * TLVs
17150 */
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053017151 A_UINT32 phy_id_map;
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053017152 /**
17153 * hw_mode_config_type
17154 * Identify a particular type of HW mode such as SBS, DBS etc.
17155 * Refer to WMI_HW_MODE_CONFIG_TYPE values.
17156 */
17157 A_UINT32 hw_mode_config_type;
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053017158} WMI_HW_MODE_CAPABILITIES;
17159
17160typedef struct {
17161 /*
17162 * TLV tag and len; tag equals
17163 * WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS
17164 */
17165 A_UINT32 tlv_header;
17166 /* num HW modes */
17167 A_UINT32 num_hw_modes;
17168 /* num_hw_modes WMI_HW_MODE_CAPABILITIES TLV's */
17169} WMI_SOC_MAC_PHY_HW_MODE_CAPS;
17170
17171/*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/
17172typedef struct {
17173 /*
17174 * TLV tag and len; tag equals
17175 * WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT
17176 */
17177 A_UINT32 tlv_header;
17178 /* phy id */
17179 A_UINT32 phy_id;
17180 /* regdomain value specified in EEPROM */
17181 A_UINT32 eeprom_reg_domain;
17182 /* regdomain */
17183 A_UINT32 eeprom_reg_domain_ext;
17184 /*
17185 * CAP1 capabilities bit map, see REGDMN_CAP1_
17186 * defines
17187 */
17188 A_UINT32 regcap1;
17189 /*
17190 * REGDMN EEPROM CAP, see
17191 * REGDMN_EEPROM_EEREGCAP_ defines
17192 */
17193 A_UINT32 regcap2;
17194 /* REGDMN MODE, see REGDMN_MODE_ enum */
17195 A_UINT32 wireless_modes;
17196 A_UINT32 low_2ghz_chan;
17197 A_UINT32 high_2ghz_chan;
17198 A_UINT32 low_5ghz_chan;
17199 A_UINT32 high_5ghz_chan;
17200} WMI_HAL_REG_CAPABILITIES_EXT;
17201
17202typedef struct {
17203 /*
17204 * TLV tag and len; tag equals
17205 * WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES
17206 */
17207 A_UINT32 tlv_header;
17208 /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */
17209 A_UINT32 num_phy;
17210} WMI_SOC_HAL_REG_CAPABILITIES;
17211
Anurag Chouhanb3fa7a12016-04-18 17:26:49 +053017212typedef struct {
17213 /*
17214 * TLV tag and len; tag equals
17215 * WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv
17216 */
17217 A_UINT32 tlv_header;
17218 /*
17219 * global default adaptive dwell mode,
17220 * used when WMI_SCAN_DWELL_MODE_DEFAULT
17221 */
17222 A_UINT32 default_adaptive_dwell_mode;
17223 /*
17224 * the weight to calculate the average low pass filter for
17225 * channel congestion. 0-100
17226 */
17227 A_UINT32 adapative_lpf_weight;
17228 /* interval to monitor passive scan in msec */
17229 A_UINT32 passive_monitor_interval_ms;
17230 /* % of wifi activity to switch from passive to active 0-100 */
17231 A_UINT32 wifi_activity_threshold_pct;
17232} wmi_scan_adaptive_dwell_parameters_tlv;
17233
17234typedef struct {
17235 /*
17236 * TLV tag and len; tag equals
17237 * WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_config_fixed_param
17238 */
17239 A_UINT32 tlv_header;
17240 /* globally enable/disable adaptive dwell */
17241 A_UINT32 enable;
17242 /*
17243 * followed by TLV (tag length value) parameters array
17244 * The TLV's are:
17245 * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements)
17246 */
17247} wmi_scan_adaptive_dwell_config_fixed_param;
17248
Manjeet Singh158307d2016-08-24 15:23:58 +053017249typedef struct {
17250 /** TLV tag and len; tag equals
17251 * WMITLV_TAG_STRUC_wmi_coex_get_antenna_isolation_cmd_fixed_param */
17252 A_UINT32 tlv_header;
17253 /* Currently there are no parameters for this message. */
17254} wmi_coex_get_antenna_isolation_cmd_fixed_param;
17255
17256typedef struct {
17257 /** TLV tag and len; tag equals
17258 * WMITLV_TAG_STRUC_wmi_coex_report_isolation_event_fixed_param */
17259 A_UINT32 tlv_header;
17260 /** 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.
17261 * Currently the HW descriptor only supports 4 chains at most.
17262 * Further isolation_chainX elements can be added in the future
17263 * for additional chains, if needed.
17264 */
17265 A_UINT32 isolation_chain0:8, /* [7:0], isolation value for chain 0 */
17266 isolation_chain1:8, /* [15:8], isolation value for chain 1 */
17267 isolation_chain2:8, /* [23:16], isolation value for chain 2 */
17268 isolation_chain3:8; /* [31:24], isolation value for chain 3 */
17269} wmi_coex_report_isolation_event_fixed_param;
17270
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080017271/* ADD NEW DEFS HERE */
17272
17273/*****************************************************************************
17274 * The following structures are deprecated. DO NOT USE THEM!
17275 */
17276
17277/** Max number of channels in the schedule. */
17278#define OCB_CHANNEL_MAX (5)
17279
17280/* NOTE: Make sure these data structures are identical to those 9235
17281* defined in sirApi.h */
17282
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053017283typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080017284 /** Arbitration Inter-Frame Spacing. Range: 2-15 */
17285 A_UINT32 aifsn;
17286 /** Contention Window minimum. Range: 1 - 10 */
17287 A_UINT32 cwmin;
17288 /** Contention Window maximum. Range: 1 - 10 */
17289 A_UINT32 cwmax;
17290} wmi_qos_params_t;
17291
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053017292typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080017293 /** Channel frequency in MHz */
17294 A_UINT32 chan_freq;
17295 /** Channel duration in ms */
17296 A_UINT32 duration;
17297 /** Start guard interval in ms */
17298 A_UINT32 start_guard_interval;
17299 /** End guard interval in ms */
17300 A_UINT32 end_guard_interval;
17301 /** Transmit power in dBm, range 0 - 23 */
17302 A_UINT32 tx_power;
17303 /** Transmit datarate in Mbps */
17304 A_UINT32 tx_rate;
17305 /** QoS parameters for each AC */
17306 wmi_qos_params_t qos_params[WLAN_MAX_AC];
17307 /** 1 to enable RX stats for this channel, 0 otherwise */
17308 A_UINT32 rx_stats;
17309} wmi_ocb_channel_t;
17310
17311typedef struct {
17312 /** TLV tag and len; tag equals
17313 * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
17314 A_UINT32 tlv_header;
17315 /* VDEV identifier */
17316 A_UINT32 vdev_id;
17317 /** Number of valid channels in the channels array */
17318 A_UINT32 num_channels;
17319 /** The array of channels */
17320 wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
17321 /** 1 to allow off-channel tx, 0 otherwise */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053017322 A_UINT32 off_channel_tx; /* Not supported */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080017323} wmi_ocb_set_sched_cmd_fixed_param;
17324
17325typedef struct {
17326 /** Return status. 0 for success, non-zero otherwise */
17327 A_UINT32 status;
17328} wmi_ocb_set_sched_event_fixed_param;
17329
17330/**
17331* END DEPRECATED
17332*/
17333#ifdef __cplusplus
17334}
17335#endif
17336#endif /*_WMI_UNIFIED_H_*/
17337/**@}*/