blob: 96dd6227f4b8c1cb1b631b558ea040db7b557767 [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 Agarwal86319542016-05-24 09:00:39 +053080#define 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
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +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
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +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 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800238} WMI_GRP_ID;
239
240#define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
241#define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
242
243/**
244 * Command IDs and commange events
245 */
246typedef enum {
247 /** initialize the wlan sub system */
248 WMI_INIT_CMDID = 0x1,
249
250 /* Scan specific commands */
251
252 /** start scan request to FW */
253 WMI_START_SCAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SCAN),
254 /** stop scan request to FW */
255 WMI_STOP_SCAN_CMDID,
256 /** full list of channels as defined by the regulatory that will be used by scanner */
257 WMI_SCAN_CHAN_LIST_CMDID,
258 /** overwrite default priority table in scan scheduler */
259 WMI_SCAN_SCH_PRIO_TBL_CMDID,
260 /** This command to adjust the priority and min.max_rest_time
261 * of an on ongoing scan request.
262 */
263 WMI_SCAN_UPDATE_REQUEST_CMDID,
264
265 /** set OUI to be used in probe request if enabled */
266 WMI_SCAN_PROB_REQ_OUI_CMDID,
Anurag Chouhanb3fa7a12016-04-18 17:26:49 +0530267 /** config adaptive dwell scan */
268 WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800269
270 /* PDEV(physical device) specific commands */
271 /** set regulatorty ctl id used by FW to determine the exact ctl power limits */
272 WMI_PDEV_SET_REGDOMAIN_CMDID =
273 WMI_CMD_GRP_START_ID(WMI_GRP_PDEV),
274 /** set channel. mainly used for supporting monitor mode */
275 WMI_PDEV_SET_CHANNEL_CMDID,
276 /** set pdev specific parameters */
277 WMI_PDEV_SET_PARAM_CMDID,
278 /** enable packet log */
279 WMI_PDEV_PKTLOG_ENABLE_CMDID,
280 /** disable packet log*/
281 WMI_PDEV_PKTLOG_DISABLE_CMDID,
282 /** set wmm parameters */
283 WMI_PDEV_SET_WMM_PARAMS_CMDID,
284 /** set HT cap ie that needs to be carried probe requests HT/VHT channels */
285 WMI_PDEV_SET_HT_CAP_IE_CMDID,
286 /** set VHT cap ie that needs to be carried on probe requests on VHT channels */
287 WMI_PDEV_SET_VHT_CAP_IE_CMDID,
288
289 /** Command to send the DSCP-to-TID map to the target */
290 WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
291 /** set quiet ie parameters. primarily used in AP mode */
292 WMI_PDEV_SET_QUIET_MODE_CMDID,
293 /** Enable/Disable Green AP Power Save */
294 WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
295 /** get TPC config for the current operating channel */
296 WMI_PDEV_GET_TPC_CONFIG_CMDID,
297
298 /** set the base MAC address for the physical device before a VDEV is created.
299 * For firmware that doesn't support this feature and this command, the pdev
300 * MAC address will not be changed. */
301 WMI_PDEV_SET_BASE_MACADDR_CMDID,
302
303 /* eeprom content dump , the same to bdboard data */
304 WMI_PDEV_DUMP_CMDID,
305 /* set LED configuration */
306 WMI_PDEV_SET_LED_CONFIG_CMDID,
307 /* Get Current temprature of chip in Celcius degree */
308 WMI_PDEV_GET_TEMPERATURE_CMDID,
309 /* Set LED flashing behavior */
310 WMI_PDEV_SET_LED_FLASHING_CMDID,
Govind Singhc7d51942016-02-01 12:09:31 +0530311 /** Enable/Disable Smart Antenna */
312 WMI_PDEV_SMART_ANT_ENABLE_CMDID,
313 /** Set Smart Antenna RX antenna*/
314 WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
315 /** Override the antenna switch table */
316 WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
317 /** Override the CTL table */
318 WMI_PDEV_SET_CTL_TABLE_CMDID,
319 /** Override the array gain table */
320 WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID,
321 /** FIPS test mode command */
322 WMI_PDEV_FIPS_CMDID,
323 /** get CCK ANI level */
324 WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID,
325 /** get OFDM ANI level */
326 WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID,
327 /** NF Cal Power dBr/dBm */
328 WMI_PDEV_GET_NFCAL_POWER_CMDID,
329 /** TxPPDU TPC */
330 WMI_PDEV_GET_TPC_CMDID,
Govind Singh45ef44a2016-02-01 17:45:22 +0530331 /* Set to enable MIB stats collection */
332 WMI_MIB_STATS_ENABLE_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800333
Govind Singh869c9872016-02-22 18:36:34 +0530334 /** Set preferred channel list for DBS Mgr */
335 WMI_PDEV_SET_PCL_CMDID,
336 /** Set HW mode. Eg: single MAC, DBS & SBS,
337 * see soc_hw_mode_t for values
338 */
339 WMI_PDEV_SET_HW_MODE_CMDID,
340 /** Set DFS, SCAN modes and other FW configurations */
341 WMI_PDEV_SET_MAC_CONFIG_CMDID,
342 /** Set per band and per pdev antenna chains */
343 WMI_PDEV_SET_ANTENNA_MODE_CMDID,
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +0530344 /** Periodic channel stats request command */
345 WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID,
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +0530346 /** WMI command for power debug framework */
347 WMI_PDEV_WAL_POWER_DEBUG_CMDID,
Govind Singh869c9872016-02-22 18:36:34 +0530348
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800349 /* VDEV(virtual device) specific commands */
350 /** vdev create */
351 WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VDEV),
352 /** vdev delete */
353 WMI_VDEV_DELETE_CMDID,
354 /** vdev start request */
355 WMI_VDEV_START_REQUEST_CMDID,
356 /** vdev restart request (RX only, NO TX, used for CAC period)*/
357 WMI_VDEV_RESTART_REQUEST_CMDID,
358 /** vdev up request */
359 WMI_VDEV_UP_CMDID,
360 /** vdev stop request */
361 WMI_VDEV_STOP_CMDID,
362 /** vdev down request */
363 WMI_VDEV_DOWN_CMDID,
364 /* set a vdev param */
365 WMI_VDEV_SET_PARAM_CMDID,
366 /* set a key (used for setting per peer unicast and per vdev multicast) */
367 WMI_VDEV_INSTALL_KEY_CMDID,
368
369 /* wnm sleep mode command */
370 WMI_VDEV_WNM_SLEEPMODE_CMDID,
371 WMI_VDEV_WMM_ADDTS_CMDID,
372 WMI_VDEV_WMM_DELTS_CMDID,
373 WMI_VDEV_SET_WMM_PARAMS_CMDID,
374 WMI_VDEV_SET_GTX_PARAMS_CMDID,
375 WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID,
376
377 WMI_VDEV_PLMREQ_START_CMDID,
378 WMI_VDEV_PLMREQ_STOP_CMDID,
379 /* TSF timestamp action for specified vdev */
380 WMI_VDEV_TSF_TSTAMP_ACTION_CMDID,
381 /*
Govind Singh86180292016-02-01 14:03:37 +0530382 * set the additional IEs in probe requests for scan or
383 * assoc req etc for frames FW locally generates
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800384 */
385 WMI_VDEV_SET_IE_CMDID,
386
Govind Singhc7d51942016-02-01 12:09:31 +0530387 WMI_VDEV_RATEMASK_CMDID,
388 /** ATF VDEV REQUEST commands. */
389 WMI_VDEV_ATF_REQUEST_CMDID,
390 /** Command to send the DSCP-to-TID map to the target for VAP */
391 WMI_VDEV_SET_DSCP_TID_MAP_CMDID,
392 /*
393 * Configure filter for Neighbor Rx Pkt
394 * (smart mesh selective listening)
395 */
396 WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID,
Govind Singh869c9872016-02-22 18:36:34 +0530397 /** set quiet ie parameters. primarily used in AP mode */
398 WMI_VDEV_SET_QUIET_MODE_CMDID,
Krishna Kumaar Natarajanea0a7962016-04-16 14:09:09 +0530399 /** To set custom aggregation size for per vdev */
400 WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID,
Govind Singh869c9872016-02-22 18:36:34 +0530401
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800402 /* peer specific commands */
403
404 /** create a peer */
405 WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER),
406 /** delete a peer */
407 WMI_PEER_DELETE_CMDID,
408 /** flush specific tid queues of a peer */
409 WMI_PEER_FLUSH_TIDS_CMDID,
410 /** set a parameter of a peer */
411 WMI_PEER_SET_PARAM_CMDID,
412 /** set peer to associated state. will cary all parameters determined during assocication time */
413 WMI_PEER_ASSOC_CMDID,
414 /**add a wds (4 address ) entry. used only for testing WDS feature on AP products */
415 WMI_PEER_ADD_WDS_ENTRY_CMDID,
416 /**remove wds (4 address ) entry. used only for testing WDS feature on AP products */
417 WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
418 /** set up mcast group infor for multicast to unicast conversion */
419 WMI_PEER_MCAST_GROUP_CMDID,
420 /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */
421 WMI_PEER_INFO_REQ_CMDID,
422
423 /** request the estimated link speed for the peer. FW shall respond with
424 * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID.
425 */
426 WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID,
427 /*
428 * Set the conditions to report peer justified rate to driver
429 * The justified rate means the the user-rate is justified by PER.
430 */
431 WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID,
Govind Singhc7d51942016-02-01 12:09:31 +0530432 /** update a wds (4 address) entry */
433 WMI_PEER_UPDATE_WDS_ENTRY_CMDID,
434 /** add a proxy sta entry */
435 WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID,
436 /** Set Smart Antenna TX antenna */
437 WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
438 /** Set Smart Antenna TX train info */
439 WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
440 /** Set SA node config options */
441 WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
442 /** ATF PEER REQUEST commands */
443 WMI_PEER_ATF_REQUEST_CMDID,
Himanshu Agarwal134b7362016-05-13 20:30:12 +0530444 /** bandwidth fairness (BWF) peer configuration request command */
445 WMI_PEER_BWF_REQUEST_CMDID,
Govind Singhc7d51942016-02-01 12:09:31 +0530446
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800447 /* beacon/management specific commands */
448
449 /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */
450 WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT),
451 /** transmit beacon by value */
452 WMI_PDEV_SEND_BCN_CMDID,
453 /** set the beacon template. used in beacon offload mode to setup the
454 * the common beacon template with the FW to be used by FW to generate beacons */
455 WMI_BCN_TMPL_CMDID,
456 /** set beacon filter with FW */
457 WMI_BCN_FILTER_RX_CMDID,
458 /* enable/disable filtering of probe requests in the firmware */
459 WMI_PRB_REQ_FILTER_RX_CMDID,
460 /** transmit management frame by value. will be deprecated */
461 WMI_MGMT_TX_CMDID,
462 /** set the probe response template. used in beacon offload mode to setup the
463 * the common probe response template with the FW to be used by FW to generate
464 * probe responses */
465 WMI_PRB_TMPL_CMDID,
466 /** Transmit Mgmt frame by reference */
467 WMI_MGMT_TX_SEND_CMDID,
468
469 /** commands to directly control ba negotiation directly from host. only used in test mode */
470
471 /** turn off FW Auto addba mode and let host control addba */
472 WMI_ADDBA_CLEAR_RESP_CMDID =
473 WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG),
474 /** send add ba request */
475 WMI_ADDBA_SEND_CMDID,
476 WMI_ADDBA_STATUS_CMDID,
477 /** send del ba */
478 WMI_DELBA_SEND_CMDID,
479 /** set add ba response will be used by FW to generate addba response*/
480 WMI_ADDBA_SET_RESP_CMDID,
481 /** send single VHT MPDU with AMSDU */
482 WMI_SEND_SINGLEAMSDU_CMDID,
483
484 /** Station power save specific config */
485 /** enable/disable station powersave */
486 WMI_STA_POWERSAVE_MODE_CMDID =
487 WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS),
488 /** set station power save specific parameter */
489 WMI_STA_POWERSAVE_PARAM_CMDID,
490 /** set station mimo powersave mode */
491 WMI_STA_MIMO_PS_MODE_CMDID,
492
493 /** DFS-specific commands */
494 /** enable DFS (radar detection)*/
495 WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS),
496 /** disable DFS (radar detection)*/
497 WMI_PDEV_DFS_DISABLE_CMDID,
498 /** enable DFS phyerr/parse filter offload */
499 WMI_DFS_PHYERR_FILTER_ENA_CMDID,
500 /** enable DFS phyerr/parse filter offload */
501 WMI_DFS_PHYERR_FILTER_DIS_CMDID,
502
503 /* Roaming specific commands */
504 /** set roam scan mode */
505 WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM),
506 /** set roam scan rssi threshold below which roam scan is enabled */
507 WMI_ROAM_SCAN_RSSI_THRESHOLD,
508 /** set roam scan period for periodic roam scan mode */
509 WMI_ROAM_SCAN_PERIOD,
510 /** set roam scan trigger rssi change threshold */
511 WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
512 /** set roam AP profile */
513 WMI_ROAM_AP_PROFILE,
514 /** set channel list for roam scans */
515 WMI_ROAM_CHAN_LIST,
516 /** Stop scan command */
517 WMI_ROAM_SCAN_CMD,
518 /** roaming sme offload sync complete */
519 WMI_ROAM_SYNCH_COMPLETE,
520 /** set ric request element for 11r roaming */
521 WMI_ROAM_SET_RIC_REQUEST_CMDID,
522 /** Invoke roaming forcefully */
523 WMI_ROAM_INVOKE_CMDID,
524 /** roaming filter cmd to allow further filtering of roaming candidate */
525 WMI_ROAM_FILTER_CMDID,
526 /** set gateway ip, mac and retries for subnet change detection */
527 WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID,
528 /** configure thresholds for MAWC */
529 WMI_ROAM_CONFIGURE_MAWC_CMDID,
Govind Singh86180292016-02-01 14:03:37 +0530530 /** configure MultiBand Operation(refer WFA MBO spec) parameter */
531 WMI_ROAM_SET_MBO_PARAM_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800532
533 /** offload scan specific commands */
534 /** set offload scan AP profile */
535 WMI_OFL_SCAN_ADD_AP_PROFILE =
536 WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN),
537 /** remove offload scan AP profile */
538 WMI_OFL_SCAN_REMOVE_AP_PROFILE,
539 /** set offload scan period */
540 WMI_OFL_SCAN_PERIOD,
541
542 /* P2P specific commands */
543 /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response
544 * generated during p2p listen and for p2p discoverability */
545 WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P),
546 /** enable/disable p2p discoverability on STA/AP VDEVs */
547 WMI_P2P_DEV_SET_DISCOVERABILITY,
548 /** set p2p ie to be carried in beacons generated by FW for GO */
549 WMI_P2P_GO_SET_BEACON_IE,
550 /** set p2p ie to be carried in probe response frames generated by FW for GO */
551 WMI_P2P_GO_SET_PROBE_RESP_IE,
552 /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA
553 * attribute in the beacons/probe responses received.
554 */
555 WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
556 /** set the configure of p2p find offload */
557 WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID,
558 /** set the vendor specific p2p ie data for p2p find offload using */
559 WMI_P2P_DISC_OFFLOAD_APPIE_CMDID,
560 /** set the BSSID/device name pattern of p2p find offload */
561 WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID,
562 /** set OppPS related parameters **/
563 WMI_P2P_SET_OPPPS_PARAM_CMDID,
564
565 /** AP power save specific config */
566 /** set AP power save specific param */
567 WMI_AP_PS_PEER_PARAM_CMDID =
568 WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS),
569 /** set AP UAPSD coex pecific param */
570 WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
571
572 /** set Enhanced Green AP param */
573 WMI_AP_PS_EGAP_PARAM_CMDID,
574
575 /** Rate-control specific commands */
576 WMI_PEER_RATE_RETRY_SCHED_CMDID =
577 WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL),
578
579 /** WLAN Profiling commands. */
580 WMI_WLAN_PROFILE_TRIGGER_CMDID =
581 WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE),
582 WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
583 WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
584 WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
585 WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
586
587 /** Suspend resume command Ids */
588 WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND),
589 WMI_PDEV_RESUME_CMDID,
590
591 /* Beacon filter commands */
592 /** add a beacon filter */
593 WMI_ADD_BCN_FILTER_CMDID =
594 WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER),
595 /** remove a beacon filter */
596 WMI_RMV_BCN_FILTER_CMDID,
597
598 /* WOW Specific WMI commands */
599 /** add pattern for awake */
600 WMI_WOW_ADD_WAKE_PATTERN_CMDID =
601 WMI_CMD_GRP_START_ID(WMI_GRP_WOW),
602 /** deleta a wake pattern */
603 WMI_WOW_DEL_WAKE_PATTERN_CMDID,
604 /** enable/deisable wake event */
605 WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
606 /** enable WOW */
607 WMI_WOW_ENABLE_CMDID,
608 /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */
609 WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
610 /* IOAC add keep alive cmd. */
611 WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID,
612 /* IOAC del keep alive cmd. */
613 WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID,
614 /* IOAC add pattern for awake */
615 WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID,
616 /* IOAC deleta a wake pattern */
617 WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID,
618 /* D0-WOW enable or disable cmd */
619 WMI_D0_WOW_ENABLE_DISABLE_CMDID,
620 /* enable extend WoW */
621 WMI_EXTWOW_ENABLE_CMDID,
622 /* Extend WoW command to configure app type1 parameter */
623 WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID,
624 /* Extend WoW command to configure app type2 parameter */
625 WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID,
626 /* enable ICMPv6 Network advertisement filtering */
627 WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID,
628 /*
629 * Set a pattern to match UDP packet in WOW mode.
630 * If match, construct a tx frame in a local buffer
631 * to send through the peer AP to the entity in the
632 * IP network that sent the UDP packet to this STA.
633 */
634 WMI_WOW_UDP_SVC_OFLD_CMDID,
635
636 /* configure WOW host wakeup PIN pattern */
637 WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID,
638
Anurag Chouhan86eab9b2016-04-21 16:22:47 +0530639 /* Set which action category should wake the host from suspend */
640 WMI_WOW_SET_ACTION_WAKE_UP_CMDID,
641
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800642 /* RTT measurement related cmd */
643 /** request to make an RTT measurement */
644 WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT),
645 /** request to report a tsf measurement */
646 WMI_RTT_TSF_CMDID,
647
648 /** spectral scan command */
649 /** configure spectral scan */
650 WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID =
651 WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL),
652 /** enable/disable spectral scan and trigger */
653 WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
654
655 /* F/W stats */
656 /** one time request for stats */
657 WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS),
658 /** Push MCC Adaptive Scheduler Stats to Firmware */
659 WMI_MCC_SCHED_TRAFFIC_STATS_CMDID,
660 /** one time request for txrx stats */
661 WMI_REQUEST_STATS_EXT_CMDID,
662
663 /* Link Layer stats */
664 /** Request for link layer stats */
665 WMI_REQUEST_LINK_STATS_CMDID,
666 /** Request for setting params to link layer stats */
667 WMI_START_LINK_STATS_CMDID,
668 /** Request to clear stats*/
669 WMI_CLEAR_LINK_STATS_CMDID,
670
671 /** Request for getting the Firmware Memory Dump */
672 WMI_GET_FW_MEM_DUMP_CMDID,
673
674 /** Request to flush of the buffered debug messages */
675 WMI_DEBUG_MESG_FLUSH_CMDID,
676
677 /** Cmd to configure the verbose level */
678 WMI_DIAG_EVENT_LOG_CONFIG_CMDID,
679
680 /** ARP OFFLOAD REQUEST*/
681 WMI_SET_ARP_NS_OFFLOAD_CMDID =
682 WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
683
684 /** Proactive ARP Response Add Pattern Command*/
685 WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID,
686
687 /** Proactive ARP Response Del Pattern Command*/
688 WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID,
689
690 /** NS offload config*/
691 WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID =
692 WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL),
693
694 /** APFIND Config */
695 WMI_APFIND_CMDID,
696
697 /** Passpoint list config */
698 WMI_PASSPOINT_LIST_CONFIG_CMDID,
699
700 /** configure supprssing parameters for MAWC */
701 WMI_NLO_CONFIGURE_MAWC_CMDID,
702
703 /* GTK offload Specific WMI commands */
704 WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL),
705
706 /* CSA offload Specific WMI commands */
707 /** csa offload enable */
708 WMI_CSA_OFFLOAD_ENABLE_CMDID =
709 WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL),
710 /** chan switch command */
711 WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
712
713 /* Chatter commands */
714 /* Change chatter mode of operation */
715 WMI_CHATTER_SET_MODE_CMDID =
716 WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER),
717 /** chatter add coalescing filter command */
718 WMI_CHATTER_ADD_COALESCING_FILTER_CMDID,
719 /** chatter delete coalescing filter command */
720 WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID,
721 /** chatter coalecing query command */
722 WMI_CHATTER_COALESCING_QUERY_CMDID,
723
724 /**addba specific commands */
725 /** start the aggregation on this TID */
726 WMI_PEER_TID_ADDBA_CMDID =
727 WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA),
728 /** stop the aggregation on this TID */
729 WMI_PEER_TID_DELBA_CMDID,
730
731 /** set station mimo powersave method */
732 WMI_STA_DTIM_PS_METHOD_CMDID,
733 /** Configure the Station UAPSD AC Auto Trigger Parameters */
734 WMI_STA_UAPSD_AUTO_TRIG_CMDID,
735 /** Configure the Keep Alive Parameters */
736 WMI_STA_KEEPALIVE_CMDID,
737
738 /* Request ssn from target for a sta/tid pair */
739 WMI_BA_REQ_SSN_CMDID,
740 /* misc command group */
741 /** echo command mainly used for testing */
742 WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC),
743
744 /* !!IMPORTANT!!
745 * If you need to add a new WMI command to the WMI_GRP_MISC sub-group,
746 * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID,
747 * as we MUST have a fixed value here to maintain compatibility between
748 * UTF and the ART2 driver
749 */
750 /** UTF WMI commands */
751 WMI_PDEV_UTF_CMDID,
752
753 /** set debug log config */
754 WMI_DBGLOG_CFG_CMDID,
755 /* QVIT specific command id */
756 WMI_PDEV_QVIT_CMDID,
757 /* Factory Testing Mode request command
758 * used for integrated chipsets */
759 WMI_PDEV_FTM_INTG_CMDID,
760 /* set and get keepalive parameters command */
761 WMI_VDEV_SET_KEEPALIVE_CMDID,
762 WMI_VDEV_GET_KEEPALIVE_CMDID,
763 /* For fw recovery test command */
764 WMI_FORCE_FW_HANG_CMDID,
765 /* Set Mcast/Bdcast filter */
766 WMI_SET_MCASTBCAST_FILTER_CMDID,
767 /** set thermal management params **/
768 WMI_THERMAL_MGMT_CMDID,
769 /** set host auto shutdown params **/
770 WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID,
771 /** set tpc chainmask config command */
772 WMI_TPC_CHAINMASK_CONFIG_CMDID,
773 /** set Antenna diversity command */
774 WMI_SET_ANTENNA_DIVERSITY_CMDID,
775 /** Set OCB Sched Request, deprecated */
776 WMI_OCB_SET_SCHED_CMDID,
777 /* Set rssi monitoring config command */
778 WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID,
779 /* Enable/disable Large Receive Offload processing;
780 * provide cfg params */
781 WMI_LRO_CONFIG_CMDID,
Nirav Shahbf6450f2015-11-05 11:47:20 +0530782 /*transfer data from host to firmware to write flash */
783 WMI_TRANSFER_DATA_TO_FLASH_CMDID,
Sreelakshmi Konamki58f4d622016-04-14 18:03:21 +0530784 /** Command to enable/disable filtering of multicast IP with unicast mac */
785 WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID,
Anurag Chouhan05d05fe2016-04-18 17:09:24 +0530786 /** Command to control WISA mode */
787 WMI_VDEV_WISA_CMDID,
Himanshu Agarwalb0497b52016-05-13 21:03:37 +0530788 /** set debug log time stamp sync up with host */
789 WMI_DBGLOG_TIME_STAMP_SYNC_CMDID,
Anurag Chouhan05d05fe2016-04-18 17:09:24 +0530790
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800791 /* GPIO Configuration */
792 WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
793 WMI_GPIO_OUTPUT_CMDID,
794
795 /* Txbf configuration command */
796 WMI_TXBF_CMDID,
797
798 /* FWTEST Commands */
799 WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID =
800 WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
801 /** set NoA descs **/
802 WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
803 /* UNIT Tests */
804 WMI_UNIT_TEST_CMDID,
Govind Singhc7d51942016-02-01 12:09:31 +0530805 /* set debug and tuning parameters */
806 WMI_FWTEST_CMDID,
807 /* Q-Boost configuration test commands */
808 WMI_QBOOST_CFG_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800809
810 /** TDLS Configuration */
811 /** enable/disable TDLS */
812 WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS),
813 /** set tdls peer state */
814 WMI_TDLS_PEER_UPDATE_CMDID,
815 /** TDLS Offchannel control */
816 WMI_TDLS_SET_OFFCHAN_MODE_CMDID,
817
818 /** Resmgr Configuration */
819 /** Adaptive OCS is enabled by default in the FW. This command is used to
820 * disable FW based adaptive OCS.
821 */
822 WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID =
823 WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR),
824 /** set the requested channel time quota for the home channels */
825 WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID,
826 /** set the requested latency for the home channels */
827 WMI_RESMGR_SET_CHAN_LATENCY_CMDID,
828
829 /** STA SMPS Configuration */
830 /** force SMPS mode */
831 WMI_STA_SMPS_FORCE_MODE_CMDID =
832 WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS),
833 /** set SMPS parameters */
834 WMI_STA_SMPS_PARAM_CMDID,
835
836 /* Wlan HB commands */
837 /* enalbe/disable wlan HB */
838 WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB),
839 /* set tcp parameters for wlan HB */
840 WMI_HB_SET_TCP_PARAMS_CMDID,
841 /* set tcp pkt filter for wlan HB */
842 WMI_HB_SET_TCP_PKT_FILTER_CMDID,
843 /* set udp parameters for wlan HB */
844 WMI_HB_SET_UDP_PARAMS_CMDID,
845 /* set udp pkt filter for wlan HB */
846 WMI_HB_SET_UDP_PKT_FILTER_CMDID,
847
848 /** Wlan RMC commands*/
849 /** enable/disable RMC */
850 WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC),
851 /** configure action frame period */
852 WMI_RMC_SET_ACTION_PERIOD_CMDID,
853 /** For debug/future enhancement purposes only,
854 * configures/finetunes RMC algorithms */
855 WMI_RMC_CONFIG_CMDID,
856
857 /** WLAN MHF offload commands */
858 /** enable/disable MHF offload */
859 WMI_MHF_OFFLOAD_SET_MODE_CMDID =
860 WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL),
861 /** Plumb routing table for MHF offload */
862 WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID,
863
864 /*location scan commands */
865 /*start batch scan */
866 WMI_BATCH_SCAN_ENABLE_CMDID =
867 WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
868 /*stop batch scan */
869 WMI_BATCH_SCAN_DISABLE_CMDID,
870 /*get batch scan result */
871 WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID,
872 /* OEM related cmd */
Manikandan Mohan05ac7ee2015-12-23 14:18:36 -0800873 WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM),
874 WMI_OEM_REQUEST_CMDID, /* UNUSED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800875
876 /** Nan Request */
877 WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN),
878
879 /** Modem power state command */
880 WMI_MODEM_POWER_STATE_CMDID =
881 WMI_CMD_GRP_START_ID(WMI_GRP_COEX),
882 WMI_CHAN_AVOID_UPDATE_CMDID,
Sreelakshmi Konamki02a4d7c2016-04-14 17:46:54 +0530883 WMI_COEX_CONFIG_CMDID,
Sandeep Puligillaff55fec2016-03-09 12:54:23 -0800884 WMI_CHAN_AVOID_RPT_ALLOW_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800885
886 /**
887 * OBSS scan offload enable/disable commands
888 * OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true:
889 * 1. WMI_SERVICE_OBSS_SCAN is reported by FW in service ready,
890 * 2. STA connect to a 2.4Ghz ht20/ht40 AP,
891 * 3. AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response)
892 * If OBSS parameters from beacon changed, also use enable CMD to update parameters.
893 * OBSS scan disable CMD will send to FW if have enabled when tearing down connection.
894 */
895 WMI_OBSS_SCAN_ENABLE_CMDID =
896 WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL),
897 WMI_OBSS_SCAN_DISABLE_CMDID,
898
899 /**LPI commands*/
900 /**LPI mgmt snooping config command*/
901 WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID =
902 WMI_CMD_GRP_START_ID(WMI_GRP_LPI),
903 /**LPI scan start command*/
904 WMI_LPI_START_SCAN_CMDID,
905 /**LPI scan stop command*/
906 WMI_LPI_STOP_SCAN_CMDID,
907
908 /** ExtScan commands */
909 WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN),
910 WMI_EXTSCAN_STOP_CMDID,
911 WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID,
912 WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID,
913 WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID,
914 WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID,
915 WMI_EXTSCAN_SET_CAPABILITIES_CMDID,
916 WMI_EXTSCAN_GET_CAPABILITIES_CMDID,
917 WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID,
918 WMI_EXTSCAN_CONFIGURE_MAWC_CMDID,
919
920 /** DHCP server offload commands */
921 WMI_SET_DHCP_SERVER_OFFLOAD_CMDID =
922 WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL),
923
924 /** IPA Offload features related commands */
925 WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID =
926 WMI_CMD_GRP_START_ID(WMI_GRP_IPA),
927
928 /** mDNS responder offload commands */
929 WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL),
930 WMI_MDNS_SET_FQDN_CMDID,
931 WMI_MDNS_SET_RESPONSE_CMDID,
932 WMI_MDNS_GET_STATS_CMDID,
933
934 /* enable/disable AP Authentication offload */
935 WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL),
936 WMI_SAP_SET_BLACKLIST_PARAM_CMDID,
937
938 /** Out-of-context-of-BSS (OCB) commands */
939 WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB),
940 WMI_OCB_SET_UTC_TIME_CMDID,
941 WMI_OCB_START_TIMING_ADVERT_CMDID,
942 WMI_OCB_STOP_TIMING_ADVERT_CMDID,
943 WMI_OCB_GET_TSF_TIMER_CMDID,
944 WMI_DCC_GET_STATS_CMDID,
945 WMI_DCC_CLEAR_STATS_CMDID,
946 WMI_DCC_UPDATE_NDL_CMDID,
947 /* System-On-Chip commands */
948 WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
949 WMI_SOC_SET_HW_MODE_CMDID,
950 WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID,
951 WMI_SOC_SET_ANTENNA_MODE_CMDID,
952
953 /* packet filter commands */
954 WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER),
955 WMI_PACKET_FILTER_ENABLE_CMDID,
956 /** Motion Aided WiFi Connectivity (MAWC) commands */
957 WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC),
958
959 /** WMI commands related to PMF 11w Offload */
960 WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID =
961 WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD),
962
Manikandan Mohan130eb572015-12-23 13:53:34 -0800963 /** WMI commands related to pkt filter (BPF) offload */
964 WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
965 WMI_BPF_GET_VDEV_STATS_CMDID,
966 WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
967 WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
Govind Singh941bd5e2016-02-04 17:15:25 +0530968 /**
969 * Nan Data commands
970 * NDI - NAN Data Interface
971 * NDP - NAN Data Path
972 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +0530973 /* Commands in prototyping phase */
974 WMI_NDI_GET_CAP_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROTOTYPE),
Govind Singh941bd5e2016-02-04 17:15:25 +0530975 WMI_NDP_INITIATOR_REQ_CMDID,
976 WMI_NDP_RESPONDER_REQ_CMDID,
977 WMI_NDP_END_REQ_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800978} WMI_CMD_ID;
979
980typedef enum {
981 /** WMI service is ready; after this event WMI messages can be sent/received */
982 WMI_SERVICE_READY_EVENTID = 0x1,
983 /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */
984 WMI_READY_EVENTID,
985
986 /** Scan specific events */
987 WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
988
989 /* PDEV specific events */
990 /** TPC config for the current operating channel */
991 WMI_PDEV_TPC_CONFIG_EVENTID =
992 WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
993 /** Channel stats event */
994 WMI_CHAN_INFO_EVENTID,
995
996 /** PHY Error specific WMI event */
997 WMI_PHYERR_EVENTID,
998
999 /** eeprom dump event */
1000 WMI_PDEV_DUMP_EVENTID,
1001
1002 /** traffic pause event */
1003 WMI_TX_PAUSE_EVENTID,
1004
1005 /** DFS radar event */
1006 WMI_DFS_RADAR_EVENTID,
1007
1008 /** track L1SS entry and residency event */
1009 WMI_PDEV_L1SS_TRACK_EVENTID,
1010
1011 /** Report current temprature of the chip in Celcius degree */
1012 WMI_PDEV_TEMPERATURE_EVENTID,
1013
1014 /* Extension of WMI_SERVICE_READY msg with
1015 * extra target capability info
1016 */
1017 WMI_SERVICE_READY_EXT_EVENTID,
1018
Govind Singhc7d51942016-02-01 12:09:31 +05301019 /** FIPS test mode event */
1020 WMI_PDEV_FIPS_EVENTID,
1021
1022 /** Channel hopping avoidance */
1023 WMI_PDEV_CHANNEL_HOPPING_EVENTID,
1024
1025 /** CCK ANI level event */
1026 WMI_PDEV_ANI_CCK_LEVEL_EVENTID,
1027
1028 /** OFDM ANI level event */
1029 WMI_PDEV_ANI_OFDM_LEVEL_EVENTID,
1030
1031 /** Tx PPDU params */
1032 WMI_PDEV_TPC_EVENTID,
1033
1034 /** NF Cal Power in DBR/DBM for all channels */
1035 WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
Govind Singh869c9872016-02-22 18:36:34 +05301036
1037 /** SOC/PDEV events */
1038 WMI_PDEV_SET_HW_MODE_RESP_EVENTID,
1039 WMI_PDEV_HW_MODE_TRANSITION_EVENTID,
1040 WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID,
1041
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001042 /* VDEV specific events */
1043 /** VDEV started event in response to VDEV_START request */
1044 WMI_VDEV_START_RESP_EVENTID =
1045 WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
1046 /** vdev stopped event , generated in response to VDEV_STOP request */
1047 WMI_VDEV_STOPPED_EVENTID,
1048 /* Indicate the set key (used for setting per
1049 * peer unicast and per vdev multicast)
1050 * operation has completed */
1051 WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
1052 /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please
1053 don't use this for any new implementations */
1054 /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario.
1055 This request is valid only for vdevs operating in soft AP or P2P GO mode */
1056 WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID,
1057
1058 /* Return the TSF timestamp of specified vdev */
1059 WMI_VDEV_TSF_REPORT_EVENTID,
Manikandan Mohan429a0782015-12-23 14:35:54 -08001060
1061 /* FW response to Host for vdev delete cmdid */
1062 WMI_VDEV_DELETE_RESP_EVENTID,
1063
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001064 /* peer specific events */
1065 /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
1066 WMI_PEER_STA_KICKOUT_EVENTID =
1067 WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
1068
1069 /** Peer Info Event with data_rate, rssi, tx_fail_cnt etc */
1070 WMI_PEER_INFO_EVENTID,
1071
1072 /** Event indicating that TX fail count reaching threshold */
1073 WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
1074 /** Return the estimate link speed for the Peer specified in the
1075 * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command.
1076 */
1077 WMI_PEER_ESTIMATED_LINKSPEED_EVENTID,
1078 /* Return the peer state
1079 * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE
1080 */
1081 WMI_PEER_STATE_EVENTID,
1082
1083 /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD.
1084 * After that, host will send Mx message.
1085 * Otherwise, host will pause any Mx(STA:M2/M4) message
1086 */
1087 WMI_PEER_ASSOC_CONF_EVENTID,
1088
Manikandan Mohan429a0782015-12-23 14:35:54 -08001089 /* FW response to Host for peer delete cmdid */
1090 WMI_PEER_DELETE_RESP_EVENTID,
1091
Govind Singhc7d51942016-02-01 12:09:31 +05301092 /** Valid rate code list for peer */
1093 WMI_PEER_RATECODE_LIST_EVENTID,
1094 WMI_WDS_PEER_EVENTID,
1095 WMI_PEER_STA_PS_STATECHG_EVENTID,
1096
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001097 /* beacon/mgmt specific events */
1098 /** RX management frame. the entire frame is carried along with the event. */
1099 WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
1100 /** software beacon alert event to Host requesting host to Queue a beacon for transmission
1101 use only in host beacon mode */
1102 WMI_HOST_SWBA_EVENTID,
1103 /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theritical value.
1104 tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in
1105 staggered beacon transmission mode */
1106 WMI_TBTTOFFSET_UPDATE_EVENTID,
1107
1108 /** event after the first beacon is transmitted following
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301109 a change in the template.*/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001110 WMI_OFFLOAD_BCN_TX_STATUS_EVENTID,
1111 /** event after the first probe response is transmitted following
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301112 a change in the template.*/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001113 WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID,
1114 /** Event for Mgmt TX completion event */
1115 WMI_MGMT_TX_COMPLETION_EVENTID,
1116
1117 /*ADDBA Related WMI Events */
1118 /** Indication the completion of the prior
1119 WMI_PEER_TID_DELBA_CMDID(initiator) */
1120 WMI_TX_DELBA_COMPLETE_EVENTID =
1121 WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
1122 /** Indication the completion of the prior
1123 *WMI_PEER_TID_ADDBA_CMDID(initiator) */
1124 WMI_TX_ADDBA_COMPLETE_EVENTID,
1125
1126 /* Seq num returned from hw for a sta/tid pair */
1127 WMI_BA_RSP_SSN_EVENTID,
1128
1129 /* Aggregation state requested by BTC */
1130 WMI_AGGR_STATE_TRIG_EVENTID,
1131
1132 /** Roam event to trigger roaming on host */
1133 WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
1134
1135 /** matching AP found from list of profiles */
1136 WMI_PROFILE_MATCH,
1137 /** roam synch event */
1138 WMI_ROAM_SYNCH_EVENTID,
1139
1140 /** P2P disc found */
1141 WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
1142
1143 /*send noa info to host when noa is changed for beacon tx offload enable */
1144 WMI_P2P_NOA_EVENTID,
1145
1146 /** Send EGAP Info to host */
1147 WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS),
1148
1149 /* send pdev resume event to host after pdev resume. */
1150 WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND),
1151
1152 /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID.
1153 will cary wake reason */
1154 WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
1155 WMI_D0_WOW_DISABLE_ACK_EVENTID,
1156 WMI_WOW_INITIAL_WAKEUP_EVENTID,
1157
1158 /*RTT related event ID */
1159 /** RTT measurement report */
1160 WMI_RTT_MEASUREMENT_REPORT_EVENTID =
1161 WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
1162 /** TSF measurement report */
1163 WMI_TSF_MEASUREMENT_REPORT_EVENTID,
1164 /** RTT error report */
1165 WMI_RTT_ERROR_REPORT_EVENTID,
1166 /*STATS specific events */
1167 /** txrx stats event requested by host */
1168 WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS),
1169 /** FW iface link stats Event */
1170 WMI_IFACE_LINK_STATS_EVENTID,
1171 /** FW iface peer link stats Event */
1172 WMI_PEER_LINK_STATS_EVENTID,
1173 /** FW Update radio stats Event */
1174 WMI_RADIO_LINK_STATS_EVENTID,
1175 /** Firmware memory dump Complete event*/
1176 WMI_UPDATE_FW_MEM_DUMP_EVENTID,
1177
1178 /** Event indicating the DIAG logs/events supported by FW */
1179 WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID,
1180
Anurag Chouhan90c1a182016-04-18 17:20:38 +05301181 /** Instantaneous RSSI event */
Govind Singhc7d51942016-02-01 12:09:31 +05301182 WMI_INST_RSSI_STATS_EVENTID,
1183
Anurag Chouhan90c1a182016-04-18 17:20:38 +05301184 /** FW update tx power levels event */
1185 WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID,
1186
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001187 /** NLO specific events */
1188 /** NLO match event after the first match */
1189 WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
1190
1191 /** NLO scan complete event */
1192 WMI_NLO_SCAN_COMPLETE_EVENTID,
1193
1194 /** APFIND specific events */
1195 WMI_APFIND_EVENTID,
1196
1197 /** passpoint network match event */
1198 WMI_PASSPOINT_MATCH_EVENTID,
1199
1200 /** GTK offload stautus event requested by host */
1201 WMI_GTK_OFFLOAD_STATUS_EVENTID =
1202 WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
1203
1204 /** GTK offload failed to rekey event */
1205 WMI_GTK_REKEY_FAIL_EVENTID,
1206 /* CSA IE received event */
1207 WMI_CSA_HANDLING_EVENTID =
1208 WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
1209
1210 /*chatter query reply event */
1211 WMI_CHATTER_PC_QUERY_EVENTID =
1212 WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER),
1213
1214 /** echo event in response to echo command */
1215 WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
1216
1217 /* !!IMPORTANT!!
1218 * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group,
1219 * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID,
1220 * as we MUST have a fixed value here to maintain compatibility between
1221 * UTF and the ART2 driver
1222 */
1223 /** UTF specific WMI event */
1224 WMI_PDEV_UTF_EVENTID,
1225
1226 /** event carries buffered debug messages */
1227 WMI_DEBUG_MESG_EVENTID,
1228 /** FW stats(periodic or on shot) */
1229 WMI_UPDATE_STATS_EVENTID,
1230 /** debug print message used for tracing FW code while debugging */
1231 WMI_DEBUG_PRINT_EVENTID,
1232 /** DCS wlan or non-wlan interference event
1233 */
1234 WMI_DCS_INTERFERENCE_EVENTID,
1235 /** VI spoecific event */
1236 WMI_PDEV_QVIT_EVENTID,
1237 /** FW code profile data in response to profile request */
1238 WMI_WLAN_PROFILE_DATA_EVENTID,
1239 /* Factory Testing Mode request event
1240 * used for integrated chipsets */
1241 WMI_PDEV_FTM_INTG_EVENTID,
1242 /* avoid list of frequencies .
1243 */
1244 WMI_WLAN_FREQ_AVOID_EVENTID,
1245 /* Indicate the keepalive parameters */
1246 WMI_VDEV_GET_KEEPALIVE_EVENTID,
1247 /* Thermal Management event */
1248 WMI_THERMAL_MGMT_EVENTID,
1249
1250 /* Container for QXDM/DIAG events */
1251 WMI_DIAG_DATA_CONTAINER_EVENTID,
1252
1253 /* host auto shutdown event */
1254 WMI_HOST_AUTO_SHUTDOWN_EVENTID,
1255
1256 /*update mib counters together with WMI_UPDATE_STATS_EVENTID */
1257 WMI_UPDATE_WHAL_MIB_STATS_EVENTID,
1258
1259 /*update ht/vht info based on vdev (rx and tx NSS and preamble) */
1260 WMI_UPDATE_VDEV_RATE_STATS_EVENTID,
1261
1262 WMI_DIAG_EVENTID,
1263
1264 /** Set OCB Sched Response, deprecated */
1265 WMI_OCB_SET_SCHED_EVENTID,
1266
1267 /* event to indicate the flush of the buffered debug messages is complete*/
1268 WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID,
1269 /* event to report mix/max RSSI breach events */
1270 WMI_RSSI_BREACH_EVENTID,
Nirav Shahbf6450f2015-11-05 11:47:20 +05301271 /* event to report completion of data storage into flash memory */
1272 WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001273
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -08001274 /** event to report SCPC calibrated data to host */
1275 WMI_PDEV_UTF_SCPC_EVENTID,
1276
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001277 /* GPIO Event */
1278 WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
1279 /** upload H_CV info WMI event
1280 * to indicate uploaded H_CV info to host
1281 */
1282 WMI_UPLOADH_EVENTID,
1283
1284 /** capture H info WMI event
1285 * to indicate captured H info to host
1286 */
1287 WMI_CAPTUREH_EVENTID,
1288 /* hw RFkill */
1289 WMI_RFKILL_STATE_CHANGE_EVENTID,
1290
1291 /* TDLS Event */
1292 WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
1293
Manikandan Mohan55c94d62015-12-04 13:47:58 -08001294 /* STA SMPS Event */
1295 /* force SMPS mode */
1296 WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID =
1297 WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS),
1298
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001299 /*location scan event */
1300 /*report the firmware's capability of batch scan */
1301 WMI_BATCH_SCAN_ENABLED_EVENTID =
1302 WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
1303 /*batch scan result */
1304 WMI_BATCH_SCAN_RESULT_EVENTID,
1305 /* OEM Event */
Krishna Kumaar Natarajan1dfa3532015-11-19 16:16:20 -08001306 WMI_OEM_CAPABILITY_EVENTID = /* DEPRECATED */
1307 WMI_EVT_GRP_START_ID(WMI_GRP_OEM),
1308 WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */
1309 WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */
1310 WMI_OEM_RESPONSE_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001311
1312 /* NAN Event */
1313 WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN),
Govind Singh941bd5e2016-02-04 17:15:25 +05301314 WMI_NAN_DISC_IFACE_CREATED_EVENTID,
1315 WMI_NAN_DISC_IFACE_DELETED_EVENTID,
1316 WMI_NAN_STARTED_CLUSTER_EVENTID,
1317 WMI_NAN_JOINED_CLUSTER_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001318
1319 /* LPI Event */
1320 WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI),
1321 WMI_LPI_STATUS_EVENTID,
1322 WMI_LPI_HANDOFF_EVENTID,
1323
1324 /* ExtScan events */
1325 WMI_EXTSCAN_START_STOP_EVENTID =
1326 WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN),
1327 WMI_EXTSCAN_OPERATION_EVENTID,
1328 WMI_EXTSCAN_TABLE_USAGE_EVENTID,
1329 WMI_EXTSCAN_CACHED_RESULTS_EVENTID,
1330 WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID,
1331 WMI_EXTSCAN_HOTLIST_MATCH_EVENTID,
1332 WMI_EXTSCAN_CAPABILITIES_EVENTID,
1333 WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID,
1334
1335 /* mDNS offload events */
1336 WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL),
1337
1338 /* SAP Authentication offload events */
1339 WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL),
1340 WMI_SAP_OFL_DEL_STA_EVENTID,
1341
1342 /** Out-of-context-of-bss (OCB) events */
1343 WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB),
1344 WMI_OCB_GET_TSF_TIMER_RESP_EVENTID,
1345 WMI_DCC_GET_STATS_RESP_EVENTID,
1346 WMI_DCC_UPDATE_NDL_RESP_EVENTID,
1347 WMI_DCC_STATS_EVENTID,
1348 /* System-On-Chip events */
1349 WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
1350 WMI_SOC_HW_MODE_TRANSITION_EVENTID,
1351 WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID,
1352 /** Motion Aided WiFi Connectivity (MAWC) events */
1353 WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC),
1354
Manikandan Mohan130eb572015-12-23 13:53:34 -08001355 /** pkt filter (BPF) offload relevant events */
Anurag Chouhan08f66c62016-04-18 17:14:51 +05301356 WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
Manikandan Mohan130eb572015-12-23 13:53:34 -08001357 WMI_BPF_VDEV_STATS_INFO_EVENTID,
Govind Singh941bd5e2016-02-04 17:15:25 +05301358
Anurag Chouhan08f66c62016-04-18 17:14:51 +05301359 /* Events in Prototyping phase */
1360 WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE),
Govind Singh941bd5e2016-02-04 17:15:25 +05301361 WMI_NDP_INITIATOR_RSP_EVENTID,
1362 WMI_NDP_RESPONDER_RSP_EVENTID,
1363 WMI_NDP_END_RSP_EVENTID,
1364 WMI_NDP_INDICATION_EVENTID,
1365 WMI_NDP_CONFIRM_EVENTID,
1366 WMI_NDP_END_INDICATION_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001367} WMI_EVT_ID;
1368
1369/* defines for OEM message sub-types */
1370#define WMI_OEM_CAPABILITY_REQ 0x01
1371#define WMI_OEM_CAPABILITY_RSP 0x02
1372#define WMI_OEM_MEASUREMENT_REQ 0x03
1373#define WMI_OEM_MEASUREMENT_RSP 0x04
1374#define WMI_OEM_ERROR_REPORT_RSP 0x05
1375#define WMI_OEM_NAN_MEAS_REQ 0x06
1376#define WMI_OEM_NAN_MEAS_RSP 0x07
1377#define WMI_OEM_NAN_PEER_INFO 0x08
1378#define WMI_OEM_CONFIGURE_LCR 0x09
1379#define WMI_OEM_CONFIGURE_LCI 0x0A
1380
1381/* below message subtype is internal to CLD. Target should
1382 * never use internal response type
1383 */
1384#define WMI_OEM_INTERNAL_RSP 0xdeadbeef
1385
Govind Singh941bd5e2016-02-04 17:15:25 +05301386#define WMI_CHAN_LIST_TAG 0x1
1387#define WMI_SSID_LIST_TAG 0x2
1388#define WMI_BSSID_LIST_TAG 0x3
1389#define WMI_IE_TAG 0x4
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001390
1391typedef struct {
1392 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
1393 /** primary 20 MHz channel frequency in mhz */
1394 A_UINT32 mhz;
1395 /** Center frequency 1 in MHz*/
1396 A_UINT32 band_center_freq1;
1397 /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
1398 A_UINT32 band_center_freq2;
1399 /** channel info described below */
1400 A_UINT32 info;
1401 /** contains min power, max power, reg power and reg class id. */
1402 A_UINT32 reg_info_1;
1403 /** contains antennamax */
1404 A_UINT32 reg_info_2;
1405} wmi_channel;
1406
1407typedef enum {
1408 WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
1409 WMI_CHANNEL_CHANGE_CAUSE_CSA,
1410} wmi_channel_change_cause;
1411
1412/** channel info consists of 6 bits of channel mode */
1413
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301414#define WMI_SET_CHANNEL_MODE(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001415 (pwmi_channel)->info &= 0xffffffc0; \
1416 (pwmi_channel)->info |= (val); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301417} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001418
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301419#define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001420
1421#define WMI_CHAN_FLAG_HT40_PLUS 6
1422#define WMI_CHAN_FLAG_PASSIVE 7
1423#define WMI_CHAN_ADHOC_ALLOWED 8
1424#define WMI_CHAN_AP_DISABLED 9
1425#define WMI_CHAN_FLAG_DFS 10
1426#define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */
1427#define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */
1428#define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */
1429#define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */
1430#define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */
Govind Singh32cced32016-02-01 13:33:09 +05301431/* Enable radar event reporting for sec80 in VHT80p80 */
1432#define WMI_CHAN_FLAG_DFS_CFREQ2 16
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001433
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301434#define WMI_SET_CHANNEL_FLAG(pwmi_channel, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001435 (pwmi_channel)->info |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301436} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001437
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301438#define WMI_GET_CHANNEL_FLAG(pwmi_channel, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001439 (((pwmi_channel)->info & (1 << flag)) >> flag)
1440
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301441#define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001442 (pwmi_channel)->reg_info_1 &= 0xffffff00; \
1443 (pwmi_channel)->reg_info_1 |= (val&0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301444} while (0)
1445#define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001446
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301447#define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001448 (pwmi_channel)->reg_info_1 &= 0xffff00ff; \
1449 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 8); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301450} while (0)
1451#define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001452
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301453#define WMI_SET_CHANNEL_REG_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001454 (pwmi_channel)->reg_info_1 &= 0xff00ffff; \
1455 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 16); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301456} while (0)
1457#define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
1458#define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001459 (pwmi_channel)->reg_info_1 &= 0x00ffffff; \
1460 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 24); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301461} while (0)
1462#define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001463
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301464#define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001465 (pwmi_channel)->reg_info_2 &= 0xffffff00; \
1466 (pwmi_channel)->reg_info_2 |= (val&0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301467} while (0)
1468#define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001469
1470/* max tx power is in 1 dBm units */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301471#define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001472 (pwmi_channel)->reg_info_2 &= 0xffff00ff; \
1473 (pwmi_channel)->reg_info_2 |= ((val&0xff)<<8); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301474} while (0)
1475#define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001476
1477
1478/** HT Capabilities*/
1479#define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
1480#define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
1481#define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
1482#define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
1483#define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
1484#define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
1485#define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
1486#define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
1487#define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
1488#define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
1489#define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
1490#define WMI_HT_CAP_HT40_SGI 0x0800
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301491#define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */
1492#define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001493
1494/* These macros should be used when we wish to advertise STBC support for
1495 * only 1SS or 2SS or 3SS. */
1496#define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
1497#define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
1498#define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
1499
1500#define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
1501 WMI_HT_CAP_HT20_SGI | \
1502 WMI_HT_CAP_HT40_SGI | \
1503 WMI_HT_CAP_TX_STBC | \
1504 WMI_HT_CAP_RX_STBC | \
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301505 WMI_HT_CAP_LDPC | \
1506 WMI_HT_CAP_TX_LDPC | \
1507 WMI_HT_CAP_RX_LDPC)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001508
1509/* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
1510 field. The fields not defined here are not supported, or reserved.
1511 Do not change these masks and if you have to add new one follow the
1512 bitmask as specified by 802.11ac draft.
1513 */
1514
1515#define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
1516#define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
1517#define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
1518#define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004
1519#define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008
1520#define WMI_VHT_CAP_RX_LDPC 0x00000010
1521#define WMI_VHT_CAP_SGI_80MHZ 0x00000020
1522#define WMI_VHT_CAP_SGI_160MHZ 0x00000040
1523#define WMI_VHT_CAP_TX_STBC 0x00000080
1524#define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
1525#define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
1526#define WMI_VHT_CAP_SU_BFORMER 0x00000800
1527#define WMI_VHT_CAP_SU_BFORMEE 0x00001000
1528#define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
1529#define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
1530#define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
1531#define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
1532#define WMI_VHT_CAP_MU_BFORMER 0x00080000
1533#define WMI_VHT_CAP_MU_BFORMEE 0x00100000
1534#define WMI_VHT_CAP_TXOP_PS 0x00200000
1535#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
1536#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
1537#define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
1538#define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301539#define WMI_VHT_CAP_TX_LDPC 0x40000000
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001540
1541/* TEMPORARY:
1542 * Preserve the incorrect old name as an alias for the correct new name
1543 * until all references to the old name have been removed from all hosts
1544 * and targets.
1545 */
1546#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
1547
1548/* These macros should be used when we wish to advertise STBC support for
1549 * only 1SS or 2SS or 3SS. */
1550#define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
1551#define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
1552#define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
1553
1554/* TEMPORARY:
1555 * Preserve the incorrect old name as an alias for the correct new name
1556 * until all references to the old name have been removed from all hosts
1557 * and targets.
1558 */
1559#define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
1560
1561#define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
1562 WMI_VHT_CAP_SGI_80MHZ | \
1563 WMI_VHT_CAP_TX_STBC | \
1564 WMI_VHT_CAP_RX_STBC_MASK | \
1565 WMI_VHT_CAP_RX_LDPC | \
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301566 WMI_VHT_CAP_TX_LDPC | \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001567 WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
1568 WMI_VHT_CAP_RX_FIXED_ANT | \
1569 WMI_VHT_CAP_TX_FIXED_ANT)
1570
1571/* Interested readers refer to Rx/Tx MCS Map definition as defined in
1572 802.11ac
1573 */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301574#define WMI_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001575#define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
1576#define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
1577
Govind Singhd24f5e42016-02-22 15:16:46 +05301578/** 11ax capabilities */
1579#define WMI_HE_CAP_PPE_PRESENT 0x00000001
1580#define WMI_HE_CAP_TWT_RESPONDER_SUPPORT 0x00000002
1581#define WMI_HE_CAP_TWT_REQUESTER_SUPPORT 0x00000004
1582#define WMI_HE_FRAG_SUPPORT_MASK 0x00000018
1583#define WMI_HE_FRAG_SUPPORT_SHIFT 3
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07001584
1585
1586/* fragmentation support field value */
1587enum {
1588 WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */
1589 /*
1590 * support for fragments within a VHT single MPDU,
1591 * no support for fragments within AMPDU
1592 */
1593 WMI_HE_FRAG_SUPPORT_LEVEL1,
1594 /* support for up to 1 fragment per MSDU within a single A-MPDU */
1595 WMI_HE_FRAG_SUPPORT_LEVEL2,
1596 /* support for multiple fragments per MSDU within an A-MPDU */
1597 WMI_HE_FRAG_SUPPORT_LEVEL3,
1598};
1599
1600
Govind Singhd24f5e42016-02-22 15:16:46 +05301601/** NOTE: This defs cannot be changed in the future without
1602 * breaking WMI compatibility
1603 */
1604#define WMI_MAX_NUM_SS 8
1605#define WMI_MAX_NUM_RU 4
1606
1607/*
1608 * Figure 8 554ae: -PPE Threshold Info field format
1609 * we pack PPET16 and PPT8 for four RU's in one element of array.
1610 *
1611 * ppet16_ppet8_ru3_ru0 array element 0 holds:
1612 * | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 |
1613 *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1|
1614 *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
1615 *
1616 * ppet16_ppet8_ru3_ru0 array element 1 holds:
1617 * | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 |
1618 *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1|
1619 *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
1620 *
1621 * etc.
1622 */
1623
1624/*
1625 * Note that in these macros, "ru" is one-based, not zero-based, while
1626 * nssm1 is zero-based.
1627 */
1628#define WMI_SET_PPET8(ppet16_ppet8_ru3_ru0, ppet, ru, nssm1) \
1629 do { \
1630 ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1)%4)*6)); \
1631 ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1)%4)*6)); \
1632 } while (0)
1633
1634#define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \
1635 ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1)%4)*6))&7)
1636
1637#define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ppet, ru, nssm1) \
1638 do { \
1639 ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1)%4)*6+3)); \
1640 ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1)%4)*6+3)); \
1641 } while (0)
1642
1643#define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \
1644 ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1)%4)*6+3))&7)
1645
1646typedef struct _wmi_ppe_threshold {
1647 A_UINT32 numss_m1; /** NSS - 1*/
1648 A_UINT32 ru_count; /** Max RU count */
1649 /** ppet8 and ppet16 for max num ss */
1650 A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS];
1651} wmi_ppe_threshold;
1652
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001653/* WMI_SYS_CAPS_* refer to the capabilities that system support
1654 */
1655#define WMI_SYS_CAP_ENABLE 0x00000001
1656#define WMI_SYS_CAP_TXPOWER 0x00000002
1657
1658/*
1659 * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
1660 * Bits 5:0 are reserved
1661 */
1662#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
1663#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
1664#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
1665#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
1666#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
1667#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
1668#define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7)
1669#define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
1670
1671#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
1672#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
1673#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
1674#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
1675#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
1676#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
1677#define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
1678#define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
1679
1680#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
1681 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
1682#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
1683 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
1684#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
1685 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
1686#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
1687 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
1688#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
1689 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
1690#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
1691 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
1692#define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \
1693 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
1694#define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
1695 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
1696
1697#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
1698 ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
1699#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
1700 ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
1701#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
1702 ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
1703#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
1704 ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
1705#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
1706 ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
1707#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
1708 ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
1709#define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \
1710 ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
1711#define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \
1712 ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
1713
1714#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31)
1715#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30)
1716#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29)
1717
1718#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
1719#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
1720#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
1721
1722#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
1723 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
1724#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
1725 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
1726#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
1727 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
1728
1729#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \
1730 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
1731#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \
1732 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
1733#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \
1734 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
1735
1736#define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31)
1737#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30)
1738
1739#define WMI_DBS_FW_MODE_CFG_DBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
1740#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
1741
1742#define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
1743 WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
1744#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
1745 WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
1746
1747#define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \
1748 ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
1749#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \
1750 ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
1751
1752/** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
1753typedef struct _wmi_abi_version {
1754 A_UINT32 abi_version_0;
1755 /** WMI Major and Minor versions */
1756 A_UINT32 abi_version_1;
1757 /** WMI change revision */
1758 A_UINT32 abi_version_ns_0;
1759 /** ABI version namespace first four dwords */
1760 A_UINT32 abi_version_ns_1;
1761 /** ABI version namespace second four dwords */
1762 A_UINT32 abi_version_ns_2;
1763 /** ABI version namespace third four dwords */
1764 A_UINT32 abi_version_ns_3;
1765 /** ABI version namespace fourth four dwords */
1766} wmi_abi_version;
1767
1768/*
1769 * maximum number of memroy requests allowed from FW.
1770 */
1771#define WMI_MAX_MEM_REQS 16
1772
1773/* !!NOTE!!:
1774 * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
1775 * Please don't change it.
1776 */
1777#define HW_BD_INFO_SIZE 5
1778
1779/**
Govind Singh869c9872016-02-22 18:36:34 +05301780 * PDEV ID to identify the physical device,
1781 * value 0 reserved for SOC level commands/event
1782 */
1783#define WMI_PDEV_ID_SOC 0 /* SOC level, applicable to all PDEVs */
1784#define WMI_PDEV_ID_1ST 1 /* first pdev (pdev 0) */
1785#define WMI_PDEV_ID_2ND 2 /* second pdev (pdev 1) */
1786#define WMI_PDEV_ID_3RD 3 /* third pdev (pdev 2) */
1787
1788/**
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001789 * The following struct holds optional payload for
1790 * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
1791 * device capability to the host.
1792 */
1793typedef struct {
1794 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
1795 A_UINT32 fw_build_vers; /* firmware build number */
1796 wmi_abi_version fw_abi_vers;
1797 A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
1798 A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
1799 A_UINT32 num_rf_chains;
1800 /* The following field is only valid for service type WMI_SERVICE_11AC */
1801 A_UINT32 ht_cap_info; /* WMI HT Capability */
1802 A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
1803 A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
1804 A_UINT32 hw_min_tx_power;
1805 A_UINT32 hw_max_tx_power;
1806 A_UINT32 sys_cap_info;
1807 A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
1808 /** Max beacon and Probe Response IE offload size (includes
1809 * optional P2P IEs) */
1810 A_UINT32 max_bcn_ie_size;
1811 /*
1812 * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
1813 * FW uses this as FW extesnsion memory for saving its data structures. Only valid
1814 * for low latency interfaces like PCIE where FW can access this memory directly (or)
1815 * by DMA.
1816 */
1817 A_UINT32 num_mem_reqs;
1818 /* Max No. scan channels target can support
1819 * If FW is too old and doesn't indicate this number, host side value will default to
1820 * 0, and host will take the original compatible value (62) for future scan channel
1821 * setup.
1822 */
1823 A_UINT32 max_num_scan_channels;
1824
1825 /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
1826 * Default 0 means tha hw_bd_info[] is invalid(legacy board).
1827 */
1828 A_UINT32 hw_bd_id;
1829 A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
1830
1831 /*
1832 * Number of MACs supported, i.e. a DBS-capable device will return 2
1833 */
1834 A_UINT32 max_supported_macs;
1835
1836 /*
1837 * FW sub-feature capabilities to be used in concurrence with
1838 * wmi_service_bitmap
1839 * values from enum WMI_FW_SUB_FEAT_CAPS
1840 */
1841 A_UINT32 wmi_fw_sub_feat_caps;
1842 /*
1843 * Number of Dual Band Simultaneous (DBS) hardware modes
1844 */
1845 A_UINT32 num_dbs_hw_modes;
1846 /*
1847 * txrx_chainmask
1848 * [7:0] - 2G band tx chain mask
1849 * [15:8] - 2G band rx chain mask
1850 * [23:16] - 5G band tx chain mask
1851 * [31:24] - 5G band rx chain mask
1852 *
1853 */
1854 A_UINT32 txrx_chainmask;
1855
1856 /*
1857 * default Dual Band Simultaneous (DBS) hardware mode
1858 */
1859 A_UINT32 default_dbs_hw_mode_index;
1860
1861 /*
1862 * Number of msdu descriptors target would use
1863 */
1864 A_UINT32 num_msdu_desc;
1865
1866 /* The TLVs for hal_reg_capabilities, wmi_service_bitmap and mem_reqs[] will follow this TLV.
1867 * HAL_REG_CAPABILITIES hal_reg_capabilities;
1868 * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
1869 * wlan_host_mem_req mem_reqs[];
1870 * wlan_dbs_hw_mode_list[];
1871 */
1872} wmi_service_ready_event_fixed_param;
1873
1874typedef struct {
1875 /* TLV tag and len; tag equals
1876 *WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT
1877 */
1878 A_UINT32 tlv_header;
1879 /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
1880 A_UINT32 default_conc_scan_config_bits;
1881 /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
1882 A_UINT32 default_fw_config_bits;
Govind Singhd24f5e42016-02-22 15:16:46 +05301883 wmi_ppe_threshold ppet;
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07001884 /*
1885 * see section 8.4.2.213 from draft r8 of 802.11ax;
1886 * see WMI_HE_FRAG_SUPPORT enum
1887 */
Govind Singhd24f5e42016-02-22 15:16:46 +05301888 A_UINT32 he_cap_info;
Govind Singh76d82bc2016-02-22 15:39:48 +05301889 /*
1890 * An HT STA shall not allow transmission of more than one MPDU start
1891 * within the time limit described in the MPDU maximum density field.
1892 */
1893 A_UINT32 mpdu_density; /* units are microseconds */
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05301894 /*
1895 * Maximum no of BSSID based RX filters host can program
1896 * Value 0 means FW hasn't given any limit to host.
1897 */
1898 A_UINT32 max_bssid_rx_filters;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001899} wmi_service_ready_ext_event_fixed_param;
1900
1901typedef enum {
1902 WMI_HWBD_NONE = 0, /* No hw board information is given */
1903 WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */
1904 WMI_HWBD_QCA2582 = 2, /* Killer 1525 */
1905} WMI_HWBD_ID;
1906
1907typedef enum {
1908 WMI_FW_STA_RTT_INITR = 0x00000001,
1909 WMI_FW_STA_RTT_RESPR = 0x00000002,
1910 WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
1911 WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
1912 WMI_FW_P2P_GO_RTT_INITR = 0x00000010,
1913 WMI_FW_P2P_GO_RTT_RESPR = 0x00000020,
1914 WMI_FW_AP_RTT_INITR = 0x00000040,
1915 WMI_FW_AP_RTT_RESPR = 0x00000080,
1916 WMI_FW_NAN_RTT_INITR = 0x00000100,
1917 WMI_FW_NAN_RTT_RESPR = 0x00000200,
1918 /*
1919 * New fw sub feature capabilites before
1920 * WMI_FW_MAX_SUB_FEAT_CAP
1921 */
1922 WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000,
1923} WMI_FW_SUB_FEAT_CAPS;
1924
1925#define ATH_BD_DATA_REV_MASK 0x000000FF
1926#define ATH_BD_DATA_REV_SHIFT 0
1927
1928#define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00
1929#define ATH_BD_DATA_PROJ_ID_SHIFT 8
1930
1931#define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000
1932#define ATH_BD_DATA_CUST_ID_SHIFT 16
1933
1934#define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000
1935#define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
1936
1937#define SET_BD_DATA_REV(bd_data_ver, value) \
1938 ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
1939
1940#define GET_BD_DATA_REV(bd_data_ver) \
1941 (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
1942
1943#define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
1944 ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
1945
1946#define GET_BD_DATA_PROJ_ID(bd_data_ver) \
1947 (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
1948
1949#define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
1950 ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
1951
1952#define GET_BD_DATA_CUST_ID(bd_data_ver) \
1953 (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
1954
1955#define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \
1956 ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
1957
1958#define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \
1959 (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
1960
1961#ifdef ROME_LTE_COEX_FREQ_AVOID
1962typedef struct {
1963 A_UINT32 start_freq; /* start frequency, not channel center freq */
1964 A_UINT32 end_freq; /* end frequency */
1965} avoid_freq_range_desc;
1966
1967typedef struct {
1968 /* bad channel range count, multi range is allowed, 0 means all channel clear */
1969 A_UINT32 num_freq_ranges;
1970 /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
1971 avoid_freq_range_desc avd_freq_range[0];
1972} wmi_wlan_avoid_freq_ranges_event;
1973#endif
1974
1975/** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that retuned status */
1976#define WLAN_INIT_STATUS_SUCCESS 0x0
1977#define WLAN_INIT_STATUS_GEN_FAILED 0x1
1978#define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
1979#define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
1980
1981typedef A_UINT32 WLAN_INIT_STATUS;
1982
1983typedef struct {
1984 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
1985 wmi_abi_version fw_abi_vers;
1986 wmi_mac_addr mac_addr;
1987 A_UINT32 status;
Rajeev Kumare18f5282016-04-15 14:08:29 -07001988 A_UINT32 num_dscp_table;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001989} wmi_ready_event_fixed_param;
1990
1991typedef struct {
1992 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
1993/**
1994 * @brief num_vdev - number of virtual devices (VAPs) to support
1995 */
1996 A_UINT32 num_vdevs;
1997/**
1998 * @brief num_peers - number of peer nodes to support
1999 */
2000 A_UINT32 num_peers;
2001/*
2002 * @brief In offload mode target supports features like WOW, chatter and other
2003 * protocol offloads. In order to support them some functionalities like
2004 * reorder buffering, PN checking need to be done in target. This determines
2005 * maximum number of peers suported by target in offload mode
2006 */
2007 A_UINT32 num_offload_peers;
2008/* @brief Number of reorder buffers available for doing target based reorder
2009 * Rx reorder buffering
2010 */
2011 A_UINT32 num_offload_reorder_buffs;
2012/**
2013 * @brief num_peer_keys - number of keys per peer
2014 */
2015 A_UINT32 num_peer_keys;
2016/**
2017 * @brief num_peer_tids - number of TIDs to provide storage for per peer.
2018 */
2019 A_UINT32 num_tids;
2020/**
2021 * @brief ast_skid_limit - max skid for resolving hash collisions
2022 * @details
2023 * The address search table is sparse, so that if two MAC addresses
2024 * result in the same hash value, the second of these conflicting
2025 * entries can slide to the next index in the address search table,
2026 * and use it, if it is unoccupied. This ast_skid_limit parameter
2027 * specifies the upper bound on how many subsequent indices to search
2028 * over to find an unoccupied space.
2029 */
2030 A_UINT32 ast_skid_limit;
2031/**
2032 * @brief tx_chain_mask - the nominal chain mask for transmit
2033 * @details
2034 * The chain mask may be modified dynamically, e.g. to operate AP tx with
2035 * a reduced number of chains if no clients are associated.
2036 * This configuration parameter specifies the nominal chain-mask that
2037 * should be used when not operating with a reduced set of tx chains.
2038 */
2039 A_UINT32 tx_chain_mask;
2040/**
2041 * @brief rx_chain_mask - the nominal chain mask for receive
2042 * @details
2043 * The chain mask may be modified dynamically, e.g. for a client to use
2044 * a reduced number of chains for receive if the traffic to the client
2045 * is low enough that it doesn't require downlink MIMO or antenna
2046 * diversity.
2047 * This configuration parameter specifies the nominal chain-mask that
2048 * should be used when not operating with a reduced set of rx chains.
2049 */
2050 A_UINT32 rx_chain_mask;
2051/**
2052 * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
2053 * @details
2054 * Each WMM access class (voice, video, best-effort, background) will
2055 * have its own timeout value to dictate how long to wait for missing
2056 * rx MPDUs to arrive before flushing subsequent MPDUs that have already
2057 * been received.
2058 * This parameter specifies the timeout in milliseconds for each class .
2059 * NOTE: the number of class (defined as 4) cannot be
2060 * changed in the future without breaking WMI compatibility.
2061 */
2062 A_UINT32 rx_timeout_pri[4];
2063/**
2064 * @brief rx_decap mode - what mode the rx should decap packets to
2065 * @details
2066 * MAC can decap to RAW (no decap), native wifi or Ethernet types
2067 * THis setting also determines the default TX behavior, however TX
2068 * behavior can be modified on a per VAP basis during VAP init
2069 */
2070 A_UINT32 rx_decap_mode;
2071 /**
2072 * @brief scan_max_pending_req - what is the maximum scan requests than can be queued
2073 */
2074 A_UINT32 scan_max_pending_req;
2075
2076 /**
2077 * @brief maximum VDEV that could use BMISS offload
2078 */
2079 A_UINT32 bmiss_offload_max_vdev;
2080
2081 /**
2082 * @brief maximum VDEV that could use offload roaming
2083 */
2084 A_UINT32 roam_offload_max_vdev;
2085
2086 /**
2087 * @brief maximum AP profiles that would push to offload roaming
2088 */
2089 A_UINT32 roam_offload_max_ap_profiles;
2090
2091/**
2092 * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
2093 * @details
2094 * The target's WAL maintains a table to hold information regarding which
2095 * peers belong to a given multicast group, so that if multicast->unicast
2096 * conversion is enabled, the target can convert multicast tx frames to a
2097 * series of unicast tx frames, to each peer within the multicast group.
2098 * This num_mcast_groups configuration parameter tells the target how
2099 * many multicast groups to provide storage for within its multicast
2100 * group membership table.
2101 */
2102 A_UINT32 num_mcast_groups;
2103
2104/**
2105 * @brief num_mcast_table_elems - size to alloc for the mcast membership table
2106 * @details
2107 * This num_mcast_table_elems configuration parameter tells the target
2108 * how many peer elements it needs to provide storage for in its
2109 * multicast group membership table.
2110 * These multicast group membership table elements are shared by the
2111 * multicast groups stored within the table.
2112 */
2113 A_UINT32 num_mcast_table_elems;
2114
2115/**
2116 * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
2117 * @details
2118 * This configuration parameter specifies whether the target should
2119 * perform multicast --> unicast conversion on transmit, and if so,
2120 * what to do if it finds no entries in its multicast group membership
2121 * table for the multicast IP address in the tx frame.
2122 * Configuration value:
2123 * 0 -> Do not perform multicast to unicast conversion.
2124 * 1 -> Convert multicast frames to unicast, if the IP multicast address
2125 * from the tx frame is found in the multicast group membership
2126 * table. If the IP multicast address is not found, drop the frame.
2127 * 2 -> Convert multicast frames to unicast, if the IP multicast address
2128 * from the tx frame is found in the multicast group membership
2129 * table. If the IP multicast address is not found, transmit the
2130 * frame as multicast.
2131 */
2132 A_UINT32 mcast2ucast_mode;
2133
2134 /**
2135 * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
2136 * @details
2137 * This parameter controls how much memory the target will allocate to
2138 * store a log of tx PPDU meta-information (how large the PPDU was,
2139 * when it was sent, whether it was successful, etc.)
2140 */
2141 A_UINT32 tx_dbg_log_size;
2142
2143 /**
2144 * @brief num_wds_entries - how many AST entries to be allocated for WDS
2145 */
2146 A_UINT32 num_wds_entries;
2147
2148 /**
2149 * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
2150 * this limit can be 0 -default, 1 256B
2151 */
2152 A_UINT32 dma_burst_size;
2153
2154 /**
2155 * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
2156 * to account for interface latency to avoid underrun.
2157 */
2158 A_UINT32 mac_aggr_delim;
2159 /**
2160 * @brief rx_skip_defrag_timeout_dup_detection_check
2161 * @details
2162 * determine whether target is responsible for detecting duplicate
2163 * non-aggregate MPDU and timing out stale fragments.
2164 *
2165 * A-MPDU reordering is always performed on the target.
2166 *
2167 * 0: target responsible for frag timeout and dup checking
2168 * 1: host responsible for frag timeout and dup checking
2169 */
2170 A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
2171
2172 /**
2173 * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
2174 * and Max no of descriptors for each Video link (node).
2175 */
2176 A_UINT32 vow_config;
2177
2178 /**
2179 * @brief maximum VDEV that could use GTK offload
2180 */
2181 A_UINT32 gtk_offload_max_vdev;
2182
2183 /**
2184 * @brief num_msdu_desc - Number of msdu descriptors target should use
2185 */
2186 A_UINT32 num_msdu_desc; /* Number of msdu desc */
2187 /**
2188 * @brief max_frag_entry - Max. number of Tx fragments per MSDU
2189 * @details
2190 * This parameter controls the max number of Tx fragments per MSDU.
2191 * This is sent by the target as part of the WMI_SERVICE_READY event
2192 * and is overriden by the OS shim as required.
2193 */
2194 A_UINT32 max_frag_entries;
2195
2196 /**
2197 * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
2198 * @brief num_msdu_desc - Number of vdev that can support beacon offload
2199 */
2200
2201 A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
2202
2203 /**
2204 * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
2205 * @details
2206 * Each TDLS enabled vdev can track outgoing transmits/rssi/rates to/of
2207 * peers in a connection tracking table for possible TDLS link creation
2208 * or deletion. This controls the number of tracked peers per vdev.
2209 */
2210 A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
2211 A_UINT32 beacon_tx_offload_max_vdev;
2212 A_UINT32 num_multicast_filter_entries;
2213 A_UINT32 num_wow_filters; /*host can configure the number of wow filters */
2214
2215 /**
2216 * @brief num_keep_alive_pattern - Num of keep alive patterns configured
2217 * from host.
2218 */
2219 A_UINT32 num_keep_alive_pattern;
2220 /**
2221 * @brief keep_alive_pattern_size - keep alive pattern size.
2222 */
2223 A_UINT32 keep_alive_pattern_size;
2224
2225 /**
2226 * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
2227 * @details
2228 * Each TDLS STA can become a sleep STA independently. This parameter
2229 * mentions how many such sleep STAs can be supported concurrently.
2230 */
2231 A_UINT32 max_tdls_concurrent_sleep_sta;
2232
2233 /**
2234 * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
2235 * @details
2236 * Each TDLS STA can become a buffer STA independently. This parameter
2237 * mentions how many such buffer STAs can be supported concurrently.
2238 */
2239 A_UINT32 max_tdls_concurrent_buffer_sta;
2240
2241 /**
2242 * @brief wmi_send_separate - host configures fw to send the wmi separately
2243 */
2244 A_UINT32 wmi_send_separate;
2245
2246 /**
2247 * @brief num_ocb_vdevs - Number of vdevs used for OCB support
2248 */
2249 A_UINT32 num_ocb_vdevs;
2250
2251 /**
2252 * @brief num_ocb_channels - The supported number of simultaneous OCB channels
2253 */
2254 A_UINT32 num_ocb_channels;
2255
2256 /**
2257 * @brief num_ocb_schedules - The supported number of OCB schedule segments
2258 */
2259 A_UINT32 num_ocb_schedules;
Manikandan Mohan30728082015-12-09 12:35:24 -08002260 /**
2261 * @brief specific configuration from host, such as per platform configuration
2262 */
2263 #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
2264 #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002265
2266 #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
2267 #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
2268
2269 #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
2270 #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
2271
2272 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
2273 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
2274
2275 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
2276 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
2277
2278 #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
2279 #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
2280
2281 #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
2282 #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
2283
2284 #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
2285 #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
2286
2287 #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
2288 #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
2289
Manikandan Mohan30728082015-12-09 12:35:24 -08002290 A_UINT32 flag1;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002291
2292 /** @brief smart_ant_cap - Smart Antenna capabilities information
2293 * @details
2294 * 1 - Smart antenna is enabled.
2295 * 0 - Smart antenna is disabled.
2296 * In future this can contain smart antenna specifc capabilities.
2297 */
2298 A_UINT32 smart_ant_cap;
2299
2300 /**
2301 * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
2302 * during init
2303 */
2304 A_UINT32 BK_Minfree;
2305 A_UINT32 BE_Minfree;
2306 A_UINT32 VI_Minfree;
2307 A_UINT32 VO_Minfree;
2308
2309 /**
2310 * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
2311 * descriptor memory allocation.
2312 * 1 - Allocate fragment descriptor memory for data packet in firmware.
2313 * If host wants to transmit data packet at its desired rate,
2314 * this field must be set.
2315 * 0 - Don't allocate fragment descriptor for data packet.
2316 */
2317 A_UINT32 alloc_frag_desc_for_data_pkt;
Govind Singh86180292016-02-01 14:03:37 +05302318
2319 /*
2320 * how much space to allocate for NDP NS (neighbor solicitation)
2321 * specs
2322 */
2323 A_UINT32 num_ns_ext_tuples_cfg;
Sandeep Puligillab6ddc262016-03-09 13:06:16 -08002324 /**
2325 * size (in bytes) of the buffer the FW shall allocate to store
2326 * packet filtering instructions
2327 */
2328 A_UINT32 bpf_instruction_size;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05302329 /**
2330 * Maximum no of BSSID based RX filters host would program
2331 * Value 0 means host doesn't given any limit to FW.
2332 */
2333 A_UINT32 max_bssid_rx_filters;
Krishna Kumaar Natarajan7dde8c72016-03-25 15:11:49 -07002334 /**
2335 * Use PDEV ID instead of MAC ID, added for backward compatibility with
2336 * older host which is using MAC ID. 1 means PDEV ID, 0 means MAC ID.
2337 */
2338 A_UINT32 use_pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002339} wmi_resource_config;
2340
Manikandan Mohan30728082015-12-09 12:35:24 -08002341#define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
2342 do { \
2343 (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
2344 (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
2345 WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
2346 } while (0)
2347#define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
2348 (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
2349 WMI_RSRC_CFG_FLAG_ ## flag ## _S)
2350
2351#define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
2352 WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
2353#define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
2354 WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
2355
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002356#define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
2357 WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
2358#define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
2359 WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
2360
2361#define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
2362 WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
2363#define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
2364 WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
2365
2366#define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
2367 WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
2368#define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
2369 WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
2370
2371#define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
2372 WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
2373#define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
2374 WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
2375
2376#define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
2377 WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
2378#define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
2379 WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
2380
2381#define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
2382 WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
2383#define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
2384 WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
2385
2386#define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
2387 WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
2388#define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
2389 WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
2390
2391#define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
2392 WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
2393#define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
2394 WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
2395
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002396typedef struct {
2397 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
2398
2399 /** The following indicate the WMI versions to be supported by
2400 * the host driver. Note that the host driver decide to
2401 * "downgrade" its WMI version support and this may not be the
2402 * native version of the host driver. */
2403 wmi_abi_version host_abi_vers;
2404
2405 A_UINT32 num_host_mem_chunks;
2406 /** size of array host_mem_chunks[] */
2407 /* The TLVs for resource_config and host_mem_chunks[] will follow.
2408 * wmi_resource_config resource_config;
2409 * wlan_host_memory_chunk host_mem_chunks[];
2410 */
2411
2412} wmi_init_cmd_fixed_param;
2413
2414/**
2415 * TLV for channel list
2416 */
2417typedef struct {
2418 /** WMI_CHAN_LIST_TAG */
2419 A_UINT32 tag;
2420 /** # of channels to scan */
2421 A_UINT32 num_chan;
2422 /** channels in Mhz */
2423 A_UINT32 channel_list[1];
2424} wmi_chan_list;
2425
2426/**
2427 * TLV for bssid list
2428 */
2429typedef struct {
2430 /** WMI_BSSID_LIST_TAG */
2431 A_UINT32 tag;
2432 /** number of bssids */
2433 A_UINT32 num_bssid;
2434 /** bssid list */
2435 wmi_mac_addr bssid_list[1];
2436} wmi_bssid_list;
2437
2438/**
2439 * TLV for ie data.
2440 */
2441typedef struct {
2442 /** WMI_IE_TAG */
2443 A_UINT32 tag;
2444 /** number of bytes in ie data */
2445 A_UINT32 ie_len;
2446 /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4 ) */
2447 A_UINT32 ie_data[1];
2448} wmi_ie_data;
2449
2450typedef struct {
2451 /** Len of the SSID */
2452 A_UINT32 ssid_len;
2453 /** SSID */
2454 A_UINT32 ssid[8];
2455} wmi_ssid;
2456
2457typedef struct {
2458 /** WMI_SSID_LIST_TAG */
2459 A_UINT32 tag;
2460 A_UINT32 num_ssids;
2461 wmi_ssid ssids[1];
2462} wmi_ssid_list;
2463
2464/* prefix used by scan requestor ids on the host */
2465#define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
2466/* prefix used by scan request ids generated on the host */
2467/* host cycles through the lower 12 bits to generate ids */
2468#define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
2469
2470#define WLAN_SCAN_PARAMS_MAX_SSID 16
2471#define WLAN_SCAN_PARAMS_MAX_BSSID 4
2472#define WLAN_SCAN_PARAMS_MAX_IE_LEN 512
2473
2474typedef struct {
2475 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
2476 /** Scan ID */
2477 A_UINT32 scan_id;
2478 /** Scan requestor ID */
2479 A_UINT32 scan_req_id;
2480 /** VDEV id(interface) that is requesting scan */
2481 A_UINT32 vdev_id;
2482 /** Scan Priority, input to scan scheduler */
2483 A_UINT32 scan_priority;
2484 /** Scan events subscription */
2485 A_UINT32 notify_scan_events;
2486 /** dwell time in msec on active channels */
2487 A_UINT32 dwell_time_active;
2488 /** dwell time in msec on passive channels */
2489 A_UINT32 dwell_time_passive;
2490 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
2491 A_UINT32 min_rest_time;
2492 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
2493 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
2494 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
2495 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
2496 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
2497 * irrespective of activity. activity is determined by the idle_time parameter.
2498 */
2499 A_UINT32 max_rest_time;
2500 /** time before sending next set of probe requests.
2501 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
2502 * The number of probe requests specified depends on the ssid_list and bssid_list
2503 */
2504 A_UINT32 repeat_probe_time;
2505 /** time in msec between 2 consequetive probe requests with in a set. */
2506 A_UINT32 probe_spacing_time;
2507 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
2508 A_UINT32 idle_time;
2509 /** maximum time in msec allowed for scan */
2510 A_UINT32 max_scan_time;
2511 /** delay in msec before sending first probe request after switching to a channel */
2512 A_UINT32 probe_delay;
2513 /** Scan control flags */
2514 A_UINT32 scan_ctrl_flags;
2515 /** Burst duration time in msec*/
2516 A_UINT32 burst_duration;
2517
2518 /** # if channels to scan. In the TLV channel_list[] */
2519 A_UINT32 num_chan;
2520 /** number of bssids. In the TLV bssid_list[] */
2521 A_UINT32 num_bssid;
2522 /** number of ssid. In the TLV ssid_list[] */
2523 A_UINT32 num_ssids;
2524 /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
2525 A_UINT32 ie_len;
2526 /** Max number of probes to be sent */
2527 A_UINT32 n_probes;
2528
2529 /**
2530 * TLV (tag length value ) parameters follow the scan_cmd
2531 * structure. The TLV's are:
2532 * A_UINT32 channel_list[];
2533 * wmi_ssid ssid_list[];
2534 * wmi_mac_addr bssid_list[];
2535 * A_UINT8 ie_data[];
2536 */
2537} wmi_start_scan_cmd_fixed_param;
2538
2539/**
2540 * scan control flags.
2541 */
2542
2543/** passively scan all channels including active channels */
2544#define WMI_SCAN_FLAG_PASSIVE 0x1
2545/** add wild card ssid probe request even though ssid_list is specified. */
2546#define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
2547/** add cck rates to rates/xrate ie for the generated probe request */
2548#define WMI_SCAN_ADD_CCK_RATES 0x4
2549/** add ofdm rates to rates/xrate ie for the generated probe request */
2550#define WMI_SCAN_ADD_OFDM_RATES 0x8
2551/** To enable indication of Chan load and Noise floor to host */
2552#define WMI_SCAN_CHAN_STAT_EVENT 0x10
2553/** Filter Probe request frames */
2554#define WMI_SCAN_FILTER_PROBE_REQ 0x20
2555/**When set, not to scan DFS channels*/
2556#define WMI_SCAN_BYPASS_DFS_CHN 0x40
2557/**When set, certain errors are ignored and scan continues.
2558 * Different FW scan engine may use its own logic to decide what errors to ignore*/
2559#define WMI_SCAN_CONTINUE_ON_ERROR 0x80
2560/** Enable promiscous mode for ese */
2561#define WMI_SCAN_FILTER_PROMISCOUS 0x100
2562/** allow to send probe req on DFS channel */
2563#define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
2564/** add TPC content in probe req frame */
2565#define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400
2566/** add DS content in probe req frame */
2567#define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800
2568/** use random mac address for TA for probe request frame and add
2569 * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
2570 * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/
2571#define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000
Govind Singh32cced32016-02-01 13:33:09 +05302572/** allow mgmt transmission during off channel scan */
2573#define WMI_SCAN_OFFCHAN_MGMT_TX 0x2000
2574/** allow data transmission during off channel scan */
2575#define WMI_SCAN_OFFCHAN_DATA_TX 0x4000
2576/** allow capture ppdu with phy errrors */
2577#define WMI_SCAN_CAPTURE_PHY_ERROR 0x8000
Sandeep Puligilla1d9a8d82016-03-09 13:07:58 -08002578/** always do passive scan on passive channels */
2579#define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x1000
Anurag Chouhanb3fa7a12016-04-18 17:26:49 +05302580/** for adaptive scan mode using 3 bits (21 - 23 bits) */
2581#define WMI_SCAN_DWELL_MODE_MASK 0x00E00000
2582#define WMI_SCAN_DWELL_MODE_SHIFT 21
2583
2584typedef enum {
2585 WMI_SCAN_DWELL_MODE_DEFAULT = 0,
2586 WMI_SCAN_DWELL_MODE_CONSERVATIVE = 1,
2587 WMI_SCAN_DWELL_MODE_MODERATE = 2,
2588 WMI_SCAN_DWELL_MODE_AGGRESSIVE = 3,
2589 WMI_SCAN_DWELL_MODE_STATIC = 4,
2590} WMI_SCAN_DWELL_MODE;
2591
2592#define WMI_SCAN_SET_DWELL_MODE(flag, mode) \
2593 do { \
2594 (flag) |= (((mode) << WMI_SCAN_DWELL_MODE_SHIFT) & \
2595 WMI_SCAN_DWELL_MODE_MASK); \
2596 } while (0)
2597
2598#define WMI_SCAN_GET_DWELL_MODE(flag) \
2599 (((flag) & WMI_SCAN_DWELL_MODE_MASK) >> WMI_SCAN_DWELL_MODE_SHIFT)
2600
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002601/** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
2602#define WMI_SCAN_CLASS_MASK 0xFF000000
2603
2604/*
2605 * Masks identifying types/ID of scans
2606 * Scan_Stop macros should be the same value as below defined in UMAC
2607 * #define IEEE80211_SPECIFIC_SCAN 0x00000000
2608 * #define IEEE80211_VAP_SCAN 0x01000000
2609 * #define IEEE80211_ALL_SCANS 0x04000000
2610 */
2611#define WMI_SCAN_STOP_ONE 0x00000000
2612#define WMI_SCN_STOP_VAP_ALL 0x01000000
2613#define WMI_SCAN_STOP_ALL 0x04000000
2614
2615typedef struct {
2616 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
2617 /** requestor requesting cancel */
2618 A_UINT32 requestor;
2619 /** Scan ID */
2620 A_UINT32 scan_id;
2621 /**
2622 * Req Type
2623 * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
2624 * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
2625 * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
2626 * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
2627 */
2628 A_UINT32 req_type;
2629 /**
2630 * vDev ID
2631 * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
2632 */
2633 A_UINT32 vdev_id;
2634} wmi_stop_scan_cmd_fixed_param;
2635
2636#define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */
2637#define APPEND_TO_EXISTING_CHAN_LIST 1
2638
2639typedef struct {
2640 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
2641 A_UINT32 num_scan_chans;
2642 /** no of elements in chan_info[] */
2643 A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
2644 /** Followed by the variable length TLV chan_info:
2645 * wmi_channel chan_info[] */
2646} wmi_scan_chan_list_cmd_fixed_param;
2647
2648/*
2649 * Priority numbers must be sequential, starting with 0.
2650 */
2651/* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
2652typedef enum {
2653 WMI_SCAN_PRIORITY_VERY_LOW = 0,
2654 WMI_SCAN_PRIORITY_LOW,
2655 WMI_SCAN_PRIORITY_MEDIUM,
2656 WMI_SCAN_PRIORITY_HIGH,
2657 WMI_SCAN_PRIORITY_VERY_HIGH,
2658
2659 WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
2660} wmi_scan_priority;
2661
2662/* Five Levels for Requested Priority */
2663/* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */
2664typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
2665
2666/**
2667 * 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
2668 * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
2669 * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
2670 */
2671typedef struct {
2672 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
2673 /**
2674 * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
2675 * 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
2676 */
2677 A_UINT32 vdev_type;
2678 /**
2679 * number of rows in mapping_table for a specific vdev
2680 * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
2681 */
2682 A_UINT32 number_rows;
2683 /** mapping_table for a specific vdev follows this TLV
2684 * WLAN_PRIORITY_MAPPING mapping_table[]; */
2685} wmi_scan_sch_priority_table_cmd_fixed_param;
2686
2687/** update flags */
2688#define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1
2689#define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2
2690#define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4
2691
2692typedef struct {
2693 A_UINT32 tlv_header;
2694 /** requestor requesting update scan request */
2695 A_UINT32 requestor;
2696 /** Scan ID of the scan request that need to be update */
2697 A_UINT32 scan_id;
2698 /** update flags, indicating which of the following fields are valid and need to be updated*/
2699 A_UINT32 scan_update_flags;
2700 /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
2701 A_UINT32 scan_priority;
2702 /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
2703 A_UINT32 min_rest_time;
2704 /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
2705 A_UINT32 max_rest_time;
2706} wmi_scan_update_request_cmd_fixed_param;
2707
2708typedef struct {
2709 A_UINT32 tlv_header;
2710 /** oui to be used in probe request frame when random mac addresss is
2711 * requested part of scan parameters. this is applied to both FW internal scans and
2712 * host initated scans. host can request for random mac address with
2713 * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */
2714 A_UINT32 prob_req_oui;
2715} wmi_scan_prob_req_oui_cmd_fixed_param;
2716
2717enum wmi_scan_event_type {
2718 WMI_SCAN_EVENT_STARTED = 0x1,
2719 WMI_SCAN_EVENT_COMPLETED = 0x2,
2720 WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
2721 WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
2722 WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
2723 WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
2724 WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
Manikandan Mohan46b95c02015-12-09 12:23:08 -08002725 WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
2726 WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
Govind Singh45ef44a2016-02-01 17:45:22 +05302727 WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */
2728 WMI_SCAN_EVENT_RESUMED = 0x400, /* scan request is resumed */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002729 WMI_SCAN_EVENT_MAX = 0x8000
2730};
2731
2732enum wmi_scan_completion_reason {
2733 /** scan related events */
2734 WMI_SCAN_REASON_NONE = 0xFF,
2735 WMI_SCAN_REASON_COMPLETED = 0,
2736 WMI_SCAN_REASON_CANCELLED = 1,
2737 WMI_SCAN_REASON_PREEMPTED = 2,
2738 WMI_SCAN_REASON_TIMEDOUT = 3,
2739 WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
Govind Singh45ef44a2016-02-01 17:45:22 +05302740 WMI_SCAN_REASON_SUSPENDED = 5,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002741 WMI_SCAN_REASON_MAX,
2742};
2743
2744typedef struct {
2745 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
2746 /** scan event (wmi_scan_event_type) */
2747 A_UINT32 event;
2748 /** status of the scan completion event */
2749 A_UINT32 reason;
2750 /** channel freq , only valid for FOREIGN channel event*/
2751 A_UINT32 channel_freq;
2752 /**id of the requestor whose scan is in progress */
2753 A_UINT32 requestor;
2754 /**id of the scan that is in progress */
2755 A_UINT32 scan_id;
2756 /**id of VDEV that requested the scan */
2757 A_UINT32 vdev_id;
2758} wmi_scan_event_fixed_param;
2759
2760/* WMI Diag event */
2761typedef struct {
2762 A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
2763 A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
2764 A_UINT32 count; /* Number of diag frames added to current event */
2765 A_UINT32 dropped;
2766 /* followed by WMITLV_TAG_ARRAY_BYTE */
2767} wmi_diag_event_fixed_param;
2768
2769/*
2770 * If FW has multiple active channels due to MCC(multi channel concurrency),
2771 * then these stats are combined stats for all the active channels.
2772 */
2773typedef struct {
2774 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
2775 /** ack count, it is an incremental number, not accumulated number */
2776 A_UINT32 ackRcvBad;
2777 /** bad rts count, it is an incremental number, not accumulated number */
2778 A_UINT32 rtsBad;
2779 /** good rts, it is an incremental number, not accumulated number */
2780 A_UINT32 rtsGood;
2781 /** fcs count, it is an incremental number, not accumulated number */
2782 A_UINT32 fcsBad;
2783 /** beacon count, it is an incremental number, not accumulated number */
2784 A_UINT32 noBeacons;
2785} wmi_update_whal_mib_stats_event_fixed_param;
2786
2787/*
2788 * This defines how much headroom is kept in the
2789 * receive frame between the descriptor and the
2790 * payload, in order for the WMI PHY error and
2791 * management handler to insert header contents.
2792 *
2793 * This is in bytes.
2794 */
2795#define WMI_MGMT_RX_HDR_HEADROOM sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr)
2796
2797/** This event will be used for sending scan results
2798 * as well as rx mgmt frames to the host. The rx buffer
2799 * will be sent as part of this WMI event. It would be a
2800 * good idea to pass all the fields in the RX status
2801 * descriptor up to the host.
2802 */
2803/* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
2804#define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
2805
2806/** flag indicating that the the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
2807#define WMI_MGMT_RX_HDR_EXTSCAN 0x01
2808
2809/**
2810 * flag indicating that the the mgmt frame (probe req/beacon) is received in
2811 * the context of matched network by FW ENLO
2812 */
2813#define WMI_MGMT_RX_HDR_ENLO 0x02
2814
2815typedef struct {
2816 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
2817 /** channel on which this frame is received. */
2818 A_UINT32 channel;
2819 /** snr information used to cal rssi */
2820 A_UINT32 snr;
2821 /** Rate kbps */
2822 A_UINT32 rate;
2823 /** rx phy mode WLAN_PHY_MODE */
2824 A_UINT32 phy_mode;
2825 /** length of the frame */
2826 A_UINT32 buf_len;
2827 /** rx status */
2828 A_UINT32 status;
2829 /** RSSI of PRI 20MHz for each chain. */
2830 A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
2831 /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
2832 A_UINT32 flags;
2833 /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
2834 A_INT32 rssi;
2835
2836 /** delta between local TSF(TSF timestamp when frame was RXd)
2837 * and remote TSF(TSF timestamp in the IE for mgmt frame
2838 * beacon,proberesp for e.g). If remote TSF is not available,
2839 * delta set to 0.
2840 * Although tsf_delta is stored as A_UINT32, it can be negative,
2841 * and thus would need to be sign-extended if added to a value
2842 * larger than 32 bits.
2843 */
2844 A_UINT32 tsf_delta;
Sandeep Puligilla62f7ca02016-03-24 15:48:33 -07002845 /*
2846 * The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from
2847 * TSF timestamp in the RX MAC descriptor provided by HW.
2848 */
2849 A_UINT32 rx_tsf_l32;
2850
2851 /*
2852 *The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register
2853 * after the packet is received.
2854 */
2855 A_UINT32 rx_tsf_u32;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002856 /* This TLV is followed by array of bytes:
2857 * // management frame buffer
2858 * A_UINT8 bufp[];
2859 */
2860} wmi_mgmt_rx_hdr;
2861
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002862typedef struct {
2863 /** TSF timestamp */
2864 A_UINT32 tsf_timestamp;
2865
2866 /**
2867 * Current freq1, freq2
2868 *
2869 * [7:0]: freq1[lo]
2870 * [15:8] : freq1[hi]
2871 * [23:16]: freq2[lo]
2872 * [31:24]: freq2[hi]
2873 */
2874 A_UINT32 freq_info_1;
2875
2876 /**
2877 * Combined RSSI over all chains and channel width for this PHY error
2878 *
2879 * [7:0]: RSSI combined
2880 * [15:8]: Channel width (MHz)
2881 * [23:16]: PHY error code
2882 * [24:16]: reserved (future use)
2883 */
2884 A_UINT32 freq_info_2;
2885
2886 /**
2887 * RSSI on chain 0 through 3
2888 *
2889 * This is formatted the same as the PPDU_START RX descriptor
2890 * field:
2891 *
2892 * [7:0]: pri20
2893 * [15:8]: sec20
2894 * [23:16]: sec40
2895 * [31:24]: sec80
2896 */
2897 A_UINT32 rssi_chain0;
2898 A_UINT32 rssi_chain1;
2899 A_UINT32 rssi_chain2;
2900 A_UINT32 rssi_chain3;
2901
2902 /**
2903 * Last calibrated NF value for chain 0 through 3
2904 *
2905 * nf_list_1:
2906 *
2907 * + [15:0] - chain 0
2908 * + [31:16] - chain 1
2909 *
2910 * nf_list_2:
2911 *
2912 * + [15:0] - chain 2
2913 * + [31:16] - chain 3
2914 */
2915 A_UINT32 nf_list_1;
2916 A_UINT32 nf_list_2;
2917
2918 /** Length of the frame */
2919 A_UINT32 buf_len;
2920} wmi_single_phyerr_rx_hdr;
2921
2922#define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff
2923#define WMI_UNIFIED_FREQINFO_1_LO_S 0
2924#define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00
2925#define WMI_UNIFIED_FREQINFO_1_HI_S 8
2926#define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000
2927#define WMI_UNIFIED_FREQINFO_2_LO_S 16
2928#define WMI_UNIFIED_FREQINFO_2_HI 0xff000000
2929#define WMI_UNIFIED_FREQINFO_2_HI_S 24
2930
2931/*
2932 * Please keep in mind that these _SET macros break macro side effect
2933 * assumptions; don't be clever with them.
2934 */
2935#define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05302936 (WMI_F_MS((hdr)->freq_info_1, \
2937 WMI_UNIFIED_FREQINFO_ ## f ## _LO) \
2938 | (WMI_F_MS((hdr)->freq_info_1, \
2939 WMI_UNIFIED_FREQINFO_ ## f ## _HI) << 8))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002940
2941#define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \
2942 do { \
2943 WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \
2944 WMI_UNIFIED_FREQINFO_ ## f ## _LO); \
2945 WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \
2946 WMI_UNIFIED_FREQINFO_ ## f ## _HI); \
2947 } while (0)
2948
2949#define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff
2950#define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0
2951#define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00
2952#define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8
2953#define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000
2954#define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
2955
2956#define WMI_UNIFIED_RSSI_COMB_GET(hdr) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05302957 ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002958 WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
2959
2960#define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \
2961 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
2962 WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
2963
2964#define WMI_UNIFIED_CHWIDTH_GET(hdr) \
2965 WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
2966
2967#define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \
2968 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
2969 WMI_UNIFIED_FREQINFO_2_CHWIDTH);
2970
2971#define WMI_UNIFIED_PHYERRCODE_GET(hdr) \
2972 WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
2973
2974#define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \
2975 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
2976 WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
2977
2978#define WMI_UNIFIED_CHAIN_0 0x0000ffff
2979#define WMI_UNIFIED_CHAIN_0_S 0
2980#define WMI_UNIFIED_CHAIN_1 0xffff0000
2981#define WMI_UNIFIED_CHAIN_1_S 16
2982#define WMI_UNIFIED_CHAIN_2 0x0000ffff
2983#define WMI_UNIFIED_CHAIN_2_S 0
2984#define WMI_UNIFIED_CHAIN_3 0xffff0000
2985#define WMI_UNIFIED_CHAIN_3_S 16
2986
2987#define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1
2988#define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1
2989#define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2
2990#define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2
2991
2992#define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \
2993 ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, \
2994 WMI_UNIFIED_CHAIN_ ## c)))
2995
2996#define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \
2997 WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, (nf) & 0xffff, \
2998 WMI_UNIFIED_CHAIN_ ## c);
2999
3000/*
3001 * For now, this matches what the underlying hardware is doing.
3002 * Update ar6000ProcRxDesc() to use these macros when populating
3003 * the rx descriptor and then we can just copy the field over
3004 * to the WMI PHY notification without worrying about breaking
3005 * things.
3006 */
3007#define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff
3008#define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0
3009#define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00
3010#define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8
3011#define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000
3012#define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16
3013#define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000
3014#define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24
3015
3016#define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \
3017 WMI_F_RMW((hdr)->rssi_chain ## c, (rssi) & 0xff, \
3018 WMI_UNIFIED_RSSI_CHAN_ ## ch);
3019
3020#define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \
3021 ((int8_t) (WMI_F_MS((hdr)->rssi_chain ## c, \
3022 WMI_UNIFIED_RSSI_CHAN_ ## ch)))
3023
3024typedef struct {
3025 /** Phy error event header */
3026 wmi_single_phyerr_rx_hdr hdr;
3027 /** frame buffer */
3028 A_UINT8 bufp[1];
3029} wmi_single_phyerr_rx_event;
3030
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08003031/* PHY ERROR MASK 0 */
3032/* bits 1:0 defined but not published */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05303033#define WMI_PHY_ERROR_MASK0_RADAR (1<<2)
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08003034/* bits 23:3 defined but not published */
3035#define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1<<24)
3036/* bits 25:24 defined but not published */
3037#define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1<<26)
3038/* bits 31:27 defined but not published */
3039
3040/* PHY ERROR MASK 1
3041 * bits 13:0 defined but not published
3042 * bits 31:14 reserved
3043 */
3044
3045/* PHY ERROR MASK 2
3046 * bits 31:0 reserved
3047 */
3048
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003049typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303050 /* TLV tag and len; tag equals
3051 * WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr
3052 */
3053 A_UINT32 tlv_header;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003054 /** Phy error phy error count */
3055 A_UINT32 num_phyerr_events;
3056 A_UINT32 tsf_l32;
3057 A_UINT32 tsf_u32;
3058 A_UINT32 buf_len;
Govind Singh869c9872016-02-22 18:36:34 +05303059 union {
3060 /* OBSOLETE - will be removed once all refs are gone */
3061 A_UINT32 pmac_id;
3062 /** pdev_id for identifying the MAC
3063 * See macros starting with WMI_PDEV_ID_ for values.
3064 */
3065 A_UINT32 pdev_id;
3066 };
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08003067 A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
3068 A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
3069 A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
3070
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003071 /* This TLV is followed by array of bytes:
3072 * // frame buffer - contains multiple payloads in the order:
3073 * // header - payload, header - payload...
3074 * (The header is of type: wmi_single_phyerr_rx_hdr)
3075 * A_UINT8 bufp[];
3076 */
3077} wmi_comb_phyerr_rx_hdr;
3078
3079/* WMI MGMT TX */
3080typedef struct {
3081 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
3082 /** unique id identifying the VDEV, generated by the caller */
3083 A_UINT32 vdev_id;
3084 /** peer MAC address */
3085 wmi_mac_addr peer_macaddr;
3086 /** xmit rate */
3087 A_UINT32 tx_rate;
3088 /** xmit power */
3089 A_UINT32 tx_power;
3090 /** Buffer length in bytes */
3091 A_UINT32 buf_len;
3092 /* This TLV is followed by array of bytes:
3093 * // management frame buffer
3094 * A_UINT8 bufp[];
3095 */
3096} wmi_mgmt_tx_hdr;
3097
3098typedef struct {
3099 /*
3100 * TLV tag and len;
3101 * tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param
3102 */
3103 A_UINT32 tlv_header;
3104 A_UINT32 vdev_id;
3105 /* echoed in tx_compl_event */
3106 A_UINT32 desc_id;
3107 /* MHz units */
3108 A_UINT32 chanfreq;
3109 A_UINT32 paddr_lo;
3110 A_UINT32 paddr_hi;
3111 A_UINT32 frame_len;
3112 /* Buffer length in bytes */
3113 A_UINT32 buf_len;
3114 /*
3115 * This TLV is followed by array of bytes:
3116 * First 64 bytes of management frame
3117 * A_UINT8 bufp[];
3118 */
3119} wmi_mgmt_tx_send_cmd_fixed_param;
3120
3121typedef struct {
3122 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
3123 A_UINT32 value;
3124} wmi_echo_event_fixed_param;
3125
3126typedef struct {
3127 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
3128 A_UINT32 value;
3129} wmi_echo_cmd_fixed_param;
3130
3131typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303132 /* TLV tag and len; tag equals
3133 * WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param
3134 */
3135 A_UINT32 tlv_header;
3136 /** pdev_id for identifying the MAC
3137 * See macros starting with WMI_PDEV_ID_ for values.
3138 */
3139 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003140 /** reg domain code */
3141 A_UINT32 reg_domain;
3142 A_UINT32 reg_domain_2G;
3143 A_UINT32 reg_domain_5G;
3144 A_UINT32 conformance_test_limit_2G;
3145 A_UINT32 conformance_test_limit_5G;
Govind Singh32cced32016-02-01 13:33:09 +05303146 A_UINT32 dfs_domain;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003147} wmi_pdev_set_regdomain_cmd_fixed_param;
3148
3149typedef struct {
3150 /** true for scan start and flase for scan end */
3151 A_UINT32 scan_start;
3152} wmi_pdev_scan_cmd;
3153
Govind Singhc7d51942016-02-01 12:09:31 +05303154/* WMI support for setting ratemask in target */
3155
3156typedef struct {
3157 A_UINT32 tlv_header;
3158 /*
3159 * TLV tag and len; tag equals
3160 * WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param
3161 */
3162 A_UINT32 vdev_id;
3163 /*
3164 * 0 - cck/ofdm
3165 * 1 - HT
3166 * 2 - VHT */
3167 A_UINT32 type;
3168
3169 A_UINT32 mask_lower32;
3170 A_UINT32 mask_higher32;
3171} wmi_vdev_config_ratemask_cmd_fixed_param;
3172
3173/* nrp action - Filter Neighbor Rx Packets - add/remove filter */
3174enum {
3175 WMI_FILTER_NRP_ACTION_ADD = 0x1,
3176 WMI_FILTER_NRP_ACTION_REMOVE = 0x2,
3177 WMI_FILTER_NRP_ACTION_GET_LIST = 0x3,
3178}; /* nrp - Neighbor Rx Packets */
3179
3180/* nrp type - Filter Neighbor Rx Packets - ap/client addr */
3181enum {
3182 WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1,
3183 WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2,
3184};
3185
3186/* nrp flag - Filter Neighbor Rx Packets
3187 * (capture flag, 2 & 3 not initially supported)
3188 */
3189enum {
3190 WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1,
3191 WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2,
3192 WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3,
3193};
3194
3195/* Filter for Neighbor Rx Packets */
3196typedef struct {
3197 A_UINT32 tlv_header;
3198 /*
3199 * TLV tag and len; tag equals
3200 * WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param
3201 */
3202 A_UINT32 vdev_id;
3203 /* AP Bssid or Client Mac-addr */
3204 wmi_mac_addr addr;
3205 /* Add/Remove NRF Filter */
3206 A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
3207 /* client/ap filter */
3208 A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
3209 /* optional - tx/rx capture */
3210 A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
3211 /* BSSID index - index of the BSSID register */
3212 A_UINT32 bssid_idx;
3213} wmi_vdev_filter_nrp_config_cmd_fixed_param;
3214
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003215/*Command to set/unset chip in quiet mode*/
3216typedef struct {
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05303217 /*
3218 * TLV tag and len; tag equals
3219 * WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param
3220 */
3221 A_UINT32 tlv_header;
3222 /*
3223 * pdev_id for identifying the MAC, See macros
3224 * starting with WMI_PDEV_ID_ for values.
3225 */
3226 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003227 A_UINT32 period; /*period in TUs */
3228 A_UINT32 duration; /*duration in TUs */
3229 A_UINT32 next_start; /*offset in TUs */
3230 A_UINT32 enabled; /*enable/disable */
3231} wmi_pdev_set_quiet_cmd_fixed_param;
3232
Govind Singh869c9872016-02-22 18:36:34 +05303233typedef struct {
3234 /* TLV tag and len; tag equals
3235 * WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param
3236 */
3237 A_UINT32 tlv_header;
3238 A_UINT32 vdev_id; /* Virtual interface ID */
3239 A_UINT32 period; /* period in TUs */
3240 A_UINT32 duration; /* duration in TUs */
3241 A_UINT32 next_start; /* offset in TUs */
3242 A_UINT32 enabled; /* enable/disable */
3243} wmi_vdev_set_quiet_cmd_fixed_param;
3244
Krishna Kumaar Natarajanea0a7962016-04-16 14:09:09 +05303245typedef struct {
3246 /*
3247 * TLV tag and len; tag equals
3248 * WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param
3249 */
3250 A_UINT32 tlv_header;
3251 /*
3252 * vdev id indicating to which the vdev custom aggregation size
3253 * will be applied.
3254 */
3255 A_UINT32 vdev_id;
3256 /*
3257 * Size for tx aggregation (max MPDUs per A-MPDU) for the vdev
3258 * mentioned in vdev id
3259 */
3260 A_UINT32 tx_aggr_size;
3261 /*
3262 * Size for rx aggregation (block ack window size limit) for
3263 * the vdev mentioned in vdev id
3264 */
3265 A_UINT32 rx_aggr_size;
3266} wmi_vdev_set_custom_aggr_size_cmd_fixed_param;
3267
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003268/*
3269 * Command to enable/disable Green AP Power Save.
3270 * This helps conserve power during AP operation. When the AP has no
3271 * stations associated with it, the host can enable Green AP Power Save
3272 * to request the firmware to shut down all but one transmit and receive
3273 * chains.
3274 */
3275typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303276 /** TLV tag and len; tag equals
3277 * WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param
3278 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003279 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303280 /** pdev_id for identifying the MAC
3281 * See macros starting with WMI_PDEV_ID_ for values.
3282 */
3283 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003284 A_UINT32 enable; /*1:enable, 0:disable */
3285} wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
3286
3287#define MAX_HT_IE_LEN 32
Govind Singh869c9872016-02-22 18:36:34 +05303288/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003289typedef struct {
3290 A_UINT32 tlv_header;
3291 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
3292 A_UINT32 reserved0;
3293 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3294 A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
3295 A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
3296 A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
3297 /** The TLV for the HT IE follows:
3298 * A_UINT32 ie_data[];
3299 */
3300} wmi_pdev_set_ht_ie_cmd_fixed_param;
3301
3302#define MAX_VHT_IE_LEN 32
Govind Singh869c9872016-02-22 18:36:34 +05303303/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003304typedef struct {
3305 A_UINT32 tlv_header;
3306 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
3307 A_UINT32 reserved0;
3308 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3309 A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
3310 A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
3311 A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
3312 /** The TLV for the VHT IE follows:
3313 * A_UINT32 ie_data[];
3314 */
3315} wmi_pdev_set_vht_ie_cmd_fixed_param;
3316
3317typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303318 /** TLV tag and len; tag equals
3319 * WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param
3320 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003321 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303322 /** pdev_id for identifying the MAC
3323 * See macros starting with WMI_PDEV_ID_ for values.
3324 */
3325 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003326 wmi_mac_addr base_macaddr;
3327} wmi_pdev_set_base_macaddr_cmd_fixed_param;
3328
3329/*
3330 * For now, the spectral configuration is global rather than
3331 * per-vdev. The vdev is a placeholder and will be ignored
3332 * by the firmware.
3333 */
3334typedef struct {
3335 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
3336 A_UINT32 vdev_id;
3337 A_UINT32 spectral_scan_count;
3338 A_UINT32 spectral_scan_period;
3339 A_UINT32 spectral_scan_priority;
3340 A_UINT32 spectral_scan_fft_size;
3341 A_UINT32 spectral_scan_gc_ena;
3342 A_UINT32 spectral_scan_restart_ena;
3343 A_UINT32 spectral_scan_noise_floor_ref;
3344 A_UINT32 spectral_scan_init_delay;
3345 A_UINT32 spectral_scan_nb_tone_thr;
3346 A_UINT32 spectral_scan_str_bin_thr;
3347 A_UINT32 spectral_scan_wb_rpt_mode;
3348 A_UINT32 spectral_scan_rssi_rpt_mode;
3349 A_UINT32 spectral_scan_rssi_thr;
3350 A_UINT32 spectral_scan_pwr_format;
3351 A_UINT32 spectral_scan_rpt_mode;
3352 A_UINT32 spectral_scan_bin_scale;
3353 A_UINT32 spectral_scan_dBm_adj;
3354 A_UINT32 spectral_scan_chn_mask;
3355} wmi_vdev_spectral_configure_cmd_fixed_param;
3356
3357/*
3358 * Enabling, disabling and triggering the spectral scan
3359 * is a per-vdev operation. That is, it will set channel
3360 * flags per vdev rather than globally; so concurrent scan/run
3361 * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
3362 */
3363typedef struct {
3364 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
3365 A_UINT32 vdev_id;
3366 /* 0 - ignore; 1 - trigger, 2 - clear trigger */
3367 A_UINT32 trigger_cmd;
3368 /* 0 - ignore; 1 - enable, 2 - disable */
3369 A_UINT32 enable_cmd;
3370} wmi_vdev_spectral_enable_cmd_fixed_param;
3371
3372typedef enum {
3373 WMI_CSA_IE_PRESENT = 0x00000001,
3374 WMI_XCSA_IE_PRESENT = 0x00000002,
3375 WMI_WBW_IE_PRESENT = 0x00000004,
3376 WMI_CSWARP_IE_PRESENT = 0x00000008,
3377} WMI_CSA_EVENT_IES_PRESENT_FLAG;
3378
3379/* wmi CSA receive event from beacon frame */
3380typedef struct {
3381 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
3382 A_UINT32 i_fc_dur;
3383/* Bit 0-15: FC */
3384/* Bit 16-31: DUR */
3385 wmi_mac_addr i_addr1;
3386 wmi_mac_addr i_addr2;
3387 /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
3388 * changed in the future without breaking WMI compatibility */
3389 A_UINT32 csa_ie[2];
3390 A_UINT32 xcsa_ie[2];
3391 A_UINT32 wb_ie[2];
3392 A_UINT32 cswarp_ie;
3393 A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
3394} wmi_csa_event_fixed_param;
3395
3396typedef enum {
Govind Singh32cced32016-02-01 13:33:09 +05303397 WAL_PEER_MCAST2UCAST_DISABLED = 0,
3398 /* Drop the frames if match is not found */
3399 WAL_PEER_MCAST2UCAST_DROP_EMPTY = 1,
3400 /* Send as mcast if match is not found */
3401 WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2,
3402} WMI_PEER_MCAST2UCAST_MODE;
3403
3404typedef enum {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003405 /** TX chain mask */
3406 WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
3407 /** RX chain mask */
3408 WMI_PDEV_PARAM_RX_CHAIN_MASK,
3409 /** TX power limit for 2G Radio */
3410 WMI_PDEV_PARAM_TXPOWER_LIMIT2G,
3411 /** TX power limit for 5G Radio */
3412 WMI_PDEV_PARAM_TXPOWER_LIMIT5G,
3413 /** TX power scale */
3414 WMI_PDEV_PARAM_TXPOWER_SCALE,
3415 /** Beacon generation mode . 0: host, 1: target */
3416 WMI_PDEV_PARAM_BEACON_GEN_MODE,
3417 /** Beacon generation mode . 0: staggered 1: bursted */
3418 WMI_PDEV_PARAM_BEACON_TX_MODE,
3419 /** Resource manager off chan mode .
3420 * 0: turn off off chan mode. 1: turn on offchan mode
3421 */
3422 WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
3423 /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */
3424 WMI_PDEV_PARAM_PROTECTION_MODE,
3425 /** Dynamic bandwidth 0: disable 1: enable */
3426 WMI_PDEV_PARAM_DYNAMIC_BW,
3427 /** Non aggregrate/ 11g sw retry threshold.0-disable */
3428 WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
3429 /** aggregrate sw retry threshold. 0-disable*/
3430 WMI_PDEV_PARAM_AGG_SW_RETRY_TH,
3431 /** Station kickout threshold (non of consecutive failures).0-disable */
3432 WMI_PDEV_PARAM_STA_KICKOUT_TH,
3433 /** Aggerate size scaling configuration per AC */
3434 WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING,
3435 /** LTR enable */
3436 WMI_PDEV_PARAM_LTR_ENABLE,
3437 /** LTR latency for BE, in us */
3438 WMI_PDEV_PARAM_LTR_AC_LATENCY_BE,
3439 /** LTR latency for BK, in us */
3440 WMI_PDEV_PARAM_LTR_AC_LATENCY_BK,
3441 /** LTR latency for VI, in us */
3442 WMI_PDEV_PARAM_LTR_AC_LATENCY_VI,
3443 /** LTR latency for VO, in us */
3444 WMI_PDEV_PARAM_LTR_AC_LATENCY_VO,
3445 /** LTR AC latency timeout, in ms */
3446 WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
3447 /** LTR platform latency override, in us */
3448 WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
3449 /** LTR-M override, in us */
3450 WMI_PDEV_PARAM_LTR_RX_OVERRIDE,
3451 /** Tx activity timeout for LTR, in us */
3452 WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
3453 /** L1SS state machine enable */
3454 WMI_PDEV_PARAM_L1SS_ENABLE,
3455 /** Deep sleep state machine enable */
3456 WMI_PDEV_PARAM_DSLEEP_ENABLE,
3457 /** RX buffering flush enable */
3458 WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
3459 /** RX buffering matermark */
3460 WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
3461 /** RX buffering timeout enable */
3462 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
3463 /** RX buffering timeout value */
3464 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
3465 /** pdev level stats update period in ms */
3466 WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
3467 /** vdev level stats update period in ms */
3468 WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
3469 /** peer level stats update period in ms */
3470 WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
3471 /** beacon filter status update period */
3472 WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
3473 /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
3474 WMI_PDEV_PARAM_PMF_QOS,
3475 /** Access category on which ARP frames are sent */
3476 WMI_PDEV_PARAM_ARP_AC_OVERRIDE,
3477 /** DCS configuration */
3478 WMI_PDEV_PARAM_DCS,
3479 /** Enable/Disable ANI on target */
3480 WMI_PDEV_PARAM_ANI_ENABLE,
3481 /** configure the ANI polling period */
3482 WMI_PDEV_PARAM_ANI_POLL_PERIOD,
3483 /** configure the ANI listening period */
3484 WMI_PDEV_PARAM_ANI_LISTEN_PERIOD,
3485 /** configure OFDM immunity level */
3486 WMI_PDEV_PARAM_ANI_OFDM_LEVEL,
3487 /** configure CCK immunity level */
3488 WMI_PDEV_PARAM_ANI_CCK_LEVEL,
3489 /** Enable/Disable CDD for 1x1 STAs in rate control module */
3490 WMI_PDEV_PARAM_DYNTXCHAIN,
3491 /** Enable/Disable proxy STA */
3492 WMI_PDEV_PARAM_PROXY_STA,
3493 /** Enable/Disable low power state when all VDEVs are inactive/idle. */
3494 WMI_PDEV_PARAM_IDLE_PS_CONFIG,
3495 /** Enable/Disable power gating sleep */
3496 WMI_PDEV_PARAM_POWER_GATING_SLEEP,
3497 /** Enable/Disable Rfkill */
3498 WMI_PDEV_PARAM_RFKILL_ENABLE,
3499 /** Set Bursting DUR */
3500 WMI_PDEV_PARAM_BURST_DUR,
3501 /** Set Bursting ENABLE */
3502 WMI_PDEV_PARAM_BURST_ENABLE,
3503 /** HW rfkill config */
3504 WMI_PDEV_PARAM_HW_RFKILL_CONFIG,
3505 /** Enable radio low power features */
3506 WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE,
3507 /** L1SS entry and residency time track */
3508 WMI_PDEV_PARAM_L1SS_TRACK,
3509 /** set hyst at runtime, requirement from SS */
3510 WMI_PDEV_PARAM_HYST_EN,
3511 /** Enable/ Disable POWER COLLAPSE */
3512 WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE,
3513 /** configure LED system state */
3514 WMI_PDEV_PARAM_LED_SYS_STATE,
3515 /** Enable/Disable LED */
3516 WMI_PDEV_PARAM_LED_ENABLE,
3517 /** set DIRECT AUDIO time latency */
Govind Singh869c9872016-02-22 18:36:34 +05303518 WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003519 /** set DIRECT AUDIO Feature ENABLE */
Govind Singh869c9872016-02-22 18:36:34 +05303520 WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003521 /** pdev level whal mib stats update enable */
3522 WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE,
3523 /** ht/vht info based on vdev */
3524 WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD,
3525 /** Set CTS channel BW for dynamic BW adjustment feature */
3526 WMI_PDEV_PARAM_CTS_CBW,
3527 /** Set GPIO pin info used by WNTS */
3528 WMI_PDEV_PARAM_WNTS_CONFIG,
3529 /** Enable/Disable hardware adaptive early rx feature */
3530 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE,
3531 /** The minimum early rx duration, to ensure early rx duration is non-zero */
3532 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP,
3533 /** Increasing/decreasing step used by hardware */
3534 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP,
3535 /** The fixed early rx duration when adaptive early rx is disabled */
3536 WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP,
3537 /** Enable/Disable bmiss based adaptive beacon timeout feature */
3538 WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE,
3539 /*
3540 * The minimum beacon timeout duration, to ensure beacon timeout
3541 * duration is non-zero
3542 */
3543 WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT,
3544 /** Increasing/decreasing step used by hardware */
3545 WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP,
3546 /*
3547 * The fixed beacon timeout duration when bmiss based adaptive beacon
3548 * timeout is disabled
3549 */
3550 WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT,
3551 /*
3552 * Enable/Disable Congestion Estimator based adaptive beacon
3553 * timeout feature */
3554 WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE,
3555 /*
3556 * combo value of ce_id, ce_threshold, ce_time, refer
3557 * to WMI_CE_BTO_CE_ID_MASK
3558 */
3559 WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE,
3560 /** 2G TX chain mask */
3561 WMI_PDEV_PARAM_TX_CHAIN_MASK_2G,
3562 /** 2G RX chain mask */
3563 WMI_PDEV_PARAM_RX_CHAIN_MASK_2G,
3564 /** 5G TX chain mask */
3565 WMI_PDEV_PARAM_TX_CHAIN_MASK_5G,
3566 /** 5G RX chain mask */
3567 WMI_PDEV_PARAM_RX_CHAIN_MASK_5G,
3568 /* Set tx chain mask for CCK rates */
3569 WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK,
3570 /* Set tx chain mask for 1SS stream */
3571 WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS,
Nirav Shahe1e4a812015-11-05 11:15:54 +05303572 /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected*/
3573 WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG,
Nirav Shah47062ff2015-11-05 11:21:08 +05303574 /* TX power backoff in dB: tx power -= param value
3575 * Host passes values(DB) to Halphy, Halphy reduces the power table by
3576 * the values. Safety check will happen in Halphy
3577 */
3578 WMI_PDEV_PARAM_TXPOWER_DECR_DB,
Govind Singh32cced32016-02-01 13:33:09 +05303579 /** enable and disable aggregate burst along with duration */
3580 WMI_PDEV_PARAM_AGGR_BURST,
3581 /** Set the global RX decap mode */
3582 WMI_PDEV_PARAM_RX_DECAP_MODE,
3583 /** Enable/Disable Fast channel reset */
3584 WMI_PDEV_PARAM_FAST_CHANNEL_RESET,
3585 /** Default antenna for Smart antenna */
3586 WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA,
3587 /** Set the user-specified antenna gain */
3588 WMI_PDEV_PARAM_ANTENNA_GAIN,
3589 /** Set the user-specified RX filter */
3590 WMI_PDEV_PARAM_RX_FILTER,
3591 /*
3592 * configure the user-specified MCAST tid for managed mcast feature
3593 * 0-15 is the valid range. 0xff will clear the tid setting
3594 */
3595 WMI_PDEV_SET_MCAST_TO_UCAST_TID,
3596 /** Enable/Disable Proxy sta mode */
3597 WMI_PDEV_PARAM_PROXY_STA_MODE,
3598 /*
3599 * configure the mcast2ucast mode for the pdev->peer_mcast.
3600 * See WMI_PEER_MCAST2UCAST_MODE for possible values
3601 */
3602 WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE,
3603 /** Sets the Mcast buffers for cloning, to support Mcast enhancement */
3604 WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER,
3605 /** Remove the Mcast buffers added by host */
3606 WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER,
3607 /** En/disable station power save state indication */
3608 WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE,
3609 /** Access category on which ARP frames are sent */
3610 WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE,
3611 /** allow or disallow interbss frame forwarding */
3612 WMI_PDEV_PARAM_BLOCK_INTERBSS,
3613 /** Enable/Disable reset */
3614 WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID,
3615 /** Enable/Disable/Set MSDU_TTL in milliseconds. */
3616 WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID,
3617 /** Set global PPDU duration limit (usec). */
3618 WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID,
3619 /** set txbf sounding period of vap in milliseconds */
3620 WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID,
3621 /** Set promiscuous mode */
3622 WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID,
3623 /** Set burst mode */
3624 WMI_PDEV_PARAM_SET_BURST_MODE_CMDID,
3625 /** enable enhanced stats */
3626 WMI_PDEV_PARAM_EN_STATS,
3627 /** Set mu-grouping policy */
3628 WMI_PDEV_PARAM_MU_GROUP_POLICY,
3629 /** Channel Hopping Enable */
3630 WMI_PDEV_PARAM_NOISE_DETECTION,
3631 /** Set Channel Hopping NF threshold in dBm */
3632 WMI_PDEV_PARAM_NOISE_THRESHOLD,
3633 /** Set PAPRD policy */
3634 WMI_PDEV_PARAM_DPD_ENABLE,
3635 /** Enable/disable mcast/bcast echo, used by ProxySTA */
3636 WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO,
3637 /** ATF enable/disable strict schedule */
3638 WMI_PDEV_PARAM_ATF_STRICT_SCH,
3639 /** ATF set access category duration, B0-B29 duration, B30-B31: AC */
3640 WMI_PDEV_PARAM_ATF_SCHED_DURATION,
3641 /** Default antenna polarization */
3642 WMI_PDEV_PARAM_ANT_PLZN,
3643 /** Set mgmt retry limit */
3644 WMI_PDEV_PARAM_MGMT_RETRY_LIMIT,
3645 /** Set CCA sensitivity level in dBm */
3646 WMI_PDEV_PARAM_SENSITIVITY_LEVEL,
3647 /** Set 2G positive and negative Tx power in 0.5dBm units */
3648 WMI_PDEV_PARAM_SIGNED_TXPOWER_2G,
3649 /** Set 5G positive and negative Tx power in 0.5dBm units */
3650 WMI_PDEV_PARAM_SIGNED_TXPOWER_5G,
3651 /** Enable/disble AMSDU for tids */
3652 WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU,
3653 /** Enable/disable AMPDU for tids */
3654 WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU,
3655 /** Set CCA threshold in dBm */
3656 WMI_PDEV_PARAM_CCA_THRESHOLD,
3657 /** RTS Fixed rate setting */
3658 WMI_PDEV_PARAM_RTS_FIXED_RATE,
3659 /** Pdev reset */
3660 WMI_PDEV_PARAM_PDEV_RESET,
3661 /** wapi mbssid offset **/
3662 WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET,
3663 /** ARP DEBUG source address*/
3664 WMI_PDEV_PARAM_ARP_DBG_SRCADDR,
3665 /** ARP DEBUG destination address*/
3666 WMI_PDEV_PARAM_ARP_DBG_DSTADDR,
3667 /** ATF enable/disable obss noise scheduling */
3668 WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH,
3669 /** ATF obss noise scaling factor */
3670 WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR,
3671 /**
3672 * TX power reduction scaling exponent - final tx power is the
3673 * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by
3674 * 2^(scale exponent). For example:
3675 * If this scale exponent is 0, the power is unchanged (divided by 2^0)
3676 * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB
3677 * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB
3678 * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB
3679 */
3680 WMI_PDEV_PARAM_CUST_TXPOWER_SCALE,
3681 /** ATF enabe/disabe dynamically */
3682 WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE,
3683
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003684} WMI_PDEV_PARAM;
3685
3686typedef enum {
3687 /** Set the loglevel */
3688 WMI_DBGLOG_LOG_LEVEL = 0x1,
3689 /** Enable VAP level debug */
3690 WMI_DBGLOG_VAP_ENABLE,
3691 /** Disable VAP level debug */
3692 WMI_DBGLOG_VAP_DISABLE,
3693 /** Enable MODULE level debug */
3694 WMI_DBGLOG_MODULE_ENABLE,
3695 /** Disable MODULE level debug */
3696 WMI_DBGLOG_MODULE_DISABLE,
3697 /** Enable MODULE level debug */
3698 WMI_DBGLOG_MOD_LOG_LEVEL,
3699 /** set type of the debug output */
3700 WMI_DBGLOG_TYPE,
3701 /** Enable Disable debug */
3702 WMI_DBGLOG_REPORT_ENABLE
3703} WMI_DBG_PARAM;
3704
3705/* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
3706typedef enum {
3707 WMI_CTS_CBW_INVALID = 0,
3708 WMI_CTS_CBW_20,
3709 WMI_CTS_CBW_40,
3710 WMI_CTS_CBW_80,
3711 WMI_CTS_CBW_80_80,
3712 WMI_CTS_CBW_160,
3713} WMI_CTS_CBW;
3714
3715typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303716 /** TLV tag and len; tag equals
3717 * WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param
3718 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003719 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303720 /** pdev_id for identifying the MAC
3721 * See macros starting with WMI_PDEV_ID_ for values.
3722 */
3723 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003724 /** parameter id */
3725 A_UINT32 param_id;
3726 /** parametr value */
3727 A_UINT32 param_value;
3728} wmi_pdev_set_param_cmd_fixed_param;
3729
3730typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303731 /** TLV tag and len; tag equals
3732 * WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param
3733 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003734 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303735 /** pdev_id for identifying the MAC
3736 * See macros starting with WMI_PDEV_ID_ for values.
3737 */
3738 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003739 /** parameter */
3740 A_UINT32 param;
3741} wmi_pdev_get_tpc_config_cmd_fixed_param;
3742
3743#define WMI_FAST_DIVERSITY_BIT_OFFSET 0
3744#define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
3745
Himanshu Agarwal86319542016-05-24 09:00:39 +05303746#define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT 2
3747#define WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK \
3748 (0xf << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
3749#define WMI_SLOW_DIVERSITY_CH0_WEIGHT_GET_BITS(word32) \
3750 (((word32) & WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK) >> \
3751 WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT)
3752#define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SET_BITS(word32, value) \
3753 do { \
3754 (word32) &= ~WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
3755 (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) & \
3756 WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \
3757 } while (0)
3758
3759#define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT 6
3760#define WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK \
3761 (0xf << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
3762#define WMI_SLOW_DIVERSITY_CH1_WEIGHT_GET_BITS(word32) \
3763 (((word32) & WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK) >> \
3764 WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT)
3765#define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SET_BITS(word32, value) \
3766 do { \
3767 (word32) &= ~WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
3768 (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) & \
3769 WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \
3770 } while (0)
3771
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003772typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303773 /** TLV tag and len; tag equals
3774 * WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param
3775 */
3776 A_UINT32 tlv_header;
3777 union {
3778 /* OBSOLETE - will be removed once all refs are gone */
3779 A_UINT32 mac_id;
3780 /** pdev_id for identifying the MAC
3781 * See macros starting with WMI_PDEV_ID_ for values.
3782 */
3783 A_UINT32 pdev_id;
3784 };
Himanshu Agarwal86319542016-05-24 09:00:39 +05303785 /*
3786 * The following "value" field is divided into bit fields as follows:
3787 * bits | purpose
3788 * -----+---------------------------------------
3789 * 0 | enable/disable FAST diversity
3790 * 1 | enable/disable SLOW diversity
3791 * 5:2 | chain0 slow-diversity weighting factor
3792 * 9:6 | chain1 slow-diversity weighting factor
3793 * 31:10| currenty unused (set to 0x0)
3794 * Refer to the above WMI_[FAST/SLOW]_DIVERSITY constants.
Govind Singh869c9872016-02-22 18:36:34 +05303795 */
3796 A_UINT32 value;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003797} wmi_pdev_set_antenna_diversity_cmd_fixed_param;
3798
3799#define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
3800
3801typedef struct {
3802 /*
3803 * TLV tag and len; tag equals
3804 * WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param
3805 */
3806 A_UINT32 tlv_header;
3807 /* vdev_id, where RSSI monitoring will take place */
3808 A_UINT32 vdev_id;
3809 /*
3810 * host will configure request_id and firmware echo
3811 * this id in RSSI_BREACH_EVENT
3812 */
3813 A_UINT32 request_id;
3814 /*
3815 * bit [0-2] = low_rssi_breach_enabled[0-2]
3816 * enabled, bit [3-5] = hi_rssi_breach_enabled[0-2]
3817 */
3818 A_UINT32 enabled_bitmap;
3819 /* unit dBm. host driver to make sure [0] > [1] > [2] */
3820 A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED];
3821 /* unit dBm. host driver to make sure [0] < [1] < [2] */
3822 A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED];
3823 /*
3824 * unit dBm. once low rssi[] breached, same event
3825 * bitmap will be generated only after signal gets better
3826 * than this level. This value is adopted for all low_rssi_breach_threshold[3]
3827 */
3828 A_UINT32 lo_rssi_reenable_hysteresis;
3829 /*
3830 * unit dBm. once hi rssi[] breached, same event bitmap
3831 * will be generated only after signal gets worse than this
3832 * level. This value is adopted for all hi_rssi_breach_threshold[3]
3833 */
3834 A_UINT32 hi_rssi_reenable_histeresis;
3835 /*
3836 * After last event is generated, we wait
3837 * until this interval to generate next event
3838 */
3839 A_UINT32 min_report_interval;
3840 /* this is to suppress number of event to be generated */
3841 A_UINT32 max_num_report;
3842} wmi_rssi_breach_monitor_config_fixed_param;
3843
3844typedef struct {
3845 /** parameter */
3846 A_UINT32 param;
3847} wmi_pdev_dump_cmd;
3848
3849typedef enum {
3850 PAUSE_TYPE_CHOP = 0x1,
3851 /** for MCC (switch channel), only vdev_map is valid */
3852 PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */
3853 PAUSE_TYPE_UAPSD = 0x3,
3854 /** for uapsd, only peer_id and tid_map are valid. */
3855 PAUSE_TYPE_P2P_CLIENT_NOA = 0x4,
3856 /** only vdev_map is valid, actually only one vdev id is set at one time */
3857 PAUSE_TYPE_P2P_GO_PS = 0x5,
3858 /** only vdev_map is valid, actually only one vdev id is set at one time */
3859 PAUSE_TYPE_STA_ADD_BA = 0x6,
3860 /** only peer_id and tid_map are valid, actually only one tid is set at one time */
3861 PAUSE_TYPE_AP_PS = 0x7,
3862 /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
3863 PAUSE_TYPE_IBSS_PS = 0x8,
3864 /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +05303865 PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9,
3866 /*
3867 * for TDLS offchannel MCC (switch channel), only vdev_map is valid,
3868 * TDLS connection tracker needs to be notified
3869 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003870 PAUSE_TYPE_HOST = 0x15,
3871 /** host is requesting vdev pause */
3872} wmi_tx_pause_type;
3873
3874typedef enum {
3875 ACTION_PAUSE = 0x0,
3876 ACTION_UNPAUSE = 0x1,
3877} wmi_tx_pause_action;
3878
3879typedef struct {
3880 A_UINT32 tlv_header;
3881 A_UINT32 pause_type;
3882 A_UINT32 action;
3883 A_UINT32 vdev_map;
3884 A_UINT32 peer_id;
3885 A_UINT32 tid_map;
3886} wmi_tx_pause_event_fixed_param;
3887
3888typedef enum {
3889 WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
3890 WMI_MGMT_TX_COMP_TYPE_DISCARD,
3891 WMI_MGMT_TX_COMP_TYPE_INSPECT,
3892 WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
3893 WMI_MGMT_TX_COMP_TYPE_MAX,
3894} WMI_MGMT_TX_COMP_STATUS_TYPE;
3895
3896typedef struct {
3897 A_UINT32 tlv_header;
3898 A_UINT32 desc_id; /* from tx_send_cmd */
3899 A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */
3900} wmi_mgmt_tx_compl_event_fixed_param;
3901
3902#define WMI_TPC_RATE_MAX 160
3903/* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
3904#define WMI_TPC_TX_NUM_CHAIN 4
3905
3906typedef enum {
3907 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
3908 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
3909 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
3910} WMI_TPC_CONFIG_EVENT_FLAG;
3911
3912typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303913 /* TLV tag and len; tag equals
3914 * WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param
3915 */
3916 A_UINT32 tlv_header;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003917 A_UINT32 regDomain;
3918 A_UINT32 chanFreq;
3919 A_UINT32 phyMode;
3920 A_UINT32 twiceAntennaReduction;
3921 A_UINT32 twiceMaxRDPower;
3922 A_INT32 twiceAntennaGain;
3923 A_UINT32 powerLimit;
3924 A_UINT32 rateMax;
3925 A_UINT32 numTxChain;
3926 A_UINT32 ctl;
3927 A_UINT32 flags;
Govind Singh869c9872016-02-22 18:36:34 +05303928 /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without
3929 * breaking the WMI compatibility
3930 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003931 A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
3932 A_INT8
3933 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN]
3934 [WMI_TPC_TX_NUM_CHAIN];
3935 A_INT8
3936 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN]
3937 [WMI_TPC_TX_NUM_CHAIN];
3938 A_INT8
3939 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN]
3940 [WMI_TPC_TX_NUM_CHAIN];
Govind Singh869c9872016-02-22 18:36:34 +05303941 /** pdev_id for identifying the MAC
3942 * See macros starting with WMI_PDEV_ID_ for values.
3943 */
3944 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003945 /* This TLV is followed by a byte array:
3946 * A_UINT8 ratesArray[];
3947 */
3948} wmi_pdev_tpc_config_event_fixed_param;
3949
3950typedef struct {
3951 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */
3952 A_UINT32 periodCnt;
3953 A_UINT32 L1Cnt;
3954 A_UINT32 L11Cnt;
3955 A_UINT32 L12Cnt;
3956 A_UINT32 L1Entry;
3957 A_UINT32 L11Entry;
3958 A_UINT32 L12Entry;
Govind Singh869c9872016-02-22 18:36:34 +05303959 /** pdev_id for identifying the MAC
3960 * See macros starting with WMI_PDEV_ID_ for values.
3961 */
3962 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003963} wmi_pdev_l1ss_track_event_fixed_param;
3964
3965typedef struct {
3966 A_UINT32 len;
3967 A_UINT32 msgref;
3968 A_UINT32 segmentInfo;
3969} wmi_pdev_seg_hdr_info;
3970
3971/*
3972 * Transmit power scale factor.
3973 *
3974 */
3975typedef enum {
3976 WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
3977 WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
3978 WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
3979 WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
3980 WMI_TP_SCALE_MIN = 4, /* min, but still on */
3981 WMI_TP_SCALE_SIZE = 5, /* max num of enum */
3982} WMI_TP_SCALE;
3983
3984#define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
3985
3986typedef struct {
3987 /** message buffer, NULL terminated */
3988 char bufp[WMI_MAX_DEBUG_MESG];
3989} wmi_debug_mesg_event;
3990
3991enum {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003992 /** P2P device */
3993 VDEV_SUBTYPE_P2PDEV = 0,
3994 /** P2P client */
3995 VDEV_SUBTYPE_P2PCLI,
3996 /** P2P GO */
3997 VDEV_SUBTYPE_P2PGO,
3998 /** BT3.0 HS */
3999 VDEV_SUBTYPE_BT,
4000};
4001
4002typedef struct {
4003 /** idnore power , only use flags , mode and freq */
4004 wmi_channel chan;
4005} wmi_pdev_set_channel_cmd;
4006
4007typedef enum {
4008 WMI_PKTLOG_EVENT_RX = 0x1,
4009 WMI_PKTLOG_EVENT_TX = 0x2,
4010 WMI_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
4011 WMI_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
4012 /* 0x10 used by deprecated DBG_PRINT */
4013 WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x20, /* To support Smart Antenna */
4014} WMI_PKTLOG_EVENT;
4015
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07004016typedef enum {
4017 /* (default) FW will decide under what conditions to enable pktlog */
4018 WMI_PKTLOG_ENABLE_AUTO = 0,
4019 WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */
4020} WMI_PKTLOG_ENABLE;
4021
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004022typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05304023 /** TLV tag and len; tag equals
4024 * WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param
4025 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004026 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05304027 /** pdev_id for identifying the MAC
4028 * See macros starting with WMI_PDEV_ID_ for values.
4029 */
4030 A_UINT32 pdev_id;
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07004031 A_UINT32 evlist; /* WMI_PKTLOG_EVENT */
4032 A_UINT32 enable; /* WMI_PKTLOG_ENABLE */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004033} wmi_pdev_pktlog_enable_cmd_fixed_param;
4034
4035typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05304036 /** TLV tag and len; tag equals
4037 * WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param
4038 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004039 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05304040 /** pdev_id for identifying the MAC
4041 * See macros starting with WMI_PDEV_ID_ for values.
4042 */
4043 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004044} wmi_pdev_pktlog_disable_cmd_fixed_param;
4045
Govind Singh45ef44a2016-02-01 17:45:22 +05304046typedef struct {
4047 /*
4048 * TLV tag and len; tag equals
4049 * WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param
4050 */
4051 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05304052 /** pdev_id for identifying the MAC
4053 * See macros starting with WMI_PDEV_ID_ for values.
4054 */
4055 A_UINT32 pdev_id;
Govind Singh45ef44a2016-02-01 17:45:22 +05304056 /*
4057 * enable for mib stats collection.
4058 * Stats are delivered to host in wmi_mib_stats structure.
4059 * If enable_Mib=1, stats collection is enabled.
4060 * If enable_Mib=0, stats collection does not happen
4061 */
4062 A_UINT32 enable_Mib;
4063} wmi_mib_stats_enable_cmd_fixed_param;
4064
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004065/** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
4066 * NOTE: This constant cannot be changed without breaking
4067 * WMI Compatibility. */
4068
4069#define WMI_DSCP_MAP_MAX (64)
4070/*
4071 * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
4072 * @details
4073 * Create an API for sending the custom DSCP-to-TID map to the target
4074 * If this is a request from the user space or from above the UMAC
4075 * then the best place to implement this is in the umac_if_offload of the OL path.
4076 * Provide a place holder for this API in the ieee80211com (ic).
4077 *
4078 * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
4079 * in the target should be directed to the function pointer in the ic.
4080 *
4081 * Implementation details of the API to send the map to the target are as described-
4082 *
4083 * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
4084 * DSCP-to-TID map is a one dimensional uint32_t array of length 64 to accomodate
4085 * 64 TID values for 2^6 (64) DSCP ids.
4086 * Example:
4087 * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
4088 * 0, 0, 0, 0, 0, 0, 0, 0,
4089 * 1, 1, 1, 1, 1, 1, 1, 1,
4090 * 2, 2, 2, 2, 2, 2, 2, 2,
4091 * 3, 3, 3, 3, 3, 3, 3, 3,
4092 * 4, 4, 4, 4, 4, 4, 4, 4,
4093 * 5, 5, 5, 5, 5, 5, 5, 5,
4094 * 6, 6, 6, 6, 6, 6, 6, 6,
4095 * 7, 7, 7, 7, 7, 7, 7, 7,
4096 * };
4097 *
4098 * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
4099 *
4100 * 3. Copy the DSCP-to-TID map into the WMI buffer.
4101 *
4102 * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
4103 * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
4104 * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
4105 * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
4106 *
4107 */
Govind Singh869c9872016-02-22 18:36:34 +05304108
4109/* DEPRECATED - use VDEV level command instead
4110 * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param)
4111 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004112typedef struct {
4113 A_UINT32 tlv_header;
4114 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
4115 A_UINT32 reserved0;
4116 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
4117 /* map indicating DSCP to TID conversion */
4118 A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
4119} wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
4120
Govind Singhc7d51942016-02-01 12:09:31 +05304121typedef struct {
4122 A_UINT32 tlv_header;
4123 /*
4124 * TLV tag and len; tag equals
4125 * WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param
4126 */
4127 A_UINT32 vdev_id;
4128 /** map indicating DSCP to TID conversion */
4129 A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
Rajeev Kumare18f5282016-04-15 14:08:29 -07004130 A_UINT32 enable_override;
Govind Singhc7d51942016-02-01 12:09:31 +05304131} wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
4132
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004133/** Fixed rate (rate-code) for broadcast/ multicast data frames */
4134/* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
4135 * @details
4136 * Create an API for setting the custom rate for the MCAST and BCAST frames
4137 * in the target. If this is a request from the user space or from above the UMAC
4138 * then the best place to implement this is in the umac_if_offload of the OL path.
4139 * Provide a place holder for this API in the ieee80211com (ic).
4140 *
4141 * Implementation details of the API to set custom rates for MCAST and BCAST in
4142 * the target are as described-
4143 *
4144 * 1. The function will have 3 arguments-
4145 * vap structure,
4146 * MCAST/ BCAST identifier code,
4147 * 8 bit rate code
4148 *
4149 * The rate-code is a 1-byte field in which:for given rate, nss and preamble
4150 * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
4151 * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
4152 * b'3-b'0 indicate the rate, which is indicated as follows:
4153 * OFDM : 0: OFDM 48 Mbps
4154 * 1: OFDM 24 Mbps
4155 * 2: OFDM 12 Mbps
4156 * 3: OFDM 6 Mbps
4157 * 4: OFDM 54 Mbps
4158 * 5: OFDM 36 Mbps
4159 * 6: OFDM 18 Mbps
4160 * 7: OFDM 9 Mbps
4161 * CCK (pream == 1)
4162 * 0: CCK 11 Mbps Long
4163 * 1: CCK 5.5 Mbps Long
4164 * 2: CCK 2 Mbps Long
4165 * 3: CCK 1 Mbps Long
4166 * 4: CCK 11 Mbps Short
4167 * 5: CCK 5.5 Mbps Short
4168 * 6: CCK 2 Mbps Short
4169 * HT/VHT (pream == 2/3)
4170 * 0..7: MCS0..MCS7 (HT)
4171 * 0..9: MCS0..MCS9 (VHT)
4172 *
4173 * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
4174 * to the target.
4175 * Arguments to the API are-
4176 * wmi handle,
4177 * VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
4178 * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
4179 * rate value.
4180 */
4181typedef enum {
4182 WMI_SET_MCAST_RATE,
4183 WMI_SET_BCAST_RATE
4184} MCAST_BCAST_RATE_ID;
4185
4186typedef struct {
4187 MCAST_BCAST_RATE_ID rate_id;
4188 A_UINT32 rate;
4189} mcast_bcast_rate;
4190
4191typedef struct {
4192 A_UINT32 tlv_header;
4193 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
4194 A_UINT32 cwmin;
4195 A_UINT32 cwmax;
4196 A_UINT32 aifs;
4197 A_UINT32 txoplimit;
4198 A_UINT32 acm;
4199 A_UINT32 no_ack;
4200} wmi_wmm_params;
4201
Govind Singh869c9872016-02-22 18:36:34 +05304202/* DEPRECATED - use VDEV level command instead
4203 * (wmi_vdev_set_wmm_params_cmd_fixed_param)
4204 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004205typedef struct {
4206 A_UINT32 tlv_header;
4207 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
4208 A_UINT32 reserved0;
4209 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
4210 A_UINT32 dg_type;
4211
4212 /* The TLVs for the 4 AC follows:
4213 * wmi_wmm_params wmm_params_ac_be;
4214 * wmi_wmm_params wmm_params_ac_bk;
4215 * wmi_wmm_params wmm_params_ac_vi;
4216 * wmi_wmm_params wmm_params_ac_vo;
4217 */
4218} wmi_pdev_set_wmm_params_cmd_fixed_param;
4219
4220typedef enum {
4221 WMI_REQUEST_PEER_STAT = 0x01,
4222 WMI_REQUEST_AP_STAT = 0x02,
4223 WMI_REQUEST_PDEV_STAT = 0x04,
4224 WMI_REQUEST_VDEV_STAT = 0x08,
4225 WMI_REQUEST_BCNFLT_STAT = 0x10,
4226 WMI_REQUEST_VDEV_RATE_STAT = 0x20,
Govind Singh32cced32016-02-01 13:33:09 +05304227 WMI_REQUEST_INST_STAT = 0x40,
Govind Singh45ef44a2016-02-01 17:45:22 +05304228 WMI_REQUEST_MIB_STAT = 0x80,
Himanshu Agarwal86319542016-05-24 09:00:39 +05304229 WMI_REQUEST_RSSI_PER_CHAIN_STAT = 0x100,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004230} wmi_stats_id;
4231
4232typedef struct {
4233 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
4234 wmi_stats_id stats_id;
4235 /** unique id identifying the VDEV, generated by the caller */
4236 A_UINT32 vdev_id;
4237 /** peer MAC address */
4238 wmi_mac_addr peer_macaddr;
4239} wmi_request_stats_cmd_fixed_param;
4240
4241/* stats type bitmap */
4242#define WMI_LINK_STATS_RADIO 0x00000001
4243#define WMI_LINK_STATS_IFACE 0x00000002
4244#define WMI_LINK_STATS_ALL_PEER 0x00000004
4245#define WMI_LINK_STATS_PER_PEER 0x00000008
4246
4247/* wifi clear statistics bitmap */
4248#define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
4249#define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
4250#define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
4251#define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
4252#define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
4253#define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
4254#define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
4255#define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
4256#define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */
4257#define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */
4258
4259/** Default value for stats if the stats collection has not started */
4260#define WMI_STATS_VALUE_INVALID 0xffffffff
4261
4262#define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16)
4263#define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value)
4264#define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1)
4265#define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value)
4266#define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
4267#define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
4268
4269typedef struct {
4270 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
4271 A_UINT32 num_of_diag_events_logs;
4272/* The TLVs will follow.
4273 * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
4274 * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
4275 * Bit 17 Indicate if the DIAG type is Enabled/Disabled.
4276 */
4277} wmi_diag_event_log_config_fixed_param;
4278
4279#define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
4280#define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
4281#define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1)
4282#define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
4283
4284typedef struct {
4285 A_UINT32 tlv_header;
4286 A_UINT32 num_of_diag_events_logs;
4287/* The TLVs will follow.
4288 * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
4289 * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
4290 * Bit 17 - Frequncy of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
4291 * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
4292 */
4293} wmi_diag_event_log_supported_event_fixed_params;
4294
4295typedef struct {
4296 /**
4297 * TLV tag and len; tag equals
4298 * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param
4299 */
4300 A_UINT32 tlv_header;
4301 /** placeholder for future */
4302 A_UINT32 reserved0;
4303} wmi_debug_mesg_flush_fixed_param;
4304
4305typedef struct {
4306 /**
4307 * TLV tag and len; tag equals
4308 * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param
4309 */
4310 A_UINT32 tlv_header;
4311 /** placeholder for future */
4312 A_UINT32 reserved0;
4313} wmi_debug_mesg_flush_complete_fixed_param;
4314
4315
4316typedef struct {
4317 /*
4318 * TLV tag and len; tag equals
4319 * WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param
4320 * vdev_id, where RSSI breach event occurred
4321 */
4322 A_UINT32 tlv_header;
4323 A_UINT32 vdev_id;
4324 /* request id */
4325 A_UINT32 request_id;
4326 /*
4327 * bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is
4328 * corresponding to hi_rssi[0-2]
4329 */
4330 A_UINT32 event_bitmap;
4331 /* rssi at the time of RSSI breach. Unit dBm */
4332 A_UINT32 rssi;
4333 /* bssid of the monitored AP's */
4334 wmi_mac_addr bssid;
4335} wmi_rssi_breach_event_fixed_param;
4336
4337
4338typedef struct {
4339 /** TLV tag and len; tag equals
4340 * WMITLV_TAG_STRUC_wmi_fw_mem_dump */
4341 A_UINT32 tlv_header;
4342 /** unique id identifying the segment */
4343 A_UINT32 seg_id;
4344 /** Start address of the segment to be read */
4345 A_UINT32 seg_start_addr_lo;
4346 A_UINT32 seg_start_addr_hi;
4347 /** Length of the segment to be read */
4348 A_UINT32 seg_length;
4349 /** Host bufeer address to which the segment will be read and dumped */
4350 A_UINT32 dest_addr_lo;
4351 A_UINT32 dest_addr_hi;
4352} wmi_fw_mem_dump;
4353
4354/* Command to get firmware memory dump*/
4355typedef struct {
4356 /** TLV tag and len; tag equals
4357 * WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
4358 A_UINT32 tlv_header;
4359 /** unique id identifying the request */
4360 A_UINT32 request_id;
4361 /** number of memory dump segments */
4362 A_UINT32 num_fw_mem_dump_segs;
4363 /**
4364 * This TLV is followed by another TLV
4365 * wmi_fw_mem_dump fw_mem_dump[];
4366 */
4367} wmi_get_fw_mem_dump_fixed_param;
4368
4369/** Event to indicate the completion of fw mem dump */
4370typedef struct {
4371 /* TLV tag and len; tag equals
4372 * WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
4373 A_UINT32 tlv_header;
4374 /** unique id identifying the request, given
4375 * in the request stats command */
4376 A_UINT32 request_id;
4377 /*In case of Firmware memory dump */
4378 A_UINT32 fw_mem_dump_complete;
4379} wmi_update_fw_mem_dump_fixed_param;
4380
4381typedef enum {
4382 WMI_ROAMING_IDLE = 0,
4383 WMI_ROAMING_ACTIVE = 1,
4384} wmi_roam_state;
4385
4386/* access categories */
4387typedef enum {
4388 WMI_AC_VO = 0,
4389 WMI_AC_VI = 1,
4390 WMI_AC_BE = 2,
4391 WMI_AC_BK = 3,
4392 WMI_AC_MAX = 4,
4393} wmi_traffic_ac;
4394
4395typedef enum {
4396 WMI_STA_STATS = 0,
4397 WMI_SOFTAP_STATS = 1,
4398 WMI_IBSS_STATS = 2,
4399 WMI_P2P_CLIENT_STATS = 3,
4400 WMI_P2P_GO_STATS = 4,
4401 WMI_NAN_STATS = 5,
4402 WMI_MESH_STATS = 6,
4403} wmi_link_iface_type;
4404
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004405/*Clear stats*/
4406typedef struct {
4407 A_UINT32 tlv_header;
4408 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
4409 /** unique id identifying the VDEV, generated by the caller */
4410 A_UINT32 vdev_id;
4411 /** stop_stats_collection_req = 1 will imply stop the statistics collection */
4412 A_UINT32 stop_stats_collection_req;
4413 /** identifies what stats to be cleared */
4414 A_UINT32 stats_clear_req_mask;
4415 /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
4416 wmi_mac_addr peer_macaddr;
4417} wmi_clear_link_stats_cmd_fixed_param;
4418
4419/* Link Stats configuration params. Trigger the link layer statistics collection*/
4420typedef struct {
4421 A_UINT32 tlv_header;
4422 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
4423 /** threshold to classify the pkts as short or long */
4424 A_UINT32 mpdu_size_threshold;
4425 /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
4426 A_UINT32 aggressive_statistics_gathering;
4427} wmi_start_link_stats_cmd_fixed_param;
4428
4429typedef struct {
4430 A_UINT32 tlv_header;
4431 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
4432 /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
4433 A_UINT32 stats_type;
4434 /** unique id identifying the VDEV, generated by the caller */
4435 A_UINT32 vdev_id;
4436 /** unique id identifying the request, generated by the caller */
4437 A_UINT32 request_id;
4438 /** peer MAC address */
4439 wmi_mac_addr peer_macaddr;
4440} wmi_request_link_stats_cmd_fixed_param;
4441
4442/* channel statistics */
4443typedef struct {
4444 A_UINT32 tlv_header;
4445 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
4446 /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
4447 A_UINT32 channel_width;
4448 /** Primary 20 MHz channel */
4449 A_UINT32 center_freq;
4450 /** center frequency (MHz) first segment */
4451 A_UINT32 center_freq0;
4452 /** center frequency (MHz) second segment */
4453 A_UINT32 center_freq1;
4454 /** msecs the radio is awake (32 bits number accruing over time) */
4455 A_UINT32 radio_awake_time;
4456 /** msecs the CCA register is busy (32 bits number accruing over time) */
4457 A_UINT32 cca_busy_time;
4458} wmi_channel_stats;
4459
Krishna Kumaar Natarajanee6cfa72016-03-25 14:05:03 -07004460/*
4461 * Each step represents 0.5 dB. The starting value is 0 dBm.
4462 * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps.
4463 */
4464#define MAX_TPC_LEVELS 64
4465
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004466/* radio statistics */
4467typedef struct {
4468 A_UINT32 tlv_header;
4469 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
4470 /** Wifi radio (if multiple radio supported) */
4471 A_UINT32 radio_id;
4472 /** msecs the radio is awake (32 bits number accruing over time) */
4473 A_UINT32 on_time;
4474 /** msecs the radio is transmitting (32 bits number accruing over time) */
4475 A_UINT32 tx_time;
4476 /** msecs the radio is in active receive (32 bits number accruing over time) */
4477 A_UINT32 rx_time;
4478 /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
4479 A_UINT32 on_time_scan;
4480 /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
4481 A_UINT32 on_time_nbd;
4482 /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
4483 A_UINT32 on_time_gscan;
4484 /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
4485 A_UINT32 on_time_roam_scan;
4486 /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
4487 A_UINT32 on_time_pno_scan;
4488 /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
4489 A_UINT32 on_time_hs20;
4490 /** number of channels */
4491 A_UINT32 num_channels;
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304492 /*
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304493 * tx time per TPC level - DEPRECATED
4494 * This field is deprecated.
4495 * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID
4496 * message.
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304497 */
Krishna Kumaar Natarajanee6cfa72016-03-25 14:05:03 -07004498 A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS];
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304499} wmi_radio_link_stats;
4500
4501/** tx time per power level statistics */
4502typedef struct {
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304503 /*
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304504 * TLV tag and len; tag equals
4505 * WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304506 */
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304507 A_UINT32 tlv_header;
4508 /* total number of tx power levels */
4509 A_UINT32 total_num_tx_power_levels;
4510 /* number of tx power levels that are carried in this event */
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304511 A_UINT32 num_tx_power_levels;
4512 /*
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304513 * offset of current stats
4514 * If ((num_tx_power_levels + power_level_offset)) ==
4515 * total_num_tx_power_levels)
4516 * this message completes the report of tx time per power levels.
4517 * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID
4518 * messages will be sent by the target to deliver the remainder of the
4519 * tx time per power level stats.
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304520 */
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304521 A_UINT32 power_level_offset;
4522 /*
4523 * This TLV will be followed by a TLV containing a variable-length
4524 * array of A_UINT32 with tx time per power level data
4525 * A_UINT32 tx_time_per_power_level[num_tx_power_levels]
4526 * The tx time is in units of milliseconds.
4527 * The power levels are board-specific values; a board-specific
4528 * translation has to be applied to determine what actual power
4529 * corresponds to each power level.
4530 * Just as the host has a BDF file available, the host should also have
4531 * a data file available that provides the power level to power
4532 * translations.
4533 */
4534} wmi_tx_power_level_stats_evt_fixed_param;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004535
4536/** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
4537typedef struct {
4538 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
4539 /** unique id identifying the request, given in the request stats command */
4540 A_UINT32 request_id;
4541 /** Number of radios*/
4542 A_UINT32 num_radio;
4543 /** more_data will be set depending on the number of radios */
4544 A_UINT32 more_radio_events;
4545/*
4546 * This TLV is followed by another TLV of array of bytes
4547 * size of(struct wmi_radio_link_stats);
4548 *
4549 * This TLV is followed by another TLV of array of bytes
4550 * num_channels * size of(struct wmi_channel_stats)
4551 */
4552
4553} wmi_radio_link_stats_event_fixed_param;
4554
4555/* per rate statistics */
4556typedef struct {
4557 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
4558 /** rate information
4559 * The rate-code is a 1-byte field in which:for given rate, nss and preamble
4560 * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
4561 * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
4562 * b'3-b'0 indicate the rate, which is indicated as follows:
4563 * OFDM : 0: OFDM 48 Mbps
4564 * 1: OFDM 24 Mbps
4565 * 2: OFDM 12 Mbps
4566 * 3: OFDM 6 Mbps
4567 * 4: OFDM 54 Mbps
4568 * 5: OFDM 36 Mbps
4569 * 6: OFDM 18 Mbps
4570 * 7: OFDM 9 Mbps
4571 * CCK (pream == 1)
4572 * 0: CCK 11 Mbps Long
4573 * 1: CCK 5.5 Mbps Long
4574 * 2: CCK 2 Mbps Long
4575 * 3: CCK 1 Mbps Long
4576 * 4: CCK 11 Mbps Short
4577 * 5: CCK 5.5 Mbps Short
4578 * 6: CCK 2 Mbps Short
4579 * HT/VHT (pream == 2/3)
4580 * 0..7: MCS0..MCS7 (HT)
4581 * 0..9: MCS0..MCS9 (VHT)
4582 */
4583 A_UINT32 rate;
4584 /** units of 100 Kbps */
4585 A_UINT32 bitrate;
4586 /** number of successfully transmitted data pkts (ACK rcvd) */
4587 A_UINT32 tx_mpdu;
4588 /** number of received data pkts */
4589 A_UINT32 rx_mpdu;
4590 /** number of data packet losses (no ACK) */
4591 A_UINT32 mpdu_lost;
4592 /** total number of data pkt retries */
4593 A_UINT32 retries;
4594 /** number of short data pkt retries */
4595 A_UINT32 retries_short;
4596 /** number of long data pkt retries */
4597 A_UINT32 retries_long;
4598} wmi_rate_stats;
4599
4600typedef struct {
4601 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
4602 /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
4603 A_UINT32 peer_type;
4604 /** mac address */
4605 wmi_mac_addr peer_mac_address;
4606 /** peer wmi_CAPABILITY_XXX */
4607 A_UINT32 capabilities;
4608 /** number of rates */
4609 A_UINT32 num_rates;
4610} wmi_peer_link_stats;
4611
4612/** PEER statistics (once started) reset and start afresh after each connection */
4613typedef struct {
4614 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
4615 /** unique id identifying the request, given in the request stats command */
4616 A_UINT32 request_id;
4617 /** number of peers accomidated in this particular event */
4618 A_UINT32 num_peers;
4619 /** Indicates the fragment number */
4620 A_UINT32 peer_event_number;
4621 /** Indicates if there are more peers which will be sent as seperate peer_stats event */
4622 A_UINT32 more_data;
4623
4624/**
4625 * This TLV is followed by another TLV
4626 * num_peers * size of(struct wmi_peer_stats)
4627 * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
4628 */
4629} wmi_peer_stats_event_fixed_param;
4630
4631/* per access category statistics */
4632typedef struct {
4633 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
4634 /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
4635 A_UINT32 ac_type;
4636 /** number of successfully transmitted unicast data pkts (ACK rcvd) */
4637 A_UINT32 tx_mpdu;
4638 /** number of received unicast mpdus */
4639 A_UINT32 rx_mpdu;
4640 /** number of succesfully transmitted multicast data packets */
4641 /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
4642 A_UINT32 tx_mcast;
4643 /** number of received multicast data packets */
4644 A_UINT32 rx_mcast;
4645 /** number of received unicast a-mpdus */
4646 A_UINT32 rx_ampdu;
4647 /** number of transmitted unicast a-mpdus */
4648 A_UINT32 tx_ampdu;
4649 /** number of data pkt losses (no ACK) */
4650 A_UINT32 mpdu_lost;
4651 /** total number of data pkt retries */
4652 A_UINT32 retries;
4653 /** number of short data pkt retries */
4654 A_UINT32 retries_short;
4655 /** number of long data pkt retries */
4656 A_UINT32 retries_long;
4657 /** data pkt min contention time (usecs) */
4658 A_UINT32 contention_time_min;
4659 /** data pkt max contention time (usecs) */
4660 A_UINT32 contention_time_max;
4661 /** data pkt avg contention time (usecs) */
4662 A_UINT32 contention_time_avg;
4663 /** num of data pkts used for contention statistics */
4664 A_UINT32 contention_num_samples;
4665} wmi_wmm_ac_stats;
4666
4667/* interface statistics */
4668typedef struct {
4669 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
4670 /** access point beacon received count from connected AP */
4671 A_UINT32 beacon_rx;
4672 /** access point mgmt frames received count from connected AP (including Beacon) */
4673 A_UINT32 mgmt_rx;
4674 /** action frames received count */
4675 A_UINT32 mgmt_action_rx;
4676 /** action frames transmit count */
4677 A_UINT32 mgmt_action_tx;
4678 /** access Point Beacon and Management frames RSSI (averaged) */
4679 A_UINT32 rssi_mgmt;
4680 /** access Point Data Frames RSSI (averaged) from connected AP */
4681 A_UINT32 rssi_data;
4682 /** access Point ACK RSSI (averaged) from connected AP */
4683 A_UINT32 rssi_ack;
4684 /** number of peers */
4685 A_UINT32 num_peers;
4686 /** Indicates how many peer_stats events will be sent depending on the num_peers. */
4687 A_UINT32 num_peer_events;
4688 /** number of ac */
4689 A_UINT32 num_ac;
4690 /** Roaming Stat */
4691 A_UINT32 roam_state;
4692 /**
4693 * Average Beacon spread offset is the averaged time delay between TBTT
4694 * and beacon TSF */
4695 /** Upper 32 bits of averaged 64 bit beacon spread offset */
4696 A_UINT32 avg_bcn_spread_offset_high;
4697 /** Lower 32 bits of averaged 64 bit beacon spread offset */
4698 A_UINT32 avg_bcn_spread_offset_low;
4699 /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
4700 A_UINT32 is_leaky_ap;
4701 /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
4702 A_UINT32 avg_rx_frms_leaked;
4703 /** Rx leak watch window currently in force to minimize data loss
4704 * because of leaky AP. Rx leak window is the
4705 * time driver waits before shutting down the radio or switching the
4706 * channel and after receiving an ACK for
4707 * a data frame with PM bit set) */
4708 A_UINT32 rx_leak_window;
4709} wmi_iface_link_stats;
4710
4711/** Interface statistics (once started) reset and start afresh after each connection */
4712typedef struct {
4713 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
4714 /** unique id identifying the request, given in the request stats command */
4715 A_UINT32 request_id;
4716 /** unique id identifying the VDEV, generated by the caller */
4717 A_UINT32 vdev_id;
4718/*
4719 * This TLV is followed by another TLV
4720 * wmi_iface_link_stats iface_link_stats;
4721 * num_ac * size of(struct wmi_wmm_ac_stats)
4722 */
4723} wmi_iface_link_stats_event_fixed_param;
4724
4725/** Suspend option */
4726enum {
4727 WMI_PDEV_SUSPEND, /* suspend */
4728 WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
4729};
4730
4731typedef struct {
4732 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */
4733 /* suspend option sent to target */
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05304734 /*
4735 * pdev_id for identifying the MAC, See macros
4736 * starting with WMI_PDEV_ID_ for values.
4737 */
4738 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004739 A_UINT32 suspend_opt;
4740} wmi_pdev_suspend_cmd_fixed_param;
4741
4742typedef struct {
4743 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 +05304744 /*
4745 * pdev_id for identifying the MAC, See macros
4746 * starting with WMI_PDEV_ID_ for values.
4747 */
4748 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004749} wmi_pdev_resume_cmd_fixed_param;
4750
4751typedef struct {
4752 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */
4753 A_UINT32 num_vdev_stats; /* number of vdevs */
4754} wmi_vdev_rate_stats_event_fixed_param;
4755
4756typedef struct {
4757 A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info */
4758 A_UINT32 vdevid; /* Id of the wlan vdev */
4759 A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted */
4760 A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above */
4761 A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
4762 A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
4763} wmi_vdev_rate_ht_info;
4764
4765typedef struct {
4766 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
4767 wmi_stats_id stats_id;
4768 /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
4769 A_UINT32 num_pdev_stats;
4770 /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */
4771 A_UINT32 num_vdev_stats;
4772 /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */
4773 A_UINT32 num_peer_stats;
4774 A_UINT32 num_bcnflt_stats;
4775 /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */
4776 A_UINT32 num_chan_stats;
Govind Singh45ef44a2016-02-01 17:45:22 +05304777 /** number of MIB stats event structures (wmi_mib_stats) */
4778 A_UINT32 num_mib_stats;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004779 /* This TLV is followed by another TLV of array of bytes
4780 * A_UINT8 data[];
4781 * This data array contains
4782 * num_pdev_stats * size of(struct wmi_pdev_stats)
4783 * num_vdev_stats * size of(struct wmi_vdev_stats)
4784 * num_peer_stats * size of(struct wmi_peer_stats)
4785 * num_bcnflt_stats * size_of()
4786 * num_chan_stats * size of(struct wmi_chan_stats)
Govind Singh45ef44a2016-02-01 17:45:22 +05304787 * num_mib_stats * size of(struct wmi_mib_stats)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004788 *
4789 */
4790} wmi_stats_event_fixed_param;
4791
4792/**
4793 * PDEV statistics
4794 * @todo
4795 * add all PDEV stats here
4796 */
4797typedef struct {
4798 /** Channel noise floor */
4799 A_INT32 chan_nf;
4800 /** TX frame count */
4801 A_UINT32 tx_frame_count;
4802 /** RX frame count */
4803 A_UINT32 rx_frame_count;
4804 /** rx clear count */
4805 A_UINT32 rx_clear_count;
4806 /** cycle count */
4807 A_UINT32 cycle_count;
4808 /** Phy error count */
4809 A_UINT32 phy_err_count;
4810 /** Channel Tx Power */
4811 A_UINT32 chan_tx_pwr;
4812 /** WAL dbg stats */
4813 struct wlan_dbg_stats pdev_stats;
4814
4815} wmi_pdev_stats;
4816
4817/**
4818 * VDEV statistics
4819 * @todo
4820 * add all VDEV stats here
4821 */
4822
4823typedef struct {
4824 A_INT32 bcn_snr;
4825 A_INT32 dat_snr;
4826} wmi_snr_info;
4827
4828typedef struct {
4829 /** unique id identifying the VDEV, generated by the caller */
4830 A_UINT32 vdev_id;
4831 wmi_snr_info vdev_snr;
4832 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) */
4833 A_UINT32 rx_frm_cnt; /* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast) */
4834 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 +05304835 that the 802.11 station successfully transmitted after more than one retransmission attempt */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004836 A_UINT32 fail_cnt[WLAN_MAX_AC]; /*Total number packets(per AC) failed to transmit */
4837 A_UINT32 rts_fail_cnt; /*Total number of RTS/CTS sequence failures for transmission of a packet */
4838 A_UINT32 rts_succ_cnt; /*Total number of RTS/CTS sequence success for transmission of a packet */
4839 A_UINT32 rx_err_cnt; /*The receive error count. HAL will provide the RxP FCS error global */
4840 A_UINT32 rx_discard_cnt; /* The sum of the receive error count and dropped-receive-buffer error count. (FCS error) */
4841 A_UINT32 ack_fail_cnt; /*Total number packets failed transmit because of no ACK from the remote entity */
4842 A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES]; /*History of last ten transmit rate, in units of 500 kbit/sec */
4843 A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES]; /*History of last ten Beacon rssi of the connected Bss */
4844} wmi_vdev_stats;
4845
4846/**
4847 * peer statistics.
4848 *
4849 * @todo
4850 * add more stats
4851 *
4852 */
4853typedef struct {
4854 /** peer MAC address */
4855 wmi_mac_addr peer_macaddr;
4856 /** rssi */
4857 A_UINT32 peer_rssi;
4858 /** last tx data rate used for peer */
4859 A_UINT32 peer_tx_rate;
4860 /** last rx data rate used for peer */
4861 A_UINT32 peer_rx_rate;
4862} wmi_peer_stats;
4863
4864typedef struct {
4865 /** Primary channel freq of the channel for which stats are sent */
4866 A_UINT32 chan_mhz;
4867 /** Time spent on the channel */
4868 A_UINT32 sampling_period_us;
4869 /** Aggregate duration over a sampling period for which channel activity was observed */
4870 A_UINT32 rx_clear_count;
4871 /** Accumalation of the TX PPDU duration over a sampling period */
4872 A_UINT32 tx_duration_us;
4873 /** Accumalation of the RX PPDU duration over a sampling period */
4874 A_UINT32 rx_duration_us;
4875} wmi_chan_stats;
4876
4877typedef struct {
Govind Singh45ef44a2016-02-01 17:45:22 +05304878 A_UINT32 tx_mpdu_grp_frag_cnt; /*dot11TransmittedFragmentCount */
4879 A_UINT32 tx_msdu_grp_frm_cnt; /*dot11GroupTransmittedFrameCount */
4880 A_UINT32 tx_msdu_fail_cnt; /*dot11FailedCount*/
4881 A_UINT32 rx_mpdu_frag_cnt; /*dot11ReceivedFragmentCount*/
4882 A_UINT32 rx_msdu_grp_frm_cnt; /*dot11GroupReceivedFrameCount*/
4883 A_UINT32 rx_mpdu_fcs_err; /*dot11FCSErrorCount*/
4884 A_UINT32 tx_msdu_frm_cnt; /*dot11TransmittedFrameCount*/
4885 A_UINT32 tx_msdu_retry_cnt; /*dot11RetryCount*/
4886 A_UINT32 rx_frm_dup_cnt; /*dot11FrameDuplicateCount */
4887 A_UINT32 tx_rts_success_cnt; /*dot11RTSSuccessCount*/
4888 A_UINT32 tx_rts_fail_cnt; /*dot11RTSFailureCount*/
4889 /*dot11QosTransmittedFragmentCount */
4890 A_UINT32 tx_Qos_mpdu_grp_frag_cnt;
4891 A_UINT32 tx_Qos_msdu_fail_UP; /*dot11QosFailedCount */
4892 A_UINT32 tx_Qos_msdu_retry_UP; /*dot11QosRetryCount */
4893 A_UINT32 rx_Qos_frm_dup_cnt_UP; /*dot11QosFrameDuplicateCount*/
4894 A_UINT32 tx_Qos_rts_success_cnt_UP; /*dot11QosRTSSuccessCount*/
4895 A_UINT32 tx_Qos_rts_fail_cnt_UP; /*dot11QosRTSFailureCount*/
4896 A_UINT32 rx_Qos_mpdu_frag_cnt_UP; /*dot11QosReceivedFragmentCount*/
4897 A_UINT32 tx_Qos_msdu_frm_cnt_UP; /*dot11QosTransmittedFrameCount*/
4898 A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/
4899 A_UINT32 rx_Qos_mpdu_cnt; /*dot11QosMPDUsReceivedCount*/
4900 A_UINT32 rx_Qos_mpdu_retryBit_cnt; /*dot11QosRetriesReceivedCount*/
4901 /*dot11RSNAStatsRobustMgmtCCMPReplays */
4902 A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt;
4903 A_UINT32 rsna_TKIP_icv_err_cnt; /*dot11RSNAStatsTKIPICVErrors*/
4904 A_UINT32 rsna_TKIP_replay_err_cnt; /*dot11RSNAStatsTKIPReplays*/
4905 /*dot11RSNAStatsCCMPDecryptErrors */
4906 A_UINT32 rsna_CCMP_decrypt_err_cnt;
4907 A_UINT32 rsna_CCMP_replay_err_cnt; /*dot11RSNAStatsCCMPReplays*/
4908 A_UINT32 tx_ampdu_cnt; /*dot11TransmittedAMPDUCount*/
4909 /*dot11TransmittedMPDUsInAMPDUCount*/
4910 A_UINT32 tx_mpdu_cnt_in_ampdu;
4911 /*dot11TransmittedOctetsInAMPDUCount*/
4912 union {
4913 A_UINT64 counter; /* for use by target only */
4914 struct {
4915 A_UINT32 low;
4916 A_UINT32 high;
4917 } upload; /* for use by host */
4918 } tx_octets_in_ampdu;
4919 A_UINT32 rx_ampdu_cnt; /*dot11AMPDUReceivedCount*/
4920 A_UINT32 rx_mpdu_cnt_in_ampdu; /*dot11MPDUInReceivedAMPDUCount*/
4921 union {
4922 A_UINT64 counter; /* for use by target only */
4923 struct {
4924 A_UINT32 rx_octets_in_ampdu_low;
4925 A_UINT32 rx_octets_in_ampdu_high;
4926 } upload; /* for use by host */
4927 } rx_octets_in_ampdu; /*dot11ReceivedOctetsInAMPDUCount*/
4928 A_UINT32 reserved_1;
4929 A_UINT32 reserved_2;
4930 A_UINT32 reserved_3;
4931 A_UINT32 reserved_4;
4932} wmi_mib_stats;
4933
4934typedef struct {
Himanshu Agarwal86319542016-05-24 09:00:39 +05304935 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_stats */
4936 A_UINT32 tlv_header;
4937 A_UINT32 vdev_id;
4938 A_INT32 rssi_avg_beacon[MAX_CHAINS];
4939 A_INT32 rssi_avg_data[MAX_CHAINS];
4940 wmi_mac_addr peer_macaddr;
4941} wmi_rssi_stats;
4942
4943typedef struct {
4944 /*
4945 * TLV tag and len; tag equals
4946 * WMITLV_TAG_STRUC_wmi_per_chain_rssi_stats
4947 */
4948 A_UINT32 tlv_header;
4949 A_UINT32 num_per_chain_rssi_stats;
4950 /*
4951 * This TLV is followed by another TLV of array of structs:
4952 * wmi_rssi_stats rssi_stats[num_per_chain_rssi_stats];
4953 */
4954} wmi_per_chain_rssi_stats;
4955
4956typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004957 A_UINT32 tlv_header;
4958 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
4959 /** unique id identifying the VDEV, generated by the caller */
4960 A_UINT32 vdev_id;
4961 /** VDEV type (AP,STA,IBSS,MONITOR) */
4962 A_UINT32 vdev_type;
4963 /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0)*/
4964 A_UINT32 vdev_subtype;
4965 /** VDEV MAC address */
4966 wmi_mac_addr vdev_macaddr;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05304967 /** Number of configured txrx streams */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004968 A_UINT32 num_cfg_txrx_streams;
4969 /*
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05304970 * pdev_id for identifying the MAC,
4971 * See macros starting with WMI_PDEV_ID_ for values.
4972 */
4973 A_UINT32 pdev_id;
4974 /*
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004975 * This TLV is followed by another TLV of array of structures
4976 * wmi_vdev_txrx_streams cfg_txrx_streams[];
4977 */
4978} wmi_vdev_create_cmd_fixed_param;
4979
4980typedef struct {
4981 /*
4982 * TLV tag and len; tag equals
4983 * WMITLV_TAG_STRUC_wmi_vdev_txrx_streams
4984 */
4985 A_UINT32 tlv_header;
4986 /* band - Should take values from wmi_channel_band_mask */
4987 A_UINT32 band;
4988 /* max supported tx streams per given band for this vdev */
4989 A_UINT32 supported_tx_streams;
4990 /* max supported rx streams per given band for this vdev */
4991 A_UINT32 supported_rx_streams;
4992} wmi_vdev_txrx_streams;
4993
4994/* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
4995typedef struct {
4996 A_UINT32 tlv_header;
4997 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
4998 A_UINT32 type_count;
4999 /** 255: continuous schedule, 0: reserved */
5000 A_UINT32 duration;
5001 /** Absent period duration in micro seconds */
5002 A_UINT32 interval;
5003 /** Absent period interval in micro seconds */
5004 A_UINT32 start_time;
5005 /** 32 bit tsf time when in starts */
5006} wmi_p2p_noa_descriptor;
5007
5008/** values for vdev_type */
5009#define WMI_VDEV_TYPE_AP 0x1
5010#define WMI_VDEV_TYPE_STA 0x2
5011#define WMI_VDEV_TYPE_IBSS 0x3
5012#define WMI_VDEV_TYPE_MONITOR 0x4
5013
5014/** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
5015 * by FW to execute the NAN specific WMI commands and also implement NAN specific
5016 * operations like Network discovery, service provisioning and service
5017 * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create
5018 * WMI command to create this VDEV once during initialization and host is not
5019 * expected to use any VDEV specific WMI commands on this VDEV.
5020 **/
5021#define WMI_VDEV_TYPE_NAN 0x5
5022
5023#define WMI_VDEV_TYPE_OCB 0x6
5024
Govind Singh941bd5e2016-02-04 17:15:25 +05305025/* NAN Data Interface */
5026#define WMI_VDEV_TYPE_NDI 0x7
5027
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005028/** values for vdev_subtype */
5029#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
5030#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
5031#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3
Govind Singh32cced32016-02-01 13:33:09 +05305032#define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA 0x4
5033#define WMI_UNIFIED_VDEV_SUBTYPE_MESH 0x5
Sandeep Puligilla62f7ca02016-03-24 15:48:33 -07005034/*
5035 * new subtype for 11S mesh is required as 11S functionality differs
5036 * in many ways from proprietary mesh
5037 * 11S uses 6-addr frame format and supports peering between mesh
5038 * stations and dynamic best path selection between mesh stations.
5039 * While in proprietary mesh, neighboring mesh station MAC is manually
5040 * added to AST table for traffic flow between mesh stations
5041 */
5042#define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S 0x6
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005043
5044/** values for vdev_start_request flags */
5045/** Indicates that AP VDEV uses hidden ssid. only valid for
5046 * AP/GO */
5047#define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0)
5048/** Indicates if robust management frame/management frame
5049 * protection is enabled. For GO/AP vdevs, it indicates that
5050 * it may support station/client associations with RMF enabled.
5051 * For STA/client vdevs, it indicates that sta will
5052 * associate with AP with RMF enabled. */
5053#define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1)
5054
5055/*
5056 * Host is sending bcn_tx_rate to override the beacon tx rates.
5057 */
5058#define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
5059
5060typedef struct {
5061 A_UINT32 tlv_header;
5062 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
5063 /** unique id identifying the VDEV, generated by the caller */
5064 A_UINT32 vdev_id;
5065 /** requestor id identifying the caller module */
5066 A_UINT32 requestor_id;
5067 /** beacon interval from received beacon */
5068 A_UINT32 beacon_interval;
5069 /** DTIM Period from the received beacon */
5070 A_UINT32 dtim_period;
5071 /** Flags */
5072 A_UINT32 flags;
5073 /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
5074 wmi_ssid ssid;
5075 /** beacon/probe reponse xmit rate. Applicable for SoftAP. */
5076 /** This field will be invalid and ignored unless the */
5077 /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
5078 /** When valid, this field contains the fixed tx rate for the beacon */
5079 /** and probe response frames send by the GO or SoftAP */
5080 A_UINT32 bcn_tx_rate;
5081 /** beacon/probe reponse xmit power. Applicable for SoftAP. */
5082 A_UINT32 bcn_txPower;
5083 /** number of p2p NOA descriptor(s) from scan entry */
5084 A_UINT32 num_noa_descriptors;
5085 /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
5086 During CAC, Our HW shouldn't ack ditected frames */
5087 A_UINT32 disable_hw_ack;
5088 /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
5089 /** The DBS policy manager indicates the preferred number of transmit streams. */
5090 A_UINT32 preferred_tx_streams;
5091 /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
5092 /** the DBS policy manager indicates the preferred number of receive streams. */
5093 A_UINT32 preferred_rx_streams;
5094 /* The TLVs follows this structure:
5095 * wmi_channel chan; //WMI channel
5096 * wmi_p2p_noa_descriptor noa_descriptors[]; //actual p2p NOA descriptor from scan entry
5097 */
5098} wmi_vdev_start_request_cmd_fixed_param;
5099
5100typedef struct {
5101 A_UINT32 tlv_header;
5102 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
5103 /** unique id identifying the VDEV, generated by the caller */
5104 A_UINT32 vdev_id;
5105} wmi_vdev_delete_cmd_fixed_param;
5106
5107typedef struct {
5108 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
5109 /** unique id identifying the VDEV, generated by the caller */
5110 A_UINT32 vdev_id;
5111 /** aid (assoc id) received in association response for STA VDEV */
5112 A_UINT32 vdev_assoc_id;
5113 /** bssid of the BSS the VDEV is joining */
5114 wmi_mac_addr vdev_bssid;
5115} wmi_vdev_up_cmd_fixed_param;
5116
5117typedef struct {
5118 A_UINT32 tlv_header;
5119 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
5120 /** unique id identifying the VDEV, generated by the caller */
5121 A_UINT32 vdev_id;
5122} wmi_vdev_stop_cmd_fixed_param;
5123
5124typedef struct {
5125 A_UINT32 tlv_header;
5126 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
5127 /** unique id identifying the VDEV, generated by the caller */
5128 A_UINT32 vdev_id;
5129} wmi_vdev_down_cmd_fixed_param;
5130
5131typedef struct {
5132 /** unique id identifying the VDEV, generated by the caller */
5133 A_UINT32 vdev_id;
5134} wmi_vdev_standby_response_cmd;
5135
5136typedef struct {
5137 /** unique id identifying the VDEV, generated by the caller */
5138 A_UINT32 vdev_id;
5139} wmi_vdev_resume_response_cmd;
5140
5141typedef struct {
5142 A_UINT32 tlv_header;
5143 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
5144 /** unique id identifying the VDEV, generated by the caller */
5145 A_UINT32 vdev_id;
5146 /** parameter id */
5147 A_UINT32 param_id;
5148 /** parameter value */
5149 A_UINT32 param_value;
5150} wmi_vdev_set_param_cmd_fixed_param;
5151
5152typedef struct {
5153 A_UINT32 key_seq_counter_l;
5154 A_UINT32 key_seq_counter_h;
5155} wmi_key_seq_counter;
5156
5157#define WMI_CIPHER_NONE 0x0 /* clear key */
5158#define WMI_CIPHER_WEP 0x1
5159#define WMI_CIPHER_TKIP 0x2
5160#define WMI_CIPHER_AES_OCB 0x3
5161#define WMI_CIPHER_AES_CCM 0x4
5162#define WMI_CIPHER_WAPI 0x5
5163#define WMI_CIPHER_CKIP 0x6
5164#define WMI_CIPHER_AES_CMAC 0x7
5165#define WMI_CIPHER_ANY 0x8
Govind Singh869c9872016-02-22 18:36:34 +05305166#define WMI_CIPHER_AES_GCM 0x9
5167#define WMI_CIPHER_AES_GMAC 0xa
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005168
5169typedef struct {
5170 A_UINT32 tlv_header;
5171 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
5172 /** unique id identifying the VDEV, generated by the caller */
5173 A_UINT32 vdev_id;
5174 /** MAC address used for installing */
5175 wmi_mac_addr peer_macaddr;
5176 /** key index */
5177 A_UINT32 key_ix;
5178 /** key flags */
5179 A_UINT32 key_flags;
5180 /** key cipher, defined above */
5181 A_UINT32 key_cipher;
5182 /** key rsc counter */
5183 wmi_key_seq_counter key_rsc_counter;
5184 /** global key rsc counter */
5185 wmi_key_seq_counter key_global_rsc_counter;
5186 /** global key tsc counter */
5187 wmi_key_seq_counter key_tsc_counter;
5188 /** WAPI key rsc counter */
5189 A_UINT8 wpi_key_rsc_counter[16];
5190 /** WAPI key tsc counter */
5191 A_UINT8 wpi_key_tsc_counter[16];
5192 /** key length */
5193 A_UINT32 key_len;
5194 /** key tx mic length */
5195 A_UINT32 key_txmic_len;
5196 /** key rx mic length */
5197 A_UINT32 key_rxmic_len;
5198 /*
5199 * Following this struct are this TLV.
5200 * // actual key data
5201 * A_UINT8 key_data[]; // contains key followed by tx mic followed by rx mic
5202 */
5203} wmi_vdev_install_key_cmd_fixed_param;
5204
5205/** Preamble types to be used with VDEV fixed rate configuration */
5206typedef enum {
5207 WMI_RATE_PREAMBLE_OFDM,
5208 WMI_RATE_PREAMBLE_CCK,
5209 WMI_RATE_PREAMBLE_HT,
5210 WMI_RATE_PREAMBLE_VHT,
5211} WMI_RATE_PREAMBLE;
5212
5213/** Value to disable fixed rate setting */
5214#define WMI_FIXED_RATE_NONE (0xff)
5215
5216/** the definition of different VDEV parameters */
5217typedef enum {
5218 /** RTS Threshold */
5219 WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
5220 /** Fragmentation threshold */
5221 WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
5222 /** beacon interval in TUs */
5223 WMI_VDEV_PARAM_BEACON_INTERVAL,
5224 /** Listen interval in TUs */
5225 WMI_VDEV_PARAM_LISTEN_INTERVAL,
5226 /** muticast rate in Mbps */
5227 WMI_VDEV_PARAM_MULTICAST_RATE,
5228 /** management frame rate in Mbps */
5229 WMI_VDEV_PARAM_MGMT_TX_RATE,
5230 /** slot time (long vs short) */
5231 WMI_VDEV_PARAM_SLOT_TIME,
5232 /** preamble (long vs short) */
5233 WMI_VDEV_PARAM_PREAMBLE,
5234 /** SWBA time (time before tbtt in msec) */
5235 WMI_VDEV_PARAM_SWBA_TIME,
5236 /** time period for updating VDEV stats */
5237 WMI_VDEV_STATS_UPDATE_PERIOD,
5238 /** age out time in msec for frames queued for station in power save*/
5239 WMI_VDEV_PWRSAVE_AGEOUT_TIME,
5240 /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
5241 WMI_VDEV_HOST_SWBA_INTERVAL,
5242 /** DTIM period (specified in units of num beacon intervals) */
5243 WMI_VDEV_PARAM_DTIM_PERIOD,
5244 /** scheduler air time limit for this VDEV. used by off chan scheduler */
5245 WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
5246 /** enable/dsiable WDS for this VDEV */
5247 WMI_VDEV_PARAM_WDS,
5248 /** ATIM Window */
5249 WMI_VDEV_PARAM_ATIM_WINDOW,
5250 /** BMISS max */
5251 WMI_VDEV_PARAM_BMISS_COUNT_MAX,
5252 /** BMISS first time */
5253 WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
5254 /** BMISS final time */
5255 WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
5256 /** WMM enables/disabled */
5257 WMI_VDEV_PARAM_FEATURE_WMM,
5258 /** Channel width */
5259 WMI_VDEV_PARAM_CHWIDTH,
5260 /** Channel Offset */
5261 WMI_VDEV_PARAM_CHEXTOFFSET,
5262 /** Disable HT Protection */
5263 WMI_VDEV_PARAM_DISABLE_HTPROTECTION,
5264 /** Quick STA Kickout */
5265 WMI_VDEV_PARAM_STA_QUICKKICKOUT,
5266 /** Rate to be used with Management frames */
5267 WMI_VDEV_PARAM_MGMT_RATE,
5268 /** Protection Mode */
5269 WMI_VDEV_PARAM_PROTECTION_MODE,
5270 /** Fixed rate setting */
5271 WMI_VDEV_PARAM_FIXED_RATE,
5272 /** Short GI Enable/Disable */
5273 WMI_VDEV_PARAM_SGI,
5274 /** Enable LDPC */
5275 WMI_VDEV_PARAM_LDPC,
5276 /** Enable Tx STBC */
5277 WMI_VDEV_PARAM_TX_STBC,
5278 /** Enable Rx STBC */
5279 WMI_VDEV_PARAM_RX_STBC,
5280 /** Intra BSS forwarding */
5281 WMI_VDEV_PARAM_INTRA_BSS_FWD,
5282 /** Setting Default xmit key for Vdev */
5283 WMI_VDEV_PARAM_DEF_KEYID,
5284 /** NSS width */
5285 WMI_VDEV_PARAM_NSS,
5286 /** Set the custom rate for the broadcast data frames */
5287 WMI_VDEV_PARAM_BCAST_DATA_RATE,
5288 /** Set the custom rate (rate-code) for multicast data frames */
5289 WMI_VDEV_PARAM_MCAST_DATA_RATE,
5290 /** Tx multicast packet indicate Enable/Disable */
5291 WMI_VDEV_PARAM_MCAST_INDICATE,
5292 /** Tx DHCP packet indicate Enable/Disable */
5293 WMI_VDEV_PARAM_DHCP_INDICATE,
5294 /** Enable host inspection of Tx unicast packet to unknown destination */
5295 WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
5296
5297 /* The minimum amount of time AP begins to consider STA inactive */
5298 WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
5299
5300 /* An associated STA is considered inactive when there is no recent TX/RX
5301 * activity and no downlink frames are buffered for it. Once a STA exceeds
5302 * the maximum idle inactive time, the AP will send an 802.11 data-null as
5303 * a keep alive to verify the STA is still associated. If the STA does ACK
5304 * the data-null, or if the data-null is buffered and the STA does not
5305 * retrieve it, the STA will be considered unresponsive (see
5306 * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
5307 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
5308
5309 /* An associated STA is considered unresponsive if there is no recent
5310 * TX/RX activity and downlink frames are buffered for it. Once a STA
5311 * exceeds the maximum unresponsive time, the AP will send a
5312 * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
5313 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
5314
5315 /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
5316 WMI_VDEV_PARAM_AP_ENABLE_NAWDS,
5317 /** Enable/Disable RTS-CTS */
5318 WMI_VDEV_PARAM_ENABLE_RTSCTS,
5319 /* Enable TXBFee/er */
5320 WMI_VDEV_PARAM_TXBF,
5321
5322 /**Set packet power save */
5323 WMI_VDEV_PARAM_PACKET_POWERSAVE,
5324
5325 /**Drops un-encrypted packets if any received in an encryted connection
5326 * otherwise forwards to host
5327 */
5328 WMI_VDEV_PARAM_DROP_UNENCRY,
5329
5330 /*
5331 * Set TX encap type.
5332 *
5333 * enum wmi_pkt_type is to be used as the parameter
5334 * specifying the encap type.
5335 */
5336 WMI_VDEV_PARAM_TX_ENCAP_TYPE,
5337
5338 /*
5339 * Try to detect stations that woke-up and exited power save but did not
5340 * successfully transmit data-null with PM=0 to AP. When this happens,
5341 * STA and AP power save state are out-of-sync. Use buffered but
5342 * undelivered MSDU to the STA as a hint that the STA is really awake
5343 * and expecting normal ASAP delivery, rather than retrieving BU with
5344 * PS-Poll, U-APSD trigger, etc.
5345 *
5346 * 0 disables out-of-sync detection. Maximum time is 255 seconds.
5347 */
5348 WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,
5349
5350 /* Enable/Disable early rx dynamic adjust feature.
5351 * Early-rx dynamic adjust is a advance power save feature.
5352 * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
5353 * timing discrepancies in the system.
5354 * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
5355 * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
5356 * properly to minimum the power consume.*/
5357 WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE,
5358
5359 /* set target bmiss number per sample cycle if bmiss adjust was chosen.
5360 * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
5361 * which can be set by user through WMI command.
5362 */
5363 WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM,
5364
5365 /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
5366 WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE,
5367
5368 /* set slop_step */
5369 WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP,
5370
5371 /* set init slop */
5372 WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP,
5373
5374 /* pause adjust enable/disable */
5375 WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE,
5376
5377 /* Set channel pwr limit value of the vdev the minimal value of all
5378 * vdevs operating on this channel will be set as channel tx power
5379 * limit, which is used to configure ratearray
5380 */
5381 WMI_VDEV_PARAM_TX_PWRLIMIT,
5382
5383 /* set the count of snr value for calculation in snr monitor */
5384 WMI_VDEV_PARAM_SNR_NUM_FOR_CAL,
5385
5386 /** Roaming offload */
5387 WMI_VDEV_PARAM_ROAM_FW_OFFLOAD,
5388
5389 /** Enable Leader request RX functionality for RMC */
5390 WMI_VDEV_PARAM_ENABLE_RMC,
5391
5392 /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
5393 * by himself. If the beacon lost time exceed this threshold, the peer is
5394 * thought to be gone. */
5395 WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS,
5396
5397 /** max rate in kpbs, transmit rate can't go beyond it */
5398 WMI_VDEV_PARAM_MAX_RATE,
5399
5400 /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift */
5401 WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE,
5402 /* set Tx failure count threshold for the vdev */
5403 WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR,
5404
5405 /* set ebt resync timeout value, in the unit of TU */
5406 WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT,
5407
5408 /* Enable Aggregation State Trigger Event */
5409 WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE,
5410
5411 /* This parameter indicates whether IBSS station can enter into power save
5412 * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
5413 * awake all the time and should never set PM=1 in its transmitted frames.
5414 * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
5415 * is non-zero. */
5416 WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED,
5417
5418 /* This parameter indicates if this station can enter into power collapse
5419 * for the remaining beacon interval after the ATIM window.
5420 * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
5421 * is set to true. */
5422 WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED,
5423
5424 /* This parameter indicates whether IBSS station exit power save mode and
5425 * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
5426 * whenever there is a TX/RX activity. */
5427 WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED,
5428
5429 /* If Awake on TX/RX activity is enabled, this parameter indicates
5430 * the data inactivity time in number of beacon intervals after which
5431 * IBSS station reenters power save by sending Null frame with PM=1. */
5432 WMI_VDEV_PARAM_INACTIVITY_CNT,
5433
5434 /* Inactivity time in msec after which TX Service Period (SP) is
5435 * terminated by sending a Qos Null frame with EOSP.
5436 * If value is 0, TX SP is terminated with the last buffered packet itself
5437 * instead of waiting for the inactivity timeout. */
5438 WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS,
5439
5440 /** DTIM policy */
5441 WMI_VDEV_PARAM_DTIM_POLICY,
5442
5443 /* When IBSS network is initialized, PS-supporting device
5444 * does not enter protocol sleep state during first
5445 * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
5446 WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS,
5447
5448 /* Enable/Disable 1 RX chain usage during the ATIM window */
5449 WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE,
5450 /**
5451 * RX Leak window is the time driver waits before shutting down
5452 * the radio or switching the channel and after receiving an ACK
5453 * for a data frame with PM bit set)
5454 */
5455 WMI_VDEV_PARAM_RX_LEAK_WINDOW,
5456
5457 /**
5458 * Averaging factor(16 bit value) is used in the calculations to
5459 * perform averaging of different link level statistics like average
5460 * beacon spread or average number of frames leaked
5461 */
5462 WMI_VDEV_PARAM_STATS_AVG_FACTOR,
5463 /*
5464 * disconnect threshold, once the consecutive error for specific peer
5465 * exceed this threhold, FW will send kickout event to host
5466 */
5467 WMI_VDEV_PARAM_DISCONNECT_TH,
5468 /*
5469 * The rate_code of RTS_CTS changed by host. Now FW can support
5470 * more non-HT rates rather than 1Mbps or 6Mbps */
5471 WMI_VDEV_PARAM_RTSCTS_RATE,
5472
5473 /** This parameter indicates whether using a long duration RTS-CTS
5474 * protection when a SAP goes off channel in MCC mode */
5475 WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE,
5476
5477 /*
5478 * This parameter indicates whether using a broadcast probe response
5479 * to increase the detectability of SAP in MCC mode
5480 */
5481 WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE,
Nirav Shah47062ff2015-11-05 11:21:08 +05305482
5483 /* This parameter indicates the power backoff in percentage
5484 * currently supports 100%, 50%, 25%, 12.5%, and minimum
5485 * Host passes 0, 1, 2, 3, 4 to Firmware
5486 * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
5487 * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
5488 */
5489 WMI_VDEV_PARAM_TXPOWER_SCALE,
5490
5491 /* TX power backoff in dB: tx power -= param value
5492 * Host passes values(DB) to Halphy, Halphy reduces the power table
5493 * by the values. Safety check will happen in Halphy.
5494 */
5495 WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB,
Govind Singh32cced32016-02-01 13:33:09 +05305496 /** Multicast to Unicast conversion setting */
5497 WMI_VDEV_PARAM_MCAST2UCAST_SET,
5498
5499 /** Total number of HW retries */
5500 WMI_VDEV_PARAM_RC_NUM_RETRIES,
5501
5502 /** Max tx percentage for cabq */
5503 WMI_VDEV_PARAM_CABQ_MAXDUR,
5504
5505 /** MFPTEST settings */
5506 WMI_VDEV_PARAM_MFPTEST_SET,
5507
5508 /** RTS Fixed rate setting */
5509 WMI_VDEV_PARAM_RTS_FIXED_RATE,
5510
5511 /** VHT SGI MASK */
5512 WMI_VDEV_PARAM_VHT_SGIMASK,
5513
5514 /** VHT80 Auto Rate MASK */
5515 WMI_VDEV_PARAM_VHT80_RATEMASK,
5516
5517 /** set Proxy STA features for this vap */
5518 WMI_VDEV_PARAM_PROXY_STA,
5519
5520 /** set virtual cell mode - enable/disable */
5521 WMI_VDEV_PARAM_VIRTUAL_CELL_MODE,
5522
5523 /** Set receive packet type */
5524 WMI_VDEV_PARAM_RX_DECAP_TYPE,
5525
5526 /** Set ratemask with specific Bandwidth and NSS */
5527 WMI_VDEV_PARAM_BW_NSS_RATEMASK,
5528
5529 /** Set SENSOR Support */
5530 WMI_VDEV_PARAM_SENSOR_AP,
5531
5532 /** Set beacon rate */
5533 WMI_VDEV_PARAM_BEACON_RATE,
5534
5535 /** Enable CTS to self for DTIM beacon */
5536 WMI_VDEV_PARAM_DTIM_ENABLE_CTS,
5537
5538 /** Disable station kickout at Vap level */
5539 WMI_VDEV_PARAM_STA_KICKOUT,
Nirav Shah47062ff2015-11-05 11:21:08 +05305540
Govind Singh869c9872016-02-22 18:36:34 +05305541 /* VDEV capabilities */
5542 WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */
Sandeep Puligilla62f7ca02016-03-24 15:48:33 -07005543 /*
5544 * Increment TSF in micro seconds to avoid beacon collision on mesh VAP
5545 * The host must ensure that either no other vdevs share the TSF with
5546 * this vdev, or else that it is acceptable to apply this TSF adjustment
5547 * to all vdevs sharing the TSF
5548 */
5549 WMI_VDEV_PARAM_TSF_INCREMENT,
Himanshu Agarwalb953a262016-06-03 10:48:23 +05305550 WMI_VDEV_PARAM_PLACE_HOLDER_1,
Himanshu Agarwala1438152016-05-13 21:40:19 +05305551
5552 /*
5553 * Vdev level rx filter of from-ds / to-ds / no-ds / ta / ra frames.
5554 * Used mainly for mesh-vap.
5555 * The parameter value delivered with the RX_FILTER vdev param contains
5556 * a bit-or mask of wmi_vdev_param_filter enum values.
5557 */
5558 WMI_VDEV_PARAM_RX_FILTER,
Himanshu Agarwale93c55e2016-05-20 12:18:15 +05305559 /* vdev-specific mgmt tx power in dBm units (signed integer value) */
5560 WMI_VDEV_PARAM_MGMT_TX_POWER,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005561} WMI_VDEV_PARAM;
5562
Govind Singh869c9872016-02-22 18:36:34 +05305563/* vdev capabilities bit mask */
Himanshu Agarwal800d58d2016-05-13 21:22:19 +05305564#define WMI_VDEV_BEACON_SUPPORT 0x1
Govind Singh869c9872016-02-22 18:36:34 +05305565#define WMI_VDEV_WDS_LRN_ENABLED 0x2
Himanshu Agarwal800d58d2016-05-13 21:22:19 +05305566#define WMI_VDEV_VOW_ENABLED 0x4
5567
Govind Singh869c9872016-02-22 18:36:34 +05305568#define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT)
5569#define WMI_VDEV_IS_WDS_LRN_ENABLED(param) ((param) & WMI_VDEV_WDS_LRN_ENABLED)
Himanshu Agarwal800d58d2016-05-13 21:22:19 +05305570#define WMI_VDEV_IS_VOW_ENABLED(param) ((param) & WMI_VDEV_VOW_ENABLED)
Govind Singh869c9872016-02-22 18:36:34 +05305571
5572/* TXBF capabilities masks */
5573#define WMI_TXBF_CONF_SU_TX_BFEE_S 0
5574#define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1
5575#define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << \
5576 WMI_TXBF_CONF_SU_TX_BFEE_S)
5577#define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_SU_TX_BFEE)
5578#define WMI_TXBF_CONF_SU_TX_BFEE_SET(x, z) WMI_F_RMW(x, z,\
5579 WMI_TXBF_CONF_SU_TX_BFEE)
5580
5581#define WMI_TXBF_CONF_MU_TX_BFEE_S 1
5582#define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1
5583#define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << \
5584 WMI_TXBF_CONF_MU_TX_BFEE_S)
5585#define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_MU_TX_BFEE)
5586#define WMI_TXBF_CONF_MU_TX_BFEE_SET(x, z) WMI_F_RMW(x, z, \
5587 WMI_TXBF_CONF_MU_TX_BFEE)
5588
5589#define WMI_TXBF_CONF_SU_TX_BFER_S 2
5590#define WMI_TXBF_CONF_SU_TX_BFER_M 0x1
5591#define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << \
5592 WMI_TXBF_CONF_SU_TX_BFER_S)
5593#define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_SU_TX_BFER)
5594#define WMI_TXBF_CONF_SU_TX_BFER_SET(x, z) WMI_F_RMW(x, z, \
5595 WMI_TXBF_CONF_SU_TX_BFER)
5596
5597#define WMI_TXBF_CONF_MU_TX_BFER_S 3
5598#define WMI_TXBF_CONF_MU_TX_BFER_M 0x1
5599#define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << \
5600 WMI_TXBF_CONF_MU_TX_BFER_S)
5601#define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_MU_TX_BFER)
5602#define WMI_TXBF_CONF_MU_TX_BFER_SET(x, z) WMI_F_RMW(x, z, \
5603 WMI_TXBF_CONF_MU_TX_BFER)
5604
5605#define WMI_TXBF_CONF_STS_CAP_S 4
5606#define WMI_TXBF_CONF_STS_CAP_M 0x7
5607#define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << \
5608 WMI_TXBF_CONF_STS_CAP_S)
5609#define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_STS_CAP);
5610#define WMI_TXBF_CONF_STS_CAP_SET(x, z) WMI_F_RMW(x, z, \
5611 WMI_TXBF_CONF_STS_CAP)
5612
5613#define WMI_TXBF_CONF_IMPLICIT_BF_S 7
5614#define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1
5615#define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << \
5616 WMI_TXBF_CONF_IMPLICIT_BF_S)
5617#define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_IMPLICIT_BF)
5618#define WMI_TXBF_CONF_IMPLICIT_BF_SET(x, z) WMI_F_RMW(x, z, \
5619 WMI_TXBF_CONF_IMPLICIT_BF)
5620
5621#define WMI_TXBF_CONF_BF_SND_DIM_S 8
5622#define WMI_TXBF_CONF_BF_SND_DIM_M 0x7
5623#define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << \
5624 WMI_TXBF_CONF_BF_SND_DIM_S)
5625#define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_BF_SND_DIM)
5626#define WMI_TXBF_CONF_BF_SND_DIM_SET(x, z) WMI_F_RMW(x, z, \
5627 WMI_TXBF_CONF_BF_SND_DIM)
5628
5629/* TXBF capabilities */
5630typedef struct {
5631 A_UINT32 txbf_cap;
5632} wmi_vdev_txbf_cap;
5633
Himanshu Agarwala1438152016-05-13 21:40:19 +05305634/* vdev rx filters (for mesh) */
5635typedef enum {
5636 /* Don't drop any frames - Default */
5637 WMI_VDEV_RX_ALLOW_ALL_FRAMES = 0x0,
5638 /* Drop FromDS frames */
5639 WMI_VDEV_RX_FILTER_OUT_FROMDS = 0x1,
5640 /* Drop ToDS frames */
5641 WMI_VDEV_RX_FILTER_OUT_TODS = 0x2,
5642 /* Drop NODS frames */
5643 WMI_VDEV_RX_FILTER_OUT_NODS = 0x4,
5644 /* Drop RA frames */
5645 WMI_VDEV_RX_FILTER_OUT_RA = 0x8,
5646 /* Drop TA frames */
5647 WMI_VDEV_RX_FILTER_OUT_TA = 0x10,
5648} wmi_vdev_param_filter;
5649
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005650/* Length of ATIM Window in TU */
5651#define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
5652
5653enum wmi_pkt_type {
5654 WMI_PKT_TYPE_RAW = 0,
5655 WMI_PKT_TYPE_NATIVE_WIFI = 1,
5656 WMI_PKT_TYPE_ETHERNET = 2,
5657};
5658
Govind Singh869c9872016-02-22 18:36:34 +05305659/*******************************************************************
5660 * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap
5661 * Do not use it!
5662 *******************************************************************/
5663
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005664typedef struct {
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05305665 A_UINT8 sutxbfee:1, mutxbfee:1, sutxbfer:1, mutxbfer:1,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005666#if defined(AR900B)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05305667 txb_sts_cap:3, implicit_bf:1;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005668#else
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05305669 reserved:4;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005670#endif
5671} wmi_vdev_txbf_en;
5672
5673/** Upto 8 bits are available for Roaming module to be sent along with
5674 WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
5675/* Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
5676#define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1
5677/* Enable Roaming module in FW to do scan based on Final BMISS */
5678#define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2
5679
5680/** slot time long */
5681#define WMI_VDEV_SLOT_TIME_LONG 0x1
5682/** slot time short */
5683#define WMI_VDEV_SLOT_TIME_SHORT 0x2
5684/** preablbe long */
5685#define WMI_VDEV_PREAMBLE_LONG 0x1
5686/** preablbe short */
5687#define WMI_VDEV_PREAMBLE_SHORT 0x2
5688
5689/** the definition of different START/RESTART Event response */
5690typedef enum {
5691 /* Event respose of START CMD */
5692 WMI_VDEV_START_RESP_EVENT = 0,
5693 /* Event respose of RESTART CMD */
5694 WMI_VDEV_RESTART_RESP_EVENT,
5695} WMI_START_EVENT_PARAM;
5696
5697typedef struct {
5698 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */
5699 /** unique id identifying the VDEV, generated by the caller */
5700 A_UINT32 vdev_id;
5701 /** requestor id that requested the VDEV start request */
5702 A_UINT32 requestor_id;
5703 /* Respose of Event type START/RESTART */
5704 WMI_START_EVENT_PARAM resp_type;
5705 /** status of the response */
5706 A_UINT32 status;
5707 /** Vdev chain mask */
5708 A_UINT32 chain_mask;
5709 /** Vdev mimo power save mode */
5710 A_UINT32 smps_mode;
Govind Singh869c9872016-02-22 18:36:34 +05305711 union {
5712 /* OBSOLETE - will be removed once all refs are gone */
5713 A_UINT32 mac_id;
5714 /** pdev_id for identifying the MAC
5715 * See macros starting with WMI_PDEV_ID_ for values.
5716 */
5717 A_UINT32 pdev_id;
5718 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005719 /** Configured Transmit Streams **/
5720 A_UINT32 cfgd_tx_streams;
5721 /** Configured Receive Streams **/
5722 A_UINT32 cfgd_rx_streams;
5723} wmi_vdev_start_response_event_fixed_param;
5724
5725typedef struct {
5726 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */
5727 /** unique id identifying the VDEV, generated by the caller */
5728 A_UINT32 vdev_id;
5729} wmi_vdev_stopped_event_fixed_param;
5730
Manikandan Mohan429a0782015-12-23 14:35:54 -08005731typedef struct {
5732 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */
5733 /** unique id identifying the VDEV, generated by the caller */
5734 A_UINT32 vdev_id;
5735} wmi_vdev_delete_resp_event_fixed_param;
5736
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005737/** common structure used for simple events (stopped, resume_req, standby response) */
5738typedef struct {
5739 A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */
5740 /** unique id identifying the VDEV, generated by the caller */
5741 A_UINT32 vdev_id;
5742} wmi_vdev_simple_event_fixed_param;
5743
5744/** VDEV start response status codes */
5745#define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV succesfully started */
5746#define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */
5747#define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */
5748
5749/** Beacon processing related command and event structures */
5750typedef struct {
5751 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
5752 /** unique id identifying the VDEV, generated by the caller */
5753 A_UINT32 vdev_id;
5754 /** xmit rate */
5755 A_UINT32 tx_rate;
5756 /** xmit power */
5757 A_UINT32 txPower;
5758 /** beacon buffer length in bytes */
5759 A_UINT32 buf_len;
5760 /* This TLV is followed by array of bytes:
5761 * // beacon frame buffer
5762 * A_UINT8 bufp[];
5763 */
5764} wmi_bcn_tx_hdr;
5765
5766/* Beacon filter */
5767#define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
5768#define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
5769#define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
5770#define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
5771#define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
5772
5773typedef struct {
5774 /** Filter ID */
5775 A_UINT32 bcn_filter_id;
5776 /** Filter type - wmi_bcn_filter */
5777 A_UINT32 bcn_filter;
5778 /** Buffer len */
5779 A_UINT32 bcn_filter_len;
5780 /** Filter info (threshold, BSSID, RSSI) */
5781 A_UINT8 *bcn_filter_buf;
5782} wmi_bcn_filter_rx_cmd;
5783
5784/** Capabilities and IEs to be passed to firmware */
5785typedef struct {
5786 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
5787 /** Capabilities */
5788 A_UINT32 caps;
5789 /** ERP info */
5790 A_UINT32 erp;
5791 /** Advanced capabilities */
5792 /** HT capabilities */
5793 /** HT Info */
5794 /** ibss_dfs */
5795 /** wpa Info */
5796 /** rsn Info */
5797 /** rrm info */
5798 /** ath_ext */
5799 /** app IE */
5800} wmi_bcn_prb_info;
5801
5802typedef struct {
5803 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
5804 /** unique id identifying the VDEV, generated by the caller */
5805 A_UINT32 vdev_id;
5806 /** TIM IE offset from the beginning of the template. */
5807 A_UINT32 tim_ie_offset;
5808 /** beacon buffer length. data is in TLV data[] */
5809 A_UINT32 buf_len;
5810 /*
5811 * The TLVs follows:
5812 * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs
5813 * A_UINT8 data[]; //Variable length data
5814 */
5815} wmi_bcn_tmpl_cmd_fixed_param;
5816
5817typedef struct {
5818 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
5819 /** unique id identifying the VDEV, generated by the caller */
5820 A_UINT32 vdev_id;
5821 /** beacon buffer length. data is in TLV data[] */
5822 A_UINT32 buf_len;
5823 /*
5824 * The TLVs follows:
5825 * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs
5826 * A_UINT8 data[]; //Variable length data
5827 */
5828} wmi_prb_tmpl_cmd_fixed_param;
5829
5830typedef struct {
5831 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
5832 A_UINT32 tlv_header;
5833 /** unique id identifying the VDEV */
5834 A_UINT32 vdev_id;
5835 /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
5836 A_UINT32 tx_status;
5837} wmi_offload_bcn_tx_status_event_fixed_param;
5838
5839enum wmi_sta_ps_mode {
5840 /** enable power save for the given STA VDEV */
5841 WMI_STA_PS_MODE_DISABLED = 0,
5842 /** disable power save for a given STA VDEV */
5843 WMI_STA_PS_MODE_ENABLED = 1,
5844};
5845
5846typedef struct {
5847 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
5848 /** unique id identifying the VDEV, generated by the caller */
5849 A_UINT32 vdev_id;
5850
5851 /** Power save mode
5852 *
5853 * (see enum wmi_sta_ps_mode)
5854 */
5855 A_UINT32 sta_ps_mode;
5856} wmi_sta_powersave_mode_cmd_fixed_param;
5857
5858enum wmi_csa_offload_en {
5859 WMI_CSA_OFFLOAD_DISABLE = 0,
5860 WMI_CSA_OFFLOAD_ENABLE = 1,
5861};
5862
5863typedef struct {
5864 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */
5865 A_UINT32 vdev_id;
5866 A_UINT32 csa_offload_enable;
5867} wmi_csa_offload_enable_cmd_fixed_param;
5868
5869typedef struct {
5870 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */
5871 A_UINT32 vdev_id;
5872 /*
5873 * The TLVs follows:
5874 * wmi_channel chan;
5875 */
5876} wmi_csa_offload_chanswitch_cmd_fixed_param;
5877/**
5878 * This parameter controls the policy for retrieving frames from AP while the
5879 * STA is in sleep state.
5880 *
5881 * Only takes affect if the sta_ps_mode is enabled
5882 */
5883enum wmi_sta_ps_param_rx_wake_policy {
5884 /* Wake up when ever there is an RX activity on the VDEV. In this mode
5885 * the Power save SM(state machine) will come out of sleep by either
5886 * sending null frame (or) a data frame (with PS==0) in response to TIM
5887 * bit set in the received beacon frame from AP.
5888 */
5889 WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
5890
5891 /* Here the power save state machine will not wakeup in response to TIM
5892 * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
5893 * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
5894 * access categories are delivery-enabled, the station will send a UAPSD
5895 * trigger frame, otherwise it will send a PS-Poll.
5896 */
5897 WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
5898};
5899
5900/** Number of tx frames/beacon that cause the power save SM to wake up.
5901 *
5902 * Value 1 causes the SM to wake up for every TX. Value 0 has a special
5903 * meaning, It will cause the SM to never wake up. This is useful if you want
5904 * to keep the system to sleep all the time for some kind of test mode . host
5905 * can change this parameter any time. It will affect at the next tx frame.
5906 */
5907enum wmi_sta_ps_param_tx_wake_threshold {
5908 WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
5909 WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
5910
5911 /* Values greater than one indicate that many TX attempts per beacon
5912 * interval before the STA will wake up
5913 */
5914};
5915
5916/**
5917 * The maximum number of PS-Poll frames the FW will send in response to
5918 * traffic advertised in TIM before waking up (by sending a null frame with PS
5919 * = 0). Value 0 has a special meaning: there is no maximum count and the FW
5920 * will send as many PS-Poll as are necessary to retrieve buffered BU. This
5921 * parameter is used when the RX wake policy is
5922 * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
5923 * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
5924 */
5925enum wmi_sta_ps_param_pspoll_count {
5926 WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
5927 /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
5928 * will send before waking up.
5929 */
5930};
5931
5932/*
5933 * This will include the delivery and trigger enabled state for every AC.
5934 * This is the negotiated state with AP. The host MLME needs to set this based
5935 * on AP capability and the state Set in the association request by the
5936 * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
5937 */
5938#define WMI_UAPSD_AC_TYPE_DELI 0
5939#define WMI_UAPSD_AC_TYPE_TRIG 1
5940
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05305941#define WMI_UAPSD_AC_BIT_MASK(ac, type) \
5942 do { \
5943 (type == WMI_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) : \
5944 (1<<((ac<<1)+1)) \
5945 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005946
5947enum wmi_sta_ps_param_uapsd {
5948 WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
5949 WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
5950 WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
5951 WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
5952 WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
5953 WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
5954 WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
5955 WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
5956};
5957
5958enum wmi_sta_powersave_param {
5959 /**
5960 * Controls how frames are retrievd from AP while STA is sleeping
5961 *
5962 * (see enum wmi_sta_ps_param_rx_wake_policy)
5963 */
5964 WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
5965
5966 /**
5967 * The STA will go active after this many TX
5968 *
5969 * (see enum wmi_sta_ps_param_tx_wake_threshold)
5970 */
5971 WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
5972
5973 /**
5974 * Number of PS-Poll to send before STA wakes up
5975 *
5976 * (see enum wmi_sta_ps_param_pspoll_count)
5977 *
5978 */
5979 WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
5980
5981 /**
5982 * TX/RX inactivity time in msec before going to sleep.
5983 *
5984 * The power save SM will monitor tx/rx activity on the VDEV, if no
5985 * activity for the specified msec of the parameter the Power save SM will
5986 * go to sleep.
5987 */
5988 WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
5989
5990 /**
5991 * Set uapsd configuration.
5992 *
5993 * (see enum wmi_sta_ps_param_uapsd)
5994 */
5995 WMI_STA_PS_PARAM_UAPSD = 4,
5996 /**
5997 * Number of PS-Poll to send before STA wakes up in QPower Mode
5998 */
5999 WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
6000
6001 /**
6002 * Enable QPower
6003 */
6004 WMI_STA_PS_ENABLE_QPOWER = 6,
6005
6006 /**
6007 * Number of TX frames before the entering the Active state
6008 */
6009 WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
6010
6011 /**
6012 * QPower SPEC PSPOLL interval
6013 */
6014 WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
6015
6016 /**
6017 * Max SPEC PSPOLL to be sent when the PSPOLL response has
6018 * no-data bit set
6019 */
6020 WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
6021};
6022
6023typedef struct {
6024 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
6025 /** unique id identifying the VDEV, generated by the caller */
6026 A_UINT32 vdev_id;
6027 /** station power save parameter (see enum wmi_sta_powersave_param) */
6028 A_UINT32 param;
6029 A_UINT32 value;
6030} wmi_sta_powersave_param_cmd_fixed_param;
6031
6032/** No MIMO power save */
6033#define WMI_STA_MIMO_PS_MODE_DISABLE
6034/** mimo powersave mode static*/
6035#define WMI_STA_MIMO_PS_MODE_STATIC
6036/** mimo powersave mode dynamic */
6037#define WMI_STA_MIMO_PS_MODE_DYNAMI
6038
6039typedef struct {
6040 /** unique id identifying the VDEV, generated by the caller */
6041 A_UINT32 vdev_id;
6042 /** mimo powersave mode as defined above */
6043 A_UINT32 mimo_pwrsave_mode;
6044} wmi_sta_mimo_ps_mode_cmd;
6045
6046/** U-APSD configuration of peer station from (re)assoc request and TSPECs */
6047enum wmi_ap_ps_param_uapsd {
6048 WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
6049 WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
6050 WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
6051 WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
6052 WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
6053 WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
6054 WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
6055 WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
6056};
6057
6058/** U-APSD maximum service period of peer station */
6059enum wmi_ap_ps_peer_param_max_sp {
6060 WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
6061 WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
6062 WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
6063 WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
6064
6065 /* keep last! */
6066 MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
6067};
6068
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05306069/** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */
6070enum wmi_ap_ps_param_sifs_resp_frmtype {
6071 WMI_SIFS_RESP_PSPOLL = (1 << 0),
6072 WMI_SIFS_RESP_UAPSD = (1 << 1),
6073 WMI_SIFS_RESP_QBST_EXP = (1 << 2),
6074 WMI_SIFS_RESP_QBST_DATA = (1 << 3),
6075 WMI_SIFS_RESP_QBST_BAR = (1 << 4),
6076};
6077
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006078/**
6079 * AP power save parameter
6080 * Set a power save specific parameter for a peer station
6081 */
6082enum wmi_ap_ps_peer_param {
6083 /** Set uapsd configuration for a given peer.
6084 *
6085 * This will include the delivery and trigger enabled state for every AC.
6086 * The host MLME needs to set this based on AP capability and stations
6087 * request Set in the association request received from the station.
6088 *
6089 * Lower 8 bits of the value specify the UAPSD configuration.
6090 *
6091 * (see enum wmi_ap_ps_param_uapsd)
6092 * The default value is 0.
6093 */
6094 WMI_AP_PS_PEER_PARAM_UAPSD = 0,
6095
6096 /**
6097 * Set the service period for a UAPSD capable station
6098 *
6099 * The service period from wme ie in the (re)assoc request frame.
6100 *
6101 * (see enum wmi_ap_ps_peer_param_max_sp)
6102 */
6103 WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
6104
6105 /** Time in seconds for aging out buffered frames for STA in power save */
6106 WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05306107 /**
6108 * Specify frame types that are considered SIFS RESP trigger frame
6109 * (see enum wmi_ap_ps_param_sifs_resp_frmtype)
6110 */
Govind Singh32cced32016-02-01 13:33:09 +05306111 WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
6112
6113 /*
6114 * Specifies the trigger state of TID.
6115 * Valid only for UAPSD frame type
6116 */
6117 WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
6118
6119 /** Specifies the WNM sleep state of a STA */
6120 WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006121};
6122
6123typedef struct {
6124 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
6125 /** unique id identifying the VDEV, generated by the caller */
6126 A_UINT32 vdev_id;
6127 /** peer MAC address */
6128 wmi_mac_addr peer_macaddr;
6129 /** AP powersave param (see enum wmi_ap_ps_peer_param) */
6130 A_UINT32 param;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05306131 /** AP powersave param value (see defines) */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006132 A_UINT32 value;
6133} wmi_ap_ps_peer_cmd_fixed_param;
6134
6135/** Configure peer station 11v U-APSD coexistance
6136 *
6137 * Two parameters from uaspd coexistence ie info (as specified in 11v) are
6138 * sent down to FW along with this command.
6139 *
6140 * The semantics of these fields are described in the following text extracted
6141 * from 802.11v.
6142 *
6143 * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the
6144 * U-APSD Coexistence element, the AP should not transmit frames to the
6145 * non-AP STA outside of the U-APSD Coexistence Service Period, which
6146 * begins when the AP receives the U-APSD trigger frame and ends after
6147 * the transmission period specified by the result of the following
6148 * calculation:
6149 *
6150 * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
6151 *
6152 * Where T is the time the U-APSD trigger frame was received at the AP
6153 * Interval is the UAPSD Coexistence element Duration/Interval field
6154 * value (see 7.3.2.91) or upon the successful transmission of a frame
6155 * with EOSP bit set to 1, whichever is earlier.
6156 *
6157 *
6158 * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
6159 * Coexistence element, the AP should not transmit frames to the non-AP
6160 * STA outside of the U-APSD Coexistence Service Period, which begins
6161 * when the AP receives a U-APSD trigger frame and ends after the
6162 * transmission period specified by the result of the following
6163 * calculation: End of transmission period = T + Duration
6164 */
6165typedef struct {
6166 /** unique id identifying the VDEV, generated by the caller */
6167 A_UINT32 vdev_id;
6168 /** peer MAC address */
6169 wmi_mac_addr peer_macaddr;
6170 /** Enable U-APSD coexistence support for this peer
6171 *
6172 * 0 -> disabled (default)
6173 * 1 -> enabled
6174 */
6175 A_UINT32 enabled;
6176 /** Duration/Interval as defined by 11v U-ASPD coexistance */
6177 A_UINT32 duration_interval;
6178 /** Upper 32 bits of 64-bit TSF offset */
6179 A_UINT32 tsf_offset_high;
6180 /** Lower 32 bits of 64-bit TSF offset */
6181 A_UINT32 tsf_offset_low;
6182} wmi_ap_powersave_peer_uapsd_coex_cmd;
6183
6184typedef enum {
6185 WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001,
6186 WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002,
6187 WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
6188
6189 WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
6190} wmi_ap_ps_egap_flag_type;
6191
6192/**
6193 * configure ehanced green ap parameters
6194 */
6195typedef struct {
6196 /*
6197 * TLV tag and len; tag equals
6198 * wmi_ap_powersave_egap_param_cmd_fixed_param
6199 */
6200 A_UINT32 tlv_header;
6201 /** Enable enhanced green ap
6202 * 0 -> disabled
6203 * 1 -> enabled
6204 */
6205 A_UINT32 enable;
6206 /** The param indicates a duration that all STAs connected
6207 * to S-AP have no traffic.
6208 */
6209 A_UINT32 inactivity_time; /* in unit of milliseconds */
6210 /** The param indicates a duration that all STAs connected
6211 * to S-AP have no traffic, after all STAs have entered powersave.
6212 */
6213 A_UINT32 wait_time; /* in unit of milliseconds */
6214 /** The param is used to turn on/off some functions within E-GAP.
6215 */
6216 A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
6217} wmi_ap_ps_egap_param_cmd_fixed_param;
6218
6219typedef enum {
6220 WMI_AP_PS_EGAP_STATUS_IDLE = 1,
6221 WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
6222 WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3,
6223
6224 WMI_AP_PS_EGAP_STATUS_MAX = 15
6225} wmi_ap_ps_egap_status_type;
6226
6227/**
6228 * send ehanced green ap status to host
6229 */
6230typedef struct {
Manikandan Mohan0c7ae402015-12-03 17:56:41 -08006231 /* TLV tag and len; tag equals
6232 * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list
6233 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006234 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05306235 union {
6236 /* OBSOLETE - will be removed once all refs are gone */
6237 A_UINT32 mac_id;
6238 /** pdev_id for identifying the MAC
6239 * See macros starting with WMI_PDEV_ID_ for values.
6240 */
6241 A_UINT32 pdev_id;
6242 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006243 /** The param indicates the current tx chainmask with the mac id. */
6244 A_UINT32 tx_chainmask;
6245 /** The param indicates the current rx chainmask with the mac id. */
6246 A_UINT32 rx_chainmask;
6247} wmi_ap_ps_egap_info_chainmask_list;
6248
6249typedef struct {
6250 /*
6251 * TLV tag and len; tag equals
6252 * wmi_ap_powersave_egap_param_cmd_fixed_param
6253 */
6254 A_UINT32 tlv_header;
6255 /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
6256 A_UINT32 status;
6257 /* This TLV is followed by
6258 * wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
6259 */
6260} wmi_ap_ps_egap_info_event_fixed_param;
6261
6262
6263/* 128 clients = 4 words */
6264/* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
6265#define WMI_TIM_BITMAP_ARRAY_SIZE 4
6266
6267typedef struct {
6268 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
6269 /** TIM bitmap len (in bytes)*/
6270 A_UINT32 tim_len;
6271 /** TIM Partial Virtual Bitmap */
6272 A_UINT32 tim_mcast;
6273 A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
6274 A_UINT32 tim_changed;
6275 A_UINT32 tim_num_ps_pending;
6276} wmi_tim_info;
6277
6278typedef struct {
6279 /** Flag to enable quiet period IE support */
6280 A_UINT32 is_enabled;
6281 /** Quiet start */
6282 A_UINT32 tbttcount;
6283 /** Beacon intervals between quiets*/
6284 A_UINT32 period;
6285 /** TUs of each quiet*/
6286 A_UINT32 duration;
6287 /** TUs of from TBTT of quiet start*/
6288 A_UINT32 offset;
6289} wmi_quiet_info;
6290
6291/* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
6292#define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
6293
6294typedef struct {
6295 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
6296 /** Bit 0: Flag to indicate an update in NOA schedule
6297 * Bits 7-1: Reserved
6298 * Bits 15-8: Index (identifies the instance of NOA sub element)
6299 * Bit 16: Opp PS state of the AP
6300 * Bits 23-17: Ctwindow in TUs
6301 * Bits 31-24: Number of NOA descriptors
6302 */
6303 A_UINT32 noa_attributes;
6304 wmi_p2p_noa_descriptor
6305 noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
6306} wmi_p2p_noa_info;
6307
6308#define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
6309#define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
6310
6311#define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \
6312 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
6313
6314#define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \
6315 WMI_F_RMW((hdr)->noa_attributes, 0x1, \
6316 WMI_UNIFIED_NOA_ATTR_MODIFIED);
6317
6318#define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00
6319#define WMI_UNIFIED_NOA_ATTR_INDEX_S 8
6320
6321#define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \
6322 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
6323
6324#define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \
6325 WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
6326 WMI_UNIFIED_NOA_ATTR_INDEX);
6327
6328#define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000
6329#define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16
6330
6331#define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \
6332 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
6333
6334#define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \
6335 WMI_F_RMW((hdr)->noa_attributes, 0x1, \
6336 WMI_UNIFIED_NOA_ATTR_OPP_PS);
6337
6338#define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000
6339#define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17
6340
6341#define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \
6342 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
6343
6344#define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \
6345 WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \
6346 WMI_UNIFIED_NOA_ATTR_CTWIN);
6347
6348#define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000
6349#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24
6350
6351#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \
6352 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
6353
6354#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \
6355 WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
6356 WMI_UNIFIED_NOA_ATTR_NUM_DESC);
6357
6358typedef struct {
6359 /** TIM info */
6360 wmi_tim_info tim_info;
6361 /** P2P NOA info */
6362 wmi_p2p_noa_info p2p_noa_info;
6363 /* TBD: More info elements to be added later */
6364} wmi_bcn_info;
6365
6366typedef struct {
6367 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
6368 /** bitmap identifying the VDEVs, generated by the caller */
6369 A_UINT32 vdev_map;
6370 /* This TLV is followed by tim_info and p2p_noa_info for each vdev in vdevmap :
6371 * wmi_tim_info tim_info[];
6372 * wmi_p2p_noa_info p2p_noa_info[];
6373 *
6374 */
6375} wmi_host_swba_event_fixed_param;
6376
6377#define WMI_MAX_AP_VDEV 16
6378
6379typedef struct {
6380 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
6381 /** bimtap of VDEVs that has tbtt offset updated */
6382 A_UINT32 vdev_map;
6383 /* The TLVs for tbttoffset_list will follow this TLV.
6384 * tbtt offset list in the order of the LSB to MSB in the vdev_map bitmap
6385 * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
6386 */
6387} wmi_tbtt_offset_event_fixed_param;
6388
6389/* Peer Specific commands and events */
6390
6391typedef struct {
6392 A_UINT32 percentage; /* in unit of 12.5% */
6393 A_UINT32 min_delta; /* in unit of Mbps */
6394} rate_delta_t;
6395
6396#define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01
6397#define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02
6398#define MAX_NUM_OF_RATE_THRESH 4
6399
6400typedef struct {
6401 /*
6402 * PEER_RATE_REPORT_COND_FLAG_DELTA,
6403 * PEER_RATE_REPORT_COND_FLAG_THRESHOLD
6404 * Any of these two conditions or both of
6405 * them can be set.
6406 */
6407 A_UINT32 val_cond_flags;
6408 rate_delta_t rate_delta;
6409 /*
6410 * In unit of Mbps. There are at most 4 thresholds
6411 * If the threshold count is less than 4, set zero to
6412 * the one following the last threshold
6413 */
6414 A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH];
6415} report_cond_per_phy_t;
6416
6417
6418enum peer_rate_report_cond_phy_type {
6419 PEER_RATE_REPORT_COND_11B = 0,
6420 PEER_RATE_REPORT_COND_11A_G,
6421 PEER_RATE_REPORT_COND_11N,
6422 PEER_RATE_REPORT_COND_11AC,
6423 PEER_RATE_REPORT_COND_MAX_NUM
6424};
6425
6426typedef struct {
6427 /*
6428 * TLV tag and len; tag equals
6429 * WMITLV_TAG_STRUC_wmi_peer_rate_report_condtion_fixed_param
6430 */
6431 A_UINT32 tlv_header;
6432 /* 1= enable, 0=disable */
6433 A_UINT32 enable_rate_report;
6434 A_UINT32 report_backoff_time; /* in unit of msecond */
6435 A_UINT32 report_timer_period; /* in unit of msecond */
6436 /*
6437 *In the following field, the array index means the phy type,
6438 * please see enum peer_rate_report_cond_phy_type for detail
6439 */
6440 report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
6441} wmi_peer_set_rate_report_condition_fixed_param;
6442
6443/* Peer Type:
6444 * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
6445 * on address and vdev opmode. This is largely here to allow host to indicate that
6446 * peer is explicitly a TDLS peer
6447 */
6448enum wmi_peer_type {
6449 WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
6450 WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
6451 WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
6452 WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
Govind Singh941bd5e2016-02-04 17:15:25 +05306453 WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006454 WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306455 * is assigned up to 127 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006456 /* Reserved from 128 - 255 for
6457 * target internal use.*/
6458 WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
6459};
6460
6461typedef struct {
6462 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
6463 /** unique id identifying the VDEV, generated by the caller */
6464 A_UINT32 vdev_id;
6465 /** peer MAC address */
6466 wmi_mac_addr peer_macaddr;
6467 /** peer type: see enum values above */
6468 A_UINT32 peer_type;
6469} wmi_peer_create_cmd_fixed_param;
6470
6471typedef struct {
6472 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
6473 /** unique id identifying the VDEV, generated by the caller */
6474 A_UINT32 vdev_id;
6475 /** peer MAC address */
6476 wmi_mac_addr peer_macaddr;
6477} wmi_peer_delete_cmd_fixed_param;
6478
6479typedef struct {
6480 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
6481 /** unique id identifying the VDEV, generated by the caller */
6482 A_UINT32 vdev_id;
6483 /** peer MAC address */
6484 wmi_mac_addr peer_macaddr;
6485 /** tid bitmap identifying the tids to flush */
6486 A_UINT32 peer_tid_bitmap;
6487} wmi_peer_flush_tids_cmd_fixed_param;
6488
6489typedef struct {
6490 /** rate mode . 0: disable fixed rate (auto rate)
6491 * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
6492 * 2: ht20 11n rate specified as mcs index
6493 * 3: ht40 11n rate specified as mcs index
6494 */
6495 A_UINT32 rate_mode;
6496 /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
6497 * and series 3 is stored at byte 3 (MSB) */
6498 A_UINT32 rate_series;
6499 /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
6500 * and retry count for rate 3 is stored at byte 3 (MSB) */
6501 A_UINT32 rate_retries;
6502} wmi_fixed_rate;
6503
6504typedef struct {
6505 /** unique id identifying the VDEV, generated by the caller */
6506 A_UINT32 vdev_id;
6507 /** peer MAC address */
6508 wmi_mac_addr peer_macaddr;
6509 /** fixed rate */
6510 wmi_fixed_rate peer_fixed_rate;
6511} wmi_peer_fixed_rate_cmd;
6512
6513#define WMI_MGMT_TID 17
6514
6515typedef struct {
6516 A_UINT32 tlv_header;
6517 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
6518 /** unique id identifying the VDEV, generated by the caller */
6519 A_UINT32 vdev_id;
6520 /** peer MAC address */
6521 wmi_mac_addr peer_macaddr;
6522} wmi_addba_clear_resp_cmd_fixed_param;
6523
6524typedef struct {
6525 A_UINT32 tlv_header;
6526 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */
6527 /** unique id identifying the VDEV, generated by the caller */
6528 A_UINT32 vdev_id;
6529 /** peer MAC address */
6530 wmi_mac_addr peer_macaddr;
6531 /** Tid number */
6532 A_UINT32 tid;
6533 /** Buffer/Window size*/
6534 A_UINT32 buffersize;
6535} wmi_addba_send_cmd_fixed_param;
6536
6537typedef struct {
6538 A_UINT32 tlv_header;
6539 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
6540 /** unique id identifying the VDEV, generated by the caller */
6541 A_UINT32 vdev_id;
6542 /** peer MAC address */
6543 wmi_mac_addr peer_macaddr;
6544 /** Tid number */
6545 A_UINT32 tid;
6546 /** Is Initiator */
6547 A_UINT32 initiator;
6548 /** Reason code */
6549 A_UINT32 reasoncode;
6550} wmi_delba_send_cmd_fixed_param;
6551
6552typedef struct {
6553 A_UINT32 tlv_header;
6554 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
6555 /** unique id identifying the vdev, generated by the caller */
6556 A_UINT32 vdev_id;
6557 /** peer mac address */
6558 wmi_mac_addr peer_macaddr;
6559 /** Tid number */
6560 A_UINT32 tid;
6561 /** status code */
6562 A_UINT32 statuscode;
6563} wmi_addba_setresponse_cmd_fixed_param;
6564
6565typedef struct {
6566 A_UINT32 tlv_header;
6567 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
6568 /** unique id identifying the vdev, generated by the caller */
6569 A_UINT32 vdev_id;
6570 /** peer mac address */
6571 wmi_mac_addr peer_macaddr;
6572 /** Tid number */
6573 A_UINT32 tid;
6574} wmi_send_singleamsdu_cmd_fixed_param;
6575
6576/* Type of Station DTIM Power Save method */
6577enum {
6578 /* For NORMAL DTIM, the parameter is the number of beacon intervals and
6579 * also the same value as the listen interval. For this method, the
6580 * station will wake up based on the listen interval. If this
6581 * listen interval is not equal to DTIM, then the station may
6582 * miss certain DTIM beacons. If this value is 1, then the
6583 * station will wake up for every beacon.
6584 */
6585 WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
6586 /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
6587 * When this value is 1, then the station will wake at every DTIM beacon.
6588 * If this value is >1, then the station will skip certain DTIM beacons.
6589 * This value is the multiple of DTIM intervals that the station will
6590 * wake up to receive the DTIM beacons.
6591 */
6592 WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
6593};
6594
6595/* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
6596typedef struct {
6597 A_UINT32 tlv_header;
6598 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
6599 /** unique id identifying the VDEV, generated by the caller */
6600 A_UINT32 vdev_id;
6601 /* Station DTIM Power Save method as defined above */
6602 A_UINT32 dtim_pwrsave_method;
6603 /* DTIM PS value. Contents depends on the method */
6604 A_UINT32 value;
6605 /* Modulated DTIM value */
6606 A_UINT32 MaxLIModulatedDTIM;
6607} wmi_sta_dtim_ps_method_cmd_fixed_param;
6608
6609/*
6610 * For Station UAPSD Auto Trigger feature, the Firmware monitors the
6611 * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
6612 * If there is no uplink/download for the specified service interval (field service_interval),
6613 * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
6614 * specified in the UP (field user_priority).
6615 * Firmware also monitors the responses for these QOS-NULL triggers.
6616 * If the peer does not have any delivery frames, it will respond with
6617 * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
6618 * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
6619 * are unused and should be set to 0.
6620 * When service_interval is 0, then the firmware will not send any trigger frames. This is for
6621 * certain host-based implementations that don't want this firmware offload.
6622 * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
6623 * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
6624 * and rest of the AC default to 300 ms.
6625 *
6626 * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
6627 * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
6628 * the more advanced monitoring method.
6629 * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
6630 * suspend interval (field suspend_interval), firmware will change its auto trigger interval
6631 * to delay interval (field delay_interval). This way, when there is no traffic, the station
6632 * will save more power by waking up less and sending less trigger frames.
6633 * The (service_interval < suspend_interval) and (service_interval < delay_interval).
6634 * If this variable auto trigger is not required, then the suspend_interval and delay_interval
6635 * should be 0.
6636 */
6637typedef struct {
6638 A_UINT32 tlv_header;
6639 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
6640 /** WMM Access category from 0 to 3 */
6641 A_UINT32 wmm_ac;
6642 /** User priority to use in trigger frames. It is the TID
6643 * value. This field needs to be specified and may not be
6644 * equivalent to AC since some implementation may use the TSPEC
6645 * to enable UAPSD and negotiate a particular user priority. */
6646 A_UINT32 user_priority;
6647 /** service interval in ms */
6648 A_UINT32 service_interval;
6649 /** Suspend interval in ms */
6650 A_UINT32 suspend_interval;
6651 /** delay interval in ms */
6652 A_UINT32 delay_interval;
6653} wmi_sta_uapsd_auto_trig_param;
6654
6655typedef struct {
6656 A_UINT32 tlv_header;
6657 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
6658 /** unique id identifying the VDEV, generated by the caller */
6659 A_UINT32 vdev_id;
6660 /** peer mac address */
6661 wmi_mac_addr peer_macaddr;
6662 /** Number of AC to specify */
6663 A_UINT32 num_ac;
6664 /*
6665 * Following this struc is the TLV:
6666 * wmi_sta_uapsd_auto_trig_param ac_param[]; //Variable number of AC parameters (defined by field num_ac)
6667 */
6668
6669} wmi_sta_uapsd_auto_trig_cmd_fixed_param;
6670
6671/** mimo powersave state */
6672#define WMI_PEER_MIMO_PS_STATE 0x1
6673/** enable/disable AMPDU . initial value (enabled) */
6674#define WMI_PEER_AMPDU 0x2
6675/** authorize/unauthorize peer. initial value is unauthorized (0) */
6676#define WMI_PEER_AUTHORIZE 0x3
6677/** peer channel bandwidth */
6678#define WMI_PEER_CHWIDTH 0x4
6679/** peer NSS */
6680#define WMI_PEER_NSS 0x5
6681/** USE 4 ADDR */
6682#define WMI_PEER_USE_4ADDR 0x6
6683/* set group membership status */
6684#define WMI_PEER_MEMBERSHIP 0x7
6685#define WMI_PEER_USERPOS 0x8
6686/*
6687 * A critical high-level protocol is being used with this peer. Target
6688 * should take appropriate measures (if possible) to ensure more
6689 * reliable link with minimal latency. This *may* include modifying the
6690 * station power save policy, enabling more RX chains, increased
6691 * priority of channel scheduling, etc.
6692 *
6693 * NOTE: This parameter should only be considered a hint as specific
6694 * behavior will depend on many factors including current network load
6695 * and vdev/peer configuration.
6696 *
6697 * For STA VDEV this peer corresponds to the AP's BSS peer.
6698 * For AP VDEV this peer corresponds to the remote peer STA.
6699 */
6700#define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9
6701/* set Tx failure count threshold for the peer - Currently unused */
6702#define WMI_PEER_TX_FAIL_CNT_THR 0xA
6703/* Enable H/W retry and Enable H/W Send CTS2S before Data */
6704#define WMI_PEER_SET_HW_RETRY_CTS2S 0xB
6705
6706/* Set peer advertised IBSS atim window length */
6707#define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC
6708
6709/** peer phy mode */
6710#define WMI_PEER_PHYMODE 0xD
Govind Singh32cced32016-02-01 13:33:09 +05306711/** Use FIXED Pwr */
6712#define WMI_PEER_USE_FIXED_PWR 0xE
6713/** Set peer fixed rate */
6714#define WMI_PEER_PARAM_FIXED_RATE 0xF
6715/** Whitelist peer TIDs */
6716#define WMI_PEER_SET_MU_WHITELIST 0x10
Govind Singh67b83b82016-02-01 19:26:59 +05306717/** Set peer max tx rate (MCS) in adaptive rate ctrl */
6718#define WMI_PEER_SET_MAX_TX_RATE 0x11
6719/** Set peer minimal tx rate (MCS) in adaptive rate ctrl */
6720#define WMI_PEER_SET_MIN_TX_RATE 0x12
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006721
6722/** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
6723#define WMI_PEER_MIMO_PS_NONE 0x0
6724#define WMI_PEER_MIMO_PS_STATIC 0x1
6725#define WMI_PEER_MIMO_PS_DYNAMIC 0x2
6726
6727typedef struct {
6728 A_UINT32 tlv_header;
6729 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */
6730 /** unique id identifying the VDEV, generated by the caller */
6731 A_UINT32 vdev_id;
6732 /** peer MAC address */
6733 wmi_mac_addr peer_macaddr;
6734 /** parameter id */
6735 A_UINT32 param_id;
6736 /** parametr value */
6737 A_UINT32 param_value;
6738} wmi_peer_set_param_cmd_fixed_param;
6739
Govind Singh67b83b82016-02-01 19:26:59 +05306740typedef union {
6741 /*
6742 * The A_UINT16 "mode" and "tx_rate" fields can only be directly used
6743 * by the target or a little-endian host.
6744 * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET
6745 * macros on the A_UINT32 "value" field.
6746 */
6747 struct {
6748 /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */
6749 A_UINT16 mode;
6750 A_UINT16 tx_rate; /* see per-mode specs below */
6751 };
6752 A_UINT32 value; /* for use by big-endian host */
6753} wmi_peer_max_min_tx_rate;
6754
6755/*
6756 * Any access to the mode/tx_rate in an big endian system should use
6757 * the below Macros on the wmi_peer_max_min_tx_rate.value field.
6758 */
6759#define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16)
6760#define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode)
6761
6762#define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16)
6763#define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode)
6764
6765/*
6766 * CCK max/min tx Rate description
6767 * tx_rate = 0: 1Mbps,
6768 * tx_rate = 1: 2Mbps
6769 * tx_rate = 2: 5.5Mbps
6770 * tx_rate = 3: 11Mbps
6771 * tx_rate = else : invalid.
6772 */
6773#define WMI_MAX_CCK_TX_RATE 0x03
6774
6775/*
6776 * OFDM max/min tx Rate description
6777 * tx_rate = 0: 6Mbps,
6778 * tx_rate = 1: 9Mbps
6779 * tx_rate = 2: 12Mbps
6780 * tx_rate = 3: 18Mbps
6781 * tx_rate = 4: 24Mbps
6782 * tx_rate = 5: 32Mbps
6783 * tx_rate = 6: 48Mbps
6784 * tx_rate = 7: 54Mbps
6785 * tx_rate = else : invalid.
6786 */
6787#define WMI_MAX_OFDM_TX_RATE 0x07
6788
6789/*
6790 * HT max/min tx rate description
6791 * tx_rate = 0~7 : MCS Rate 0~7
6792 * tx_rate=else : invalid.
6793 */
6794#define WMI_MAX_HT_TX_MCS 0x07
6795
6796/*
6797 * VHT max/min tx rate description
6798 * tx_rate = 0~9 : MCS Rate 0~9
6799 * tx_rate=else : invalid.
6800 */
6801#define WMI_MAX_VHT_TX_MCS 0x09
6802
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006803#define MAX_SUPPORTED_RATES 128
6804
6805typedef struct {
6806 /** total number of rates */
6807 A_UINT32 num_rates;
6808 /**
6809 * rates (each 8bit value) packed into a 32 bit word.
6810 * the rates are filled from least significant byte to most
6811 * significant byte.
6812 */
6813 A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
6814} wmi_rate_set;
6815
6816/* NOTE: It would bea good idea to represent the Tx MCS
6817 * info in one word and Rx in another word. This is split
6818 * into multiple words for convenience
6819 */
6820typedef struct {
6821 A_UINT32 tlv_header;
6822 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
6823 A_UINT32 rx_max_rate; /* Max Rx data rate */
6824 A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
6825 A_UINT32 tx_max_rate; /* Max Tx data rate */
6826 A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
Govind Singh32cced32016-02-01 13:33:09 +05306827 A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006828} wmi_vht_rate_set;
6829
6830/*
6831 * IMPORTANT: Make sure the bit definitions here are consistent
6832 * with the ni_flags definitions in wlan_peer.h
6833 */
6834#define WMI_PEER_AUTH 0x00000001 /* Authorized for data */
6835#define WMI_PEER_QOS 0x00000002 /* QoS enabled */
6836#define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */
6837#define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */
6838#define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */
6839#define WMI_PEER_HT 0x00001000 /* HT enabled */
6840#define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */
6841#define WMI_PEER_STBC 0x00008000 /* STBC Enabled */
6842#define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */
6843#define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */
6844#define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */
6845#define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */
6846#define WMI_PEER_VHT 0x02000000 /* VHT Enabled */
6847#define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */
6848#define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */
6849/** CAUTION TODO: Place holder for WLAN_PEER_F_PS_PRESEND_REQUIRED = 0x10000000. Need to be clean up */
6850#define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */
6851#define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */
6852#define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */
6853
6854/**
6855 * Peer rate capabilities.
6856 *
6857 * This is of interest to the ratecontrol
6858 * module which resides in the firmware. The bit definitions are
6859 * consistent with that defined in if_athrate.c.
6860 *
6861 * @todo
6862 * Move this to a common header file later so there is no need to
6863 * duplicate the definitions or maintain consistency.
6864 */
6865#define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */
6866#define WMI_RC_CW40_FLAG 0x02 /* CW 40 */
6867#define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */
6868#define WMI_RC_HT_FLAG 0x08 /* HT */
6869#define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
6870#define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */
6871#define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */
6872#define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
6873#define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
6874#define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
6875#define WMI_RC_TS_FLAG 0x200 /* Three stream flag */
6876#define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
6877
6878typedef struct {
6879 A_UINT32 tlv_header;
6880 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
6881 /** peer MAC address */
6882 wmi_mac_addr peer_macaddr;
6883 /** VDEV id */
6884 A_UINT32 vdev_id;
6885 /** assoc = 1 reassoc = 0 */
6886 A_UINT32 peer_new_assoc;
6887 /** peer associd (16 bits) */
6888 A_UINT32 peer_associd;
6889 /** peer station flags: see definition above */
6890 A_UINT32 peer_flags;
6891 /** negotiated capabilities (lower 16 bits)*/
6892 A_UINT32 peer_caps;
6893 /** Listen interval */
6894 A_UINT32 peer_listen_intval;
6895 /** HT capabilties of the peer */
6896 A_UINT32 peer_ht_caps;
6897 /** maximum rx A-MPDU length */
6898 A_UINT32 peer_max_mpdu;
6899 /** mpdu density of the peer in usec(0 to 16) */
6900 A_UINT32 peer_mpdu_density;
6901 /** peer rate capabilties see flags above */
6902 A_UINT32 peer_rate_caps;
6903 /** num spatial streams */
6904 A_UINT32 peer_nss;
6905 /** VHT capabilties of the peer */
6906 A_UINT32 peer_vht_caps;
6907 /** phy mode */
6908 A_UINT32 peer_phymode;
6909 /** HT Operation Element of the peer. Five bytes packed in 2
6910 * INT32 array and filled from lsb to msb.
6911 * Note that the size of array peer_ht_info[] cannotbe changed
6912 * without breaking WMI Compatibility. */
6913 A_UINT32 peer_ht_info[2];
6914 /** total number of negotiated legacy rate set. Also the sizeof
6915 * peer_legacy_rates[] */
6916 A_UINT32 num_peer_legacy_rates;
6917 /** total number of negotiated ht rate set. Also the sizeof
6918 * peer_ht_rates[] */
6919 A_UINT32 num_peer_ht_rates;
Anurag Chouhan08f66c62016-04-18 17:14:51 +05306920 /*
6921 * Bitmap providing customized mapping of bandwidths to max Rx NSS
Govind Singh32cced32016-02-01 13:33:09 +05306922 * for this peer.
6923 * This is required since 802.11 standard currently facilitates peer to
6924 * be able to advertise only a single max Rx NSS value across all
6925 * bandwidths.
6926 * Some QCA chipsets might need to be able to advertise a different max
6927 * Rx NSS value for 160 MHz, than that for 80 MHz and lower.
6928 *
6929 * bit[2:0] : Represents value of Rx NSS for VHT 160 MHz
6930 * bit[30:3]: Reserved
6931 * bit[31] : MSB(0/1): 1 in case of valid data else all bits will be
6932 * set to 0 by host
6933 */
6934 A_UINT32 peer_bw_rxnss_override;
Govind Singhd24f5e42016-02-22 15:16:46 +05306935 /* 802.11ax capabilities */
6936 wmi_ppe_threshold peer_ppet;
6937 /* protocol-defined HE / 11ax capability flags */
6938 A_UINT32 peer_he_cap_info;
6939 A_UINT32 peer_he_ops; /* HE operation contains BSS color */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006940 /* Following this struc are the TLV's:
6941 * A_UINT8 peer_legacy_rates[];
6942 * A_UINT8 peer_ht_rates[];
6943 * wmi_vht_rate_set peer_vht_rates; //VHT capabilties of the peer
6944 */
6945} wmi_peer_assoc_complete_cmd_fixed_param;
6946
Govind Singh32cced32016-02-01 13:33:09 +05306947/* WDS Entry Flags */
6948#define WMI_WDS_FLAG_STATIC 0x1 /* Disable aging & learning */
6949
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006950typedef struct {
6951 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
6952 /** peer MAC address */
6953 wmi_mac_addr peer_macaddr;
6954 /** wds MAC addr */
6955 wmi_mac_addr wds_macaddr;
Govind Singh32cced32016-02-01 13:33:09 +05306956 /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */
6957 A_UINT32 flags;
Govind Singh869c9872016-02-22 18:36:34 +05306958 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006959} wmi_peer_add_wds_entry_cmd_fixed_param;
6960
6961typedef struct {
6962 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
6963 /** wds MAC addr */
6964 wmi_mac_addr wds_macaddr;
Govind Singh869c9872016-02-22 18:36:34 +05306965 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006966} wmi_peer_remove_wds_entry_cmd_fixed_param;
6967
6968typedef struct {
6969 /** peer MAC address */
6970 wmi_mac_addr peer_macaddr;
6971} wmi_peer_q_empty_callback_event;
6972
Govind Singhc7d51942016-02-01 12:09:31 +05306973/*
6974 * Command to update an already existing WDS entry. Different address setting
6975 * combinations are possible.
6976 *
6977 * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated.
6978 * Valid wds and null peer -> Associated WDS entry flags will be updated.
6979 * Null wds and Valid peer-> Flags will be updated for all WDS entries
6980 * behind the peer.
6981 * Null wds and peer -> Flags will be updated for all WDS entries.
6982 */
6983typedef struct {
6984 /*
6985 * TLV tag and len; tag equals
6986 * WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param
6987 */
6988 A_UINT32 tlv_header;
6989 /** peer MAC address */
6990 wmi_mac_addr peer_macaddr;
6991 /** wds MAC addr */
6992 wmi_mac_addr wds_macaddr;
6993 /* Flags associated with WDS entry */
6994 A_UINT32 flags;
Govind Singh869c9872016-02-22 18:36:34 +05306995 A_UINT32 vdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +05306996} wmi_peer_update_wds_entry_cmd_fixed_param;
6997
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006998/**
6999 * Channel info WMI event
7000 */
7001typedef struct {
7002 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
7003 /** Error code */
7004 A_UINT32 err_code;
7005 /** Channel freq */
7006 A_UINT32 freq;
7007 /** Read flags */
7008 A_UINT32 cmd_flags;
7009 /** Noise Floor value */
7010 A_UINT32 noise_floor;
7011 /** rx clear count */
7012 A_UINT32 rx_clear_count;
7013 /** cycle count */
7014 A_UINT32 cycle_count;
Govind Singh32cced32016-02-01 13:33:09 +05307015 /** channel tx power per range in 0.5dBm steps */
7016 A_UINT32 chan_tx_pwr_range;
7017 /** channel tx power per throughput */
7018 A_UINT32 chan_tx_pwr_tp;
7019 /** rx frame count (cumulative) */
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +05307020 A_UINT32 rx_frame_count;
7021 /** BSS rx cycle count */
7022 A_UINT32 my_bss_rx_cycle_count;
7023 /** b-mode data rx time (units are microseconds) */
7024 A_UINT32 rx_11b_mode_data_duration;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007025} wmi_chan_info_event_fixed_param;
7026
7027/**
7028 * Non wlan interference event
7029 */
7030typedef struct {
7031 A_UINT32 tlv_header;
7032 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_ath_dcs_cw_int */
7033 A_UINT32 channel; /* either number or freq in mhz */
Govind Singh869c9872016-02-22 18:36:34 +05307034} wlan_dcs_cw_int;
7035#define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007036
7037/**
7038 * wlan_dcs_im_tgt_stats
7039 *
7040 */
7041typedef struct _wlan_dcs_im_tgt_stats {
Govind Singh869c9872016-02-22 18:36:34 +05307042 /** TLV tag and len; tag equals
7043 * WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t
7044 */
7045 A_UINT32 tlv_header;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007046 /** current running TSF from the TSF-1 */
7047 A_UINT32 reg_tsf32;
7048
7049 /** Known last frame rssi, in case of multiple stations, if
7050 * and at different ranges, this would not gaurantee that
7051 * this is the least rssi.
7052 */
7053 A_UINT32 last_ack_rssi;
7054
7055 /** Sum of all the failed durations in the last one second interval.
7056 */
7057 A_UINT32 tx_waste_time;
7058 /** count how many times the hal_rxerr_phy is marked, in this
7059 * time period
7060 */
7061 A_UINT32 rx_time;
7062 A_UINT32 phyerr_cnt;
7063
7064 /**
7065 * WLAN IM stats from target to host
7066 *
7067 * Below statistics are sent from target to host periodically.
7068 * These are collected at target as long as target is running
7069 * and target chip is not in sleep.
7070 *
7071 */
7072
7073 /** listen time from ANI */
7074 A_INT32 listen_time;
7075
7076 /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
7077 A_UINT32 reg_tx_frame_cnt;
7078
7079 /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
7080 A_UINT32 reg_rx_frame_cnt;
7081
7082 /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
7083 A_UINT32 reg_rxclr_cnt;
7084
7085 /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
7086 A_UINT32 reg_cycle_cnt; /* delta cycle count */
7087
7088 /** extenstion channel rx clear count */
7089 A_UINT32 reg_rxclr_ext_cnt;
7090
7091 /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
7092 A_UINT32 reg_ofdm_phyerr_cnt;
7093
7094 /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
7095 A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +05307096 /** Channel noise floor (units are dBm) */
7097 A_INT32 chan_nf;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007098
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +05307099 /** BSS rx cycle count */
7100 A_UINT32 my_bss_rx_cycle_count;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007101} wlan_dcs_im_tgt_stats_t;
7102
7103/**
7104 * wmi_dcs_interference_event_t
7105 *
7106 * Right now this is event and stats together. Partly this is
7107 * because cw interference is handled in target now. This
7108 * can be done at host itself, if we can carry the NF alone
7109 * as a stats event. In future this would be done and this
7110 * event would carry only stats.
7111 */
7112typedef struct {
7113 A_UINT32 tlv_header;
7114 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
7115 /**
7116 * Type of the event present, either the cw interference event, or the wlan_im stats
7117 */
7118 A_UINT32 interference_type; /* type of interference, wlan or cw */
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05307119 /** pdev_id for identifying the MAC
7120 * See macros starting with WMI_PDEV_ID_ for values.
7121 */
7122 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007123 /*
7124 * Following this struct are these TLVs. Note that they are both array of structures
7125 * but can have at most one element. Which TLV is empty or has one element depends
7126 * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
Govind Singh869c9872016-02-22 18:36:34 +05307127 * elements (not arrays). union { wlan_dcs_cw_int cw_int;
7128 * wlan_dcs_im_tgt_stats_t wlan_stat; }
7129 * int_event;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007130 *
7131 * //cw_interference event
Govind Singh869c9872016-02-22 18:36:34 +05307132 * wlan_dcs_cw_int cw_int[]; this element
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007133 * // wlan im interfernce stats
7134 * wlan_dcs_im_tgt_stats_t wlan_stat[];
7135 */
7136} wmi_dcs_interference_event_fixed_param;
7137
7138enum wmi_peer_mcast_group_action {
7139 wmi_peer_mcast_group_action_add = 0,
7140 wmi_peer_mcast_group_action_del = 1
7141};
7142#define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1
7143#define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0
7144#define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
7145#define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
Govind Singh32cced32016-02-01 13:33:09 +05307146/* flag to exclude an ip while filtering.set to exclude */
7147#define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4
7148#define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2
7149/* flag to say ipv4/ipv6. Will be set for ipv6 */
7150#define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8
7151#define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3
7152/* delete all mcast table entries. */
7153#define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10
7154#define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4
7155
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007156/* multicast group membership commands */
7157/* TODO: Converting this will be tricky since it uses an union.
7158 Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
7159typedef struct {
7160 A_UINT32 tlv_header;
7161 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
7162 A_UINT32 flags;
7163 wmi_mac_addr ucast_mac_addr;
Govind Singh32cced32016-02-01 13:33:09 +05307164 /*
7165 * for ipv4, bytes (12-15) should contain ip address and
7166 * other lower bytes 0. ipv6 should have all bytes valid
7167 */
7168 A_UINT8 mcast_ip_addr[16]; /* in network byte order */
7169 /*
7170 * for ipv6, all 16 bytes has to be valid;
7171 * for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s
7172 */
7173 A_UINT8 mcast_ip_mask[16]; /* zero out lower bytes if ipv4 */
7174 /* number of address filters - irrespective of ipv4/ipv6 addresses */
7175 A_UINT32 num_filter_addr;
7176 /*
7177 * this array should contain the src IPs that are to be filtered
7178 * during find. The array should be packed. If there are 2 ipv4
7179 * addresses, there should be 8 bytes and rest all 0s
7180 */
7181 A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */
7182 A_UINT8 vdev_id; /* vdev of this mcast group */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007183} wmi_peer_mcast_group_cmd_fixed_param;
7184
7185/** Offload Scan and Roaming related commands */
7186/** The FW performs 2 different kinds of offload scans independent
7187 * of host. One is Roam scan which is primarily performed on a
7188 * station VDEV after association to look for a better AP that
7189 * the station VDEV can roam to. The second scan is connect scan
7190 * which is mainly performed when the station is not associated
7191 * and to look for a matching AP profile from a list of
7192 * configured profiles. */
7193
7194/**
7195 * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
7196 * the roam scan mode is one of the periodic, rssi change, both, none.
7197 * None : Disable Roam scan. No Roam scan at all.
7198 * Periodic : Scan periodically with a configurable period.
7199 * Rssi change : Scan when ever rssi to current AP changes by the threshold value
7200 * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
7201 * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount)
7202 *
7203 */
7204typedef struct {
7205 A_UINT32 tlv_header;
7206 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
7207 A_UINT32 roam_scan_mode;
7208 A_UINT32 vdev_id;
7209} wmi_roam_scan_mode_fixed_param;
7210
7211#define WMI_ROAM_SCAN_MODE_NONE 0x0
7212#define WMI_ROAM_SCAN_MODE_PERIODIC 0x1
7213#define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
7214#define WMI_ROAM_SCAN_MODE_BOTH 0x3
7215/* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
7216#define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
7217
7218typedef struct {
7219 A_UINT32 tlv_header;
7220 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
7221 A_UINT32 vdev_id;
7222 A_UINT32 command_arg;
7223} wmi_roam_scan_cmd_fixed_param;
7224
7225#define WMI_ROAM_SCAN_STOP_CMD 0x1
7226
7227/**
7228 * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan rssi thresold
7229 * scan rssi threshold is the rssi threshold below which the FW will start running Roam scans.
7230 * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
7231 */
7232typedef struct {
7233 A_UINT32 tlv_header;
7234 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
7235 /** unique id identifying the VDEV, generated by the caller */
7236 A_UINT32 vdev_id;
7237 /** roam scan rssi threshold */
7238 A_UINT32 roam_scan_rssi_thresh;
7239 /** When using Hw generated beacon RSSI interrupts */
7240 A_UINT32 roam_rssi_thresh_diff;
7241 /** 5G scan max count */
7242 A_UINT32 hirssi_scan_max_count;
7243 /** 5G scan rssi change threshold value */
7244 A_UINT32 hirssi_scan_delta;
7245 /** 5G scan upper bound */
7246 A_UINT32 hirssi_upper_bound;
7247 /* The TLVs will follow.
7248 * wmi_roam_scan_extended_threshold_param extended_param;
7249 * wmi_roam_earlystop_rssi_thres_param earlystop_param;
Govind Singhce8fd912016-01-21 10:24:19 +05307250 * wmi_roam_dense_thres_param dense_param;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007251 */
7252} wmi_roam_scan_rssi_threshold_fixed_param;
7253
7254#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0
7255#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
7256#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2
7257#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3
7258
7259typedef struct {
7260 /** TLV tag and len; tag equals
7261 *WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
7262 A_UINT32 tlv_header;
7263 A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
7264 A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
7265 A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
7266 A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
7267 A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
7268 A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
7269 A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
7270 A_UINT32 max_penalty_5g; /** maximum penality that can be applied to a 5GHz RSSI */
7271 /**
7272 * RSSI below which roam is kicked in by background scan
7273 * although rssi is still good
7274 */
7275 A_UINT32 good_rssi_threshold;
7276} wmi_roam_scan_extended_threshold_param;
7277
7278
7279/**
7280 * WMI_ROAM_SCAN_PERIOD: period for roam scan.
7281 * Applicable when the scan mode is Periodic or both.
7282 */
7283typedef struct {
7284 A_UINT32 tlv_header;
7285 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
7286 /** unique id identifying the VDEV, generated by the caller */
7287 A_UINT32 vdev_id;
7288 /** roam scan period value */
7289 A_UINT32 roam_scan_period;
7290 /** Aging for Roam scans */
7291 A_UINT32 roam_scan_age;
7292} wmi_roam_scan_period_fixed_param;
7293
7294/**
7295 * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : rssi delta to trigger the roam scan.
7296 * Rssi change threshold used when mode is Rssi change (or) Both.
7297 * The FW will run the roam scan when ever the rssi changes (up or down) by the value set by this parameter.
7298 * Note scan is triggered based on the rssi threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
7299 */
7300typedef struct {
7301 A_UINT32 tlv_header;
7302 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
7303 /** unique id identifying the VDEV, generated by the caller */
7304 A_UINT32 vdev_id;
7305 /** roam scan rssi change threshold value */
7306 A_UINT32 roam_scan_rssi_change_thresh;
7307 /** When using Hw generated beacon RSSI interrupts */
7308 A_UINT32 bcn_rssi_weight;
7309 /** Minimum delay between two 5G scans */
7310 A_UINT32 hirssi_delay_btw_scans;
7311} wmi_roam_scan_rssi_change_threshold_fixed_param;
7312
7313#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
7314#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
7315#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
7316/**
7317 * TLV for roaming channel list
7318 */
7319typedef struct {
7320 A_UINT32 tlv_header;
7321 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
7322 /** unique id identifying the VDEV, generated by the caller */
7323 A_UINT32 vdev_id;
7324 /** WMI_CHAN_LIST_TAG */
7325 A_UINT32 chan_list_type;
7326 /** # if channels to scan */
7327 A_UINT32 num_chan;
7328/**
7329 * TLV (tag length value ) parameters follow the wmi_roam_chan_list
7330 * structure. The TLV's are:
7331 * A_UINT32 channel_list[];
7332 **/
7333} wmi_roam_chan_list_fixed_param;
7334
7335/** Authentication modes */
7336enum {
7337 WMI_AUTH_NONE, /* no upper level auth */
7338 WMI_AUTH_OPEN, /* open */
7339 WMI_AUTH_SHARED, /* shared-key */
7340 WMI_AUTH_8021X, /* 802.1x */
7341 WMI_AUTH_AUTO, /* Auto */
7342 WMI_AUTH_WPA, /* WPA */
7343 WMI_AUTH_RSNA, /* WPA2/RSNA */
Himanshu Agarwal82972fd2016-05-20 12:23:43 +05307344 WMI_AUTH_CCKM, /* CCKM */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007345 WMI_AUTH_WAPI, /* WAPI */
7346 WMI_AUTH_AUTO_PSK,
7347 WMI_AUTH_WPA_PSK,
7348 WMI_AUTH_RSNA_PSK,
7349 WMI_AUTH_WAPI_PSK,
7350 WMI_AUTH_FT_RSNA, /* 11r FT */
7351 WMI_AUTH_FT_RSNA_PSK,
7352 WMI_AUTH_RSNA_PSK_SHA256,
7353 WMI_AUTH_RSNA_8021X_SHA256,
Himanshu Agarwal82972fd2016-05-20 12:23:43 +05307354 WMI_AUTH_CCKM_WPA,
7355 WMI_AUTH_CCKM_RSNA,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007356};
7357
7358typedef struct {
7359 /** authentication mode (defined above) */
7360 A_UINT32 rsn_authmode;
7361 /** unicast cipher set */
7362 A_UINT32 rsn_ucastcipherset;
7363 /** mcast/group cipher set */
7364 A_UINT32 rsn_mcastcipherset;
7365 /** mcast/group management frames cipher set */
7366 A_UINT32 rsn_mcastmgmtcipherset;
7367} wmi_rsn_params;
7368
7369/** looking for a wps enabled AP */
7370#define WMI_AP_PROFILE_FLAG_WPS 0x1
7371/** looking for a secure AP */
7372#define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
7373/** looking for a PMF enabled AP */
7374#define WMI_AP_PROFILE_FLAG_PMF 0x4
7375
7376/** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
7377 * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
7378 * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
7379 * and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
7380 */
7381
7382typedef struct {
7383 A_UINT32 tlv_header;
7384 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
7385 /** flags as defined above */
7386 A_UINT32 flags;
7387 /**
7388 * rssi thresold value: the value of the the candidate AP should
7389 * higher by this threshold than the rssi of the currrently associated AP.
7390 */
7391 A_UINT32 rssi_threshold;
7392 /**
7393 * ssid vlaue to be matched.
7394 */
7395 wmi_ssid ssid;
7396
7397 /**
7398 * security params to be matched.
7399 */
7400 /** authentication mode (defined above) */
7401 A_UINT32 rsn_authmode;
7402 /** unicast cipher set */
7403 A_UINT32 rsn_ucastcipherset;
7404 /** mcast/group cipher set */
7405 A_UINT32 rsn_mcastcipherset;
7406 /** mcast/group management frames cipher set */
7407 A_UINT32 rsn_mcastmgmtcipherset;
7408} wmi_ap_profile;
7409
7410/** Support early stop roaming scanning when finding a strong candidate AP
7411 * A 'strong' candidate is
7412 * 1) Is eligible candidate
7413 * (all conditions are met in existing candidate selection).
7414 * 2) Its rssi is better than earlystop threshold.
7415 * Earlystop threshold will be relaxed as each channel is scanned.
7416 */
7417typedef struct {
7418 A_UINT32 tlv_header;
7419 /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
7420 A_UINT32 roam_earlystop_thres_min;
7421 /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
7422 A_UINT32 roam_earlystop_thres_max;
7423} wmi_roam_earlystop_rssi_thres_param;
7424
Govind Singhce8fd912016-01-21 10:24:19 +05307425typedef struct {
7426 /* TLV tag and len;
7427 * tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param
7428 */
7429 A_UINT32 tlv_header;
7430 /* rssi threshold offset under trffic and dense env */
7431 A_UINT32 roam_dense_rssi_thres_offset;
7432 /* minimum number of APs to determine dense env */
7433 A_UINT32 roam_dense_min_aps;
7434 /* initial dense status detected by host
7435 * at the time of initial connection */
7436 A_UINT32 roam_dense_status;
7437 /* traffic threshold to enable aggressive roaming in dense env;
7438 * units are percent of medium occupancy, 0 - 100
7439 */
7440 A_UINT32 roam_dense_traffic_thres;
7441} wmi_roam_dense_thres_param;
7442
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007443/** Beacon filter wmi command info */
7444
7445#define BCN_FLT_MAX_SUPPORTED_IES 256
7446#define BCN_FLT_MAX_ELEMS_IE_LIST BCN_FLT_MAX_SUPPORTED_IES/32
7447
7448typedef struct bss_bcn_stats {
7449 A_UINT32 vdev_id;
7450 A_UINT32 bss_bcnsdropped;
7451 A_UINT32 bss_bcnsdelivered;
7452} wmi_bss_bcn_stats_t;
7453
7454typedef struct bcn_filter_stats {
7455 A_UINT32 bcns_dropped;
7456 A_UINT32 bcns_delivered;
7457 A_UINT32 activefilters;
7458 wmi_bss_bcn_stats_t bss_stats;
7459} wmi_bcnfilter_stats_t;
7460
7461typedef struct wmi_add_bcn_filter_cmd {
7462 A_UINT32 tlv_header;
7463 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
7464 A_UINT32 vdev_id;
7465 /*
7466 * Following this structure is the TLV:
7467 * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
7468 */
7469} wmi_add_bcn_filter_cmd_fixed_param;
7470
7471typedef struct wmi_rmv_bcn_filter_cmd {
7472 A_UINT32 tlv_header;
7473 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
7474 A_UINT32 vdev_id;
7475} wmi_rmv_bcn_filter_cmd_fixed_param;
7476
7477#define WMI_BCN_SEND_DTIM_ZERO 1
7478#define WMI_BCN_SEND_DTIM_BITCTL_SET 2
7479typedef struct wmi_bcn_send_from_host {
7480 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */
7481 A_UINT32 vdev_id;
7482 A_UINT32 data_len;
Krishna Kumaar Natarajan7dde8c72016-03-25 15:11:49 -07007483 union {
7484 A_UINT32 frag_ptr; /* Physical address of the frame */
7485 A_UINT32 frag_ptr_lo; /* LSB of physical address of the frame */
7486 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007487 A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
7488 A_UINT32 dtim_flag; /* to control CABQ traffic */
Govind Singh32cced32016-02-01 13:33:09 +05307489 A_UINT32 bcn_antenna; /* Antenna for beacon transmission */
Krishna Kumaar Natarajan7dde8c72016-03-25 15:11:49 -07007490 A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007491} wmi_bcn_send_from_host_cmd_fixed_param;
7492
7493/* cmd to support bcn snd for all vaps at once */
7494typedef struct wmi_pdev_send_bcn {
7495 A_UINT32 num_vdevs;
7496 wmi_bcn_send_from_host_cmd_fixed_param bcn_cmd[1];
7497} wmi_pdev_send_bcn_cmd_t;
7498
7499/*
7500 * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming.
7501 */
7502typedef struct {
7503 A_UINT32 tlv_header;
7504 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
7505 /** id of AP criteria */
7506 A_UINT32 id;
7507
7508 /** unique id identifying the VDEV, generated by the caller */
7509 A_UINT32 vdev_id;
7510
7511 /*
7512 * Following this structure is the TLV:
7513 * wmi_ap_profile ap_profile; //AP profile info
7514 */
7515} wmi_roam_ap_profile_fixed_param;
7516
7517/**
7518 * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
7519 */
7520typedef struct {
7521 /** id of AP criteria */
7522 A_UINT32 id;
7523
7524 /** unique id identifying the VDEV, generated by the caller */
7525 A_UINT32 vdev_id;
7526
7527 /** AP profile info */
7528 wmi_ap_profile ap_profile;
7529
7530} wmi_ofl_scan_add_ap_profile;
7531
7532/**
7533 * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
7534 */
7535typedef struct {
7536 /** id of AP criteria */
7537 A_UINT32 id;
7538 /** unique id identifying the VDEV, generated by the caller */
7539 A_UINT32 vdev_id;
7540} wmi_ofl_scan_remove_ap_profile;
7541
7542/**
7543 * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
7544 * 0 will disable ofload scan and a very low value will perform a continous
7545 * scan.
7546 */
7547typedef struct {
7548 /** offload scan period value, used for scans used when not connected */
7549 A_UINT32 ofl_scan_period;
7550} wmi_ofl_scan_period;
7551
7552/* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
7553#define ROAM_OFFLOAD_PMK_BYTES (32)
7554#define ROAM_OFFLOAD_PSK_MSK_BYTES (32)
7555#define ROAM_OFFLOAD_KRK_BYTES (16)
7556#define ROAM_OFFLOAD_BTK_BYTES (32)
7557#define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
7558#define ROAM_OFFLOAD_NUM_MCS_SET (16)
7559
7560/* This TLV will be filled only in case roam offload
7561 * for wpa2-psk/okc/ese/11r is enabled */
7562typedef struct {
7563 A_UINT32 tlv_header;
7564 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
7565 A_UINT32 rssi_cat_gap; /* gap for every category bucket */
7566 A_UINT32 prefer_5g; /* prefer select 5G candidate */
7567 A_UINT32 select_5g_margin;
7568 A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */
7569 A_UINT32 capability;
7570 A_UINT32 ht_caps_info;
7571 A_UINT32 ampdu_param;
7572 A_UINT32 ht_ext_cap;
7573 A_UINT32 ht_txbf;
7574 A_UINT32 asel_cap;
7575 A_UINT32 qos_enabled;
7576 A_UINT32 qos_caps;
7577 A_UINT32 wmm_caps;
7578 A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET >> 2]; /* since this 4 byte aligned,
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307579 * we don't declare it as
7580 * tlv array */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007581} wmi_roam_offload_tlv_param;
7582
7583/* flags for 11i offload */
7584#define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */
7585/* from bit 1 to bit 31 are reserved */
7586
7587#define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
7588 (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307589} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007590
7591#define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
7592 (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307593} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007594
7595#define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \
7596 ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
7597
7598/* This TLV will be filled only in case of wpa-psk/wpa2-psk */
7599typedef struct {
7600 A_UINT32 tlv_header;
7601 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
7602 A_UINT32 flags;
7603 /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
7604 A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES >> 2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
7605 A_UINT32 pmk_len;
7606 /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
7607} wmi_roam_11i_offload_tlv_param;
7608
7609/* This TLV will be filled only in case of 11R*/
7610typedef struct {
7611 A_UINT32 tlv_header;
7612 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
7613 A_UINT32 mdie_present;
7614 A_UINT32 mdid;
7615 A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN >> 2];
7616 A_UINT32 r0kh_id_len;
7617 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 */
7618 A_UINT32 psk_msk_len;
7619 /**length of psk_msk*/
7620} wmi_roam_11r_offload_tlv_param;
7621
7622/* This TLV will be filled only in case of ESE */
7623typedef struct {
7624 A_UINT32 tlv_header;
7625 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
7626 A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES >> 2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
7627 A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES >> 2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
7628} wmi_roam_ese_offload_tlv_param;
7629
7630/** WMI_ROAM_EVENT: roam event triggering the host roam logic.
7631 * generated when ever a better AP is found in the recent roam scan (or)
7632 * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
7633 * from the current AP.
7634 */
7635typedef struct {
7636 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */
7637 /** unique id identifying the VDEV, generated by the caller */
7638 A_UINT32 vdev_id;
7639 /** reason for roam event */
7640 A_UINT32 reason;
7641 /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI*/
7642 A_UINT32 rssi;
Krishna Kumaar Natarajan79a2a082016-03-25 15:07:07 -07007643 /** roam notification */
7644 A_UINT32 notif;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007645
7646} wmi_roam_event_fixed_param;
7647
Nirav Shah439e6262015-11-05 10:53:18 +05307648/* roam_reason: bits 0-3 */
Krishna Kumaar Natarajan79a2a082016-03-25 15:07:07 -07007649
7650/** invalid reason. Do not interpret reason field */
7651#define WMI_ROAM_REASON_INVALID 0x0
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007652#define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
7653#define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */
7654#define WMI_ROAM_REASON_DEAUTH 0x2 /** deauth/disassoc received */
7655#define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */
7656#define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307657 SSID and Security profile in
7658 WMI_ROAM_AP_PROFILE, found during scan
7659 triggered upon FINAL_BMISS **/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007660#define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */
Govind Singhd0c80a32016-02-01 17:57:48 +05307661
7662/*
7663 * WMI_ROAM_REASON_INVOKE_ROAM_FAIL:
7664 * Result code of WMI_ROAM_INVOKE_CMDID.
7665 * Any roaming failure before reassociation will be indicated to host
7666 * with this reason.
7667 * Any roaming failure after reassociation will be indicated to host with
7668 * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not.
7669 */
7670#define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6
Nirav Shah439e6262015-11-05 10:53:18 +05307671/* reserved up through 0xF */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007672
Nirav Shah439e6262015-11-05 10:53:18 +05307673/* subnet status: bits 4-5 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007674typedef enum {
7675 WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
7676 WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
7677 WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
7678} wmi_roam_subnet_change_status;
7679
Nirav Shah439e6262015-11-05 10:53:18 +05307680#define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30
7681#define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4
7682
7683#define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
7684 do { \
7685 (roam_reason) |= \
7686 (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
7687 WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
7688 } while (0)
7689
7690#define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
7691 (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
7692 WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
7693
Krishna Kumaar Natarajan79a2a082016-03-25 15:07:07 -07007694/* roaming notification */
7695/** invalid notification. Do not interpret notif field */
7696#define WMI_ROAM_NOTIF_INVALID 0x0
7697/** indicate that roaming is started. sent only in non WOW state */
7698#define WMI_ROAM_NOTIF_ROAM_START 0x1
7699/** indicate that roaming is aborted. sent only in non WOW state */
7700#define WMI_ROAM_NOTIF_ROAM_ABORT 0x2
7701
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007702/**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
7703 * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations
7704 */
7705typedef struct {
7706 A_UINT32 tlv_header;
7707 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
7708 A_UINT32 vdev_id;
7709 /**unique id identifying the VDEV, generated by the caller*/
7710 A_UINT32 num_ric_request;
7711 /**number of ric request ie send to firmware.(max value is 2 now)*/
7712 A_UINT32 is_add_ric;
7713 /**support add ric or delete ric*/
7714} wmi_ric_request_fixed_param;
7715
7716/**tspec element: refer to 8.4.2.32 of 802.11 2012 spec
7717 * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
7718 */
7719typedef struct {
7720 A_UINT32 tlv_header;
7721 A_UINT32 ts_info; /** bits value of TS Info field.*/
7722 A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/
7723 A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/
7724 A_UINT32 min_service_interval; /**The Minimum Service Interval field*/
7725 A_UINT32 max_service_interval; /**The Maximum Service Interval field*/
7726 A_UINT32 inactivity_interval; /**The Inactivity Interval field*/
7727 A_UINT32 suspension_interval; /**The Suspension Interval field*/
7728 A_UINT32 svc_start_time; /**The Service Start Time field*/
7729 A_UINT32 min_data_rate; /**The Minimum Data Rate field*/
7730 A_UINT32 mean_data_rate; /**The Mean Data Rate field*/
7731 A_UINT32 peak_data_rate; /**The Peak Data Rate field*/
7732 A_UINT32 max_burst_size; /**The Burst Size field*/
7733 A_UINT32 delay_bound; /**The Delay Bound field*/
7734 A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/
7735 A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
7736 A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/
7737} wmi_ric_tspec;
7738
7739/* flags for roam_invoke_cmd */
7740/* add this channel into roam cache channel list after this command is finished */
7741#define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0
Govind Singhd0c80a32016-02-01 17:57:48 +05307742/* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */
7743#define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE 1
7744/* from bit 2 to bit 31 are reserved */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007745
7746#define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
7747 (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307748 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007749
7750#define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
7751 (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307752 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007753
7754#define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307755 ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007756
7757
7758#define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */
7759#define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */
7760#define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */
7761
7762#define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */
7763#define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */
7764
7765/** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
7766 *
7767 * if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
7768 * if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
7769 *
7770 * This command can be used to add specific channel into roam cached channel list by following
7771 * <roam_scan_ch_mode> = 0
7772 * <roam_ap_sel_mode> = 0
7773 * <roam_delay> = 0
7774 * <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
7775 * <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
7776 * <channel_no> = channel list to be added
7777 */
7778typedef struct {
7779 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
7780 A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
7781 A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
7782 A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
7783 A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
7784 A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
7785 A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
7786 A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */
7787 /**
7788 * TLV (tag length value ) parameters follows roam_invoke_req
7789 * The TLV's are:
7790 * A_UINT32 channel_list[];
7791 * wmi_mac_addr bssid_list[];
7792 */
7793} wmi_roam_invoke_cmd_fixed_param;
7794
7795/* Definition for op_bitmap */
7796enum {
7797 ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1,
7798 ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2,
7799 ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
7800};
7801
7802typedef struct {
7803 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
7804 A_UINT32 tlv_header;
7805 /** Unique id identifying the VDEV on which roaming filter is adopted */
7806 A_UINT32 vdev_id;
7807 A_UINT32 flags; /** flags for filter */
7808 /** 32 bit bitmap to be set on.
7809 * bit0 = first param,
7810 * bit 1 = second param...etc. Can be or'ed
7811 */
7812 A_UINT32 op_bitmap;
7813 /* number of blacklist in the TLV variable bssid_black_list */
7814 A_UINT32 num_bssid_black_list;
7815 /* number of whitelist in the TLV variable ssid_white_list */
7816 A_UINT32 num_ssid_white_list;
7817 /* only for lfr 3.0. number of preferred list & factor in the TLV */
7818 A_UINT32 num_bssid_preferred_list;
7819 /**
7820 * TLV (tag length value ) parameters follows roam_filter_list_cmd
7821 * The TLV's are:
7822 * wmi_mac_addr bssid_black_list[];
7823 * wmi_ssid ssid_white_list[];
7824 * wmi_mac_addr bssid_preferred_list[];
7825 * A_UINT32 bssid_preferred_factor[];
7826 */
7827} wmi_roam_filter_fixed_param;
7828
7829typedef struct {
7830 A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
7831} WMI_IPV4_ADDR;
7832
7833typedef struct _WMI_IPV6_ADDR {
7834 A_UINT8 address[16]; /* IPV6 in Network Byte Order */
7835} WMI_IPV6_ADDR;
7836
7837/* flags for subnet change detection */
7838#define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
7839#define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
7840/* bit 2 to bit 31 are reserved */
7841
7842/* set IPv4 enabled/disabled flag and get the flag */
7843#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
7844 (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
7845} while (0)
7846
7847#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
7848 (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
7849} while (0)
7850
7851#define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
7852 ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
7853
7854/* set IPv6 enabled flag, disabled and get the flag */
7855#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
7856 (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
7857} while (0)
7858
7859#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
7860 (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
7861} while (0)
7862
7863#define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
7864 ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
7865
7866/**
7867 * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
7868 * to FW. FW uses these parameters for subnet change detection.
7869 */
7870typedef struct {
7871 /*
7872 * TLV tag and len; tag equals
7873 * WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param
7874 */
7875 A_UINT32 tlv_header;
7876 /** unique id identifying the VDEV, generated by the caller */
7877 A_UINT32 vdev_id;
7878 /** IPv4/IPv6 enabled/disabled */
7879 /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/
7880 DISABLED */
7881 A_UINT32 flag;
7882 /** Gateway MAC address */
7883 wmi_mac_addr inet_gw_mac_addr;
7884 /** IP addresses */
7885 WMI_IPV4_ADDR inet_gw_ip_v4_addr;
7886 WMI_IPV6_ADDR inet_gw_ip_v6_addr;
7887 /** Number of software retries for ARP/Neighbor solicitation request */
7888 A_UINT32 max_retries;
7889 /** timeout in milliseconds for each ARP request*/
7890 A_UINT32 timeout;
7891 /** number of skipped aps **/
7892 A_UINT32 num_skip_subnet_change_detection_bssid_list;
7893/**
7894 * TLV (tag length value ) parameters follows roam_subnet_change_config_cmd
7895 * structure. The TLV's are:
7896 * wmi_mac_addr skip_subnet_change_detection_bssid_list [];
7897 **/
7898} wmi_roam_subnet_change_config_fixed_param;
7899
7900/** WMI_PROFILE_MATCH_EVENT: offload scan
7901 * generated when ever atleast one of the matching profiles is found
7902 * in recent NLO scan. no data is carried with the event.
7903 */
7904
7905/** P2P specific commands */
7906
7907/**
7908 * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
7909 * FW to generate P2P IE tobe carried in probe response frames.
7910 * FW will respond to probe requests while in listen state.
7911 */
7912typedef struct {
7913 /* number of secondary device types,supported */
7914 A_UINT32 num_secondary_dev_types;
7915 /**
7916 * followed by 8 bytes of primary device id and
7917 * num_secondary_dev_types * 8 bytes of secondary device
7918 * id.
7919 */
7920} wmi_p2p_dev_set_device_info;
7921
7922/** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
7923 * state. if enabled, an active STA/AP will respond to P2P probe requests on
7924 * the operating channel of the VDEV.
7925 */
7926
7927typedef struct {
7928 /* 1:enable disoverability, 0:disable discoverability */
7929 A_UINT32 enable_discoverability;
7930} wmi_p2p_set_discoverability;
7931
7932/** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
7933 * beacons generated by FW. used in FW beacon mode.
7934 * the FW will add this IE to beacon in addition to the beacon
7935 * template set by WMI_BCN_TMPL_CMDID command.
7936 */
7937typedef struct {
7938 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */
7939 /** unique id identifying the VDEV, generated by the caller */
7940 A_UINT32 vdev_id;
7941 /* ie length */
7942 A_UINT32 ie_buf_len;
7943 /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
7944 * A_UINT8 ie_data[]; // length in byte given by field num_data.
7945 */
7946
7947} wmi_p2p_go_set_beacon_ie_fixed_param;
7948
7949/** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
7950 * probe response generated by FW. used in FW beacon mode.
7951 * the FW will add this IE to probe response in addition to the probe response
7952 * template set by WMI_PRB_TMPL_CMDID command.
7953 */
7954typedef struct {
7955 /** unique id identifying the VDEV, generated by the caller */
7956 A_UINT32 vdev_id;
7957 /* ie length */
7958 A_UINT32 ie_buf_len;
7959 /*followed by byte stream of ie data of length ie_buf_len */
7960} wmi_p2p_go_set_probe_resp_ie;
7961
7962/** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
7963 * be used by the FW to parse the P2P NoA attribute in beacons, probe resposes
7964 * and action frames received by the P2P Client.
7965 */
7966typedef struct {
7967 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
7968 /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */
7969 A_UINT32 p2p_ie_oui_type;
7970 /** OS specific NoA Attribute ID */
7971 A_UINT32 p2p_noa_attribute;
7972} wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
7973
7974/*----P2P disc offload definition ----*/
7975
7976typedef struct {
7977 A_UINT32 pattern_type;
7978 /**
7979 * TLV (tag length value ) paramerters follow the pattern structure.
7980 * TLV can contain bssid list, ssid list and
7981 * ie. the TLV tags are defined above;
7982 */
7983} wmi_p2p_disc_offload_pattern_cmd;
7984
7985typedef struct {
7986 /* unique id identifying the VDEV, generated by the caller */
7987 A_UINT32 vdev_id;
7988 /* mgmt type of the ie */
7989 A_UINT32 mgmt_type;
7990 /* ie length */
7991 A_UINT32 ie_buf_len;
7992 /*followed by byte stream of ie data of length ie_buf_len */
7993} wmi_p2p_disc_offload_appie_cmd;
7994
7995typedef struct {
7996 /* enable/disable p2p find offload */
7997 A_UINT32 enable;
7998 /* unique id identifying the VDEV, generated by the caller */
7999 A_UINT32 vdev_id;
8000 /* p2p find type */
8001 A_UINT32 disc_type;
8002 /* p2p find perodic */
8003 A_UINT32 perodic;
8004 /* p2p find listen channel */
8005 A_UINT32 listen_channel;
8006 /* p2p find full channel number */
8007 A_UINT32 num_scan_chans;
8008 /**
8009 * TLV (tag length value ) paramerters follow the pattern structure.
8010 * TLV contain channel list
8011 */
8012} wmi_p2p_disc_offload_config_cmd;
8013
8014/*----P2P OppPS definition ----*/
8015typedef struct {
8016 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */
8017 A_UINT32 tlv_header;
8018 /* unique id identifying the VDEV, generated by the caller */
8019 A_UINT32 vdev_id;
8020 /* OppPS attributes */
8021 /** Bit 0: Indicate enable/disable of OppPS
8022 * Bits 7-1: Ctwindow in TUs
8023 * Bits 31-8: Reserved
8024 */
8025 A_UINT32 oppps_attr;
8026} wmi_p2p_set_oppps_cmd_fixed_param;
8027
8028#define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1
8029#define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0
8030
8031#define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \
8032 WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
8033
8034#define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \
8035 WMI_F_RMW((hdr)->oppps_attr, 0x1, \
8036 WMI_UNIFIED_OPPPS_ATTR_ENALBED);
8037
8038#define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe
8039#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1
8040
8041#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \
8042 WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
8043
8044#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \
8045 WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \
8046 WMI_UNIFIED_OPPPS_ATTR_CTWIN);
8047
8048typedef struct {
8049 A_UINT32 time32; /* upper 32 bits of time stamp */
8050 A_UINT32 time0; /* lower 32 bits of time stamp */
8051} A_TIME64;
8052
8053typedef enum wmi_peer_sta_kickout_reason {
8054 WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */
8055 WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
8056 WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
8057 WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
8058 WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */
8059 WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
8060} PEER_KICKOUT_REASON;
8061
8062typedef struct {
8063 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */
8064 /** peer mac address */
8065 wmi_mac_addr peer_macaddr;
8066 /** Reason code, defined as above */
8067 A_UINT32 reason;
8068 /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
8069 A_UINT32 rssi;
8070} wmi_peer_sta_kickout_event_fixed_param;
8071
8072#define WMI_WLAN_PROFILE_MAX_HIST 3
8073#define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
8074
8075typedef struct _wmi_wlan_profile_t {
8076 A_UINT32 tlv_header;
8077 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
8078 A_UINT32 id;
8079 A_UINT32 cnt;
8080 A_UINT32 tot;
8081 A_UINT32 min;
8082 A_UINT32 max;
8083 A_UINT32 hist_intvl;
8084 A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
8085} wmi_wlan_profile_t;
8086
8087typedef struct _wmi_wlan_profile_ctx_t {
8088 A_UINT32 tlv_header;
8089 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
8090 A_UINT32 tot; /* time in us */
8091 A_UINT32 tx_msdu_cnt;
8092 A_UINT32 tx_mpdu_cnt;
8093 A_UINT32 tx_ppdu_cnt;
8094 A_UINT32 rx_msdu_cnt;
8095 A_UINT32 rx_mpdu_cnt;
8096 A_UINT32 bin_count;
8097} wmi_wlan_profile_ctx_t;
8098
8099typedef struct {
8100 A_UINT32 tlv_header;
8101 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
8102 A_UINT32 enable;
8103} wmi_wlan_profile_trigger_cmd_fixed_param;
8104
8105typedef struct {
8106 A_UINT32 tlv_header;
8107 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
8108 A_UINT32 value;
8109} wmi_wlan_profile_get_prof_data_cmd_fixed_param;
8110
8111typedef struct {
8112 A_UINT32 tlv_header;
8113 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
8114 A_UINT32 profile_id;
8115 A_UINT32 value;
8116} wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
8117
8118typedef struct {
8119 A_UINT32 tlv_header;
8120 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
8121 A_UINT32 profile_id;
8122 A_UINT32 enable;
8123} wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
8124
8125/*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
8126 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
8127 when comparing wifi header.*/
8128/* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
8129#define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146
8130#define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
8131#define WOW_DEFAULT_BITMASK_SIZE 146
8132#define WOW_DEFAULT_BITMASK_SIZE_DWORD 37
8133#define WOW_MAX_BITMAP_FILTERS 32
8134#define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16
8135#define WOW_EXTEND_PATTERN_MATCH_CNT 16
8136#define WOW_SHORT_PATTERN_MATCH_CNT 8
8137#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 +05308138 The 148 comes from (128 - 14 ) payload size + 8bytes LLC + 26bytes MAC header */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008139#define WOW_DEFAULT_IOAC_PATTERN_SIZE 6
8140#define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
8141#define WOW_DEFAULT_IOAC_RANDOM_SIZE 6
8142#define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
8143#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120
8144#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
8145#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32
8146#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
8147#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32
8148#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08008149#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128
8150#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008151
8152typedef enum pattern_type_e {
8153 WOW_PATTERN_MIN = 0,
8154 WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
8155 WOW_IPV4_SYNC_PATTERN,
8156 WOW_IPV6_SYNC_PATTERN,
8157 WOW_WILD_CARD_PATTERN,
8158 WOW_TIMER_PATTERN,
8159 WOW_MAGIC_PATTERN,
8160 WOW_IPV6_RA_PATTERN,
8161 WOW_IOAC_PKT_PATTERN,
8162 WOW_IOAC_TMR_PATTERN,
8163 WOW_IOAC_SOCK_PATTERN,
8164 WOW_PATTERN_MAX
8165} WOW_PATTERN_TYPE;
8166
8167typedef enum event_type_e {
8168 WOW_BMISS_EVENT = 0,
8169 WOW_BETTER_AP_EVENT,
8170 WOW_DEAUTH_RECVD_EVENT,
8171 WOW_MAGIC_PKT_RECVD_EVENT,
8172 WOW_GTK_ERR_EVENT,
8173 WOW_FOURWAY_HSHAKE_EVENT,
8174 WOW_EAPOL_RECVD_EVENT,
8175 WOW_NLO_DETECTED_EVENT,
8176 WOW_DISASSOC_RECVD_EVENT,
8177 WOW_PATTERN_MATCH_EVENT,
8178 WOW_CSA_IE_EVENT,
8179 WOW_PROBE_REQ_WPS_IE_EVENT,
8180 WOW_AUTH_REQ_EVENT,
8181 WOW_ASSOC_REQ_EVENT,
8182 WOW_HTT_EVENT,
8183 WOW_RA_MATCH_EVENT,
8184 WOW_HOST_AUTO_SHUTDOWN_EVENT,
8185 WOW_IOAC_MAGIC_EVENT,
8186 WOW_IOAC_SHORT_EVENT,
8187 WOW_IOAC_EXTEND_EVENT,
8188 WOW_IOAC_TIMER_EVENT,
8189 WOW_DFS_PHYERR_RADAR_EVENT,
8190 WOW_BEACON_EVENT,
8191 WOW_CLIENT_KICKOUT_EVENT,
8192 WOW_NAN_EVENT,
8193 WOW_EXTSCAN_EVENT,
8194 WOW_IOAC_REV_KA_FAIL_EVENT,
8195 WOW_IOAC_SOCK_EVENT,
8196 WOW_NLO_SCAN_COMPLETE_EVENT,
Govind Singh941bd5e2016-02-04 17:15:25 +05308197 WOW_NAN_DATA_EVENT,
Himanshu Agarwal82972fd2016-05-20 12:23:43 +05308198 WOW_NAN_RTT_EVENT, /* DEPRECATED, UNUSED */
8199 /* reuse deprecated event value */
8200 WOW_OEM_RESPONSE_EVENT = WOW_NAN_RTT_EVENT,
Krishna Kumaar Natarajan3bd73642016-03-25 13:59:54 -07008201 WOW_TDLS_CONN_TRACKER_EVENT,
Anurag Chouhan05d05fe2016-04-18 17:09:24 +05308202 WOW_CRITICAL_LOG_EVENT,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008203} WOW_WAKE_EVENT_TYPE;
8204
8205typedef enum wake_reason_e {
8206 WOW_REASON_UNSPECIFIED = -1,
8207 WOW_REASON_NLOD = 0,
8208 WOW_REASON_AP_ASSOC_LOST,
8209 WOW_REASON_LOW_RSSI,
8210 WOW_REASON_DEAUTH_RECVD,
8211 WOW_REASON_DISASSOC_RECVD,
8212 WOW_REASON_GTK_HS_ERR,
8213 WOW_REASON_EAP_REQ,
8214 WOW_REASON_FOURWAY_HS_RECV,
8215 WOW_REASON_TIMER_INTR_RECV,
8216 WOW_REASON_PATTERN_MATCH_FOUND,
8217 WOW_REASON_RECV_MAGIC_PATTERN,
8218 WOW_REASON_P2P_DISC,
8219 WOW_REASON_WLAN_HB,
8220 WOW_REASON_CSA_EVENT,
8221 WOW_REASON_PROBE_REQ_WPS_IE_RECV,
8222 WOW_REASON_AUTH_REQ_RECV,
8223 WOW_REASON_ASSOC_REQ_RECV,
8224 WOW_REASON_HTT_EVENT,
8225 WOW_REASON_RA_MATCH,
8226 WOW_REASON_HOST_AUTO_SHUTDOWN,
8227 WOW_REASON_IOAC_MAGIC_EVENT,
8228 WOW_REASON_IOAC_SHORT_EVENT,
8229 WOW_REASON_IOAC_EXTEND_EVENT,
8230 WOW_REASON_IOAC_TIMER_EVENT,
8231 WOW_REASON_ROAM_HO,
8232 WOW_REASON_DFS_PHYERR_RADADR_EVENT,
8233 WOW_REASON_BEACON_RECV,
8234 WOW_REASON_CLIENT_KICKOUT_EVENT,
8235 WOW_REASON_NAN_EVENT,
8236 WOW_REASON_EXTSCAN,
8237 WOW_REASON_RSSI_BREACH_EVENT,
8238 WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
8239 WOW_REASON_IOAC_SOCK_EVENT,
8240 WOW_REASON_NLO_SCAN_COMPLETE,
8241 WOW_REASON_PACKET_FILTER_MATCH,
8242 WOW_REASON_ASSOC_RES_RECV,
8243 WOW_REASON_REASSOC_REQ_RECV,
8244 WOW_REASON_REASSOC_RES_RECV,
8245 WOW_REASON_ACTION_FRAME_RECV,
Manikandan Mohan130eb572015-12-23 13:53:34 -08008246 WOW_REASON_BPF_ALLOW,
Govind Singh941bd5e2016-02-04 17:15:25 +05308247 WOW_REASON_NAN_DATA,
Himanshu Agarwal82972fd2016-05-20 12:23:43 +05308248 WOW_REASON_NAN_RTT, /* DEPRECATED, UNUSED */
8249 /* reuse deprecated reason value */
8250 WOW_REASON_OEM_RESPONSE_EVENT = WOW_REASON_NAN_RTT,
Krishna Kumaar Natarajan3bd73642016-03-25 13:59:54 -07008251 WOW_REASON_TDLS_CONN_TRACKER_EVENT,
Anurag Chouhan05d05fe2016-04-18 17:09:24 +05308252 WOW_REASON_CRITICAL_LOG,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008253 WOW_REASON_DEBUG_TEST = 0xFF,
8254} WOW_WAKE_REASON_TYPE;
8255
8256typedef enum {
8257 WOW_IFACE_PAUSE_ENABLED,
8258 WOW_IFACE_PAUSE_DISABLED
8259} WOW_IFACE_STATUS;
8260
8261enum {
8262 /* some win10 platfrom will not assert pcie_reset for wow.*/
8263 WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001,
Govind Singhb5158e22016-02-04 15:38:30 +05308264 /*
8265 * WMI_WOW_FLAG_SEND_PM_PME
8266 * Some platforms have issues if the PM_PME message is sent after WoW,
8267 * so don't send PM_PME after WoW unless the host uses this flag
8268 * to request it.
8269 */
8270 WMI_WOW_FLAG_SEND_PM_PME = 0x00000002,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008271};
8272
8273
8274typedef struct {
8275 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */
8276 A_UINT32 enable;
8277 A_UINT32 pause_iface_config;
8278 A_UINT32 flags; /* WMI_WOW_FLAG enums */
8279} wmi_wow_enable_cmd_fixed_param;
8280
8281typedef struct {
8282 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */
8283 /** Reserved for future use */
8284 A_UINT32 reserved0;
8285} wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
8286
8287#define WOW_ICMPV6_NA_FILTER_DISABLE 0
8288#define WOW_ICMPV6_NA_FILTER_ENABLE 1
8289
8290typedef struct {
8291 /* TLV tag and len;
8292 * tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param
8293 */
8294 A_UINT32 tlv_header;
8295 A_UINT32 vdev_id;
8296 A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
8297} wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
8298
8299typedef struct bitmap_pattern_s {
8300 A_UINT32 tlv_header;
8301 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
8302 A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
8303 A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
8304 A_UINT32 pattern_offset;
8305 A_UINT32 pattern_len;
8306 A_UINT32 bitmask_len;
8307 A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
8308} WOW_BITMAP_PATTERN_T;
8309
8310typedef struct ipv4_sync_s {
8311 A_UINT32 tlv_header;
8312 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
8313 A_UINT32 ipv4_src_addr;
8314 A_UINT32 ipv4_dst_addr;
8315 A_UINT32 tcp_src_prt;
8316 A_UINT32 tcp_dst_prt;
8317} WOW_IPV4_SYNC_PATTERN_T;
8318
8319typedef struct ipv6_sync_s {
8320 A_UINT32 tlv_header;
8321 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
8322 A_UINT32 ipv6_src_addr[4];
8323 A_UINT32 ipv6_dst_addr[4];
8324 A_UINT32 tcp_src_prt;
8325 A_UINT32 tcp_dst_prt;
8326} WOW_IPV6_SYNC_PATTERN_T;
8327
8328typedef struct WOW_MAGIC_PATTERN_CMD {
8329 A_UINT32 tlv_header;
8330 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
8331 wmi_mac_addr macaddr;
8332} WOW_MAGIC_PATTERN_CMD;
8333
8334typedef enum wow_ioac_pattern_type {
8335 WOW_IOAC_MAGIC_PATTERN = 1,
8336 WOW_IOAC_SHORT_PATTERN,
8337 WOW_IOAC_EXTEND_PATTERN,
8338} WOW_IOAC_PATTERN_TYPE;
8339
8340typedef struct ioac_sock_pattern_s {
8341 /**
8342 * TLV tag and len;
8343 * tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T
8344 */
8345 A_UINT32 tlv_header;
8346 A_UINT32 id;
8347 A_UINT32 local_ipv4;
8348 A_UINT32 remote_ipv4;
8349 A_UINT32 local_port;
8350 A_UINT32 remote_port;
8351 A_UINT32 pattern_len; /* units = bytes */
8352 A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08008353 WMI_IPV6_ADDR local_ipv6;
8354 WMI_IPV6_ADDR remote_ipv6;
8355 A_UINT32 ack_nak_len;
8356 A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
8357 A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008358} WOW_IOAC_SOCK_PATTERN_T;
8359
8360typedef struct ioac_pkt_pattern_s {
8361 A_UINT32 tlv_header;
8362 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
8363 A_UINT32 pattern_type;
8364 A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
8365 A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
8366 A_UINT32 pattern_len;
8367 A_UINT32 random_len;
8368} WOW_IOAC_PKT_PATTERN_T;
8369
8370typedef struct ioac_tmr_pattern_s {
8371 A_UINT32 tlv_header;
8372 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
8373 A_UINT32 wake_in_s;
8374 A_UINT32 vdev_id;
8375} WOW_IOAC_TMR_PATTERN_T;
8376
8377typedef struct {
8378 A_UINT32 tlv_header;
8379 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
8380 A_UINT32 nID;
8381} WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
8382
8383typedef struct {
8384 A_UINT32 tlv_header;
8385 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
8386 A_UINT32 nID;
8387} WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
8388
8389typedef struct ioac_keepalive_s {
8390 A_UINT32 tlv_header;
8391 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
8392 A_UINT32
8393 keepalive_pkt_buf
8394 [WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
8395 A_UINT32 keepalive_pkt_len;
8396 A_UINT32 period_in_ms;
8397 A_UINT32 vdev_id;
8398 A_UINT32 max_loss_cnt;
8399 A_UINT32 local_ipv4;
8400 A_UINT32 remote_ipv4;
8401 A_UINT32 local_port;
8402 A_UINT32 remote_port;
8403 A_UINT32 recv_period_in_ms;
8404 A_UINT32 rev_ka_size;
8405 A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08008406 WMI_IPV6_ADDR local_ipv6;
8407 WMI_IPV6_ADDR remote_ipv6;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008408} WMI_WOW_IOAC_KEEPALIVE_T;
8409
8410typedef struct {
8411 A_UINT32 tlv_header;
8412 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
8413 A_UINT32 vdev_id;
8414 A_UINT32 pattern_type;
8415/*
8416 * Following this struct are these TLVs. Note that they are all array of structures
8417 * but can have at most one element. Which TLV is empty or has one element depends
8418 * on the field pattern_type. This is to emulate an union.
8419 * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
8420 * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
8421 */
8422} WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
8423
8424typedef struct {
8425 A_UINT32 tlv_header;
8426 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
8427 A_UINT32 vdev_id;
8428 A_UINT32 pattern_type;
8429 A_UINT32 pattern_id;
8430} WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
8431
8432typedef struct {
8433 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
8434 A_UINT32 vdev_id;
8435 A_UINT32 pattern_id;
8436 A_UINT32 pattern_type;
8437 /*
8438 * Following this struct are these TLVs. Note that they are all array of structures
8439 * but can have at most one element. Which TLV is empty or has one element depends
8440 * on the field pattern_type. This is to emulate an union.
8441 * WOW_BITMAP_PATTERN_T pattern_info_bitmap[];
8442 * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[];
8443 * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[];
8444 * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[];
8445 * A_UINT32 pattern_info_timeout[];
8446 * A_UINT32 ra_ratelimit_interval;
8447 */
8448} WMI_WOW_ADD_PATTERN_CMD_fixed_param;
8449
8450typedef struct {
8451 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
8452 A_UINT32 vdev_id;
8453 A_UINT32 pattern_id;
8454 A_UINT32 pattern_type;
8455} WMI_WOW_DEL_PATTERN_CMD_fixed_param;
8456
8457typedef struct {
8458 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */
8459 A_UINT32 vdev_id;
8460 A_UINT32 is_add;
8461 A_UINT32 event_bitmap;
8462} WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
8463
8464/*
8465 * This structure is used to set the pattern to check UDP packet in WOW mode.
8466 * If match, construct a tx frame in a local buffer to send through the peer
8467 * AP to the entity in the IP network that sent the UDP packet to this STA.
8468 */
8469typedef struct {
8470 /*
8471 * TLV tag and len;
8472 * tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param
8473 */
8474 A_UINT32 tlv_header;
8475 A_UINT32 vdev_id;
8476 A_UINT32 enable; /* 1: enable, 0: disable */
8477 /*
8478 * dest_port -
8479 * bits 7:0 contain the LSB of the UDP dest port,
8480 * bits 15:8 contain the MSB of the UDP dest port
8481 */
8482 A_UINT32 dest_port;
8483 A_UINT32 pattern_len; /* length in byte of pattern[] */
8484 A_UINT32 response_len; /* length in byte of response[] */
8485 /*
8486 * Following this struct are the TLV's:
8487 * payload of UDP packet to be checked, network byte order
8488 * A_UINT8 pattern[];
8489 * payload of UDP packet to be response, network byte order
8490 * A_UINT8 response[];
8491 */
8492} WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
8493
8494/*
8495 * This structure is used to set the pattern for WOW host wakeup pin pulse
8496 * pattern confirguration.
8497 */
8498typedef struct {
8499 /*
8500 * TLV tag and len; tag equals
8501 * WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param
8502 */
8503 A_UINT32 tlv_header;
8504
8505 /* 1: enable, 0: disable */
8506 A_UINT32 enable;
8507
8508 /* pin for host wakeup */
8509 A_UINT32 pin;
8510
8511 /* interval for keeping low voltage, unit: ms */
8512 A_UINT32 interval_low;
8513
8514 /* interval for keeping high voltage, unit: ms */
8515 A_UINT32 interval_high;
8516
8517 /* repeat times for pulse (0xffffffff means forever) */
8518 A_UINT32 repeat_cnt;
8519} WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
8520
Anurag Chouhan86eab9b2016-04-21 16:22:47 +05308521#define MAX_SUPPORTED_ACTION_CATEGORY 256
8522#define MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST (MAX_SUPPORTED_ACTION_CATEGORY/32)
8523
8524typedef enum {
8525 WOW_ACTION_WAKEUP_OPERATION_RESET = 0,
8526 WOW_ACTION_WAKEUP_OPERATION_SET,
8527 WOW_ACTION_WAKEUP_OPERATION_ADD_SET,
8528 WOW_ACTION_WAKEUP_OPERATION_DELETE_SET,
8529} WOW_ACTION_WAKEUP_OPERATION;
8530
8531typedef struct {
8532 /*
8533 * TLV tag and len; tag equals
8534 * WMITLV_TAG_STRUC_WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param
8535 */
8536 A_UINT32 tlv_header;
8537 A_UINT32 vdev_id;
8538 /*
8539 * 0 reset to fw default, 1 set the bits, 2 add the setting bits,
8540 * 3 delete the setting bits
8541 */
8542 A_UINT32 operation;
8543 A_UINT32 action_category_map[MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST];
8544} WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param;
8545
8546
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008547typedef struct wow_event_info_s {
8548 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */
8549 A_UINT32 vdev_id;
8550 A_UINT32 flag; /*This is current reserved. */
8551 A_INT32 wake_reason;
8552 A_UINT32 data_len;
8553} WOW_EVENT_INFO_fixed_param;
8554
8555typedef struct wow_initial_wakeup_event_s {
8556 /*
8557 * TLV tag and len; tag equals
8558 * WOW_INITIAL_WAKEUP_EVENT_fixed_param
8559 */
8560 A_UINT32 tlv_header;
8561 A_UINT32 vdev_id;
8562} WOW_INITIAL_WAKEUP_EVENT_fixed_param;
8563
8564typedef enum {
8565 WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
8566 WOW_EVENT_INFO_TYPE_BITMAP,
8567 WOW_EVENT_INFO_TYPE_GTKIGTK,
8568} WOW_EVENT_INFO_TYPE;
8569
8570typedef struct wow_event_info_section_s {
8571 A_UINT32 data_type;
8572 A_UINT32 data_len;
8573} WOW_EVENT_INFO_SECTION;
8574
8575typedef struct wow_event_info_section_packet_s {
8576 A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
8577} WOW_EVENT_INFO_SECTION_PACKET;
8578
8579typedef struct wow_event_info_section_bitmap_s {
8580 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */
8581 A_UINT32 flag; /*This is current reserved. */
8582 A_UINT32 value; /*This could be the pattern id for bitmap pattern. */
8583 A_UINT32 org_len; /*The length of the orginal packet. */
8584} WOW_EVENT_INFO_SECTION_BITMAP;
8585
8586/**
8587 * This command is sent from WLAN host driver to firmware to
8588 * enable or disable D0-WOW. D0-WOW means APSS suspend with
8589 * PCIe link and DDR being active.
8590 *
8591 *
8592 * Entering D0-WOW Mode (based on kernel suspend request):
8593 * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
8594 * target: Take action (e.g. dbglog suspend)
8595 * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
8596 *
8597 * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
8598 * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
8599 * target: Take action (e.g. dbglog resume)
8600 * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
8601 *
8602 * This command is applicable only on the PCIE LL systems
8603 * Host can enter either D0-WOW or WOW mode, but NOT both at same time
8604 * Decision to enter D0-WOW or WOW is based on active interfaces
8605 *
8606 */
8607typedef struct {
8608 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */
8609 A_UINT32 enable; /* 1 = enable, 0 = disable */
8610} wmi_d0_wow_enable_disable_cmd_fixed_param;
8611
8612typedef enum extend_wow_type_e {
8613 EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */
8614 EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */
8615 EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08008616 EXTWOW_TYPE_APP_PULSETEST,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008617 EXTWOW_DISABLED = 255,
8618} EXTWOW_TYPE;
8619
8620typedef struct {
8621 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */
8622 A_UINT32 vdev_id;
8623 A_UINT32 type;
8624 A_UINT32 wakeup_pin_num;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08008625 A_UINT32 swol_pulsetest_type;
8626 A_UINT32 swol_pulsetest_application;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008627} wmi_extwow_enable_cmd_fixed_param;
8628
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08008629#define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
8630#define SWOL_INDOOR_KEY_LEN 16
8631
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008632typedef struct {
8633 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */
8634 A_UINT32 vdev_id;
8635 wmi_mac_addr wakee_mac;
8636 A_UINT8 ident[8];
8637 A_UINT8 passwd[16];
8638 A_UINT32 ident_len;
8639 A_UINT32 passwd_len;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08008640
8641 /* indoor check parameters */
8642 /* key for mac addresses specified in swol_indoor_key_mac
8643 * Big-endian hosts need to byte-swap the bytes within each 4-byte
8644 * segment of this array, so the bytes will return to their original
8645 * order when the entire WMI message contents are byte-swapped to
8646 * convert from big-endian to little-endian format.
8647 */
8648 A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
8649 /* key length for specified mac address index
8650 * Big-endian hosts need to byte-swap the bytes within each 4-byte
8651 * segment of this array, so the bytes will return to their original
8652 * order when the entire WMI message contents are byte-swapped to
8653 * convert from big-endian to little-endian format.
8654 */
8655 A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
8656 /* mac address array allowed to wakeup host*/
8657 wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
8658 /* app mask for the mac addresses specified in swol_indoor_key_mac */
8659 A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
8660 A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
8661 A_UINT32 swol_indoor_pw_check; /* whether to check password */
8662 A_UINT32 swol_indoor_pattern; /* wakeup pattern */
8663 A_UINT32 swol_indoor_exception; /* wakeup when exception happens */
8664 A_UINT32 swol_indoor_exception_app;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008665} wmi_extwow_set_app_type1_params_cmd_fixed_param;
8666
8667typedef struct {
8668 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */
8669 A_UINT32 vdev_id;
8670
8671 A_UINT8 rc4_key[16];
8672 A_UINT32 rc4_key_len;
8673
8674 /** ip header parameter */
8675 A_UINT32 ip_id; /* NC id */
8676 A_UINT32 ip_device_ip; /* NC IP address */
8677 A_UINT32 ip_server_ip; /* Push server IP address */
8678
8679 /** tcp header parameter */
8680 A_UINT16 tcp_src_port; /* NC TCP port */
8681 A_UINT16 tcp_dst_port; /* Push server TCP port */
8682 A_UINT32 tcp_seq;
8683 A_UINT32 tcp_ack_seq;
8684
8685 A_UINT32 keepalive_init; /* Initial ping interval */
8686 A_UINT32 keepalive_min; /* Minimum ping interval */
8687 A_UINT32 keepalive_max; /* Maximum ping interval */
8688 A_UINT32 keepalive_inc; /* Increment of ping interval */
8689
8690 wmi_mac_addr gateway_mac;
8691 A_UINT32 tcp_tx_timeout_val;
8692 A_UINT32 tcp_rx_timeout_val;
8693
8694 /** add extra parameter for backward-compatible */
8695 /*
8696 * For all byte arrays, natural order is used. E.g.
8697 * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
8698 * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
8699 */
8700
8701 /* used to encrypt transmit packet such as keep-alive */
8702 A_UINT8 rc4_write_sandbox[256];
8703 A_UINT32 rc4_write_x;
8704 A_UINT32 rc4_write_y;
8705
8706 /* used to decrypt received packet such as wow data */
8707 A_UINT8 rc4_read_sandbox[256];
8708 A_UINT32 rc4_read_x;
8709 A_UINT32 rc4_read_y;
8710
8711 /* used to caculate HMAC hash for transmit packet such as keep-alive */
8712 A_UINT8 ssl_write_seq[8];
8713 A_UINT8 ssl_sha1_write_key[64];
8714 A_UINT32 ssl_sha1_write_key_len;
8715
8716 /* used to calculate HAMC hash for receive packet such as wow data */
8717 A_UINT8 ssl_read_seq[8];
8718 A_UINT8 ssl_sha1_read_key[64];
8719 A_UINT32 ssl_sha1_read_key_len;
8720
8721 /* optional element for specifying TCP options data to include in
8722 * transmit packets such as keep-alive
8723 */
8724 A_UINT32 tcp_options_len;
8725 A_UINT8 tcp_options[40];
8726
8727 A_UINT32 async_id; /* keep-alive request id */
8728} wmi_extwow_set_app_type2_params_cmd_fixed_param;
8729
8730#define WMI_RXERR_CRC 0x01 /* CRC error on frame */
8731#define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
8732#define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */
8733#define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
8734
8735typedef enum {
8736 PKT_PWR_SAVE_PAID_MATCH = 0x0001,
8737 PKT_PWR_SAVE_GID_MATCH = 0x0002,
8738 PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x0004,
8739 PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x0008,
8740 PKT_PWR_SAVE_EOF_PAD_DELIM = 0x0010,
8741 PKT_PWR_SAVE_MACADDR_MISMATCH = 0x0020,
8742 PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x0040,
8743 PKT_PWR_SAVE_GID_NSTS_ZERO = 0x0080,
8744 PKT_PWR_SAVE_RSSI_CHECK = 0x0100,
8745 PKT_PWR_SAVE_5G_EBT = 0x0200,
8746 PKT_PWR_SAVE_2G_EBT = 0x0400,
8747 WMI_PKT_PWR_SAVE_MAX = 0x0800,
8748} WMI_PKT_PWR_SAVE_TYPE;
8749
8750typedef struct {
8751 A_UINT32 tlv_header;
8752 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
8753 A_UINT32 num_data;
8754 /** length in byte of data[]. */
Govind Singh869c9872016-02-22 18:36:34 +05308755 /** pdev_id for identifying the MAC
8756 * See macros starting with WMI_PDEV_ID_ for values.
8757 */
8758 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008759 /* This structure is used to send Factory Test Mode [FTM] command
8760 * from host to firmware for integrated chips which are binary blobs.
8761 * Following this structure is the TLV:
8762 * A_UINT8 data[]; // length in byte given by field num_data.
8763 */
8764} wmi_ftm_intg_cmd_fixed_param;
8765
8766typedef struct {
8767 A_UINT32 tlv_header;
8768 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
8769 A_UINT32 num_data;
8770 /** length in byte of data[]. */
8771 /* This structure is used to receive Factory Test Mode [FTM] event
8772 * from firmware to host for integrated chips which are binary blobs.
8773 * Following this structure is the TLV:
8774 * A_UINT8 data[]; // length in byte given by field num_data.
8775 */
8776} wmi_ftm_intg_event_fixed_param;
8777
8778#define WMI_MAX_NS_OFFLOADS 2
8779#define WMI_MAX_ARP_OFFLOADS 2
8780
8781#define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
8782#define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
8783#define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
8784
8785typedef struct {
8786 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
8787 A_UINT32 flags; /* flags */
8788 A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node */
8789 A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
8790 wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
8791} WMI_ARP_OFFLOAD_TUPLE;
8792
8793#define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
8794#define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
8795#define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
Govind Singh86180292016-02-01 14:03:37 +05308796/* whether the configured IPv6 address is anycast */
8797#define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008798
8799#define WMI_NSOFF_MAX_TARGET_IPS 2
8800
8801typedef struct {
8802 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
8803 A_UINT32 flags; /* flags */
8804 /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
8805 WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */
8806 WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
8807 WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
8808 wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
8809} WMI_NS_OFFLOAD_TUPLE;
8810
8811typedef struct {
8812 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
8813 A_UINT32 flags;
8814 A_UINT32 vdev_id;
8815 A_UINT32 num_ns_ext_tuples;
8816 /* Following this structure are the TLVs:
8817 * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS];
8818 * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
8819 * size of ns_ext_tuples is based on num_ns_ext_tuples
8820 * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[];
8821 */
8822} WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
8823
8824typedef struct {
8825 A_UINT32 tlv_header;
8826 A_UINT32 vdev_id;
8827 A_UINT32 pattern_id;
8828 A_UINT32 timeout;
8829 A_UINT32 length;
8830 /* Following this would be the pattern
8831 A_UINT8 pattern[] of length specifed by length
8832 field in the structure. */
8833} WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
8834
8835typedef struct {
8836 A_UINT32 tlv_header;
8837 A_UINT32 vdev_id;
8838 A_UINT32 pattern_id;
8839} WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
8840
8841typedef struct {
8842 A_UINT32 tlv_header;
8843 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
8844 /** unique id identifying the VDEV, generated by the caller */
8845 A_UINT32 vdev_id;
8846 /** peer MAC address */
8847 wmi_mac_addr peer_macaddr;
8848 /** Tid number */
8849 A_UINT32 tid;
8850 /** Initiator (1) or Responder (0) for this aggregation */
8851 A_UINT32 initiator;
8852 /** size of the negotiated window */
8853 A_UINT32 window_size;
8854 /** starting sequence number (only valid for initiator) */
8855 A_UINT32 ssn;
8856 /** timeout field represents the time to wait for Block Ack in
8857 * initiator case and the time to wait for BAR in responder
8858 * case. 0 represents no timeout. */
8859 A_UINT32 timeout;
8860 /* BA policy: immediate ACK (0) or delayed ACK (1) */
8861 A_UINT32 policy;
8862} wmi_peer_tid_addba_cmd_fixed_param;
8863
8864typedef struct {
8865 A_UINT32 tlv_header;
8866 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
8867 /** unique id identifying the VDEV, generated by the caller */
8868 A_UINT32 vdev_id;
8869 /** peer MAC address */
8870 wmi_mac_addr peer_macaddr;
8871 /** Tid number */
8872 A_UINT32 tid;
8873 /** Initiator (1) or Responder (0) for this aggregation */
8874 A_UINT32 initiator;
8875} wmi_peer_tid_delba_cmd_fixed_param;
8876
8877typedef struct {
8878 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
8879 /** unique id identifying the VDEV, generated by the caller */
8880 A_UINT32 vdev_id;
8881 /** peer MAC address */
8882 wmi_mac_addr peer_macaddr;
8883 /** Tid number */
8884 A_UINT32 tid;
8885 /** Event status */
8886 A_UINT32 status;
8887} wmi_tx_addba_complete_event_fixed_param;
8888
8889typedef struct {
8890 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
8891 /** unique id identifying the VDEV, generated by the caller */
8892 A_UINT32 vdev_id;
8893 /** peer MAC address */
8894 wmi_mac_addr peer_macaddr;
8895 /** Tid number */
8896 A_UINT32 tid;
8897 /** Event status */
8898 A_UINT32 status;
8899} wmi_tx_delba_complete_event_fixed_param;
8900/*
8901 * Structure to request sequence numbers for a given
8902 * peer station on different TIDs. The TIDs are
8903 * indicated in the tidBitMap, tid 0 would
8904 * be represented by LSB bit 0. tid 1 would be
8905 * represented by LSB bit 1 etc.
8906 * The target will retrieve the current sequence
8907 * numbers for the peer on all the TIDs requested
8908 * and send back a response in a WMI event.
8909 */
8910typedef struct {
8911 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308912 WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008913 wmi_mac_addr peer_macaddr;
8914 A_UINT32 tidBitmap;
8915} wmi_ba_req_ssn;
8916
8917typedef struct {
8918 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308919 WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008920 /** unique id identifying the VDEV, generated by the caller */
8921 A_UINT32 vdev_id;
8922 /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
8923 A_UINT32 num_ba_req_ssn;
8924/* Following this struc are the TLV's:
8925 * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
8926 */
8927} wmi_ba_req_ssn_cmd_fixed_param;
8928
8929/*
8930 * Max transmit categories
8931 *
8932 * Note: In future if we need to increase WMI_MAX_TC definition
8933 * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
8934 */
8935#define WMI_MAX_TC 8
8936
8937/*
8938 * Structure to send response sequence numbers
8939 * for a give peer and tidmap.
8940 */
8941typedef struct {
8942 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308943 WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008944 wmi_mac_addr peer_macaddr;
8945 /* A bool to indicate if ssn is present */
8946 A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
8947 /* The ssn from target, valid only if
8948 * ssn_present_for_tid[tidn] equals 1
8949 */
8950 A_UINT32 ssn_for_tid[WMI_MAX_TC];
8951} wmi_ba_event_ssn;
8952
8953typedef struct {
8954 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308955 WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008956 /** unique id identifying the VDEV, generated by the caller */
8957 A_UINT32 vdev_id;
8958 /** Event status, success or failure of the overall operation */
8959 A_UINT32 status;
8960 /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
8961 A_UINT32 num_ba_event_ssn;
8962/* Following this struc are the TLV's:
8963 * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
8964 */
8965} wmi_ba_rsp_ssn_event_fixed_param;
8966
8967enum wmi_aggr_state_req_type {
8968 WMI_DISABLE_AGGREGATION,
8969 WMI_ENABLE_AGGREGATION
8970};
8971
8972/*
8973 * This event is generated by the COEX module
8974 * when esco call is begins the coex module in fw genrated this event to host to
8975 * disable the RX aggregation and after completion of the esco call fw will indicate to
8976 * enable back the Rx aggregation .
8977 */
8978
8979typedef struct {
8980 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
8981 /** unique id identifying the VDEV, generated by the caller */
8982 A_UINT32 vdev_id;
8983 /** req_type contains values from enum
8984 * wmi_aggr_state_req_type; 0 (disable) 1(enable) */
8985 A_UINT32 req_type;
8986} wmi_aggr_state_trig_event_fixed_param;
8987
8988typedef struct {
8989 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
8990 /** unique id identifying the VDEV, generated by the caller */
8991 A_UINT32 vdev_id;
8992 /** MAC address used for installing */
8993 wmi_mac_addr peer_macaddr;
8994 /** key index */
8995 A_UINT32 key_ix;
8996 /** key flags */
8997 A_UINT32 key_flags;
8998 /** Event status */
8999 A_UINT32 status;
9000} wmi_vdev_install_key_complete_event_fixed_param;
9001
9002typedef enum _WMI_NLO_AUTH_ALGORITHM {
9003 WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
9004 WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
9005 WMI_NLO_AUTH_ALGO_WPA = 3,
9006 WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
9007 WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
9008 WMI_NLO_AUTH_ALGO_RSNA = 6,
9009 WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
9010} WMI_NLO_AUTH_ALGORITHM;
9011
9012typedef enum _WMI_NLO_CIPHER_ALGORITHM {
9013 WMI_NLO_CIPHER_ALGO_NONE = 0x00,
9014 WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
9015 WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
9016 WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
9017 WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
9018 WMI_NLO_CIPHER_ALGO_BIP = 0x06,
9019 WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
9020 WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
9021 WMI_NLO_CIPHER_ALGO_WEP = 0x101,
9022} WMI_NLO_CIPHER_ALGORITHM;
9023
9024/* SSID broadcast type passed in NLO params */
9025typedef enum _WMI_NLO_SSID_BcastNwType {
9026 WMI_NLO_BCAST_UNKNOWN = 0,
9027 WMI_NLO_BCAST_NORMAL = 1,
9028 WMI_NLO_BCAST_HIDDEN = 2,
9029} WMI_NLO_SSID_BcastNwType;
9030
9031#define WMI_NLO_MAX_SSIDS 16
9032#define WMI_NLO_MAX_CHAN 48
9033
9034#define WMI_NLO_CONFIG_STOP (0x1 << 0)
9035#define WMI_NLO_CONFIG_START (0x1 << 1)
9036#define WMI_NLO_CONFIG_RESET (0x1 << 2)
9037#define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4)
9038#define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5)
9039#define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6)
9040/* This bit is used to indicate if EPNO or supplicant PNO is enabled. Only
9041 * one of them can be enabled at a given time */
9042#define WMI_NLO_CONFIG_ENLO (0x1 << 7)
9043#define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8)
Govind Singh42f71542016-03-14 16:32:33 +05309044#define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009045
9046/* Whether directed scan needs to be performed (for hidden SSIDs) */
9047#define WMI_ENLO_FLAG_DIRECTED_SCAN 1
9048/* Whether PNO event shall be triggered if the network is found on A band */
9049#define WMI_ENLO_FLAG_A_BAND 2
9050/* Whether PNO event shall be triggered if the network is found on G band */
9051#define WMI_ENLO_FLAG_G_BAND 4
9052/* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
9053#define WMI_ENLO_FLAG_STRICT_MATCH 8
9054/* Code for matching the beacon AUTH IE - additional codes TBD open */
9055#define WMI_ENLO_AUTH_CODE_OPEN 1
9056/* WPA_PSK or WPA2PSK */
9057#define WMI_ENLO_AUTH_CODE_PSK 2
9058/* any EAPOL */
9059#define WMI_ENLO_AUTH_CODE_EAPOL 4
9060
9061/* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
9062typedef struct wmi_nlo_ssid_param {
9063 A_UINT32 valid;
9064 wmi_ssid ssid;
9065} wmi_nlo_ssid_param;
9066
9067/* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
9068typedef struct wmi_nlo_enc_param {
9069 A_UINT32 valid;
9070 A_UINT32 enc_type;
9071} wmi_nlo_enc_param;
9072
9073/* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
9074typedef struct wmi_nlo_auth_param {
9075 A_UINT32 valid;
9076 A_UINT32 auth_type;
9077} wmi_nlo_auth_param;
9078
9079/* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
9080typedef struct wmi_nlo_bcast_nw_param {
9081 A_UINT32 valid;
9082 /**
9083 * If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value
9084 * should be true/false.Otherwise EPNO is enabled. bcast_nw_type would be used
9085 * as a bit flag contains WMI_ENLO_FLAG_XXX
9086 */
9087 A_UINT32 bcast_nw_type;
9088} wmi_nlo_bcast_nw_param;
9089
9090/* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
9091typedef struct wmi_nlo_rssi_param {
9092 A_UINT32 valid;
9093 A_INT32 rssi;
9094} wmi_nlo_rssi_param;
9095
9096typedef struct nlo_configured_parameters {
9097 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
9098 wmi_nlo_ssid_param ssid;
9099 wmi_nlo_enc_param enc_type;
9100 wmi_nlo_auth_param auth_type;
9101 wmi_nlo_rssi_param rssi_cond;
9102 wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
9103} nlo_configured_parameters;
9104
9105/* Support channel prediction for PNO scan after scanning top_k_num channels
9106 * if stationary_threshold is met.
9107 */
9108typedef struct nlo_channel_prediction_cfg {
9109 A_UINT32 tlv_header;
9110 /* Enable or disable this feature. */
9111 A_UINT32 enable;
9112 /* Top K channels will be scanned before deciding whether to further
9113 * scan or stop. Minimum value is 3 and maximum is 5. */
9114 A_UINT32 top_k_num;
9115 /* Preconfigured stationary threshold. Lesser value means more
9116 * conservative. Bigger value means more aggressive.
9117 * Maximum is 100 and mininum is 0. */
9118 A_UINT32 stationary_threshold;
9119 /* Periodic full channel scan in milliseconds unit.
9120 * After full_scan_period_ms since last full scan, channel prediction
9121 * scan is suppressed and will do full scan.
9122 * This is to help detecting sudden AP power-on or -off.
9123 * Value 0 means no full scan at all (not recommended).
9124 */
9125 A_UINT32 full_scan_period_ms;
9126} nlo_channel_prediction_cfg;
9127
Govind Singh42f71542016-03-14 16:32:33 +05309128typedef struct enlo_candidate_score_params_t {
9129 /*
9130 * TLV tag and len;
9131 * tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param
9132 */
9133 A_UINT32 tlv_header;
9134 /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
9135 A_INT32 min5GHz_rssi;
9136 /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
9137 A_INT32 min24GHz_rssi;
9138 /* the maximum score that a network can have before bonuses */
9139 A_UINT32 initial_score_max;
9140 /* current_connection_bonus:
9141 * only report when there is a network's score this much higher
9142 * than the current connection
9143 */
9144 A_UINT32 current_connection_bonus;
9145 /* score bonus for all networks with the same network flag */
9146 A_UINT32 same_network_bonus;
9147 /* score bonus for networks that are not open */
9148 A_UINT32 secure_bonus;
9149 /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
9150 A_UINT32 band5GHz_bonus;
9151} enlo_candidate_score_params;
9152
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009153typedef struct wmi_nlo_config {
9154 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
9155 A_UINT32 flags;
9156 A_UINT32 vdev_id;
9157 A_UINT32 fast_scan_max_cycles;
9158 A_UINT32 active_dwell_time;
9159 A_UINT32 passive_dwell_time; /* PDT in msecs */
9160 A_UINT32 probe_bundle_size;
9161 A_UINT32 rest_time; /* ART = IRT */
9162 A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
9163 A_UINT32 scan_backoff_multiplier; /* SBM */
9164 A_UINT32 fast_scan_period; /* SCBM */
9165 A_UINT32 slow_scan_period; /* specific to windows */
9166 A_UINT32 no_of_ssids;
9167 A_UINT32 num_of_channels;
9168 A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
9169 /* The TLVs will follow.
9170 * nlo_configured_parameters nlo_list[];
9171 * A_UINT32 channel_list[];
9172 * nlo_channel_prediction_cfg ch_prediction_cfg;
Govind Singh42f71542016-03-14 16:32:33 +05309173 * enlo_candidate_score_params candidate_score_params;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009174 */
9175
9176} wmi_nlo_config_cmd_fixed_param;
9177
9178typedef struct wmi_nlo_event {
9179 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
9180 A_UINT32 vdev_id;
9181} wmi_nlo_event;
9182
9183/* WMI_PASSPOINT_CONFIG_SET
9184 * Sets a list for passpoint networks for PNO purposes;
9185 * it should be matched against any passpoint networks found
9186 * during regular PNO scan.
9187 */
9188#define WMI_PASSPOINT_CONFIG_SET (0x1 << 0)
9189/* WMI_PASSPOINT_CONFIG_RESET
9190 * Reset passpoint network list -
9191 * no Passpoint networks should be matched after this.
9192 */
9193#define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1)
9194#define PASSPOINT_REALM_LEN 256
9195#define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5
9196#define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
9197#define PASSPOINT_PLMN_ID_LEN 3
9198#define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
9199 (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
9200
9201/*
9202 * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
9203 * A_UINT8 realm[PASSPOINT_REALM_LEN]
9204 * array will end on a 4-byte boundary.
9205 * (This 4-byte alignment simplifies endianness-correction byte swapping.)
9206 */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309207A_COMPILE_TIME_ASSERT(check_passpoint_realm_size, (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009208
9209/*
9210 * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
9211 * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
9212 * roaming_consortium_ids array below will end on a 4-byte boundary.
9213 * (This 4-byte alignment simplifies endianness-correction byte swapping.)
9214 */
9215A_COMPILE_TIME_ASSERT(check_passpoint_roaming_consortium_ids_size,
9216((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
9217
9218/* wildcard ID to allow an action (reset) to apply to all networks */
9219#define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
9220typedef struct wmi_passpoint_config {
9221 /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
9222 A_UINT32 tlv_header;
9223 /* (network) id
9224 * identifier of the matched network, report this in event
9225 * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
9226 * that indicates the action should be applied to all networks.
9227 * Currently, the only action that is applied to all networks is "reset".
9228 * If a non-wildcard ID is specified, that particular network is configured.
9229 * If a wildcard ID is specified, all networks are reset.
9230 */
9231 A_UINT32 id;
9232 A_UINT32 req_id;
9233 /*null terminated UTF8 encoded realm, 0 if unspecified*/
9234 A_UINT8 realm[PASSPOINT_REALM_LEN];
9235 /*roaming consortium ids to match, 0s if unspecified*/
9236 A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN];
9237 /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
9238 /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
9239 A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN];
9240} wmi_passpoint_config_cmd_fixed_param;
9241
9242typedef struct {
9243 A_UINT32 tlv_header; /* TLV tag and len; tag equals
9244wmi_passpoint_event_hdr */
9245 A_UINT32 id; /* identifier of the matched network */
9246 A_UINT32 vdev_id;
9247 A_UINT32 timestamp; /* time since boot (in microsecond) when the
9248result was retrieved*/
9249 wmi_ssid ssid;
9250 wmi_mac_addr bssid; /* bssid of the network */
9251 A_UINT32 channel_mhz; /* channel frequency in MHz */
9252 A_UINT32 rssi; /* rssi value */
9253 A_UINT32 rtt; /* timestamp in nanoseconds*/
9254 A_UINT32 rtt_sd; /* standard deviation in rtt */
9255 A_UINT32 beacon_period; /* beacon advertised in the beacon */
9256 A_UINT32 capability; /* capabilities advertised in the beacon */
9257 A_UINT32 ie_length; /* size of the ie_data blob */
9258 A_UINT32 anqp_length; /* length of ANQP blob */
9259 /**
9260 * Following this structure is the byte stream of ie data of length ie_buf_len:
9261 * A_UINT8 ie_data[]; // length in byte given by field ie_length, blob of ie data in beacon
9262 * A_UINT8 anqp_ie[]; // length in byte given by field anqp_len, blob of anqp data of IE
9263 * Implicitly, combing ie_data and anqp_ie into a single bufp, and the bytes
9264 * stream of each ie should be same as BEACON/Action-frm by 802.11 spec
9265 */
9266} wmi_passpoint_event_hdr;
9267
9268#define GTK_OFFLOAD_OPCODE_MASK 0xFF000000
9269/** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
9270#define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000
9271/** Disable GTK offload */
9272#define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000
9273/** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
9274#define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000
9275enum wmi_chatter_mode {
9276 /* Chatter enter/exit happens
9277 * automatically based on preset
9278 * params
9279 */
9280 WMI_CHATTER_MODE_AUTO,
9281 /* Chatter enter is triggered
9282 * manually by the user
9283 */
9284 WMI_CHATTER_MODE_MANUAL_ENTER,
9285 /* Chatter exit is triggered
9286 * manually by the user
9287 */
9288 WMI_CHATTER_MODE_MANUAL_EXIT,
9289 /* Placeholder max value, always last */
9290 WMI_CHATTER_MODE_MAX
9291};
9292
9293enum wmi_chatter_query_type {
9294 /*query coalescing filter match counter */
9295 WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
9296 WMI_CHATTER_QUERY_MAX
9297};
9298
9299typedef struct {
9300 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */
9301 A_UINT32 chatter_mode;
9302} wmi_chatter_set_mode_cmd_fixed_param;
9303
9304/** maximum number of filter supported*/
9305#define CHATTER_MAX_COALESCING_RULES 11
9306/** maximum number of field tests per filter*/
9307#define CHATTER_MAX_FIELD_TEST 5
9308/** maximum field length in number of DWORDS*/
9309#define CHATTER_MAX_TEST_FIELD_LEN32 2
9310
9311/** field test kinds*/
9312#define CHATTER_COALESCING_TEST_EQUAL 1
9313#define CHATTER_COALESCING_TEST_MASKED_EQUAL 2
9314#define CHATTER_COALESCING_TEST_NOT_EQUAL 3
9315
9316/** packet type*/
9317#define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0)
9318#define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1)
9319#define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2)
9320
9321/** coalescing field test*/
9322typedef struct _chatter_pkt_coalescing_hdr_test {
9323 /** offset from start of mac header, for windows native wifi host driver
9324 * should assume standard 802.11 frame format without QoS info and address4
9325 * FW would account for any non-stand fields for final offset value.
9326 */
9327 A_UINT32 offset;
9328 A_UINT32 length; /* length of test field */
9329 A_UINT32 test; /*equal, not equal or masked equal */
9330 A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream */
9331 A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream */
9332} chatter_pkt_coalescing_hdr_test;
9333
9334/** packet coalescing filter*/
9335typedef struct _chatter_pkt_coalescing_filter {
9336 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
9337 A_UINT32 filter_id; /*unique id assigned by OS */
9338 A_UINT32 max_coalescing_delay; /*max miliseconds 1st pkt can be hold */
9339 A_UINT32 pkt_type; /*unicast/multicast/broadcast */
9340 A_UINT32 num_of_test_field; /*number of field test in table */
9341 chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /*field test tbl */
9342} chatter_pkt_coalescing_filter;
9343
9344/** packet coalescing filter add command*/
9345typedef struct {
9346 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
9347 A_UINT32 num_of_filters;
9348 /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
9349 chatter_pkt_coalescing_filter rx_filter[1]; */
9350} wmi_chatter_coalescing_add_filter_cmd_fixed_param;
9351/** packet coalescing filter delete command*/
9352typedef struct {
9353 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
9354 A_UINT32 filter_id; /*filter id which will be deleted */
9355} wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
9356/** packet coalescing query command*/
9357typedef struct {
9358 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
9359 A_UINT32 type; /*type of query */
9360} wmi_chatter_coalescing_query_cmd_fixed_param;
9361/** chatter query reply event*/
9362typedef struct {
9363 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */
9364 A_UINT32 type; /*query type */
9365 A_UINT32 filter_match_cnt; /*coalescing filter match counter */
9366} wmi_chatter_query_reply_event_fixed_param;
9367
9368/* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
9369 * cannot be changed without breaking WMI compatibility. */
9370#define GTK_OFFLOAD_KEK_BYTES 16
9371#define GTK_OFFLOAD_KCK_BYTES 16
9372/* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
9373#define GTK_REPLAY_COUNTER_BYTES 8
9374#define WMI_MAX_KEY_LEN 32
9375#define IGTK_PN_SIZE 6
9376
9377typedef struct {
9378 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
9379 A_UINT32 vdev_id;
9380 /** unique id identifying the VDEV */
9381 A_UINT32 flags; /* status flags */
9382 A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
9383 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
9384 A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
9385 A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
9386 A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
9387 A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
9388} WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
9389
9390typedef struct {
9391 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
9392 A_UINT32 vdev_id; /** unique id identifying the VDEV */
9393 A_UINT32 flags; /* control flags, GTK offload command use high byte */
9394 /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
9395 A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
9396 A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
9397 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
9398} WMI_GTK_OFFLOAD_CMD_fixed_param;
9399
9400typedef struct {
9401 /* TLV tag and len; tag equals
9402 * WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param
9403 */
9404 A_UINT32 tlv_header;
9405 A_UINT32 vdev_id;
9406 A_UINT32 sa_query_retry_interval; /* in msec */
9407 A_UINT32 sa_query_max_retry_count;
9408} WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
9409
9410typedef enum {
9411 WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
9412 WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
9413 WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK */
9414 /* gratuitous ARP req*/
9415 WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4,
9416} WMI_STA_KEEPALIVE_METHOD;
9417
9418typedef struct {
9419 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
9420 WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
9421 WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
9422 wmi_mac_addr dest_mac_addr; /* destination MAC address */
9423} WMI_STA_KEEPALVE_ARP_RESPONSE;
9424
9425typedef struct {
9426 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
9427 A_UINT32 vdev_id;
9428 A_UINT32 enable; /* 1 - Enable, 0 - disable */
9429 A_UINT32 method; /* keep alive method */
9430 A_UINT32 interval; /* time interval in seconds */
9431 /*
9432 * NOTE: following this structure is the TLV for ARP Resonse:
9433 * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; // ARP response
9434 */
9435} WMI_STA_KEEPALIVE_CMD_fixed_param;
9436
9437typedef struct {
9438 A_UINT32 tlv_header;
9439 A_UINT32 vdev_id;
9440 A_UINT32 action;
9441} WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
9442typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
9443
9444typedef struct {
9445 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
9446 A_UINT32 vdev_id;
9447 A_UINT32 keepaliveInterval; /* seconds */
9448 A_UINT32 keepaliveMethod;
9449} wmi_vdev_set_keepalive_cmd_fixed_param;
9450
9451typedef struct {
9452 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
9453 A_UINT32 vdev_id;
9454} wmi_vdev_get_keepalive_cmd_fixed_param;
9455
9456typedef struct {
9457 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
9458 A_UINT32 vdev_id;
9459 A_UINT32 keepaliveInterval; /* seconds */
9460 A_UINT32 keepaliveMethod; /* seconds */
9461} wmi_vdev_get_keepalive_event_fixed_param;
9462
9463#define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
9464#define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
9465
9466typedef struct {
9467 A_UINT32 tlv_header;
9468 A_UINT32 vdev_id;
9469 A_UINT32 action;
9470} WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
9471
9472typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param
9473WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
9474
9475typedef struct {
9476 A_UINT32 tlv_header;
9477 A_UINT32 vdev_id;
9478 A_UINT32 mcc_tbttmode;
9479 wmi_mac_addr mcc_bssid;
9480} wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
9481
9482typedef struct {
9483 A_UINT32 tlv_header;
9484 A_UINT32 vdev_id; /* home vdev id */
9485 A_UINT32 meas_token; /* from measure request frame */
9486 A_UINT32 dialog_token;
9487 A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
9488 A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst */
9489 A_UINT32 burst_cycle; /* times cycle through within one burst */
9490 A_UINT32 tx_power; /* for path frame */
9491 A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */
9492 wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
9493 A_UINT32 num_chans;
9494} wmi_vdev_plmreq_start_cmd_fixed_param;
9495
9496typedef struct {
9497 A_UINT32 tlv_header;
9498 A_UINT32 vdev_id;
9499 A_UINT32 meas_token; /* same value from req */
9500} wmi_vdev_plmreq_stop_cmd_fixed_param;
9501
9502typedef struct {
9503 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */
9504 A_UINT32 tlv_header;
9505 /* unique id identifying the VDEV, generated by the caller */
9506 A_UINT32 vdev_id;
9507 /* enable/disable NoA */
9508 A_UINT32 enable;
9509 /** number of NoA desc. In the TLV noa_descriptor[] */
9510 A_UINT32 num_noa;
9511 /**
9512 * TLV (tag length value ) paramerters follow the pattern structure.
9513 * TLV contain NoA desc with num of num_noa
9514 */
9515} wmi_p2p_set_noa_cmd_fixed_param;
9516
9517typedef struct {
9518 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */
9519 A_UINT32 tlv_header;
9520 /* unique id identifying the VDEV, generated by the caller */
9521 A_UINT32 vdev_id;
9522 /* Identify the wlan module */
9523 A_UINT32 module_id;
9524 /* Num of test arguments passed */
9525 A_UINT32 num_args;
9526/**
9527 * TLV (tag length value ) parameters follow the wmi_roam_chan_list
9528 * structure. The TLV's are:
9529 * A_UINT32 args[];
9530 **/
9531} wmi_unit_test_cmd_fixed_param;
9532
9533/** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
9534 * after it received WMI_ROAM_SYNCH_EVENTID.
9535 */
9536typedef struct {
9537 A_UINT32 tlv_header;
9538 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
9539 /** unique id identifying the VDEV, generated by the caller */
9540 A_UINT32 vdev_id;
9541} wmi_roam_synch_complete_fixed_param;
9542
9543typedef enum {
9544 RECOVERY_SIM_ASSERT = 0x01,
9545 RECOVERY_SIM_NO_DETECT = 0x02,
9546 RECOVERY_SIM_CTR_EP_FULL = 0x03,
9547 RECOVERY_SIM_EMPTY_POINT = 0x04,
9548 RECOVERY_SIM_STACK_OV = 0x05,
9549 RECOVERY_SIM_INFINITE_LOOP = 0x06,
9550 RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
9551 RECOVERY_SIM_SELF_RECOVERY = 0x08,
9552} RECOVERY_SIM_TYPE;
9553
9554/* WMI_FORCE_FW_HANG_CMDID */
9555typedef struct {
9556 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
9557 A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:... */
9558 A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms) */
9559} WMI_FORCE_FW_HANG_CMD_fixed_param;
9560#define WMI_MCAST_FILTER_SET 1
9561#define WMI_MCAST_FILTER_DELETE 2
9562typedef struct {
9563 A_UINT32 tlv_header;
9564 A_UINT32 vdev_id;
9565 A_UINT32 index;
9566 A_UINT32 action;
9567 wmi_mac_addr mcastbdcastaddr;
9568} WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
9569
Himanshu Agarwalb0497b52016-05-13 21:03:37 +05309570/* WMI_DBGLOG_TIME_STAMP_SYNC_CMDID */
9571typedef enum {
9572 WMI_TIME_STAMP_SYNC_MODE_MS, /* millisecond units */
9573 WMI_TIME_STAMP_SYNC_MODE_US, /* microsecond units */
9574} WMI_TIME_STAMP_SYNC_MODE;
9575
9576typedef struct {
9577 /*
9578 * TLV tag and len; tag equals
9579 * WMITLV_TAG_STRUC_wmi_dbglog_time_stamp_sync_cmd_fixed_param
9580 */
9581 A_UINT32 tlv_header;
9582 /* 0: millisec, 1: microsec (see WMI_TIME_STAMP_SYNC_MODE) */
9583 A_UINT32 mode;
9584 A_UINT32 time_stamp_low; /* lower 32 bits of remote time stamp */
9585 A_UINT32 time_stamp_high; /* higher 32 bits of remote time stamp */
9586} WMI_DBGLOG_TIME_STAMP_SYNC_CMD_fixed_param;
9587
9588
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009589/* GPIO Command and Event data structures */
9590
9591/* WMI_GPIO_CONFIG_CMDID */
9592enum {
9593 WMI_GPIO_PULL_NONE,
9594 WMI_GPIO_PULL_UP,
9595 WMI_GPIO_PULL_DOWN,
9596};
9597
9598enum {
9599 WMI_GPIO_INTTYPE_DISABLE,
9600 WMI_GPIO_INTTYPE_RISING_EDGE,
9601 WMI_GPIO_INTTYPE_FALLING_EDGE,
9602 WMI_GPIO_INTTYPE_BOTH_EDGE,
9603 WMI_GPIO_INTTYPE_LEVEL_LOW,
9604 WMI_GPIO_INTTYPE_LEVEL_HIGH
9605};
9606
9607typedef struct {
9608 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
9609 A_UINT32 gpio_num; /* GPIO number to be setup */
9610 A_UINT32 input; /* 0 - Output/ 1 - Input */
9611 A_UINT32 pull_type; /* Pull type defined above */
9612 A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
9613} wmi_gpio_config_cmd_fixed_param;
9614
9615/* WMI_GPIO_OUTPUT_CMDID */
9616typedef struct {
9617 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
9618 A_UINT32 gpio_num; /* GPIO number to be setup */
9619 A_UINT32 set; /* Set the GPIO pin */
9620} wmi_gpio_output_cmd_fixed_param;
9621
9622/* WMI_GPIO_INPUT_EVENTID */
9623typedef struct {
9624 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
9625 A_UINT32 gpio_num; /* GPIO number which changed state */
9626} wmi_gpio_input_event_fixed_param;
9627
9628/* WMI_P2P_DISC_EVENTID */
9629enum {
9630 P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
9631 P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
9632};
9633
9634enum {
9635 P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload */
9636 P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload */
9637 P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload */
9638};
9639
9640enum {
9641 P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
9642 P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
9643};
9644
9645typedef struct {
9646 A_UINT32 vdev_id;
9647 A_UINT32 reason; /* P2P DISC wake up reason */
9648} wmi_p2p_disc_event;
9649
9650typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param
9651WOW_EVENT_INFO_SECTION_GTKIGTK;
9652
9653typedef enum {
9654 WMI_FAKE_TXBFER_SEND_NDPA,
9655 WMI_FAKE_TXBFER_SEND_MU,
9656 WMI_FAKE_TXBFER_NDPA_FBTYPE,
9657 WMI_FAKE_TXBFER_NDPA_NCIDX,
9658 WMI_FAKE_TXBFER_NDPA_POLL,
9659 WMI_FAKE_TXBFER_NDPA_BW,
9660 WMI_FAKE_TXBFER_NDPA_PREAMBLE,
9661 WMI_FAKE_TXBFER_NDPA_RATE,
9662 WMI_FAKE_TXBFER_NDP_BW,
9663 WMI_FAKE_TXBFER_NDP_NSS,
9664 WMI_TXBFEE_ENABLE_UPLOAD_H,
9665 WMI_TXBFEE_ENABLE_CAPTURE_H,
9666 WMI_TXBFEE_SET_CBF_TBL,
9667 WMI_TXBFEE_CBF_TBL_LSIG,
9668 WMI_TXBFEE_CBF_TBL_SIGA1,
9669 WMI_TXBFEE_CBF_TBL_SIGA2,
9670 WMI_TXBFEE_CBF_TBL_SIGB,
9671 WMI_TXBFEE_CBF_TBL_PAD,
9672 WMI_TXBFEE_CBF_TBL_DUR,
9673 WMI_TXBFEE_SU_NCIDX,
9674 WMI_TXBFEE_CBIDX,
9675 WMI_TXBFEE_NGIDX,
9676} WMI_TXBF_PARAM_ID;
9677
9678typedef struct {
9679 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
9680 /** parameter id */
9681 A_UINT32 param_id;
9682 /** parameter value */
9683 A_UINT32 param_value;
9684} wmi_txbf_cmd_fixed_param;
9685
9686typedef struct {
9687 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
9688 A_UINT32 h_length;
9689 A_UINT32 cv_length;
9690 /* This TLV is followed by array of bytes:
9691 * // h_cv info buffer
9692 * A_UINT8 bufp[];
9693 */
9694} wmi_upload_h_hdr;
9695
9696typedef struct {
9697 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
9698 A_UINT32 svd_num;
9699 A_UINT32 tone_num;
9700 A_UINT32 reserved;
9701} wmi_capture_h_event_hdr;
9702
9703typedef struct {
9704 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
9705 A_UINT32 start_freq; /* start frequency, not channel center freq */
9706 A_UINT32 end_freq; /* end frequency */
9707} wmi_avoid_freq_range_desc;
9708
9709typedef struct {
9710 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
9711 /* bad channel range count, multi range is allowed, 0 means all channel clear */
9712 A_UINT32 num_freq_ranges;
9713
9714 /* The TLVs will follow.
9715 * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
9716 * wmi_avoid_freq_range_desc avd_freq_range[]; // message buffer, NULL terminated
9717 */
9718} wmi_avoid_freq_ranges_event_fixed_param;
9719
9720typedef struct {
9721 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */
9722 /** Reserved for future use */
9723 A_UINT32 reserved0;
9724 A_UINT32 vdev_id;
9725} wmi_gtk_rekey_fail_event_fixed_param;
9726
9727enum wmm_ac_downgrade_policy {
9728 WMM_AC_DOWNGRADE_DEPRIO,
9729 WMM_AC_DOWNGRADE_DROP,
9730 WMM_AC_DOWNGRADE_INVALID,
9731};
9732
9733typedef struct {
9734 A_UINT32 tlv_header;
9735 A_UINT32 cwmin;
9736 A_UINT32 cwmax;
9737 A_UINT32 aifs;
9738 A_UINT32 txoplimit;
9739 A_UINT32 acm;
9740 A_UINT32 no_ack;
9741} wmi_wmm_vparams;
9742
9743typedef struct {
9744 A_UINT32 tlv_header;
9745 A_UINT32 vdev_id;
9746 wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
9747} wmi_vdev_set_wmm_params_cmd_fixed_param;
9748
9749typedef struct {
9750 A_UINT32 tlv_header;
9751 A_UINT32 vdev_id;
9752 A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */
9753 A_UINT32 userGtxMask; /* host request for GTX mask */
9754 A_UINT32 gtxPERThreshold; /* default: 10% */
9755 A_UINT32 gtxPERMargin; /* default: 2% */
9756 A_UINT32 gtxTPCstep; /* default: 1 */
9757 A_UINT32 gtxTPCMin; /* default: 5 */
9758 A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */
9759} wmi_vdev_set_gtx_params_cmd_fixed_param;
9760
9761typedef struct {
9762 A_UINT32 tlv_header;
9763 A_UINT32 vdev_id;
9764 A_UINT32 ac;
9765 A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
9766 A_UINT32 downgrade_type;
9767} wmi_vdev_wmm_addts_cmd_fixed_param;
9768
9769typedef struct {
9770 A_UINT32 tlv_header;
9771 A_UINT32 vdev_id;
9772 A_UINT32 ac;
9773} wmi_vdev_wmm_delts_cmd_fixed_param;
9774
Govind Singh869c9872016-02-22 18:36:34 +05309775/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009776typedef struct {
9777 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */
9778 /** Reserved for future use */
9779 A_UINT32 reserved0;
9780} wmi_pdev_dfs_enable_cmd_fixed_param;
9781
Govind Singh869c9872016-02-22 18:36:34 +05309782/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009783typedef struct {
9784 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 +05309785 /** pdev_id for identifying the MAC
9786 * See macros starting with WMI_PDEV_ID_ for values.
9787 */
9788 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009789} wmi_pdev_dfs_disable_cmd_fixed_param;
9790
9791typedef struct {
9792 /** TLV tag and len; tag equals
9793 * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
9794 */
9795 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05309796 /** pdev_id for identifying the MAC
9797 * See macros starting with WMI_PDEV_ID_ for values.
9798 */
9799 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009800} wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
9801
9802typedef struct {
9803 /** TLV tag and len; tag equals
9804 * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
9805 */
9806 A_UINT32 tlv_header;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05309807 /** pdev_id for identifying the MAC
9808 * See macros starting with WMI_PDEV_ID_ for values.
9809 */
9810 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009811} wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
9812
9813/** TDLS COMMANDS */
9814
9815/* WMI_TDLS_SET_STATE_CMDID */
9816/* TDLS State */
9817enum wmi_tdls_state {
9818 /** TDLS disable */
9819 WMI_TDLS_DISABLE,
9820 /** TDLS enabled - no firmware connection tracking/notifications */
9821 WMI_TDLS_ENABLE_PASSIVE,
9822 /** TDLS enabled - with firmware connection tracking/notifications */
9823 WMI_TDLS_ENABLE_ACTIVE,
9824 /* TDLS enabled - firmware waits for peer mac for connection tracking */
9825 WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +05309826 /** TDLS enabled - TDLS connection tracking is done in host */
9827 WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009828};
9829
9830/* TDLS Options */
9831#define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */
9832#define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */
9833#define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */
9834
9835typedef struct {
9836 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */
9837 A_UINT32 tlv_header;
9838 /** unique id identifying the VDEV */
9839 A_UINT32 vdev_id;
9840 /** Enable/Disable TDLS (wmi_tdls_state) */
9841 A_UINT32 state;
9842 /* Duration (in ms) over which to calculate tx/rx threshold
9843 * to trigger TDLS Discovery
9844 */
9845 A_UINT32 notification_interval_ms;
9846 /** number of packets OVER which notify/suggest TDLS Discovery:
9847 * if current tx pps counter / notification interval >= threshold
9848 * then a notification will be sent to host to advise TDLS Discovery */
9849 A_UINT32 tx_discovery_threshold;
9850 /** number of packets UNDER which notify/suggest TDLS Teardown:
9851 * if current tx pps counter / notification interval < threshold
9852 * then a notification will be sent to host to advise TDLS Tear down */
9853 A_UINT32 tx_teardown_threshold;
9854 /** Absolute RSSI value under which notify/suggest TDLS Teardown */
9855 A_INT32 rssi_teardown_threshold;
9856 /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
9857 A_INT32 rssi_delta;
9858 /** TDLS Option Control
9859 * Off-Channel, Buffer STA, (later)Sleep STA support */
9860 A_UINT32 tdls_options;
9861 /* Buffering time in number of beacon intervals */
9862 A_UINT32 tdls_peer_traffic_ind_window;
9863 /* Wait time for PTR frame */
9864 A_UINT32 tdls_peer_traffic_response_timeout_ms;
9865 /* Self PUAPSD mask */
9866 A_UINT32 tdls_puapsd_mask;
9867 /* Inactivity timeout */
9868 A_UINT32 tdls_puapsd_inactivity_time_ms;
9869 /* Max of rx frame during SP */
9870 A_UINT32 tdls_puapsd_rx_frame_threshold;
9871 /* Duration (in ms) over which to check whether TDLS link
9872 * needs to be torn down
9873 */
9874 A_UINT32 teardown_notification_ms;
9875 /* STA kickout threshold for TDLS peer */
9876 A_UINT32 tdls_peer_kickout_threshold;
9877} wmi_tdls_set_state_cmd_fixed_param;
9878
9879/* WMI_TDLS_PEER_UPDATE_CMDID */
9880
9881enum wmi_tdls_peer_state {
9882 /** tx peer TDLS link setup now starting, traffic to DA should be
9883 * paused (except TDLS frames) until state is moved to CONNECTED (or
9884 * TEARDOWN on setup failure) */
9885 WMI_TDLS_PEER_STATE_PEERING,
9886 /** tx peer TDLS link established, running (all traffic to DA unpaused) */
9887 WMI_TDLS_PEER_STATE_CONNECTED,
9888 /** tx peer TDLS link tear down started (link paused, any frames
9889 * queued for DA will be requeued back through the AP)*/
9890 WMI_TDLS_PEER_STATE_TEARDOWN,
9891 /* Add peer mac into connection table */
9892 WMI_TDLS_PEER_ADD_MAC_ADDR,
9893 /* Remove peer mac from connection table */
9894 WMI_TDLS_PEER_REMOVE_MAC_ADDR,
9895};
9896
9897/* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
9898#define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
9899typedef struct {
9900 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */
9901 A_UINT32 tlv_header;
9902 /* Peer's QoS Info - for U-APSD */
9903 /* AC FLAGS - accessed through macros below */
9904 /* Ack, SP, More Data Ack - accessed through macros below */
9905 A_UINT32 peer_qos;
9906 /*TDLS Peer's U-APSD Buffer STA Support */
9907 A_UINT32 buff_sta_support;
9908 /*TDLS off channel related params */
9909 A_UINT32 off_chan_support;
9910 A_UINT32 peer_curr_operclass;
9911 A_UINT32 self_curr_operclass;
9912 /* Number of channels available for off channel operation */
9913 A_UINT32 peer_chan_len;
9914 A_UINT32 peer_operclass_len;
9915 A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
9916 /* Is peer initiator or responder of TDLS setup request */
9917 A_UINT32 is_peer_responder;
9918 /* Preferred off channel number as configured by user */
9919 A_UINT32 pref_offchan_num;
9920 /* Preferred off channel bandwidth as configured by user */
9921 A_UINT32 pref_offchan_bw;
9922
9923 /** Followed by the variable length TLV peer_chan_list:
9924 * wmi_channel peer_chan_list[].
9925 * Array size would be peer_chan_len.
9926 * This array is intersected channels which is supported by both peer
9927 * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
9928 * FW shall compute BW for an offchan based on peer's ht/vht cap
9929 * received in peer_assoc cmd during change STA operation
9930 */
9931} wmi_tdls_peer_capabilities;
9932
9933#define WMI_TDLS_QOS_VO_FLAG 0
9934#define WMI_TDLS_QOS_VI_FLAG 1
9935#define WMI_TDLS_QOS_BK_FLAG 2
9936#define WMI_TDLS_QOS_BE_FLAG 3
9937#define WMI_TDLS_QOS_ACK_FLAG 4
9938#define WMI_TDLS_QOS_SP_FLAG 5
9939#define WMI_TDLS_QOS_MOREDATA_FLAG 7
9940
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309941#define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009942 (ppeer_caps)->peer_qos |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309943} while (0)
9944#define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009945 (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
9946
9947#define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
9948 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
9949#define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
9950 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
9951#define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
9952 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
9953#define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
9954 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
9955#define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
9956 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
9957#define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
9958 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
9959#define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
9960 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
9961#define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
9962 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
9963#define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
9964 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
9965#define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
9966 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
9967/* SP has 2 bits */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309968#define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009969 (ppeer_caps)->peer_qos |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309970} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009971#define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
9972 (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
9973
9974#define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
9975 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
9976#define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
9977 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
9978
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309979#define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009980 (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309981} while (0)
9982#define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009983 (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
9984
9985#define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
9986 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
9987#define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
9988 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
9989#define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
9990 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
9991#define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
9992 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
9993#define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
9994 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
9995#define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
9996 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
9997#define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
9998 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
9999#define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
10000 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
10001#define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
10002 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
10003#define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
10004 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
10005/* SP has 2 bits */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010006#define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010007 (pset_cmd)->tdls_puapsd_mask |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010008} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010009#define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
10010 (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
10011
10012#define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
10013 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
10014#define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
10015 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
10016
10017typedef struct {
10018 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */
10019 A_UINT32 tlv_header;
10020 /** unique id identifying the VDEV */
10021 A_UINT32 vdev_id;
10022 /** peer MAC address */
10023 wmi_mac_addr peer_macaddr;
10024 /** new TDLS state for peer (wmi_tdls_peer_state) */
10025 A_UINT32 peer_state;
10026 /* The TLV for wmi_tdls_peer_capabilities will follow.
10027 * wmi_tdls_peer_capabilities peer_caps;
10028 */
10029 /** Followed by the variable length TLV chan_info:
10030 * wmi_channel chan_info[] */
10031} wmi_tdls_peer_update_cmd_fixed_param;
10032
10033/* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
10034
10035/* bitmap 20, 40, 80 or 160 MHz wide channel */
10036#define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */
10037#define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */
10038#define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */
10039#define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */
10040
10041enum wmi_tdls_offchan_mode {
10042 WMI_TDLS_ENABLE_OFFCHANNEL,
10043 WMI_TDLS_DISABLE_OFFCHANNEL
10044};
10045
10046typedef struct {
10047 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */
10048 A_UINT32 tlv_header;
10049 /** unique id identifying the VDEV */
10050 A_UINT32 vdev_id;
10051 /** Enable/Disable TDLS offchannel */
10052 A_UINT32 offchan_mode;
10053 /** peer MAC address */
10054 wmi_mac_addr peer_macaddr;
10055 /* Is peer initiator or responder of TDLS setup request */
10056 A_UINT32 is_peer_responder;
10057 /* off channel number */
10058 A_UINT32 offchan_num;
10059 /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
10060 A_UINT32 offchan_bw_bitmap;
10061 /* operating class for offchan */
10062 A_UINT32 offchan_oper_class;
10063} wmi_tdls_set_offchan_mode_cmd_fixed_param;
10064
10065/** TDLS EVENTS */
10066enum wmi_tdls_peer_notification {
10067 /** tdls discovery recommended for peer (based
10068 * on tx bytes per second > tx_discover threshold) */
10069 WMI_TDLS_SHOULD_DISCOVER,
10070 /** tdls link tear down recommended for peer
10071 * due to tx bytes per second below tx_teardown_threshold
10072 * NB: this notification sent once */
10073 WMI_TDLS_SHOULD_TEARDOWN,
10074 /** tx peer TDLS link tear down complete */
10075 WMI_TDLS_PEER_DISCONNECTED,
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +053010076 /** TDLS/BT role change notification for connection tracker */
10077 WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010078};
10079
10080enum wmi_tdls_peer_reason {
10081 /** tdls teardown recommended due to low transmits */
10082 WMI_TDLS_TEARDOWN_REASON_TX,
10083 /** tdls link tear down recommended due to poor RSSI */
10084 WMI_TDLS_TEARDOWN_REASON_RSSI,
10085 /** tdls link tear down recommended due to offchannel scan */
10086 WMI_TDLS_TEARDOWN_REASON_SCAN,
10087 /** tdls peer disconnected due to peer deletion */
10088 WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
10089 /** tdls peer disconnected due to PTR timeout */
10090 WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
10091 /** tdls peer disconnected due wrong PTR format */
10092 WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
10093 /** tdls peer not responding */
10094 WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +053010095 /*
10096 * tdls entered buffer STA role, TDLS connection tracker
10097 * needs to handle this
10098 */
10099 WMI_TDLS_ENTER_BUF_STA,
10100 /*
10101 * tdls exited buffer STA role, TDLS connection tracker
10102 * needs to handle this
10103 */
10104 WMI_TDLS_EXIT_BUF_STA,
10105 /* BT entered busy mode, TDLS connection tracker needs to handle this */
10106 WMI_TDLS_ENTER_BT_BUSY_MODE,
10107 /** BT exited busy mode, TDLS connection tracker needs to handle this */
10108 WMI_TDLS_EXIT_BT_BUSY_MODE,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010109};
10110
10111/* WMI_TDLS_PEER_EVENTID */
10112typedef struct {
10113 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */
10114 A_UINT32 tlv_header;
10115 /** peer MAC address */
10116 wmi_mac_addr peer_macaddr;
10117 /** TDLS peer status (wmi_tdls_peer_notification)*/
10118 A_UINT32 peer_status;
10119 /** TDLS peer reason (wmi_tdls_peer_reason) */
10120 A_UINT32 peer_reason;
10121 /** unique id identifying the VDEV */
10122 A_UINT32 vdev_id;
10123} wmi_tdls_peer_event_fixed_param;
10124
10125/* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
10126 don't use this for any new implementations */
10127typedef struct {
10128 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */
10129 /** unique id identifying the VDEV, generated by the caller */
10130 A_UINT32 vdev_id;
10131 /* New beacon interval to be used for the specified VDEV suggested by firmware */
10132 A_UINT32 new_bcn_intvl;
10133} wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
10134
10135/* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
10136typedef struct {
10137 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
10138 A_UINT32 tlv_header;
10139 /** 1: enable fw based adaptive ocs,
10140 * 0: disable fw based adaptive ocs
10141 */
10142 A_UINT32 enable;
10143 /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
Govind Singh869c9872016-02-22 18:36:34 +053010144 union {
10145 /* OBSOLETE - will be removed once all refs are gone */
10146 A_UINT32 mac_id;
10147 /** pdev_id for identifying the MAC
10148 * See macros starting with WMI_PDEV_ID_ for values.
10149 */
10150 A_UINT32 pdev_id;
10151 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010152} wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
10153
10154/* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
10155typedef struct {
10156 /* Frequency of the channel for which the quota is set */
10157 A_UINT32 chan_mhz;
10158 /* Requested channel time quota expressed as percentage */
10159 A_UINT32 channel_time_quota;
10160} wmi_resmgr_chan_time_quota;
10161
10162typedef struct {
10163 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
10164 A_UINT32 tlv_header;
10165 /** number of channel time quota command structures
10166 * (wmi_resmgr_chan_time_quota) 1 or 2
10167 */
10168 A_UINT32 num_chans;
10169/* This TLV is followed by another TLV of array of bytes
10170 * A_UINT8 data[];
10171 * This data array contains
10172 * num_chans * size of(struct wmi_resmgr_chan_time_quota)
10173 */
10174} wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
10175
10176/* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
10177typedef struct {
10178 /* Frequency of the channel for which the latency is set */
10179 A_UINT32 chan_mhz;
10180 /* Requested channel latency in milliseconds */
10181 A_UINT32 latency;
10182} wmi_resmgr_chan_latency;
10183
10184typedef struct {
10185 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
10186 A_UINT32 tlv_header;
10187 /** number of channel latency command structures
10188 * (wmi_resmgr_chan_latency) 1 or 2
10189 */
10190 A_UINT32 num_chans;
10191/* This TLV is followed by another TLV of array of bytes
10192 * A_UINT8 data[];
10193 * This data array contains
10194 * num_chans * size of(struct wmi_resmgr_chan_latency)
10195 */
10196} wmi_resmgr_set_chan_latency_cmd_fixed_param;
10197
10198/* WMI_STA_SMPS_FORCE_MODE_CMDID */
10199
10200/** STA SMPS Forced Mode */
10201typedef enum {
10202 WMI_SMPS_FORCED_MODE_NONE = 0,
10203 WMI_SMPS_FORCED_MODE_DISABLED,
10204 WMI_SMPS_FORCED_MODE_STATIC,
10205 WMI_SMPS_FORCED_MODE_DYNAMIC
10206} wmi_sta_smps_forced_mode;
10207
10208typedef struct {
10209 /** TLV tag and len; tag equals
10210 * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
10211 A_UINT32 tlv_header;
10212 /** Unique id identifying the VDEV */
10213 A_UINT32 vdev_id;
10214 /** The mode of SMPS that is to be forced in the FW. */
10215 A_UINT32 forced_mode;
10216} wmi_sta_smps_force_mode_cmd_fixed_param;
10217
10218/** wlan HB commands */
10219#define WMI_WLAN_HB_ITEM_UDP 0x1
10220#define WMI_WLAN_HB_ITEM_TCP 0x2
10221#define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE, must be a multiple of 4 bytes */
10222
10223typedef struct {
10224 /** TLV tag and len; tag equals
10225 * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
10226 A_UINT32 tlv_header;
10227 A_UINT32 vdev_id;
10228 A_UINT32 enable;
10229 A_UINT32 item;
10230 A_UINT32 session;
10231} wmi_hb_set_enable_cmd_fixed_param;
10232
10233typedef struct {
10234 /** TLV tag and len; tag equals
10235 * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
10236 A_UINT32 tlv_header;
10237 A_UINT32 vdev_id;
10238 A_UINT32 srv_ip;
10239 A_UINT32 dev_ip;
10240 A_UINT32 seq;
10241 A_UINT32 src_port;
10242 A_UINT32 dst_port;
10243 A_UINT32 interval;
10244 A_UINT32 timeout;
10245 A_UINT32 session;
10246 wmi_mac_addr gateway_mac;
10247} wmi_hb_set_tcp_params_cmd_fixed_param;
10248
10249typedef struct {
10250 /** TLV tag and len; tag equals
10251 * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
10252 A_UINT32 tlv_header;
10253 A_UINT32 vdev_id;
10254 A_UINT32 length;
10255 A_UINT32 offset;
10256 A_UINT32 session;
10257 A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
10258} wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
10259
10260typedef struct {
10261 /** TLV tag and len; tag equals
10262 * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
10263 A_UINT32 tlv_header;
10264 A_UINT32 vdev_id;
10265 A_UINT32 srv_ip;
10266 A_UINT32 dev_ip;
10267 A_UINT32 src_port;
10268 A_UINT32 dst_port;
10269 A_UINT32 interval;
10270 A_UINT32 timeout;
10271 A_UINT32 session;
10272 wmi_mac_addr gateway_mac;
10273} wmi_hb_set_udp_params_cmd_fixed_param;
10274
10275typedef struct {
10276 /** TLV tag and len; tag equals
10277 * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
10278 A_UINT32 tlv_header;
10279 A_UINT32 vdev_id;
10280 A_UINT32 length;
10281 A_UINT32 offset;
10282 A_UINT32 session;
10283 A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
10284} wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
10285
10286/** wlan HB events */
10287typedef enum {
10288 WMI_WLAN_HB_REASON_UNKNOWN = 0,
10289 WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1,
10290 WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2,
10291} WMI_HB_WAKEUP_REASON;
10292
10293typedef struct {
10294 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
10295 A_UINT32 vdev_id; /* unique id identifying the VDEV */
10296 A_UINT32 session; /* Session ID from driver */
10297 A_UINT32 reason; /* wakeup reason */
10298} wmi_hb_ind_event_fixed_param;
10299
10300/** WMI_STA_SMPS_PARAM_CMDID */
10301typedef enum {
10302 /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
10303 WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
10304 /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
10305 * to enter D-SMPS mode from Stalled-D-SMPS mode */
10306 WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
10307 /** RSSI threshold to disable SMPS modes */
10308 WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
10309 /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
10310 WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
10311 /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
10312 WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
10313 /** Enable/Disable DTIM 1chRx feature */
10314 WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5
10315} wmi_sta_smps_param;
10316
10317typedef struct {
10318 /** TLV tag and len; tag equals
10319 * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
10320 A_UINT32 tlv_header;
10321 /** Unique id identifying the VDEV */
10322 A_UINT32 vdev_id;
10323 /** SMPS parameter (see wmi_sta_smps_param) */
10324 A_UINT32 param;
10325 /** Value of SMPS parameter */
10326 A_UINT32 value;
10327} wmi_sta_smps_param_cmd_fixed_param;
10328
10329typedef struct {
10330 /** TLV tag and len; tag equals
10331 * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
10332 A_UINT32 tlv_header;
10333 /* TX stats */
10334 A_UINT32 txBytesPushed;
10335 A_UINT32 txPacketsPushed;
10336 /* RX stats */
10337 A_UINT32 rxBytesRcvd;
10338 A_UINT32 rxPacketsRcvd;
10339 A_UINT32 rxTimeTotal;
10340 /** peer MAC address */
10341 wmi_mac_addr peer_macaddr;
10342} wmi_mcc_sched_sta_traffic_stats;
10343
10344typedef struct {
10345 /** TLV tag and len; tag equals
10346 * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
10347 A_UINT32 tlv_header;
10348 /** Duration over which the host stats were collected */
10349 A_UINT32 duration;
10350 /** Number of stations filled in following stats array */
10351 A_UINT32 num_sta;
10352 /* Following this struct are the TLVs:
10353 * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
10354 */
10355} wmi_mcc_sched_traffic_stats_cmd_fixed_param;
10356
10357typedef struct {
10358 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
10359 /* unique id identifying the VDEV, generated by the caller */
10360 A_UINT32 vdev_id;
10361 /*Batch scan enable command parameters */
10362 A_UINT32 scanInterval;
10363 A_UINT32 numScan2Batch;
10364 A_UINT32 bestNetworks;
10365 A_UINT32 rfBand;
10366 A_UINT32 rtt;
10367} wmi_batch_scan_enable_cmd_fixed_param;
10368
10369typedef struct {
10370 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */
10371 A_UINT32 supportedMscan;
10372} wmi_batch_scan_enabled_event_fixed_param;
10373
10374typedef struct {
10375 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
10376/* unique id identifying the VDEV, generated by the caller */
10377 A_UINT32 vdev_id;
10378 A_UINT32 param;
10379} wmi_batch_scan_disable_cmd_fixed_param;
10380
10381typedef struct {
10382 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
10383 /** unique id identifying the VDEV, generated by the caller */
10384 A_UINT32 vdev_id;
10385 A_UINT32 param;
10386} wmi_batch_scan_trigger_result_cmd_fixed_param;
10387
10388typedef struct {
10389 A_UINT32 tlv_header;
10390 wmi_mac_addr bssid; /* BSSID */
10391 wmi_ssid ssid; /* SSID */
10392 A_UINT32 ch; /* Channel */
10393 A_UINT32 rssi; /* RSSI or Level */
10394 /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
10395 A_UINT32 timestamp;
10396} wmi_batch_scan_result_network_info;
10397
10398typedef struct {
10399 A_UINT32 tlv_header;
10400 A_UINT32 scanId; /* Scan List ID. */
10401 /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
10402 A_UINT32 numNetworksInScanList;
10403 A_UINT32 netWorkStartIndex; /* indicate the start index of network info */
10404} wmi_batch_scan_result_scan_list;
10405
10406#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.*/
10407#define LPI_IE_BITMAP_IS_PROBE 0x00000002 /*send true or false based on scan response frame being a Probe Rsp or not*/
10408#define LPI_IE_BITMAP_SSID 0x00000004 /*send ssid from received scan response frame*/
10409#define LPI_IE_BITMAP_RSSI 0x00000008 /* end RSSI value reported by HW for the received scan response after adjusting with noise floor*/
10410#define LPI_IE_BITMAP_CHAN 0x00000010 /*send channel number from the received scan response*/
10411#define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* sen Tx power from TPC IE of scan rsp*/
10412#define LPI_IE_BITMAP_TX_RATE 0x00000040 /*send rate of the received frame as reported by HW.*/
10413#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.*/
10414#define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /*send timestamp reported in the received scan rsp frame.*/
10415#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.*/
10416/*
10417 * TEMPORARY alias of incorrect old name the correct name.
10418 * This alias will be removed once all references to the old name have been fixed.
10419 */
10420#define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
10421#define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false.*/
10422#define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP*/
10423#define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled*/
10424#define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device.*/
10425#define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel*/
10426#define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received.*/
10427#define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz*/
10428#define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above*/
10429#define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations*/
10430#define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan*/
10431#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.*/
10432#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*/
10433#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 +053010434/*
10435 * extscan will use this field to indicate to
10436 * LOWI LP whether to report result to context hub or not
10437 */
10438#define LPI_IE_BITMAP_REPORT_CONTEXT_HUB 0x00800000
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010439#define LPI_IE_BITMAP_ALL 0xFFFFFFFF
10440
10441typedef struct {
10442 A_UINT32 tlv_header;
10443 /**A_BOOL indicates LPI mgmt snooping enable/disable*/
10444 A_UINT32 enable;
10445 /**LPI snooping mode*/
10446 A_UINT32 snooping_mode;
10447 /** LPI interested IEs in snooping context */
10448 A_UINT32 ie_bitmap;
10449} wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
10450
10451typedef struct {
10452 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
10453 /** Scan ID */
10454 A_UINT32 scan_id;
10455 /** Scan requestor ID */
10456 A_UINT32 scan_req_id;
10457 /** VDEV id(interface) that is requesting scan */
10458 A_UINT32 vdev_id;
10459 /** LPI interested IEs in scan context */
10460 A_UINT32 ie_bitmap;
10461 /** Scan Priority, input to scan scheduler */
10462 A_UINT32 scan_priority;
10463 /** dwell time in msec on active channels */
10464 A_UINT32 dwell_time_active;
10465 /** dwell time in msec on passive channels */
10466 A_UINT32 dwell_time_passive;
10467 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
10468 A_UINT32 min_rest_time;
10469 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
10470 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
10471 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
10472 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
10473 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
10474 * irrespective of activity. activity is determined by the idle_time parameter.
10475 */
10476 A_UINT32 max_rest_time;
10477 /** time before sending next set of probe requests.
10478 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
10479 * The number of probe requests specified depends on the ssid_list and bssid_list
10480 */
10481 A_UINT32 repeat_probe_time;
10482 /** time in msec between 2 consequetive probe requests with in a set. */
10483 A_UINT32 probe_spacing_time;
10484 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
10485 A_UINT32 idle_time;
10486 /** maximum time in msec allowed for scan */
10487 A_UINT32 max_scan_time;
10488 /** delay in msec before sending first probe request after switching to a channel */
10489 A_UINT32 probe_delay;
10490 /** Scan control flags */
10491 A_UINT32 scan_ctrl_flags;
10492 /** Burst duration time in msec*/
10493 A_UINT32 burst_duration;
10494
10495 /** # if channels to scan. In the TLV channel_list[] */
10496 A_UINT32 num_chan;
10497 /** number of bssids. In the TLV bssid_list[] */
10498 A_UINT32 num_bssid;
10499 /** number of ssid. In the TLV ssid_list[] */
10500 A_UINT32 num_ssids;
10501 /** number of bytes in ie data. In the TLV ie_data[] */
10502 A_UINT32 ie_len;
10503
10504/**
10505 * TLV (tag length value ) parameters follow the scan_cmd
10506 * structure. The TLV's are:
10507 * A_UINT32 channel_list[];
10508 * wmi_ssid ssid_list[];
10509 * wmi_mac_addr bssid_list[];
10510 * A_UINT8 ie_data[];
10511 */
10512} wmi_lpi_start_scan_cmd_fixed_param;
10513
10514typedef struct {
10515 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
10516 /** Scan requestor ID */
10517 A_UINT32 scan_req_id;
10518 /** Scan ID */
10519 A_UINT32 scan_id;
10520 /**
10521 * Req Type
10522 * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
10523 * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
10524 * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
10525 * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
10526 */
10527 A_UINT32 req_type;
10528 /**
10529 * vDev ID
10530 * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
10531 */
10532 A_UINT32 vdev_id;
10533} wmi_lpi_stop_scan_cmd_fixed_param;
10534
10535typedef enum {
10536 WMI_LPI_DEVICE_TYPE_AP = 1,
10537 WMI_LPI_DEVICE_TYPE_P2P = 2,
10538 WMI_LPI_DEVICE_TYPE_NAN = 3,
10539} wmi_lpi_device_type;
10540
10541typedef struct {
10542 A_UINT32 tlv_header;
10543 /** Scan requestor ID */
10544 A_UINT32 scan_req_id;
10545 A_UINT32 ie_bitmap;
10546 A_UINT32 data_len;
10547} wmi_lpi_result_event_fixed_param;
10548
10549typedef enum {
10550 /** User scan Request completed */
10551 WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
10552 /** User Request was never serviced */
10553 WMI_LPI_STATUS_DROPPED_REQ = 1,
10554 /** Illegal channel Req */
10555 WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
10556 /** Illegal Operation Req */
10557 WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
10558 /** Request Aborted */
10559 WMI_LPI_STATUS_REQ_ABORTED = 4,
10560 /** Request Timed Out */
10561 WMI_LPI_STATUS_REQ_TIME_OUT = 5,
10562 /** Medium Busy, already there
10563 * is a scan is going on */
10564 WMI_LPI_STATUS_MEDIUM_BUSY = 6,
10565 /* Extscan is the scan client whose scan complete event is triggered */
10566 WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
10567} wmi_lpi_staus;
10568
10569typedef struct {
10570 A_UINT32 tlv_header;
10571 wmi_lpi_staus status;
10572 /** Scan requestor ID */
10573 A_UINT32 scan_req_id;
10574} wmi_lpi_status_event_fixed_param;
10575
10576typedef struct {
10577 A_UINT32 tlv_header;
10578 wmi_mac_addr bssid;
10579 wmi_ssid ssid;
10580 A_UINT32 freq;
10581 A_UINT32 rssi;
10582 A_UINT32 vdev_id;
10583} wmi_lpi_handoff_event_fixed_param;
10584
10585typedef struct {
10586 A_UINT32 tlv_header;
10587 A_UINT32 timestamp; /*timestamp of batch scan event */
10588 A_UINT32 numScanLists; /*number of scan in this event */
10589 A_UINT32 isLastResult; /*is this event a last event of the whole batch scan */
10590} wmi_batch_scan_result_event_fixed_param;
10591
10592typedef struct {
10593 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */
10594 A_UINT32 vdev_id;
10595 /* This TLV is followed by p2p_noa_info for vdev :
10596 * wmi_p2p_noa_info p2p_noa_info;
10597 */
10598} wmi_p2p_noa_event_fixed_param;
10599
10600#define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6
10601#define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1
10602
10603#define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0
10604#define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f
10605
10606#define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7
10607#define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf
10608
10609typedef struct {
10610 /** TLV tag and len; tag equals
10611 * */
10612 A_UINT32 tlv_header;
10613 /** gpip pin number */
10614 A_UINT32 gpio_pin_num;
10615 /** gpio interupt type */
10616 A_UINT32 int_type;
10617 /** RF radio status */
10618 A_UINT32 radio_state;
10619} wmi_rfkill_mode_param;
10620
10621typedef enum {
10622 WMI_SET_LED_SYS_POWEROFF,
10623 WMI_SET_LED_SYS_S3_SUSPEND,
10624 WMI_SET_LED_SYS_S4_S5,
10625 WMI_SET_LED_SYS_DRIVER_DISABLE,
10626 WMI_SET_LED_SYS_WAKEUP,
10627 WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
10628 WMI_SET_LED_SYS_POWERON,
10629} wmi_led_sys_state_param;
10630
10631typedef enum {
10632 WMI_CONFIG_LED_TO_VDD = 0,
10633 WMI_CONFIG_LED_TO_GND = 1,
10634} wmi_config_led_connect_type;
10635
10636typedef enum {
10637 WMI_CONFIG_LED_NOT_WITH_BT = 0,
10638 WMI_CONFIG_LED_WITH_BT = 1,
10639} wmi_config_led_with_bt_flag;
10640
10641typedef enum {
10642 WMI_CONFIG_LED_DISABLE = 0,
10643 WMI_CONFIG_LED_ENABLE = 1,
10644} wmi_config_led_enable_flag;
10645
Sreelakshmi Konamkif9bde842016-03-03 19:03:02 +053010646typedef enum {
10647 WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0,
10648 WMI_CONFIG_LED_HIGH_OFF = 1,
10649 WMI_CONFIG_LED_HIGH_ON = 2,
10650} wmi_config_led_on_flag;
10651
10652typedef enum {
10653 WMI_CONFIG_LED_UNSPECIFIED = 0,
10654 WMI_CONFIG_LED_ON = 1,
10655 WMI_CONFIG_LED_OFF = 2,
10656 WMI_CONFIG_LED_DIM = 3,
10657 WMI_CONFIG_LED_BLINK = 4,
10658 WMI_CONFIG_LED_TXRX = 5,
10659} wmi_config_led_operation_type;
10660
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010661typedef struct {
10662 /** TLV tag and len; tag equals
Govind Singh869c9872016-02-22 18:36:34 +053010663 * WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010664 A_UINT32 tlv_header;
10665 /* Set GPIO pin */
10666 A_UINT32 led_gpio_pin;
10667 /* Set connect type defined in wmi_config_led_connect_type */
10668 A_UINT32 connect_type;
10669 /* Set flag defined in wmi_config_led_with_bt_flag */
10670 A_UINT32 with_bt;
10671 /* Set LED enablement defined in wmi_config_led_enable_flag */
10672 A_UINT32 led_enable;
Govind Singh869c9872016-02-22 18:36:34 +053010673 /** pdev_id for identifying the MAC
10674 * See macros starting with WMI_PDEV_ID_ for values.
10675 */
10676 A_UINT32 pdev_id;
Sreelakshmi Konamkif9bde842016-03-03 19:03:02 +053010677 /* see wmi_config_led_operation_type enum */
10678 A_UINT32 led_operation_type;
10679 /* see wmi_config_led_on_flag enum */
10680 A_UINT32 led_on_flag; /* configure high/low on/off sense */
10681 A_UINT32 led_on_interval; /* for blink function; unit: ms */
10682 A_UINT32 led_off_interval; /* for blink function; unit: ms */
10683 A_UINT32 led_repeat_cnt; /* for blink function: how many blinks */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010684} wmi_pdev_set_led_config_cmd_fixed_param;
10685
10686#define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
10687#define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff
10688
10689/** WMI_PEER_INFO_REQ_CMDID
10690 * Request FW to provide peer info */
10691typedef struct {
10692 /** TLV tag and len; tag equals
10693 * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
10694 A_UINT32 tlv_header;
10695 /** In order to get the peer info for a single peer, host shall
10696 * issue the peer_mac_address of that peer. For getting the
10697 * info all peers, the host shall issue 0xFFFFFFFF as the mac
10698 * address. The firmware will return the peer info for all the
10699 * peers on the specified vdev_id */
10700 wmi_mac_addr peer_mac_address;
10701 /** vdev id */
10702 A_UINT32 vdev_id;
10703} wmi_peer_info_req_cmd_fixed_param;
10704
10705typedef struct {
10706 /** TLV tag and len; tag equals
10707 * WMITLV_TAG_STRUC_wmi_peer_info */
10708 A_UINT32 tlv_header;
10709 /** mac addr of the peer */
10710 wmi_mac_addr peer_mac_address;
10711 /** data_rate of the peer */
10712 A_UINT32 data_rate;
10713 /** rssi of the peer */
10714 A_UINT32 rssi;
10715 /** tx fail count */
10716 A_UINT32 tx_fail_cnt;
10717} wmi_peer_info;
10718
10719/** FW response with the peer info */
10720typedef struct {
10721 /** TLV tag and len; tag equals
10722 * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */
10723 A_UINT32 tlv_header;
10724 /** number of peers in peer_info */
10725 A_UINT32 num_peers;
Govind Singh869c9872016-02-22 18:36:34 +053010726 /* Set to 1 only if vdev_id field is valid */
10727 A_UINT32 valid_vdev_id;
10728 /* VDEV to which the peer belongs to */
10729 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010730 /* This TLV is followed by another TLV of array of structs
10731 * wmi_peer_info peer_info[];
10732 */
10733} wmi_peer_info_event_fixed_param;
10734
10735/** FW response when tx failure count has reached threshold
10736 * for a peer */
10737typedef struct {
10738 /** TLV tag and len; tag equals
10739 * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
10740 A_UINT32 tlv_header;
10741 /** vdev id*/
10742 A_UINT32 vdev_id;
10743 /** mac address */
10744 wmi_mac_addr peer_mac_address;
10745 /** tx failure count- will eventually be removed and not used * */
10746 A_UINT32 tx_fail_cnt;
10747 /** seq number of the nth tx_fail_event */
10748 A_UINT32 seq_no;
10749} wmi_peer_tx_fail_cnt_thr_event_fixed_param;
10750
10751enum wmi_rmc_mode {
10752 /** Disable RMC */
10753 WMI_RMC_MODE_DISABLED = 0,
10754 /** Enable RMC */
10755 WMI_RMC_MODE_ENABLED = 1,
10756};
10757
10758/** Enable RMC transmitter functionality. Upon
10759 * receiving this, the FW shall mutlicast frames with
10760 * reliablity. This is a vendor
10761 * proprietary feature. */
10762typedef struct {
10763 /** TLV tag and len; tag equals
10764 * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */
10765 A_UINT32 tlv_header;
10766 /** vdev id*/
10767 A_UINT32 vdev_id;
10768 /** enable_rmc contains values from enum wmi_rmc_mode;
10769 * Default value: 0 (disabled) */
10770 A_UINT32 enable_rmc;
10771} wmi_rmc_set_mode_cmd_fixed_param;
10772
10773/** Configure transmission periodicity of action frames in a
10774 * RMC network for the multicast transmitter */
10775typedef struct {
10776 /** TLV tag and len; tag equals
10777 * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
10778 A_UINT32 tlv_header;
10779 /** vdev id */
10780 A_UINT32 vdev_id;
10781 /** time period in milliseconds. Default: 300 ms.
10782 An action frame indicating the current leader is transmitted by the
10783 RMC transmitter once every 'periodity_msec' */
10784 A_UINT32 periodicity_msec;
10785} wmi_rmc_set_action_period_cmd_fixed_param;
10786
10787/** Optimise Leader selection process in RMC functionality. For
10788 * Enhancement/Debug purposes only */
10789typedef struct {
10790 /** TLV tag and len; tag equals
10791 * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */
10792 A_UINT32 tlv_header;
10793 /** vdev id */
10794 A_UINT32 vdev_id;
10795 /** flags ::
10796 * 0x0001 - Enable beacon averaging
10797 * 0x0002 - Force leader selection
10798 * 0x0004 - Enable Timer based leader switch
10799 * 0x0008 - Use qos/NULL based for multicast reliability */
10800 A_UINT32 flags;
10801 /** control leader change timeperiod (in seconds) */
10802 A_UINT32 peridocity_leader_switch;
10803 /** control activity timeout value for data rx (in seconds) */
10804 A_UINT32 data_activity_timeout;
10805 /** mac address of leader */
10806 wmi_mac_addr forced_leader_mac_addr;
10807} wmi_rmc_config_cmd_fixed_param;
10808
10809/** MHF is generally implemented in
10810 * the kernel. To decrease system power consumption, the
10811 * driver can enable offloading this to the chipset. In
10812 * order for the offload, the firmware needs the routing table.
10813 * The host shall plumb the routing table into FW. The firmware
10814 * shall perform an IP address lookup and forward the packet to
10815 * the next hop using next hop's mac address. This is a vendor
10816 * proprietary feature. */
10817enum wmi_mhf_ofl_mode {
10818 /** Disable MHF offload */
10819 WMI_MHF_OFL_MODE_DISABLED = 0,
10820 /** Enable MHF offload */
10821 WMI_MHF_OFL_MODE_ENABLED = 1,
10822};
10823
10824typedef struct {
10825 /** TLV tag and len; tag equals
10826 * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
10827 A_UINT32 tlv_header;
10828 /** vdev id*/
10829 A_UINT32 vdev_id;
10830 /** enable_mhf_ofl contains values from enum
10831 * wmi_mhf_ofl_mode; Default value: 0 (disabled) */
10832 A_UINT32 enable_mhf_ofl;
10833} wmi_mhf_offload_set_mode_cmd_fixed_param;
10834
10835enum wmi_mhf_ofl_table_action {
10836 /** Create forwarding offload table in FW */
10837 WMI_MHF_OFL_TBL_CREATE = 0,
10838 /** Append to existing MHF offload table */
10839 WMI_MHF_OFL_TBL_APPEND = 1,
10840 /** Flush entire MHF offload table in FW */
10841 WMI_MHF_OFL_TBL_FLUSH = 2,
10842};
10843
10844typedef struct {
10845 /** TLV tag and len; tag equals
10846 * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
10847 A_UINT32 tlv_header;
10848 /** vdev id*/
10849 A_UINT32 vdev_id;
10850 /** action corresponds to values from enum
10851 * wmi_mhf_ofl_table_action */
10852 A_UINT32 action;
10853 /** number of entries in the table */
10854 A_UINT32 num_entries;
10855/** Followed by the variable length TLV
10856 * wmi_mhf_offload_routing_table_entry entries[] */
10857} wmi_mhf_offload_plumb_routing_table_cmd;
10858
10859typedef struct {
10860 /** TLV tag and len; tag equals
10861 * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
10862 A_UINT32 tlv_header;
10863 /** Destination node's IP address */
10864 WMI_IPV4_ADDR dest_ipv4_addr;
10865 /** Next hop node's MAC address */
10866 wmi_mac_addr next_hop_mac_addr;
10867} wmi_mhf_offload_routing_table_entry;
10868
10869typedef struct {
10870 /** tlv tag and len, tag equals
10871 * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
10872 A_UINT32 tlv_header;
10873
10874 /** full 64 tsf timestamp get from MAC tsf timer indicates
10875 * the time that the radar event uploading to host, split
10876 * it to high 32 bit and lower 32 bit in fulltsf_high and
10877 * full_tsf_low
10878 */
10879 A_UINT32 upload_fullts_low;
10880 A_UINT32 upload_fullts_high;
10881
10882 /** timestamp indicates the time when DFS pulse is detected
10883 * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
10884 */
10885 A_UINT32 pulse_detect_ts;
10886
10887 /** the duaration of the pulse in us */
10888 A_UINT32 pulse_duration;
10889
10890 /** the center frequency of the radar pulse detected, KHz */
10891 A_UINT32 pulse_center_freq;
10892
10893 /** bandwidth of current DFS channel, MHz */
10894 A_UINT32 ch_bandwidth;
10895
10896 /** center channel frequency1 of current DFS channel, MHz */
10897 A_UINT16 ch_center_freq1;
10898
10899 /** center channel frequency2 of current DFS channel, MHz,
10900 * reserved for 160 BW mode
10901 */
10902 A_UINT16 ch_center_freq2;
10903
10904 /** flag to indicate if this pulse is chirp */
10905 A_UINT8 pulse_is_chirp;
10906
10907 /** RSSI recorded in the ppdu */
10908 A_UINT8 rssi;
10909
10910 /** extened RSSI info */
10911 A_UINT8 rssi_ext;
10912
10913 /** For 4-byte aligment padding */
10914 A_UINT8 reserved;
10915
Govind Singh869c9872016-02-22 18:36:34 +053010916 union {
10917 /* OBSOLETE - will be removed once all refs are gone */
10918 A_UINT8 pmac_id;
10919 /** pdev_id for identifying the MAC
10920 * See macros starting with WMI_PDEV_ID_ for values.
10921 */
10922 A_UINT8 pdev_id;
10923 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010924
10925 /** index of peak magnitude bin (signed) */
10926 A_INT32 peak_sidx;
10927
10928} wmi_dfs_radar_event_fixed_param;
10929
10930typedef struct {
10931 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */
10932
10933 /*Thermal thresholds */
10934 A_UINT32 lower_thresh_degreeC; /* in degree C */
10935 A_UINT32 upper_thresh_degreeC; /* in degree C */
10936
10937 /*Enable/Disable Thermal Monitoring for Mitigation */
10938 A_UINT32 enable;
10939} wmi_thermal_mgmt_cmd_fixed_param;
10940
10941typedef struct {
10942 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */
10943
10944 A_UINT32 temperature_degreeC; /* temperature in degree C */
10945} wmi_thermal_mgmt_event_fixed_param;
10946
10947/**
10948 * This command is sent from WLAN host driver to firmware to
10949 * request firmware to configure auto shutdown timer in fw
10950 * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
10951 */
10952typedef struct {
10953 A_UINT32 tlv_header;
10954 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */
10955 A_UINT32 timer_value;
10956 /** timer value; 0=disable */
10957} wmi_host_auto_shutdown_cfg_cmd_fixed_param;
10958
10959enum wmi_host_auto_shutdown_reason {
10960 WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
10961 WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
10962 WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
10963};
10964
10965/* WMI_HOST_AUTO_SHUTDOWN_EVENTID */
10966typedef struct {
10967 A_UINT32 tlv_header;
10968 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */
10969 A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
10970} wmi_host_auto_shutdown_event_fixed_param;
10971
10972/** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
10973 * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
10974 * This command is only used by some customer for verification test. It is not for end-user.
10975 *
10976 * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
10977 *
10978 * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
10979 * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condtion only. When multiple
10980 * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
10981 * <channel, ack_offset> pair is unique.
10982 *
10983 * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
10984 * called basic_config_info by bitmap
10985 * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
10986 *
10987 * '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
10988 * is ignored.
10989 * disable will remove preious conditions from FW.
10990 * conditions from the later command will over write conditions stored from a previous command.
10991 *
10992 */
10993
10994#define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */
10995#define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */
10996#define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */
10997#define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */
10998
10999#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */
11000#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */
11001#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */
11002#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */
11003
11004#define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */
11005#define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */
11006#define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */
11007#define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */
11008
11009#define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */
11010#define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */
11011
11012#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */
11013#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */
11014#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */
11015#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */
11016#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */
11017#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */
11018#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */
11019#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */
11020
11021#define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */
11022#define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */
11023
11024#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */
11025#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */
11026
11027#define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */
11028#define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */
11029
11030/** Bit map definition for basic_config_info starts */
11031#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0
11032#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011033#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
11034#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 -080011035
11036#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5
11037#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011038#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
11039#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 -080011040
11041#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10
11042#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011043#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
11044#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 -080011045
11046#define WMI_TPC_CHAINMASK_CONFIG_BT_S 12
11047#define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011048#define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BT)
11049#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 -080011050
11051#define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14
11052#define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011053#define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STBC)
11054#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 -080011055
11056#define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16
11057#define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011058#define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BAND)
11059#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 -080011060
11061#define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17
11062#define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011063#define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STREAM)
11064#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 -080011065
11066#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18
11067#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011068#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
11069#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 -080011070
11071#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21
11072/*
11073 * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
11074 * is temporarily maintained as an alias for the correct name
11075 * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
11076 */
11077#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
11078#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011079#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
11080#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 -080011081
11082#define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22
11083/*
11084 * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
11085 * is temporarily maintained as an alias for the correct name
11086 * (WMI_TPC_CHAINMASK_CONFIG_RATE)
11087 */
11088#define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
11089#define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
11090#define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011091#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 -080011092
11093/** Bit map definition for basic_config_info ends */
11094
11095typedef struct {
11096 A_UINT32 tlv_header;
11097 /** Basic condition defined as bit map above, bitmap is chosen to save memory.
11098 * Bit0 ~ Bit4: tpc offset which will be adjusted if condtion matches, the unit is 0.5dB. bit4 indicates signed
11099 * Bit5 ~ Bit9: ack offset which will be adjusted if condtion matches, the unit is 0.5dB. bit9 indicates signed
11100 * 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
11101 * 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
11102 * 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
11103 * Bit16 : band condition b'0: 2G, b'1: 5G
11104 * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams
11105 * 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
11106 * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
11107 * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
11108 * Bit23 ~ Bit31: reserved
11109 */
11110 A_UINT32 basic_config_info;
11111
11112 /** channel mapping bit rule: The lower bit corresponds with smaller channel.
11113 * it depends on Bit14 of basic_config_info
11114 * Total 24 channels for 5G
11115 * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
11116 * Total 14 channels for 2G
11117 * 1 ~ 14
11118 */
11119 A_UINT32 channel;
11120
11121 /** rate mapping bit rule: The lower bit corresponds with lower rate.
11122 * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
11123 * Legacy rates , 11b, 11g, 11A
11124 * 11n one stream ( ht20, ht40 ) 8+8
11125 * 11n two streams ( ht20, ht40 ) 8+8
11126 * 11ac one stream ( vht20, vht40, vht80 ) 10+10+10
11127 * 11ac two streams (vht20, vht40, vht80 ) 10+10+10
11128 */
11129 A_UINT32 rate0;
11130 /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
11131 * 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
11132 */
11133
11134 /** 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
11135 */
11136 A_UINT32 rate1;
11137} wmi_tpc_chainmask_config;
11138
11139#define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/
11140#define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/
11141
11142typedef struct {
11143 A_UINT32 tlv_header;
11144 A_UINT32 enable;
11145 /** enable to set tpc & chainmask when condtions meet, 0: disabled, 1: enabled. */
11146 A_UINT32 num_tpc_chainmask_configs;
11147 /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */
11148} wmi_tpc_chainmask_config_cmd_fixed_param;
11149
11150typedef struct {
11151 A_UINT32 tlv_header;
11152 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
11153 A_UINT32 data_len;
11154 /** length in byte of data[]. */
11155 /* This structure is used to send REQ binary blobs
11156 * from application/service to firmware where Host drv is pass through .
11157 * Following this structure is the TLV:
11158 * A_UINT8 data[]; // length in byte given by field data_len.
11159 */
11160} wmi_nan_cmd_param;
11161
11162typedef struct {
11163 A_UINT32 tlv_header;
11164 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
11165 A_UINT32 data_len;
11166 /** length in byte of data[]. */
11167 /* This structure is used to send REQ binary blobs
11168 * from firmware to application/service where Host drv is pass through .
11169 * Following this structure is the TLV:
11170 * A_UINT8 data[]; // length in byte given by field data_len.
11171 */
11172} wmi_nan_event_hdr;
11173
Govind Singh941bd5e2016-02-04 17:15:25 +053011174/**
11175 * Event to indicate NAN discovery interface created
11176 */
11177typedef struct {
11178 /*
11179 * TLV tag and len; tag equals
11180 * WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param
11181 */
11182 A_UINT32 tlv_header;
11183 /** Unique id identifying the VDEV */
11184 A_UINT32 vdev_id;
11185 /** NAN interface MAC address */
11186 wmi_mac_addr nan_interface_macaddr;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011187} wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE;
11188
11189#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 +053011190
11191/**
11192 * Event to indicate NAN discovery interface deleted
11193 */
11194typedef struct {
11195 /*
11196 * TLV tag and len; tag equals
11197 * WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param
11198 */
11199 A_UINT32 tlv_header;
11200 /** Unique id identifying the VDEV */
11201 A_UINT32 vdev_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011202} wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE;
11203
11204#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 +053011205
11206/**
11207 * Event to indicate NAN device started new cluster
11208 */
11209typedef struct {
11210 /*
11211 * TLV tag and len; tag equals
11212 * WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param
11213 */
11214 A_UINT32 tlv_header;
11215 /** Unique id identifying the VDEV */
11216 A_UINT32 vdev_id;
11217 /** NAN Cluster ID */
11218 A_UINT32 nan_cluster_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011219} wmi_nan_started_cluster_event_fixed_param_PROTOTYPE;
11220
11221#define wmi_nan_started_cluster_event_fixed_param wmi_nan_started_cluster_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011222
11223/**
11224 * Event to indicate NAN device joined to cluster
11225 */
11226typedef struct {
11227 /*
11228 * TLV tag and len; tag equals
11229 * WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param
11230 */
11231 A_UINT32 tlv_header;
11232 /** Unique id identifying the VDEV */
11233 A_UINT32 vdev_id;
11234 /** NAN Cluster ID */
11235 A_UINT32 nan_cluster_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011236} wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE;
11237
11238#define wmi_nan_joined_cluster_event_fixed_param wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011239
11240/** NAN DATA CMD's */
11241
11242/**
11243 * NAN Data get capabilities req
11244 */
11245typedef struct {
11246 /*
11247 * TLV tag and len; tag equals
11248 * WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param
11249 */
11250 A_UINT32 tlv_header;
11251 /** unique id generated in upper layer for the transaction */
11252 A_UINT32 transaction_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011253} wmi_ndi_get_cap_req_fixed_param_PROTOTYPE;
Govind Singh941bd5e2016-02-04 17:15:25 +053011254
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011255#define wmi_ndi_get_cap_req_fixed_param wmi_ndi_get_cap_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011256
11257/**
11258 * NDP Response code
11259 */
11260typedef enum {
11261 NDP_RSP_CODE_REQUEST_ACCEPT = 0x00,
11262 NDP_RSP_CODE_REQUEST_REJECT = 0x01,
11263 NDP_RSP_CODE_REQUEST_DEFER = 0x02,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011264} wmi_ndp_rsp_code_PROTOTYPE;
11265
11266#define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011267
11268/**
11269 * NDP Initiator requesting a data session
11270 */
11271typedef struct {
11272 /*
11273 * TLV tag and len; tag equals
11274 * WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param
11275 */
11276 A_UINT32 tlv_header;
11277 /** Unique id identifying the VDEV */
11278 A_UINT32 vdev_id;
11279 /** unique id generated in upper layer for the transaction */
11280 A_UINT32 transaction_id;
11281 /** Unique Instance Id identifying the Responder's service */
11282 A_UINT32 service_instance_id;
11283 /** Discovery MAC addr of the publisher/peer */
11284 wmi_mac_addr peer_discovery_mac_addr;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011285 /* Actual number of bytes in TLV ndp_cfg */
Govind Singh941bd5e2016-02-04 17:15:25 +053011286 A_UINT32 ndp_cfg_len;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011287 /* Actual number of bytes in TLV ndp_app_info */
Govind Singh941bd5e2016-02-04 17:15:25 +053011288 A_UINT32 ndp_app_info_len;
11289 /**
11290 * TLV (tag length value ) parameters follow the ndp_initiator_req
11291 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011292 * wmi_channel channel;
11293 * A_UINT8 ndp_cfg[];
11294 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053011295 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011296} wmi_ndp_initiator_req_fixed_param_PROTOTYPE;
11297
11298#define wmi_ndp_initiator_req_fixed_param wmi_ndp_initiator_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011299
11300/**
11301 * Initiate a data response on the responder side
11302 * for data request indication from the peer
11303 */
11304typedef struct {
11305 /*
11306 * TLV tag and len; tag equals
11307 * WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param
11308 */
11309 A_UINT32 tlv_header;
11310 /** Unique id identifying the VDEV */
11311 A_UINT32 vdev_id;
11312 /** unique id generated in upper layer for the transaction */
11313 A_UINT32 transaction_id;
11314 /**
11315 * Unique token Id generated on the initiator/responder
11316 * side used for a NDP session between two NAN devices
11317 */
11318 A_UINT32 ndp_instance_id;
11319 /** Response Code defined in wmi_ndp_rsp_code */
11320 A_UINT32 rsp_code;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011321 /** Number of bytes in TLV ndp_cfg */
Govind Singh941bd5e2016-02-04 17:15:25 +053011322 A_UINT32 ndp_cfg_len;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011323 /** Number of bytes in TLV ndp_app_info */
Govind Singh941bd5e2016-02-04 17:15:25 +053011324 A_UINT32 ndp_app_info_len;
11325 /**
11326 * TLV (tag length value ) parameters follow the ndp_responder_req
11327 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011328 * A_UINT8 ndp_cfg[];
11329 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053011330 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011331} wmi_ndp_responder_req_fixed_param_PROTOTYPE;
11332
11333#define wmi_ndp_responder_req_fixed_param wmi_ndp_responder_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011334
11335/**
11336 * NDP end type
11337 */
11338typedef enum {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011339 WMI_NDP_END_TYPE_UNSPECIFIED = 0x00,
11340 WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01,
11341 WMI_NDP_END_TYPE_OTA_FRAME = 0x02,
11342} wmi_ndp_end_type_PROTOTYPE;
11343
11344#define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011345
11346/**
11347 * NDP end reason code
11348 */
11349typedef enum {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011350 WMI_NDP_END_REASON_UNSPECIFIED = 0x00,
11351 WMI_NDP_END_REASON_INACTIVITY = 0x01,
11352 WMI_NDP_END_REASON_PEER_DATA_END = 0x02,
11353} wmi_ndp_end_reason_code_PROTOTYPE;
11354
11355#define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011356
11357/**
11358 * NDP end request
11359 */
11360typedef struct {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011361 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */
11362 A_UINT32 tlv_header;
Govind Singh941bd5e2016-02-04 17:15:25 +053011363 /** NDP instance id */
11364 A_UINT32 ndp_instance_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011365} wmi_ndp_end_req_PROTOTYPE;
Govind Singh941bd5e2016-02-04 17:15:25 +053011366
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011367#define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011368
11369/**
11370 * NDP End request
11371 */
11372typedef struct {
11373 /*
11374 * TLV tag and len; tag equals
11375 * WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param
11376 */
11377 A_UINT32 tlv_header;
11378 /** unique id generated in upper layer for the transaction */
11379 A_UINT32 transaction_id;
Govind Singh941bd5e2016-02-04 17:15:25 +053011380 /**
11381 * TLV (tag length value ) parameters follow the ndp_end_req
11382 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011383 * wmi_ndp_end_req ndp_end_req_list[];
Govind Singh941bd5e2016-02-04 17:15:25 +053011384 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011385} wmi_ndp_end_req_fixed_param_PROTOTYPE;
11386
11387#define wmi_ndp_end_req_fixed_param wmi_ndp_end_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011388
11389/* NAN DATA RSP EVENTS */
11390
11391/**
11392 * Event to indicate NAN Data Interface capabilities cmd
11393 */
11394typedef struct {
11395 /*
11396 * TLV tag and len; tag equals
11397 * WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param
11398 */
11399 A_UINT32 tlv_header;
11400 /** Copy of transaction_id received in wmi_ndi_get_cap_req */
11401 A_UINT32 transaction_id;
11402 /** Max ndi interface support */
11403 A_UINT32 max_ndi_interfaces;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011404 /** Max ndp sessions can support */
11405 A_UINT32 max_ndp_sessions;
Govind Singh941bd5e2016-02-04 17:15:25 +053011406 /** Max number of peer's per ndi */
11407 A_UINT32 max_peers_per_ndi;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011408} wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE;
11409
11410#define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011411
11412/**
11413 * NDP command response code
11414 */
11415typedef enum {
11416 NDP_CMD_RSP_STATUS_SUCCESS = 0x00,
11417 NDP_CMD_RSP_STATUS_ERROR = 0x01,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011418} wmi_ndp_cmd_rsp_status_PROTOTYPE;
11419
11420#define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011421
11422/**
Govind Singh941bd5e2016-02-04 17:15:25 +053011423 * Event response for wmi_ndp_initiator_req
11424 */
11425typedef struct {
11426 /*
11427 * TLV tag and len; tag equals
11428 * WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param
11429 */
11430 A_UINT32 tlv_header;
11431 /** Unique id identifying the VDEV */
11432 A_UINT32 vdev_id;
11433 /** Copy of transaction_id received in wmi_ndp_initiator_req */
11434 A_UINT32 transaction_id;
11435 /** Response status defined in wmi_ndp_cmd_rsp_status*/
11436 A_UINT32 rsp_status;
Govind Singh941bd5e2016-02-04 17:15:25 +053011437 A_UINT32 reason_code;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011438 /*
11439 * Unique token Id generated on the initiator/responder
11440 * side used for a NDP session between two NAN devices
11441 */
11442 A_UINT32 ndp_instance_id;
11443} wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE;
11444
11445#define wmi_ndp_initiator_rsp_event_fixed_param wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011446
11447/**
11448 * Event response for wmi_ndp_responder_req cmd
11449 */
11450typedef struct {
11451 /*
11452 * TLV tag and len; tag equals
11453 * WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param
11454 */
11455 A_UINT32 tlv_header;
11456 /** Unique id identifying the VDEV */
11457 A_UINT32 vdev_id;
11458 /** Copy of transaction_id received in wmi_ndp_responder_req */
11459 A_UINT32 transaction_id;
11460 /** Response status defined in wmi_ndp_cmd_rsp_status*/
11461 A_UINT32 rsp_status;
Govind Singh941bd5e2016-02-04 17:15:25 +053011462 A_UINT32 reason_code;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011463 /*
11464 * Unique token Id generated on the initiator/responder
11465 * side used for a NDP session between two NAN devices
11466 */
11467 A_UINT32 ndp_instance_id;
11468 /* NDI mac address of the peer */
11469 wmi_mac_addr peer_ndi_mac_addr;
11470} wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE;
11471
11472#define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE
11473/**
11474 * Active ndp instance id
11475 */
11476typedef struct {
11477 /*
11478 * TLV tag and len; tag equals
11479 * WMITLV_TAG_STRUC_wmi_active_ndp_instance_id
11480 */
11481 A_UINT32 tlv_header;
11482 /* NDP instance id */
11483 A_UINT32 ndp_instance_id;
11484} wmi_active_ndp_instance_id_PROTOTYPE;
11485
11486#define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011487
11488/**
11489 * NDP end response per ndi
11490 */
11491typedef struct {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011492 /*
11493 * TLV tag and len; tag equals
11494 * WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi
11495 */
11496 A_UINT32 tlv_header;
Govind Singh941bd5e2016-02-04 17:15:25 +053011497 /** Unique id identifying the VDEV */
11498 A_UINT32 vdev_id;
11499 /** Peer MAC addr */
11500 wmi_mac_addr peer_mac_addr;
11501 /** Number of active ndps on this ndi */
11502 A_UINT32 num_active_ndps_on_ndi;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011503} wmi_ndp_end_rsp_per_ndi_PROTOTYPE;
Govind Singh941bd5e2016-02-04 17:15:25 +053011504
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011505#define wmi_ndp_end_rsp_per_ndi wmi_ndp_end_rsp_per_ndi_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011506
11507/**
11508 * Event response for wmi_ndp_end_req cmd
11509 */
11510typedef struct {
11511 /*
11512 * TLV tag and len; tag equals
11513 * WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param
11514 */
11515 A_UINT32 tlv_header;
11516 /** Copy of transaction_id received in wmi_ndp_end_req */
11517 A_UINT32 transaction_id;
11518 /** Response status defined in wmi_ndp_cmd_rsp_status*/
11519 A_UINT32 rsp_status;
Govind Singh941bd5e2016-02-04 17:15:25 +053011520 A_UINT32 reason_code;
Govind Singh941bd5e2016-02-04 17:15:25 +053011521 /**
11522 * TLV (tag length value ) parameters follow the ndp_end_rsp
11523 * structure. The TLV's are:
11524 * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[];
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011525 * wmi_active_ndp_instance_id active_ndp_instances_id[];
Govind Singh941bd5e2016-02-04 17:15:25 +053011526 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011527} wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE;
11528
11529#define wmi_ndp_end_rsp_event_fixed_param wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011530
11531/** NAN DATA EVENTS */
11532
11533/**
11534 * NDP self role
11535 */
11536typedef enum {
11537 WMI_NDP_INITIATOR_ROLE,
11538 WMI_NDP_RESPONDER_ROLE,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011539} wmi_ndp_self_role_PROTOTYPE;
11540
11541#define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011542
11543/**
11544 * NDP accept policy
11545 */
11546typedef enum {
11547 WMI_NDP_ACCEPT_POLICY_NONE,
11548 WMI_NDP_ACCEPT_POLICY_ALL,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011549} wmi_ndp_accept_policy_PROTOTYPE;
11550
11551#define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011552
11553/**
11554 * Event indication received on the responder side when a NDP Initiator request/
11555 * NDP session is initiated on the Initiator side
11556 * (self role will be NDP_RESPONDER_ROLE)
11557 *
11558 * Event indication received on the initiator side when a
11559 * NDP responder request on the Initiator side
11560 * (self role will be NDP_INITIATOR_ROLE)
11561 */
11562typedef struct {
11563 /*
11564 * TLV tag and len; tag equals
11565 * WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param
11566 */
11567 A_UINT32 tlv_header;
11568 /** Unique id identifying the VDEV */
11569 A_UINT32 vdev_id;
11570 /** Self NDP Role defined in wmi_ndp_self_role */
11571 A_UINT32 self_ndp_role;
11572 /** Accept policy defined in wmi_ndp_accept_policy */
11573 A_UINT32 accept_policy;
11574 /** Unique Instance Id corresponding to a service/session. */
11575 A_UINT32 service_instance_id;
11576 /** Discovery MAC addr of the peer/initiator */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011577 wmi_mac_addr peer_discovery_mac_addr;
11578 /* NDI mac address of the peer */
11579 wmi_mac_addr peer_ndi_mac_addr;
Govind Singh941bd5e2016-02-04 17:15:25 +053011580 /**
11581 * Unique token Id generated on the initiator/responder
11582 * side used for a NDP session between two NAN devices
11583 */
11584 A_UINT32 ndp_instance_id;
11585 /** Number of bytes in TLV wmi_ndp_cfg */
11586 A_UINT32 ndp_cfg_len;
11587 /** Number of bytes in TLV wmi_ndp_app_info */
11588 A_UINT32 ndp_app_info_len;
11589 /**
11590 * TLV (tag length value ) parameters follow the ndp_indication
11591 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011592 * A_UINT8 ndp_cfg[];
11593 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053011594 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011595} wmi_ndp_indication_event_fixed_param_PROTOTYPE;
11596
11597#define wmi_ndp_indication_event_fixed_param wmi_ndp_indication_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011598
11599/**
11600 * Event indication of data confirm is received on both
11601 * initiator and responder side confirming a NDP session
11602 */
11603typedef struct {
11604 /*
11605 * TLV tag and len; tag equals
11606 * WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param
11607 */
11608 A_UINT32 tlv_header;
11609 /** Unique id identifying the VDEV */
11610 A_UINT32 vdev_id;
11611 /**
11612 * Unique token Id generated on the initiator/responder
11613 * side used for a NDP session between two NAN devices
11614 */
11615 A_UINT32 ndp_instance_id;
11616 /*
11617 * NDI mac address of the peer
11618 * (required to derive target ipv6 address)
11619 */
11620 wmi_mac_addr peer_ndi_mac_addr;
11621 /** Response Code defined in wmi_ndp_rsp_code */
11622 A_UINT32 rsp_code;
11623 /** Number of bytes in TLV wmi_ndp_cfg */
11624 A_UINT32 ndp_cfg_len;
11625 /** Number of bytes in TLV wmi_ndp_app_info */
11626 A_UINT32 ndp_app_info_len;
Anurag Chouhanb36db512016-04-27 16:13:35 +053011627 /** Reason Code */
11628 A_UINT32 reason_code;
11629 /** Number of active ndps on this peer */
11630 A_UINT32 num_active_ndps_on_peer;
Govind Singh941bd5e2016-02-04 17:15:25 +053011631 /**
11632 * TLV (tag length value ) parameters follow the ndp_confirm
11633 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011634 * A_UINT8 ndp_cfg[];
11635 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053011636 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011637} wmi_ndp_confirm_event_fixed_param_PROTOTYPE;
11638
11639#define wmi_ndp_confirm_event_fixed_param wmi_ndp_confirm_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011640
11641/**
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011642 * Event indication received on the initiator/responder side terminating a NDP session
Govind Singh941bd5e2016-02-04 17:15:25 +053011643 */
11644typedef struct {
11645 /*
11646 * TLV tag and len; tag equals
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011647 * WMITLV_TAG_STRUC_wmi_ndp_end_indication
Govind Singh941bd5e2016-02-04 17:15:25 +053011648 */
11649 A_UINT32 tlv_header;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011650 /** type defined in wmi_ndp_end_type */
11651 A_UINT32 type;
11652 /* Unique id identifying the VDEV */
Govind Singh941bd5e2016-02-04 17:15:25 +053011653 A_UINT32 vdev_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011654 /** reason_code defined in wmi_ndp_end_reason_code */
11655 A_UINT32 reason_code;
11656 /** NDP instance id */
11657 A_UINT32 ndp_instance_id;
11658 /* NDI MAC addr of the peer */
11659 wmi_mac_addr peer_ndi_mac_addr;
11660 /* Number of active ndps on this peer */
11661 A_UINT32 num_active_ndps_on_peer;
11662} wmi_ndp_end_indication_PROTOTYPE;
11663
11664#define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011665
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011666typedef struct {
11667 A_UINT32 tlv_header;
11668 A_UINT32 num_data;
11669 /* followed by WMITLV_TAG_ARRAY_BYTE */
11670} wmi_diag_data_container_event_fixed_param;
11671
11672enum {
11673 WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
11674 WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
11675 WMI_PDEV_PARAM_TXPOWER_REASON_MAX
11676};
11677
11678#define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF
11679#define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
11680
11681#define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00
11682#define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
11683
11684#define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \
11685 ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
11686
11687#define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \
11688 ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
11689
11690#define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \
11691 (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
11692
11693#define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \
11694 (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
11695
11696/**
11697 * This command is sent from WLAN host driver to firmware to
11698 * notify the current modem power state. Host would receive a
11699 * message from modem when modem is powered on. Host driver
11700 * would then send this command to firmware. Firmware would then
11701 * power on WCI-2 (UART) interface for LTE/MWS Coex.
11702 *
11703 * This command is only applicable for APQ platform which has
11704 * modem on the platform. If firmware doesn't support MWS Coex,
11705 * this command can be dropped by firmware.
11706 *
11707 * This is a requirement from modem team that WCN can't toggle
11708 * UART before modem is powered on.
11709 */
11710typedef struct {
11711 /** TLV tag and len; tag equals
11712 * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
11713 A_UINT32 tlv_header;
11714
11715 /** Modem power state parameter */
11716 A_UINT32 modem_power_state;
11717} wmi_modem_power_state_cmd_param;
11718
11719enum {
11720 WMI_MODEM_STATE_OFF = 0,
11721 WMI_MODEM_STATE_ON
11722};
11723
11724#define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
11725#define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */
11726
11727/** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
11728 generated whenever firmware roamed to new AP silently and
11729 (a) If the host is awake, FW sends the event to the host immediately .
11730 (b) If host is in sleep then either
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011731 (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011732 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 +053011733 (2) data/mgmt frame is received from roamed AP, which needs to return to host
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011734 */
11735
11736typedef struct {
11737 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
11738 A_UINT32 tlv_header;
11739
11740 A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
11741 A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
11742 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES];
11743} wmi_key_material;
11744
11745typedef struct {
11746 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */
11747 /** Unique id identifying the VDEV on which roaming is done by firmware */
11748 A_UINT32 vdev_id;
11749 /** auth_status: connected or authorized */
11750 A_UINT32 auth_status;
11751 /*
Nirav Shah439e6262015-11-05 10:53:18 +053011752 * roam_reason:
11753 * bits 0-3 for roam reason see WMI_ROAM_REASON_XXX
11754 * bits 4-5 for subnet status see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011755 */
11756 A_UINT32 roam_reason;
11757 /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
11758 A_UINT32 rssi;
11759 /** MAC address of roamed AP */
11760 wmi_mac_addr bssid; /* BSSID */
11761 /** whether the frame is beacon or probe rsp */
11762 A_UINT32 is_beacon;
11763 /** the length of beacon/probe rsp */
11764 A_UINT32 bcn_probe_rsp_len;
11765 /** the length of reassoc rsp */
11766 A_UINT32 reassoc_rsp_len;
Manikandan Mohan30728082015-12-09 12:35:24 -080011767 /** the length of reassoc req */
11768 A_UINT32 reassoc_req_len;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011769 /**
11770 * TLV (tag length value ) parameters follows roam_synch_event
11771 * The TLV's are:
11772 * A_UINT8 bcn_probe_rsp_frame[]; length identified by bcn_probe_rsp_len
11773 * A_UINT8 reassoc_rsp_frame[]; length identified by reassoc_rsp_len
11774 * wmi_channel chan;
11775 * wmi_key_material key;
11776 * A_UINT32 status; subnet changed status not being used
11777 * currently. will pass the information using roam_status.
Manikandan Mohan30728082015-12-09 12:35:24 -080011778 * A_UINT8 reassoc_req_frame[]; length identified by reassoc_req_len
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011779 **/
11780} wmi_roam_synch_event_fixed_param;
11781
11782#define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF
11783
11784typedef struct {
11785 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
11786 A_UINT32 tlv_header;
11787 /** MAC address of the peer for which the estimated link speed is required. */
11788 wmi_mac_addr peer_macaddr;
Govind Singh869c9872016-02-22 18:36:34 +053011789 /* Set to 1 only if vdev_id field is valid */
11790 A_UINT32 valid_vdev_id;
11791 /* VDEV to which the peer belongs to */
11792 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011793} wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
11794
11795typedef struct {
11796 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
11797 A_UINT32 tlv_header;
11798 /** MAC address of the peer for which the estimated link speed is required.
11799 */
11800 wmi_mac_addr peer_macaddr;
11801 /* Estimated link speed in kbps.
11802 * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
11803 */
11804 A_UINT32 est_linkspeed_kbps;
Govind Singh869c9872016-02-22 18:36:34 +053011805 /* Set to 1 only if vdev_id field is valid */
11806 A_UINT32 valid_vdev_id;
11807 /* VDEV to which the peer belongs to */
11808 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011809} wmi_peer_estimated_linkspeed_event_fixed_param;
11810
11811typedef struct {
11812 A_UINT32 tlv_header; /* TLV tag and len; tag equals */
11813 /* vdev ID */
11814 A_UINT32 vdev_id;
11815 A_UINT32 data_len;
11816 /** length in byte of data[]. */
11817 /* This structure is used to send REQ binary blobs
11818 * from application/service to firmware where Host drv is pass through .
11819 * Following this structure is the TLV:
11820 * A_UINT8 data[]; // length in byte given by field data_len.
11821 */
11822} wmi_req_stats_ext_cmd_fixed_param;
11823
11824typedef struct {
11825 A_UINT32 tlv_header;
11826 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
11827 A_UINT32 vdev_id;
11828 /** vdev ID */
11829 A_UINT32 data_len;
11830 /** length in byte of data[]. */
11831 /* This structure is used to send REQ binary blobs
11832 * from firmware to application/service where Host drv is pass through .
11833 * Following this structure is the TLV:
11834 * A_UINT8 data[]; // length in byte given by field data_len.
11835 */
11836} wmi_stats_ext_event_fixed_param;
11837
11838typedef struct {
Manikandan Mohan429a0782015-12-23 14:35:54 -080011839 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */
11840 /** unique id identifying the VDEV, generated by the caller */
11841 A_UINT32 vdev_id;
11842 /** peer MAC address */
11843 wmi_mac_addr peer_macaddr;
11844} wmi_peer_delete_resp_event_fixed_param;
11845
11846typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011847 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
11848 A_UINT32 tlv_header;
11849 A_UINT32 vdev_id; /* vdev ID */
11850 /* MAC address of the peer for which the estimated link speed is required. */
11851 wmi_mac_addr peer_macaddr;
11852 A_UINT32 state; /* peer state */
11853} wmi_peer_state_event_fixed_param;
11854
11855typedef struct {
11856 /*
11857 * TLV tag and len; tag equals
11858 * WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param
11859 */
11860 A_UINT32 tlv_header;
11861 /* unique id identifying the VDEV, generated by the caller */
11862 A_UINT32 vdev_id;
11863 /* peer MAC address */
11864 wmi_mac_addr peer_macaddr;
11865} wmi_peer_assoc_conf_event_fixed_param;
11866
11867enum {
11868 WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0,
11869 /** scan_type: passive */
11870 WMI_2G4_HT40_OBSS_SCAN_ACTIVE,
11871 /** scan_type: active */
11872};
11873
11874typedef struct {
11875 /**
11876 * TLV tag and len;
11877 * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enalbe_cmd_fixed_param
11878 */
11879 A_UINT32 tlv_header;
11880 A_UINT32 vdev_id;
11881 /**
11882 * active or passive. if active all the channels are actively scanned.
11883 * if passive then all the channels are passively scanned
11884 */
11885 A_UINT32 scan_type;
11886 /**
11887 * FW can perform multiple scans with in a OBSS scan interval.
11888 * For each scan,
11889 * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel ,
11890 * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
11891 * The unit for these 2 parameters is TUs.
11892 */
11893 A_UINT32 obss_scan_passive_dwell;
11894 A_UINT32 obss_scan_active_dwell;
11895 /**
11896 * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
11897 * both min and total per channel dwell time requirement
11898 */
11899 A_UINT32 bss_channel_width_trigger_scan_interval;
11900 /**
11901 * FW can perform multiple scans with in a OBSS scan interval.
11902 * For each scan,
11903 * the total per channel dwell time across all scans with in OBSS scan interval should be
11904 * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
11905 * for active scans and ,
11906 * The unit for these 2 parameters is TUs.
11907 */
11908 A_UINT32 obss_scan_passive_total_per_channel;
11909 A_UINT32 obss_scan_active_total_per_channel;
11910 A_UINT32 bss_width_channel_transition_delay_factor;
11911 /** parameter to check exemption from scan */
11912 A_UINT32 obss_scan_activity_threshold;
11913 /** parameter to check exemption from scan */
11914 /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
11915 A_UINT32 forty_mhz_intolerant;
11916 /** STA 40M bandwidth intolerant capability */
11917 A_UINT32 current_operating_class;
11918 /** STA current operating class */
11919 /** length of 2.4GHz channel list to scan at, channel list in tlv->channels[] */
11920 A_UINT32 channel_len;
11921 /** length of optional ie data to append to probe reqest when active scan, ie data in tlv->ie_field[] */
11922 A_UINT32 ie_len;
11923} wmi_obss_scan_enable_cmd_fixed_param;
11924
11925typedef struct {
11926 /**
11927 * TLV tag and len;
11928 * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
11929 */
11930 A_UINT32 tlv_header;
11931 A_UINT32 vdev_id;
11932} wmi_obss_scan_disable_cmd_fixed_param;
11933
11934typedef struct {
11935 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
11936 A_UINT32 tlv_header;
11937 /** unique id identifying the VDEV */
11938 A_UINT32 vdev_id;
11939 /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
11940 A_UINT32 tx_status;
11941} wmi_offload_prb_rsp_tx_status_event_fixed_param;
11942
11943typedef enum {
11944 WMI_FRAME_TX_OK, /* frame tx ok */
11945 WMI_FRAME_TX_XRETRY, /* excessivley retried */
11946 WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */
11947 WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */
11948} WMI_FRAME_TX_STATUS;
11949
11950/**
11951 * This command is sent from WLAN host driver to firmware to
11952 * request firmware to send the latest channel avoidance range
11953 * to host.
11954 *
11955 * This command is only applicable for APQ platform which has
11956 * modem on the platform. If firmware doesn't support MWS Coex,
11957 * this command can be dropped by firmware.
11958 *
11959 * Host would send this command to firmware to request a channel
11960 * avoidance information update.
11961 */
11962typedef struct {
11963 /** TLV tag and len; tag equals
11964 * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
11965 A_UINT32 tlv_header;
11966} wmi_chan_avoid_update_cmd_param;
11967
11968/* ExtScan operation mode */
11969typedef enum {
11970 WMI_EXTSCAN_MODE_NONE = 0x0000,
11971 WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */
11972 WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */
11973 WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */
11974} wmi_extscan_operation_mode;
11975
11976/* Channel Mask */
11977typedef enum {
11978 WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
11979 WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */
11980 WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */
11981 WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */
11982} wmi_channel_band_mask;
11983
11984typedef enum {
11985 WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001,
11986 WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002,
11987 WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004,
11988 WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008,
11989 WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010,
11990 WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020,
Govind Singhfad2f212016-01-21 10:55:51 +053011991 WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040,
11992 WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011993
11994 WMI_EXTSCAN_EVENT_MAX = 0x8000
11995} wmi_extscan_event_type;
11996
11997#define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \
11998 WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
11999
12000#define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \
12001 WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
12002 WMI_EXTSCAN_BUCKET_FAILED_EVENT | \
12003 WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
12004
12005typedef enum {
12006 WMI_EXTSCAN_NO_FORWARDING = 0x0000,
12007 WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
12008} wmi_extscan_forwarding_flags;
12009
12010typedef enum {
12011 /* Use Motion Sensor Detection */
12012 WMI_EXTSCAN_USE_MSD = 0x0001,
12013 /* Extscan LPASS extended batching feature is supported and enabled */
12014 WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002,
12015} wmi_extscan_configuration_flags;
12016typedef enum {
12017 /*
12018 * Cache the results of bucket whose
12019 * configuration flags has this bit set
12020 */
12021 WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001,
Govind Singhfad2f212016-01-21 10:55:51 +053012022 /* Report ext scan results to context hub or not.*/
12023 WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012024} wmi_extscan_bucket_configuration_flags;
12025
12026typedef enum {
12027 WMI_EXTSCAN_STATUS_OK = 0,
12028 WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
12029 WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
12030 WMI_EXTSCAN_STATUS_INTERNAL_ERROR
12031} wmi_extscan_start_stop_status;
12032
12033typedef struct {
12034 /** Request ID - to identify command. Cannot be 0 */
12035 A_UINT32 request_id;
12036 /** Requestor ID - client requesting ExtScan */
12037 A_UINT32 requestor_id;
12038 /** VDEV id(interface) that is requesting scan */
12039 A_UINT32 vdev_id;
12040} wmi_extscan_command_id;
12041
12042typedef struct {
12043 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12044 /** channel number */
12045 A_UINT32 channel;
12046
12047 /** dwell time in msec - use defaults if 0 */
12048 A_UINT32 min_dwell_time;
12049 A_UINT32 max_dwell_time;
12050 /** passive/active channel and other flags */
12051 A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */
12052} wmi_extscan_bucket_channel;
12053
12054/* Scan Bucket specification */
12055typedef struct {
12056 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12057 /** Bucket ID - 0-based */
12058 A_UINT32 bucket_id;
12059 /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
12060 A_UINT32 notify_extscan_events;
12061 /** Options to forward scan results - see wmi_extscan_forwarding_flags */
12062 A_UINT32 forwarding_flags;
12063 /*
12064 * ExtScan configuration flags -
12065 * wmi_extscan__bucket_configuration_flags
12066 */
12067 A_UINT32 configuration_flags;
12068 /** DEPRECATED member:multiplier to be applied to the periodic scan's base period */
12069 A_UINT32 base_period_multiplier;
12070 /** dwell time in msec on active channels - use defaults if 0 */
12071 A_UINT32 min_dwell_time_active;
12072 A_UINT32 max_dwell_time_active;
12073 /** dwell time in msec on passive channels - use defaults if 0 */
12074 A_UINT32 min_dwell_time_passive;
12075 A_UINT32 max_dwell_time_passive;
12076 /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
12077 A_UINT32 channel_band;
12078 /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
12079 A_UINT32 num_channels;
12080 /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
12081 A_UINT32 min_period;
12082 /** period above which exponent is not applied anymore */
12083 A_UINT32 max_period;
12084 /**
12085 * back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
12086 * new_bucket_period = last_bucket_period + last_exponent_period exp_backoff
12087 */
12088 A_UINT32 exp_backoff;
12089 /** number of scans performed at a given periodicity after which exponential back off value is
12090 * applied to current periodicity to obtain a newer one
12091 */
12092 A_UINT32 exp_max_step_count;
12093/** Followed by the variable length TLV chan_list:
12094 * wmi_extscan_bucket_channel chan_list[] */
12095} wmi_extscan_bucket;
12096
12097typedef struct {
12098 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
12099 /** Request ID - to identify command. Cannot be 0 */
12100 A_UINT32 request_id;
12101 /** Requestor ID - client requesting ExtScan */
12102 A_UINT32 requestor_id;
12103 /** VDEV id(interface) that is requesting scan */
12104 A_UINT32 vdev_id;
12105 /** table ID - to allow support for multiple simultaneous requests */
12106 A_UINT32 table_id;
12107 /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
12108 A_UINT32 base_period;
12109 /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
12110 A_UINT32 max_iterations;
12111 /** Options to forward scan results - see wmi_extscan_forwarding_flags */
12112 A_UINT32 forwarding_flags;
12113 /** ExtScan configuration flags - wmi_extscan_configuration_flags */
12114 A_UINT32 configuration_flags;
12115 /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
12116 A_UINT32 notify_extscan_events;
12117 /** Scan Priority, input to scan scheduler */
12118 A_UINT32 scan_priority;
12119 /** Maximum number of BSSIDs to cache on each scan cycle */
12120 A_UINT32 max_bssids_per_scan_cycle;
12121 /** Minimum RSSI value to report */
12122 A_UINT32 min_rssi;
12123 /** Maximum table usage in percentage */
12124 A_UINT32 max_table_usage;
12125 /** default dwell time in msec on active channels */
12126 A_UINT32 min_dwell_time_active;
12127 A_UINT32 max_dwell_time_active;
12128 /** default dwell time in msec on passive channels */
12129 A_UINT32 min_dwell_time_passive;
12130 A_UINT32 max_dwell_time_passive;
12131 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
12132 A_UINT32 min_rest_time;
12133 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
12134 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
12135 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
12136 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
12137 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
12138 * irrespective of activity. activity is determined by the idle_time parameter.
12139 */
12140 A_UINT32 max_rest_time;
12141 /** time before sending next set of probe requests.
12142 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
12143 * The number of probe requests specified depends on the ssid_list and bssid_list
12144 */
12145 /** Max number of probes to be sent */
12146 A_UINT32 n_probes;
12147 /** time in msec between 2 sets of probe requests. */
12148 A_UINT32 repeat_probe_time;
12149 /** time in msec between 2 consequetive probe requests with in a set. */
12150 A_UINT32 probe_spacing_time;
12151 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
12152 A_UINT32 idle_time;
12153 /** maximum time in msec allowed for scan */
12154 A_UINT32 max_scan_time;
12155 /** delay in msec before sending first probe request after switching to a channel */
12156 A_UINT32 probe_delay;
12157 /** Scan control flags */
12158 A_UINT32 scan_ctrl_flags;
12159 /** Burst duration time in msec*/
12160 A_UINT32 burst_duration;
12161
12162 /** number of bssids in the TLV bssid_list[] */
12163 A_UINT32 num_bssid;
12164 /** number of ssid in the TLV ssid_list[] */
12165 A_UINT32 num_ssids;
12166 /** number of bytes in TLV ie_data[] */
12167 A_UINT32 ie_len;
12168 /** number of buckets in the TLV bucket_list[] */
12169 A_UINT32 num_buckets;
12170 /** in number of scans, send notifications to host after these many scans */
12171 A_UINT32 report_threshold_num_scans;
12172
12173 /** number of channels in channel_list[] determined by the
12174 sum of wmi_extscan_bucket.num_channels in array */
12175
12176/**
12177 * TLV (tag length value ) parameters follow the extscan_cmd
12178 * structure. The TLV's are:
12179 * wmi_ssid ssid_list[];
12180 * wmi_mac_addr bssid_list[];
12181 * A_UINT8 ie_data[];
12182 * wmi_extscan_bucket bucket_list[];
12183 * wmi_extscan_bucket_channel channel_list[];
12184 */
12185} wmi_extscan_start_cmd_fixed_param;
12186
12187typedef struct {
12188 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
12189 /** Request ID - to match running command. 0 matches any request */
12190 A_UINT32 request_id;
12191 /** Requestor ID - client requesting stop */
12192 A_UINT32 requestor_id;
12193 /** VDEV id(interface) that is requesting scan */
12194 A_UINT32 vdev_id;
12195 /** table ID - to allow support for multiple simultaneous requests */
12196 A_UINT32 table_id;
12197} wmi_extscan_stop_cmd_fixed_param;
12198
12199enum wmi_extscan_get_cached_results_flags {
12200 WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000,
12201 WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
12202};
12203
12204typedef struct {
12205 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
12206 /** request ID - used to correlate command with events */
12207 A_UINT32 request_id;
12208 /** Requestor ID - client that requested results */
12209 A_UINT32 requestor_id;
12210 /** VDEV id(interface) that is requesting scan */
12211 A_UINT32 vdev_id;
12212 /** table ID - to allow support for multiple simultaneous requests */
12213 A_UINT32 table_id;
12214 /** maximum number of results to be returned */
12215 A_UINT32 max_results;
12216 /** flush BSSID list - wmi_extscan_get_cached_results_flags */
12217 A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */
12218} wmi_extscan_get_cached_results_cmd_fixed_param;
12219
12220typedef struct {
12221 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
12222 /** request ID - used to correlate command with events */
12223 A_UINT32 request_id;
12224 /** Requestor ID - client that requested results */
12225 A_UINT32 requestor_id;
12226 /** VDEV id(interface) that is requesting scan */
12227 A_UINT32 vdev_id;
12228 /** table ID - to allow support for multiple simultaneous requests */
12229 A_UINT32 table_id;
12230} wmi_extscan_get_wlan_change_results_cmd_fixed_param;
12231
12232typedef struct {
12233 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12234 /**bssid */
12235 wmi_mac_addr bssid;
12236 /**channel number */
12237 A_UINT32 channel;
12238 /**upper RSSI limit */
12239 A_UINT32 upper_rssi_limit;
12240 /**lower RSSI limit */
12241 A_UINT32 lower_rssi_limit;
12242} wmi_extscan_wlan_change_bssid_param;
12243
12244typedef struct {
12245 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
12246 /** Request ID - to identify command. Cannot be 0 */
12247 A_UINT32 request_id;
12248 /** Requestor ID - client requesting wlan change monitoring */
12249 A_UINT32 requestor_id;
12250 /** VDEV id(interface) that is requesting scan */
12251 A_UINT32 vdev_id;
12252 /** table ID - to allow support for multiple simultaneous tables */
12253 A_UINT32 table_id;
12254 /** operation mode: start/stop */
12255 A_UINT32 mode; /* wmi_extscan_operation_mode */
12256 /** number of rssi samples to store */
12257 A_UINT32 max_rssi_samples;
12258 /** number of samples to use to calculate RSSI average */
12259 A_UINT32 rssi_averaging_samples;
12260 /** number of scans to confirm loss of contact with RSSI */
12261 A_UINT32 lost_ap_scan_count;
12262 /** number of out-of-range BSSIDs necessary to send event */
12263 A_UINT32 max_out_of_range_count;
12264 /** total number of bssid signal descriptors (in all pages) */
12265 A_UINT32 total_entries;
12266 /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
12267 A_UINT32 first_entry_index;
12268 /** number of bssid signal descriptors in this page */
12269 A_UINT32 num_entries_in_page;
12270 /* Following this structure is the TLV:
12271 * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[]; // number of elements given by field num_page_entries.
12272 */
12273} wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
12274
12275typedef struct {
12276 /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12277 A_UINT32 tlv_header;
12278 /**ssid */
12279 wmi_ssid ssid;
12280 /**band */
12281 A_UINT32 band;
12282 /**RSSI threshold for reporting */
12283 A_UINT32 min_rssi;
12284 A_UINT32 max_rssi;
12285} wmi_extscan_hotlist_ssid_entry;
12286
12287typedef struct {
12288 /**
12289 * TLV tag and len; tag equals
12290 * MITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param
12291 */
12292 A_UINT32 tlv_header;
12293 /** Request ID - to identify command. Cannot be 0 */
12294 A_UINT32 request_id;
12295 /** Requestor ID - client requesting hotlist ssid monitoring */
12296 A_UINT32 requestor_id;
12297 /** VDEV id(interface) that is requesting scan */
12298 A_UINT32 vdev_id;
12299 /** table ID - to allow support for multiple simultaneous tables */
12300 A_UINT32 table_id;
12301 /** operation mode: start/stop */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012302 A_UINT32 mode; /* wmi_extscan_operation_mode */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012303 /**total number of ssids (in all pages) */
12304 A_UINT32 total_entries;
12305 /**index of the first ssid entry found in the TLV extscan_hotlist_ssid_entry*/
12306 A_UINT32 first_entry_index;
12307 /**number of ssids in this page */
12308 A_UINT32 num_entries_in_page;
12309 /** number of consecutive scans to confirm loss of an ssid **/
12310 A_UINT32 lost_ap_scan_count;
12311 /* Following this structure is the TLV:
12312 * wmi_extscan_hotlist_ssid_entry hotlist_ssid[];
12313 * number of element given by field num_page_entries.
12314 */
12315} wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
12316
12317typedef struct {
12318 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12319 /**bssid */
12320 wmi_mac_addr bssid;
12321 /**RSSI min threshold for reporting */
12322 A_UINT32 min_rssi;
12323 /**Deprecated entry channel number */
12324 A_UINT32 channel;
12325 /** RSSI max threshold for reporting */
12326 A_UINT32 max_rssi;
12327} wmi_extscan_hotlist_entry;
12328
12329typedef struct {
12330 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
12331 /** Request ID - to identify command. Cannot be 0 */
12332 A_UINT32 request_id;
12333 /** Requestor ID - client requesting hotlist monitoring */
12334 A_UINT32 requestor_id;
12335 /** VDEV id(interface) that is requesting scan */
12336 A_UINT32 vdev_id;
12337 /** table ID - to allow support for multiple simultaneous tables */
12338 A_UINT32 table_id;
12339 /** operation mode: start/stop */
12340 A_UINT32 mode; /* wmi_extscan_operation_mode */
12341 /**total number of bssids (in all pages) */
12342 A_UINT32 total_entries;
12343 /**index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry*/
12344 A_UINT32 first_entry_index;
12345 /**number of bssids in this page */
12346 A_UINT32 num_entries_in_page;
12347 /** number of consecutive scans to confirm loss of contact with AP */
12348 A_UINT32 lost_ap_scan_count;
12349 /* Following this structure is the TLV:
12350 * wmi_extscan_hotlist_entry hotlist[]; // number of elements given by field num_page_entries.
12351 */
12352} wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
12353
12354 typedef struct {
12355 /* TLV tag and len; tag equals
12356 *WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
12357 A_UINT32 tlv_header;
12358 /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
12359 A_UINT32 config_request_id;
12360 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID
12361 that configured the table */
12362 A_UINT32 config_requestor_id;
12363 /**
12364 * VDEV id(interface) of the
12365 * WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table
12366 */
12367 A_UINT32 config_vdev_id;
12368 /** table ID - to allow support for multiple simultaneous tables */
12369 A_UINT32 table_id;
12370 /**total number of ssids (in all pages) */
12371 A_UINT32 total_entries;
12372 /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
12373 A_UINT32 first_entry_index;
12374 /**number of ssids in this page */
12375 A_UINT32 num_entries_in_page;
12376 /* Following this structure is the TLV:
12377 * wmi_extscan_wlan_descriptor hotlist_match[];
12378 * number of descriptors given by field num_entries_in_page
12379 */
12380} wmi_extscan_hotlist_ssid_match_event_fixed_param;
12381
12382typedef struct {
12383 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12384 /** table ID - to allow support for multiple simultaneous tables */
12385 A_UINT32 table_id;
12386 /** size in bytes of scan cache entry */
12387 A_UINT32 scan_cache_entry_size;
12388 /** maximum number of scan cache entries */
12389 A_UINT32 max_scan_cache_entries;
12390 /** maximum number of buckets per extscan request */
12391 A_UINT32 max_buckets;
12392 /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
12393 A_UINT32 max_bssid_per_scan;
12394 /** table usage level at which indication must be sent to host */
12395 A_UINT32 max_table_usage_threshold;
12396} wmi_extscan_cache_capabilities;
12397
12398typedef struct {
12399 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12400 /** table ID - to allow support for multiple simultaneous tables */
12401 A_UINT32 table_id;
12402 /** size in bytes of wlan change entry */
12403 A_UINT32 wlan_change_entry_size;
12404 /** maximum number of entries in wlan change table */
12405 A_UINT32 max_wlan_change_entries;
12406 /** number of RSSI samples used for averaging RSSI */
12407 A_UINT32 max_rssi_averaging_samples;
12408 /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
12409 A_UINT32 max_rssi_history_entries;
12410} wmi_extscan_wlan_change_monitor_capabilities;
12411
12412typedef struct {
12413 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12414 /** table ID - to allow support for multiple simultaneous tables */
12415 A_UINT32 table_id;
12416 /** size in bytes of hotlist entry */
12417 A_UINT32 wlan_hotlist_entry_size;
12418 /** maximum number of entries in wlan change table */
12419 A_UINT32 max_hotlist_entries;
12420} wmi_extscan_hotlist_monitor_capabilities;
12421
12422typedef struct {
12423 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
12424 /** Request ID - matches request ID used to start hot list monitoring */
12425 A_UINT32 request_id;
12426 /** Requestor ID - client requesting stop */
12427 A_UINT32 requestor_id;
12428 /** number of extscan caches */
12429 A_UINT32 num_extscan_cache_tables;
12430 /** number of wlan change lists */
12431 A_UINT32 num_wlan_change_monitor_tables;
12432 /** number of hotlists */
12433 A_UINT32 num_hotlist_monitor_tables;
12434 /** if one sided rtt data collection is supported */
12435 A_UINT32 rtt_one_sided_supported;
12436 /** if 11v data collection is supported */
12437 A_UINT32 rtt_11v_supported;
12438 /** if 11mc data collection is supported */
12439 A_UINT32 rtt_ftm_supported;
12440 /** number of extscan cache capabilities (one per table) */
12441 A_UINT32 num_extscan_cache_capabilities;
12442 /** number of wlan change capabilities (one per table) */
12443 A_UINT32 num_extscan_wlan_change_capabilities;
12444 /** number of extscan hotlist capabilities (one per table) */
12445 A_UINT32 num_extscan_hotlist_capabilities;
12446 /* Following this structure is the TLV:
12447 * wmi_extscan_cache_capabilities extscan_cache_capabilities; // number of capabilities given by num_extscan_caches
12448 * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; // number of capabilities given by num_wlan_change_monitor_tables
12449 * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; // number of capabilities given by num_hotlist_monitor_tables
12450 */
12451} wmi_extscan_set_capabilities_cmd_fixed_param;
12452
12453typedef struct {
12454 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
12455 /** Request ID - matches request ID used to start hot list monitoring */
12456 A_UINT32 request_id;
12457 /** Requestor ID - client requesting capabilities */
12458 A_UINT32 requestor_id;
12459} wmi_extscan_get_capabilities_cmd_fixed_param;
12460
12461typedef struct {
12462 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
12463 /** Request ID of the operation that was started/stopped */
12464 A_UINT32 request_id;
12465 /** Requestor ID of the operation that was started/stopped */
12466 A_UINT32 requestor_id;
12467 /** VDEV id(interface) of the operation that was started/stopped */
12468 A_UINT32 vdev_id;
12469 /** extscan WMI command */
12470 A_UINT32 command;
12471 /** operation mode: start/stop */
12472 A_UINT32 mode; /* wmi_extscan_operation_mode */
12473 /**success/failure */
12474 A_UINT32 status; /* enum wmi_extscan_start_stop_status */
12475 /** table ID - to allow support for multiple simultaneous requests */
12476 A_UINT32 table_id;
12477} wmi_extscan_start_stop_event_fixed_param;
12478
12479typedef struct {
12480 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
12481 /** Request ID of the extscan operation that is currently running */
12482 A_UINT32 request_id;
12483 /** Requestor ID of the extscan operation that is currently running */
12484 A_UINT32 requestor_id;
12485 /** VDEV id(interface) of the extscan operation that is currently running */
12486 A_UINT32 vdev_id;
12487 /** scan event (wmi_scan_event_type) */
12488 A_UINT32 event; /* wmi_extscan_event_type */
12489 /** table ID - to allow support for multiple simultaneous requests */
12490 A_UINT32 table_id;
12491 /**number of buckets */
12492 A_UINT32 num_buckets;
12493 /* Following this structure is the TLV:
12494 * A_UINT32 bucket_id[]; // number of elements given by field num_buckets.
12495 */
12496} wmi_extscan_operation_event_fixed_param;
12497
12498/* Types of extscan tables */
12499typedef enum {
12500 EXTSCAN_TABLE_NONE = 0,
12501 EXTSCAN_TABLE_BSSID = 1,
12502 EXTSCAN_TABLE_RSSI = 2,
12503} wmi_extscan_table_type;
12504
12505typedef struct {
12506 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
12507 /** Request ID of the extscan operation that is currently running */
12508 A_UINT32 request_id;
12509 /** Requestor ID of the extscan operation that is currently running */
12510 A_UINT32 requestor_id;
12511 /** VDEV id(interface) of the extscan operation that is currently running */
12512 A_UINT32 vdev_id;
12513 /** table ID - to allow support for multiple simultaneous tables */
12514 A_UINT32 table_id;
12515 /**see wmi_extscan_table_type for table reporting usage */
12516 A_UINT32 table_type;
12517 /**number of entries in use */
12518 A_UINT32 entries_in_use;
12519 /**maximum number of entries in table */
12520 A_UINT32 maximum_entries;
12521} wmi_extscan_table_usage_event_fixed_param;
12522
12523typedef enum {
12524 /**
12525 * Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
12526 * this can be used to discard scan results
12527 */
12528 WMI_SCAN_STATUS_INTERRUPTED = 1
12529} wmi_scan_status_flags;
12530
12531
12532typedef struct {
12533 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
Anurag Chouhancc474b72016-04-18 17:36:23 +053012534 /** RSSI */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012535 A_UINT32 rssi;
Anurag Chouhancc474b72016-04-18 17:36:23 +053012536 /** time stamp in milliseconds */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012537 A_UINT32 tstamp;
12538 /** Extscan cycle during which this entry was scanned */
12539 A_UINT32 scan_cycle_id;
12540 /**
12541 * flag to indicate if the given result was obtained as part of
12542 * interrupted (aborted/large time gap preempted) scan
12543 */
12544 A_UINT32 flags;
Anurag Chouhancc474b72016-04-18 17:36:23 +053012545 /** Bitmask of buckets (i.e. sets of channels) scanned */
12546 A_UINT32 buckets_scanned;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012547} wmi_extscan_rssi_info;
12548
12549typedef struct {
12550 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12551 /**bssid */
12552 wmi_mac_addr bssid;
12553 /**ssid */
12554 wmi_ssid ssid;
12555 /**channel number */
12556 A_UINT32 channel;
12557 /* capabilities */
12558 A_UINT32 capabilities;
12559 /* beacon interval in TUs */
12560 A_UINT32 beacon_interval;
12561 /**time stamp in milliseconds - time last seen */
12562 A_UINT32 tstamp;
12563 /**flags - _tExtScanEntryFlags */
12564 A_UINT32 flags;
12565 /**RTT in ns */
12566 A_UINT32 rtt;
12567 /**rtt standard deviation */
12568 A_UINT32 rtt_sd;
12569 /* rssi information */
12570 A_UINT32 number_rssi_samples;
12571 /** IE length */
12572 A_UINT32 ie_length; /* length of IE data */
12573} wmi_extscan_wlan_descriptor;
12574
12575typedef struct {
12576 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
12577 /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
12578 A_UINT32 request_id;
12579 /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
12580 A_UINT32 requestor_id;
12581 /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
12582 A_UINT32 vdev_id;
12583 /** Request ID of the extscan operation that is currently running */
12584 A_UINT32 extscan_request_id;
12585 /** Requestor ID of the extscan operation that is currently running */
12586 A_UINT32 extscan_requestor_id;
12587 /** VDEV id(interface) of the extscan operation that is currently running */
12588 A_UINT32 extscan_vdev_id;
12589 /** table ID - to allow support for multiple simultaneous tables */
12590 A_UINT32 table_id;
12591 /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
12592 A_UINT32 current_tstamp;
12593 /**total number of bssids (in all pages) */
12594 A_UINT32 total_entries;
12595 /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
12596 A_UINT32 first_entry_index;
12597 /**number of bssids in this page */
12598 A_UINT32 num_entries_in_page;
Govind Singhfad2f212016-01-21 10:55:51 +053012599 /* number of buckets scanned */
12600 A_UINT32 buckets_scanned;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012601 /* Followed by the variable length TLVs
12602 * wmi_extscan_wlan_descriptor bssid_list[]
12603 * wmi_extscan_rssi_info rssi_list[]
12604 * A_UINT8 ie_list[]
12605 */
12606} wmi_extscan_cached_results_event_fixed_param;
12607
12608typedef enum {
12609 EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00,
12610 EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
12611 EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02,
12612} wmi_extscan_wlan_change_flags;
12613
12614typedef struct {
12615 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12616 /**bssid */
12617 wmi_mac_addr bssid;
12618 /**time stamp in milliseconds */
12619 A_UINT32 tstamp;
12620 /**upper RSSI limit */
12621 A_UINT32 upper_rssi_limit;
12622 /**lower RSSI limit */
12623 A_UINT32 lower_rssi_limit;
12624 /** channel */
12625 A_UINT32 channel; /* in MHz */
12626 /**current RSSI average */
12627 A_UINT32 rssi_average;
12628 /**flags - wmi_extscan_wlan_change_flags */
12629 A_UINT32 flags;
12630 /**legnth of RSSI history to follow (number of values) */
12631 A_UINT32 num_rssi_samples;
12632} wmi_extscan_wlan_change_result_bssid;
12633
12634typedef struct {
12635 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
12636 /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
12637 A_UINT32 request_id;
12638 /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
12639 A_UINT32 requestor_id;
12640 /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
12641 A_UINT32 vdev_id;
12642 /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
12643 A_UINT32 config_request_id;
12644 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
12645 A_UINT32 config_requestor_id;
12646 /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
12647 A_UINT32 config_vdev_id;
12648 /** table ID - to allow support for multiple simultaneous tables */
12649 A_UINT32 table_id;
12650 /**number of entries with RSSI out of range or BSSID not detected */
12651 A_UINT32 change_count;
12652 /**total number of bssid signal descriptors (in all pages) */
12653 A_UINT32 total_entries;
12654 /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
12655 A_UINT32 first_entry_index;
12656 /**number of bssids signal descriptors in this page */
12657 A_UINT32 num_entries_in_page;
12658 /* Following this structure is the TLV:
12659 * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[]; // number of descriptors given by field num_entries_in_page.
12660 * Following this structure is the list of RSSI values (each is an A_UINT8):
12661 * A_UINT8 rssi_list[]; // last N RSSI values.
12662 */
12663} wmi_extscan_wlan_change_results_event_fixed_param;
12664
12665enum _tExtScanEntryFlags {
12666 WMI_HOTLIST_FLAG_NONE = 0x00,
12667 WMI_HOTLIST_FLAG_PRESENCE = 0x01,
12668 WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
12669};
12670
12671typedef struct {
12672 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
12673 /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
12674 A_UINT32 config_request_id;
12675 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
12676 A_UINT32 config_requestor_id;
12677 /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
12678 A_UINT32 config_vdev_id;
12679 /** table ID - to allow support for multiple simultaneous tables */
12680 A_UINT32 table_id;
12681 /**total number of bssids (in all pages) */
12682 A_UINT32 total_entries;
12683 /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
12684 A_UINT32 first_entry_index;
12685 /**number of bssids in this page */
12686 A_UINT32 num_entries_in_page;
12687 /* Following this structure is the TLV:
12688 * wmi_extscan_wlan_descriptor hotlist_match[]; // number of descriptors given by field num_entries_in_page.
12689 */
12690} wmi_extscan_hotlist_match_event_fixed_param;
12691
12692typedef struct {
12693 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
12694 /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
12695 A_UINT32 request_id;
12696 /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
12697 A_UINT32 requestor_id;
12698 /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
12699 A_UINT32 vdev_id;
12700 /** number of extscan caches */
12701 A_UINT32 num_extscan_cache_tables;
12702 /** number of wlan change lists */
12703 A_UINT32 num_wlan_change_monitor_tables;
12704 /** number of hotlists */
12705 A_UINT32 num_hotlist_monitor_tables;
12706 /** if one sided rtt data collection is supported */
12707 A_UINT32 rtt_one_sided_supported;
12708 /** if 11v data collection is supported */
12709 A_UINT32 rtt_11v_supported;
12710 /** if 11mc data collection is supported */
12711 A_UINT32 rtt_ftm_supported;
12712 /** number of extscan cache capabilities (one per table) */
12713 A_UINT32 num_extscan_cache_capabilities;
12714 /** number of wlan change capabilities (one per table) */
12715 A_UINT32 num_extscan_wlan_change_capabilities;
12716 /** number of extscan hotlist capabilities (one per table) */
12717 A_UINT32 num_extscan_hotlist_capabilities;
12718 /* max number of roaming ssid whitelist firmware can support */
12719 A_UINT32 num_roam_ssid_whitelist;
12720 /* max number of blacklist bssid firmware can support */
12721 A_UINT32 num_roam_bssid_blacklist;
12722 /* max number of preferred list firmware can support */
12723 A_UINT32 num_roam_bssid_preferred_list;
12724 /* max number of hotlist ssids firmware can support */
12725 A_UINT32 num_extscan_hotlist_ssid;
12726 /* max number of epno networks firmware can support */
12727 A_UINT32 num_epno_networks;
12728
12729 /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
12730 * supports multiple lists of each type.
12731 *
12732 * wmi_extscan_cache_capabilities extscan_cache_capabilities[] // capabilities of extscan cache (BSSID/RSSI lists)
12733 * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] // capabilities of wlan_change_monitor_tables
12734 * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] // capabilities of hotlist_monitor_tables
12735 */
12736} wmi_extscan_capabilities_event_fixed_param;
12737
12738/* WMI_D0_WOW_DISABLE_ACK_EVENTID */
12739typedef struct {
12740 A_UINT32 tlv_header;
12741 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */
12742 A_UINT32 reserved0; /* for future need */
12743} wmi_d0_wow_disable_ack_event_fixed_param;
12744
12745/** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
12746typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053012747 /** TLV tag and len; tag equals
12748 * WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param
12749 */
12750 A_UINT32 tlv_header;
12751 /** pdev_id for identifying the MAC
12752 * See macros starting with WMI_PDEV_ID_ for values.
12753 */
12754 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012755} wmi_pdev_resume_event_fixed_param;
12756
12757/** value representing all modules */
12758#define WMI_DEBUG_LOG_MODULE_ALL 0xffff
12759
12760/* param definitions */
12761
12762/**
12763 * Log level for a given module. Value contains both module id and log level.
12764 * here is the bitmap definition for value.
12765 * module Id : 16
12766 * Flags : reserved
12767 * Level : 8
12768 * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global).
12769 * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
12770 */
12771#define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1
12772
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012773#define WMI_DBGLOG_SET_LOG_LEVEL(val, lvl) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012774 (val) |= (lvl & 0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012775} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012776
12777#define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
12778
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012779#define WMI_DBGLOG_SET_MODULE_ID(val, mid) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012780 (val) |= ((mid & 0xffff) << 16); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012781} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012782
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012783#define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012784
12785/**
12786 * Enable the debug log for a given vdev. Value is vdev id
12787 */
12788#define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2
12789
12790/**
12791 * Disable the debug log for a given vdev. Value is vdev id
12792 * All the log level for a given VDEV is disabled except the ERROR log messages
12793 */
12794
12795#define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3
12796
12797/**
12798 * set vdev enable bitmap. value is the vden enable bitmap
12799 */
12800#define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4
12801
12802/**
12803 * set a given log level to all the modules specified in the module bitmap.
12804 * and set the log levle for all other modules to DBGLOG_ERR.
12805 * value: log levelt to be set.
12806 * module_id_bitmap : identifies the modules for which the log level should be set and
12807 * modules for which the log level should be reset to DBGLOG_ERR.
12808 */
12809#define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5
12810
12811#define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
12812
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012813#define WMI_MODULE_ENABLE(pmid_bitmap, mod_id) \
12814 ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
12815 (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012816
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012817#define WMI_MODULE_DISABLE(pmid_bitmap, mod_id) \
12818 ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \
12819 (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012820
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012821#define WMI_MODULE_IS_ENABLED(pmid_bitmap, mod_id) \
12822 (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \
12823 (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012824
12825#define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
12826typedef struct {
12827 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
12828 A_UINT32 dbg_log_param;
12829 /** param types are defined above */
12830 A_UINT32 value;
12831 /* The below array will follow this tlv ->fixed length module_id_bitmap[]
12832 A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
12833 */
12834} wmi_debug_log_config_cmd_fixed_param;
12835
12836typedef struct {
12837 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */
12838 A_UINT32 param; /* Reserved for future use */
Govind Singh869c9872016-02-22 18:36:34 +053012839 /** pdev_id for identifying the MAC
12840 * See macros starting with WMI_PDEV_ID_ for values.
12841 */
12842 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012843} wmi_pdev_get_temperature_cmd_fixed_param;
12844
12845typedef struct {
12846 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
12847 A_INT32 value; /* temprature value in Celcius degree */
Govind Singh869c9872016-02-22 18:36:34 +053012848 /** pdev_id for identifying the MAC
12849 * See macros starting with WMI_PDEV_ID_ for values.
12850 */
12851 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012852} wmi_pdev_temperature_event_fixed_param;
12853
12854typedef struct {
12855 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
12856 A_UINT32 vdev_id;
12857 A_UINT32 enable;
12858 A_UINT32 srv_ipv4; /* server IP */
12859 A_UINT32 start_lsb; /* starting address assigned to client */
12860 A_UINT32 num_client; /* number of clients we support */
12861} wmi_set_dhcp_server_offload_cmd_fixed_param;
12862
12863typedef enum {
12864 AP_RX_DATA_OFFLOAD = 0x00,
12865 STA_RX_DATA_OFFLOAD = 0x01,
12866} wmi_ipa_offload_types;
12867
12868/**
12869 * This command is sent from WLAN host driver to firmware for
12870 * enabling/disabling IPA data-path offload features.
12871 *
12872 *
12873 * Enabling data path offload to IPA(based on host INI configuration), example:
12874 * when STA interface comes up,
12875 * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
12876 * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
12877 *
12878 * Disabling data path offload to IPA, example:
12879 * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
12880 * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
12881 *
12882 *
12883 * This command is applicable only on the PCIE LL systems
12884 *
12885 */
12886typedef struct {
12887 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
12888 A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
12889 A_UINT32 vdev_id;
12890 A_UINT32 enable; /* 1 == enable, 0 == disable */
12891} wmi_ipa_offload_enable_disable_cmd_fixed_param;
12892
12893typedef enum {
12894 WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0,
12895 WMI_LED_FLASHING_PATTERN_CONNECTED = 1,
12896 WMI_LED_FLASHING_PATTERN_RESERVED = 2,
12897} wmi_set_led_flashing_type;
12898
12899/**
12900 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.
12901 Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
12902 remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
12903 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
12904 pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to
12905 High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
12906 Zero is reached, it is skipped and moves on to the next interval.
12907 */
12908typedef struct {
12909 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */
12910 A_UINT32 pattern_id; /* pattern identifier */
12911 A_UINT32 led_x0; /* led flashing parameter0 */
12912 A_UINT32 led_x1; /* led flashing parameter1 */
12913 A_UINT32 gpio_num; /* GPIO number */
12914} wmi_set_led_flashing_cmd_fixed_param;
12915
12916/**
12917 * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
12918 * within small networks that do not include a local name server.
12919 * It utilizes essentially the same programming interfaces, packet formats and operating semantics
12920 * as the unicast DNS, and the advantage is zero configuration service while no need for central or
12921 * global server.
12922 * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
12923 * by type in a specified domain using standard DNS queries.
12924 * Here, we provide the ability to advertise the available services by responding to mDNS queries.
12925 */
12926typedef struct {
12927 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
12928 A_UINT32 vdev_id;
12929 A_UINT32 enable;
12930} wmi_mdns_offload_cmd_fixed_param;
12931
12932#define WMI_MAX_MDNS_FQDN_LEN 64
12933#define WMI_MAX_MDNS_RESP_LEN 512
12934#define WMI_MDNS_FQDN_TYPE_GENERAL 0
12935#define WMI_MDNS_FQDN_TYPE_UNIQUE 1
12936
12937typedef struct {
12938 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
12939 A_UINT32 vdev_id;
12940 /** type of fqdn, general or unique */
12941 A_UINT32 type;
12942 /** length of fqdn */
12943 A_UINT32 fqdn_len;
12944 /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
12945 * A_UINT8 fqdn_data[]; // fully-qualified domain name to check if match with the received queries
12946 */
12947} wmi_mdns_set_fqdn_cmd_fixed_param;
12948
12949typedef struct {
12950 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
12951 A_UINT32 vdev_id;
12952 /** Answer Resource Record count */
12953 A_UINT32 AR_count;
12954 /** length of response */
12955 A_UINT32 resp_len;
12956 /* Following this structure is the TLV byte stream of resp data of length resp_len
12957 * A_UINT8 resp_data[]; // responses consisits of Resource Records
12958 */
12959} wmi_mdns_set_resp_cmd_fixed_param;
12960
12961typedef struct {
12962 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
12963 A_UINT32 vdev_id;
12964} wmi_mdns_get_stats_cmd_fixed_param;
12965
12966typedef struct {
12967 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
12968 A_UINT32 vdev_id;
12969 /** curTimestamp in milliseconds */
12970 A_UINT32 curTimestamp;
12971 /** last received Query in milliseconds */
12972 A_UINT32 lastQueryTimestamp;
12973 /** last sent Response in milliseconds */
12974 A_UINT32 lastResponseTimestamp;
12975 /** stats of received queries */
12976 A_UINT32 totalQueries;
12977 /** stats of macth queries */
12978 A_UINT32 totalMatches;
12979 /** stats of responses */
12980 A_UINT32 totalResponses;
12981 /** indicate the current status of mDNS offload */
12982 A_UINT32 status;
12983} wmi_mdns_stats_event_fixed_param;
12984
12985/**
12986 * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
12987 * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
12988 * request and create/remove connection even host is suspended.
12989 * 3 major components are offloaded:
12990 * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
12991 * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
12992 * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
12993 * Current implementation only supports WPA2 CCMP.
12994 */
12995
12996typedef struct {
12997 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
12998 /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
12999 A_UINT32 vdev_id;
13000 /** enable/disable sap auth offload */
13001 A_UINT32 enable;
13002 /** sap ssid */
13003 wmi_ssid ap_ssid;
13004 /** authentication mode (defined above) */
13005 A_UINT32 rsn_authmode;
13006 /** unicast cipher set */
13007 A_UINT32 rsn_ucastcipherset;
13008 /** mcast/group cipher set */
13009 A_UINT32 rsn_mcastcipherset;
13010 /** mcast/group management frames cipher set */
13011 A_UINT32 rsn_mcastmgmtcipherset;
13012 /** sap channel */
13013 A_UINT32 channel;
13014 /** length of psk */
13015 A_UINT32 psk_len;
13016 /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
13017 * A_UINT8 psk[];
13018 */
13019} wmi_sap_ofl_enable_cmd_fixed_param;
13020
13021typedef struct {
13022 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
13023 /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
13024 A_UINT32 vdev_id;
13025 /** aid (association id) of this station */
13026 A_UINT32 assoc_id;
13027 /** peer station's mac addr */
13028 wmi_mac_addr peer_macaddr;
13029 /** length of association request frame */
13030 A_UINT32 data_len;
13031 /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
13032 * A_UINT8 bufp[];
13033 */
13034} wmi_sap_ofl_add_sta_event_fixed_param;
13035
13036typedef enum {
13037 SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
13038 SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
13039} wmi_sap_ofl_del_sta_flags;
13040
13041typedef struct {
13042 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
13043 /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
13044 A_UINT32 vdev_id;
13045 /** aid (association id) of this station */
13046 A_UINT32 assoc_id;
13047 /** peer station's mac addr */
13048 wmi_mac_addr peer_macaddr;
13049 /** disassociation reason */
13050 A_UINT32 reason;
13051 /** flags - wmi_sap_ofl_del_sta_flags */
13052 A_UINT32 flags;
13053} wmi_sap_ofl_del_sta_event_fixed_param;
13054
13055typedef struct {
13056 /*
13057 * TLV tag and len; tag equals
13058 * WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param
13059 */
13060 A_UINT32 tlv_header;
13061 A_UINT32 vdev_id;
13062 /* Number of client failure connection attempt */
13063 A_UINT32 num_retry;
13064 /*Time in milliseconds to record the client's failure connection attempts*/
13065 A_UINT32 retry_allow_time_ms;
13066 /*
13067 * Time in milliseconds to drop the connection request if
13068 * client is blacklisted
13069 */
13070 A_UINT32 blackout_time_ms;
13071} wmi_sap_set_blacklist_param_cmd_fixed_param;
13072
13073typedef struct {
13074 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
13075 A_UINT32 data_len; /** length in byte of data[]. */
13076 /** This structure is used to send REQ binary blobs
13077 * from application/service to firmware where Host drv is pass through .
13078 * Following this structure is the TLV:
13079 * A_UINT8 data[]; // length in byte given by field data_len.
13080 */
13081} wmi_apfind_cmd_param;
13082
13083typedef enum apfind_event_type_e {
13084 APFIND_MATCH_EVENT = 0,
13085 APFIND_WAKEUP_EVENT,
13086} APFIND_EVENT_TYPE;
13087
13088typedef struct {
13089 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
13090 A_UINT32 event_type; /** APFIND_EVENT_TYPE */
13091 A_UINT32 data_len; /** length in byte of data[]. */
13092 /** This structure is used to send event binary blobs
13093 * from firmware to application/service and Host drv.
13094 * Following this structure is the TLV:
13095 * A_UINT8 data[]; // length in byte given by field data_len.
13096 */
13097} wmi_apfind_event_hdr;
13098
13099/**
13100 * OCB DCC types and structures.
13101 */
13102
13103/**
13104 * DCC types as described in ETSI TS 102 687
13105 * Type Format stepSize referenceValue numBits
13106 * -------------------------------------------------------------------------
13107 * ndlType_acPrio INTEGER (0...7) 1 number 3
13108 * ndlType_controlLoop INTEGER (0...7) 1 0 3
13109 * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13
13110 * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10
13111 * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13
13112 * ndlType_datarate INTEGER (0..7) Table 8 3
13113 * ndlType_distance INTEGER (0..4095) 1 m 0 12
13114 * ndlType_numberElements INTEGER (0..63) number 6
13115 * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11
13116 * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10
13117 * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5
13118 * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7
13119 * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7
13120 * ndlType_timing INTEGER (0..4095) 10 ms 0 12
13121 * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7
13122 * ndlType_ratio INTEGER (0..100) 1 % 0 % 7
13123 * ndlType_exponent INTEGER (0..100) 0.1 0 7
13124 * ndlType_queueStatus Enumeration Table A.2 1
13125 * ndlType_dccMechanism Bitset Table A.2 6
13126 *
13127 * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
13128 * cannot be changed without breaking WMI compatibility.
13129 *
13130 * NOTE: For each of the types, one additional bit is allocated. This
13131 * leftmost bit is used to indicate that the value is invalid.
13132 */
13133#define SIZE_NDLTYPE_ACPRIO (1 + 3)
13134#define SIZE_NDLTYPE_CONTROLLOOP (1 + 3)
13135#define SIZE_NDLTYPE_ARRIVALRATE (1 + 13)
13136#define SIZE_NDLTYPE_CHANNELLOAD (1 + 10)
13137#define SIZE_NDLTYPE_CHANNELUSE (1 + 13)
13138#define SIZE_NDLTYPE_DATARATE (1 + 3)
13139#define SIZE_NDLTYPE_DISTANCE (1 + 12)
13140#define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6)
13141#define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
13142#define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
13143#define SIZE_NDLTYPE_PATHLOSS (1 + 5)
13144#define SIZE_NDLTYPE_RXPOWER (1 + 7)
13145#define SIZE_NDLTYPE_SNR (1 + 7)
13146#define SIZE_NDLTYPE_TIMING (1 + 12)
13147#define SIZE_NDLTYPE_TXPOWER (1 + 7)
13148#define SIZE_NDLTYPE_RATIO (1 + 7)
13149#define SIZE_NDLTYPE_EXPONENT (1 + 7)
13150#define SIZE_NDLTYPE_QUEUESTATUS (1 + 1)
13151#define SIZE_NDLTYPE_DCCMECHANISM (1 + 6)
13152#define SIZE_BYTE (8)
13153
13154#define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
13155#define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
13156#define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
13157#define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
13158#define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
13159#define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1)
13160#define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
13161#define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
13162#define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
13163#define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
13164#define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
13165#define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
13166#define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1)
13167#define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1)
13168#define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
13169#define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1)
13170#define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
13171#define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
13172#define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
13173
13174/**
13175 * The MCS_COUNT macro cannot be modified without breaking
13176 * WMI compatibility.
13177 */
13178#define MCS_COUNT (8)
13179
13180/**
13181 * Flags for ndlType_dccMechanism.
13182 */
13183typedef enum {
13184 DCC_MECHANISM_TPC = 1,
13185 DCC_MECHANISM_TRC = 2,
13186 DCC_MECHANISM_TDC = 4,
13187 DCC_MECHANISM_DSC = 8,
13188 DCC_MECHANISM_TAC = 16,
13189 DCC_MECHANISM_RESERVED = 32,
13190 DCC_MECHANISM_ALL = 0x3f,
13191} wmi_dcc_ndl_type_dcc_mechanism;
13192
13193/** Values for ndlType_queueStatus. */
13194typedef enum {
13195 DCC_QUEUE_CLOSED = 0,
13196 DCC_QUEUE_OPEN = 1,
13197} wmi_dcc_ndl_type_queue_status;
13198
13199/**
13200 * For ndlType_acPrio, use the values in wmi_traffic_ac.
13201 * Values for ndlType_datarate.
13202 */
13203typedef enum {
13204 DCC_DATARATE_3_MBPS = 0,
13205 DCC_DATARATE_4_5_MBPS = 1,
13206 DCC_DATARATE_6_MBPS = 2,
13207 DCC_DATARATE_9_MBPS = 3,
13208 DCC_DATARATE_12_MBPS = 4,
13209 DCC_DATARATE_18_MBPS = 5,
13210 DCC_DATARATE_24_MBPS = 6,
13211 DCC_DATARATE_27_MBPS = 7,
13212} wmi_dcc_ndl_type_datarate;
13213
13214/** Data structure for active state configuration. */
13215typedef struct {
13216 /** TLV tag and len; tag equals
13217 * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config
13218 */
13219 A_UINT32 tlv_header;
13220 /**
13221 * NDL_asStateId, ndlType_numberElements, 1+6 bits.
13222 * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
13223 */
13224 A_UINT32 state_info;
13225 /**
13226 * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
13227 * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
13228 * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
13229 * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
13230 */
13231 A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
13232 /**
13233 * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
13234 * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
13235 * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
13236 * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
13237 */
13238 A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
13239 /**
13240 * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
13241 * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
13242 * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
13243 * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
13244 */
13245 A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
13246 /**
13247 * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
13248 * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
13249 * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
13250 * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
13251 */
13252 A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
13253 /**
13254 * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
13255 * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
13256 * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
13257 * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
13258 */
13259 A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
13260} wmi_dcc_ndl_active_state_config;
13261
13262#define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7)
13263#define WMI_NDL_AS_STATE_ID_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 0, 7, val)
13264#define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11)
13265#define WMI_NDL_AS_CHAN_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 7, 11, val)
13266#define WMI_NDL_AS_DCC_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
13267#define WMI_NDL_AS_DCC_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
13268#define WMI_NDL_AS_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
13269#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)
13270#define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
13271#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)
13272#define WMI_NDL_AS_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
13273#define WMI_NDL_AS_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
13274#define WMI_NDL_AS_CARRIER_SENSE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
13275#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)
13276
13277/** Data structure for EDCA/QOS parameters. */
13278typedef struct {
13279 /** TLV tag and len; tag equals
13280 * WMITLV_TAG_STRUC_wmi_qos_parameter */
13281 A_UINT32 tlv_header;
13282 /** Arbitration Inter-Frame Spacing. Range: 2-15 */
13283 A_UINT32 aifsn;
13284 /** Contention Window minimum. Range: 1 - 10 */
13285 A_UINT32 cwmin;
13286 /** Contention Window maximum. Range: 1 - 10 */
13287 A_UINT32 cwmax;
13288} wmi_qos_parameter;
13289
13290/** Data structure for information specific to a channel. */
13291typedef struct {
13292 /** TLV tag and len; tag equals
13293 * WMITLV_TAG_STRUC_wmi_ocb_channel */
13294 A_UINT32 tlv_header;
13295 A_UINT32 bandwidth; /* MHz units */
13296 wmi_mac_addr mac_address;
13297} wmi_ocb_channel;
13298
13299/** Data structure for an element of the schedule array. */
13300typedef struct {
13301 /** TLV tag and len; tag equals
13302 * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
13303 A_UINT32 tlv_header;
13304 A_UINT32 channel_freq; /* MHz units */
13305 A_UINT32 total_duration; /* ms units */
13306 A_UINT32 guard_interval; /* ms units */
13307} wmi_ocb_schedule_element;
13308
13309/** Data structure for OCB configuration. */
13310typedef struct {
13311 /** TLV tag and len; tag equals
13312 * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
13313 A_UINT32 tlv_header;
13314 /** VDEV id(interface) that is being configured */
13315 A_UINT32 vdev_id;
13316 A_UINT32 channel_count;
13317 A_UINT32 schedule_size;
13318 A_UINT32 flags;
13319
13320 /** This is followed by a TLV array of wmi_channel.
13321 * This is followed by a TLV array of wmi_ocb_channel.
13322 * This is followed by a TLV array of wmi_qos_parameter.
13323 * This is followed by a TLV array of wmi_dcc_ndl_chan.
13324 * This is followed by a TLV array of wmi_dcc_ndl_active_state_config.
13325 * This is followed by a TLV array of wmi_ocb_schedule_element.
13326 */
13327} wmi_ocb_set_config_cmd_fixed_param;
13328
13329
13330#define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0
13331#define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1
13332
13333#define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) \
13334 (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
13335
13336
13337/** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
13338typedef struct {
13339 /** TLV tag and len; tag equals
13340 * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param
13341 */
13342 A_UINT32 tlv_header;
13343 /* VDEV id(interface)*/
13344 A_UINT32 vdev_id;
13345 A_UINT32 status;
13346} wmi_ocb_set_config_resp_event_fixed_param;
13347
13348/* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
13349 * WMI compatibility.
13350 */
13351/* The size of the utc time in bytes. */
13352#define SIZE_UTC_TIME (10)
13353/* The size of the utc time error in bytes. */
13354#define SIZE_UTC_TIME_ERROR (5)
13355
13356/** Data structure to set the UTC time. */
13357typedef struct {
13358 /** TLV tag and len; tag equals
13359 * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
13360 A_UINT32 tlv_header;
13361 /*VDEV Identifier*/
13362 A_UINT32 vdev_id;
13363 /** 10 bytes of the utc time. */
13364 A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME, SIZE_BYTE)];
13365 /** 5 bytes of the time error. */
13366 A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR, SIZE_BYTE)];
13367} wmi_ocb_set_utc_time_cmd_fixed_param;
13368
13369#define WMI_UTC_TIME_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
13370#define WMI_UTC_TIME_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
13371#define WMI_TIME_ERROR_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
13372#define WMI_TIME_ERROR_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
13373
13374/** Data structure start the timing advertisement. The template for the
13375 * timing advertisement frame follows this structure in the WMI command.
13376 */
13377typedef struct {
13378 /** TLV tag and len; tag equals
13379 * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
13380 A_UINT32 tlv_header;
13381 /*VDEV Identifier*/
13382 A_UINT32 vdev_id;
13383 /** Number of times the TA is sent every 5 seconds. */
13384 A_UINT32 repeat_rate;
13385 /** The frequency on which to transmit. */
13386 A_UINT32 channel_freq; /* MHz units */
13387 /** The offset into the template of the timestamp. */
13388 A_UINT32 timestamp_offset;
13389 /** The offset into the template of the time value. */
13390 A_UINT32 time_value_offset;
13391 /** The length of the timing advertisement template. The
13392 * template is in the TLV data. */
13393 A_UINT32 timing_advert_template_length;
13394 /** This is followed by a binary array containing the TA template. */
13395} wmi_ocb_start_timing_advert_cmd_fixed_param;
13396
13397/** Data structure to stop the timing advertisement. */
13398typedef struct {
13399 /** TLV tag and len; tag equals
13400 * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
13401 A_UINT32 tlv_header;
13402 /*VDEV Identifier*/
13403 A_UINT32 vdev_id;
13404 A_UINT32 channel_freq; /* MHz units */
13405} wmi_ocb_stop_timing_advert_cmd_fixed_param;
13406
13407/** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
13408typedef struct {
13409 /** TLV tag and len; tag equals
13410 * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
13411 A_UINT32 tlv_header;
13412 /*VDEV Identifier*/
13413 A_UINT32 vdev_id;
13414 A_UINT32 reserved;
13415} wmi_ocb_get_tsf_timer_cmd_fixed_param;
13416
13417/** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
13418typedef struct {
13419 /** TLV tag and len; tag equals
13420 * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
13421 A_UINT32 tlv_header;
13422 /*VDEV Identifier*/
13423 A_UINT32 vdev_id;
13424 A_UINT32 tsf_timer_high;
13425 A_UINT32 tsf_timer_low;
13426} wmi_ocb_get_tsf_timer_resp_event_fixed_param;
13427
13428/** Data structure for DCC stats configuration per channel. */
13429typedef struct {
13430 /** TLV tag and len; tag equals
13431 * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
13432 A_UINT32 tlv_header;
13433
13434 /*VDEV Identifier*/
13435 A_UINT32 vdev_id;
13436
13437 /** The channel for which this applies, 16 bits.
13438 * The dcc_stats_bitmap, 8 bits. */
13439 A_UINT32 chan_info;
13440
13441 /** Demodulation model parameters.
13442 *
13443 * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
13444 * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
13445 * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
13446 * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
13447 * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
13448 * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
13449 * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
13450 * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
13451 */
13452 A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)];
13453
13454 /** Communication ranges.
13455 *
13456 * tx_power, ndlType_txPower, 1+7 bits.
13457 * datarate, ndlType_datarate, 1+3 bits.
13458 */
13459 A_UINT32 tx_power_datarate;
13460 /**
13461 * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
13462 * NDL_estCommRange, ndlType_distance, 1+12 bits.
13463 */
13464 A_UINT32 carrier_sense_est_comm_range;
13465
13466 /** Channel load measures. */
13467 /**
13468 * dccSensitivity, ndlType_rxPower, 1+7 bits.
13469 * carrierSense, ndlType_rxPower, 1+7 bits.
13470 * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
13471 */
13472 A_UINT32 dcc_stats;
13473 /**
13474 * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
13475 * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
13476 */
13477 A_UINT32 packet_stats;
13478 /**
13479 * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
13480 */
13481 A_UINT32 channel_busy_time;
13482 /**
13483 *Transmit packet statistics.
13484 * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
13485 * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
13486 * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
13487 * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
13488 */
13489 A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
13490 /**
13491 * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
13492 * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
13493 * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
13494 * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
13495 */
13496 A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
13497 /**
13498 * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
13499 * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
13500 * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
13501 * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
13502 */
13503 A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
13504 /**
13505 * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
13506 * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
13507 * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
13508 * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
13509 */
13510 A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
13511} wmi_dcc_ndl_stats_per_channel;
13512
13513#define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
13514#define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
13515#define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
13516#define WMI_NDL_STATS_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
13517#define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8)
13518#define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
13519#define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
13520#define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
13521#define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
13522#define WMI_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
13523#define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
13524#define WMI_TX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
13525#define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
13526#define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
13527#define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
13528#define WMI_NDL_EST_COMM_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
13529#define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
13530#define WMI_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
13531#define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
13532#define WMI_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
13533#define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
13534#define WMI_NDL_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
13535#define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14)
13536#define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
13537#define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12)
13538#define WMI_NDL_PACKET_AVG_DURATION_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
13539#define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
13540#define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr, val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
13541
13542#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)
13543#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)
13544#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)
13545#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)
13546#define WMI_NDL_TX_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
13547#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)
13548#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)
13549#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)
13550
13551/** Bitmap for DCC stats. */
13552typedef enum {
13553 DCC_STATS_DEMODULATION_MODEL = 1,
13554 DCC_STATS_COMMUNICATION_RANGES = 2,
13555 DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
13556 DCC_STATS_TRANSMIT_PACKET_STATS = 8,
13557 DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
13558 DCC_STATS_ALL = 0xff,
13559} wmi_dcc_stats_bitmap;
13560
13561/** Data structure for getting the DCC stats. */
13562typedef struct {
13563 /**
13564 * TLV tag and len; tag equals
13565 * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param
13566 */
13567 A_UINT32 tlv_header;
13568 /* VDEV identifier */
13569 A_UINT32 vdev_id;
13570 /**The number of channels for which stats are being requested. */
13571 A_UINT32 num_channels;
13572 /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
13573} wmi_dcc_get_stats_cmd_fixed_param;
13574
13575typedef struct {
13576 /**
13577 * TLV tag and len; tag equals
13578 * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request.
13579 */
13580 A_UINT32 tlv_header;
13581 /** The channel for which this applies. */
13582 A_UINT32 chan_freq; /* MHz units */
13583 /** The DCC stats being requested. */
13584 A_UINT32 dcc_stats_bitmap;
13585} wmi_dcc_channel_stats_request;
13586
13587/** Data structure for the response with the DCC stats. */
13588typedef struct {
13589 /**
13590 * TLV tag and len; tag equals
13591 * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param
13592 */
13593 A_UINT32 tlv_header;
13594 /* VDEV identifier */
13595 A_UINT32 vdev_id;
13596 /** Number of channels in the response. */
13597 A_UINT32 num_channels;
13598 /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
13599} wmi_dcc_get_stats_resp_event_fixed_param;
13600
13601/** Data structure for clearing the DCC stats. */
13602typedef struct {
13603 /**
13604 * TLV tag and len; tag equals
13605 * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param
13606 */
13607 A_UINT32 tlv_header;
13608 /* VDEV identifier */
13609 A_UINT32 vdev_id;
13610 A_UINT32 dcc_stats_bitmap;
13611} wmi_dcc_clear_stats_cmd_fixed_param;
13612
13613/** Data structure for the pushed DCC stats */
13614typedef struct {
13615 /**
13616 * TLV tag and len; tag equals
13617 * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param
13618 */
13619 A_UINT32 tlv_header;
13620 /* VDEV identifier */
13621 A_UINT32 vdev_id;
13622 /** The number of channels in the response. */
13623 A_UINT32 num_channels;
13624 /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
13625} wmi_dcc_stats_event_fixed_param;
13626
13627/** Data structure for updating NDL per channel. */
13628typedef struct {
13629 /**
13630 * TLV tag and len; tag equals
13631 * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan
13632 */
13633 A_UINT32 tlv_header;
13634 /**
13635 * Channel frequency, 16 bits
13636 * NDL_numActiveState, ndlType_numberElements, 1+6 bits
13637 */
13638 A_UINT32 chan_info;
13639 /**
13640 * NDL_minDccSampling, 10 bits.
13641 * Maximum time interval between subsequent checks of the DCC rules.
13642 */
13643 A_UINT32 ndl_min_dcc_sampling;
13644 /**
13645 * dcc_enable, 1 bit.
13646 * dcc_stats_enable, 1 bit.
13647 * dcc_stats_interval, 16 bits.
13648 */
13649 A_UINT32 dcc_flags;
13650 /** General DCC configuration.
13651 * NDL_timeUp, ndlType_timing, 1+12 bits.
13652 * NDL_timeDown, ndlType_timing, 1+12 bits.
13653 */
13654 A_UINT32 general_config;
13655 /** Transmit power thresholds.
13656 * NDL_minTxPower, ndlType_txPower, 1+7 bits.
13657 * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
13658 */
13659 /* see "ETSI TS 102 687" table above for units */
13660 A_UINT32 min_max_tx_power;
13661 /**
13662 * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
13663 * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
13664 * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
13665 * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
13666 */
13667 /* see "ETSI TS 102 687" table above for units */
13668 A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
13669 /** Packet timing thresholds.
13670 * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
13671 * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
13672 * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
13673 * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
13674 */
13675 A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
13676 /**
13677 * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
13678 * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
13679 */
13680 A_UINT32 min_max_packet_interval;
13681 /**
13682 * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
13683 * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
13684 * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
13685 * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits
13686 */
13687 A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
13688 /** Packet datarate thresholds.
13689 * NDL_minDatarate, ndlType_datarate, 1+3 bits.
13690 * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
13691 */
13692 A_UINT32 min_max_datarate;
13693 /**
13694 * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
13695 * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
13696 * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
13697 * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
13698 */
13699 A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
13700 /** Receive signal thresholds.
13701 * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
13702 * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
13703 * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
13704 */
13705 A_UINT32 min_max_def_carrier_sense;
13706
13707 /** Receive model parameter.
13708 * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
13709 * NDL_maxCsRange, ndlType_distance, 1+12 bits.
13710 * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
13711 */
13712 A_UINT32 receive_model_parameter;
13713
13714 /**
13715 * NDL_minSNR, ndlType_snr, 1+7 bits.
13716 */
13717 A_UINT32 receive_model_parameter_2;
13718
13719 /** Demodulation model parameters.
13720 * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
13721 * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
13722 * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
13723 * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
13724 * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
13725 * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
13726 * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
13727 * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
13728 */
13729 A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)];
13730 /** Transmit model parameters.
13731 * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
13732 * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
13733 * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
13734 * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
13735 */
13736 A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
13737 /**
13738 * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
13739 * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
13740 * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
13741 * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
13742 */
13743 A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
13744 /**
13745 * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
13746 * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
13747 * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
13748 * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
13749 */
13750 A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
13751 /* NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits. */
13752 A_UINT32 tm_max_channel_use;
13753 /**
13754 * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
13755 * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
13756 * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
13757 * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
13758 */
13759 A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
13760 /** Channel load thresholds.
13761 * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
13762 * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
13763 */
13764 A_UINT32 min_max_channel_load;
13765 /** Transmit queue parameters.
13766 * NDL_numQueue, ndlType_acPrio, 1+3 bits.
13767 * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
13768 * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
13769 * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
13770 * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
13771 */
13772 A_UINT32 transmit_queue_parameters;
13773 /**
13774 * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
13775 * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
13776 * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
13777 * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
13778 */
13779 A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
13780} wmi_dcc_ndl_chan;
13781
13782#define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
13783#define WMI_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
13784#define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7)
13785#define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
13786
13787#define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
13788#define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
13789
13790#define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
13791#define WMI_NDL_MEASURE_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
13792
13793
13794#define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
13795#define WMI_NDL_DCC_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
13796#define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
13797#define WMI_NDL_DCC_STATS_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
13798#define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
13799#define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
13800
13801#define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13)
13802#define WMI_NDL_TIME_UP_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 0, 13, val)
13803#define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13)
13804#define WMI_NDL_TIME_DOWN_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 13, 13, val)
13805
13806#define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
13807#define WMI_NDL_MIN_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
13808#define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
13809#define WMI_NDL_MAX_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
13810
13811#define WMI_NDL_DEF_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
13812#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)
13813
13814#define WMI_NDL_MAX_PACKET_DURATION_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
13815#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)
13816#define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
13817#define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
13818#define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
13819#define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
13820#define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
13821#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)
13822
13823#define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
13824#define WMI_NDL_MIN_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
13825#define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
13826#define WMI_NDL_MAX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
13827#define WMI_NDL_DEF_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
13828#define WMI_NDL_DEF_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
13829
13830#define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
13831#define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
13832#define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
13833#define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
13834#define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
13835#define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
13836
13837#define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
13838#define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
13839#define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
13840#define WMI_NDL_MAX_CS_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
13841#define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
13842#define WMI_NDL_REF_PATH_LOSS_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
13843
13844#define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
13845#define WMI_NDL_MIN_SNR_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
13846
13847#define WMI_NDL_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
13848#define WMI_NDL_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
13849
13850#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)
13851#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)
13852#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)
13853#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)
13854#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)
13855#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)
13856#define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
13857#define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr, val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
13858#define WMI_NDL_TM_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
13859#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)
13860
13861#define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
13862#define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
13863#define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
13864#define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
13865
13866#define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
13867#define WMI_NDL_NUM_QUEUE_SET(ptr, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
13868#define WMI_NDL_REF_QUEUE_STATUS_GET(ptr, acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
13869#define WMI_NDL_REF_QUEUE_STATUS_SET(ptr, acprio, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
13870#define WMI_NDL_REF_QUEUE_LEN_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
13871#define WMI_NDL_REF_QUEUE_LEN_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
13872
13873/** Data structure for updating the NDL. */
13874typedef struct {
13875 /** TLV tag and len; tag equals
13876 * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
13877 A_UINT32 tlv_header;
13878 /* VDEV identifier */
13879 A_UINT32 vdev_id;
13880 /** The number of channels in the request. */
13881 A_UINT32 num_channel;
13882 /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
13883 /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
13884} wmi_dcc_update_ndl_cmd_fixed_param;
13885
13886typedef struct {
13887 /**
13888 * TLV tag and len; tag equals
13889 * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param
13890 */
13891 A_UINT32 tlv_header;
13892 /* VDEV identifier */
13893 A_UINT32 vdev_id;
13894 A_UINT32 status;
13895} wmi_dcc_update_ndl_resp_event_fixed_param;
13896
13897/* Actions for TSF timestamp */
13898typedef enum {
13899 TSF_TSTAMP_CAPTURE_REQ = 1,
13900 TSF_TSTAMP_CAPTURE_RESET = 2,
13901 TSF_TSTAMP_READ_VALUE = 3,
Govind Singhd2970e32016-01-21 10:30:02 +053013902 TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013903} wmi_tsf_tstamp_action;
13904
13905typedef struct {
13906 /** TLV tag and len; tag equals
13907 * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
13908 A_UINT32 tlv_header;
13909 /** unique id identifying the VDEV, generated by the caller */
13910 A_UINT32 vdev_id;
13911 /* action type, refer to wmi_tsf_tstamp_action */
13912 A_UINT32 tsf_action;
13913} wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
13914
13915typedef struct {
13916 /* TLV tag and len; tag equals
13917 * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
13918 A_UINT32 tlv_header;
13919 /* VDEV identifier */
13920 A_UINT32 vdev_id;
13921 /* low 32bit of tsf */
13922 A_UINT32 tsf_low;
13923 /* high 32 bit of tsf */
13924 A_UINT32 tsf_high;
Krishna Kumaar Natarajan40b3c112016-03-25 14:36:18 -070013925 /* low 32 bits of qtimer */
13926 A_UINT32 qtimer_low;
13927 /* high 32 bits of qtimer */
13928 A_UINT32 qtimer_high;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013929} wmi_vdev_tsf_report_event_fixed_param;
13930
13931typedef struct {
13932 /** TLV tag and len; tag equals
13933 * WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
13934 A_UINT32 tlv_header;
13935 /* unique id identifying the VDEV, generated by the caller */
13936 A_UINT32 vdev_id;
13937 /* unique id to identify the ie_data as defined by ieee 802.11 spec */
13938 A_UINT32 ie_id;
13939 /* ie_len corresponds to num of bytes in ie_data[] */
13940 A_UINT32 ie_len;
13941 /*
13942 * Following this structure is the TLV byte stream of ie data of length
13943 * buf_len:
13944 * A_UINT8 ie_data[];
13945 */
13946} wmi_vdev_set_ie_cmd_fixed_param;
13947
Govind Singh869c9872016-02-22 18:36:34 +053013948/* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013949typedef struct {
13950 /*
13951 * TLV tag and len; tag equals
13952 * WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param
13953 * Set Preferred Channel List
13954 */
13955 A_UINT32 tlv_header;
13956
13957 /* # of channels to scan */
13958 A_UINT32 num_chan;
13959 /*
13960 * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd
13961 * structure. The TLV's are:
13962 * A_UINT32 channel_list[];
13963 */
13964} wmi_soc_set_pcl_cmd_fixed_param;
13965
13966typedef struct {
13967 /* TLV tag and len; tag equals
Govind Singh869c9872016-02-22 18:36:34 +053013968 * WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param
13969 */
13970 A_UINT32 tlv_header;
13971 /** Set Preferred Channel List **/
13972
13973 /** pdev_id for identifying the MAC
13974 * See macros starting with WMI_PDEV_ID_ for values.
13975 */
13976 A_UINT32 pdev_id;
13977
13978 /** # of channels to scan */
13979 A_UINT32 num_chan;
13980 /**
13981 * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd
13982 * structure. The TLV's are:
13983 * A_UINT32 channel_weight[];
13984 * channel order & size will be as per the list provided
13985 * in WMI_SCAN_CHAN_LIST_CMDID
13986 **/
13987} wmi_pdev_set_pcl_cmd_fixed_param;
13988
13989/* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */
13990typedef struct {
13991 /* TLV tag and len; tag equals
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013992 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param
13993 * Set Hardware Mode */
13994 A_UINT32 tlv_header;
13995
13996 /* Hardware Mode Index */
13997 A_UINT32 hw_mode_index;
13998} wmi_soc_set_hw_mode_cmd_fixed_param;
13999
14000typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053014001 /* TLV tag and len; tag equals
14002 * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param
14003 */
14004 A_UINT32 tlv_header;
14005 /** Set Hardware Mode **/
14006
14007 /** pdev_id for identifying the MAC
14008 * See macros starting with WMI_PDEV_ID_ for values.
14009 */
14010 A_UINT32 pdev_id;
14011
14012 /* Hardware Mode Index */
14013 A_UINT32 hw_mode_index;
14014} wmi_pdev_set_hw_mode_cmd_fixed_param;
14015
14016/* DEPRECATED - use wmi_pdev_set_mac_config_cmd_fixed_param instead */
14017typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014018 /*
14019 * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param
14020 * Set Dual MAC Firmware Configuration
14021 */
14022 A_UINT32 tlv_header;
14023
14024 /* Concurrent scan configuration bits */
14025 A_UINT32 concurrent_scan_config_bits;
14026 /* Firmware mode configuration bits */
14027 A_UINT32 fw_mode_config_bits;
14028} wmi_soc_set_dual_mac_config_cmd_fixed_param;
14029
14030typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053014031 /* TLV tag and len; tag equals
14032 * WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param
14033 */
14034 A_UINT32 tlv_header;
14035 /** Set Dual MAC Firmware Configuration **/
14036
14037 /** pdev_id for identifying the MAC
14038 * See macros starting with WMI_PDEV_ID_ for values.
14039 */
14040 A_UINT32 pdev_id;
14041
14042 /* Concurrent scan configuration bits */
14043 A_UINT32 concurrent_scan_config_bits;
14044 /* Firmware mode configuration bits */
14045 A_UINT32 fw_mode_config_bits;
14046} wmi_pdev_set_mac_config_cmd_fixed_param;
14047
14048typedef struct { /* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014049 A_UINT32 num_tx_chains;
14050 A_UINT32 num_rx_chains;
14051 A_UINT32 reserved[2];
14052} soc_num_tx_rx_chains;
14053
14054typedef struct {
14055 A_UINT32 num_tx_chains_2g;
14056 A_UINT32 num_rx_chains_2g;
14057 A_UINT32 num_tx_chains_5g;
14058 A_UINT32 num_rx_chains_5g;
14059} band_num_tx_rx_chains;
14060
14061typedef union {
14062 soc_num_tx_rx_chains soc_txrx_chain_setting;
14063 band_num_tx_rx_chains band_txrx_chain_setting;
14064} antenna_num_tx_rx_chains;
14065
14066typedef enum {
14067 ANTENNA_MODE_DISABLED = 0x0,
14068 ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
14069 /* reserved */
14070} antenna_mode_reason;
14071
Govind Singh869c9872016-02-22 18:36:34 +053014072/* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014073typedef struct {
14074 /*
14075 * TLV tag and len;
14076 * tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param
14077 */
14078 A_UINT32 tlv_header;
14079
14080 /* the reason for setting antenna mode, refer antenna_mode_reason */
14081 A_UINT32 reason;
14082
14083 /*
14084 * The above reason parameter will select whether the following union
14085 * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
14086 */
14087 antenna_num_tx_rx_chains num_txrx_chains_setting;
14088} wmi_soc_set_antenna_mode_cmd_fixed_param;
14089
Govind Singh869c9872016-02-22 18:36:34 +053014090typedef struct {
14091 /* TLV tag and len; tag equals
14092 * WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param
14093 */
14094 A_UINT32 tlv_header;
14095
14096 /** pdev_id for identifying the MAC
14097 * See macros starting with WMI_PDEV_ID_ for values.
14098 */
14099 A_UINT32 pdev_id;
14100
14101 /* Bits 0-15 is the number of RX chains and
14102 * 16-31 is the number of TX chains
14103 */
14104 A_UINT32 num_txrx_chains;
14105} wmi_pdev_set_antenna_mode_cmd_fixed_param;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014106
14107/** Data structure for information specific to a VDEV to MAC mapping. */
Govind Singh869c9872016-02-22 18:36:34 +053014108/* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014109typedef struct {
14110 /*
14111 * TLV tag and len; tag equals
14112 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
14113 A_UINT32 tlv_header;
14114 A_UINT32 vdev_id; /* VDEV ID */
14115 A_UINT32 mac_id; /* MAC ID */
14116} wmi_soc_set_hw_mode_response_vdev_mac_entry;
14117
Govind Singh869c9872016-02-22 18:36:34 +053014118/** Data structure for information specific to a VDEV to MAC mapping. */
14119typedef struct {
14120 /** TLV tag and len; tag equals
14121 * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */
14122 A_UINT32 tlv_header;
14123
14124 /** pdev_id for identifying the MAC
14125 * See macros starting with WMI_PDEV_ID_ for values.
14126 */
14127 A_UINT32 pdev_id;
14128
14129 A_UINT32 vdev_id;
14130} wmi_pdev_set_hw_mode_response_vdev_mac_entry;
14131
14132/* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014133typedef struct {
14134 /* TLV tag and len; tag equals
14135 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param
14136 * Set Hardware Mode Response Event **/
14137 A_UINT32 tlv_header;
14138
14139 /* Status of set_hw_mode command
14140 * Values for Status:
14141 * 0 - OK; command successful
14142 * 1 - EINVAL; Requested invalid hw_mode
14143 * 2 - ECANCELED; HW mode change canceled
14144 * 3 - ENOTSUP; HW mode not supported
14145 * 4 - EHARDWARE; HW mode change prevented by hardware
14146 * 5 - EPENDING; HW mode change is pending
14147 * 6 - ECOEX; HW mode change conflict with Coex
14148 */
14149 A_UINT32 status;
14150 /* Configured Hardware Mode */
14151 A_UINT32 cfgd_hw_mode_index;
14152 /* Number of Vdev to Mac entries */
14153 A_UINT32 num_vdev_mac_entries;
14154 /*
14155 * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event
14156 * structure. The TLV's are:
14157 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
14158 */
14159} wmi_soc_set_hw_mode_response_event_fixed_param;
14160
14161typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053014162 /* TLV tag and len; tag equals
14163 * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param
14164 */
14165 A_UINT32 tlv_header;
14166 /** Set Hardware Mode Response Event **/
14167
14168 /** pdev_id for identifying the MAC
14169 * See macros starting with WMI_PDEV_ID_ for values.
14170 */
14171 A_UINT32 pdev_id;
14172
14173 /* Status of set_hw_mode command */
14174 /*
14175 * Values for Status:
14176 * 0 - OK; command successful
14177 * 1 - EINVAL; Requested invalid hw_mode
14178 * 2 - ECANCELED; HW mode change canceled
14179 * 3 - ENOTSUP; HW mode not supported
14180 * 4 - EHARDWARE; HW mode change prevented by hardware
14181 * 5 - EPENDING; HW mode change is pending
14182 * 6 - ECOEX; HW mode change conflict with Coex
14183 */
14184 A_UINT32 status;
14185 /* Configured Hardware Mode */
14186 A_UINT32 cfgd_hw_mode_index;
14187 /* Number of Vdev to Mac entries */
14188 A_UINT32 num_vdev_mac_entries;
14189 /**
14190 * TLV (tag length value ) parameters follow the
14191 * soc_set_hw_mode_response_event structure. The TLV's are:
14192 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
14193 */
14194} wmi_pdev_set_hw_mode_response_event_fixed_param;
14195
14196/* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */
14197typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014198 /*
14199 * TLV tag and len; tag equals
14200 * WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param
14201 * Hardware Mode Transition Event
14202 */
14203 A_UINT32 tlv_header;
14204 /* Original or old Hardware mode */
14205 A_UINT32 old_hw_mode_index;
14206 /* New Hardware Mode */
14207 A_UINT32 new_hw_mode_index;
14208 /* Number of Vdev to Mac entries */
14209 A_UINT32 num_vdev_mac_entries;
14210
14211 /**
14212 * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event
14213 * structure. The TLV's are:
14214 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
14215 */
14216} wmi_soc_hw_mode_transition_event_fixed_param;
14217
Govind Singh869c9872016-02-22 18:36:34 +053014218typedef struct {
14219 /* TLV tag and len; tag equals
14220 * WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param
14221 */
14222 A_UINT32 tlv_header;
14223 /** Hardware Mode Transition Event **/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014224
Govind Singh869c9872016-02-22 18:36:34 +053014225 /** pdev_id for identifying the MAC
14226 * See macros starting with WMI_PDEV_ID_ for values.
14227 */
14228 A_UINT32 pdev_id;
14229
14230 /* Original or old Hardware mode */
14231 A_UINT32 old_hw_mode_index;
14232 /* New Hardware Mode */
14233 A_UINT32 new_hw_mode_index;
14234 /* Number of Vdev to Mac entries */
14235 A_UINT32 num_vdev_mac_entries;
14236
14237 /**
14238 * TLV (tag length value ) parameters follow the
14239 * soc_set_hw_mode_response_event structure. The TLV's are:
14240 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
14241 */
14242} wmi_pdev_hw_mode_transition_event_fixed_param;
14243
14244/* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param
14245 * instead
14246 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014247typedef struct {
14248 /*
14249 * TLV tag and len; tag equals
14250 * WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param
14251 * Set Dual MAC Config Response Event
14252 */
14253 A_UINT32 tlv_header;
14254
14255 /* Status for set_dual_mac_config command */
14256 /*
14257 * Values for Status:
14258 * 0 - OK; command successful
14259 * 1 - EINVAL; Requested invalid hw_mode
14260 * 3 - ENOTSUP; HW mode not supported
14261 * 4 - EHARDWARE; HW mode change prevented by hardware
14262 * 6 - ECOEX; HW mode change conflict with Coex
14263 */
14264 A_UINT32 status;
14265} wmi_soc_set_dual_mac_config_response_event_fixed_param;
14266
Govind Singh869c9872016-02-22 18:36:34 +053014267typedef struct {
14268 /* TLV tag and len; tag equals
14269 * WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param
14270 */
14271 A_UINT32 tlv_header;
14272 /** Set Dual MAC Config Response Event **/
14273
14274 /** pdev_id for identifying the MAC
14275 * See macros starting with WMI_PDEV_ID_ for values.
14276 */
14277 A_UINT32 pdev_id;
14278
14279 /* Status for set_dual_mac_config command */
14280 /*
14281 * Values for Status:
14282 * 0 - OK; command successful
14283 * 1 - EINVAL; Requested invalid hw_mode
14284 * 3 - ENOTSUP; HW mode not supported
14285 * 4 - EHARDWARE; HW mode change prevented by hardware
14286 * 6 - ECOEX; HW mode change conflict with Coex
14287 */
14288 A_UINT32 status;
14289} wmi_pdev_set_mac_config_response_event_fixed_param;
14290
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014291typedef enum {
14292 MAWC_MOTION_STATE_UNKNOWN,
14293 MAWC_MOTION_STATE_STATIONARY,
14294 MAWC_MOTION_STATE_WALK,
14295 MAWC_MOTION_STATE_TRANSIT,
14296} MAWC_MOTION_STATE;
14297
14298typedef enum {
14299 MAWC_SENSOR_STATUS_OK,
14300 MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
14301 MAWC_SENSOR_STATUS_SHUTDOWN,
14302} MAWC_SENSOR_STATUS;
14303
14304typedef struct {
14305 /* TLV tag and len; tag equals
14306 * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
14307 A_UINT32 tlv_header;
14308 /** new motion state, MAWC_MOTION_STATE */
14309 A_UINT32 motion_state;
14310 /** status code of sensor, MAWC_SENSOR_STATUS */
14311 A_UINT32 sensor_status;
14312} wmi_mawc_sensor_report_ind_cmd_fixed_param;
14313
Govind Singh86180292016-02-01 14:03:37 +053014314/* MBO flag field definition */
14315/*
14316 * Bit 0: 0 - Allow to connect to both MBO and non-MBO AP
14317 * 1 - Allow to connect to MBO AP only
14318 * Bit 1-31 : reserved.
14319 */
14320#define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0)
14321
14322typedef struct {
14323 /*
14324 * TLV tag and len; tag equals
14325 * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param
14326 */
14327 A_UINT32 tlv_header;
14328 /** vdev id */
14329 A_UINT32 vdev_id;
14330 /** enable or disable MBO */
14331 A_UINT32 enable;
14332 /** MBO flags, refer to definition of MBO flags*/
14333 A_UINT32 flags;
14334} wmi_roam_set_mbo_fixed_param;
14335
14336typedef struct {
14337 /*
14338 * TLV tag and len; tag equals
14339 * WMITLV_TAG_ARRAY_STRUC
14340 */
14341 A_UINT32 tlv_header;
14342 /** Current operating class number */
14343 A_UINT32 cur_op_class;
14344 /*
14345 * Country string of current reg domain,
14346 * the expected value should be same as country str defined
14347 * in country IE.
14348 * 3 octets (COUNTRY_STR) + 1 octet (always 0)
14349 * The ordering of this array must be maintained,
14350 * even when a big-endian host's WMI messages undergo
14351 * automatic byte reordering for conversion to the
14352 * little-endian ordering required by the target.
14353 * On big-endian hosts, this array may need to be byte-swapped
14354 * by the host, so the subsequent automatic byte-swap
14355 * will result in the correct final byte order.
14356 * global operating class: set country_str[0]=0
14357 */
14358 A_UINT8 country_str[4];
14359 /** Supported operating class number in current regdomain */
14360 A_UINT32 supp_op_class_num;
14361 /* The TLVs will follow. */
14362 /* A_UINT32 supp_op_class_list[] */
14363} wmi_supported_operating_class_param;
14364
14365typedef struct {
14366 /*
14367 * TLV tag and len; tag equals
14368 * WMITLV_TAG_ARRAY_STRUC
14369 */
14370 A_UINT32 tlv_header;
14371 /** non preferred channel attribute length */
14372 A_UINT32 non_prefer_ch_attr_len;
14373 /* The TLVs will follow. */
14374 /** A_UINT8 non_prefer_ch_attr[];*/
14375} wmi_mbo_non_preferred_channel_report_param;
14376
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014377typedef struct {
14378 /* TLV tag and len; tag equals
14379 * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
14380 A_UINT32 tlv_header;
14381 /* enable(1) or disable(0) */
14382 A_UINT32 enable;
14383} wmi_mawc_enable_sensor_event_fixed_param;
14384
14385typedef struct {
14386 /* TLV tag and len; tag equals
14387 * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
14388 A_UINT32 tlv_header;
14389 /* Unique id identifying the VDEV */
14390 A_UINT32 vdev_id;
14391 /* enable(1) or disable(0) MAWC */
14392 A_UINT32 enable;
14393 /* ratio of skipping suppressing scan, skip one out of x */
14394 A_UINT32 suppress_ratio;
14395} wmi_extscan_configure_mawc_cmd_fixed_param;
14396
14397typedef struct {
14398 /* TLV tag and len; tag equals
14399 * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
14400 A_UINT32 tlv_header;
14401 /* Unique id identifying the VDEV */
14402 A_UINT32 vdev_id;
14403 /* enable(1) or disable(0) MAWC */
14404 A_UINT32 enable;
14405 /* ratio of exponential backoff, next = current + current*ratio/100 */
14406 A_UINT32 exp_backoff_ratio;
14407 /* initial scan interval(msec) */
14408 A_UINT32 init_scan_interval;
14409 /* max scan interval(msec) */
14410 A_UINT32 max_scan_interval;
14411} wmi_nlo_configure_mawc_cmd_fixed_param;
14412
14413typedef struct {
14414 /* TLV tag and len; tag equals
14415 * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
14416 A_UINT32 tlv_header;
14417 /* Unique id identifying the VDEV */
14418 A_UINT32 vdev_id;
14419 /* enable(1) or disable(0) MAWC */
14420 A_UINT32 enable;
14421 /* data traffic load (kBps) to register CMC */
14422 A_UINT32 traffic_load_threshold;
14423 /* RSSI threshold (dBm) to scan for Best AP */
14424 A_UINT32 best_ap_rssi_threshold;
14425 /* high RSSI threshold adjustment in Stationary to suppress scan */
14426 A_UINT32 rssi_stationary_high_adjust;
14427 /* low RSSI threshold adjustment in Stationary to suppress scan */
14428 A_UINT32 rssi_stationary_low_adjust;
14429} wmi_roam_configure_mawc_cmd_fixed_param;
14430
14431#define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2
14432#define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 10
14433
14434typedef enum {
14435 PACKET_FILTER_TYPE_INVALID = 0,
14436 PACKET_FILTER_TYPE_FILTER_PKT,
14437 PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
14438 PACKET_FILTER_TYPE_MAX_ENUM_SIZE
14439} WMI_PACKET_FILTER_FILTER_TYPE;
14440
14441typedef enum {
14442 PACKET_FILTER_PROTO_TYPE_INVALID = 0,
14443
14444 /* L2 header */
14445 PACKET_FILTER_PROTO_TYPE_MAC,
14446 PACKET_FILTER_PROTO_TYPE_SNAP,
14447
14448 /* L3 header (EtherType) */
14449 PACKET_FILTER_PROTO_TYPE_IPV4,
14450 PACKET_FILTER_PROTO_TYPE_IPV6,
14451
14452 /* L4 header (IP protocol) */
14453 PACKET_FILTER_PROTO_TYPE_UDP,
14454 PACKET_FILTER_PROTO_TYPE_TCP,
14455 PACKET_FILTER_PROTO_TYPE_ICMPV6,
14456
14457 PACKET_FILTER_PROTO_TYPE_MAX
14458} WMI_PACKET_FILTER_PROTO_TYPE;
14459
14460typedef enum {
14461 PACKET_FILTER_CMP_TYPE_INVALID = 0,
14462 PACKET_FILTER_CMP_TYPE_EQUAL,
14463 PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
14464 PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
14465 PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
14466 PACKET_FILTER_CMP_TYPE_ADDRTYPE,
14467 PACKET_FILTER_CMP_TYPE_MAX
14468} WMI_PACKET_FILTER_CMP_TYPE;
14469
14470typedef enum {
14471 PACKET_FILTER_SET_INACTIVE = 0,
14472 PACKET_FILTER_SET_ACTIVE
14473} WMI_PACKET_FILTER_ACTION;
14474
14475typedef enum {
14476 PACKET_FILTER_SET_DISABLE = 0,
14477 PACKET_FILTER_SET_ENABLE
14478} WMI_PACKET_FILTER_RUNTIME_ENABLE;
14479
14480typedef struct {
14481 A_UINT32 proto_type;
14482 A_UINT32 cmp_type;
14483 A_UINT32 data_length; /* Length of the data to compare (units = bytes) */
14484 /*
14485 * from start of the respective frame header (
14486 * units = bytes)
14487 */
14488 A_UINT32 data_offset;
14489 /* Data to compare, little-endian order */
14490 A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD];
14491 /* Mask to be applied on rcvd packet data before compare, little-endian order */
14492 A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD];
14493} WMI_PACKET_FILTER_PARAMS_TYPE;
14494
14495typedef struct {
14496 A_UINT32 tlv_header;
14497 A_UINT32 vdev_id;
14498 A_UINT32 filter_id;
14499 A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */
14500 A_UINT32 filter_type;
14501 A_UINT32 num_params; /* how many entries in paramsData are valid */
14502 A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */
14503 WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
14504} WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
14505
14506/* enable / disable all filters within the specified vdev */
14507typedef struct {
14508 A_UINT32 tlv_header;
14509 A_UINT32 vdev_id;
14510 A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
14511} WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
14512
14513
14514#define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0
14515#define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
14516
14517#define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
14518 WMI_SET_BITS(tcp_flag_u32, \
14519 WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
14520 WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
14521 tcp_flag_values)
14522#define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
14523 WMI_GET_BITS(tcp_flag_u32, \
14524 WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
14525 WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
14526
14527#define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9
14528#define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
14529
14530#define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
14531 WMI_SET_BITS(tcp_flag_u32, \
14532 WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
14533 WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
14534 tcp_flags_mask)
14535#define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
14536 WMI_GET_BITS(tcp_flag_u32, \
14537 WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
14538 WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
14539
14540typedef struct {
14541 A_UINT32 tlv_header;
14542 /**
14543 * @brief lro_enable - indicates whether lro is enabled
14544 * [0] LRO Enable
14545 */
14546 A_UINT32 lro_enable;
14547 /**
14548 * @brief tcp_flag_u32 - mask of which TCP flags to check and
14549 * values to check for
14550 * [8:0] TCP flag values - If the TCP flags from the packet do not match
14551 * the values in this field after masking with TCP flags mask
14552 * below,LRO eligible will not be set
14553 * [17:9] TCP flags mask - Mask field for comparing the TCP values
14554 * provided above with the TCP flags field in the received packet
14555 * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
14556 * macros to isolate the mask field and values field that are packed
14557 * into this u32 "word".
14558 */
14559 A_UINT32 tcp_flag_u32;
14560 /**
14561 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
14562 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
14563 * bytes 0 to 3
14564 *
14565 * In this and all the below toeplitz_hash fields, the bytes are
14566 * specified in little-endian order. For example:
14567 * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0
14568 * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1
14569 * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
14570 * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
14571 */
14572 A_UINT32 toeplitz_hash_ipv4_0_3;
14573
14574 /**
14575 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
14576 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
14577 * bytes 4 to 7
14578 */
14579 A_UINT32 toeplitz_hash_ipv4_4_7;
14580
14581 /**
14582 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
14583 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
14584 * bytes 8 to 11
14585 */
14586 A_UINT32 toeplitz_hash_ipv4_8_11;
14587
14588 /**
14589 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
14590 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
14591 * bytes 12 to 15
14592 */
14593 A_UINT32 toeplitz_hash_ipv4_12_15;
14594
14595 /**
14596 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
14597 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
14598 * byte 16
14599 */
14600 A_UINT32 toeplitz_hash_ipv4_16;
14601
14602 /**
14603 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14604 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14605 * bytes 0 to 3
14606 */
14607 A_UINT32 toeplitz_hash_ipv6_0_3;
14608
14609 /**
14610 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14611 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14612 * bytes 4 to 7
14613 */
14614 A_UINT32 toeplitz_hash_ipv6_4_7;
14615
14616 /**
14617 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14618 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14619 * bytes 8 to 11
14620 */
14621 A_UINT32 toeplitz_hash_ipv6_8_11;
14622
14623 /**
14624 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14625 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14626 * bytes 12 to 15
14627 */
14628 A_UINT32 toeplitz_hash_ipv6_12_15;
14629
14630 /**
14631 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14632 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14633 * bytes 16 to 19
14634 */
14635 A_UINT32 toeplitz_hash_ipv6_16_19;
14636
14637 /**
14638 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14639 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14640 * bytes 20 to 22
14641 */
14642 A_UINT32 toeplitz_hash_ipv6_20_23;
14643
14644 /**
14645 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14646 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14647 * bytes 24 to 27
14648 */
14649 A_UINT32 toeplitz_hash_ipv6_24_27;
14650
14651 /**
14652 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14653 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14654 * bytes 28 to 31
14655 */
14656 A_UINT32 toeplitz_hash_ipv6_28_31;
14657
14658 /**
14659 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14660 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14661 * bytes 32 to 35
14662 */
14663 A_UINT32 toeplitz_hash_ipv6_32_35;
14664
14665 /**
14666 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14667 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14668 * bytes 36 to 39
14669 */
14670 A_UINT32 toeplitz_hash_ipv6_36_39;
14671
14672 /**
14673 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14674 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14675 * byte 40
14676 */
14677 A_UINT32 toeplitz_hash_ipv6_40;
14678} wmi_lro_info_cmd_fixed_param;
14679
Nirav Shahbf6450f2015-11-05 11:47:20 +053014680/*
14681 * This structure is used to set the pattern for WOW host wakeup pin pulse
14682 * pattern confirguration.
14683 */
14684typedef struct {
14685 /*
14686 * TLV tag and len; tag equals
14687 * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param
14688 */
14689 A_UINT32 tlv_header;
14690 /* flash offset to write, starting from 0 */
14691 A_UINT32 offset;
14692 /* vaild data length in buffer, unit: byte */
14693 A_UINT32 length;
14694} wmi_transfer_data_to_flash_cmd_fixed_param;
14695
14696typedef struct {
14697 /*
14698 * TLV tag and len; tag equals
14699 * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param
14700 */
14701 A_UINT32 tlv_header;
14702 /* Return status. 0 for success, non-zero otherwise */
14703 A_UINT32 status;
14704} wmi_transfer_data_to_flash_complete_event_fixed_param;
14705
Sreelakshmi Konamki58f4d622016-04-14 18:03:21 +053014706typedef enum {
14707 ENHANCED_MCAST_FILTER_DISABLED,
14708 ENHANCED_MCAST_FILTER_ENABLED
14709} ENHANCED_MCAST_FILTER_CONFIG;
14710
14711/*
14712 * Command to enable/disable filtering of multicast IP with unicast mac
14713 */
14714typedef struct {
14715 /*
14716 * TLV tag and len; tag equals
14717 * WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param
14718 */
14719 A_UINT32 tlv_header;
14720 /* Unique id identifying the VDEV */
14721 A_UINT32 vdev_id;
14722 /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */
14723 A_UINT32 enable;
14724} wmi_config_enhanced_mcast_filter_cmd_fixed_param;
14725
Anurag Chouhan05d05fe2016-04-18 17:09:24 +053014726typedef struct {
14727 /*
14728 * TLV tag and len; tag equals
14729 * WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param
14730 */
14731 A_UINT32 tlv_header;
14732 /* unique id identifying the VDEV, generated by the caller */
14733 A_UINT32 vdev_id;
14734 /* WISA enable / disable mode */
14735 A_UINT32 wisa_mode;
14736} wmi_vdev_wisa_cmd_fixed_param;
14737
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -080014738/*
Manikandan Mohan55c94d62015-12-04 13:47:58 -080014739 * This structure is used to report SMPS force mode set complete to host.
14740 */
14741typedef struct {
14742 /* TLV tag and len; tag equals
14743 * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param
14744 */
14745 A_UINT32 tlv_header;
14746 /* Unique id identifying the VDEV */
14747 A_UINT32 vdev_id;
14748 /* Return status. 0 for success, non-zero otherwise */
14749 A_UINT32 status;
14750} wmi_sta_smps_force_mode_complete_event_fixed_param;
14751
14752/*
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -080014753 * This structure is used to report SCPC calibrated data to host.
14754 */
14755typedef struct {
14756 /* TLV tag and len; tag equals
14757 * WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param
14758 */
14759 A_UINT32 tlv_header;
14760 /* number of BDF patches. Each patch contains offset, length and data */
14761 A_UINT32 num_patch;
14762 /* This TLV is followed by another TLV of array of bytes
14763 * A_UINT8 data[];
14764 * This data array contains, for example
14765 * patch1 offset(byte3~0), patch1 data length(byte7~4),
14766 * patch1 data(byte11~8)
14767 * patch2 offset(byte15~12), patch2 data length(byte19~16),
14768 * patch2 data(byte47~20)
14769 */
14770} wmi_scpc_event_fixed_param;
14771
Manikandan Mohan130eb572015-12-23 13:53:34 -080014772/* bpf interface structure */
14773typedef struct wmi_bpf_get_capability_cmd_s {
14774 A_UINT32 tlv_header;
14775 A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */
14776} wmi_bpf_get_capability_cmd_fixed_param;
14777
14778typedef struct wmi_bpf_capability_info_evt_s {
14779 A_UINT32 tlv_header;
14780 A_UINT32 bpf_version; /* fw's implement version */
14781 A_UINT32 max_bpf_filters; /* max filters that fw supports */
14782 A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
14783} wmi_bpf_capability_info_evt_fixed_param;
14784
14785/* bit 0 of flags: report counters */
14786#define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0
14787#define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1
14788typedef struct wmi_bpf_get_vdev_stats_cmd_s {
14789 A_UINT32 tlv_header;
14790 A_UINT32 flags;
14791 A_UINT32 vdev_id;
14792} wmi_bpf_get_vdev_stats_cmd_fixed_param;
14793
14794typedef struct wmi_bpf_vdev_stats_info_evt_s {
14795 A_UINT32 tlv_header;
14796 A_UINT32 vdev_id;
14797 A_UINT32 num_filters;
14798 A_UINT32 num_checked_pkts;
14799 A_UINT32 num_dropped_pkts;
14800 } wmi_bpf_vdev_stats_info_evt_fixed_param;
14801
14802typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
14803 A_UINT32 tlv_header;
14804 A_UINT32 vdev_id;
14805 A_UINT32 filter_id;
14806 A_UINT32 bpf_version; /* host bpf version */
14807 A_UINT32 total_length;
14808 A_UINT32 current_offset;
14809 A_UINT32 current_length;
Manikandan Mohan05ac7ee2015-12-23 14:18:36 -080014810 /*
14811 * The TLV follows:
14812 * A_UINT8 buf_inst[]; //Variable length buffer for the instuctions
14813 */
Manikandan Mohan130eb572015-12-23 13:53:34 -080014814} wmi_bpf_set_vdev_instructions_cmd_fixed_param;
14815
14816#define BPF_FILTER_ID_ALL 0xFFFFFFFF
14817typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
14818 A_UINT32 tlv_header;
14819 A_UINT32 vdev_id;
14820 A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */
14821} wmi_bpf_del_vdev_instructions_cmd_fixed_param;
14822
Govind Singhc7d51942016-02-01 12:09:31 +053014823#define AES_BLOCK_LEN 16 /* in bytes */
14824#define FIPS_KEY_LENGTH_128 16 /* in bytes */
14825#define FIPS_KEY_LENGTH_256 32 /* in bytes */
14826#define FIPS_ENCRYPT_CMD 0
14827#define FIPS_DECRYPT_CMD 1
14828#define FIPS_ENGINE_AES_CTR 0
14829#define FIPS_ENGINE_AES_MIC 1
14830#define FIPS_ERROR_OPER_TIMEOUT 1
14831
14832/* WMI_PDEV_FIPS_CMDID */
14833typedef struct {
14834 /*
14835 * TLV tag and len; tag equals
14836 * WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param
14837 */
14838 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053014839 union {
14840 /* OBSOLETE - will be removed once all refs are gone */
14841 A_UINT32 mac_id;
14842 /** pdev_id for identifying the MAC
14843 * See macros starting with WMI_PDEV_ID_ for values.
14844 */
14845 A_UINT32 pdev_id;
14846 };
Govind Singhc7d51942016-02-01 12:09:31 +053014847 A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
14848 /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
14849 A_UINT32 mode;
14850 /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
14851 A_UINT32 key_len;
14852 A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
14853 A_UINT32 data_len; /* data length */
14854 /*
14855 * Following this structure is the TLV:
14856 * A_UINT32 data[1]; - In Data (keep this in the end)
14857 */
14858} wmi_pdev_fips_cmd_fixed_param;
14859
14860typedef struct {
14861 /*
14862 * TLV tag and len; tag equals
14863 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param
14864 */
14865 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053014866 union {
14867 /* OBSOLETE - will be removed once all refs are gone */
14868 A_UINT32 mac_id;
14869 /** pdev_id for identifying the MAC
14870 * See macros starting with WMI_PDEV_ID_ for values.
14871 */
14872 A_UINT32 pdev_id;
14873 };
Govind Singhc7d51942016-02-01 12:09:31 +053014874 A_UINT32 enable; /* 1:enable, 0:disable */
14875 /* 1:GPIO parallel mode, 0:GPIO serial mode */
14876 A_UINT32 mode;
14877 A_UINT32 rx_antenna; /* rx antenna */
14878 A_UINT32 tx_default_antenna; /* tx default antenna */
14879 /*
14880 * Following this structure is the TLV:
14881 * wmi_pdev_smart_ant_gpio_handle
14882 */
14883} wmi_pdev_smart_ant_enable_cmd_fixed_param;
14884
14885/** GPIO pins/function values to control antennas */
14886typedef struct {
14887 /*
14888 * TLV tag and len; tag equals
14889 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle
14890 */
14891 A_UINT32 tlv_header;
14892 /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
14893 A_UINT32 gpio_pin;
14894 A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */
Govind Singh869c9872016-02-22 18:36:34 +053014895 /** pdev_id for identifying the MAC
14896 * See macros starting with WMI_PDEV_ID_ for values.
14897 */
14898 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053014899} wmi_pdev_smart_ant_gpio_handle;
14900
14901typedef struct {
14902 /*
14903 * TLV tag and len; tag equals
14904 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param
14905 */
14906 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053014907 union {
14908 /* OBSOLETE - will be removed once all refs are gone */
14909 A_UINT32 mac_id;
14910 /** pdev_id for identifying the MAC
14911 * See macros starting with WMI_PDEV_ID_ for values.
14912 */
14913 A_UINT32 pdev_id;
14914 };
Govind Singhc7d51942016-02-01 12:09:31 +053014915 A_UINT32 rx_antenna;
14916} wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
14917
14918typedef struct {
14919 /*
14920 * TLV tag and len; tag equals
14921 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param
14922 */
14923 A_UINT32 tlv_header;
14924 /** unique id identifying the vdev, generated by the caller */
Govind Singh869c9872016-02-22 18:36:34 +053014925 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053014926 /** peer MAC address */
14927 wmi_mac_addr peer_macaddr;
14928 /*
14929 * Following this structure is the TLV:
14930 * wmi_peer_smart_ant_set_tx_antenna_series
14931 */
14932} wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
14933
14934typedef struct {
14935 /*
14936 * TLV tag and len; tag equals
14937 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series
14938 */
14939 A_UINT32 tlv_header;
14940 /* antenna array */
14941 A_UINT32 antenna_series;
14942} wmi_peer_smart_ant_set_tx_antenna_series;
14943
14944typedef struct {
14945 /*
14946 * TLV tag and len; tag equals
14947 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param
14948 */
14949 A_UINT32 tlv_header;
14950 /* rate array */
14951 A_UINT32 train_rate_series;
14952 /* antenna array */
14953 A_UINT32 train_antenna_series;
14954 /* Rate flags */
14955 /* TODO: For future use? */
14956 A_UINT32 rc_flags;
14957} wmi_peer_smart_ant_set_train_antenna_param;
14958
14959typedef struct {
14960 /*
14961 * TLV tag and len; tag equals
14962 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param
14963 */
14964 A_UINT32 tlv_header;
14965 /** unique id identifying the VDEV, generated by the caller */
Govind Singh869c9872016-02-22 18:36:34 +053014966 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053014967 /** peer MAC address */
14968 wmi_mac_addr peer_macaddr;
14969 /* num packets; 0-stop training */
14970 A_UINT32 num_pkts;
14971 /*
14972 * Following this structure is the TLV:
14973 * wmi_peer_smart_ant_set_train_antenna_param
14974 */
14975} wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
14976
14977typedef struct {
14978 /*
14979 * TLV tag and len; tag equals
14980 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param
14981 */
14982 A_UINT32 tlv_header;
14983 /** unique id identifying the vdev, generated by the caller */
Govind Singh869c9872016-02-22 18:36:34 +053014984 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053014985 /** peer MAC address */
14986 wmi_mac_addr peer_macaddr;
14987 /* command id*/
14988 A_UINT32 cmd_id;
14989 /* number of arguments passed */
14990 A_UINT32 args_count;
14991 /*
14992 * Following this structure is the TLV:
14993 * A_UINT32 args[]; // argument list
14994 */
14995} wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
14996
14997typedef struct {
14998 /*
14999 * TLV tag and len; tag equals
15000 * WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain
15001 */
15002 A_UINT32 tlv_header;
15003 A_UINT32 antCtrlChain;
Govind Singh869c9872016-02-22 18:36:34 +053015004 /** pdev_id for identifying the MAC
15005 * See macros starting with WMI_PDEV_ID_ for values.
15006 */
15007 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053015008} wmi_pdev_set_ant_ctrl_chain;
15009
15010typedef struct {
15011 /*
15012 * TLV tag and len; tag equals
15013 * WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param
15014 */
15015 A_UINT32 tlv_header;
15016 A_UINT32 mac_id; /* MAC ID */
15017 A_UINT32 antCtrlCommon1;
15018 A_UINT32 antCtrlCommon2;
15019 /*
15020 * Following this structure is the TLV:
15021 * wmi_pdev_set_ant_ctrl_chain
15022 */
15023} wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
15024
15025typedef struct {
15026 /* TLV tag and len; tag equals
15027 * WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param
15028 */
15029 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053015030 union {
15031 /* OBSOLETE - will be removed once all refs are gone */
15032 A_UINT32 mac_id;
15033 /** pdev_id for identifying the MAC
15034 * See macros starting with WMI_PDEV_ID_ for values.
15035 */
15036 A_UINT32 pdev_id;
15037 };
Govind Singhc7d51942016-02-01 12:09:31 +053015038 /** len of CTL info */
15039 A_UINT32 ctl_len;
15040 /* ctl array (len adjusted to number of words)
15041 * Following this structure is the TLV:
15042 * A_UINT32 ctl_info[1];
15043 */
15044} wmi_pdev_set_ctl_table_cmd_fixed_param;
15045
15046typedef struct {
15047 /*
15048 * TLV tag and len; tag equals
15049 * WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param
15050 */
15051 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053015052 union {
15053 /* OBSOLETE - will be removed once all refs are gone */
15054 A_UINT32 mac_id;
15055 /** pdev_id for identifying the MAC
15056 * See macros starting with WMI_PDEV_ID_ for values.
15057 */
15058 A_UINT32 pdev_id;
15059 };
Govind Singhc7d51942016-02-01 12:09:31 +053015060 A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
15061 /*
15062 * Bit 7:0 len of array gain table
15063 * Bit 8 bypass multi chain gain or not
15064 */
15065 /*
15066 * array gain table(s) (len adjusted to number of words).
15067 * Following this structure is the TLV:
15068 * A_UINT32 arraygain_tbl[1];
15069 */
15070} wmi_pdev_set_mimogain_table_cmd_fixed_param;
15071
15072#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
15073#define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
15074#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_ARRAY_GAIN_LEN)
15075#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_ARRAY_GAIN_LEN)
15076
15077#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
15078#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
15079#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
15080#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
15081
15082
15083typedef struct {
15084 /*
15085 * TLV tag and len; tag equals
15086 * WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param
15087 */
15088 A_UINT32 tlv_header;
15089 /** parameter id */
15090 A_UINT32 param_id;
15091 /** parameter value */
15092 A_UINT32 param_value;
15093} wmi_fwtest_set_param_cmd_fixed_param;
15094
15095/* Expressed in 1 part in 1000 (permille) */
15096#define WMI_ATF_DENOMINATION 1000
15097
15098typedef struct {
15099 /*
15100 * TLV tag and len; tag equals
15101 * WMITLV_TAG_STRUC_wmi_atf_peer_info
15102 */
15103 A_UINT32 tlv_header;
15104 wmi_mac_addr peer_macaddr;
15105 A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
15106 A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
15107 /* Peer congestion threshold for future use */
15108 A_UINT32 atf_units_reserved;
15109} wmi_atf_peer_info;
15110
15111typedef struct {
15112 /*
15113 * TLV tag and len; tag equals
15114 * WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param
15115 */
15116 A_UINT32 tlv_header;
15117 A_UINT32 num_peers;
15118 /*
15119 * Following this structure is the TLV:
Himanshu Agarwal134b7362016-05-13 20:30:12 +053015120 * struct wmi_atf_peer_info peer_info[num_peers];
Govind Singhc7d51942016-02-01 12:09:31 +053015121 */
15122} wmi_peer_atf_request_fixed_param;
15123
Himanshu Agarwal134b7362016-05-13 20:30:12 +053015124/* Structure for Bandwidth Fairness peer information */
15125typedef struct {
15126 /*
15127 * TLV tag and len; tag equals
15128 * WMITLV_TAG_STRUC_wmi_bwf_peer_info
15129 */
15130 A_UINT32 tlv_header;
15131 wmi_mac_addr peer_macaddr;
15132 /* BWF guaranteed_bandwidth for the peers in mbps */
15133 A_UINT32 bwf_guaranteed_bandwidth;
15134 /*
15135 * BWF Maximum airtime percentage that can be allocated
15136 * to the peer to meet the guaranteed_bandwidth
15137 */
15138 A_UINT32 bwf_max_airtime;
15139 /* BWF priority of the peer to allocate the tokens dynamically */
15140 A_UINT32 bwf_peer_priority;
15141} wmi_bwf_peer_info;
15142
15143/* Structure for Bandwidth Fairness peer request */
15144typedef struct {
15145 /*
15146 * TLV tag and len; tag equals
15147 * WMITLV_TAG_STRUC_wmi_peer_bwf_request_fixed_param
15148 */
15149 A_UINT32 tlv_header;
15150 A_UINT32 num_peers;
15151 /*
15152 * Following this structure is the TLV:
15153 * struct wmi_bwf_peer_info peer_info[num_peers];
15154 */
15155} wmi_peer_bwf_request_fixed_param;
15156
15157
Govind Singhc7d51942016-02-01 12:09:31 +053015158/* Equal distribution of ATF air time within an VDEV. */
15159typedef struct {
15160 /*
15161 * TLV tag and len; tag equals
15162 * WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param
15163 */
15164 A_UINT32 tlv_header;
15165 A_UINT32 vdev_id;
15166 A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
15167} wmi_vdev_atf_request_fixed_param;
15168
15169typedef struct {
15170 /*
15171 * TLV tag and len; tag equals
15172 * WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param
15173 */
15174 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053015175 /** pdev_id for identifying the MAC
15176 * See macros starting with WMI_PDEV_ID_ for values.
15177 */
15178 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053015179 /** parameter */
15180 A_UINT32 param;
15181} wmi_pdev_get_ani_cck_config_cmd_fixed_param;
15182
15183typedef struct {
15184 /*
15185 * TLV tag and len; tag equals
15186 * WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param
15187 */
15188 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053015189 /** pdev_id for identifying the MAC
15190 * See macros starting with WMI_PDEV_ID_ for values.
15191 */
15192 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053015193 /** parameter */
15194 A_UINT32 param;
15195} wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
15196
15197typedef struct {
15198 /*
15199 * TLV tag and len; tag equals
15200 * WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param
15201 */
15202 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053015203 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053015204 A_UINT32 qb_enable;
15205 wmi_mac_addr peer_macaddr;
15206} WMI_QBOOST_CFG_CMD_fixed_param;
15207
15208#define WMI_INST_STATS_INVALID_RSSI 0
15209
15210typedef struct {
15211 /*
15212 * TLV tag and len; tag equals
15213 * WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param
15214 */
15215 A_UINT32 tlv_header;
15216 A_UINT32 iRSSI; /* dBm above the noise floor */
15217 /* peer MAC address */
15218 wmi_mac_addr peer_macaddr;
Govind Singh869c9872016-02-22 18:36:34 +053015219 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053015220} wmi_inst_rssi_stats_resp_fixed_param;
15221
15222typedef struct {
15223 /*
15224 * TLV tag and len; tag equals
15225 * WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info
15226 */
15227 A_UINT32 tlv_header;
15228 A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
15229} wmi_peer_cck_ofdm_rate_info;
15230
15231typedef struct {
15232 /*
15233 * TLV tag and len; tag equals
15234 * WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info
15235 */
15236 A_UINT32 tlv_header;
15237 A_UINT32 ratecode_20; /* Rate code for 20MHz BW */
15238 A_UINT32 ratecode_40; /* Rate code for 40MHz BW */
15239 A_UINT32 ratecode_80; /* Rate code for 80MHz BW */
15240} wmi_peer_mcs_rate_info;
15241
15242typedef struct {
15243 /*
15244 * TLV tag and len; tag equals
15245 * WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param
15246 */
15247 A_UINT32 tlv_header;
15248 wmi_mac_addr peer_macaddr;
15249 A_UINT32 ratecount; /* Max Rate count for each mode */
Govind Singh869c9872016-02-22 18:36:34 +053015250 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053015251 /*
15252 * Following this structure are the TLV
15253 * struct wmi_peer_cck_ofdm_rate_info;
15254 * struct wmi_peer_mcs_rate_info;
15255 */
15256} wmi_peer_ratecode_list_event_fixed_param;
15257
15258typedef struct wmi_wds_addr_event {
15259 /*
15260 * TLV tag and len; tag equals
15261 * WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param
15262 */
15263 A_UINT32 tlv_header;
15264 A_UINT32 event_type[4];
15265 wmi_mac_addr peer_mac;
15266 wmi_mac_addr dest_mac;
Govind Singh869c9872016-02-22 18:36:34 +053015267 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053015268} wmi_wds_addr_event_fixed_param;
15269
15270typedef struct {
15271 /*
15272 * TLV tag and len; tag equals
15273 * WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param
15274 */
15275 A_UINT32 tlv_header;
15276 wmi_mac_addr peer_macaddr;
15277 A_UINT32 peer_ps_state;
15278} wmi_peer_sta_ps_statechange_event_fixed_param;
15279
15280/* WMI_PDEV_FIPS_EVENTID */
15281typedef struct {
15282 /*
15283 * TLV tag and len; tag equals
15284 * WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param
15285 */
15286 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053015287 union {
15288 /* OBSOLETE - will be removed once all refs are gone */
15289 A_UINT32 mac_id;
15290 /** pdev_id for identifying the MAC
15291 * See macros starting with WMI_PDEV_ID_ for values.
15292 */
15293 A_UINT32 pdev_id;
15294 };
Govind Singhc7d51942016-02-01 12:09:31 +053015295 /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
15296 A_UINT32 error_status;
15297 A_UINT32 data_len; /* Data length */
15298 /*
15299 * Following this structure is the TLV:
15300 * A_UINT32 data[1]; // Out Data (keep this in the end)
15301 */
15302} wmi_pdev_fips_event_fixed_param;
15303
15304typedef struct {
15305 /*
15306 * TLV tag and len; tag equals
15307 * WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param
15308 */
15309 A_UINT32 tlv_header;
15310 A_UINT32 mac_id; /* MAC ID */
15311 /* Noise threshold iterations with high values */
15312 A_UINT32 noise_floor_report_iter;
15313 /* Total noise threshold iterations */
15314 A_UINT32 noise_floor_total_iter;
15315} wmi_pdev_channel_hopping_event_fixed_param;
15316
15317enum {
15318 WMI_PDEV_RESERVE_AST_ENTRY_OK,
15319 WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
15320 WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
15321};
15322
15323typedef struct {
15324 /*
15325 * TLV tag and len; tag equals
15326 * WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param
15327 */
15328 A_UINT32 tlv_header;
15329 A_UINT32 mac_id; /* MAC ID */
15330 A_UINT32 rate_flags;
15331 /**
15332 * FLAG_ONE_CHAIN 0x001 - one chain mask
15333 * FLAG_TWO_CHAIN 0x005 - two chain mask
15334 * FLAG_THREE_CHAIN 0x007 - three chain mask
15335 * FLAG_FOUR_CHAIN 0x00F - four chain mask
15336 * FLAG_STBC 0x010 - STBC is set
15337 * FLAG_40MHZ 0x020
15338 * FLAG_80MHZ 0x040
15339 * FLAG_160MHZ 0x080
15340 * FLAG_TXBF 0x0100 - Tx Bf enabled
15341 * FLAG_RTSENA 0x0200 - RTS enabled
15342 * FLAG_CTSENA 0x0400 - CTS enabled
15343 * FLAG_LDPC 0x0800 - LDPC set
15344 * FLAG_SERIES1 0x1000 -
15345 * FLAG_SGI 0x2000 - Short gaurd interval
15346 * FLAG_MU2 0x4000 - MU2 data
15347 * FLAG_MU3 0x8000 - MU3 data
15348 * */
15349 A_UINT32 nss;
15350 /**
15351 * NSS 0x0 - 0x3
15352 * */
15353 A_UINT32 preamble;
15354 /**
15355 * PREAM_OFDM - 0x0
15356 * PREAM_CCK - 0x1
15357 * PREAM_HT - 0x2
15358 * PREAM_VHT - 0x3
15359 * */
15360 A_UINT32 hw_rate;
15361 /**
15362 * *** HW_OFDM_RATE ***
15363 * OFDM_48_MBPS - 0x0
15364 * OFDM_24_MBPS - 0x1
15365 * OFDM_12_MBPS - 0x2
15366 * OFDM_6_MBPS - 0x3
15367 * OFDM_54_MBPS - 0x4
15368 * OFDM_36_MBPS - 0x5
15369 * OFDM_18_MBPS - 0x6
15370 * OFDM_9_MBPS - 0x7
15371 *
15372 * *** HW_CCK_RATE ***
15373 * CCK_11_LONG_MBPS - 0x0
15374 * CCK_5_5_LONG_MBPS - 0x1
15375 * CCK_2_LONG_MBPS - 0x2
15376 * CCK_1_LONG_MBPS - 0x3
15377 * CCK_11_SHORT_MBPS - 0x4
15378 * CCK_5_5_SHORT_MBPS - 0x5
15379 * CCK_2_SHORT_MBPS - 0x6
15380 *
15381 * *** HW_HT / VHT_RATE ***
15382 * MCS 0x0 - 0x9
15383 * */
15384} wmi_pdev_get_tpc_cmd_fixed_param;
15385
15386typedef struct {
15387 /*
15388 * TLV tag and len; tag equals
15389 * WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param
15390 */
15391 A_UINT32 tlv_header;
15392 A_UINT32 reserved0; /* for future need */
15393 /*
15394 * Following this structure is the TLV:
15395 * A_UINT32 tpc[1];
15396 */
15397} wmi_pdev_tpc_event_fixed_param;
15398
15399typedef struct {
15400 /*
15401 * TLV tag and len; tag equals
15402 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param
15403 */
15404 A_UINT32 tlv_header;
15405 A_UINT32 mac_id; /* MAC ID */
15406 A_UINT32 nfdBr_len;
15407 A_UINT32 nfdBm_len;
15408 A_UINT32 freqNum_len;
15409 /*
15410 * Following this structure is the TLV:
15411 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
15412 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
15413 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
15414 */
15415} wmi_pdev_nfcal_power_all_channels_event_fixed_param;
15416
15417typedef struct {
15418 /*
15419 * TLV tag and len; tag equals
15420 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr
15421 */
15422 A_UINT32 tlv_header;
15423 A_UINT32 nfdBr;
15424} wmi_pdev_nfcal_power_all_channels_nfdBr;
15425
15426typedef struct {
15427 /*
15428 * TLV tag and len; tag equals
15429 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm
15430 */
15431 A_UINT32 tlv_header;
15432 A_UINT32 nfdBm;
15433} wmi_pdev_nfcal_power_all_channels_nfdBm;
15434
15435typedef struct {
15436 /*
15437 * TLV tag and len; tag equals
15438 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum
15439 */
15440 A_UINT32 tlv_header;
15441 A_UINT32 freqNum;
15442} wmi_pdev_nfcal_power_all_channels_freqNum;
15443
15444typedef struct {
15445 /*
15446 * TLV tag and len; tag equals
15447 * WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param
15448 */
15449 A_UINT32 tlv_header;
15450 A_UINT32 cck_level;
15451} wmi_ani_cck_event_fixed_param;
15452
15453typedef struct {
15454 /*
15455 * TLV tag and len; tag equals
15456 * WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param
15457 */
15458 A_UINT32 tlv_header;
15459 A_UINT32 ofdm_level;
15460} wmi_ani_ofdm_event_fixed_param;
15461
Sreelakshmi Konamki02a4d7c2016-04-14 17:46:54 +053015462typedef enum wmi_coex_config_type {
15463 /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */
15464 WMI_COEX_CONFIG_PAGE_P2P_TDM = 1,
15465 /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */
15466 WMI_COEX_CONFIG_PAGE_STA_TDM = 2,
15467 /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */
15468 WMI_COEX_CONFIG_PAGE_SAP_TDM = 3,
Himanshu Agarwal800d58d2016-05-13 21:22:19 +053015469 /* config during WLAN connection */
15470 WMI_COEX_CONFIG_DURING_WLAN_CONN = 4,
15471 /* config to enable/disable BTC */
15472 WMI_COEX_CONFIG_BTC_ENABLE = 5,
Sreelakshmi Konamki02a4d7c2016-04-14 17:46:54 +053015473} WMI_COEX_CONFIG_TYPE;
15474
15475typedef struct {
15476 A_UINT32 tlv_header;
15477 A_UINT32 vdev_id;
15478 /* wmi_coex_config_type enum */
15479 A_UINT32 config_type;
15480 A_UINT32 config_arg1;
15481 A_UINT32 config_arg2;
15482} WMI_COEX_CONFIG_CMD_fixed_param;
15483
Sandeep Puligillaff55fec2016-03-09 12:54:23 -080015484/**
15485 * This command is sent from WLAN host driver to firmware to
15486 * request firmware to enable/disable channel avoidance report
15487 * to host.
15488 */
15489enum {
15490 WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0,
15491 WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1
15492};
15493
15494typedef struct {
15495 /*
15496 * TLV tag and len; tag equals
15497 * WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param
15498 */
15499 A_UINT32 tlv_header;
15500 /* Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */
15501 A_UINT32 rpt_allow;
15502} WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param;
15503
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +053015504/*
15505 * Periodic channel stats WMI command structure
15506 * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID
15507 */
15508typedef struct {
15509 /*
15510 * TLV tag and len; tag equals
15511 * WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param
15512 */
15513 A_UINT32 tlv_header;
15514 /** 1 = enable, 0 = disable */
15515 A_UINT32 enable;
15516 /** periodic stats duration (units are milliseconds) */
15517 A_UINT32 stats_period;
15518} wmi_set_periodic_channel_stats_config_fixed_param;
15519
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +053015520typedef struct {
15521 /*
15522 * TLV tag and len; tag equals
15523 * WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param
15524 */
15525 A_UINT32 tlv_header;
15526 /*
15527 * pdev_id for identifying the MAC
15528 * See macros starting with WMI_PDEV_ID_ for values.
15529 */
15530 A_UINT32 pdev_id;
15531 /* Identify the wlan module */
15532 A_UINT32 module_id;
15533 /* Num of elements in the following args[] array */
15534 A_UINT32 num_args;
15535/**
15536 * Following this structure are the TLVs:
15537 * A_UINT32 args[];
15538 **/
15539} wmi_pdev_wal_power_debug_cmd_fixed_param;
15540
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053015541typedef enum {
15542 WLAN_2G_CAPABILITY = 0x1,
15543 WLAN_5G_CAPABILITY = 0x2,
15544} WLAN_BAND_CAPABILITY;
15545
15546#define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1)
15547#define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
15548
15549#define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1)
15550#define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
15551
15552#define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1)
15553#define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
15554
15555#define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1)
15556#define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
15557
15558#define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1)
15559#define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
15560
15561#define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1)
15562#define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
15563
15564typedef struct {
15565 /*
15566 * TLV tag and len; tag equals
15567 * WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES
15568 */
15569 A_UINT32 tlv_header;
15570 /*
15571 * hw_mode_id - identify a particular set of HW characteristics, as
15572 * specified by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element
15573 * must be mapped to its parent WMI_HW_MODE_CAPABILITIES element using
15574 * hw_mode_id. No particular ordering of WMI_MAC_PHY_CAPABILITIES
15575 * elements should be assumed, though in practice the elements may
15576 * always be ordered by hw_mode_id
15577 */
15578 A_UINT32 hw_mode_id;
15579 /*
15580 * pdev_id starts with 1. pdev_id 1 => phy_id 0,
15581 * pdev_id 2 => phy_id 1
15582 */
15583 A_UINT32 pdev_id;
15584 /* phy id. Starts with 0 */
15585 A_UINT32 phy_id;
15586 /* supported modulations */
15587 union {
Himanshu Agarwale93c55e2016-05-20 12:18:15 +053015588 struct {
15589 A_UINT32 supports_11b:1,
15590 supports_11g:1,
15591 supports_11a:1,
15592 supports_11n:1,
15593 supports_11ac:1,
15594 supports_11ax:1;
15595 };
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053015596 A_UINT32 supported_flags;
15597 };
15598 /* supported bands, enum WLAN_BAND_CAPABILITY */
15599 A_UINT32 supported_bands;
15600 /*
15601 * ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us,
15602 * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us
15603 */
15604 A_UINT32 ampdu_density;
15605 /* max bw supported 2G, enum wmi_channel_width */
15606 A_UINT32 max_bw_supported_2G;
15607 /* WMI HT Capability, WMI_HT_CAP defines */
15608 A_UINT32 ht_cap_info_2G;
15609 /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
15610 A_UINT32 vht_cap_info_2G;
15611 /*
15612 * VHT Supported MCS Set field Rx/Tx same
15613 * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as
15614 * follows
15615 * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
15616 * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
15617 * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
15618 * - 3 indicates that n spatial streams is not supported
15619 */
15620 A_UINT32 vht_supp_mcs_2G;
15621 /* HE capability info field of 802.11ax, WMI_HE_CAP defines */
15622 A_UINT32 he_cap_info_2G;
15623 /* HE Supported MCS Set field Rx/Tx same */
15624 A_UINT32 he_supp_mcs_2G;
15625 /* Valid Transmit chain mask */
15626 A_UINT32 tx_chain_mask_2G;
15627 /* Valid Receive chain mask */
15628 A_UINT32 rx_chain_mask_2G;
15629 /* max bw supported 5G, enum wmi_channel_width */
15630 A_UINT32 max_bw_supported_5G;
15631 /* WMI HT Capability, WMI_HT_CAP defines */
15632 A_UINT32 ht_cap_info_5G;
15633 /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
15634 A_UINT32 vht_cap_info_5G;
15635 /*
15636 * VHT Supported MCS Set field Rx/Tx same
15637 * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as
15638 * follows
15639 * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
15640 * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
15641 * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
15642 * - 3 indicates that n spatial streams is not supported
15643 */
15644 A_UINT32 vht_supp_mcs_5G;
15645 /* HE capability info field of 802.11ax, WMI_HE_CAP defines */
15646 A_UINT32 he_cap_info_5G;
15647 /* HE Supported MCS Set field Rx/Tx same */
15648 A_UINT32 he_supp_mcs_5G;
15649 /* Valid Transmit chain mask */
15650 A_UINT32 tx_chain_mask_5G;
15651 /* Valid Receive chain mask */
15652 A_UINT32 rx_chain_mask_5G;
15653} WMI_MAC_PHY_CAPABILITIES;
15654
15655typedef struct {
15656 /*
15657 * TLV tag and len; tag equal
15658 * WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES
15659 */
15660 A_UINT32 tlv_header;
15661 /*
15662 * hw_mode_id - identify a particular set of HW characteristics,
15663 * as specified by the subsequent fields
15664 */
15665 A_UINT32 hw_mode_id;
15666 /* BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on */
15667 A_UINT32 phy_id_map;
15668 /*
15669 * number of bits set in phy_id_map represents number of
15670 * WMI_MAC_PHY_CAPABILITIES TLV's
15671 * one for each active PHY for current HW mode
15672 * identified by hw_mode_id. For example for
15673 * DBS/SBS mode there will be 2
15674 * WMI_MAC_PHY_CAPABILITIES TLVs and for
15675 * single MAC modes it
15676 * will be 1 WMI_MAC_PHY_CAPABILITIES
15677 * TLVs
15678 */
15679} WMI_HW_MODE_CAPABILITIES;
15680
15681typedef struct {
15682 /*
15683 * TLV tag and len; tag equals
15684 * WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS
15685 */
15686 A_UINT32 tlv_header;
15687 /* num HW modes */
15688 A_UINT32 num_hw_modes;
15689 /* num_hw_modes WMI_HW_MODE_CAPABILITIES TLV's */
15690} WMI_SOC_MAC_PHY_HW_MODE_CAPS;
15691
15692/*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/
15693typedef struct {
15694 /*
15695 * TLV tag and len; tag equals
15696 * WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT
15697 */
15698 A_UINT32 tlv_header;
15699 /* phy id */
15700 A_UINT32 phy_id;
15701 /* regdomain value specified in EEPROM */
15702 A_UINT32 eeprom_reg_domain;
15703 /* regdomain */
15704 A_UINT32 eeprom_reg_domain_ext;
15705 /*
15706 * CAP1 capabilities bit map, see REGDMN_CAP1_
15707 * defines
15708 */
15709 A_UINT32 regcap1;
15710 /*
15711 * REGDMN EEPROM CAP, see
15712 * REGDMN_EEPROM_EEREGCAP_ defines
15713 */
15714 A_UINT32 regcap2;
15715 /* REGDMN MODE, see REGDMN_MODE_ enum */
15716 A_UINT32 wireless_modes;
15717 A_UINT32 low_2ghz_chan;
15718 A_UINT32 high_2ghz_chan;
15719 A_UINT32 low_5ghz_chan;
15720 A_UINT32 high_5ghz_chan;
15721} WMI_HAL_REG_CAPABILITIES_EXT;
15722
15723typedef struct {
15724 /*
15725 * TLV tag and len; tag equals
15726 * WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES
15727 */
15728 A_UINT32 tlv_header;
15729 /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */
15730 A_UINT32 num_phy;
15731} WMI_SOC_HAL_REG_CAPABILITIES;
15732
Anurag Chouhanb3fa7a12016-04-18 17:26:49 +053015733typedef struct {
15734 /*
15735 * TLV tag and len; tag equals
15736 * WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv
15737 */
15738 A_UINT32 tlv_header;
15739 /*
15740 * global default adaptive dwell mode,
15741 * used when WMI_SCAN_DWELL_MODE_DEFAULT
15742 */
15743 A_UINT32 default_adaptive_dwell_mode;
15744 /*
15745 * the weight to calculate the average low pass filter for
15746 * channel congestion. 0-100
15747 */
15748 A_UINT32 adapative_lpf_weight;
15749 /* interval to monitor passive scan in msec */
15750 A_UINT32 passive_monitor_interval_ms;
15751 /* % of wifi activity to switch from passive to active 0-100 */
15752 A_UINT32 wifi_activity_threshold_pct;
15753} wmi_scan_adaptive_dwell_parameters_tlv;
15754
15755typedef struct {
15756 /*
15757 * TLV tag and len; tag equals
15758 * WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_config_fixed_param
15759 */
15760 A_UINT32 tlv_header;
15761 /* globally enable/disable adaptive dwell */
15762 A_UINT32 enable;
15763 /*
15764 * followed by TLV (tag length value) parameters array
15765 * The TLV's are:
15766 * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements)
15767 */
15768} wmi_scan_adaptive_dwell_config_fixed_param;
15769
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015770/* ADD NEW DEFS HERE */
15771
15772/*****************************************************************************
15773 * The following structures are deprecated. DO NOT USE THEM!
15774 */
15775
15776/** Max number of channels in the schedule. */
15777#define OCB_CHANNEL_MAX (5)
15778
15779/* NOTE: Make sure these data structures are identical to those 9235
15780* defined in sirApi.h */
15781
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053015782typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015783 /** Arbitration Inter-Frame Spacing. Range: 2-15 */
15784 A_UINT32 aifsn;
15785 /** Contention Window minimum. Range: 1 - 10 */
15786 A_UINT32 cwmin;
15787 /** Contention Window maximum. Range: 1 - 10 */
15788 A_UINT32 cwmax;
15789} wmi_qos_params_t;
15790
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053015791typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015792 /** Channel frequency in MHz */
15793 A_UINT32 chan_freq;
15794 /** Channel duration in ms */
15795 A_UINT32 duration;
15796 /** Start guard interval in ms */
15797 A_UINT32 start_guard_interval;
15798 /** End guard interval in ms */
15799 A_UINT32 end_guard_interval;
15800 /** Transmit power in dBm, range 0 - 23 */
15801 A_UINT32 tx_power;
15802 /** Transmit datarate in Mbps */
15803 A_UINT32 tx_rate;
15804 /** QoS parameters for each AC */
15805 wmi_qos_params_t qos_params[WLAN_MAX_AC];
15806 /** 1 to enable RX stats for this channel, 0 otherwise */
15807 A_UINT32 rx_stats;
15808} wmi_ocb_channel_t;
15809
15810typedef struct {
15811 /** TLV tag and len; tag equals
15812 * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
15813 A_UINT32 tlv_header;
15814 /* VDEV identifier */
15815 A_UINT32 vdev_id;
15816 /** Number of valid channels in the channels array */
15817 A_UINT32 num_channels;
15818 /** The array of channels */
15819 wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
15820 /** 1 to allow off-channel tx, 0 otherwise */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053015821 A_UINT32 off_channel_tx; /* Not supported */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015822} wmi_ocb_set_sched_cmd_fixed_param;
15823
15824typedef struct {
15825 /** Return status. 0 for success, non-zero otherwise */
15826 A_UINT32 status;
15827} wmi_ocb_set_sched_event_fixed_param;
15828
15829/**
15830* END DEPRECATED
15831*/
15832#ifdef __cplusplus
15833}
15834#endif
15835#endif /*_WMI_UNIFIED_H_*/
15836/**@}*/