blob: 165071af9c6dac9bdb5fa1ecf12809de5e3762f8 [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
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001352 /* GPIO Event */
1353 WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
1354 /** upload H_CV info WMI event
1355 * to indicate uploaded H_CV info to host
1356 */
1357 WMI_UPLOADH_EVENTID,
1358
1359 /** capture H info WMI event
1360 * to indicate captured H info to host
1361 */
1362 WMI_CAPTUREH_EVENTID,
1363 /* hw RFkill */
1364 WMI_RFKILL_STATE_CHANGE_EVENTID,
1365
1366 /* TDLS Event */
1367 WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
1368
Manikandan Mohan55c94d62015-12-04 13:47:58 -08001369 /* STA SMPS Event */
1370 /* force SMPS mode */
1371 WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID =
1372 WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS),
1373
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001374 /*location scan event */
1375 /*report the firmware's capability of batch scan */
1376 WMI_BATCH_SCAN_ENABLED_EVENTID =
1377 WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
1378 /*batch scan result */
1379 WMI_BATCH_SCAN_RESULT_EVENTID,
1380 /* OEM Event */
Krishna Kumaar Natarajan1dfa3532015-11-19 16:16:20 -08001381 WMI_OEM_CAPABILITY_EVENTID = /* DEPRECATED */
1382 WMI_EVT_GRP_START_ID(WMI_GRP_OEM),
1383 WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */
1384 WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */
1385 WMI_OEM_RESPONSE_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001386
1387 /* NAN Event */
1388 WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN),
Govind Singh941bd5e2016-02-04 17:15:25 +05301389 WMI_NAN_DISC_IFACE_CREATED_EVENTID,
1390 WMI_NAN_DISC_IFACE_DELETED_EVENTID,
1391 WMI_NAN_STARTED_CLUSTER_EVENTID,
1392 WMI_NAN_JOINED_CLUSTER_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001393
Manjeet Singh158307d2016-08-24 15:23:58 +05301394 /* Coex Event */
1395 WMI_COEX_REPORT_ANTENNA_ISOLATION_EVENTID =
1396 WMI_EVT_GRP_START_ID(WMI_GRP_COEX),
1397
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001398 /* LPI Event */
1399 WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI),
1400 WMI_LPI_STATUS_EVENTID,
1401 WMI_LPI_HANDOFF_EVENTID,
1402
1403 /* ExtScan events */
1404 WMI_EXTSCAN_START_STOP_EVENTID =
1405 WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN),
1406 WMI_EXTSCAN_OPERATION_EVENTID,
1407 WMI_EXTSCAN_TABLE_USAGE_EVENTID,
1408 WMI_EXTSCAN_CACHED_RESULTS_EVENTID,
1409 WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID,
1410 WMI_EXTSCAN_HOTLIST_MATCH_EVENTID,
1411 WMI_EXTSCAN_CAPABILITIES_EVENTID,
1412 WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID,
1413
1414 /* mDNS offload events */
1415 WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL),
1416
1417 /* SAP Authentication offload events */
1418 WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL),
1419 WMI_SAP_OFL_DEL_STA_EVENTID,
1420
1421 /** Out-of-context-of-bss (OCB) events */
1422 WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB),
1423 WMI_OCB_GET_TSF_TIMER_RESP_EVENTID,
1424 WMI_DCC_GET_STATS_RESP_EVENTID,
1425 WMI_DCC_UPDATE_NDL_RESP_EVENTID,
1426 WMI_DCC_STATS_EVENTID,
1427 /* System-On-Chip events */
1428 WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
1429 WMI_SOC_HW_MODE_TRANSITION_EVENTID,
1430 WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID,
1431 /** Motion Aided WiFi Connectivity (MAWC) events */
1432 WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC),
1433
Manikandan Mohan130eb572015-12-23 13:53:34 -08001434 /** pkt filter (BPF) offload relevant events */
Anurag Chouhan08f66c62016-04-18 17:14:51 +05301435 WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
Manikandan Mohan130eb572015-12-23 13:53:34 -08001436 WMI_BPF_VDEV_STATS_INFO_EVENTID,
Govind Singh941bd5e2016-02-04 17:15:25 +05301437
Anurag Chouhan08f66c62016-04-18 17:14:51 +05301438 /* Events in Prototyping phase */
1439 WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE),
Govind Singh941bd5e2016-02-04 17:15:25 +05301440 WMI_NDP_INITIATOR_RSP_EVENTID,
1441 WMI_NDP_RESPONDER_RSP_EVENTID,
1442 WMI_NDP_END_RSP_EVENTID,
1443 WMI_NDP_INDICATION_EVENTID,
1444 WMI_NDP_CONFIRM_EVENTID,
1445 WMI_NDP_END_INDICATION_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001446} WMI_EVT_ID;
1447
1448/* defines for OEM message sub-types */
1449#define WMI_OEM_CAPABILITY_REQ 0x01
1450#define WMI_OEM_CAPABILITY_RSP 0x02
1451#define WMI_OEM_MEASUREMENT_REQ 0x03
1452#define WMI_OEM_MEASUREMENT_RSP 0x04
1453#define WMI_OEM_ERROR_REPORT_RSP 0x05
1454#define WMI_OEM_NAN_MEAS_REQ 0x06
1455#define WMI_OEM_NAN_MEAS_RSP 0x07
1456#define WMI_OEM_NAN_PEER_INFO 0x08
1457#define WMI_OEM_CONFIGURE_LCR 0x09
1458#define WMI_OEM_CONFIGURE_LCI 0x0A
1459
1460/* below message subtype is internal to CLD. Target should
1461 * never use internal response type
1462 */
1463#define WMI_OEM_INTERNAL_RSP 0xdeadbeef
1464
Govind Singh941bd5e2016-02-04 17:15:25 +05301465#define WMI_CHAN_LIST_TAG 0x1
1466#define WMI_SSID_LIST_TAG 0x2
1467#define WMI_BSSID_LIST_TAG 0x3
1468#define WMI_IE_TAG 0x4
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001469
1470typedef struct {
1471 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
1472 /** primary 20 MHz channel frequency in mhz */
1473 A_UINT32 mhz;
1474 /** Center frequency 1 in MHz*/
1475 A_UINT32 band_center_freq1;
1476 /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
1477 A_UINT32 band_center_freq2;
1478 /** channel info described below */
1479 A_UINT32 info;
1480 /** contains min power, max power, reg power and reg class id. */
1481 A_UINT32 reg_info_1;
1482 /** contains antennamax */
1483 A_UINT32 reg_info_2;
1484} wmi_channel;
1485
1486typedef enum {
1487 WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
1488 WMI_CHANNEL_CHANGE_CAUSE_CSA,
1489} wmi_channel_change_cause;
1490
1491/** channel info consists of 6 bits of channel mode */
1492
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301493#define WMI_SET_CHANNEL_MODE(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001494 (pwmi_channel)->info &= 0xffffffc0; \
1495 (pwmi_channel)->info |= (val); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301496} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001497
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301498#define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001499
1500#define WMI_CHAN_FLAG_HT40_PLUS 6
1501#define WMI_CHAN_FLAG_PASSIVE 7
1502#define WMI_CHAN_ADHOC_ALLOWED 8
1503#define WMI_CHAN_AP_DISABLED 9
1504#define WMI_CHAN_FLAG_DFS 10
1505#define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */
1506#define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */
1507#define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */
1508#define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */
1509#define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */
Govind Singh32cced32016-02-01 13:33:09 +05301510/* Enable radar event reporting for sec80 in VHT80p80 */
1511#define WMI_CHAN_FLAG_DFS_CFREQ2 16
Himanshu Agarwal2690e462016-06-03 14:26:01 +05301512#define WMI_CHAN_FLAG_ALLOW_HE 17 /* HE (11ax) is allowed on this channel */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001513
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301514#define WMI_SET_CHANNEL_FLAG(pwmi_channel, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001515 (pwmi_channel)->info |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301516} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001517
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301518#define WMI_GET_CHANNEL_FLAG(pwmi_channel, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001519 (((pwmi_channel)->info & (1 << flag)) >> flag)
1520
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301521#define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001522 (pwmi_channel)->reg_info_1 &= 0xffffff00; \
1523 (pwmi_channel)->reg_info_1 |= (val&0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301524} while (0)
1525#define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001526
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301527#define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001528 (pwmi_channel)->reg_info_1 &= 0xffff00ff; \
1529 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 8); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301530} while (0)
1531#define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001532
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301533#define WMI_SET_CHANNEL_REG_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001534 (pwmi_channel)->reg_info_1 &= 0xff00ffff; \
1535 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 16); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301536} while (0)
1537#define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
1538#define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001539 (pwmi_channel)->reg_info_1 &= 0x00ffffff; \
1540 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 24); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301541} while (0)
1542#define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001543
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301544#define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001545 (pwmi_channel)->reg_info_2 &= 0xffffff00; \
1546 (pwmi_channel)->reg_info_2 |= (val&0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301547} while (0)
1548#define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001549
1550/* max tx power is in 1 dBm units */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301551#define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001552 (pwmi_channel)->reg_info_2 &= 0xffff00ff; \
1553 (pwmi_channel)->reg_info_2 |= ((val&0xff)<<8); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301554} while (0)
1555#define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001556
1557
1558/** HT Capabilities*/
1559#define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
1560#define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
1561#define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
1562#define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
1563#define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
1564#define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
1565#define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
1566#define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
1567#define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
1568#define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
1569#define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
1570#define WMI_HT_CAP_HT40_SGI 0x0800
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301571#define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */
1572#define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001573
1574/* These macros should be used when we wish to advertise STBC support for
1575 * only 1SS or 2SS or 3SS. */
1576#define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
1577#define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
1578#define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
1579
1580#define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
1581 WMI_HT_CAP_HT20_SGI | \
1582 WMI_HT_CAP_HT40_SGI | \
1583 WMI_HT_CAP_TX_STBC | \
1584 WMI_HT_CAP_RX_STBC | \
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301585 WMI_HT_CAP_LDPC | \
1586 WMI_HT_CAP_TX_LDPC | \
1587 WMI_HT_CAP_RX_LDPC)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001588
1589/* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
1590 field. The fields not defined here are not supported, or reserved.
1591 Do not change these masks and if you have to add new one follow the
1592 bitmask as specified by 802.11ac draft.
1593 */
1594
1595#define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
1596#define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
1597#define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
1598#define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004
1599#define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008
1600#define WMI_VHT_CAP_RX_LDPC 0x00000010
1601#define WMI_VHT_CAP_SGI_80MHZ 0x00000020
1602#define WMI_VHT_CAP_SGI_160MHZ 0x00000040
1603#define WMI_VHT_CAP_TX_STBC 0x00000080
1604#define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
1605#define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
1606#define WMI_VHT_CAP_SU_BFORMER 0x00000800
1607#define WMI_VHT_CAP_SU_BFORMEE 0x00001000
1608#define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
1609#define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
1610#define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
1611#define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
1612#define WMI_VHT_CAP_MU_BFORMER 0x00080000
1613#define WMI_VHT_CAP_MU_BFORMEE 0x00100000
1614#define WMI_VHT_CAP_TXOP_PS 0x00200000
1615#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
1616#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
1617#define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
1618#define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301619#define WMI_VHT_CAP_TX_LDPC 0x40000000
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001620
1621/* TEMPORARY:
1622 * Preserve the incorrect old name as an alias for the correct new name
1623 * until all references to the old name have been removed from all hosts
1624 * and targets.
1625 */
1626#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
1627
1628/* These macros should be used when we wish to advertise STBC support for
1629 * only 1SS or 2SS or 3SS. */
1630#define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
1631#define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
1632#define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
1633
1634/* TEMPORARY:
1635 * Preserve the incorrect old name as an alias for the correct new name
1636 * until all references to the old name have been removed from all hosts
1637 * and targets.
1638 */
1639#define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
1640
1641#define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
1642 WMI_VHT_CAP_SGI_80MHZ | \
1643 WMI_VHT_CAP_TX_STBC | \
1644 WMI_VHT_CAP_RX_STBC_MASK | \
1645 WMI_VHT_CAP_RX_LDPC | \
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301646 WMI_VHT_CAP_TX_LDPC | \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001647 WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
1648 WMI_VHT_CAP_RX_FIXED_ANT | \
1649 WMI_VHT_CAP_TX_FIXED_ANT)
1650
1651/* Interested readers refer to Rx/Tx MCS Map definition as defined in
1652 802.11ac
1653 */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301654#define WMI_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001655#define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
1656#define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
1657
Govind Singhd24f5e42016-02-22 15:16:46 +05301658/** 11ax capabilities */
1659#define WMI_HE_CAP_PPE_PRESENT 0x00000001
1660#define WMI_HE_CAP_TWT_RESPONDER_SUPPORT 0x00000002
1661#define WMI_HE_CAP_TWT_REQUESTER_SUPPORT 0x00000004
1662#define WMI_HE_FRAG_SUPPORT_MASK 0x00000018
1663#define WMI_HE_FRAG_SUPPORT_SHIFT 3
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07001664
1665
1666/* fragmentation support field value */
1667enum {
1668 WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */
1669 /*
1670 * support for fragments within a VHT single MPDU,
1671 * no support for fragments within AMPDU
1672 */
1673 WMI_HE_FRAG_SUPPORT_LEVEL1,
1674 /* support for up to 1 fragment per MSDU within a single A-MPDU */
1675 WMI_HE_FRAG_SUPPORT_LEVEL2,
1676 /* support for multiple fragments per MSDU within an A-MPDU */
1677 WMI_HE_FRAG_SUPPORT_LEVEL3,
1678};
1679
1680
Govind Singhd24f5e42016-02-22 15:16:46 +05301681/** NOTE: This defs cannot be changed in the future without
1682 * breaking WMI compatibility
1683 */
1684#define WMI_MAX_NUM_SS 8
1685#define WMI_MAX_NUM_RU 4
1686
1687/*
1688 * Figure 8 554ae: -PPE Threshold Info field format
1689 * we pack PPET16 and PPT8 for four RU's in one element of array.
1690 *
1691 * ppet16_ppet8_ru3_ru0 array element 0 holds:
Himanshu Agarwal2690e462016-06-03 14:26:01 +05301692 * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
Govind Singhd24f5e42016-02-22 15:16:46 +05301693 *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1|
1694 *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
1695 *
1696 * ppet16_ppet8_ru3_ru0 array element 1 holds:
Himanshu Agarwal2690e462016-06-03 14:26:01 +05301697 * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 |
Govind Singhd24f5e42016-02-22 15:16:46 +05301698 *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1|
1699 *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
1700 *
1701 * etc.
1702 */
1703
1704/*
1705 * Note that in these macros, "ru" is one-based, not zero-based, while
1706 * nssm1 is zero-based.
1707 */
Himanshu Agarwal2690e462016-06-03 14:26:01 +05301708#define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ppet, ru, nssm1) \
Govind Singhd24f5e42016-02-22 15:16:46 +05301709 do { \
1710 ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1)%4)*6)); \
1711 ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1)%4)*6)); \
1712 } while (0)
1713
Himanshu Agarwal2690e462016-06-03 14:26:01 +05301714#define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \
Govind Singhd24f5e42016-02-22 15:16:46 +05301715 ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1)%4)*6))&7)
1716
Himanshu Agarwal2690e462016-06-03 14:26:01 +05301717#define WMI_SET_PPET8(ppet16_ppet8_ru3_ru0, ppet, ru, nssm1) \
Govind Singhd24f5e42016-02-22 15:16:46 +05301718 do { \
1719 ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1)%4)*6+3)); \
1720 ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1)%4)*6+3)); \
1721 } while (0)
1722
Himanshu Agarwal2690e462016-06-03 14:26:01 +05301723#define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \
Govind Singhd24f5e42016-02-22 15:16:46 +05301724 ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1)%4)*6+3))&7)
1725
1726typedef struct _wmi_ppe_threshold {
1727 A_UINT32 numss_m1; /** NSS - 1*/
1728 A_UINT32 ru_count; /** Max RU count */
1729 /** ppet8 and ppet16 for max num ss */
1730 A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS];
1731} wmi_ppe_threshold;
1732
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001733/* WMI_SYS_CAPS_* refer to the capabilities that system support
1734 */
1735#define WMI_SYS_CAP_ENABLE 0x00000001
1736#define WMI_SYS_CAP_TXPOWER 0x00000002
1737
1738/*
1739 * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
1740 * Bits 5:0 are reserved
1741 */
1742#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
1743#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
1744#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
1745#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
1746#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
1747#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
1748#define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7)
1749#define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
1750
1751#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
1752#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
1753#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
1754#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
1755#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
1756#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
1757#define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
1758#define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
1759
1760#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
1761 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
1762#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
1763 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
1764#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
1765 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
1766#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
1767 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
1768#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
1769 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
1770#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
1771 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
1772#define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \
1773 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
1774#define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
1775 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
1776
1777#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
1778 ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
1779#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
1780 ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
1781#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
1782 ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
1783#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
1784 ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
1785#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
1786 ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
1787#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
1788 ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
1789#define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \
1790 ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
1791#define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \
1792 ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
1793
1794#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31)
1795#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30)
1796#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29)
1797
1798#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
1799#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
1800#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
1801
1802#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
1803 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
1804#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
1805 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
1806#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
1807 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
1808
1809#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \
1810 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
1811#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \
1812 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
1813#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \
1814 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
1815
1816#define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31)
1817#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30)
1818
1819#define WMI_DBS_FW_MODE_CFG_DBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
1820#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
1821
1822#define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
1823 WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
1824#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
1825 WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
1826
1827#define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \
1828 ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
1829#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \
1830 ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
1831
1832/** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
1833typedef struct _wmi_abi_version {
1834 A_UINT32 abi_version_0;
1835 /** WMI Major and Minor versions */
1836 A_UINT32 abi_version_1;
1837 /** WMI change revision */
1838 A_UINT32 abi_version_ns_0;
1839 /** ABI version namespace first four dwords */
1840 A_UINT32 abi_version_ns_1;
1841 /** ABI version namespace second four dwords */
1842 A_UINT32 abi_version_ns_2;
1843 /** ABI version namespace third four dwords */
1844 A_UINT32 abi_version_ns_3;
1845 /** ABI version namespace fourth four dwords */
1846} wmi_abi_version;
1847
1848/*
1849 * maximum number of memroy requests allowed from FW.
1850 */
1851#define WMI_MAX_MEM_REQS 16
1852
1853/* !!NOTE!!:
1854 * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
1855 * Please don't change it.
1856 */
1857#define HW_BD_INFO_SIZE 5
1858
1859/**
Govind Singh869c9872016-02-22 18:36:34 +05301860 * PDEV ID to identify the physical device,
1861 * value 0 reserved for SOC level commands/event
1862 */
1863#define WMI_PDEV_ID_SOC 0 /* SOC level, applicable to all PDEVs */
1864#define WMI_PDEV_ID_1ST 1 /* first pdev (pdev 0) */
1865#define WMI_PDEV_ID_2ND 2 /* second pdev (pdev 1) */
1866#define WMI_PDEV_ID_3RD 3 /* third pdev (pdev 2) */
1867
1868/**
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001869 * The following struct holds optional payload for
1870 * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
1871 * device capability to the host.
1872 */
1873typedef struct {
1874 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
1875 A_UINT32 fw_build_vers; /* firmware build number */
1876 wmi_abi_version fw_abi_vers;
1877 A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
1878 A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
1879 A_UINT32 num_rf_chains;
1880 /* The following field is only valid for service type WMI_SERVICE_11AC */
1881 A_UINT32 ht_cap_info; /* WMI HT Capability */
1882 A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
1883 A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
1884 A_UINT32 hw_min_tx_power;
1885 A_UINT32 hw_max_tx_power;
1886 A_UINT32 sys_cap_info;
1887 A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
1888 /** Max beacon and Probe Response IE offload size (includes
1889 * optional P2P IEs) */
1890 A_UINT32 max_bcn_ie_size;
1891 /*
1892 * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
1893 * FW uses this as FW extesnsion memory for saving its data structures. Only valid
1894 * for low latency interfaces like PCIE where FW can access this memory directly (or)
1895 * by DMA.
1896 */
1897 A_UINT32 num_mem_reqs;
1898 /* Max No. scan channels target can support
1899 * If FW is too old and doesn't indicate this number, host side value will default to
1900 * 0, and host will take the original compatible value (62) for future scan channel
1901 * setup.
1902 */
1903 A_UINT32 max_num_scan_channels;
1904
1905 /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
1906 * Default 0 means tha hw_bd_info[] is invalid(legacy board).
1907 */
1908 A_UINT32 hw_bd_id;
1909 A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
1910
1911 /*
1912 * Number of MACs supported, i.e. a DBS-capable device will return 2
1913 */
1914 A_UINT32 max_supported_macs;
1915
1916 /*
1917 * FW sub-feature capabilities to be used in concurrence with
1918 * wmi_service_bitmap
1919 * values from enum WMI_FW_SUB_FEAT_CAPS
1920 */
1921 A_UINT32 wmi_fw_sub_feat_caps;
1922 /*
1923 * Number of Dual Band Simultaneous (DBS) hardware modes
1924 */
1925 A_UINT32 num_dbs_hw_modes;
1926 /*
1927 * txrx_chainmask
1928 * [7:0] - 2G band tx chain mask
1929 * [15:8] - 2G band rx chain mask
1930 * [23:16] - 5G band tx chain mask
1931 * [31:24] - 5G band rx chain mask
1932 *
1933 */
1934 A_UINT32 txrx_chainmask;
1935
1936 /*
1937 * default Dual Band Simultaneous (DBS) hardware mode
1938 */
1939 A_UINT32 default_dbs_hw_mode_index;
1940
1941 /*
1942 * Number of msdu descriptors target would use
1943 */
1944 A_UINT32 num_msdu_desc;
1945
1946 /* The TLVs for hal_reg_capabilities, wmi_service_bitmap and mem_reqs[] will follow this TLV.
1947 * HAL_REG_CAPABILITIES hal_reg_capabilities;
1948 * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
1949 * wlan_host_mem_req mem_reqs[];
1950 * wlan_dbs_hw_mode_list[];
1951 */
1952} wmi_service_ready_event_fixed_param;
1953
Nitesh Shahca1b2d02016-07-21 12:59:24 +05301954#define WMI_SERVICE_SEGMENT_BM_SIZE32 4 /* 4x A_UINT32 = 128 bits */
1955typedef struct {
1956 /**
1957 * TLV tag and len; tag equals
1958 * WMITLV_TAG_STRUC_wmi_service_available_event_fixed_param
1959 */
1960 A_UINT32 tlv_header;
1961 /**
1962 * The wmi_service_segment offset field specifies the position
1963 * within the logical bitmap of WMI service flags at which the
1964 * WMI service flags specified within this message begin.
1965 * Since the first 128 WMI service flags are specified within
1966 * the wmi_service_bitmap field of the WMI_SERVICE_READY_EVENT
1967 * message, the wmi_service_segment_offset value is expected to
1968 * be 128 or more.
1969 */
1970 A_UINT32 wmi_service_segment_offset;
1971 A_UINT32 wmi_service_segment_bitmap[WMI_SERVICE_SEGMENT_BM_SIZE32];
1972} wmi_service_available_event_fixed_param;
1973
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001974typedef struct {
1975 /* TLV tag and len; tag equals
1976 *WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT
1977 */
1978 A_UINT32 tlv_header;
1979 /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
1980 A_UINT32 default_conc_scan_config_bits;
1981 /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
1982 A_UINT32 default_fw_config_bits;
Govind Singhd24f5e42016-02-22 15:16:46 +05301983 wmi_ppe_threshold ppet;
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07001984 /*
1985 * see section 8.4.2.213 from draft r8 of 802.11ax;
1986 * see WMI_HE_FRAG_SUPPORT enum
1987 */
Govind Singhd24f5e42016-02-22 15:16:46 +05301988 A_UINT32 he_cap_info;
Govind Singh76d82bc2016-02-22 15:39:48 +05301989 /*
1990 * An HT STA shall not allow transmission of more than one MPDU start
1991 * within the time limit described in the MPDU maximum density field.
1992 */
1993 A_UINT32 mpdu_density; /* units are microseconds */
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05301994 /*
1995 * Maximum no of BSSID based RX filters host can program
1996 * Value 0 means FW hasn't given any limit to host.
1997 */
1998 A_UINT32 max_bssid_rx_filters;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001999} wmi_service_ready_ext_event_fixed_param;
2000
2001typedef enum {
2002 WMI_HWBD_NONE = 0, /* No hw board information is given */
2003 WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */
2004 WMI_HWBD_QCA2582 = 2, /* Killer 1525 */
2005} WMI_HWBD_ID;
2006
2007typedef enum {
2008 WMI_FW_STA_RTT_INITR = 0x00000001,
2009 WMI_FW_STA_RTT_RESPR = 0x00000002,
2010 WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
2011 WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
2012 WMI_FW_P2P_GO_RTT_INITR = 0x00000010,
2013 WMI_FW_P2P_GO_RTT_RESPR = 0x00000020,
2014 WMI_FW_AP_RTT_INITR = 0x00000040,
2015 WMI_FW_AP_RTT_RESPR = 0x00000080,
2016 WMI_FW_NAN_RTT_INITR = 0x00000100,
2017 WMI_FW_NAN_RTT_RESPR = 0x00000200,
2018 /*
2019 * New fw sub feature capabilites before
2020 * WMI_FW_MAX_SUB_FEAT_CAP
2021 */
2022 WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000,
2023} WMI_FW_SUB_FEAT_CAPS;
2024
2025#define ATH_BD_DATA_REV_MASK 0x000000FF
2026#define ATH_BD_DATA_REV_SHIFT 0
2027
2028#define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00
2029#define ATH_BD_DATA_PROJ_ID_SHIFT 8
2030
2031#define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000
2032#define ATH_BD_DATA_CUST_ID_SHIFT 16
2033
2034#define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000
2035#define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
2036
2037#define SET_BD_DATA_REV(bd_data_ver, value) \
2038 ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
2039
2040#define GET_BD_DATA_REV(bd_data_ver) \
2041 (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
2042
2043#define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
2044 ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
2045
2046#define GET_BD_DATA_PROJ_ID(bd_data_ver) \
2047 (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
2048
2049#define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
2050 ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
2051
2052#define GET_BD_DATA_CUST_ID(bd_data_ver) \
2053 (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
2054
2055#define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \
2056 ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
2057
2058#define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \
2059 (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
2060
2061#ifdef ROME_LTE_COEX_FREQ_AVOID
2062typedef struct {
2063 A_UINT32 start_freq; /* start frequency, not channel center freq */
2064 A_UINT32 end_freq; /* end frequency */
2065} avoid_freq_range_desc;
2066
2067typedef struct {
2068 /* bad channel range count, multi range is allowed, 0 means all channel clear */
2069 A_UINT32 num_freq_ranges;
2070 /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
2071 avoid_freq_range_desc avd_freq_range[0];
2072} wmi_wlan_avoid_freq_ranges_event;
2073#endif
2074
2075/** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that retuned status */
2076#define WLAN_INIT_STATUS_SUCCESS 0x0
2077#define WLAN_INIT_STATUS_GEN_FAILED 0x1
2078#define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
2079#define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
2080
2081typedef A_UINT32 WLAN_INIT_STATUS;
2082
2083typedef struct {
2084 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
2085 wmi_abi_version fw_abi_vers;
2086 wmi_mac_addr mac_addr;
2087 A_UINT32 status;
Rajeev Kumare18f5282016-04-15 14:08:29 -07002088 A_UINT32 num_dscp_table;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002089} wmi_ready_event_fixed_param;
2090
2091typedef struct {
2092 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
2093/**
2094 * @brief num_vdev - number of virtual devices (VAPs) to support
2095 */
2096 A_UINT32 num_vdevs;
2097/**
2098 * @brief num_peers - number of peer nodes to support
2099 */
2100 A_UINT32 num_peers;
2101/*
2102 * @brief In offload mode target supports features like WOW, chatter and other
2103 * protocol offloads. In order to support them some functionalities like
2104 * reorder buffering, PN checking need to be done in target. This determines
2105 * maximum number of peers suported by target in offload mode
2106 */
2107 A_UINT32 num_offload_peers;
2108/* @brief Number of reorder buffers available for doing target based reorder
2109 * Rx reorder buffering
2110 */
2111 A_UINT32 num_offload_reorder_buffs;
2112/**
2113 * @brief num_peer_keys - number of keys per peer
2114 */
2115 A_UINT32 num_peer_keys;
2116/**
2117 * @brief num_peer_tids - number of TIDs to provide storage for per peer.
2118 */
2119 A_UINT32 num_tids;
2120/**
2121 * @brief ast_skid_limit - max skid for resolving hash collisions
2122 * @details
2123 * The address search table is sparse, so that if two MAC addresses
2124 * result in the same hash value, the second of these conflicting
2125 * entries can slide to the next index in the address search table,
2126 * and use it, if it is unoccupied. This ast_skid_limit parameter
2127 * specifies the upper bound on how many subsequent indices to search
2128 * over to find an unoccupied space.
2129 */
2130 A_UINT32 ast_skid_limit;
2131/**
2132 * @brief tx_chain_mask - the nominal chain mask for transmit
2133 * @details
2134 * The chain mask may be modified dynamically, e.g. to operate AP tx with
2135 * a reduced number of chains if no clients are associated.
2136 * This configuration parameter specifies the nominal chain-mask that
2137 * should be used when not operating with a reduced set of tx chains.
2138 */
2139 A_UINT32 tx_chain_mask;
2140/**
2141 * @brief rx_chain_mask - the nominal chain mask for receive
2142 * @details
2143 * The chain mask may be modified dynamically, e.g. for a client to use
2144 * a reduced number of chains for receive if the traffic to the client
2145 * is low enough that it doesn't require downlink MIMO or antenna
2146 * diversity.
2147 * This configuration parameter specifies the nominal chain-mask that
2148 * should be used when not operating with a reduced set of rx chains.
2149 */
2150 A_UINT32 rx_chain_mask;
2151/**
2152 * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
2153 * @details
2154 * Each WMM access class (voice, video, best-effort, background) will
2155 * have its own timeout value to dictate how long to wait for missing
2156 * rx MPDUs to arrive before flushing subsequent MPDUs that have already
2157 * been received.
2158 * This parameter specifies the timeout in milliseconds for each class .
2159 * NOTE: the number of class (defined as 4) cannot be
2160 * changed in the future without breaking WMI compatibility.
2161 */
2162 A_UINT32 rx_timeout_pri[4];
2163/**
2164 * @brief rx_decap mode - what mode the rx should decap packets to
2165 * @details
2166 * MAC can decap to RAW (no decap), native wifi or Ethernet types
2167 * THis setting also determines the default TX behavior, however TX
2168 * behavior can be modified on a per VAP basis during VAP init
2169 */
2170 A_UINT32 rx_decap_mode;
2171 /**
2172 * @brief scan_max_pending_req - what is the maximum scan requests than can be queued
2173 */
2174 A_UINT32 scan_max_pending_req;
2175
2176 /**
2177 * @brief maximum VDEV that could use BMISS offload
2178 */
2179 A_UINT32 bmiss_offload_max_vdev;
2180
2181 /**
2182 * @brief maximum VDEV that could use offload roaming
2183 */
2184 A_UINT32 roam_offload_max_vdev;
2185
2186 /**
2187 * @brief maximum AP profiles that would push to offload roaming
2188 */
2189 A_UINT32 roam_offload_max_ap_profiles;
2190
2191/**
2192 * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
2193 * @details
2194 * The target's WAL maintains a table to hold information regarding which
2195 * peers belong to a given multicast group, so that if multicast->unicast
2196 * conversion is enabled, the target can convert multicast tx frames to a
2197 * series of unicast tx frames, to each peer within the multicast group.
2198 * This num_mcast_groups configuration parameter tells the target how
2199 * many multicast groups to provide storage for within its multicast
2200 * group membership table.
2201 */
2202 A_UINT32 num_mcast_groups;
2203
2204/**
2205 * @brief num_mcast_table_elems - size to alloc for the mcast membership table
2206 * @details
2207 * This num_mcast_table_elems configuration parameter tells the target
2208 * how many peer elements it needs to provide storage for in its
2209 * multicast group membership table.
2210 * These multicast group membership table elements are shared by the
2211 * multicast groups stored within the table.
2212 */
2213 A_UINT32 num_mcast_table_elems;
2214
2215/**
2216 * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
2217 * @details
2218 * This configuration parameter specifies whether the target should
2219 * perform multicast --> unicast conversion on transmit, and if so,
2220 * what to do if it finds no entries in its multicast group membership
2221 * table for the multicast IP address in the tx frame.
2222 * Configuration value:
2223 * 0 -> Do not perform multicast to unicast conversion.
2224 * 1 -> Convert multicast frames to unicast, if the IP multicast address
2225 * from the tx frame is found in the multicast group membership
2226 * table. If the IP multicast address is not found, drop the frame.
2227 * 2 -> 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, transmit the
2230 * frame as multicast.
2231 */
2232 A_UINT32 mcast2ucast_mode;
2233
2234 /**
2235 * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
2236 * @details
2237 * This parameter controls how much memory the target will allocate to
2238 * store a log of tx PPDU meta-information (how large the PPDU was,
2239 * when it was sent, whether it was successful, etc.)
2240 */
2241 A_UINT32 tx_dbg_log_size;
2242
2243 /**
2244 * @brief num_wds_entries - how many AST entries to be allocated for WDS
2245 */
2246 A_UINT32 num_wds_entries;
2247
2248 /**
2249 * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
2250 * this limit can be 0 -default, 1 256B
2251 */
2252 A_UINT32 dma_burst_size;
2253
2254 /**
2255 * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
2256 * to account for interface latency to avoid underrun.
2257 */
2258 A_UINT32 mac_aggr_delim;
2259 /**
2260 * @brief rx_skip_defrag_timeout_dup_detection_check
2261 * @details
2262 * determine whether target is responsible for detecting duplicate
2263 * non-aggregate MPDU and timing out stale fragments.
2264 *
2265 * A-MPDU reordering is always performed on the target.
2266 *
2267 * 0: target responsible for frag timeout and dup checking
2268 * 1: host responsible for frag timeout and dup checking
2269 */
2270 A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
2271
2272 /**
2273 * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
2274 * and Max no of descriptors for each Video link (node).
2275 */
2276 A_UINT32 vow_config;
2277
2278 /**
2279 * @brief maximum VDEV that could use GTK offload
2280 */
2281 A_UINT32 gtk_offload_max_vdev;
2282
2283 /**
2284 * @brief num_msdu_desc - Number of msdu descriptors target should use
2285 */
2286 A_UINT32 num_msdu_desc; /* Number of msdu desc */
2287 /**
2288 * @brief max_frag_entry - Max. number of Tx fragments per MSDU
2289 * @details
2290 * This parameter controls the max number of Tx fragments per MSDU.
2291 * This is sent by the target as part of the WMI_SERVICE_READY event
2292 * and is overriden by the OS shim as required.
2293 */
2294 A_UINT32 max_frag_entries;
2295
2296 /**
2297 * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
2298 * @brief num_msdu_desc - Number of vdev that can support beacon offload
2299 */
2300
2301 A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
2302
2303 /**
2304 * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
2305 * @details
2306 * Each TDLS enabled vdev can track outgoing transmits/rssi/rates to/of
2307 * peers in a connection tracking table for possible TDLS link creation
2308 * or deletion. This controls the number of tracked peers per vdev.
2309 */
2310 A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
2311 A_UINT32 beacon_tx_offload_max_vdev;
2312 A_UINT32 num_multicast_filter_entries;
2313 A_UINT32 num_wow_filters; /*host can configure the number of wow filters */
2314
2315 /**
2316 * @brief num_keep_alive_pattern - Num of keep alive patterns configured
2317 * from host.
2318 */
2319 A_UINT32 num_keep_alive_pattern;
2320 /**
2321 * @brief keep_alive_pattern_size - keep alive pattern size.
2322 */
2323 A_UINT32 keep_alive_pattern_size;
2324
2325 /**
2326 * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
2327 * @details
2328 * Each TDLS STA can become a sleep STA independently. This parameter
2329 * mentions how many such sleep STAs can be supported concurrently.
2330 */
2331 A_UINT32 max_tdls_concurrent_sleep_sta;
2332
2333 /**
2334 * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
2335 * @details
2336 * Each TDLS STA can become a buffer STA independently. This parameter
2337 * mentions how many such buffer STAs can be supported concurrently.
2338 */
2339 A_UINT32 max_tdls_concurrent_buffer_sta;
2340
2341 /**
2342 * @brief wmi_send_separate - host configures fw to send the wmi separately
2343 */
2344 A_UINT32 wmi_send_separate;
2345
2346 /**
2347 * @brief num_ocb_vdevs - Number of vdevs used for OCB support
2348 */
2349 A_UINT32 num_ocb_vdevs;
2350
2351 /**
2352 * @brief num_ocb_channels - The supported number of simultaneous OCB channels
2353 */
2354 A_UINT32 num_ocb_channels;
2355
2356 /**
2357 * @brief num_ocb_schedules - The supported number of OCB schedule segments
2358 */
2359 A_UINT32 num_ocb_schedules;
Manikandan Mohan30728082015-12-09 12:35:24 -08002360 /**
2361 * @brief specific configuration from host, such as per platform configuration
2362 */
2363 #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
2364 #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002365
2366 #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
2367 #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
2368
2369 #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
2370 #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
2371
2372 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
2373 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
2374
2375 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
2376 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
2377
2378 #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
2379 #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
2380
2381 #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
2382 #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
2383
2384 #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
2385 #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
2386
2387 #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
2388 #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
2389
Pradeep Reddy POTTETI67c778a2016-06-20 14:00:38 +05302390 #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_S 9
2391 #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_M 0x200
2392
Manikandan Mohan30728082015-12-09 12:35:24 -08002393 A_UINT32 flag1;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002394
2395 /** @brief smart_ant_cap - Smart Antenna capabilities information
2396 * @details
2397 * 1 - Smart antenna is enabled.
2398 * 0 - Smart antenna is disabled.
2399 * In future this can contain smart antenna specifc capabilities.
2400 */
2401 A_UINT32 smart_ant_cap;
2402
2403 /**
2404 * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
2405 * during init
2406 */
2407 A_UINT32 BK_Minfree;
2408 A_UINT32 BE_Minfree;
2409 A_UINT32 VI_Minfree;
2410 A_UINT32 VO_Minfree;
2411
2412 /**
2413 * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
2414 * descriptor memory allocation.
2415 * 1 - Allocate fragment descriptor memory for data packet in firmware.
2416 * If host wants to transmit data packet at its desired rate,
2417 * this field must be set.
2418 * 0 - Don't allocate fragment descriptor for data packet.
2419 */
2420 A_UINT32 alloc_frag_desc_for_data_pkt;
Govind Singh86180292016-02-01 14:03:37 +05302421
2422 /*
2423 * how much space to allocate for NDP NS (neighbor solicitation)
2424 * specs
2425 */
2426 A_UINT32 num_ns_ext_tuples_cfg;
Sandeep Puligillab6ddc262016-03-09 13:06:16 -08002427 /**
2428 * size (in bytes) of the buffer the FW shall allocate to store
2429 * packet filtering instructions
2430 */
2431 A_UINT32 bpf_instruction_size;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05302432 /**
2433 * Maximum no of BSSID based RX filters host would program
2434 * Value 0 means host doesn't given any limit to FW.
2435 */
2436 A_UINT32 max_bssid_rx_filters;
Krishna Kumaar Natarajan7dde8c72016-03-25 15:11:49 -07002437 /**
2438 * Use PDEV ID instead of MAC ID, added for backward compatibility with
2439 * older host which is using MAC ID. 1 means PDEV ID, 0 means MAC ID.
2440 */
2441 A_UINT32 use_pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002442} wmi_resource_config;
2443
Manikandan Mohan30728082015-12-09 12:35:24 -08002444#define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
2445 do { \
2446 (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
2447 (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
2448 WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
2449 } while (0)
2450#define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
2451 (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
2452 WMI_RSRC_CFG_FLAG_ ## flag ## _S)
2453
2454#define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
2455 WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
2456#define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
2457 WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
2458
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002459#define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
2460 WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
2461#define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
2462 WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
2463
2464#define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
2465 WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
2466#define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
2467 WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
2468
2469#define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
2470 WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
2471#define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
2472 WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
2473
2474#define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
2475 WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
2476#define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
2477 WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
2478
2479#define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
2480 WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
2481#define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
2482 WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
2483
2484#define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
2485 WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
2486#define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
2487 WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
2488
2489#define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
2490 WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
2491#define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
2492 WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
2493
2494#define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
2495 WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
2496#define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
2497 WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
2498
Pradeep Reddy POTTETI67c778a2016-06-20 14:00:38 +05302499#define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(word32, value) \
2500 WMI_RSRC_CFG_FLAG_SET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT, (value))
2501#define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_GET(word32) \
2502 WMI_RSRC_CFG_FLAG_GET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT)
2503
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002504typedef struct {
2505 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
2506
2507 /** The following indicate the WMI versions to be supported by
2508 * the host driver. Note that the host driver decide to
2509 * "downgrade" its WMI version support and this may not be the
2510 * native version of the host driver. */
2511 wmi_abi_version host_abi_vers;
2512
2513 A_UINT32 num_host_mem_chunks;
2514 /** size of array host_mem_chunks[] */
Pradeep Reddy POTTETIa280b5c2016-06-20 14:16:23 +05302515 /* The TLVs for resource_config, host_mem_chunks[], and
2516 * hw_mode_config will follow.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002517 * wmi_resource_config resource_config;
2518 * wlan_host_memory_chunk host_mem_chunks[];
Pradeep Reddy POTTETIa280b5c2016-06-20 14:16:23 +05302519 * wmi_pdev_set_hw_mode_cmd_fixed_param hw_mode_config;
2520 * Note that the hw_mode_config, in spite of its "pdev" name,
2521 * applies to the entire target rather than for a single pdev
2522 * within the target.
2523 * To avoid specifying a HW mode for the target, the host should
2524 * fill hw_mode_config's fields with 0x0.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002525 */
2526
2527} wmi_init_cmd_fixed_param;
2528
2529/**
2530 * TLV for channel list
2531 */
2532typedef struct {
2533 /** WMI_CHAN_LIST_TAG */
2534 A_UINT32 tag;
2535 /** # of channels to scan */
2536 A_UINT32 num_chan;
2537 /** channels in Mhz */
2538 A_UINT32 channel_list[1];
2539} wmi_chan_list;
2540
2541/**
2542 * TLV for bssid list
2543 */
2544typedef struct {
2545 /** WMI_BSSID_LIST_TAG */
2546 A_UINT32 tag;
2547 /** number of bssids */
2548 A_UINT32 num_bssid;
2549 /** bssid list */
2550 wmi_mac_addr bssid_list[1];
2551} wmi_bssid_list;
2552
2553/**
2554 * TLV for ie data.
2555 */
2556typedef struct {
2557 /** WMI_IE_TAG */
2558 A_UINT32 tag;
2559 /** number of bytes in ie data */
2560 A_UINT32 ie_len;
2561 /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4 ) */
2562 A_UINT32 ie_data[1];
2563} wmi_ie_data;
2564
Nitesh Shahe5aa26b2016-07-08 12:03:44 +05302565/**
2566 * TLV used for length/buffer
2567 */
2568typedef struct {
2569 /**
2570 * TLV tag and len; tag equals
2571 * WMITLV_TAG_STRUC_wmi_tlv_buf_len_param
2572 */
2573 A_UINT32 tlv_header;
2574 A_UINT32 buf_len; /** Length of buf */
2575 /**
2576 * Following this structure is the TLV byte stream of buf
2577 * of length buf_len:
2578 * A_UINT8 buf[];
2579 *
2580 */
2581} wmi_tlv_buf_len_param;
2582
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002583typedef struct {
2584 /** Len of the SSID */
2585 A_UINT32 ssid_len;
2586 /** SSID */
2587 A_UINT32 ssid[8];
2588} wmi_ssid;
2589
2590typedef struct {
2591 /** WMI_SSID_LIST_TAG */
2592 A_UINT32 tag;
2593 A_UINT32 num_ssids;
2594 wmi_ssid ssids[1];
2595} wmi_ssid_list;
2596
2597/* prefix used by scan requestor ids on the host */
2598#define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
2599/* prefix used by scan request ids generated on the host */
2600/* host cycles through the lower 12 bits to generate ids */
2601#define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
2602
2603#define WLAN_SCAN_PARAMS_MAX_SSID 16
2604#define WLAN_SCAN_PARAMS_MAX_BSSID 4
2605#define WLAN_SCAN_PARAMS_MAX_IE_LEN 512
2606
2607typedef struct {
2608 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
2609 /** Scan ID */
2610 A_UINT32 scan_id;
2611 /** Scan requestor ID */
2612 A_UINT32 scan_req_id;
2613 /** VDEV id(interface) that is requesting scan */
2614 A_UINT32 vdev_id;
2615 /** Scan Priority, input to scan scheduler */
2616 A_UINT32 scan_priority;
2617 /** Scan events subscription */
2618 A_UINT32 notify_scan_events;
2619 /** dwell time in msec on active channels */
2620 A_UINT32 dwell_time_active;
2621 /** dwell time in msec on passive channels */
2622 A_UINT32 dwell_time_passive;
2623 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
2624 A_UINT32 min_rest_time;
2625 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
2626 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
2627 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
2628 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
2629 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
2630 * irrespective of activity. activity is determined by the idle_time parameter.
2631 */
2632 A_UINT32 max_rest_time;
2633 /** time before sending next set of probe requests.
2634 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
2635 * The number of probe requests specified depends on the ssid_list and bssid_list
2636 */
2637 A_UINT32 repeat_probe_time;
2638 /** time in msec between 2 consequetive probe requests with in a set. */
2639 A_UINT32 probe_spacing_time;
2640 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
2641 A_UINT32 idle_time;
2642 /** maximum time in msec allowed for scan */
2643 A_UINT32 max_scan_time;
2644 /** delay in msec before sending first probe request after switching to a channel */
2645 A_UINT32 probe_delay;
2646 /** Scan control flags */
2647 A_UINT32 scan_ctrl_flags;
2648 /** Burst duration time in msec*/
2649 A_UINT32 burst_duration;
2650
2651 /** # if channels to scan. In the TLV channel_list[] */
2652 A_UINT32 num_chan;
2653 /** number of bssids. In the TLV bssid_list[] */
2654 A_UINT32 num_bssid;
2655 /** number of ssid. In the TLV ssid_list[] */
2656 A_UINT32 num_ssids;
2657 /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
2658 A_UINT32 ie_len;
2659 /** Max number of probes to be sent */
2660 A_UINT32 n_probes;
2661
2662 /**
2663 * TLV (tag length value ) parameters follow the scan_cmd
2664 * structure. The TLV's are:
2665 * A_UINT32 channel_list[];
2666 * wmi_ssid ssid_list[];
2667 * wmi_mac_addr bssid_list[];
2668 * A_UINT8 ie_data[];
2669 */
2670} wmi_start_scan_cmd_fixed_param;
2671
2672/**
2673 * scan control flags.
2674 */
2675
2676/** passively scan all channels including active channels */
2677#define WMI_SCAN_FLAG_PASSIVE 0x1
2678/** add wild card ssid probe request even though ssid_list is specified. */
2679#define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
2680/** add cck rates to rates/xrate ie for the generated probe request */
2681#define WMI_SCAN_ADD_CCK_RATES 0x4
2682/** add ofdm rates to rates/xrate ie for the generated probe request */
2683#define WMI_SCAN_ADD_OFDM_RATES 0x8
2684/** To enable indication of Chan load and Noise floor to host */
2685#define WMI_SCAN_CHAN_STAT_EVENT 0x10
2686/** Filter Probe request frames */
2687#define WMI_SCAN_FILTER_PROBE_REQ 0x20
2688/**When set, not to scan DFS channels*/
2689#define WMI_SCAN_BYPASS_DFS_CHN 0x40
2690/**When set, certain errors are ignored and scan continues.
2691 * Different FW scan engine may use its own logic to decide what errors to ignore*/
2692#define WMI_SCAN_CONTINUE_ON_ERROR 0x80
2693/** Enable promiscous mode for ese */
2694#define WMI_SCAN_FILTER_PROMISCOUS 0x100
2695/** allow to send probe req on DFS channel */
2696#define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
2697/** add TPC content in probe req frame */
2698#define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400
2699/** add DS content in probe req frame */
2700#define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800
2701/** use random mac address for TA for probe request frame and add
2702 * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
2703 * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/
2704#define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000
Govind Singh32cced32016-02-01 13:33:09 +05302705/** allow mgmt transmission during off channel scan */
2706#define WMI_SCAN_OFFCHAN_MGMT_TX 0x2000
2707/** allow data transmission during off channel scan */
2708#define WMI_SCAN_OFFCHAN_DATA_TX 0x4000
2709/** allow capture ppdu with phy errrors */
2710#define WMI_SCAN_CAPTURE_PHY_ERROR 0x8000
Sandeep Puligilla1d9a8d82016-03-09 13:07:58 -08002711/** always do passive scan on passive channels */
2712#define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x1000
Pradeep Reddy POTTETIb36e8fc2016-06-20 15:10:26 +05302713/** set HALF (10MHz) rate support */
2714#define WMI_SCAN_FLAG_HALF_RATE_SUPPORT 0x20000
2715/** set Quarter (5MHz) rate support */
2716#define WMI_SCAN_FLAG_QUARTER_RATE_SUPPORT 0x40000
2717
Anurag Chouhanb3fa7a12016-04-18 17:26:49 +05302718/** for adaptive scan mode using 3 bits (21 - 23 bits) */
2719#define WMI_SCAN_DWELL_MODE_MASK 0x00E00000
2720#define WMI_SCAN_DWELL_MODE_SHIFT 21
2721
2722typedef enum {
2723 WMI_SCAN_DWELL_MODE_DEFAULT = 0,
2724 WMI_SCAN_DWELL_MODE_CONSERVATIVE = 1,
2725 WMI_SCAN_DWELL_MODE_MODERATE = 2,
2726 WMI_SCAN_DWELL_MODE_AGGRESSIVE = 3,
2727 WMI_SCAN_DWELL_MODE_STATIC = 4,
2728} WMI_SCAN_DWELL_MODE;
2729
2730#define WMI_SCAN_SET_DWELL_MODE(flag, mode) \
2731 do { \
2732 (flag) |= (((mode) << WMI_SCAN_DWELL_MODE_SHIFT) & \
2733 WMI_SCAN_DWELL_MODE_MASK); \
2734 } while (0)
2735
2736#define WMI_SCAN_GET_DWELL_MODE(flag) \
2737 (((flag) & WMI_SCAN_DWELL_MODE_MASK) >> WMI_SCAN_DWELL_MODE_SHIFT)
2738
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002739/** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
2740#define WMI_SCAN_CLASS_MASK 0xFF000000
2741
2742/*
2743 * Masks identifying types/ID of scans
2744 * Scan_Stop macros should be the same value as below defined in UMAC
2745 * #define IEEE80211_SPECIFIC_SCAN 0x00000000
2746 * #define IEEE80211_VAP_SCAN 0x01000000
2747 * #define IEEE80211_ALL_SCANS 0x04000000
2748 */
2749#define WMI_SCAN_STOP_ONE 0x00000000
2750#define WMI_SCN_STOP_VAP_ALL 0x01000000
2751#define WMI_SCAN_STOP_ALL 0x04000000
2752
2753typedef struct {
2754 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
2755 /** requestor requesting cancel */
2756 A_UINT32 requestor;
2757 /** Scan ID */
2758 A_UINT32 scan_id;
2759 /**
2760 * Req Type
2761 * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
2762 * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
2763 * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
2764 * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
2765 */
2766 A_UINT32 req_type;
2767 /**
2768 * vDev ID
2769 * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
2770 */
2771 A_UINT32 vdev_id;
2772} wmi_stop_scan_cmd_fixed_param;
2773
2774#define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */
2775#define APPEND_TO_EXISTING_CHAN_LIST 1
2776
2777typedef struct {
2778 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
2779 A_UINT32 num_scan_chans;
2780 /** no of elements in chan_info[] */
2781 A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
2782 /** Followed by the variable length TLV chan_info:
2783 * wmi_channel chan_info[] */
2784} wmi_scan_chan_list_cmd_fixed_param;
2785
2786/*
2787 * Priority numbers must be sequential, starting with 0.
2788 */
2789/* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
2790typedef enum {
2791 WMI_SCAN_PRIORITY_VERY_LOW = 0,
2792 WMI_SCAN_PRIORITY_LOW,
2793 WMI_SCAN_PRIORITY_MEDIUM,
2794 WMI_SCAN_PRIORITY_HIGH,
2795 WMI_SCAN_PRIORITY_VERY_HIGH,
2796
2797 WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
2798} wmi_scan_priority;
2799
2800/* Five Levels for Requested Priority */
2801/* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */
2802typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
2803
2804/**
2805 * 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
2806 * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
2807 * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
2808 */
2809typedef struct {
2810 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
2811 /**
2812 * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
2813 * 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
2814 */
2815 A_UINT32 vdev_type;
2816 /**
2817 * number of rows in mapping_table for a specific vdev
2818 * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
2819 */
2820 A_UINT32 number_rows;
2821 /** mapping_table for a specific vdev follows this TLV
2822 * WLAN_PRIORITY_MAPPING mapping_table[]; */
2823} wmi_scan_sch_priority_table_cmd_fixed_param;
2824
2825/** update flags */
2826#define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1
2827#define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2
2828#define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4
2829
2830typedef struct {
2831 A_UINT32 tlv_header;
2832 /** requestor requesting update scan request */
2833 A_UINT32 requestor;
2834 /** Scan ID of the scan request that need to be update */
2835 A_UINT32 scan_id;
2836 /** update flags, indicating which of the following fields are valid and need to be updated*/
2837 A_UINT32 scan_update_flags;
2838 /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
2839 A_UINT32 scan_priority;
2840 /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
2841 A_UINT32 min_rest_time;
2842 /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
2843 A_UINT32 max_rest_time;
2844} wmi_scan_update_request_cmd_fixed_param;
2845
2846typedef struct {
2847 A_UINT32 tlv_header;
2848 /** oui to be used in probe request frame when random mac addresss is
2849 * requested part of scan parameters. this is applied to both FW internal scans and
2850 * host initated scans. host can request for random mac address with
2851 * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */
2852 A_UINT32 prob_req_oui;
2853} wmi_scan_prob_req_oui_cmd_fixed_param;
2854
2855enum wmi_scan_event_type {
2856 WMI_SCAN_EVENT_STARTED = 0x1,
2857 WMI_SCAN_EVENT_COMPLETED = 0x2,
2858 WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
2859 WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
2860 WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
2861 WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
2862 WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
Manikandan Mohan46b95c02015-12-09 12:23:08 -08002863 WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
2864 WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
Govind Singh45ef44a2016-02-01 17:45:22 +05302865 WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */
2866 WMI_SCAN_EVENT_RESUMED = 0x400, /* scan request is resumed */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002867 WMI_SCAN_EVENT_MAX = 0x8000
2868};
2869
2870enum wmi_scan_completion_reason {
2871 /** scan related events */
2872 WMI_SCAN_REASON_NONE = 0xFF,
2873 WMI_SCAN_REASON_COMPLETED = 0,
2874 WMI_SCAN_REASON_CANCELLED = 1,
2875 WMI_SCAN_REASON_PREEMPTED = 2,
2876 WMI_SCAN_REASON_TIMEDOUT = 3,
2877 WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
Govind Singh45ef44a2016-02-01 17:45:22 +05302878 WMI_SCAN_REASON_SUSPENDED = 5,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002879 WMI_SCAN_REASON_MAX,
2880};
2881
2882typedef struct {
2883 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
2884 /** scan event (wmi_scan_event_type) */
2885 A_UINT32 event;
2886 /** status of the scan completion event */
2887 A_UINT32 reason;
2888 /** channel freq , only valid for FOREIGN channel event*/
2889 A_UINT32 channel_freq;
2890 /**id of the requestor whose scan is in progress */
2891 A_UINT32 requestor;
2892 /**id of the scan that is in progress */
2893 A_UINT32 scan_id;
2894 /**id of VDEV that requested the scan */
2895 A_UINT32 vdev_id;
2896} wmi_scan_event_fixed_param;
2897
2898/* WMI Diag event */
2899typedef struct {
2900 A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
2901 A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
2902 A_UINT32 count; /* Number of diag frames added to current event */
2903 A_UINT32 dropped;
2904 /* followed by WMITLV_TAG_ARRAY_BYTE */
2905} wmi_diag_event_fixed_param;
2906
2907/*
2908 * If FW has multiple active channels due to MCC(multi channel concurrency),
2909 * then these stats are combined stats for all the active channels.
2910 */
2911typedef struct {
2912 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
2913 /** ack count, it is an incremental number, not accumulated number */
2914 A_UINT32 ackRcvBad;
2915 /** bad rts count, it is an incremental number, not accumulated number */
2916 A_UINT32 rtsBad;
2917 /** good rts, it is an incremental number, not accumulated number */
2918 A_UINT32 rtsGood;
2919 /** fcs count, it is an incremental number, not accumulated number */
2920 A_UINT32 fcsBad;
2921 /** beacon count, it is an incremental number, not accumulated number */
2922 A_UINT32 noBeacons;
2923} wmi_update_whal_mib_stats_event_fixed_param;
2924
2925/*
2926 * This defines how much headroom is kept in the
2927 * receive frame between the descriptor and the
2928 * payload, in order for the WMI PHY error and
2929 * management handler to insert header contents.
2930 *
2931 * This is in bytes.
2932 */
2933#define WMI_MGMT_RX_HDR_HEADROOM sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr)
2934
2935/** This event will be used for sending scan results
2936 * as well as rx mgmt frames to the host. The rx buffer
2937 * will be sent as part of this WMI event. It would be a
2938 * good idea to pass all the fields in the RX status
2939 * descriptor up to the host.
2940 */
2941/* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
2942#define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
2943
2944/** flag indicating that the the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
2945#define WMI_MGMT_RX_HDR_EXTSCAN 0x01
2946
2947/**
2948 * flag indicating that the the mgmt frame (probe req/beacon) is received in
2949 * the context of matched network by FW ENLO
2950 */
2951#define WMI_MGMT_RX_HDR_ENLO 0x02
2952
2953typedef struct {
2954 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
2955 /** channel on which this frame is received. */
2956 A_UINT32 channel;
2957 /** snr information used to cal rssi */
2958 A_UINT32 snr;
2959 /** Rate kbps */
2960 A_UINT32 rate;
2961 /** rx phy mode WLAN_PHY_MODE */
2962 A_UINT32 phy_mode;
2963 /** length of the frame */
2964 A_UINT32 buf_len;
2965 /** rx status */
2966 A_UINT32 status;
2967 /** RSSI of PRI 20MHz for each chain. */
2968 A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
2969 /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
2970 A_UINT32 flags;
2971 /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
2972 A_INT32 rssi;
2973
2974 /** delta between local TSF(TSF timestamp when frame was RXd)
2975 * and remote TSF(TSF timestamp in the IE for mgmt frame
2976 * beacon,proberesp for e.g). If remote TSF is not available,
2977 * delta set to 0.
2978 * Although tsf_delta is stored as A_UINT32, it can be negative,
2979 * and thus would need to be sign-extended if added to a value
2980 * larger than 32 bits.
2981 */
2982 A_UINT32 tsf_delta;
Sandeep Puligilla62f7ca02016-03-24 15:48:33 -07002983 /*
2984 * The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from
2985 * TSF timestamp in the RX MAC descriptor provided by HW.
2986 */
2987 A_UINT32 rx_tsf_l32;
2988
2989 /*
2990 *The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register
2991 * after the packet is received.
2992 */
2993 A_UINT32 rx_tsf_u32;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002994 /* This TLV is followed by array of bytes:
2995 * // management frame buffer
2996 * A_UINT8 bufp[];
2997 */
2998} wmi_mgmt_rx_hdr;
2999
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003000typedef struct {
3001 /** TSF timestamp */
3002 A_UINT32 tsf_timestamp;
3003
3004 /**
3005 * Current freq1, freq2
3006 *
3007 * [7:0]: freq1[lo]
3008 * [15:8] : freq1[hi]
3009 * [23:16]: freq2[lo]
3010 * [31:24]: freq2[hi]
3011 */
3012 A_UINT32 freq_info_1;
3013
3014 /**
3015 * Combined RSSI over all chains and channel width for this PHY error
3016 *
3017 * [7:0]: RSSI combined
3018 * [15:8]: Channel width (MHz)
3019 * [23:16]: PHY error code
3020 * [24:16]: reserved (future use)
3021 */
3022 A_UINT32 freq_info_2;
3023
3024 /**
3025 * RSSI on chain 0 through 3
3026 *
3027 * This is formatted the same as the PPDU_START RX descriptor
3028 * field:
3029 *
3030 * [7:0]: pri20
3031 * [15:8]: sec20
3032 * [23:16]: sec40
3033 * [31:24]: sec80
3034 */
3035 A_UINT32 rssi_chain0;
3036 A_UINT32 rssi_chain1;
3037 A_UINT32 rssi_chain2;
3038 A_UINT32 rssi_chain3;
3039
3040 /**
3041 * Last calibrated NF value for chain 0 through 3
3042 *
3043 * nf_list_1:
3044 *
3045 * + [15:0] - chain 0
3046 * + [31:16] - chain 1
3047 *
3048 * nf_list_2:
3049 *
3050 * + [15:0] - chain 2
3051 * + [31:16] - chain 3
3052 */
3053 A_UINT32 nf_list_1;
3054 A_UINT32 nf_list_2;
3055
3056 /** Length of the frame */
3057 A_UINT32 buf_len;
3058} wmi_single_phyerr_rx_hdr;
3059
3060#define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff
3061#define WMI_UNIFIED_FREQINFO_1_LO_S 0
3062#define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00
3063#define WMI_UNIFIED_FREQINFO_1_HI_S 8
3064#define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000
3065#define WMI_UNIFIED_FREQINFO_2_LO_S 16
3066#define WMI_UNIFIED_FREQINFO_2_HI 0xff000000
3067#define WMI_UNIFIED_FREQINFO_2_HI_S 24
3068
3069/*
3070 * Please keep in mind that these _SET macros break macro side effect
3071 * assumptions; don't be clever with them.
3072 */
3073#define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05303074 (WMI_F_MS((hdr)->freq_info_1, \
3075 WMI_UNIFIED_FREQINFO_ ## f ## _LO) \
3076 | (WMI_F_MS((hdr)->freq_info_1, \
3077 WMI_UNIFIED_FREQINFO_ ## f ## _HI) << 8))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003078
3079#define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \
3080 do { \
3081 WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \
3082 WMI_UNIFIED_FREQINFO_ ## f ## _LO); \
3083 WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \
3084 WMI_UNIFIED_FREQINFO_ ## f ## _HI); \
3085 } while (0)
3086
3087#define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff
3088#define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0
3089#define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00
3090#define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8
3091#define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000
3092#define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
3093
3094#define WMI_UNIFIED_RSSI_COMB_GET(hdr) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05303095 ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003096 WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
3097
3098#define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \
3099 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
3100 WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
3101
3102#define WMI_UNIFIED_CHWIDTH_GET(hdr) \
3103 WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
3104
3105#define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \
3106 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
3107 WMI_UNIFIED_FREQINFO_2_CHWIDTH);
3108
3109#define WMI_UNIFIED_PHYERRCODE_GET(hdr) \
3110 WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
3111
3112#define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \
3113 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
3114 WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
3115
3116#define WMI_UNIFIED_CHAIN_0 0x0000ffff
3117#define WMI_UNIFIED_CHAIN_0_S 0
3118#define WMI_UNIFIED_CHAIN_1 0xffff0000
3119#define WMI_UNIFIED_CHAIN_1_S 16
3120#define WMI_UNIFIED_CHAIN_2 0x0000ffff
3121#define WMI_UNIFIED_CHAIN_2_S 0
3122#define WMI_UNIFIED_CHAIN_3 0xffff0000
3123#define WMI_UNIFIED_CHAIN_3_S 16
3124
3125#define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1
3126#define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1
3127#define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2
3128#define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2
3129
3130#define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \
3131 ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, \
3132 WMI_UNIFIED_CHAIN_ ## c)))
3133
3134#define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \
3135 WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, (nf) & 0xffff, \
3136 WMI_UNIFIED_CHAIN_ ## c);
3137
3138/*
3139 * For now, this matches what the underlying hardware is doing.
3140 * Update ar6000ProcRxDesc() to use these macros when populating
3141 * the rx descriptor and then we can just copy the field over
3142 * to the WMI PHY notification without worrying about breaking
3143 * things.
3144 */
3145#define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff
3146#define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0
3147#define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00
3148#define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8
3149#define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000
3150#define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16
3151#define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000
3152#define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24
3153
3154#define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \
3155 WMI_F_RMW((hdr)->rssi_chain ## c, (rssi) & 0xff, \
3156 WMI_UNIFIED_RSSI_CHAN_ ## ch);
3157
3158#define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \
3159 ((int8_t) (WMI_F_MS((hdr)->rssi_chain ## c, \
3160 WMI_UNIFIED_RSSI_CHAN_ ## ch)))
3161
3162typedef struct {
3163 /** Phy error event header */
3164 wmi_single_phyerr_rx_hdr hdr;
3165 /** frame buffer */
3166 A_UINT8 bufp[1];
3167} wmi_single_phyerr_rx_event;
3168
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08003169/* PHY ERROR MASK 0 */
3170/* bits 1:0 defined but not published */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05303171#define WMI_PHY_ERROR_MASK0_RADAR (1<<2)
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08003172/* bits 23:3 defined but not published */
3173#define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1<<24)
3174/* bits 25:24 defined but not published */
3175#define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1<<26)
3176/* bits 31:27 defined but not published */
3177
3178/* PHY ERROR MASK 1
3179 * bits 13:0 defined but not published
3180 * bits 31:14 reserved
3181 */
3182
3183/* PHY ERROR MASK 2
3184 * bits 31:0 reserved
3185 */
3186
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003187typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303188 /* TLV tag and len; tag equals
3189 * WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr
3190 */
3191 A_UINT32 tlv_header;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003192 /** Phy error phy error count */
3193 A_UINT32 num_phyerr_events;
3194 A_UINT32 tsf_l32;
3195 A_UINT32 tsf_u32;
3196 A_UINT32 buf_len;
Govind Singh869c9872016-02-22 18:36:34 +05303197 union {
3198 /* OBSOLETE - will be removed once all refs are gone */
3199 A_UINT32 pmac_id;
3200 /** pdev_id for identifying the MAC
3201 * See macros starting with WMI_PDEV_ID_ for values.
3202 */
3203 A_UINT32 pdev_id;
3204 };
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08003205 A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
3206 A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
3207 A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
3208
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003209 /* This TLV is followed by array of bytes:
3210 * // frame buffer - contains multiple payloads in the order:
3211 * // header - payload, header - payload...
3212 * (The header is of type: wmi_single_phyerr_rx_hdr)
3213 * A_UINT8 bufp[];
3214 */
3215} wmi_comb_phyerr_rx_hdr;
3216
3217/* WMI MGMT TX */
3218typedef struct {
3219 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
3220 /** unique id identifying the VDEV, generated by the caller */
3221 A_UINT32 vdev_id;
3222 /** peer MAC address */
3223 wmi_mac_addr peer_macaddr;
3224 /** xmit rate */
3225 A_UINT32 tx_rate;
3226 /** xmit power */
3227 A_UINT32 tx_power;
3228 /** Buffer length in bytes */
3229 A_UINT32 buf_len;
3230 /* This TLV is followed by array of bytes:
3231 * // management frame buffer
3232 * A_UINT8 bufp[];
3233 */
3234} wmi_mgmt_tx_hdr;
3235
3236typedef struct {
3237 /*
3238 * TLV tag and len;
3239 * tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param
3240 */
3241 A_UINT32 tlv_header;
3242 A_UINT32 vdev_id;
3243 /* echoed in tx_compl_event */
3244 A_UINT32 desc_id;
3245 /* MHz units */
3246 A_UINT32 chanfreq;
3247 A_UINT32 paddr_lo;
3248 A_UINT32 paddr_hi;
3249 A_UINT32 frame_len;
3250 /* Buffer length in bytes */
3251 A_UINT32 buf_len;
3252 /*
3253 * This TLV is followed by array of bytes:
3254 * First 64 bytes of management frame
3255 * A_UINT8 bufp[];
3256 */
3257} wmi_mgmt_tx_send_cmd_fixed_param;
3258
3259typedef struct {
3260 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
3261 A_UINT32 value;
3262} wmi_echo_event_fixed_param;
3263
3264typedef struct {
3265 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
3266 A_UINT32 value;
3267} wmi_echo_cmd_fixed_param;
3268
3269typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303270 /* TLV tag and len; tag equals
3271 * WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param
3272 */
3273 A_UINT32 tlv_header;
3274 /** pdev_id for identifying the MAC
3275 * See macros starting with WMI_PDEV_ID_ for values.
3276 */
3277 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003278 /** reg domain code */
3279 A_UINT32 reg_domain;
3280 A_UINT32 reg_domain_2G;
3281 A_UINT32 reg_domain_5G;
3282 A_UINT32 conformance_test_limit_2G;
3283 A_UINT32 conformance_test_limit_5G;
Govind Singh32cced32016-02-01 13:33:09 +05303284 A_UINT32 dfs_domain;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003285} wmi_pdev_set_regdomain_cmd_fixed_param;
3286
3287typedef struct {
3288 /** true for scan start and flase for scan end */
3289 A_UINT32 scan_start;
3290} wmi_pdev_scan_cmd;
3291
Govind Singhc7d51942016-02-01 12:09:31 +05303292/* WMI support for setting ratemask in target */
3293
3294typedef struct {
3295 A_UINT32 tlv_header;
3296 /*
3297 * TLV tag and len; tag equals
3298 * WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param
3299 */
3300 A_UINT32 vdev_id;
3301 /*
3302 * 0 - cck/ofdm
3303 * 1 - HT
3304 * 2 - VHT */
3305 A_UINT32 type;
3306
3307 A_UINT32 mask_lower32;
3308 A_UINT32 mask_higher32;
3309} wmi_vdev_config_ratemask_cmd_fixed_param;
3310
3311/* nrp action - Filter Neighbor Rx Packets - add/remove filter */
3312enum {
3313 WMI_FILTER_NRP_ACTION_ADD = 0x1,
3314 WMI_FILTER_NRP_ACTION_REMOVE = 0x2,
3315 WMI_FILTER_NRP_ACTION_GET_LIST = 0x3,
3316}; /* nrp - Neighbor Rx Packets */
3317
3318/* nrp type - Filter Neighbor Rx Packets - ap/client addr */
3319enum {
3320 WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1,
3321 WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2,
3322};
3323
3324/* nrp flag - Filter Neighbor Rx Packets
3325 * (capture flag, 2 & 3 not initially supported)
3326 */
3327enum {
3328 WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1,
3329 WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2,
3330 WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3,
3331};
3332
3333/* Filter for Neighbor Rx Packets */
3334typedef struct {
3335 A_UINT32 tlv_header;
3336 /*
3337 * TLV tag and len; tag equals
3338 * WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param
3339 */
3340 A_UINT32 vdev_id;
3341 /* AP Bssid or Client Mac-addr */
3342 wmi_mac_addr addr;
3343 /* Add/Remove NRF Filter */
3344 A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
3345 /* client/ap filter */
3346 A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
3347 /* optional - tx/rx capture */
3348 A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
3349 /* BSSID index - index of the BSSID register */
3350 A_UINT32 bssid_idx;
3351} wmi_vdev_filter_nrp_config_cmd_fixed_param;
3352
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003353/*Command to set/unset chip in quiet mode*/
3354typedef struct {
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05303355 /*
3356 * TLV tag and len; tag equals
3357 * WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param
3358 */
3359 A_UINT32 tlv_header;
3360 /*
3361 * pdev_id for identifying the MAC, See macros
3362 * starting with WMI_PDEV_ID_ for values.
3363 */
3364 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003365 A_UINT32 period; /*period in TUs */
3366 A_UINT32 duration; /*duration in TUs */
3367 A_UINT32 next_start; /*offset in TUs */
3368 A_UINT32 enabled; /*enable/disable */
3369} wmi_pdev_set_quiet_cmd_fixed_param;
3370
Govind Singh869c9872016-02-22 18:36:34 +05303371typedef struct {
3372 /* TLV tag and len; tag equals
3373 * WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param
3374 */
3375 A_UINT32 tlv_header;
3376 A_UINT32 vdev_id; /* Virtual interface ID */
3377 A_UINT32 period; /* period in TUs */
3378 A_UINT32 duration; /* duration in TUs */
3379 A_UINT32 next_start; /* offset in TUs */
3380 A_UINT32 enabled; /* enable/disable */
3381} wmi_vdev_set_quiet_cmd_fixed_param;
3382
Krishna Kumaar Natarajanea0a7962016-04-16 14:09:09 +05303383typedef struct {
3384 /*
3385 * TLV tag and len; tag equals
3386 * WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param
3387 */
3388 A_UINT32 tlv_header;
3389 /*
3390 * vdev id indicating to which the vdev custom aggregation size
3391 * will be applied.
3392 */
3393 A_UINT32 vdev_id;
3394 /*
3395 * Size for tx aggregation (max MPDUs per A-MPDU) for the vdev
3396 * mentioned in vdev id
3397 */
3398 A_UINT32 tx_aggr_size;
3399 /*
3400 * Size for rx aggregation (block ack window size limit) for
3401 * the vdev mentioned in vdev id
3402 */
3403 A_UINT32 rx_aggr_size;
3404} wmi_vdev_set_custom_aggr_size_cmd_fixed_param;
3405
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003406/*
3407 * Command to enable/disable Green AP Power Save.
3408 * This helps conserve power during AP operation. When the AP has no
3409 * stations associated with it, the host can enable Green AP Power Save
3410 * to request the firmware to shut down all but one transmit and receive
3411 * chains.
3412 */
3413typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303414 /** TLV tag and len; tag equals
3415 * WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param
3416 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003417 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303418 /** pdev_id for identifying the MAC
3419 * See macros starting with WMI_PDEV_ID_ for values.
3420 */
3421 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003422 A_UINT32 enable; /*1:enable, 0:disable */
3423} wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
3424
3425#define MAX_HT_IE_LEN 32
Govind Singh869c9872016-02-22 18:36:34 +05303426/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003427typedef struct {
3428 A_UINT32 tlv_header;
3429 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
3430 A_UINT32 reserved0;
3431 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3432 A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
3433 A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
3434 A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
3435 /** The TLV for the HT IE follows:
3436 * A_UINT32 ie_data[];
3437 */
3438} wmi_pdev_set_ht_ie_cmd_fixed_param;
3439
3440#define MAX_VHT_IE_LEN 32
Govind Singh869c9872016-02-22 18:36:34 +05303441/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003442typedef struct {
3443 A_UINT32 tlv_header;
3444 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
3445 A_UINT32 reserved0;
3446 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3447 A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
3448 A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
3449 A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
3450 /** The TLV for the VHT IE follows:
3451 * A_UINT32 ie_data[];
3452 */
3453} wmi_pdev_set_vht_ie_cmd_fixed_param;
3454
3455typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303456 /** TLV tag and len; tag equals
3457 * WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param
3458 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003459 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303460 /** pdev_id for identifying the MAC
3461 * See macros starting with WMI_PDEV_ID_ for values.
3462 */
3463 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003464 wmi_mac_addr base_macaddr;
3465} wmi_pdev_set_base_macaddr_cmd_fixed_param;
3466
3467/*
3468 * For now, the spectral configuration is global rather than
3469 * per-vdev. The vdev is a placeholder and will be ignored
3470 * by the firmware.
3471 */
3472typedef struct {
3473 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
3474 A_UINT32 vdev_id;
3475 A_UINT32 spectral_scan_count;
3476 A_UINT32 spectral_scan_period;
3477 A_UINT32 spectral_scan_priority;
3478 A_UINT32 spectral_scan_fft_size;
3479 A_UINT32 spectral_scan_gc_ena;
3480 A_UINT32 spectral_scan_restart_ena;
3481 A_UINT32 spectral_scan_noise_floor_ref;
3482 A_UINT32 spectral_scan_init_delay;
3483 A_UINT32 spectral_scan_nb_tone_thr;
3484 A_UINT32 spectral_scan_str_bin_thr;
3485 A_UINT32 spectral_scan_wb_rpt_mode;
3486 A_UINT32 spectral_scan_rssi_rpt_mode;
3487 A_UINT32 spectral_scan_rssi_thr;
3488 A_UINT32 spectral_scan_pwr_format;
3489 A_UINT32 spectral_scan_rpt_mode;
3490 A_UINT32 spectral_scan_bin_scale;
3491 A_UINT32 spectral_scan_dBm_adj;
3492 A_UINT32 spectral_scan_chn_mask;
3493} wmi_vdev_spectral_configure_cmd_fixed_param;
3494
3495/*
3496 * Enabling, disabling and triggering the spectral scan
3497 * is a per-vdev operation. That is, it will set channel
3498 * flags per vdev rather than globally; so concurrent scan/run
3499 * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
3500 */
3501typedef struct {
3502 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
3503 A_UINT32 vdev_id;
3504 /* 0 - ignore; 1 - trigger, 2 - clear trigger */
3505 A_UINT32 trigger_cmd;
3506 /* 0 - ignore; 1 - enable, 2 - disable */
3507 A_UINT32 enable_cmd;
3508} wmi_vdev_spectral_enable_cmd_fixed_param;
3509
3510typedef enum {
3511 WMI_CSA_IE_PRESENT = 0x00000001,
3512 WMI_XCSA_IE_PRESENT = 0x00000002,
3513 WMI_WBW_IE_PRESENT = 0x00000004,
3514 WMI_CSWARP_IE_PRESENT = 0x00000008,
3515} WMI_CSA_EVENT_IES_PRESENT_FLAG;
3516
3517/* wmi CSA receive event from beacon frame */
3518typedef struct {
3519 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
3520 A_UINT32 i_fc_dur;
3521/* Bit 0-15: FC */
3522/* Bit 16-31: DUR */
3523 wmi_mac_addr i_addr1;
3524 wmi_mac_addr i_addr2;
3525 /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
3526 * changed in the future without breaking WMI compatibility */
3527 A_UINT32 csa_ie[2];
3528 A_UINT32 xcsa_ie[2];
3529 A_UINT32 wb_ie[2];
3530 A_UINT32 cswarp_ie;
3531 A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
3532} wmi_csa_event_fixed_param;
3533
3534typedef enum {
Govind Singh32cced32016-02-01 13:33:09 +05303535 WAL_PEER_MCAST2UCAST_DISABLED = 0,
3536 /* Drop the frames if match is not found */
3537 WAL_PEER_MCAST2UCAST_DROP_EMPTY = 1,
3538 /* Send as mcast if match is not found */
3539 WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2,
3540} WMI_PEER_MCAST2UCAST_MODE;
3541
3542typedef enum {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003543 /** TX chain mask */
3544 WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
3545 /** RX chain mask */
3546 WMI_PDEV_PARAM_RX_CHAIN_MASK,
3547 /** TX power limit for 2G Radio */
3548 WMI_PDEV_PARAM_TXPOWER_LIMIT2G,
3549 /** TX power limit for 5G Radio */
3550 WMI_PDEV_PARAM_TXPOWER_LIMIT5G,
3551 /** TX power scale */
3552 WMI_PDEV_PARAM_TXPOWER_SCALE,
3553 /** Beacon generation mode . 0: host, 1: target */
3554 WMI_PDEV_PARAM_BEACON_GEN_MODE,
3555 /** Beacon generation mode . 0: staggered 1: bursted */
3556 WMI_PDEV_PARAM_BEACON_TX_MODE,
3557 /** Resource manager off chan mode .
3558 * 0: turn off off chan mode. 1: turn on offchan mode
3559 */
3560 WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
3561 /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */
3562 WMI_PDEV_PARAM_PROTECTION_MODE,
3563 /** Dynamic bandwidth 0: disable 1: enable */
3564 WMI_PDEV_PARAM_DYNAMIC_BW,
3565 /** Non aggregrate/ 11g sw retry threshold.0-disable */
3566 WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
3567 /** aggregrate sw retry threshold. 0-disable*/
3568 WMI_PDEV_PARAM_AGG_SW_RETRY_TH,
3569 /** Station kickout threshold (non of consecutive failures).0-disable */
3570 WMI_PDEV_PARAM_STA_KICKOUT_TH,
3571 /** Aggerate size scaling configuration per AC */
3572 WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING,
3573 /** LTR enable */
3574 WMI_PDEV_PARAM_LTR_ENABLE,
3575 /** LTR latency for BE, in us */
3576 WMI_PDEV_PARAM_LTR_AC_LATENCY_BE,
3577 /** LTR latency for BK, in us */
3578 WMI_PDEV_PARAM_LTR_AC_LATENCY_BK,
3579 /** LTR latency for VI, in us */
3580 WMI_PDEV_PARAM_LTR_AC_LATENCY_VI,
3581 /** LTR latency for VO, in us */
3582 WMI_PDEV_PARAM_LTR_AC_LATENCY_VO,
3583 /** LTR AC latency timeout, in ms */
3584 WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
3585 /** LTR platform latency override, in us */
3586 WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
3587 /** LTR-M override, in us */
3588 WMI_PDEV_PARAM_LTR_RX_OVERRIDE,
3589 /** Tx activity timeout for LTR, in us */
3590 WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
3591 /** L1SS state machine enable */
3592 WMI_PDEV_PARAM_L1SS_ENABLE,
3593 /** Deep sleep state machine enable */
3594 WMI_PDEV_PARAM_DSLEEP_ENABLE,
3595 /** RX buffering flush enable */
3596 WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
3597 /** RX buffering matermark */
3598 WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
3599 /** RX buffering timeout enable */
3600 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
3601 /** RX buffering timeout value */
3602 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
3603 /** pdev level stats update period in ms */
3604 WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
3605 /** vdev level stats update period in ms */
3606 WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
3607 /** peer level stats update period in ms */
3608 WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
3609 /** beacon filter status update period */
3610 WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
3611 /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
3612 WMI_PDEV_PARAM_PMF_QOS,
3613 /** Access category on which ARP frames are sent */
3614 WMI_PDEV_PARAM_ARP_AC_OVERRIDE,
3615 /** DCS configuration */
3616 WMI_PDEV_PARAM_DCS,
3617 /** Enable/Disable ANI on target */
3618 WMI_PDEV_PARAM_ANI_ENABLE,
3619 /** configure the ANI polling period */
3620 WMI_PDEV_PARAM_ANI_POLL_PERIOD,
3621 /** configure the ANI listening period */
3622 WMI_PDEV_PARAM_ANI_LISTEN_PERIOD,
3623 /** configure OFDM immunity level */
3624 WMI_PDEV_PARAM_ANI_OFDM_LEVEL,
3625 /** configure CCK immunity level */
3626 WMI_PDEV_PARAM_ANI_CCK_LEVEL,
3627 /** Enable/Disable CDD for 1x1 STAs in rate control module */
3628 WMI_PDEV_PARAM_DYNTXCHAIN,
3629 /** Enable/Disable proxy STA */
3630 WMI_PDEV_PARAM_PROXY_STA,
3631 /** Enable/Disable low power state when all VDEVs are inactive/idle. */
3632 WMI_PDEV_PARAM_IDLE_PS_CONFIG,
3633 /** Enable/Disable power gating sleep */
3634 WMI_PDEV_PARAM_POWER_GATING_SLEEP,
3635 /** Enable/Disable Rfkill */
3636 WMI_PDEV_PARAM_RFKILL_ENABLE,
3637 /** Set Bursting DUR */
3638 WMI_PDEV_PARAM_BURST_DUR,
3639 /** Set Bursting ENABLE */
3640 WMI_PDEV_PARAM_BURST_ENABLE,
3641 /** HW rfkill config */
3642 WMI_PDEV_PARAM_HW_RFKILL_CONFIG,
3643 /** Enable radio low power features */
3644 WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE,
3645 /** L1SS entry and residency time track */
3646 WMI_PDEV_PARAM_L1SS_TRACK,
3647 /** set hyst at runtime, requirement from SS */
3648 WMI_PDEV_PARAM_HYST_EN,
3649 /** Enable/ Disable POWER COLLAPSE */
3650 WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE,
3651 /** configure LED system state */
3652 WMI_PDEV_PARAM_LED_SYS_STATE,
3653 /** Enable/Disable LED */
3654 WMI_PDEV_PARAM_LED_ENABLE,
3655 /** set DIRECT AUDIO time latency */
Govind Singh869c9872016-02-22 18:36:34 +05303656 WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003657 /** set DIRECT AUDIO Feature ENABLE */
Govind Singh869c9872016-02-22 18:36:34 +05303658 WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003659 /** pdev level whal mib stats update enable */
3660 WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE,
3661 /** ht/vht info based on vdev */
3662 WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD,
3663 /** Set CTS channel BW for dynamic BW adjustment feature */
3664 WMI_PDEV_PARAM_CTS_CBW,
3665 /** Set GPIO pin info used by WNTS */
3666 WMI_PDEV_PARAM_WNTS_CONFIG,
3667 /** Enable/Disable hardware adaptive early rx feature */
3668 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE,
3669 /** The minimum early rx duration, to ensure early rx duration is non-zero */
3670 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP,
3671 /** Increasing/decreasing step used by hardware */
3672 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP,
3673 /** The fixed early rx duration when adaptive early rx is disabled */
3674 WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP,
3675 /** Enable/Disable bmiss based adaptive beacon timeout feature */
3676 WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE,
3677 /*
3678 * The minimum beacon timeout duration, to ensure beacon timeout
3679 * duration is non-zero
3680 */
3681 WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT,
3682 /** Increasing/decreasing step used by hardware */
3683 WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP,
3684 /*
3685 * The fixed beacon timeout duration when bmiss based adaptive beacon
3686 * timeout is disabled
3687 */
3688 WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT,
3689 /*
3690 * Enable/Disable Congestion Estimator based adaptive beacon
3691 * timeout feature */
3692 WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE,
3693 /*
3694 * combo value of ce_id, ce_threshold, ce_time, refer
3695 * to WMI_CE_BTO_CE_ID_MASK
3696 */
3697 WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE,
3698 /** 2G TX chain mask */
3699 WMI_PDEV_PARAM_TX_CHAIN_MASK_2G,
3700 /** 2G RX chain mask */
3701 WMI_PDEV_PARAM_RX_CHAIN_MASK_2G,
3702 /** 5G TX chain mask */
3703 WMI_PDEV_PARAM_TX_CHAIN_MASK_5G,
3704 /** 5G RX chain mask */
3705 WMI_PDEV_PARAM_RX_CHAIN_MASK_5G,
3706 /* Set tx chain mask for CCK rates */
3707 WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK,
3708 /* Set tx chain mask for 1SS stream */
3709 WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS,
Nirav Shahe1e4a812015-11-05 11:15:54 +05303710 /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected*/
3711 WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG,
Nirav Shah47062ff2015-11-05 11:21:08 +05303712 /* TX power backoff in dB: tx power -= param value
3713 * Host passes values(DB) to Halphy, Halphy reduces the power table by
3714 * the values. Safety check will happen in Halphy
3715 */
3716 WMI_PDEV_PARAM_TXPOWER_DECR_DB,
Govind Singh32cced32016-02-01 13:33:09 +05303717 /** enable and disable aggregate burst along with duration */
3718 WMI_PDEV_PARAM_AGGR_BURST,
3719 /** Set the global RX decap mode */
3720 WMI_PDEV_PARAM_RX_DECAP_MODE,
3721 /** Enable/Disable Fast channel reset */
3722 WMI_PDEV_PARAM_FAST_CHANNEL_RESET,
3723 /** Default antenna for Smart antenna */
3724 WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA,
3725 /** Set the user-specified antenna gain */
3726 WMI_PDEV_PARAM_ANTENNA_GAIN,
3727 /** Set the user-specified RX filter */
3728 WMI_PDEV_PARAM_RX_FILTER,
3729 /*
3730 * configure the user-specified MCAST tid for managed mcast feature
3731 * 0-15 is the valid range. 0xff will clear the tid setting
3732 */
3733 WMI_PDEV_SET_MCAST_TO_UCAST_TID,
3734 /** Enable/Disable Proxy sta mode */
3735 WMI_PDEV_PARAM_PROXY_STA_MODE,
3736 /*
3737 * configure the mcast2ucast mode for the pdev->peer_mcast.
3738 * See WMI_PEER_MCAST2UCAST_MODE for possible values
3739 */
3740 WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE,
3741 /** Sets the Mcast buffers for cloning, to support Mcast enhancement */
3742 WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER,
3743 /** Remove the Mcast buffers added by host */
3744 WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER,
3745 /** En/disable station power save state indication */
3746 WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE,
3747 /** Access category on which ARP frames are sent */
3748 WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE,
3749 /** allow or disallow interbss frame forwarding */
3750 WMI_PDEV_PARAM_BLOCK_INTERBSS,
3751 /** Enable/Disable reset */
3752 WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID,
3753 /** Enable/Disable/Set MSDU_TTL in milliseconds. */
3754 WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID,
3755 /** Set global PPDU duration limit (usec). */
3756 WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID,
3757 /** set txbf sounding period of vap in milliseconds */
3758 WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID,
3759 /** Set promiscuous mode */
3760 WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID,
3761 /** Set burst mode */
3762 WMI_PDEV_PARAM_SET_BURST_MODE_CMDID,
3763 /** enable enhanced stats */
3764 WMI_PDEV_PARAM_EN_STATS,
3765 /** Set mu-grouping policy */
3766 WMI_PDEV_PARAM_MU_GROUP_POLICY,
3767 /** Channel Hopping Enable */
3768 WMI_PDEV_PARAM_NOISE_DETECTION,
3769 /** Set Channel Hopping NF threshold in dBm */
3770 WMI_PDEV_PARAM_NOISE_THRESHOLD,
3771 /** Set PAPRD policy */
3772 WMI_PDEV_PARAM_DPD_ENABLE,
3773 /** Enable/disable mcast/bcast echo, used by ProxySTA */
3774 WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO,
3775 /** ATF enable/disable strict schedule */
3776 WMI_PDEV_PARAM_ATF_STRICT_SCH,
3777 /** ATF set access category duration, B0-B29 duration, B30-B31: AC */
3778 WMI_PDEV_PARAM_ATF_SCHED_DURATION,
3779 /** Default antenna polarization */
3780 WMI_PDEV_PARAM_ANT_PLZN,
3781 /** Set mgmt retry limit */
3782 WMI_PDEV_PARAM_MGMT_RETRY_LIMIT,
3783 /** Set CCA sensitivity level in dBm */
3784 WMI_PDEV_PARAM_SENSITIVITY_LEVEL,
3785 /** Set 2G positive and negative Tx power in 0.5dBm units */
3786 WMI_PDEV_PARAM_SIGNED_TXPOWER_2G,
3787 /** Set 5G positive and negative Tx power in 0.5dBm units */
3788 WMI_PDEV_PARAM_SIGNED_TXPOWER_5G,
3789 /** Enable/disble AMSDU for tids */
3790 WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU,
3791 /** Enable/disable AMPDU for tids */
3792 WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU,
3793 /** Set CCA threshold in dBm */
3794 WMI_PDEV_PARAM_CCA_THRESHOLD,
3795 /** RTS Fixed rate setting */
3796 WMI_PDEV_PARAM_RTS_FIXED_RATE,
3797 /** Pdev reset */
3798 WMI_PDEV_PARAM_PDEV_RESET,
3799 /** wapi mbssid offset **/
3800 WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET,
3801 /** ARP DEBUG source address*/
3802 WMI_PDEV_PARAM_ARP_DBG_SRCADDR,
3803 /** ARP DEBUG destination address*/
3804 WMI_PDEV_PARAM_ARP_DBG_DSTADDR,
3805 /** ATF enable/disable obss noise scheduling */
3806 WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH,
3807 /** ATF obss noise scaling factor */
3808 WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR,
3809 /**
3810 * TX power reduction scaling exponent - final tx power is the
3811 * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by
3812 * 2^(scale exponent). For example:
3813 * If this scale exponent is 0, the power is unchanged (divided by 2^0)
3814 * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB
3815 * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB
3816 * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB
3817 */
3818 WMI_PDEV_PARAM_CUST_TXPOWER_SCALE,
3819 /** ATF enabe/disabe dynamically */
3820 WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE,
Nitesh Shah49eecf02016-06-29 20:36:58 +05303821 /** Set tx retry limit for control frames. 0 = disable, 31 = max */
3822 WMI_PDEV_PARAM_CTRL_RETRY_LIMIT,
3823 /** Set propagation delay for 2G / 5G band.
3824 * The propagation delay is fundamentally a per-peer property, but
3825 * the target may not support per-peer settings for ack timeouts.
3826 * This pdev parameter allows the MAC-level ack timeout to be set to
3827 * a value suitable for the worst-case propagation delay of any peer
3828 * within that pdev.
3829 * Units are microseconds.
3830 */
3831 WMI_PDEV_PARAM_PROPAGATION_DELAY,
Nitesh Shaha43b09d2016-07-20 17:20:07 +05303832 /**
3833 * Host can enable/disable ANT DIV feature
3834 * if it's been enabled in BDF
3835 */
3836 WMI_PDEV_PARAM_ENA_ANT_DIV,
3837 /** Host can force one chain to select a specific ANT */
3838 WMI_PDEV_PARAM_FORCE_CHAIN_ANT,
3839 /**
3840 * Start a cycle ANT self test periodically.
3841 * In the test, the FW would select each ANT pair
3842 * one by one, the cycle time could be configured
3843 * via WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL
3844 */
3845 WMI_PDEV_PARAM_ANT_DIV_SELFTEST,
3846 /**
3847 * Configure the cycle time of ANT self test,
3848 * the unit is micro second. Per the timer
3849 * limitation, too small value could be not so
3850 * accurate.
3851 */
3852 WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL,
Manjeet Singh27aa9c12016-08-24 15:38:42 +05303853 /**
3854 * wlan stats observation period, the unit is millisecond.
3855 * The value of 0 is used to turn off periodic stats report.
3856 */
3857 WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD,
3858 /**
3859 * Set tx_msdu_delay[] bin size to specify how many
3860 * milliseconds each bin of the wmi_tx_stats.tx_msdu_delay[]
3861 * histogram represents.
3862 */
3863 WMI_PDEV_PARAM_TX_DELAY_BIN_SIZE_MS,
3864 /** set wmi_tx_stats.tx_msdu_delay[] array size */
3865 WMI_PDEV_PARAM_TX_DELAY_ARRAY_SIZE,
3866 /** set wmi_tx_stats.tx_mpdu_aggr[] array size */
3867 WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_SIZE,
3868 /** set wmi_rx_stats.rx_mpdu_aggr[] array size */
3869 WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_SIZE,
Govind Singh32cced32016-02-01 13:33:09 +05303870
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003871} WMI_PDEV_PARAM;
3872
3873typedef enum {
3874 /** Set the loglevel */
3875 WMI_DBGLOG_LOG_LEVEL = 0x1,
3876 /** Enable VAP level debug */
3877 WMI_DBGLOG_VAP_ENABLE,
3878 /** Disable VAP level debug */
3879 WMI_DBGLOG_VAP_DISABLE,
3880 /** Enable MODULE level debug */
3881 WMI_DBGLOG_MODULE_ENABLE,
3882 /** Disable MODULE level debug */
3883 WMI_DBGLOG_MODULE_DISABLE,
3884 /** Enable MODULE level debug */
3885 WMI_DBGLOG_MOD_LOG_LEVEL,
3886 /** set type of the debug output */
3887 WMI_DBGLOG_TYPE,
3888 /** Enable Disable debug */
3889 WMI_DBGLOG_REPORT_ENABLE
3890} WMI_DBG_PARAM;
3891
3892/* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
3893typedef enum {
3894 WMI_CTS_CBW_INVALID = 0,
3895 WMI_CTS_CBW_20,
3896 WMI_CTS_CBW_40,
3897 WMI_CTS_CBW_80,
3898 WMI_CTS_CBW_80_80,
3899 WMI_CTS_CBW_160,
3900} WMI_CTS_CBW;
3901
3902typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303903 /** TLV tag and len; tag equals
3904 * WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param
3905 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003906 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303907 /** pdev_id for identifying the MAC
3908 * See macros starting with WMI_PDEV_ID_ for values.
3909 */
3910 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003911 /** parameter id */
3912 A_UINT32 param_id;
3913 /** parametr value */
3914 A_UINT32 param_value;
3915} wmi_pdev_set_param_cmd_fixed_param;
3916
3917typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303918 /** TLV tag and len; tag equals
3919 * WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param
3920 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003921 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303922 /** pdev_id for identifying the MAC
3923 * See macros starting with WMI_PDEV_ID_ for values.
3924 */
3925 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003926 /** parameter */
3927 A_UINT32 param;
3928} wmi_pdev_get_tpc_config_cmd_fixed_param;
3929
3930#define WMI_FAST_DIVERSITY_BIT_OFFSET 0
3931#define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
3932
Himanshu Agarwal86319542016-05-24 09:00:39 +05303933#define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT 2
3934#define WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK \
3935 (0xf << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
3936#define WMI_SLOW_DIVERSITY_CH0_WEIGHT_GET_BITS(word32) \
3937 (((word32) & WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK) >> \
3938 WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
3939#define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SET_BITS(word32, value) \
3940 do { \
3941 (word32) &= ~WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
3942 (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) & \
3943 WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
3944 } while (0)
3945
3946#define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT 6
3947#define WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK \
3948 (0xf << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
3949#define WMI_SLOW_DIVERSITY_CH1_WEIGHT_GET_BITS(word32) \
3950 (((word32) & WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK) >> \
3951 WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
3952#define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SET_BITS(word32, value) \
3953 do { \
3954 (word32) &= ~WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
3955 (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) & \
3956 WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
3957 } while (0)
3958
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003959typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303960 /** TLV tag and len; tag equals
3961 * WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param
3962 */
3963 A_UINT32 tlv_header;
3964 union {
3965 /* OBSOLETE - will be removed once all refs are gone */
3966 A_UINT32 mac_id;
3967 /** pdev_id for identifying the MAC
3968 * See macros starting with WMI_PDEV_ID_ for values.
3969 */
3970 A_UINT32 pdev_id;
3971 };
Himanshu Agarwal86319542016-05-24 09:00:39 +05303972 /*
3973 * The following "value" field is divided into bit fields as follows:
3974 * bits | purpose
3975 * -----+---------------------------------------
3976 * 0 | enable/disable FAST diversity
3977 * 1 | enable/disable SLOW diversity
3978 * 5:2 | chain0 slow-diversity weighting factor
3979 * 9:6 | chain1 slow-diversity weighting factor
3980 * 31:10| currenty unused (set to 0x0)
3981 * Refer to the above WMI_[FAST/SLOW]_DIVERSITY constants.
Govind Singh869c9872016-02-22 18:36:34 +05303982 */
3983 A_UINT32 value;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003984} wmi_pdev_set_antenna_diversity_cmd_fixed_param;
3985
3986#define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
3987
3988typedef struct {
3989 /*
3990 * TLV tag and len; tag equals
3991 * WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param
3992 */
3993 A_UINT32 tlv_header;
3994 /* vdev_id, where RSSI monitoring will take place */
3995 A_UINT32 vdev_id;
3996 /*
3997 * host will configure request_id and firmware echo
3998 * this id in RSSI_BREACH_EVENT
3999 */
4000 A_UINT32 request_id;
4001 /*
4002 * bit [0-2] = low_rssi_breach_enabled[0-2]
4003 * enabled, bit [3-5] = hi_rssi_breach_enabled[0-2]
4004 */
4005 A_UINT32 enabled_bitmap;
4006 /* unit dBm. host driver to make sure [0] > [1] > [2] */
4007 A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED];
4008 /* unit dBm. host driver to make sure [0] < [1] < [2] */
4009 A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED];
4010 /*
4011 * unit dBm. once low rssi[] breached, same event
4012 * bitmap will be generated only after signal gets better
4013 * than this level. This value is adopted for all low_rssi_breach_threshold[3]
4014 */
4015 A_UINT32 lo_rssi_reenable_hysteresis;
4016 /*
4017 * unit dBm. once hi rssi[] breached, same event bitmap
4018 * will be generated only after signal gets worse than this
4019 * level. This value is adopted for all hi_rssi_breach_threshold[3]
4020 */
4021 A_UINT32 hi_rssi_reenable_histeresis;
4022 /*
4023 * After last event is generated, we wait
4024 * until this interval to generate next event
4025 */
4026 A_UINT32 min_report_interval;
4027 /* this is to suppress number of event to be generated */
4028 A_UINT32 max_num_report;
4029} wmi_rssi_breach_monitor_config_fixed_param;
4030
4031typedef struct {
4032 /** parameter */
4033 A_UINT32 param;
4034} wmi_pdev_dump_cmd;
4035
4036typedef enum {
4037 PAUSE_TYPE_CHOP = 0x1,
4038 /** for MCC (switch channel), only vdev_map is valid */
4039 PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */
4040 PAUSE_TYPE_UAPSD = 0x3,
4041 /** for uapsd, only peer_id and tid_map are valid. */
4042 PAUSE_TYPE_P2P_CLIENT_NOA = 0x4,
4043 /** only vdev_map is valid, actually only one vdev id is set at one time */
4044 PAUSE_TYPE_P2P_GO_PS = 0x5,
4045 /** only vdev_map is valid, actually only one vdev id is set at one time */
4046 PAUSE_TYPE_STA_ADD_BA = 0x6,
4047 /** only peer_id and tid_map are valid, actually only one tid is set at one time */
4048 PAUSE_TYPE_AP_PS = 0x7,
4049 /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
4050 PAUSE_TYPE_IBSS_PS = 0x8,
4051 /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +05304052 PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9,
4053 /*
4054 * for TDLS offchannel MCC (switch channel), only vdev_map is valid,
4055 * TDLS connection tracker needs to be notified
4056 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004057 PAUSE_TYPE_HOST = 0x15,
4058 /** host is requesting vdev pause */
4059} wmi_tx_pause_type;
4060
4061typedef enum {
4062 ACTION_PAUSE = 0x0,
4063 ACTION_UNPAUSE = 0x1,
4064} wmi_tx_pause_action;
4065
4066typedef struct {
4067 A_UINT32 tlv_header;
4068 A_UINT32 pause_type;
4069 A_UINT32 action;
4070 A_UINT32 vdev_map;
4071 A_UINT32 peer_id;
4072 A_UINT32 tid_map;
4073} wmi_tx_pause_event_fixed_param;
4074
4075typedef enum {
4076 WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
4077 WMI_MGMT_TX_COMP_TYPE_DISCARD,
4078 WMI_MGMT_TX_COMP_TYPE_INSPECT,
4079 WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
4080 WMI_MGMT_TX_COMP_TYPE_MAX,
4081} WMI_MGMT_TX_COMP_STATUS_TYPE;
4082
4083typedef struct {
4084 A_UINT32 tlv_header;
4085 A_UINT32 desc_id; /* from tx_send_cmd */
4086 A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */
4087} wmi_mgmt_tx_compl_event_fixed_param;
4088
Pradeep Reddy POTTETI67c778a2016-06-20 14:00:38 +05304089typedef struct {
4090 A_UINT32 tlv_header;
4091 A_UINT32 num_reports;
4092 /* tlv for completion
4093 * A_UINT32 desc_ids[num_reports]; <- from tx_send_cmd
4094 * A_UINT32 status[num_reports]; <- WMI_MGMT_TX_COMP_STATUS_TYPE
4095 */
4096} wmi_mgmt_tx_compl_bundle_event_fixed_param;
4097
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004098#define WMI_TPC_RATE_MAX 160
4099/* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
4100#define WMI_TPC_TX_NUM_CHAIN 4
4101
4102typedef enum {
4103 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
4104 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
4105 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
4106} WMI_TPC_CONFIG_EVENT_FLAG;
4107
4108typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05304109 /* TLV tag and len; tag equals
4110 * WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param
4111 */
4112 A_UINT32 tlv_header;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004113 A_UINT32 regDomain;
4114 A_UINT32 chanFreq;
4115 A_UINT32 phyMode;
4116 A_UINT32 twiceAntennaReduction;
4117 A_UINT32 twiceMaxRDPower;
4118 A_INT32 twiceAntennaGain;
4119 A_UINT32 powerLimit;
4120 A_UINT32 rateMax;
4121 A_UINT32 numTxChain;
4122 A_UINT32 ctl;
4123 A_UINT32 flags;
Govind Singh869c9872016-02-22 18:36:34 +05304124 /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without
4125 * breaking the WMI compatibility
4126 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004127 A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
4128 A_INT8
4129 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN]
4130 [WMI_TPC_TX_NUM_CHAIN];
4131 A_INT8
4132 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN]
4133 [WMI_TPC_TX_NUM_CHAIN];
4134 A_INT8
4135 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN]
4136 [WMI_TPC_TX_NUM_CHAIN];
Govind Singh869c9872016-02-22 18:36:34 +05304137 /** pdev_id for identifying the MAC
4138 * See macros starting with WMI_PDEV_ID_ for values.
4139 */
4140 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004141 /* This TLV is followed by a byte array:
4142 * A_UINT8 ratesArray[];
4143 */
4144} wmi_pdev_tpc_config_event_fixed_param;
4145
4146typedef struct {
4147 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */
4148 A_UINT32 periodCnt;
4149 A_UINT32 L1Cnt;
4150 A_UINT32 L11Cnt;
4151 A_UINT32 L12Cnt;
4152 A_UINT32 L1Entry;
4153 A_UINT32 L11Entry;
4154 A_UINT32 L12Entry;
Govind Singh869c9872016-02-22 18:36:34 +05304155 /** pdev_id for identifying the MAC
4156 * See macros starting with WMI_PDEV_ID_ for values.
4157 */
4158 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004159} wmi_pdev_l1ss_track_event_fixed_param;
4160
4161typedef struct {
4162 A_UINT32 len;
4163 A_UINT32 msgref;
4164 A_UINT32 segmentInfo;
4165} wmi_pdev_seg_hdr_info;
4166
4167/*
4168 * Transmit power scale factor.
4169 *
4170 */
4171typedef enum {
4172 WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
4173 WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
4174 WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
4175 WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
4176 WMI_TP_SCALE_MIN = 4, /* min, but still on */
4177 WMI_TP_SCALE_SIZE = 5, /* max num of enum */
4178} WMI_TP_SCALE;
4179
4180#define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
4181
4182typedef struct {
4183 /** message buffer, NULL terminated */
4184 char bufp[WMI_MAX_DEBUG_MESG];
4185} wmi_debug_mesg_event;
4186
4187enum {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004188 /** P2P device */
4189 VDEV_SUBTYPE_P2PDEV = 0,
4190 /** P2P client */
4191 VDEV_SUBTYPE_P2PCLI,
4192 /** P2P GO */
4193 VDEV_SUBTYPE_P2PGO,
4194 /** BT3.0 HS */
4195 VDEV_SUBTYPE_BT,
4196};
4197
4198typedef struct {
4199 /** idnore power , only use flags , mode and freq */
4200 wmi_channel chan;
4201} wmi_pdev_set_channel_cmd;
4202
4203typedef enum {
4204 WMI_PKTLOG_EVENT_RX = 0x1,
4205 WMI_PKTLOG_EVENT_TX = 0x2,
4206 WMI_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
4207 WMI_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
4208 /* 0x10 used by deprecated DBG_PRINT */
4209 WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x20, /* To support Smart Antenna */
Anurag Chouhane28b1f02016-07-29 11:15:29 +05304210 WMI_PKTLOG_EVENT_SW = 0x40, /* To support SW defined events */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004211} WMI_PKTLOG_EVENT;
4212
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07004213typedef enum {
4214 /* (default) FW will decide under what conditions to enable pktlog */
4215 WMI_PKTLOG_ENABLE_AUTO = 0,
4216 WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */
4217} WMI_PKTLOG_ENABLE;
4218
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004219typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05304220 /** TLV tag and len; tag equals
4221 * WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param
4222 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004223 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05304224 /** pdev_id for identifying the MAC
4225 * See macros starting with WMI_PDEV_ID_ for values.
4226 */
4227 A_UINT32 pdev_id;
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07004228 A_UINT32 evlist; /* WMI_PKTLOG_EVENT */
4229 A_UINT32 enable; /* WMI_PKTLOG_ENABLE */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004230} wmi_pdev_pktlog_enable_cmd_fixed_param;
4231
4232typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05304233 /** TLV tag and len; tag equals
4234 * WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param
4235 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004236 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05304237 /** pdev_id for identifying the MAC
4238 * See macros starting with WMI_PDEV_ID_ for values.
4239 */
4240 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004241} wmi_pdev_pktlog_disable_cmd_fixed_param;
4242
Govind Singh45ef44a2016-02-01 17:45:22 +05304243typedef struct {
4244 /*
4245 * TLV tag and len; tag equals
4246 * WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param
4247 */
4248 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05304249 /** pdev_id for identifying the MAC
4250 * See macros starting with WMI_PDEV_ID_ for values.
4251 */
4252 A_UINT32 pdev_id;
Govind Singh45ef44a2016-02-01 17:45:22 +05304253 /*
4254 * enable for mib stats collection.
4255 * Stats are delivered to host in wmi_mib_stats structure.
4256 * If enable_Mib=1, stats collection is enabled.
4257 * If enable_Mib=0, stats collection does not happen
4258 */
4259 A_UINT32 enable_Mib;
4260} wmi_mib_stats_enable_cmd_fixed_param;
4261
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004262/** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
4263 * NOTE: This constant cannot be changed without breaking
4264 * WMI Compatibility. */
4265
4266#define WMI_DSCP_MAP_MAX (64)
4267/*
4268 * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
4269 * @details
4270 * Create an API for sending the custom DSCP-to-TID map to the target
4271 * If this is a request from the user space or from above the UMAC
4272 * then the best place to implement this is in the umac_if_offload of the OL path.
4273 * Provide a place holder for this API in the ieee80211com (ic).
4274 *
4275 * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
4276 * in the target should be directed to the function pointer in the ic.
4277 *
4278 * Implementation details of the API to send the map to the target are as described-
4279 *
4280 * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
4281 * DSCP-to-TID map is a one dimensional uint32_t array of length 64 to accomodate
4282 * 64 TID values for 2^6 (64) DSCP ids.
4283 * Example:
4284 * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
4285 * 0, 0, 0, 0, 0, 0, 0, 0,
4286 * 1, 1, 1, 1, 1, 1, 1, 1,
4287 * 2, 2, 2, 2, 2, 2, 2, 2,
4288 * 3, 3, 3, 3, 3, 3, 3, 3,
4289 * 4, 4, 4, 4, 4, 4, 4, 4,
4290 * 5, 5, 5, 5, 5, 5, 5, 5,
4291 * 6, 6, 6, 6, 6, 6, 6, 6,
4292 * 7, 7, 7, 7, 7, 7, 7, 7,
4293 * };
4294 *
4295 * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
4296 *
4297 * 3. Copy the DSCP-to-TID map into the WMI buffer.
4298 *
4299 * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
4300 * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
4301 * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
4302 * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
4303 *
4304 */
Govind Singh869c9872016-02-22 18:36:34 +05304305
4306/* DEPRECATED - use VDEV level command instead
4307 * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param)
4308 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004309typedef struct {
4310 A_UINT32 tlv_header;
4311 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
4312 A_UINT32 reserved0;
4313 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
4314 /* map indicating DSCP to TID conversion */
4315 A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
4316} wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
4317
Govind Singhc7d51942016-02-01 12:09:31 +05304318typedef struct {
4319 A_UINT32 tlv_header;
4320 /*
4321 * TLV tag and len; tag equals
4322 * WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param
4323 */
4324 A_UINT32 vdev_id;
4325 /** map indicating DSCP to TID conversion */
4326 A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
Rajeev Kumare18f5282016-04-15 14:08:29 -07004327 A_UINT32 enable_override;
Govind Singhc7d51942016-02-01 12:09:31 +05304328} wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
4329
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +05304330enum WMI_WAKE_GPIO_TYPE {
4331 WMI_WAKE_GPIO_LOW = 1,
4332 WMI_WAKE_GPIO_HIGH = 2,
4333 WMI_WAKE_GPIO_RISING_EDGE = 3,
4334 WMI_WAKE_GPIO_FALLING_EDGE = 4,
4335};
4336
4337/**
4338 * Set GPIO numbers used to wakeup host and wakeup target.
4339 */
4340typedef struct {
4341 /**
4342 * TLV tag and len; tag equals
4343 * WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param
4344 */
4345 A_UINT32 tlv_header;
4346 /* gpio num used to wakeup host, 0xff disable wakeup gpio */
4347 A_UINT32 host_wakeup_gpio;
4348 /* refer to WMI_WAKE_GPIO_TYPE */
4349 A_UINT32 host_wakeup_type;
4350 /* gpio num used to wakeup target, 0xff disable wakeup gpio */
4351 A_UINT32 target_wakeup_gpio;
4352 /* refer to WMI_WAKE_GPIO_TYPE */
4353 A_UINT32 target_wakeup_type;
4354} WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param;
4355
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004356/** Fixed rate (rate-code) for broadcast/ multicast data frames */
4357/* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
4358 * @details
4359 * Create an API for setting the custom rate for the MCAST and BCAST frames
4360 * in the target. If this is a request from the user space or from above the UMAC
4361 * then the best place to implement this is in the umac_if_offload of the OL path.
4362 * Provide a place holder for this API in the ieee80211com (ic).
4363 *
4364 * Implementation details of the API to set custom rates for MCAST and BCAST in
4365 * the target are as described-
4366 *
4367 * 1. The function will have 3 arguments-
4368 * vap structure,
4369 * MCAST/ BCAST identifier code,
4370 * 8 bit rate code
4371 *
4372 * The rate-code is a 1-byte field in which:for given rate, nss and preamble
4373 * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
4374 * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
4375 * b'3-b'0 indicate the rate, which is indicated as follows:
4376 * OFDM : 0: OFDM 48 Mbps
4377 * 1: OFDM 24 Mbps
4378 * 2: OFDM 12 Mbps
4379 * 3: OFDM 6 Mbps
4380 * 4: OFDM 54 Mbps
4381 * 5: OFDM 36 Mbps
4382 * 6: OFDM 18 Mbps
4383 * 7: OFDM 9 Mbps
4384 * CCK (pream == 1)
4385 * 0: CCK 11 Mbps Long
4386 * 1: CCK 5.5 Mbps Long
4387 * 2: CCK 2 Mbps Long
4388 * 3: CCK 1 Mbps Long
4389 * 4: CCK 11 Mbps Short
4390 * 5: CCK 5.5 Mbps Short
4391 * 6: CCK 2 Mbps Short
4392 * HT/VHT (pream == 2/3)
4393 * 0..7: MCS0..MCS7 (HT)
4394 * 0..9: MCS0..MCS9 (VHT)
4395 *
4396 * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
4397 * to the target.
4398 * Arguments to the API are-
4399 * wmi handle,
4400 * VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
4401 * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
4402 * rate value.
4403 */
4404typedef enum {
4405 WMI_SET_MCAST_RATE,
4406 WMI_SET_BCAST_RATE
4407} MCAST_BCAST_RATE_ID;
4408
4409typedef struct {
4410 MCAST_BCAST_RATE_ID rate_id;
4411 A_UINT32 rate;
4412} mcast_bcast_rate;
4413
4414typedef struct {
4415 A_UINT32 tlv_header;
4416 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
4417 A_UINT32 cwmin;
4418 A_UINT32 cwmax;
4419 A_UINT32 aifs;
4420 A_UINT32 txoplimit;
4421 A_UINT32 acm;
4422 A_UINT32 no_ack;
4423} wmi_wmm_params;
4424
Govind Singh869c9872016-02-22 18:36:34 +05304425/* DEPRECATED - use VDEV level command instead
4426 * (wmi_vdev_set_wmm_params_cmd_fixed_param)
4427 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004428typedef struct {
4429 A_UINT32 tlv_header;
4430 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
4431 A_UINT32 reserved0;
4432 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
4433 A_UINT32 dg_type;
4434
4435 /* The TLVs for the 4 AC follows:
4436 * wmi_wmm_params wmm_params_ac_be;
4437 * wmi_wmm_params wmm_params_ac_bk;
4438 * wmi_wmm_params wmm_params_ac_vi;
4439 * wmi_wmm_params wmm_params_ac_vo;
4440 */
4441} wmi_pdev_set_wmm_params_cmd_fixed_param;
4442
4443typedef enum {
4444 WMI_REQUEST_PEER_STAT = 0x01,
4445 WMI_REQUEST_AP_STAT = 0x02,
4446 WMI_REQUEST_PDEV_STAT = 0x04,
4447 WMI_REQUEST_VDEV_STAT = 0x08,
4448 WMI_REQUEST_BCNFLT_STAT = 0x10,
4449 WMI_REQUEST_VDEV_RATE_STAT = 0x20,
Govind Singh32cced32016-02-01 13:33:09 +05304450 WMI_REQUEST_INST_STAT = 0x40,
Govind Singh45ef44a2016-02-01 17:45:22 +05304451 WMI_REQUEST_MIB_STAT = 0x80,
Himanshu Agarwal86319542016-05-24 09:00:39 +05304452 WMI_REQUEST_RSSI_PER_CHAIN_STAT = 0x100,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004453} wmi_stats_id;
4454
4455typedef struct {
4456 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
4457 wmi_stats_id stats_id;
4458 /** unique id identifying the VDEV, generated by the caller */
4459 A_UINT32 vdev_id;
4460 /** peer MAC address */
4461 wmi_mac_addr peer_macaddr;
4462} wmi_request_stats_cmd_fixed_param;
4463
4464/* stats type bitmap */
4465#define WMI_LINK_STATS_RADIO 0x00000001
4466#define WMI_LINK_STATS_IFACE 0x00000002
4467#define WMI_LINK_STATS_ALL_PEER 0x00000004
4468#define WMI_LINK_STATS_PER_PEER 0x00000008
4469
4470/* wifi clear statistics bitmap */
4471#define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
4472#define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
4473#define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
4474#define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
4475#define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
4476#define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
4477#define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
4478#define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
4479#define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */
4480#define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */
4481
4482/** Default value for stats if the stats collection has not started */
4483#define WMI_STATS_VALUE_INVALID 0xffffffff
4484
4485#define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16)
4486#define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value)
4487#define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1)
4488#define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value)
4489#define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
4490#define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
4491
4492typedef struct {
4493 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
4494 A_UINT32 num_of_diag_events_logs;
4495/* The TLVs will follow.
4496 * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
4497 * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
4498 * Bit 17 Indicate if the DIAG type is Enabled/Disabled.
4499 */
4500} wmi_diag_event_log_config_fixed_param;
4501
4502#define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
4503#define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
4504#define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1)
4505#define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
4506
4507typedef struct {
4508 A_UINT32 tlv_header;
4509 A_UINT32 num_of_diag_events_logs;
4510/* The TLVs will follow.
4511 * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
4512 * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
4513 * Bit 17 - Frequncy of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
4514 * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
4515 */
4516} wmi_diag_event_log_supported_event_fixed_params;
4517
4518typedef struct {
4519 /**
4520 * TLV tag and len; tag equals
4521 * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param
4522 */
4523 A_UINT32 tlv_header;
4524 /** placeholder for future */
4525 A_UINT32 reserved0;
4526} wmi_debug_mesg_flush_fixed_param;
4527
4528typedef struct {
4529 /**
4530 * TLV tag and len; tag equals
4531 * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param
4532 */
4533 A_UINT32 tlv_header;
4534 /** placeholder for future */
4535 A_UINT32 reserved0;
4536} wmi_debug_mesg_flush_complete_fixed_param;
4537
4538
4539typedef struct {
4540 /*
4541 * TLV tag and len; tag equals
4542 * WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param
4543 * vdev_id, where RSSI breach event occurred
4544 */
4545 A_UINT32 tlv_header;
4546 A_UINT32 vdev_id;
4547 /* request id */
4548 A_UINT32 request_id;
4549 /*
4550 * bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is
4551 * corresponding to hi_rssi[0-2]
4552 */
4553 A_UINT32 event_bitmap;
4554 /* rssi at the time of RSSI breach. Unit dBm */
4555 A_UINT32 rssi;
4556 /* bssid of the monitored AP's */
4557 wmi_mac_addr bssid;
4558} wmi_rssi_breach_event_fixed_param;
4559
4560
4561typedef struct {
4562 /** TLV tag and len; tag equals
4563 * WMITLV_TAG_STRUC_wmi_fw_mem_dump */
4564 A_UINT32 tlv_header;
4565 /** unique id identifying the segment */
4566 A_UINT32 seg_id;
4567 /** Start address of the segment to be read */
4568 A_UINT32 seg_start_addr_lo;
4569 A_UINT32 seg_start_addr_hi;
4570 /** Length of the segment to be read */
4571 A_UINT32 seg_length;
4572 /** Host bufeer address to which the segment will be read and dumped */
4573 A_UINT32 dest_addr_lo;
4574 A_UINT32 dest_addr_hi;
4575} wmi_fw_mem_dump;
4576
4577/* Command to get firmware memory dump*/
4578typedef struct {
4579 /** TLV tag and len; tag equals
4580 * WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
4581 A_UINT32 tlv_header;
4582 /** unique id identifying the request */
4583 A_UINT32 request_id;
4584 /** number of memory dump segments */
4585 A_UINT32 num_fw_mem_dump_segs;
4586 /**
4587 * This TLV is followed by another TLV
4588 * wmi_fw_mem_dump fw_mem_dump[];
4589 */
4590} wmi_get_fw_mem_dump_fixed_param;
4591
4592/** Event to indicate the completion of fw mem dump */
4593typedef struct {
4594 /* TLV tag and len; tag equals
4595 * WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
4596 A_UINT32 tlv_header;
4597 /** unique id identifying the request, given
4598 * in the request stats command */
4599 A_UINT32 request_id;
4600 /*In case of Firmware memory dump */
4601 A_UINT32 fw_mem_dump_complete;
4602} wmi_update_fw_mem_dump_fixed_param;
4603
4604typedef enum {
4605 WMI_ROAMING_IDLE = 0,
4606 WMI_ROAMING_ACTIVE = 1,
4607} wmi_roam_state;
4608
4609/* access categories */
4610typedef enum {
4611 WMI_AC_VO = 0,
4612 WMI_AC_VI = 1,
4613 WMI_AC_BE = 2,
4614 WMI_AC_BK = 3,
4615 WMI_AC_MAX = 4,
4616} wmi_traffic_ac;
4617
4618typedef enum {
4619 WMI_STA_STATS = 0,
4620 WMI_SOFTAP_STATS = 1,
4621 WMI_IBSS_STATS = 2,
4622 WMI_P2P_CLIENT_STATS = 3,
4623 WMI_P2P_GO_STATS = 4,
4624 WMI_NAN_STATS = 5,
4625 WMI_MESH_STATS = 6,
4626} wmi_link_iface_type;
4627
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004628/*Clear stats*/
4629typedef struct {
4630 A_UINT32 tlv_header;
4631 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
4632 /** unique id identifying the VDEV, generated by the caller */
4633 A_UINT32 vdev_id;
4634 /** stop_stats_collection_req = 1 will imply stop the statistics collection */
4635 A_UINT32 stop_stats_collection_req;
4636 /** identifies what stats to be cleared */
4637 A_UINT32 stats_clear_req_mask;
4638 /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
4639 wmi_mac_addr peer_macaddr;
4640} wmi_clear_link_stats_cmd_fixed_param;
4641
4642/* Link Stats configuration params. Trigger the link layer statistics collection*/
4643typedef struct {
4644 A_UINT32 tlv_header;
4645 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
4646 /** threshold to classify the pkts as short or long */
4647 A_UINT32 mpdu_size_threshold;
4648 /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
4649 A_UINT32 aggressive_statistics_gathering;
4650} wmi_start_link_stats_cmd_fixed_param;
4651
4652typedef struct {
4653 A_UINT32 tlv_header;
4654 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
4655 /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
4656 A_UINT32 stats_type;
4657 /** unique id identifying the VDEV, generated by the caller */
4658 A_UINT32 vdev_id;
4659 /** unique id identifying the request, generated by the caller */
4660 A_UINT32 request_id;
4661 /** peer MAC address */
4662 wmi_mac_addr peer_macaddr;
4663} wmi_request_link_stats_cmd_fixed_param;
4664
4665/* channel statistics */
4666typedef struct {
4667 A_UINT32 tlv_header;
4668 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
4669 /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
4670 A_UINT32 channel_width;
4671 /** Primary 20 MHz channel */
4672 A_UINT32 center_freq;
4673 /** center frequency (MHz) first segment */
4674 A_UINT32 center_freq0;
4675 /** center frequency (MHz) second segment */
4676 A_UINT32 center_freq1;
4677 /** msecs the radio is awake (32 bits number accruing over time) */
4678 A_UINT32 radio_awake_time;
4679 /** msecs the CCA register is busy (32 bits number accruing over time) */
4680 A_UINT32 cca_busy_time;
4681} wmi_channel_stats;
4682
Krishna Kumaar Natarajanee6cfa72016-03-25 14:05:03 -07004683/*
4684 * Each step represents 0.5 dB. The starting value is 0 dBm.
4685 * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps.
4686 */
4687#define MAX_TPC_LEVELS 64
4688
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004689/* radio statistics */
4690typedef struct {
4691 A_UINT32 tlv_header;
4692 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
4693 /** Wifi radio (if multiple radio supported) */
4694 A_UINT32 radio_id;
4695 /** msecs the radio is awake (32 bits number accruing over time) */
4696 A_UINT32 on_time;
4697 /** msecs the radio is transmitting (32 bits number accruing over time) */
4698 A_UINT32 tx_time;
4699 /** msecs the radio is in active receive (32 bits number accruing over time) */
4700 A_UINT32 rx_time;
4701 /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
4702 A_UINT32 on_time_scan;
4703 /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
4704 A_UINT32 on_time_nbd;
4705 /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
4706 A_UINT32 on_time_gscan;
4707 /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
4708 A_UINT32 on_time_roam_scan;
4709 /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
4710 A_UINT32 on_time_pno_scan;
4711 /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
4712 A_UINT32 on_time_hs20;
4713 /** number of channels */
4714 A_UINT32 num_channels;
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304715 /*
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304716 * tx time per TPC level - DEPRECATED
4717 * This field is deprecated.
4718 * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID
4719 * message.
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304720 */
Krishna Kumaar Natarajanee6cfa72016-03-25 14:05:03 -07004721 A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS];
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304722} wmi_radio_link_stats;
4723
4724/** tx time per power level statistics */
4725typedef struct {
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304726 /*
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304727 * TLV tag and len; tag equals
4728 * WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304729 */
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304730 A_UINT32 tlv_header;
4731 /* total number of tx power levels */
4732 A_UINT32 total_num_tx_power_levels;
4733 /* number of tx power levels that are carried in this event */
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304734 A_UINT32 num_tx_power_levels;
4735 /*
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304736 * offset of current stats
4737 * If ((num_tx_power_levels + power_level_offset)) ==
4738 * total_num_tx_power_levels)
4739 * this message completes the report of tx time per power levels.
4740 * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID
4741 * messages will be sent by the target to deliver the remainder of the
4742 * tx time per power level stats.
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304743 */
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304744 A_UINT32 power_level_offset;
4745 /*
4746 * This TLV will be followed by a TLV containing a variable-length
4747 * array of A_UINT32 with tx time per power level data
4748 * A_UINT32 tx_time_per_power_level[num_tx_power_levels]
4749 * The tx time is in units of milliseconds.
4750 * The power levels are board-specific values; a board-specific
4751 * translation has to be applied to determine what actual power
4752 * corresponds to each power level.
4753 * Just as the host has a BDF file available, the host should also have
4754 * a data file available that provides the power level to power
4755 * translations.
4756 */
4757} wmi_tx_power_level_stats_evt_fixed_param;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004758
4759/** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
4760typedef struct {
4761 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
4762 /** unique id identifying the request, given in the request stats command */
4763 A_UINT32 request_id;
4764 /** Number of radios*/
4765 A_UINT32 num_radio;
4766 /** more_data will be set depending on the number of radios */
4767 A_UINT32 more_radio_events;
4768/*
4769 * This TLV is followed by another TLV of array of bytes
4770 * size of(struct wmi_radio_link_stats);
4771 *
4772 * This TLV is followed by another TLV of array of bytes
4773 * num_channels * size of(struct wmi_channel_stats)
4774 */
4775
4776} wmi_radio_link_stats_event_fixed_param;
4777
4778/* per rate statistics */
4779typedef struct {
4780 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
4781 /** rate information
4782 * The rate-code is a 1-byte field in which:for given rate, nss and preamble
4783 * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
4784 * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
4785 * b'3-b'0 indicate the rate, which is indicated as follows:
4786 * OFDM : 0: OFDM 48 Mbps
4787 * 1: OFDM 24 Mbps
4788 * 2: OFDM 12 Mbps
4789 * 3: OFDM 6 Mbps
4790 * 4: OFDM 54 Mbps
4791 * 5: OFDM 36 Mbps
4792 * 6: OFDM 18 Mbps
4793 * 7: OFDM 9 Mbps
4794 * CCK (pream == 1)
4795 * 0: CCK 11 Mbps Long
4796 * 1: CCK 5.5 Mbps Long
4797 * 2: CCK 2 Mbps Long
4798 * 3: CCK 1 Mbps Long
4799 * 4: CCK 11 Mbps Short
4800 * 5: CCK 5.5 Mbps Short
4801 * 6: CCK 2 Mbps Short
4802 * HT/VHT (pream == 2/3)
4803 * 0..7: MCS0..MCS7 (HT)
4804 * 0..9: MCS0..MCS9 (VHT)
4805 */
4806 A_UINT32 rate;
4807 /** units of 100 Kbps */
4808 A_UINT32 bitrate;
4809 /** number of successfully transmitted data pkts (ACK rcvd) */
4810 A_UINT32 tx_mpdu;
4811 /** number of received data pkts */
4812 A_UINT32 rx_mpdu;
4813 /** number of data packet losses (no ACK) */
4814 A_UINT32 mpdu_lost;
4815 /** total number of data pkt retries */
4816 A_UINT32 retries;
4817 /** number of short data pkt retries */
4818 A_UINT32 retries_short;
4819 /** number of long data pkt retries */
4820 A_UINT32 retries_long;
4821} wmi_rate_stats;
4822
4823typedef struct {
4824 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
4825 /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
4826 A_UINT32 peer_type;
4827 /** mac address */
4828 wmi_mac_addr peer_mac_address;
4829 /** peer wmi_CAPABILITY_XXX */
4830 A_UINT32 capabilities;
4831 /** number of rates */
4832 A_UINT32 num_rates;
4833} wmi_peer_link_stats;
4834
4835/** PEER statistics (once started) reset and start afresh after each connection */
4836typedef struct {
4837 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
4838 /** unique id identifying the request, given in the request stats command */
4839 A_UINT32 request_id;
4840 /** number of peers accomidated in this particular event */
4841 A_UINT32 num_peers;
4842 /** Indicates the fragment number */
4843 A_UINT32 peer_event_number;
4844 /** Indicates if there are more peers which will be sent as seperate peer_stats event */
4845 A_UINT32 more_data;
4846
4847/**
4848 * This TLV is followed by another TLV
4849 * num_peers * size of(struct wmi_peer_stats)
4850 * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
4851 */
4852} wmi_peer_stats_event_fixed_param;
4853
4854/* per access category statistics */
4855typedef struct {
4856 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
4857 /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
4858 A_UINT32 ac_type;
4859 /** number of successfully transmitted unicast data pkts (ACK rcvd) */
4860 A_UINT32 tx_mpdu;
4861 /** number of received unicast mpdus */
4862 A_UINT32 rx_mpdu;
4863 /** number of succesfully transmitted multicast data packets */
4864 /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
4865 A_UINT32 tx_mcast;
4866 /** number of received multicast data packets */
4867 A_UINT32 rx_mcast;
4868 /** number of received unicast a-mpdus */
4869 A_UINT32 rx_ampdu;
4870 /** number of transmitted unicast a-mpdus */
4871 A_UINT32 tx_ampdu;
4872 /** number of data pkt losses (no ACK) */
4873 A_UINT32 mpdu_lost;
4874 /** total number of data pkt retries */
4875 A_UINT32 retries;
4876 /** number of short data pkt retries */
4877 A_UINT32 retries_short;
4878 /** number of long data pkt retries */
4879 A_UINT32 retries_long;
4880 /** data pkt min contention time (usecs) */
4881 A_UINT32 contention_time_min;
4882 /** data pkt max contention time (usecs) */
4883 A_UINT32 contention_time_max;
4884 /** data pkt avg contention time (usecs) */
4885 A_UINT32 contention_time_avg;
4886 /** num of data pkts used for contention statistics */
4887 A_UINT32 contention_num_samples;
4888} wmi_wmm_ac_stats;
4889
4890/* interface statistics */
4891typedef struct {
4892 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
4893 /** access point beacon received count from connected AP */
4894 A_UINT32 beacon_rx;
4895 /** access point mgmt frames received count from connected AP (including Beacon) */
4896 A_UINT32 mgmt_rx;
4897 /** action frames received count */
4898 A_UINT32 mgmt_action_rx;
4899 /** action frames transmit count */
4900 A_UINT32 mgmt_action_tx;
4901 /** access Point Beacon and Management frames RSSI (averaged) */
4902 A_UINT32 rssi_mgmt;
4903 /** access Point Data Frames RSSI (averaged) from connected AP */
4904 A_UINT32 rssi_data;
4905 /** access Point ACK RSSI (averaged) from connected AP */
4906 A_UINT32 rssi_ack;
4907 /** number of peers */
4908 A_UINT32 num_peers;
4909 /** Indicates how many peer_stats events will be sent depending on the num_peers. */
4910 A_UINT32 num_peer_events;
4911 /** number of ac */
4912 A_UINT32 num_ac;
4913 /** Roaming Stat */
4914 A_UINT32 roam_state;
4915 /**
4916 * Average Beacon spread offset is the averaged time delay between TBTT
4917 * and beacon TSF */
4918 /** Upper 32 bits of averaged 64 bit beacon spread offset */
4919 A_UINT32 avg_bcn_spread_offset_high;
4920 /** Lower 32 bits of averaged 64 bit beacon spread offset */
4921 A_UINT32 avg_bcn_spread_offset_low;
4922 /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
4923 A_UINT32 is_leaky_ap;
4924 /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
4925 A_UINT32 avg_rx_frms_leaked;
4926 /** Rx leak watch window currently in force to minimize data loss
4927 * because of leaky AP. Rx leak window is the
4928 * time driver waits before shutting down the radio or switching the
4929 * channel and after receiving an ACK for
4930 * a data frame with PM bit set) */
4931 A_UINT32 rx_leak_window;
4932} wmi_iface_link_stats;
4933
4934/** Interface statistics (once started) reset and start afresh after each connection */
4935typedef struct {
4936 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
4937 /** unique id identifying the request, given in the request stats command */
4938 A_UINT32 request_id;
4939 /** unique id identifying the VDEV, generated by the caller */
4940 A_UINT32 vdev_id;
4941/*
4942 * This TLV is followed by another TLV
4943 * wmi_iface_link_stats iface_link_stats;
4944 * num_ac * size of(struct wmi_wmm_ac_stats)
4945 */
4946} wmi_iface_link_stats_event_fixed_param;
4947
4948/** Suspend option */
4949enum {
4950 WMI_PDEV_SUSPEND, /* suspend */
4951 WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
4952};
4953
4954typedef struct {
4955 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */
4956 /* suspend option sent to target */
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05304957 /*
4958 * pdev_id for identifying the MAC, See macros
4959 * starting with WMI_PDEV_ID_ for values.
4960 */
4961 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004962 A_UINT32 suspend_opt;
4963} wmi_pdev_suspend_cmd_fixed_param;
4964
4965typedef struct {
4966 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 +05304967 /*
4968 * pdev_id for identifying the MAC, See macros
4969 * starting with WMI_PDEV_ID_ for values.
4970 */
4971 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004972} wmi_pdev_resume_cmd_fixed_param;
4973
4974typedef struct {
4975 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */
4976 A_UINT32 num_vdev_stats; /* number of vdevs */
4977} wmi_vdev_rate_stats_event_fixed_param;
4978
4979typedef struct {
4980 A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info */
4981 A_UINT32 vdevid; /* Id of the wlan vdev */
4982 A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted */
4983 A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above */
4984 A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
4985 A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
4986} wmi_vdev_rate_ht_info;
4987
4988typedef struct {
4989 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
4990 wmi_stats_id stats_id;
4991 /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
4992 A_UINT32 num_pdev_stats;
4993 /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */
4994 A_UINT32 num_vdev_stats;
4995 /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */
4996 A_UINT32 num_peer_stats;
4997 A_UINT32 num_bcnflt_stats;
4998 /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */
4999 A_UINT32 num_chan_stats;
Govind Singh45ef44a2016-02-01 17:45:22 +05305000 /** number of MIB stats event structures (wmi_mib_stats) */
5001 A_UINT32 num_mib_stats;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005002 /* This TLV is followed by another TLV of array of bytes
5003 * A_UINT8 data[];
5004 * This data array contains
5005 * num_pdev_stats * size of(struct wmi_pdev_stats)
5006 * num_vdev_stats * size of(struct wmi_vdev_stats)
5007 * num_peer_stats * size of(struct wmi_peer_stats)
5008 * num_bcnflt_stats * size_of()
5009 * num_chan_stats * size of(struct wmi_chan_stats)
Govind Singh45ef44a2016-02-01 17:45:22 +05305010 * num_mib_stats * size of(struct wmi_mib_stats)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005011 *
5012 */
5013} wmi_stats_event_fixed_param;
5014
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305015/* WLAN channel CCA stats bitmap */
5016#define WLAN_STATS_IDLE_TIME_SHIFT 0
5017#define WLAN_STATS_IDLE_TIME_TIME 0x00000001
5018
5019#define WLAN_STATS_TX_TIME_SHIFT 1
5020#define WLAN_STATS_TX_TIME_MASK 0x00000002
5021
5022#define WLAN_STATS_RX_IN_BSS_TIME_SHIFT 2
5023#define WLAN_STATS_RX_IN_BSS_TIME_MASK 0x00000004
5024
5025#define WLAN_STATS_RX_OUT_BSS_TIME_SHIFT 3
5026#define WLAN_STATS_RX_OUT_BSS_TIME_MASK 0x00000008
5027
5028#define WLAN_STATS_RX_BUSY_TIME_SHIFT 4
5029#define WLAN_STATS_RX_BUSY_TIME_MASK 0x00000010
5030
5031#define WLAN_STATS_RX_IN_BAD_COND_TIME_SHIFT 5
5032#define WLAN_STATS_RX_IN_BAD_COND_TIME_MASK 0x00000020
5033
5034#define WLAN_STATS_TX_IN_BAD_COND_TIME_SHIFT 6
5035#define WLAN_STATS_TX_IN_BAD_COND_TIME_MASK 0x00000040
5036
5037#define WLAN_STATS_WLAN_NOT_AVAIL_TIME_SHIFT 7
5038#define WLAN_STATS_WLAN_NOT_AVAIL_TIME_MASK 0x00000080
5039
5040/* WLAN peer signal stats bitmap */
5041#define WLAN_STATS_PER_ANT_SNR_SHIFT 0
5042#define WLAN_STATS_PER_ANT_SNR_MASK 0x00000001
5043
5044#define WLAN_STATS_NF_SHIFT 1
5045#define WLAN_STATS_NF_MASK 0x00000002
5046
5047/* WLAN TX stats bitmap */
5048#define WLAN_STATS_TX_MSDUS_SHIFT 0
5049#define WLAN_STATS_TX_MSDUS_MASK 0x00000001
5050
5051#define WLAN_STATS_TX_BYTES_SHIFT 1
5052#define WLAN_STATS_TX_BYTES_MASK 0x00000002
5053
5054#define WLAN_STATS_TX_MSDU_DROPS_SHIFT 2
5055#define WLAN_STATS_TX_MSDU_DROPS_MASK 0x00000004
5056
5057#define WLAN_STATS_TX_DROP_BYTES_SHIFT 3
5058#define WLAN_STATS_TX_DROP_BYTES_MASK 0x00000008
5059
5060#define WLAN_STATS_TX_MPDU_RETRIES_SHIFT 4
5061#define WLAN_STATS_TX_MPDU_RETRIES_MASK 0x00000010
5062
5063#define WLAN_STATS_TX_MSDU_FAILED_SHIFT 5
5064#define WLAN_STATS_TX_MSDU_FAILED_MASK 0x00000020
5065
5066#define WLAN_STATS_TX_MPDU_AGGR_SHIFT 6
5067#define WLAN_STATS_TX_MPDU_AGGR_MASK 0x00000040
5068
5069#define WLAN_STATS_TX_MSDU_ACKED_MCS_SHIFT 7
5070#define WLAN_STATS_TX_MSDU_ACKED_MCS_MASK 0x00000080
5071
5072#define WLAN_STATS_TX_MSDU_FAILED_MCS_SHIFT 8
5073#define WLAN_STATS_TX_MSDU_FAILED_MCS_MASK 0x00000100
5074
5075#define WLAN_STATS_TX_MSDU_DELAY_SHIFT 9
5076#define WLAN_STATS_TX_MSDU_DELAY_MASK 0x00000200
5077
5078/* WLAN RX stats bitmap */
5079#define WLAN_STATS_MAC_RX_MSDUS_SHIFT 0
5080#define WLAN_STATS_MAC_RX_MSDUS_MASK 0x00000001
5081
5082#define WLAN_STATS_MAC_RX_BYTES_SHIFT 1
5083#define WLAN_STATS_MAC_RX_BYTES_MASK 0x00000002
5084
5085#define WLAN_STATS_PHY_RX_MSDUS_SHIFT 2
5086#define WLAN_STATS_PHY_RX_MSDUS_MASK 0x00000004
5087
5088#define WLAN_STATS_PHY_RX_BYTES_SHIFT 3
5089#define WLAN_STATS_PHY_RX_BYTES_MASK 0x00000008
5090
5091#define WLAN_STATS_SEQ_DCONT_NUM_SHIFT 4
5092#define WLAN_STATS_SEQ_DCONT_NUM_MASK 0x00000010
5093
5094#define WLAN_STATS_RX_MSDU_RETRY_SHIFT 5
5095#define WLAN_STATS_RX_MSDU_RETRY_MASK 0x00000020
5096
5097#define WLAN_STATS_RX_MSDU_DUP_SHIFT 6
5098#define WLAN_STATS_RX_MSDU_DUP_MASK 0x00000040
5099
5100#define WLAN_STATS_RX_MSDU_DISCARD_SHIFT 7
5101#define WLAN_STATS_RX_MSDU_DISCARD_MASK 0x00000080
5102
5103#define WLAN_STATS_STA_PS_INDS_SHIFT 8
5104#define WLAN_STATS_STA_PS_INDS_MASK 0x00000100
5105
5106#define WLAN_STATS_STA_PS_DURS_SHIFT 9
5107#define WLAN_STATS_STA_PS_DURS_MASK 0x00000200
5108
5109#define WLAN_STATS_RX_PROBE_REQS_SHIFT 10
5110#define WLAN_STATS_RX_PROBE_REQS_MASK 0x00000400
5111
5112#define WLAN_STATS_RX_OTH_MGMTS_SHIFT 11
5113#define WLAN_STATS_RX_OTH_MGMTS_MASK 0x00000800
5114
5115#define WLAN_STATS_RX_MPDU_AGGR_SHIFT 12
5116#define WLAN_STATS_RX_MPDU_AGGR_MASK 0x00001000
5117
5118#define WLAN_STATS_RX_MSDU_MCS_SHIFT 13
5119#define WLAN_STATS_RX_MSDU_MCS_MASK 0x00002000
5120
5121typedef struct {
5122 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats */
5123 A_UINT32 vdev_id;
5124 /** Percentage of idle time, no TX, no RX, no interference */
5125 A_UINT32 idle_time;
5126 /** Percentage of time transmitting packets */
5127 A_UINT32 tx_time;
5128 /** Percentage of time receiving packets in current BSSs */
5129 A_UINT32 rx_in_bss_time;
5130 /** Percentage of time receiving packets not in current BSSs */
5131 A_UINT32 rx_out_bss_time;
5132 /** Percentage of time interference detected. */
5133 A_UINT32 rx_busy_time;
5134 /** Percentage of time receiving packets with errors
5135 * or packets flagged as retransmission or seqnum discontinued. */
5136 A_UINT32 rx_in_bad_cond_time;
5137 /** Percentage of time the device transmitted packets that haven't been ACKed. */
5138 A_UINT32 tx_in_bad_cond_time;
5139 /** Percentage of time the chip is unable to work in normal conditions. */
5140 A_UINT32 wlan_not_avail_time;
5141} wmi_chan_cca_stats;
5142
5143/** Thresholds of cca stats, stands for percentages of stats variation.
5144 * Check wmi_chan_cca_stats for each stats's meaning.
5145 */
5146typedef struct {
5147 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_cca_stats_thresh */
5148 A_UINT32 idle_time; /* units = percent */
5149 A_UINT32 tx_time; /* units = percent */
5150 A_UINT32 rx_in_bss_time; /* units = percent */
5151 A_UINT32 rx_out_bss_time; /* units = percent */
5152 A_UINT32 rx_busy_time; /* units = percent */
5153 A_UINT32 rx_in_bad_cond_time; /* units = percent */
5154 A_UINT32 tx_in_bad_cond_time; /* units = percent */
5155 A_UINT32 wlan_not_avail_time; /* units = percent */
5156} wmi_chan_cca_stats_thresh;
5157
5158typedef struct {
5159 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_signal_stats */
5160 A_UINT32 vdev_id;
5161 A_UINT32 peer_id;
5162 /** per antenna SNR in current bss, units are dB */
5163 A_INT32 per_ant_snr[WMI_MAX_CHAINS];
5164 /** Background noise, units are dBm */
5165 A_INT32 nf;
5166} wmi_peer_signal_stats;
5167
5168/** Thresholds of signal stats, stand for percentage of stats variation.
5169 * Check wmi_peer_signal_stats for each stats's meaning.
5170 */
5171typedef struct {
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +05305172 /**
5173 * TLV tag and len; tag equals
5174 * WMITLV_TAG_STRUC_wmi_peer_signal_stats_thresh
5175 */
5176 A_UINT32 tlv_header;
Manjeet Singh27aa9c12016-08-24 15:38:42 +05305177 A_UINT32 per_ant_snr; /* units = dB */
5178 A_UINT32 nf; /* units = dBm */
5179} wmi_peer_signal_stats_thresh;
5180
5181typedef struct {
5182 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats */
5183 /** Number of total TX packets on MAC layer in the period */
5184 A_UINT32 tx_msdus;
5185 /** Bytes of tx data on MAC layer in the period */
5186 A_UINT32 tx_bytes;
5187 /** Number of TX packets cancelled due to any reason in the period,
5188 * such as WMM limitation/bandwidth limitation/radio congestion */
5189 A_UINT32 tx_msdu_drops;
5190 /** Bytes of dropped TX packets in the period */
5191 A_UINT32 tx_drop_bytes;
5192 /** Number of unacked transmissions of MPDUs */
5193 A_UINT32 tx_mpdu_retries;
5194 /** Number of packets have not been ACKed despite retried */
5195 A_UINT32 tx_msdu_failed;
5196 /* This TLV is followed by TLVs below: :
5197 * A_UINT32 tx_mpdu_aggr[tx_mpdu_aggr_array_size];
5198 * A_UINT32 tx_msdu_acked_mcs[tx_msdu_acked_mcs_array_size];
5199 * A_UINT32 tx_msdu_failed_mcs[tx_msdu_failed_mcs_array_size];
5200 * A_UINT32 tx_msdu_delay[tx_msdu_delay_array_size];
5201 */
5202} wmi_tx_stats;
5203
5204/** Thresholds of tx stats, stand for percentage of stats variation.
5205 * Check wmi_tx_stats for each stats's meaning.
5206 */
5207typedef struct {
5208 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_stats_thresh */
5209 A_UINT32 tx_msdus;
5210 A_UINT32 tx_bytes;
5211 A_UINT32 tx_msdu_drops;
5212 A_UINT32 tx_drop_bytes;
5213 A_UINT32 tx_mpdu_retries;
5214 A_UINT32 tx_msdu_failed;
5215 A_UINT32 tx_mpdu_aggr;
5216 A_UINT32 tx_msdu_acked_mcs;
5217 A_UINT32 tx_msdu_failed_mcs;
5218 A_UINT32 tx_msdu_delay;
5219} wmi_tx_stats_thresh;
5220
5221typedef struct {
5222 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_tx_stats */
5223 A_UINT32 vdev_id;
5224 A_UINT32 peer_id;
5225 /* The TLVs for the 4 AC follows:
5226 * wmi_tx_stats tx_stats[]; wmi_tx_stats for BE/BK/VI/VO
5227 */
5228} wmi_peer_ac_tx_stats;
5229
5230typedef struct {
5231 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats */
5232 A_UINT32 tlv_header;
5233 /** Number of RX packets on MAC layer */
5234 A_UINT32 mac_rx_msdus;
5235 /** Bytes of RX packets on MAC layer */
5236 A_UINT32 mac_rx_bytes;
5237 /** Number of RX packets on PHY layer */
5238 A_UINT32 phy_rx_msdus;
5239 /** Bytes of RX packets on PHY layer */
5240 A_UINT32 phy_rx_bytes;
5241 /** Number of discontinuity in seqnum */
5242 A_UINT32 seq_dcont_num;
5243 /** Number of RX packets flagged as retransmissions */
5244 A_UINT32 rx_msdu_retry;
5245 /** Number of RX packets identified as duplicates */
5246 A_UINT32 rx_msdu_dup;
5247 /** Number of RX packets discarded */
5248 A_UINT32 rx_msdu_discard;
5249 /** How many times STAs go to sleep */
5250 A_UINT32 sta_ps_inds;
5251 /** Total sleep time of STAs, milliseconds units */
5252 A_UINT32 sta_ps_durs;
5253 /** Number of probe requests received */
5254 A_UINT32 rx_probe_reqs;
5255 /** Number of other management frames received, not including probe requests */
5256 A_UINT32 rx_oth_mgmts;
5257 /* This TLV is followed by TLVs below:
5258 * A_UINT32 rx_mpdu_aggr[rx_mpdu_aggr_array_size];
5259 * A_UINT32 rx_msdu_mcs[rx_msdu_mcs_array_size];
5260 */
5261} wmi_rx_stats;
5262
5263/** Thresholds of rx stats, stands for percentage of stats variation.
5264 * Check wmi_rx_stats for each stats's meaning.
5265 */
5266typedef struct {
5267 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rx_stats_thresh */
5268 A_UINT32 tlv_header;
5269 A_UINT32 mac_rx_msdus;
5270 A_UINT32 mac_rx_bytes;
5271 A_UINT32 phy_rx_msdus;
5272 A_UINT32 phy_rx_bytes;
5273 A_UINT32 seq_dcont_num;
5274 A_UINT32 rx_msdu_retry;
5275 A_UINT32 rx_msdu_dup;
5276 A_UINT32 rx_msdu_discard;
5277 A_UINT32 sta_ps_inds;
5278 A_UINT32 sta_ps_durs;
5279 A_UINT32 rx_probe_reqs;
5280 A_UINT32 rx_oth_mgmts;
5281 A_UINT32 rx_mpdu_aggr;
5282 A_UINT32 rx_msdu_mcs;
5283} wmi_rx_stats_thresh;
5284
5285typedef struct {
5286 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_ac_rx_stats */
5287 A_UINT32 tlv_header;
5288 A_UINT32 vdev_id;
5289 A_UINT32 peer_id;
5290 /* The TLVs for the 4 AC follows:
5291 * wmi_rx_stats rx_stats[]; wmi_rx_stats for BE/BK/VI/VO
5292 */
5293} wmi_peer_ac_rx_stats;
5294
5295typedef enum {
5296 /** Periodic timer timed out, based on the period specified
5297 * by WMI_PDEV_PARAM_STATS_OBSERVATION_PERIOD
5298 */
5299 TRIGGER_COND_ID_TIMER_TIMED_OUT = 0x1,
5300 /** Any of the (enabled) stats thresholds specified
5301 * in the WMI_PDEV_SET_STATS_THRESHOLD_CMD message is exceeded
5302 * within the current stats period.
5303 */
5304 TRIGGER_COND_ID_THRESH_EXCEEDED = 0x2,
5305 /** In Response to the one-time wlan stats request of
5306 * WMI_REQUEST_WLAN_STATS_CMDID from host.
5307 */
5308 TRIGGER_COND_ID_ONE_TIME_REQUEST = 0x3,
5309} wmi_report_stats_event_trigger_cond_id;
5310
5311typedef struct {
5312 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_report_stats_event_fixed_param */
5313 /** Indicate what triggered this event, check wmi_report_stats_event_trigger_cond_id for details */
5314 A_UINT32 trigger_cond_id;
5315 /** Bitmap to indicate changed channel CCA stats which exceeded the thresholds */
5316 A_UINT32 cca_chgd_bitmap;
5317 /** Bitmap to indicate changed peer signal stats which exceeded the thresholds */
5318 A_UINT32 sig_chgd_bitmap;
5319 /** Bitmap to indicate changed TX counters which exceeded the thresholds */
5320 A_UINT32 tx_chgd_bitmap;
5321 /** Bitmap to indicate changed RX counters which exceeded the thresholds */
5322 A_UINT32 rx_chgd_bitmap;
5323 /** number of per channel CCA stats structures (wmi_chan_cca_stats), 0 to max vdevs*/
5324 A_UINT32 num_chan_cca_stats;
5325 /** number of per peer signal stats structures (wmi_peer_signal_stats), 0 to max peers*/
5326 A_UINT32 num_peer_signal_stats;
5327 /** number of per peer ac TX stats structures (wmi_peer_ac_tx_stats), 0 to max peers*/
5328 A_UINT32 num_peer_ac_tx_stats;
5329 /** Array size of tx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
5330 * The array indicates number of MPDUs sent on specified aggregation size
5331 * (per number of MPDUs per AMPDUs / 1 to 7 and 8+).
5332 * Array size can be set per WMI_PDEV_PARAM_TX_MPDU_AGGR_ARRAY_SIZE */
5333 A_UINT32 tx_mpdu_aggr_array_size;
5334 /** Array size of tx_msdu_acked_mcs[] which is histogram of encoding rate.
5335 * The array indicates number of acked packets sent at a specific rate */
5336 A_UINT32 tx_msdu_acked_mcs_array_size;
5337 /** Array size of tx_msdu_failed_mcs[] which is histogram of encoding rate.
5338 * The array indicates number of failed packets sent at a specific rate */
5339 A_UINT32 tx_msdu_failed_mcs_array_size;
5340 /** tx_msdu_delay[]is a histogram of delays on MAC layer.
5341 * The array stands for numbers of packets on different TX time delays.
5342 * TX delay here means time interval between the time the packet has been received
5343 * at the MAC layer and the time lower layers returns a tx status (<10ms to >100ms)
5344 *
5345 * The bin size tx_delay_bin_size_ms specifies how many milliseconds
5346 * each bin of the tx_delay histogram represents.
5347 * By default the bin size is 10ms.
5348 * tx_msdu_delay[0] -> delays between 0-9 ms
5349 * tx_msdu_delay[1] -> delays between 10-19 ms
5350 * ...
5351 * tx_msdu_delay[9] -> delays between 90-99 ms
5352 * tx_msdu_delay[10] -> delays >= 100 ms
5353 * Bin size can be set per WMI_PDEV_PARAM_TX_DELAY_BIN_SIZE_MS.
5354 */
5355 A_UINT32 tx_msdu_delay_bin_size_ms;
5356 /** Array size of tx_msdu_delay[]. It can be set per WMI_PDEV_PARAM_TX_DELAY_ARRAY_SIZE */
5357 A_UINT32 tx_msdu_delay_array_size;
5358 /** number of per peer ac RX stats structures (wmi_peer_ac_rx_stats), 0 to max peers*/
5359 A_UINT32 num_peer_ac_rx_stats;
5360 /** Array size of rx_mpdu_aggr[] which is histogram of MPDU aggregation size(1 to 7 and 8+).
5361 * It can be set per WMI_PDEV_PARAM_RX_MPDU_AGGR_ARRAY_SIZE */
5362 A_UINT32 rx_mpdu_aggr_array_size;
5363 /** Array size of rx_msdu_mcs[] which is histogram of encoding rate.
5364 * The array indicates number of packets received at a specific rate */
5365 A_UINT32 rx_msdu_mcs_array_size;
5366
5367 /**
5368 * This TLV is followed by TLVs below:
5369 * wmi_chan_cca_stats chan_cca_stats[]; Array size is specified by num_chan_cca_stats
5370 * wmi_peer_signal_stats peer_signal_stats[]; Array size is specified by num_peer_signal_stats
5371 * wmi_peer_ac_tx_stats peer_ac_tx_stats[]; Array size is specified by num_peer_ac_tx_stats
5372 * wmi_tx_stats tx_stats[][]; Array size is num_peer_ac_tx_stats * WLAN_MAX_AC, array index is (peer_index * WLAN_MAX_AC + ac_index)
5373 * A_UINT32 tx_mpdu_aggr[][][]; Array size is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_mpdu_aggr_array_size,
5374 * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_mpdu_aggr_array_size + A-MPDU aggregation index
5375 * A_UINT32 tx_msdu_acked_mcs[][][]; Array size is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_msdu_acked_mcs_array_size,
5376 * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_msdu_acked_mcs_array_size + MCS index
5377 * A_UINT32 tx_msdu_failed_mcs[][][]; Array size is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_msdu_failed_mcs_array_size,
5378 * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_msdu_failed_mcs_array_size + MCS index
5379 * A_UINT32 tx_msdu_delay[][][]; Array size is num_peer_ac_tx_stats * WLAN_MAX_AC * tx_msdu_delay_array_size,
5380 * array index is (peer_index * WLAN_MAX_AC + ac_index) * tx_msdu_delay_array_size + tx delay index
5381 * wmi_peer_ac_rx_stats peer_ac_rx_stats[]; Array size is specified by num_peer_ac_rx_stats
5382 * wmi_rx_stats rx_stats[][]; Array size is num_peer_ac_rx_stats * WLAN_MAX_AC, array index is (peer_index * WLAN_MAX_AC + ac_index)
5383 * A_UINT32 rx_mpdu_aggr[][][]; Array size is num_peer_ac_rx_stats * WLAN_MAX_AC * rx_mpdu_aggr_array_size,
5384 * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_mpdu_aggr_array_size + A-MPDU aggregation index
5385 * A_UINT32 rx_msdu_mcs[][][]; Array size is (num_peer_ac_rx_stats * WLAN_MAX_AC) * rx_msdu_mcs_array_size,
5386 * array index is (peer_index * WLAN_MAX_AC + ac_index) * rx_msdu_mcs_array_size + MCS index
5387 **/
5388} wmi_report_stats_event_fixed_param;
5389
5390
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005391/**
5392 * PDEV statistics
5393 * @todo
5394 * add all PDEV stats here
5395 */
5396typedef struct {
5397 /** Channel noise floor */
5398 A_INT32 chan_nf;
5399 /** TX frame count */
5400 A_UINT32 tx_frame_count;
5401 /** RX frame count */
5402 A_UINT32 rx_frame_count;
5403 /** rx clear count */
5404 A_UINT32 rx_clear_count;
5405 /** cycle count */
5406 A_UINT32 cycle_count;
5407 /** Phy error count */
5408 A_UINT32 phy_err_count;
5409 /** Channel Tx Power */
5410 A_UINT32 chan_tx_pwr;
5411 /** WAL dbg stats */
5412 struct wlan_dbg_stats pdev_stats;
5413
5414} wmi_pdev_stats;
5415
5416/**
5417 * VDEV statistics
5418 * @todo
5419 * add all VDEV stats here
5420 */
5421
5422typedef struct {
5423 A_INT32 bcn_snr;
5424 A_INT32 dat_snr;
5425} wmi_snr_info;
5426
5427typedef struct {
5428 /** unique id identifying the VDEV, generated by the caller */
5429 A_UINT32 vdev_id;
5430 wmi_snr_info vdev_snr;
5431 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) */
5432 A_UINT32 rx_frm_cnt; /* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast) */
5433 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 +05305434 that the 802.11 station successfully transmitted after more than one retransmission attempt */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005435 A_UINT32 fail_cnt[WLAN_MAX_AC]; /*Total number packets(per AC) failed to transmit */
5436 A_UINT32 rts_fail_cnt; /*Total number of RTS/CTS sequence failures for transmission of a packet */
5437 A_UINT32 rts_succ_cnt; /*Total number of RTS/CTS sequence success for transmission of a packet */
5438 A_UINT32 rx_err_cnt; /*The receive error count. HAL will provide the RxP FCS error global */
5439 A_UINT32 rx_discard_cnt; /* The sum of the receive error count and dropped-receive-buffer error count. (FCS error) */
5440 A_UINT32 ack_fail_cnt; /*Total number packets failed transmit because of no ACK from the remote entity */
5441 A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES]; /*History of last ten transmit rate, in units of 500 kbit/sec */
5442 A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES]; /*History of last ten Beacon rssi of the connected Bss */
5443} wmi_vdev_stats;
5444
5445/**
5446 * peer statistics.
5447 *
5448 * @todo
5449 * add more stats
5450 *
5451 */
5452typedef struct {
5453 /** peer MAC address */
5454 wmi_mac_addr peer_macaddr;
5455 /** rssi */
5456 A_UINT32 peer_rssi;
5457 /** last tx data rate used for peer */
5458 A_UINT32 peer_tx_rate;
5459 /** last rx data rate used for peer */
5460 A_UINT32 peer_rx_rate;
5461} wmi_peer_stats;
5462
5463typedef struct {
5464 /** Primary channel freq of the channel for which stats are sent */
5465 A_UINT32 chan_mhz;
5466 /** Time spent on the channel */
5467 A_UINT32 sampling_period_us;
5468 /** Aggregate duration over a sampling period for which channel activity was observed */
5469 A_UINT32 rx_clear_count;
5470 /** Accumalation of the TX PPDU duration over a sampling period */
5471 A_UINT32 tx_duration_us;
5472 /** Accumalation of the RX PPDU duration over a sampling period */
5473 A_UINT32 rx_duration_us;
5474} wmi_chan_stats;
5475
5476typedef struct {
Govind Singh45ef44a2016-02-01 17:45:22 +05305477 A_UINT32 tx_mpdu_grp_frag_cnt; /*dot11TransmittedFragmentCount */
5478 A_UINT32 tx_msdu_grp_frm_cnt; /*dot11GroupTransmittedFrameCount */
5479 A_UINT32 tx_msdu_fail_cnt; /*dot11FailedCount*/
5480 A_UINT32 rx_mpdu_frag_cnt; /*dot11ReceivedFragmentCount*/
5481 A_UINT32 rx_msdu_grp_frm_cnt; /*dot11GroupReceivedFrameCount*/
5482 A_UINT32 rx_mpdu_fcs_err; /*dot11FCSErrorCount*/
5483 A_UINT32 tx_msdu_frm_cnt; /*dot11TransmittedFrameCount*/
5484 A_UINT32 tx_msdu_retry_cnt; /*dot11RetryCount*/
5485 A_UINT32 rx_frm_dup_cnt; /*dot11FrameDuplicateCount */
5486 A_UINT32 tx_rts_success_cnt; /*dot11RTSSuccessCount*/
5487 A_UINT32 tx_rts_fail_cnt; /*dot11RTSFailureCount*/
5488 /*dot11QosTransmittedFragmentCount */
5489 A_UINT32 tx_Qos_mpdu_grp_frag_cnt;
5490 A_UINT32 tx_Qos_msdu_fail_UP; /*dot11QosFailedCount */
5491 A_UINT32 tx_Qos_msdu_retry_UP; /*dot11QosRetryCount */
5492 A_UINT32 rx_Qos_frm_dup_cnt_UP; /*dot11QosFrameDuplicateCount*/
5493 A_UINT32 tx_Qos_rts_success_cnt_UP; /*dot11QosRTSSuccessCount*/
5494 A_UINT32 tx_Qos_rts_fail_cnt_UP; /*dot11QosRTSFailureCount*/
5495 A_UINT32 rx_Qos_mpdu_frag_cnt_UP; /*dot11QosReceivedFragmentCount*/
5496 A_UINT32 tx_Qos_msdu_frm_cnt_UP; /*dot11QosTransmittedFrameCount*/
5497 A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/
5498 A_UINT32 rx_Qos_mpdu_cnt; /*dot11QosMPDUsReceivedCount*/
5499 A_UINT32 rx_Qos_mpdu_retryBit_cnt; /*dot11QosRetriesReceivedCount*/
5500 /*dot11RSNAStatsRobustMgmtCCMPReplays */
5501 A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt;
5502 A_UINT32 rsna_TKIP_icv_err_cnt; /*dot11RSNAStatsTKIPICVErrors*/
5503 A_UINT32 rsna_TKIP_replay_err_cnt; /*dot11RSNAStatsTKIPReplays*/
5504 /*dot11RSNAStatsCCMPDecryptErrors */
5505 A_UINT32 rsna_CCMP_decrypt_err_cnt;
5506 A_UINT32 rsna_CCMP_replay_err_cnt; /*dot11RSNAStatsCCMPReplays*/
5507 A_UINT32 tx_ampdu_cnt; /*dot11TransmittedAMPDUCount*/
5508 /*dot11TransmittedMPDUsInAMPDUCount*/
5509 A_UINT32 tx_mpdu_cnt_in_ampdu;
5510 /*dot11TransmittedOctetsInAMPDUCount*/
5511 union {
5512 A_UINT64 counter; /* for use by target only */
5513 struct {
5514 A_UINT32 low;
5515 A_UINT32 high;
5516 } upload; /* for use by host */
5517 } tx_octets_in_ampdu;
5518 A_UINT32 rx_ampdu_cnt; /*dot11AMPDUReceivedCount*/
5519 A_UINT32 rx_mpdu_cnt_in_ampdu; /*dot11MPDUInReceivedAMPDUCount*/
5520 union {
5521 A_UINT64 counter; /* for use by target only */
5522 struct {
5523 A_UINT32 rx_octets_in_ampdu_low;
5524 A_UINT32 rx_octets_in_ampdu_high;
5525 } upload; /* for use by host */
5526 } rx_octets_in_ampdu; /*dot11ReceivedOctetsInAMPDUCount*/
5527 A_UINT32 reserved_1;
5528 A_UINT32 reserved_2;
5529 A_UINT32 reserved_3;
5530 A_UINT32 reserved_4;
5531} wmi_mib_stats;
5532
5533typedef struct {
Himanshu Agarwal86319542016-05-24 09:00:39 +05305534 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_stats */
5535 A_UINT32 tlv_header;
5536 A_UINT32 vdev_id;
Himanshu Agarwal29061322016-05-27 14:09:27 +05305537 A_INT32 rssi_avg_beacon[WMI_MAX_CHAINS];
5538 A_INT32 rssi_avg_data[WMI_MAX_CHAINS];
Himanshu Agarwal86319542016-05-24 09:00:39 +05305539 wmi_mac_addr peer_macaddr;
5540} wmi_rssi_stats;
5541
5542typedef struct {
5543 /*
5544 * TLV tag and len; tag equals
5545 * WMITLV_TAG_STRUC_wmi_per_chain_rssi_stats
5546 */
5547 A_UINT32 tlv_header;
5548 A_UINT32 num_per_chain_rssi_stats;
5549 /*
5550 * This TLV is followed by another TLV of array of structs:
5551 * wmi_rssi_stats rssi_stats[num_per_chain_rssi_stats];
5552 */
5553} wmi_per_chain_rssi_stats;
5554
5555typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005556 A_UINT32 tlv_header;
5557 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
5558 /** unique id identifying the VDEV, generated by the caller */
5559 A_UINT32 vdev_id;
5560 /** VDEV type (AP,STA,IBSS,MONITOR) */
5561 A_UINT32 vdev_type;
5562 /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0)*/
5563 A_UINT32 vdev_subtype;
5564 /** VDEV MAC address */
5565 wmi_mac_addr vdev_macaddr;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05305566 /** Number of configured txrx streams */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005567 A_UINT32 num_cfg_txrx_streams;
5568 /*
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05305569 * pdev_id for identifying the MAC,
5570 * See macros starting with WMI_PDEV_ID_ for values.
5571 */
5572 A_UINT32 pdev_id;
5573 /*
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005574 * This TLV is followed by another TLV of array of structures
5575 * wmi_vdev_txrx_streams cfg_txrx_streams[];
5576 */
5577} wmi_vdev_create_cmd_fixed_param;
5578
5579typedef struct {
5580 /*
5581 * TLV tag and len; tag equals
5582 * WMITLV_TAG_STRUC_wmi_vdev_txrx_streams
5583 */
5584 A_UINT32 tlv_header;
5585 /* band - Should take values from wmi_channel_band_mask */
5586 A_UINT32 band;
5587 /* max supported tx streams per given band for this vdev */
5588 A_UINT32 supported_tx_streams;
5589 /* max supported rx streams per given band for this vdev */
5590 A_UINT32 supported_rx_streams;
5591} wmi_vdev_txrx_streams;
5592
5593/* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
5594typedef struct {
5595 A_UINT32 tlv_header;
5596 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
5597 A_UINT32 type_count;
5598 /** 255: continuous schedule, 0: reserved */
5599 A_UINT32 duration;
5600 /** Absent period duration in micro seconds */
5601 A_UINT32 interval;
5602 /** Absent period interval in micro seconds */
5603 A_UINT32 start_time;
5604 /** 32 bit tsf time when in starts */
5605} wmi_p2p_noa_descriptor;
5606
5607/** values for vdev_type */
5608#define WMI_VDEV_TYPE_AP 0x1
5609#define WMI_VDEV_TYPE_STA 0x2
5610#define WMI_VDEV_TYPE_IBSS 0x3
5611#define WMI_VDEV_TYPE_MONITOR 0x4
5612
5613/** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
5614 * by FW to execute the NAN specific WMI commands and also implement NAN specific
5615 * operations like Network discovery, service provisioning and service
5616 * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create
5617 * WMI command to create this VDEV once during initialization and host is not
5618 * expected to use any VDEV specific WMI commands on this VDEV.
5619 **/
5620#define WMI_VDEV_TYPE_NAN 0x5
5621
5622#define WMI_VDEV_TYPE_OCB 0x6
5623
Govind Singh941bd5e2016-02-04 17:15:25 +05305624/* NAN Data Interface */
5625#define WMI_VDEV_TYPE_NDI 0x7
5626
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005627/** values for vdev_subtype */
5628#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
5629#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
5630#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3
Govind Singh32cced32016-02-01 13:33:09 +05305631#define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA 0x4
5632#define WMI_UNIFIED_VDEV_SUBTYPE_MESH 0x5
Sandeep Puligilla62f7ca02016-03-24 15:48:33 -07005633/*
5634 * new subtype for 11S mesh is required as 11S functionality differs
5635 * in many ways from proprietary mesh
5636 * 11S uses 6-addr frame format and supports peering between mesh
5637 * stations and dynamic best path selection between mesh stations.
5638 * While in proprietary mesh, neighboring mesh station MAC is manually
5639 * added to AST table for traffic flow between mesh stations
5640 */
5641#define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S 0x6
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005642
5643/** values for vdev_start_request flags */
5644/** Indicates that AP VDEV uses hidden ssid. only valid for
5645 * AP/GO */
5646#define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0)
5647/** Indicates if robust management frame/management frame
5648 * protection is enabled. For GO/AP vdevs, it indicates that
5649 * it may support station/client associations with RMF enabled.
5650 * For STA/client vdevs, it indicates that sta will
5651 * associate with AP with RMF enabled. */
5652#define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1)
5653
5654/*
5655 * Host is sending bcn_tx_rate to override the beacon tx rates.
5656 */
5657#define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
5658
5659typedef struct {
5660 A_UINT32 tlv_header;
5661 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
5662 /** unique id identifying the VDEV, generated by the caller */
5663 A_UINT32 vdev_id;
5664 /** requestor id identifying the caller module */
5665 A_UINT32 requestor_id;
5666 /** beacon interval from received beacon */
5667 A_UINT32 beacon_interval;
5668 /** DTIM Period from the received beacon */
5669 A_UINT32 dtim_period;
5670 /** Flags */
5671 A_UINT32 flags;
5672 /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
5673 wmi_ssid ssid;
5674 /** beacon/probe reponse xmit rate. Applicable for SoftAP. */
5675 /** This field will be invalid and ignored unless the */
5676 /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
5677 /** When valid, this field contains the fixed tx rate for the beacon */
5678 /** and probe response frames send by the GO or SoftAP */
5679 A_UINT32 bcn_tx_rate;
5680 /** beacon/probe reponse xmit power. Applicable for SoftAP. */
5681 A_UINT32 bcn_txPower;
5682 /** number of p2p NOA descriptor(s) from scan entry */
5683 A_UINT32 num_noa_descriptors;
5684 /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
5685 During CAC, Our HW shouldn't ack ditected frames */
5686 A_UINT32 disable_hw_ack;
5687 /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
5688 /** The DBS policy manager indicates the preferred number of transmit streams. */
5689 A_UINT32 preferred_tx_streams;
5690 /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
5691 /** the DBS policy manager indicates the preferred number of receive streams. */
5692 A_UINT32 preferred_rx_streams;
5693 /* The TLVs follows this structure:
5694 * wmi_channel chan; //WMI channel
5695 * wmi_p2p_noa_descriptor noa_descriptors[]; //actual p2p NOA descriptor from scan entry
5696 */
5697} wmi_vdev_start_request_cmd_fixed_param;
5698
5699typedef struct {
5700 A_UINT32 tlv_header;
5701 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
5702 /** unique id identifying the VDEV, generated by the caller */
5703 A_UINT32 vdev_id;
5704} wmi_vdev_delete_cmd_fixed_param;
5705
5706typedef struct {
5707 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
5708 /** unique id identifying the VDEV, generated by the caller */
5709 A_UINT32 vdev_id;
5710 /** aid (assoc id) received in association response for STA VDEV */
5711 A_UINT32 vdev_assoc_id;
5712 /** bssid of the BSS the VDEV is joining */
5713 wmi_mac_addr vdev_bssid;
5714} wmi_vdev_up_cmd_fixed_param;
5715
5716typedef struct {
5717 A_UINT32 tlv_header;
5718 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
5719 /** unique id identifying the VDEV, generated by the caller */
5720 A_UINT32 vdev_id;
5721} wmi_vdev_stop_cmd_fixed_param;
5722
5723typedef struct {
5724 A_UINT32 tlv_header;
5725 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
5726 /** unique id identifying the VDEV, generated by the caller */
5727 A_UINT32 vdev_id;
5728} wmi_vdev_down_cmd_fixed_param;
5729
5730typedef struct {
5731 /** unique id identifying the VDEV, generated by the caller */
5732 A_UINT32 vdev_id;
5733} wmi_vdev_standby_response_cmd;
5734
5735typedef struct {
5736 /** unique id identifying the VDEV, generated by the caller */
5737 A_UINT32 vdev_id;
5738} wmi_vdev_resume_response_cmd;
5739
5740typedef struct {
5741 A_UINT32 tlv_header;
5742 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
5743 /** unique id identifying the VDEV, generated by the caller */
5744 A_UINT32 vdev_id;
5745 /** parameter id */
5746 A_UINT32 param_id;
5747 /** parameter value */
5748 A_UINT32 param_value;
5749} wmi_vdev_set_param_cmd_fixed_param;
5750
5751typedef struct {
5752 A_UINT32 key_seq_counter_l;
5753 A_UINT32 key_seq_counter_h;
5754} wmi_key_seq_counter;
5755
5756#define WMI_CIPHER_NONE 0x0 /* clear key */
5757#define WMI_CIPHER_WEP 0x1
5758#define WMI_CIPHER_TKIP 0x2
5759#define WMI_CIPHER_AES_OCB 0x3
5760#define WMI_CIPHER_AES_CCM 0x4
5761#define WMI_CIPHER_WAPI 0x5
5762#define WMI_CIPHER_CKIP 0x6
5763#define WMI_CIPHER_AES_CMAC 0x7
5764#define WMI_CIPHER_ANY 0x8
Govind Singh869c9872016-02-22 18:36:34 +05305765#define WMI_CIPHER_AES_GCM 0x9
5766#define WMI_CIPHER_AES_GMAC 0xa
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005767
5768typedef struct {
5769 A_UINT32 tlv_header;
5770 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
5771 /** unique id identifying the VDEV, generated by the caller */
5772 A_UINT32 vdev_id;
5773 /** MAC address used for installing */
5774 wmi_mac_addr peer_macaddr;
5775 /** key index */
5776 A_UINT32 key_ix;
5777 /** key flags */
5778 A_UINT32 key_flags;
5779 /** key cipher, defined above */
5780 A_UINT32 key_cipher;
5781 /** key rsc counter */
5782 wmi_key_seq_counter key_rsc_counter;
5783 /** global key rsc counter */
5784 wmi_key_seq_counter key_global_rsc_counter;
5785 /** global key tsc counter */
5786 wmi_key_seq_counter key_tsc_counter;
5787 /** WAPI key rsc counter */
5788 A_UINT8 wpi_key_rsc_counter[16];
5789 /** WAPI key tsc counter */
5790 A_UINT8 wpi_key_tsc_counter[16];
5791 /** key length */
5792 A_UINT32 key_len;
5793 /** key tx mic length */
5794 A_UINT32 key_txmic_len;
5795 /** key rx mic length */
5796 A_UINT32 key_rxmic_len;
5797 /*
5798 * Following this struct are this TLV.
5799 * // actual key data
5800 * A_UINT8 key_data[]; // contains key followed by tx mic followed by rx mic
5801 */
5802} wmi_vdev_install_key_cmd_fixed_param;
5803
5804/** Preamble types to be used with VDEV fixed rate configuration */
5805typedef enum {
5806 WMI_RATE_PREAMBLE_OFDM,
5807 WMI_RATE_PREAMBLE_CCK,
5808 WMI_RATE_PREAMBLE_HT,
5809 WMI_RATE_PREAMBLE_VHT,
5810} WMI_RATE_PREAMBLE;
5811
5812/** Value to disable fixed rate setting */
5813#define WMI_FIXED_RATE_NONE (0xff)
5814
5815/** the definition of different VDEV parameters */
5816typedef enum {
5817 /** RTS Threshold */
5818 WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
5819 /** Fragmentation threshold */
5820 WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
5821 /** beacon interval in TUs */
5822 WMI_VDEV_PARAM_BEACON_INTERVAL,
5823 /** Listen interval in TUs */
5824 WMI_VDEV_PARAM_LISTEN_INTERVAL,
5825 /** muticast rate in Mbps */
5826 WMI_VDEV_PARAM_MULTICAST_RATE,
5827 /** management frame rate in Mbps */
5828 WMI_VDEV_PARAM_MGMT_TX_RATE,
5829 /** slot time (long vs short) */
5830 WMI_VDEV_PARAM_SLOT_TIME,
5831 /** preamble (long vs short) */
5832 WMI_VDEV_PARAM_PREAMBLE,
5833 /** SWBA time (time before tbtt in msec) */
5834 WMI_VDEV_PARAM_SWBA_TIME,
5835 /** time period for updating VDEV stats */
5836 WMI_VDEV_STATS_UPDATE_PERIOD,
5837 /** age out time in msec for frames queued for station in power save*/
5838 WMI_VDEV_PWRSAVE_AGEOUT_TIME,
5839 /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
5840 WMI_VDEV_HOST_SWBA_INTERVAL,
5841 /** DTIM period (specified in units of num beacon intervals) */
5842 WMI_VDEV_PARAM_DTIM_PERIOD,
5843 /** scheduler air time limit for this VDEV. used by off chan scheduler */
5844 WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
5845 /** enable/dsiable WDS for this VDEV */
5846 WMI_VDEV_PARAM_WDS,
5847 /** ATIM Window */
5848 WMI_VDEV_PARAM_ATIM_WINDOW,
5849 /** BMISS max */
5850 WMI_VDEV_PARAM_BMISS_COUNT_MAX,
5851 /** BMISS first time */
5852 WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
5853 /** BMISS final time */
5854 WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
5855 /** WMM enables/disabled */
5856 WMI_VDEV_PARAM_FEATURE_WMM,
5857 /** Channel width */
5858 WMI_VDEV_PARAM_CHWIDTH,
5859 /** Channel Offset */
5860 WMI_VDEV_PARAM_CHEXTOFFSET,
5861 /** Disable HT Protection */
5862 WMI_VDEV_PARAM_DISABLE_HTPROTECTION,
5863 /** Quick STA Kickout */
5864 WMI_VDEV_PARAM_STA_QUICKKICKOUT,
5865 /** Rate to be used with Management frames */
5866 WMI_VDEV_PARAM_MGMT_RATE,
5867 /** Protection Mode */
5868 WMI_VDEV_PARAM_PROTECTION_MODE,
5869 /** Fixed rate setting */
5870 WMI_VDEV_PARAM_FIXED_RATE,
5871 /** Short GI Enable/Disable */
5872 WMI_VDEV_PARAM_SGI,
5873 /** Enable LDPC */
5874 WMI_VDEV_PARAM_LDPC,
5875 /** Enable Tx STBC */
5876 WMI_VDEV_PARAM_TX_STBC,
5877 /** Enable Rx STBC */
5878 WMI_VDEV_PARAM_RX_STBC,
5879 /** Intra BSS forwarding */
5880 WMI_VDEV_PARAM_INTRA_BSS_FWD,
5881 /** Setting Default xmit key for Vdev */
5882 WMI_VDEV_PARAM_DEF_KEYID,
5883 /** NSS width */
5884 WMI_VDEV_PARAM_NSS,
5885 /** Set the custom rate for the broadcast data frames */
5886 WMI_VDEV_PARAM_BCAST_DATA_RATE,
5887 /** Set the custom rate (rate-code) for multicast data frames */
5888 WMI_VDEV_PARAM_MCAST_DATA_RATE,
5889 /** Tx multicast packet indicate Enable/Disable */
5890 WMI_VDEV_PARAM_MCAST_INDICATE,
5891 /** Tx DHCP packet indicate Enable/Disable */
5892 WMI_VDEV_PARAM_DHCP_INDICATE,
5893 /** Enable host inspection of Tx unicast packet to unknown destination */
5894 WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
5895
5896 /* The minimum amount of time AP begins to consider STA inactive */
5897 WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
5898
5899 /* An associated STA is considered inactive when there is no recent TX/RX
5900 * activity and no downlink frames are buffered for it. Once a STA exceeds
5901 * the maximum idle inactive time, the AP will send an 802.11 data-null as
5902 * a keep alive to verify the STA is still associated. If the STA does ACK
5903 * the data-null, or if the data-null is buffered and the STA does not
5904 * retrieve it, the STA will be considered unresponsive (see
5905 * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
5906 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
5907
5908 /* An associated STA is considered unresponsive if there is no recent
5909 * TX/RX activity and downlink frames are buffered for it. Once a STA
5910 * exceeds the maximum unresponsive time, the AP will send a
5911 * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
5912 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
5913
5914 /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
5915 WMI_VDEV_PARAM_AP_ENABLE_NAWDS,
5916 /** Enable/Disable RTS-CTS */
5917 WMI_VDEV_PARAM_ENABLE_RTSCTS,
5918 /* Enable TXBFee/er */
5919 WMI_VDEV_PARAM_TXBF,
5920
5921 /**Set packet power save */
5922 WMI_VDEV_PARAM_PACKET_POWERSAVE,
5923
5924 /**Drops un-encrypted packets if any received in an encryted connection
5925 * otherwise forwards to host
5926 */
5927 WMI_VDEV_PARAM_DROP_UNENCRY,
5928
5929 /*
5930 * Set TX encap type.
5931 *
5932 * enum wmi_pkt_type is to be used as the parameter
5933 * specifying the encap type.
5934 */
5935 WMI_VDEV_PARAM_TX_ENCAP_TYPE,
5936
5937 /*
5938 * Try to detect stations that woke-up and exited power save but did not
5939 * successfully transmit data-null with PM=0 to AP. When this happens,
5940 * STA and AP power save state are out-of-sync. Use buffered but
5941 * undelivered MSDU to the STA as a hint that the STA is really awake
5942 * and expecting normal ASAP delivery, rather than retrieving BU with
5943 * PS-Poll, U-APSD trigger, etc.
5944 *
5945 * 0 disables out-of-sync detection. Maximum time is 255 seconds.
5946 */
5947 WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,
5948
5949 /* Enable/Disable early rx dynamic adjust feature.
5950 * Early-rx dynamic adjust is a advance power save feature.
5951 * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
5952 * timing discrepancies in the system.
5953 * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
5954 * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
5955 * properly to minimum the power consume.*/
5956 WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE,
5957
5958 /* set target bmiss number per sample cycle if bmiss adjust was chosen.
5959 * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
5960 * which can be set by user through WMI command.
5961 */
5962 WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM,
5963
5964 /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
5965 WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE,
5966
5967 /* set slop_step */
5968 WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP,
5969
5970 /* set init slop */
5971 WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP,
5972
5973 /* pause adjust enable/disable */
5974 WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE,
5975
5976 /* Set channel pwr limit value of the vdev the minimal value of all
5977 * vdevs operating on this channel will be set as channel tx power
5978 * limit, which is used to configure ratearray
5979 */
5980 WMI_VDEV_PARAM_TX_PWRLIMIT,
5981
5982 /* set the count of snr value for calculation in snr monitor */
5983 WMI_VDEV_PARAM_SNR_NUM_FOR_CAL,
5984
5985 /** Roaming offload */
5986 WMI_VDEV_PARAM_ROAM_FW_OFFLOAD,
5987
5988 /** Enable Leader request RX functionality for RMC */
5989 WMI_VDEV_PARAM_ENABLE_RMC,
5990
5991 /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
5992 * by himself. If the beacon lost time exceed this threshold, the peer is
5993 * thought to be gone. */
5994 WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS,
5995
5996 /** max rate in kpbs, transmit rate can't go beyond it */
5997 WMI_VDEV_PARAM_MAX_RATE,
5998
5999 /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift */
6000 WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE,
6001 /* set Tx failure count threshold for the vdev */
6002 WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR,
6003
6004 /* set ebt resync timeout value, in the unit of TU */
6005 WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT,
6006
6007 /* Enable Aggregation State Trigger Event */
6008 WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE,
6009
6010 /* This parameter indicates whether IBSS station can enter into power save
6011 * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
6012 * awake all the time and should never set PM=1 in its transmitted frames.
6013 * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
6014 * is non-zero. */
6015 WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED,
6016
6017 /* This parameter indicates if this station can enter into power collapse
6018 * for the remaining beacon interval after the ATIM window.
6019 * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
6020 * is set to true. */
6021 WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED,
6022
6023 /* This parameter indicates whether IBSS station exit power save mode and
6024 * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
6025 * whenever there is a TX/RX activity. */
6026 WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED,
6027
6028 /* If Awake on TX/RX activity is enabled, this parameter indicates
6029 * the data inactivity time in number of beacon intervals after which
6030 * IBSS station reenters power save by sending Null frame with PM=1. */
6031 WMI_VDEV_PARAM_INACTIVITY_CNT,
6032
6033 /* Inactivity time in msec after which TX Service Period (SP) is
6034 * terminated by sending a Qos Null frame with EOSP.
6035 * If value is 0, TX SP is terminated with the last buffered packet itself
6036 * instead of waiting for the inactivity timeout. */
6037 WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS,
6038
6039 /** DTIM policy */
6040 WMI_VDEV_PARAM_DTIM_POLICY,
6041
6042 /* When IBSS network is initialized, PS-supporting device
6043 * does not enter protocol sleep state during first
6044 * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
6045 WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS,
6046
6047 /* Enable/Disable 1 RX chain usage during the ATIM window */
6048 WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE,
6049 /**
6050 * RX Leak window is the time driver waits before shutting down
6051 * the radio or switching the channel and after receiving an ACK
6052 * for a data frame with PM bit set)
6053 */
6054 WMI_VDEV_PARAM_RX_LEAK_WINDOW,
6055
6056 /**
6057 * Averaging factor(16 bit value) is used in the calculations to
6058 * perform averaging of different link level statistics like average
6059 * beacon spread or average number of frames leaked
6060 */
6061 WMI_VDEV_PARAM_STATS_AVG_FACTOR,
6062 /*
6063 * disconnect threshold, once the consecutive error for specific peer
6064 * exceed this threhold, FW will send kickout event to host
6065 */
6066 WMI_VDEV_PARAM_DISCONNECT_TH,
6067 /*
6068 * The rate_code of RTS_CTS changed by host. Now FW can support
6069 * more non-HT rates rather than 1Mbps or 6Mbps */
6070 WMI_VDEV_PARAM_RTSCTS_RATE,
6071
6072 /** This parameter indicates whether using a long duration RTS-CTS
6073 * protection when a SAP goes off channel in MCC mode */
6074 WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE,
6075
6076 /*
6077 * This parameter indicates whether using a broadcast probe response
6078 * to increase the detectability of SAP in MCC mode
6079 */
6080 WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE,
Nirav Shah47062ff2015-11-05 11:21:08 +05306081
6082 /* This parameter indicates the power backoff in percentage
6083 * currently supports 100%, 50%, 25%, 12.5%, and minimum
6084 * Host passes 0, 1, 2, 3, 4 to Firmware
6085 * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
6086 * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
6087 */
6088 WMI_VDEV_PARAM_TXPOWER_SCALE,
6089
6090 /* TX power backoff in dB: tx power -= param value
6091 * Host passes values(DB) to Halphy, Halphy reduces the power table
6092 * by the values. Safety check will happen in Halphy.
6093 */
6094 WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB,
Govind Singh32cced32016-02-01 13:33:09 +05306095 /** Multicast to Unicast conversion setting */
6096 WMI_VDEV_PARAM_MCAST2UCAST_SET,
6097
6098 /** Total number of HW retries */
6099 WMI_VDEV_PARAM_RC_NUM_RETRIES,
6100
6101 /** Max tx percentage for cabq */
6102 WMI_VDEV_PARAM_CABQ_MAXDUR,
6103
6104 /** MFPTEST settings */
6105 WMI_VDEV_PARAM_MFPTEST_SET,
6106
6107 /** RTS Fixed rate setting */
6108 WMI_VDEV_PARAM_RTS_FIXED_RATE,
6109
6110 /** VHT SGI MASK */
6111 WMI_VDEV_PARAM_VHT_SGIMASK,
6112
6113 /** VHT80 Auto Rate MASK */
6114 WMI_VDEV_PARAM_VHT80_RATEMASK,
6115
6116 /** set Proxy STA features for this vap */
6117 WMI_VDEV_PARAM_PROXY_STA,
6118
6119 /** set virtual cell mode - enable/disable */
6120 WMI_VDEV_PARAM_VIRTUAL_CELL_MODE,
6121
6122 /** Set receive packet type */
6123 WMI_VDEV_PARAM_RX_DECAP_TYPE,
6124
6125 /** Set ratemask with specific Bandwidth and NSS */
6126 WMI_VDEV_PARAM_BW_NSS_RATEMASK,
6127
6128 /** Set SENSOR Support */
6129 WMI_VDEV_PARAM_SENSOR_AP,
6130
6131 /** Set beacon rate */
6132 WMI_VDEV_PARAM_BEACON_RATE,
6133
6134 /** Enable CTS to self for DTIM beacon */
6135 WMI_VDEV_PARAM_DTIM_ENABLE_CTS,
6136
6137 /** Disable station kickout at Vap level */
6138 WMI_VDEV_PARAM_STA_KICKOUT,
Nirav Shah47062ff2015-11-05 11:21:08 +05306139
Govind Singh869c9872016-02-22 18:36:34 +05306140 /* VDEV capabilities */
6141 WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */
Sandeep Puligilla62f7ca02016-03-24 15:48:33 -07006142 /*
6143 * Increment TSF in micro seconds to avoid beacon collision on mesh VAP
6144 * The host must ensure that either no other vdevs share the TSF with
6145 * this vdev, or else that it is acceptable to apply this TSF adjustment
6146 * to all vdevs sharing the TSF
6147 */
6148 WMI_VDEV_PARAM_TSF_INCREMENT,
Himanshu Agarwalb953a262016-06-03 10:48:23 +05306149 WMI_VDEV_PARAM_PLACE_HOLDER_1,
Himanshu Agarwala1438152016-05-13 21:40:19 +05306150
6151 /*
6152 * Vdev level rx filter of from-ds / to-ds / no-ds / ta / ra frames.
6153 * Used mainly for mesh-vap.
6154 * The parameter value delivered with the RX_FILTER vdev param contains
6155 * a bit-or mask of wmi_vdev_param_filter enum values.
6156 */
6157 WMI_VDEV_PARAM_RX_FILTER,
Himanshu Agarwale93c55e2016-05-20 12:18:15 +05306158 /* vdev-specific mgmt tx power in dBm units (signed integer value) */
6159 WMI_VDEV_PARAM_MGMT_TX_POWER,
Himanshu Agarwal2690e462016-06-03 14:26:01 +05306160
6161 /*
Himanshu Agarwal5e9ed452016-06-08 15:09:16 +05306162 * Vdev level non aggregration/11g sw retry threshold.
6163 * 0-disable, min:0, max:31, default:15
6164 */
6165 WMI_VDEV_PARAM_NON_AGG_SW_RETRY_TH,
6166 /*
6167 * Vdev level aggregration sw retry threshold.
6168 * 0-disable, min:0, max:31, default:15
6169 */
6170 WMI_VDEV_PARAM_AGG_SW_RETRY_TH,
6171
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +05306172 /** disable dynamic bw RTS **/
6173 WMI_VDEV_PARAM_DISABLE_DYN_BW_RTS,
6174
Himanshu Agarwal5e9ed452016-06-08 15:09:16 +05306175 /*
Nitesh Shah0f933b82016-07-20 16:05:03 +05306176 * Per ssid (vdev) based ATF strict/fair scheduling policy
6177 * Param values are WMI_ATF_SSID_FAIR_SCHED or
6178 * WMI_ATF_SSID_STRICT_SCHED
6179 */
6180 WMI_VDEV_PARAM_ATF_SSID_SCHED_POLICY,
6181
6182 /*
Himanshu Agarwal2690e462016-06-03 14:26:01 +05306183 * === ADD NEW VDEV PARAM TYPES ABOVE THIS LINE ===
6184 * The below vdev param types are used for prototyping, and are
6185 * prone to change.
6186 */
6187 WMI_VDEV_PARAM_PROTOTYPE = 0x8000,
6188 /* 11AX SPECIFIC defines */
6189 WMI_VDEV_PARAM_BSS_COLOR,
6190 /* In case of AP this will enable / disable MU-MIMO mode */
6191 WMI_VDEV_PARAM_SET_UL_MU_MIMO,
6192 /*
6193 * set fragmentation level of the vdev's peers.
6194 * Values can be WMI_HE_FRAG_SUPPORT_LEVEL0..WMI_HE_FRAG_SUPPORT_LEVEL3
6195 */
6196 WMI_VDEV_PARAM_SET_FRAG_LEVEL,
6197 /*
6198 * control different features of HEControl:
6199 * Bit 0:- 1/0-> Enable/Disable transmssion of UL scheduling.
6200 * Bit 1:- 1/0-> Enable / disable honoring of ROMI from a peer.
6201 * Applicable in AP mode only.
6202 */
6203 WMI_VDEV_PARAM_SET_HECONTROL,
6204 /*
6205 * enable / disable trigger access for a AP vdev's peers.
6206 * For a STA mode vdev this will enable/disable triggered access
6207 * and enable/disable Multi User mode of operation.
6208 */
6209 WMI_VDEV_PARAM_SET_HEMU_MODE,
6210 /*
6211 * For Tx OFDMA this will set values of CP length or guard interval
6212 * to be
6213 * 0: Auto
6214 * 1: 0.8 us
6215 * 2: 1.6 us
6216 * 3: 3.2 us
6217 * Similar to Guard Interval
6218 */
6219 WMI_VDEV_PARAM_TX_OFDMA_CPLEN,
6220 /*=== END VDEV_PARAM_PROTOTYPE SECTION ===*/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006221} WMI_VDEV_PARAM;
6222
Govind Singh869c9872016-02-22 18:36:34 +05306223/* vdev capabilities bit mask */
Himanshu Agarwal800d58d2016-05-13 21:22:19 +05306224#define WMI_VDEV_BEACON_SUPPORT 0x1
Govind Singh869c9872016-02-22 18:36:34 +05306225#define WMI_VDEV_WDS_LRN_ENABLED 0x2
Himanshu Agarwal800d58d2016-05-13 21:22:19 +05306226#define WMI_VDEV_VOW_ENABLED 0x4
6227
Govind Singh869c9872016-02-22 18:36:34 +05306228#define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT)
6229#define WMI_VDEV_IS_WDS_LRN_ENABLED(param) ((param) & WMI_VDEV_WDS_LRN_ENABLED)
Himanshu Agarwal800d58d2016-05-13 21:22:19 +05306230#define WMI_VDEV_IS_VOW_ENABLED(param) ((param) & WMI_VDEV_VOW_ENABLED)
Govind Singh869c9872016-02-22 18:36:34 +05306231
6232/* TXBF capabilities masks */
6233#define WMI_TXBF_CONF_SU_TX_BFEE_S 0
6234#define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1
6235#define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << \
6236 WMI_TXBF_CONF_SU_TX_BFEE_S)
6237#define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_SU_TX_BFEE)
6238#define WMI_TXBF_CONF_SU_TX_BFEE_SET(x, z) WMI_F_RMW(x, z,\
6239 WMI_TXBF_CONF_SU_TX_BFEE)
6240
6241#define WMI_TXBF_CONF_MU_TX_BFEE_S 1
6242#define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1
6243#define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << \
6244 WMI_TXBF_CONF_MU_TX_BFEE_S)
6245#define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_MU_TX_BFEE)
6246#define WMI_TXBF_CONF_MU_TX_BFEE_SET(x, z) WMI_F_RMW(x, z, \
6247 WMI_TXBF_CONF_MU_TX_BFEE)
6248
6249#define WMI_TXBF_CONF_SU_TX_BFER_S 2
6250#define WMI_TXBF_CONF_SU_TX_BFER_M 0x1
6251#define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << \
6252 WMI_TXBF_CONF_SU_TX_BFER_S)
6253#define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_SU_TX_BFER)
6254#define WMI_TXBF_CONF_SU_TX_BFER_SET(x, z) WMI_F_RMW(x, z, \
6255 WMI_TXBF_CONF_SU_TX_BFER)
6256
6257#define WMI_TXBF_CONF_MU_TX_BFER_S 3
6258#define WMI_TXBF_CONF_MU_TX_BFER_M 0x1
6259#define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << \
6260 WMI_TXBF_CONF_MU_TX_BFER_S)
6261#define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_MU_TX_BFER)
6262#define WMI_TXBF_CONF_MU_TX_BFER_SET(x, z) WMI_F_RMW(x, z, \
6263 WMI_TXBF_CONF_MU_TX_BFER)
6264
6265#define WMI_TXBF_CONF_STS_CAP_S 4
6266#define WMI_TXBF_CONF_STS_CAP_M 0x7
6267#define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << \
6268 WMI_TXBF_CONF_STS_CAP_S)
6269#define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_STS_CAP);
6270#define WMI_TXBF_CONF_STS_CAP_SET(x, z) WMI_F_RMW(x, z, \
6271 WMI_TXBF_CONF_STS_CAP)
6272
6273#define WMI_TXBF_CONF_IMPLICIT_BF_S 7
6274#define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1
6275#define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << \
6276 WMI_TXBF_CONF_IMPLICIT_BF_S)
6277#define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_IMPLICIT_BF)
6278#define WMI_TXBF_CONF_IMPLICIT_BF_SET(x, z) WMI_F_RMW(x, z, \
6279 WMI_TXBF_CONF_IMPLICIT_BF)
6280
6281#define WMI_TXBF_CONF_BF_SND_DIM_S 8
6282#define WMI_TXBF_CONF_BF_SND_DIM_M 0x7
6283#define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << \
6284 WMI_TXBF_CONF_BF_SND_DIM_S)
6285#define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_BF_SND_DIM)
6286#define WMI_TXBF_CONF_BF_SND_DIM_SET(x, z) WMI_F_RMW(x, z, \
6287 WMI_TXBF_CONF_BF_SND_DIM)
6288
6289/* TXBF capabilities */
6290typedef struct {
6291 A_UINT32 txbf_cap;
6292} wmi_vdev_txbf_cap;
6293
Himanshu Agarwala1438152016-05-13 21:40:19 +05306294/* vdev rx filters (for mesh) */
6295typedef enum {
6296 /* Don't drop any frames - Default */
6297 WMI_VDEV_RX_ALLOW_ALL_FRAMES = 0x0,
6298 /* Drop FromDS frames */
6299 WMI_VDEV_RX_FILTER_OUT_FROMDS = 0x1,
6300 /* Drop ToDS frames */
6301 WMI_VDEV_RX_FILTER_OUT_TODS = 0x2,
6302 /* Drop NODS frames */
6303 WMI_VDEV_RX_FILTER_OUT_NODS = 0x4,
6304 /* Drop RA frames */
6305 WMI_VDEV_RX_FILTER_OUT_RA = 0x8,
6306 /* Drop TA frames */
6307 WMI_VDEV_RX_FILTER_OUT_TA = 0x10,
6308} wmi_vdev_param_filter;
6309
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006310/* Length of ATIM Window in TU */
6311#define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
6312
6313enum wmi_pkt_type {
6314 WMI_PKT_TYPE_RAW = 0,
6315 WMI_PKT_TYPE_NATIVE_WIFI = 1,
6316 WMI_PKT_TYPE_ETHERNET = 2,
6317};
6318
Govind Singh869c9872016-02-22 18:36:34 +05306319/*******************************************************************
6320 * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap
6321 * Do not use it!
6322 *******************************************************************/
6323
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006324typedef struct {
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306325 A_UINT8 sutxbfee:1, mutxbfee:1, sutxbfer:1, mutxbfer:1,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006326#if defined(AR900B)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306327 txb_sts_cap:3, implicit_bf:1;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006328#else
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306329 reserved:4;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006330#endif
6331} wmi_vdev_txbf_en;
6332
6333/** Upto 8 bits are available for Roaming module to be sent along with
6334 WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
6335/* Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
6336#define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1
6337/* Enable Roaming module in FW to do scan based on Final BMISS */
6338#define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2
6339
6340/** slot time long */
6341#define WMI_VDEV_SLOT_TIME_LONG 0x1
6342/** slot time short */
6343#define WMI_VDEV_SLOT_TIME_SHORT 0x2
6344/** preablbe long */
6345#define WMI_VDEV_PREAMBLE_LONG 0x1
6346/** preablbe short */
6347#define WMI_VDEV_PREAMBLE_SHORT 0x2
6348
6349/** the definition of different START/RESTART Event response */
6350typedef enum {
6351 /* Event respose of START CMD */
6352 WMI_VDEV_START_RESP_EVENT = 0,
6353 /* Event respose of RESTART CMD */
6354 WMI_VDEV_RESTART_RESP_EVENT,
6355} WMI_START_EVENT_PARAM;
6356
6357typedef struct {
6358 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */
6359 /** unique id identifying the VDEV, generated by the caller */
6360 A_UINT32 vdev_id;
6361 /** requestor id that requested the VDEV start request */
6362 A_UINT32 requestor_id;
6363 /* Respose of Event type START/RESTART */
6364 WMI_START_EVENT_PARAM resp_type;
6365 /** status of the response */
6366 A_UINT32 status;
6367 /** Vdev chain mask */
6368 A_UINT32 chain_mask;
6369 /** Vdev mimo power save mode */
6370 A_UINT32 smps_mode;
Govind Singh869c9872016-02-22 18:36:34 +05306371 union {
6372 /* OBSOLETE - will be removed once all refs are gone */
6373 A_UINT32 mac_id;
6374 /** pdev_id for identifying the MAC
6375 * See macros starting with WMI_PDEV_ID_ for values.
6376 */
6377 A_UINT32 pdev_id;
6378 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006379 /** Configured Transmit Streams **/
6380 A_UINT32 cfgd_tx_streams;
6381 /** Configured Receive Streams **/
6382 A_UINT32 cfgd_rx_streams;
6383} wmi_vdev_start_response_event_fixed_param;
6384
6385typedef struct {
6386 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */
6387 /** unique id identifying the VDEV, generated by the caller */
6388 A_UINT32 vdev_id;
6389} wmi_vdev_stopped_event_fixed_param;
6390
Manikandan Mohan429a0782015-12-23 14:35:54 -08006391typedef struct {
6392 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */
6393 /** unique id identifying the VDEV, generated by the caller */
6394 A_UINT32 vdev_id;
6395} wmi_vdev_delete_resp_event_fixed_param;
6396
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006397/** common structure used for simple events (stopped, resume_req, standby response) */
6398typedef struct {
6399 A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */
6400 /** unique id identifying the VDEV, generated by the caller */
6401 A_UINT32 vdev_id;
6402} wmi_vdev_simple_event_fixed_param;
6403
6404/** VDEV start response status codes */
6405#define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV succesfully started */
6406#define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */
6407#define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */
6408
6409/** Beacon processing related command and event structures */
6410typedef struct {
6411 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
6412 /** unique id identifying the VDEV, generated by the caller */
6413 A_UINT32 vdev_id;
6414 /** xmit rate */
6415 A_UINT32 tx_rate;
6416 /** xmit power */
6417 A_UINT32 txPower;
6418 /** beacon buffer length in bytes */
6419 A_UINT32 buf_len;
6420 /* This TLV is followed by array of bytes:
6421 * // beacon frame buffer
6422 * A_UINT8 bufp[];
6423 */
6424} wmi_bcn_tx_hdr;
6425
6426/* Beacon filter */
6427#define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
6428#define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
6429#define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
6430#define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
6431#define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
6432
6433typedef struct {
6434 /** Filter ID */
6435 A_UINT32 bcn_filter_id;
6436 /** Filter type - wmi_bcn_filter */
6437 A_UINT32 bcn_filter;
6438 /** Buffer len */
6439 A_UINT32 bcn_filter_len;
6440 /** Filter info (threshold, BSSID, RSSI) */
6441 A_UINT8 *bcn_filter_buf;
6442} wmi_bcn_filter_rx_cmd;
6443
6444/** Capabilities and IEs to be passed to firmware */
6445typedef struct {
6446 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
6447 /** Capabilities */
6448 A_UINT32 caps;
6449 /** ERP info */
6450 A_UINT32 erp;
6451 /** Advanced capabilities */
6452 /** HT capabilities */
6453 /** HT Info */
6454 /** ibss_dfs */
6455 /** wpa Info */
6456 /** rsn Info */
6457 /** rrm info */
6458 /** ath_ext */
6459 /** app IE */
6460} wmi_bcn_prb_info;
6461
6462typedef struct {
6463 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
6464 /** unique id identifying the VDEV, generated by the caller */
6465 A_UINT32 vdev_id;
6466 /** TIM IE offset from the beginning of the template. */
6467 A_UINT32 tim_ie_offset;
6468 /** beacon buffer length. data is in TLV data[] */
6469 A_UINT32 buf_len;
6470 /*
6471 * The TLVs follows:
6472 * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs
6473 * A_UINT8 data[]; //Variable length data
6474 */
6475} wmi_bcn_tmpl_cmd_fixed_param;
6476
6477typedef struct {
6478 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
6479 /** unique id identifying the VDEV, generated by the caller */
6480 A_UINT32 vdev_id;
6481 /** beacon buffer length. data is in TLV data[] */
6482 A_UINT32 buf_len;
6483 /*
6484 * The TLVs follows:
6485 * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs
6486 * A_UINT8 data[]; //Variable length data
6487 */
6488} wmi_prb_tmpl_cmd_fixed_param;
6489
6490typedef struct {
6491 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
6492 A_UINT32 tlv_header;
6493 /** unique id identifying the VDEV */
6494 A_UINT32 vdev_id;
6495 /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
6496 A_UINT32 tx_status;
6497} wmi_offload_bcn_tx_status_event_fixed_param;
6498
6499enum wmi_sta_ps_mode {
6500 /** enable power save for the given STA VDEV */
6501 WMI_STA_PS_MODE_DISABLED = 0,
6502 /** disable power save for a given STA VDEV */
6503 WMI_STA_PS_MODE_ENABLED = 1,
6504};
6505
6506typedef struct {
6507 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
6508 /** unique id identifying the VDEV, generated by the caller */
6509 A_UINT32 vdev_id;
6510
6511 /** Power save mode
6512 *
6513 * (see enum wmi_sta_ps_mode)
6514 */
6515 A_UINT32 sta_ps_mode;
6516} wmi_sta_powersave_mode_cmd_fixed_param;
6517
6518enum wmi_csa_offload_en {
6519 WMI_CSA_OFFLOAD_DISABLE = 0,
6520 WMI_CSA_OFFLOAD_ENABLE = 1,
6521};
6522
6523typedef struct {
6524 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */
6525 A_UINT32 vdev_id;
6526 A_UINT32 csa_offload_enable;
6527} wmi_csa_offload_enable_cmd_fixed_param;
6528
6529typedef struct {
6530 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */
6531 A_UINT32 vdev_id;
6532 /*
6533 * The TLVs follows:
6534 * wmi_channel chan;
6535 */
6536} wmi_csa_offload_chanswitch_cmd_fixed_param;
6537/**
6538 * This parameter controls the policy for retrieving frames from AP while the
6539 * STA is in sleep state.
6540 *
6541 * Only takes affect if the sta_ps_mode is enabled
6542 */
6543enum wmi_sta_ps_param_rx_wake_policy {
6544 /* Wake up when ever there is an RX activity on the VDEV. In this mode
6545 * the Power save SM(state machine) will come out of sleep by either
6546 * sending null frame (or) a data frame (with PS==0) in response to TIM
6547 * bit set in the received beacon frame from AP.
6548 */
6549 WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
6550
6551 /* Here the power save state machine will not wakeup in response to TIM
6552 * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
6553 * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
6554 * access categories are delivery-enabled, the station will send a UAPSD
6555 * trigger frame, otherwise it will send a PS-Poll.
6556 */
6557 WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
6558};
6559
6560/** Number of tx frames/beacon that cause the power save SM to wake up.
6561 *
6562 * Value 1 causes the SM to wake up for every TX. Value 0 has a special
6563 * meaning, It will cause the SM to never wake up. This is useful if you want
6564 * to keep the system to sleep all the time for some kind of test mode . host
6565 * can change this parameter any time. It will affect at the next tx frame.
6566 */
6567enum wmi_sta_ps_param_tx_wake_threshold {
6568 WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
6569 WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
6570
6571 /* Values greater than one indicate that many TX attempts per beacon
6572 * interval before the STA will wake up
6573 */
6574};
6575
6576/**
6577 * The maximum number of PS-Poll frames the FW will send in response to
6578 * traffic advertised in TIM before waking up (by sending a null frame with PS
6579 * = 0). Value 0 has a special meaning: there is no maximum count and the FW
6580 * will send as many PS-Poll as are necessary to retrieve buffered BU. This
6581 * parameter is used when the RX wake policy is
6582 * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
6583 * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
6584 */
6585enum wmi_sta_ps_param_pspoll_count {
6586 WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
6587 /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
6588 * will send before waking up.
6589 */
6590};
6591
6592/*
6593 * This will include the delivery and trigger enabled state for every AC.
6594 * This is the negotiated state with AP. The host MLME needs to set this based
6595 * on AP capability and the state Set in the association request by the
6596 * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
6597 */
6598#define WMI_UAPSD_AC_TYPE_DELI 0
6599#define WMI_UAPSD_AC_TYPE_TRIG 1
6600
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306601#define WMI_UAPSD_AC_BIT_MASK(ac, type) \
6602 do { \
6603 (type == WMI_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) : \
6604 (1<<((ac<<1)+1)) \
6605 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006606
6607enum wmi_sta_ps_param_uapsd {
6608 WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
6609 WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
6610 WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
6611 WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
6612 WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
6613 WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
6614 WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
6615 WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
6616};
6617
6618enum wmi_sta_powersave_param {
6619 /**
6620 * Controls how frames are retrievd from AP while STA is sleeping
6621 *
6622 * (see enum wmi_sta_ps_param_rx_wake_policy)
6623 */
6624 WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
6625
6626 /**
6627 * The STA will go active after this many TX
6628 *
6629 * (see enum wmi_sta_ps_param_tx_wake_threshold)
6630 */
6631 WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
6632
6633 /**
6634 * Number of PS-Poll to send before STA wakes up
6635 *
6636 * (see enum wmi_sta_ps_param_pspoll_count)
6637 *
6638 */
6639 WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
6640
6641 /**
6642 * TX/RX inactivity time in msec before going to sleep.
6643 *
6644 * The power save SM will monitor tx/rx activity on the VDEV, if no
6645 * activity for the specified msec of the parameter the Power save SM will
6646 * go to sleep.
6647 */
6648 WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
6649
6650 /**
6651 * Set uapsd configuration.
6652 *
6653 * (see enum wmi_sta_ps_param_uapsd)
6654 */
6655 WMI_STA_PS_PARAM_UAPSD = 4,
6656 /**
6657 * Number of PS-Poll to send before STA wakes up in QPower Mode
6658 */
6659 WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
6660
6661 /**
6662 * Enable QPower
6663 */
6664 WMI_STA_PS_ENABLE_QPOWER = 6,
6665
6666 /**
6667 * Number of TX frames before the entering the Active state
6668 */
6669 WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
6670
6671 /**
6672 * QPower SPEC PSPOLL interval
6673 */
6674 WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
6675
6676 /**
6677 * Max SPEC PSPOLL to be sent when the PSPOLL response has
6678 * no-data bit set
6679 */
6680 WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
6681};
6682
6683typedef struct {
6684 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
6685 /** unique id identifying the VDEV, generated by the caller */
6686 A_UINT32 vdev_id;
6687 /** station power save parameter (see enum wmi_sta_powersave_param) */
6688 A_UINT32 param;
6689 A_UINT32 value;
6690} wmi_sta_powersave_param_cmd_fixed_param;
6691
6692/** No MIMO power save */
6693#define WMI_STA_MIMO_PS_MODE_DISABLE
6694/** mimo powersave mode static*/
6695#define WMI_STA_MIMO_PS_MODE_STATIC
6696/** mimo powersave mode dynamic */
6697#define WMI_STA_MIMO_PS_MODE_DYNAMI
6698
6699typedef struct {
6700 /** unique id identifying the VDEV, generated by the caller */
6701 A_UINT32 vdev_id;
6702 /** mimo powersave mode as defined above */
6703 A_UINT32 mimo_pwrsave_mode;
6704} wmi_sta_mimo_ps_mode_cmd;
6705
6706/** U-APSD configuration of peer station from (re)assoc request and TSPECs */
6707enum wmi_ap_ps_param_uapsd {
6708 WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
6709 WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
6710 WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
6711 WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
6712 WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
6713 WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
6714 WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
6715 WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
6716};
6717
6718/** U-APSD maximum service period of peer station */
6719enum wmi_ap_ps_peer_param_max_sp {
6720 WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
6721 WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
6722 WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
6723 WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
6724
6725 /* keep last! */
6726 MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
6727};
6728
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05306729/** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */
6730enum wmi_ap_ps_param_sifs_resp_frmtype {
6731 WMI_SIFS_RESP_PSPOLL = (1 << 0),
6732 WMI_SIFS_RESP_UAPSD = (1 << 1),
6733 WMI_SIFS_RESP_QBST_EXP = (1 << 2),
6734 WMI_SIFS_RESP_QBST_DATA = (1 << 3),
6735 WMI_SIFS_RESP_QBST_BAR = (1 << 4),
6736};
6737
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006738/**
6739 * AP power save parameter
6740 * Set a power save specific parameter for a peer station
6741 */
6742enum wmi_ap_ps_peer_param {
6743 /** Set uapsd configuration for a given peer.
6744 *
6745 * This will include the delivery and trigger enabled state for every AC.
6746 * The host MLME needs to set this based on AP capability and stations
6747 * request Set in the association request received from the station.
6748 *
6749 * Lower 8 bits of the value specify the UAPSD configuration.
6750 *
6751 * (see enum wmi_ap_ps_param_uapsd)
6752 * The default value is 0.
6753 */
6754 WMI_AP_PS_PEER_PARAM_UAPSD = 0,
6755
6756 /**
6757 * Set the service period for a UAPSD capable station
6758 *
6759 * The service period from wme ie in the (re)assoc request frame.
6760 *
6761 * (see enum wmi_ap_ps_peer_param_max_sp)
6762 */
6763 WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
6764
6765 /** Time in seconds for aging out buffered frames for STA in power save */
6766 WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05306767 /**
6768 * Specify frame types that are considered SIFS RESP trigger frame
6769 * (see enum wmi_ap_ps_param_sifs_resp_frmtype)
6770 */
Govind Singh32cced32016-02-01 13:33:09 +05306771 WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
6772
6773 /*
6774 * Specifies the trigger state of TID.
6775 * Valid only for UAPSD frame type
6776 */
6777 WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
6778
6779 /** Specifies the WNM sleep state of a STA */
6780 WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006781};
6782
6783typedef struct {
6784 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
6785 /** unique id identifying the VDEV, generated by the caller */
6786 A_UINT32 vdev_id;
6787 /** peer MAC address */
6788 wmi_mac_addr peer_macaddr;
6789 /** AP powersave param (see enum wmi_ap_ps_peer_param) */
6790 A_UINT32 param;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05306791 /** AP powersave param value (see defines) */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006792 A_UINT32 value;
6793} wmi_ap_ps_peer_cmd_fixed_param;
6794
6795/** Configure peer station 11v U-APSD coexistance
6796 *
6797 * Two parameters from uaspd coexistence ie info (as specified in 11v) are
6798 * sent down to FW along with this command.
6799 *
6800 * The semantics of these fields are described in the following text extracted
6801 * from 802.11v.
6802 *
6803 * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the
6804 * U-APSD Coexistence element, the AP should not transmit frames to the
6805 * non-AP STA outside of the U-APSD Coexistence Service Period, which
6806 * begins when the AP receives the U-APSD trigger frame and ends after
6807 * the transmission period specified by the result of the following
6808 * calculation:
6809 *
6810 * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
6811 *
6812 * Where T is the time the U-APSD trigger frame was received at the AP
6813 * Interval is the UAPSD Coexistence element Duration/Interval field
6814 * value (see 7.3.2.91) or upon the successful transmission of a frame
6815 * with EOSP bit set to 1, whichever is earlier.
6816 *
6817 *
6818 * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
6819 * Coexistence element, the AP should not transmit frames to the non-AP
6820 * STA outside of the U-APSD Coexistence Service Period, which begins
6821 * when the AP receives a U-APSD trigger frame and ends after the
6822 * transmission period specified by the result of the following
6823 * calculation: End of transmission period = T + Duration
6824 */
6825typedef struct {
6826 /** unique id identifying the VDEV, generated by the caller */
6827 A_UINT32 vdev_id;
6828 /** peer MAC address */
6829 wmi_mac_addr peer_macaddr;
6830 /** Enable U-APSD coexistence support for this peer
6831 *
6832 * 0 -> disabled (default)
6833 * 1 -> enabled
6834 */
6835 A_UINT32 enabled;
6836 /** Duration/Interval as defined by 11v U-ASPD coexistance */
6837 A_UINT32 duration_interval;
6838 /** Upper 32 bits of 64-bit TSF offset */
6839 A_UINT32 tsf_offset_high;
6840 /** Lower 32 bits of 64-bit TSF offset */
6841 A_UINT32 tsf_offset_low;
6842} wmi_ap_powersave_peer_uapsd_coex_cmd;
6843
6844typedef enum {
6845 WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001,
6846 WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002,
6847 WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
6848
6849 WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
6850} wmi_ap_ps_egap_flag_type;
6851
6852/**
6853 * configure ehanced green ap parameters
6854 */
6855typedef struct {
6856 /*
6857 * TLV tag and len; tag equals
6858 * wmi_ap_powersave_egap_param_cmd_fixed_param
6859 */
6860 A_UINT32 tlv_header;
6861 /** Enable enhanced green ap
6862 * 0 -> disabled
6863 * 1 -> enabled
6864 */
6865 A_UINT32 enable;
6866 /** The param indicates a duration that all STAs connected
6867 * to S-AP have no traffic.
6868 */
6869 A_UINT32 inactivity_time; /* in unit of milliseconds */
6870 /** The param indicates a duration that all STAs connected
6871 * to S-AP have no traffic, after all STAs have entered powersave.
6872 */
6873 A_UINT32 wait_time; /* in unit of milliseconds */
6874 /** The param is used to turn on/off some functions within E-GAP.
6875 */
6876 A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
6877} wmi_ap_ps_egap_param_cmd_fixed_param;
6878
6879typedef enum {
6880 WMI_AP_PS_EGAP_STATUS_IDLE = 1,
6881 WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
6882 WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3,
6883
6884 WMI_AP_PS_EGAP_STATUS_MAX = 15
6885} wmi_ap_ps_egap_status_type;
6886
6887/**
6888 * send ehanced green ap status to host
6889 */
6890typedef struct {
Manikandan Mohan0c7ae402015-12-03 17:56:41 -08006891 /* TLV tag and len; tag equals
6892 * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list
6893 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006894 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05306895 union {
6896 /* OBSOLETE - will be removed once all refs are gone */
6897 A_UINT32 mac_id;
6898 /** pdev_id for identifying the MAC
6899 * See macros starting with WMI_PDEV_ID_ for values.
6900 */
6901 A_UINT32 pdev_id;
6902 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006903 /** The param indicates the current tx chainmask with the mac id. */
6904 A_UINT32 tx_chainmask;
6905 /** The param indicates the current rx chainmask with the mac id. */
6906 A_UINT32 rx_chainmask;
6907} wmi_ap_ps_egap_info_chainmask_list;
6908
6909typedef struct {
6910 /*
6911 * TLV tag and len; tag equals
6912 * wmi_ap_powersave_egap_param_cmd_fixed_param
6913 */
6914 A_UINT32 tlv_header;
6915 /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
6916 A_UINT32 status;
6917 /* This TLV is followed by
6918 * wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
6919 */
6920} wmi_ap_ps_egap_info_event_fixed_param;
6921
6922
6923/* 128 clients = 4 words */
6924/* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
6925#define WMI_TIM_BITMAP_ARRAY_SIZE 4
6926
6927typedef struct {
6928 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
6929 /** TIM bitmap len (in bytes)*/
6930 A_UINT32 tim_len;
6931 /** TIM Partial Virtual Bitmap */
6932 A_UINT32 tim_mcast;
6933 A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
6934 A_UINT32 tim_changed;
6935 A_UINT32 tim_num_ps_pending;
6936} wmi_tim_info;
6937
6938typedef struct {
6939 /** Flag to enable quiet period IE support */
6940 A_UINT32 is_enabled;
6941 /** Quiet start */
6942 A_UINT32 tbttcount;
6943 /** Beacon intervals between quiets*/
6944 A_UINT32 period;
6945 /** TUs of each quiet*/
6946 A_UINT32 duration;
6947 /** TUs of from TBTT of quiet start*/
6948 A_UINT32 offset;
6949} wmi_quiet_info;
6950
6951/* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
6952#define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
6953
6954typedef struct {
6955 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
6956 /** Bit 0: Flag to indicate an update in NOA schedule
6957 * Bits 7-1: Reserved
6958 * Bits 15-8: Index (identifies the instance of NOA sub element)
6959 * Bit 16: Opp PS state of the AP
6960 * Bits 23-17: Ctwindow in TUs
6961 * Bits 31-24: Number of NOA descriptors
6962 */
6963 A_UINT32 noa_attributes;
6964 wmi_p2p_noa_descriptor
6965 noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
6966} wmi_p2p_noa_info;
6967
6968#define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
6969#define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
6970
6971#define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \
6972 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
6973
6974#define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \
6975 WMI_F_RMW((hdr)->noa_attributes, 0x1, \
6976 WMI_UNIFIED_NOA_ATTR_MODIFIED);
6977
6978#define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00
6979#define WMI_UNIFIED_NOA_ATTR_INDEX_S 8
6980
6981#define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \
6982 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
6983
6984#define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \
6985 WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
6986 WMI_UNIFIED_NOA_ATTR_INDEX);
6987
6988#define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000
6989#define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16
6990
6991#define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \
6992 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
6993
6994#define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \
6995 WMI_F_RMW((hdr)->noa_attributes, 0x1, \
6996 WMI_UNIFIED_NOA_ATTR_OPP_PS);
6997
6998#define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000
6999#define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17
7000
7001#define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \
7002 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
7003
7004#define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \
7005 WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \
7006 WMI_UNIFIED_NOA_ATTR_CTWIN);
7007
7008#define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000
7009#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24
7010
7011#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \
7012 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
7013
7014#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \
7015 WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
7016 WMI_UNIFIED_NOA_ATTR_NUM_DESC);
7017
7018typedef struct {
7019 /** TIM info */
7020 wmi_tim_info tim_info;
7021 /** P2P NOA info */
7022 wmi_p2p_noa_info p2p_noa_info;
7023 /* TBD: More info elements to be added later */
7024} wmi_bcn_info;
7025
7026typedef struct {
7027 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
7028 /** bitmap identifying the VDEVs, generated by the caller */
7029 A_UINT32 vdev_map;
7030 /* This TLV is followed by tim_info and p2p_noa_info for each vdev in vdevmap :
7031 * wmi_tim_info tim_info[];
7032 * wmi_p2p_noa_info p2p_noa_info[];
7033 *
7034 */
7035} wmi_host_swba_event_fixed_param;
7036
7037#define WMI_MAX_AP_VDEV 16
7038
7039typedef struct {
7040 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
7041 /** bimtap of VDEVs that has tbtt offset updated */
7042 A_UINT32 vdev_map;
7043 /* The TLVs for tbttoffset_list will follow this TLV.
7044 * tbtt offset list in the order of the LSB to MSB in the vdev_map bitmap
7045 * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
7046 */
7047} wmi_tbtt_offset_event_fixed_param;
7048
7049/* Peer Specific commands and events */
7050
7051typedef struct {
7052 A_UINT32 percentage; /* in unit of 12.5% */
7053 A_UINT32 min_delta; /* in unit of Mbps */
7054} rate_delta_t;
7055
7056#define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01
7057#define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02
7058#define MAX_NUM_OF_RATE_THRESH 4
7059
7060typedef struct {
7061 /*
7062 * PEER_RATE_REPORT_COND_FLAG_DELTA,
7063 * PEER_RATE_REPORT_COND_FLAG_THRESHOLD
7064 * Any of these two conditions or both of
7065 * them can be set.
7066 */
7067 A_UINT32 val_cond_flags;
7068 rate_delta_t rate_delta;
7069 /*
7070 * In unit of Mbps. There are at most 4 thresholds
7071 * If the threshold count is less than 4, set zero to
7072 * the one following the last threshold
7073 */
7074 A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH];
7075} report_cond_per_phy_t;
7076
7077
7078enum peer_rate_report_cond_phy_type {
7079 PEER_RATE_REPORT_COND_11B = 0,
7080 PEER_RATE_REPORT_COND_11A_G,
7081 PEER_RATE_REPORT_COND_11N,
7082 PEER_RATE_REPORT_COND_11AC,
7083 PEER_RATE_REPORT_COND_MAX_NUM
7084};
7085
7086typedef struct {
7087 /*
7088 * TLV tag and len; tag equals
7089 * WMITLV_TAG_STRUC_wmi_peer_rate_report_condtion_fixed_param
7090 */
7091 A_UINT32 tlv_header;
7092 /* 1= enable, 0=disable */
7093 A_UINT32 enable_rate_report;
7094 A_UINT32 report_backoff_time; /* in unit of msecond */
7095 A_UINT32 report_timer_period; /* in unit of msecond */
7096 /*
7097 *In the following field, the array index means the phy type,
7098 * please see enum peer_rate_report_cond_phy_type for detail
7099 */
7100 report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
7101} wmi_peer_set_rate_report_condition_fixed_param;
7102
7103/* Peer Type:
7104 * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
7105 * on address and vdev opmode. This is largely here to allow host to indicate that
7106 * peer is explicitly a TDLS peer
7107 */
7108enum wmi_peer_type {
7109 WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
7110 WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
7111 WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
7112 WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
Govind Singh941bd5e2016-02-04 17:15:25 +05307113 WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007114 WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307115 * is assigned up to 127 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007116 /* Reserved from 128 - 255 for
7117 * target internal use.*/
7118 WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
7119};
7120
7121typedef struct {
7122 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
7123 /** unique id identifying the VDEV, generated by the caller */
7124 A_UINT32 vdev_id;
7125 /** peer MAC address */
7126 wmi_mac_addr peer_macaddr;
7127 /** peer type: see enum values above */
7128 A_UINT32 peer_type;
7129} wmi_peer_create_cmd_fixed_param;
7130
7131typedef struct {
7132 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
7133 /** unique id identifying the VDEV, generated by the caller */
7134 A_UINT32 vdev_id;
7135 /** peer MAC address */
7136 wmi_mac_addr peer_macaddr;
7137} wmi_peer_delete_cmd_fixed_param;
7138
7139typedef struct {
Nitesh Shah5de1cf82016-06-29 20:13:17 +05307140 /**
7141 * TLV tag and len; tag equals
7142 * WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param
7143 */
7144 A_UINT32 tlv_header;
7145 /** unique id identifying the VDEV, generated by the caller */
7146 A_UINT32 vdev_id;
7147 /** peer MAC address */
7148 wmi_mac_addr peer_macaddr;
7149 /**
7150 * maximum block ack window size to use during a rx block ack
7151 * negotiation, i.e. the maximum number of MPDUs per A-MPDU
7152 * that will be received
7153 */
7154 A_UINT32 rx_block_ack_win_limit;
7155} wmi_peer_set_rx_blocksize_cmd_fixed_param;
7156
7157typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007158 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
7159 /** unique id identifying the VDEV, generated by the caller */
7160 A_UINT32 vdev_id;
7161 /** peer MAC address */
7162 wmi_mac_addr peer_macaddr;
7163 /** tid bitmap identifying the tids to flush */
7164 A_UINT32 peer_tid_bitmap;
7165} wmi_peer_flush_tids_cmd_fixed_param;
7166
7167typedef struct {
7168 /** rate mode . 0: disable fixed rate (auto rate)
7169 * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
7170 * 2: ht20 11n rate specified as mcs index
7171 * 3: ht40 11n rate specified as mcs index
7172 */
7173 A_UINT32 rate_mode;
7174 /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
7175 * and series 3 is stored at byte 3 (MSB) */
7176 A_UINT32 rate_series;
7177 /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
7178 * and retry count for rate 3 is stored at byte 3 (MSB) */
7179 A_UINT32 rate_retries;
7180} wmi_fixed_rate;
7181
7182typedef struct {
7183 /** unique id identifying the VDEV, generated by the caller */
7184 A_UINT32 vdev_id;
7185 /** peer MAC address */
7186 wmi_mac_addr peer_macaddr;
7187 /** fixed rate */
7188 wmi_fixed_rate peer_fixed_rate;
7189} wmi_peer_fixed_rate_cmd;
7190
7191#define WMI_MGMT_TID 17
7192
7193typedef struct {
7194 A_UINT32 tlv_header;
7195 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
7196 /** unique id identifying the VDEV, generated by the caller */
7197 A_UINT32 vdev_id;
7198 /** peer MAC address */
7199 wmi_mac_addr peer_macaddr;
7200} wmi_addba_clear_resp_cmd_fixed_param;
7201
7202typedef struct {
7203 A_UINT32 tlv_header;
7204 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */
7205 /** unique id identifying the VDEV, generated by the caller */
7206 A_UINT32 vdev_id;
7207 /** peer MAC address */
7208 wmi_mac_addr peer_macaddr;
7209 /** Tid number */
7210 A_UINT32 tid;
7211 /** Buffer/Window size*/
7212 A_UINT32 buffersize;
7213} wmi_addba_send_cmd_fixed_param;
7214
7215typedef struct {
7216 A_UINT32 tlv_header;
7217 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
7218 /** unique id identifying the VDEV, generated by the caller */
7219 A_UINT32 vdev_id;
7220 /** peer MAC address */
7221 wmi_mac_addr peer_macaddr;
7222 /** Tid number */
7223 A_UINT32 tid;
7224 /** Is Initiator */
7225 A_UINT32 initiator;
7226 /** Reason code */
7227 A_UINT32 reasoncode;
7228} wmi_delba_send_cmd_fixed_param;
7229
7230typedef struct {
7231 A_UINT32 tlv_header;
7232 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
7233 /** unique id identifying the vdev, generated by the caller */
7234 A_UINT32 vdev_id;
7235 /** peer mac address */
7236 wmi_mac_addr peer_macaddr;
7237 /** Tid number */
7238 A_UINT32 tid;
7239 /** status code */
7240 A_UINT32 statuscode;
7241} wmi_addba_setresponse_cmd_fixed_param;
7242
7243typedef struct {
7244 A_UINT32 tlv_header;
7245 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
7246 /** unique id identifying the vdev, generated by the caller */
7247 A_UINT32 vdev_id;
7248 /** peer mac address */
7249 wmi_mac_addr peer_macaddr;
7250 /** Tid number */
7251 A_UINT32 tid;
7252} wmi_send_singleamsdu_cmd_fixed_param;
7253
7254/* Type of Station DTIM Power Save method */
7255enum {
7256 /* For NORMAL DTIM, the parameter is the number of beacon intervals and
7257 * also the same value as the listen interval. For this method, the
7258 * station will wake up based on the listen interval. If this
7259 * listen interval is not equal to DTIM, then the station may
7260 * miss certain DTIM beacons. If this value is 1, then the
7261 * station will wake up for every beacon.
7262 */
7263 WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
7264 /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
7265 * When this value is 1, then the station will wake at every DTIM beacon.
7266 * If this value is >1, then the station will skip certain DTIM beacons.
7267 * This value is the multiple of DTIM intervals that the station will
7268 * wake up to receive the DTIM beacons.
7269 */
7270 WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
7271};
7272
7273/* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
7274typedef struct {
7275 A_UINT32 tlv_header;
7276 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
7277 /** unique id identifying the VDEV, generated by the caller */
7278 A_UINT32 vdev_id;
7279 /* Station DTIM Power Save method as defined above */
7280 A_UINT32 dtim_pwrsave_method;
7281 /* DTIM PS value. Contents depends on the method */
7282 A_UINT32 value;
7283 /* Modulated DTIM value */
7284 A_UINT32 MaxLIModulatedDTIM;
7285} wmi_sta_dtim_ps_method_cmd_fixed_param;
7286
7287/*
7288 * For Station UAPSD Auto Trigger feature, the Firmware monitors the
7289 * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
7290 * If there is no uplink/download for the specified service interval (field service_interval),
7291 * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
7292 * specified in the UP (field user_priority).
7293 * Firmware also monitors the responses for these QOS-NULL triggers.
7294 * If the peer does not have any delivery frames, it will respond with
7295 * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
7296 * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
7297 * are unused and should be set to 0.
7298 * When service_interval is 0, then the firmware will not send any trigger frames. This is for
7299 * certain host-based implementations that don't want this firmware offload.
7300 * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
7301 * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
7302 * and rest of the AC default to 300 ms.
7303 *
7304 * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
7305 * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
7306 * the more advanced monitoring method.
7307 * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
7308 * suspend interval (field suspend_interval), firmware will change its auto trigger interval
7309 * to delay interval (field delay_interval). This way, when there is no traffic, the station
7310 * will save more power by waking up less and sending less trigger frames.
7311 * The (service_interval < suspend_interval) and (service_interval < delay_interval).
7312 * If this variable auto trigger is not required, then the suspend_interval and delay_interval
7313 * should be 0.
7314 */
7315typedef struct {
7316 A_UINT32 tlv_header;
7317 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
7318 /** WMM Access category from 0 to 3 */
7319 A_UINT32 wmm_ac;
7320 /** User priority to use in trigger frames. It is the TID
7321 * value. This field needs to be specified and may not be
7322 * equivalent to AC since some implementation may use the TSPEC
7323 * to enable UAPSD and negotiate a particular user priority. */
7324 A_UINT32 user_priority;
7325 /** service interval in ms */
7326 A_UINT32 service_interval;
7327 /** Suspend interval in ms */
7328 A_UINT32 suspend_interval;
7329 /** delay interval in ms */
7330 A_UINT32 delay_interval;
7331} wmi_sta_uapsd_auto_trig_param;
7332
7333typedef struct {
7334 A_UINT32 tlv_header;
7335 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
7336 /** unique id identifying the VDEV, generated by the caller */
7337 A_UINT32 vdev_id;
7338 /** peer mac address */
7339 wmi_mac_addr peer_macaddr;
7340 /** Number of AC to specify */
7341 A_UINT32 num_ac;
7342 /*
7343 * Following this struc is the TLV:
7344 * wmi_sta_uapsd_auto_trig_param ac_param[]; //Variable number of AC parameters (defined by field num_ac)
7345 */
7346
7347} wmi_sta_uapsd_auto_trig_cmd_fixed_param;
7348
7349/** mimo powersave state */
7350#define WMI_PEER_MIMO_PS_STATE 0x1
7351/** enable/disable AMPDU . initial value (enabled) */
7352#define WMI_PEER_AMPDU 0x2
7353/** authorize/unauthorize peer. initial value is unauthorized (0) */
7354#define WMI_PEER_AUTHORIZE 0x3
7355/** peer channel bandwidth */
7356#define WMI_PEER_CHWIDTH 0x4
7357/** peer NSS */
7358#define WMI_PEER_NSS 0x5
7359/** USE 4 ADDR */
7360#define WMI_PEER_USE_4ADDR 0x6
7361/* set group membership status */
7362#define WMI_PEER_MEMBERSHIP 0x7
7363#define WMI_PEER_USERPOS 0x8
7364/*
7365 * A critical high-level protocol is being used with this peer. Target
7366 * should take appropriate measures (if possible) to ensure more
7367 * reliable link with minimal latency. This *may* include modifying the
7368 * station power save policy, enabling more RX chains, increased
7369 * priority of channel scheduling, etc.
7370 *
7371 * NOTE: This parameter should only be considered a hint as specific
7372 * behavior will depend on many factors including current network load
7373 * and vdev/peer configuration.
7374 *
7375 * For STA VDEV this peer corresponds to the AP's BSS peer.
7376 * For AP VDEV this peer corresponds to the remote peer STA.
7377 */
7378#define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9
7379/* set Tx failure count threshold for the peer - Currently unused */
7380#define WMI_PEER_TX_FAIL_CNT_THR 0xA
7381/* Enable H/W retry and Enable H/W Send CTS2S before Data */
7382#define WMI_PEER_SET_HW_RETRY_CTS2S 0xB
7383
7384/* Set peer advertised IBSS atim window length */
7385#define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC
7386
7387/** peer phy mode */
7388#define WMI_PEER_PHYMODE 0xD
Govind Singh32cced32016-02-01 13:33:09 +05307389/** Use FIXED Pwr */
7390#define WMI_PEER_USE_FIXED_PWR 0xE
7391/** Set peer fixed rate */
7392#define WMI_PEER_PARAM_FIXED_RATE 0xF
7393/** Whitelist peer TIDs */
7394#define WMI_PEER_SET_MU_WHITELIST 0x10
Govind Singh67b83b82016-02-01 19:26:59 +05307395/** Set peer max tx rate (MCS) in adaptive rate ctrl */
7396#define WMI_PEER_SET_MAX_TX_RATE 0x11
7397/** Set peer minimal tx rate (MCS) in adaptive rate ctrl */
7398#define WMI_PEER_SET_MIN_TX_RATE 0x12
Pradeep Reddy POTTETIdead2bd2016-06-09 17:11:12 +05307399/**
7400 * default ring routing for peer data packets,
7401 * param_value = bit 0 for hash based routing enabled or not
7402 * (value 1 is enabled, value 0 is disabled)
7403 * bits 1:5 are for ring 32 (i.e. ring id value
7404 * selected from 0 to 31 values)
7405 */
7406#define WMI_PEER_SET_DEFAULT_ROUTING 0x13
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007407
7408/** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
7409#define WMI_PEER_MIMO_PS_NONE 0x0
7410#define WMI_PEER_MIMO_PS_STATIC 0x1
7411#define WMI_PEER_MIMO_PS_DYNAMIC 0x2
7412
7413typedef struct {
7414 A_UINT32 tlv_header;
7415 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */
7416 /** unique id identifying the VDEV, generated by the caller */
7417 A_UINT32 vdev_id;
7418 /** peer MAC address */
7419 wmi_mac_addr peer_macaddr;
7420 /** parameter id */
7421 A_UINT32 param_id;
7422 /** parametr value */
7423 A_UINT32 param_value;
7424} wmi_peer_set_param_cmd_fixed_param;
7425
Govind Singh67b83b82016-02-01 19:26:59 +05307426typedef union {
7427 /*
7428 * The A_UINT16 "mode" and "tx_rate" fields can only be directly used
7429 * by the target or a little-endian host.
7430 * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET
7431 * macros on the A_UINT32 "value" field.
7432 */
7433 struct {
7434 /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */
7435 A_UINT16 mode;
7436 A_UINT16 tx_rate; /* see per-mode specs below */
7437 };
7438 A_UINT32 value; /* for use by big-endian host */
7439} wmi_peer_max_min_tx_rate;
7440
7441/*
7442 * Any access to the mode/tx_rate in an big endian system should use
7443 * the below Macros on the wmi_peer_max_min_tx_rate.value field.
7444 */
7445#define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16)
7446#define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode)
7447
7448#define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16)
7449#define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode)
7450
7451/*
7452 * CCK max/min tx Rate description
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +05307453 * tx_rate = 0: 1 Mbps
7454 * tx_rate = 1: 2 Mbps
7455 * tx_rate = 2: 5.5 Mbps
7456 * tx_rate = 3: 11 Mbps
7457 * tx_rate = else: invalid
Govind Singh67b83b82016-02-01 19:26:59 +05307458 */
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +05307459enum {
7460 WMI_MAX_CCK_TX_RATE_1M, /* up to 1M CCK Rate avaliable */
7461 WMI_MAX_CCK_TX_RATE_2M, /* up to 2M CCK Rate avaliable */
7462 WMI_MAX_CCK_TX_RATE_5_5M, /* up to 5.5M CCK Rate avaliable */
7463 WMI_MAX_CCK_TX_RATE_11M, /* up to 11M CCK Rate avaliable */
7464 WMI_MAX_CCK_TX_RATE = WMI_MAX_CCK_TX_RATE_11M,
7465};
Govind Singh67b83b82016-02-01 19:26:59 +05307466
7467/*
7468 * OFDM max/min tx Rate description
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +05307469 * tx_rate = 0: 6 Mbps
7470 * tx_rate = 1: 9 Mbps
7471 * tx_rate = 2: 12 Mbps
7472 * tx_rate = 3: 18 Mbps
7473 * tx_rate = 4: 24 Mbps
7474 * tx_rate = 5: 32 Mbps
7475 * tx_rate = 6: 48 Mbps
7476 * tx_rate = 7: 54 Mbps
7477 * tx_rate = else: invalid
Govind Singh67b83b82016-02-01 19:26:59 +05307478 */
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +05307479enum {
7480 WMI_MAX_OFDM_TX_RATE_6M, /* up to 6M OFDM Rate avaliable */
7481 WMI_MAX_OFDM_TX_RATE_9M, /* up to 9M OFDM Rate avaliable */
7482 WMI_MAX_OFDM_TX_RATE_12M, /* up to 12M OFDM Rate avaliable */
7483 WMI_MAX_OFDM_TX_RATE_18M, /* up to 18M OFDM Rate avaliable */
7484 WMI_MAX_OFDM_TX_RATE_24M, /* up to 24M OFDM Rate avaliable */
7485 WMI_MAX_OFDM_TX_RATE_36M, /* up to 36M OFDM Rate avaliable */
7486 WMI_MAX_OFDM_TX_RATE_48M, /* up to 48M OFDM Rate avaliable */
7487 WMI_MAX_OFDM_TX_RATE_54M, /* up to 54M OFDM Rate avaliable */
7488 WMI_MAX_OFDM_TX_RATE = WMI_MAX_OFDM_TX_RATE_54M,
7489};
Govind Singh67b83b82016-02-01 19:26:59 +05307490
7491/*
7492 * HT max/min tx rate description
7493 * tx_rate = 0~7 : MCS Rate 0~7
7494 * tx_rate=else : invalid.
7495 */
7496#define WMI_MAX_HT_TX_MCS 0x07
7497
7498/*
7499 * VHT max/min tx rate description
7500 * tx_rate = 0~9 : MCS Rate 0~9
7501 * tx_rate=else : invalid.
7502 */
7503#define WMI_MAX_VHT_TX_MCS 0x09
7504
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007505#define MAX_SUPPORTED_RATES 128
7506
7507typedef struct {
7508 /** total number of rates */
7509 A_UINT32 num_rates;
7510 /**
7511 * rates (each 8bit value) packed into a 32 bit word.
7512 * the rates are filled from least significant byte to most
7513 * significant byte.
7514 */
7515 A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
7516} wmi_rate_set;
7517
7518/* NOTE: It would bea good idea to represent the Tx MCS
7519 * info in one word and Rx in another word. This is split
7520 * into multiple words for convenience
7521 */
7522typedef struct {
7523 A_UINT32 tlv_header;
7524 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
7525 A_UINT32 rx_max_rate; /* Max Rx data rate */
7526 A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
7527 A_UINT32 tx_max_rate; /* Max Tx data rate */
7528 A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
Govind Singh32cced32016-02-01 13:33:09 +05307529 A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007530} wmi_vht_rate_set;
7531
7532/*
7533 * IMPORTANT: Make sure the bit definitions here are consistent
7534 * with the ni_flags definitions in wlan_peer.h
7535 */
7536#define WMI_PEER_AUTH 0x00000001 /* Authorized for data */
7537#define WMI_PEER_QOS 0x00000002 /* QoS enabled */
7538#define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */
7539#define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */
7540#define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */
7541#define WMI_PEER_HT 0x00001000 /* HT enabled */
7542#define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */
7543#define WMI_PEER_STBC 0x00008000 /* STBC Enabled */
7544#define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */
7545#define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */
7546#define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */
7547#define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */
7548#define WMI_PEER_VHT 0x02000000 /* VHT Enabled */
7549#define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */
7550#define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */
7551/** CAUTION TODO: Place holder for WLAN_PEER_F_PS_PRESEND_REQUIRED = 0x10000000. Need to be clean up */
7552#define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */
7553#define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */
7554#define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */
7555
7556/**
7557 * Peer rate capabilities.
7558 *
7559 * This is of interest to the ratecontrol
7560 * module which resides in the firmware. The bit definitions are
7561 * consistent with that defined in if_athrate.c.
7562 *
7563 * @todo
7564 * Move this to a common header file later so there is no need to
7565 * duplicate the definitions or maintain consistency.
7566 */
7567#define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */
7568#define WMI_RC_CW40_FLAG 0x02 /* CW 40 */
7569#define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */
7570#define WMI_RC_HT_FLAG 0x08 /* HT */
7571#define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
7572#define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */
7573#define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */
7574#define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
7575#define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
7576#define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
7577#define WMI_RC_TS_FLAG 0x200 /* Three stream flag */
7578#define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
7579
7580typedef struct {
7581 A_UINT32 tlv_header;
7582 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
7583 /** peer MAC address */
7584 wmi_mac_addr peer_macaddr;
7585 /** VDEV id */
7586 A_UINT32 vdev_id;
7587 /** assoc = 1 reassoc = 0 */
7588 A_UINT32 peer_new_assoc;
7589 /** peer associd (16 bits) */
7590 A_UINT32 peer_associd;
7591 /** peer station flags: see definition above */
7592 A_UINT32 peer_flags;
7593 /** negotiated capabilities (lower 16 bits)*/
7594 A_UINT32 peer_caps;
7595 /** Listen interval */
7596 A_UINT32 peer_listen_intval;
7597 /** HT capabilties of the peer */
7598 A_UINT32 peer_ht_caps;
7599 /** maximum rx A-MPDU length */
7600 A_UINT32 peer_max_mpdu;
7601 /** mpdu density of the peer in usec(0 to 16) */
7602 A_UINT32 peer_mpdu_density;
7603 /** peer rate capabilties see flags above */
7604 A_UINT32 peer_rate_caps;
7605 /** num spatial streams */
7606 A_UINT32 peer_nss;
7607 /** VHT capabilties of the peer */
7608 A_UINT32 peer_vht_caps;
7609 /** phy mode */
7610 A_UINT32 peer_phymode;
7611 /** HT Operation Element of the peer. Five bytes packed in 2
7612 * INT32 array and filled from lsb to msb.
7613 * Note that the size of array peer_ht_info[] cannotbe changed
7614 * without breaking WMI Compatibility. */
7615 A_UINT32 peer_ht_info[2];
7616 /** total number of negotiated legacy rate set. Also the sizeof
7617 * peer_legacy_rates[] */
7618 A_UINT32 num_peer_legacy_rates;
7619 /** total number of negotiated ht rate set. Also the sizeof
7620 * peer_ht_rates[] */
7621 A_UINT32 num_peer_ht_rates;
Anurag Chouhan08f66c62016-04-18 17:14:51 +05307622 /*
7623 * Bitmap providing customized mapping of bandwidths to max Rx NSS
Govind Singh32cced32016-02-01 13:33:09 +05307624 * for this peer.
7625 * This is required since 802.11 standard currently facilitates peer to
7626 * be able to advertise only a single max Rx NSS value across all
7627 * bandwidths.
7628 * Some QCA chipsets might need to be able to advertise a different max
7629 * Rx NSS value for 160 MHz, than that for 80 MHz and lower.
7630 *
7631 * bit[2:0] : Represents value of Rx NSS for VHT 160 MHz
7632 * bit[30:3]: Reserved
7633 * bit[31] : MSB(0/1): 1 in case of valid data else all bits will be
7634 * set to 0 by host
7635 */
7636 A_UINT32 peer_bw_rxnss_override;
Govind Singhd24f5e42016-02-22 15:16:46 +05307637 /* 802.11ax capabilities */
7638 wmi_ppe_threshold peer_ppet;
7639 /* protocol-defined HE / 11ax capability flags */
7640 A_UINT32 peer_he_cap_info;
7641 A_UINT32 peer_he_ops; /* HE operation contains BSS color */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007642 /* Following this struc are the TLV's:
7643 * A_UINT8 peer_legacy_rates[];
7644 * A_UINT8 peer_ht_rates[];
7645 * wmi_vht_rate_set peer_vht_rates; //VHT capabilties of the peer
7646 */
7647} wmi_peer_assoc_complete_cmd_fixed_param;
7648
Govind Singh32cced32016-02-01 13:33:09 +05307649/* WDS Entry Flags */
7650#define WMI_WDS_FLAG_STATIC 0x1 /* Disable aging & learning */
7651
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007652typedef struct {
7653 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
7654 /** peer MAC address */
7655 wmi_mac_addr peer_macaddr;
7656 /** wds MAC addr */
7657 wmi_mac_addr wds_macaddr;
Govind Singh32cced32016-02-01 13:33:09 +05307658 /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */
7659 A_UINT32 flags;
Govind Singh869c9872016-02-22 18:36:34 +05307660 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007661} wmi_peer_add_wds_entry_cmd_fixed_param;
7662
7663typedef struct {
7664 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
7665 /** wds MAC addr */
7666 wmi_mac_addr wds_macaddr;
Govind Singh869c9872016-02-22 18:36:34 +05307667 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007668} wmi_peer_remove_wds_entry_cmd_fixed_param;
7669
7670typedef struct {
7671 /** peer MAC address */
7672 wmi_mac_addr peer_macaddr;
7673} wmi_peer_q_empty_callback_event;
7674
Govind Singhc7d51942016-02-01 12:09:31 +05307675/*
7676 * Command to update an already existing WDS entry. Different address setting
7677 * combinations are possible.
7678 *
7679 * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated.
7680 * Valid wds and null peer -> Associated WDS entry flags will be updated.
7681 * Null wds and Valid peer-> Flags will be updated for all WDS entries
7682 * behind the peer.
7683 * Null wds and peer -> Flags will be updated for all WDS entries.
7684 */
7685typedef struct {
7686 /*
7687 * TLV tag and len; tag equals
7688 * WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param
7689 */
7690 A_UINT32 tlv_header;
7691 /** peer MAC address */
7692 wmi_mac_addr peer_macaddr;
7693 /** wds MAC addr */
7694 wmi_mac_addr wds_macaddr;
7695 /* Flags associated with WDS entry */
7696 A_UINT32 flags;
Govind Singh869c9872016-02-22 18:36:34 +05307697 A_UINT32 vdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +05307698} wmi_peer_update_wds_entry_cmd_fixed_param;
7699
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007700/**
7701 * Channel info WMI event
7702 */
7703typedef struct {
7704 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
7705 /** Error code */
7706 A_UINT32 err_code;
7707 /** Channel freq */
7708 A_UINT32 freq;
7709 /** Read flags */
7710 A_UINT32 cmd_flags;
7711 /** Noise Floor value */
7712 A_UINT32 noise_floor;
7713 /** rx clear count */
7714 A_UINT32 rx_clear_count;
7715 /** cycle count */
7716 A_UINT32 cycle_count;
Govind Singh32cced32016-02-01 13:33:09 +05307717 /** channel tx power per range in 0.5dBm steps */
7718 A_UINT32 chan_tx_pwr_range;
7719 /** channel tx power per throughput */
7720 A_UINT32 chan_tx_pwr_tp;
7721 /** rx frame count (cumulative) */
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +05307722 A_UINT32 rx_frame_count;
7723 /** BSS rx cycle count */
7724 A_UINT32 my_bss_rx_cycle_count;
7725 /** b-mode data rx time (units are microseconds) */
7726 A_UINT32 rx_11b_mode_data_duration;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007727} wmi_chan_info_event_fixed_param;
7728
7729/**
7730 * Non wlan interference event
7731 */
7732typedef struct {
7733 A_UINT32 tlv_header;
7734 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_ath_dcs_cw_int */
7735 A_UINT32 channel; /* either number or freq in mhz */
Govind Singh869c9872016-02-22 18:36:34 +05307736} wlan_dcs_cw_int;
7737#define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007738
7739/**
7740 * wlan_dcs_im_tgt_stats
7741 *
7742 */
7743typedef struct _wlan_dcs_im_tgt_stats {
Govind Singh869c9872016-02-22 18:36:34 +05307744 /** TLV tag and len; tag equals
7745 * WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t
7746 */
7747 A_UINT32 tlv_header;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007748 /** current running TSF from the TSF-1 */
7749 A_UINT32 reg_tsf32;
7750
7751 /** Known last frame rssi, in case of multiple stations, if
7752 * and at different ranges, this would not gaurantee that
7753 * this is the least rssi.
7754 */
7755 A_UINT32 last_ack_rssi;
7756
7757 /** Sum of all the failed durations in the last one second interval.
7758 */
7759 A_UINT32 tx_waste_time;
7760 /** count how many times the hal_rxerr_phy is marked, in this
7761 * time period
7762 */
7763 A_UINT32 rx_time;
7764 A_UINT32 phyerr_cnt;
7765
7766 /**
7767 * WLAN IM stats from target to host
7768 *
7769 * Below statistics are sent from target to host periodically.
7770 * These are collected at target as long as target is running
7771 * and target chip is not in sleep.
7772 *
7773 */
7774
7775 /** listen time from ANI */
7776 A_INT32 listen_time;
7777
7778 /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
7779 A_UINT32 reg_tx_frame_cnt;
7780
7781 /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
7782 A_UINT32 reg_rx_frame_cnt;
7783
7784 /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
7785 A_UINT32 reg_rxclr_cnt;
7786
7787 /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
7788 A_UINT32 reg_cycle_cnt; /* delta cycle count */
7789
7790 /** extenstion channel rx clear count */
7791 A_UINT32 reg_rxclr_ext_cnt;
7792
7793 /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
7794 A_UINT32 reg_ofdm_phyerr_cnt;
7795
7796 /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
7797 A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +05307798 /** Channel noise floor (units are dBm) */
7799 A_INT32 chan_nf;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007800
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +05307801 /** BSS rx cycle count */
7802 A_UINT32 my_bss_rx_cycle_count;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007803} wlan_dcs_im_tgt_stats_t;
7804
7805/**
7806 * wmi_dcs_interference_event_t
7807 *
7808 * Right now this is event and stats together. Partly this is
7809 * because cw interference is handled in target now. This
7810 * can be done at host itself, if we can carry the NF alone
7811 * as a stats event. In future this would be done and this
7812 * event would carry only stats.
7813 */
7814typedef struct {
7815 A_UINT32 tlv_header;
7816 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
7817 /**
7818 * Type of the event present, either the cw interference event, or the wlan_im stats
7819 */
7820 A_UINT32 interference_type; /* type of interference, wlan or cw */
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05307821 /** pdev_id for identifying the MAC
7822 * See macros starting with WMI_PDEV_ID_ for values.
7823 */
7824 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007825 /*
7826 * Following this struct are these TLVs. Note that they are both array of structures
7827 * but can have at most one element. Which TLV is empty or has one element depends
7828 * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
Govind Singh869c9872016-02-22 18:36:34 +05307829 * elements (not arrays). union { wlan_dcs_cw_int cw_int;
7830 * wlan_dcs_im_tgt_stats_t wlan_stat; }
7831 * int_event;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007832 *
7833 * //cw_interference event
Govind Singh869c9872016-02-22 18:36:34 +05307834 * wlan_dcs_cw_int cw_int[]; this element
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007835 * // wlan im interfernce stats
7836 * wlan_dcs_im_tgt_stats_t wlan_stat[];
7837 */
7838} wmi_dcs_interference_event_fixed_param;
7839
7840enum wmi_peer_mcast_group_action {
7841 wmi_peer_mcast_group_action_add = 0,
7842 wmi_peer_mcast_group_action_del = 1
7843};
7844#define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1
7845#define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0
7846#define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
7847#define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
Govind Singh32cced32016-02-01 13:33:09 +05307848/* flag to exclude an ip while filtering.set to exclude */
7849#define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4
7850#define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2
7851/* flag to say ipv4/ipv6. Will be set for ipv6 */
7852#define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8
7853#define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3
7854/* delete all mcast table entries. */
7855#define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10
7856#define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4
7857
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007858/* multicast group membership commands */
7859/* TODO: Converting this will be tricky since it uses an union.
7860 Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
7861typedef struct {
7862 A_UINT32 tlv_header;
7863 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
7864 A_UINT32 flags;
7865 wmi_mac_addr ucast_mac_addr;
Govind Singh32cced32016-02-01 13:33:09 +05307866 /*
7867 * for ipv4, bytes (12-15) should contain ip address and
7868 * other lower bytes 0. ipv6 should have all bytes valid
7869 */
7870 A_UINT8 mcast_ip_addr[16]; /* in network byte order */
7871 /*
7872 * for ipv6, all 16 bytes has to be valid;
7873 * for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s
7874 */
7875 A_UINT8 mcast_ip_mask[16]; /* zero out lower bytes if ipv4 */
7876 /* number of address filters - irrespective of ipv4/ipv6 addresses */
7877 A_UINT32 num_filter_addr;
7878 /*
7879 * this array should contain the src IPs that are to be filtered
7880 * during find. The array should be packed. If there are 2 ipv4
7881 * addresses, there should be 8 bytes and rest all 0s
7882 */
7883 A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */
7884 A_UINT8 vdev_id; /* vdev of this mcast group */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007885} wmi_peer_mcast_group_cmd_fixed_param;
7886
7887/** Offload Scan and Roaming related commands */
7888/** The FW performs 2 different kinds of offload scans independent
7889 * of host. One is Roam scan which is primarily performed on a
7890 * station VDEV after association to look for a better AP that
7891 * the station VDEV can roam to. The second scan is connect scan
7892 * which is mainly performed when the station is not associated
7893 * and to look for a matching AP profile from a list of
7894 * configured profiles. */
7895
7896/**
7897 * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
7898 * the roam scan mode is one of the periodic, rssi change, both, none.
7899 * None : Disable Roam scan. No Roam scan at all.
7900 * Periodic : Scan periodically with a configurable period.
7901 * Rssi change : Scan when ever rssi to current AP changes by the threshold value
7902 * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
7903 * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount)
7904 *
7905 */
7906typedef struct {
7907 A_UINT32 tlv_header;
7908 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
7909 A_UINT32 roam_scan_mode;
7910 A_UINT32 vdev_id;
7911} wmi_roam_scan_mode_fixed_param;
7912
7913#define WMI_ROAM_SCAN_MODE_NONE 0x0
7914#define WMI_ROAM_SCAN_MODE_PERIODIC 0x1
7915#define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
7916#define WMI_ROAM_SCAN_MODE_BOTH 0x3
7917/* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
7918#define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
7919
7920typedef struct {
7921 A_UINT32 tlv_header;
7922 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
7923 A_UINT32 vdev_id;
7924 A_UINT32 command_arg;
7925} wmi_roam_scan_cmd_fixed_param;
7926
7927#define WMI_ROAM_SCAN_STOP_CMD 0x1
7928
7929/**
7930 * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan rssi thresold
7931 * scan rssi threshold is the rssi threshold below which the FW will start running Roam scans.
7932 * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
7933 */
7934typedef struct {
7935 A_UINT32 tlv_header;
7936 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
7937 /** unique id identifying the VDEV, generated by the caller */
7938 A_UINT32 vdev_id;
7939 /** roam scan rssi threshold */
7940 A_UINT32 roam_scan_rssi_thresh;
7941 /** When using Hw generated beacon RSSI interrupts */
7942 A_UINT32 roam_rssi_thresh_diff;
7943 /** 5G scan max count */
7944 A_UINT32 hirssi_scan_max_count;
7945 /** 5G scan rssi change threshold value */
7946 A_UINT32 hirssi_scan_delta;
7947 /** 5G scan upper bound */
7948 A_UINT32 hirssi_upper_bound;
7949 /* The TLVs will follow.
7950 * wmi_roam_scan_extended_threshold_param extended_param;
7951 * wmi_roam_earlystop_rssi_thres_param earlystop_param;
Govind Singhce8fd912016-01-21 10:24:19 +05307952 * wmi_roam_dense_thres_param dense_param;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007953 */
7954} wmi_roam_scan_rssi_threshold_fixed_param;
7955
7956#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0
7957#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
7958#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2
7959#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3
7960
7961typedef struct {
7962 /** TLV tag and len; tag equals
7963 *WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
7964 A_UINT32 tlv_header;
7965 A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
7966 A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
7967 A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
7968 A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
7969 A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
7970 A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
7971 A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
7972 A_UINT32 max_penalty_5g; /** maximum penality that can be applied to a 5GHz RSSI */
7973 /**
7974 * RSSI below which roam is kicked in by background scan
7975 * although rssi is still good
7976 */
7977 A_UINT32 good_rssi_threshold;
7978} wmi_roam_scan_extended_threshold_param;
7979
7980
7981/**
7982 * WMI_ROAM_SCAN_PERIOD: period for roam scan.
7983 * Applicable when the scan mode is Periodic or both.
7984 */
7985typedef struct {
7986 A_UINT32 tlv_header;
7987 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
7988 /** unique id identifying the VDEV, generated by the caller */
7989 A_UINT32 vdev_id;
7990 /** roam scan period value */
7991 A_UINT32 roam_scan_period;
7992 /** Aging for Roam scans */
7993 A_UINT32 roam_scan_age;
7994} wmi_roam_scan_period_fixed_param;
7995
7996/**
7997 * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : rssi delta to trigger the roam scan.
7998 * Rssi change threshold used when mode is Rssi change (or) Both.
7999 * The FW will run the roam scan when ever the rssi changes (up or down) by the value set by this parameter.
8000 * Note scan is triggered based on the rssi threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
8001 */
8002typedef struct {
8003 A_UINT32 tlv_header;
8004 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
8005 /** unique id identifying the VDEV, generated by the caller */
8006 A_UINT32 vdev_id;
8007 /** roam scan rssi change threshold value */
8008 A_UINT32 roam_scan_rssi_change_thresh;
8009 /** When using Hw generated beacon RSSI interrupts */
8010 A_UINT32 bcn_rssi_weight;
8011 /** Minimum delay between two 5G scans */
8012 A_UINT32 hirssi_delay_btw_scans;
8013} wmi_roam_scan_rssi_change_threshold_fixed_param;
8014
8015#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
8016#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
8017#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
8018/**
8019 * TLV for roaming channel list
8020 */
8021typedef struct {
8022 A_UINT32 tlv_header;
8023 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
8024 /** unique id identifying the VDEV, generated by the caller */
8025 A_UINT32 vdev_id;
8026 /** WMI_CHAN_LIST_TAG */
8027 A_UINT32 chan_list_type;
8028 /** # if channels to scan */
8029 A_UINT32 num_chan;
8030/**
8031 * TLV (tag length value ) parameters follow the wmi_roam_chan_list
8032 * structure. The TLV's are:
8033 * A_UINT32 channel_list[];
8034 **/
8035} wmi_roam_chan_list_fixed_param;
8036
8037/** Authentication modes */
8038enum {
8039 WMI_AUTH_NONE, /* no upper level auth */
8040 WMI_AUTH_OPEN, /* open */
8041 WMI_AUTH_SHARED, /* shared-key */
8042 WMI_AUTH_8021X, /* 802.1x */
8043 WMI_AUTH_AUTO, /* Auto */
8044 WMI_AUTH_WPA, /* WPA */
8045 WMI_AUTH_RSNA, /* WPA2/RSNA */
Himanshu Agarwal82972fd2016-05-20 12:23:43 +05308046 WMI_AUTH_CCKM, /* CCKM */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008047 WMI_AUTH_WAPI, /* WAPI */
8048 WMI_AUTH_AUTO_PSK,
8049 WMI_AUTH_WPA_PSK,
8050 WMI_AUTH_RSNA_PSK,
8051 WMI_AUTH_WAPI_PSK,
8052 WMI_AUTH_FT_RSNA, /* 11r FT */
8053 WMI_AUTH_FT_RSNA_PSK,
8054 WMI_AUTH_RSNA_PSK_SHA256,
8055 WMI_AUTH_RSNA_8021X_SHA256,
Himanshu Agarwal82972fd2016-05-20 12:23:43 +05308056 WMI_AUTH_CCKM_WPA,
8057 WMI_AUTH_CCKM_RSNA,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008058};
8059
8060typedef struct {
8061 /** authentication mode (defined above) */
8062 A_UINT32 rsn_authmode;
8063 /** unicast cipher set */
8064 A_UINT32 rsn_ucastcipherset;
8065 /** mcast/group cipher set */
8066 A_UINT32 rsn_mcastcipherset;
8067 /** mcast/group management frames cipher set */
8068 A_UINT32 rsn_mcastmgmtcipherset;
8069} wmi_rsn_params;
8070
8071/** looking for a wps enabled AP */
8072#define WMI_AP_PROFILE_FLAG_WPS 0x1
8073/** looking for a secure AP */
8074#define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
8075/** looking for a PMF enabled AP */
8076#define WMI_AP_PROFILE_FLAG_PMF 0x4
8077
8078/** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
8079 * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
8080 * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
8081 * and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
8082 */
8083
8084typedef struct {
8085 A_UINT32 tlv_header;
8086 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
8087 /** flags as defined above */
8088 A_UINT32 flags;
8089 /**
8090 * rssi thresold value: the value of the the candidate AP should
8091 * higher by this threshold than the rssi of the currrently associated AP.
8092 */
8093 A_UINT32 rssi_threshold;
8094 /**
8095 * ssid vlaue to be matched.
8096 */
8097 wmi_ssid ssid;
8098
8099 /**
8100 * security params to be matched.
8101 */
8102 /** authentication mode (defined above) */
8103 A_UINT32 rsn_authmode;
8104 /** unicast cipher set */
8105 A_UINT32 rsn_ucastcipherset;
8106 /** mcast/group cipher set */
8107 A_UINT32 rsn_mcastcipherset;
8108 /** mcast/group management frames cipher set */
8109 A_UINT32 rsn_mcastmgmtcipherset;
8110} wmi_ap_profile;
8111
8112/** Support early stop roaming scanning when finding a strong candidate AP
8113 * A 'strong' candidate is
8114 * 1) Is eligible candidate
8115 * (all conditions are met in existing candidate selection).
8116 * 2) Its rssi is better than earlystop threshold.
8117 * Earlystop threshold will be relaxed as each channel is scanned.
8118 */
8119typedef struct {
8120 A_UINT32 tlv_header;
8121 /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
8122 A_UINT32 roam_earlystop_thres_min;
8123 /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
8124 A_UINT32 roam_earlystop_thres_max;
8125} wmi_roam_earlystop_rssi_thres_param;
8126
Govind Singhce8fd912016-01-21 10:24:19 +05308127typedef struct {
8128 /* TLV tag and len;
8129 * tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param
8130 */
8131 A_UINT32 tlv_header;
8132 /* rssi threshold offset under trffic and dense env */
8133 A_UINT32 roam_dense_rssi_thres_offset;
8134 /* minimum number of APs to determine dense env */
8135 A_UINT32 roam_dense_min_aps;
8136 /* initial dense status detected by host
8137 * at the time of initial connection */
8138 A_UINT32 roam_dense_status;
8139 /* traffic threshold to enable aggressive roaming in dense env;
8140 * units are percent of medium occupancy, 0 - 100
8141 */
8142 A_UINT32 roam_dense_traffic_thres;
8143} wmi_roam_dense_thres_param;
8144
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008145/** Beacon filter wmi command info */
8146
8147#define BCN_FLT_MAX_SUPPORTED_IES 256
8148#define BCN_FLT_MAX_ELEMS_IE_LIST BCN_FLT_MAX_SUPPORTED_IES/32
8149
8150typedef struct bss_bcn_stats {
8151 A_UINT32 vdev_id;
8152 A_UINT32 bss_bcnsdropped;
8153 A_UINT32 bss_bcnsdelivered;
8154} wmi_bss_bcn_stats_t;
8155
8156typedef struct bcn_filter_stats {
8157 A_UINT32 bcns_dropped;
8158 A_UINT32 bcns_delivered;
8159 A_UINT32 activefilters;
8160 wmi_bss_bcn_stats_t bss_stats;
8161} wmi_bcnfilter_stats_t;
8162
8163typedef struct wmi_add_bcn_filter_cmd {
8164 A_UINT32 tlv_header;
8165 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
8166 A_UINT32 vdev_id;
8167 /*
8168 * Following this structure is the TLV:
8169 * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
8170 */
8171} wmi_add_bcn_filter_cmd_fixed_param;
8172
8173typedef struct wmi_rmv_bcn_filter_cmd {
8174 A_UINT32 tlv_header;
8175 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
8176 A_UINT32 vdev_id;
8177} wmi_rmv_bcn_filter_cmd_fixed_param;
8178
8179#define WMI_BCN_SEND_DTIM_ZERO 1
8180#define WMI_BCN_SEND_DTIM_BITCTL_SET 2
8181typedef struct wmi_bcn_send_from_host {
8182 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */
8183 A_UINT32 vdev_id;
8184 A_UINT32 data_len;
Krishna Kumaar Natarajan7dde8c72016-03-25 15:11:49 -07008185 union {
8186 A_UINT32 frag_ptr; /* Physical address of the frame */
8187 A_UINT32 frag_ptr_lo; /* LSB of physical address of the frame */
8188 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008189 A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
8190 A_UINT32 dtim_flag; /* to control CABQ traffic */
Govind Singh32cced32016-02-01 13:33:09 +05308191 A_UINT32 bcn_antenna; /* Antenna for beacon transmission */
Krishna Kumaar Natarajan7dde8c72016-03-25 15:11:49 -07008192 A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008193} wmi_bcn_send_from_host_cmd_fixed_param;
8194
8195/* cmd to support bcn snd for all vaps at once */
8196typedef struct wmi_pdev_send_bcn {
8197 A_UINT32 num_vdevs;
8198 wmi_bcn_send_from_host_cmd_fixed_param bcn_cmd[1];
8199} wmi_pdev_send_bcn_cmd_t;
8200
8201/*
8202 * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming.
8203 */
8204typedef struct {
8205 A_UINT32 tlv_header;
8206 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
8207 /** id of AP criteria */
8208 A_UINT32 id;
8209
8210 /** unique id identifying the VDEV, generated by the caller */
8211 A_UINT32 vdev_id;
8212
8213 /*
8214 * Following this structure is the TLV:
8215 * wmi_ap_profile ap_profile; //AP profile info
8216 */
8217} wmi_roam_ap_profile_fixed_param;
8218
8219/**
8220 * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
8221 */
8222typedef struct {
8223 /** id of AP criteria */
8224 A_UINT32 id;
8225
8226 /** unique id identifying the VDEV, generated by the caller */
8227 A_UINT32 vdev_id;
8228
8229 /** AP profile info */
8230 wmi_ap_profile ap_profile;
8231
8232} wmi_ofl_scan_add_ap_profile;
8233
8234/**
8235 * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
8236 */
8237typedef struct {
8238 /** id of AP criteria */
8239 A_UINT32 id;
8240 /** unique id identifying the VDEV, generated by the caller */
8241 A_UINT32 vdev_id;
8242} wmi_ofl_scan_remove_ap_profile;
8243
8244/**
8245 * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
8246 * 0 will disable ofload scan and a very low value will perform a continous
8247 * scan.
8248 */
8249typedef struct {
8250 /** offload scan period value, used for scans used when not connected */
8251 A_UINT32 ofl_scan_period;
8252} wmi_ofl_scan_period;
8253
8254/* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
8255#define ROAM_OFFLOAD_PMK_BYTES (32)
8256#define ROAM_OFFLOAD_PSK_MSK_BYTES (32)
8257#define ROAM_OFFLOAD_KRK_BYTES (16)
8258#define ROAM_OFFLOAD_BTK_BYTES (32)
8259#define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
8260#define ROAM_OFFLOAD_NUM_MCS_SET (16)
8261
8262/* This TLV will be filled only in case roam offload
8263 * for wpa2-psk/okc/ese/11r is enabled */
8264typedef struct {
8265 A_UINT32 tlv_header;
8266 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
8267 A_UINT32 rssi_cat_gap; /* gap for every category bucket */
8268 A_UINT32 prefer_5g; /* prefer select 5G candidate */
8269 A_UINT32 select_5g_margin;
8270 A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */
8271 A_UINT32 capability;
8272 A_UINT32 ht_caps_info;
8273 A_UINT32 ampdu_param;
8274 A_UINT32 ht_ext_cap;
8275 A_UINT32 ht_txbf;
8276 A_UINT32 asel_cap;
8277 A_UINT32 qos_enabled;
8278 A_UINT32 qos_caps;
8279 A_UINT32 wmm_caps;
8280 A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET >> 2]; /* since this 4 byte aligned,
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308281 * we don't declare it as
8282 * tlv array */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008283} wmi_roam_offload_tlv_param;
8284
8285/* flags for 11i offload */
8286#define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */
8287/* from bit 1 to bit 31 are reserved */
8288
8289#define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
8290 (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308291} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008292
8293#define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
8294 (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308295} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008296
8297#define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \
8298 ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
8299
8300/* This TLV will be filled only in case of wpa-psk/wpa2-psk */
8301typedef struct {
8302 A_UINT32 tlv_header;
8303 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
8304 A_UINT32 flags;
8305 /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
8306 A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES >> 2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
8307 A_UINT32 pmk_len;
8308 /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
8309} wmi_roam_11i_offload_tlv_param;
8310
8311/* This TLV will be filled only in case of 11R*/
8312typedef struct {
8313 A_UINT32 tlv_header;
8314 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
8315 A_UINT32 mdie_present;
8316 A_UINT32 mdid;
8317 A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN >> 2];
8318 A_UINT32 r0kh_id_len;
8319 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 */
8320 A_UINT32 psk_msk_len;
8321 /**length of psk_msk*/
8322} wmi_roam_11r_offload_tlv_param;
8323
8324/* This TLV will be filled only in case of ESE */
8325typedef struct {
8326 A_UINT32 tlv_header;
8327 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
8328 A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES >> 2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
8329 A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES >> 2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
8330} wmi_roam_ese_offload_tlv_param;
8331
8332/** WMI_ROAM_EVENT: roam event triggering the host roam logic.
8333 * generated when ever a better AP is found in the recent roam scan (or)
8334 * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
8335 * from the current AP.
8336 */
8337typedef struct {
8338 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */
8339 /** unique id identifying the VDEV, generated by the caller */
8340 A_UINT32 vdev_id;
8341 /** reason for roam event */
8342 A_UINT32 reason;
8343 /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI*/
8344 A_UINT32 rssi;
Krishna Kumaar Natarajan79a2a082016-03-25 15:07:07 -07008345 /** roam notification */
8346 A_UINT32 notif;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008347
8348} wmi_roam_event_fixed_param;
8349
Nirav Shah439e6262015-11-05 10:53:18 +05308350/* roam_reason: bits 0-3 */
Krishna Kumaar Natarajan79a2a082016-03-25 15:07:07 -07008351
8352/** invalid reason. Do not interpret reason field */
8353#define WMI_ROAM_REASON_INVALID 0x0
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008354#define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
8355#define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */
8356#define WMI_ROAM_REASON_DEAUTH 0x2 /** deauth/disassoc received */
8357#define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */
8358#define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308359 SSID and Security profile in
8360 WMI_ROAM_AP_PROFILE, found during scan
8361 triggered upon FINAL_BMISS **/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008362#define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */
Govind Singhd0c80a32016-02-01 17:57:48 +05308363
8364/*
8365 * WMI_ROAM_REASON_INVOKE_ROAM_FAIL:
8366 * Result code of WMI_ROAM_INVOKE_CMDID.
8367 * Any roaming failure before reassociation will be indicated to host
8368 * with this reason.
8369 * Any roaming failure after reassociation will be indicated to host with
8370 * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not.
8371 */
8372#define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6
Nirav Shah439e6262015-11-05 10:53:18 +05308373/* reserved up through 0xF */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008374
Nirav Shah439e6262015-11-05 10:53:18 +05308375/* subnet status: bits 4-5 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008376typedef enum {
8377 WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
8378 WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
8379 WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
8380} wmi_roam_subnet_change_status;
8381
Nirav Shah439e6262015-11-05 10:53:18 +05308382#define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30
8383#define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4
8384
8385#define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
8386 do { \
8387 (roam_reason) |= \
8388 (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
8389 WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
8390 } while (0)
8391
8392#define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
8393 (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
8394 WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
8395
Krishna Kumaar Natarajan79a2a082016-03-25 15:07:07 -07008396/* roaming notification */
8397/** invalid notification. Do not interpret notif field */
8398#define WMI_ROAM_NOTIF_INVALID 0x0
8399/** indicate that roaming is started. sent only in non WOW state */
8400#define WMI_ROAM_NOTIF_ROAM_START 0x1
8401/** indicate that roaming is aborted. sent only in non WOW state */
8402#define WMI_ROAM_NOTIF_ROAM_ABORT 0x2
8403
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008404/**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
8405 * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations
8406 */
8407typedef struct {
8408 A_UINT32 tlv_header;
8409 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
8410 A_UINT32 vdev_id;
8411 /**unique id identifying the VDEV, generated by the caller*/
8412 A_UINT32 num_ric_request;
8413 /**number of ric request ie send to firmware.(max value is 2 now)*/
8414 A_UINT32 is_add_ric;
8415 /**support add ric or delete ric*/
8416} wmi_ric_request_fixed_param;
8417
8418/**tspec element: refer to 8.4.2.32 of 802.11 2012 spec
8419 * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
8420 */
8421typedef struct {
8422 A_UINT32 tlv_header;
8423 A_UINT32 ts_info; /** bits value of TS Info field.*/
8424 A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/
8425 A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/
8426 A_UINT32 min_service_interval; /**The Minimum Service Interval field*/
8427 A_UINT32 max_service_interval; /**The Maximum Service Interval field*/
8428 A_UINT32 inactivity_interval; /**The Inactivity Interval field*/
8429 A_UINT32 suspension_interval; /**The Suspension Interval field*/
8430 A_UINT32 svc_start_time; /**The Service Start Time field*/
8431 A_UINT32 min_data_rate; /**The Minimum Data Rate field*/
8432 A_UINT32 mean_data_rate; /**The Mean Data Rate field*/
8433 A_UINT32 peak_data_rate; /**The Peak Data Rate field*/
8434 A_UINT32 max_burst_size; /**The Burst Size field*/
8435 A_UINT32 delay_bound; /**The Delay Bound field*/
8436 A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/
8437 A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
8438 A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/
8439} wmi_ric_tspec;
8440
8441/* flags for roam_invoke_cmd */
8442/* add this channel into roam cache channel list after this command is finished */
8443#define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0
Govind Singhd0c80a32016-02-01 17:57:48 +05308444/* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */
8445#define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE 1
Nitesh Shah3a943062016-06-29 20:28:43 +05308446/* during host-invoked roaming, don't send null data frame to AP */
8447#define WMI_ROAM_INVOKE_FLAG_NO_NULL_FRAME_TO_AP 2
8448/* from bit 3 to bit 31 are reserved */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008449
8450#define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
8451 (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308452 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008453
8454#define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
8455 (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308456 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008457
8458#define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308459 ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008460
8461
8462#define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */
8463#define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */
8464#define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */
8465
8466#define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */
8467#define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */
8468
8469/** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
8470 *
8471 * if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
8472 * if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
8473 *
8474 * This command can be used to add specific channel into roam cached channel list by following
8475 * <roam_scan_ch_mode> = 0
8476 * <roam_ap_sel_mode> = 0
8477 * <roam_delay> = 0
8478 * <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
8479 * <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
8480 * <channel_no> = channel list to be added
8481 */
8482typedef struct {
8483 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
8484 A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
8485 A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
8486 A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
8487 A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
8488 A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
8489 A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
8490 A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */
8491 /**
8492 * TLV (tag length value ) parameters follows roam_invoke_req
8493 * The TLV's are:
8494 * A_UINT32 channel_list[];
8495 * wmi_mac_addr bssid_list[];
8496 */
8497} wmi_roam_invoke_cmd_fixed_param;
8498
8499/* Definition for op_bitmap */
8500enum {
8501 ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1,
8502 ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2,
8503 ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
8504};
8505
8506typedef struct {
8507 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
8508 A_UINT32 tlv_header;
8509 /** Unique id identifying the VDEV on which roaming filter is adopted */
8510 A_UINT32 vdev_id;
8511 A_UINT32 flags; /** flags for filter */
8512 /** 32 bit bitmap to be set on.
8513 * bit0 = first param,
8514 * bit 1 = second param...etc. Can be or'ed
8515 */
8516 A_UINT32 op_bitmap;
8517 /* number of blacklist in the TLV variable bssid_black_list */
8518 A_UINT32 num_bssid_black_list;
8519 /* number of whitelist in the TLV variable ssid_white_list */
8520 A_UINT32 num_ssid_white_list;
8521 /* only for lfr 3.0. number of preferred list & factor in the TLV */
8522 A_UINT32 num_bssid_preferred_list;
8523 /**
8524 * TLV (tag length value ) parameters follows roam_filter_list_cmd
8525 * The TLV's are:
8526 * wmi_mac_addr bssid_black_list[];
8527 * wmi_ssid ssid_white_list[];
8528 * wmi_mac_addr bssid_preferred_list[];
8529 * A_UINT32 bssid_preferred_factor[];
8530 */
8531} wmi_roam_filter_fixed_param;
8532
8533typedef struct {
8534 A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
8535} WMI_IPV4_ADDR;
8536
8537typedef struct _WMI_IPV6_ADDR {
8538 A_UINT8 address[16]; /* IPV6 in Network Byte Order */
8539} WMI_IPV6_ADDR;
8540
8541/* flags for subnet change detection */
8542#define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
8543#define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
8544/* bit 2 to bit 31 are reserved */
8545
8546/* set IPv4 enabled/disabled flag and get the flag */
8547#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
8548 (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
8549} while (0)
8550
8551#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
8552 (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
8553} while (0)
8554
8555#define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
8556 ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
8557
8558/* set IPv6 enabled flag, disabled and get the flag */
8559#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
8560 (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
8561} while (0)
8562
8563#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
8564 (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
8565} while (0)
8566
8567#define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
8568 ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
8569
8570/**
8571 * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
8572 * to FW. FW uses these parameters for subnet change detection.
8573 */
8574typedef struct {
8575 /*
8576 * TLV tag and len; tag equals
8577 * WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param
8578 */
8579 A_UINT32 tlv_header;
8580 /** unique id identifying the VDEV, generated by the caller */
8581 A_UINT32 vdev_id;
8582 /** IPv4/IPv6 enabled/disabled */
8583 /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/
8584 DISABLED */
8585 A_UINT32 flag;
8586 /** Gateway MAC address */
8587 wmi_mac_addr inet_gw_mac_addr;
8588 /** IP addresses */
8589 WMI_IPV4_ADDR inet_gw_ip_v4_addr;
8590 WMI_IPV6_ADDR inet_gw_ip_v6_addr;
8591 /** Number of software retries for ARP/Neighbor solicitation request */
8592 A_UINT32 max_retries;
8593 /** timeout in milliseconds for each ARP request*/
8594 A_UINT32 timeout;
8595 /** number of skipped aps **/
8596 A_UINT32 num_skip_subnet_change_detection_bssid_list;
8597/**
8598 * TLV (tag length value ) parameters follows roam_subnet_change_config_cmd
8599 * structure. The TLV's are:
8600 * wmi_mac_addr skip_subnet_change_detection_bssid_list [];
8601 **/
8602} wmi_roam_subnet_change_config_fixed_param;
8603
8604/** WMI_PROFILE_MATCH_EVENT: offload scan
8605 * generated when ever atleast one of the matching profiles is found
8606 * in recent NLO scan. no data is carried with the event.
8607 */
8608
8609/** P2P specific commands */
8610
8611/**
8612 * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
8613 * FW to generate P2P IE tobe carried in probe response frames.
8614 * FW will respond to probe requests while in listen state.
8615 */
8616typedef struct {
8617 /* number of secondary device types,supported */
8618 A_UINT32 num_secondary_dev_types;
8619 /**
8620 * followed by 8 bytes of primary device id and
8621 * num_secondary_dev_types * 8 bytes of secondary device
8622 * id.
8623 */
8624} wmi_p2p_dev_set_device_info;
8625
8626/** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
8627 * state. if enabled, an active STA/AP will respond to P2P probe requests on
8628 * the operating channel of the VDEV.
8629 */
8630
8631typedef struct {
8632 /* 1:enable disoverability, 0:disable discoverability */
8633 A_UINT32 enable_discoverability;
8634} wmi_p2p_set_discoverability;
8635
8636/** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
8637 * beacons generated by FW. used in FW beacon mode.
8638 * the FW will add this IE to beacon in addition to the beacon
8639 * template set by WMI_BCN_TMPL_CMDID command.
8640 */
8641typedef struct {
8642 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */
8643 /** unique id identifying the VDEV, generated by the caller */
8644 A_UINT32 vdev_id;
8645 /* ie length */
8646 A_UINT32 ie_buf_len;
8647 /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
8648 * A_UINT8 ie_data[]; // length in byte given by field num_data.
8649 */
8650
8651} wmi_p2p_go_set_beacon_ie_fixed_param;
8652
8653/** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
8654 * probe response generated by FW. used in FW beacon mode.
8655 * the FW will add this IE to probe response in addition to the probe response
8656 * template set by WMI_PRB_TMPL_CMDID command.
8657 */
8658typedef struct {
8659 /** unique id identifying the VDEV, generated by the caller */
8660 A_UINT32 vdev_id;
8661 /* ie length */
8662 A_UINT32 ie_buf_len;
8663 /*followed by byte stream of ie data of length ie_buf_len */
8664} wmi_p2p_go_set_probe_resp_ie;
8665
8666/** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
8667 * be used by the FW to parse the P2P NoA attribute in beacons, probe resposes
8668 * and action frames received by the P2P Client.
8669 */
8670typedef struct {
8671 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
8672 /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */
8673 A_UINT32 p2p_ie_oui_type;
8674 /** OS specific NoA Attribute ID */
8675 A_UINT32 p2p_noa_attribute;
8676} wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
8677
8678/*----P2P disc offload definition ----*/
8679
8680typedef struct {
8681 A_UINT32 pattern_type;
8682 /**
8683 * TLV (tag length value ) paramerters follow the pattern structure.
8684 * TLV can contain bssid list, ssid list and
8685 * ie. the TLV tags are defined above;
8686 */
8687} wmi_p2p_disc_offload_pattern_cmd;
8688
8689typedef struct {
8690 /* unique id identifying the VDEV, generated by the caller */
8691 A_UINT32 vdev_id;
8692 /* mgmt type of the ie */
8693 A_UINT32 mgmt_type;
8694 /* ie length */
8695 A_UINT32 ie_buf_len;
8696 /*followed by byte stream of ie data of length ie_buf_len */
8697} wmi_p2p_disc_offload_appie_cmd;
8698
8699typedef struct {
8700 /* enable/disable p2p find offload */
8701 A_UINT32 enable;
8702 /* unique id identifying the VDEV, generated by the caller */
8703 A_UINT32 vdev_id;
8704 /* p2p find type */
8705 A_UINT32 disc_type;
8706 /* p2p find perodic */
8707 A_UINT32 perodic;
8708 /* p2p find listen channel */
8709 A_UINT32 listen_channel;
8710 /* p2p find full channel number */
8711 A_UINT32 num_scan_chans;
8712 /**
8713 * TLV (tag length value ) paramerters follow the pattern structure.
8714 * TLV contain channel list
8715 */
8716} wmi_p2p_disc_offload_config_cmd;
8717
8718/*----P2P OppPS definition ----*/
8719typedef struct {
8720 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */
8721 A_UINT32 tlv_header;
8722 /* unique id identifying the VDEV, generated by the caller */
8723 A_UINT32 vdev_id;
8724 /* OppPS attributes */
8725 /** Bit 0: Indicate enable/disable of OppPS
8726 * Bits 7-1: Ctwindow in TUs
8727 * Bits 31-8: Reserved
8728 */
8729 A_UINT32 oppps_attr;
8730} wmi_p2p_set_oppps_cmd_fixed_param;
8731
8732#define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1
8733#define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0
8734
8735#define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \
8736 WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
8737
8738#define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \
8739 WMI_F_RMW((hdr)->oppps_attr, 0x1, \
8740 WMI_UNIFIED_OPPPS_ATTR_ENALBED);
8741
8742#define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe
8743#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1
8744
8745#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \
8746 WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
8747
8748#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \
8749 WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \
8750 WMI_UNIFIED_OPPPS_ATTR_CTWIN);
8751
Himanshu Agarwalf7bb67b2016-05-30 21:04:30 +05308752typedef enum p2p_lo_start_ctrl_flags_e {
8753 /* flush prob. req when host is awake */
8754 P2P_LO_START_CTRL_FLAG_FLUSH_LISTEN_RESULT = 1 << 0,
8755} p2p_lo_start_ctrl_flags;
8756
8757typedef struct {
8758 A_UINT32 tlv_header;
8759 A_UINT32 vdev_id;
8760 A_UINT32 ctl_flags; /* refer to enum_p2p_lo_start_ctrl_flags_e */
8761 A_UINT32 channel; /* MHz */
8762 A_UINT32 period; /* ms */
8763 A_UINT32 interval; /* ms, interval should be larger than period */
8764 A_UINT32 count; /* 0 means forever */
8765 /*
8766 * device_types_len specifies the number of bytes in the
8767 * device_types_data[] byte-array TLV that follows this TLV.
8768 * The data in device_types_data[] is in 8-byte elements, so
8769 * device_types_len will be a multiple of 8.
8770 */
8771 A_UINT32 device_types_len;
8772 /*
8773 * prob_resp_len specifies the number of bytes in the
8774 * prob_resp_data[] byte-array TLV that follows this TLV.
8775 */
8776 A_UINT32 prob_resp_len;
8777 /*
8778 * Two other TLVs follow this TLV:
8779 * A_UINT8 device_types_data[device_types_len];
8780 * A_UINT8 prob_resp_data[prob_resp_len];
8781 * The information in device_types_data[] and prob_resp_data[]
8782 * needs to be provided to the target in over-the-air byte order.
8783 * On a big-endian host, if device_types_data and prob_resp_data
8784 * are initially in the correct over-the-air byte order,
8785 * the automatic byteswap for endianness-correction during WMI
8786 * message download will mess up the byte order.
8787 * Thus, a big-endian host needs to explicitly byte-swap the bytes
8788 * within each quad-byte segment of device_types_data[] and
8789 * prob_resp_data[], so that the automatic byte-swap applied during
8790 * WMI download from a big-endian host to the little-endian target
8791 * will restore device_types_data and prob_resp_data into the
8792 * correct byte ordering.
8793 */
8794} wmi_p2p_lo_start_cmd_fixed_param;
8795
8796typedef struct {
8797 A_UINT32 tlv_header;
8798 A_UINT32 vdev_id;
8799} wmi_p2p_lo_stop_cmd_fixed_param;
8800
8801typedef enum p2p_lo_stopped_reason_e {
8802 /* finished as scheduled */
8803 P2P_LO_STOPPED_REASON_COMPLETE = 0,
8804 /* host stops it */
8805 P2P_LO_STOPPED_REASON_RECV_STOP_CMD,
8806 /* invalid listen offload par */
8807 P2P_LO_STOPPED_REASON_INVALID_LO_PAR,
8808 /* vdev cannot support it right now */
8809 P2P_LO_STOPPED_REASON_FW_NOT_SUPPORT,
8810} p2p_lo_stopped_reason;
8811
8812typedef struct {
8813 A_UINT32 tlv_header;
8814 A_UINT32 vdev_id;
8815 A_UINT32 reason; /* refer to p2p_lo_stopped_reason_e */
8816} wmi_p2p_lo_stopped_event_fixed_param;
8817
Anurag Chouhan11b53a12016-07-28 12:39:46 +05308818typedef enum {
8819 WMI_MNT_FILTER_CONFIG_MANAGER,
8820 WMI_MNT_FILTER_CONFIG_CONTROL,
8821 WMI_MNT_FILTER_CONFIG_DATA,
8822 WMI_MNT_FILTER_CONFIG_ALL,
8823 WMI_MNT_FILTER_CONFIG_UNKNOWN,
8824} WMI_MNT_FILTER_CONFIG_TYPE;
8825
8826typedef struct {
8827 A_UINT32 tlv_header;
8828 A_UINT32 vdev_id;
8829 A_UINT32 clear_or_set;
8830 A_UINT32 configure_type; /* see WMI_MNT_FILTER_CONFIG_TYPE */
8831} wmi_mnt_filter_cmd_fixed_param;
8832
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008833typedef struct {
8834 A_UINT32 time32; /* upper 32 bits of time stamp */
8835 A_UINT32 time0; /* lower 32 bits of time stamp */
8836} A_TIME64;
8837
8838typedef enum wmi_peer_sta_kickout_reason {
8839 WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */
8840 WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
8841 WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
8842 WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
8843 WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */
8844 WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
8845} PEER_KICKOUT_REASON;
8846
8847typedef struct {
8848 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */
8849 /** peer mac address */
8850 wmi_mac_addr peer_macaddr;
8851 /** Reason code, defined as above */
8852 A_UINT32 reason;
8853 /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
8854 A_UINT32 rssi;
8855} wmi_peer_sta_kickout_event_fixed_param;
8856
8857#define WMI_WLAN_PROFILE_MAX_HIST 3
8858#define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
8859
8860typedef struct _wmi_wlan_profile_t {
8861 A_UINT32 tlv_header;
8862 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
8863 A_UINT32 id;
8864 A_UINT32 cnt;
8865 A_UINT32 tot;
8866 A_UINT32 min;
8867 A_UINT32 max;
8868 A_UINT32 hist_intvl;
8869 A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
8870} wmi_wlan_profile_t;
8871
8872typedef struct _wmi_wlan_profile_ctx_t {
8873 A_UINT32 tlv_header;
8874 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
8875 A_UINT32 tot; /* time in us */
8876 A_UINT32 tx_msdu_cnt;
8877 A_UINT32 tx_mpdu_cnt;
8878 A_UINT32 tx_ppdu_cnt;
8879 A_UINT32 rx_msdu_cnt;
8880 A_UINT32 rx_mpdu_cnt;
8881 A_UINT32 bin_count;
8882} wmi_wlan_profile_ctx_t;
8883
8884typedef struct {
8885 A_UINT32 tlv_header;
8886 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
8887 A_UINT32 enable;
8888} wmi_wlan_profile_trigger_cmd_fixed_param;
8889
8890typedef struct {
8891 A_UINT32 tlv_header;
8892 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
8893 A_UINT32 value;
8894} wmi_wlan_profile_get_prof_data_cmd_fixed_param;
8895
8896typedef struct {
8897 A_UINT32 tlv_header;
8898 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
8899 A_UINT32 profile_id;
8900 A_UINT32 value;
8901} wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
8902
8903typedef struct {
8904 A_UINT32 tlv_header;
8905 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
8906 A_UINT32 profile_id;
8907 A_UINT32 enable;
8908} wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
8909
8910/*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
8911 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
8912 when comparing wifi header.*/
8913/* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
8914#define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146
8915#define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
8916#define WOW_DEFAULT_BITMASK_SIZE 146
8917#define WOW_DEFAULT_BITMASK_SIZE_DWORD 37
8918#define WOW_MAX_BITMAP_FILTERS 32
8919#define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16
8920#define WOW_EXTEND_PATTERN_MATCH_CNT 16
8921#define WOW_SHORT_PATTERN_MATCH_CNT 8
8922#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 +05308923 The 148 comes from (128 - 14 ) payload size + 8bytes LLC + 26bytes MAC header */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008924#define WOW_DEFAULT_IOAC_PATTERN_SIZE 6
8925#define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
8926#define WOW_DEFAULT_IOAC_RANDOM_SIZE 6
8927#define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
8928#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120
8929#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
8930#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32
8931#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
8932#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32
8933#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08008934#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128
8935#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008936
8937typedef enum pattern_type_e {
8938 WOW_PATTERN_MIN = 0,
8939 WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
8940 WOW_IPV4_SYNC_PATTERN,
8941 WOW_IPV6_SYNC_PATTERN,
8942 WOW_WILD_CARD_PATTERN,
8943 WOW_TIMER_PATTERN,
8944 WOW_MAGIC_PATTERN,
8945 WOW_IPV6_RA_PATTERN,
8946 WOW_IOAC_PKT_PATTERN,
8947 WOW_IOAC_TMR_PATTERN,
8948 WOW_IOAC_SOCK_PATTERN,
8949 WOW_PATTERN_MAX
8950} WOW_PATTERN_TYPE;
8951
8952typedef enum event_type_e {
8953 WOW_BMISS_EVENT = 0,
8954 WOW_BETTER_AP_EVENT,
8955 WOW_DEAUTH_RECVD_EVENT,
8956 WOW_MAGIC_PKT_RECVD_EVENT,
8957 WOW_GTK_ERR_EVENT,
8958 WOW_FOURWAY_HSHAKE_EVENT,
8959 WOW_EAPOL_RECVD_EVENT,
8960 WOW_NLO_DETECTED_EVENT,
8961 WOW_DISASSOC_RECVD_EVENT,
8962 WOW_PATTERN_MATCH_EVENT,
8963 WOW_CSA_IE_EVENT,
8964 WOW_PROBE_REQ_WPS_IE_EVENT,
8965 WOW_AUTH_REQ_EVENT,
8966 WOW_ASSOC_REQ_EVENT,
8967 WOW_HTT_EVENT,
8968 WOW_RA_MATCH_EVENT,
8969 WOW_HOST_AUTO_SHUTDOWN_EVENT,
8970 WOW_IOAC_MAGIC_EVENT,
8971 WOW_IOAC_SHORT_EVENT,
8972 WOW_IOAC_EXTEND_EVENT,
8973 WOW_IOAC_TIMER_EVENT,
8974 WOW_DFS_PHYERR_RADAR_EVENT,
8975 WOW_BEACON_EVENT,
8976 WOW_CLIENT_KICKOUT_EVENT,
8977 WOW_NAN_EVENT,
8978 WOW_EXTSCAN_EVENT,
8979 WOW_IOAC_REV_KA_FAIL_EVENT,
8980 WOW_IOAC_SOCK_EVENT,
8981 WOW_NLO_SCAN_COMPLETE_EVENT,
Govind Singh941bd5e2016-02-04 17:15:25 +05308982 WOW_NAN_DATA_EVENT,
Himanshu Agarwal82972fd2016-05-20 12:23:43 +05308983 WOW_NAN_RTT_EVENT, /* DEPRECATED, UNUSED */
8984 /* reuse deprecated event value */
8985 WOW_OEM_RESPONSE_EVENT = WOW_NAN_RTT_EVENT,
Krishna Kumaar Natarajan3bd73642016-03-25 13:59:54 -07008986 WOW_TDLS_CONN_TRACKER_EVENT,
Anurag Chouhan05d05fe2016-04-18 17:09:24 +05308987 WOW_CRITICAL_LOG_EVENT,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008988} WOW_WAKE_EVENT_TYPE;
8989
8990typedef enum wake_reason_e {
8991 WOW_REASON_UNSPECIFIED = -1,
8992 WOW_REASON_NLOD = 0,
8993 WOW_REASON_AP_ASSOC_LOST,
8994 WOW_REASON_LOW_RSSI,
8995 WOW_REASON_DEAUTH_RECVD,
8996 WOW_REASON_DISASSOC_RECVD,
8997 WOW_REASON_GTK_HS_ERR,
8998 WOW_REASON_EAP_REQ,
8999 WOW_REASON_FOURWAY_HS_RECV,
9000 WOW_REASON_TIMER_INTR_RECV,
9001 WOW_REASON_PATTERN_MATCH_FOUND,
9002 WOW_REASON_RECV_MAGIC_PATTERN,
9003 WOW_REASON_P2P_DISC,
9004 WOW_REASON_WLAN_HB,
9005 WOW_REASON_CSA_EVENT,
9006 WOW_REASON_PROBE_REQ_WPS_IE_RECV,
9007 WOW_REASON_AUTH_REQ_RECV,
9008 WOW_REASON_ASSOC_REQ_RECV,
9009 WOW_REASON_HTT_EVENT,
9010 WOW_REASON_RA_MATCH,
9011 WOW_REASON_HOST_AUTO_SHUTDOWN,
9012 WOW_REASON_IOAC_MAGIC_EVENT,
9013 WOW_REASON_IOAC_SHORT_EVENT,
9014 WOW_REASON_IOAC_EXTEND_EVENT,
9015 WOW_REASON_IOAC_TIMER_EVENT,
9016 WOW_REASON_ROAM_HO,
9017 WOW_REASON_DFS_PHYERR_RADADR_EVENT,
9018 WOW_REASON_BEACON_RECV,
9019 WOW_REASON_CLIENT_KICKOUT_EVENT,
9020 WOW_REASON_NAN_EVENT,
9021 WOW_REASON_EXTSCAN,
9022 WOW_REASON_RSSI_BREACH_EVENT,
9023 WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
9024 WOW_REASON_IOAC_SOCK_EVENT,
9025 WOW_REASON_NLO_SCAN_COMPLETE,
9026 WOW_REASON_PACKET_FILTER_MATCH,
9027 WOW_REASON_ASSOC_RES_RECV,
9028 WOW_REASON_REASSOC_REQ_RECV,
9029 WOW_REASON_REASSOC_RES_RECV,
9030 WOW_REASON_ACTION_FRAME_RECV,
Manikandan Mohan130eb572015-12-23 13:53:34 -08009031 WOW_REASON_BPF_ALLOW,
Govind Singh941bd5e2016-02-04 17:15:25 +05309032 WOW_REASON_NAN_DATA,
Himanshu Agarwal82972fd2016-05-20 12:23:43 +05309033 WOW_REASON_NAN_RTT, /* DEPRECATED, UNUSED */
9034 /* reuse deprecated reason value */
9035 WOW_REASON_OEM_RESPONSE_EVENT = WOW_REASON_NAN_RTT,
Krishna Kumaar Natarajan3bd73642016-03-25 13:59:54 -07009036 WOW_REASON_TDLS_CONN_TRACKER_EVENT,
Anurag Chouhan05d05fe2016-04-18 17:09:24 +05309037 WOW_REASON_CRITICAL_LOG,
Himanshu Agarwalf7bb67b2016-05-30 21:04:30 +05309038 WOW_REASON_P2P_LISTEN_OFFLOAD,
Nitesh Shah44611be2016-07-21 15:27:37 +05309039 WOW_REASON_NAN_EVENT_WAKE_HOST,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009040 WOW_REASON_DEBUG_TEST = 0xFF,
9041} WOW_WAKE_REASON_TYPE;
9042
9043typedef enum {
9044 WOW_IFACE_PAUSE_ENABLED,
9045 WOW_IFACE_PAUSE_DISABLED
9046} WOW_IFACE_STATUS;
9047
9048enum {
9049 /* some win10 platfrom will not assert pcie_reset for wow.*/
9050 WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001,
Govind Singhb5158e22016-02-04 15:38:30 +05309051 /*
9052 * WMI_WOW_FLAG_SEND_PM_PME
9053 * Some platforms have issues if the PM_PME message is sent after WoW,
9054 * so don't send PM_PME after WoW unless the host uses this flag
9055 * to request it.
9056 */
9057 WMI_WOW_FLAG_SEND_PM_PME = 0x00000002,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009058};
9059
9060
9061typedef struct {
9062 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */
9063 A_UINT32 enable;
9064 A_UINT32 pause_iface_config;
9065 A_UINT32 flags; /* WMI_WOW_FLAG enums */
9066} wmi_wow_enable_cmd_fixed_param;
9067
9068typedef struct {
9069 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */
9070 /** Reserved for future use */
9071 A_UINT32 reserved0;
9072} wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
9073
9074#define WOW_ICMPV6_NA_FILTER_DISABLE 0
9075#define WOW_ICMPV6_NA_FILTER_ENABLE 1
9076
9077typedef struct {
9078 /* TLV tag and len;
9079 * tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param
9080 */
9081 A_UINT32 tlv_header;
9082 A_UINT32 vdev_id;
9083 A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
9084} wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
9085
9086typedef struct bitmap_pattern_s {
9087 A_UINT32 tlv_header;
9088 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
9089 A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
9090 A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
9091 A_UINT32 pattern_offset;
9092 A_UINT32 pattern_len;
9093 A_UINT32 bitmask_len;
9094 A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
9095} WOW_BITMAP_PATTERN_T;
9096
9097typedef struct ipv4_sync_s {
9098 A_UINT32 tlv_header;
9099 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
9100 A_UINT32 ipv4_src_addr;
9101 A_UINT32 ipv4_dst_addr;
9102 A_UINT32 tcp_src_prt;
9103 A_UINT32 tcp_dst_prt;
9104} WOW_IPV4_SYNC_PATTERN_T;
9105
9106typedef struct ipv6_sync_s {
9107 A_UINT32 tlv_header;
9108 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
9109 A_UINT32 ipv6_src_addr[4];
9110 A_UINT32 ipv6_dst_addr[4];
9111 A_UINT32 tcp_src_prt;
9112 A_UINT32 tcp_dst_prt;
9113} WOW_IPV6_SYNC_PATTERN_T;
9114
9115typedef struct WOW_MAGIC_PATTERN_CMD {
9116 A_UINT32 tlv_header;
9117 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
9118 wmi_mac_addr macaddr;
9119} WOW_MAGIC_PATTERN_CMD;
9120
9121typedef enum wow_ioac_pattern_type {
9122 WOW_IOAC_MAGIC_PATTERN = 1,
9123 WOW_IOAC_SHORT_PATTERN,
9124 WOW_IOAC_EXTEND_PATTERN,
9125} WOW_IOAC_PATTERN_TYPE;
9126
9127typedef struct ioac_sock_pattern_s {
9128 /**
9129 * TLV tag and len;
9130 * tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T
9131 */
9132 A_UINT32 tlv_header;
9133 A_UINT32 id;
9134 A_UINT32 local_ipv4;
9135 A_UINT32 remote_ipv4;
9136 A_UINT32 local_port;
9137 A_UINT32 remote_port;
9138 A_UINT32 pattern_len; /* units = bytes */
9139 A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08009140 WMI_IPV6_ADDR local_ipv6;
9141 WMI_IPV6_ADDR remote_ipv6;
9142 A_UINT32 ack_nak_len;
9143 A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
9144 A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009145} WOW_IOAC_SOCK_PATTERN_T;
9146
9147typedef struct ioac_pkt_pattern_s {
9148 A_UINT32 tlv_header;
9149 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
9150 A_UINT32 pattern_type;
9151 A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
9152 A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
9153 A_UINT32 pattern_len;
9154 A_UINT32 random_len;
9155} WOW_IOAC_PKT_PATTERN_T;
9156
9157typedef struct ioac_tmr_pattern_s {
9158 A_UINT32 tlv_header;
9159 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
9160 A_UINT32 wake_in_s;
9161 A_UINT32 vdev_id;
9162} WOW_IOAC_TMR_PATTERN_T;
9163
9164typedef struct {
9165 A_UINT32 tlv_header;
9166 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
9167 A_UINT32 nID;
9168} WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
9169
9170typedef struct {
9171 A_UINT32 tlv_header;
9172 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
9173 A_UINT32 nID;
9174} WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
9175
9176typedef struct ioac_keepalive_s {
9177 A_UINT32 tlv_header;
9178 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
9179 A_UINT32
9180 keepalive_pkt_buf
9181 [WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
9182 A_UINT32 keepalive_pkt_len;
9183 A_UINT32 period_in_ms;
9184 A_UINT32 vdev_id;
9185 A_UINT32 max_loss_cnt;
9186 A_UINT32 local_ipv4;
9187 A_UINT32 remote_ipv4;
9188 A_UINT32 local_port;
9189 A_UINT32 remote_port;
9190 A_UINT32 recv_period_in_ms;
9191 A_UINT32 rev_ka_size;
9192 A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08009193 WMI_IPV6_ADDR local_ipv6;
9194 WMI_IPV6_ADDR remote_ipv6;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009195} WMI_WOW_IOAC_KEEPALIVE_T;
9196
9197typedef struct {
9198 A_UINT32 tlv_header;
9199 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
9200 A_UINT32 vdev_id;
9201 A_UINT32 pattern_type;
9202/*
9203 * Following this struct are these TLVs. Note that they are all array of structures
9204 * but can have at most one element. Which TLV is empty or has one element depends
9205 * on the field pattern_type. This is to emulate an union.
9206 * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
9207 * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
9208 */
9209} WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
9210
9211typedef struct {
9212 A_UINT32 tlv_header;
9213 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
9214 A_UINT32 vdev_id;
9215 A_UINT32 pattern_type;
9216 A_UINT32 pattern_id;
9217} WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
9218
9219typedef struct {
9220 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
9221 A_UINT32 vdev_id;
9222 A_UINT32 pattern_id;
9223 A_UINT32 pattern_type;
9224 /*
9225 * Following this struct are these TLVs. Note that they are all array of structures
9226 * but can have at most one element. Which TLV is empty or has one element depends
9227 * on the field pattern_type. This is to emulate an union.
9228 * WOW_BITMAP_PATTERN_T pattern_info_bitmap[];
9229 * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[];
9230 * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[];
9231 * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[];
9232 * A_UINT32 pattern_info_timeout[];
9233 * A_UINT32 ra_ratelimit_interval;
9234 */
9235} WMI_WOW_ADD_PATTERN_CMD_fixed_param;
9236
9237typedef struct {
9238 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
9239 A_UINT32 vdev_id;
9240 A_UINT32 pattern_id;
9241 A_UINT32 pattern_type;
9242} WMI_WOW_DEL_PATTERN_CMD_fixed_param;
9243
Himanshu Agarwal2690e462016-06-03 14:26:01 +05309244#define WMI_WOW_MAX_EVENT_BM_LEN 4
9245
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009246typedef struct {
9247 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */
9248 A_UINT32 vdev_id;
9249 A_UINT32 is_add;
Himanshu Agarwal2690e462016-06-03 14:26:01 +05309250 union {
9251 A_UINT32 event_bitmap;
9252 A_UINT32 event_bitmaps[WMI_WOW_MAX_EVENT_BM_LEN];
9253 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009254} WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
9255
9256/*
9257 * This structure is used to set the pattern to check UDP packet in WOW mode.
9258 * If match, construct a tx frame in a local buffer to send through the peer
9259 * AP to the entity in the IP network that sent the UDP packet to this STA.
9260 */
9261typedef struct {
9262 /*
9263 * TLV tag and len;
9264 * tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param
9265 */
9266 A_UINT32 tlv_header;
9267 A_UINT32 vdev_id;
9268 A_UINT32 enable; /* 1: enable, 0: disable */
9269 /*
9270 * dest_port -
9271 * bits 7:0 contain the LSB of the UDP dest port,
9272 * bits 15:8 contain the MSB of the UDP dest port
9273 */
9274 A_UINT32 dest_port;
9275 A_UINT32 pattern_len; /* length in byte of pattern[] */
9276 A_UINT32 response_len; /* length in byte of response[] */
9277 /*
9278 * Following this struct are the TLV's:
9279 * payload of UDP packet to be checked, network byte order
9280 * A_UINT8 pattern[];
9281 * payload of UDP packet to be response, network byte order
9282 * A_UINT8 response[];
9283 */
9284} WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
9285
9286/*
9287 * This structure is used to set the pattern for WOW host wakeup pin pulse
9288 * pattern confirguration.
9289 */
9290typedef struct {
9291 /*
9292 * TLV tag and len; tag equals
9293 * WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param
9294 */
9295 A_UINT32 tlv_header;
9296
9297 /* 1: enable, 0: disable */
9298 A_UINT32 enable;
9299
9300 /* pin for host wakeup */
9301 A_UINT32 pin;
9302
9303 /* interval for keeping low voltage, unit: ms */
9304 A_UINT32 interval_low;
9305
9306 /* interval for keeping high voltage, unit: ms */
9307 A_UINT32 interval_high;
9308
9309 /* repeat times for pulse (0xffffffff means forever) */
9310 A_UINT32 repeat_cnt;
9311} WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
9312
Anurag Chouhan86eab9b2016-04-21 16:22:47 +05309313#define MAX_SUPPORTED_ACTION_CATEGORY 256
9314#define MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST (MAX_SUPPORTED_ACTION_CATEGORY/32)
9315
9316typedef enum {
9317 WOW_ACTION_WAKEUP_OPERATION_RESET = 0,
9318 WOW_ACTION_WAKEUP_OPERATION_SET,
9319 WOW_ACTION_WAKEUP_OPERATION_ADD_SET,
9320 WOW_ACTION_WAKEUP_OPERATION_DELETE_SET,
9321} WOW_ACTION_WAKEUP_OPERATION;
9322
9323typedef struct {
9324 /*
9325 * TLV tag and len; tag equals
9326 * WMITLV_TAG_STRUC_WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param
9327 */
9328 A_UINT32 tlv_header;
9329 A_UINT32 vdev_id;
9330 /*
9331 * 0 reset to fw default, 1 set the bits, 2 add the setting bits,
9332 * 3 delete the setting bits
9333 */
9334 A_UINT32 operation;
9335 A_UINT32 action_category_map[MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST];
9336} WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param;
9337
9338
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009339typedef struct wow_event_info_s {
9340 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */
9341 A_UINT32 vdev_id;
9342 A_UINT32 flag; /*This is current reserved. */
9343 A_INT32 wake_reason;
9344 A_UINT32 data_len;
9345} WOW_EVENT_INFO_fixed_param;
9346
9347typedef struct wow_initial_wakeup_event_s {
9348 /*
9349 * TLV tag and len; tag equals
9350 * WOW_INITIAL_WAKEUP_EVENT_fixed_param
9351 */
9352 A_UINT32 tlv_header;
9353 A_UINT32 vdev_id;
9354} WOW_INITIAL_WAKEUP_EVENT_fixed_param;
9355
9356typedef enum {
9357 WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
9358 WOW_EVENT_INFO_TYPE_BITMAP,
9359 WOW_EVENT_INFO_TYPE_GTKIGTK,
9360} WOW_EVENT_INFO_TYPE;
9361
9362typedef struct wow_event_info_section_s {
9363 A_UINT32 data_type;
9364 A_UINT32 data_len;
9365} WOW_EVENT_INFO_SECTION;
9366
9367typedef struct wow_event_info_section_packet_s {
9368 A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
9369} WOW_EVENT_INFO_SECTION_PACKET;
9370
9371typedef struct wow_event_info_section_bitmap_s {
9372 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */
9373 A_UINT32 flag; /*This is current reserved. */
9374 A_UINT32 value; /*This could be the pattern id for bitmap pattern. */
9375 A_UINT32 org_len; /*The length of the orginal packet. */
9376} WOW_EVENT_INFO_SECTION_BITMAP;
9377
9378/**
9379 * This command is sent from WLAN host driver to firmware to
9380 * enable or disable D0-WOW. D0-WOW means APSS suspend with
9381 * PCIe link and DDR being active.
9382 *
9383 *
9384 * Entering D0-WOW Mode (based on kernel suspend request):
9385 * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
9386 * target: Take action (e.g. dbglog suspend)
9387 * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
9388 *
9389 * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
9390 * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
9391 * target: Take action (e.g. dbglog resume)
9392 * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
9393 *
9394 * This command is applicable only on the PCIE LL systems
9395 * Host can enter either D0-WOW or WOW mode, but NOT both at same time
9396 * Decision to enter D0-WOW or WOW is based on active interfaces
9397 *
9398 */
9399typedef struct {
9400 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */
9401 A_UINT32 enable; /* 1 = enable, 0 = disable */
9402} wmi_d0_wow_enable_disable_cmd_fixed_param;
9403
9404typedef enum extend_wow_type_e {
9405 EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */
9406 EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */
9407 EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08009408 EXTWOW_TYPE_APP_PULSETEST,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009409 EXTWOW_DISABLED = 255,
9410} EXTWOW_TYPE;
9411
9412typedef struct {
9413 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */
9414 A_UINT32 vdev_id;
9415 A_UINT32 type;
9416 A_UINT32 wakeup_pin_num;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08009417 A_UINT32 swol_pulsetest_type;
9418 A_UINT32 swol_pulsetest_application;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009419} wmi_extwow_enable_cmd_fixed_param;
9420
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08009421#define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
9422#define SWOL_INDOOR_KEY_LEN 16
9423
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009424typedef struct {
9425 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */
9426 A_UINT32 vdev_id;
9427 wmi_mac_addr wakee_mac;
9428 A_UINT8 ident[8];
9429 A_UINT8 passwd[16];
9430 A_UINT32 ident_len;
9431 A_UINT32 passwd_len;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08009432
9433 /* indoor check parameters */
9434 /* key for mac addresses specified in swol_indoor_key_mac
9435 * Big-endian hosts need to byte-swap the bytes within each 4-byte
9436 * segment of this array, so the bytes will return to their original
9437 * order when the entire WMI message contents are byte-swapped to
9438 * convert from big-endian to little-endian format.
9439 */
9440 A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
9441 /* key length for specified mac address index
9442 * Big-endian hosts need to byte-swap the bytes within each 4-byte
9443 * segment of this array, so the bytes will return to their original
9444 * order when the entire WMI message contents are byte-swapped to
9445 * convert from big-endian to little-endian format.
9446 */
9447 A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
9448 /* mac address array allowed to wakeup host*/
9449 wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
9450 /* app mask for the mac addresses specified in swol_indoor_key_mac */
9451 A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
9452 A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
9453 A_UINT32 swol_indoor_pw_check; /* whether to check password */
9454 A_UINT32 swol_indoor_pattern; /* wakeup pattern */
9455 A_UINT32 swol_indoor_exception; /* wakeup when exception happens */
9456 A_UINT32 swol_indoor_exception_app;
Nitesh Shah8cb6a3d2016-07-08 11:38:02 +05309457 A_UINT32 swol_assist_enable; /* whether to enable IoT mode */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009458} wmi_extwow_set_app_type1_params_cmd_fixed_param;
9459
9460typedef struct {
9461 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */
9462 A_UINT32 vdev_id;
9463
9464 A_UINT8 rc4_key[16];
9465 A_UINT32 rc4_key_len;
9466
9467 /** ip header parameter */
9468 A_UINT32 ip_id; /* NC id */
9469 A_UINT32 ip_device_ip; /* NC IP address */
9470 A_UINT32 ip_server_ip; /* Push server IP address */
9471
9472 /** tcp header parameter */
9473 A_UINT16 tcp_src_port; /* NC TCP port */
9474 A_UINT16 tcp_dst_port; /* Push server TCP port */
9475 A_UINT32 tcp_seq;
9476 A_UINT32 tcp_ack_seq;
9477
9478 A_UINT32 keepalive_init; /* Initial ping interval */
9479 A_UINT32 keepalive_min; /* Minimum ping interval */
9480 A_UINT32 keepalive_max; /* Maximum ping interval */
9481 A_UINT32 keepalive_inc; /* Increment of ping interval */
9482
9483 wmi_mac_addr gateway_mac;
9484 A_UINT32 tcp_tx_timeout_val;
9485 A_UINT32 tcp_rx_timeout_val;
9486
9487 /** add extra parameter for backward-compatible */
9488 /*
9489 * For all byte arrays, natural order is used. E.g.
9490 * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
9491 * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
9492 */
9493
9494 /* used to encrypt transmit packet such as keep-alive */
9495 A_UINT8 rc4_write_sandbox[256];
9496 A_UINT32 rc4_write_x;
9497 A_UINT32 rc4_write_y;
9498
9499 /* used to decrypt received packet such as wow data */
9500 A_UINT8 rc4_read_sandbox[256];
9501 A_UINT32 rc4_read_x;
9502 A_UINT32 rc4_read_y;
9503
9504 /* used to caculate HMAC hash for transmit packet such as keep-alive */
9505 A_UINT8 ssl_write_seq[8];
9506 A_UINT8 ssl_sha1_write_key[64];
9507 A_UINT32 ssl_sha1_write_key_len;
9508
9509 /* used to calculate HAMC hash for receive packet such as wow data */
9510 A_UINT8 ssl_read_seq[8];
9511 A_UINT8 ssl_sha1_read_key[64];
9512 A_UINT32 ssl_sha1_read_key_len;
9513
9514 /* optional element for specifying TCP options data to include in
9515 * transmit packets such as keep-alive
9516 */
9517 A_UINT32 tcp_options_len;
9518 A_UINT8 tcp_options[40];
9519
9520 A_UINT32 async_id; /* keep-alive request id */
9521} wmi_extwow_set_app_type2_params_cmd_fixed_param;
9522
9523#define WMI_RXERR_CRC 0x01 /* CRC error on frame */
9524#define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
9525#define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */
9526#define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
9527
9528typedef enum {
9529 PKT_PWR_SAVE_PAID_MATCH = 0x0001,
9530 PKT_PWR_SAVE_GID_MATCH = 0x0002,
9531 PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x0004,
9532 PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x0008,
9533 PKT_PWR_SAVE_EOF_PAD_DELIM = 0x0010,
9534 PKT_PWR_SAVE_MACADDR_MISMATCH = 0x0020,
9535 PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x0040,
9536 PKT_PWR_SAVE_GID_NSTS_ZERO = 0x0080,
9537 PKT_PWR_SAVE_RSSI_CHECK = 0x0100,
9538 PKT_PWR_SAVE_5G_EBT = 0x0200,
9539 PKT_PWR_SAVE_2G_EBT = 0x0400,
9540 WMI_PKT_PWR_SAVE_MAX = 0x0800,
9541} WMI_PKT_PWR_SAVE_TYPE;
9542
9543typedef struct {
9544 A_UINT32 tlv_header;
9545 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
9546 A_UINT32 num_data;
9547 /** length in byte of data[]. */
Govind Singh869c9872016-02-22 18:36:34 +05309548 /** pdev_id for identifying the MAC
9549 * See macros starting with WMI_PDEV_ID_ for values.
9550 */
9551 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009552 /* This structure is used to send Factory Test Mode [FTM] command
9553 * from host to firmware for integrated chips which are binary blobs.
9554 * Following this structure is the TLV:
9555 * A_UINT8 data[]; // length in byte given by field num_data.
9556 */
9557} wmi_ftm_intg_cmd_fixed_param;
9558
9559typedef struct {
9560 A_UINT32 tlv_header;
9561 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
9562 A_UINT32 num_data;
9563 /** length in byte of data[]. */
9564 /* This structure is used to receive Factory Test Mode [FTM] event
9565 * from firmware to host for integrated chips which are binary blobs.
9566 * Following this structure is the TLV:
9567 * A_UINT8 data[]; // length in byte given by field num_data.
9568 */
9569} wmi_ftm_intg_event_fixed_param;
9570
9571#define WMI_MAX_NS_OFFLOADS 2
9572#define WMI_MAX_ARP_OFFLOADS 2
9573
9574#define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
9575#define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
9576#define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
9577
9578typedef struct {
9579 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
9580 A_UINT32 flags; /* flags */
9581 A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node */
9582 A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
9583 wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
9584} WMI_ARP_OFFLOAD_TUPLE;
9585
9586#define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
9587#define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
9588#define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
Govind Singh86180292016-02-01 14:03:37 +05309589/* whether the configured IPv6 address is anycast */
9590#define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009591
9592#define WMI_NSOFF_MAX_TARGET_IPS 2
9593
9594typedef struct {
9595 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
9596 A_UINT32 flags; /* flags */
9597 /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
9598 WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */
9599 WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
9600 WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
9601 wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
9602} WMI_NS_OFFLOAD_TUPLE;
9603
9604typedef struct {
9605 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
9606 A_UINT32 flags;
9607 A_UINT32 vdev_id;
9608 A_UINT32 num_ns_ext_tuples;
9609 /* Following this structure are the TLVs:
9610 * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS];
9611 * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
9612 * size of ns_ext_tuples is based on num_ns_ext_tuples
9613 * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[];
9614 */
9615} WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
9616
9617typedef struct {
9618 A_UINT32 tlv_header;
9619 A_UINT32 vdev_id;
9620 A_UINT32 pattern_id;
9621 A_UINT32 timeout;
9622 A_UINT32 length;
9623 /* Following this would be the pattern
9624 A_UINT8 pattern[] of length specifed by length
9625 field in the structure. */
9626} WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
9627
9628typedef struct {
9629 A_UINT32 tlv_header;
9630 A_UINT32 vdev_id;
9631 A_UINT32 pattern_id;
9632} WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
9633
9634typedef struct {
9635 A_UINT32 tlv_header;
9636 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
9637 /** unique id identifying the VDEV, generated by the caller */
9638 A_UINT32 vdev_id;
9639 /** peer MAC address */
9640 wmi_mac_addr peer_macaddr;
9641 /** Tid number */
9642 A_UINT32 tid;
9643 /** Initiator (1) or Responder (0) for this aggregation */
9644 A_UINT32 initiator;
9645 /** size of the negotiated window */
9646 A_UINT32 window_size;
9647 /** starting sequence number (only valid for initiator) */
9648 A_UINT32 ssn;
9649 /** timeout field represents the time to wait for Block Ack in
9650 * initiator case and the time to wait for BAR in responder
9651 * case. 0 represents no timeout. */
9652 A_UINT32 timeout;
9653 /* BA policy: immediate ACK (0) or delayed ACK (1) */
9654 A_UINT32 policy;
9655} wmi_peer_tid_addba_cmd_fixed_param;
9656
9657typedef struct {
9658 A_UINT32 tlv_header;
9659 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
9660 /** unique id identifying the VDEV, generated by the caller */
9661 A_UINT32 vdev_id;
9662 /** peer MAC address */
9663 wmi_mac_addr peer_macaddr;
9664 /** Tid number */
9665 A_UINT32 tid;
9666 /** Initiator (1) or Responder (0) for this aggregation */
9667 A_UINT32 initiator;
9668} wmi_peer_tid_delba_cmd_fixed_param;
9669
9670typedef struct {
9671 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
9672 /** unique id identifying the VDEV, generated by the caller */
9673 A_UINT32 vdev_id;
9674 /** peer MAC address */
9675 wmi_mac_addr peer_macaddr;
9676 /** Tid number */
9677 A_UINT32 tid;
9678 /** Event status */
9679 A_UINT32 status;
9680} wmi_tx_addba_complete_event_fixed_param;
9681
9682typedef struct {
9683 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
9684 /** unique id identifying the VDEV, generated by the caller */
9685 A_UINT32 vdev_id;
9686 /** peer MAC address */
9687 wmi_mac_addr peer_macaddr;
9688 /** Tid number */
9689 A_UINT32 tid;
9690 /** Event status */
9691 A_UINT32 status;
9692} wmi_tx_delba_complete_event_fixed_param;
9693/*
9694 * Structure to request sequence numbers for a given
9695 * peer station on different TIDs. The TIDs are
9696 * indicated in the tidBitMap, tid 0 would
9697 * be represented by LSB bit 0. tid 1 would be
9698 * represented by LSB bit 1 etc.
9699 * The target will retrieve the current sequence
9700 * numbers for the peer on all the TIDs requested
9701 * and send back a response in a WMI event.
9702 */
9703typedef struct {
9704 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309705 WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009706 wmi_mac_addr peer_macaddr;
9707 A_UINT32 tidBitmap;
9708} wmi_ba_req_ssn;
9709
9710typedef struct {
9711 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309712 WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009713 /** unique id identifying the VDEV, generated by the caller */
9714 A_UINT32 vdev_id;
9715 /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
9716 A_UINT32 num_ba_req_ssn;
9717/* Following this struc are the TLV's:
9718 * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
9719 */
9720} wmi_ba_req_ssn_cmd_fixed_param;
9721
9722/*
9723 * Max transmit categories
9724 *
9725 * Note: In future if we need to increase WMI_MAX_TC definition
9726 * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
9727 */
9728#define WMI_MAX_TC 8
9729
9730/*
9731 * Structure to send response sequence numbers
9732 * for a give peer and tidmap.
9733 */
9734typedef struct {
9735 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309736 WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009737 wmi_mac_addr peer_macaddr;
9738 /* A bool to indicate if ssn is present */
9739 A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
9740 /* The ssn from target, valid only if
9741 * ssn_present_for_tid[tidn] equals 1
9742 */
9743 A_UINT32 ssn_for_tid[WMI_MAX_TC];
9744} wmi_ba_event_ssn;
9745
9746typedef struct {
9747 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309748 WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009749 /** unique id identifying the VDEV, generated by the caller */
9750 A_UINT32 vdev_id;
9751 /** Event status, success or failure of the overall operation */
9752 A_UINT32 status;
9753 /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
9754 A_UINT32 num_ba_event_ssn;
9755/* Following this struc are the TLV's:
9756 * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
9757 */
9758} wmi_ba_rsp_ssn_event_fixed_param;
9759
9760enum wmi_aggr_state_req_type {
9761 WMI_DISABLE_AGGREGATION,
9762 WMI_ENABLE_AGGREGATION
9763};
9764
9765/*
9766 * This event is generated by the COEX module
9767 * when esco call is begins the coex module in fw genrated this event to host to
9768 * disable the RX aggregation and after completion of the esco call fw will indicate to
9769 * enable back the Rx aggregation .
9770 */
9771
9772typedef struct {
9773 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
9774 /** unique id identifying the VDEV, generated by the caller */
9775 A_UINT32 vdev_id;
9776 /** req_type contains values from enum
9777 * wmi_aggr_state_req_type; 0 (disable) 1(enable) */
9778 A_UINT32 req_type;
9779} wmi_aggr_state_trig_event_fixed_param;
9780
9781typedef struct {
9782 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
9783 /** unique id identifying the VDEV, generated by the caller */
9784 A_UINT32 vdev_id;
9785 /** MAC address used for installing */
9786 wmi_mac_addr peer_macaddr;
9787 /** key index */
9788 A_UINT32 key_ix;
9789 /** key flags */
9790 A_UINT32 key_flags;
9791 /** Event status */
9792 A_UINT32 status;
9793} wmi_vdev_install_key_complete_event_fixed_param;
9794
9795typedef enum _WMI_NLO_AUTH_ALGORITHM {
9796 WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
9797 WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
9798 WMI_NLO_AUTH_ALGO_WPA = 3,
9799 WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
9800 WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
9801 WMI_NLO_AUTH_ALGO_RSNA = 6,
9802 WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
9803} WMI_NLO_AUTH_ALGORITHM;
9804
9805typedef enum _WMI_NLO_CIPHER_ALGORITHM {
9806 WMI_NLO_CIPHER_ALGO_NONE = 0x00,
9807 WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
9808 WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
9809 WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
9810 WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
9811 WMI_NLO_CIPHER_ALGO_BIP = 0x06,
9812 WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
9813 WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
9814 WMI_NLO_CIPHER_ALGO_WEP = 0x101,
9815} WMI_NLO_CIPHER_ALGORITHM;
9816
9817/* SSID broadcast type passed in NLO params */
9818typedef enum _WMI_NLO_SSID_BcastNwType {
9819 WMI_NLO_BCAST_UNKNOWN = 0,
9820 WMI_NLO_BCAST_NORMAL = 1,
9821 WMI_NLO_BCAST_HIDDEN = 2,
9822} WMI_NLO_SSID_BcastNwType;
9823
9824#define WMI_NLO_MAX_SSIDS 16
9825#define WMI_NLO_MAX_CHAN 48
9826
9827#define WMI_NLO_CONFIG_STOP (0x1 << 0)
9828#define WMI_NLO_CONFIG_START (0x1 << 1)
9829#define WMI_NLO_CONFIG_RESET (0x1 << 2)
9830#define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4)
9831#define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5)
9832#define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6)
9833/* This bit is used to indicate if EPNO or supplicant PNO is enabled. Only
9834 * one of them can be enabled at a given time */
9835#define WMI_NLO_CONFIG_ENLO (0x1 << 7)
9836#define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8)
Govind Singh42f71542016-03-14 16:32:33 +05309837#define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009838
9839/* Whether directed scan needs to be performed (for hidden SSIDs) */
9840#define WMI_ENLO_FLAG_DIRECTED_SCAN 1
9841/* Whether PNO event shall be triggered if the network is found on A band */
9842#define WMI_ENLO_FLAG_A_BAND 2
9843/* Whether PNO event shall be triggered if the network is found on G band */
9844#define WMI_ENLO_FLAG_G_BAND 4
9845/* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
9846#define WMI_ENLO_FLAG_STRICT_MATCH 8
9847/* Code for matching the beacon AUTH IE - additional codes TBD open */
9848#define WMI_ENLO_AUTH_CODE_OPEN 1
9849/* WPA_PSK or WPA2PSK */
9850#define WMI_ENLO_AUTH_CODE_PSK 2
9851/* any EAPOL */
9852#define WMI_ENLO_AUTH_CODE_EAPOL 4
9853
9854/* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
9855typedef struct wmi_nlo_ssid_param {
9856 A_UINT32 valid;
9857 wmi_ssid ssid;
9858} wmi_nlo_ssid_param;
9859
9860/* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
9861typedef struct wmi_nlo_enc_param {
9862 A_UINT32 valid;
9863 A_UINT32 enc_type;
9864} wmi_nlo_enc_param;
9865
9866/* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
9867typedef struct wmi_nlo_auth_param {
9868 A_UINT32 valid;
9869 A_UINT32 auth_type;
9870} wmi_nlo_auth_param;
9871
9872/* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
9873typedef struct wmi_nlo_bcast_nw_param {
9874 A_UINT32 valid;
9875 /**
9876 * If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value
9877 * should be true/false.Otherwise EPNO is enabled. bcast_nw_type would be used
9878 * as a bit flag contains WMI_ENLO_FLAG_XXX
9879 */
9880 A_UINT32 bcast_nw_type;
9881} wmi_nlo_bcast_nw_param;
9882
9883/* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
9884typedef struct wmi_nlo_rssi_param {
9885 A_UINT32 valid;
9886 A_INT32 rssi;
9887} wmi_nlo_rssi_param;
9888
9889typedef struct nlo_configured_parameters {
9890 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
9891 wmi_nlo_ssid_param ssid;
9892 wmi_nlo_enc_param enc_type;
9893 wmi_nlo_auth_param auth_type;
9894 wmi_nlo_rssi_param rssi_cond;
9895 wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
9896} nlo_configured_parameters;
9897
9898/* Support channel prediction for PNO scan after scanning top_k_num channels
9899 * if stationary_threshold is met.
9900 */
9901typedef struct nlo_channel_prediction_cfg {
9902 A_UINT32 tlv_header;
9903 /* Enable or disable this feature. */
9904 A_UINT32 enable;
9905 /* Top K channels will be scanned before deciding whether to further
9906 * scan or stop. Minimum value is 3 and maximum is 5. */
9907 A_UINT32 top_k_num;
9908 /* Preconfigured stationary threshold. Lesser value means more
9909 * conservative. Bigger value means more aggressive.
9910 * Maximum is 100 and mininum is 0. */
9911 A_UINT32 stationary_threshold;
9912 /* Periodic full channel scan in milliseconds unit.
9913 * After full_scan_period_ms since last full scan, channel prediction
9914 * scan is suppressed and will do full scan.
9915 * This is to help detecting sudden AP power-on or -off.
9916 * Value 0 means no full scan at all (not recommended).
9917 */
9918 A_UINT32 full_scan_period_ms;
9919} nlo_channel_prediction_cfg;
9920
Govind Singh42f71542016-03-14 16:32:33 +05309921typedef struct enlo_candidate_score_params_t {
9922 /*
9923 * TLV tag and len;
9924 * tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param
9925 */
9926 A_UINT32 tlv_header;
9927 /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
9928 A_INT32 min5GHz_rssi;
9929 /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
9930 A_INT32 min24GHz_rssi;
9931 /* the maximum score that a network can have before bonuses */
9932 A_UINT32 initial_score_max;
9933 /* current_connection_bonus:
9934 * only report when there is a network's score this much higher
9935 * than the current connection
9936 */
9937 A_UINT32 current_connection_bonus;
9938 /* score bonus for all networks with the same network flag */
9939 A_UINT32 same_network_bonus;
9940 /* score bonus for networks that are not open */
9941 A_UINT32 secure_bonus;
9942 /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
9943 A_UINT32 band5GHz_bonus;
9944} enlo_candidate_score_params;
9945
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009946typedef struct wmi_nlo_config {
9947 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
9948 A_UINT32 flags;
9949 A_UINT32 vdev_id;
9950 A_UINT32 fast_scan_max_cycles;
9951 A_UINT32 active_dwell_time;
9952 A_UINT32 passive_dwell_time; /* PDT in msecs */
9953 A_UINT32 probe_bundle_size;
9954 A_UINT32 rest_time; /* ART = IRT */
9955 A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
9956 A_UINT32 scan_backoff_multiplier; /* SBM */
9957 A_UINT32 fast_scan_period; /* SCBM */
9958 A_UINT32 slow_scan_period; /* specific to windows */
9959 A_UINT32 no_of_ssids;
9960 A_UINT32 num_of_channels;
9961 A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
9962 /* The TLVs will follow.
9963 * nlo_configured_parameters nlo_list[];
9964 * A_UINT32 channel_list[];
9965 * nlo_channel_prediction_cfg ch_prediction_cfg;
Govind Singh42f71542016-03-14 16:32:33 +05309966 * enlo_candidate_score_params candidate_score_params;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009967 */
9968
9969} wmi_nlo_config_cmd_fixed_param;
9970
9971typedef struct wmi_nlo_event {
9972 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
9973 A_UINT32 vdev_id;
9974} wmi_nlo_event;
9975
9976/* WMI_PASSPOINT_CONFIG_SET
9977 * Sets a list for passpoint networks for PNO purposes;
9978 * it should be matched against any passpoint networks found
9979 * during regular PNO scan.
9980 */
9981#define WMI_PASSPOINT_CONFIG_SET (0x1 << 0)
9982/* WMI_PASSPOINT_CONFIG_RESET
9983 * Reset passpoint network list -
9984 * no Passpoint networks should be matched after this.
9985 */
9986#define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1)
9987#define PASSPOINT_REALM_LEN 256
9988#define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5
9989#define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
9990#define PASSPOINT_PLMN_ID_LEN 3
9991#define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
9992 (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
9993
9994/*
9995 * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
9996 * A_UINT8 realm[PASSPOINT_REALM_LEN]
9997 * array will end on a 4-byte boundary.
9998 * (This 4-byte alignment simplifies endianness-correction byte swapping.)
9999 */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010000A_COMPILE_TIME_ASSERT(check_passpoint_realm_size, (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010001
10002/*
10003 * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
10004 * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
10005 * roaming_consortium_ids array below will end on a 4-byte boundary.
10006 * (This 4-byte alignment simplifies endianness-correction byte swapping.)
10007 */
10008A_COMPILE_TIME_ASSERT(check_passpoint_roaming_consortium_ids_size,
10009((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
10010
10011/* wildcard ID to allow an action (reset) to apply to all networks */
10012#define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
10013typedef struct wmi_passpoint_config {
10014 /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
10015 A_UINT32 tlv_header;
10016 /* (network) id
10017 * identifier of the matched network, report this in event
10018 * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
10019 * that indicates the action should be applied to all networks.
10020 * Currently, the only action that is applied to all networks is "reset".
10021 * If a non-wildcard ID is specified, that particular network is configured.
10022 * If a wildcard ID is specified, all networks are reset.
10023 */
10024 A_UINT32 id;
10025 A_UINT32 req_id;
10026 /*null terminated UTF8 encoded realm, 0 if unspecified*/
10027 A_UINT8 realm[PASSPOINT_REALM_LEN];
10028 /*roaming consortium ids to match, 0s if unspecified*/
10029 A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN];
10030 /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
10031 /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
10032 A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN];
10033} wmi_passpoint_config_cmd_fixed_param;
10034
10035typedef struct {
10036 A_UINT32 tlv_header; /* TLV tag and len; tag equals
10037wmi_passpoint_event_hdr */
10038 A_UINT32 id; /* identifier of the matched network */
10039 A_UINT32 vdev_id;
10040 A_UINT32 timestamp; /* time since boot (in microsecond) when the
10041result was retrieved*/
10042 wmi_ssid ssid;
10043 wmi_mac_addr bssid; /* bssid of the network */
10044 A_UINT32 channel_mhz; /* channel frequency in MHz */
10045 A_UINT32 rssi; /* rssi value */
10046 A_UINT32 rtt; /* timestamp in nanoseconds*/
10047 A_UINT32 rtt_sd; /* standard deviation in rtt */
10048 A_UINT32 beacon_period; /* beacon advertised in the beacon */
10049 A_UINT32 capability; /* capabilities advertised in the beacon */
10050 A_UINT32 ie_length; /* size of the ie_data blob */
10051 A_UINT32 anqp_length; /* length of ANQP blob */
10052 /**
10053 * Following this structure is the byte stream of ie data of length ie_buf_len:
10054 * A_UINT8 ie_data[]; // length in byte given by field ie_length, blob of ie data in beacon
10055 * A_UINT8 anqp_ie[]; // length in byte given by field anqp_len, blob of anqp data of IE
10056 * Implicitly, combing ie_data and anqp_ie into a single bufp, and the bytes
10057 * stream of each ie should be same as BEACON/Action-frm by 802.11 spec
10058 */
10059} wmi_passpoint_event_hdr;
10060
10061#define GTK_OFFLOAD_OPCODE_MASK 0xFF000000
10062/** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
10063#define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000
10064/** Disable GTK offload */
10065#define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000
10066/** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
10067#define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000
10068enum wmi_chatter_mode {
10069 /* Chatter enter/exit happens
10070 * automatically based on preset
10071 * params
10072 */
10073 WMI_CHATTER_MODE_AUTO,
10074 /* Chatter enter is triggered
10075 * manually by the user
10076 */
10077 WMI_CHATTER_MODE_MANUAL_ENTER,
10078 /* Chatter exit is triggered
10079 * manually by the user
10080 */
10081 WMI_CHATTER_MODE_MANUAL_EXIT,
10082 /* Placeholder max value, always last */
10083 WMI_CHATTER_MODE_MAX
10084};
10085
10086enum wmi_chatter_query_type {
10087 /*query coalescing filter match counter */
10088 WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
10089 WMI_CHATTER_QUERY_MAX
10090};
10091
10092typedef struct {
10093 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */
10094 A_UINT32 chatter_mode;
10095} wmi_chatter_set_mode_cmd_fixed_param;
10096
10097/** maximum number of filter supported*/
10098#define CHATTER_MAX_COALESCING_RULES 11
10099/** maximum number of field tests per filter*/
10100#define CHATTER_MAX_FIELD_TEST 5
10101/** maximum field length in number of DWORDS*/
10102#define CHATTER_MAX_TEST_FIELD_LEN32 2
10103
10104/** field test kinds*/
10105#define CHATTER_COALESCING_TEST_EQUAL 1
10106#define CHATTER_COALESCING_TEST_MASKED_EQUAL 2
10107#define CHATTER_COALESCING_TEST_NOT_EQUAL 3
10108
10109/** packet type*/
10110#define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0)
10111#define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1)
10112#define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2)
10113
10114/** coalescing field test*/
10115typedef struct _chatter_pkt_coalescing_hdr_test {
10116 /** offset from start of mac header, for windows native wifi host driver
10117 * should assume standard 802.11 frame format without QoS info and address4
10118 * FW would account for any non-stand fields for final offset value.
10119 */
10120 A_UINT32 offset;
10121 A_UINT32 length; /* length of test field */
10122 A_UINT32 test; /*equal, not equal or masked equal */
10123 A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream */
10124 A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream */
10125} chatter_pkt_coalescing_hdr_test;
10126
10127/** packet coalescing filter*/
10128typedef struct _chatter_pkt_coalescing_filter {
10129 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
10130 A_UINT32 filter_id; /*unique id assigned by OS */
10131 A_UINT32 max_coalescing_delay; /*max miliseconds 1st pkt can be hold */
10132 A_UINT32 pkt_type; /*unicast/multicast/broadcast */
10133 A_UINT32 num_of_test_field; /*number of field test in table */
10134 chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /*field test tbl */
10135} chatter_pkt_coalescing_filter;
10136
10137/** packet coalescing filter add command*/
10138typedef struct {
10139 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
10140 A_UINT32 num_of_filters;
10141 /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
10142 chatter_pkt_coalescing_filter rx_filter[1]; */
10143} wmi_chatter_coalescing_add_filter_cmd_fixed_param;
10144/** packet coalescing filter delete command*/
10145typedef struct {
10146 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
10147 A_UINT32 filter_id; /*filter id which will be deleted */
10148} wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
10149/** packet coalescing query command*/
10150typedef struct {
10151 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
10152 A_UINT32 type; /*type of query */
10153} wmi_chatter_coalescing_query_cmd_fixed_param;
10154/** chatter query reply event*/
10155typedef struct {
10156 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */
10157 A_UINT32 type; /*query type */
10158 A_UINT32 filter_match_cnt; /*coalescing filter match counter */
10159} wmi_chatter_query_reply_event_fixed_param;
10160
10161/* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
10162 * cannot be changed without breaking WMI compatibility. */
10163#define GTK_OFFLOAD_KEK_BYTES 16
10164#define GTK_OFFLOAD_KCK_BYTES 16
10165/* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
10166#define GTK_REPLAY_COUNTER_BYTES 8
10167#define WMI_MAX_KEY_LEN 32
10168#define IGTK_PN_SIZE 6
10169
10170typedef struct {
10171 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
10172 A_UINT32 vdev_id;
10173 /** unique id identifying the VDEV */
10174 A_UINT32 flags; /* status flags */
10175 A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
10176 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
10177 A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
10178 A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
10179 A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
10180 A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
10181} WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
10182
10183typedef struct {
10184 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
10185 A_UINT32 vdev_id; /** unique id identifying the VDEV */
10186 A_UINT32 flags; /* control flags, GTK offload command use high byte */
10187 /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
10188 A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
10189 A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
10190 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
10191} WMI_GTK_OFFLOAD_CMD_fixed_param;
10192
10193typedef struct {
10194 /* TLV tag and len; tag equals
10195 * WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param
10196 */
10197 A_UINT32 tlv_header;
10198 A_UINT32 vdev_id;
10199 A_UINT32 sa_query_retry_interval; /* in msec */
10200 A_UINT32 sa_query_max_retry_count;
10201} WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
10202
10203typedef enum {
10204 WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
10205 WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
10206 WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK */
10207 /* gratuitous ARP req*/
10208 WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4,
10209} WMI_STA_KEEPALIVE_METHOD;
10210
10211typedef struct {
10212 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
10213 WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
10214 WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
10215 wmi_mac_addr dest_mac_addr; /* destination MAC address */
10216} WMI_STA_KEEPALVE_ARP_RESPONSE;
10217
10218typedef struct {
10219 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
10220 A_UINT32 vdev_id;
10221 A_UINT32 enable; /* 1 - Enable, 0 - disable */
10222 A_UINT32 method; /* keep alive method */
10223 A_UINT32 interval; /* time interval in seconds */
10224 /*
10225 * NOTE: following this structure is the TLV for ARP Resonse:
10226 * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; // ARP response
10227 */
10228} WMI_STA_KEEPALIVE_CMD_fixed_param;
10229
10230typedef struct {
10231 A_UINT32 tlv_header;
10232 A_UINT32 vdev_id;
10233 A_UINT32 action;
10234} WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
10235typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
10236
10237typedef struct {
10238 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
10239 A_UINT32 vdev_id;
10240 A_UINT32 keepaliveInterval; /* seconds */
10241 A_UINT32 keepaliveMethod;
10242} wmi_vdev_set_keepalive_cmd_fixed_param;
10243
10244typedef struct {
10245 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
10246 A_UINT32 vdev_id;
10247} wmi_vdev_get_keepalive_cmd_fixed_param;
10248
10249typedef struct {
10250 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
10251 A_UINT32 vdev_id;
10252 A_UINT32 keepaliveInterval; /* seconds */
10253 A_UINT32 keepaliveMethod; /* seconds */
10254} wmi_vdev_get_keepalive_event_fixed_param;
10255
10256#define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
10257#define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
10258
10259typedef struct {
10260 A_UINT32 tlv_header;
10261 A_UINT32 vdev_id;
10262 A_UINT32 action;
10263} WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
10264
10265typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param
10266WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
10267
10268typedef struct {
10269 A_UINT32 tlv_header;
10270 A_UINT32 vdev_id;
10271 A_UINT32 mcc_tbttmode;
10272 wmi_mac_addr mcc_bssid;
10273} wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
10274
10275typedef struct {
10276 A_UINT32 tlv_header;
10277 A_UINT32 vdev_id; /* home vdev id */
10278 A_UINT32 meas_token; /* from measure request frame */
10279 A_UINT32 dialog_token;
10280 A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
10281 A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst */
10282 A_UINT32 burst_cycle; /* times cycle through within one burst */
10283 A_UINT32 tx_power; /* for path frame */
10284 A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */
10285 wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
10286 A_UINT32 num_chans;
10287} wmi_vdev_plmreq_start_cmd_fixed_param;
10288
10289typedef struct {
10290 A_UINT32 tlv_header;
10291 A_UINT32 vdev_id;
10292 A_UINT32 meas_token; /* same value from req */
10293} wmi_vdev_plmreq_stop_cmd_fixed_param;
10294
10295typedef struct {
10296 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */
10297 A_UINT32 tlv_header;
10298 /* unique id identifying the VDEV, generated by the caller */
10299 A_UINT32 vdev_id;
10300 /* enable/disable NoA */
10301 A_UINT32 enable;
10302 /** number of NoA desc. In the TLV noa_descriptor[] */
10303 A_UINT32 num_noa;
10304 /**
10305 * TLV (tag length value ) paramerters follow the pattern structure.
10306 * TLV contain NoA desc with num of num_noa
10307 */
10308} wmi_p2p_set_noa_cmd_fixed_param;
10309
10310typedef struct {
10311 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */
10312 A_UINT32 tlv_header;
10313 /* unique id identifying the VDEV, generated by the caller */
10314 A_UINT32 vdev_id;
10315 /* Identify the wlan module */
10316 A_UINT32 module_id;
10317 /* Num of test arguments passed */
10318 A_UINT32 num_args;
10319/**
10320 * TLV (tag length value ) parameters follow the wmi_roam_chan_list
10321 * structure. The TLV's are:
10322 * A_UINT32 args[];
10323 **/
10324} wmi_unit_test_cmd_fixed_param;
10325
10326/** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
10327 * after it received WMI_ROAM_SYNCH_EVENTID.
10328 */
10329typedef struct {
10330 A_UINT32 tlv_header;
10331 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
10332 /** unique id identifying the VDEV, generated by the caller */
10333 A_UINT32 vdev_id;
10334} wmi_roam_synch_complete_fixed_param;
10335
10336typedef enum {
10337 RECOVERY_SIM_ASSERT = 0x01,
10338 RECOVERY_SIM_NO_DETECT = 0x02,
10339 RECOVERY_SIM_CTR_EP_FULL = 0x03,
10340 RECOVERY_SIM_EMPTY_POINT = 0x04,
10341 RECOVERY_SIM_STACK_OV = 0x05,
10342 RECOVERY_SIM_INFINITE_LOOP = 0x06,
10343 RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
10344 RECOVERY_SIM_SELF_RECOVERY = 0x08,
10345} RECOVERY_SIM_TYPE;
10346
10347/* WMI_FORCE_FW_HANG_CMDID */
10348typedef struct {
10349 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
10350 A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:... */
10351 A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms) */
10352} WMI_FORCE_FW_HANG_CMD_fixed_param;
Krishna Kumaar Natarajan2f7a44d2016-07-08 11:24:06 -070010353
10354typedef enum {
10355 WMI_MCAST_FILTER_SET = 1,
10356 WMI_MCAST_FILTER_DELETE
10357} WMI_SET_SINGLE_MCAST_FILTER_OP;
10358
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010359typedef struct {
10360 A_UINT32 tlv_header;
10361 A_UINT32 vdev_id;
10362 A_UINT32 index;
10363 A_UINT32 action;
10364 wmi_mac_addr mcastbdcastaddr;
10365} WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
10366
Krishna Kumaar Natarajan2f7a44d2016-07-08 11:24:06 -070010367typedef enum {
10368 WMI_MULTIPLE_MCAST_FILTER_CLEAR = 1, /* clear all previous mc list */
10369 /* clear all previous mc list, and set new list */
10370 WMI_MULTIPLE_MCAST_FILTER_SET,
10371 WMI_MULTIPLE_MCAST_FILTER_DELETE, /* delete one/multiple mc list */
10372 WMI_MULTIPLE_MCAST_FILTER_ADD /* add one/multiple mc list */
10373} WMI_MULTIPLE_MCAST_FILTER_OP;
10374
10375typedef struct {
10376 A_UINT32 tlv_header;
10377 A_UINT32 vdev_id;
10378 A_UINT32 operation; /* refer WMI_MULTIPLE_MCAST_FILTER_OP */
10379 /* number of elements in the subsequent mcast addr list */
10380 A_UINT32 num_mcastaddrs;
10381 /**
10382 * TLV (tag length value) parameters follow the
10383 * structure. The TLV's are:
10384 * wmi_mac_addr mcastaddr_list[num_mcastaddrs];
10385 */
10386} WMI_SET_MULTIPLE_MCAST_FILTER_CMD_fixed_param;
10387
10388
Himanshu Agarwalb0497b52016-05-13 21:03:37 +053010389/* WMI_DBGLOG_TIME_STAMP_SYNC_CMDID */
10390typedef enum {
10391 WMI_TIME_STAMP_SYNC_MODE_MS, /* millisecond units */
10392 WMI_TIME_STAMP_SYNC_MODE_US, /* microsecond units */
10393} WMI_TIME_STAMP_SYNC_MODE;
10394
10395typedef struct {
10396 /*
10397 * TLV tag and len; tag equals
10398 * WMITLV_TAG_STRUC_wmi_dbglog_time_stamp_sync_cmd_fixed_param
10399 */
10400 A_UINT32 tlv_header;
10401 /* 0: millisec, 1: microsec (see WMI_TIME_STAMP_SYNC_MODE) */
10402 A_UINT32 mode;
10403 A_UINT32 time_stamp_low; /* lower 32 bits of remote time stamp */
10404 A_UINT32 time_stamp_high; /* higher 32 bits of remote time stamp */
10405} WMI_DBGLOG_TIME_STAMP_SYNC_CMD_fixed_param;
10406
10407
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010408/* GPIO Command and Event data structures */
10409
10410/* WMI_GPIO_CONFIG_CMDID */
10411enum {
10412 WMI_GPIO_PULL_NONE,
10413 WMI_GPIO_PULL_UP,
10414 WMI_GPIO_PULL_DOWN,
10415};
10416
10417enum {
10418 WMI_GPIO_INTTYPE_DISABLE,
10419 WMI_GPIO_INTTYPE_RISING_EDGE,
10420 WMI_GPIO_INTTYPE_FALLING_EDGE,
10421 WMI_GPIO_INTTYPE_BOTH_EDGE,
10422 WMI_GPIO_INTTYPE_LEVEL_LOW,
10423 WMI_GPIO_INTTYPE_LEVEL_HIGH
10424};
10425
10426typedef struct {
10427 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
10428 A_UINT32 gpio_num; /* GPIO number to be setup */
10429 A_UINT32 input; /* 0 - Output/ 1 - Input */
10430 A_UINT32 pull_type; /* Pull type defined above */
10431 A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
10432} wmi_gpio_config_cmd_fixed_param;
10433
10434/* WMI_GPIO_OUTPUT_CMDID */
10435typedef struct {
10436 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
10437 A_UINT32 gpio_num; /* GPIO number to be setup */
10438 A_UINT32 set; /* Set the GPIO pin */
10439} wmi_gpio_output_cmd_fixed_param;
10440
10441/* WMI_GPIO_INPUT_EVENTID */
10442typedef struct {
10443 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
10444 A_UINT32 gpio_num; /* GPIO number which changed state */
10445} wmi_gpio_input_event_fixed_param;
10446
10447/* WMI_P2P_DISC_EVENTID */
10448enum {
10449 P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
10450 P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
10451};
10452
10453enum {
10454 P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload */
10455 P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload */
10456 P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload */
10457};
10458
10459enum {
10460 P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
10461 P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
10462};
10463
10464typedef struct {
10465 A_UINT32 vdev_id;
10466 A_UINT32 reason; /* P2P DISC wake up reason */
10467} wmi_p2p_disc_event;
10468
10469typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param
10470WOW_EVENT_INFO_SECTION_GTKIGTK;
10471
10472typedef enum {
10473 WMI_FAKE_TXBFER_SEND_NDPA,
10474 WMI_FAKE_TXBFER_SEND_MU,
10475 WMI_FAKE_TXBFER_NDPA_FBTYPE,
10476 WMI_FAKE_TXBFER_NDPA_NCIDX,
10477 WMI_FAKE_TXBFER_NDPA_POLL,
10478 WMI_FAKE_TXBFER_NDPA_BW,
10479 WMI_FAKE_TXBFER_NDPA_PREAMBLE,
10480 WMI_FAKE_TXBFER_NDPA_RATE,
10481 WMI_FAKE_TXBFER_NDP_BW,
10482 WMI_FAKE_TXBFER_NDP_NSS,
10483 WMI_TXBFEE_ENABLE_UPLOAD_H,
10484 WMI_TXBFEE_ENABLE_CAPTURE_H,
10485 WMI_TXBFEE_SET_CBF_TBL,
10486 WMI_TXBFEE_CBF_TBL_LSIG,
10487 WMI_TXBFEE_CBF_TBL_SIGA1,
10488 WMI_TXBFEE_CBF_TBL_SIGA2,
10489 WMI_TXBFEE_CBF_TBL_SIGB,
10490 WMI_TXBFEE_CBF_TBL_PAD,
10491 WMI_TXBFEE_CBF_TBL_DUR,
10492 WMI_TXBFEE_SU_NCIDX,
10493 WMI_TXBFEE_CBIDX,
10494 WMI_TXBFEE_NGIDX,
10495} WMI_TXBF_PARAM_ID;
10496
10497typedef struct {
10498 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
10499 /** parameter id */
10500 A_UINT32 param_id;
10501 /** parameter value */
10502 A_UINT32 param_value;
10503} wmi_txbf_cmd_fixed_param;
10504
10505typedef struct {
10506 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
10507 A_UINT32 h_length;
10508 A_UINT32 cv_length;
10509 /* This TLV is followed by array of bytes:
10510 * // h_cv info buffer
10511 * A_UINT8 bufp[];
10512 */
10513} wmi_upload_h_hdr;
10514
10515typedef struct {
10516 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
10517 A_UINT32 svd_num;
10518 A_UINT32 tone_num;
10519 A_UINT32 reserved;
10520} wmi_capture_h_event_hdr;
10521
10522typedef struct {
10523 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
10524 A_UINT32 start_freq; /* start frequency, not channel center freq */
10525 A_UINT32 end_freq; /* end frequency */
10526} wmi_avoid_freq_range_desc;
10527
10528typedef struct {
10529 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
10530 /* bad channel range count, multi range is allowed, 0 means all channel clear */
10531 A_UINT32 num_freq_ranges;
10532
10533 /* The TLVs will follow.
10534 * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
10535 * wmi_avoid_freq_range_desc avd_freq_range[]; // message buffer, NULL terminated
10536 */
10537} wmi_avoid_freq_ranges_event_fixed_param;
10538
10539typedef struct {
10540 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */
10541 /** Reserved for future use */
10542 A_UINT32 reserved0;
10543 A_UINT32 vdev_id;
10544} wmi_gtk_rekey_fail_event_fixed_param;
10545
10546enum wmm_ac_downgrade_policy {
10547 WMM_AC_DOWNGRADE_DEPRIO,
10548 WMM_AC_DOWNGRADE_DROP,
10549 WMM_AC_DOWNGRADE_INVALID,
10550};
10551
Himanshu Agarwal2690e462016-06-03 14:26:01 +053010552/* WMM EDCA Params type */
10553#define WMM_PARAM_TYPE_LEGACY 0
10554/* Relaxed EDCA parameters for 11ax to be used in case of triggered access */
10555#define WMM_PARAM_TYPE_11AX_EDCA 1
10556
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010557typedef struct {
10558 A_UINT32 tlv_header;
10559 A_UINT32 cwmin;
10560 A_UINT32 cwmax;
10561 A_UINT32 aifs;
10562 A_UINT32 txoplimit;
10563 A_UINT32 acm;
10564 A_UINT32 no_ack;
10565} wmi_wmm_vparams;
10566
10567typedef struct {
10568 A_UINT32 tlv_header;
10569 A_UINT32 vdev_id;
10570 wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
Himanshu Agarwal2690e462016-06-03 14:26:01 +053010571 A_UINT32 wmm_param_type; /* see WMM_PARAM_TYPE_xxx defs */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010572} wmi_vdev_set_wmm_params_cmd_fixed_param;
10573
10574typedef struct {
10575 A_UINT32 tlv_header;
10576 A_UINT32 vdev_id;
10577 A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */
10578 A_UINT32 userGtxMask; /* host request for GTX mask */
10579 A_UINT32 gtxPERThreshold; /* default: 10% */
10580 A_UINT32 gtxPERMargin; /* default: 2% */
10581 A_UINT32 gtxTPCstep; /* default: 1 */
10582 A_UINT32 gtxTPCMin; /* default: 5 */
10583 A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */
10584} wmi_vdev_set_gtx_params_cmd_fixed_param;
10585
10586typedef struct {
10587 A_UINT32 tlv_header;
10588 A_UINT32 vdev_id;
10589 A_UINT32 ac;
10590 A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
10591 A_UINT32 downgrade_type;
10592} wmi_vdev_wmm_addts_cmd_fixed_param;
10593
10594typedef struct {
10595 A_UINT32 tlv_header;
10596 A_UINT32 vdev_id;
10597 A_UINT32 ac;
10598} wmi_vdev_wmm_delts_cmd_fixed_param;
10599
Govind Singh869c9872016-02-22 18:36:34 +053010600/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010601typedef struct {
10602 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */
10603 /** Reserved for future use */
10604 A_UINT32 reserved0;
10605} wmi_pdev_dfs_enable_cmd_fixed_param;
10606
Govind Singh869c9872016-02-22 18:36:34 +053010607/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010608typedef struct {
10609 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 +053010610 /** pdev_id for identifying the MAC
10611 * See macros starting with WMI_PDEV_ID_ for values.
10612 */
10613 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010614} wmi_pdev_dfs_disable_cmd_fixed_param;
10615
10616typedef struct {
10617 /** TLV tag and len; tag equals
10618 * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
10619 */
10620 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053010621 /** pdev_id for identifying the MAC
10622 * See macros starting with WMI_PDEV_ID_ for values.
10623 */
10624 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010625} wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
10626
10627typedef struct {
10628 /** TLV tag and len; tag equals
10629 * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
10630 */
10631 A_UINT32 tlv_header;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +053010632 /** pdev_id for identifying the MAC
10633 * See macros starting with WMI_PDEV_ID_ for values.
10634 */
10635 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010636} wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
10637
10638/** TDLS COMMANDS */
10639
10640/* WMI_TDLS_SET_STATE_CMDID */
10641/* TDLS State */
10642enum wmi_tdls_state {
10643 /** TDLS disable */
10644 WMI_TDLS_DISABLE,
10645 /** TDLS enabled - no firmware connection tracking/notifications */
10646 WMI_TDLS_ENABLE_PASSIVE,
10647 /** TDLS enabled - with firmware connection tracking/notifications */
10648 WMI_TDLS_ENABLE_ACTIVE,
10649 /* TDLS enabled - firmware waits for peer mac for connection tracking */
10650 WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +053010651 /** TDLS enabled - TDLS connection tracking is done in host */
10652 WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010653};
10654
10655/* TDLS Options */
10656#define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */
10657#define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */
10658#define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */
10659
10660typedef struct {
10661 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */
10662 A_UINT32 tlv_header;
10663 /** unique id identifying the VDEV */
10664 A_UINT32 vdev_id;
10665 /** Enable/Disable TDLS (wmi_tdls_state) */
10666 A_UINT32 state;
10667 /* Duration (in ms) over which to calculate tx/rx threshold
10668 * to trigger TDLS Discovery
10669 */
10670 A_UINT32 notification_interval_ms;
10671 /** number of packets OVER which notify/suggest TDLS Discovery:
10672 * if current tx pps counter / notification interval >= threshold
10673 * then a notification will be sent to host to advise TDLS Discovery */
10674 A_UINT32 tx_discovery_threshold;
10675 /** number of packets UNDER which notify/suggest TDLS Teardown:
10676 * if current tx pps counter / notification interval < threshold
10677 * then a notification will be sent to host to advise TDLS Tear down */
10678 A_UINT32 tx_teardown_threshold;
10679 /** Absolute RSSI value under which notify/suggest TDLS Teardown */
10680 A_INT32 rssi_teardown_threshold;
10681 /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
10682 A_INT32 rssi_delta;
10683 /** TDLS Option Control
10684 * Off-Channel, Buffer STA, (later)Sleep STA support */
10685 A_UINT32 tdls_options;
10686 /* Buffering time in number of beacon intervals */
10687 A_UINT32 tdls_peer_traffic_ind_window;
10688 /* Wait time for PTR frame */
10689 A_UINT32 tdls_peer_traffic_response_timeout_ms;
10690 /* Self PUAPSD mask */
10691 A_UINT32 tdls_puapsd_mask;
10692 /* Inactivity timeout */
10693 A_UINT32 tdls_puapsd_inactivity_time_ms;
10694 /* Max of rx frame during SP */
10695 A_UINT32 tdls_puapsd_rx_frame_threshold;
10696 /* Duration (in ms) over which to check whether TDLS link
10697 * needs to be torn down
10698 */
10699 A_UINT32 teardown_notification_ms;
10700 /* STA kickout threshold for TDLS peer */
10701 A_UINT32 tdls_peer_kickout_threshold;
10702} wmi_tdls_set_state_cmd_fixed_param;
10703
10704/* WMI_TDLS_PEER_UPDATE_CMDID */
10705
10706enum wmi_tdls_peer_state {
10707 /** tx peer TDLS link setup now starting, traffic to DA should be
10708 * paused (except TDLS frames) until state is moved to CONNECTED (or
10709 * TEARDOWN on setup failure) */
10710 WMI_TDLS_PEER_STATE_PEERING,
10711 /** tx peer TDLS link established, running (all traffic to DA unpaused) */
10712 WMI_TDLS_PEER_STATE_CONNECTED,
10713 /** tx peer TDLS link tear down started (link paused, any frames
10714 * queued for DA will be requeued back through the AP)*/
10715 WMI_TDLS_PEER_STATE_TEARDOWN,
10716 /* Add peer mac into connection table */
10717 WMI_TDLS_PEER_ADD_MAC_ADDR,
10718 /* Remove peer mac from connection table */
10719 WMI_TDLS_PEER_REMOVE_MAC_ADDR,
10720};
10721
10722/* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
10723#define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
10724typedef struct {
10725 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */
10726 A_UINT32 tlv_header;
10727 /* Peer's QoS Info - for U-APSD */
10728 /* AC FLAGS - accessed through macros below */
10729 /* Ack, SP, More Data Ack - accessed through macros below */
10730 A_UINT32 peer_qos;
10731 /*TDLS Peer's U-APSD Buffer STA Support */
10732 A_UINT32 buff_sta_support;
10733 /*TDLS off channel related params */
10734 A_UINT32 off_chan_support;
10735 A_UINT32 peer_curr_operclass;
10736 A_UINT32 self_curr_operclass;
10737 /* Number of channels available for off channel operation */
10738 A_UINT32 peer_chan_len;
10739 A_UINT32 peer_operclass_len;
10740 A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
10741 /* Is peer initiator or responder of TDLS setup request */
10742 A_UINT32 is_peer_responder;
10743 /* Preferred off channel number as configured by user */
10744 A_UINT32 pref_offchan_num;
10745 /* Preferred off channel bandwidth as configured by user */
10746 A_UINT32 pref_offchan_bw;
10747
10748 /** Followed by the variable length TLV peer_chan_list:
10749 * wmi_channel peer_chan_list[].
10750 * Array size would be peer_chan_len.
10751 * This array is intersected channels which is supported by both peer
10752 * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
10753 * FW shall compute BW for an offchan based on peer's ht/vht cap
10754 * received in peer_assoc cmd during change STA operation
10755 */
10756} wmi_tdls_peer_capabilities;
10757
10758#define WMI_TDLS_QOS_VO_FLAG 0
10759#define WMI_TDLS_QOS_VI_FLAG 1
10760#define WMI_TDLS_QOS_BK_FLAG 2
10761#define WMI_TDLS_QOS_BE_FLAG 3
10762#define WMI_TDLS_QOS_ACK_FLAG 4
10763#define WMI_TDLS_QOS_SP_FLAG 5
10764#define WMI_TDLS_QOS_MOREDATA_FLAG 7
10765
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010766#define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010767 (ppeer_caps)->peer_qos |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010768} while (0)
10769#define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010770 (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
10771
10772#define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
10773 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
10774#define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
10775 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
10776#define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
10777 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
10778#define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
10779 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
10780#define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
10781 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
10782#define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
10783 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
10784#define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
10785 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
10786#define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
10787 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
10788#define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
10789 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
10790#define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
10791 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
10792/* SP has 2 bits */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010793#define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010794 (ppeer_caps)->peer_qos |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010795} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010796#define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
10797 (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
10798
10799#define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
10800 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
10801#define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
10802 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
10803
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010804#define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010805 (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010806} while (0)
10807#define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010808 (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
10809
10810#define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
10811 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
10812#define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
10813 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
10814#define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
10815 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
10816#define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
10817 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
10818#define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
10819 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
10820#define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
10821 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
10822#define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
10823 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
10824#define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
10825 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
10826#define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
10827 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
10828#define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
10829 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
10830/* SP has 2 bits */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010831#define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010832 (pset_cmd)->tdls_puapsd_mask |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010833} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010834#define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
10835 (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
10836
10837#define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
10838 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
10839#define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
10840 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
10841
10842typedef struct {
10843 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */
10844 A_UINT32 tlv_header;
10845 /** unique id identifying the VDEV */
10846 A_UINT32 vdev_id;
10847 /** peer MAC address */
10848 wmi_mac_addr peer_macaddr;
10849 /** new TDLS state for peer (wmi_tdls_peer_state) */
10850 A_UINT32 peer_state;
10851 /* The TLV for wmi_tdls_peer_capabilities will follow.
10852 * wmi_tdls_peer_capabilities peer_caps;
10853 */
10854 /** Followed by the variable length TLV chan_info:
10855 * wmi_channel chan_info[] */
10856} wmi_tdls_peer_update_cmd_fixed_param;
10857
10858/* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
10859
10860/* bitmap 20, 40, 80 or 160 MHz wide channel */
10861#define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */
10862#define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */
10863#define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */
10864#define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */
10865
10866enum wmi_tdls_offchan_mode {
10867 WMI_TDLS_ENABLE_OFFCHANNEL,
10868 WMI_TDLS_DISABLE_OFFCHANNEL
10869};
10870
10871typedef struct {
10872 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */
10873 A_UINT32 tlv_header;
10874 /** unique id identifying the VDEV */
10875 A_UINT32 vdev_id;
10876 /** Enable/Disable TDLS offchannel */
10877 A_UINT32 offchan_mode;
10878 /** peer MAC address */
10879 wmi_mac_addr peer_macaddr;
10880 /* Is peer initiator or responder of TDLS setup request */
10881 A_UINT32 is_peer_responder;
10882 /* off channel number */
10883 A_UINT32 offchan_num;
10884 /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
10885 A_UINT32 offchan_bw_bitmap;
10886 /* operating class for offchan */
10887 A_UINT32 offchan_oper_class;
10888} wmi_tdls_set_offchan_mode_cmd_fixed_param;
10889
10890/** TDLS EVENTS */
10891enum wmi_tdls_peer_notification {
10892 /** tdls discovery recommended for peer (based
10893 * on tx bytes per second > tx_discover threshold) */
10894 WMI_TDLS_SHOULD_DISCOVER,
10895 /** tdls link tear down recommended for peer
10896 * due to tx bytes per second below tx_teardown_threshold
10897 * NB: this notification sent once */
10898 WMI_TDLS_SHOULD_TEARDOWN,
10899 /** tx peer TDLS link tear down complete */
10900 WMI_TDLS_PEER_DISCONNECTED,
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +053010901 /** TDLS/BT role change notification for connection tracker */
10902 WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010903};
10904
10905enum wmi_tdls_peer_reason {
10906 /** tdls teardown recommended due to low transmits */
10907 WMI_TDLS_TEARDOWN_REASON_TX,
10908 /** tdls link tear down recommended due to poor RSSI */
10909 WMI_TDLS_TEARDOWN_REASON_RSSI,
10910 /** tdls link tear down recommended due to offchannel scan */
10911 WMI_TDLS_TEARDOWN_REASON_SCAN,
10912 /** tdls peer disconnected due to peer deletion */
10913 WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
10914 /** tdls peer disconnected due to PTR timeout */
10915 WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
10916 /** tdls peer disconnected due wrong PTR format */
10917 WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
10918 /** tdls peer not responding */
10919 WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +053010920 /*
10921 * tdls entered buffer STA role, TDLS connection tracker
10922 * needs to handle this
10923 */
10924 WMI_TDLS_ENTER_BUF_STA,
10925 /*
10926 * tdls exited buffer STA role, TDLS connection tracker
10927 * needs to handle this
10928 */
10929 WMI_TDLS_EXIT_BUF_STA,
10930 /* BT entered busy mode, TDLS connection tracker needs to handle this */
10931 WMI_TDLS_ENTER_BT_BUSY_MODE,
10932 /** BT exited busy mode, TDLS connection tracker needs to handle this */
10933 WMI_TDLS_EXIT_BT_BUSY_MODE,
Selvaraj, Sridhar217e9a92016-06-28 14:49:13 +053010934 /*
10935 * TDLS module received a scan start event, TDLS connection tracker
10936 * needs to handle this
10937 */
10938 WMI_TDLS_SCAN_STARTED_EVENT,
10939 /*
10940 * TDLS module received a scan complete event, TDLS connection tracker
10941 * needs to handle this
10942 */
10943 WMI_TDLS_SCAN_COMPLETED_EVENT,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010944};
10945
10946/* WMI_TDLS_PEER_EVENTID */
10947typedef struct {
10948 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */
10949 A_UINT32 tlv_header;
10950 /** peer MAC address */
10951 wmi_mac_addr peer_macaddr;
10952 /** TDLS peer status (wmi_tdls_peer_notification)*/
10953 A_UINT32 peer_status;
10954 /** TDLS peer reason (wmi_tdls_peer_reason) */
10955 A_UINT32 peer_reason;
10956 /** unique id identifying the VDEV */
10957 A_UINT32 vdev_id;
10958} wmi_tdls_peer_event_fixed_param;
10959
10960/* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
10961 don't use this for any new implementations */
10962typedef struct {
10963 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */
10964 /** unique id identifying the VDEV, generated by the caller */
10965 A_UINT32 vdev_id;
10966 /* New beacon interval to be used for the specified VDEV suggested by firmware */
10967 A_UINT32 new_bcn_intvl;
10968} wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
10969
10970/* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
10971typedef struct {
10972 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
10973 A_UINT32 tlv_header;
10974 /** 1: enable fw based adaptive ocs,
10975 * 0: disable fw based adaptive ocs
10976 */
10977 A_UINT32 enable;
10978 /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
Govind Singh869c9872016-02-22 18:36:34 +053010979 union {
10980 /* OBSOLETE - will be removed once all refs are gone */
10981 A_UINT32 mac_id;
10982 /** pdev_id for identifying the MAC
10983 * See macros starting with WMI_PDEV_ID_ for values.
10984 */
10985 A_UINT32 pdev_id;
10986 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010987} wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
10988
10989/* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
10990typedef struct {
10991 /* Frequency of the channel for which the quota is set */
10992 A_UINT32 chan_mhz;
10993 /* Requested channel time quota expressed as percentage */
10994 A_UINT32 channel_time_quota;
10995} wmi_resmgr_chan_time_quota;
10996
10997typedef struct {
10998 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
10999 A_UINT32 tlv_header;
11000 /** number of channel time quota command structures
11001 * (wmi_resmgr_chan_time_quota) 1 or 2
11002 */
11003 A_UINT32 num_chans;
11004/* This TLV is followed by another TLV of array of bytes
11005 * A_UINT8 data[];
11006 * This data array contains
11007 * num_chans * size of(struct wmi_resmgr_chan_time_quota)
11008 */
11009} wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
11010
11011/* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
11012typedef struct {
11013 /* Frequency of the channel for which the latency is set */
11014 A_UINT32 chan_mhz;
11015 /* Requested channel latency in milliseconds */
11016 A_UINT32 latency;
11017} wmi_resmgr_chan_latency;
11018
11019typedef struct {
11020 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
11021 A_UINT32 tlv_header;
11022 /** number of channel latency command structures
11023 * (wmi_resmgr_chan_latency) 1 or 2
11024 */
11025 A_UINT32 num_chans;
11026/* This TLV is followed by another TLV of array of bytes
11027 * A_UINT8 data[];
11028 * This data array contains
11029 * num_chans * size of(struct wmi_resmgr_chan_latency)
11030 */
11031} wmi_resmgr_set_chan_latency_cmd_fixed_param;
11032
11033/* WMI_STA_SMPS_FORCE_MODE_CMDID */
11034
11035/** STA SMPS Forced Mode */
11036typedef enum {
11037 WMI_SMPS_FORCED_MODE_NONE = 0,
11038 WMI_SMPS_FORCED_MODE_DISABLED,
11039 WMI_SMPS_FORCED_MODE_STATIC,
11040 WMI_SMPS_FORCED_MODE_DYNAMIC
11041} wmi_sta_smps_forced_mode;
11042
11043typedef struct {
11044 /** TLV tag and len; tag equals
11045 * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
11046 A_UINT32 tlv_header;
11047 /** Unique id identifying the VDEV */
11048 A_UINT32 vdev_id;
11049 /** The mode of SMPS that is to be forced in the FW. */
11050 A_UINT32 forced_mode;
11051} wmi_sta_smps_force_mode_cmd_fixed_param;
11052
11053/** wlan HB commands */
11054#define WMI_WLAN_HB_ITEM_UDP 0x1
11055#define WMI_WLAN_HB_ITEM_TCP 0x2
11056#define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE, must be a multiple of 4 bytes */
11057
11058typedef struct {
11059 /** TLV tag and len; tag equals
11060 * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
11061 A_UINT32 tlv_header;
11062 A_UINT32 vdev_id;
11063 A_UINT32 enable;
11064 A_UINT32 item;
11065 A_UINT32 session;
11066} wmi_hb_set_enable_cmd_fixed_param;
11067
11068typedef struct {
11069 /** TLV tag and len; tag equals
11070 * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
11071 A_UINT32 tlv_header;
11072 A_UINT32 vdev_id;
11073 A_UINT32 srv_ip;
11074 A_UINT32 dev_ip;
11075 A_UINT32 seq;
11076 A_UINT32 src_port;
11077 A_UINT32 dst_port;
11078 A_UINT32 interval;
11079 A_UINT32 timeout;
11080 A_UINT32 session;
11081 wmi_mac_addr gateway_mac;
11082} wmi_hb_set_tcp_params_cmd_fixed_param;
11083
11084typedef struct {
11085 /** TLV tag and len; tag equals
11086 * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
11087 A_UINT32 tlv_header;
11088 A_UINT32 vdev_id;
11089 A_UINT32 length;
11090 A_UINT32 offset;
11091 A_UINT32 session;
11092 A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
11093} wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
11094
11095typedef struct {
11096 /** TLV tag and len; tag equals
11097 * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
11098 A_UINT32 tlv_header;
11099 A_UINT32 vdev_id;
11100 A_UINT32 srv_ip;
11101 A_UINT32 dev_ip;
11102 A_UINT32 src_port;
11103 A_UINT32 dst_port;
11104 A_UINT32 interval;
11105 A_UINT32 timeout;
11106 A_UINT32 session;
11107 wmi_mac_addr gateway_mac;
11108} wmi_hb_set_udp_params_cmd_fixed_param;
11109
11110typedef struct {
11111 /** TLV tag and len; tag equals
11112 * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
11113 A_UINT32 tlv_header;
11114 A_UINT32 vdev_id;
11115 A_UINT32 length;
11116 A_UINT32 offset;
11117 A_UINT32 session;
11118 A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
11119} wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
11120
11121/** wlan HB events */
11122typedef enum {
11123 WMI_WLAN_HB_REASON_UNKNOWN = 0,
11124 WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1,
11125 WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2,
11126} WMI_HB_WAKEUP_REASON;
11127
11128typedef struct {
11129 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
11130 A_UINT32 vdev_id; /* unique id identifying the VDEV */
11131 A_UINT32 session; /* Session ID from driver */
11132 A_UINT32 reason; /* wakeup reason */
11133} wmi_hb_ind_event_fixed_param;
11134
11135/** WMI_STA_SMPS_PARAM_CMDID */
11136typedef enum {
11137 /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
11138 WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
11139 /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
11140 * to enter D-SMPS mode from Stalled-D-SMPS mode */
11141 WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
11142 /** RSSI threshold to disable SMPS modes */
11143 WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
11144 /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
11145 WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
11146 /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
11147 WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
11148 /** Enable/Disable DTIM 1chRx feature */
11149 WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5
11150} wmi_sta_smps_param;
11151
11152typedef struct {
11153 /** TLV tag and len; tag equals
11154 * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
11155 A_UINT32 tlv_header;
11156 /** Unique id identifying the VDEV */
11157 A_UINT32 vdev_id;
11158 /** SMPS parameter (see wmi_sta_smps_param) */
11159 A_UINT32 param;
11160 /** Value of SMPS parameter */
11161 A_UINT32 value;
11162} wmi_sta_smps_param_cmd_fixed_param;
11163
11164typedef struct {
11165 /** TLV tag and len; tag equals
11166 * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
11167 A_UINT32 tlv_header;
11168 /* TX stats */
11169 A_UINT32 txBytesPushed;
11170 A_UINT32 txPacketsPushed;
11171 /* RX stats */
11172 A_UINT32 rxBytesRcvd;
11173 A_UINT32 rxPacketsRcvd;
11174 A_UINT32 rxTimeTotal;
11175 /** peer MAC address */
11176 wmi_mac_addr peer_macaddr;
11177} wmi_mcc_sched_sta_traffic_stats;
11178
11179typedef struct {
11180 /** TLV tag and len; tag equals
11181 * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
11182 A_UINT32 tlv_header;
11183 /** Duration over which the host stats were collected */
11184 A_UINT32 duration;
11185 /** Number of stations filled in following stats array */
11186 A_UINT32 num_sta;
11187 /* Following this struct are the TLVs:
11188 * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
11189 */
11190} wmi_mcc_sched_traffic_stats_cmd_fixed_param;
11191
11192typedef struct {
11193 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
11194 /* unique id identifying the VDEV, generated by the caller */
11195 A_UINT32 vdev_id;
11196 /*Batch scan enable command parameters */
11197 A_UINT32 scanInterval;
11198 A_UINT32 numScan2Batch;
11199 A_UINT32 bestNetworks;
11200 A_UINT32 rfBand;
11201 A_UINT32 rtt;
11202} wmi_batch_scan_enable_cmd_fixed_param;
11203
11204typedef struct {
11205 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */
11206 A_UINT32 supportedMscan;
11207} wmi_batch_scan_enabled_event_fixed_param;
11208
11209typedef struct {
11210 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
11211/* unique id identifying the VDEV, generated by the caller */
11212 A_UINT32 vdev_id;
11213 A_UINT32 param;
11214} wmi_batch_scan_disable_cmd_fixed_param;
11215
11216typedef struct {
11217 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
11218 /** unique id identifying the VDEV, generated by the caller */
11219 A_UINT32 vdev_id;
11220 A_UINT32 param;
11221} wmi_batch_scan_trigger_result_cmd_fixed_param;
11222
11223typedef struct {
11224 A_UINT32 tlv_header;
11225 wmi_mac_addr bssid; /* BSSID */
11226 wmi_ssid ssid; /* SSID */
11227 A_UINT32 ch; /* Channel */
11228 A_UINT32 rssi; /* RSSI or Level */
11229 /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
11230 A_UINT32 timestamp;
11231} wmi_batch_scan_result_network_info;
11232
11233typedef struct {
11234 A_UINT32 tlv_header;
11235 A_UINT32 scanId; /* Scan List ID. */
11236 /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
11237 A_UINT32 numNetworksInScanList;
11238 A_UINT32 netWorkStartIndex; /* indicate the start index of network info */
11239} wmi_batch_scan_result_scan_list;
11240
11241#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.*/
11242#define LPI_IE_BITMAP_IS_PROBE 0x00000002 /*send true or false based on scan response frame being a Probe Rsp or not*/
11243#define LPI_IE_BITMAP_SSID 0x00000004 /*send ssid from received scan response frame*/
11244#define LPI_IE_BITMAP_RSSI 0x00000008 /* end RSSI value reported by HW for the received scan response after adjusting with noise floor*/
11245#define LPI_IE_BITMAP_CHAN 0x00000010 /*send channel number from the received scan response*/
11246#define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* sen Tx power from TPC IE of scan rsp*/
11247#define LPI_IE_BITMAP_TX_RATE 0x00000040 /*send rate of the received frame as reported by HW.*/
11248#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.*/
11249#define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /*send timestamp reported in the received scan rsp frame.*/
11250#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.*/
11251/*
11252 * TEMPORARY alias of incorrect old name the correct name.
11253 * This alias will be removed once all references to the old name have been fixed.
11254 */
11255#define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
11256#define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false.*/
11257#define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP*/
11258#define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled*/
11259#define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device.*/
11260#define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel*/
11261#define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received.*/
11262#define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz*/
11263#define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above*/
11264#define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations*/
11265#define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan*/
11266#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.*/
11267#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*/
11268#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 +053011269/*
11270 * extscan will use this field to indicate to
11271 * LOWI LP whether to report result to context hub or not
11272 */
11273#define LPI_IE_BITMAP_REPORT_CONTEXT_HUB 0x00800000
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011274#define LPI_IE_BITMAP_ALL 0xFFFFFFFF
11275
11276typedef struct {
11277 A_UINT32 tlv_header;
11278 /**A_BOOL indicates LPI mgmt snooping enable/disable*/
11279 A_UINT32 enable;
11280 /**LPI snooping mode*/
11281 A_UINT32 snooping_mode;
11282 /** LPI interested IEs in snooping context */
11283 A_UINT32 ie_bitmap;
11284} wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
11285
11286typedef struct {
11287 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
11288 /** Scan ID */
11289 A_UINT32 scan_id;
11290 /** Scan requestor ID */
11291 A_UINT32 scan_req_id;
11292 /** VDEV id(interface) that is requesting scan */
11293 A_UINT32 vdev_id;
11294 /** LPI interested IEs in scan context */
11295 A_UINT32 ie_bitmap;
11296 /** Scan Priority, input to scan scheduler */
11297 A_UINT32 scan_priority;
11298 /** dwell time in msec on active channels */
11299 A_UINT32 dwell_time_active;
11300 /** dwell time in msec on passive channels */
11301 A_UINT32 dwell_time_passive;
11302 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
11303 A_UINT32 min_rest_time;
11304 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
11305 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
11306 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
11307 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
11308 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
11309 * irrespective of activity. activity is determined by the idle_time parameter.
11310 */
11311 A_UINT32 max_rest_time;
11312 /** time before sending next set of probe requests.
11313 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
11314 * The number of probe requests specified depends on the ssid_list and bssid_list
11315 */
11316 A_UINT32 repeat_probe_time;
11317 /** time in msec between 2 consequetive probe requests with in a set. */
11318 A_UINT32 probe_spacing_time;
11319 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
11320 A_UINT32 idle_time;
11321 /** maximum time in msec allowed for scan */
11322 A_UINT32 max_scan_time;
11323 /** delay in msec before sending first probe request after switching to a channel */
11324 A_UINT32 probe_delay;
11325 /** Scan control flags */
11326 A_UINT32 scan_ctrl_flags;
11327 /** Burst duration time in msec*/
11328 A_UINT32 burst_duration;
11329
11330 /** # if channels to scan. In the TLV channel_list[] */
11331 A_UINT32 num_chan;
11332 /** number of bssids. In the TLV bssid_list[] */
11333 A_UINT32 num_bssid;
11334 /** number of ssid. In the TLV ssid_list[] */
11335 A_UINT32 num_ssids;
11336 /** number of bytes in ie data. In the TLV ie_data[] */
11337 A_UINT32 ie_len;
11338
11339/**
11340 * TLV (tag length value ) parameters follow the scan_cmd
11341 * structure. The TLV's are:
11342 * A_UINT32 channel_list[];
11343 * wmi_ssid ssid_list[];
11344 * wmi_mac_addr bssid_list[];
11345 * A_UINT8 ie_data[];
11346 */
11347} wmi_lpi_start_scan_cmd_fixed_param;
11348
11349typedef struct {
11350 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
11351 /** Scan requestor ID */
11352 A_UINT32 scan_req_id;
11353 /** Scan ID */
11354 A_UINT32 scan_id;
11355 /**
11356 * Req Type
11357 * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
11358 * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
11359 * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
11360 * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
11361 */
11362 A_UINT32 req_type;
11363 /**
11364 * vDev ID
11365 * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
11366 */
11367 A_UINT32 vdev_id;
11368} wmi_lpi_stop_scan_cmd_fixed_param;
11369
11370typedef enum {
11371 WMI_LPI_DEVICE_TYPE_AP = 1,
11372 WMI_LPI_DEVICE_TYPE_P2P = 2,
11373 WMI_LPI_DEVICE_TYPE_NAN = 3,
11374} wmi_lpi_device_type;
11375
11376typedef struct {
11377 A_UINT32 tlv_header;
11378 /** Scan requestor ID */
11379 A_UINT32 scan_req_id;
11380 A_UINT32 ie_bitmap;
11381 A_UINT32 data_len;
11382} wmi_lpi_result_event_fixed_param;
11383
11384typedef enum {
11385 /** User scan Request completed */
11386 WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
11387 /** User Request was never serviced */
11388 WMI_LPI_STATUS_DROPPED_REQ = 1,
11389 /** Illegal channel Req */
11390 WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
11391 /** Illegal Operation Req */
11392 WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
11393 /** Request Aborted */
11394 WMI_LPI_STATUS_REQ_ABORTED = 4,
11395 /** Request Timed Out */
11396 WMI_LPI_STATUS_REQ_TIME_OUT = 5,
11397 /** Medium Busy, already there
11398 * is a scan is going on */
11399 WMI_LPI_STATUS_MEDIUM_BUSY = 6,
11400 /* Extscan is the scan client whose scan complete event is triggered */
11401 WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
11402} wmi_lpi_staus;
11403
11404typedef struct {
11405 A_UINT32 tlv_header;
11406 wmi_lpi_staus status;
11407 /** Scan requestor ID */
11408 A_UINT32 scan_req_id;
11409} wmi_lpi_status_event_fixed_param;
11410
11411typedef struct {
11412 A_UINT32 tlv_header;
11413 wmi_mac_addr bssid;
11414 wmi_ssid ssid;
11415 A_UINT32 freq;
11416 A_UINT32 rssi;
11417 A_UINT32 vdev_id;
11418} wmi_lpi_handoff_event_fixed_param;
11419
11420typedef struct {
11421 A_UINT32 tlv_header;
11422 A_UINT32 timestamp; /*timestamp of batch scan event */
11423 A_UINT32 numScanLists; /*number of scan in this event */
11424 A_UINT32 isLastResult; /*is this event a last event of the whole batch scan */
11425} wmi_batch_scan_result_event_fixed_param;
11426
11427typedef struct {
11428 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */
11429 A_UINT32 vdev_id;
11430 /* This TLV is followed by p2p_noa_info for vdev :
11431 * wmi_p2p_noa_info p2p_noa_info;
11432 */
11433} wmi_p2p_noa_event_fixed_param;
11434
11435#define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6
11436#define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1
11437
11438#define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0
11439#define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f
11440
11441#define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7
11442#define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf
11443
11444typedef struct {
11445 /** TLV tag and len; tag equals
11446 * */
11447 A_UINT32 tlv_header;
11448 /** gpip pin number */
11449 A_UINT32 gpio_pin_num;
11450 /** gpio interupt type */
11451 A_UINT32 int_type;
11452 /** RF radio status */
11453 A_UINT32 radio_state;
11454} wmi_rfkill_mode_param;
11455
11456typedef enum {
11457 WMI_SET_LED_SYS_POWEROFF,
11458 WMI_SET_LED_SYS_S3_SUSPEND,
11459 WMI_SET_LED_SYS_S4_S5,
11460 WMI_SET_LED_SYS_DRIVER_DISABLE,
11461 WMI_SET_LED_SYS_WAKEUP,
11462 WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
11463 WMI_SET_LED_SYS_POWERON,
11464} wmi_led_sys_state_param;
11465
11466typedef enum {
11467 WMI_CONFIG_LED_TO_VDD = 0,
11468 WMI_CONFIG_LED_TO_GND = 1,
11469} wmi_config_led_connect_type;
11470
11471typedef enum {
11472 WMI_CONFIG_LED_NOT_WITH_BT = 0,
11473 WMI_CONFIG_LED_WITH_BT = 1,
11474} wmi_config_led_with_bt_flag;
11475
11476typedef enum {
11477 WMI_CONFIG_LED_DISABLE = 0,
11478 WMI_CONFIG_LED_ENABLE = 1,
11479} wmi_config_led_enable_flag;
11480
Sreelakshmi Konamkif9bde842016-03-03 19:03:02 +053011481typedef enum {
11482 WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0,
11483 WMI_CONFIG_LED_HIGH_OFF = 1,
11484 WMI_CONFIG_LED_HIGH_ON = 2,
11485} wmi_config_led_on_flag;
11486
11487typedef enum {
11488 WMI_CONFIG_LED_UNSPECIFIED = 0,
11489 WMI_CONFIG_LED_ON = 1,
11490 WMI_CONFIG_LED_OFF = 2,
11491 WMI_CONFIG_LED_DIM = 3,
11492 WMI_CONFIG_LED_BLINK = 4,
11493 WMI_CONFIG_LED_TXRX = 5,
11494} wmi_config_led_operation_type;
11495
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011496typedef struct {
11497 /** TLV tag and len; tag equals
Govind Singh869c9872016-02-22 18:36:34 +053011498 * WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011499 A_UINT32 tlv_header;
11500 /* Set GPIO pin */
11501 A_UINT32 led_gpio_pin;
11502 /* Set connect type defined in wmi_config_led_connect_type */
11503 A_UINT32 connect_type;
11504 /* Set flag defined in wmi_config_led_with_bt_flag */
11505 A_UINT32 with_bt;
11506 /* Set LED enablement defined in wmi_config_led_enable_flag */
11507 A_UINT32 led_enable;
Govind Singh869c9872016-02-22 18:36:34 +053011508 /** pdev_id for identifying the MAC
11509 * See macros starting with WMI_PDEV_ID_ for values.
11510 */
11511 A_UINT32 pdev_id;
Sreelakshmi Konamkif9bde842016-03-03 19:03:02 +053011512 /* see wmi_config_led_operation_type enum */
11513 A_UINT32 led_operation_type;
11514 /* see wmi_config_led_on_flag enum */
11515 A_UINT32 led_on_flag; /* configure high/low on/off sense */
11516 A_UINT32 led_on_interval; /* for blink function; unit: ms */
11517 A_UINT32 led_off_interval; /* for blink function; unit: ms */
11518 A_UINT32 led_repeat_cnt; /* for blink function: how many blinks */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011519} wmi_pdev_set_led_config_cmd_fixed_param;
11520
11521#define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
11522#define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff
11523
11524/** WMI_PEER_INFO_REQ_CMDID
11525 * Request FW to provide peer info */
11526typedef struct {
11527 /** TLV tag and len; tag equals
11528 * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
11529 A_UINT32 tlv_header;
11530 /** In order to get the peer info for a single peer, host shall
11531 * issue the peer_mac_address of that peer. For getting the
11532 * info all peers, the host shall issue 0xFFFFFFFF as the mac
11533 * address. The firmware will return the peer info for all the
11534 * peers on the specified vdev_id */
11535 wmi_mac_addr peer_mac_address;
11536 /** vdev id */
11537 A_UINT32 vdev_id;
11538} wmi_peer_info_req_cmd_fixed_param;
11539
11540typedef struct {
11541 /** TLV tag and len; tag equals
11542 * WMITLV_TAG_STRUC_wmi_peer_info */
11543 A_UINT32 tlv_header;
11544 /** mac addr of the peer */
11545 wmi_mac_addr peer_mac_address;
11546 /** data_rate of the peer */
11547 A_UINT32 data_rate;
11548 /** rssi of the peer */
11549 A_UINT32 rssi;
11550 /** tx fail count */
11551 A_UINT32 tx_fail_cnt;
11552} wmi_peer_info;
11553
11554/** FW response with the peer info */
11555typedef struct {
11556 /** TLV tag and len; tag equals
11557 * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */
11558 A_UINT32 tlv_header;
11559 /** number of peers in peer_info */
11560 A_UINT32 num_peers;
Govind Singh869c9872016-02-22 18:36:34 +053011561 /* Set to 1 only if vdev_id field is valid */
11562 A_UINT32 valid_vdev_id;
11563 /* VDEV to which the peer belongs to */
11564 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011565 /* This TLV is followed by another TLV of array of structs
11566 * wmi_peer_info peer_info[];
11567 */
11568} wmi_peer_info_event_fixed_param;
11569
Nitesh Shahfcedd3b2016-07-21 17:24:35 +053011570/**
11571 * WMI_PEER_ANTDIV_INFO_REQ_CMDID
11572 * Request FW to provide peer info
11573 */
11574typedef struct {
11575 /**
11576 * TLV tag and len; tag equals
11577 * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_req_cmd_fixed_param
11578 */
11579 A_UINT32 tlv_header;
11580 /**
11581 * In order to get the peer antdiv info for a single peer, host shall
11582 * issue the peer_mac_address of that peer. For getting the
11583 * info all peers, the host shall issue 0xFFFFFFFF as the mac
11584 * address. The firmware will return the peer info for all the
11585 * peers on the specified vdev_id
11586 */
11587 wmi_mac_addr peer_mac_address;
11588 /** vdev id */
11589 A_UINT32 vdev_id;
11590} wmi_peer_antdiv_info_req_cmd_fixed_param;
11591
11592/** FW response with the peer antdiv info */
11593typedef struct {
11594 /** TLV tag and len; tag equals
11595 * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_event_fixed_param
11596 */
11597 A_UINT32 tlv_header;
11598 /** number of peers in peer_info */
11599 A_UINT32 num_peers;
11600 /** VDEV to which the peer belongs to */
11601 A_UINT32 vdev_id;
11602 /**
11603 * This TLV is followed by another TLV of array of structs
11604 * wmi_peer_antdiv_info peer_antdiv_info[];
11605 */
11606} wmi_peer_antdiv_info_event_fixed_param;
11607
11608typedef struct {
11609 /**
11610 * TLV tag and len; tag equals
11611 * WMITLV_TAG_STRUC_wmi_peer_antdiv_info
11612 */
11613 A_UINT32 tlv_header;
11614 /** mac addr of the peer */
11615 wmi_mac_addr peer_mac_address;
11616 /**
11617 * per chain rssi of the peer, for up to 8 chains.
11618 * Each chain's entry reports the RSSI for different bandwidths:
11619 * bits 7:0 -> primary 20 MHz
11620 * bits 15:8 -> secondary 20 MHz of 40 MHz channel (if applicable)
11621 * bits 23:16 -> secondary 40 MHz of 80 MHz channel (if applicable)
11622 * bits 31:24 -> secondary 80 MHz of 160 MHz channel (if applicable)
11623 * Each of these 8-bit RSSI reports is in dB units, with respect to
11624 * the noise floor.
11625 * 0x80 means invalid.
11626 * All unused bytes within used chain_rssi indices shall be
11627 * set to 0x80.
11628 * All unused chain_rssi indices shall be set to 0x80808080.
11629 */
11630 A_INT32 chain_rssi[8];
11631} wmi_peer_antdiv_info;
11632
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011633/** FW response when tx failure count has reached threshold
11634 * for a peer */
11635typedef struct {
11636 /** TLV tag and len; tag equals
11637 * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
11638 A_UINT32 tlv_header;
11639 /** vdev id*/
11640 A_UINT32 vdev_id;
11641 /** mac address */
11642 wmi_mac_addr peer_mac_address;
11643 /** tx failure count- will eventually be removed and not used * */
11644 A_UINT32 tx_fail_cnt;
11645 /** seq number of the nth tx_fail_event */
11646 A_UINT32 seq_no;
11647} wmi_peer_tx_fail_cnt_thr_event_fixed_param;
11648
11649enum wmi_rmc_mode {
11650 /** Disable RMC */
11651 WMI_RMC_MODE_DISABLED = 0,
11652 /** Enable RMC */
11653 WMI_RMC_MODE_ENABLED = 1,
11654};
11655
11656/** Enable RMC transmitter functionality. Upon
11657 * receiving this, the FW shall mutlicast frames with
11658 * reliablity. This is a vendor
11659 * proprietary feature. */
11660typedef struct {
11661 /** TLV tag and len; tag equals
11662 * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */
11663 A_UINT32 tlv_header;
11664 /** vdev id*/
11665 A_UINT32 vdev_id;
11666 /** enable_rmc contains values from enum wmi_rmc_mode;
11667 * Default value: 0 (disabled) */
11668 A_UINT32 enable_rmc;
11669} wmi_rmc_set_mode_cmd_fixed_param;
11670
11671/** Configure transmission periodicity of action frames in a
11672 * RMC network for the multicast transmitter */
11673typedef struct {
11674 /** TLV tag and len; tag equals
11675 * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
11676 A_UINT32 tlv_header;
11677 /** vdev id */
11678 A_UINT32 vdev_id;
11679 /** time period in milliseconds. Default: 300 ms.
11680 An action frame indicating the current leader is transmitted by the
11681 RMC transmitter once every 'periodity_msec' */
11682 A_UINT32 periodicity_msec;
11683} wmi_rmc_set_action_period_cmd_fixed_param;
11684
11685/** Optimise Leader selection process in RMC functionality. For
11686 * Enhancement/Debug purposes only */
11687typedef struct {
11688 /** TLV tag and len; tag equals
11689 * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */
11690 A_UINT32 tlv_header;
11691 /** vdev id */
11692 A_UINT32 vdev_id;
11693 /** flags ::
11694 * 0x0001 - Enable beacon averaging
11695 * 0x0002 - Force leader selection
11696 * 0x0004 - Enable Timer based leader switch
11697 * 0x0008 - Use qos/NULL based for multicast reliability */
11698 A_UINT32 flags;
11699 /** control leader change timeperiod (in seconds) */
11700 A_UINT32 peridocity_leader_switch;
11701 /** control activity timeout value for data rx (in seconds) */
11702 A_UINT32 data_activity_timeout;
11703 /** mac address of leader */
11704 wmi_mac_addr forced_leader_mac_addr;
11705} wmi_rmc_config_cmd_fixed_param;
11706
11707/** MHF is generally implemented in
11708 * the kernel. To decrease system power consumption, the
11709 * driver can enable offloading this to the chipset. In
11710 * order for the offload, the firmware needs the routing table.
11711 * The host shall plumb the routing table into FW. The firmware
11712 * shall perform an IP address lookup and forward the packet to
11713 * the next hop using next hop's mac address. This is a vendor
11714 * proprietary feature. */
11715enum wmi_mhf_ofl_mode {
11716 /** Disable MHF offload */
11717 WMI_MHF_OFL_MODE_DISABLED = 0,
11718 /** Enable MHF offload */
11719 WMI_MHF_OFL_MODE_ENABLED = 1,
11720};
11721
11722typedef struct {
11723 /** TLV tag and len; tag equals
11724 * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
11725 A_UINT32 tlv_header;
11726 /** vdev id*/
11727 A_UINT32 vdev_id;
11728 /** enable_mhf_ofl contains values from enum
11729 * wmi_mhf_ofl_mode; Default value: 0 (disabled) */
11730 A_UINT32 enable_mhf_ofl;
11731} wmi_mhf_offload_set_mode_cmd_fixed_param;
11732
11733enum wmi_mhf_ofl_table_action {
11734 /** Create forwarding offload table in FW */
11735 WMI_MHF_OFL_TBL_CREATE = 0,
11736 /** Append to existing MHF offload table */
11737 WMI_MHF_OFL_TBL_APPEND = 1,
11738 /** Flush entire MHF offload table in FW */
11739 WMI_MHF_OFL_TBL_FLUSH = 2,
11740};
11741
11742typedef struct {
11743 /** TLV tag and len; tag equals
11744 * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
11745 A_UINT32 tlv_header;
11746 /** vdev id*/
11747 A_UINT32 vdev_id;
11748 /** action corresponds to values from enum
11749 * wmi_mhf_ofl_table_action */
11750 A_UINT32 action;
11751 /** number of entries in the table */
11752 A_UINT32 num_entries;
11753/** Followed by the variable length TLV
11754 * wmi_mhf_offload_routing_table_entry entries[] */
11755} wmi_mhf_offload_plumb_routing_table_cmd;
11756
11757typedef struct {
11758 /** TLV tag and len; tag equals
11759 * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
11760 A_UINT32 tlv_header;
11761 /** Destination node's IP address */
11762 WMI_IPV4_ADDR dest_ipv4_addr;
11763 /** Next hop node's MAC address */
11764 wmi_mac_addr next_hop_mac_addr;
11765} wmi_mhf_offload_routing_table_entry;
11766
11767typedef struct {
11768 /** tlv tag and len, tag equals
11769 * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
11770 A_UINT32 tlv_header;
11771
11772 /** full 64 tsf timestamp get from MAC tsf timer indicates
11773 * the time that the radar event uploading to host, split
11774 * it to high 32 bit and lower 32 bit in fulltsf_high and
11775 * full_tsf_low
11776 */
11777 A_UINT32 upload_fullts_low;
11778 A_UINT32 upload_fullts_high;
11779
11780 /** timestamp indicates the time when DFS pulse is detected
11781 * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
11782 */
11783 A_UINT32 pulse_detect_ts;
11784
11785 /** the duaration of the pulse in us */
11786 A_UINT32 pulse_duration;
11787
11788 /** the center frequency of the radar pulse detected, KHz */
11789 A_UINT32 pulse_center_freq;
11790
11791 /** bandwidth of current DFS channel, MHz */
11792 A_UINT32 ch_bandwidth;
11793
11794 /** center channel frequency1 of current DFS channel, MHz */
11795 A_UINT16 ch_center_freq1;
11796
11797 /** center channel frequency2 of current DFS channel, MHz,
11798 * reserved for 160 BW mode
11799 */
11800 A_UINT16 ch_center_freq2;
11801
11802 /** flag to indicate if this pulse is chirp */
11803 A_UINT8 pulse_is_chirp;
11804
11805 /** RSSI recorded in the ppdu */
11806 A_UINT8 rssi;
11807
11808 /** extened RSSI info */
11809 A_UINT8 rssi_ext;
11810
11811 /** For 4-byte aligment padding */
11812 A_UINT8 reserved;
11813
Govind Singh869c9872016-02-22 18:36:34 +053011814 union {
11815 /* OBSOLETE - will be removed once all refs are gone */
11816 A_UINT8 pmac_id;
11817 /** pdev_id for identifying the MAC
11818 * See macros starting with WMI_PDEV_ID_ for values.
11819 */
11820 A_UINT8 pdev_id;
11821 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011822
11823 /** index of peak magnitude bin (signed) */
11824 A_INT32 peak_sidx;
11825
11826} wmi_dfs_radar_event_fixed_param;
11827
11828typedef struct {
11829 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */
11830
11831 /*Thermal thresholds */
11832 A_UINT32 lower_thresh_degreeC; /* in degree C */
11833 A_UINT32 upper_thresh_degreeC; /* in degree C */
11834
11835 /*Enable/Disable Thermal Monitoring for Mitigation */
11836 A_UINT32 enable;
11837} wmi_thermal_mgmt_cmd_fixed_param;
11838
11839typedef struct {
11840 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */
11841
11842 A_UINT32 temperature_degreeC; /* temperature in degree C */
11843} wmi_thermal_mgmt_event_fixed_param;
11844
11845/**
11846 * This command is sent from WLAN host driver to firmware to
11847 * request firmware to configure auto shutdown timer in fw
11848 * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
11849 */
11850typedef struct {
11851 A_UINT32 tlv_header;
11852 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */
11853 A_UINT32 timer_value;
11854 /** timer value; 0=disable */
11855} wmi_host_auto_shutdown_cfg_cmd_fixed_param;
11856
11857enum wmi_host_auto_shutdown_reason {
11858 WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
11859 WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
11860 WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
11861};
11862
11863/* WMI_HOST_AUTO_SHUTDOWN_EVENTID */
11864typedef struct {
11865 A_UINT32 tlv_header;
11866 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */
11867 A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
11868} wmi_host_auto_shutdown_event_fixed_param;
11869
11870/** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
11871 * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
11872 * This command is only used by some customer for verification test. It is not for end-user.
11873 *
11874 * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
11875 *
11876 * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
11877 * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condtion only. When multiple
11878 * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
11879 * <channel, ack_offset> pair is unique.
11880 *
11881 * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
11882 * called basic_config_info by bitmap
11883 * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
11884 *
11885 * '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
11886 * is ignored.
11887 * disable will remove preious conditions from FW.
11888 * conditions from the later command will over write conditions stored from a previous command.
11889 *
11890 */
11891
11892#define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */
11893#define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */
11894#define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */
11895#define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */
11896
11897#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */
11898#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */
11899#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */
11900#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */
11901
11902#define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */
11903#define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */
11904#define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */
11905#define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */
11906
11907#define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */
11908#define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */
11909
11910#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */
11911#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */
11912#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */
11913#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */
11914#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */
11915#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */
11916#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */
11917#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */
11918
11919#define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */
11920#define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */
11921
11922#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */
11923#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */
11924
11925#define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */
11926#define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */
11927
11928/** Bit map definition for basic_config_info starts */
11929#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0
11930#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011931#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
11932#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 -080011933
11934#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5
11935#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011936#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
11937#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 -080011938
11939#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10
11940#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011941#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
11942#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 -080011943
11944#define WMI_TPC_CHAINMASK_CONFIG_BT_S 12
11945#define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011946#define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BT)
11947#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 -080011948
11949#define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14
11950#define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011951#define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STBC)
11952#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 -080011953
11954#define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16
11955#define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011956#define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BAND)
11957#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 -080011958
11959#define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17
11960#define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011961#define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STREAM)
11962#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 -080011963
11964#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18
11965#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011966#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
11967#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 -080011968
11969#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21
11970/*
11971 * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
11972 * is temporarily maintained as an alias for the correct name
11973 * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
11974 */
11975#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
11976#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011977#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
11978#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 -080011979
11980#define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22
11981/*
11982 * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
11983 * is temporarily maintained as an alias for the correct name
11984 * (WMI_TPC_CHAINMASK_CONFIG_RATE)
11985 */
11986#define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
11987#define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
11988#define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011989#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 -080011990
11991/** Bit map definition for basic_config_info ends */
11992
11993typedef struct {
11994 A_UINT32 tlv_header;
11995 /** Basic condition defined as bit map above, bitmap is chosen to save memory.
11996 * Bit0 ~ Bit4: tpc offset which will be adjusted if condtion matches, the unit is 0.5dB. bit4 indicates signed
11997 * Bit5 ~ Bit9: ack offset which will be adjusted if condtion matches, the unit is 0.5dB. bit9 indicates signed
11998 * 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
11999 * 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
12000 * 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
12001 * Bit16 : band condition b'0: 2G, b'1: 5G
12002 * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams
12003 * 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
12004 * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
12005 * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
12006 * Bit23 ~ Bit31: reserved
12007 */
12008 A_UINT32 basic_config_info;
12009
12010 /** channel mapping bit rule: The lower bit corresponds with smaller channel.
12011 * it depends on Bit14 of basic_config_info
12012 * Total 24 channels for 5G
12013 * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
12014 * Total 14 channels for 2G
12015 * 1 ~ 14
12016 */
12017 A_UINT32 channel;
12018
12019 /** rate mapping bit rule: The lower bit corresponds with lower rate.
12020 * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
12021 * Legacy rates , 11b, 11g, 11A
12022 * 11n one stream ( ht20, ht40 ) 8+8
12023 * 11n two streams ( ht20, ht40 ) 8+8
12024 * 11ac one stream ( vht20, vht40, vht80 ) 10+10+10
12025 * 11ac two streams (vht20, vht40, vht80 ) 10+10+10
12026 */
12027 A_UINT32 rate0;
12028 /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
12029 * 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
12030 */
12031
12032 /** 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
12033 */
12034 A_UINT32 rate1;
12035} wmi_tpc_chainmask_config;
12036
12037#define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/
12038#define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/
12039
12040typedef struct {
12041 A_UINT32 tlv_header;
12042 A_UINT32 enable;
12043 /** enable to set tpc & chainmask when condtions meet, 0: disabled, 1: enabled. */
12044 A_UINT32 num_tpc_chainmask_configs;
12045 /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */
12046} wmi_tpc_chainmask_config_cmd_fixed_param;
12047
12048typedef struct {
12049 A_UINT32 tlv_header;
12050 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
12051 A_UINT32 data_len;
12052 /** length in byte of data[]. */
12053 /* This structure is used to send REQ binary blobs
12054 * from application/service to firmware where Host drv is pass through .
12055 * Following this structure is the TLV:
12056 * A_UINT8 data[]; // length in byte given by field data_len.
12057 */
12058} wmi_nan_cmd_param;
12059
12060typedef struct {
12061 A_UINT32 tlv_header;
12062 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
12063 A_UINT32 data_len;
12064 /** length in byte of data[]. */
12065 /* This structure is used to send REQ binary blobs
12066 * from firmware to application/service where Host drv is pass through .
12067 * Following this structure is the TLV:
12068 * A_UINT8 data[]; // length in byte given by field data_len.
12069 */
12070} wmi_nan_event_hdr;
12071
Govind Singh941bd5e2016-02-04 17:15:25 +053012072/**
12073 * Event to indicate NAN discovery interface created
12074 */
12075typedef struct {
12076 /*
12077 * TLV tag and len; tag equals
12078 * WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param
12079 */
12080 A_UINT32 tlv_header;
12081 /** Unique id identifying the VDEV */
12082 A_UINT32 vdev_id;
12083 /** NAN interface MAC address */
12084 wmi_mac_addr nan_interface_macaddr;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012085} wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE;
12086
12087#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 +053012088
12089/**
12090 * Event to indicate NAN discovery interface deleted
12091 */
12092typedef struct {
12093 /*
12094 * TLV tag and len; tag equals
12095 * WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param
12096 */
12097 A_UINT32 tlv_header;
12098 /** Unique id identifying the VDEV */
12099 A_UINT32 vdev_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012100} wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE;
12101
12102#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 +053012103
12104/**
12105 * Event to indicate NAN device started new cluster
12106 */
12107typedef struct {
12108 /*
12109 * TLV tag and len; tag equals
12110 * WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param
12111 */
12112 A_UINT32 tlv_header;
12113 /** Unique id identifying the VDEV */
12114 A_UINT32 vdev_id;
12115 /** NAN Cluster ID */
12116 A_UINT32 nan_cluster_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012117} wmi_nan_started_cluster_event_fixed_param_PROTOTYPE;
12118
12119#define wmi_nan_started_cluster_event_fixed_param wmi_nan_started_cluster_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012120
12121/**
12122 * Event to indicate NAN device joined to cluster
12123 */
12124typedef struct {
12125 /*
12126 * TLV tag and len; tag equals
12127 * WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param
12128 */
12129 A_UINT32 tlv_header;
12130 /** Unique id identifying the VDEV */
12131 A_UINT32 vdev_id;
12132 /** NAN Cluster ID */
12133 A_UINT32 nan_cluster_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012134} wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE;
12135
12136#define wmi_nan_joined_cluster_event_fixed_param wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012137
12138/** NAN DATA CMD's */
12139
12140/**
12141 * NAN Data get capabilities req
12142 */
12143typedef struct {
12144 /*
12145 * TLV tag and len; tag equals
12146 * WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param
12147 */
12148 A_UINT32 tlv_header;
12149 /** unique id generated in upper layer for the transaction */
12150 A_UINT32 transaction_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012151} wmi_ndi_get_cap_req_fixed_param_PROTOTYPE;
Govind Singh941bd5e2016-02-04 17:15:25 +053012152
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012153#define wmi_ndi_get_cap_req_fixed_param wmi_ndi_get_cap_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012154
12155/**
12156 * NDP Response code
12157 */
12158typedef enum {
12159 NDP_RSP_CODE_REQUEST_ACCEPT = 0x00,
12160 NDP_RSP_CODE_REQUEST_REJECT = 0x01,
12161 NDP_RSP_CODE_REQUEST_DEFER = 0x02,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012162} wmi_ndp_rsp_code_PROTOTYPE;
12163
12164#define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012165
12166/**
12167 * NDP Initiator requesting a data session
12168 */
12169typedef struct {
12170 /*
12171 * TLV tag and len; tag equals
12172 * WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param
12173 */
12174 A_UINT32 tlv_header;
12175 /** Unique id identifying the VDEV */
12176 A_UINT32 vdev_id;
12177 /** unique id generated in upper layer for the transaction */
12178 A_UINT32 transaction_id;
12179 /** Unique Instance Id identifying the Responder's service */
12180 A_UINT32 service_instance_id;
12181 /** Discovery MAC addr of the publisher/peer */
12182 wmi_mac_addr peer_discovery_mac_addr;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012183 /* Actual number of bytes in TLV ndp_cfg */
Govind Singh941bd5e2016-02-04 17:15:25 +053012184 A_UINT32 ndp_cfg_len;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012185 /* Actual number of bytes in TLV ndp_app_info */
Govind Singh941bd5e2016-02-04 17:15:25 +053012186 A_UINT32 ndp_app_info_len;
12187 /**
12188 * TLV (tag length value ) parameters follow the ndp_initiator_req
12189 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012190 * wmi_channel channel;
12191 * A_UINT8 ndp_cfg[];
12192 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053012193 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012194} wmi_ndp_initiator_req_fixed_param_PROTOTYPE;
12195
12196#define wmi_ndp_initiator_req_fixed_param wmi_ndp_initiator_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012197
12198/**
12199 * Initiate a data response on the responder side
12200 * for data request indication from the peer
12201 */
12202typedef struct {
12203 /*
12204 * TLV tag and len; tag equals
12205 * WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param
12206 */
12207 A_UINT32 tlv_header;
12208 /** Unique id identifying the VDEV */
12209 A_UINT32 vdev_id;
12210 /** unique id generated in upper layer for the transaction */
12211 A_UINT32 transaction_id;
12212 /**
12213 * Unique token Id generated on the initiator/responder
12214 * side used for a NDP session between two NAN devices
12215 */
12216 A_UINT32 ndp_instance_id;
12217 /** Response Code defined in wmi_ndp_rsp_code */
12218 A_UINT32 rsp_code;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012219 /** Number of bytes in TLV ndp_cfg */
Govind Singh941bd5e2016-02-04 17:15:25 +053012220 A_UINT32 ndp_cfg_len;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012221 /** Number of bytes in TLV ndp_app_info */
Govind Singh941bd5e2016-02-04 17:15:25 +053012222 A_UINT32 ndp_app_info_len;
12223 /**
12224 * TLV (tag length value ) parameters follow the ndp_responder_req
12225 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012226 * A_UINT8 ndp_cfg[];
12227 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053012228 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012229} wmi_ndp_responder_req_fixed_param_PROTOTYPE;
12230
12231#define wmi_ndp_responder_req_fixed_param wmi_ndp_responder_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012232
12233/**
12234 * NDP end type
12235 */
12236typedef enum {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012237 WMI_NDP_END_TYPE_UNSPECIFIED = 0x00,
12238 WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01,
12239 WMI_NDP_END_TYPE_OTA_FRAME = 0x02,
12240} wmi_ndp_end_type_PROTOTYPE;
12241
12242#define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012243
12244/**
12245 * NDP end reason code
12246 */
12247typedef enum {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012248 WMI_NDP_END_REASON_UNSPECIFIED = 0x00,
12249 WMI_NDP_END_REASON_INACTIVITY = 0x01,
12250 WMI_NDP_END_REASON_PEER_DATA_END = 0x02,
12251} wmi_ndp_end_reason_code_PROTOTYPE;
12252
12253#define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012254
12255/**
12256 * NDP end request
12257 */
12258typedef struct {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012259 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */
12260 A_UINT32 tlv_header;
Govind Singh941bd5e2016-02-04 17:15:25 +053012261 /** NDP instance id */
12262 A_UINT32 ndp_instance_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012263} wmi_ndp_end_req_PROTOTYPE;
Govind Singh941bd5e2016-02-04 17:15:25 +053012264
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012265#define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012266
12267/**
12268 * NDP End request
12269 */
12270typedef struct {
12271 /*
12272 * TLV tag and len; tag equals
12273 * WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param
12274 */
12275 A_UINT32 tlv_header;
12276 /** unique id generated in upper layer for the transaction */
12277 A_UINT32 transaction_id;
Govind Singh941bd5e2016-02-04 17:15:25 +053012278 /**
12279 * TLV (tag length value ) parameters follow the ndp_end_req
12280 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012281 * wmi_ndp_end_req ndp_end_req_list[];
Govind Singh941bd5e2016-02-04 17:15:25 +053012282 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012283} wmi_ndp_end_req_fixed_param_PROTOTYPE;
12284
12285#define wmi_ndp_end_req_fixed_param wmi_ndp_end_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012286
12287/* NAN DATA RSP EVENTS */
12288
12289/**
12290 * Event to indicate NAN Data Interface capabilities cmd
12291 */
12292typedef struct {
12293 /*
12294 * TLV tag and len; tag equals
12295 * WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param
12296 */
12297 A_UINT32 tlv_header;
12298 /** Copy of transaction_id received in wmi_ndi_get_cap_req */
12299 A_UINT32 transaction_id;
12300 /** Max ndi interface support */
12301 A_UINT32 max_ndi_interfaces;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012302 /** Max ndp sessions can support */
12303 A_UINT32 max_ndp_sessions;
Govind Singh941bd5e2016-02-04 17:15:25 +053012304 /** Max number of peer's per ndi */
12305 A_UINT32 max_peers_per_ndi;
Anurag Chouhan19aa3bf2016-08-04 19:10:12 +053012306 /** which combination of bands is supported - see NAN_DATA_SUPPORTED_BAND enums */
12307 A_UINT32 nan_data_supported_bands;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012308} wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE;
12309
12310#define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012311
12312/**
12313 * NDP command response code
12314 */
12315typedef enum {
12316 NDP_CMD_RSP_STATUS_SUCCESS = 0x00,
12317 NDP_CMD_RSP_STATUS_ERROR = 0x01,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012318} wmi_ndp_cmd_rsp_status_PROTOTYPE;
12319
12320#define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012321
12322/**
Govind Singh941bd5e2016-02-04 17:15:25 +053012323 * Event response for wmi_ndp_initiator_req
12324 */
12325typedef struct {
12326 /*
12327 * TLV tag and len; tag equals
12328 * WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param
12329 */
12330 A_UINT32 tlv_header;
12331 /** Unique id identifying the VDEV */
12332 A_UINT32 vdev_id;
12333 /** Copy of transaction_id received in wmi_ndp_initiator_req */
12334 A_UINT32 transaction_id;
12335 /** Response status defined in wmi_ndp_cmd_rsp_status*/
12336 A_UINT32 rsp_status;
Govind Singh941bd5e2016-02-04 17:15:25 +053012337 A_UINT32 reason_code;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012338 /*
12339 * Unique token Id generated on the initiator/responder
12340 * side used for a NDP session between two NAN devices
12341 */
12342 A_UINT32 ndp_instance_id;
12343} wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE;
12344
12345#define wmi_ndp_initiator_rsp_event_fixed_param wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012346
12347/**
12348 * Event response for wmi_ndp_responder_req cmd
12349 */
12350typedef struct {
12351 /*
12352 * TLV tag and len; tag equals
12353 * WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param
12354 */
12355 A_UINT32 tlv_header;
12356 /** Unique id identifying the VDEV */
12357 A_UINT32 vdev_id;
12358 /** Copy of transaction_id received in wmi_ndp_responder_req */
12359 A_UINT32 transaction_id;
12360 /** Response status defined in wmi_ndp_cmd_rsp_status*/
12361 A_UINT32 rsp_status;
Govind Singh941bd5e2016-02-04 17:15:25 +053012362 A_UINT32 reason_code;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012363 /*
12364 * Unique token Id generated on the initiator/responder
12365 * side used for a NDP session between two NAN devices
12366 */
12367 A_UINT32 ndp_instance_id;
12368 /* NDI mac address of the peer */
12369 wmi_mac_addr peer_ndi_mac_addr;
12370} wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE;
12371
12372#define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE
12373/**
12374 * Active ndp instance id
12375 */
12376typedef struct {
12377 /*
12378 * TLV tag and len; tag equals
12379 * WMITLV_TAG_STRUC_wmi_active_ndp_instance_id
12380 */
12381 A_UINT32 tlv_header;
12382 /* NDP instance id */
12383 A_UINT32 ndp_instance_id;
12384} wmi_active_ndp_instance_id_PROTOTYPE;
12385
12386#define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012387
12388/**
12389 * NDP end response per ndi
12390 */
12391typedef struct {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012392 /*
12393 * TLV tag and len; tag equals
12394 * WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi
12395 */
12396 A_UINT32 tlv_header;
Govind Singh941bd5e2016-02-04 17:15:25 +053012397 /** Unique id identifying the VDEV */
12398 A_UINT32 vdev_id;
12399 /** Peer MAC addr */
12400 wmi_mac_addr peer_mac_addr;
12401 /** Number of active ndps on this ndi */
12402 A_UINT32 num_active_ndps_on_ndi;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012403} wmi_ndp_end_rsp_per_ndi_PROTOTYPE;
Govind Singh941bd5e2016-02-04 17:15:25 +053012404
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012405#define wmi_ndp_end_rsp_per_ndi wmi_ndp_end_rsp_per_ndi_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012406
12407/**
12408 * Event response for wmi_ndp_end_req cmd
12409 */
12410typedef struct {
12411 /*
12412 * TLV tag and len; tag equals
12413 * WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param
12414 */
12415 A_UINT32 tlv_header;
12416 /** Copy of transaction_id received in wmi_ndp_end_req */
12417 A_UINT32 transaction_id;
12418 /** Response status defined in wmi_ndp_cmd_rsp_status*/
12419 A_UINT32 rsp_status;
Govind Singh941bd5e2016-02-04 17:15:25 +053012420 A_UINT32 reason_code;
Govind Singh941bd5e2016-02-04 17:15:25 +053012421 /**
12422 * TLV (tag length value ) parameters follow the ndp_end_rsp
12423 * structure. The TLV's are:
12424 * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[];
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012425 * wmi_active_ndp_instance_id active_ndp_instances_id[];
Govind Singh941bd5e2016-02-04 17:15:25 +053012426 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012427} wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE;
12428
12429#define wmi_ndp_end_rsp_event_fixed_param wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012430
12431/** NAN DATA EVENTS */
12432
12433/**
12434 * NDP self role
12435 */
12436typedef enum {
12437 WMI_NDP_INITIATOR_ROLE,
12438 WMI_NDP_RESPONDER_ROLE,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012439} wmi_ndp_self_role_PROTOTYPE;
12440
12441#define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012442
12443/**
12444 * NDP accept policy
12445 */
12446typedef enum {
12447 WMI_NDP_ACCEPT_POLICY_NONE,
12448 WMI_NDP_ACCEPT_POLICY_ALL,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012449} wmi_ndp_accept_policy_PROTOTYPE;
12450
12451#define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012452
12453/**
12454 * Event indication received on the responder side when a NDP Initiator request/
12455 * NDP session is initiated on the Initiator side
12456 * (self role will be NDP_RESPONDER_ROLE)
12457 *
12458 * Event indication received on the initiator side when a
12459 * NDP responder request on the Initiator side
12460 * (self role will be NDP_INITIATOR_ROLE)
12461 */
12462typedef struct {
12463 /*
12464 * TLV tag and len; tag equals
12465 * WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param
12466 */
12467 A_UINT32 tlv_header;
12468 /** Unique id identifying the VDEV */
12469 A_UINT32 vdev_id;
12470 /** Self NDP Role defined in wmi_ndp_self_role */
12471 A_UINT32 self_ndp_role;
12472 /** Accept policy defined in wmi_ndp_accept_policy */
12473 A_UINT32 accept_policy;
12474 /** Unique Instance Id corresponding to a service/session. */
12475 A_UINT32 service_instance_id;
12476 /** Discovery MAC addr of the peer/initiator */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012477 wmi_mac_addr peer_discovery_mac_addr;
12478 /* NDI mac address of the peer */
12479 wmi_mac_addr peer_ndi_mac_addr;
Govind Singh941bd5e2016-02-04 17:15:25 +053012480 /**
12481 * Unique token Id generated on the initiator/responder
12482 * side used for a NDP session between two NAN devices
12483 */
12484 A_UINT32 ndp_instance_id;
12485 /** Number of bytes in TLV wmi_ndp_cfg */
12486 A_UINT32 ndp_cfg_len;
12487 /** Number of bytes in TLV wmi_ndp_app_info */
12488 A_UINT32 ndp_app_info_len;
12489 /**
12490 * TLV (tag length value ) parameters follow the ndp_indication
12491 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012492 * A_UINT8 ndp_cfg[];
12493 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053012494 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012495} wmi_ndp_indication_event_fixed_param_PROTOTYPE;
12496
12497#define wmi_ndp_indication_event_fixed_param wmi_ndp_indication_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012498
12499/**
12500 * Event indication of data confirm is received on both
12501 * initiator and responder side confirming a NDP session
12502 */
12503typedef struct {
12504 /*
12505 * TLV tag and len; tag equals
12506 * WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param
12507 */
12508 A_UINT32 tlv_header;
12509 /** Unique id identifying the VDEV */
12510 A_UINT32 vdev_id;
12511 /**
12512 * Unique token Id generated on the initiator/responder
12513 * side used for a NDP session between two NAN devices
12514 */
12515 A_UINT32 ndp_instance_id;
12516 /*
12517 * NDI mac address of the peer
12518 * (required to derive target ipv6 address)
12519 */
12520 wmi_mac_addr peer_ndi_mac_addr;
12521 /** Response Code defined in wmi_ndp_rsp_code */
12522 A_UINT32 rsp_code;
12523 /** Number of bytes in TLV wmi_ndp_cfg */
12524 A_UINT32 ndp_cfg_len;
12525 /** Number of bytes in TLV wmi_ndp_app_info */
12526 A_UINT32 ndp_app_info_len;
Anurag Chouhanb36db512016-04-27 16:13:35 +053012527 /** Reason Code */
12528 A_UINT32 reason_code;
12529 /** Number of active ndps on this peer */
12530 A_UINT32 num_active_ndps_on_peer;
Govind Singh941bd5e2016-02-04 17:15:25 +053012531 /**
12532 * TLV (tag length value ) parameters follow the ndp_confirm
12533 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012534 * A_UINT8 ndp_cfg[];
12535 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053012536 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012537} wmi_ndp_confirm_event_fixed_param_PROTOTYPE;
12538
12539#define wmi_ndp_confirm_event_fixed_param wmi_ndp_confirm_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012540
12541/**
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012542 * Event indication received on the initiator/responder side terminating a NDP session
Govind Singh941bd5e2016-02-04 17:15:25 +053012543 */
12544typedef struct {
12545 /*
12546 * TLV tag and len; tag equals
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012547 * WMITLV_TAG_STRUC_wmi_ndp_end_indication
Govind Singh941bd5e2016-02-04 17:15:25 +053012548 */
12549 A_UINT32 tlv_header;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012550 /** type defined in wmi_ndp_end_type */
12551 A_UINT32 type;
12552 /* Unique id identifying the VDEV */
Govind Singh941bd5e2016-02-04 17:15:25 +053012553 A_UINT32 vdev_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053012554 /** reason_code defined in wmi_ndp_end_reason_code */
12555 A_UINT32 reason_code;
12556 /** NDP instance id */
12557 A_UINT32 ndp_instance_id;
12558 /* NDI MAC addr of the peer */
12559 wmi_mac_addr peer_ndi_mac_addr;
12560 /* Number of active ndps on this peer */
12561 A_UINT32 num_active_ndps_on_peer;
12562} wmi_ndp_end_indication_PROTOTYPE;
12563
12564#define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053012565
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012566typedef struct {
12567 A_UINT32 tlv_header;
12568 A_UINT32 num_data;
12569 /* followed by WMITLV_TAG_ARRAY_BYTE */
12570} wmi_diag_data_container_event_fixed_param;
12571
12572enum {
12573 WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
12574 WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
12575 WMI_PDEV_PARAM_TXPOWER_REASON_MAX
12576};
12577
12578#define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF
12579#define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
12580
12581#define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00
12582#define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
12583
12584#define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \
12585 ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
12586
12587#define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \
12588 ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
12589
12590#define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \
12591 (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
12592
12593#define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \
12594 (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
12595
12596/**
12597 * This command is sent from WLAN host driver to firmware to
12598 * notify the current modem power state. Host would receive a
12599 * message from modem when modem is powered on. Host driver
12600 * would then send this command to firmware. Firmware would then
12601 * power on WCI-2 (UART) interface for LTE/MWS Coex.
12602 *
12603 * This command is only applicable for APQ platform which has
12604 * modem on the platform. If firmware doesn't support MWS Coex,
12605 * this command can be dropped by firmware.
12606 *
12607 * This is a requirement from modem team that WCN can't toggle
12608 * UART before modem is powered on.
12609 */
12610typedef struct {
12611 /** TLV tag and len; tag equals
12612 * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
12613 A_UINT32 tlv_header;
12614
12615 /** Modem power state parameter */
12616 A_UINT32 modem_power_state;
12617} wmi_modem_power_state_cmd_param;
12618
12619enum {
12620 WMI_MODEM_STATE_OFF = 0,
12621 WMI_MODEM_STATE_ON
12622};
12623
12624#define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
12625#define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */
12626
12627/** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
12628 generated whenever firmware roamed to new AP silently and
12629 (a) If the host is awake, FW sends the event to the host immediately .
12630 (b) If host is in sleep then either
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012631 (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012632 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 +053012633 (2) data/mgmt frame is received from roamed AP, which needs to return to host
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012634 */
12635
12636typedef struct {
12637 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
12638 A_UINT32 tlv_header;
12639
12640 A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
12641 A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
12642 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES];
12643} wmi_key_material;
12644
12645typedef struct {
12646 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */
12647 /** Unique id identifying the VDEV on which roaming is done by firmware */
12648 A_UINT32 vdev_id;
12649 /** auth_status: connected or authorized */
12650 A_UINT32 auth_status;
12651 /*
Nirav Shah439e6262015-11-05 10:53:18 +053012652 * roam_reason:
12653 * bits 0-3 for roam reason see WMI_ROAM_REASON_XXX
12654 * bits 4-5 for subnet status see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012655 */
12656 A_UINT32 roam_reason;
12657 /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
12658 A_UINT32 rssi;
12659 /** MAC address of roamed AP */
12660 wmi_mac_addr bssid; /* BSSID */
12661 /** whether the frame is beacon or probe rsp */
12662 A_UINT32 is_beacon;
12663 /** the length of beacon/probe rsp */
12664 A_UINT32 bcn_probe_rsp_len;
12665 /** the length of reassoc rsp */
12666 A_UINT32 reassoc_rsp_len;
Manikandan Mohan30728082015-12-09 12:35:24 -080012667 /** the length of reassoc req */
12668 A_UINT32 reassoc_req_len;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012669 /**
12670 * TLV (tag length value ) parameters follows roam_synch_event
12671 * The TLV's are:
12672 * A_UINT8 bcn_probe_rsp_frame[]; length identified by bcn_probe_rsp_len
12673 * A_UINT8 reassoc_rsp_frame[]; length identified by reassoc_rsp_len
12674 * wmi_channel chan;
12675 * wmi_key_material key;
12676 * A_UINT32 status; subnet changed status not being used
12677 * currently. will pass the information using roam_status.
Manikandan Mohan30728082015-12-09 12:35:24 -080012678 * A_UINT8 reassoc_req_frame[]; length identified by reassoc_req_len
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012679 **/
12680} wmi_roam_synch_event_fixed_param;
12681
12682#define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF
12683
12684typedef struct {
12685 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
12686 A_UINT32 tlv_header;
12687 /** MAC address of the peer for which the estimated link speed is required. */
12688 wmi_mac_addr peer_macaddr;
Govind Singh869c9872016-02-22 18:36:34 +053012689 /* Set to 1 only if vdev_id field is valid */
12690 A_UINT32 valid_vdev_id;
12691 /* VDEV to which the peer belongs to */
12692 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012693} wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
12694
12695typedef struct {
12696 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
12697 A_UINT32 tlv_header;
12698 /** MAC address of the peer for which the estimated link speed is required.
12699 */
12700 wmi_mac_addr peer_macaddr;
12701 /* Estimated link speed in kbps.
12702 * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
12703 */
12704 A_UINT32 est_linkspeed_kbps;
Govind Singh869c9872016-02-22 18:36:34 +053012705 /* Set to 1 only if vdev_id field is valid */
12706 A_UINT32 valid_vdev_id;
12707 /* VDEV to which the peer belongs to */
12708 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012709} wmi_peer_estimated_linkspeed_event_fixed_param;
12710
12711typedef struct {
12712 A_UINT32 tlv_header; /* TLV tag and len; tag equals */
12713 /* vdev ID */
12714 A_UINT32 vdev_id;
12715 A_UINT32 data_len;
12716 /** length in byte of data[]. */
12717 /* This structure is used to send REQ binary blobs
12718 * from application/service to firmware where Host drv is pass through .
12719 * Following this structure is the TLV:
12720 * A_UINT8 data[]; // length in byte given by field data_len.
12721 */
12722} wmi_req_stats_ext_cmd_fixed_param;
12723
12724typedef struct {
12725 A_UINT32 tlv_header;
12726 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
12727 A_UINT32 vdev_id;
12728 /** vdev ID */
12729 A_UINT32 data_len;
12730 /** length in byte of data[]. */
12731 /* This structure is used to send REQ binary blobs
12732 * from firmware to application/service where Host drv is pass through .
12733 * Following this structure is the TLV:
12734 * A_UINT8 data[]; // length in byte given by field data_len.
12735 */
12736} wmi_stats_ext_event_fixed_param;
12737
12738typedef struct {
Manikandan Mohan429a0782015-12-23 14:35:54 -080012739 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */
12740 /** unique id identifying the VDEV, generated by the caller */
12741 A_UINT32 vdev_id;
12742 /** peer MAC address */
12743 wmi_mac_addr peer_macaddr;
12744} wmi_peer_delete_resp_event_fixed_param;
12745
12746typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012747 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
12748 A_UINT32 tlv_header;
12749 A_UINT32 vdev_id; /* vdev ID */
12750 /* MAC address of the peer for which the estimated link speed is required. */
12751 wmi_mac_addr peer_macaddr;
12752 A_UINT32 state; /* peer state */
12753} wmi_peer_state_event_fixed_param;
12754
12755typedef struct {
12756 /*
12757 * TLV tag and len; tag equals
12758 * WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param
12759 */
12760 A_UINT32 tlv_header;
12761 /* unique id identifying the VDEV, generated by the caller */
12762 A_UINT32 vdev_id;
12763 /* peer MAC address */
12764 wmi_mac_addr peer_macaddr;
12765} wmi_peer_assoc_conf_event_fixed_param;
12766
12767enum {
12768 WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0,
12769 /** scan_type: passive */
12770 WMI_2G4_HT40_OBSS_SCAN_ACTIVE,
12771 /** scan_type: active */
12772};
12773
12774typedef struct {
12775 /**
12776 * TLV tag and len;
12777 * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enalbe_cmd_fixed_param
12778 */
12779 A_UINT32 tlv_header;
12780 A_UINT32 vdev_id;
12781 /**
12782 * active or passive. if active all the channels are actively scanned.
12783 * if passive then all the channels are passively scanned
12784 */
12785 A_UINT32 scan_type;
12786 /**
12787 * FW can perform multiple scans with in a OBSS scan interval.
12788 * For each scan,
12789 * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel ,
12790 * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
12791 * The unit for these 2 parameters is TUs.
12792 */
12793 A_UINT32 obss_scan_passive_dwell;
12794 A_UINT32 obss_scan_active_dwell;
12795 /**
12796 * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
12797 * both min and total per channel dwell time requirement
12798 */
12799 A_UINT32 bss_channel_width_trigger_scan_interval;
12800 /**
12801 * FW can perform multiple scans with in a OBSS scan interval.
12802 * For each scan,
12803 * the total per channel dwell time across all scans with in OBSS scan interval should be
12804 * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
12805 * for active scans and ,
12806 * The unit for these 2 parameters is TUs.
12807 */
12808 A_UINT32 obss_scan_passive_total_per_channel;
12809 A_UINT32 obss_scan_active_total_per_channel;
12810 A_UINT32 bss_width_channel_transition_delay_factor;
12811 /** parameter to check exemption from scan */
12812 A_UINT32 obss_scan_activity_threshold;
12813 /** parameter to check exemption from scan */
12814 /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
12815 A_UINT32 forty_mhz_intolerant;
12816 /** STA 40M bandwidth intolerant capability */
12817 A_UINT32 current_operating_class;
12818 /** STA current operating class */
12819 /** length of 2.4GHz channel list to scan at, channel list in tlv->channels[] */
12820 A_UINT32 channel_len;
12821 /** length of optional ie data to append to probe reqest when active scan, ie data in tlv->ie_field[] */
12822 A_UINT32 ie_len;
12823} wmi_obss_scan_enable_cmd_fixed_param;
12824
12825typedef struct {
12826 /**
12827 * TLV tag and len;
12828 * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
12829 */
12830 A_UINT32 tlv_header;
12831 A_UINT32 vdev_id;
12832} wmi_obss_scan_disable_cmd_fixed_param;
12833
12834typedef struct {
12835 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
12836 A_UINT32 tlv_header;
12837 /** unique id identifying the VDEV */
12838 A_UINT32 vdev_id;
12839 /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
12840 A_UINT32 tx_status;
12841} wmi_offload_prb_rsp_tx_status_event_fixed_param;
12842
12843typedef enum {
12844 WMI_FRAME_TX_OK, /* frame tx ok */
12845 WMI_FRAME_TX_XRETRY, /* excessivley retried */
12846 WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */
12847 WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */
12848} WMI_FRAME_TX_STATUS;
12849
12850/**
12851 * This command is sent from WLAN host driver to firmware to
12852 * request firmware to send the latest channel avoidance range
12853 * to host.
12854 *
12855 * This command is only applicable for APQ platform which has
12856 * modem on the platform. If firmware doesn't support MWS Coex,
12857 * this command can be dropped by firmware.
12858 *
12859 * Host would send this command to firmware to request a channel
12860 * avoidance information update.
12861 */
12862typedef struct {
12863 /** TLV tag and len; tag equals
12864 * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
12865 A_UINT32 tlv_header;
12866} wmi_chan_avoid_update_cmd_param;
12867
12868/* ExtScan operation mode */
12869typedef enum {
12870 WMI_EXTSCAN_MODE_NONE = 0x0000,
12871 WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */
12872 WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */
12873 WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */
12874} wmi_extscan_operation_mode;
12875
12876/* Channel Mask */
12877typedef enum {
12878 WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
12879 WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */
12880 WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */
12881 WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */
12882} wmi_channel_band_mask;
12883
12884typedef enum {
12885 WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001,
12886 WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002,
12887 WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004,
12888 WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008,
12889 WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010,
12890 WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020,
Govind Singhfad2f212016-01-21 10:55:51 +053012891 WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040,
12892 WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012893
12894 WMI_EXTSCAN_EVENT_MAX = 0x8000
12895} wmi_extscan_event_type;
12896
12897#define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \
12898 WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
12899
12900#define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \
12901 WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
12902 WMI_EXTSCAN_BUCKET_FAILED_EVENT | \
12903 WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
12904
12905typedef enum {
12906 WMI_EXTSCAN_NO_FORWARDING = 0x0000,
12907 WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
12908} wmi_extscan_forwarding_flags;
12909
12910typedef enum {
12911 /* Use Motion Sensor Detection */
12912 WMI_EXTSCAN_USE_MSD = 0x0001,
12913 /* Extscan LPASS extended batching feature is supported and enabled */
12914 WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002,
12915} wmi_extscan_configuration_flags;
12916typedef enum {
12917 /*
12918 * Cache the results of bucket whose
12919 * configuration flags has this bit set
12920 */
12921 WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001,
Govind Singhfad2f212016-01-21 10:55:51 +053012922 /* Report ext scan results to context hub or not.*/
12923 WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012924} wmi_extscan_bucket_configuration_flags;
12925
12926typedef enum {
12927 WMI_EXTSCAN_STATUS_OK = 0,
12928 WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
12929 WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
12930 WMI_EXTSCAN_STATUS_INTERNAL_ERROR
12931} wmi_extscan_start_stop_status;
12932
12933typedef struct {
12934 /** Request ID - to identify command. Cannot be 0 */
12935 A_UINT32 request_id;
12936 /** Requestor ID - client requesting ExtScan */
12937 A_UINT32 requestor_id;
12938 /** VDEV id(interface) that is requesting scan */
12939 A_UINT32 vdev_id;
12940} wmi_extscan_command_id;
12941
12942typedef struct {
12943 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12944 /** channel number */
12945 A_UINT32 channel;
12946
12947 /** dwell time in msec - use defaults if 0 */
12948 A_UINT32 min_dwell_time;
12949 A_UINT32 max_dwell_time;
12950 /** passive/active channel and other flags */
12951 A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */
12952} wmi_extscan_bucket_channel;
12953
12954/* Scan Bucket specification */
12955typedef struct {
12956 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12957 /** Bucket ID - 0-based */
12958 A_UINT32 bucket_id;
12959 /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
12960 A_UINT32 notify_extscan_events;
12961 /** Options to forward scan results - see wmi_extscan_forwarding_flags */
12962 A_UINT32 forwarding_flags;
12963 /*
12964 * ExtScan configuration flags -
12965 * wmi_extscan__bucket_configuration_flags
12966 */
12967 A_UINT32 configuration_flags;
12968 /** DEPRECATED member:multiplier to be applied to the periodic scan's base period */
12969 A_UINT32 base_period_multiplier;
12970 /** dwell time in msec on active channels - use defaults if 0 */
12971 A_UINT32 min_dwell_time_active;
12972 A_UINT32 max_dwell_time_active;
12973 /** dwell time in msec on passive channels - use defaults if 0 */
12974 A_UINT32 min_dwell_time_passive;
12975 A_UINT32 max_dwell_time_passive;
12976 /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
12977 A_UINT32 channel_band;
12978 /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
12979 A_UINT32 num_channels;
12980 /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
12981 A_UINT32 min_period;
12982 /** period above which exponent is not applied anymore */
12983 A_UINT32 max_period;
12984 /**
12985 * back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
12986 * new_bucket_period = last_bucket_period + last_exponent_period exp_backoff
12987 */
12988 A_UINT32 exp_backoff;
12989 /** number of scans performed at a given periodicity after which exponential back off value is
12990 * applied to current periodicity to obtain a newer one
12991 */
12992 A_UINT32 exp_max_step_count;
12993/** Followed by the variable length TLV chan_list:
12994 * wmi_extscan_bucket_channel chan_list[] */
12995} wmi_extscan_bucket;
12996
12997typedef struct {
12998 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
12999 /** Request ID - to identify command. Cannot be 0 */
13000 A_UINT32 request_id;
13001 /** Requestor ID - client requesting ExtScan */
13002 A_UINT32 requestor_id;
13003 /** VDEV id(interface) that is requesting scan */
13004 A_UINT32 vdev_id;
13005 /** table ID - to allow support for multiple simultaneous requests */
13006 A_UINT32 table_id;
13007 /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
13008 A_UINT32 base_period;
13009 /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
13010 A_UINT32 max_iterations;
13011 /** Options to forward scan results - see wmi_extscan_forwarding_flags */
13012 A_UINT32 forwarding_flags;
13013 /** ExtScan configuration flags - wmi_extscan_configuration_flags */
13014 A_UINT32 configuration_flags;
13015 /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
13016 A_UINT32 notify_extscan_events;
13017 /** Scan Priority, input to scan scheduler */
13018 A_UINT32 scan_priority;
13019 /** Maximum number of BSSIDs to cache on each scan cycle */
13020 A_UINT32 max_bssids_per_scan_cycle;
13021 /** Minimum RSSI value to report */
13022 A_UINT32 min_rssi;
13023 /** Maximum table usage in percentage */
13024 A_UINT32 max_table_usage;
13025 /** default dwell time in msec on active channels */
13026 A_UINT32 min_dwell_time_active;
13027 A_UINT32 max_dwell_time_active;
13028 /** default dwell time in msec on passive channels */
13029 A_UINT32 min_dwell_time_passive;
13030 A_UINT32 max_dwell_time_passive;
13031 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
13032 A_UINT32 min_rest_time;
13033 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
13034 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
13035 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
13036 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
13037 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
13038 * irrespective of activity. activity is determined by the idle_time parameter.
13039 */
13040 A_UINT32 max_rest_time;
13041 /** time before sending next set of probe requests.
13042 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
13043 * The number of probe requests specified depends on the ssid_list and bssid_list
13044 */
13045 /** Max number of probes to be sent */
13046 A_UINT32 n_probes;
13047 /** time in msec between 2 sets of probe requests. */
13048 A_UINT32 repeat_probe_time;
13049 /** time in msec between 2 consequetive probe requests with in a set. */
13050 A_UINT32 probe_spacing_time;
13051 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
13052 A_UINT32 idle_time;
13053 /** maximum time in msec allowed for scan */
13054 A_UINT32 max_scan_time;
13055 /** delay in msec before sending first probe request after switching to a channel */
13056 A_UINT32 probe_delay;
13057 /** Scan control flags */
13058 A_UINT32 scan_ctrl_flags;
13059 /** Burst duration time in msec*/
13060 A_UINT32 burst_duration;
13061
13062 /** number of bssids in the TLV bssid_list[] */
13063 A_UINT32 num_bssid;
13064 /** number of ssid in the TLV ssid_list[] */
13065 A_UINT32 num_ssids;
13066 /** number of bytes in TLV ie_data[] */
13067 A_UINT32 ie_len;
13068 /** number of buckets in the TLV bucket_list[] */
13069 A_UINT32 num_buckets;
13070 /** in number of scans, send notifications to host after these many scans */
13071 A_UINT32 report_threshold_num_scans;
13072
13073 /** number of channels in channel_list[] determined by the
13074 sum of wmi_extscan_bucket.num_channels in array */
13075
13076/**
13077 * TLV (tag length value ) parameters follow the extscan_cmd
13078 * structure. The TLV's are:
13079 * wmi_ssid ssid_list[];
13080 * wmi_mac_addr bssid_list[];
13081 * A_UINT8 ie_data[];
13082 * wmi_extscan_bucket bucket_list[];
13083 * wmi_extscan_bucket_channel channel_list[];
13084 */
13085} wmi_extscan_start_cmd_fixed_param;
13086
13087typedef struct {
13088 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
13089 /** Request ID - to match running command. 0 matches any request */
13090 A_UINT32 request_id;
13091 /** Requestor ID - client requesting stop */
13092 A_UINT32 requestor_id;
13093 /** VDEV id(interface) that is requesting scan */
13094 A_UINT32 vdev_id;
13095 /** table ID - to allow support for multiple simultaneous requests */
13096 A_UINT32 table_id;
13097} wmi_extscan_stop_cmd_fixed_param;
13098
13099enum wmi_extscan_get_cached_results_flags {
13100 WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000,
13101 WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
13102};
13103
13104typedef struct {
13105 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
13106 /** request ID - used to correlate command with events */
13107 A_UINT32 request_id;
13108 /** Requestor ID - client that requested results */
13109 A_UINT32 requestor_id;
13110 /** VDEV id(interface) that is requesting scan */
13111 A_UINT32 vdev_id;
13112 /** table ID - to allow support for multiple simultaneous requests */
13113 A_UINT32 table_id;
13114 /** maximum number of results to be returned */
13115 A_UINT32 max_results;
13116 /** flush BSSID list - wmi_extscan_get_cached_results_flags */
13117 A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */
13118} wmi_extscan_get_cached_results_cmd_fixed_param;
13119
13120typedef struct {
13121 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
13122 /** request ID - used to correlate command with events */
13123 A_UINT32 request_id;
13124 /** Requestor ID - client that requested results */
13125 A_UINT32 requestor_id;
13126 /** VDEV id(interface) that is requesting scan */
13127 A_UINT32 vdev_id;
13128 /** table ID - to allow support for multiple simultaneous requests */
13129 A_UINT32 table_id;
13130} wmi_extscan_get_wlan_change_results_cmd_fixed_param;
13131
13132typedef struct {
13133 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13134 /**bssid */
13135 wmi_mac_addr bssid;
13136 /**channel number */
13137 A_UINT32 channel;
13138 /**upper RSSI limit */
13139 A_UINT32 upper_rssi_limit;
13140 /**lower RSSI limit */
13141 A_UINT32 lower_rssi_limit;
13142} wmi_extscan_wlan_change_bssid_param;
13143
13144typedef struct {
13145 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
13146 /** Request ID - to identify command. Cannot be 0 */
13147 A_UINT32 request_id;
13148 /** Requestor ID - client requesting wlan change monitoring */
13149 A_UINT32 requestor_id;
13150 /** VDEV id(interface) that is requesting scan */
13151 A_UINT32 vdev_id;
13152 /** table ID - to allow support for multiple simultaneous tables */
13153 A_UINT32 table_id;
13154 /** operation mode: start/stop */
13155 A_UINT32 mode; /* wmi_extscan_operation_mode */
13156 /** number of rssi samples to store */
13157 A_UINT32 max_rssi_samples;
13158 /** number of samples to use to calculate RSSI average */
13159 A_UINT32 rssi_averaging_samples;
13160 /** number of scans to confirm loss of contact with RSSI */
13161 A_UINT32 lost_ap_scan_count;
13162 /** number of out-of-range BSSIDs necessary to send event */
13163 A_UINT32 max_out_of_range_count;
13164 /** total number of bssid signal descriptors (in all pages) */
13165 A_UINT32 total_entries;
13166 /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
13167 A_UINT32 first_entry_index;
13168 /** number of bssid signal descriptors in this page */
13169 A_UINT32 num_entries_in_page;
13170 /* Following this structure is the TLV:
13171 * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[]; // number of elements given by field num_page_entries.
13172 */
13173} wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
13174
13175typedef struct {
13176 /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13177 A_UINT32 tlv_header;
13178 /**ssid */
13179 wmi_ssid ssid;
13180 /**band */
13181 A_UINT32 band;
13182 /**RSSI threshold for reporting */
13183 A_UINT32 min_rssi;
13184 A_UINT32 max_rssi;
13185} wmi_extscan_hotlist_ssid_entry;
13186
13187typedef struct {
13188 /**
13189 * TLV tag and len; tag equals
13190 * MITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param
13191 */
13192 A_UINT32 tlv_header;
13193 /** Request ID - to identify command. Cannot be 0 */
13194 A_UINT32 request_id;
13195 /** Requestor ID - client requesting hotlist ssid monitoring */
13196 A_UINT32 requestor_id;
13197 /** VDEV id(interface) that is requesting scan */
13198 A_UINT32 vdev_id;
13199 /** table ID - to allow support for multiple simultaneous tables */
13200 A_UINT32 table_id;
13201 /** operation mode: start/stop */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013202 A_UINT32 mode; /* wmi_extscan_operation_mode */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013203 /**total number of ssids (in all pages) */
13204 A_UINT32 total_entries;
13205 /**index of the first ssid entry found in the TLV extscan_hotlist_ssid_entry*/
13206 A_UINT32 first_entry_index;
13207 /**number of ssids in this page */
13208 A_UINT32 num_entries_in_page;
13209 /** number of consecutive scans to confirm loss of an ssid **/
13210 A_UINT32 lost_ap_scan_count;
13211 /* Following this structure is the TLV:
13212 * wmi_extscan_hotlist_ssid_entry hotlist_ssid[];
13213 * number of element given by field num_page_entries.
13214 */
13215} wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
13216
13217typedef struct {
13218 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13219 /**bssid */
13220 wmi_mac_addr bssid;
13221 /**RSSI min threshold for reporting */
13222 A_UINT32 min_rssi;
13223 /**Deprecated entry channel number */
13224 A_UINT32 channel;
13225 /** RSSI max threshold for reporting */
13226 A_UINT32 max_rssi;
13227} wmi_extscan_hotlist_entry;
13228
13229typedef struct {
13230 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
13231 /** Request ID - to identify command. Cannot be 0 */
13232 A_UINT32 request_id;
13233 /** Requestor ID - client requesting hotlist monitoring */
13234 A_UINT32 requestor_id;
13235 /** VDEV id(interface) that is requesting scan */
13236 A_UINT32 vdev_id;
13237 /** table ID - to allow support for multiple simultaneous tables */
13238 A_UINT32 table_id;
13239 /** operation mode: start/stop */
13240 A_UINT32 mode; /* wmi_extscan_operation_mode */
13241 /**total number of bssids (in all pages) */
13242 A_UINT32 total_entries;
13243 /**index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry*/
13244 A_UINT32 first_entry_index;
13245 /**number of bssids in this page */
13246 A_UINT32 num_entries_in_page;
13247 /** number of consecutive scans to confirm loss of contact with AP */
13248 A_UINT32 lost_ap_scan_count;
13249 /* Following this structure is the TLV:
13250 * wmi_extscan_hotlist_entry hotlist[]; // number of elements given by field num_page_entries.
13251 */
13252} wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
13253
13254 typedef struct {
13255 /* TLV tag and len; tag equals
13256 *WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
13257 A_UINT32 tlv_header;
13258 /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
13259 A_UINT32 config_request_id;
13260 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID
13261 that configured the table */
13262 A_UINT32 config_requestor_id;
13263 /**
13264 * VDEV id(interface) of the
13265 * WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table
13266 */
13267 A_UINT32 config_vdev_id;
13268 /** table ID - to allow support for multiple simultaneous tables */
13269 A_UINT32 table_id;
13270 /**total number of ssids (in all pages) */
13271 A_UINT32 total_entries;
13272 /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
13273 A_UINT32 first_entry_index;
13274 /**number of ssids in this page */
13275 A_UINT32 num_entries_in_page;
13276 /* Following this structure is the TLV:
13277 * wmi_extscan_wlan_descriptor hotlist_match[];
13278 * number of descriptors given by field num_entries_in_page
13279 */
13280} wmi_extscan_hotlist_ssid_match_event_fixed_param;
13281
13282typedef struct {
13283 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13284 /** table ID - to allow support for multiple simultaneous tables */
13285 A_UINT32 table_id;
13286 /** size in bytes of scan cache entry */
13287 A_UINT32 scan_cache_entry_size;
13288 /** maximum number of scan cache entries */
13289 A_UINT32 max_scan_cache_entries;
13290 /** maximum number of buckets per extscan request */
13291 A_UINT32 max_buckets;
13292 /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
13293 A_UINT32 max_bssid_per_scan;
13294 /** table usage level at which indication must be sent to host */
13295 A_UINT32 max_table_usage_threshold;
13296} wmi_extscan_cache_capabilities;
13297
13298typedef struct {
13299 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13300 /** table ID - to allow support for multiple simultaneous tables */
13301 A_UINT32 table_id;
13302 /** size in bytes of wlan change entry */
13303 A_UINT32 wlan_change_entry_size;
13304 /** maximum number of entries in wlan change table */
13305 A_UINT32 max_wlan_change_entries;
13306 /** number of RSSI samples used for averaging RSSI */
13307 A_UINT32 max_rssi_averaging_samples;
13308 /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
13309 A_UINT32 max_rssi_history_entries;
13310} wmi_extscan_wlan_change_monitor_capabilities;
13311
13312typedef struct {
13313 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13314 /** table ID - to allow support for multiple simultaneous tables */
13315 A_UINT32 table_id;
13316 /** size in bytes of hotlist entry */
13317 A_UINT32 wlan_hotlist_entry_size;
13318 /** maximum number of entries in wlan change table */
13319 A_UINT32 max_hotlist_entries;
13320} wmi_extscan_hotlist_monitor_capabilities;
13321
13322typedef struct {
13323 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
13324 /** Request ID - matches request ID used to start hot list monitoring */
13325 A_UINT32 request_id;
13326 /** Requestor ID - client requesting stop */
13327 A_UINT32 requestor_id;
13328 /** number of extscan caches */
13329 A_UINT32 num_extscan_cache_tables;
13330 /** number of wlan change lists */
13331 A_UINT32 num_wlan_change_monitor_tables;
13332 /** number of hotlists */
13333 A_UINT32 num_hotlist_monitor_tables;
13334 /** if one sided rtt data collection is supported */
13335 A_UINT32 rtt_one_sided_supported;
13336 /** if 11v data collection is supported */
13337 A_UINT32 rtt_11v_supported;
13338 /** if 11mc data collection is supported */
13339 A_UINT32 rtt_ftm_supported;
13340 /** number of extscan cache capabilities (one per table) */
13341 A_UINT32 num_extscan_cache_capabilities;
13342 /** number of wlan change capabilities (one per table) */
13343 A_UINT32 num_extscan_wlan_change_capabilities;
13344 /** number of extscan hotlist capabilities (one per table) */
13345 A_UINT32 num_extscan_hotlist_capabilities;
13346 /* Following this structure is the TLV:
13347 * wmi_extscan_cache_capabilities extscan_cache_capabilities; // number of capabilities given by num_extscan_caches
13348 * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; // number of capabilities given by num_wlan_change_monitor_tables
13349 * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; // number of capabilities given by num_hotlist_monitor_tables
13350 */
13351} wmi_extscan_set_capabilities_cmd_fixed_param;
13352
13353typedef struct {
13354 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
13355 /** Request ID - matches request ID used to start hot list monitoring */
13356 A_UINT32 request_id;
13357 /** Requestor ID - client requesting capabilities */
13358 A_UINT32 requestor_id;
13359} wmi_extscan_get_capabilities_cmd_fixed_param;
13360
13361typedef struct {
13362 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
13363 /** Request ID of the operation that was started/stopped */
13364 A_UINT32 request_id;
13365 /** Requestor ID of the operation that was started/stopped */
13366 A_UINT32 requestor_id;
13367 /** VDEV id(interface) of the operation that was started/stopped */
13368 A_UINT32 vdev_id;
13369 /** extscan WMI command */
13370 A_UINT32 command;
13371 /** operation mode: start/stop */
13372 A_UINT32 mode; /* wmi_extscan_operation_mode */
13373 /**success/failure */
13374 A_UINT32 status; /* enum wmi_extscan_start_stop_status */
13375 /** table ID - to allow support for multiple simultaneous requests */
13376 A_UINT32 table_id;
13377} wmi_extscan_start_stop_event_fixed_param;
13378
13379typedef struct {
13380 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
13381 /** Request ID of the extscan operation that is currently running */
13382 A_UINT32 request_id;
13383 /** Requestor ID of the extscan operation that is currently running */
13384 A_UINT32 requestor_id;
13385 /** VDEV id(interface) of the extscan operation that is currently running */
13386 A_UINT32 vdev_id;
13387 /** scan event (wmi_scan_event_type) */
13388 A_UINT32 event; /* wmi_extscan_event_type */
13389 /** table ID - to allow support for multiple simultaneous requests */
13390 A_UINT32 table_id;
13391 /**number of buckets */
13392 A_UINT32 num_buckets;
13393 /* Following this structure is the TLV:
13394 * A_UINT32 bucket_id[]; // number of elements given by field num_buckets.
13395 */
13396} wmi_extscan_operation_event_fixed_param;
13397
13398/* Types of extscan tables */
13399typedef enum {
13400 EXTSCAN_TABLE_NONE = 0,
13401 EXTSCAN_TABLE_BSSID = 1,
13402 EXTSCAN_TABLE_RSSI = 2,
13403} wmi_extscan_table_type;
13404
13405typedef struct {
13406 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
13407 /** Request ID of the extscan operation that is currently running */
13408 A_UINT32 request_id;
13409 /** Requestor ID of the extscan operation that is currently running */
13410 A_UINT32 requestor_id;
13411 /** VDEV id(interface) of the extscan operation that is currently running */
13412 A_UINT32 vdev_id;
13413 /** table ID - to allow support for multiple simultaneous tables */
13414 A_UINT32 table_id;
13415 /**see wmi_extscan_table_type for table reporting usage */
13416 A_UINT32 table_type;
13417 /**number of entries in use */
13418 A_UINT32 entries_in_use;
13419 /**maximum number of entries in table */
13420 A_UINT32 maximum_entries;
13421} wmi_extscan_table_usage_event_fixed_param;
13422
13423typedef enum {
13424 /**
13425 * Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
13426 * this can be used to discard scan results
13427 */
13428 WMI_SCAN_STATUS_INTERRUPTED = 1
13429} wmi_scan_status_flags;
13430
13431
13432typedef struct {
13433 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
Anurag Chouhancc474b72016-04-18 17:36:23 +053013434 /** RSSI */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013435 A_UINT32 rssi;
Anurag Chouhancc474b72016-04-18 17:36:23 +053013436 /** time stamp in milliseconds */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013437 A_UINT32 tstamp;
13438 /** Extscan cycle during which this entry was scanned */
13439 A_UINT32 scan_cycle_id;
13440 /**
13441 * flag to indicate if the given result was obtained as part of
13442 * interrupted (aborted/large time gap preempted) scan
13443 */
13444 A_UINT32 flags;
Anurag Chouhancc474b72016-04-18 17:36:23 +053013445 /** Bitmask of buckets (i.e. sets of channels) scanned */
13446 A_UINT32 buckets_scanned;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013447} wmi_extscan_rssi_info;
13448
13449typedef struct {
13450 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13451 /**bssid */
13452 wmi_mac_addr bssid;
13453 /**ssid */
13454 wmi_ssid ssid;
13455 /**channel number */
13456 A_UINT32 channel;
13457 /* capabilities */
13458 A_UINT32 capabilities;
13459 /* beacon interval in TUs */
13460 A_UINT32 beacon_interval;
13461 /**time stamp in milliseconds - time last seen */
13462 A_UINT32 tstamp;
13463 /**flags - _tExtScanEntryFlags */
13464 A_UINT32 flags;
13465 /**RTT in ns */
13466 A_UINT32 rtt;
13467 /**rtt standard deviation */
13468 A_UINT32 rtt_sd;
13469 /* rssi information */
13470 A_UINT32 number_rssi_samples;
13471 /** IE length */
13472 A_UINT32 ie_length; /* length of IE data */
13473} wmi_extscan_wlan_descriptor;
13474
13475typedef struct {
13476 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
13477 /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
13478 A_UINT32 request_id;
13479 /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
13480 A_UINT32 requestor_id;
13481 /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
13482 A_UINT32 vdev_id;
13483 /** Request ID of the extscan operation that is currently running */
13484 A_UINT32 extscan_request_id;
13485 /** Requestor ID of the extscan operation that is currently running */
13486 A_UINT32 extscan_requestor_id;
13487 /** VDEV id(interface) of the extscan operation that is currently running */
13488 A_UINT32 extscan_vdev_id;
13489 /** table ID - to allow support for multiple simultaneous tables */
13490 A_UINT32 table_id;
13491 /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
13492 A_UINT32 current_tstamp;
13493 /**total number of bssids (in all pages) */
13494 A_UINT32 total_entries;
13495 /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
13496 A_UINT32 first_entry_index;
13497 /**number of bssids in this page */
13498 A_UINT32 num_entries_in_page;
Govind Singhfad2f212016-01-21 10:55:51 +053013499 /* number of buckets scanned */
13500 A_UINT32 buckets_scanned;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013501 /* Followed by the variable length TLVs
13502 * wmi_extscan_wlan_descriptor bssid_list[]
13503 * wmi_extscan_rssi_info rssi_list[]
13504 * A_UINT8 ie_list[]
13505 */
13506} wmi_extscan_cached_results_event_fixed_param;
13507
13508typedef enum {
13509 EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00,
13510 EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
13511 EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02,
13512} wmi_extscan_wlan_change_flags;
13513
13514typedef struct {
13515 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
13516 /**bssid */
13517 wmi_mac_addr bssid;
13518 /**time stamp in milliseconds */
13519 A_UINT32 tstamp;
13520 /**upper RSSI limit */
13521 A_UINT32 upper_rssi_limit;
13522 /**lower RSSI limit */
13523 A_UINT32 lower_rssi_limit;
13524 /** channel */
13525 A_UINT32 channel; /* in MHz */
13526 /**current RSSI average */
13527 A_UINT32 rssi_average;
13528 /**flags - wmi_extscan_wlan_change_flags */
13529 A_UINT32 flags;
13530 /**legnth of RSSI history to follow (number of values) */
13531 A_UINT32 num_rssi_samples;
13532} wmi_extscan_wlan_change_result_bssid;
13533
13534typedef struct {
13535 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
13536 /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
13537 A_UINT32 request_id;
13538 /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
13539 A_UINT32 requestor_id;
13540 /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
13541 A_UINT32 vdev_id;
13542 /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
13543 A_UINT32 config_request_id;
13544 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
13545 A_UINT32 config_requestor_id;
13546 /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
13547 A_UINT32 config_vdev_id;
13548 /** table ID - to allow support for multiple simultaneous tables */
13549 A_UINT32 table_id;
13550 /**number of entries with RSSI out of range or BSSID not detected */
13551 A_UINT32 change_count;
13552 /**total number of bssid signal descriptors (in all pages) */
13553 A_UINT32 total_entries;
13554 /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
13555 A_UINT32 first_entry_index;
13556 /**number of bssids signal descriptors in this page */
13557 A_UINT32 num_entries_in_page;
13558 /* Following this structure is the TLV:
13559 * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[]; // number of descriptors given by field num_entries_in_page.
13560 * Following this structure is the list of RSSI values (each is an A_UINT8):
13561 * A_UINT8 rssi_list[]; // last N RSSI values.
13562 */
13563} wmi_extscan_wlan_change_results_event_fixed_param;
13564
13565enum _tExtScanEntryFlags {
13566 WMI_HOTLIST_FLAG_NONE = 0x00,
13567 WMI_HOTLIST_FLAG_PRESENCE = 0x01,
13568 WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
13569};
13570
13571typedef struct {
13572 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
13573 /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
13574 A_UINT32 config_request_id;
13575 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
13576 A_UINT32 config_requestor_id;
13577 /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
13578 A_UINT32 config_vdev_id;
13579 /** table ID - to allow support for multiple simultaneous tables */
13580 A_UINT32 table_id;
13581 /**total number of bssids (in all pages) */
13582 A_UINT32 total_entries;
13583 /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
13584 A_UINT32 first_entry_index;
13585 /**number of bssids in this page */
13586 A_UINT32 num_entries_in_page;
13587 /* Following this structure is the TLV:
13588 * wmi_extscan_wlan_descriptor hotlist_match[]; // number of descriptors given by field num_entries_in_page.
13589 */
13590} wmi_extscan_hotlist_match_event_fixed_param;
13591
13592typedef struct {
13593 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
13594 /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
13595 A_UINT32 request_id;
13596 /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
13597 A_UINT32 requestor_id;
13598 /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
13599 A_UINT32 vdev_id;
13600 /** number of extscan caches */
13601 A_UINT32 num_extscan_cache_tables;
13602 /** number of wlan change lists */
13603 A_UINT32 num_wlan_change_monitor_tables;
13604 /** number of hotlists */
13605 A_UINT32 num_hotlist_monitor_tables;
13606 /** if one sided rtt data collection is supported */
13607 A_UINT32 rtt_one_sided_supported;
13608 /** if 11v data collection is supported */
13609 A_UINT32 rtt_11v_supported;
13610 /** if 11mc data collection is supported */
13611 A_UINT32 rtt_ftm_supported;
13612 /** number of extscan cache capabilities (one per table) */
13613 A_UINT32 num_extscan_cache_capabilities;
13614 /** number of wlan change capabilities (one per table) */
13615 A_UINT32 num_extscan_wlan_change_capabilities;
13616 /** number of extscan hotlist capabilities (one per table) */
13617 A_UINT32 num_extscan_hotlist_capabilities;
13618 /* max number of roaming ssid whitelist firmware can support */
13619 A_UINT32 num_roam_ssid_whitelist;
13620 /* max number of blacklist bssid firmware can support */
13621 A_UINT32 num_roam_bssid_blacklist;
13622 /* max number of preferred list firmware can support */
13623 A_UINT32 num_roam_bssid_preferred_list;
13624 /* max number of hotlist ssids firmware can support */
13625 A_UINT32 num_extscan_hotlist_ssid;
13626 /* max number of epno networks firmware can support */
13627 A_UINT32 num_epno_networks;
13628
13629 /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
13630 * supports multiple lists of each type.
13631 *
13632 * wmi_extscan_cache_capabilities extscan_cache_capabilities[] // capabilities of extscan cache (BSSID/RSSI lists)
13633 * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] // capabilities of wlan_change_monitor_tables
13634 * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] // capabilities of hotlist_monitor_tables
13635 */
13636} wmi_extscan_capabilities_event_fixed_param;
13637
13638/* WMI_D0_WOW_DISABLE_ACK_EVENTID */
13639typedef struct {
13640 A_UINT32 tlv_header;
13641 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */
13642 A_UINT32 reserved0; /* for future need */
13643} wmi_d0_wow_disable_ack_event_fixed_param;
13644
13645/** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
13646typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053013647 /** TLV tag and len; tag equals
13648 * WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param
13649 */
13650 A_UINT32 tlv_header;
13651 /** pdev_id for identifying the MAC
13652 * See macros starting with WMI_PDEV_ID_ for values.
13653 */
13654 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013655} wmi_pdev_resume_event_fixed_param;
13656
13657/** value representing all modules */
13658#define WMI_DEBUG_LOG_MODULE_ALL 0xffff
13659
13660/* param definitions */
13661
13662/**
13663 * Log level for a given module. Value contains both module id and log level.
13664 * here is the bitmap definition for value.
13665 * module Id : 16
13666 * Flags : reserved
13667 * Level : 8
13668 * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global).
13669 * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
13670 */
13671#define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1
13672
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013673#define WMI_DBGLOG_SET_LOG_LEVEL(val, lvl) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013674 (val) |= (lvl & 0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013675} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013676
13677#define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
13678
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013679#define WMI_DBGLOG_SET_MODULE_ID(val, mid) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013680 (val) |= ((mid & 0xffff) << 16); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013681} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013682
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013683#define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013684
13685/**
13686 * Enable the debug log for a given vdev. Value is vdev id
13687 */
13688#define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2
13689
13690/**
13691 * Disable the debug log for a given vdev. Value is vdev id
13692 * All the log level for a given VDEV is disabled except the ERROR log messages
13693 */
13694
13695#define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3
13696
13697/**
13698 * set vdev enable bitmap. value is the vden enable bitmap
13699 */
13700#define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4
13701
13702/**
13703 * set a given log level to all the modules specified in the module bitmap.
13704 * and set the log levle for all other modules to DBGLOG_ERR.
13705 * value: log levelt to be set.
13706 * module_id_bitmap : identifies the modules for which the log level should be set and
13707 * modules for which the log level should be reset to DBGLOG_ERR.
13708 */
13709#define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5
13710
13711#define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
13712
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013713#define WMI_MODULE_ENABLE(pmid_bitmap, mod_id) \
13714 ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
13715 (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013716
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013717#define WMI_MODULE_DISABLE(pmid_bitmap, mod_id) \
13718 ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \
13719 (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013720
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013721#define WMI_MODULE_IS_ENABLED(pmid_bitmap, mod_id) \
13722 (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \
13723 (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013724
13725#define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
13726typedef struct {
13727 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
13728 A_UINT32 dbg_log_param;
13729 /** param types are defined above */
13730 A_UINT32 value;
13731 /* The below array will follow this tlv ->fixed length module_id_bitmap[]
13732 A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
13733 */
13734} wmi_debug_log_config_cmd_fixed_param;
13735
13736typedef struct {
13737 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */
13738 A_UINT32 param; /* Reserved for future use */
Govind Singh869c9872016-02-22 18:36:34 +053013739 /** pdev_id for identifying the MAC
13740 * See macros starting with WMI_PDEV_ID_ for values.
13741 */
13742 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013743} wmi_pdev_get_temperature_cmd_fixed_param;
13744
13745typedef struct {
13746 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
13747 A_INT32 value; /* temprature value in Celcius degree */
Govind Singh869c9872016-02-22 18:36:34 +053013748 /** pdev_id for identifying the MAC
13749 * See macros starting with WMI_PDEV_ID_ for values.
13750 */
13751 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013752} wmi_pdev_temperature_event_fixed_param;
13753
Nitesh Shahfcedd3b2016-07-21 17:24:35 +053013754typedef enum {
13755 ANTDIV_HW_CFG_STATUS,
13756 ANTDIV_SW_CFG_STATUS,
13757 ANTDIV_MAX_STATUS_TYPE_NUM
13758} ANTDIV_STATUS_TYPE;
13759
13760typedef struct {
13761 /**
13762 * TLV tag and len; tag equals
13763 * WMITLV_TAG_STRUC_wmi_pdev_get_antdiv_status_cmd_fixed_param
13764 */
13765 A_UINT32 tlv_header;
13766 /* Status event ID - see ANTDIV_STATUS_TYPE */
13767 A_UINT32 status_event_id;
13768 /**
13769 * pdev_id for identifying the MAC
13770 * See macros starting with WMI_PDEV_ID_ for values.
13771 */
13772 A_UINT32 pdev_id;
13773} wmi_pdev_get_antdiv_status_cmd_fixed_param;
13774
13775typedef struct {
13776 /**
13777 * TLV tag and len; tag equals
13778 * WMITLV_TAG_STRUC_wmi_pdev_antdiv_status_event_fixed_param
13779 */
13780 A_UINT32 tlv_header;
13781 /* ANT DIV feature enabled or not */
13782 A_UINT32 support;
13783 A_UINT32 chain_num; /* how many chain supported */
13784 /* how many ANT supported, 32 max */
13785 A_UINT32 ant_num;
13786 /**
13787 * Each entry is for a tx/rx chain, and contains a bitmap
13788 * identifying the antennas attached to that tx/rx chain.
13789 */
13790 A_UINT32 selectable_ant_mask[8];
13791 /**
13792 * pdev_id for identifying the MAC
13793 * See macros starting with WMI_PDEV_ID_ for values.
13794 */
13795 A_UINT32 pdev_id;
13796} wmi_pdev_antdiv_status_event_fixed_param;
13797
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013798typedef struct {
13799 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
13800 A_UINT32 vdev_id;
13801 A_UINT32 enable;
13802 A_UINT32 srv_ipv4; /* server IP */
13803 A_UINT32 start_lsb; /* starting address assigned to client */
13804 A_UINT32 num_client; /* number of clients we support */
13805} wmi_set_dhcp_server_offload_cmd_fixed_param;
13806
13807typedef enum {
13808 AP_RX_DATA_OFFLOAD = 0x00,
13809 STA_RX_DATA_OFFLOAD = 0x01,
13810} wmi_ipa_offload_types;
13811
13812/**
13813 * This command is sent from WLAN host driver to firmware for
13814 * enabling/disabling IPA data-path offload features.
13815 *
13816 *
13817 * Enabling data path offload to IPA(based on host INI configuration), example:
13818 * when STA interface comes up,
13819 * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
13820 * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
13821 *
13822 * Disabling data path offload to IPA, example:
13823 * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
13824 * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
13825 *
13826 *
13827 * This command is applicable only on the PCIE LL systems
13828 *
13829 */
13830typedef struct {
13831 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
13832 A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
13833 A_UINT32 vdev_id;
13834 A_UINT32 enable; /* 1 == enable, 0 == disable */
13835} wmi_ipa_offload_enable_disable_cmd_fixed_param;
13836
13837typedef enum {
13838 WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0,
13839 WMI_LED_FLASHING_PATTERN_CONNECTED = 1,
13840 WMI_LED_FLASHING_PATTERN_RESERVED = 2,
13841} wmi_set_led_flashing_type;
13842
13843/**
13844 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.
13845 Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
13846 remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
13847 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
13848 pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to
13849 High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
13850 Zero is reached, it is skipped and moves on to the next interval.
13851 */
13852typedef struct {
13853 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */
13854 A_UINT32 pattern_id; /* pattern identifier */
13855 A_UINT32 led_x0; /* led flashing parameter0 */
13856 A_UINT32 led_x1; /* led flashing parameter1 */
13857 A_UINT32 gpio_num; /* GPIO number */
13858} wmi_set_led_flashing_cmd_fixed_param;
13859
13860/**
13861 * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
13862 * within small networks that do not include a local name server.
13863 * It utilizes essentially the same programming interfaces, packet formats and operating semantics
13864 * as the unicast DNS, and the advantage is zero configuration service while no need for central or
13865 * global server.
13866 * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
13867 * by type in a specified domain using standard DNS queries.
13868 * Here, we provide the ability to advertise the available services by responding to mDNS queries.
13869 */
13870typedef struct {
13871 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
13872 A_UINT32 vdev_id;
13873 A_UINT32 enable;
13874} wmi_mdns_offload_cmd_fixed_param;
13875
13876#define WMI_MAX_MDNS_FQDN_LEN 64
13877#define WMI_MAX_MDNS_RESP_LEN 512
13878#define WMI_MDNS_FQDN_TYPE_GENERAL 0
13879#define WMI_MDNS_FQDN_TYPE_UNIQUE 1
13880
13881typedef struct {
13882 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
13883 A_UINT32 vdev_id;
13884 /** type of fqdn, general or unique */
13885 A_UINT32 type;
13886 /** length of fqdn */
13887 A_UINT32 fqdn_len;
13888 /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
13889 * A_UINT8 fqdn_data[]; // fully-qualified domain name to check if match with the received queries
13890 */
13891} wmi_mdns_set_fqdn_cmd_fixed_param;
13892
13893typedef struct {
13894 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
13895 A_UINT32 vdev_id;
13896 /** Answer Resource Record count */
13897 A_UINT32 AR_count;
13898 /** length of response */
13899 A_UINT32 resp_len;
13900 /* Following this structure is the TLV byte stream of resp data of length resp_len
13901 * A_UINT8 resp_data[]; // responses consisits of Resource Records
13902 */
13903} wmi_mdns_set_resp_cmd_fixed_param;
13904
13905typedef struct {
13906 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
13907 A_UINT32 vdev_id;
13908} wmi_mdns_get_stats_cmd_fixed_param;
13909
13910typedef struct {
13911 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
13912 A_UINT32 vdev_id;
13913 /** curTimestamp in milliseconds */
13914 A_UINT32 curTimestamp;
13915 /** last received Query in milliseconds */
13916 A_UINT32 lastQueryTimestamp;
13917 /** last sent Response in milliseconds */
13918 A_UINT32 lastResponseTimestamp;
13919 /** stats of received queries */
13920 A_UINT32 totalQueries;
13921 /** stats of macth queries */
13922 A_UINT32 totalMatches;
13923 /** stats of responses */
13924 A_UINT32 totalResponses;
13925 /** indicate the current status of mDNS offload */
13926 A_UINT32 status;
13927} wmi_mdns_stats_event_fixed_param;
13928
13929/**
13930 * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
13931 * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
13932 * request and create/remove connection even host is suspended.
13933 * 3 major components are offloaded:
13934 * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
13935 * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
13936 * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
13937 * Current implementation only supports WPA2 CCMP.
13938 */
13939
13940typedef struct {
13941 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
13942 /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
13943 A_UINT32 vdev_id;
13944 /** enable/disable sap auth offload */
13945 A_UINT32 enable;
13946 /** sap ssid */
13947 wmi_ssid ap_ssid;
13948 /** authentication mode (defined above) */
13949 A_UINT32 rsn_authmode;
13950 /** unicast cipher set */
13951 A_UINT32 rsn_ucastcipherset;
13952 /** mcast/group cipher set */
13953 A_UINT32 rsn_mcastcipherset;
13954 /** mcast/group management frames cipher set */
13955 A_UINT32 rsn_mcastmgmtcipherset;
13956 /** sap channel */
13957 A_UINT32 channel;
13958 /** length of psk */
13959 A_UINT32 psk_len;
13960 /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
13961 * A_UINT8 psk[];
13962 */
13963} wmi_sap_ofl_enable_cmd_fixed_param;
13964
13965typedef struct {
13966 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
13967 /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
13968 A_UINT32 vdev_id;
13969 /** aid (association id) of this station */
13970 A_UINT32 assoc_id;
13971 /** peer station's mac addr */
13972 wmi_mac_addr peer_macaddr;
13973 /** length of association request frame */
13974 A_UINT32 data_len;
13975 /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
13976 * A_UINT8 bufp[];
13977 */
13978} wmi_sap_ofl_add_sta_event_fixed_param;
13979
13980typedef enum {
13981 SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
13982 SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
13983} wmi_sap_ofl_del_sta_flags;
13984
13985typedef struct {
13986 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
13987 /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
13988 A_UINT32 vdev_id;
13989 /** aid (association id) of this station */
13990 A_UINT32 assoc_id;
13991 /** peer station's mac addr */
13992 wmi_mac_addr peer_macaddr;
13993 /** disassociation reason */
13994 A_UINT32 reason;
13995 /** flags - wmi_sap_ofl_del_sta_flags */
13996 A_UINT32 flags;
13997} wmi_sap_ofl_del_sta_event_fixed_param;
13998
13999typedef struct {
14000 /*
14001 * TLV tag and len; tag equals
14002 * WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param
14003 */
14004 A_UINT32 tlv_header;
14005 A_UINT32 vdev_id;
14006 /* Number of client failure connection attempt */
14007 A_UINT32 num_retry;
14008 /*Time in milliseconds to record the client's failure connection attempts*/
14009 A_UINT32 retry_allow_time_ms;
14010 /*
14011 * Time in milliseconds to drop the connection request if
14012 * client is blacklisted
14013 */
14014 A_UINT32 blackout_time_ms;
14015} wmi_sap_set_blacklist_param_cmd_fixed_param;
14016
14017typedef struct {
14018 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
14019 A_UINT32 data_len; /** length in byte of data[]. */
14020 /** This structure is used to send REQ binary blobs
14021 * from application/service to firmware where Host drv is pass through .
14022 * Following this structure is the TLV:
14023 * A_UINT8 data[]; // length in byte given by field data_len.
14024 */
14025} wmi_apfind_cmd_param;
14026
14027typedef enum apfind_event_type_e {
14028 APFIND_MATCH_EVENT = 0,
14029 APFIND_WAKEUP_EVENT,
14030} APFIND_EVENT_TYPE;
14031
14032typedef struct {
14033 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
14034 A_UINT32 event_type; /** APFIND_EVENT_TYPE */
14035 A_UINT32 data_len; /** length in byte of data[]. */
14036 /** This structure is used to send event binary blobs
14037 * from firmware to application/service and Host drv.
14038 * Following this structure is the TLV:
14039 * A_UINT8 data[]; // length in byte given by field data_len.
14040 */
14041} wmi_apfind_event_hdr;
14042
14043/**
14044 * OCB DCC types and structures.
14045 */
14046
14047/**
14048 * DCC types as described in ETSI TS 102 687
14049 * Type Format stepSize referenceValue numBits
14050 * -------------------------------------------------------------------------
14051 * ndlType_acPrio INTEGER (0...7) 1 number 3
14052 * ndlType_controlLoop INTEGER (0...7) 1 0 3
14053 * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13
14054 * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10
14055 * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13
14056 * ndlType_datarate INTEGER (0..7) Table 8 3
14057 * ndlType_distance INTEGER (0..4095) 1 m 0 12
14058 * ndlType_numberElements INTEGER (0..63) number 6
14059 * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11
14060 * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10
14061 * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5
14062 * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7
14063 * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7
14064 * ndlType_timing INTEGER (0..4095) 10 ms 0 12
14065 * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7
14066 * ndlType_ratio INTEGER (0..100) 1 % 0 % 7
14067 * ndlType_exponent INTEGER (0..100) 0.1 0 7
14068 * ndlType_queueStatus Enumeration Table A.2 1
14069 * ndlType_dccMechanism Bitset Table A.2 6
14070 *
14071 * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
14072 * cannot be changed without breaking WMI compatibility.
14073 *
14074 * NOTE: For each of the types, one additional bit is allocated. This
14075 * leftmost bit is used to indicate that the value is invalid.
14076 */
14077#define SIZE_NDLTYPE_ACPRIO (1 + 3)
14078#define SIZE_NDLTYPE_CONTROLLOOP (1 + 3)
14079#define SIZE_NDLTYPE_ARRIVALRATE (1 + 13)
14080#define SIZE_NDLTYPE_CHANNELLOAD (1 + 10)
14081#define SIZE_NDLTYPE_CHANNELUSE (1 + 13)
14082#define SIZE_NDLTYPE_DATARATE (1 + 3)
14083#define SIZE_NDLTYPE_DISTANCE (1 + 12)
14084#define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6)
14085#define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
14086#define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
14087#define SIZE_NDLTYPE_PATHLOSS (1 + 5)
14088#define SIZE_NDLTYPE_RXPOWER (1 + 7)
14089#define SIZE_NDLTYPE_SNR (1 + 7)
14090#define SIZE_NDLTYPE_TIMING (1 + 12)
14091#define SIZE_NDLTYPE_TXPOWER (1 + 7)
14092#define SIZE_NDLTYPE_RATIO (1 + 7)
14093#define SIZE_NDLTYPE_EXPONENT (1 + 7)
14094#define SIZE_NDLTYPE_QUEUESTATUS (1 + 1)
14095#define SIZE_NDLTYPE_DCCMECHANISM (1 + 6)
14096#define SIZE_BYTE (8)
14097
14098#define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
14099#define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
14100#define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
14101#define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
14102#define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
14103#define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1)
14104#define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
14105#define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
14106#define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
14107#define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
14108#define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
14109#define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
14110#define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1)
14111#define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1)
14112#define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
14113#define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1)
14114#define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
14115#define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
14116#define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
14117
14118/**
14119 * The MCS_COUNT macro cannot be modified without breaking
14120 * WMI compatibility.
14121 */
14122#define MCS_COUNT (8)
14123
14124/**
14125 * Flags for ndlType_dccMechanism.
14126 */
14127typedef enum {
14128 DCC_MECHANISM_TPC = 1,
14129 DCC_MECHANISM_TRC = 2,
14130 DCC_MECHANISM_TDC = 4,
14131 DCC_MECHANISM_DSC = 8,
14132 DCC_MECHANISM_TAC = 16,
14133 DCC_MECHANISM_RESERVED = 32,
14134 DCC_MECHANISM_ALL = 0x3f,
14135} wmi_dcc_ndl_type_dcc_mechanism;
14136
14137/** Values for ndlType_queueStatus. */
14138typedef enum {
14139 DCC_QUEUE_CLOSED = 0,
14140 DCC_QUEUE_OPEN = 1,
14141} wmi_dcc_ndl_type_queue_status;
14142
14143/**
14144 * For ndlType_acPrio, use the values in wmi_traffic_ac.
14145 * Values for ndlType_datarate.
14146 */
14147typedef enum {
14148 DCC_DATARATE_3_MBPS = 0,
14149 DCC_DATARATE_4_5_MBPS = 1,
14150 DCC_DATARATE_6_MBPS = 2,
14151 DCC_DATARATE_9_MBPS = 3,
14152 DCC_DATARATE_12_MBPS = 4,
14153 DCC_DATARATE_18_MBPS = 5,
14154 DCC_DATARATE_24_MBPS = 6,
14155 DCC_DATARATE_27_MBPS = 7,
14156} wmi_dcc_ndl_type_datarate;
14157
14158/** Data structure for active state configuration. */
14159typedef struct {
14160 /** TLV tag and len; tag equals
14161 * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config
14162 */
14163 A_UINT32 tlv_header;
14164 /**
14165 * NDL_asStateId, ndlType_numberElements, 1+6 bits.
14166 * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
14167 */
14168 A_UINT32 state_info;
14169 /**
14170 * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
14171 * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
14172 * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
14173 * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
14174 */
14175 A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
14176 /**
14177 * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
14178 * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
14179 * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
14180 * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
14181 */
14182 A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
14183 /**
14184 * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
14185 * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
14186 * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
14187 * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
14188 */
14189 A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
14190 /**
14191 * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
14192 * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
14193 * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
14194 * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
14195 */
14196 A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
14197 /**
14198 * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
14199 * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
14200 * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
14201 * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
14202 */
14203 A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
14204} wmi_dcc_ndl_active_state_config;
14205
14206#define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7)
14207#define WMI_NDL_AS_STATE_ID_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 0, 7, val)
14208#define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11)
14209#define WMI_NDL_AS_CHAN_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 7, 11, val)
14210#define WMI_NDL_AS_DCC_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
14211#define WMI_NDL_AS_DCC_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
14212#define WMI_NDL_AS_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
14213#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)
14214#define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
14215#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)
14216#define WMI_NDL_AS_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
14217#define WMI_NDL_AS_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
14218#define WMI_NDL_AS_CARRIER_SENSE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
14219#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)
14220
14221/** Data structure for EDCA/QOS parameters. */
14222typedef struct {
14223 /** TLV tag and len; tag equals
14224 * WMITLV_TAG_STRUC_wmi_qos_parameter */
14225 A_UINT32 tlv_header;
14226 /** Arbitration Inter-Frame Spacing. Range: 2-15 */
14227 A_UINT32 aifsn;
14228 /** Contention Window minimum. Range: 1 - 10 */
14229 A_UINT32 cwmin;
14230 /** Contention Window maximum. Range: 1 - 10 */
14231 A_UINT32 cwmax;
14232} wmi_qos_parameter;
14233
14234/** Data structure for information specific to a channel. */
14235typedef struct {
14236 /** TLV tag and len; tag equals
14237 * WMITLV_TAG_STRUC_wmi_ocb_channel */
14238 A_UINT32 tlv_header;
14239 A_UINT32 bandwidth; /* MHz units */
14240 wmi_mac_addr mac_address;
14241} wmi_ocb_channel;
14242
14243/** Data structure for an element of the schedule array. */
14244typedef struct {
14245 /** TLV tag and len; tag equals
14246 * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
14247 A_UINT32 tlv_header;
14248 A_UINT32 channel_freq; /* MHz units */
14249 A_UINT32 total_duration; /* ms units */
14250 A_UINT32 guard_interval; /* ms units */
14251} wmi_ocb_schedule_element;
14252
14253/** Data structure for OCB configuration. */
14254typedef struct {
14255 /** TLV tag and len; tag equals
14256 * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
14257 A_UINT32 tlv_header;
14258 /** VDEV id(interface) that is being configured */
14259 A_UINT32 vdev_id;
14260 A_UINT32 channel_count;
14261 A_UINT32 schedule_size;
14262 A_UINT32 flags;
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053014263 /**
14264 * Max duration of continuing multichannel operation without
14265 * receiving a TA frame (units = seconds)
14266 */
14267 A_UINT32 ta_max_duration;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014268
14269 /** This is followed by a TLV array of wmi_channel.
14270 * This is followed by a TLV array of wmi_ocb_channel.
14271 * This is followed by a TLV array of wmi_qos_parameter.
14272 * This is followed by a TLV array of wmi_dcc_ndl_chan.
14273 * This is followed by a TLV array of wmi_dcc_ndl_active_state_config.
14274 * This is followed by a TLV array of wmi_ocb_schedule_element.
14275 */
14276} wmi_ocb_set_config_cmd_fixed_param;
14277
14278
14279#define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0
14280#define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1
14281
14282#define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) \
14283 (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
14284
14285
14286/** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
14287typedef struct {
14288 /** TLV tag and len; tag equals
14289 * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param
14290 */
14291 A_UINT32 tlv_header;
14292 /* VDEV id(interface)*/
14293 A_UINT32 vdev_id;
14294 A_UINT32 status;
14295} wmi_ocb_set_config_resp_event_fixed_param;
14296
14297/* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
14298 * WMI compatibility.
14299 */
14300/* The size of the utc time in bytes. */
14301#define SIZE_UTC_TIME (10)
14302/* The size of the utc time error in bytes. */
14303#define SIZE_UTC_TIME_ERROR (5)
14304
14305/** Data structure to set the UTC time. */
14306typedef struct {
14307 /** TLV tag and len; tag equals
14308 * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
14309 A_UINT32 tlv_header;
14310 /*VDEV Identifier*/
14311 A_UINT32 vdev_id;
14312 /** 10 bytes of the utc time. */
14313 A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME, SIZE_BYTE)];
14314 /** 5 bytes of the time error. */
14315 A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR, SIZE_BYTE)];
14316} wmi_ocb_set_utc_time_cmd_fixed_param;
14317
14318#define WMI_UTC_TIME_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
14319#define WMI_UTC_TIME_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
14320#define WMI_TIME_ERROR_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
14321#define WMI_TIME_ERROR_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
14322
14323/** Data structure start the timing advertisement. The template for the
14324 * timing advertisement frame follows this structure in the WMI command.
14325 */
14326typedef struct {
14327 /** TLV tag and len; tag equals
14328 * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
14329 A_UINT32 tlv_header;
14330 /*VDEV Identifier*/
14331 A_UINT32 vdev_id;
14332 /** Number of times the TA is sent every 5 seconds. */
14333 A_UINT32 repeat_rate;
14334 /** The frequency on which to transmit. */
14335 A_UINT32 channel_freq; /* MHz units */
14336 /** The offset into the template of the timestamp. */
14337 A_UINT32 timestamp_offset;
14338 /** The offset into the template of the time value. */
14339 A_UINT32 time_value_offset;
14340 /** The length of the timing advertisement template. The
14341 * template is in the TLV data. */
14342 A_UINT32 timing_advert_template_length;
14343 /** This is followed by a binary array containing the TA template. */
14344} wmi_ocb_start_timing_advert_cmd_fixed_param;
14345
14346/** Data structure to stop the timing advertisement. */
14347typedef struct {
14348 /** TLV tag and len; tag equals
14349 * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
14350 A_UINT32 tlv_header;
14351 /*VDEV Identifier*/
14352 A_UINT32 vdev_id;
14353 A_UINT32 channel_freq; /* MHz units */
14354} wmi_ocb_stop_timing_advert_cmd_fixed_param;
14355
14356/** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
14357typedef struct {
14358 /** TLV tag and len; tag equals
14359 * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
14360 A_UINT32 tlv_header;
14361 /*VDEV Identifier*/
14362 A_UINT32 vdev_id;
14363 A_UINT32 reserved;
14364} wmi_ocb_get_tsf_timer_cmd_fixed_param;
14365
14366/** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
14367typedef struct {
14368 /** TLV tag and len; tag equals
14369 * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
14370 A_UINT32 tlv_header;
14371 /*VDEV Identifier*/
14372 A_UINT32 vdev_id;
14373 A_UINT32 tsf_timer_high;
14374 A_UINT32 tsf_timer_low;
14375} wmi_ocb_get_tsf_timer_resp_event_fixed_param;
14376
14377/** Data structure for DCC stats configuration per channel. */
14378typedef struct {
14379 /** TLV tag and len; tag equals
14380 * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
14381 A_UINT32 tlv_header;
14382
14383 /*VDEV Identifier*/
14384 A_UINT32 vdev_id;
14385
14386 /** The channel for which this applies, 16 bits.
14387 * The dcc_stats_bitmap, 8 bits. */
14388 A_UINT32 chan_info;
14389
14390 /** Demodulation model parameters.
14391 *
14392 * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
14393 * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
14394 * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
14395 * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
14396 * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
14397 * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
14398 * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
14399 * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
14400 */
14401 A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)];
14402
14403 /** Communication ranges.
14404 *
14405 * tx_power, ndlType_txPower, 1+7 bits.
14406 * datarate, ndlType_datarate, 1+3 bits.
14407 */
14408 A_UINT32 tx_power_datarate;
14409 /**
14410 * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
14411 * NDL_estCommRange, ndlType_distance, 1+12 bits.
14412 */
14413 A_UINT32 carrier_sense_est_comm_range;
14414
14415 /** Channel load measures. */
14416 /**
14417 * dccSensitivity, ndlType_rxPower, 1+7 bits.
14418 * carrierSense, ndlType_rxPower, 1+7 bits.
14419 * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
14420 */
14421 A_UINT32 dcc_stats;
14422 /**
14423 * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
14424 * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
14425 */
14426 A_UINT32 packet_stats;
14427 /**
14428 * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
14429 */
14430 A_UINT32 channel_busy_time;
14431 /**
14432 *Transmit packet statistics.
14433 * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
14434 * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
14435 * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
14436 * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
14437 */
14438 A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
14439 /**
14440 * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
14441 * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
14442 * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
14443 * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
14444 */
14445 A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
14446 /**
14447 * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
14448 * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
14449 * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
14450 * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
14451 */
14452 A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
14453 /**
14454 * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
14455 * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
14456 * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
14457 * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
14458 */
14459 A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
14460} wmi_dcc_ndl_stats_per_channel;
14461
14462#define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
14463#define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
14464#define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
14465#define WMI_NDL_STATS_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
14466#define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8)
14467#define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
14468#define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
14469#define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
14470#define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
14471#define WMI_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
14472#define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
14473#define WMI_TX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
14474#define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
14475#define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
14476#define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
14477#define WMI_NDL_EST_COMM_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
14478#define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
14479#define WMI_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
14480#define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
14481#define WMI_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
14482#define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
14483#define WMI_NDL_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
14484#define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14)
14485#define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
14486#define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12)
14487#define WMI_NDL_PACKET_AVG_DURATION_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
14488#define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
14489#define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr, val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
14490
14491#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)
14492#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)
14493#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)
14494#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)
14495#define WMI_NDL_TX_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
14496#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)
14497#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)
14498#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)
14499
14500/** Bitmap for DCC stats. */
14501typedef enum {
14502 DCC_STATS_DEMODULATION_MODEL = 1,
14503 DCC_STATS_COMMUNICATION_RANGES = 2,
14504 DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
14505 DCC_STATS_TRANSMIT_PACKET_STATS = 8,
14506 DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
14507 DCC_STATS_ALL = 0xff,
14508} wmi_dcc_stats_bitmap;
14509
14510/** Data structure for getting the DCC stats. */
14511typedef struct {
14512 /**
14513 * TLV tag and len; tag equals
14514 * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param
14515 */
14516 A_UINT32 tlv_header;
14517 /* VDEV identifier */
14518 A_UINT32 vdev_id;
14519 /**The number of channels for which stats are being requested. */
14520 A_UINT32 num_channels;
14521 /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
14522} wmi_dcc_get_stats_cmd_fixed_param;
14523
14524typedef struct {
14525 /**
14526 * TLV tag and len; tag equals
14527 * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request.
14528 */
14529 A_UINT32 tlv_header;
14530 /** The channel for which this applies. */
14531 A_UINT32 chan_freq; /* MHz units */
14532 /** The DCC stats being requested. */
14533 A_UINT32 dcc_stats_bitmap;
14534} wmi_dcc_channel_stats_request;
14535
14536/** Data structure for the response with the DCC stats. */
14537typedef struct {
14538 /**
14539 * TLV tag and len; tag equals
14540 * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param
14541 */
14542 A_UINT32 tlv_header;
14543 /* VDEV identifier */
14544 A_UINT32 vdev_id;
14545 /** Number of channels in the response. */
14546 A_UINT32 num_channels;
14547 /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
14548} wmi_dcc_get_stats_resp_event_fixed_param;
14549
14550/** Data structure for clearing the DCC stats. */
14551typedef struct {
14552 /**
14553 * TLV tag and len; tag equals
14554 * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param
14555 */
14556 A_UINT32 tlv_header;
14557 /* VDEV identifier */
14558 A_UINT32 vdev_id;
14559 A_UINT32 dcc_stats_bitmap;
14560} wmi_dcc_clear_stats_cmd_fixed_param;
14561
14562/** Data structure for the pushed DCC stats */
14563typedef struct {
14564 /**
14565 * TLV tag and len; tag equals
14566 * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param
14567 */
14568 A_UINT32 tlv_header;
14569 /* VDEV identifier */
14570 A_UINT32 vdev_id;
14571 /** The number of channels in the response. */
14572 A_UINT32 num_channels;
14573 /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
14574} wmi_dcc_stats_event_fixed_param;
14575
14576/** Data structure for updating NDL per channel. */
14577typedef struct {
14578 /**
14579 * TLV tag and len; tag equals
14580 * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan
14581 */
14582 A_UINT32 tlv_header;
14583 /**
14584 * Channel frequency, 16 bits
14585 * NDL_numActiveState, ndlType_numberElements, 1+6 bits
14586 */
14587 A_UINT32 chan_info;
14588 /**
14589 * NDL_minDccSampling, 10 bits.
14590 * Maximum time interval between subsequent checks of the DCC rules.
14591 */
14592 A_UINT32 ndl_min_dcc_sampling;
14593 /**
14594 * dcc_enable, 1 bit.
14595 * dcc_stats_enable, 1 bit.
14596 * dcc_stats_interval, 16 bits.
14597 */
14598 A_UINT32 dcc_flags;
14599 /** General DCC configuration.
14600 * NDL_timeUp, ndlType_timing, 1+12 bits.
14601 * NDL_timeDown, ndlType_timing, 1+12 bits.
14602 */
14603 A_UINT32 general_config;
14604 /** Transmit power thresholds.
14605 * NDL_minTxPower, ndlType_txPower, 1+7 bits.
14606 * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
14607 */
14608 /* see "ETSI TS 102 687" table above for units */
14609 A_UINT32 min_max_tx_power;
14610 /**
14611 * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
14612 * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
14613 * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
14614 * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
14615 */
14616 /* see "ETSI TS 102 687" table above for units */
14617 A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
14618 /** Packet timing thresholds.
14619 * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
14620 * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
14621 * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
14622 * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
14623 */
14624 A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
14625 /**
14626 * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
14627 * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
14628 */
14629 A_UINT32 min_max_packet_interval;
14630 /**
14631 * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
14632 * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
14633 * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
14634 * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits
14635 */
14636 A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
14637 /** Packet datarate thresholds.
14638 * NDL_minDatarate, ndlType_datarate, 1+3 bits.
14639 * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
14640 */
14641 A_UINT32 min_max_datarate;
14642 /**
14643 * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
14644 * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
14645 * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
14646 * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
14647 */
14648 A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
14649 /** Receive signal thresholds.
14650 * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
14651 * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
14652 * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
14653 */
14654 A_UINT32 min_max_def_carrier_sense;
14655
14656 /** Receive model parameter.
14657 * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
14658 * NDL_maxCsRange, ndlType_distance, 1+12 bits.
14659 * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
14660 */
14661 A_UINT32 receive_model_parameter;
14662
14663 /**
14664 * NDL_minSNR, ndlType_snr, 1+7 bits.
14665 */
14666 A_UINT32 receive_model_parameter_2;
14667
14668 /** Demodulation model parameters.
14669 * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
14670 * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
14671 * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
14672 * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
14673 * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
14674 * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
14675 * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
14676 * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
14677 */
14678 A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)];
14679 /** Transmit model parameters.
14680 * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
14681 * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
14682 * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
14683 * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
14684 */
14685 A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
14686 /**
14687 * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
14688 * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
14689 * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
14690 * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
14691 */
14692 A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
14693 /**
14694 * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
14695 * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
14696 * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
14697 * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
14698 */
14699 A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
14700 /* NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits. */
14701 A_UINT32 tm_max_channel_use;
14702 /**
14703 * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
14704 * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
14705 * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
14706 * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
14707 */
14708 A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
14709 /** Channel load thresholds.
14710 * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
14711 * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
14712 */
14713 A_UINT32 min_max_channel_load;
14714 /** Transmit queue parameters.
14715 * NDL_numQueue, ndlType_acPrio, 1+3 bits.
14716 * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
14717 * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
14718 * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
14719 * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
14720 */
14721 A_UINT32 transmit_queue_parameters;
14722 /**
14723 * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
14724 * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
14725 * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
14726 * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
14727 */
14728 A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
14729} wmi_dcc_ndl_chan;
14730
14731#define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
14732#define WMI_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
14733#define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7)
14734#define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
14735
14736#define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
14737#define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
14738
14739#define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
14740#define WMI_NDL_MEASURE_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
14741
14742
14743#define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
14744#define WMI_NDL_DCC_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
14745#define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
14746#define WMI_NDL_DCC_STATS_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
14747#define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
14748#define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
14749
14750#define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13)
14751#define WMI_NDL_TIME_UP_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 0, 13, val)
14752#define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13)
14753#define WMI_NDL_TIME_DOWN_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 13, 13, val)
14754
14755#define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
14756#define WMI_NDL_MIN_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
14757#define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
14758#define WMI_NDL_MAX_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
14759
14760#define WMI_NDL_DEF_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
14761#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)
14762
14763#define WMI_NDL_MAX_PACKET_DURATION_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
14764#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)
14765#define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
14766#define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
14767#define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
14768#define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
14769#define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
14770#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)
14771
14772#define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
14773#define WMI_NDL_MIN_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
14774#define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
14775#define WMI_NDL_MAX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
14776#define WMI_NDL_DEF_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
14777#define WMI_NDL_DEF_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
14778
14779#define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
14780#define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
14781#define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
14782#define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
14783#define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
14784#define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
14785
14786#define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
14787#define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
14788#define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
14789#define WMI_NDL_MAX_CS_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
14790#define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
14791#define WMI_NDL_REF_PATH_LOSS_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
14792
14793#define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
14794#define WMI_NDL_MIN_SNR_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
14795
14796#define WMI_NDL_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
14797#define WMI_NDL_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
14798
14799#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)
14800#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)
14801#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)
14802#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)
14803#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)
14804#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)
14805#define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
14806#define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr, val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
14807#define WMI_NDL_TM_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
14808#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)
14809
14810#define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
14811#define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
14812#define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
14813#define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
14814
14815#define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
14816#define WMI_NDL_NUM_QUEUE_SET(ptr, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
14817#define WMI_NDL_REF_QUEUE_STATUS_GET(ptr, acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
14818#define WMI_NDL_REF_QUEUE_STATUS_SET(ptr, acprio, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
14819#define WMI_NDL_REF_QUEUE_LEN_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
14820#define WMI_NDL_REF_QUEUE_LEN_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
14821
14822/** Data structure for updating the NDL. */
14823typedef struct {
14824 /** TLV tag and len; tag equals
14825 * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
14826 A_UINT32 tlv_header;
14827 /* VDEV identifier */
14828 A_UINT32 vdev_id;
14829 /** The number of channels in the request. */
14830 A_UINT32 num_channel;
14831 /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
14832 /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
14833} wmi_dcc_update_ndl_cmd_fixed_param;
14834
14835typedef struct {
14836 /**
14837 * TLV tag and len; tag equals
14838 * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param
14839 */
14840 A_UINT32 tlv_header;
14841 /* VDEV identifier */
14842 A_UINT32 vdev_id;
14843 A_UINT32 status;
14844} wmi_dcc_update_ndl_resp_event_fixed_param;
14845
14846/* Actions for TSF timestamp */
14847typedef enum {
14848 TSF_TSTAMP_CAPTURE_REQ = 1,
14849 TSF_TSTAMP_CAPTURE_RESET = 2,
14850 TSF_TSTAMP_READ_VALUE = 3,
Govind Singhd2970e32016-01-21 10:30:02 +053014851 TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014852} wmi_tsf_tstamp_action;
14853
14854typedef struct {
14855 /** TLV tag and len; tag equals
14856 * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
14857 A_UINT32 tlv_header;
14858 /** unique id identifying the VDEV, generated by the caller */
14859 A_UINT32 vdev_id;
14860 /* action type, refer to wmi_tsf_tstamp_action */
14861 A_UINT32 tsf_action;
14862} wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
14863
14864typedef struct {
14865 /* TLV tag and len; tag equals
14866 * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
14867 A_UINT32 tlv_header;
14868 /* VDEV identifier */
14869 A_UINT32 vdev_id;
14870 /* low 32bit of tsf */
14871 A_UINT32 tsf_low;
14872 /* high 32 bit of tsf */
14873 A_UINT32 tsf_high;
Krishna Kumaar Natarajan40b3c112016-03-25 14:36:18 -070014874 /* low 32 bits of qtimer */
14875 A_UINT32 qtimer_low;
14876 /* high 32 bits of qtimer */
14877 A_UINT32 qtimer_high;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014878} wmi_vdev_tsf_report_event_fixed_param;
14879
Nitesh Shahe5aa26b2016-07-08 12:03:44 +053014880/**
14881 * ie_id values:
14882 * 0 to 255 are used for individual IEEE802.11 Information Element types
14883 */
14884#define WMI_SET_VDEV_IE_ID_SCAN_SET_DEFAULT_IE 256
14885
14886/* source values: */
14887#define WMI_SET_VDEV_IE_SOURCE_HOST 0x0
14888
Anurag Chouhanbfed5292016-08-09 11:17:40 +053014889/* band values: */
14890typedef enum {
14891 WMI_SET_VDEV_IE_BAND_ALL = 0,
14892 WMI_SET_VDEV_IE_BAND_2_4GHZ,
14893 WMI_SET_VDEV_IE_BAND_5GHZ,
14894} wmi_set_vdev_ie_band;
14895
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014896typedef struct {
14897 /** TLV tag and len; tag equals
14898 * WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
14899 A_UINT32 tlv_header;
14900 /* unique id identifying the VDEV, generated by the caller */
14901 A_UINT32 vdev_id;
14902 /* unique id to identify the ie_data as defined by ieee 802.11 spec */
14903 A_UINT32 ie_id;
14904 /* ie_len corresponds to num of bytes in ie_data[] */
14905 A_UINT32 ie_len;
Nitesh Shahe5aa26b2016-07-08 12:03:44 +053014906 /** source of this command */
14907 A_UINT32 ie_source; /* see WMI_SET_VDEV_IE_SOURCE_ defs */
Anurag Chouhanbfed5292016-08-09 11:17:40 +053014908 /** band for this IE - se wmi_set_vdev_ie_band enum */
14909 A_UINT32 band;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014910 /*
14911 * Following this structure is the TLV byte stream of ie data of length
14912 * buf_len:
14913 * A_UINT8 ie_data[];
14914 */
14915} wmi_vdev_set_ie_cmd_fixed_param;
14916
Govind Singh869c9872016-02-22 18:36:34 +053014917/* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014918typedef struct {
14919 /*
14920 * TLV tag and len; tag equals
14921 * WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param
14922 * Set Preferred Channel List
14923 */
14924 A_UINT32 tlv_header;
14925
14926 /* # of channels to scan */
14927 A_UINT32 num_chan;
14928 /*
14929 * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd
14930 * structure. The TLV's are:
14931 * A_UINT32 channel_list[];
14932 */
14933} wmi_soc_set_pcl_cmd_fixed_param;
14934
Anurag Chouhan11b53a12016-07-28 12:39:46 +053014935/* Values for channel_weight */
14936typedef enum {
14937 WMI_PCL_WEIGHT_DISALLOW = 0,
14938 WMI_PCL_WEIGHT_LOW = 1,
14939 WMI_PCL_WEIGHT_MEDIUM = 2,
14940 WMI_PCL_WEIGHT_HIGH = 3,
14941 WMI_PCL_WEIGHT_VERY_HIGH = 4,
14942} wmi_pcl_chan_weight;
14943
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014944typedef struct {
14945 /* TLV tag and len; tag equals
Govind Singh869c9872016-02-22 18:36:34 +053014946 * WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param
14947 */
14948 A_UINT32 tlv_header;
14949 /** Set Preferred Channel List **/
14950
14951 /** pdev_id for identifying the MAC
14952 * See macros starting with WMI_PDEV_ID_ for values.
14953 */
14954 A_UINT32 pdev_id;
14955
14956 /** # of channels to scan */
14957 A_UINT32 num_chan;
14958 /**
14959 * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd
14960 * structure. The TLV's are:
14961 * A_UINT32 channel_weight[];
14962 * channel order & size will be as per the list provided
14963 * in WMI_SCAN_CHAN_LIST_CMDID
14964 **/
14965} wmi_pdev_set_pcl_cmd_fixed_param;
14966
14967/* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */
14968typedef struct {
14969 /* TLV tag and len; tag equals
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014970 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param
14971 * Set Hardware Mode */
14972 A_UINT32 tlv_header;
14973
14974 /* Hardware Mode Index */
14975 A_UINT32 hw_mode_index;
14976} wmi_soc_set_hw_mode_cmd_fixed_param;
14977
14978typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053014979 /* TLV tag and len; tag equals
14980 * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param
14981 */
14982 A_UINT32 tlv_header;
14983 /** Set Hardware Mode **/
14984
14985 /** pdev_id for identifying the MAC
14986 * See macros starting with WMI_PDEV_ID_ for values.
14987 */
14988 A_UINT32 pdev_id;
14989
14990 /* Hardware Mode Index */
14991 A_UINT32 hw_mode_index;
14992} wmi_pdev_set_hw_mode_cmd_fixed_param;
14993
14994/* DEPRECATED - use wmi_pdev_set_mac_config_cmd_fixed_param instead */
14995typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014996 /*
14997 * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param
14998 * Set Dual MAC Firmware Configuration
14999 */
15000 A_UINT32 tlv_header;
15001
15002 /* Concurrent scan configuration bits */
15003 A_UINT32 concurrent_scan_config_bits;
15004 /* Firmware mode configuration bits */
15005 A_UINT32 fw_mode_config_bits;
15006} wmi_soc_set_dual_mac_config_cmd_fixed_param;
15007
15008typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053015009 /* TLV tag and len; tag equals
15010 * WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param
15011 */
15012 A_UINT32 tlv_header;
15013 /** Set Dual MAC Firmware Configuration **/
15014
15015 /** pdev_id for identifying the MAC
15016 * See macros starting with WMI_PDEV_ID_ for values.
15017 */
15018 A_UINT32 pdev_id;
15019
15020 /* Concurrent scan configuration bits */
15021 A_UINT32 concurrent_scan_config_bits;
15022 /* Firmware mode configuration bits */
15023 A_UINT32 fw_mode_config_bits;
15024} wmi_pdev_set_mac_config_cmd_fixed_param;
15025
15026typedef struct { /* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015027 A_UINT32 num_tx_chains;
15028 A_UINT32 num_rx_chains;
15029 A_UINT32 reserved[2];
15030} soc_num_tx_rx_chains;
15031
15032typedef struct {
15033 A_UINT32 num_tx_chains_2g;
15034 A_UINT32 num_rx_chains_2g;
15035 A_UINT32 num_tx_chains_5g;
15036 A_UINT32 num_rx_chains_5g;
15037} band_num_tx_rx_chains;
15038
15039typedef union {
15040 soc_num_tx_rx_chains soc_txrx_chain_setting;
15041 band_num_tx_rx_chains band_txrx_chain_setting;
15042} antenna_num_tx_rx_chains;
15043
15044typedef enum {
15045 ANTENNA_MODE_DISABLED = 0x0,
15046 ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
15047 /* reserved */
15048} antenna_mode_reason;
15049
Govind Singh869c9872016-02-22 18:36:34 +053015050/* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015051typedef struct {
15052 /*
15053 * TLV tag and len;
15054 * tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param
15055 */
15056 A_UINT32 tlv_header;
15057
15058 /* the reason for setting antenna mode, refer antenna_mode_reason */
15059 A_UINT32 reason;
15060
15061 /*
15062 * The above reason parameter will select whether the following union
15063 * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
15064 */
15065 antenna_num_tx_rx_chains num_txrx_chains_setting;
15066} wmi_soc_set_antenna_mode_cmd_fixed_param;
15067
Govind Singh869c9872016-02-22 18:36:34 +053015068typedef struct {
15069 /* TLV tag and len; tag equals
15070 * WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param
15071 */
15072 A_UINT32 tlv_header;
15073
15074 /** pdev_id for identifying the MAC
15075 * See macros starting with WMI_PDEV_ID_ for values.
15076 */
15077 A_UINT32 pdev_id;
15078
15079 /* Bits 0-15 is the number of RX chains and
15080 * 16-31 is the number of TX chains
15081 */
15082 A_UINT32 num_txrx_chains;
15083} wmi_pdev_set_antenna_mode_cmd_fixed_param;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015084
15085/** Data structure for information specific to a VDEV to MAC mapping. */
Govind Singh869c9872016-02-22 18:36:34 +053015086/* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015087typedef struct {
15088 /*
15089 * TLV tag and len; tag equals
15090 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
15091 A_UINT32 tlv_header;
15092 A_UINT32 vdev_id; /* VDEV ID */
15093 A_UINT32 mac_id; /* MAC ID */
15094} wmi_soc_set_hw_mode_response_vdev_mac_entry;
15095
Govind Singh869c9872016-02-22 18:36:34 +053015096/** Data structure for information specific to a VDEV to MAC mapping. */
15097typedef struct {
15098 /** TLV tag and len; tag equals
15099 * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */
15100 A_UINT32 tlv_header;
15101
15102 /** pdev_id for identifying the MAC
15103 * See macros starting with WMI_PDEV_ID_ for values.
15104 */
15105 A_UINT32 pdev_id;
15106
15107 A_UINT32 vdev_id;
15108} wmi_pdev_set_hw_mode_response_vdev_mac_entry;
15109
15110/* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015111typedef struct {
15112 /* TLV tag and len; tag equals
15113 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param
15114 * Set Hardware Mode Response Event **/
15115 A_UINT32 tlv_header;
15116
15117 /* Status of set_hw_mode command
15118 * Values for Status:
15119 * 0 - OK; command successful
15120 * 1 - EINVAL; Requested invalid hw_mode
15121 * 2 - ECANCELED; HW mode change canceled
15122 * 3 - ENOTSUP; HW mode not supported
15123 * 4 - EHARDWARE; HW mode change prevented by hardware
15124 * 5 - EPENDING; HW mode change is pending
15125 * 6 - ECOEX; HW mode change conflict with Coex
15126 */
15127 A_UINT32 status;
15128 /* Configured Hardware Mode */
15129 A_UINT32 cfgd_hw_mode_index;
15130 /* Number of Vdev to Mac entries */
15131 A_UINT32 num_vdev_mac_entries;
15132 /*
15133 * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event
15134 * structure. The TLV's are:
15135 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
15136 */
15137} wmi_soc_set_hw_mode_response_event_fixed_param;
15138
15139typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053015140 /* TLV tag and len; tag equals
15141 * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param
15142 */
15143 A_UINT32 tlv_header;
15144 /** Set Hardware Mode Response Event **/
15145
15146 /** pdev_id for identifying the MAC
15147 * See macros starting with WMI_PDEV_ID_ for values.
15148 */
15149 A_UINT32 pdev_id;
15150
15151 /* Status of set_hw_mode command */
15152 /*
15153 * Values for Status:
15154 * 0 - OK; command successful
15155 * 1 - EINVAL; Requested invalid hw_mode
15156 * 2 - ECANCELED; HW mode change canceled
15157 * 3 - ENOTSUP; HW mode not supported
15158 * 4 - EHARDWARE; HW mode change prevented by hardware
15159 * 5 - EPENDING; HW mode change is pending
15160 * 6 - ECOEX; HW mode change conflict with Coex
15161 */
15162 A_UINT32 status;
15163 /* Configured Hardware Mode */
15164 A_UINT32 cfgd_hw_mode_index;
15165 /* Number of Vdev to Mac entries */
15166 A_UINT32 num_vdev_mac_entries;
15167 /**
15168 * TLV (tag length value ) parameters follow the
15169 * soc_set_hw_mode_response_event structure. The TLV's are:
15170 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
15171 */
15172} wmi_pdev_set_hw_mode_response_event_fixed_param;
15173
15174/* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */
15175typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015176 /*
15177 * TLV tag and len; tag equals
15178 * WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param
15179 * Hardware Mode Transition Event
15180 */
15181 A_UINT32 tlv_header;
15182 /* Original or old Hardware mode */
15183 A_UINT32 old_hw_mode_index;
15184 /* New Hardware Mode */
15185 A_UINT32 new_hw_mode_index;
15186 /* Number of Vdev to Mac entries */
15187 A_UINT32 num_vdev_mac_entries;
15188
15189 /**
15190 * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event
15191 * structure. The TLV's are:
15192 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
15193 */
15194} wmi_soc_hw_mode_transition_event_fixed_param;
15195
Govind Singh869c9872016-02-22 18:36:34 +053015196typedef struct {
15197 /* TLV tag and len; tag equals
15198 * WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param
15199 */
15200 A_UINT32 tlv_header;
15201 /** Hardware Mode Transition Event **/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015202
Govind Singh869c9872016-02-22 18:36:34 +053015203 /** pdev_id for identifying the MAC
15204 * See macros starting with WMI_PDEV_ID_ for values.
15205 */
15206 A_UINT32 pdev_id;
15207
15208 /* Original or old Hardware mode */
15209 A_UINT32 old_hw_mode_index;
15210 /* New Hardware Mode */
15211 A_UINT32 new_hw_mode_index;
15212 /* Number of Vdev to Mac entries */
15213 A_UINT32 num_vdev_mac_entries;
15214
15215 /**
15216 * TLV (tag length value ) parameters follow the
15217 * soc_set_hw_mode_response_event structure. The TLV's are:
15218 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
15219 */
15220} wmi_pdev_hw_mode_transition_event_fixed_param;
15221
Pradeep Reddy POTTETIdead2bd2016-06-09 17:11:12 +053015222/**
15223 * This command is sent from WLAN host driver to firmware for
15224 * plugging in reorder queue desc to lithium hw.
15225 *
15226 * Example: plug-in queue desc for TID 5
15227 * host->target: WMI_PEER_REORDER_QUEUE_SETUP_CMDID,
15228 * (vdev_id = PEER vdev id,
15229 * peer_macaddr = PEER mac addr,
15230 * tid = 5,
15231 * queue_ptr_lo = queue desc addr lower 32 bits,
15232 * queue_ptr_hi = queue desc addr higher 32 bits,
15233 * queue_no = 16-bit number assigned by host for queue,
15234 * stored in bits 15:0 of queue_no field)
15235 */
15236typedef struct {
15237 /* TLV tag and len; tag equals
15238 * WMITLV_TAG_STRUC_wmi_peer_reorder_queue_setup_cmd_fixed_param
15239 */
15240 A_UINT32 tlv_header;
15241 A_UINT32 vdev_id;
15242 /* peer mac address */
15243 wmi_mac_addr peer_macaddr;
15244 /* 0 to 15 = QoS TIDs, 16 = non-qos TID */
15245 A_UINT32 tid;
15246 /* lower 32 bits of queue desc adddress */
15247 A_UINT32 queue_ptr_lo;
15248 /* upper 32 bits of queue desc adddress */
15249 A_UINT32 queue_ptr_hi;
15250 /* 16-bit number assigned by host for queue,
15251 * stored in bits 15:0 of queue_no field
15252 */
15253 A_UINT32 queue_no;
15254} wmi_peer_reorder_queue_setup_cmd_fixed_param;
15255
15256/**
15257 * This command is sent from WLAN host driver to firmware for
15258 * removing one or more reorder queue desc to lithium hw.
15259 *
15260 * Example: remove queue desc for all TIDs
15261 * host->target: WMI_PEER_REORDER_REMOVE_CMDID,
15262 * (vdev_id = PEER vdev id,
15263 * peer_macaddr = PEER mac addr,
15264 * tid = 0x1FFFF,
15265 */
15266typedef struct {
15267 /* TLV tag and len;
15268 * tag equals
15269 * WMITLV_TAG_STRUC_wmi_peer_reorder_queue_remove_cmd_fixed_param
15270 */
15271 A_UINT32 tlv_header;
15272 A_UINT32 vdev_id;
15273 /* peer mac address */
15274 wmi_mac_addr peer_macaddr;
15275 /* bits 0 to 15 = QoS TIDs, bit 16 = non-qos TID */
15276 A_UINT32 tid_mask;
15277} wmi_peer_reorder_queue_remove_cmd_fixed_param;
15278
15279
Govind Singh869c9872016-02-22 18:36:34 +053015280/* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param
15281 * instead
15282 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015283typedef struct {
15284 /*
15285 * TLV tag and len; tag equals
15286 * WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param
15287 * Set Dual MAC Config Response Event
15288 */
15289 A_UINT32 tlv_header;
15290
15291 /* Status for set_dual_mac_config command */
15292 /*
15293 * Values for Status:
15294 * 0 - OK; command successful
15295 * 1 - EINVAL; Requested invalid hw_mode
15296 * 3 - ENOTSUP; HW mode not supported
15297 * 4 - EHARDWARE; HW mode change prevented by hardware
15298 * 6 - ECOEX; HW mode change conflict with Coex
15299 */
15300 A_UINT32 status;
15301} wmi_soc_set_dual_mac_config_response_event_fixed_param;
15302
Govind Singh869c9872016-02-22 18:36:34 +053015303typedef struct {
15304 /* TLV tag and len; tag equals
15305 * WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param
15306 */
15307 A_UINT32 tlv_header;
15308 /** Set Dual MAC Config Response Event **/
15309
15310 /** pdev_id for identifying the MAC
15311 * See macros starting with WMI_PDEV_ID_ for values.
15312 */
15313 A_UINT32 pdev_id;
15314
15315 /* Status for set_dual_mac_config command */
15316 /*
15317 * Values for Status:
15318 * 0 - OK; command successful
15319 * 1 - EINVAL; Requested invalid hw_mode
15320 * 3 - ENOTSUP; HW mode not supported
15321 * 4 - EHARDWARE; HW mode change prevented by hardware
15322 * 6 - ECOEX; HW mode change conflict with Coex
15323 */
15324 A_UINT32 status;
15325} wmi_pdev_set_mac_config_response_event_fixed_param;
15326
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015327typedef enum {
15328 MAWC_MOTION_STATE_UNKNOWN,
15329 MAWC_MOTION_STATE_STATIONARY,
15330 MAWC_MOTION_STATE_WALK,
15331 MAWC_MOTION_STATE_TRANSIT,
15332} MAWC_MOTION_STATE;
15333
15334typedef enum {
15335 MAWC_SENSOR_STATUS_OK,
15336 MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
15337 MAWC_SENSOR_STATUS_SHUTDOWN,
15338} MAWC_SENSOR_STATUS;
15339
15340typedef struct {
15341 /* TLV tag and len; tag equals
15342 * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
15343 A_UINT32 tlv_header;
15344 /** new motion state, MAWC_MOTION_STATE */
15345 A_UINT32 motion_state;
15346 /** status code of sensor, MAWC_SENSOR_STATUS */
15347 A_UINT32 sensor_status;
15348} wmi_mawc_sensor_report_ind_cmd_fixed_param;
15349
Govind Singh86180292016-02-01 14:03:37 +053015350/* MBO flag field definition */
15351/*
15352 * Bit 0: 0 - Allow to connect to both MBO and non-MBO AP
15353 * 1 - Allow to connect to MBO AP only
15354 * Bit 1-31 : reserved.
15355 */
Nitesh Shahe5aa26b2016-07-08 12:03:44 +053015356#define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0) /* DEPRECATED */
Govind Singh86180292016-02-01 14:03:37 +053015357
15358typedef struct {
15359 /*
15360 * TLV tag and len; tag equals
15361 * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param
15362 */
15363 A_UINT32 tlv_header;
15364 /** vdev id */
15365 A_UINT32 vdev_id;
15366 /** enable or disable MBO */
15367 A_UINT32 enable;
15368 /** MBO flags, refer to definition of MBO flags*/
15369 A_UINT32 flags;
Nitesh Shahe5aa26b2016-07-08 12:03:44 +053015370} wmi_roam_set_mbo_fixed_param; /* DEPRECATED */
Govind Singh86180292016-02-01 14:03:37 +053015371
15372typedef struct {
15373 /*
15374 * TLV tag and len; tag equals
15375 * WMITLV_TAG_ARRAY_STRUC
15376 */
15377 A_UINT32 tlv_header;
15378 /** Current operating class number */
15379 A_UINT32 cur_op_class;
15380 /*
15381 * Country string of current reg domain,
15382 * the expected value should be same as country str defined
15383 * in country IE.
15384 * 3 octets (COUNTRY_STR) + 1 octet (always 0)
15385 * The ordering of this array must be maintained,
15386 * even when a big-endian host's WMI messages undergo
15387 * automatic byte reordering for conversion to the
15388 * little-endian ordering required by the target.
15389 * On big-endian hosts, this array may need to be byte-swapped
15390 * by the host, so the subsequent automatic byte-swap
15391 * will result in the correct final byte order.
15392 * global operating class: set country_str[0]=0
15393 */
15394 A_UINT8 country_str[4];
15395 /** Supported operating class number in current regdomain */
15396 A_UINT32 supp_op_class_num;
15397 /* The TLVs will follow. */
15398 /* A_UINT32 supp_op_class_list[] */
15399} wmi_supported_operating_class_param;
15400
15401typedef struct {
15402 /*
15403 * TLV tag and len; tag equals
15404 * WMITLV_TAG_ARRAY_STRUC
15405 */
15406 A_UINT32 tlv_header;
15407 /** non preferred channel attribute length */
15408 A_UINT32 non_prefer_ch_attr_len;
15409 /* The TLVs will follow. */
15410 /** A_UINT8 non_prefer_ch_attr[];*/
15411} wmi_mbo_non_preferred_channel_report_param;
15412
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015413typedef struct {
15414 /* TLV tag and len; tag equals
15415 * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
15416 A_UINT32 tlv_header;
15417 /* enable(1) or disable(0) */
15418 A_UINT32 enable;
15419} wmi_mawc_enable_sensor_event_fixed_param;
15420
15421typedef struct {
15422 /* TLV tag and len; tag equals
15423 * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
15424 A_UINT32 tlv_header;
15425 /* Unique id identifying the VDEV */
15426 A_UINT32 vdev_id;
15427 /* enable(1) or disable(0) MAWC */
15428 A_UINT32 enable;
15429 /* ratio of skipping suppressing scan, skip one out of x */
15430 A_UINT32 suppress_ratio;
15431} wmi_extscan_configure_mawc_cmd_fixed_param;
15432
15433typedef struct {
15434 /* TLV tag and len; tag equals
15435 * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
15436 A_UINT32 tlv_header;
15437 /* Unique id identifying the VDEV */
15438 A_UINT32 vdev_id;
15439 /* enable(1) or disable(0) MAWC */
15440 A_UINT32 enable;
15441 /* ratio of exponential backoff, next = current + current*ratio/100 */
15442 A_UINT32 exp_backoff_ratio;
15443 /* initial scan interval(msec) */
15444 A_UINT32 init_scan_interval;
15445 /* max scan interval(msec) */
15446 A_UINT32 max_scan_interval;
15447} wmi_nlo_configure_mawc_cmd_fixed_param;
15448
15449typedef struct {
15450 /* TLV tag and len; tag equals
15451 * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
15452 A_UINT32 tlv_header;
15453 /* Unique id identifying the VDEV */
15454 A_UINT32 vdev_id;
15455 /* enable(1) or disable(0) MAWC */
15456 A_UINT32 enable;
15457 /* data traffic load (kBps) to register CMC */
15458 A_UINT32 traffic_load_threshold;
15459 /* RSSI threshold (dBm) to scan for Best AP */
15460 A_UINT32 best_ap_rssi_threshold;
15461 /* high RSSI threshold adjustment in Stationary to suppress scan */
15462 A_UINT32 rssi_stationary_high_adjust;
15463 /* low RSSI threshold adjustment in Stationary to suppress scan */
15464 A_UINT32 rssi_stationary_low_adjust;
15465} wmi_roam_configure_mawc_cmd_fixed_param;
15466
15467#define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2
Himanshu Agarwal2690e462016-06-03 14:26:01 +053015468#define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 5
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015469
15470typedef enum {
15471 PACKET_FILTER_TYPE_INVALID = 0,
15472 PACKET_FILTER_TYPE_FILTER_PKT,
15473 PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
15474 PACKET_FILTER_TYPE_MAX_ENUM_SIZE
15475} WMI_PACKET_FILTER_FILTER_TYPE;
15476
15477typedef enum {
15478 PACKET_FILTER_PROTO_TYPE_INVALID = 0,
15479
15480 /* L2 header */
15481 PACKET_FILTER_PROTO_TYPE_MAC,
15482 PACKET_FILTER_PROTO_TYPE_SNAP,
15483
15484 /* L3 header (EtherType) */
15485 PACKET_FILTER_PROTO_TYPE_IPV4,
15486 PACKET_FILTER_PROTO_TYPE_IPV6,
15487
15488 /* L4 header (IP protocol) */
15489 PACKET_FILTER_PROTO_TYPE_UDP,
15490 PACKET_FILTER_PROTO_TYPE_TCP,
15491 PACKET_FILTER_PROTO_TYPE_ICMPV6,
15492
15493 PACKET_FILTER_PROTO_TYPE_MAX
15494} WMI_PACKET_FILTER_PROTO_TYPE;
15495
15496typedef enum {
15497 PACKET_FILTER_CMP_TYPE_INVALID = 0,
15498 PACKET_FILTER_CMP_TYPE_EQUAL,
15499 PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
15500 PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
15501 PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
15502 PACKET_FILTER_CMP_TYPE_ADDRTYPE,
15503 PACKET_FILTER_CMP_TYPE_MAX
15504} WMI_PACKET_FILTER_CMP_TYPE;
15505
15506typedef enum {
15507 PACKET_FILTER_SET_INACTIVE = 0,
15508 PACKET_FILTER_SET_ACTIVE
15509} WMI_PACKET_FILTER_ACTION;
15510
15511typedef enum {
15512 PACKET_FILTER_SET_DISABLE = 0,
15513 PACKET_FILTER_SET_ENABLE
15514} WMI_PACKET_FILTER_RUNTIME_ENABLE;
15515
15516typedef struct {
15517 A_UINT32 proto_type;
15518 A_UINT32 cmp_type;
15519 A_UINT32 data_length; /* Length of the data to compare (units = bytes) */
15520 /*
15521 * from start of the respective frame header (
15522 * units = bytes)
15523 */
15524 A_UINT32 data_offset;
15525 /* Data to compare, little-endian order */
15526 A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD];
15527 /* Mask to be applied on rcvd packet data before compare, little-endian order */
15528 A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD];
15529} WMI_PACKET_FILTER_PARAMS_TYPE;
15530
15531typedef struct {
15532 A_UINT32 tlv_header;
15533 A_UINT32 vdev_id;
15534 A_UINT32 filter_id;
15535 A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */
15536 A_UINT32 filter_type;
15537 A_UINT32 num_params; /* how many entries in paramsData are valid */
15538 A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */
15539 WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
Himanshu Agarwal2690e462016-06-03 14:26:01 +053015540 /*
15541 * deprecated0:
15542 * This field simply provides filler space to retain the
15543 * original message format while reducing
15544 * WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER from 10 to 5.
15545 */
15546 WMI_PACKET_FILTER_PARAMS_TYPE deprecated0[5];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015547} WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
15548
15549/* enable / disable all filters within the specified vdev */
15550typedef struct {
15551 A_UINT32 tlv_header;
15552 A_UINT32 vdev_id;
15553 A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
15554} WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
15555
15556
15557#define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0
15558#define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
15559
15560#define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
15561 WMI_SET_BITS(tcp_flag_u32, \
15562 WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
15563 WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
15564 tcp_flag_values)
15565#define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
15566 WMI_GET_BITS(tcp_flag_u32, \
15567 WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
15568 WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
15569
15570#define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9
15571#define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
15572
15573#define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
15574 WMI_SET_BITS(tcp_flag_u32, \
15575 WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
15576 WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
15577 tcp_flags_mask)
15578#define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
15579 WMI_GET_BITS(tcp_flag_u32, \
15580 WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
15581 WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
15582
15583typedef struct {
15584 A_UINT32 tlv_header;
15585 /**
15586 * @brief lro_enable - indicates whether lro is enabled
15587 * [0] LRO Enable
15588 */
15589 A_UINT32 lro_enable;
15590 /**
15591 * @brief tcp_flag_u32 - mask of which TCP flags to check and
15592 * values to check for
15593 * [8:0] TCP flag values - If the TCP flags from the packet do not match
15594 * the values in this field after masking with TCP flags mask
15595 * below,LRO eligible will not be set
15596 * [17:9] TCP flags mask - Mask field for comparing the TCP values
15597 * provided above with the TCP flags field in the received packet
15598 * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
15599 * macros to isolate the mask field and values field that are packed
15600 * into this u32 "word".
15601 */
15602 A_UINT32 tcp_flag_u32;
15603 /**
15604 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
15605 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
15606 * bytes 0 to 3
15607 *
15608 * In this and all the below toeplitz_hash fields, the bytes are
15609 * specified in little-endian order. For example:
15610 * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0
15611 * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1
15612 * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
15613 * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
15614 */
15615 A_UINT32 toeplitz_hash_ipv4_0_3;
15616
15617 /**
15618 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
15619 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
15620 * bytes 4 to 7
15621 */
15622 A_UINT32 toeplitz_hash_ipv4_4_7;
15623
15624 /**
15625 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
15626 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
15627 * bytes 8 to 11
15628 */
15629 A_UINT32 toeplitz_hash_ipv4_8_11;
15630
15631 /**
15632 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
15633 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
15634 * bytes 12 to 15
15635 */
15636 A_UINT32 toeplitz_hash_ipv4_12_15;
15637
15638 /**
15639 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
15640 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
15641 * byte 16
15642 */
15643 A_UINT32 toeplitz_hash_ipv4_16;
15644
15645 /**
15646 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15647 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15648 * bytes 0 to 3
15649 */
15650 A_UINT32 toeplitz_hash_ipv6_0_3;
15651
15652 /**
15653 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15654 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15655 * bytes 4 to 7
15656 */
15657 A_UINT32 toeplitz_hash_ipv6_4_7;
15658
15659 /**
15660 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15661 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15662 * bytes 8 to 11
15663 */
15664 A_UINT32 toeplitz_hash_ipv6_8_11;
15665
15666 /**
15667 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15668 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15669 * bytes 12 to 15
15670 */
15671 A_UINT32 toeplitz_hash_ipv6_12_15;
15672
15673 /**
15674 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15675 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15676 * bytes 16 to 19
15677 */
15678 A_UINT32 toeplitz_hash_ipv6_16_19;
15679
15680 /**
15681 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15682 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15683 * bytes 20 to 22
15684 */
15685 A_UINT32 toeplitz_hash_ipv6_20_23;
15686
15687 /**
15688 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15689 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15690 * bytes 24 to 27
15691 */
15692 A_UINT32 toeplitz_hash_ipv6_24_27;
15693
15694 /**
15695 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15696 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15697 * bytes 28 to 31
15698 */
15699 A_UINT32 toeplitz_hash_ipv6_28_31;
15700
15701 /**
15702 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15703 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15704 * bytes 32 to 35
15705 */
15706 A_UINT32 toeplitz_hash_ipv6_32_35;
15707
15708 /**
15709 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15710 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15711 * bytes 36 to 39
15712 */
15713 A_UINT32 toeplitz_hash_ipv6_36_39;
15714
15715 /**
15716 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
15717 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
15718 * byte 40
15719 */
15720 A_UINT32 toeplitz_hash_ipv6_40;
15721} wmi_lro_info_cmd_fixed_param;
15722
Nirav Shahbf6450f2015-11-05 11:47:20 +053015723typedef struct {
15724 /*
15725 * TLV tag and len; tag equals
15726 * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param
15727 */
15728 A_UINT32 tlv_header;
15729 /* flash offset to write, starting from 0 */
15730 A_UINT32 offset;
15731 /* vaild data length in buffer, unit: byte */
15732 A_UINT32 length;
15733} wmi_transfer_data_to_flash_cmd_fixed_param;
15734
15735typedef struct {
15736 /*
15737 * TLV tag and len; tag equals
15738 * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param
15739 */
15740 A_UINT32 tlv_header;
15741 /* Return status. 0 for success, non-zero otherwise */
15742 A_UINT32 status;
15743} wmi_transfer_data_to_flash_complete_event_fixed_param;
15744
Pradeep Reddy POTTETI4189bf92016-06-20 14:51:55 +053015745typedef struct {
15746 /*
15747 * TLV tag and len; tag equals
15748 * WMITLV_TAG_STRUC_wmi_read_data_from_flash_cmd_fixed_param
15749 */
15750 A_UINT32 tlv_header;
15751 A_UINT32 offset; /* flash offset to read, starting from 0 */
15752 A_UINT32 length; /* data length to read, unit: byte */
15753} wmi_read_data_from_flash_cmd_fixed_param;
15754
15755typedef struct {
15756 /*
15757 * TLV tag and len; tag equals
15758 * WMITLV_TAG_STRUC_wmi_read_data_from_flash_event_fixed_param
15759 */
15760 A_UINT32 tlv_header;
15761 A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */
15762 A_UINT32 offset; /* flash offset reading from, starting from 0 */
15763 A_UINT32 length; /* length of data being reported, unit: byte */
15764} wmi_read_data_from_flash_event_fixed_param;
15765
Sreelakshmi Konamki58f4d622016-04-14 18:03:21 +053015766typedef enum {
15767 ENHANCED_MCAST_FILTER_DISABLED,
15768 ENHANCED_MCAST_FILTER_ENABLED
15769} ENHANCED_MCAST_FILTER_CONFIG;
15770
15771/*
15772 * Command to enable/disable filtering of multicast IP with unicast mac
15773 */
15774typedef struct {
15775 /*
15776 * TLV tag and len; tag equals
15777 * WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param
15778 */
15779 A_UINT32 tlv_header;
15780 /* Unique id identifying the VDEV */
15781 A_UINT32 vdev_id;
15782 /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */
15783 A_UINT32 enable;
15784} wmi_config_enhanced_mcast_filter_cmd_fixed_param;
15785
Anurag Chouhan05d05fe2016-04-18 17:09:24 +053015786typedef struct {
15787 /*
15788 * TLV tag and len; tag equals
15789 * WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param
15790 */
15791 A_UINT32 tlv_header;
15792 /* unique id identifying the VDEV, generated by the caller */
15793 A_UINT32 vdev_id;
15794 /* WISA enable / disable mode */
15795 A_UINT32 wisa_mode;
15796} wmi_vdev_wisa_cmd_fixed_param;
15797
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -080015798/*
Manikandan Mohan55c94d62015-12-04 13:47:58 -080015799 * This structure is used to report SMPS force mode set complete to host.
15800 */
15801typedef struct {
15802 /* TLV tag and len; tag equals
15803 * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param
15804 */
15805 A_UINT32 tlv_header;
15806 /* Unique id identifying the VDEV */
15807 A_UINT32 vdev_id;
15808 /* Return status. 0 for success, non-zero otherwise */
15809 A_UINT32 status;
15810} wmi_sta_smps_force_mode_complete_event_fixed_param;
15811
15812/*
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -080015813 * This structure is used to report SCPC calibrated data to host.
15814 */
15815typedef struct {
15816 /* TLV tag and len; tag equals
15817 * WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param
15818 */
15819 A_UINT32 tlv_header;
15820 /* number of BDF patches. Each patch contains offset, length and data */
15821 A_UINT32 num_patch;
15822 /* This TLV is followed by another TLV of array of bytes
15823 * A_UINT8 data[];
15824 * This data array contains, for example
15825 * patch1 offset(byte3~0), patch1 data length(byte7~4),
15826 * patch1 data(byte11~8)
15827 * patch2 offset(byte15~12), patch2 data length(byte19~16),
15828 * patch2 data(byte47~20)
15829 */
15830} wmi_scpc_event_fixed_param;
15831
Manikandan Mohan130eb572015-12-23 13:53:34 -080015832/* bpf interface structure */
15833typedef struct wmi_bpf_get_capability_cmd_s {
15834 A_UINT32 tlv_header;
15835 A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */
15836} wmi_bpf_get_capability_cmd_fixed_param;
15837
15838typedef struct wmi_bpf_capability_info_evt_s {
15839 A_UINT32 tlv_header;
15840 A_UINT32 bpf_version; /* fw's implement version */
15841 A_UINT32 max_bpf_filters; /* max filters that fw supports */
15842 A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
15843} wmi_bpf_capability_info_evt_fixed_param;
15844
15845/* bit 0 of flags: report counters */
15846#define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0
15847#define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1
15848typedef struct wmi_bpf_get_vdev_stats_cmd_s {
15849 A_UINT32 tlv_header;
15850 A_UINT32 flags;
15851 A_UINT32 vdev_id;
15852} wmi_bpf_get_vdev_stats_cmd_fixed_param;
15853
15854typedef struct wmi_bpf_vdev_stats_info_evt_s {
15855 A_UINT32 tlv_header;
15856 A_UINT32 vdev_id;
15857 A_UINT32 num_filters;
15858 A_UINT32 num_checked_pkts;
15859 A_UINT32 num_dropped_pkts;
15860 } wmi_bpf_vdev_stats_info_evt_fixed_param;
15861
15862typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
15863 A_UINT32 tlv_header;
15864 A_UINT32 vdev_id;
15865 A_UINT32 filter_id;
15866 A_UINT32 bpf_version; /* host bpf version */
15867 A_UINT32 total_length;
15868 A_UINT32 current_offset;
15869 A_UINT32 current_length;
Manikandan Mohan05ac7ee2015-12-23 14:18:36 -080015870 /*
15871 * The TLV follows:
15872 * A_UINT8 buf_inst[]; //Variable length buffer for the instuctions
15873 */
Manikandan Mohan130eb572015-12-23 13:53:34 -080015874} wmi_bpf_set_vdev_instructions_cmd_fixed_param;
15875
15876#define BPF_FILTER_ID_ALL 0xFFFFFFFF
15877typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
15878 A_UINT32 tlv_header;
15879 A_UINT32 vdev_id;
15880 A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */
15881} wmi_bpf_del_vdev_instructions_cmd_fixed_param;
15882
Govind Singhc7d51942016-02-01 12:09:31 +053015883#define AES_BLOCK_LEN 16 /* in bytes */
15884#define FIPS_KEY_LENGTH_128 16 /* in bytes */
15885#define FIPS_KEY_LENGTH_256 32 /* in bytes */
15886#define FIPS_ENCRYPT_CMD 0
15887#define FIPS_DECRYPT_CMD 1
15888#define FIPS_ENGINE_AES_CTR 0
15889#define FIPS_ENGINE_AES_MIC 1
15890#define FIPS_ERROR_OPER_TIMEOUT 1
15891
15892/* WMI_PDEV_FIPS_CMDID */
15893typedef struct {
15894 /*
15895 * TLV tag and len; tag equals
15896 * WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param
15897 */
15898 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053015899 union {
15900 /* OBSOLETE - will be removed once all refs are gone */
15901 A_UINT32 mac_id;
15902 /** pdev_id for identifying the MAC
15903 * See macros starting with WMI_PDEV_ID_ for values.
15904 */
15905 A_UINT32 pdev_id;
15906 };
Govind Singhc7d51942016-02-01 12:09:31 +053015907 A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
15908 /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
15909 A_UINT32 mode;
15910 /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
15911 A_UINT32 key_len;
15912 A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
15913 A_UINT32 data_len; /* data length */
15914 /*
15915 * Following this structure is the TLV:
15916 * A_UINT32 data[1]; - In Data (keep this in the end)
15917 */
15918} wmi_pdev_fips_cmd_fixed_param;
15919
15920typedef struct {
15921 /*
15922 * TLV tag and len; tag equals
15923 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param
15924 */
15925 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053015926 union {
15927 /* OBSOLETE - will be removed once all refs are gone */
15928 A_UINT32 mac_id;
15929 /** pdev_id for identifying the MAC
15930 * See macros starting with WMI_PDEV_ID_ for values.
15931 */
15932 A_UINT32 pdev_id;
15933 };
Govind Singhc7d51942016-02-01 12:09:31 +053015934 A_UINT32 enable; /* 1:enable, 0:disable */
15935 /* 1:GPIO parallel mode, 0:GPIO serial mode */
15936 A_UINT32 mode;
15937 A_UINT32 rx_antenna; /* rx antenna */
15938 A_UINT32 tx_default_antenna; /* tx default antenna */
15939 /*
15940 * Following this structure is the TLV:
15941 * wmi_pdev_smart_ant_gpio_handle
15942 */
15943} wmi_pdev_smart_ant_enable_cmd_fixed_param;
15944
15945/** GPIO pins/function values to control antennas */
15946typedef struct {
15947 /*
15948 * TLV tag and len; tag equals
15949 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle
15950 */
15951 A_UINT32 tlv_header;
15952 /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
15953 A_UINT32 gpio_pin;
15954 A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */
Govind Singh869c9872016-02-22 18:36:34 +053015955 /** pdev_id for identifying the MAC
15956 * See macros starting with WMI_PDEV_ID_ for values.
15957 */
15958 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053015959} wmi_pdev_smart_ant_gpio_handle;
15960
15961typedef struct {
15962 /*
15963 * TLV tag and len; tag equals
15964 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param
15965 */
15966 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053015967 union {
15968 /* OBSOLETE - will be removed once all refs are gone */
15969 A_UINT32 mac_id;
15970 /** pdev_id for identifying the MAC
15971 * See macros starting with WMI_PDEV_ID_ for values.
15972 */
15973 A_UINT32 pdev_id;
15974 };
Govind Singhc7d51942016-02-01 12:09:31 +053015975 A_UINT32 rx_antenna;
15976} wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
15977
15978typedef struct {
15979 /*
15980 * TLV tag and len; tag equals
15981 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param
15982 */
15983 A_UINT32 tlv_header;
15984 /** unique id identifying the vdev, generated by the caller */
Govind Singh869c9872016-02-22 18:36:34 +053015985 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053015986 /** peer MAC address */
15987 wmi_mac_addr peer_macaddr;
15988 /*
15989 * Following this structure is the TLV:
15990 * wmi_peer_smart_ant_set_tx_antenna_series
15991 */
15992} wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
15993
15994typedef struct {
15995 /*
15996 * TLV tag and len; tag equals
15997 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series
15998 */
15999 A_UINT32 tlv_header;
16000 /* antenna array */
16001 A_UINT32 antenna_series;
16002} wmi_peer_smart_ant_set_tx_antenna_series;
16003
16004typedef struct {
16005 /*
16006 * TLV tag and len; tag equals
16007 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param
16008 */
16009 A_UINT32 tlv_header;
16010 /* rate array */
16011 A_UINT32 train_rate_series;
16012 /* antenna array */
16013 A_UINT32 train_antenna_series;
16014 /* Rate flags */
16015 /* TODO: For future use? */
16016 A_UINT32 rc_flags;
16017} wmi_peer_smart_ant_set_train_antenna_param;
16018
16019typedef struct {
16020 /*
16021 * TLV tag and len; tag equals
16022 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param
16023 */
16024 A_UINT32 tlv_header;
16025 /** unique id identifying the VDEV, generated by the caller */
Govind Singh869c9872016-02-22 18:36:34 +053016026 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053016027 /** peer MAC address */
16028 wmi_mac_addr peer_macaddr;
16029 /* num packets; 0-stop training */
16030 A_UINT32 num_pkts;
16031 /*
16032 * Following this structure is the TLV:
16033 * wmi_peer_smart_ant_set_train_antenna_param
16034 */
16035} wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
16036
16037typedef struct {
16038 /*
16039 * TLV tag and len; tag equals
16040 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param
16041 */
16042 A_UINT32 tlv_header;
16043 /** unique id identifying the vdev, generated by the caller */
Govind Singh869c9872016-02-22 18:36:34 +053016044 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053016045 /** peer MAC address */
16046 wmi_mac_addr peer_macaddr;
16047 /* command id*/
16048 A_UINT32 cmd_id;
16049 /* number of arguments passed */
16050 A_UINT32 args_count;
16051 /*
16052 * Following this structure is the TLV:
16053 * A_UINT32 args[]; // argument list
16054 */
16055} wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
16056
16057typedef struct {
16058 /*
16059 * TLV tag and len; tag equals
16060 * WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain
16061 */
16062 A_UINT32 tlv_header;
16063 A_UINT32 antCtrlChain;
Govind Singh869c9872016-02-22 18:36:34 +053016064 /** pdev_id for identifying the MAC
16065 * See macros starting with WMI_PDEV_ID_ for values.
16066 */
16067 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053016068} wmi_pdev_set_ant_ctrl_chain;
16069
16070typedef struct {
16071 /*
16072 * TLV tag and len; tag equals
16073 * WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param
16074 */
16075 A_UINT32 tlv_header;
16076 A_UINT32 mac_id; /* MAC ID */
16077 A_UINT32 antCtrlCommon1;
16078 A_UINT32 antCtrlCommon2;
16079 /*
16080 * Following this structure is the TLV:
16081 * wmi_pdev_set_ant_ctrl_chain
16082 */
16083} wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
16084
16085typedef struct {
16086 /* TLV tag and len; tag equals
16087 * WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param
16088 */
16089 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016090 union {
16091 /* OBSOLETE - will be removed once all refs are gone */
16092 A_UINT32 mac_id;
16093 /** pdev_id for identifying the MAC
16094 * See macros starting with WMI_PDEV_ID_ for values.
16095 */
16096 A_UINT32 pdev_id;
16097 };
Govind Singhc7d51942016-02-01 12:09:31 +053016098 /** len of CTL info */
16099 A_UINT32 ctl_len;
16100 /* ctl array (len adjusted to number of words)
16101 * Following this structure is the TLV:
16102 * A_UINT32 ctl_info[1];
16103 */
16104} wmi_pdev_set_ctl_table_cmd_fixed_param;
16105
16106typedef struct {
16107 /*
16108 * TLV tag and len; tag equals
16109 * WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param
16110 */
16111 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016112 union {
16113 /* OBSOLETE - will be removed once all refs are gone */
16114 A_UINT32 mac_id;
16115 /** pdev_id for identifying the MAC
16116 * See macros starting with WMI_PDEV_ID_ for values.
16117 */
16118 A_UINT32 pdev_id;
16119 };
Govind Singhc7d51942016-02-01 12:09:31 +053016120 A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
16121 /*
16122 * Bit 7:0 len of array gain table
16123 * Bit 8 bypass multi chain gain or not
16124 */
16125 /*
16126 * array gain table(s) (len adjusted to number of words).
16127 * Following this structure is the TLV:
16128 * A_UINT32 arraygain_tbl[1];
16129 */
16130} wmi_pdev_set_mimogain_table_cmd_fixed_param;
16131
16132#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
16133#define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
16134#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_ARRAY_GAIN_LEN)
16135#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_ARRAY_GAIN_LEN)
16136
16137#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
16138#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
16139#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
16140#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
16141
16142
16143typedef struct {
16144 /*
16145 * TLV tag and len; tag equals
16146 * WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param
16147 */
16148 A_UINT32 tlv_header;
16149 /** parameter id */
16150 A_UINT32 param_id;
16151 /** parameter value */
16152 A_UINT32 param_value;
16153} wmi_fwtest_set_param_cmd_fixed_param;
16154
16155/* Expressed in 1 part in 1000 (permille) */
16156#define WMI_ATF_DENOMINATION 1000
16157
Nitesh Shah0f933b82016-07-20 16:05:03 +053016158#define WMI_ATF_SSID_FAIR_SCHED 0 /** Fair ATF scheduling for vdev */
16159#define WMI_ATF_SSID_STRICT_SCHED 1 /** Strict ATF scheduling for vdev */
16160
Govind Singhc7d51942016-02-01 12:09:31 +053016161typedef struct {
16162 /*
16163 * TLV tag and len; tag equals
16164 * WMITLV_TAG_STRUC_wmi_atf_peer_info
16165 */
16166 A_UINT32 tlv_header;
16167 wmi_mac_addr peer_macaddr;
16168 A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
16169 A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
16170 /* Peer congestion threshold for future use */
16171 A_UINT32 atf_units_reserved;
16172} wmi_atf_peer_info;
16173
16174typedef struct {
16175 /*
16176 * TLV tag and len; tag equals
16177 * WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param
16178 */
16179 A_UINT32 tlv_header;
16180 A_UINT32 num_peers;
16181 /*
16182 * Following this structure is the TLV:
Himanshu Agarwal134b7362016-05-13 20:30:12 +053016183 * struct wmi_atf_peer_info peer_info[num_peers];
Govind Singhc7d51942016-02-01 12:09:31 +053016184 */
16185} wmi_peer_atf_request_fixed_param;
16186
Himanshu Agarwal134b7362016-05-13 20:30:12 +053016187/* Structure for Bandwidth Fairness peer information */
16188typedef struct {
16189 /*
16190 * TLV tag and len; tag equals
16191 * WMITLV_TAG_STRUC_wmi_bwf_peer_info
16192 */
16193 A_UINT32 tlv_header;
16194 wmi_mac_addr peer_macaddr;
16195 /* BWF guaranteed_bandwidth for the peers in mbps */
16196 A_UINT32 bwf_guaranteed_bandwidth;
16197 /*
16198 * BWF Maximum airtime percentage that can be allocated
16199 * to the peer to meet the guaranteed_bandwidth
16200 */
16201 A_UINT32 bwf_max_airtime;
16202 /* BWF priority of the peer to allocate the tokens dynamically */
16203 A_UINT32 bwf_peer_priority;
16204} wmi_bwf_peer_info;
16205
16206/* Structure for Bandwidth Fairness peer request */
16207typedef struct {
16208 /*
16209 * TLV tag and len; tag equals
16210 * WMITLV_TAG_STRUC_wmi_peer_bwf_request_fixed_param
16211 */
16212 A_UINT32 tlv_header;
16213 A_UINT32 num_peers;
16214 /*
16215 * Following this structure is the TLV:
16216 * struct wmi_bwf_peer_info peer_info[num_peers];
16217 */
16218} wmi_peer_bwf_request_fixed_param;
16219
16220
Govind Singhc7d51942016-02-01 12:09:31 +053016221/* Equal distribution of ATF air time within an VDEV. */
16222typedef struct {
16223 /*
16224 * TLV tag and len; tag equals
16225 * WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param
16226 */
16227 A_UINT32 tlv_header;
16228 A_UINT32 vdev_id;
16229 A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
16230} wmi_vdev_atf_request_fixed_param;
16231
16232typedef struct {
16233 /*
16234 * TLV tag and len; tag equals
16235 * WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param
16236 */
16237 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016238 /** pdev_id for identifying the MAC
16239 * See macros starting with WMI_PDEV_ID_ for values.
16240 */
16241 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053016242 /** parameter */
16243 A_UINT32 param;
16244} wmi_pdev_get_ani_cck_config_cmd_fixed_param;
16245
16246typedef struct {
16247 /*
16248 * TLV tag and len; tag equals
16249 * WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param
16250 */
16251 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016252 /** pdev_id for identifying the MAC
16253 * See macros starting with WMI_PDEV_ID_ for values.
16254 */
16255 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053016256 /** parameter */
16257 A_UINT32 param;
16258} wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
16259
16260typedef struct {
16261 /*
16262 * TLV tag and len; tag equals
16263 * WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param
16264 */
16265 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016266 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053016267 A_UINT32 qb_enable;
16268 wmi_mac_addr peer_macaddr;
16269} WMI_QBOOST_CFG_CMD_fixed_param;
16270
16271#define WMI_INST_STATS_INVALID_RSSI 0
16272
16273typedef struct {
16274 /*
16275 * TLV tag and len; tag equals
16276 * WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param
16277 */
16278 A_UINT32 tlv_header;
16279 A_UINT32 iRSSI; /* dBm above the noise floor */
16280 /* peer MAC address */
16281 wmi_mac_addr peer_macaddr;
Govind Singh869c9872016-02-22 18:36:34 +053016282 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053016283} wmi_inst_rssi_stats_resp_fixed_param;
16284
16285typedef struct {
16286 /*
16287 * TLV tag and len; tag equals
16288 * WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info
16289 */
16290 A_UINT32 tlv_header;
16291 A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
16292} wmi_peer_cck_ofdm_rate_info;
16293
16294typedef struct {
16295 /*
16296 * TLV tag and len; tag equals
16297 * WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info
16298 */
16299 A_UINT32 tlv_header;
16300 A_UINT32 ratecode_20; /* Rate code for 20MHz BW */
16301 A_UINT32 ratecode_40; /* Rate code for 40MHz BW */
16302 A_UINT32 ratecode_80; /* Rate code for 80MHz BW */
16303} wmi_peer_mcs_rate_info;
16304
16305typedef struct {
16306 /*
16307 * TLV tag and len; tag equals
16308 * WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param
16309 */
16310 A_UINT32 tlv_header;
16311 wmi_mac_addr peer_macaddr;
16312 A_UINT32 ratecount; /* Max Rate count for each mode */
Govind Singh869c9872016-02-22 18:36:34 +053016313 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053016314 /*
16315 * Following this structure are the TLV
16316 * struct wmi_peer_cck_ofdm_rate_info;
16317 * struct wmi_peer_mcs_rate_info;
16318 */
16319} wmi_peer_ratecode_list_event_fixed_param;
16320
16321typedef struct wmi_wds_addr_event {
16322 /*
16323 * TLV tag and len; tag equals
16324 * WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param
16325 */
16326 A_UINT32 tlv_header;
16327 A_UINT32 event_type[4];
16328 wmi_mac_addr peer_mac;
16329 wmi_mac_addr dest_mac;
Govind Singh869c9872016-02-22 18:36:34 +053016330 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053016331} wmi_wds_addr_event_fixed_param;
16332
16333typedef struct {
16334 /*
16335 * TLV tag and len; tag equals
16336 * WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param
16337 */
16338 A_UINT32 tlv_header;
16339 wmi_mac_addr peer_macaddr;
16340 A_UINT32 peer_ps_state;
16341} wmi_peer_sta_ps_statechange_event_fixed_param;
16342
16343/* WMI_PDEV_FIPS_EVENTID */
16344typedef struct {
16345 /*
16346 * TLV tag and len; tag equals
16347 * WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param
16348 */
16349 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053016350 union {
16351 /* OBSOLETE - will be removed once all refs are gone */
16352 A_UINT32 mac_id;
16353 /** pdev_id for identifying the MAC
16354 * See macros starting with WMI_PDEV_ID_ for values.
16355 */
16356 A_UINT32 pdev_id;
16357 };
Govind Singhc7d51942016-02-01 12:09:31 +053016358 /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
16359 A_UINT32 error_status;
16360 A_UINT32 data_len; /* Data length */
16361 /*
16362 * Following this structure is the TLV:
16363 * A_UINT32 data[1]; // Out Data (keep this in the end)
16364 */
16365} wmi_pdev_fips_event_fixed_param;
16366
16367typedef struct {
16368 /*
16369 * TLV tag and len; tag equals
16370 * WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param
16371 */
16372 A_UINT32 tlv_header;
16373 A_UINT32 mac_id; /* MAC ID */
16374 /* Noise threshold iterations with high values */
16375 A_UINT32 noise_floor_report_iter;
16376 /* Total noise threshold iterations */
16377 A_UINT32 noise_floor_total_iter;
16378} wmi_pdev_channel_hopping_event_fixed_param;
16379
16380enum {
16381 WMI_PDEV_RESERVE_AST_ENTRY_OK,
16382 WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
16383 WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
16384};
16385
16386typedef struct {
16387 /*
16388 * TLV tag and len; tag equals
16389 * WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param
16390 */
16391 A_UINT32 tlv_header;
16392 A_UINT32 mac_id; /* MAC ID */
16393 A_UINT32 rate_flags;
16394 /**
16395 * FLAG_ONE_CHAIN 0x001 - one chain mask
16396 * FLAG_TWO_CHAIN 0x005 - two chain mask
16397 * FLAG_THREE_CHAIN 0x007 - three chain mask
16398 * FLAG_FOUR_CHAIN 0x00F - four chain mask
16399 * FLAG_STBC 0x010 - STBC is set
16400 * FLAG_40MHZ 0x020
16401 * FLAG_80MHZ 0x040
16402 * FLAG_160MHZ 0x080
16403 * FLAG_TXBF 0x0100 - Tx Bf enabled
16404 * FLAG_RTSENA 0x0200 - RTS enabled
16405 * FLAG_CTSENA 0x0400 - CTS enabled
16406 * FLAG_LDPC 0x0800 - LDPC set
16407 * FLAG_SERIES1 0x1000 -
16408 * FLAG_SGI 0x2000 - Short gaurd interval
16409 * FLAG_MU2 0x4000 - MU2 data
16410 * FLAG_MU3 0x8000 - MU3 data
16411 * */
16412 A_UINT32 nss;
16413 /**
16414 * NSS 0x0 - 0x3
16415 * */
16416 A_UINT32 preamble;
16417 /**
16418 * PREAM_OFDM - 0x0
16419 * PREAM_CCK - 0x1
16420 * PREAM_HT - 0x2
16421 * PREAM_VHT - 0x3
16422 * */
16423 A_UINT32 hw_rate;
16424 /**
16425 * *** HW_OFDM_RATE ***
16426 * OFDM_48_MBPS - 0x0
16427 * OFDM_24_MBPS - 0x1
16428 * OFDM_12_MBPS - 0x2
16429 * OFDM_6_MBPS - 0x3
16430 * OFDM_54_MBPS - 0x4
16431 * OFDM_36_MBPS - 0x5
16432 * OFDM_18_MBPS - 0x6
16433 * OFDM_9_MBPS - 0x7
16434 *
16435 * *** HW_CCK_RATE ***
16436 * CCK_11_LONG_MBPS - 0x0
16437 * CCK_5_5_LONG_MBPS - 0x1
16438 * CCK_2_LONG_MBPS - 0x2
16439 * CCK_1_LONG_MBPS - 0x3
16440 * CCK_11_SHORT_MBPS - 0x4
16441 * CCK_5_5_SHORT_MBPS - 0x5
16442 * CCK_2_SHORT_MBPS - 0x6
16443 *
16444 * *** HW_HT / VHT_RATE ***
16445 * MCS 0x0 - 0x9
16446 * */
16447} wmi_pdev_get_tpc_cmd_fixed_param;
16448
16449typedef struct {
Anurag Chouhane326c922016-08-04 18:43:19 +053016450 A_UINT32 tlv_header; /* TLV tag and len; tag equals
16451 WMITLV_TAG_STRUC_wmi_pdev_get_chip_power_stats_cmd_fixed_param */
16452 /**
16453 * pdev_id for identifying the MAC See macros
16454 * starting with WMI_PDEV_ID_ for values.
16455 */
16456 A_UINT32 pdev_id;
16457} wmi_pdev_get_chip_power_stats_cmd_fixed_param;
16458
16459
16460typedef struct {
Govind Singhc7d51942016-02-01 12:09:31 +053016461 /*
16462 * TLV tag and len; tag equals
16463 * WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param
16464 */
16465 A_UINT32 tlv_header;
16466 A_UINT32 reserved0; /* for future need */
16467 /*
16468 * Following this structure is the TLV:
16469 * A_UINT32 tpc[1];
16470 */
16471} wmi_pdev_tpc_event_fixed_param;
16472
16473typedef struct {
16474 /*
16475 * TLV tag and len; tag equals
16476 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param
16477 */
16478 A_UINT32 tlv_header;
16479 A_UINT32 mac_id; /* MAC ID */
16480 A_UINT32 nfdBr_len;
16481 A_UINT32 nfdBm_len;
16482 A_UINT32 freqNum_len;
16483 /*
16484 * Following this structure is the TLV:
16485 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
16486 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
16487 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
16488 */
16489} wmi_pdev_nfcal_power_all_channels_event_fixed_param;
16490
16491typedef struct {
16492 /*
16493 * TLV tag and len; tag equals
16494 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr
16495 */
16496 A_UINT32 tlv_header;
16497 A_UINT32 nfdBr;
16498} wmi_pdev_nfcal_power_all_channels_nfdBr;
16499
16500typedef struct {
16501 /*
16502 * TLV tag and len; tag equals
16503 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm
16504 */
16505 A_UINT32 tlv_header;
16506 A_UINT32 nfdBm;
16507} wmi_pdev_nfcal_power_all_channels_nfdBm;
16508
16509typedef struct {
16510 /*
16511 * TLV tag and len; tag equals
16512 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum
16513 */
16514 A_UINT32 tlv_header;
16515 A_UINT32 freqNum;
16516} wmi_pdev_nfcal_power_all_channels_freqNum;
16517
16518typedef struct {
16519 /*
16520 * TLV tag and len; tag equals
16521 * WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param
16522 */
16523 A_UINT32 tlv_header;
16524 A_UINT32 cck_level;
16525} wmi_ani_cck_event_fixed_param;
16526
Anurag Chouhane326c922016-08-04 18:43:19 +053016527typedef enum wmi_power_debug_reg_fmt_type {
16528 /* WMI_POWER_DEBUG_REG_FMT_TYPE_ROME -> Dumps following 12 Registers
16529 * SOC_SYSTEM_SLEEP
16530 * WLAN_SYSTEM_SLEEP
16531 * RTC_SYNC_FORCE_WAKE
16532 * MAC_DMA_ISR
16533 * MAC_DMA_TXRX_ISR
16534 * MAC_DMA_ISR_S1
16535 * MAC_DMA_ISR_S2
16536 * MAC_DMA_ISR_S3
16537 * MAC_DMA_ISR_S4
16538 * MAC_DMA_ISR_S5
16539 * MAC_DMA_ISR_S6
16540 * MAC_DMA_ISR_S7
16541 */
16542 WMI_POWER_DEBUG_REG_FMT_TYPE_ROME,
16543 WMI_POWER_DEBUG_REG_FMT_TYPE_MAX = 0xf,
16544} WMI_POWER_DEBUG_REG_FMT_TYPE;
16545
16546typedef struct {
16547 A_UINT32 tlv_header; /* TLV tag and len; tag equals
16548 WMITLV_TAG_STRUC_wmi_chip_power_stats_event_fixed_param */
16549 /*
16550 * maximum range is 35 hours, due to conversion from internal
16551 * 0.03215 ms units to ms
16552 */
16553 A_UINT32 cumulative_sleep_time_ms;
16554 /*
16555 * maximum range is 35 hours, due to conversion from internal
16556 * 0.03215 ms units to ms
16557 */
16558 A_UINT32 cumulative_total_on_time_ms;
16559 /* count of number of times chip enterred deep sleep */
16560 A_UINT32 deep_sleep_enter_counter;
16561 /* Last Timestamp when Chip went to deep sleep */
16562 A_UINT32 last_deep_sleep_enter_tstamp_ms;
16563 /*
16564 * WMI_POWER_DEBUG_REG_FMT_TYPE enum, describes debug registers
16565 * being dumped as part of the event
16566 */
16567 A_UINT32 debug_register_fmt;
16568 /* number of debug registers being sent to host */
16569 A_UINT32 num_debug_register;
16570 /*
16571 * Following this structure is the TLV:
16572 * A_UINT32 debug_registers[num_debug_registers];
16573 */
16574} wmi_pdev_chip_power_stats_event_fixed_param;
16575
16576
Govind Singhc7d51942016-02-01 12:09:31 +053016577typedef struct {
16578 /*
16579 * TLV tag and len; tag equals
16580 * WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param
16581 */
16582 A_UINT32 tlv_header;
16583 A_UINT32 ofdm_level;
16584} wmi_ani_ofdm_event_fixed_param;
16585
Sreelakshmi Konamki02a4d7c2016-04-14 17:46:54 +053016586typedef enum wmi_coex_config_type {
16587 /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */
16588 WMI_COEX_CONFIG_PAGE_P2P_TDM = 1,
16589 /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */
16590 WMI_COEX_CONFIG_PAGE_STA_TDM = 2,
16591 /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */
16592 WMI_COEX_CONFIG_PAGE_SAP_TDM = 3,
Himanshu Agarwal800d58d2016-05-13 21:22:19 +053016593 /* config during WLAN connection */
16594 WMI_COEX_CONFIG_DURING_WLAN_CONN = 4,
16595 /* config to enable/disable BTC */
16596 WMI_COEX_CONFIG_BTC_ENABLE = 5,
Sreelakshmi Konamki02a4d7c2016-04-14 17:46:54 +053016597} WMI_COEX_CONFIG_TYPE;
16598
16599typedef struct {
16600 A_UINT32 tlv_header;
16601 A_UINT32 vdev_id;
16602 /* wmi_coex_config_type enum */
16603 A_UINT32 config_type;
16604 A_UINT32 config_arg1;
16605 A_UINT32 config_arg2;
16606} WMI_COEX_CONFIG_CMD_fixed_param;
16607
Sandeep Puligillaff55fec2016-03-09 12:54:23 -080016608/**
16609 * This command is sent from WLAN host driver to firmware to
16610 * request firmware to enable/disable channel avoidance report
16611 * to host.
16612 */
16613enum {
16614 WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0,
16615 WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1
16616};
16617
16618typedef struct {
16619 /*
16620 * TLV tag and len; tag equals
16621 * WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param
16622 */
16623 A_UINT32 tlv_header;
16624 /* Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */
16625 A_UINT32 rpt_allow;
16626} WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param;
16627
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +053016628/*
16629 * Periodic channel stats WMI command structure
16630 * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID
16631 */
16632typedef struct {
16633 /*
16634 * TLV tag and len; tag equals
16635 * WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param
16636 */
16637 A_UINT32 tlv_header;
16638 /** 1 = enable, 0 = disable */
16639 A_UINT32 enable;
16640 /** periodic stats duration (units are milliseconds) */
16641 A_UINT32 stats_period;
16642} wmi_set_periodic_channel_stats_config_fixed_param;
16643
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +053016644typedef struct {
16645 /*
16646 * TLV tag and len; tag equals
16647 * WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param
16648 */
16649 A_UINT32 tlv_header;
16650 /*
16651 * pdev_id for identifying the MAC
16652 * See macros starting with WMI_PDEV_ID_ for values.
16653 */
16654 A_UINT32 pdev_id;
16655 /* Identify the wlan module */
16656 A_UINT32 module_id;
16657 /* Num of elements in the following args[] array */
16658 A_UINT32 num_args;
16659/**
16660 * Following this structure are the TLVs:
16661 * A_UINT32 args[];
16662 **/
16663} wmi_pdev_wal_power_debug_cmd_fixed_param;
16664
Nitesh Shah5de1cf82016-06-29 20:13:17 +053016665typedef struct {
16666 /*
16667 * TLV tag and len; tag equals
16668 * WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param
16669 */
16670 A_UINT32 tlv_header;
16671 /**
16672 * @brief rx_timeout_pri - what rx reorder timeout (ms) to use
16673 * for the AC
16674 * @details
16675 * Each WMM access category (voice, video, best-effort,
16676 * background) will have its own timeout value to dictate
16677 * how long to wait for missing rx MPDUs to arrive before
16678 * releasing subsequent MPDUs that have already been
16679 * received.
16680 * This parameter specifies the timeout in milliseconds
16681 * for each access category.
16682 * The array elements are indexed by the WMI_AC enum to
16683 * identify which array element corresponds to which AC /
16684 * traffic type.
16685 */
16686 A_UINT32 rx_timeout_pri[WMI_AC_MAX];
16687} wmi_pdev_set_reorder_timeout_val_cmd_fixed_param;
16688
Manjeet Singh27aa9c12016-08-24 15:38:42 +053016689/**
16690 * wlan stats shall be understood as per period.
16691 * Generally, it is reported periodically based on the period specified by host.
16692 * But if the variation of one stats of compared to the
16693 * pervious notification exceeds a threshold,
16694 * FW will report the wlan stats immediately.
16695 * The values of the stats becomes the new reference to compute variations.
16696 * This threshold can be a global setting or per category.
16697 * Host can enable/disable the mechanism for any stats per bitmap.
16698 * TX/RX thresholds (percentage value) are shared across ACs,
16699 * and TX/RX stats comprisons are processed per AC of each peer.
16700 * For example, if bit 0 (stand for tx_mpdus) of tx_thresh_bitmap is set to 1,
16701 * and the detailed tx_mpdus threshold value is set to 10%,
16702 * suppose tx_mpdus value of BE of peer 0 is 100 in first period,
16703 * and it reaches 110 during the second period,
16704 * FW will generate and send out a wlan stats event immediately.
16705 */
16706typedef struct {
16707 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_stats_threshold_cmd_fixed_param */
16708 /** Indicate if threshold mechnism is enabled or disabled.
16709 * It is disabled by default.
16710 * Host can enable and disable it dynamically.
16711 */
16712 A_UINT32 enable_thresh;
16713 /** use_thresh_bitmap equals 0 means gbl_thresh is used.
16714 * when use_thresh_bitmap equals 1, ignore gbl_thresh and use stats bitmap indicated thresholds.
16715 */
16716 A_UINT32 use_thresh_bitmap;
16717 /** global threshold, valid when use_thresh_bitmap equals 0.
16718 * It takes effect for all counters.
16719 * If use_thresh_bitmap ==0 && gbl_thresh == 0, disable threshold mechanism.
16720 */
16721 A_UINT32 gbl_thresh;
16722 /** Enable/disable bitmap for threshold mechanism of CCA stats */
16723 A_UINT32 cca_thresh_bitmap;
16724 /** Enable/disable bitmap for threshold mechanism of signal stats */
16725 A_UINT32 signal_thresh_bitmap;
16726 /** Enable/disable bitmap for threshold mechanism of TX stats */
16727 A_UINT32 tx_thresh_bitmap;
16728 /** Enable/disable bitmap for threshold mechanism of RX stats */
16729 A_UINT32 rx_thresh_bitmap;
16730 /* This TLV is followed by TLVs below:
16731 * wmi_chan_cca_stats_thresh cca_thresh;
16732 * wmi_peer_signal_stats_thresh signal_thresh;
16733 * wmi_tx_stats_thresh tx_thresh;
16734 * wmi_rx_stats_thresh rx_thresh;
16735 */
16736} wmi_pdev_set_stats_threshold_cmd_fixed_param;
16737
16738typedef enum {
16739 WMI_REQUEST_WLAN_TX_STAT = 0x01,
16740 WMI_REQUEST_WLAN_RX_STAT = 0x02,
16741 WMI_REQUEST_WLAN_CCA_STAT = 0x04,
16742 WMI_REQUEST_WLAN_SIGNAL_STAT = 0x08,
16743} wmi_wlan_stats_id;
16744
16745typedef struct {
16746 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlan_stats_cmd_fixed_param */
16747 wmi_wlan_stats_id stats_id;
16748} wmi_request_wlan_stats_cmd_fixed_param;
16749
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053016750typedef enum {
16751 WLAN_2G_CAPABILITY = 0x1,
16752 WLAN_5G_CAPABILITY = 0x2,
16753} WLAN_BAND_CAPABILITY;
16754
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053016755typedef enum wmi_hw_mode_config_type {
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053016756 /* Only one PHY is active. */
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053016757 WMI_HW_MODE_SINGLE = 0,
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053016758 /**
16759 * Both PHYs are active in different bands, one in 2G
16760 * and another in 5G.
16761 */
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053016762 WMI_HW_MODE_DBS = 1,
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053016763 /**
16764 * Both PHYs are in passive mode (only rx) in same band;
16765 * no tx allowed.
16766 */
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053016767 WMI_HW_MODE_SBS_PASSIVE = 2,
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053016768 /**
16769 * Both PHYs are active in the same band.
16770 * Support for both PHYs within one band is planned for 5G only
16771 * (as indicated in WMI_MAC_PHY_CAPABILITIES),
16772 * but could be extended to other bands in the future.
16773 * The separation of the band between the two PHYs needs to be
16774 * communicated separately.
16775 */
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053016776 WMI_HW_MODE_SBS = 3,
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053016777 /**
16778 * 3 PHYs, with 2 on the same band doing SBS
16779 * as in WMI_HW_MODE_SBS, and 3rd on the other band
16780 */
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053016781 WMI_HW_MODE_DBS_SBS = 4,
16782} WMI_HW_MODE_CONFIG_TYPE;
16783
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053016784#define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1)
16785#define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
16786
16787#define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1)
16788#define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
16789
16790#define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1)
16791#define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
16792
16793#define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1)
16794#define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
16795
16796#define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1)
16797#define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
16798
16799#define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1)
16800#define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
16801
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053016802#define WMI_MAX_MUBFEE_GET(flags) WMI_GET_BITS(flags, 28, 4)
16803#define WMI_MAX_MUBFEE_SET(flags, value) WMI_SET_BITS(flags, 28, 4, value)
16804
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053016805typedef struct {
16806 /*
16807 * TLV tag and len; tag equals
16808 * WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES
16809 */
16810 A_UINT32 tlv_header;
16811 /*
16812 * hw_mode_id - identify a particular set of HW characteristics, as
16813 * specified by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element
16814 * must be mapped to its parent WMI_HW_MODE_CAPABILITIES element using
16815 * hw_mode_id. No particular ordering of WMI_MAC_PHY_CAPABILITIES
16816 * elements should be assumed, though in practice the elements may
16817 * always be ordered by hw_mode_id
16818 */
16819 A_UINT32 hw_mode_id;
16820 /*
16821 * pdev_id starts with 1. pdev_id 1 => phy_id 0,
16822 * pdev_id 2 => phy_id 1
16823 */
16824 A_UINT32 pdev_id;
16825 /* phy id. Starts with 0 */
16826 A_UINT32 phy_id;
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053016827 /* supported modulations and number of MU beamformees */
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053016828 union {
Himanshu Agarwale93c55e2016-05-20 12:18:15 +053016829 struct {
16830 A_UINT32 supports_11b:1,
16831 supports_11g:1,
16832 supports_11a:1,
16833 supports_11n:1,
16834 supports_11ac:1,
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053016835 supports_11ax:1,
16836
16837 unused:22,
16838
16839 /* max MU beamformees supported per MAC */
16840 max_mubfee:4;
Himanshu Agarwale93c55e2016-05-20 12:18:15 +053016841 };
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053016842 A_UINT32 supported_flags;
16843 };
16844 /* supported bands, enum WLAN_BAND_CAPABILITY */
16845 A_UINT32 supported_bands;
16846 /*
16847 * ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us,
16848 * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us
16849 */
16850 A_UINT32 ampdu_density;
16851 /* max bw supported 2G, enum wmi_channel_width */
16852 A_UINT32 max_bw_supported_2G;
16853 /* WMI HT Capability, WMI_HT_CAP defines */
16854 A_UINT32 ht_cap_info_2G;
16855 /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
16856 A_UINT32 vht_cap_info_2G;
16857 /*
16858 * VHT Supported MCS Set field Rx/Tx same
16859 * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as
16860 * follows
16861 * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
16862 * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
16863 * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
16864 * - 3 indicates that n spatial streams is not supported
16865 */
16866 A_UINT32 vht_supp_mcs_2G;
16867 /* HE capability info field of 802.11ax, WMI_HE_CAP defines */
16868 A_UINT32 he_cap_info_2G;
16869 /* HE Supported MCS Set field Rx/Tx same */
16870 A_UINT32 he_supp_mcs_2G;
16871 /* Valid Transmit chain mask */
16872 A_UINT32 tx_chain_mask_2G;
16873 /* Valid Receive chain mask */
16874 A_UINT32 rx_chain_mask_2G;
16875 /* max bw supported 5G, enum wmi_channel_width */
16876 A_UINT32 max_bw_supported_5G;
16877 /* WMI HT Capability, WMI_HT_CAP defines */
16878 A_UINT32 ht_cap_info_5G;
16879 /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
16880 A_UINT32 vht_cap_info_5G;
16881 /*
16882 * VHT Supported MCS Set field Rx/Tx same
16883 * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as
16884 * follows
16885 * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
16886 * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
16887 * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
16888 * - 3 indicates that n spatial streams is not supported
16889 */
16890 A_UINT32 vht_supp_mcs_5G;
16891 /* HE capability info field of 802.11ax, WMI_HE_CAP defines */
16892 A_UINT32 he_cap_info_5G;
16893 /* HE Supported MCS Set field Rx/Tx same */
16894 A_UINT32 he_supp_mcs_5G;
16895 /* Valid Transmit chain mask */
16896 A_UINT32 tx_chain_mask_5G;
16897 /* Valid Receive chain mask */
16898 A_UINT32 rx_chain_mask_5G;
16899} WMI_MAC_PHY_CAPABILITIES;
16900
16901typedef struct {
16902 /*
16903 * TLV tag and len; tag equal
16904 * WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES
16905 */
16906 A_UINT32 tlv_header;
16907 /*
16908 * hw_mode_id - identify a particular set of HW characteristics,
16909 * as specified by the subsequent fields
16910 */
16911 A_UINT32 hw_mode_id;
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053016912 /**
16913 * BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on.
16914 * Number of bits set in phy_id_map represents number of
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053016915 * WMI_MAC_PHY_CAPABILITIES TLV's
16916 * one for each active PHY for current HW mode
16917 * identified by hw_mode_id. For example for
16918 * DBS/SBS mode there will be 2
16919 * WMI_MAC_PHY_CAPABILITIES TLVs and for
16920 * single MAC modes it
16921 * will be 1 WMI_MAC_PHY_CAPABILITIES
16922 * TLVs
16923 */
Himanshu Agarwal9a8f2f92016-09-01 19:04:46 +053016924 A_UINT32 phy_id_map;
Himanshu Agarwal2f4f5302016-09-01 18:56:42 +053016925 /**
16926 * hw_mode_config_type
16927 * Identify a particular type of HW mode such as SBS, DBS etc.
16928 * Refer to WMI_HW_MODE_CONFIG_TYPE values.
16929 */
16930 A_UINT32 hw_mode_config_type;
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053016931} WMI_HW_MODE_CAPABILITIES;
16932
16933typedef struct {
16934 /*
16935 * TLV tag and len; tag equals
16936 * WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS
16937 */
16938 A_UINT32 tlv_header;
16939 /* num HW modes */
16940 A_UINT32 num_hw_modes;
16941 /* num_hw_modes WMI_HW_MODE_CAPABILITIES TLV's */
16942} WMI_SOC_MAC_PHY_HW_MODE_CAPS;
16943
16944/*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/
16945typedef struct {
16946 /*
16947 * TLV tag and len; tag equals
16948 * WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT
16949 */
16950 A_UINT32 tlv_header;
16951 /* phy id */
16952 A_UINT32 phy_id;
16953 /* regdomain value specified in EEPROM */
16954 A_UINT32 eeprom_reg_domain;
16955 /* regdomain */
16956 A_UINT32 eeprom_reg_domain_ext;
16957 /*
16958 * CAP1 capabilities bit map, see REGDMN_CAP1_
16959 * defines
16960 */
16961 A_UINT32 regcap1;
16962 /*
16963 * REGDMN EEPROM CAP, see
16964 * REGDMN_EEPROM_EEREGCAP_ defines
16965 */
16966 A_UINT32 regcap2;
16967 /* REGDMN MODE, see REGDMN_MODE_ enum */
16968 A_UINT32 wireless_modes;
16969 A_UINT32 low_2ghz_chan;
16970 A_UINT32 high_2ghz_chan;
16971 A_UINT32 low_5ghz_chan;
16972 A_UINT32 high_5ghz_chan;
16973} WMI_HAL_REG_CAPABILITIES_EXT;
16974
16975typedef struct {
16976 /*
16977 * TLV tag and len; tag equals
16978 * WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES
16979 */
16980 A_UINT32 tlv_header;
16981 /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */
16982 A_UINT32 num_phy;
16983} WMI_SOC_HAL_REG_CAPABILITIES;
16984
Anurag Chouhanb3fa7a12016-04-18 17:26:49 +053016985typedef struct {
16986 /*
16987 * TLV tag and len; tag equals
16988 * WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv
16989 */
16990 A_UINT32 tlv_header;
16991 /*
16992 * global default adaptive dwell mode,
16993 * used when WMI_SCAN_DWELL_MODE_DEFAULT
16994 */
16995 A_UINT32 default_adaptive_dwell_mode;
16996 /*
16997 * the weight to calculate the average low pass filter for
16998 * channel congestion. 0-100
16999 */
17000 A_UINT32 adapative_lpf_weight;
17001 /* interval to monitor passive scan in msec */
17002 A_UINT32 passive_monitor_interval_ms;
17003 /* % of wifi activity to switch from passive to active 0-100 */
17004 A_UINT32 wifi_activity_threshold_pct;
17005} wmi_scan_adaptive_dwell_parameters_tlv;
17006
17007typedef struct {
17008 /*
17009 * TLV tag and len; tag equals
17010 * WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_config_fixed_param
17011 */
17012 A_UINT32 tlv_header;
17013 /* globally enable/disable adaptive dwell */
17014 A_UINT32 enable;
17015 /*
17016 * followed by TLV (tag length value) parameters array
17017 * The TLV's are:
17018 * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements)
17019 */
17020} wmi_scan_adaptive_dwell_config_fixed_param;
17021
Manjeet Singh158307d2016-08-24 15:23:58 +053017022typedef struct {
17023 /** TLV tag and len; tag equals
17024 * WMITLV_TAG_STRUC_wmi_coex_get_antenna_isolation_cmd_fixed_param */
17025 A_UINT32 tlv_header;
17026 /* Currently there are no parameters for this message. */
17027} wmi_coex_get_antenna_isolation_cmd_fixed_param;
17028
17029typedef struct {
17030 /** TLV tag and len; tag equals
17031 * WMITLV_TAG_STRUC_wmi_coex_report_isolation_event_fixed_param */
17032 A_UINT32 tlv_header;
17033 /** 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.
17034 * Currently the HW descriptor only supports 4 chains at most.
17035 * Further isolation_chainX elements can be added in the future
17036 * for additional chains, if needed.
17037 */
17038 A_UINT32 isolation_chain0:8, /* [7:0], isolation value for chain 0 */
17039 isolation_chain1:8, /* [15:8], isolation value for chain 1 */
17040 isolation_chain2:8, /* [23:16], isolation value for chain 2 */
17041 isolation_chain3:8; /* [31:24], isolation value for chain 3 */
17042} wmi_coex_report_isolation_event_fixed_param;
17043
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080017044/* ADD NEW DEFS HERE */
17045
17046/*****************************************************************************
17047 * The following structures are deprecated. DO NOT USE THEM!
17048 */
17049
17050/** Max number of channels in the schedule. */
17051#define OCB_CHANNEL_MAX (5)
17052
17053/* NOTE: Make sure these data structures are identical to those 9235
17054* defined in sirApi.h */
17055
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053017056typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080017057 /** Arbitration Inter-Frame Spacing. Range: 2-15 */
17058 A_UINT32 aifsn;
17059 /** Contention Window minimum. Range: 1 - 10 */
17060 A_UINT32 cwmin;
17061 /** Contention Window maximum. Range: 1 - 10 */
17062 A_UINT32 cwmax;
17063} wmi_qos_params_t;
17064
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053017065typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080017066 /** Channel frequency in MHz */
17067 A_UINT32 chan_freq;
17068 /** Channel duration in ms */
17069 A_UINT32 duration;
17070 /** Start guard interval in ms */
17071 A_UINT32 start_guard_interval;
17072 /** End guard interval in ms */
17073 A_UINT32 end_guard_interval;
17074 /** Transmit power in dBm, range 0 - 23 */
17075 A_UINT32 tx_power;
17076 /** Transmit datarate in Mbps */
17077 A_UINT32 tx_rate;
17078 /** QoS parameters for each AC */
17079 wmi_qos_params_t qos_params[WLAN_MAX_AC];
17080 /** 1 to enable RX stats for this channel, 0 otherwise */
17081 A_UINT32 rx_stats;
17082} wmi_ocb_channel_t;
17083
17084typedef struct {
17085 /** TLV tag and len; tag equals
17086 * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
17087 A_UINT32 tlv_header;
17088 /* VDEV identifier */
17089 A_UINT32 vdev_id;
17090 /** Number of valid channels in the channels array */
17091 A_UINT32 num_channels;
17092 /** The array of channels */
17093 wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
17094 /** 1 to allow off-channel tx, 0 otherwise */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053017095 A_UINT32 off_channel_tx; /* Not supported */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080017096} wmi_ocb_set_sched_cmd_fixed_param;
17097
17098typedef struct {
17099 /** Return status. 0 for success, non-zero otherwise */
17100 A_UINT32 status;
17101} wmi_ocb_set_sched_event_fixed_param;
17102
17103/**
17104* END DEPRECATED
17105*/
17106#ifdef __cplusplus
17107}
17108#endif
17109#endif /*_WMI_UNIFIED_H_*/
17110/**@}*/