blob: 61a9185e9f6b61ad999f95158db5d257805e944a [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05302 * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
28/**
29 * @addtogroup WMIAPI
30 ***@{
31 */
32
33/** @file
34 * This file specifies the WMI interface for the Software Architecture.
35 *
36 * It includes definitions of all the commands and events. Commands are messages
37 * from the host to the target. Events and Replies are messages from the target
38 * to the host.
39 *
40 * Ownership of correctness in regards to WMI commands
41 * belongs to the host driver and the target is not required to validate
42 * parameters for value, proper range, or any other checking.
43 *
44 * Guidelines for extending this interface are below.
45 *
46 * 1. Add new WMI commands ONLY within the specified range - 0x9000 - 0x9fff
47 * 2. Use ONLY A_UINT32 type for defining member variables within WMI command/event
48 * structures. Do not use A_UINT8, A_UINT16, A_BOOL or enum types within these structures.
49 * 3. DO NOT define bit fields within structures. Implement bit fields using masks
50 * if necessary. Do not use the programming language's bit field definition.
51 * 4. Define macros for encode/decode of A_UINT8, A_UINT16 fields within the A_UINT32
52 * variables. Use these macros for set/get of these fields. Try to use this to
53 * optimize the structure without bloating it with A_UINT32 variables for every lower
54 * sized field.
55 * 5. Do not use PACK/UNPACK attributes for the structures as each member variable is
56 * already 4-byte aligned by virtue of being a A_UINT32 type.
57 * 6. Comment each parameter part of the WMI command/event structure by using the
58 * 2 stars at the begining of C comment instead of one star to enable HTML document
59 * generation using Doxygen.
60 *
61 */
62
63#ifndef _WMI_UNIFIED_H_
64#define _WMI_UNIFIED_H_
65
66#ifdef __cplusplus
67extern "C" {
68#endif
69
70#include <wlan_defs.h>
71#include <wmi_services.h>
72#include <dbglog.h>
73
74#define ATH_MAC_LEN 6 /**< length of MAC in bytes */
75#define WMI_EVENT_STATUS_SUCCESS 0 /* Success return status to host */
76#define WMI_EVENT_STATUS_FAILURE 1 /* Failure return status to host */
77
78#define MAX_TX_RATE_VALUES 10 /*Max Tx Rates */
79#define MAX_RSSI_VALUES 10 /*Max Rssi values */
80
81/* The WLAN_MAX_AC macro cannot be changed without breaking
82 * WMI compatibility.
83 * The maximum value of access category
84 */
85#define WLAN_MAX_AC 4
86
87/*
88 * These don't necessarily belong here; but as the MS/SM macros require
89 * ar6000_internal.h to be included, it may not be defined as yet.
90 */
91#define WMI_F_MS(_v, _f) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053092 (((_v) & (_f)) >> (_f ## _S))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080093
94/*
95 * This breaks the "good macro practice" of only referencing each
96 * macro field once (to avoid things like field++ from causing issues.)
97 */
98#define WMI_F_RMW(_var, _v, _f) \
99 do { \
100 (_var) &= ~(_f); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530101 (_var) |= (((_v) << (_f ## _S)) & (_f)); \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800102 } while (0)
103
104#define WMI_GET_BITS(_val, _index, _num_bits) \
105 (((_val) >> (_index)) & ((1 << (_num_bits)) - 1))
106
107#define WMI_SET_BITS(_var, _index, _num_bits, _val) do { \
108 (_var) &= ~(((1 << (_num_bits)) - 1) << (_index)); \
109 (_var) |= (((_val) & ((1 << (_num_bits)) - 1)) << (_index)); \
110 } while (0)
111
112/**
113 * A packed array is an array where each entry in the array is less than
114 * or equal to 16 bits, and the entries are stuffed into an A_UINT32 array.
115 * For example, if each entry in the array is 11 bits, then you can stuff
116 * an array of 4 11-bit values into an array of 2 A_UINT32 values.
117 * The first 2 11-bit values will be stored in the first A_UINT32,
118 * and the last 2 11-bit values will be stored in the second A_UINT32.
119 */
120#define WMI_PACKED_ARR_SIZE(num_entries, bits_per_entry) \
121 (((num_entries) / (32 / (bits_per_entry))) + \
122 (((num_entries) % (32 / (bits_per_entry))) ? 1 : 0))
123
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530124static inline A_UINT32 wmi_packed_arr_get_bits(A_UINT32 *arr,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800125 A_UINT32 entry_index, A_UINT32 bits_per_entry)
126{
127 A_UINT32 entries_per_uint = (32 / bits_per_entry);
128 A_UINT32 uint_index = (entry_index / entries_per_uint);
129 A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
130 A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
131 A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530132 return (arr[uint_index] >> start_bit_in_uint) &
133 ((1 << bits_per_entry) - 1);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800134}
135
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530136static inline void wmi_packed_arr_set_bits(A_UINT32 *arr, A_UINT32 entry_index,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800137 A_UINT32 bits_per_entry, A_UINT32 val)
138{
139 A_UINT32 entries_per_uint = (32 / bits_per_entry);
140 A_UINT32 uint_index = (entry_index / entries_per_uint);
141 A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint);
142 A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints);
143 A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry);
144
145 arr[uint_index] &= ~(((1 << bits_per_entry) - 1) << start_bit_in_uint);
146 arr[uint_index] |=
147 ((val & ((1 << bits_per_entry) - 1)) << start_bit_in_uint);
148}
149
150/** 2 word representation of MAC addr */
151typedef struct {
152 /** upper 4 bytes of MAC address */
153 A_UINT32 mac_addr31to0;
154 /** lower 2 bytes of MAC address */
155 A_UINT32 mac_addr47to32;
156} wmi_mac_addr;
157
158/** macro to convert MAC address from WMI word format to char array */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530159#define WMI_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr, c_macaddr) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800160 (c_macaddr)[0] = ((pwmi_mac_addr)->mac_addr31to0) & 0xff; \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530161 (c_macaddr)[1] = (((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \
162 (c_macaddr)[2] = (((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \
163 (c_macaddr)[3] = (((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff; \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800164 (c_macaddr)[4] = ((pwmi_mac_addr)->mac_addr47to32) & 0xff; \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530165 (c_macaddr)[5] = (((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \
166} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800167
168/** macro to convert MAC address from char array to WMI word format */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530169#define WMI_CHAR_ARRAY_TO_MAC_ADDR(c_macaddr, pwmi_mac_addr) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800170 (pwmi_mac_addr)->mac_addr31to0 = \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530171 ((c_macaddr)[0] | ((c_macaddr)[1] << 8) \
172 | ((c_macaddr)[2] << 16) | ((c_macaddr)[3] << 24)); \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800173 (pwmi_mac_addr)->mac_addr47to32 = \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +0530174 ((c_macaddr)[4] | ((c_macaddr)[5] << 8)); \
175} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800176
177/*
178 * wmi command groups.
179 */
180typedef enum {
181 /* 0 to 2 are reserved */
182 WMI_GRP_START = 0x3,
183 WMI_GRP_SCAN = WMI_GRP_START,
184 WMI_GRP_PDEV,
185 WMI_GRP_VDEV,
186 WMI_GRP_PEER,
187 WMI_GRP_MGMT,
188 WMI_GRP_BA_NEG,
189 WMI_GRP_STA_PS,
190 WMI_GRP_DFS,
191 WMI_GRP_ROAM,
192 WMI_GRP_OFL_SCAN,
193 WMI_GRP_P2P,
194 WMI_GRP_AP_PS,
195 WMI_GRP_RATE_CTRL,
196 WMI_GRP_PROFILE,
197 WMI_GRP_SUSPEND,
198 WMI_GRP_BCN_FILTER,
199 WMI_GRP_WOW,
200 WMI_GRP_RTT,
201 WMI_GRP_SPECTRAL,
202 WMI_GRP_STATS,
203 WMI_GRP_ARP_NS_OFL,
204 WMI_GRP_NLO_OFL,
205 WMI_GRP_GTK_OFL,
206 WMI_GRP_CSA_OFL,
207 WMI_GRP_CHATTER,
208 WMI_GRP_TID_ADDBA,
209 WMI_GRP_MISC,
210 WMI_GRP_GPIO,
211 WMI_GRP_FWTEST,
212 WMI_GRP_TDLS,
213 WMI_GRP_RESMGR,
214 WMI_GRP_STA_SMPS,
215 WMI_GRP_WLAN_HB,
216 WMI_GRP_RMC,
217 WMI_GRP_MHF_OFL,
218 WMI_GRP_LOCATION_SCAN,
219 WMI_GRP_OEM,
220 WMI_GRP_NAN,
221 WMI_GRP_COEX,
222 WMI_GRP_OBSS_OFL,
223 WMI_GRP_LPI,
224 WMI_GRP_EXTSCAN,
225 WMI_GRP_DHCP_OFL,
226 WMI_GRP_IPA,
227 WMI_GRP_MDNS_OFL,
228 WMI_GRP_SAP_OFL,
229 WMI_GRP_OCB,
230 WMI_GRP_SOC,
231 WMI_GRP_PKT_FILTER,
232 WMI_GRP_MAWC,
233 WMI_GRP_PMF_OFFLOAD,
Manikandan Mohan130eb572015-12-23 13:53:34 -0800234 WMI_GRP_BPF_OFFLOAD, /* Berkeley Packet Filter */
Govind Singh941bd5e2016-02-04 17:15:25 +0530235 WMI_GRP_NAN_DATA,
Anurag Chouhan08f66c62016-04-18 17:14:51 +0530236 WMI_GRP_PROTOTYPE,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800237} WMI_GRP_ID;
238
239#define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
240#define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
241
242/**
243 * Command IDs and commange events
244 */
245typedef enum {
246 /** initialize the wlan sub system */
247 WMI_INIT_CMDID = 0x1,
248
249 /* Scan specific commands */
250
251 /** start scan request to FW */
252 WMI_START_SCAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SCAN),
253 /** stop scan request to FW */
254 WMI_STOP_SCAN_CMDID,
255 /** full list of channels as defined by the regulatory that will be used by scanner */
256 WMI_SCAN_CHAN_LIST_CMDID,
257 /** overwrite default priority table in scan scheduler */
258 WMI_SCAN_SCH_PRIO_TBL_CMDID,
259 /** This command to adjust the priority and min.max_rest_time
260 * of an on ongoing scan request.
261 */
262 WMI_SCAN_UPDATE_REQUEST_CMDID,
263
264 /** set OUI to be used in probe request if enabled */
265 WMI_SCAN_PROB_REQ_OUI_CMDID,
266
267 /* PDEV(physical device) specific commands */
268 /** set regulatorty ctl id used by FW to determine the exact ctl power limits */
269 WMI_PDEV_SET_REGDOMAIN_CMDID =
270 WMI_CMD_GRP_START_ID(WMI_GRP_PDEV),
271 /** set channel. mainly used for supporting monitor mode */
272 WMI_PDEV_SET_CHANNEL_CMDID,
273 /** set pdev specific parameters */
274 WMI_PDEV_SET_PARAM_CMDID,
275 /** enable packet log */
276 WMI_PDEV_PKTLOG_ENABLE_CMDID,
277 /** disable packet log*/
278 WMI_PDEV_PKTLOG_DISABLE_CMDID,
279 /** set wmm parameters */
280 WMI_PDEV_SET_WMM_PARAMS_CMDID,
281 /** set HT cap ie that needs to be carried probe requests HT/VHT channels */
282 WMI_PDEV_SET_HT_CAP_IE_CMDID,
283 /** set VHT cap ie that needs to be carried on probe requests on VHT channels */
284 WMI_PDEV_SET_VHT_CAP_IE_CMDID,
285
286 /** Command to send the DSCP-to-TID map to the target */
287 WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
288 /** set quiet ie parameters. primarily used in AP mode */
289 WMI_PDEV_SET_QUIET_MODE_CMDID,
290 /** Enable/Disable Green AP Power Save */
291 WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
292 /** get TPC config for the current operating channel */
293 WMI_PDEV_GET_TPC_CONFIG_CMDID,
294
295 /** set the base MAC address for the physical device before a VDEV is created.
296 * For firmware that doesn't support this feature and this command, the pdev
297 * MAC address will not be changed. */
298 WMI_PDEV_SET_BASE_MACADDR_CMDID,
299
300 /* eeprom content dump , the same to bdboard data */
301 WMI_PDEV_DUMP_CMDID,
302 /* set LED configuration */
303 WMI_PDEV_SET_LED_CONFIG_CMDID,
304 /* Get Current temprature of chip in Celcius degree */
305 WMI_PDEV_GET_TEMPERATURE_CMDID,
306 /* Set LED flashing behavior */
307 WMI_PDEV_SET_LED_FLASHING_CMDID,
Govind Singhc7d51942016-02-01 12:09:31 +0530308 /** Enable/Disable Smart Antenna */
309 WMI_PDEV_SMART_ANT_ENABLE_CMDID,
310 /** Set Smart Antenna RX antenna*/
311 WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
312 /** Override the antenna switch table */
313 WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
314 /** Override the CTL table */
315 WMI_PDEV_SET_CTL_TABLE_CMDID,
316 /** Override the array gain table */
317 WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID,
318 /** FIPS test mode command */
319 WMI_PDEV_FIPS_CMDID,
320 /** get CCK ANI level */
321 WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID,
322 /** get OFDM ANI level */
323 WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID,
324 /** NF Cal Power dBr/dBm */
325 WMI_PDEV_GET_NFCAL_POWER_CMDID,
326 /** TxPPDU TPC */
327 WMI_PDEV_GET_TPC_CMDID,
Govind Singh45ef44a2016-02-01 17:45:22 +0530328 /* Set to enable MIB stats collection */
329 WMI_MIB_STATS_ENABLE_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800330
Govind Singh869c9872016-02-22 18:36:34 +0530331 /** Set preferred channel list for DBS Mgr */
332 WMI_PDEV_SET_PCL_CMDID,
333 /** Set HW mode. Eg: single MAC, DBS & SBS,
334 * see soc_hw_mode_t for values
335 */
336 WMI_PDEV_SET_HW_MODE_CMDID,
337 /** Set DFS, SCAN modes and other FW configurations */
338 WMI_PDEV_SET_MAC_CONFIG_CMDID,
339 /** Set per band and per pdev antenna chains */
340 WMI_PDEV_SET_ANTENNA_MODE_CMDID,
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +0530341 /** Periodic channel stats request command */
342 WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID,
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +0530343 /** WMI command for power debug framework */
344 WMI_PDEV_WAL_POWER_DEBUG_CMDID,
Govind Singh869c9872016-02-22 18:36:34 +0530345
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800346 /* VDEV(virtual device) specific commands */
347 /** vdev create */
348 WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VDEV),
349 /** vdev delete */
350 WMI_VDEV_DELETE_CMDID,
351 /** vdev start request */
352 WMI_VDEV_START_REQUEST_CMDID,
353 /** vdev restart request (RX only, NO TX, used for CAC period)*/
354 WMI_VDEV_RESTART_REQUEST_CMDID,
355 /** vdev up request */
356 WMI_VDEV_UP_CMDID,
357 /** vdev stop request */
358 WMI_VDEV_STOP_CMDID,
359 /** vdev down request */
360 WMI_VDEV_DOWN_CMDID,
361 /* set a vdev param */
362 WMI_VDEV_SET_PARAM_CMDID,
363 /* set a key (used for setting per peer unicast and per vdev multicast) */
364 WMI_VDEV_INSTALL_KEY_CMDID,
365
366 /* wnm sleep mode command */
367 WMI_VDEV_WNM_SLEEPMODE_CMDID,
368 WMI_VDEV_WMM_ADDTS_CMDID,
369 WMI_VDEV_WMM_DELTS_CMDID,
370 WMI_VDEV_SET_WMM_PARAMS_CMDID,
371 WMI_VDEV_SET_GTX_PARAMS_CMDID,
372 WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID,
373
374 WMI_VDEV_PLMREQ_START_CMDID,
375 WMI_VDEV_PLMREQ_STOP_CMDID,
376 /* TSF timestamp action for specified vdev */
377 WMI_VDEV_TSF_TSTAMP_ACTION_CMDID,
378 /*
Govind Singh86180292016-02-01 14:03:37 +0530379 * set the additional IEs in probe requests for scan or
380 * assoc req etc for frames FW locally generates
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800381 */
382 WMI_VDEV_SET_IE_CMDID,
383
Govind Singhc7d51942016-02-01 12:09:31 +0530384 WMI_VDEV_RATEMASK_CMDID,
385 /** ATF VDEV REQUEST commands. */
386 WMI_VDEV_ATF_REQUEST_CMDID,
387 /** Command to send the DSCP-to-TID map to the target for VAP */
388 WMI_VDEV_SET_DSCP_TID_MAP_CMDID,
389 /*
390 * Configure filter for Neighbor Rx Pkt
391 * (smart mesh selective listening)
392 */
393 WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID,
Govind Singh869c9872016-02-22 18:36:34 +0530394 /** set quiet ie parameters. primarily used in AP mode */
395 WMI_VDEV_SET_QUIET_MODE_CMDID,
Krishna Kumaar Natarajanea0a7962016-04-16 14:09:09 +0530396 /** To set custom aggregation size for per vdev */
397 WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID,
Govind Singh869c9872016-02-22 18:36:34 +0530398
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800399 /* peer specific commands */
400
401 /** create a peer */
402 WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER),
403 /** delete a peer */
404 WMI_PEER_DELETE_CMDID,
405 /** flush specific tid queues of a peer */
406 WMI_PEER_FLUSH_TIDS_CMDID,
407 /** set a parameter of a peer */
408 WMI_PEER_SET_PARAM_CMDID,
409 /** set peer to associated state. will cary all parameters determined during assocication time */
410 WMI_PEER_ASSOC_CMDID,
411 /**add a wds (4 address ) entry. used only for testing WDS feature on AP products */
412 WMI_PEER_ADD_WDS_ENTRY_CMDID,
413 /**remove wds (4 address ) entry. used only for testing WDS feature on AP products */
414 WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
415 /** set up mcast group infor for multicast to unicast conversion */
416 WMI_PEER_MCAST_GROUP_CMDID,
417 /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */
418 WMI_PEER_INFO_REQ_CMDID,
419
420 /** request the estimated link speed for the peer. FW shall respond with
421 * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID.
422 */
423 WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID,
424 /*
425 * Set the conditions to report peer justified rate to driver
426 * The justified rate means the the user-rate is justified by PER.
427 */
428 WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID,
Govind Singhc7d51942016-02-01 12:09:31 +0530429 /** update a wds (4 address) entry */
430 WMI_PEER_UPDATE_WDS_ENTRY_CMDID,
431 /** add a proxy sta entry */
432 WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID,
433 /** Set Smart Antenna TX antenna */
434 WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
435 /** Set Smart Antenna TX train info */
436 WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
437 /** Set SA node config options */
438 WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
439 /** ATF PEER REQUEST commands */
440 WMI_PEER_ATF_REQUEST_CMDID,
441
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800442 /* beacon/management specific commands */
443
444 /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */
445 WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT),
446 /** transmit beacon by value */
447 WMI_PDEV_SEND_BCN_CMDID,
448 /** set the beacon template. used in beacon offload mode to setup the
449 * the common beacon template with the FW to be used by FW to generate beacons */
450 WMI_BCN_TMPL_CMDID,
451 /** set beacon filter with FW */
452 WMI_BCN_FILTER_RX_CMDID,
453 /* enable/disable filtering of probe requests in the firmware */
454 WMI_PRB_REQ_FILTER_RX_CMDID,
455 /** transmit management frame by value. will be deprecated */
456 WMI_MGMT_TX_CMDID,
457 /** set the probe response template. used in beacon offload mode to setup the
458 * the common probe response template with the FW to be used by FW to generate
459 * probe responses */
460 WMI_PRB_TMPL_CMDID,
461 /** Transmit Mgmt frame by reference */
462 WMI_MGMT_TX_SEND_CMDID,
463
464 /** commands to directly control ba negotiation directly from host. only used in test mode */
465
466 /** turn off FW Auto addba mode and let host control addba */
467 WMI_ADDBA_CLEAR_RESP_CMDID =
468 WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG),
469 /** send add ba request */
470 WMI_ADDBA_SEND_CMDID,
471 WMI_ADDBA_STATUS_CMDID,
472 /** send del ba */
473 WMI_DELBA_SEND_CMDID,
474 /** set add ba response will be used by FW to generate addba response*/
475 WMI_ADDBA_SET_RESP_CMDID,
476 /** send single VHT MPDU with AMSDU */
477 WMI_SEND_SINGLEAMSDU_CMDID,
478
479 /** Station power save specific config */
480 /** enable/disable station powersave */
481 WMI_STA_POWERSAVE_MODE_CMDID =
482 WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS),
483 /** set station power save specific parameter */
484 WMI_STA_POWERSAVE_PARAM_CMDID,
485 /** set station mimo powersave mode */
486 WMI_STA_MIMO_PS_MODE_CMDID,
487
488 /** DFS-specific commands */
489 /** enable DFS (radar detection)*/
490 WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS),
491 /** disable DFS (radar detection)*/
492 WMI_PDEV_DFS_DISABLE_CMDID,
493 /** enable DFS phyerr/parse filter offload */
494 WMI_DFS_PHYERR_FILTER_ENA_CMDID,
495 /** enable DFS phyerr/parse filter offload */
496 WMI_DFS_PHYERR_FILTER_DIS_CMDID,
497
498 /* Roaming specific commands */
499 /** set roam scan mode */
500 WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM),
501 /** set roam scan rssi threshold below which roam scan is enabled */
502 WMI_ROAM_SCAN_RSSI_THRESHOLD,
503 /** set roam scan period for periodic roam scan mode */
504 WMI_ROAM_SCAN_PERIOD,
505 /** set roam scan trigger rssi change threshold */
506 WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
507 /** set roam AP profile */
508 WMI_ROAM_AP_PROFILE,
509 /** set channel list for roam scans */
510 WMI_ROAM_CHAN_LIST,
511 /** Stop scan command */
512 WMI_ROAM_SCAN_CMD,
513 /** roaming sme offload sync complete */
514 WMI_ROAM_SYNCH_COMPLETE,
515 /** set ric request element for 11r roaming */
516 WMI_ROAM_SET_RIC_REQUEST_CMDID,
517 /** Invoke roaming forcefully */
518 WMI_ROAM_INVOKE_CMDID,
519 /** roaming filter cmd to allow further filtering of roaming candidate */
520 WMI_ROAM_FILTER_CMDID,
521 /** set gateway ip, mac and retries for subnet change detection */
522 WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID,
523 /** configure thresholds for MAWC */
524 WMI_ROAM_CONFIGURE_MAWC_CMDID,
Govind Singh86180292016-02-01 14:03:37 +0530525 /** configure MultiBand Operation(refer WFA MBO spec) parameter */
526 WMI_ROAM_SET_MBO_PARAM_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800527
528 /** offload scan specific commands */
529 /** set offload scan AP profile */
530 WMI_OFL_SCAN_ADD_AP_PROFILE =
531 WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN),
532 /** remove offload scan AP profile */
533 WMI_OFL_SCAN_REMOVE_AP_PROFILE,
534 /** set offload scan period */
535 WMI_OFL_SCAN_PERIOD,
536
537 /* P2P specific commands */
538 /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response
539 * generated during p2p listen and for p2p discoverability */
540 WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P),
541 /** enable/disable p2p discoverability on STA/AP VDEVs */
542 WMI_P2P_DEV_SET_DISCOVERABILITY,
543 /** set p2p ie to be carried in beacons generated by FW for GO */
544 WMI_P2P_GO_SET_BEACON_IE,
545 /** set p2p ie to be carried in probe response frames generated by FW for GO */
546 WMI_P2P_GO_SET_PROBE_RESP_IE,
547 /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA
548 * attribute in the beacons/probe responses received.
549 */
550 WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
551 /** set the configure of p2p find offload */
552 WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID,
553 /** set the vendor specific p2p ie data for p2p find offload using */
554 WMI_P2P_DISC_OFFLOAD_APPIE_CMDID,
555 /** set the BSSID/device name pattern of p2p find offload */
556 WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID,
557 /** set OppPS related parameters **/
558 WMI_P2P_SET_OPPPS_PARAM_CMDID,
559
560 /** AP power save specific config */
561 /** set AP power save specific param */
562 WMI_AP_PS_PEER_PARAM_CMDID =
563 WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS),
564 /** set AP UAPSD coex pecific param */
565 WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
566
567 /** set Enhanced Green AP param */
568 WMI_AP_PS_EGAP_PARAM_CMDID,
569
570 /** Rate-control specific commands */
571 WMI_PEER_RATE_RETRY_SCHED_CMDID =
572 WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL),
573
574 /** WLAN Profiling commands. */
575 WMI_WLAN_PROFILE_TRIGGER_CMDID =
576 WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE),
577 WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
578 WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
579 WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
580 WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
581
582 /** Suspend resume command Ids */
583 WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND),
584 WMI_PDEV_RESUME_CMDID,
585
586 /* Beacon filter commands */
587 /** add a beacon filter */
588 WMI_ADD_BCN_FILTER_CMDID =
589 WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER),
590 /** remove a beacon filter */
591 WMI_RMV_BCN_FILTER_CMDID,
592
593 /* WOW Specific WMI commands */
594 /** add pattern for awake */
595 WMI_WOW_ADD_WAKE_PATTERN_CMDID =
596 WMI_CMD_GRP_START_ID(WMI_GRP_WOW),
597 /** deleta a wake pattern */
598 WMI_WOW_DEL_WAKE_PATTERN_CMDID,
599 /** enable/deisable wake event */
600 WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
601 /** enable WOW */
602 WMI_WOW_ENABLE_CMDID,
603 /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */
604 WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
605 /* IOAC add keep alive cmd. */
606 WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID,
607 /* IOAC del keep alive cmd. */
608 WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID,
609 /* IOAC add pattern for awake */
610 WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID,
611 /* IOAC deleta a wake pattern */
612 WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID,
613 /* D0-WOW enable or disable cmd */
614 WMI_D0_WOW_ENABLE_DISABLE_CMDID,
615 /* enable extend WoW */
616 WMI_EXTWOW_ENABLE_CMDID,
617 /* Extend WoW command to configure app type1 parameter */
618 WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID,
619 /* Extend WoW command to configure app type2 parameter */
620 WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID,
621 /* enable ICMPv6 Network advertisement filtering */
622 WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID,
623 /*
624 * Set a pattern to match UDP packet in WOW mode.
625 * If match, construct a tx frame in a local buffer
626 * to send through the peer AP to the entity in the
627 * IP network that sent the UDP packet to this STA.
628 */
629 WMI_WOW_UDP_SVC_OFLD_CMDID,
630
631 /* configure WOW host wakeup PIN pattern */
632 WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID,
633
634 /* RTT measurement related cmd */
635 /** request to make an RTT measurement */
636 WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT),
637 /** request to report a tsf measurement */
638 WMI_RTT_TSF_CMDID,
639
640 /** spectral scan command */
641 /** configure spectral scan */
642 WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID =
643 WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL),
644 /** enable/disable spectral scan and trigger */
645 WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
646
647 /* F/W stats */
648 /** one time request for stats */
649 WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS),
650 /** Push MCC Adaptive Scheduler Stats to Firmware */
651 WMI_MCC_SCHED_TRAFFIC_STATS_CMDID,
652 /** one time request for txrx stats */
653 WMI_REQUEST_STATS_EXT_CMDID,
654
655 /* Link Layer stats */
656 /** Request for link layer stats */
657 WMI_REQUEST_LINK_STATS_CMDID,
658 /** Request for setting params to link layer stats */
659 WMI_START_LINK_STATS_CMDID,
660 /** Request to clear stats*/
661 WMI_CLEAR_LINK_STATS_CMDID,
662
663 /** Request for getting the Firmware Memory Dump */
664 WMI_GET_FW_MEM_DUMP_CMDID,
665
666 /** Request to flush of the buffered debug messages */
667 WMI_DEBUG_MESG_FLUSH_CMDID,
668
669 /** Cmd to configure the verbose level */
670 WMI_DIAG_EVENT_LOG_CONFIG_CMDID,
671
672 /** ARP OFFLOAD REQUEST*/
673 WMI_SET_ARP_NS_OFFLOAD_CMDID =
674 WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
675
676 /** Proactive ARP Response Add Pattern Command*/
677 WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID,
678
679 /** Proactive ARP Response Del Pattern Command*/
680 WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID,
681
682 /** NS offload config*/
683 WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID =
684 WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL),
685
686 /** APFIND Config */
687 WMI_APFIND_CMDID,
688
689 /** Passpoint list config */
690 WMI_PASSPOINT_LIST_CONFIG_CMDID,
691
692 /** configure supprssing parameters for MAWC */
693 WMI_NLO_CONFIGURE_MAWC_CMDID,
694
695 /* GTK offload Specific WMI commands */
696 WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL),
697
698 /* CSA offload Specific WMI commands */
699 /** csa offload enable */
700 WMI_CSA_OFFLOAD_ENABLE_CMDID =
701 WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL),
702 /** chan switch command */
703 WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
704
705 /* Chatter commands */
706 /* Change chatter mode of operation */
707 WMI_CHATTER_SET_MODE_CMDID =
708 WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER),
709 /** chatter add coalescing filter command */
710 WMI_CHATTER_ADD_COALESCING_FILTER_CMDID,
711 /** chatter delete coalescing filter command */
712 WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID,
713 /** chatter coalecing query command */
714 WMI_CHATTER_COALESCING_QUERY_CMDID,
715
716 /**addba specific commands */
717 /** start the aggregation on this TID */
718 WMI_PEER_TID_ADDBA_CMDID =
719 WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA),
720 /** stop the aggregation on this TID */
721 WMI_PEER_TID_DELBA_CMDID,
722
723 /** set station mimo powersave method */
724 WMI_STA_DTIM_PS_METHOD_CMDID,
725 /** Configure the Station UAPSD AC Auto Trigger Parameters */
726 WMI_STA_UAPSD_AUTO_TRIG_CMDID,
727 /** Configure the Keep Alive Parameters */
728 WMI_STA_KEEPALIVE_CMDID,
729
730 /* Request ssn from target for a sta/tid pair */
731 WMI_BA_REQ_SSN_CMDID,
732 /* misc command group */
733 /** echo command mainly used for testing */
734 WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC),
735
736 /* !!IMPORTANT!!
737 * If you need to add a new WMI command to the WMI_GRP_MISC sub-group,
738 * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID,
739 * as we MUST have a fixed value here to maintain compatibility between
740 * UTF and the ART2 driver
741 */
742 /** UTF WMI commands */
743 WMI_PDEV_UTF_CMDID,
744
745 /** set debug log config */
746 WMI_DBGLOG_CFG_CMDID,
747 /* QVIT specific command id */
748 WMI_PDEV_QVIT_CMDID,
749 /* Factory Testing Mode request command
750 * used for integrated chipsets */
751 WMI_PDEV_FTM_INTG_CMDID,
752 /* set and get keepalive parameters command */
753 WMI_VDEV_SET_KEEPALIVE_CMDID,
754 WMI_VDEV_GET_KEEPALIVE_CMDID,
755 /* For fw recovery test command */
756 WMI_FORCE_FW_HANG_CMDID,
757 /* Set Mcast/Bdcast filter */
758 WMI_SET_MCASTBCAST_FILTER_CMDID,
759 /** set thermal management params **/
760 WMI_THERMAL_MGMT_CMDID,
761 /** set host auto shutdown params **/
762 WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID,
763 /** set tpc chainmask config command */
764 WMI_TPC_CHAINMASK_CONFIG_CMDID,
765 /** set Antenna diversity command */
766 WMI_SET_ANTENNA_DIVERSITY_CMDID,
767 /** Set OCB Sched Request, deprecated */
768 WMI_OCB_SET_SCHED_CMDID,
769 /* Set rssi monitoring config command */
770 WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID,
771 /* Enable/disable Large Receive Offload processing;
772 * provide cfg params */
773 WMI_LRO_CONFIG_CMDID,
Nirav Shahbf6450f2015-11-05 11:47:20 +0530774 /*transfer data from host to firmware to write flash */
775 WMI_TRANSFER_DATA_TO_FLASH_CMDID,
Sreelakshmi Konamki58f4d622016-04-14 18:03:21 +0530776 /** Command to enable/disable filtering of multicast IP with unicast mac */
777 WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID,
Anurag Chouhan05d05fe2016-04-18 17:09:24 +0530778 /** Command to control WISA mode */
779 WMI_VDEV_WISA_CMDID,
780
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800781 /* GPIO Configuration */
782 WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
783 WMI_GPIO_OUTPUT_CMDID,
784
785 /* Txbf configuration command */
786 WMI_TXBF_CMDID,
787
788 /* FWTEST Commands */
789 WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID =
790 WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
791 /** set NoA descs **/
792 WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
793 /* UNIT Tests */
794 WMI_UNIT_TEST_CMDID,
Govind Singhc7d51942016-02-01 12:09:31 +0530795 /* set debug and tuning parameters */
796 WMI_FWTEST_CMDID,
797 /* Q-Boost configuration test commands */
798 WMI_QBOOST_CFG_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800799
800 /** TDLS Configuration */
801 /** enable/disable TDLS */
802 WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS),
803 /** set tdls peer state */
804 WMI_TDLS_PEER_UPDATE_CMDID,
805 /** TDLS Offchannel control */
806 WMI_TDLS_SET_OFFCHAN_MODE_CMDID,
807
808 /** Resmgr Configuration */
809 /** Adaptive OCS is enabled by default in the FW. This command is used to
810 * disable FW based adaptive OCS.
811 */
812 WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID =
813 WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR),
814 /** set the requested channel time quota for the home channels */
815 WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID,
816 /** set the requested latency for the home channels */
817 WMI_RESMGR_SET_CHAN_LATENCY_CMDID,
818
819 /** STA SMPS Configuration */
820 /** force SMPS mode */
821 WMI_STA_SMPS_FORCE_MODE_CMDID =
822 WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS),
823 /** set SMPS parameters */
824 WMI_STA_SMPS_PARAM_CMDID,
825
826 /* Wlan HB commands */
827 /* enalbe/disable wlan HB */
828 WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB),
829 /* set tcp parameters for wlan HB */
830 WMI_HB_SET_TCP_PARAMS_CMDID,
831 /* set tcp pkt filter for wlan HB */
832 WMI_HB_SET_TCP_PKT_FILTER_CMDID,
833 /* set udp parameters for wlan HB */
834 WMI_HB_SET_UDP_PARAMS_CMDID,
835 /* set udp pkt filter for wlan HB */
836 WMI_HB_SET_UDP_PKT_FILTER_CMDID,
837
838 /** Wlan RMC commands*/
839 /** enable/disable RMC */
840 WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC),
841 /** configure action frame period */
842 WMI_RMC_SET_ACTION_PERIOD_CMDID,
843 /** For debug/future enhancement purposes only,
844 * configures/finetunes RMC algorithms */
845 WMI_RMC_CONFIG_CMDID,
846
847 /** WLAN MHF offload commands */
848 /** enable/disable MHF offload */
849 WMI_MHF_OFFLOAD_SET_MODE_CMDID =
850 WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL),
851 /** Plumb routing table for MHF offload */
852 WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID,
853
854 /*location scan commands */
855 /*start batch scan */
856 WMI_BATCH_SCAN_ENABLE_CMDID =
857 WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
858 /*stop batch scan */
859 WMI_BATCH_SCAN_DISABLE_CMDID,
860 /*get batch scan result */
861 WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID,
862 /* OEM related cmd */
Manikandan Mohan05ac7ee2015-12-23 14:18:36 -0800863 WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM),
864 WMI_OEM_REQUEST_CMDID, /* UNUSED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800865
866 /** Nan Request */
867 WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN),
868
869 /** Modem power state command */
870 WMI_MODEM_POWER_STATE_CMDID =
871 WMI_CMD_GRP_START_ID(WMI_GRP_COEX),
872 WMI_CHAN_AVOID_UPDATE_CMDID,
Sreelakshmi Konamki02a4d7c2016-04-14 17:46:54 +0530873 WMI_COEX_CONFIG_CMDID,
Sandeep Puligillaff55fec2016-03-09 12:54:23 -0800874 WMI_CHAN_AVOID_RPT_ALLOW_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800875
876 /**
877 * OBSS scan offload enable/disable commands
878 * OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true:
879 * 1. WMI_SERVICE_OBSS_SCAN is reported by FW in service ready,
880 * 2. STA connect to a 2.4Ghz ht20/ht40 AP,
881 * 3. AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response)
882 * If OBSS parameters from beacon changed, also use enable CMD to update parameters.
883 * OBSS scan disable CMD will send to FW if have enabled when tearing down connection.
884 */
885 WMI_OBSS_SCAN_ENABLE_CMDID =
886 WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL),
887 WMI_OBSS_SCAN_DISABLE_CMDID,
888
889 /**LPI commands*/
890 /**LPI mgmt snooping config command*/
891 WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID =
892 WMI_CMD_GRP_START_ID(WMI_GRP_LPI),
893 /**LPI scan start command*/
894 WMI_LPI_START_SCAN_CMDID,
895 /**LPI scan stop command*/
896 WMI_LPI_STOP_SCAN_CMDID,
897
898 /** ExtScan commands */
899 WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN),
900 WMI_EXTSCAN_STOP_CMDID,
901 WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID,
902 WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID,
903 WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID,
904 WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID,
905 WMI_EXTSCAN_SET_CAPABILITIES_CMDID,
906 WMI_EXTSCAN_GET_CAPABILITIES_CMDID,
907 WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID,
908 WMI_EXTSCAN_CONFIGURE_MAWC_CMDID,
909
910 /** DHCP server offload commands */
911 WMI_SET_DHCP_SERVER_OFFLOAD_CMDID =
912 WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL),
913
914 /** IPA Offload features related commands */
915 WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID =
916 WMI_CMD_GRP_START_ID(WMI_GRP_IPA),
917
918 /** mDNS responder offload commands */
919 WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL),
920 WMI_MDNS_SET_FQDN_CMDID,
921 WMI_MDNS_SET_RESPONSE_CMDID,
922 WMI_MDNS_GET_STATS_CMDID,
923
924 /* enable/disable AP Authentication offload */
925 WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL),
926 WMI_SAP_SET_BLACKLIST_PARAM_CMDID,
927
928 /** Out-of-context-of-BSS (OCB) commands */
929 WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB),
930 WMI_OCB_SET_UTC_TIME_CMDID,
931 WMI_OCB_START_TIMING_ADVERT_CMDID,
932 WMI_OCB_STOP_TIMING_ADVERT_CMDID,
933 WMI_OCB_GET_TSF_TIMER_CMDID,
934 WMI_DCC_GET_STATS_CMDID,
935 WMI_DCC_CLEAR_STATS_CMDID,
936 WMI_DCC_UPDATE_NDL_CMDID,
937 /* System-On-Chip commands */
938 WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
939 WMI_SOC_SET_HW_MODE_CMDID,
940 WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID,
941 WMI_SOC_SET_ANTENNA_MODE_CMDID,
942
943 /* packet filter commands */
944 WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER),
945 WMI_PACKET_FILTER_ENABLE_CMDID,
946 /** Motion Aided WiFi Connectivity (MAWC) commands */
947 WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC),
948
949 /** WMI commands related to PMF 11w Offload */
950 WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID =
951 WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD),
952
Manikandan Mohan130eb572015-12-23 13:53:34 -0800953 /** WMI commands related to pkt filter (BPF) offload */
954 WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
955 WMI_BPF_GET_VDEV_STATS_CMDID,
956 WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
957 WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
Govind Singh941bd5e2016-02-04 17:15:25 +0530958 /**
959 * Nan Data commands
960 * NDI - NAN Data Interface
961 * NDP - NAN Data Path
962 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +0530963 /* Commands in prototyping phase */
964 WMI_NDI_GET_CAP_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROTOTYPE),
Govind Singh941bd5e2016-02-04 17:15:25 +0530965 WMI_NDP_INITIATOR_REQ_CMDID,
966 WMI_NDP_RESPONDER_REQ_CMDID,
967 WMI_NDP_END_REQ_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800968} WMI_CMD_ID;
969
970typedef enum {
971 /** WMI service is ready; after this event WMI messages can be sent/received */
972 WMI_SERVICE_READY_EVENTID = 0x1,
973 /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */
974 WMI_READY_EVENTID,
975
976 /** Scan specific events */
977 WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
978
979 /* PDEV specific events */
980 /** TPC config for the current operating channel */
981 WMI_PDEV_TPC_CONFIG_EVENTID =
982 WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
983 /** Channel stats event */
984 WMI_CHAN_INFO_EVENTID,
985
986 /** PHY Error specific WMI event */
987 WMI_PHYERR_EVENTID,
988
989 /** eeprom dump event */
990 WMI_PDEV_DUMP_EVENTID,
991
992 /** traffic pause event */
993 WMI_TX_PAUSE_EVENTID,
994
995 /** DFS radar event */
996 WMI_DFS_RADAR_EVENTID,
997
998 /** track L1SS entry and residency event */
999 WMI_PDEV_L1SS_TRACK_EVENTID,
1000
1001 /** Report current temprature of the chip in Celcius degree */
1002 WMI_PDEV_TEMPERATURE_EVENTID,
1003
1004 /* Extension of WMI_SERVICE_READY msg with
1005 * extra target capability info
1006 */
1007 WMI_SERVICE_READY_EXT_EVENTID,
1008
Govind Singhc7d51942016-02-01 12:09:31 +05301009 /** FIPS test mode event */
1010 WMI_PDEV_FIPS_EVENTID,
1011
1012 /** Channel hopping avoidance */
1013 WMI_PDEV_CHANNEL_HOPPING_EVENTID,
1014
1015 /** CCK ANI level event */
1016 WMI_PDEV_ANI_CCK_LEVEL_EVENTID,
1017
1018 /** OFDM ANI level event */
1019 WMI_PDEV_ANI_OFDM_LEVEL_EVENTID,
1020
1021 /** Tx PPDU params */
1022 WMI_PDEV_TPC_EVENTID,
1023
1024 /** NF Cal Power in DBR/DBM for all channels */
1025 WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
Govind Singh869c9872016-02-22 18:36:34 +05301026
1027 /** SOC/PDEV events */
1028 WMI_PDEV_SET_HW_MODE_RESP_EVENTID,
1029 WMI_PDEV_HW_MODE_TRANSITION_EVENTID,
1030 WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID,
1031
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001032 /* VDEV specific events */
1033 /** VDEV started event in response to VDEV_START request */
1034 WMI_VDEV_START_RESP_EVENTID =
1035 WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
1036 /** vdev stopped event , generated in response to VDEV_STOP request */
1037 WMI_VDEV_STOPPED_EVENTID,
1038 /* Indicate the set key (used for setting per
1039 * peer unicast and per vdev multicast)
1040 * operation has completed */
1041 WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
1042 /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please
1043 don't use this for any new implementations */
1044 /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario.
1045 This request is valid only for vdevs operating in soft AP or P2P GO mode */
1046 WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID,
1047
1048 /* Return the TSF timestamp of specified vdev */
1049 WMI_VDEV_TSF_REPORT_EVENTID,
Manikandan Mohan429a0782015-12-23 14:35:54 -08001050
1051 /* FW response to Host for vdev delete cmdid */
1052 WMI_VDEV_DELETE_RESP_EVENTID,
1053
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001054 /* peer specific events */
1055 /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
1056 WMI_PEER_STA_KICKOUT_EVENTID =
1057 WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
1058
1059 /** Peer Info Event with data_rate, rssi, tx_fail_cnt etc */
1060 WMI_PEER_INFO_EVENTID,
1061
1062 /** Event indicating that TX fail count reaching threshold */
1063 WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
1064 /** Return the estimate link speed for the Peer specified in the
1065 * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command.
1066 */
1067 WMI_PEER_ESTIMATED_LINKSPEED_EVENTID,
1068 /* Return the peer state
1069 * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE
1070 */
1071 WMI_PEER_STATE_EVENTID,
1072
1073 /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD.
1074 * After that, host will send Mx message.
1075 * Otherwise, host will pause any Mx(STA:M2/M4) message
1076 */
1077 WMI_PEER_ASSOC_CONF_EVENTID,
1078
Manikandan Mohan429a0782015-12-23 14:35:54 -08001079 /* FW response to Host for peer delete cmdid */
1080 WMI_PEER_DELETE_RESP_EVENTID,
1081
Govind Singhc7d51942016-02-01 12:09:31 +05301082 /** Valid rate code list for peer */
1083 WMI_PEER_RATECODE_LIST_EVENTID,
1084 WMI_WDS_PEER_EVENTID,
1085 WMI_PEER_STA_PS_STATECHG_EVENTID,
1086
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001087 /* beacon/mgmt specific events */
1088 /** RX management frame. the entire frame is carried along with the event. */
1089 WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
1090 /** software beacon alert event to Host requesting host to Queue a beacon for transmission
1091 use only in host beacon mode */
1092 WMI_HOST_SWBA_EVENTID,
1093 /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theritical value.
1094 tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in
1095 staggered beacon transmission mode */
1096 WMI_TBTTOFFSET_UPDATE_EVENTID,
1097
1098 /** event after the first beacon is transmitted following
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301099 a change in the template.*/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001100 WMI_OFFLOAD_BCN_TX_STATUS_EVENTID,
1101 /** event after the first probe response is transmitted following
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301102 a change in the template.*/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001103 WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID,
1104 /** Event for Mgmt TX completion event */
1105 WMI_MGMT_TX_COMPLETION_EVENTID,
1106
1107 /*ADDBA Related WMI Events */
1108 /** Indication the completion of the prior
1109 WMI_PEER_TID_DELBA_CMDID(initiator) */
1110 WMI_TX_DELBA_COMPLETE_EVENTID =
1111 WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
1112 /** Indication the completion of the prior
1113 *WMI_PEER_TID_ADDBA_CMDID(initiator) */
1114 WMI_TX_ADDBA_COMPLETE_EVENTID,
1115
1116 /* Seq num returned from hw for a sta/tid pair */
1117 WMI_BA_RSP_SSN_EVENTID,
1118
1119 /* Aggregation state requested by BTC */
1120 WMI_AGGR_STATE_TRIG_EVENTID,
1121
1122 /** Roam event to trigger roaming on host */
1123 WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
1124
1125 /** matching AP found from list of profiles */
1126 WMI_PROFILE_MATCH,
1127 /** roam synch event */
1128 WMI_ROAM_SYNCH_EVENTID,
1129
1130 /** P2P disc found */
1131 WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
1132
1133 /*send noa info to host when noa is changed for beacon tx offload enable */
1134 WMI_P2P_NOA_EVENTID,
1135
1136 /** Send EGAP Info to host */
1137 WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS),
1138
1139 /* send pdev resume event to host after pdev resume. */
1140 WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND),
1141
1142 /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID.
1143 will cary wake reason */
1144 WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
1145 WMI_D0_WOW_DISABLE_ACK_EVENTID,
1146 WMI_WOW_INITIAL_WAKEUP_EVENTID,
1147
1148 /*RTT related event ID */
1149 /** RTT measurement report */
1150 WMI_RTT_MEASUREMENT_REPORT_EVENTID =
1151 WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
1152 /** TSF measurement report */
1153 WMI_TSF_MEASUREMENT_REPORT_EVENTID,
1154 /** RTT error report */
1155 WMI_RTT_ERROR_REPORT_EVENTID,
1156 /*STATS specific events */
1157 /** txrx stats event requested by host */
1158 WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS),
1159 /** FW iface link stats Event */
1160 WMI_IFACE_LINK_STATS_EVENTID,
1161 /** FW iface peer link stats Event */
1162 WMI_PEER_LINK_STATS_EVENTID,
1163 /** FW Update radio stats Event */
1164 WMI_RADIO_LINK_STATS_EVENTID,
1165 /** Firmware memory dump Complete event*/
1166 WMI_UPDATE_FW_MEM_DUMP_EVENTID,
1167
1168 /** Event indicating the DIAG logs/events supported by FW */
1169 WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID,
1170
Anurag Chouhan90c1a182016-04-18 17:20:38 +05301171 /** Instantaneous RSSI event */
Govind Singhc7d51942016-02-01 12:09:31 +05301172 WMI_INST_RSSI_STATS_EVENTID,
1173
Anurag Chouhan90c1a182016-04-18 17:20:38 +05301174 /** FW update tx power levels event */
1175 WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID,
1176
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001177 /** NLO specific events */
1178 /** NLO match event after the first match */
1179 WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
1180
1181 /** NLO scan complete event */
1182 WMI_NLO_SCAN_COMPLETE_EVENTID,
1183
1184 /** APFIND specific events */
1185 WMI_APFIND_EVENTID,
1186
1187 /** passpoint network match event */
1188 WMI_PASSPOINT_MATCH_EVENTID,
1189
1190 /** GTK offload stautus event requested by host */
1191 WMI_GTK_OFFLOAD_STATUS_EVENTID =
1192 WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
1193
1194 /** GTK offload failed to rekey event */
1195 WMI_GTK_REKEY_FAIL_EVENTID,
1196 /* CSA IE received event */
1197 WMI_CSA_HANDLING_EVENTID =
1198 WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
1199
1200 /*chatter query reply event */
1201 WMI_CHATTER_PC_QUERY_EVENTID =
1202 WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER),
1203
1204 /** echo event in response to echo command */
1205 WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
1206
1207 /* !!IMPORTANT!!
1208 * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group,
1209 * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID,
1210 * as we MUST have a fixed value here to maintain compatibility between
1211 * UTF and the ART2 driver
1212 */
1213 /** UTF specific WMI event */
1214 WMI_PDEV_UTF_EVENTID,
1215
1216 /** event carries buffered debug messages */
1217 WMI_DEBUG_MESG_EVENTID,
1218 /** FW stats(periodic or on shot) */
1219 WMI_UPDATE_STATS_EVENTID,
1220 /** debug print message used for tracing FW code while debugging */
1221 WMI_DEBUG_PRINT_EVENTID,
1222 /** DCS wlan or non-wlan interference event
1223 */
1224 WMI_DCS_INTERFERENCE_EVENTID,
1225 /** VI spoecific event */
1226 WMI_PDEV_QVIT_EVENTID,
1227 /** FW code profile data in response to profile request */
1228 WMI_WLAN_PROFILE_DATA_EVENTID,
1229 /* Factory Testing Mode request event
1230 * used for integrated chipsets */
1231 WMI_PDEV_FTM_INTG_EVENTID,
1232 /* avoid list of frequencies .
1233 */
1234 WMI_WLAN_FREQ_AVOID_EVENTID,
1235 /* Indicate the keepalive parameters */
1236 WMI_VDEV_GET_KEEPALIVE_EVENTID,
1237 /* Thermal Management event */
1238 WMI_THERMAL_MGMT_EVENTID,
1239
1240 /* Container for QXDM/DIAG events */
1241 WMI_DIAG_DATA_CONTAINER_EVENTID,
1242
1243 /* host auto shutdown event */
1244 WMI_HOST_AUTO_SHUTDOWN_EVENTID,
1245
1246 /*update mib counters together with WMI_UPDATE_STATS_EVENTID */
1247 WMI_UPDATE_WHAL_MIB_STATS_EVENTID,
1248
1249 /*update ht/vht info based on vdev (rx and tx NSS and preamble) */
1250 WMI_UPDATE_VDEV_RATE_STATS_EVENTID,
1251
1252 WMI_DIAG_EVENTID,
1253
1254 /** Set OCB Sched Response, deprecated */
1255 WMI_OCB_SET_SCHED_EVENTID,
1256
1257 /* event to indicate the flush of the buffered debug messages is complete*/
1258 WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID,
1259 /* event to report mix/max RSSI breach events */
1260 WMI_RSSI_BREACH_EVENTID,
Nirav Shahbf6450f2015-11-05 11:47:20 +05301261 /* event to report completion of data storage into flash memory */
1262 WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001263
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -08001264 /** event to report SCPC calibrated data to host */
1265 WMI_PDEV_UTF_SCPC_EVENTID,
1266
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001267 /* GPIO Event */
1268 WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
1269 /** upload H_CV info WMI event
1270 * to indicate uploaded H_CV info to host
1271 */
1272 WMI_UPLOADH_EVENTID,
1273
1274 /** capture H info WMI event
1275 * to indicate captured H info to host
1276 */
1277 WMI_CAPTUREH_EVENTID,
1278 /* hw RFkill */
1279 WMI_RFKILL_STATE_CHANGE_EVENTID,
1280
1281 /* TDLS Event */
1282 WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
1283
Manikandan Mohan55c94d62015-12-04 13:47:58 -08001284 /* STA SMPS Event */
1285 /* force SMPS mode */
1286 WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID =
1287 WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS),
1288
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001289 /*location scan event */
1290 /*report the firmware's capability of batch scan */
1291 WMI_BATCH_SCAN_ENABLED_EVENTID =
1292 WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
1293 /*batch scan result */
1294 WMI_BATCH_SCAN_RESULT_EVENTID,
1295 /* OEM Event */
Krishna Kumaar Natarajan1dfa3532015-11-19 16:16:20 -08001296 WMI_OEM_CAPABILITY_EVENTID = /* DEPRECATED */
1297 WMI_EVT_GRP_START_ID(WMI_GRP_OEM),
1298 WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */
1299 WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */
1300 WMI_OEM_RESPONSE_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001301
1302 /* NAN Event */
1303 WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN),
Govind Singh941bd5e2016-02-04 17:15:25 +05301304 WMI_NAN_DISC_IFACE_CREATED_EVENTID,
1305 WMI_NAN_DISC_IFACE_DELETED_EVENTID,
1306 WMI_NAN_STARTED_CLUSTER_EVENTID,
1307 WMI_NAN_JOINED_CLUSTER_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001308
1309 /* LPI Event */
1310 WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI),
1311 WMI_LPI_STATUS_EVENTID,
1312 WMI_LPI_HANDOFF_EVENTID,
1313
1314 /* ExtScan events */
1315 WMI_EXTSCAN_START_STOP_EVENTID =
1316 WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN),
1317 WMI_EXTSCAN_OPERATION_EVENTID,
1318 WMI_EXTSCAN_TABLE_USAGE_EVENTID,
1319 WMI_EXTSCAN_CACHED_RESULTS_EVENTID,
1320 WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID,
1321 WMI_EXTSCAN_HOTLIST_MATCH_EVENTID,
1322 WMI_EXTSCAN_CAPABILITIES_EVENTID,
1323 WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID,
1324
1325 /* mDNS offload events */
1326 WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL),
1327
1328 /* SAP Authentication offload events */
1329 WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL),
1330 WMI_SAP_OFL_DEL_STA_EVENTID,
1331
1332 /** Out-of-context-of-bss (OCB) events */
1333 WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB),
1334 WMI_OCB_GET_TSF_TIMER_RESP_EVENTID,
1335 WMI_DCC_GET_STATS_RESP_EVENTID,
1336 WMI_DCC_UPDATE_NDL_RESP_EVENTID,
1337 WMI_DCC_STATS_EVENTID,
1338 /* System-On-Chip events */
1339 WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
1340 WMI_SOC_HW_MODE_TRANSITION_EVENTID,
1341 WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID,
1342 /** Motion Aided WiFi Connectivity (MAWC) events */
1343 WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC),
1344
Manikandan Mohan130eb572015-12-23 13:53:34 -08001345 /** pkt filter (BPF) offload relevant events */
Anurag Chouhan08f66c62016-04-18 17:14:51 +05301346 WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
Manikandan Mohan130eb572015-12-23 13:53:34 -08001347 WMI_BPF_VDEV_STATS_INFO_EVENTID,
Govind Singh941bd5e2016-02-04 17:15:25 +05301348
Anurag Chouhan08f66c62016-04-18 17:14:51 +05301349 /* Events in Prototyping phase */
1350 WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE),
Govind Singh941bd5e2016-02-04 17:15:25 +05301351 WMI_NDP_INITIATOR_RSP_EVENTID,
1352 WMI_NDP_RESPONDER_RSP_EVENTID,
1353 WMI_NDP_END_RSP_EVENTID,
1354 WMI_NDP_INDICATION_EVENTID,
1355 WMI_NDP_CONFIRM_EVENTID,
1356 WMI_NDP_END_INDICATION_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001357} WMI_EVT_ID;
1358
1359/* defines for OEM message sub-types */
1360#define WMI_OEM_CAPABILITY_REQ 0x01
1361#define WMI_OEM_CAPABILITY_RSP 0x02
1362#define WMI_OEM_MEASUREMENT_REQ 0x03
1363#define WMI_OEM_MEASUREMENT_RSP 0x04
1364#define WMI_OEM_ERROR_REPORT_RSP 0x05
1365#define WMI_OEM_NAN_MEAS_REQ 0x06
1366#define WMI_OEM_NAN_MEAS_RSP 0x07
1367#define WMI_OEM_NAN_PEER_INFO 0x08
1368#define WMI_OEM_CONFIGURE_LCR 0x09
1369#define WMI_OEM_CONFIGURE_LCI 0x0A
1370
1371/* below message subtype is internal to CLD. Target should
1372 * never use internal response type
1373 */
1374#define WMI_OEM_INTERNAL_RSP 0xdeadbeef
1375
Govind Singh941bd5e2016-02-04 17:15:25 +05301376#define WMI_CHAN_LIST_TAG 0x1
1377#define WMI_SSID_LIST_TAG 0x2
1378#define WMI_BSSID_LIST_TAG 0x3
1379#define WMI_IE_TAG 0x4
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001380
1381typedef struct {
1382 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
1383 /** primary 20 MHz channel frequency in mhz */
1384 A_UINT32 mhz;
1385 /** Center frequency 1 in MHz*/
1386 A_UINT32 band_center_freq1;
1387 /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
1388 A_UINT32 band_center_freq2;
1389 /** channel info described below */
1390 A_UINT32 info;
1391 /** contains min power, max power, reg power and reg class id. */
1392 A_UINT32 reg_info_1;
1393 /** contains antennamax */
1394 A_UINT32 reg_info_2;
1395} wmi_channel;
1396
1397typedef enum {
1398 WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
1399 WMI_CHANNEL_CHANGE_CAUSE_CSA,
1400} wmi_channel_change_cause;
1401
1402/** channel info consists of 6 bits of channel mode */
1403
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301404#define WMI_SET_CHANNEL_MODE(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001405 (pwmi_channel)->info &= 0xffffffc0; \
1406 (pwmi_channel)->info |= (val); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301407} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001408
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301409#define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001410
1411#define WMI_CHAN_FLAG_HT40_PLUS 6
1412#define WMI_CHAN_FLAG_PASSIVE 7
1413#define WMI_CHAN_ADHOC_ALLOWED 8
1414#define WMI_CHAN_AP_DISABLED 9
1415#define WMI_CHAN_FLAG_DFS 10
1416#define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */
1417#define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */
1418#define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */
1419#define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */
1420#define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */
Govind Singh32cced32016-02-01 13:33:09 +05301421/* Enable radar event reporting for sec80 in VHT80p80 */
1422#define WMI_CHAN_FLAG_DFS_CFREQ2 16
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001423
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301424#define WMI_SET_CHANNEL_FLAG(pwmi_channel, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001425 (pwmi_channel)->info |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301426} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001427
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301428#define WMI_GET_CHANNEL_FLAG(pwmi_channel, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001429 (((pwmi_channel)->info & (1 << flag)) >> flag)
1430
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301431#define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001432 (pwmi_channel)->reg_info_1 &= 0xffffff00; \
1433 (pwmi_channel)->reg_info_1 |= (val&0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301434} while (0)
1435#define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001436
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301437#define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001438 (pwmi_channel)->reg_info_1 &= 0xffff00ff; \
1439 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 8); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301440} while (0)
1441#define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001442
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301443#define WMI_SET_CHANNEL_REG_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001444 (pwmi_channel)->reg_info_1 &= 0xff00ffff; \
1445 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 16); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301446} while (0)
1447#define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
1448#define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001449 (pwmi_channel)->reg_info_1 &= 0x00ffffff; \
1450 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 24); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301451} while (0)
1452#define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001453
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301454#define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001455 (pwmi_channel)->reg_info_2 &= 0xffffff00; \
1456 (pwmi_channel)->reg_info_2 |= (val&0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301457} while (0)
1458#define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001459
1460/* max tx power is in 1 dBm units */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301461#define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001462 (pwmi_channel)->reg_info_2 &= 0xffff00ff; \
1463 (pwmi_channel)->reg_info_2 |= ((val&0xff)<<8); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301464} while (0)
1465#define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001466
1467
1468/** HT Capabilities*/
1469#define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
1470#define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
1471#define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
1472#define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
1473#define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
1474#define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
1475#define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
1476#define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
1477#define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
1478#define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
1479#define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
1480#define WMI_HT_CAP_HT40_SGI 0x0800
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301481#define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */
1482#define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001483
1484/* These macros should be used when we wish to advertise STBC support for
1485 * only 1SS or 2SS or 3SS. */
1486#define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
1487#define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
1488#define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
1489
1490#define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
1491 WMI_HT_CAP_HT20_SGI | \
1492 WMI_HT_CAP_HT40_SGI | \
1493 WMI_HT_CAP_TX_STBC | \
1494 WMI_HT_CAP_RX_STBC | \
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301495 WMI_HT_CAP_LDPC | \
1496 WMI_HT_CAP_TX_LDPC | \
1497 WMI_HT_CAP_RX_LDPC)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001498
1499/* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
1500 field. The fields not defined here are not supported, or reserved.
1501 Do not change these masks and if you have to add new one follow the
1502 bitmask as specified by 802.11ac draft.
1503 */
1504
1505#define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
1506#define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
1507#define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
1508#define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004
1509#define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008
1510#define WMI_VHT_CAP_RX_LDPC 0x00000010
1511#define WMI_VHT_CAP_SGI_80MHZ 0x00000020
1512#define WMI_VHT_CAP_SGI_160MHZ 0x00000040
1513#define WMI_VHT_CAP_TX_STBC 0x00000080
1514#define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
1515#define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
1516#define WMI_VHT_CAP_SU_BFORMER 0x00000800
1517#define WMI_VHT_CAP_SU_BFORMEE 0x00001000
1518#define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
1519#define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
1520#define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
1521#define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
1522#define WMI_VHT_CAP_MU_BFORMER 0x00080000
1523#define WMI_VHT_CAP_MU_BFORMEE 0x00100000
1524#define WMI_VHT_CAP_TXOP_PS 0x00200000
1525#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
1526#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
1527#define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
1528#define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301529#define WMI_VHT_CAP_TX_LDPC 0x40000000
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001530
1531/* TEMPORARY:
1532 * Preserve the incorrect old name as an alias for the correct new name
1533 * until all references to the old name have been removed from all hosts
1534 * and targets.
1535 */
1536#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
1537
1538/* These macros should be used when we wish to advertise STBC support for
1539 * only 1SS or 2SS or 3SS. */
1540#define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
1541#define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
1542#define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
1543
1544/* TEMPORARY:
1545 * Preserve the incorrect old name as an alias for the correct new name
1546 * until all references to the old name have been removed from all hosts
1547 * and targets.
1548 */
1549#define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
1550
1551#define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
1552 WMI_VHT_CAP_SGI_80MHZ | \
1553 WMI_VHT_CAP_TX_STBC | \
1554 WMI_VHT_CAP_RX_STBC_MASK | \
1555 WMI_VHT_CAP_RX_LDPC | \
Anurag Chouhan798fa4a2016-04-18 16:57:27 +05301556 WMI_VHT_CAP_TX_LDPC | \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001557 WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
1558 WMI_VHT_CAP_RX_FIXED_ANT | \
1559 WMI_VHT_CAP_TX_FIXED_ANT)
1560
1561/* Interested readers refer to Rx/Tx MCS Map definition as defined in
1562 802.11ac
1563 */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301564#define WMI_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001565#define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
1566#define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
1567
Govind Singhd24f5e42016-02-22 15:16:46 +05301568/** 11ax capabilities */
1569#define WMI_HE_CAP_PPE_PRESENT 0x00000001
1570#define WMI_HE_CAP_TWT_RESPONDER_SUPPORT 0x00000002
1571#define WMI_HE_CAP_TWT_REQUESTER_SUPPORT 0x00000004
1572#define WMI_HE_FRAG_SUPPORT_MASK 0x00000018
1573#define WMI_HE_FRAG_SUPPORT_SHIFT 3
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07001574
1575
1576/* fragmentation support field value */
1577enum {
1578 WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */
1579 /*
1580 * support for fragments within a VHT single MPDU,
1581 * no support for fragments within AMPDU
1582 */
1583 WMI_HE_FRAG_SUPPORT_LEVEL1,
1584 /* support for up to 1 fragment per MSDU within a single A-MPDU */
1585 WMI_HE_FRAG_SUPPORT_LEVEL2,
1586 /* support for multiple fragments per MSDU within an A-MPDU */
1587 WMI_HE_FRAG_SUPPORT_LEVEL3,
1588};
1589
1590
Govind Singhd24f5e42016-02-22 15:16:46 +05301591/** NOTE: This defs cannot be changed in the future without
1592 * breaking WMI compatibility
1593 */
1594#define WMI_MAX_NUM_SS 8
1595#define WMI_MAX_NUM_RU 4
1596
1597/*
1598 * Figure 8 554ae: -PPE Threshold Info field format
1599 * we pack PPET16 and PPT8 for four RU's in one element of array.
1600 *
1601 * ppet16_ppet8_ru3_ru0 array element 0 holds:
1602 * | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 |
1603 *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1|
1604 *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
1605 *
1606 * ppet16_ppet8_ru3_ru0 array element 1 holds:
1607 * | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 |
1608 *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1|
1609 *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 |
1610 *
1611 * etc.
1612 */
1613
1614/*
1615 * Note that in these macros, "ru" is one-based, not zero-based, while
1616 * nssm1 is zero-based.
1617 */
1618#define WMI_SET_PPET8(ppet16_ppet8_ru3_ru0, ppet, ru, nssm1) \
1619 do { \
1620 ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1)%4)*6)); \
1621 ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1)%4)*6)); \
1622 } while (0)
1623
1624#define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \
1625 ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1)%4)*6))&7)
1626
1627#define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ppet, ru, nssm1) \
1628 do { \
1629 ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1)%4)*6+3)); \
1630 ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1)%4)*6+3)); \
1631 } while (0)
1632
1633#define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \
1634 ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1)%4)*6+3))&7)
1635
1636typedef struct _wmi_ppe_threshold {
1637 A_UINT32 numss_m1; /** NSS - 1*/
1638 A_UINT32 ru_count; /** Max RU count */
1639 /** ppet8 and ppet16 for max num ss */
1640 A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS];
1641} wmi_ppe_threshold;
1642
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001643/* WMI_SYS_CAPS_* refer to the capabilities that system support
1644 */
1645#define WMI_SYS_CAP_ENABLE 0x00000001
1646#define WMI_SYS_CAP_TXPOWER 0x00000002
1647
1648/*
1649 * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
1650 * Bits 5:0 are reserved
1651 */
1652#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
1653#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
1654#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
1655#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
1656#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
1657#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
1658#define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7)
1659#define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
1660
1661#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
1662#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
1663#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
1664#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
1665#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
1666#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
1667#define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
1668#define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
1669
1670#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
1671 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
1672#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
1673 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
1674#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
1675 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
1676#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
1677 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
1678#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
1679 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
1680#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
1681 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
1682#define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \
1683 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
1684#define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
1685 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
1686
1687#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
1688 ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
1689#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
1690 ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
1691#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
1692 ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
1693#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
1694 ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
1695#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
1696 ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
1697#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
1698 ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
1699#define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \
1700 ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
1701#define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \
1702 ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
1703
1704#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31)
1705#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30)
1706#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29)
1707
1708#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
1709#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
1710#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
1711
1712#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
1713 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
1714#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
1715 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
1716#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
1717 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
1718
1719#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \
1720 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
1721#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \
1722 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
1723#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \
1724 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
1725
1726#define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31)
1727#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30)
1728
1729#define WMI_DBS_FW_MODE_CFG_DBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
1730#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
1731
1732#define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
1733 WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
1734#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
1735 WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
1736
1737#define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \
1738 ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
1739#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \
1740 ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
1741
1742/** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
1743typedef struct _wmi_abi_version {
1744 A_UINT32 abi_version_0;
1745 /** WMI Major and Minor versions */
1746 A_UINT32 abi_version_1;
1747 /** WMI change revision */
1748 A_UINT32 abi_version_ns_0;
1749 /** ABI version namespace first four dwords */
1750 A_UINT32 abi_version_ns_1;
1751 /** ABI version namespace second four dwords */
1752 A_UINT32 abi_version_ns_2;
1753 /** ABI version namespace third four dwords */
1754 A_UINT32 abi_version_ns_3;
1755 /** ABI version namespace fourth four dwords */
1756} wmi_abi_version;
1757
1758/*
1759 * maximum number of memroy requests allowed from FW.
1760 */
1761#define WMI_MAX_MEM_REQS 16
1762
1763/* !!NOTE!!:
1764 * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
1765 * Please don't change it.
1766 */
1767#define HW_BD_INFO_SIZE 5
1768
1769/**
Govind Singh869c9872016-02-22 18:36:34 +05301770 * PDEV ID to identify the physical device,
1771 * value 0 reserved for SOC level commands/event
1772 */
1773#define WMI_PDEV_ID_SOC 0 /* SOC level, applicable to all PDEVs */
1774#define WMI_PDEV_ID_1ST 1 /* first pdev (pdev 0) */
1775#define WMI_PDEV_ID_2ND 2 /* second pdev (pdev 1) */
1776#define WMI_PDEV_ID_3RD 3 /* third pdev (pdev 2) */
1777
1778/**
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001779 * The following struct holds optional payload for
1780 * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
1781 * device capability to the host.
1782 */
1783typedef struct {
1784 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
1785 A_UINT32 fw_build_vers; /* firmware build number */
1786 wmi_abi_version fw_abi_vers;
1787 A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
1788 A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
1789 A_UINT32 num_rf_chains;
1790 /* The following field is only valid for service type WMI_SERVICE_11AC */
1791 A_UINT32 ht_cap_info; /* WMI HT Capability */
1792 A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
1793 A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
1794 A_UINT32 hw_min_tx_power;
1795 A_UINT32 hw_max_tx_power;
1796 A_UINT32 sys_cap_info;
1797 A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
1798 /** Max beacon and Probe Response IE offload size (includes
1799 * optional P2P IEs) */
1800 A_UINT32 max_bcn_ie_size;
1801 /*
1802 * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
1803 * FW uses this as FW extesnsion memory for saving its data structures. Only valid
1804 * for low latency interfaces like PCIE where FW can access this memory directly (or)
1805 * by DMA.
1806 */
1807 A_UINT32 num_mem_reqs;
1808 /* Max No. scan channels target can support
1809 * If FW is too old and doesn't indicate this number, host side value will default to
1810 * 0, and host will take the original compatible value (62) for future scan channel
1811 * setup.
1812 */
1813 A_UINT32 max_num_scan_channels;
1814
1815 /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
1816 * Default 0 means tha hw_bd_info[] is invalid(legacy board).
1817 */
1818 A_UINT32 hw_bd_id;
1819 A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
1820
1821 /*
1822 * Number of MACs supported, i.e. a DBS-capable device will return 2
1823 */
1824 A_UINT32 max_supported_macs;
1825
1826 /*
1827 * FW sub-feature capabilities to be used in concurrence with
1828 * wmi_service_bitmap
1829 * values from enum WMI_FW_SUB_FEAT_CAPS
1830 */
1831 A_UINT32 wmi_fw_sub_feat_caps;
1832 /*
1833 * Number of Dual Band Simultaneous (DBS) hardware modes
1834 */
1835 A_UINT32 num_dbs_hw_modes;
1836 /*
1837 * txrx_chainmask
1838 * [7:0] - 2G band tx chain mask
1839 * [15:8] - 2G band rx chain mask
1840 * [23:16] - 5G band tx chain mask
1841 * [31:24] - 5G band rx chain mask
1842 *
1843 */
1844 A_UINT32 txrx_chainmask;
1845
1846 /*
1847 * default Dual Band Simultaneous (DBS) hardware mode
1848 */
1849 A_UINT32 default_dbs_hw_mode_index;
1850
1851 /*
1852 * Number of msdu descriptors target would use
1853 */
1854 A_UINT32 num_msdu_desc;
1855
1856 /* The TLVs for hal_reg_capabilities, wmi_service_bitmap and mem_reqs[] will follow this TLV.
1857 * HAL_REG_CAPABILITIES hal_reg_capabilities;
1858 * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
1859 * wlan_host_mem_req mem_reqs[];
1860 * wlan_dbs_hw_mode_list[];
1861 */
1862} wmi_service_ready_event_fixed_param;
1863
1864typedef struct {
1865 /* TLV tag and len; tag equals
1866 *WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT
1867 */
1868 A_UINT32 tlv_header;
1869 /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
1870 A_UINT32 default_conc_scan_config_bits;
1871 /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
1872 A_UINT32 default_fw_config_bits;
Govind Singhd24f5e42016-02-22 15:16:46 +05301873 wmi_ppe_threshold ppet;
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07001874 /*
1875 * see section 8.4.2.213 from draft r8 of 802.11ax;
1876 * see WMI_HE_FRAG_SUPPORT enum
1877 */
Govind Singhd24f5e42016-02-22 15:16:46 +05301878 A_UINT32 he_cap_info;
Govind Singh76d82bc2016-02-22 15:39:48 +05301879 /*
1880 * An HT STA shall not allow transmission of more than one MPDU start
1881 * within the time limit described in the MPDU maximum density field.
1882 */
1883 A_UINT32 mpdu_density; /* units are microseconds */
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05301884 /*
1885 * Maximum no of BSSID based RX filters host can program
1886 * Value 0 means FW hasn't given any limit to host.
1887 */
1888 A_UINT32 max_bssid_rx_filters;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001889} wmi_service_ready_ext_event_fixed_param;
1890
1891typedef enum {
1892 WMI_HWBD_NONE = 0, /* No hw board information is given */
1893 WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */
1894 WMI_HWBD_QCA2582 = 2, /* Killer 1525 */
1895} WMI_HWBD_ID;
1896
1897typedef enum {
1898 WMI_FW_STA_RTT_INITR = 0x00000001,
1899 WMI_FW_STA_RTT_RESPR = 0x00000002,
1900 WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
1901 WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
1902 WMI_FW_P2P_GO_RTT_INITR = 0x00000010,
1903 WMI_FW_P2P_GO_RTT_RESPR = 0x00000020,
1904 WMI_FW_AP_RTT_INITR = 0x00000040,
1905 WMI_FW_AP_RTT_RESPR = 0x00000080,
1906 WMI_FW_NAN_RTT_INITR = 0x00000100,
1907 WMI_FW_NAN_RTT_RESPR = 0x00000200,
1908 /*
1909 * New fw sub feature capabilites before
1910 * WMI_FW_MAX_SUB_FEAT_CAP
1911 */
1912 WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000,
1913} WMI_FW_SUB_FEAT_CAPS;
1914
1915#define ATH_BD_DATA_REV_MASK 0x000000FF
1916#define ATH_BD_DATA_REV_SHIFT 0
1917
1918#define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00
1919#define ATH_BD_DATA_PROJ_ID_SHIFT 8
1920
1921#define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000
1922#define ATH_BD_DATA_CUST_ID_SHIFT 16
1923
1924#define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000
1925#define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
1926
1927#define SET_BD_DATA_REV(bd_data_ver, value) \
1928 ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
1929
1930#define GET_BD_DATA_REV(bd_data_ver) \
1931 (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
1932
1933#define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
1934 ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
1935
1936#define GET_BD_DATA_PROJ_ID(bd_data_ver) \
1937 (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
1938
1939#define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
1940 ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
1941
1942#define GET_BD_DATA_CUST_ID(bd_data_ver) \
1943 (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
1944
1945#define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \
1946 ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
1947
1948#define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \
1949 (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
1950
1951#ifdef ROME_LTE_COEX_FREQ_AVOID
1952typedef struct {
1953 A_UINT32 start_freq; /* start frequency, not channel center freq */
1954 A_UINT32 end_freq; /* end frequency */
1955} avoid_freq_range_desc;
1956
1957typedef struct {
1958 /* bad channel range count, multi range is allowed, 0 means all channel clear */
1959 A_UINT32 num_freq_ranges;
1960 /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
1961 avoid_freq_range_desc avd_freq_range[0];
1962} wmi_wlan_avoid_freq_ranges_event;
1963#endif
1964
1965/** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that retuned status */
1966#define WLAN_INIT_STATUS_SUCCESS 0x0
1967#define WLAN_INIT_STATUS_GEN_FAILED 0x1
1968#define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
1969#define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
1970
1971typedef A_UINT32 WLAN_INIT_STATUS;
1972
1973typedef struct {
1974 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
1975 wmi_abi_version fw_abi_vers;
1976 wmi_mac_addr mac_addr;
1977 A_UINT32 status;
Rajeev Kumare18f5282016-04-15 14:08:29 -07001978 A_UINT32 num_dscp_table;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001979} wmi_ready_event_fixed_param;
1980
1981typedef struct {
1982 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
1983/**
1984 * @brief num_vdev - number of virtual devices (VAPs) to support
1985 */
1986 A_UINT32 num_vdevs;
1987/**
1988 * @brief num_peers - number of peer nodes to support
1989 */
1990 A_UINT32 num_peers;
1991/*
1992 * @brief In offload mode target supports features like WOW, chatter and other
1993 * protocol offloads. In order to support them some functionalities like
1994 * reorder buffering, PN checking need to be done in target. This determines
1995 * maximum number of peers suported by target in offload mode
1996 */
1997 A_UINT32 num_offload_peers;
1998/* @brief Number of reorder buffers available for doing target based reorder
1999 * Rx reorder buffering
2000 */
2001 A_UINT32 num_offload_reorder_buffs;
2002/**
2003 * @brief num_peer_keys - number of keys per peer
2004 */
2005 A_UINT32 num_peer_keys;
2006/**
2007 * @brief num_peer_tids - number of TIDs to provide storage for per peer.
2008 */
2009 A_UINT32 num_tids;
2010/**
2011 * @brief ast_skid_limit - max skid for resolving hash collisions
2012 * @details
2013 * The address search table is sparse, so that if two MAC addresses
2014 * result in the same hash value, the second of these conflicting
2015 * entries can slide to the next index in the address search table,
2016 * and use it, if it is unoccupied. This ast_skid_limit parameter
2017 * specifies the upper bound on how many subsequent indices to search
2018 * over to find an unoccupied space.
2019 */
2020 A_UINT32 ast_skid_limit;
2021/**
2022 * @brief tx_chain_mask - the nominal chain mask for transmit
2023 * @details
2024 * The chain mask may be modified dynamically, e.g. to operate AP tx with
2025 * a reduced number of chains if no clients are associated.
2026 * This configuration parameter specifies the nominal chain-mask that
2027 * should be used when not operating with a reduced set of tx chains.
2028 */
2029 A_UINT32 tx_chain_mask;
2030/**
2031 * @brief rx_chain_mask - the nominal chain mask for receive
2032 * @details
2033 * The chain mask may be modified dynamically, e.g. for a client to use
2034 * a reduced number of chains for receive if the traffic to the client
2035 * is low enough that it doesn't require downlink MIMO or antenna
2036 * diversity.
2037 * This configuration parameter specifies the nominal chain-mask that
2038 * should be used when not operating with a reduced set of rx chains.
2039 */
2040 A_UINT32 rx_chain_mask;
2041/**
2042 * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
2043 * @details
2044 * Each WMM access class (voice, video, best-effort, background) will
2045 * have its own timeout value to dictate how long to wait for missing
2046 * rx MPDUs to arrive before flushing subsequent MPDUs that have already
2047 * been received.
2048 * This parameter specifies the timeout in milliseconds for each class .
2049 * NOTE: the number of class (defined as 4) cannot be
2050 * changed in the future without breaking WMI compatibility.
2051 */
2052 A_UINT32 rx_timeout_pri[4];
2053/**
2054 * @brief rx_decap mode - what mode the rx should decap packets to
2055 * @details
2056 * MAC can decap to RAW (no decap), native wifi or Ethernet types
2057 * THis setting also determines the default TX behavior, however TX
2058 * behavior can be modified on a per VAP basis during VAP init
2059 */
2060 A_UINT32 rx_decap_mode;
2061 /**
2062 * @brief scan_max_pending_req - what is the maximum scan requests than can be queued
2063 */
2064 A_UINT32 scan_max_pending_req;
2065
2066 /**
2067 * @brief maximum VDEV that could use BMISS offload
2068 */
2069 A_UINT32 bmiss_offload_max_vdev;
2070
2071 /**
2072 * @brief maximum VDEV that could use offload roaming
2073 */
2074 A_UINT32 roam_offload_max_vdev;
2075
2076 /**
2077 * @brief maximum AP profiles that would push to offload roaming
2078 */
2079 A_UINT32 roam_offload_max_ap_profiles;
2080
2081/**
2082 * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
2083 * @details
2084 * The target's WAL maintains a table to hold information regarding which
2085 * peers belong to a given multicast group, so that if multicast->unicast
2086 * conversion is enabled, the target can convert multicast tx frames to a
2087 * series of unicast tx frames, to each peer within the multicast group.
2088 * This num_mcast_groups configuration parameter tells the target how
2089 * many multicast groups to provide storage for within its multicast
2090 * group membership table.
2091 */
2092 A_UINT32 num_mcast_groups;
2093
2094/**
2095 * @brief num_mcast_table_elems - size to alloc for the mcast membership table
2096 * @details
2097 * This num_mcast_table_elems configuration parameter tells the target
2098 * how many peer elements it needs to provide storage for in its
2099 * multicast group membership table.
2100 * These multicast group membership table elements are shared by the
2101 * multicast groups stored within the table.
2102 */
2103 A_UINT32 num_mcast_table_elems;
2104
2105/**
2106 * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
2107 * @details
2108 * This configuration parameter specifies whether the target should
2109 * perform multicast --> unicast conversion on transmit, and if so,
2110 * what to do if it finds no entries in its multicast group membership
2111 * table for the multicast IP address in the tx frame.
2112 * Configuration value:
2113 * 0 -> Do not perform multicast to unicast conversion.
2114 * 1 -> Convert multicast frames to unicast, if the IP multicast address
2115 * from the tx frame is found in the multicast group membership
2116 * table. If the IP multicast address is not found, drop the frame.
2117 * 2 -> Convert multicast frames to unicast, if the IP multicast address
2118 * from the tx frame is found in the multicast group membership
2119 * table. If the IP multicast address is not found, transmit the
2120 * frame as multicast.
2121 */
2122 A_UINT32 mcast2ucast_mode;
2123
2124 /**
2125 * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
2126 * @details
2127 * This parameter controls how much memory the target will allocate to
2128 * store a log of tx PPDU meta-information (how large the PPDU was,
2129 * when it was sent, whether it was successful, etc.)
2130 */
2131 A_UINT32 tx_dbg_log_size;
2132
2133 /**
2134 * @brief num_wds_entries - how many AST entries to be allocated for WDS
2135 */
2136 A_UINT32 num_wds_entries;
2137
2138 /**
2139 * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
2140 * this limit can be 0 -default, 1 256B
2141 */
2142 A_UINT32 dma_burst_size;
2143
2144 /**
2145 * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
2146 * to account for interface latency to avoid underrun.
2147 */
2148 A_UINT32 mac_aggr_delim;
2149 /**
2150 * @brief rx_skip_defrag_timeout_dup_detection_check
2151 * @details
2152 * determine whether target is responsible for detecting duplicate
2153 * non-aggregate MPDU and timing out stale fragments.
2154 *
2155 * A-MPDU reordering is always performed on the target.
2156 *
2157 * 0: target responsible for frag timeout and dup checking
2158 * 1: host responsible for frag timeout and dup checking
2159 */
2160 A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
2161
2162 /**
2163 * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
2164 * and Max no of descriptors for each Video link (node).
2165 */
2166 A_UINT32 vow_config;
2167
2168 /**
2169 * @brief maximum VDEV that could use GTK offload
2170 */
2171 A_UINT32 gtk_offload_max_vdev;
2172
2173 /**
2174 * @brief num_msdu_desc - Number of msdu descriptors target should use
2175 */
2176 A_UINT32 num_msdu_desc; /* Number of msdu desc */
2177 /**
2178 * @brief max_frag_entry - Max. number of Tx fragments per MSDU
2179 * @details
2180 * This parameter controls the max number of Tx fragments per MSDU.
2181 * This is sent by the target as part of the WMI_SERVICE_READY event
2182 * and is overriden by the OS shim as required.
2183 */
2184 A_UINT32 max_frag_entries;
2185
2186 /**
2187 * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
2188 * @brief num_msdu_desc - Number of vdev that can support beacon offload
2189 */
2190
2191 A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
2192
2193 /**
2194 * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
2195 * @details
2196 * Each TDLS enabled vdev can track outgoing transmits/rssi/rates to/of
2197 * peers in a connection tracking table for possible TDLS link creation
2198 * or deletion. This controls the number of tracked peers per vdev.
2199 */
2200 A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
2201 A_UINT32 beacon_tx_offload_max_vdev;
2202 A_UINT32 num_multicast_filter_entries;
2203 A_UINT32 num_wow_filters; /*host can configure the number of wow filters */
2204
2205 /**
2206 * @brief num_keep_alive_pattern - Num of keep alive patterns configured
2207 * from host.
2208 */
2209 A_UINT32 num_keep_alive_pattern;
2210 /**
2211 * @brief keep_alive_pattern_size - keep alive pattern size.
2212 */
2213 A_UINT32 keep_alive_pattern_size;
2214
2215 /**
2216 * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
2217 * @details
2218 * Each TDLS STA can become a sleep STA independently. This parameter
2219 * mentions how many such sleep STAs can be supported concurrently.
2220 */
2221 A_UINT32 max_tdls_concurrent_sleep_sta;
2222
2223 /**
2224 * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
2225 * @details
2226 * Each TDLS STA can become a buffer STA independently. This parameter
2227 * mentions how many such buffer STAs can be supported concurrently.
2228 */
2229 A_UINT32 max_tdls_concurrent_buffer_sta;
2230
2231 /**
2232 * @brief wmi_send_separate - host configures fw to send the wmi separately
2233 */
2234 A_UINT32 wmi_send_separate;
2235
2236 /**
2237 * @brief num_ocb_vdevs - Number of vdevs used for OCB support
2238 */
2239 A_UINT32 num_ocb_vdevs;
2240
2241 /**
2242 * @brief num_ocb_channels - The supported number of simultaneous OCB channels
2243 */
2244 A_UINT32 num_ocb_channels;
2245
2246 /**
2247 * @brief num_ocb_schedules - The supported number of OCB schedule segments
2248 */
2249 A_UINT32 num_ocb_schedules;
Manikandan Mohan30728082015-12-09 12:35:24 -08002250 /**
2251 * @brief specific configuration from host, such as per platform configuration
2252 */
2253 #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
2254 #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002255
2256 #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
2257 #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
2258
2259 #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
2260 #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
2261
2262 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
2263 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
2264
2265 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
2266 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
2267
2268 #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
2269 #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
2270
2271 #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
2272 #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
2273
2274 #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
2275 #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
2276
2277 #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
2278 #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
2279
Manikandan Mohan30728082015-12-09 12:35:24 -08002280 A_UINT32 flag1;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002281
2282 /** @brief smart_ant_cap - Smart Antenna capabilities information
2283 * @details
2284 * 1 - Smart antenna is enabled.
2285 * 0 - Smart antenna is disabled.
2286 * In future this can contain smart antenna specifc capabilities.
2287 */
2288 A_UINT32 smart_ant_cap;
2289
2290 /**
2291 * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
2292 * during init
2293 */
2294 A_UINT32 BK_Minfree;
2295 A_UINT32 BE_Minfree;
2296 A_UINT32 VI_Minfree;
2297 A_UINT32 VO_Minfree;
2298
2299 /**
2300 * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
2301 * descriptor memory allocation.
2302 * 1 - Allocate fragment descriptor memory for data packet in firmware.
2303 * If host wants to transmit data packet at its desired rate,
2304 * this field must be set.
2305 * 0 - Don't allocate fragment descriptor for data packet.
2306 */
2307 A_UINT32 alloc_frag_desc_for_data_pkt;
Govind Singh86180292016-02-01 14:03:37 +05302308
2309 /*
2310 * how much space to allocate for NDP NS (neighbor solicitation)
2311 * specs
2312 */
2313 A_UINT32 num_ns_ext_tuples_cfg;
Sandeep Puligillab6ddc262016-03-09 13:06:16 -08002314 /**
2315 * size (in bytes) of the buffer the FW shall allocate to store
2316 * packet filtering instructions
2317 */
2318 A_UINT32 bpf_instruction_size;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05302319 /**
2320 * Maximum no of BSSID based RX filters host would program
2321 * Value 0 means host doesn't given any limit to FW.
2322 */
2323 A_UINT32 max_bssid_rx_filters;
Krishna Kumaar Natarajan7dde8c72016-03-25 15:11:49 -07002324 /**
2325 * Use PDEV ID instead of MAC ID, added for backward compatibility with
2326 * older host which is using MAC ID. 1 means PDEV ID, 0 means MAC ID.
2327 */
2328 A_UINT32 use_pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002329} wmi_resource_config;
2330
Manikandan Mohan30728082015-12-09 12:35:24 -08002331#define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
2332 do { \
2333 (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
2334 (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
2335 WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
2336 } while (0)
2337#define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
2338 (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
2339 WMI_RSRC_CFG_FLAG_ ## flag ## _S)
2340
2341#define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
2342 WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
2343#define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
2344 WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
2345
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002346#define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
2347 WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
2348#define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
2349 WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
2350
2351#define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
2352 WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
2353#define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
2354 WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
2355
2356#define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
2357 WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
2358#define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
2359 WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
2360
2361#define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
2362 WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
2363#define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
2364 WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
2365
2366#define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
2367 WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
2368#define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
2369 WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
2370
2371#define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
2372 WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
2373#define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
2374 WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
2375
2376#define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
2377 WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
2378#define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
2379 WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
2380
2381#define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
2382 WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
2383#define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
2384 WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
2385
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002386typedef struct {
2387 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
2388
2389 /** The following indicate the WMI versions to be supported by
2390 * the host driver. Note that the host driver decide to
2391 * "downgrade" its WMI version support and this may not be the
2392 * native version of the host driver. */
2393 wmi_abi_version host_abi_vers;
2394
2395 A_UINT32 num_host_mem_chunks;
2396 /** size of array host_mem_chunks[] */
2397 /* The TLVs for resource_config and host_mem_chunks[] will follow.
2398 * wmi_resource_config resource_config;
2399 * wlan_host_memory_chunk host_mem_chunks[];
2400 */
2401
2402} wmi_init_cmd_fixed_param;
2403
2404/**
2405 * TLV for channel list
2406 */
2407typedef struct {
2408 /** WMI_CHAN_LIST_TAG */
2409 A_UINT32 tag;
2410 /** # of channels to scan */
2411 A_UINT32 num_chan;
2412 /** channels in Mhz */
2413 A_UINT32 channel_list[1];
2414} wmi_chan_list;
2415
2416/**
2417 * TLV for bssid list
2418 */
2419typedef struct {
2420 /** WMI_BSSID_LIST_TAG */
2421 A_UINT32 tag;
2422 /** number of bssids */
2423 A_UINT32 num_bssid;
2424 /** bssid list */
2425 wmi_mac_addr bssid_list[1];
2426} wmi_bssid_list;
2427
2428/**
2429 * TLV for ie data.
2430 */
2431typedef struct {
2432 /** WMI_IE_TAG */
2433 A_UINT32 tag;
2434 /** number of bytes in ie data */
2435 A_UINT32 ie_len;
2436 /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4 ) */
2437 A_UINT32 ie_data[1];
2438} wmi_ie_data;
2439
2440typedef struct {
2441 /** Len of the SSID */
2442 A_UINT32 ssid_len;
2443 /** SSID */
2444 A_UINT32 ssid[8];
2445} wmi_ssid;
2446
2447typedef struct {
2448 /** WMI_SSID_LIST_TAG */
2449 A_UINT32 tag;
2450 A_UINT32 num_ssids;
2451 wmi_ssid ssids[1];
2452} wmi_ssid_list;
2453
2454/* prefix used by scan requestor ids on the host */
2455#define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
2456/* prefix used by scan request ids generated on the host */
2457/* host cycles through the lower 12 bits to generate ids */
2458#define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
2459
2460#define WLAN_SCAN_PARAMS_MAX_SSID 16
2461#define WLAN_SCAN_PARAMS_MAX_BSSID 4
2462#define WLAN_SCAN_PARAMS_MAX_IE_LEN 512
2463
2464typedef struct {
2465 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
2466 /** Scan ID */
2467 A_UINT32 scan_id;
2468 /** Scan requestor ID */
2469 A_UINT32 scan_req_id;
2470 /** VDEV id(interface) that is requesting scan */
2471 A_UINT32 vdev_id;
2472 /** Scan Priority, input to scan scheduler */
2473 A_UINT32 scan_priority;
2474 /** Scan events subscription */
2475 A_UINT32 notify_scan_events;
2476 /** dwell time in msec on active channels */
2477 A_UINT32 dwell_time_active;
2478 /** dwell time in msec on passive channels */
2479 A_UINT32 dwell_time_passive;
2480 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
2481 A_UINT32 min_rest_time;
2482 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
2483 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
2484 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
2485 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
2486 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
2487 * irrespective of activity. activity is determined by the idle_time parameter.
2488 */
2489 A_UINT32 max_rest_time;
2490 /** time before sending next set of probe requests.
2491 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
2492 * The number of probe requests specified depends on the ssid_list and bssid_list
2493 */
2494 A_UINT32 repeat_probe_time;
2495 /** time in msec between 2 consequetive probe requests with in a set. */
2496 A_UINT32 probe_spacing_time;
2497 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
2498 A_UINT32 idle_time;
2499 /** maximum time in msec allowed for scan */
2500 A_UINT32 max_scan_time;
2501 /** delay in msec before sending first probe request after switching to a channel */
2502 A_UINT32 probe_delay;
2503 /** Scan control flags */
2504 A_UINT32 scan_ctrl_flags;
2505 /** Burst duration time in msec*/
2506 A_UINT32 burst_duration;
2507
2508 /** # if channels to scan. In the TLV channel_list[] */
2509 A_UINT32 num_chan;
2510 /** number of bssids. In the TLV bssid_list[] */
2511 A_UINT32 num_bssid;
2512 /** number of ssid. In the TLV ssid_list[] */
2513 A_UINT32 num_ssids;
2514 /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
2515 A_UINT32 ie_len;
2516 /** Max number of probes to be sent */
2517 A_UINT32 n_probes;
2518
2519 /**
2520 * TLV (tag length value ) parameters follow the scan_cmd
2521 * structure. The TLV's are:
2522 * A_UINT32 channel_list[];
2523 * wmi_ssid ssid_list[];
2524 * wmi_mac_addr bssid_list[];
2525 * A_UINT8 ie_data[];
2526 */
2527} wmi_start_scan_cmd_fixed_param;
2528
2529/**
2530 * scan control flags.
2531 */
2532
2533/** passively scan all channels including active channels */
2534#define WMI_SCAN_FLAG_PASSIVE 0x1
2535/** add wild card ssid probe request even though ssid_list is specified. */
2536#define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
2537/** add cck rates to rates/xrate ie for the generated probe request */
2538#define WMI_SCAN_ADD_CCK_RATES 0x4
2539/** add ofdm rates to rates/xrate ie for the generated probe request */
2540#define WMI_SCAN_ADD_OFDM_RATES 0x8
2541/** To enable indication of Chan load and Noise floor to host */
2542#define WMI_SCAN_CHAN_STAT_EVENT 0x10
2543/** Filter Probe request frames */
2544#define WMI_SCAN_FILTER_PROBE_REQ 0x20
2545/**When set, not to scan DFS channels*/
2546#define WMI_SCAN_BYPASS_DFS_CHN 0x40
2547/**When set, certain errors are ignored and scan continues.
2548 * Different FW scan engine may use its own logic to decide what errors to ignore*/
2549#define WMI_SCAN_CONTINUE_ON_ERROR 0x80
2550/** Enable promiscous mode for ese */
2551#define WMI_SCAN_FILTER_PROMISCOUS 0x100
2552/** allow to send probe req on DFS channel */
2553#define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
2554/** add TPC content in probe req frame */
2555#define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400
2556/** add DS content in probe req frame */
2557#define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800
2558/** use random mac address for TA for probe request frame and add
2559 * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
2560 * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/
2561#define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000
Govind Singh32cced32016-02-01 13:33:09 +05302562/** allow mgmt transmission during off channel scan */
2563#define WMI_SCAN_OFFCHAN_MGMT_TX 0x2000
2564/** allow data transmission during off channel scan */
2565#define WMI_SCAN_OFFCHAN_DATA_TX 0x4000
2566/** allow capture ppdu with phy errrors */
2567#define WMI_SCAN_CAPTURE_PHY_ERROR 0x8000
Sandeep Puligilla1d9a8d82016-03-09 13:07:58 -08002568/** always do passive scan on passive channels */
2569#define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x1000
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002570/** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
2571#define WMI_SCAN_CLASS_MASK 0xFF000000
2572
2573/*
2574 * Masks identifying types/ID of scans
2575 * Scan_Stop macros should be the same value as below defined in UMAC
2576 * #define IEEE80211_SPECIFIC_SCAN 0x00000000
2577 * #define IEEE80211_VAP_SCAN 0x01000000
2578 * #define IEEE80211_ALL_SCANS 0x04000000
2579 */
2580#define WMI_SCAN_STOP_ONE 0x00000000
2581#define WMI_SCN_STOP_VAP_ALL 0x01000000
2582#define WMI_SCAN_STOP_ALL 0x04000000
2583
2584typedef struct {
2585 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
2586 /** requestor requesting cancel */
2587 A_UINT32 requestor;
2588 /** Scan ID */
2589 A_UINT32 scan_id;
2590 /**
2591 * Req Type
2592 * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
2593 * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
2594 * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
2595 * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
2596 */
2597 A_UINT32 req_type;
2598 /**
2599 * vDev ID
2600 * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
2601 */
2602 A_UINT32 vdev_id;
2603} wmi_stop_scan_cmd_fixed_param;
2604
2605#define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */
2606#define APPEND_TO_EXISTING_CHAN_LIST 1
2607
2608typedef struct {
2609 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
2610 A_UINT32 num_scan_chans;
2611 /** no of elements in chan_info[] */
2612 A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
2613 /** Followed by the variable length TLV chan_info:
2614 * wmi_channel chan_info[] */
2615} wmi_scan_chan_list_cmd_fixed_param;
2616
2617/*
2618 * Priority numbers must be sequential, starting with 0.
2619 */
2620/* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
2621typedef enum {
2622 WMI_SCAN_PRIORITY_VERY_LOW = 0,
2623 WMI_SCAN_PRIORITY_LOW,
2624 WMI_SCAN_PRIORITY_MEDIUM,
2625 WMI_SCAN_PRIORITY_HIGH,
2626 WMI_SCAN_PRIORITY_VERY_HIGH,
2627
2628 WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
2629} wmi_scan_priority;
2630
2631/* Five Levels for Requested Priority */
2632/* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */
2633typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
2634
2635/**
2636 * 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
2637 * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
2638 * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
2639 */
2640typedef struct {
2641 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
2642 /**
2643 * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
2644 * 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
2645 */
2646 A_UINT32 vdev_type;
2647 /**
2648 * number of rows in mapping_table for a specific vdev
2649 * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
2650 */
2651 A_UINT32 number_rows;
2652 /** mapping_table for a specific vdev follows this TLV
2653 * WLAN_PRIORITY_MAPPING mapping_table[]; */
2654} wmi_scan_sch_priority_table_cmd_fixed_param;
2655
2656/** update flags */
2657#define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1
2658#define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2
2659#define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4
2660
2661typedef struct {
2662 A_UINT32 tlv_header;
2663 /** requestor requesting update scan request */
2664 A_UINT32 requestor;
2665 /** Scan ID of the scan request that need to be update */
2666 A_UINT32 scan_id;
2667 /** update flags, indicating which of the following fields are valid and need to be updated*/
2668 A_UINT32 scan_update_flags;
2669 /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
2670 A_UINT32 scan_priority;
2671 /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
2672 A_UINT32 min_rest_time;
2673 /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
2674 A_UINT32 max_rest_time;
2675} wmi_scan_update_request_cmd_fixed_param;
2676
2677typedef struct {
2678 A_UINT32 tlv_header;
2679 /** oui to be used in probe request frame when random mac addresss is
2680 * requested part of scan parameters. this is applied to both FW internal scans and
2681 * host initated scans. host can request for random mac address with
2682 * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */
2683 A_UINT32 prob_req_oui;
2684} wmi_scan_prob_req_oui_cmd_fixed_param;
2685
2686enum wmi_scan_event_type {
2687 WMI_SCAN_EVENT_STARTED = 0x1,
2688 WMI_SCAN_EVENT_COMPLETED = 0x2,
2689 WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
2690 WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
2691 WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
2692 WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
2693 WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
Manikandan Mohan46b95c02015-12-09 12:23:08 -08002694 WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
2695 WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
Govind Singh45ef44a2016-02-01 17:45:22 +05302696 WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */
2697 WMI_SCAN_EVENT_RESUMED = 0x400, /* scan request is resumed */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002698 WMI_SCAN_EVENT_MAX = 0x8000
2699};
2700
2701enum wmi_scan_completion_reason {
2702 /** scan related events */
2703 WMI_SCAN_REASON_NONE = 0xFF,
2704 WMI_SCAN_REASON_COMPLETED = 0,
2705 WMI_SCAN_REASON_CANCELLED = 1,
2706 WMI_SCAN_REASON_PREEMPTED = 2,
2707 WMI_SCAN_REASON_TIMEDOUT = 3,
2708 WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
Govind Singh45ef44a2016-02-01 17:45:22 +05302709 WMI_SCAN_REASON_SUSPENDED = 5,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002710 WMI_SCAN_REASON_MAX,
2711};
2712
2713typedef struct {
2714 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
2715 /** scan event (wmi_scan_event_type) */
2716 A_UINT32 event;
2717 /** status of the scan completion event */
2718 A_UINT32 reason;
2719 /** channel freq , only valid for FOREIGN channel event*/
2720 A_UINT32 channel_freq;
2721 /**id of the requestor whose scan is in progress */
2722 A_UINT32 requestor;
2723 /**id of the scan that is in progress */
2724 A_UINT32 scan_id;
2725 /**id of VDEV that requested the scan */
2726 A_UINT32 vdev_id;
2727} wmi_scan_event_fixed_param;
2728
2729/* WMI Diag event */
2730typedef struct {
2731 A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
2732 A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
2733 A_UINT32 count; /* Number of diag frames added to current event */
2734 A_UINT32 dropped;
2735 /* followed by WMITLV_TAG_ARRAY_BYTE */
2736} wmi_diag_event_fixed_param;
2737
2738/*
2739 * If FW has multiple active channels due to MCC(multi channel concurrency),
2740 * then these stats are combined stats for all the active channels.
2741 */
2742typedef struct {
2743 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
2744 /** ack count, it is an incremental number, not accumulated number */
2745 A_UINT32 ackRcvBad;
2746 /** bad rts count, it is an incremental number, not accumulated number */
2747 A_UINT32 rtsBad;
2748 /** good rts, it is an incremental number, not accumulated number */
2749 A_UINT32 rtsGood;
2750 /** fcs count, it is an incremental number, not accumulated number */
2751 A_UINT32 fcsBad;
2752 /** beacon count, it is an incremental number, not accumulated number */
2753 A_UINT32 noBeacons;
2754} wmi_update_whal_mib_stats_event_fixed_param;
2755
2756/*
2757 * This defines how much headroom is kept in the
2758 * receive frame between the descriptor and the
2759 * payload, in order for the WMI PHY error and
2760 * management handler to insert header contents.
2761 *
2762 * This is in bytes.
2763 */
2764#define WMI_MGMT_RX_HDR_HEADROOM sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr)
2765
2766/** This event will be used for sending scan results
2767 * as well as rx mgmt frames to the host. The rx buffer
2768 * will be sent as part of this WMI event. It would be a
2769 * good idea to pass all the fields in the RX status
2770 * descriptor up to the host.
2771 */
2772/* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
2773#define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
2774
2775/** flag indicating that the the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
2776#define WMI_MGMT_RX_HDR_EXTSCAN 0x01
2777
2778/**
2779 * flag indicating that the the mgmt frame (probe req/beacon) is received in
2780 * the context of matched network by FW ENLO
2781 */
2782#define WMI_MGMT_RX_HDR_ENLO 0x02
2783
2784typedef struct {
2785 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
2786 /** channel on which this frame is received. */
2787 A_UINT32 channel;
2788 /** snr information used to cal rssi */
2789 A_UINT32 snr;
2790 /** Rate kbps */
2791 A_UINT32 rate;
2792 /** rx phy mode WLAN_PHY_MODE */
2793 A_UINT32 phy_mode;
2794 /** length of the frame */
2795 A_UINT32 buf_len;
2796 /** rx status */
2797 A_UINT32 status;
2798 /** RSSI of PRI 20MHz for each chain. */
2799 A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
2800 /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
2801 A_UINT32 flags;
2802 /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
2803 A_INT32 rssi;
2804
2805 /** delta between local TSF(TSF timestamp when frame was RXd)
2806 * and remote TSF(TSF timestamp in the IE for mgmt frame
2807 * beacon,proberesp for e.g). If remote TSF is not available,
2808 * delta set to 0.
2809 * Although tsf_delta is stored as A_UINT32, it can be negative,
2810 * and thus would need to be sign-extended if added to a value
2811 * larger than 32 bits.
2812 */
2813 A_UINT32 tsf_delta;
Sandeep Puligilla62f7ca02016-03-24 15:48:33 -07002814 /*
2815 * The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from
2816 * TSF timestamp in the RX MAC descriptor provided by HW.
2817 */
2818 A_UINT32 rx_tsf_l32;
2819
2820 /*
2821 *The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register
2822 * after the packet is received.
2823 */
2824 A_UINT32 rx_tsf_u32;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002825 /* This TLV is followed by array of bytes:
2826 * // management frame buffer
2827 * A_UINT8 bufp[];
2828 */
2829} wmi_mgmt_rx_hdr;
2830
2831/* WMI PHY Error RX */
2832
2833typedef struct {
2834 /** TSF timestamp */
2835 A_UINT32 tsf_timestamp;
2836
2837 /**
2838 * Current freq1, freq2
2839 *
2840 * [7:0]: freq1[lo]
2841 * [15:8] : freq1[hi]
2842 * [23:16]: freq2[lo]
2843 * [31:24]: freq2[hi]
2844 */
2845 A_UINT32 freq_info_1;
2846
2847 /**
2848 * Combined RSSI over all chains and channel width for this PHY error
2849 *
2850 * [7:0]: RSSI combined
2851 * [15:8]: Channel width (MHz)
2852 * [23:16]: PHY error code
2853 * [24:16]: reserved (future use)
2854 */
2855 A_UINT32 freq_info_2;
2856
2857 /**
2858 * RSSI on chain 0 through 3
2859 *
2860 * This is formatted the same as the PPDU_START RX descriptor
2861 * field:
2862 *
2863 * [7:0]: pri20
2864 * [15:8]: sec20
2865 * [23:16]: sec40
2866 * [31:24]: sec80
2867 */
2868 A_UINT32 rssi_chain0;
2869 A_UINT32 rssi_chain1;
2870 A_UINT32 rssi_chain2;
2871 A_UINT32 rssi_chain3;
2872
2873 /**
2874 * Last calibrated NF value for chain 0 through 3
2875 *
2876 * nf_list_1:
2877 *
2878 * + [15:0] - chain 0
2879 * + [31:16] - chain 1
2880 *
2881 * nf_list_2:
2882 *
2883 * + [15:0] - chain 2
2884 * + [31:16] - chain 3
2885 */
2886 A_UINT32 nf_list_1;
2887 A_UINT32 nf_list_2;
2888
2889 /** Length of the frame */
2890 A_UINT32 buf_len;
2891} wmi_single_phyerr_rx_hdr;
2892
2893#define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff
2894#define WMI_UNIFIED_FREQINFO_1_LO_S 0
2895#define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00
2896#define WMI_UNIFIED_FREQINFO_1_HI_S 8
2897#define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000
2898#define WMI_UNIFIED_FREQINFO_2_LO_S 16
2899#define WMI_UNIFIED_FREQINFO_2_HI 0xff000000
2900#define WMI_UNIFIED_FREQINFO_2_HI_S 24
2901
2902/*
2903 * Please keep in mind that these _SET macros break macro side effect
2904 * assumptions; don't be clever with them.
2905 */
2906#define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05302907 (WMI_F_MS((hdr)->freq_info_1, \
2908 WMI_UNIFIED_FREQINFO_ ## f ## _LO) \
2909 | (WMI_F_MS((hdr)->freq_info_1, \
2910 WMI_UNIFIED_FREQINFO_ ## f ## _HI) << 8))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002911
2912#define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \
2913 do { \
2914 WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \
2915 WMI_UNIFIED_FREQINFO_ ## f ## _LO); \
2916 WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \
2917 WMI_UNIFIED_FREQINFO_ ## f ## _HI); \
2918 } while (0)
2919
2920#define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff
2921#define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0
2922#define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00
2923#define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8
2924#define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000
2925#define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
2926
2927#define WMI_UNIFIED_RSSI_COMB_GET(hdr) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05302928 ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002929 WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
2930
2931#define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \
2932 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
2933 WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
2934
2935#define WMI_UNIFIED_CHWIDTH_GET(hdr) \
2936 WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
2937
2938#define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \
2939 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
2940 WMI_UNIFIED_FREQINFO_2_CHWIDTH);
2941
2942#define WMI_UNIFIED_PHYERRCODE_GET(hdr) \
2943 WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
2944
2945#define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \
2946 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
2947 WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
2948
2949#define WMI_UNIFIED_CHAIN_0 0x0000ffff
2950#define WMI_UNIFIED_CHAIN_0_S 0
2951#define WMI_UNIFIED_CHAIN_1 0xffff0000
2952#define WMI_UNIFIED_CHAIN_1_S 16
2953#define WMI_UNIFIED_CHAIN_2 0x0000ffff
2954#define WMI_UNIFIED_CHAIN_2_S 0
2955#define WMI_UNIFIED_CHAIN_3 0xffff0000
2956#define WMI_UNIFIED_CHAIN_3_S 16
2957
2958#define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1
2959#define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1
2960#define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2
2961#define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2
2962
2963#define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \
2964 ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, \
2965 WMI_UNIFIED_CHAIN_ ## c)))
2966
2967#define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \
2968 WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, (nf) & 0xffff, \
2969 WMI_UNIFIED_CHAIN_ ## c);
2970
2971/*
2972 * For now, this matches what the underlying hardware is doing.
2973 * Update ar6000ProcRxDesc() to use these macros when populating
2974 * the rx descriptor and then we can just copy the field over
2975 * to the WMI PHY notification without worrying about breaking
2976 * things.
2977 */
2978#define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff
2979#define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0
2980#define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00
2981#define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8
2982#define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000
2983#define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16
2984#define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000
2985#define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24
2986
2987#define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \
2988 WMI_F_RMW((hdr)->rssi_chain ## c, (rssi) & 0xff, \
2989 WMI_UNIFIED_RSSI_CHAN_ ## ch);
2990
2991#define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \
2992 ((int8_t) (WMI_F_MS((hdr)->rssi_chain ## c, \
2993 WMI_UNIFIED_RSSI_CHAN_ ## ch)))
2994
2995typedef struct {
2996 /** Phy error event header */
2997 wmi_single_phyerr_rx_hdr hdr;
2998 /** frame buffer */
2999 A_UINT8 bufp[1];
3000} wmi_single_phyerr_rx_event;
3001
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08003002/* PHY ERROR MASK 0 */
3003/* bits 1:0 defined but not published */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05303004#define WMI_PHY_ERROR_MASK0_RADAR (1<<2)
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08003005/* bits 23:3 defined but not published */
3006#define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1<<24)
3007/* bits 25:24 defined but not published */
3008#define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1<<26)
3009/* bits 31:27 defined but not published */
3010
3011/* PHY ERROR MASK 1
3012 * bits 13:0 defined but not published
3013 * bits 31:14 reserved
3014 */
3015
3016/* PHY ERROR MASK 2
3017 * bits 31:0 reserved
3018 */
3019
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003020typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303021 /* TLV tag and len; tag equals
3022 * WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr
3023 */
3024 A_UINT32 tlv_header;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003025 /** Phy error phy error count */
3026 A_UINT32 num_phyerr_events;
3027 A_UINT32 tsf_l32;
3028 A_UINT32 tsf_u32;
3029 A_UINT32 buf_len;
Govind Singh869c9872016-02-22 18:36:34 +05303030 union {
3031 /* OBSOLETE - will be removed once all refs are gone */
3032 A_UINT32 pmac_id;
3033 /** pdev_id for identifying the MAC
3034 * See macros starting with WMI_PDEV_ID_ for values.
3035 */
3036 A_UINT32 pdev_id;
3037 };
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08003038 A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
3039 A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
3040 A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
3041
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003042 /* This TLV is followed by array of bytes:
3043 * // frame buffer - contains multiple payloads in the order:
3044 * // header - payload, header - payload...
3045 * (The header is of type: wmi_single_phyerr_rx_hdr)
3046 * A_UINT8 bufp[];
3047 */
3048} wmi_comb_phyerr_rx_hdr;
3049
3050/* WMI MGMT TX */
3051typedef struct {
3052 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
3053 /** unique id identifying the VDEV, generated by the caller */
3054 A_UINT32 vdev_id;
3055 /** peer MAC address */
3056 wmi_mac_addr peer_macaddr;
3057 /** xmit rate */
3058 A_UINT32 tx_rate;
3059 /** xmit power */
3060 A_UINT32 tx_power;
3061 /** Buffer length in bytes */
3062 A_UINT32 buf_len;
3063 /* This TLV is followed by array of bytes:
3064 * // management frame buffer
3065 * A_UINT8 bufp[];
3066 */
3067} wmi_mgmt_tx_hdr;
3068
3069typedef struct {
3070 /*
3071 * TLV tag and len;
3072 * tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param
3073 */
3074 A_UINT32 tlv_header;
3075 A_UINT32 vdev_id;
3076 /* echoed in tx_compl_event */
3077 A_UINT32 desc_id;
3078 /* MHz units */
3079 A_UINT32 chanfreq;
3080 A_UINT32 paddr_lo;
3081 A_UINT32 paddr_hi;
3082 A_UINT32 frame_len;
3083 /* Buffer length in bytes */
3084 A_UINT32 buf_len;
3085 /*
3086 * This TLV is followed by array of bytes:
3087 * First 64 bytes of management frame
3088 * A_UINT8 bufp[];
3089 */
3090} wmi_mgmt_tx_send_cmd_fixed_param;
3091
3092typedef struct {
3093 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
3094 A_UINT32 value;
3095} wmi_echo_event_fixed_param;
3096
3097typedef struct {
3098 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
3099 A_UINT32 value;
3100} wmi_echo_cmd_fixed_param;
3101
3102typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303103 /* TLV tag and len; tag equals
3104 * WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param
3105 */
3106 A_UINT32 tlv_header;
3107 /** pdev_id for identifying the MAC
3108 * See macros starting with WMI_PDEV_ID_ for values.
3109 */
3110 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003111 /** reg domain code */
3112 A_UINT32 reg_domain;
3113 A_UINT32 reg_domain_2G;
3114 A_UINT32 reg_domain_5G;
3115 A_UINT32 conformance_test_limit_2G;
3116 A_UINT32 conformance_test_limit_5G;
Govind Singh32cced32016-02-01 13:33:09 +05303117 A_UINT32 dfs_domain;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003118} wmi_pdev_set_regdomain_cmd_fixed_param;
3119
3120typedef struct {
3121 /** true for scan start and flase for scan end */
3122 A_UINT32 scan_start;
3123} wmi_pdev_scan_cmd;
3124
Govind Singhc7d51942016-02-01 12:09:31 +05303125/* WMI support for setting ratemask in target */
3126
3127typedef struct {
3128 A_UINT32 tlv_header;
3129 /*
3130 * TLV tag and len; tag equals
3131 * WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param
3132 */
3133 A_UINT32 vdev_id;
3134 /*
3135 * 0 - cck/ofdm
3136 * 1 - HT
3137 * 2 - VHT */
3138 A_UINT32 type;
3139
3140 A_UINT32 mask_lower32;
3141 A_UINT32 mask_higher32;
3142} wmi_vdev_config_ratemask_cmd_fixed_param;
3143
3144/* nrp action - Filter Neighbor Rx Packets - add/remove filter */
3145enum {
3146 WMI_FILTER_NRP_ACTION_ADD = 0x1,
3147 WMI_FILTER_NRP_ACTION_REMOVE = 0x2,
3148 WMI_FILTER_NRP_ACTION_GET_LIST = 0x3,
3149}; /* nrp - Neighbor Rx Packets */
3150
3151/* nrp type - Filter Neighbor Rx Packets - ap/client addr */
3152enum {
3153 WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1,
3154 WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2,
3155};
3156
3157/* nrp flag - Filter Neighbor Rx Packets
3158 * (capture flag, 2 & 3 not initially supported)
3159 */
3160enum {
3161 WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1,
3162 WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2,
3163 WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3,
3164};
3165
3166/* Filter for Neighbor Rx Packets */
3167typedef struct {
3168 A_UINT32 tlv_header;
3169 /*
3170 * TLV tag and len; tag equals
3171 * WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param
3172 */
3173 A_UINT32 vdev_id;
3174 /* AP Bssid or Client Mac-addr */
3175 wmi_mac_addr addr;
3176 /* Add/Remove NRF Filter */
3177 A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
3178 /* client/ap filter */
3179 A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
3180 /* optional - tx/rx capture */
3181 A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
3182 /* BSSID index - index of the BSSID register */
3183 A_UINT32 bssid_idx;
3184} wmi_vdev_filter_nrp_config_cmd_fixed_param;
3185
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003186/*Command to set/unset chip in quiet mode*/
3187typedef struct {
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05303188 /*
3189 * TLV tag and len; tag equals
3190 * WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param
3191 */
3192 A_UINT32 tlv_header;
3193 /*
3194 * pdev_id for identifying the MAC, See macros
3195 * starting with WMI_PDEV_ID_ for values.
3196 */
3197 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003198 A_UINT32 period; /*period in TUs */
3199 A_UINT32 duration; /*duration in TUs */
3200 A_UINT32 next_start; /*offset in TUs */
3201 A_UINT32 enabled; /*enable/disable */
3202} wmi_pdev_set_quiet_cmd_fixed_param;
3203
Govind Singh869c9872016-02-22 18:36:34 +05303204typedef struct {
3205 /* TLV tag and len; tag equals
3206 * WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param
3207 */
3208 A_UINT32 tlv_header;
3209 A_UINT32 vdev_id; /* Virtual interface ID */
3210 A_UINT32 period; /* period in TUs */
3211 A_UINT32 duration; /* duration in TUs */
3212 A_UINT32 next_start; /* offset in TUs */
3213 A_UINT32 enabled; /* enable/disable */
3214} wmi_vdev_set_quiet_cmd_fixed_param;
3215
Krishna Kumaar Natarajanea0a7962016-04-16 14:09:09 +05303216typedef struct {
3217 /*
3218 * TLV tag and len; tag equals
3219 * WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param
3220 */
3221 A_UINT32 tlv_header;
3222 /*
3223 * vdev id indicating to which the vdev custom aggregation size
3224 * will be applied.
3225 */
3226 A_UINT32 vdev_id;
3227 /*
3228 * Size for tx aggregation (max MPDUs per A-MPDU) for the vdev
3229 * mentioned in vdev id
3230 */
3231 A_UINT32 tx_aggr_size;
3232 /*
3233 * Size for rx aggregation (block ack window size limit) for
3234 * the vdev mentioned in vdev id
3235 */
3236 A_UINT32 rx_aggr_size;
3237} wmi_vdev_set_custom_aggr_size_cmd_fixed_param;
3238
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003239/*
3240 * Command to enable/disable Green AP Power Save.
3241 * This helps conserve power during AP operation. When the AP has no
3242 * stations associated with it, the host can enable Green AP Power Save
3243 * to request the firmware to shut down all but one transmit and receive
3244 * chains.
3245 */
3246typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303247 /** TLV tag and len; tag equals
3248 * WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param
3249 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003250 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303251 /** pdev_id for identifying the MAC
3252 * See macros starting with WMI_PDEV_ID_ for values.
3253 */
3254 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003255 A_UINT32 enable; /*1:enable, 0:disable */
3256} wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
3257
3258#define MAX_HT_IE_LEN 32
Govind Singh869c9872016-02-22 18:36:34 +05303259/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003260typedef struct {
3261 A_UINT32 tlv_header;
3262 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
3263 A_UINT32 reserved0;
3264 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3265 A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
3266 A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
3267 A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
3268 /** The TLV for the HT IE follows:
3269 * A_UINT32 ie_data[];
3270 */
3271} wmi_pdev_set_ht_ie_cmd_fixed_param;
3272
3273#define MAX_VHT_IE_LEN 32
Govind Singh869c9872016-02-22 18:36:34 +05303274/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003275typedef struct {
3276 A_UINT32 tlv_header;
3277 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
3278 A_UINT32 reserved0;
3279 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3280 A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
3281 A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
3282 A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
3283 /** The TLV for the VHT IE follows:
3284 * A_UINT32 ie_data[];
3285 */
3286} wmi_pdev_set_vht_ie_cmd_fixed_param;
3287
3288typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303289 /** TLV tag and len; tag equals
3290 * WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param
3291 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003292 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303293 /** pdev_id for identifying the MAC
3294 * See macros starting with WMI_PDEV_ID_ for values.
3295 */
3296 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003297 wmi_mac_addr base_macaddr;
3298} wmi_pdev_set_base_macaddr_cmd_fixed_param;
3299
3300/*
3301 * For now, the spectral configuration is global rather than
3302 * per-vdev. The vdev is a placeholder and will be ignored
3303 * by the firmware.
3304 */
3305typedef struct {
3306 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
3307 A_UINT32 vdev_id;
3308 A_UINT32 spectral_scan_count;
3309 A_UINT32 spectral_scan_period;
3310 A_UINT32 spectral_scan_priority;
3311 A_UINT32 spectral_scan_fft_size;
3312 A_UINT32 spectral_scan_gc_ena;
3313 A_UINT32 spectral_scan_restart_ena;
3314 A_UINT32 spectral_scan_noise_floor_ref;
3315 A_UINT32 spectral_scan_init_delay;
3316 A_UINT32 spectral_scan_nb_tone_thr;
3317 A_UINT32 spectral_scan_str_bin_thr;
3318 A_UINT32 spectral_scan_wb_rpt_mode;
3319 A_UINT32 spectral_scan_rssi_rpt_mode;
3320 A_UINT32 spectral_scan_rssi_thr;
3321 A_UINT32 spectral_scan_pwr_format;
3322 A_UINT32 spectral_scan_rpt_mode;
3323 A_UINT32 spectral_scan_bin_scale;
3324 A_UINT32 spectral_scan_dBm_adj;
3325 A_UINT32 spectral_scan_chn_mask;
3326} wmi_vdev_spectral_configure_cmd_fixed_param;
3327
3328/*
3329 * Enabling, disabling and triggering the spectral scan
3330 * is a per-vdev operation. That is, it will set channel
3331 * flags per vdev rather than globally; so concurrent scan/run
3332 * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
3333 */
3334typedef struct {
3335 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
3336 A_UINT32 vdev_id;
3337 /* 0 - ignore; 1 - trigger, 2 - clear trigger */
3338 A_UINT32 trigger_cmd;
3339 /* 0 - ignore; 1 - enable, 2 - disable */
3340 A_UINT32 enable_cmd;
3341} wmi_vdev_spectral_enable_cmd_fixed_param;
3342
3343typedef enum {
3344 WMI_CSA_IE_PRESENT = 0x00000001,
3345 WMI_XCSA_IE_PRESENT = 0x00000002,
3346 WMI_WBW_IE_PRESENT = 0x00000004,
3347 WMI_CSWARP_IE_PRESENT = 0x00000008,
3348} WMI_CSA_EVENT_IES_PRESENT_FLAG;
3349
3350/* wmi CSA receive event from beacon frame */
3351typedef struct {
3352 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
3353 A_UINT32 i_fc_dur;
3354/* Bit 0-15: FC */
3355/* Bit 16-31: DUR */
3356 wmi_mac_addr i_addr1;
3357 wmi_mac_addr i_addr2;
3358 /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
3359 * changed in the future without breaking WMI compatibility */
3360 A_UINT32 csa_ie[2];
3361 A_UINT32 xcsa_ie[2];
3362 A_UINT32 wb_ie[2];
3363 A_UINT32 cswarp_ie;
3364 A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
3365} wmi_csa_event_fixed_param;
3366
3367typedef enum {
Govind Singh32cced32016-02-01 13:33:09 +05303368 WAL_PEER_MCAST2UCAST_DISABLED = 0,
3369 /* Drop the frames if match is not found */
3370 WAL_PEER_MCAST2UCAST_DROP_EMPTY = 1,
3371 /* Send as mcast if match is not found */
3372 WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2,
3373} WMI_PEER_MCAST2UCAST_MODE;
3374
3375typedef enum {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003376 /** TX chain mask */
3377 WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
3378 /** RX chain mask */
3379 WMI_PDEV_PARAM_RX_CHAIN_MASK,
3380 /** TX power limit for 2G Radio */
3381 WMI_PDEV_PARAM_TXPOWER_LIMIT2G,
3382 /** TX power limit for 5G Radio */
3383 WMI_PDEV_PARAM_TXPOWER_LIMIT5G,
3384 /** TX power scale */
3385 WMI_PDEV_PARAM_TXPOWER_SCALE,
3386 /** Beacon generation mode . 0: host, 1: target */
3387 WMI_PDEV_PARAM_BEACON_GEN_MODE,
3388 /** Beacon generation mode . 0: staggered 1: bursted */
3389 WMI_PDEV_PARAM_BEACON_TX_MODE,
3390 /** Resource manager off chan mode .
3391 * 0: turn off off chan mode. 1: turn on offchan mode
3392 */
3393 WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
3394 /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */
3395 WMI_PDEV_PARAM_PROTECTION_MODE,
3396 /** Dynamic bandwidth 0: disable 1: enable */
3397 WMI_PDEV_PARAM_DYNAMIC_BW,
3398 /** Non aggregrate/ 11g sw retry threshold.0-disable */
3399 WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
3400 /** aggregrate sw retry threshold. 0-disable*/
3401 WMI_PDEV_PARAM_AGG_SW_RETRY_TH,
3402 /** Station kickout threshold (non of consecutive failures).0-disable */
3403 WMI_PDEV_PARAM_STA_KICKOUT_TH,
3404 /** Aggerate size scaling configuration per AC */
3405 WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING,
3406 /** LTR enable */
3407 WMI_PDEV_PARAM_LTR_ENABLE,
3408 /** LTR latency for BE, in us */
3409 WMI_PDEV_PARAM_LTR_AC_LATENCY_BE,
3410 /** LTR latency for BK, in us */
3411 WMI_PDEV_PARAM_LTR_AC_LATENCY_BK,
3412 /** LTR latency for VI, in us */
3413 WMI_PDEV_PARAM_LTR_AC_LATENCY_VI,
3414 /** LTR latency for VO, in us */
3415 WMI_PDEV_PARAM_LTR_AC_LATENCY_VO,
3416 /** LTR AC latency timeout, in ms */
3417 WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
3418 /** LTR platform latency override, in us */
3419 WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
3420 /** LTR-M override, in us */
3421 WMI_PDEV_PARAM_LTR_RX_OVERRIDE,
3422 /** Tx activity timeout for LTR, in us */
3423 WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
3424 /** L1SS state machine enable */
3425 WMI_PDEV_PARAM_L1SS_ENABLE,
3426 /** Deep sleep state machine enable */
3427 WMI_PDEV_PARAM_DSLEEP_ENABLE,
3428 /** RX buffering flush enable */
3429 WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
3430 /** RX buffering matermark */
3431 WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
3432 /** RX buffering timeout enable */
3433 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
3434 /** RX buffering timeout value */
3435 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
3436 /** pdev level stats update period in ms */
3437 WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
3438 /** vdev level stats update period in ms */
3439 WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
3440 /** peer level stats update period in ms */
3441 WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
3442 /** beacon filter status update period */
3443 WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
3444 /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
3445 WMI_PDEV_PARAM_PMF_QOS,
3446 /** Access category on which ARP frames are sent */
3447 WMI_PDEV_PARAM_ARP_AC_OVERRIDE,
3448 /** DCS configuration */
3449 WMI_PDEV_PARAM_DCS,
3450 /** Enable/Disable ANI on target */
3451 WMI_PDEV_PARAM_ANI_ENABLE,
3452 /** configure the ANI polling period */
3453 WMI_PDEV_PARAM_ANI_POLL_PERIOD,
3454 /** configure the ANI listening period */
3455 WMI_PDEV_PARAM_ANI_LISTEN_PERIOD,
3456 /** configure OFDM immunity level */
3457 WMI_PDEV_PARAM_ANI_OFDM_LEVEL,
3458 /** configure CCK immunity level */
3459 WMI_PDEV_PARAM_ANI_CCK_LEVEL,
3460 /** Enable/Disable CDD for 1x1 STAs in rate control module */
3461 WMI_PDEV_PARAM_DYNTXCHAIN,
3462 /** Enable/Disable proxy STA */
3463 WMI_PDEV_PARAM_PROXY_STA,
3464 /** Enable/Disable low power state when all VDEVs are inactive/idle. */
3465 WMI_PDEV_PARAM_IDLE_PS_CONFIG,
3466 /** Enable/Disable power gating sleep */
3467 WMI_PDEV_PARAM_POWER_GATING_SLEEP,
3468 /** Enable/Disable Rfkill */
3469 WMI_PDEV_PARAM_RFKILL_ENABLE,
3470 /** Set Bursting DUR */
3471 WMI_PDEV_PARAM_BURST_DUR,
3472 /** Set Bursting ENABLE */
3473 WMI_PDEV_PARAM_BURST_ENABLE,
3474 /** HW rfkill config */
3475 WMI_PDEV_PARAM_HW_RFKILL_CONFIG,
3476 /** Enable radio low power features */
3477 WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE,
3478 /** L1SS entry and residency time track */
3479 WMI_PDEV_PARAM_L1SS_TRACK,
3480 /** set hyst at runtime, requirement from SS */
3481 WMI_PDEV_PARAM_HYST_EN,
3482 /** Enable/ Disable POWER COLLAPSE */
3483 WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE,
3484 /** configure LED system state */
3485 WMI_PDEV_PARAM_LED_SYS_STATE,
3486 /** Enable/Disable LED */
3487 WMI_PDEV_PARAM_LED_ENABLE,
3488 /** set DIRECT AUDIO time latency */
Govind Singh869c9872016-02-22 18:36:34 +05303489 WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003490 /** set DIRECT AUDIO Feature ENABLE */
Govind Singh869c9872016-02-22 18:36:34 +05303491 WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003492 /** pdev level whal mib stats update enable */
3493 WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE,
3494 /** ht/vht info based on vdev */
3495 WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD,
3496 /** Set CTS channel BW for dynamic BW adjustment feature */
3497 WMI_PDEV_PARAM_CTS_CBW,
3498 /** Set GPIO pin info used by WNTS */
3499 WMI_PDEV_PARAM_WNTS_CONFIG,
3500 /** Enable/Disable hardware adaptive early rx feature */
3501 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE,
3502 /** The minimum early rx duration, to ensure early rx duration is non-zero */
3503 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP,
3504 /** Increasing/decreasing step used by hardware */
3505 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP,
3506 /** The fixed early rx duration when adaptive early rx is disabled */
3507 WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP,
3508 /** Enable/Disable bmiss based adaptive beacon timeout feature */
3509 WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE,
3510 /*
3511 * The minimum beacon timeout duration, to ensure beacon timeout
3512 * duration is non-zero
3513 */
3514 WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT,
3515 /** Increasing/decreasing step used by hardware */
3516 WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP,
3517 /*
3518 * The fixed beacon timeout duration when bmiss based adaptive beacon
3519 * timeout is disabled
3520 */
3521 WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT,
3522 /*
3523 * Enable/Disable Congestion Estimator based adaptive beacon
3524 * timeout feature */
3525 WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE,
3526 /*
3527 * combo value of ce_id, ce_threshold, ce_time, refer
3528 * to WMI_CE_BTO_CE_ID_MASK
3529 */
3530 WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE,
3531 /** 2G TX chain mask */
3532 WMI_PDEV_PARAM_TX_CHAIN_MASK_2G,
3533 /** 2G RX chain mask */
3534 WMI_PDEV_PARAM_RX_CHAIN_MASK_2G,
3535 /** 5G TX chain mask */
3536 WMI_PDEV_PARAM_TX_CHAIN_MASK_5G,
3537 /** 5G RX chain mask */
3538 WMI_PDEV_PARAM_RX_CHAIN_MASK_5G,
3539 /* Set tx chain mask for CCK rates */
3540 WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK,
3541 /* Set tx chain mask for 1SS stream */
3542 WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS,
Nirav Shahe1e4a812015-11-05 11:15:54 +05303543 /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected*/
3544 WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG,
Nirav Shah47062ff2015-11-05 11:21:08 +05303545 /* TX power backoff in dB: tx power -= param value
3546 * Host passes values(DB) to Halphy, Halphy reduces the power table by
3547 * the values. Safety check will happen in Halphy
3548 */
3549 WMI_PDEV_PARAM_TXPOWER_DECR_DB,
Govind Singh32cced32016-02-01 13:33:09 +05303550 /** enable and disable aggregate burst along with duration */
3551 WMI_PDEV_PARAM_AGGR_BURST,
3552 /** Set the global RX decap mode */
3553 WMI_PDEV_PARAM_RX_DECAP_MODE,
3554 /** Enable/Disable Fast channel reset */
3555 WMI_PDEV_PARAM_FAST_CHANNEL_RESET,
3556 /** Default antenna for Smart antenna */
3557 WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA,
3558 /** Set the user-specified antenna gain */
3559 WMI_PDEV_PARAM_ANTENNA_GAIN,
3560 /** Set the user-specified RX filter */
3561 WMI_PDEV_PARAM_RX_FILTER,
3562 /*
3563 * configure the user-specified MCAST tid for managed mcast feature
3564 * 0-15 is the valid range. 0xff will clear the tid setting
3565 */
3566 WMI_PDEV_SET_MCAST_TO_UCAST_TID,
3567 /** Enable/Disable Proxy sta mode */
3568 WMI_PDEV_PARAM_PROXY_STA_MODE,
3569 /*
3570 * configure the mcast2ucast mode for the pdev->peer_mcast.
3571 * See WMI_PEER_MCAST2UCAST_MODE for possible values
3572 */
3573 WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE,
3574 /** Sets the Mcast buffers for cloning, to support Mcast enhancement */
3575 WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER,
3576 /** Remove the Mcast buffers added by host */
3577 WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER,
3578 /** En/disable station power save state indication */
3579 WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE,
3580 /** Access category on which ARP frames are sent */
3581 WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE,
3582 /** allow or disallow interbss frame forwarding */
3583 WMI_PDEV_PARAM_BLOCK_INTERBSS,
3584 /** Enable/Disable reset */
3585 WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID,
3586 /** Enable/Disable/Set MSDU_TTL in milliseconds. */
3587 WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID,
3588 /** Set global PPDU duration limit (usec). */
3589 WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID,
3590 /** set txbf sounding period of vap in milliseconds */
3591 WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID,
3592 /** Set promiscuous mode */
3593 WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID,
3594 /** Set burst mode */
3595 WMI_PDEV_PARAM_SET_BURST_MODE_CMDID,
3596 /** enable enhanced stats */
3597 WMI_PDEV_PARAM_EN_STATS,
3598 /** Set mu-grouping policy */
3599 WMI_PDEV_PARAM_MU_GROUP_POLICY,
3600 /** Channel Hopping Enable */
3601 WMI_PDEV_PARAM_NOISE_DETECTION,
3602 /** Set Channel Hopping NF threshold in dBm */
3603 WMI_PDEV_PARAM_NOISE_THRESHOLD,
3604 /** Set PAPRD policy */
3605 WMI_PDEV_PARAM_DPD_ENABLE,
3606 /** Enable/disable mcast/bcast echo, used by ProxySTA */
3607 WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO,
3608 /** ATF enable/disable strict schedule */
3609 WMI_PDEV_PARAM_ATF_STRICT_SCH,
3610 /** ATF set access category duration, B0-B29 duration, B30-B31: AC */
3611 WMI_PDEV_PARAM_ATF_SCHED_DURATION,
3612 /** Default antenna polarization */
3613 WMI_PDEV_PARAM_ANT_PLZN,
3614 /** Set mgmt retry limit */
3615 WMI_PDEV_PARAM_MGMT_RETRY_LIMIT,
3616 /** Set CCA sensitivity level in dBm */
3617 WMI_PDEV_PARAM_SENSITIVITY_LEVEL,
3618 /** Set 2G positive and negative Tx power in 0.5dBm units */
3619 WMI_PDEV_PARAM_SIGNED_TXPOWER_2G,
3620 /** Set 5G positive and negative Tx power in 0.5dBm units */
3621 WMI_PDEV_PARAM_SIGNED_TXPOWER_5G,
3622 /** Enable/disble AMSDU for tids */
3623 WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU,
3624 /** Enable/disable AMPDU for tids */
3625 WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU,
3626 /** Set CCA threshold in dBm */
3627 WMI_PDEV_PARAM_CCA_THRESHOLD,
3628 /** RTS Fixed rate setting */
3629 WMI_PDEV_PARAM_RTS_FIXED_RATE,
3630 /** Pdev reset */
3631 WMI_PDEV_PARAM_PDEV_RESET,
3632 /** wapi mbssid offset **/
3633 WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET,
3634 /** ARP DEBUG source address*/
3635 WMI_PDEV_PARAM_ARP_DBG_SRCADDR,
3636 /** ARP DEBUG destination address*/
3637 WMI_PDEV_PARAM_ARP_DBG_DSTADDR,
3638 /** ATF enable/disable obss noise scheduling */
3639 WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH,
3640 /** ATF obss noise scaling factor */
3641 WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR,
3642 /**
3643 * TX power reduction scaling exponent - final tx power is the
3644 * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by
3645 * 2^(scale exponent). For example:
3646 * If this scale exponent is 0, the power is unchanged (divided by 2^0)
3647 * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB
3648 * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB
3649 * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB
3650 */
3651 WMI_PDEV_PARAM_CUST_TXPOWER_SCALE,
3652 /** ATF enabe/disabe dynamically */
3653 WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE,
3654
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003655} WMI_PDEV_PARAM;
3656
3657typedef enum {
3658 /** Set the loglevel */
3659 WMI_DBGLOG_LOG_LEVEL = 0x1,
3660 /** Enable VAP level debug */
3661 WMI_DBGLOG_VAP_ENABLE,
3662 /** Disable VAP level debug */
3663 WMI_DBGLOG_VAP_DISABLE,
3664 /** Enable MODULE level debug */
3665 WMI_DBGLOG_MODULE_ENABLE,
3666 /** Disable MODULE level debug */
3667 WMI_DBGLOG_MODULE_DISABLE,
3668 /** Enable MODULE level debug */
3669 WMI_DBGLOG_MOD_LOG_LEVEL,
3670 /** set type of the debug output */
3671 WMI_DBGLOG_TYPE,
3672 /** Enable Disable debug */
3673 WMI_DBGLOG_REPORT_ENABLE
3674} WMI_DBG_PARAM;
3675
3676/* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
3677typedef enum {
3678 WMI_CTS_CBW_INVALID = 0,
3679 WMI_CTS_CBW_20,
3680 WMI_CTS_CBW_40,
3681 WMI_CTS_CBW_80,
3682 WMI_CTS_CBW_80_80,
3683 WMI_CTS_CBW_160,
3684} WMI_CTS_CBW;
3685
3686typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303687 /** TLV tag and len; tag equals
3688 * WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param
3689 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003690 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303691 /** pdev_id for identifying the MAC
3692 * See macros starting with WMI_PDEV_ID_ for values.
3693 */
3694 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003695 /** parameter id */
3696 A_UINT32 param_id;
3697 /** parametr value */
3698 A_UINT32 param_value;
3699} wmi_pdev_set_param_cmd_fixed_param;
3700
3701typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303702 /** TLV tag and len; tag equals
3703 * WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param
3704 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003705 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303706 /** pdev_id for identifying the MAC
3707 * See macros starting with WMI_PDEV_ID_ for values.
3708 */
3709 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003710 /** parameter */
3711 A_UINT32 param;
3712} wmi_pdev_get_tpc_config_cmd_fixed_param;
3713
3714#define WMI_FAST_DIVERSITY_BIT_OFFSET 0
3715#define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
3716
3717typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303718 /** TLV tag and len; tag equals
3719 * WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param
3720 */
3721 A_UINT32 tlv_header;
3722 union {
3723 /* OBSOLETE - will be removed once all refs are gone */
3724 A_UINT32 mac_id;
3725 /** pdev_id for identifying the MAC
3726 * See macros starting with WMI_PDEV_ID_ for values.
3727 */
3728 A_UINT32 pdev_id;
3729 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003730 /** parameter */
Govind Singh869c9872016-02-22 18:36:34 +05303731 /** bit0 is for enable/disable FAST diversity,
3732 * and bit1 is for enable/disable SLOW diversity,
3733 * 0->disable, 1->enable
3734 */
3735 A_UINT32 value;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003736} wmi_pdev_set_antenna_diversity_cmd_fixed_param;
3737
3738#define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
3739
3740typedef struct {
3741 /*
3742 * TLV tag and len; tag equals
3743 * WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param
3744 */
3745 A_UINT32 tlv_header;
3746 /* vdev_id, where RSSI monitoring will take place */
3747 A_UINT32 vdev_id;
3748 /*
3749 * host will configure request_id and firmware echo
3750 * this id in RSSI_BREACH_EVENT
3751 */
3752 A_UINT32 request_id;
3753 /*
3754 * bit [0-2] = low_rssi_breach_enabled[0-2]
3755 * enabled, bit [3-5] = hi_rssi_breach_enabled[0-2]
3756 */
3757 A_UINT32 enabled_bitmap;
3758 /* unit dBm. host driver to make sure [0] > [1] > [2] */
3759 A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED];
3760 /* unit dBm. host driver to make sure [0] < [1] < [2] */
3761 A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED];
3762 /*
3763 * unit dBm. once low rssi[] breached, same event
3764 * bitmap will be generated only after signal gets better
3765 * than this level. This value is adopted for all low_rssi_breach_threshold[3]
3766 */
3767 A_UINT32 lo_rssi_reenable_hysteresis;
3768 /*
3769 * unit dBm. once hi rssi[] breached, same event bitmap
3770 * will be generated only after signal gets worse than this
3771 * level. This value is adopted for all hi_rssi_breach_threshold[3]
3772 */
3773 A_UINT32 hi_rssi_reenable_histeresis;
3774 /*
3775 * After last event is generated, we wait
3776 * until this interval to generate next event
3777 */
3778 A_UINT32 min_report_interval;
3779 /* this is to suppress number of event to be generated */
3780 A_UINT32 max_num_report;
3781} wmi_rssi_breach_monitor_config_fixed_param;
3782
3783typedef struct {
3784 /** parameter */
3785 A_UINT32 param;
3786} wmi_pdev_dump_cmd;
3787
3788typedef enum {
3789 PAUSE_TYPE_CHOP = 0x1,
3790 /** for MCC (switch channel), only vdev_map is valid */
3791 PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */
3792 PAUSE_TYPE_UAPSD = 0x3,
3793 /** for uapsd, only peer_id and tid_map are valid. */
3794 PAUSE_TYPE_P2P_CLIENT_NOA = 0x4,
3795 /** only vdev_map is valid, actually only one vdev id is set at one time */
3796 PAUSE_TYPE_P2P_GO_PS = 0x5,
3797 /** only vdev_map is valid, actually only one vdev id is set at one time */
3798 PAUSE_TYPE_STA_ADD_BA = 0x6,
3799 /** only peer_id and tid_map are valid, actually only one tid is set at one time */
3800 PAUSE_TYPE_AP_PS = 0x7,
3801 /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
3802 PAUSE_TYPE_IBSS_PS = 0x8,
3803 /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +05303804 PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9,
3805 /*
3806 * for TDLS offchannel MCC (switch channel), only vdev_map is valid,
3807 * TDLS connection tracker needs to be notified
3808 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003809 PAUSE_TYPE_HOST = 0x15,
3810 /** host is requesting vdev pause */
3811} wmi_tx_pause_type;
3812
3813typedef enum {
3814 ACTION_PAUSE = 0x0,
3815 ACTION_UNPAUSE = 0x1,
3816} wmi_tx_pause_action;
3817
3818typedef struct {
3819 A_UINT32 tlv_header;
3820 A_UINT32 pause_type;
3821 A_UINT32 action;
3822 A_UINT32 vdev_map;
3823 A_UINT32 peer_id;
3824 A_UINT32 tid_map;
3825} wmi_tx_pause_event_fixed_param;
3826
3827typedef enum {
3828 WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
3829 WMI_MGMT_TX_COMP_TYPE_DISCARD,
3830 WMI_MGMT_TX_COMP_TYPE_INSPECT,
3831 WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
3832 WMI_MGMT_TX_COMP_TYPE_MAX,
3833} WMI_MGMT_TX_COMP_STATUS_TYPE;
3834
3835typedef struct {
3836 A_UINT32 tlv_header;
3837 A_UINT32 desc_id; /* from tx_send_cmd */
3838 A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */
3839} wmi_mgmt_tx_compl_event_fixed_param;
3840
3841#define WMI_TPC_RATE_MAX 160
3842/* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
3843#define WMI_TPC_TX_NUM_CHAIN 4
3844
3845typedef enum {
3846 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
3847 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
3848 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
3849} WMI_TPC_CONFIG_EVENT_FLAG;
3850
3851typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303852 /* TLV tag and len; tag equals
3853 * WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param
3854 */
3855 A_UINT32 tlv_header;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003856 A_UINT32 regDomain;
3857 A_UINT32 chanFreq;
3858 A_UINT32 phyMode;
3859 A_UINT32 twiceAntennaReduction;
3860 A_UINT32 twiceMaxRDPower;
3861 A_INT32 twiceAntennaGain;
3862 A_UINT32 powerLimit;
3863 A_UINT32 rateMax;
3864 A_UINT32 numTxChain;
3865 A_UINT32 ctl;
3866 A_UINT32 flags;
Govind Singh869c9872016-02-22 18:36:34 +05303867 /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without
3868 * breaking the WMI compatibility
3869 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003870 A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
3871 A_INT8
3872 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN]
3873 [WMI_TPC_TX_NUM_CHAIN];
3874 A_INT8
3875 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN]
3876 [WMI_TPC_TX_NUM_CHAIN];
3877 A_INT8
3878 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN]
3879 [WMI_TPC_TX_NUM_CHAIN];
Govind Singh869c9872016-02-22 18:36:34 +05303880 /** pdev_id for identifying the MAC
3881 * See macros starting with WMI_PDEV_ID_ for values.
3882 */
3883 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003884 /* This TLV is followed by a byte array:
3885 * A_UINT8 ratesArray[];
3886 */
3887} wmi_pdev_tpc_config_event_fixed_param;
3888
3889typedef struct {
3890 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */
3891 A_UINT32 periodCnt;
3892 A_UINT32 L1Cnt;
3893 A_UINT32 L11Cnt;
3894 A_UINT32 L12Cnt;
3895 A_UINT32 L1Entry;
3896 A_UINT32 L11Entry;
3897 A_UINT32 L12Entry;
Govind Singh869c9872016-02-22 18:36:34 +05303898 /** pdev_id for identifying the MAC
3899 * See macros starting with WMI_PDEV_ID_ for values.
3900 */
3901 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003902} wmi_pdev_l1ss_track_event_fixed_param;
3903
3904typedef struct {
3905 A_UINT32 len;
3906 A_UINT32 msgref;
3907 A_UINT32 segmentInfo;
3908} wmi_pdev_seg_hdr_info;
3909
3910/*
3911 * Transmit power scale factor.
3912 *
3913 */
3914typedef enum {
3915 WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
3916 WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
3917 WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
3918 WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
3919 WMI_TP_SCALE_MIN = 4, /* min, but still on */
3920 WMI_TP_SCALE_SIZE = 5, /* max num of enum */
3921} WMI_TP_SCALE;
3922
3923#define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
3924
3925typedef struct {
3926 /** message buffer, NULL terminated */
3927 char bufp[WMI_MAX_DEBUG_MESG];
3928} wmi_debug_mesg_event;
3929
3930enum {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003931 /** P2P device */
3932 VDEV_SUBTYPE_P2PDEV = 0,
3933 /** P2P client */
3934 VDEV_SUBTYPE_P2PCLI,
3935 /** P2P GO */
3936 VDEV_SUBTYPE_P2PGO,
3937 /** BT3.0 HS */
3938 VDEV_SUBTYPE_BT,
3939};
3940
3941typedef struct {
3942 /** idnore power , only use flags , mode and freq */
3943 wmi_channel chan;
3944} wmi_pdev_set_channel_cmd;
3945
3946typedef enum {
3947 WMI_PKTLOG_EVENT_RX = 0x1,
3948 WMI_PKTLOG_EVENT_TX = 0x2,
3949 WMI_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
3950 WMI_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
3951 /* 0x10 used by deprecated DBG_PRINT */
3952 WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x20, /* To support Smart Antenna */
3953} WMI_PKTLOG_EVENT;
3954
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07003955typedef enum {
3956 /* (default) FW will decide under what conditions to enable pktlog */
3957 WMI_PKTLOG_ENABLE_AUTO = 0,
3958 WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */
3959} WMI_PKTLOG_ENABLE;
3960
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003961typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303962 /** TLV tag and len; tag equals
3963 * WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param
3964 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003965 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303966 /** pdev_id for identifying the MAC
3967 * See macros starting with WMI_PDEV_ID_ for values.
3968 */
3969 A_UINT32 pdev_id;
Krishna Kumaar Natarajan489bf8d2016-03-25 14:30:11 -07003970 A_UINT32 evlist; /* WMI_PKTLOG_EVENT */
3971 A_UINT32 enable; /* WMI_PKTLOG_ENABLE */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003972} wmi_pdev_pktlog_enable_cmd_fixed_param;
3973
3974typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +05303975 /** TLV tag and len; tag equals
3976 * WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param
3977 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003978 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303979 /** pdev_id for identifying the MAC
3980 * See macros starting with WMI_PDEV_ID_ for values.
3981 */
3982 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003983} wmi_pdev_pktlog_disable_cmd_fixed_param;
3984
Govind Singh45ef44a2016-02-01 17:45:22 +05303985typedef struct {
3986 /*
3987 * TLV tag and len; tag equals
3988 * WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param
3989 */
3990 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05303991 /** pdev_id for identifying the MAC
3992 * See macros starting with WMI_PDEV_ID_ for values.
3993 */
3994 A_UINT32 pdev_id;
Govind Singh45ef44a2016-02-01 17:45:22 +05303995 /*
3996 * enable for mib stats collection.
3997 * Stats are delivered to host in wmi_mib_stats structure.
3998 * If enable_Mib=1, stats collection is enabled.
3999 * If enable_Mib=0, stats collection does not happen
4000 */
4001 A_UINT32 enable_Mib;
4002} wmi_mib_stats_enable_cmd_fixed_param;
4003
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004004/** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
4005 * NOTE: This constant cannot be changed without breaking
4006 * WMI Compatibility. */
4007
4008#define WMI_DSCP_MAP_MAX (64)
4009/*
4010 * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
4011 * @details
4012 * Create an API for sending the custom DSCP-to-TID map to the target
4013 * If this is a request from the user space or from above the UMAC
4014 * then the best place to implement this is in the umac_if_offload of the OL path.
4015 * Provide a place holder for this API in the ieee80211com (ic).
4016 *
4017 * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
4018 * in the target should be directed to the function pointer in the ic.
4019 *
4020 * Implementation details of the API to send the map to the target are as described-
4021 *
4022 * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
4023 * DSCP-to-TID map is a one dimensional uint32_t array of length 64 to accomodate
4024 * 64 TID values for 2^6 (64) DSCP ids.
4025 * Example:
4026 * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
4027 * 0, 0, 0, 0, 0, 0, 0, 0,
4028 * 1, 1, 1, 1, 1, 1, 1, 1,
4029 * 2, 2, 2, 2, 2, 2, 2, 2,
4030 * 3, 3, 3, 3, 3, 3, 3, 3,
4031 * 4, 4, 4, 4, 4, 4, 4, 4,
4032 * 5, 5, 5, 5, 5, 5, 5, 5,
4033 * 6, 6, 6, 6, 6, 6, 6, 6,
4034 * 7, 7, 7, 7, 7, 7, 7, 7,
4035 * };
4036 *
4037 * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
4038 *
4039 * 3. Copy the DSCP-to-TID map into the WMI buffer.
4040 *
4041 * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
4042 * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
4043 * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
4044 * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
4045 *
4046 */
Govind Singh869c9872016-02-22 18:36:34 +05304047
4048/* DEPRECATED - use VDEV level command instead
4049 * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param)
4050 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004051typedef struct {
4052 A_UINT32 tlv_header;
4053 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
4054 A_UINT32 reserved0;
4055 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
4056 /* map indicating DSCP to TID conversion */
4057 A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
4058} wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
4059
Govind Singhc7d51942016-02-01 12:09:31 +05304060typedef struct {
4061 A_UINT32 tlv_header;
4062 /*
4063 * TLV tag and len; tag equals
4064 * WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param
4065 */
4066 A_UINT32 vdev_id;
4067 /** map indicating DSCP to TID conversion */
4068 A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
Rajeev Kumare18f5282016-04-15 14:08:29 -07004069 A_UINT32 enable_override;
Govind Singhc7d51942016-02-01 12:09:31 +05304070} wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
4071
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004072/** Fixed rate (rate-code) for broadcast/ multicast data frames */
4073/* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
4074 * @details
4075 * Create an API for setting the custom rate for the MCAST and BCAST frames
4076 * in the target. If this is a request from the user space or from above the UMAC
4077 * then the best place to implement this is in the umac_if_offload of the OL path.
4078 * Provide a place holder for this API in the ieee80211com (ic).
4079 *
4080 * Implementation details of the API to set custom rates for MCAST and BCAST in
4081 * the target are as described-
4082 *
4083 * 1. The function will have 3 arguments-
4084 * vap structure,
4085 * MCAST/ BCAST identifier code,
4086 * 8 bit rate code
4087 *
4088 * The rate-code is a 1-byte field in which:for given rate, nss and preamble
4089 * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
4090 * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
4091 * b'3-b'0 indicate the rate, which is indicated as follows:
4092 * OFDM : 0: OFDM 48 Mbps
4093 * 1: OFDM 24 Mbps
4094 * 2: OFDM 12 Mbps
4095 * 3: OFDM 6 Mbps
4096 * 4: OFDM 54 Mbps
4097 * 5: OFDM 36 Mbps
4098 * 6: OFDM 18 Mbps
4099 * 7: OFDM 9 Mbps
4100 * CCK (pream == 1)
4101 * 0: CCK 11 Mbps Long
4102 * 1: CCK 5.5 Mbps Long
4103 * 2: CCK 2 Mbps Long
4104 * 3: CCK 1 Mbps Long
4105 * 4: CCK 11 Mbps Short
4106 * 5: CCK 5.5 Mbps Short
4107 * 6: CCK 2 Mbps Short
4108 * HT/VHT (pream == 2/3)
4109 * 0..7: MCS0..MCS7 (HT)
4110 * 0..9: MCS0..MCS9 (VHT)
4111 *
4112 * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
4113 * to the target.
4114 * Arguments to the API are-
4115 * wmi handle,
4116 * VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
4117 * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
4118 * rate value.
4119 */
4120typedef enum {
4121 WMI_SET_MCAST_RATE,
4122 WMI_SET_BCAST_RATE
4123} MCAST_BCAST_RATE_ID;
4124
4125typedef struct {
4126 MCAST_BCAST_RATE_ID rate_id;
4127 A_UINT32 rate;
4128} mcast_bcast_rate;
4129
4130typedef struct {
4131 A_UINT32 tlv_header;
4132 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
4133 A_UINT32 cwmin;
4134 A_UINT32 cwmax;
4135 A_UINT32 aifs;
4136 A_UINT32 txoplimit;
4137 A_UINT32 acm;
4138 A_UINT32 no_ack;
4139} wmi_wmm_params;
4140
Govind Singh869c9872016-02-22 18:36:34 +05304141/* DEPRECATED - use VDEV level command instead
4142 * (wmi_vdev_set_wmm_params_cmd_fixed_param)
4143 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004144typedef struct {
4145 A_UINT32 tlv_header;
4146 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
4147 A_UINT32 reserved0;
4148 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
4149 A_UINT32 dg_type;
4150
4151 /* The TLVs for the 4 AC follows:
4152 * wmi_wmm_params wmm_params_ac_be;
4153 * wmi_wmm_params wmm_params_ac_bk;
4154 * wmi_wmm_params wmm_params_ac_vi;
4155 * wmi_wmm_params wmm_params_ac_vo;
4156 */
4157} wmi_pdev_set_wmm_params_cmd_fixed_param;
4158
4159typedef enum {
4160 WMI_REQUEST_PEER_STAT = 0x01,
4161 WMI_REQUEST_AP_STAT = 0x02,
4162 WMI_REQUEST_PDEV_STAT = 0x04,
4163 WMI_REQUEST_VDEV_STAT = 0x08,
4164 WMI_REQUEST_BCNFLT_STAT = 0x10,
4165 WMI_REQUEST_VDEV_RATE_STAT = 0x20,
Govind Singh32cced32016-02-01 13:33:09 +05304166 WMI_REQUEST_INST_STAT = 0x40,
Govind Singh45ef44a2016-02-01 17:45:22 +05304167 WMI_REQUEST_MIB_STAT = 0x80,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004168} wmi_stats_id;
4169
4170typedef struct {
4171 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
4172 wmi_stats_id stats_id;
4173 /** unique id identifying the VDEV, generated by the caller */
4174 A_UINT32 vdev_id;
4175 /** peer MAC address */
4176 wmi_mac_addr peer_macaddr;
4177} wmi_request_stats_cmd_fixed_param;
4178
4179/* stats type bitmap */
4180#define WMI_LINK_STATS_RADIO 0x00000001
4181#define WMI_LINK_STATS_IFACE 0x00000002
4182#define WMI_LINK_STATS_ALL_PEER 0x00000004
4183#define WMI_LINK_STATS_PER_PEER 0x00000008
4184
4185/* wifi clear statistics bitmap */
4186#define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
4187#define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
4188#define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
4189#define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
4190#define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
4191#define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
4192#define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
4193#define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
4194#define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */
4195#define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */
4196
4197/** Default value for stats if the stats collection has not started */
4198#define WMI_STATS_VALUE_INVALID 0xffffffff
4199
4200#define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16)
4201#define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value)
4202#define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1)
4203#define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value)
4204#define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
4205#define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
4206
4207typedef struct {
4208 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
4209 A_UINT32 num_of_diag_events_logs;
4210/* The TLVs will follow.
4211 * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
4212 * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
4213 * Bit 17 Indicate if the DIAG type is Enabled/Disabled.
4214 */
4215} wmi_diag_event_log_config_fixed_param;
4216
4217#define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
4218#define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
4219#define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1)
4220#define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
4221
4222typedef struct {
4223 A_UINT32 tlv_header;
4224 A_UINT32 num_of_diag_events_logs;
4225/* The TLVs will follow.
4226 * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
4227 * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
4228 * Bit 17 - Frequncy of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
4229 * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
4230 */
4231} wmi_diag_event_log_supported_event_fixed_params;
4232
4233typedef struct {
4234 /**
4235 * TLV tag and len; tag equals
4236 * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param
4237 */
4238 A_UINT32 tlv_header;
4239 /** placeholder for future */
4240 A_UINT32 reserved0;
4241} wmi_debug_mesg_flush_fixed_param;
4242
4243typedef struct {
4244 /**
4245 * TLV tag and len; tag equals
4246 * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param
4247 */
4248 A_UINT32 tlv_header;
4249 /** placeholder for future */
4250 A_UINT32 reserved0;
4251} wmi_debug_mesg_flush_complete_fixed_param;
4252
4253
4254typedef struct {
4255 /*
4256 * TLV tag and len; tag equals
4257 * WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param
4258 * vdev_id, where RSSI breach event occurred
4259 */
4260 A_UINT32 tlv_header;
4261 A_UINT32 vdev_id;
4262 /* request id */
4263 A_UINT32 request_id;
4264 /*
4265 * bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is
4266 * corresponding to hi_rssi[0-2]
4267 */
4268 A_UINT32 event_bitmap;
4269 /* rssi at the time of RSSI breach. Unit dBm */
4270 A_UINT32 rssi;
4271 /* bssid of the monitored AP's */
4272 wmi_mac_addr bssid;
4273} wmi_rssi_breach_event_fixed_param;
4274
4275
4276typedef struct {
4277 /** TLV tag and len; tag equals
4278 * WMITLV_TAG_STRUC_wmi_fw_mem_dump */
4279 A_UINT32 tlv_header;
4280 /** unique id identifying the segment */
4281 A_UINT32 seg_id;
4282 /** Start address of the segment to be read */
4283 A_UINT32 seg_start_addr_lo;
4284 A_UINT32 seg_start_addr_hi;
4285 /** Length of the segment to be read */
4286 A_UINT32 seg_length;
4287 /** Host bufeer address to which the segment will be read and dumped */
4288 A_UINT32 dest_addr_lo;
4289 A_UINT32 dest_addr_hi;
4290} wmi_fw_mem_dump;
4291
4292/* Command to get firmware memory dump*/
4293typedef struct {
4294 /** TLV tag and len; tag equals
4295 * WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
4296 A_UINT32 tlv_header;
4297 /** unique id identifying the request */
4298 A_UINT32 request_id;
4299 /** number of memory dump segments */
4300 A_UINT32 num_fw_mem_dump_segs;
4301 /**
4302 * This TLV is followed by another TLV
4303 * wmi_fw_mem_dump fw_mem_dump[];
4304 */
4305} wmi_get_fw_mem_dump_fixed_param;
4306
4307/** Event to indicate the completion of fw mem dump */
4308typedef struct {
4309 /* TLV tag and len; tag equals
4310 * WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
4311 A_UINT32 tlv_header;
4312 /** unique id identifying the request, given
4313 * in the request stats command */
4314 A_UINT32 request_id;
4315 /*In case of Firmware memory dump */
4316 A_UINT32 fw_mem_dump_complete;
4317} wmi_update_fw_mem_dump_fixed_param;
4318
4319typedef enum {
4320 WMI_ROAMING_IDLE = 0,
4321 WMI_ROAMING_ACTIVE = 1,
4322} wmi_roam_state;
4323
4324/* access categories */
4325typedef enum {
4326 WMI_AC_VO = 0,
4327 WMI_AC_VI = 1,
4328 WMI_AC_BE = 2,
4329 WMI_AC_BK = 3,
4330 WMI_AC_MAX = 4,
4331} wmi_traffic_ac;
4332
4333typedef enum {
4334 WMI_STA_STATS = 0,
4335 WMI_SOFTAP_STATS = 1,
4336 WMI_IBSS_STATS = 2,
4337 WMI_P2P_CLIENT_STATS = 3,
4338 WMI_P2P_GO_STATS = 4,
4339 WMI_NAN_STATS = 5,
4340 WMI_MESH_STATS = 6,
4341} wmi_link_iface_type;
4342
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004343/*Clear stats*/
4344typedef struct {
4345 A_UINT32 tlv_header;
4346 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
4347 /** unique id identifying the VDEV, generated by the caller */
4348 A_UINT32 vdev_id;
4349 /** stop_stats_collection_req = 1 will imply stop the statistics collection */
4350 A_UINT32 stop_stats_collection_req;
4351 /** identifies what stats to be cleared */
4352 A_UINT32 stats_clear_req_mask;
4353 /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
4354 wmi_mac_addr peer_macaddr;
4355} wmi_clear_link_stats_cmd_fixed_param;
4356
4357/* Link Stats configuration params. Trigger the link layer statistics collection*/
4358typedef struct {
4359 A_UINT32 tlv_header;
4360 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
4361 /** threshold to classify the pkts as short or long */
4362 A_UINT32 mpdu_size_threshold;
4363 /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
4364 A_UINT32 aggressive_statistics_gathering;
4365} wmi_start_link_stats_cmd_fixed_param;
4366
4367typedef struct {
4368 A_UINT32 tlv_header;
4369 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
4370 /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
4371 A_UINT32 stats_type;
4372 /** unique id identifying the VDEV, generated by the caller */
4373 A_UINT32 vdev_id;
4374 /** unique id identifying the request, generated by the caller */
4375 A_UINT32 request_id;
4376 /** peer MAC address */
4377 wmi_mac_addr peer_macaddr;
4378} wmi_request_link_stats_cmd_fixed_param;
4379
4380/* channel statistics */
4381typedef struct {
4382 A_UINT32 tlv_header;
4383 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
4384 /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
4385 A_UINT32 channel_width;
4386 /** Primary 20 MHz channel */
4387 A_UINT32 center_freq;
4388 /** center frequency (MHz) first segment */
4389 A_UINT32 center_freq0;
4390 /** center frequency (MHz) second segment */
4391 A_UINT32 center_freq1;
4392 /** msecs the radio is awake (32 bits number accruing over time) */
4393 A_UINT32 radio_awake_time;
4394 /** msecs the CCA register is busy (32 bits number accruing over time) */
4395 A_UINT32 cca_busy_time;
4396} wmi_channel_stats;
4397
Krishna Kumaar Natarajanee6cfa72016-03-25 14:05:03 -07004398/*
4399 * Each step represents 0.5 dB. The starting value is 0 dBm.
4400 * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps.
4401 */
4402#define MAX_TPC_LEVELS 64
4403
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004404/* radio statistics */
4405typedef struct {
4406 A_UINT32 tlv_header;
4407 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
4408 /** Wifi radio (if multiple radio supported) */
4409 A_UINT32 radio_id;
4410 /** msecs the radio is awake (32 bits number accruing over time) */
4411 A_UINT32 on_time;
4412 /** msecs the radio is transmitting (32 bits number accruing over time) */
4413 A_UINT32 tx_time;
4414 /** msecs the radio is in active receive (32 bits number accruing over time) */
4415 A_UINT32 rx_time;
4416 /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
4417 A_UINT32 on_time_scan;
4418 /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
4419 A_UINT32 on_time_nbd;
4420 /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
4421 A_UINT32 on_time_gscan;
4422 /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
4423 A_UINT32 on_time_roam_scan;
4424 /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
4425 A_UINT32 on_time_pno_scan;
4426 /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
4427 A_UINT32 on_time_hs20;
4428 /** number of channels */
4429 A_UINT32 num_channels;
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304430 /*
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304431 * tx time per TPC level - DEPRECATED
4432 * This field is deprecated.
4433 * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID
4434 * message.
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304435 */
Krishna Kumaar Natarajanee6cfa72016-03-25 14:05:03 -07004436 A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS];
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304437} wmi_radio_link_stats;
4438
4439/** tx time per power level statistics */
4440typedef struct {
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304441 /*
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304442 * TLV tag and len; tag equals
4443 * WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304444 */
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304445 A_UINT32 tlv_header;
4446 /* total number of tx power levels */
4447 A_UINT32 total_num_tx_power_levels;
4448 /* number of tx power levels that are carried in this event */
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304449 A_UINT32 num_tx_power_levels;
4450 /*
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304451 * offset of current stats
4452 * If ((num_tx_power_levels + power_level_offset)) ==
4453 * total_num_tx_power_levels)
4454 * this message completes the report of tx time per power levels.
4455 * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID
4456 * messages will be sent by the target to deliver the remainder of the
4457 * tx time per power level stats.
Anurag Chouhan0e13ab02016-04-18 17:17:49 +05304458 */
Anurag Chouhan90c1a182016-04-18 17:20:38 +05304459 A_UINT32 power_level_offset;
4460 /*
4461 * This TLV will be followed by a TLV containing a variable-length
4462 * array of A_UINT32 with tx time per power level data
4463 * A_UINT32 tx_time_per_power_level[num_tx_power_levels]
4464 * The tx time is in units of milliseconds.
4465 * The power levels are board-specific values; a board-specific
4466 * translation has to be applied to determine what actual power
4467 * corresponds to each power level.
4468 * Just as the host has a BDF file available, the host should also have
4469 * a data file available that provides the power level to power
4470 * translations.
4471 */
4472} wmi_tx_power_level_stats_evt_fixed_param;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004473
4474/** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
4475typedef struct {
4476 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
4477 /** unique id identifying the request, given in the request stats command */
4478 A_UINT32 request_id;
4479 /** Number of radios*/
4480 A_UINT32 num_radio;
4481 /** more_data will be set depending on the number of radios */
4482 A_UINT32 more_radio_events;
4483/*
4484 * This TLV is followed by another TLV of array of bytes
4485 * size of(struct wmi_radio_link_stats);
4486 *
4487 * This TLV is followed by another TLV of array of bytes
4488 * num_channels * size of(struct wmi_channel_stats)
4489 */
4490
4491} wmi_radio_link_stats_event_fixed_param;
4492
4493/* per rate statistics */
4494typedef struct {
4495 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
4496 /** rate information
4497 * The rate-code is a 1-byte field in which:for given rate, nss and preamble
4498 * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
4499 * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
4500 * b'3-b'0 indicate the rate, which is indicated as follows:
4501 * OFDM : 0: OFDM 48 Mbps
4502 * 1: OFDM 24 Mbps
4503 * 2: OFDM 12 Mbps
4504 * 3: OFDM 6 Mbps
4505 * 4: OFDM 54 Mbps
4506 * 5: OFDM 36 Mbps
4507 * 6: OFDM 18 Mbps
4508 * 7: OFDM 9 Mbps
4509 * CCK (pream == 1)
4510 * 0: CCK 11 Mbps Long
4511 * 1: CCK 5.5 Mbps Long
4512 * 2: CCK 2 Mbps Long
4513 * 3: CCK 1 Mbps Long
4514 * 4: CCK 11 Mbps Short
4515 * 5: CCK 5.5 Mbps Short
4516 * 6: CCK 2 Mbps Short
4517 * HT/VHT (pream == 2/3)
4518 * 0..7: MCS0..MCS7 (HT)
4519 * 0..9: MCS0..MCS9 (VHT)
4520 */
4521 A_UINT32 rate;
4522 /** units of 100 Kbps */
4523 A_UINT32 bitrate;
4524 /** number of successfully transmitted data pkts (ACK rcvd) */
4525 A_UINT32 tx_mpdu;
4526 /** number of received data pkts */
4527 A_UINT32 rx_mpdu;
4528 /** number of data packet losses (no ACK) */
4529 A_UINT32 mpdu_lost;
4530 /** total number of data pkt retries */
4531 A_UINT32 retries;
4532 /** number of short data pkt retries */
4533 A_UINT32 retries_short;
4534 /** number of long data pkt retries */
4535 A_UINT32 retries_long;
4536} wmi_rate_stats;
4537
4538typedef struct {
4539 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
4540 /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
4541 A_UINT32 peer_type;
4542 /** mac address */
4543 wmi_mac_addr peer_mac_address;
4544 /** peer wmi_CAPABILITY_XXX */
4545 A_UINT32 capabilities;
4546 /** number of rates */
4547 A_UINT32 num_rates;
4548} wmi_peer_link_stats;
4549
4550/** PEER statistics (once started) reset and start afresh after each connection */
4551typedef struct {
4552 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
4553 /** unique id identifying the request, given in the request stats command */
4554 A_UINT32 request_id;
4555 /** number of peers accomidated in this particular event */
4556 A_UINT32 num_peers;
4557 /** Indicates the fragment number */
4558 A_UINT32 peer_event_number;
4559 /** Indicates if there are more peers which will be sent as seperate peer_stats event */
4560 A_UINT32 more_data;
4561
4562/**
4563 * This TLV is followed by another TLV
4564 * num_peers * size of(struct wmi_peer_stats)
4565 * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
4566 */
4567} wmi_peer_stats_event_fixed_param;
4568
4569/* per access category statistics */
4570typedef struct {
4571 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
4572 /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
4573 A_UINT32 ac_type;
4574 /** number of successfully transmitted unicast data pkts (ACK rcvd) */
4575 A_UINT32 tx_mpdu;
4576 /** number of received unicast mpdus */
4577 A_UINT32 rx_mpdu;
4578 /** number of succesfully transmitted multicast data packets */
4579 /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
4580 A_UINT32 tx_mcast;
4581 /** number of received multicast data packets */
4582 A_UINT32 rx_mcast;
4583 /** number of received unicast a-mpdus */
4584 A_UINT32 rx_ampdu;
4585 /** number of transmitted unicast a-mpdus */
4586 A_UINT32 tx_ampdu;
4587 /** number of data pkt losses (no ACK) */
4588 A_UINT32 mpdu_lost;
4589 /** total number of data pkt retries */
4590 A_UINT32 retries;
4591 /** number of short data pkt retries */
4592 A_UINT32 retries_short;
4593 /** number of long data pkt retries */
4594 A_UINT32 retries_long;
4595 /** data pkt min contention time (usecs) */
4596 A_UINT32 contention_time_min;
4597 /** data pkt max contention time (usecs) */
4598 A_UINT32 contention_time_max;
4599 /** data pkt avg contention time (usecs) */
4600 A_UINT32 contention_time_avg;
4601 /** num of data pkts used for contention statistics */
4602 A_UINT32 contention_num_samples;
4603} wmi_wmm_ac_stats;
4604
4605/* interface statistics */
4606typedef struct {
4607 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
4608 /** access point beacon received count from connected AP */
4609 A_UINT32 beacon_rx;
4610 /** access point mgmt frames received count from connected AP (including Beacon) */
4611 A_UINT32 mgmt_rx;
4612 /** action frames received count */
4613 A_UINT32 mgmt_action_rx;
4614 /** action frames transmit count */
4615 A_UINT32 mgmt_action_tx;
4616 /** access Point Beacon and Management frames RSSI (averaged) */
4617 A_UINT32 rssi_mgmt;
4618 /** access Point Data Frames RSSI (averaged) from connected AP */
4619 A_UINT32 rssi_data;
4620 /** access Point ACK RSSI (averaged) from connected AP */
4621 A_UINT32 rssi_ack;
4622 /** number of peers */
4623 A_UINT32 num_peers;
4624 /** Indicates how many peer_stats events will be sent depending on the num_peers. */
4625 A_UINT32 num_peer_events;
4626 /** number of ac */
4627 A_UINT32 num_ac;
4628 /** Roaming Stat */
4629 A_UINT32 roam_state;
4630 /**
4631 * Average Beacon spread offset is the averaged time delay between TBTT
4632 * and beacon TSF */
4633 /** Upper 32 bits of averaged 64 bit beacon spread offset */
4634 A_UINT32 avg_bcn_spread_offset_high;
4635 /** Lower 32 bits of averaged 64 bit beacon spread offset */
4636 A_UINT32 avg_bcn_spread_offset_low;
4637 /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
4638 A_UINT32 is_leaky_ap;
4639 /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
4640 A_UINT32 avg_rx_frms_leaked;
4641 /** Rx leak watch window currently in force to minimize data loss
4642 * because of leaky AP. Rx leak window is the
4643 * time driver waits before shutting down the radio or switching the
4644 * channel and after receiving an ACK for
4645 * a data frame with PM bit set) */
4646 A_UINT32 rx_leak_window;
4647} wmi_iface_link_stats;
4648
4649/** Interface statistics (once started) reset and start afresh after each connection */
4650typedef struct {
4651 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
4652 /** unique id identifying the request, given in the request stats command */
4653 A_UINT32 request_id;
4654 /** unique id identifying the VDEV, generated by the caller */
4655 A_UINT32 vdev_id;
4656/*
4657 * This TLV is followed by another TLV
4658 * wmi_iface_link_stats iface_link_stats;
4659 * num_ac * size of(struct wmi_wmm_ac_stats)
4660 */
4661} wmi_iface_link_stats_event_fixed_param;
4662
4663/** Suspend option */
4664enum {
4665 WMI_PDEV_SUSPEND, /* suspend */
4666 WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
4667};
4668
4669typedef struct {
4670 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */
4671 /* suspend option sent to target */
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05304672 /*
4673 * pdev_id for identifying the MAC, See macros
4674 * starting with WMI_PDEV_ID_ for values.
4675 */
4676 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004677 A_UINT32 suspend_opt;
4678} wmi_pdev_suspend_cmd_fixed_param;
4679
4680typedef struct {
4681 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 +05304682 /*
4683 * pdev_id for identifying the MAC, See macros
4684 * starting with WMI_PDEV_ID_ for values.
4685 */
4686 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004687} wmi_pdev_resume_cmd_fixed_param;
4688
4689typedef struct {
4690 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */
4691 A_UINT32 num_vdev_stats; /* number of vdevs */
4692} wmi_vdev_rate_stats_event_fixed_param;
4693
4694typedef struct {
4695 A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info */
4696 A_UINT32 vdevid; /* Id of the wlan vdev */
4697 A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted */
4698 A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above */
4699 A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
4700 A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
4701} wmi_vdev_rate_ht_info;
4702
4703typedef struct {
4704 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
4705 wmi_stats_id stats_id;
4706 /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
4707 A_UINT32 num_pdev_stats;
4708 /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */
4709 A_UINT32 num_vdev_stats;
4710 /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */
4711 A_UINT32 num_peer_stats;
4712 A_UINT32 num_bcnflt_stats;
4713 /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */
4714 A_UINT32 num_chan_stats;
Govind Singh45ef44a2016-02-01 17:45:22 +05304715 /** number of MIB stats event structures (wmi_mib_stats) */
4716 A_UINT32 num_mib_stats;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004717 /* This TLV is followed by another TLV of array of bytes
4718 * A_UINT8 data[];
4719 * This data array contains
4720 * num_pdev_stats * size of(struct wmi_pdev_stats)
4721 * num_vdev_stats * size of(struct wmi_vdev_stats)
4722 * num_peer_stats * size of(struct wmi_peer_stats)
4723 * num_bcnflt_stats * size_of()
4724 * num_chan_stats * size of(struct wmi_chan_stats)
Govind Singh45ef44a2016-02-01 17:45:22 +05304725 * num_mib_stats * size of(struct wmi_mib_stats)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004726 *
4727 */
4728} wmi_stats_event_fixed_param;
4729
4730/**
4731 * PDEV statistics
4732 * @todo
4733 * add all PDEV stats here
4734 */
4735typedef struct {
4736 /** Channel noise floor */
4737 A_INT32 chan_nf;
4738 /** TX frame count */
4739 A_UINT32 tx_frame_count;
4740 /** RX frame count */
4741 A_UINT32 rx_frame_count;
4742 /** rx clear count */
4743 A_UINT32 rx_clear_count;
4744 /** cycle count */
4745 A_UINT32 cycle_count;
4746 /** Phy error count */
4747 A_UINT32 phy_err_count;
4748 /** Channel Tx Power */
4749 A_UINT32 chan_tx_pwr;
4750 /** WAL dbg stats */
4751 struct wlan_dbg_stats pdev_stats;
4752
4753} wmi_pdev_stats;
4754
4755/**
4756 * VDEV statistics
4757 * @todo
4758 * add all VDEV stats here
4759 */
4760
4761typedef struct {
4762 A_INT32 bcn_snr;
4763 A_INT32 dat_snr;
4764} wmi_snr_info;
4765
4766typedef struct {
4767 /** unique id identifying the VDEV, generated by the caller */
4768 A_UINT32 vdev_id;
4769 wmi_snr_info vdev_snr;
4770 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) */
4771 A_UINT32 rx_frm_cnt; /* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast) */
4772 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 +05304773 that the 802.11 station successfully transmitted after more than one retransmission attempt */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004774 A_UINT32 fail_cnt[WLAN_MAX_AC]; /*Total number packets(per AC) failed to transmit */
4775 A_UINT32 rts_fail_cnt; /*Total number of RTS/CTS sequence failures for transmission of a packet */
4776 A_UINT32 rts_succ_cnt; /*Total number of RTS/CTS sequence success for transmission of a packet */
4777 A_UINT32 rx_err_cnt; /*The receive error count. HAL will provide the RxP FCS error global */
4778 A_UINT32 rx_discard_cnt; /* The sum of the receive error count and dropped-receive-buffer error count. (FCS error) */
4779 A_UINT32 ack_fail_cnt; /*Total number packets failed transmit because of no ACK from the remote entity */
4780 A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES]; /*History of last ten transmit rate, in units of 500 kbit/sec */
4781 A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES]; /*History of last ten Beacon rssi of the connected Bss */
4782} wmi_vdev_stats;
4783
4784/**
4785 * peer statistics.
4786 *
4787 * @todo
4788 * add more stats
4789 *
4790 */
4791typedef struct {
4792 /** peer MAC address */
4793 wmi_mac_addr peer_macaddr;
4794 /** rssi */
4795 A_UINT32 peer_rssi;
4796 /** last tx data rate used for peer */
4797 A_UINT32 peer_tx_rate;
4798 /** last rx data rate used for peer */
4799 A_UINT32 peer_rx_rate;
4800} wmi_peer_stats;
4801
4802typedef struct {
4803 /** Primary channel freq of the channel for which stats are sent */
4804 A_UINT32 chan_mhz;
4805 /** Time spent on the channel */
4806 A_UINT32 sampling_period_us;
4807 /** Aggregate duration over a sampling period for which channel activity was observed */
4808 A_UINT32 rx_clear_count;
4809 /** Accumalation of the TX PPDU duration over a sampling period */
4810 A_UINT32 tx_duration_us;
4811 /** Accumalation of the RX PPDU duration over a sampling period */
4812 A_UINT32 rx_duration_us;
4813} wmi_chan_stats;
4814
4815typedef struct {
Govind Singh45ef44a2016-02-01 17:45:22 +05304816 A_UINT32 tx_mpdu_grp_frag_cnt; /*dot11TransmittedFragmentCount */
4817 A_UINT32 tx_msdu_grp_frm_cnt; /*dot11GroupTransmittedFrameCount */
4818 A_UINT32 tx_msdu_fail_cnt; /*dot11FailedCount*/
4819 A_UINT32 rx_mpdu_frag_cnt; /*dot11ReceivedFragmentCount*/
4820 A_UINT32 rx_msdu_grp_frm_cnt; /*dot11GroupReceivedFrameCount*/
4821 A_UINT32 rx_mpdu_fcs_err; /*dot11FCSErrorCount*/
4822 A_UINT32 tx_msdu_frm_cnt; /*dot11TransmittedFrameCount*/
4823 A_UINT32 tx_msdu_retry_cnt; /*dot11RetryCount*/
4824 A_UINT32 rx_frm_dup_cnt; /*dot11FrameDuplicateCount */
4825 A_UINT32 tx_rts_success_cnt; /*dot11RTSSuccessCount*/
4826 A_UINT32 tx_rts_fail_cnt; /*dot11RTSFailureCount*/
4827 /*dot11QosTransmittedFragmentCount */
4828 A_UINT32 tx_Qos_mpdu_grp_frag_cnt;
4829 A_UINT32 tx_Qos_msdu_fail_UP; /*dot11QosFailedCount */
4830 A_UINT32 tx_Qos_msdu_retry_UP; /*dot11QosRetryCount */
4831 A_UINT32 rx_Qos_frm_dup_cnt_UP; /*dot11QosFrameDuplicateCount*/
4832 A_UINT32 tx_Qos_rts_success_cnt_UP; /*dot11QosRTSSuccessCount*/
4833 A_UINT32 tx_Qos_rts_fail_cnt_UP; /*dot11QosRTSFailureCount*/
4834 A_UINT32 rx_Qos_mpdu_frag_cnt_UP; /*dot11QosReceivedFragmentCount*/
4835 A_UINT32 tx_Qos_msdu_frm_cnt_UP; /*dot11QosTransmittedFrameCount*/
4836 A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/
4837 A_UINT32 rx_Qos_mpdu_cnt; /*dot11QosMPDUsReceivedCount*/
4838 A_UINT32 rx_Qos_mpdu_retryBit_cnt; /*dot11QosRetriesReceivedCount*/
4839 /*dot11RSNAStatsRobustMgmtCCMPReplays */
4840 A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt;
4841 A_UINT32 rsna_TKIP_icv_err_cnt; /*dot11RSNAStatsTKIPICVErrors*/
4842 A_UINT32 rsna_TKIP_replay_err_cnt; /*dot11RSNAStatsTKIPReplays*/
4843 /*dot11RSNAStatsCCMPDecryptErrors */
4844 A_UINT32 rsna_CCMP_decrypt_err_cnt;
4845 A_UINT32 rsna_CCMP_replay_err_cnt; /*dot11RSNAStatsCCMPReplays*/
4846 A_UINT32 tx_ampdu_cnt; /*dot11TransmittedAMPDUCount*/
4847 /*dot11TransmittedMPDUsInAMPDUCount*/
4848 A_UINT32 tx_mpdu_cnt_in_ampdu;
4849 /*dot11TransmittedOctetsInAMPDUCount*/
4850 union {
4851 A_UINT64 counter; /* for use by target only */
4852 struct {
4853 A_UINT32 low;
4854 A_UINT32 high;
4855 } upload; /* for use by host */
4856 } tx_octets_in_ampdu;
4857 A_UINT32 rx_ampdu_cnt; /*dot11AMPDUReceivedCount*/
4858 A_UINT32 rx_mpdu_cnt_in_ampdu; /*dot11MPDUInReceivedAMPDUCount*/
4859 union {
4860 A_UINT64 counter; /* for use by target only */
4861 struct {
4862 A_UINT32 rx_octets_in_ampdu_low;
4863 A_UINT32 rx_octets_in_ampdu_high;
4864 } upload; /* for use by host */
4865 } rx_octets_in_ampdu; /*dot11ReceivedOctetsInAMPDUCount*/
4866 A_UINT32 reserved_1;
4867 A_UINT32 reserved_2;
4868 A_UINT32 reserved_3;
4869 A_UINT32 reserved_4;
4870} wmi_mib_stats;
4871
4872typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004873 A_UINT32 tlv_header;
4874 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
4875 /** unique id identifying the VDEV, generated by the caller */
4876 A_UINT32 vdev_id;
4877 /** VDEV type (AP,STA,IBSS,MONITOR) */
4878 A_UINT32 vdev_type;
4879 /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0)*/
4880 A_UINT32 vdev_subtype;
4881 /** VDEV MAC address */
4882 wmi_mac_addr vdev_macaddr;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05304883 /** Number of configured txrx streams */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004884 A_UINT32 num_cfg_txrx_streams;
4885 /*
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05304886 * pdev_id for identifying the MAC,
4887 * See macros starting with WMI_PDEV_ID_ for values.
4888 */
4889 A_UINT32 pdev_id;
4890 /*
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004891 * This TLV is followed by another TLV of array of structures
4892 * wmi_vdev_txrx_streams cfg_txrx_streams[];
4893 */
4894} wmi_vdev_create_cmd_fixed_param;
4895
4896typedef struct {
4897 /*
4898 * TLV tag and len; tag equals
4899 * WMITLV_TAG_STRUC_wmi_vdev_txrx_streams
4900 */
4901 A_UINT32 tlv_header;
4902 /* band - Should take values from wmi_channel_band_mask */
4903 A_UINT32 band;
4904 /* max supported tx streams per given band for this vdev */
4905 A_UINT32 supported_tx_streams;
4906 /* max supported rx streams per given band for this vdev */
4907 A_UINT32 supported_rx_streams;
4908} wmi_vdev_txrx_streams;
4909
4910/* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
4911typedef struct {
4912 A_UINT32 tlv_header;
4913 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
4914 A_UINT32 type_count;
4915 /** 255: continuous schedule, 0: reserved */
4916 A_UINT32 duration;
4917 /** Absent period duration in micro seconds */
4918 A_UINT32 interval;
4919 /** Absent period interval in micro seconds */
4920 A_UINT32 start_time;
4921 /** 32 bit tsf time when in starts */
4922} wmi_p2p_noa_descriptor;
4923
4924/** values for vdev_type */
4925#define WMI_VDEV_TYPE_AP 0x1
4926#define WMI_VDEV_TYPE_STA 0x2
4927#define WMI_VDEV_TYPE_IBSS 0x3
4928#define WMI_VDEV_TYPE_MONITOR 0x4
4929
4930/** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
4931 * by FW to execute the NAN specific WMI commands and also implement NAN specific
4932 * operations like Network discovery, service provisioning and service
4933 * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create
4934 * WMI command to create this VDEV once during initialization and host is not
4935 * expected to use any VDEV specific WMI commands on this VDEV.
4936 **/
4937#define WMI_VDEV_TYPE_NAN 0x5
4938
4939#define WMI_VDEV_TYPE_OCB 0x6
4940
Govind Singh941bd5e2016-02-04 17:15:25 +05304941/* NAN Data Interface */
4942#define WMI_VDEV_TYPE_NDI 0x7
4943
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004944/** values for vdev_subtype */
4945#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
4946#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
4947#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3
Govind Singh32cced32016-02-01 13:33:09 +05304948#define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA 0x4
4949#define WMI_UNIFIED_VDEV_SUBTYPE_MESH 0x5
Sandeep Puligilla62f7ca02016-03-24 15:48:33 -07004950/*
4951 * new subtype for 11S mesh is required as 11S functionality differs
4952 * in many ways from proprietary mesh
4953 * 11S uses 6-addr frame format and supports peering between mesh
4954 * stations and dynamic best path selection between mesh stations.
4955 * While in proprietary mesh, neighboring mesh station MAC is manually
4956 * added to AST table for traffic flow between mesh stations
4957 */
4958#define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S 0x6
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004959
4960/** values for vdev_start_request flags */
4961/** Indicates that AP VDEV uses hidden ssid. only valid for
4962 * AP/GO */
4963#define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0)
4964/** Indicates if robust management frame/management frame
4965 * protection is enabled. For GO/AP vdevs, it indicates that
4966 * it may support station/client associations with RMF enabled.
4967 * For STA/client vdevs, it indicates that sta will
4968 * associate with AP with RMF enabled. */
4969#define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1)
4970
4971/*
4972 * Host is sending bcn_tx_rate to override the beacon tx rates.
4973 */
4974#define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
4975
4976typedef struct {
4977 A_UINT32 tlv_header;
4978 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
4979 /** unique id identifying the VDEV, generated by the caller */
4980 A_UINT32 vdev_id;
4981 /** requestor id identifying the caller module */
4982 A_UINT32 requestor_id;
4983 /** beacon interval from received beacon */
4984 A_UINT32 beacon_interval;
4985 /** DTIM Period from the received beacon */
4986 A_UINT32 dtim_period;
4987 /** Flags */
4988 A_UINT32 flags;
4989 /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
4990 wmi_ssid ssid;
4991 /** beacon/probe reponse xmit rate. Applicable for SoftAP. */
4992 /** This field will be invalid and ignored unless the */
4993 /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
4994 /** When valid, this field contains the fixed tx rate for the beacon */
4995 /** and probe response frames send by the GO or SoftAP */
4996 A_UINT32 bcn_tx_rate;
4997 /** beacon/probe reponse xmit power. Applicable for SoftAP. */
4998 A_UINT32 bcn_txPower;
4999 /** number of p2p NOA descriptor(s) from scan entry */
5000 A_UINT32 num_noa_descriptors;
5001 /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
5002 During CAC, Our HW shouldn't ack ditected frames */
5003 A_UINT32 disable_hw_ack;
5004 /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
5005 /** The DBS policy manager indicates the preferred number of transmit streams. */
5006 A_UINT32 preferred_tx_streams;
5007 /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
5008 /** the DBS policy manager indicates the preferred number of receive streams. */
5009 A_UINT32 preferred_rx_streams;
5010 /* The TLVs follows this structure:
5011 * wmi_channel chan; //WMI channel
5012 * wmi_p2p_noa_descriptor noa_descriptors[]; //actual p2p NOA descriptor from scan entry
5013 */
5014} wmi_vdev_start_request_cmd_fixed_param;
5015
5016typedef struct {
5017 A_UINT32 tlv_header;
5018 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
5019 /** unique id identifying the VDEV, generated by the caller */
5020 A_UINT32 vdev_id;
5021} wmi_vdev_delete_cmd_fixed_param;
5022
5023typedef struct {
5024 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
5025 /** unique id identifying the VDEV, generated by the caller */
5026 A_UINT32 vdev_id;
5027 /** aid (assoc id) received in association response for STA VDEV */
5028 A_UINT32 vdev_assoc_id;
5029 /** bssid of the BSS the VDEV is joining */
5030 wmi_mac_addr vdev_bssid;
5031} wmi_vdev_up_cmd_fixed_param;
5032
5033typedef struct {
5034 A_UINT32 tlv_header;
5035 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
5036 /** unique id identifying the VDEV, generated by the caller */
5037 A_UINT32 vdev_id;
5038} wmi_vdev_stop_cmd_fixed_param;
5039
5040typedef struct {
5041 A_UINT32 tlv_header;
5042 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
5043 /** unique id identifying the VDEV, generated by the caller */
5044 A_UINT32 vdev_id;
5045} wmi_vdev_down_cmd_fixed_param;
5046
5047typedef struct {
5048 /** unique id identifying the VDEV, generated by the caller */
5049 A_UINT32 vdev_id;
5050} wmi_vdev_standby_response_cmd;
5051
5052typedef struct {
5053 /** unique id identifying the VDEV, generated by the caller */
5054 A_UINT32 vdev_id;
5055} wmi_vdev_resume_response_cmd;
5056
5057typedef struct {
5058 A_UINT32 tlv_header;
5059 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
5060 /** unique id identifying the VDEV, generated by the caller */
5061 A_UINT32 vdev_id;
5062 /** parameter id */
5063 A_UINT32 param_id;
5064 /** parameter value */
5065 A_UINT32 param_value;
5066} wmi_vdev_set_param_cmd_fixed_param;
5067
5068typedef struct {
5069 A_UINT32 key_seq_counter_l;
5070 A_UINT32 key_seq_counter_h;
5071} wmi_key_seq_counter;
5072
5073#define WMI_CIPHER_NONE 0x0 /* clear key */
5074#define WMI_CIPHER_WEP 0x1
5075#define WMI_CIPHER_TKIP 0x2
5076#define WMI_CIPHER_AES_OCB 0x3
5077#define WMI_CIPHER_AES_CCM 0x4
5078#define WMI_CIPHER_WAPI 0x5
5079#define WMI_CIPHER_CKIP 0x6
5080#define WMI_CIPHER_AES_CMAC 0x7
5081#define WMI_CIPHER_ANY 0x8
Govind Singh869c9872016-02-22 18:36:34 +05305082#define WMI_CIPHER_AES_GCM 0x9
5083#define WMI_CIPHER_AES_GMAC 0xa
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005084
5085typedef struct {
5086 A_UINT32 tlv_header;
5087 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
5088 /** unique id identifying the VDEV, generated by the caller */
5089 A_UINT32 vdev_id;
5090 /** MAC address used for installing */
5091 wmi_mac_addr peer_macaddr;
5092 /** key index */
5093 A_UINT32 key_ix;
5094 /** key flags */
5095 A_UINT32 key_flags;
5096 /** key cipher, defined above */
5097 A_UINT32 key_cipher;
5098 /** key rsc counter */
5099 wmi_key_seq_counter key_rsc_counter;
5100 /** global key rsc counter */
5101 wmi_key_seq_counter key_global_rsc_counter;
5102 /** global key tsc counter */
5103 wmi_key_seq_counter key_tsc_counter;
5104 /** WAPI key rsc counter */
5105 A_UINT8 wpi_key_rsc_counter[16];
5106 /** WAPI key tsc counter */
5107 A_UINT8 wpi_key_tsc_counter[16];
5108 /** key length */
5109 A_UINT32 key_len;
5110 /** key tx mic length */
5111 A_UINT32 key_txmic_len;
5112 /** key rx mic length */
5113 A_UINT32 key_rxmic_len;
5114 /*
5115 * Following this struct are this TLV.
5116 * // actual key data
5117 * A_UINT8 key_data[]; // contains key followed by tx mic followed by rx mic
5118 */
5119} wmi_vdev_install_key_cmd_fixed_param;
5120
5121/** Preamble types to be used with VDEV fixed rate configuration */
5122typedef enum {
5123 WMI_RATE_PREAMBLE_OFDM,
5124 WMI_RATE_PREAMBLE_CCK,
5125 WMI_RATE_PREAMBLE_HT,
5126 WMI_RATE_PREAMBLE_VHT,
5127} WMI_RATE_PREAMBLE;
5128
5129/** Value to disable fixed rate setting */
5130#define WMI_FIXED_RATE_NONE (0xff)
5131
5132/** the definition of different VDEV parameters */
5133typedef enum {
5134 /** RTS Threshold */
5135 WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
5136 /** Fragmentation threshold */
5137 WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
5138 /** beacon interval in TUs */
5139 WMI_VDEV_PARAM_BEACON_INTERVAL,
5140 /** Listen interval in TUs */
5141 WMI_VDEV_PARAM_LISTEN_INTERVAL,
5142 /** muticast rate in Mbps */
5143 WMI_VDEV_PARAM_MULTICAST_RATE,
5144 /** management frame rate in Mbps */
5145 WMI_VDEV_PARAM_MGMT_TX_RATE,
5146 /** slot time (long vs short) */
5147 WMI_VDEV_PARAM_SLOT_TIME,
5148 /** preamble (long vs short) */
5149 WMI_VDEV_PARAM_PREAMBLE,
5150 /** SWBA time (time before tbtt in msec) */
5151 WMI_VDEV_PARAM_SWBA_TIME,
5152 /** time period for updating VDEV stats */
5153 WMI_VDEV_STATS_UPDATE_PERIOD,
5154 /** age out time in msec for frames queued for station in power save*/
5155 WMI_VDEV_PWRSAVE_AGEOUT_TIME,
5156 /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
5157 WMI_VDEV_HOST_SWBA_INTERVAL,
5158 /** DTIM period (specified in units of num beacon intervals) */
5159 WMI_VDEV_PARAM_DTIM_PERIOD,
5160 /** scheduler air time limit for this VDEV. used by off chan scheduler */
5161 WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
5162 /** enable/dsiable WDS for this VDEV */
5163 WMI_VDEV_PARAM_WDS,
5164 /** ATIM Window */
5165 WMI_VDEV_PARAM_ATIM_WINDOW,
5166 /** BMISS max */
5167 WMI_VDEV_PARAM_BMISS_COUNT_MAX,
5168 /** BMISS first time */
5169 WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
5170 /** BMISS final time */
5171 WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
5172 /** WMM enables/disabled */
5173 WMI_VDEV_PARAM_FEATURE_WMM,
5174 /** Channel width */
5175 WMI_VDEV_PARAM_CHWIDTH,
5176 /** Channel Offset */
5177 WMI_VDEV_PARAM_CHEXTOFFSET,
5178 /** Disable HT Protection */
5179 WMI_VDEV_PARAM_DISABLE_HTPROTECTION,
5180 /** Quick STA Kickout */
5181 WMI_VDEV_PARAM_STA_QUICKKICKOUT,
5182 /** Rate to be used with Management frames */
5183 WMI_VDEV_PARAM_MGMT_RATE,
5184 /** Protection Mode */
5185 WMI_VDEV_PARAM_PROTECTION_MODE,
5186 /** Fixed rate setting */
5187 WMI_VDEV_PARAM_FIXED_RATE,
5188 /** Short GI Enable/Disable */
5189 WMI_VDEV_PARAM_SGI,
5190 /** Enable LDPC */
5191 WMI_VDEV_PARAM_LDPC,
5192 /** Enable Tx STBC */
5193 WMI_VDEV_PARAM_TX_STBC,
5194 /** Enable Rx STBC */
5195 WMI_VDEV_PARAM_RX_STBC,
5196 /** Intra BSS forwarding */
5197 WMI_VDEV_PARAM_INTRA_BSS_FWD,
5198 /** Setting Default xmit key for Vdev */
5199 WMI_VDEV_PARAM_DEF_KEYID,
5200 /** NSS width */
5201 WMI_VDEV_PARAM_NSS,
5202 /** Set the custom rate for the broadcast data frames */
5203 WMI_VDEV_PARAM_BCAST_DATA_RATE,
5204 /** Set the custom rate (rate-code) for multicast data frames */
5205 WMI_VDEV_PARAM_MCAST_DATA_RATE,
5206 /** Tx multicast packet indicate Enable/Disable */
5207 WMI_VDEV_PARAM_MCAST_INDICATE,
5208 /** Tx DHCP packet indicate Enable/Disable */
5209 WMI_VDEV_PARAM_DHCP_INDICATE,
5210 /** Enable host inspection of Tx unicast packet to unknown destination */
5211 WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
5212
5213 /* The minimum amount of time AP begins to consider STA inactive */
5214 WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
5215
5216 /* An associated STA is considered inactive when there is no recent TX/RX
5217 * activity and no downlink frames are buffered for it. Once a STA exceeds
5218 * the maximum idle inactive time, the AP will send an 802.11 data-null as
5219 * a keep alive to verify the STA is still associated. If the STA does ACK
5220 * the data-null, or if the data-null is buffered and the STA does not
5221 * retrieve it, the STA will be considered unresponsive (see
5222 * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
5223 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
5224
5225 /* An associated STA is considered unresponsive if there is no recent
5226 * TX/RX activity and downlink frames are buffered for it. Once a STA
5227 * exceeds the maximum unresponsive time, the AP will send a
5228 * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
5229 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
5230
5231 /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
5232 WMI_VDEV_PARAM_AP_ENABLE_NAWDS,
5233 /** Enable/Disable RTS-CTS */
5234 WMI_VDEV_PARAM_ENABLE_RTSCTS,
5235 /* Enable TXBFee/er */
5236 WMI_VDEV_PARAM_TXBF,
5237
5238 /**Set packet power save */
5239 WMI_VDEV_PARAM_PACKET_POWERSAVE,
5240
5241 /**Drops un-encrypted packets if any received in an encryted connection
5242 * otherwise forwards to host
5243 */
5244 WMI_VDEV_PARAM_DROP_UNENCRY,
5245
5246 /*
5247 * Set TX encap type.
5248 *
5249 * enum wmi_pkt_type is to be used as the parameter
5250 * specifying the encap type.
5251 */
5252 WMI_VDEV_PARAM_TX_ENCAP_TYPE,
5253
5254 /*
5255 * Try to detect stations that woke-up and exited power save but did not
5256 * successfully transmit data-null with PM=0 to AP. When this happens,
5257 * STA and AP power save state are out-of-sync. Use buffered but
5258 * undelivered MSDU to the STA as a hint that the STA is really awake
5259 * and expecting normal ASAP delivery, rather than retrieving BU with
5260 * PS-Poll, U-APSD trigger, etc.
5261 *
5262 * 0 disables out-of-sync detection. Maximum time is 255 seconds.
5263 */
5264 WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,
5265
5266 /* Enable/Disable early rx dynamic adjust feature.
5267 * Early-rx dynamic adjust is a advance power save feature.
5268 * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
5269 * timing discrepancies in the system.
5270 * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
5271 * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
5272 * properly to minimum the power consume.*/
5273 WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE,
5274
5275 /* set target bmiss number per sample cycle if bmiss adjust was chosen.
5276 * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
5277 * which can be set by user through WMI command.
5278 */
5279 WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM,
5280
5281 /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
5282 WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE,
5283
5284 /* set slop_step */
5285 WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP,
5286
5287 /* set init slop */
5288 WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP,
5289
5290 /* pause adjust enable/disable */
5291 WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE,
5292
5293 /* Set channel pwr limit value of the vdev the minimal value of all
5294 * vdevs operating on this channel will be set as channel tx power
5295 * limit, which is used to configure ratearray
5296 */
5297 WMI_VDEV_PARAM_TX_PWRLIMIT,
5298
5299 /* set the count of snr value for calculation in snr monitor */
5300 WMI_VDEV_PARAM_SNR_NUM_FOR_CAL,
5301
5302 /** Roaming offload */
5303 WMI_VDEV_PARAM_ROAM_FW_OFFLOAD,
5304
5305 /** Enable Leader request RX functionality for RMC */
5306 WMI_VDEV_PARAM_ENABLE_RMC,
5307
5308 /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
5309 * by himself. If the beacon lost time exceed this threshold, the peer is
5310 * thought to be gone. */
5311 WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS,
5312
5313 /** max rate in kpbs, transmit rate can't go beyond it */
5314 WMI_VDEV_PARAM_MAX_RATE,
5315
5316 /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift */
5317 WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE,
5318 /* set Tx failure count threshold for the vdev */
5319 WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR,
5320
5321 /* set ebt resync timeout value, in the unit of TU */
5322 WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT,
5323
5324 /* Enable Aggregation State Trigger Event */
5325 WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE,
5326
5327 /* This parameter indicates whether IBSS station can enter into power save
5328 * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
5329 * awake all the time and should never set PM=1 in its transmitted frames.
5330 * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
5331 * is non-zero. */
5332 WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED,
5333
5334 /* This parameter indicates if this station can enter into power collapse
5335 * for the remaining beacon interval after the ATIM window.
5336 * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
5337 * is set to true. */
5338 WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED,
5339
5340 /* This parameter indicates whether IBSS station exit power save mode and
5341 * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
5342 * whenever there is a TX/RX activity. */
5343 WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED,
5344
5345 /* If Awake on TX/RX activity is enabled, this parameter indicates
5346 * the data inactivity time in number of beacon intervals after which
5347 * IBSS station reenters power save by sending Null frame with PM=1. */
5348 WMI_VDEV_PARAM_INACTIVITY_CNT,
5349
5350 /* Inactivity time in msec after which TX Service Period (SP) is
5351 * terminated by sending a Qos Null frame with EOSP.
5352 * If value is 0, TX SP is terminated with the last buffered packet itself
5353 * instead of waiting for the inactivity timeout. */
5354 WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS,
5355
5356 /** DTIM policy */
5357 WMI_VDEV_PARAM_DTIM_POLICY,
5358
5359 /* When IBSS network is initialized, PS-supporting device
5360 * does not enter protocol sleep state during first
5361 * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
5362 WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS,
5363
5364 /* Enable/Disable 1 RX chain usage during the ATIM window */
5365 WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE,
5366 /**
5367 * RX Leak window is the time driver waits before shutting down
5368 * the radio or switching the channel and after receiving an ACK
5369 * for a data frame with PM bit set)
5370 */
5371 WMI_VDEV_PARAM_RX_LEAK_WINDOW,
5372
5373 /**
5374 * Averaging factor(16 bit value) is used in the calculations to
5375 * perform averaging of different link level statistics like average
5376 * beacon spread or average number of frames leaked
5377 */
5378 WMI_VDEV_PARAM_STATS_AVG_FACTOR,
5379 /*
5380 * disconnect threshold, once the consecutive error for specific peer
5381 * exceed this threhold, FW will send kickout event to host
5382 */
5383 WMI_VDEV_PARAM_DISCONNECT_TH,
5384 /*
5385 * The rate_code of RTS_CTS changed by host. Now FW can support
5386 * more non-HT rates rather than 1Mbps or 6Mbps */
5387 WMI_VDEV_PARAM_RTSCTS_RATE,
5388
5389 /** This parameter indicates whether using a long duration RTS-CTS
5390 * protection when a SAP goes off channel in MCC mode */
5391 WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE,
5392
5393 /*
5394 * This parameter indicates whether using a broadcast probe response
5395 * to increase the detectability of SAP in MCC mode
5396 */
5397 WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE,
Nirav Shah47062ff2015-11-05 11:21:08 +05305398
5399 /* This parameter indicates the power backoff in percentage
5400 * currently supports 100%, 50%, 25%, 12.5%, and minimum
5401 * Host passes 0, 1, 2, 3, 4 to Firmware
5402 * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
5403 * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
5404 */
5405 WMI_VDEV_PARAM_TXPOWER_SCALE,
5406
5407 /* TX power backoff in dB: tx power -= param value
5408 * Host passes values(DB) to Halphy, Halphy reduces the power table
5409 * by the values. Safety check will happen in Halphy.
5410 */
5411 WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB,
Govind Singh32cced32016-02-01 13:33:09 +05305412 /** Multicast to Unicast conversion setting */
5413 WMI_VDEV_PARAM_MCAST2UCAST_SET,
5414
5415 /** Total number of HW retries */
5416 WMI_VDEV_PARAM_RC_NUM_RETRIES,
5417
5418 /** Max tx percentage for cabq */
5419 WMI_VDEV_PARAM_CABQ_MAXDUR,
5420
5421 /** MFPTEST settings */
5422 WMI_VDEV_PARAM_MFPTEST_SET,
5423
5424 /** RTS Fixed rate setting */
5425 WMI_VDEV_PARAM_RTS_FIXED_RATE,
5426
5427 /** VHT SGI MASK */
5428 WMI_VDEV_PARAM_VHT_SGIMASK,
5429
5430 /** VHT80 Auto Rate MASK */
5431 WMI_VDEV_PARAM_VHT80_RATEMASK,
5432
5433 /** set Proxy STA features for this vap */
5434 WMI_VDEV_PARAM_PROXY_STA,
5435
5436 /** set virtual cell mode - enable/disable */
5437 WMI_VDEV_PARAM_VIRTUAL_CELL_MODE,
5438
5439 /** Set receive packet type */
5440 WMI_VDEV_PARAM_RX_DECAP_TYPE,
5441
5442 /** Set ratemask with specific Bandwidth and NSS */
5443 WMI_VDEV_PARAM_BW_NSS_RATEMASK,
5444
5445 /** Set SENSOR Support */
5446 WMI_VDEV_PARAM_SENSOR_AP,
5447
5448 /** Set beacon rate */
5449 WMI_VDEV_PARAM_BEACON_RATE,
5450
5451 /** Enable CTS to self for DTIM beacon */
5452 WMI_VDEV_PARAM_DTIM_ENABLE_CTS,
5453
5454 /** Disable station kickout at Vap level */
5455 WMI_VDEV_PARAM_STA_KICKOUT,
Nirav Shah47062ff2015-11-05 11:21:08 +05305456
Govind Singh869c9872016-02-22 18:36:34 +05305457 /* VDEV capabilities */
5458 WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */
Sandeep Puligilla62f7ca02016-03-24 15:48:33 -07005459 /*
5460 * Increment TSF in micro seconds to avoid beacon collision on mesh VAP
5461 * The host must ensure that either no other vdevs share the TSF with
5462 * this vdev, or else that it is acceptable to apply this TSF adjustment
5463 * to all vdevs sharing the TSF
5464 */
5465 WMI_VDEV_PARAM_TSF_INCREMENT,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005466} WMI_VDEV_PARAM;
5467
Govind Singh869c9872016-02-22 18:36:34 +05305468/* vdev capabilities bit mask */
5469#define WMI_VDEV_BEACON_SUPPORT 0x1
5470#define WMI_VDEV_WDS_LRN_ENABLED 0x2
5471#define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT)
5472#define WMI_VDEV_IS_WDS_LRN_ENABLED(param) ((param) & WMI_VDEV_WDS_LRN_ENABLED)
5473
5474/* TXBF capabilities masks */
5475#define WMI_TXBF_CONF_SU_TX_BFEE_S 0
5476#define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1
5477#define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << \
5478 WMI_TXBF_CONF_SU_TX_BFEE_S)
5479#define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_SU_TX_BFEE)
5480#define WMI_TXBF_CONF_SU_TX_BFEE_SET(x, z) WMI_F_RMW(x, z,\
5481 WMI_TXBF_CONF_SU_TX_BFEE)
5482
5483#define WMI_TXBF_CONF_MU_TX_BFEE_S 1
5484#define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1
5485#define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << \
5486 WMI_TXBF_CONF_MU_TX_BFEE_S)
5487#define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_MU_TX_BFEE)
5488#define WMI_TXBF_CONF_MU_TX_BFEE_SET(x, z) WMI_F_RMW(x, z, \
5489 WMI_TXBF_CONF_MU_TX_BFEE)
5490
5491#define WMI_TXBF_CONF_SU_TX_BFER_S 2
5492#define WMI_TXBF_CONF_SU_TX_BFER_M 0x1
5493#define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << \
5494 WMI_TXBF_CONF_SU_TX_BFER_S)
5495#define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_SU_TX_BFER)
5496#define WMI_TXBF_CONF_SU_TX_BFER_SET(x, z) WMI_F_RMW(x, z, \
5497 WMI_TXBF_CONF_SU_TX_BFER)
5498
5499#define WMI_TXBF_CONF_MU_TX_BFER_S 3
5500#define WMI_TXBF_CONF_MU_TX_BFER_M 0x1
5501#define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << \
5502 WMI_TXBF_CONF_MU_TX_BFER_S)
5503#define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_MU_TX_BFER)
5504#define WMI_TXBF_CONF_MU_TX_BFER_SET(x, z) WMI_F_RMW(x, z, \
5505 WMI_TXBF_CONF_MU_TX_BFER)
5506
5507#define WMI_TXBF_CONF_STS_CAP_S 4
5508#define WMI_TXBF_CONF_STS_CAP_M 0x7
5509#define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << \
5510 WMI_TXBF_CONF_STS_CAP_S)
5511#define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_STS_CAP);
5512#define WMI_TXBF_CONF_STS_CAP_SET(x, z) WMI_F_RMW(x, z, \
5513 WMI_TXBF_CONF_STS_CAP)
5514
5515#define WMI_TXBF_CONF_IMPLICIT_BF_S 7
5516#define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1
5517#define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << \
5518 WMI_TXBF_CONF_IMPLICIT_BF_S)
5519#define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_IMPLICIT_BF)
5520#define WMI_TXBF_CONF_IMPLICIT_BF_SET(x, z) WMI_F_RMW(x, z, \
5521 WMI_TXBF_CONF_IMPLICIT_BF)
5522
5523#define WMI_TXBF_CONF_BF_SND_DIM_S 8
5524#define WMI_TXBF_CONF_BF_SND_DIM_M 0x7
5525#define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << \
5526 WMI_TXBF_CONF_BF_SND_DIM_S)
5527#define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_BF_SND_DIM)
5528#define WMI_TXBF_CONF_BF_SND_DIM_SET(x, z) WMI_F_RMW(x, z, \
5529 WMI_TXBF_CONF_BF_SND_DIM)
5530
5531/* TXBF capabilities */
5532typedef struct {
5533 A_UINT32 txbf_cap;
5534} wmi_vdev_txbf_cap;
5535
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005536/* Length of ATIM Window in TU */
5537#define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
5538
5539enum wmi_pkt_type {
5540 WMI_PKT_TYPE_RAW = 0,
5541 WMI_PKT_TYPE_NATIVE_WIFI = 1,
5542 WMI_PKT_TYPE_ETHERNET = 2,
5543};
5544
Govind Singh869c9872016-02-22 18:36:34 +05305545/*******************************************************************
5546 * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap
5547 * Do not use it!
5548 *******************************************************************/
5549
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005550typedef struct {
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05305551 A_UINT8 sutxbfee:1, mutxbfee:1, sutxbfer:1, mutxbfer:1,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005552#if defined(AR900B)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05305553 txb_sts_cap:3, implicit_bf:1;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005554#else
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05305555 reserved:4;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005556#endif
5557} wmi_vdev_txbf_en;
5558
5559/** Upto 8 bits are available for Roaming module to be sent along with
5560 WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
5561/* Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
5562#define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1
5563/* Enable Roaming module in FW to do scan based on Final BMISS */
5564#define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2
5565
5566/** slot time long */
5567#define WMI_VDEV_SLOT_TIME_LONG 0x1
5568/** slot time short */
5569#define WMI_VDEV_SLOT_TIME_SHORT 0x2
5570/** preablbe long */
5571#define WMI_VDEV_PREAMBLE_LONG 0x1
5572/** preablbe short */
5573#define WMI_VDEV_PREAMBLE_SHORT 0x2
5574
5575/** the definition of different START/RESTART Event response */
5576typedef enum {
5577 /* Event respose of START CMD */
5578 WMI_VDEV_START_RESP_EVENT = 0,
5579 /* Event respose of RESTART CMD */
5580 WMI_VDEV_RESTART_RESP_EVENT,
5581} WMI_START_EVENT_PARAM;
5582
5583typedef struct {
5584 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */
5585 /** unique id identifying the VDEV, generated by the caller */
5586 A_UINT32 vdev_id;
5587 /** requestor id that requested the VDEV start request */
5588 A_UINT32 requestor_id;
5589 /* Respose of Event type START/RESTART */
5590 WMI_START_EVENT_PARAM resp_type;
5591 /** status of the response */
5592 A_UINT32 status;
5593 /** Vdev chain mask */
5594 A_UINT32 chain_mask;
5595 /** Vdev mimo power save mode */
5596 A_UINT32 smps_mode;
Govind Singh869c9872016-02-22 18:36:34 +05305597 union {
5598 /* OBSOLETE - will be removed once all refs are gone */
5599 A_UINT32 mac_id;
5600 /** pdev_id for identifying the MAC
5601 * See macros starting with WMI_PDEV_ID_ for values.
5602 */
5603 A_UINT32 pdev_id;
5604 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005605 /** Configured Transmit Streams **/
5606 A_UINT32 cfgd_tx_streams;
5607 /** Configured Receive Streams **/
5608 A_UINT32 cfgd_rx_streams;
5609} wmi_vdev_start_response_event_fixed_param;
5610
5611typedef struct {
5612 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */
5613 /** unique id identifying the VDEV, generated by the caller */
5614 A_UINT32 vdev_id;
5615} wmi_vdev_stopped_event_fixed_param;
5616
Manikandan Mohan429a0782015-12-23 14:35:54 -08005617typedef struct {
5618 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */
5619 /** unique id identifying the VDEV, generated by the caller */
5620 A_UINT32 vdev_id;
5621} wmi_vdev_delete_resp_event_fixed_param;
5622
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005623/** common structure used for simple events (stopped, resume_req, standby response) */
5624typedef struct {
5625 A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */
5626 /** unique id identifying the VDEV, generated by the caller */
5627 A_UINT32 vdev_id;
5628} wmi_vdev_simple_event_fixed_param;
5629
5630/** VDEV start response status codes */
5631#define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV succesfully started */
5632#define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */
5633#define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */
5634
5635/** Beacon processing related command and event structures */
5636typedef struct {
5637 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
5638 /** unique id identifying the VDEV, generated by the caller */
5639 A_UINT32 vdev_id;
5640 /** xmit rate */
5641 A_UINT32 tx_rate;
5642 /** xmit power */
5643 A_UINT32 txPower;
5644 /** beacon buffer length in bytes */
5645 A_UINT32 buf_len;
5646 /* This TLV is followed by array of bytes:
5647 * // beacon frame buffer
5648 * A_UINT8 bufp[];
5649 */
5650} wmi_bcn_tx_hdr;
5651
5652/* Beacon filter */
5653#define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
5654#define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
5655#define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
5656#define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
5657#define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
5658
5659typedef struct {
5660 /** Filter ID */
5661 A_UINT32 bcn_filter_id;
5662 /** Filter type - wmi_bcn_filter */
5663 A_UINT32 bcn_filter;
5664 /** Buffer len */
5665 A_UINT32 bcn_filter_len;
5666 /** Filter info (threshold, BSSID, RSSI) */
5667 A_UINT8 *bcn_filter_buf;
5668} wmi_bcn_filter_rx_cmd;
5669
5670/** Capabilities and IEs to be passed to firmware */
5671typedef struct {
5672 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
5673 /** Capabilities */
5674 A_UINT32 caps;
5675 /** ERP info */
5676 A_UINT32 erp;
5677 /** Advanced capabilities */
5678 /** HT capabilities */
5679 /** HT Info */
5680 /** ibss_dfs */
5681 /** wpa Info */
5682 /** rsn Info */
5683 /** rrm info */
5684 /** ath_ext */
5685 /** app IE */
5686} wmi_bcn_prb_info;
5687
5688typedef struct {
5689 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
5690 /** unique id identifying the VDEV, generated by the caller */
5691 A_UINT32 vdev_id;
5692 /** TIM IE offset from the beginning of the template. */
5693 A_UINT32 tim_ie_offset;
5694 /** beacon buffer length. data is in TLV data[] */
5695 A_UINT32 buf_len;
5696 /*
5697 * The TLVs follows:
5698 * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs
5699 * A_UINT8 data[]; //Variable length data
5700 */
5701} wmi_bcn_tmpl_cmd_fixed_param;
5702
5703typedef struct {
5704 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
5705 /** unique id identifying the VDEV, generated by the caller */
5706 A_UINT32 vdev_id;
5707 /** beacon buffer length. data is in TLV data[] */
5708 A_UINT32 buf_len;
5709 /*
5710 * The TLVs follows:
5711 * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs
5712 * A_UINT8 data[]; //Variable length data
5713 */
5714} wmi_prb_tmpl_cmd_fixed_param;
5715
5716typedef struct {
5717 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
5718 A_UINT32 tlv_header;
5719 /** unique id identifying the VDEV */
5720 A_UINT32 vdev_id;
5721 /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
5722 A_UINT32 tx_status;
5723} wmi_offload_bcn_tx_status_event_fixed_param;
5724
5725enum wmi_sta_ps_mode {
5726 /** enable power save for the given STA VDEV */
5727 WMI_STA_PS_MODE_DISABLED = 0,
5728 /** disable power save for a given STA VDEV */
5729 WMI_STA_PS_MODE_ENABLED = 1,
5730};
5731
5732typedef struct {
5733 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
5734 /** unique id identifying the VDEV, generated by the caller */
5735 A_UINT32 vdev_id;
5736
5737 /** Power save mode
5738 *
5739 * (see enum wmi_sta_ps_mode)
5740 */
5741 A_UINT32 sta_ps_mode;
5742} wmi_sta_powersave_mode_cmd_fixed_param;
5743
5744enum wmi_csa_offload_en {
5745 WMI_CSA_OFFLOAD_DISABLE = 0,
5746 WMI_CSA_OFFLOAD_ENABLE = 1,
5747};
5748
5749typedef struct {
5750 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */
5751 A_UINT32 vdev_id;
5752 A_UINT32 csa_offload_enable;
5753} wmi_csa_offload_enable_cmd_fixed_param;
5754
5755typedef struct {
5756 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */
5757 A_UINT32 vdev_id;
5758 /*
5759 * The TLVs follows:
5760 * wmi_channel chan;
5761 */
5762} wmi_csa_offload_chanswitch_cmd_fixed_param;
5763/**
5764 * This parameter controls the policy for retrieving frames from AP while the
5765 * STA is in sleep state.
5766 *
5767 * Only takes affect if the sta_ps_mode is enabled
5768 */
5769enum wmi_sta_ps_param_rx_wake_policy {
5770 /* Wake up when ever there is an RX activity on the VDEV. In this mode
5771 * the Power save SM(state machine) will come out of sleep by either
5772 * sending null frame (or) a data frame (with PS==0) in response to TIM
5773 * bit set in the received beacon frame from AP.
5774 */
5775 WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
5776
5777 /* Here the power save state machine will not wakeup in response to TIM
5778 * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
5779 * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
5780 * access categories are delivery-enabled, the station will send a UAPSD
5781 * trigger frame, otherwise it will send a PS-Poll.
5782 */
5783 WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
5784};
5785
5786/** Number of tx frames/beacon that cause the power save SM to wake up.
5787 *
5788 * Value 1 causes the SM to wake up for every TX. Value 0 has a special
5789 * meaning, It will cause the SM to never wake up. This is useful if you want
5790 * to keep the system to sleep all the time for some kind of test mode . host
5791 * can change this parameter any time. It will affect at the next tx frame.
5792 */
5793enum wmi_sta_ps_param_tx_wake_threshold {
5794 WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
5795 WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
5796
5797 /* Values greater than one indicate that many TX attempts per beacon
5798 * interval before the STA will wake up
5799 */
5800};
5801
5802/**
5803 * The maximum number of PS-Poll frames the FW will send in response to
5804 * traffic advertised in TIM before waking up (by sending a null frame with PS
5805 * = 0). Value 0 has a special meaning: there is no maximum count and the FW
5806 * will send as many PS-Poll as are necessary to retrieve buffered BU. This
5807 * parameter is used when the RX wake policy is
5808 * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
5809 * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
5810 */
5811enum wmi_sta_ps_param_pspoll_count {
5812 WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
5813 /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
5814 * will send before waking up.
5815 */
5816};
5817
5818/*
5819 * This will include the delivery and trigger enabled state for every AC.
5820 * This is the negotiated state with AP. The host MLME needs to set this based
5821 * on AP capability and the state Set in the association request by the
5822 * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
5823 */
5824#define WMI_UAPSD_AC_TYPE_DELI 0
5825#define WMI_UAPSD_AC_TYPE_TRIG 1
5826
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05305827#define WMI_UAPSD_AC_BIT_MASK(ac, type) \
5828 do { \
5829 (type == WMI_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) : \
5830 (1<<((ac<<1)+1)) \
5831 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005832
5833enum wmi_sta_ps_param_uapsd {
5834 WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
5835 WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
5836 WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
5837 WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
5838 WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
5839 WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
5840 WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
5841 WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
5842};
5843
5844enum wmi_sta_powersave_param {
5845 /**
5846 * Controls how frames are retrievd from AP while STA is sleeping
5847 *
5848 * (see enum wmi_sta_ps_param_rx_wake_policy)
5849 */
5850 WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
5851
5852 /**
5853 * The STA will go active after this many TX
5854 *
5855 * (see enum wmi_sta_ps_param_tx_wake_threshold)
5856 */
5857 WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
5858
5859 /**
5860 * Number of PS-Poll to send before STA wakes up
5861 *
5862 * (see enum wmi_sta_ps_param_pspoll_count)
5863 *
5864 */
5865 WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
5866
5867 /**
5868 * TX/RX inactivity time in msec before going to sleep.
5869 *
5870 * The power save SM will monitor tx/rx activity on the VDEV, if no
5871 * activity for the specified msec of the parameter the Power save SM will
5872 * go to sleep.
5873 */
5874 WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
5875
5876 /**
5877 * Set uapsd configuration.
5878 *
5879 * (see enum wmi_sta_ps_param_uapsd)
5880 */
5881 WMI_STA_PS_PARAM_UAPSD = 4,
5882 /**
5883 * Number of PS-Poll to send before STA wakes up in QPower Mode
5884 */
5885 WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
5886
5887 /**
5888 * Enable QPower
5889 */
5890 WMI_STA_PS_ENABLE_QPOWER = 6,
5891
5892 /**
5893 * Number of TX frames before the entering the Active state
5894 */
5895 WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
5896
5897 /**
5898 * QPower SPEC PSPOLL interval
5899 */
5900 WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
5901
5902 /**
5903 * Max SPEC PSPOLL to be sent when the PSPOLL response has
5904 * no-data bit set
5905 */
5906 WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
5907};
5908
5909typedef struct {
5910 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
5911 /** unique id identifying the VDEV, generated by the caller */
5912 A_UINT32 vdev_id;
5913 /** station power save parameter (see enum wmi_sta_powersave_param) */
5914 A_UINT32 param;
5915 A_UINT32 value;
5916} wmi_sta_powersave_param_cmd_fixed_param;
5917
5918/** No MIMO power save */
5919#define WMI_STA_MIMO_PS_MODE_DISABLE
5920/** mimo powersave mode static*/
5921#define WMI_STA_MIMO_PS_MODE_STATIC
5922/** mimo powersave mode dynamic */
5923#define WMI_STA_MIMO_PS_MODE_DYNAMI
5924
5925typedef struct {
5926 /** unique id identifying the VDEV, generated by the caller */
5927 A_UINT32 vdev_id;
5928 /** mimo powersave mode as defined above */
5929 A_UINT32 mimo_pwrsave_mode;
5930} wmi_sta_mimo_ps_mode_cmd;
5931
5932/** U-APSD configuration of peer station from (re)assoc request and TSPECs */
5933enum wmi_ap_ps_param_uapsd {
5934 WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
5935 WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
5936 WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
5937 WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
5938 WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
5939 WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
5940 WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
5941 WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
5942};
5943
5944/** U-APSD maximum service period of peer station */
5945enum wmi_ap_ps_peer_param_max_sp {
5946 WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
5947 WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
5948 WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
5949 WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
5950
5951 /* keep last! */
5952 MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
5953};
5954
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05305955/** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */
5956enum wmi_ap_ps_param_sifs_resp_frmtype {
5957 WMI_SIFS_RESP_PSPOLL = (1 << 0),
5958 WMI_SIFS_RESP_UAPSD = (1 << 1),
5959 WMI_SIFS_RESP_QBST_EXP = (1 << 2),
5960 WMI_SIFS_RESP_QBST_DATA = (1 << 3),
5961 WMI_SIFS_RESP_QBST_BAR = (1 << 4),
5962};
5963
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005964/**
5965 * AP power save parameter
5966 * Set a power save specific parameter for a peer station
5967 */
5968enum wmi_ap_ps_peer_param {
5969 /** Set uapsd configuration for a given peer.
5970 *
5971 * This will include the delivery and trigger enabled state for every AC.
5972 * The host MLME needs to set this based on AP capability and stations
5973 * request Set in the association request received from the station.
5974 *
5975 * Lower 8 bits of the value specify the UAPSD configuration.
5976 *
5977 * (see enum wmi_ap_ps_param_uapsd)
5978 * The default value is 0.
5979 */
5980 WMI_AP_PS_PEER_PARAM_UAPSD = 0,
5981
5982 /**
5983 * Set the service period for a UAPSD capable station
5984 *
5985 * The service period from wme ie in the (re)assoc request frame.
5986 *
5987 * (see enum wmi_ap_ps_peer_param_max_sp)
5988 */
5989 WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
5990
5991 /** Time in seconds for aging out buffered frames for STA in power save */
5992 WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05305993 /**
5994 * Specify frame types that are considered SIFS RESP trigger frame
5995 * (see enum wmi_ap_ps_param_sifs_resp_frmtype)
5996 */
Govind Singh32cced32016-02-01 13:33:09 +05305997 WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
5998
5999 /*
6000 * Specifies the trigger state of TID.
6001 * Valid only for UAPSD frame type
6002 */
6003 WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
6004
6005 /** Specifies the WNM sleep state of a STA */
6006 WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006007};
6008
6009typedef struct {
6010 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
6011 /** unique id identifying the VDEV, generated by the caller */
6012 A_UINT32 vdev_id;
6013 /** peer MAC address */
6014 wmi_mac_addr peer_macaddr;
6015 /** AP powersave param (see enum wmi_ap_ps_peer_param) */
6016 A_UINT32 param;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05306017 /** AP powersave param value (see defines) */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006018 A_UINT32 value;
6019} wmi_ap_ps_peer_cmd_fixed_param;
6020
6021/** Configure peer station 11v U-APSD coexistance
6022 *
6023 * Two parameters from uaspd coexistence ie info (as specified in 11v) are
6024 * sent down to FW along with this command.
6025 *
6026 * The semantics of these fields are described in the following text extracted
6027 * from 802.11v.
6028 *
6029 * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the
6030 * U-APSD Coexistence element, the AP should not transmit frames to the
6031 * non-AP STA outside of the U-APSD Coexistence Service Period, which
6032 * begins when the AP receives the U-APSD trigger frame and ends after
6033 * the transmission period specified by the result of the following
6034 * calculation:
6035 *
6036 * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
6037 *
6038 * Where T is the time the U-APSD trigger frame was received at the AP
6039 * Interval is the UAPSD Coexistence element Duration/Interval field
6040 * value (see 7.3.2.91) or upon the successful transmission of a frame
6041 * with EOSP bit set to 1, whichever is earlier.
6042 *
6043 *
6044 * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
6045 * Coexistence element, the AP should not transmit frames to the non-AP
6046 * STA outside of the U-APSD Coexistence Service Period, which begins
6047 * when the AP receives a U-APSD trigger frame and ends after the
6048 * transmission period specified by the result of the following
6049 * calculation: End of transmission period = T + Duration
6050 */
6051typedef struct {
6052 /** unique id identifying the VDEV, generated by the caller */
6053 A_UINT32 vdev_id;
6054 /** peer MAC address */
6055 wmi_mac_addr peer_macaddr;
6056 /** Enable U-APSD coexistence support for this peer
6057 *
6058 * 0 -> disabled (default)
6059 * 1 -> enabled
6060 */
6061 A_UINT32 enabled;
6062 /** Duration/Interval as defined by 11v U-ASPD coexistance */
6063 A_UINT32 duration_interval;
6064 /** Upper 32 bits of 64-bit TSF offset */
6065 A_UINT32 tsf_offset_high;
6066 /** Lower 32 bits of 64-bit TSF offset */
6067 A_UINT32 tsf_offset_low;
6068} wmi_ap_powersave_peer_uapsd_coex_cmd;
6069
6070typedef enum {
6071 WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001,
6072 WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002,
6073 WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
6074
6075 WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
6076} wmi_ap_ps_egap_flag_type;
6077
6078/**
6079 * configure ehanced green ap parameters
6080 */
6081typedef struct {
6082 /*
6083 * TLV tag and len; tag equals
6084 * wmi_ap_powersave_egap_param_cmd_fixed_param
6085 */
6086 A_UINT32 tlv_header;
6087 /** Enable enhanced green ap
6088 * 0 -> disabled
6089 * 1 -> enabled
6090 */
6091 A_UINT32 enable;
6092 /** The param indicates a duration that all STAs connected
6093 * to S-AP have no traffic.
6094 */
6095 A_UINT32 inactivity_time; /* in unit of milliseconds */
6096 /** The param indicates a duration that all STAs connected
6097 * to S-AP have no traffic, after all STAs have entered powersave.
6098 */
6099 A_UINT32 wait_time; /* in unit of milliseconds */
6100 /** The param is used to turn on/off some functions within E-GAP.
6101 */
6102 A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
6103} wmi_ap_ps_egap_param_cmd_fixed_param;
6104
6105typedef enum {
6106 WMI_AP_PS_EGAP_STATUS_IDLE = 1,
6107 WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
6108 WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3,
6109
6110 WMI_AP_PS_EGAP_STATUS_MAX = 15
6111} wmi_ap_ps_egap_status_type;
6112
6113/**
6114 * send ehanced green ap status to host
6115 */
6116typedef struct {
Manikandan Mohan0c7ae402015-12-03 17:56:41 -08006117 /* TLV tag and len; tag equals
6118 * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list
6119 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006120 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05306121 union {
6122 /* OBSOLETE - will be removed once all refs are gone */
6123 A_UINT32 mac_id;
6124 /** pdev_id for identifying the MAC
6125 * See macros starting with WMI_PDEV_ID_ for values.
6126 */
6127 A_UINT32 pdev_id;
6128 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006129 /** The param indicates the current tx chainmask with the mac id. */
6130 A_UINT32 tx_chainmask;
6131 /** The param indicates the current rx chainmask with the mac id. */
6132 A_UINT32 rx_chainmask;
6133} wmi_ap_ps_egap_info_chainmask_list;
6134
6135typedef struct {
6136 /*
6137 * TLV tag and len; tag equals
6138 * wmi_ap_powersave_egap_param_cmd_fixed_param
6139 */
6140 A_UINT32 tlv_header;
6141 /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
6142 A_UINT32 status;
6143 /* This TLV is followed by
6144 * wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
6145 */
6146} wmi_ap_ps_egap_info_event_fixed_param;
6147
6148
6149/* 128 clients = 4 words */
6150/* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
6151#define WMI_TIM_BITMAP_ARRAY_SIZE 4
6152
6153typedef struct {
6154 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
6155 /** TIM bitmap len (in bytes)*/
6156 A_UINT32 tim_len;
6157 /** TIM Partial Virtual Bitmap */
6158 A_UINT32 tim_mcast;
6159 A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
6160 A_UINT32 tim_changed;
6161 A_UINT32 tim_num_ps_pending;
6162} wmi_tim_info;
6163
6164typedef struct {
6165 /** Flag to enable quiet period IE support */
6166 A_UINT32 is_enabled;
6167 /** Quiet start */
6168 A_UINT32 tbttcount;
6169 /** Beacon intervals between quiets*/
6170 A_UINT32 period;
6171 /** TUs of each quiet*/
6172 A_UINT32 duration;
6173 /** TUs of from TBTT of quiet start*/
6174 A_UINT32 offset;
6175} wmi_quiet_info;
6176
6177/* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
6178#define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
6179
6180typedef struct {
6181 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
6182 /** Bit 0: Flag to indicate an update in NOA schedule
6183 * Bits 7-1: Reserved
6184 * Bits 15-8: Index (identifies the instance of NOA sub element)
6185 * Bit 16: Opp PS state of the AP
6186 * Bits 23-17: Ctwindow in TUs
6187 * Bits 31-24: Number of NOA descriptors
6188 */
6189 A_UINT32 noa_attributes;
6190 wmi_p2p_noa_descriptor
6191 noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
6192} wmi_p2p_noa_info;
6193
6194#define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
6195#define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
6196
6197#define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \
6198 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
6199
6200#define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \
6201 WMI_F_RMW((hdr)->noa_attributes, 0x1, \
6202 WMI_UNIFIED_NOA_ATTR_MODIFIED);
6203
6204#define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00
6205#define WMI_UNIFIED_NOA_ATTR_INDEX_S 8
6206
6207#define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \
6208 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
6209
6210#define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \
6211 WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
6212 WMI_UNIFIED_NOA_ATTR_INDEX);
6213
6214#define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000
6215#define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16
6216
6217#define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \
6218 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
6219
6220#define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \
6221 WMI_F_RMW((hdr)->noa_attributes, 0x1, \
6222 WMI_UNIFIED_NOA_ATTR_OPP_PS);
6223
6224#define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000
6225#define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17
6226
6227#define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \
6228 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
6229
6230#define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \
6231 WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \
6232 WMI_UNIFIED_NOA_ATTR_CTWIN);
6233
6234#define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000
6235#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24
6236
6237#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \
6238 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
6239
6240#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \
6241 WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
6242 WMI_UNIFIED_NOA_ATTR_NUM_DESC);
6243
6244typedef struct {
6245 /** TIM info */
6246 wmi_tim_info tim_info;
6247 /** P2P NOA info */
6248 wmi_p2p_noa_info p2p_noa_info;
6249 /* TBD: More info elements to be added later */
6250} wmi_bcn_info;
6251
6252typedef struct {
6253 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
6254 /** bitmap identifying the VDEVs, generated by the caller */
6255 A_UINT32 vdev_map;
6256 /* This TLV is followed by tim_info and p2p_noa_info for each vdev in vdevmap :
6257 * wmi_tim_info tim_info[];
6258 * wmi_p2p_noa_info p2p_noa_info[];
6259 *
6260 */
6261} wmi_host_swba_event_fixed_param;
6262
6263#define WMI_MAX_AP_VDEV 16
6264
6265typedef struct {
6266 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
6267 /** bimtap of VDEVs that has tbtt offset updated */
6268 A_UINT32 vdev_map;
6269 /* The TLVs for tbttoffset_list will follow this TLV.
6270 * tbtt offset list in the order of the LSB to MSB in the vdev_map bitmap
6271 * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
6272 */
6273} wmi_tbtt_offset_event_fixed_param;
6274
6275/* Peer Specific commands and events */
6276
6277typedef struct {
6278 A_UINT32 percentage; /* in unit of 12.5% */
6279 A_UINT32 min_delta; /* in unit of Mbps */
6280} rate_delta_t;
6281
6282#define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01
6283#define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02
6284#define MAX_NUM_OF_RATE_THRESH 4
6285
6286typedef struct {
6287 /*
6288 * PEER_RATE_REPORT_COND_FLAG_DELTA,
6289 * PEER_RATE_REPORT_COND_FLAG_THRESHOLD
6290 * Any of these two conditions or both of
6291 * them can be set.
6292 */
6293 A_UINT32 val_cond_flags;
6294 rate_delta_t rate_delta;
6295 /*
6296 * In unit of Mbps. There are at most 4 thresholds
6297 * If the threshold count is less than 4, set zero to
6298 * the one following the last threshold
6299 */
6300 A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH];
6301} report_cond_per_phy_t;
6302
6303
6304enum peer_rate_report_cond_phy_type {
6305 PEER_RATE_REPORT_COND_11B = 0,
6306 PEER_RATE_REPORT_COND_11A_G,
6307 PEER_RATE_REPORT_COND_11N,
6308 PEER_RATE_REPORT_COND_11AC,
6309 PEER_RATE_REPORT_COND_MAX_NUM
6310};
6311
6312typedef struct {
6313 /*
6314 * TLV tag and len; tag equals
6315 * WMITLV_TAG_STRUC_wmi_peer_rate_report_condtion_fixed_param
6316 */
6317 A_UINT32 tlv_header;
6318 /* 1= enable, 0=disable */
6319 A_UINT32 enable_rate_report;
6320 A_UINT32 report_backoff_time; /* in unit of msecond */
6321 A_UINT32 report_timer_period; /* in unit of msecond */
6322 /*
6323 *In the following field, the array index means the phy type,
6324 * please see enum peer_rate_report_cond_phy_type for detail
6325 */
6326 report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
6327} wmi_peer_set_rate_report_condition_fixed_param;
6328
6329/* Peer Type:
6330 * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
6331 * on address and vdev opmode. This is largely here to allow host to indicate that
6332 * peer is explicitly a TDLS peer
6333 */
6334enum wmi_peer_type {
6335 WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
6336 WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
6337 WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
6338 WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
Govind Singh941bd5e2016-02-04 17:15:25 +05306339 WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006340 WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306341 * is assigned up to 127 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006342 /* Reserved from 128 - 255 for
6343 * target internal use.*/
6344 WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
6345};
6346
6347typedef struct {
6348 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
6349 /** unique id identifying the VDEV, generated by the caller */
6350 A_UINT32 vdev_id;
6351 /** peer MAC address */
6352 wmi_mac_addr peer_macaddr;
6353 /** peer type: see enum values above */
6354 A_UINT32 peer_type;
6355} wmi_peer_create_cmd_fixed_param;
6356
6357typedef struct {
6358 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
6359 /** unique id identifying the VDEV, generated by the caller */
6360 A_UINT32 vdev_id;
6361 /** peer MAC address */
6362 wmi_mac_addr peer_macaddr;
6363} wmi_peer_delete_cmd_fixed_param;
6364
6365typedef struct {
6366 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
6367 /** unique id identifying the VDEV, generated by the caller */
6368 A_UINT32 vdev_id;
6369 /** peer MAC address */
6370 wmi_mac_addr peer_macaddr;
6371 /** tid bitmap identifying the tids to flush */
6372 A_UINT32 peer_tid_bitmap;
6373} wmi_peer_flush_tids_cmd_fixed_param;
6374
6375typedef struct {
6376 /** rate mode . 0: disable fixed rate (auto rate)
6377 * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
6378 * 2: ht20 11n rate specified as mcs index
6379 * 3: ht40 11n rate specified as mcs index
6380 */
6381 A_UINT32 rate_mode;
6382 /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
6383 * and series 3 is stored at byte 3 (MSB) */
6384 A_UINT32 rate_series;
6385 /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
6386 * and retry count for rate 3 is stored at byte 3 (MSB) */
6387 A_UINT32 rate_retries;
6388} wmi_fixed_rate;
6389
6390typedef struct {
6391 /** unique id identifying the VDEV, generated by the caller */
6392 A_UINT32 vdev_id;
6393 /** peer MAC address */
6394 wmi_mac_addr peer_macaddr;
6395 /** fixed rate */
6396 wmi_fixed_rate peer_fixed_rate;
6397} wmi_peer_fixed_rate_cmd;
6398
6399#define WMI_MGMT_TID 17
6400
6401typedef struct {
6402 A_UINT32 tlv_header;
6403 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
6404 /** unique id identifying the VDEV, generated by the caller */
6405 A_UINT32 vdev_id;
6406 /** peer MAC address */
6407 wmi_mac_addr peer_macaddr;
6408} wmi_addba_clear_resp_cmd_fixed_param;
6409
6410typedef struct {
6411 A_UINT32 tlv_header;
6412 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */
6413 /** unique id identifying the VDEV, generated by the caller */
6414 A_UINT32 vdev_id;
6415 /** peer MAC address */
6416 wmi_mac_addr peer_macaddr;
6417 /** Tid number */
6418 A_UINT32 tid;
6419 /** Buffer/Window size*/
6420 A_UINT32 buffersize;
6421} wmi_addba_send_cmd_fixed_param;
6422
6423typedef struct {
6424 A_UINT32 tlv_header;
6425 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
6426 /** unique id identifying the VDEV, generated by the caller */
6427 A_UINT32 vdev_id;
6428 /** peer MAC address */
6429 wmi_mac_addr peer_macaddr;
6430 /** Tid number */
6431 A_UINT32 tid;
6432 /** Is Initiator */
6433 A_UINT32 initiator;
6434 /** Reason code */
6435 A_UINT32 reasoncode;
6436} wmi_delba_send_cmd_fixed_param;
6437
6438typedef struct {
6439 A_UINT32 tlv_header;
6440 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
6441 /** unique id identifying the vdev, generated by the caller */
6442 A_UINT32 vdev_id;
6443 /** peer mac address */
6444 wmi_mac_addr peer_macaddr;
6445 /** Tid number */
6446 A_UINT32 tid;
6447 /** status code */
6448 A_UINT32 statuscode;
6449} wmi_addba_setresponse_cmd_fixed_param;
6450
6451typedef struct {
6452 A_UINT32 tlv_header;
6453 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
6454 /** unique id identifying the vdev, generated by the caller */
6455 A_UINT32 vdev_id;
6456 /** peer mac address */
6457 wmi_mac_addr peer_macaddr;
6458 /** Tid number */
6459 A_UINT32 tid;
6460} wmi_send_singleamsdu_cmd_fixed_param;
6461
6462/* Type of Station DTIM Power Save method */
6463enum {
6464 /* For NORMAL DTIM, the parameter is the number of beacon intervals and
6465 * also the same value as the listen interval. For this method, the
6466 * station will wake up based on the listen interval. If this
6467 * listen interval is not equal to DTIM, then the station may
6468 * miss certain DTIM beacons. If this value is 1, then the
6469 * station will wake up for every beacon.
6470 */
6471 WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
6472 /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
6473 * When this value is 1, then the station will wake at every DTIM beacon.
6474 * If this value is >1, then the station will skip certain DTIM beacons.
6475 * This value is the multiple of DTIM intervals that the station will
6476 * wake up to receive the DTIM beacons.
6477 */
6478 WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
6479};
6480
6481/* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
6482typedef struct {
6483 A_UINT32 tlv_header;
6484 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
6485 /** unique id identifying the VDEV, generated by the caller */
6486 A_UINT32 vdev_id;
6487 /* Station DTIM Power Save method as defined above */
6488 A_UINT32 dtim_pwrsave_method;
6489 /* DTIM PS value. Contents depends on the method */
6490 A_UINT32 value;
6491 /* Modulated DTIM value */
6492 A_UINT32 MaxLIModulatedDTIM;
6493} wmi_sta_dtim_ps_method_cmd_fixed_param;
6494
6495/*
6496 * For Station UAPSD Auto Trigger feature, the Firmware monitors the
6497 * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
6498 * If there is no uplink/download for the specified service interval (field service_interval),
6499 * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
6500 * specified in the UP (field user_priority).
6501 * Firmware also monitors the responses for these QOS-NULL triggers.
6502 * If the peer does not have any delivery frames, it will respond with
6503 * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
6504 * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
6505 * are unused and should be set to 0.
6506 * When service_interval is 0, then the firmware will not send any trigger frames. This is for
6507 * certain host-based implementations that don't want this firmware offload.
6508 * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
6509 * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
6510 * and rest of the AC default to 300 ms.
6511 *
6512 * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
6513 * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
6514 * the more advanced monitoring method.
6515 * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
6516 * suspend interval (field suspend_interval), firmware will change its auto trigger interval
6517 * to delay interval (field delay_interval). This way, when there is no traffic, the station
6518 * will save more power by waking up less and sending less trigger frames.
6519 * The (service_interval < suspend_interval) and (service_interval < delay_interval).
6520 * If this variable auto trigger is not required, then the suspend_interval and delay_interval
6521 * should be 0.
6522 */
6523typedef struct {
6524 A_UINT32 tlv_header;
6525 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
6526 /** WMM Access category from 0 to 3 */
6527 A_UINT32 wmm_ac;
6528 /** User priority to use in trigger frames. It is the TID
6529 * value. This field needs to be specified and may not be
6530 * equivalent to AC since some implementation may use the TSPEC
6531 * to enable UAPSD and negotiate a particular user priority. */
6532 A_UINT32 user_priority;
6533 /** service interval in ms */
6534 A_UINT32 service_interval;
6535 /** Suspend interval in ms */
6536 A_UINT32 suspend_interval;
6537 /** delay interval in ms */
6538 A_UINT32 delay_interval;
6539} wmi_sta_uapsd_auto_trig_param;
6540
6541typedef struct {
6542 A_UINT32 tlv_header;
6543 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
6544 /** unique id identifying the VDEV, generated by the caller */
6545 A_UINT32 vdev_id;
6546 /** peer mac address */
6547 wmi_mac_addr peer_macaddr;
6548 /** Number of AC to specify */
6549 A_UINT32 num_ac;
6550 /*
6551 * Following this struc is the TLV:
6552 * wmi_sta_uapsd_auto_trig_param ac_param[]; //Variable number of AC parameters (defined by field num_ac)
6553 */
6554
6555} wmi_sta_uapsd_auto_trig_cmd_fixed_param;
6556
6557/** mimo powersave state */
6558#define WMI_PEER_MIMO_PS_STATE 0x1
6559/** enable/disable AMPDU . initial value (enabled) */
6560#define WMI_PEER_AMPDU 0x2
6561/** authorize/unauthorize peer. initial value is unauthorized (0) */
6562#define WMI_PEER_AUTHORIZE 0x3
6563/** peer channel bandwidth */
6564#define WMI_PEER_CHWIDTH 0x4
6565/** peer NSS */
6566#define WMI_PEER_NSS 0x5
6567/** USE 4 ADDR */
6568#define WMI_PEER_USE_4ADDR 0x6
6569/* set group membership status */
6570#define WMI_PEER_MEMBERSHIP 0x7
6571#define WMI_PEER_USERPOS 0x8
6572/*
6573 * A critical high-level protocol is being used with this peer. Target
6574 * should take appropriate measures (if possible) to ensure more
6575 * reliable link with minimal latency. This *may* include modifying the
6576 * station power save policy, enabling more RX chains, increased
6577 * priority of channel scheduling, etc.
6578 *
6579 * NOTE: This parameter should only be considered a hint as specific
6580 * behavior will depend on many factors including current network load
6581 * and vdev/peer configuration.
6582 *
6583 * For STA VDEV this peer corresponds to the AP's BSS peer.
6584 * For AP VDEV this peer corresponds to the remote peer STA.
6585 */
6586#define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9
6587/* set Tx failure count threshold for the peer - Currently unused */
6588#define WMI_PEER_TX_FAIL_CNT_THR 0xA
6589/* Enable H/W retry and Enable H/W Send CTS2S before Data */
6590#define WMI_PEER_SET_HW_RETRY_CTS2S 0xB
6591
6592/* Set peer advertised IBSS atim window length */
6593#define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC
6594
6595/** peer phy mode */
6596#define WMI_PEER_PHYMODE 0xD
Govind Singh32cced32016-02-01 13:33:09 +05306597/** Use FIXED Pwr */
6598#define WMI_PEER_USE_FIXED_PWR 0xE
6599/** Set peer fixed rate */
6600#define WMI_PEER_PARAM_FIXED_RATE 0xF
6601/** Whitelist peer TIDs */
6602#define WMI_PEER_SET_MU_WHITELIST 0x10
Govind Singh67b83b82016-02-01 19:26:59 +05306603/** Set peer max tx rate (MCS) in adaptive rate ctrl */
6604#define WMI_PEER_SET_MAX_TX_RATE 0x11
6605/** Set peer minimal tx rate (MCS) in adaptive rate ctrl */
6606#define WMI_PEER_SET_MIN_TX_RATE 0x12
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006607
6608/** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
6609#define WMI_PEER_MIMO_PS_NONE 0x0
6610#define WMI_PEER_MIMO_PS_STATIC 0x1
6611#define WMI_PEER_MIMO_PS_DYNAMIC 0x2
6612
6613typedef struct {
6614 A_UINT32 tlv_header;
6615 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */
6616 /** unique id identifying the VDEV, generated by the caller */
6617 A_UINT32 vdev_id;
6618 /** peer MAC address */
6619 wmi_mac_addr peer_macaddr;
6620 /** parameter id */
6621 A_UINT32 param_id;
6622 /** parametr value */
6623 A_UINT32 param_value;
6624} wmi_peer_set_param_cmd_fixed_param;
6625
Govind Singh67b83b82016-02-01 19:26:59 +05306626typedef union {
6627 /*
6628 * The A_UINT16 "mode" and "tx_rate" fields can only be directly used
6629 * by the target or a little-endian host.
6630 * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET
6631 * macros on the A_UINT32 "value" field.
6632 */
6633 struct {
6634 /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */
6635 A_UINT16 mode;
6636 A_UINT16 tx_rate; /* see per-mode specs below */
6637 };
6638 A_UINT32 value; /* for use by big-endian host */
6639} wmi_peer_max_min_tx_rate;
6640
6641/*
6642 * Any access to the mode/tx_rate in an big endian system should use
6643 * the below Macros on the wmi_peer_max_min_tx_rate.value field.
6644 */
6645#define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16)
6646#define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode)
6647
6648#define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16)
6649#define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode)
6650
6651/*
6652 * CCK max/min tx Rate description
6653 * tx_rate = 0: 1Mbps,
6654 * tx_rate = 1: 2Mbps
6655 * tx_rate = 2: 5.5Mbps
6656 * tx_rate = 3: 11Mbps
6657 * tx_rate = else : invalid.
6658 */
6659#define WMI_MAX_CCK_TX_RATE 0x03
6660
6661/*
6662 * OFDM max/min tx Rate description
6663 * tx_rate = 0: 6Mbps,
6664 * tx_rate = 1: 9Mbps
6665 * tx_rate = 2: 12Mbps
6666 * tx_rate = 3: 18Mbps
6667 * tx_rate = 4: 24Mbps
6668 * tx_rate = 5: 32Mbps
6669 * tx_rate = 6: 48Mbps
6670 * tx_rate = 7: 54Mbps
6671 * tx_rate = else : invalid.
6672 */
6673#define WMI_MAX_OFDM_TX_RATE 0x07
6674
6675/*
6676 * HT max/min tx rate description
6677 * tx_rate = 0~7 : MCS Rate 0~7
6678 * tx_rate=else : invalid.
6679 */
6680#define WMI_MAX_HT_TX_MCS 0x07
6681
6682/*
6683 * VHT max/min tx rate description
6684 * tx_rate = 0~9 : MCS Rate 0~9
6685 * tx_rate=else : invalid.
6686 */
6687#define WMI_MAX_VHT_TX_MCS 0x09
6688
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006689#define MAX_SUPPORTED_RATES 128
6690
6691typedef struct {
6692 /** total number of rates */
6693 A_UINT32 num_rates;
6694 /**
6695 * rates (each 8bit value) packed into a 32 bit word.
6696 * the rates are filled from least significant byte to most
6697 * significant byte.
6698 */
6699 A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
6700} wmi_rate_set;
6701
6702/* NOTE: It would bea good idea to represent the Tx MCS
6703 * info in one word and Rx in another word. This is split
6704 * into multiple words for convenience
6705 */
6706typedef struct {
6707 A_UINT32 tlv_header;
6708 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
6709 A_UINT32 rx_max_rate; /* Max Rx data rate */
6710 A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
6711 A_UINT32 tx_max_rate; /* Max Tx data rate */
6712 A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
Govind Singh32cced32016-02-01 13:33:09 +05306713 A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006714} wmi_vht_rate_set;
6715
6716/*
6717 * IMPORTANT: Make sure the bit definitions here are consistent
6718 * with the ni_flags definitions in wlan_peer.h
6719 */
6720#define WMI_PEER_AUTH 0x00000001 /* Authorized for data */
6721#define WMI_PEER_QOS 0x00000002 /* QoS enabled */
6722#define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */
6723#define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */
6724#define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */
6725#define WMI_PEER_HT 0x00001000 /* HT enabled */
6726#define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */
6727#define WMI_PEER_STBC 0x00008000 /* STBC Enabled */
6728#define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */
6729#define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */
6730#define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */
6731#define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */
6732#define WMI_PEER_VHT 0x02000000 /* VHT Enabled */
6733#define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */
6734#define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */
6735/** CAUTION TODO: Place holder for WLAN_PEER_F_PS_PRESEND_REQUIRED = 0x10000000. Need to be clean up */
6736#define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */
6737#define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */
6738#define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */
6739
6740/**
6741 * Peer rate capabilities.
6742 *
6743 * This is of interest to the ratecontrol
6744 * module which resides in the firmware. The bit definitions are
6745 * consistent with that defined in if_athrate.c.
6746 *
6747 * @todo
6748 * Move this to a common header file later so there is no need to
6749 * duplicate the definitions or maintain consistency.
6750 */
6751#define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */
6752#define WMI_RC_CW40_FLAG 0x02 /* CW 40 */
6753#define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */
6754#define WMI_RC_HT_FLAG 0x08 /* HT */
6755#define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
6756#define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */
6757#define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */
6758#define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
6759#define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
6760#define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
6761#define WMI_RC_TS_FLAG 0x200 /* Three stream flag */
6762#define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
6763
6764typedef struct {
6765 A_UINT32 tlv_header;
6766 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
6767 /** peer MAC address */
6768 wmi_mac_addr peer_macaddr;
6769 /** VDEV id */
6770 A_UINT32 vdev_id;
6771 /** assoc = 1 reassoc = 0 */
6772 A_UINT32 peer_new_assoc;
6773 /** peer associd (16 bits) */
6774 A_UINT32 peer_associd;
6775 /** peer station flags: see definition above */
6776 A_UINT32 peer_flags;
6777 /** negotiated capabilities (lower 16 bits)*/
6778 A_UINT32 peer_caps;
6779 /** Listen interval */
6780 A_UINT32 peer_listen_intval;
6781 /** HT capabilties of the peer */
6782 A_UINT32 peer_ht_caps;
6783 /** maximum rx A-MPDU length */
6784 A_UINT32 peer_max_mpdu;
6785 /** mpdu density of the peer in usec(0 to 16) */
6786 A_UINT32 peer_mpdu_density;
6787 /** peer rate capabilties see flags above */
6788 A_UINT32 peer_rate_caps;
6789 /** num spatial streams */
6790 A_UINT32 peer_nss;
6791 /** VHT capabilties of the peer */
6792 A_UINT32 peer_vht_caps;
6793 /** phy mode */
6794 A_UINT32 peer_phymode;
6795 /** HT Operation Element of the peer. Five bytes packed in 2
6796 * INT32 array and filled from lsb to msb.
6797 * Note that the size of array peer_ht_info[] cannotbe changed
6798 * without breaking WMI Compatibility. */
6799 A_UINT32 peer_ht_info[2];
6800 /** total number of negotiated legacy rate set. Also the sizeof
6801 * peer_legacy_rates[] */
6802 A_UINT32 num_peer_legacy_rates;
6803 /** total number of negotiated ht rate set. Also the sizeof
6804 * peer_ht_rates[] */
6805 A_UINT32 num_peer_ht_rates;
Anurag Chouhan08f66c62016-04-18 17:14:51 +05306806 /*
6807 * Bitmap providing customized mapping of bandwidths to max Rx NSS
Govind Singh32cced32016-02-01 13:33:09 +05306808 * for this peer.
6809 * This is required since 802.11 standard currently facilitates peer to
6810 * be able to advertise only a single max Rx NSS value across all
6811 * bandwidths.
6812 * Some QCA chipsets might need to be able to advertise a different max
6813 * Rx NSS value for 160 MHz, than that for 80 MHz and lower.
6814 *
6815 * bit[2:0] : Represents value of Rx NSS for VHT 160 MHz
6816 * bit[30:3]: Reserved
6817 * bit[31] : MSB(0/1): 1 in case of valid data else all bits will be
6818 * set to 0 by host
6819 */
6820 A_UINT32 peer_bw_rxnss_override;
Govind Singhd24f5e42016-02-22 15:16:46 +05306821 /* 802.11ax capabilities */
6822 wmi_ppe_threshold peer_ppet;
6823 /* protocol-defined HE / 11ax capability flags */
6824 A_UINT32 peer_he_cap_info;
6825 A_UINT32 peer_he_ops; /* HE operation contains BSS color */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006826 /* Following this struc are the TLV's:
6827 * A_UINT8 peer_legacy_rates[];
6828 * A_UINT8 peer_ht_rates[];
6829 * wmi_vht_rate_set peer_vht_rates; //VHT capabilties of the peer
6830 */
6831} wmi_peer_assoc_complete_cmd_fixed_param;
6832
Govind Singh32cced32016-02-01 13:33:09 +05306833/* WDS Entry Flags */
6834#define WMI_WDS_FLAG_STATIC 0x1 /* Disable aging & learning */
6835
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006836typedef struct {
6837 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
6838 /** peer MAC address */
6839 wmi_mac_addr peer_macaddr;
6840 /** wds MAC addr */
6841 wmi_mac_addr wds_macaddr;
Govind Singh32cced32016-02-01 13:33:09 +05306842 /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */
6843 A_UINT32 flags;
Govind Singh869c9872016-02-22 18:36:34 +05306844 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006845} wmi_peer_add_wds_entry_cmd_fixed_param;
6846
6847typedef struct {
6848 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
6849 /** wds MAC addr */
6850 wmi_mac_addr wds_macaddr;
Govind Singh869c9872016-02-22 18:36:34 +05306851 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006852} wmi_peer_remove_wds_entry_cmd_fixed_param;
6853
6854typedef struct {
6855 /** peer MAC address */
6856 wmi_mac_addr peer_macaddr;
6857} wmi_peer_q_empty_callback_event;
6858
Govind Singhc7d51942016-02-01 12:09:31 +05306859/*
6860 * Command to update an already existing WDS entry. Different address setting
6861 * combinations are possible.
6862 *
6863 * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated.
6864 * Valid wds and null peer -> Associated WDS entry flags will be updated.
6865 * Null wds and Valid peer-> Flags will be updated for all WDS entries
6866 * behind the peer.
6867 * Null wds and peer -> Flags will be updated for all WDS entries.
6868 */
6869typedef struct {
6870 /*
6871 * TLV tag and len; tag equals
6872 * WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param
6873 */
6874 A_UINT32 tlv_header;
6875 /** peer MAC address */
6876 wmi_mac_addr peer_macaddr;
6877 /** wds MAC addr */
6878 wmi_mac_addr wds_macaddr;
6879 /* Flags associated with WDS entry */
6880 A_UINT32 flags;
Govind Singh869c9872016-02-22 18:36:34 +05306881 A_UINT32 vdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +05306882} wmi_peer_update_wds_entry_cmd_fixed_param;
6883
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006884/**
6885 * Channel info WMI event
6886 */
6887typedef struct {
6888 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
6889 /** Error code */
6890 A_UINT32 err_code;
6891 /** Channel freq */
6892 A_UINT32 freq;
6893 /** Read flags */
6894 A_UINT32 cmd_flags;
6895 /** Noise Floor value */
6896 A_UINT32 noise_floor;
6897 /** rx clear count */
6898 A_UINT32 rx_clear_count;
6899 /** cycle count */
6900 A_UINT32 cycle_count;
Govind Singh32cced32016-02-01 13:33:09 +05306901 /** channel tx power per range in 0.5dBm steps */
6902 A_UINT32 chan_tx_pwr_range;
6903 /** channel tx power per throughput */
6904 A_UINT32 chan_tx_pwr_tp;
6905 /** rx frame count (cumulative) */
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +05306906 A_UINT32 rx_frame_count;
6907 /** BSS rx cycle count */
6908 A_UINT32 my_bss_rx_cycle_count;
6909 /** b-mode data rx time (units are microseconds) */
6910 A_UINT32 rx_11b_mode_data_duration;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006911} wmi_chan_info_event_fixed_param;
6912
6913/**
6914 * Non wlan interference event
6915 */
6916typedef struct {
6917 A_UINT32 tlv_header;
6918 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_ath_dcs_cw_int */
6919 A_UINT32 channel; /* either number or freq in mhz */
Govind Singh869c9872016-02-22 18:36:34 +05306920} wlan_dcs_cw_int;
6921#define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006922
6923/**
6924 * wlan_dcs_im_tgt_stats
6925 *
6926 */
6927typedef struct _wlan_dcs_im_tgt_stats {
Govind Singh869c9872016-02-22 18:36:34 +05306928 /** TLV tag and len; tag equals
6929 * WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t
6930 */
6931 A_UINT32 tlv_header;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006932 /** current running TSF from the TSF-1 */
6933 A_UINT32 reg_tsf32;
6934
6935 /** Known last frame rssi, in case of multiple stations, if
6936 * and at different ranges, this would not gaurantee that
6937 * this is the least rssi.
6938 */
6939 A_UINT32 last_ack_rssi;
6940
6941 /** Sum of all the failed durations in the last one second interval.
6942 */
6943 A_UINT32 tx_waste_time;
6944 /** count how many times the hal_rxerr_phy is marked, in this
6945 * time period
6946 */
6947 A_UINT32 rx_time;
6948 A_UINT32 phyerr_cnt;
6949
6950 /**
6951 * WLAN IM stats from target to host
6952 *
6953 * Below statistics are sent from target to host periodically.
6954 * These are collected at target as long as target is running
6955 * and target chip is not in sleep.
6956 *
6957 */
6958
6959 /** listen time from ANI */
6960 A_INT32 listen_time;
6961
6962 /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
6963 A_UINT32 reg_tx_frame_cnt;
6964
6965 /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
6966 A_UINT32 reg_rx_frame_cnt;
6967
6968 /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
6969 A_UINT32 reg_rxclr_cnt;
6970
6971 /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
6972 A_UINT32 reg_cycle_cnt; /* delta cycle count */
6973
6974 /** extenstion channel rx clear count */
6975 A_UINT32 reg_rxclr_ext_cnt;
6976
6977 /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
6978 A_UINT32 reg_ofdm_phyerr_cnt;
6979
6980 /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
6981 A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +05306982 /** Channel noise floor (units are dBm) */
6983 A_INT32 chan_nf;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006984
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +05306985 /** BSS rx cycle count */
6986 A_UINT32 my_bss_rx_cycle_count;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006987} wlan_dcs_im_tgt_stats_t;
6988
6989/**
6990 * wmi_dcs_interference_event_t
6991 *
6992 * Right now this is event and stats together. Partly this is
6993 * because cw interference is handled in target now. This
6994 * can be done at host itself, if we can carry the NF alone
6995 * as a stats event. In future this would be done and this
6996 * event would carry only stats.
6997 */
6998typedef struct {
6999 A_UINT32 tlv_header;
7000 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
7001 /**
7002 * Type of the event present, either the cw interference event, or the wlan_im stats
7003 */
7004 A_UINT32 interference_type; /* type of interference, wlan or cw */
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05307005 /** pdev_id for identifying the MAC
7006 * See macros starting with WMI_PDEV_ID_ for values.
7007 */
7008 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007009 /*
7010 * Following this struct are these TLVs. Note that they are both array of structures
7011 * but can have at most one element. Which TLV is empty or has one element depends
7012 * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
Govind Singh869c9872016-02-22 18:36:34 +05307013 * elements (not arrays). union { wlan_dcs_cw_int cw_int;
7014 * wlan_dcs_im_tgt_stats_t wlan_stat; }
7015 * int_event;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007016 *
7017 * //cw_interference event
Govind Singh869c9872016-02-22 18:36:34 +05307018 * wlan_dcs_cw_int cw_int[]; this element
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007019 * // wlan im interfernce stats
7020 * wlan_dcs_im_tgt_stats_t wlan_stat[];
7021 */
7022} wmi_dcs_interference_event_fixed_param;
7023
7024enum wmi_peer_mcast_group_action {
7025 wmi_peer_mcast_group_action_add = 0,
7026 wmi_peer_mcast_group_action_del = 1
7027};
7028#define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1
7029#define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0
7030#define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
7031#define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
Govind Singh32cced32016-02-01 13:33:09 +05307032/* flag to exclude an ip while filtering.set to exclude */
7033#define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4
7034#define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2
7035/* flag to say ipv4/ipv6. Will be set for ipv6 */
7036#define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8
7037#define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3
7038/* delete all mcast table entries. */
7039#define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10
7040#define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4
7041
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007042/* multicast group membership commands */
7043/* TODO: Converting this will be tricky since it uses an union.
7044 Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
7045typedef struct {
7046 A_UINT32 tlv_header;
7047 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
7048 A_UINT32 flags;
7049 wmi_mac_addr ucast_mac_addr;
Govind Singh32cced32016-02-01 13:33:09 +05307050 /*
7051 * for ipv4, bytes (12-15) should contain ip address and
7052 * other lower bytes 0. ipv6 should have all bytes valid
7053 */
7054 A_UINT8 mcast_ip_addr[16]; /* in network byte order */
7055 /*
7056 * for ipv6, all 16 bytes has to be valid;
7057 * for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s
7058 */
7059 A_UINT8 mcast_ip_mask[16]; /* zero out lower bytes if ipv4 */
7060 /* number of address filters - irrespective of ipv4/ipv6 addresses */
7061 A_UINT32 num_filter_addr;
7062 /*
7063 * this array should contain the src IPs that are to be filtered
7064 * during find. The array should be packed. If there are 2 ipv4
7065 * addresses, there should be 8 bytes and rest all 0s
7066 */
7067 A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */
7068 A_UINT8 vdev_id; /* vdev of this mcast group */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007069} wmi_peer_mcast_group_cmd_fixed_param;
7070
7071/** Offload Scan and Roaming related commands */
7072/** The FW performs 2 different kinds of offload scans independent
7073 * of host. One is Roam scan which is primarily performed on a
7074 * station VDEV after association to look for a better AP that
7075 * the station VDEV can roam to. The second scan is connect scan
7076 * which is mainly performed when the station is not associated
7077 * and to look for a matching AP profile from a list of
7078 * configured profiles. */
7079
7080/**
7081 * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
7082 * the roam scan mode is one of the periodic, rssi change, both, none.
7083 * None : Disable Roam scan. No Roam scan at all.
7084 * Periodic : Scan periodically with a configurable period.
7085 * Rssi change : Scan when ever rssi to current AP changes by the threshold value
7086 * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
7087 * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount)
7088 *
7089 */
7090typedef struct {
7091 A_UINT32 tlv_header;
7092 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
7093 A_UINT32 roam_scan_mode;
7094 A_UINT32 vdev_id;
7095} wmi_roam_scan_mode_fixed_param;
7096
7097#define WMI_ROAM_SCAN_MODE_NONE 0x0
7098#define WMI_ROAM_SCAN_MODE_PERIODIC 0x1
7099#define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
7100#define WMI_ROAM_SCAN_MODE_BOTH 0x3
7101/* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
7102#define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
7103
7104typedef struct {
7105 A_UINT32 tlv_header;
7106 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
7107 A_UINT32 vdev_id;
7108 A_UINT32 command_arg;
7109} wmi_roam_scan_cmd_fixed_param;
7110
7111#define WMI_ROAM_SCAN_STOP_CMD 0x1
7112
7113/**
7114 * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan rssi thresold
7115 * scan rssi threshold is the rssi threshold below which the FW will start running Roam scans.
7116 * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
7117 */
7118typedef struct {
7119 A_UINT32 tlv_header;
7120 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
7121 /** unique id identifying the VDEV, generated by the caller */
7122 A_UINT32 vdev_id;
7123 /** roam scan rssi threshold */
7124 A_UINT32 roam_scan_rssi_thresh;
7125 /** When using Hw generated beacon RSSI interrupts */
7126 A_UINT32 roam_rssi_thresh_diff;
7127 /** 5G scan max count */
7128 A_UINT32 hirssi_scan_max_count;
7129 /** 5G scan rssi change threshold value */
7130 A_UINT32 hirssi_scan_delta;
7131 /** 5G scan upper bound */
7132 A_UINT32 hirssi_upper_bound;
7133 /* The TLVs will follow.
7134 * wmi_roam_scan_extended_threshold_param extended_param;
7135 * wmi_roam_earlystop_rssi_thres_param earlystop_param;
Govind Singhce8fd912016-01-21 10:24:19 +05307136 * wmi_roam_dense_thres_param dense_param;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007137 */
7138} wmi_roam_scan_rssi_threshold_fixed_param;
7139
7140#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0
7141#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
7142#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2
7143#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3
7144
7145typedef struct {
7146 /** TLV tag and len; tag equals
7147 *WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
7148 A_UINT32 tlv_header;
7149 A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
7150 A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
7151 A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
7152 A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
7153 A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
7154 A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
7155 A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
7156 A_UINT32 max_penalty_5g; /** maximum penality that can be applied to a 5GHz RSSI */
7157 /**
7158 * RSSI below which roam is kicked in by background scan
7159 * although rssi is still good
7160 */
7161 A_UINT32 good_rssi_threshold;
7162} wmi_roam_scan_extended_threshold_param;
7163
7164
7165/**
7166 * WMI_ROAM_SCAN_PERIOD: period for roam scan.
7167 * Applicable when the scan mode is Periodic or both.
7168 */
7169typedef struct {
7170 A_UINT32 tlv_header;
7171 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
7172 /** unique id identifying the VDEV, generated by the caller */
7173 A_UINT32 vdev_id;
7174 /** roam scan period value */
7175 A_UINT32 roam_scan_period;
7176 /** Aging for Roam scans */
7177 A_UINT32 roam_scan_age;
7178} wmi_roam_scan_period_fixed_param;
7179
7180/**
7181 * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : rssi delta to trigger the roam scan.
7182 * Rssi change threshold used when mode is Rssi change (or) Both.
7183 * The FW will run the roam scan when ever the rssi changes (up or down) by the value set by this parameter.
7184 * Note scan is triggered based on the rssi threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
7185 */
7186typedef struct {
7187 A_UINT32 tlv_header;
7188 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
7189 /** unique id identifying the VDEV, generated by the caller */
7190 A_UINT32 vdev_id;
7191 /** roam scan rssi change threshold value */
7192 A_UINT32 roam_scan_rssi_change_thresh;
7193 /** When using Hw generated beacon RSSI interrupts */
7194 A_UINT32 bcn_rssi_weight;
7195 /** Minimum delay between two 5G scans */
7196 A_UINT32 hirssi_delay_btw_scans;
7197} wmi_roam_scan_rssi_change_threshold_fixed_param;
7198
7199#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
7200#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
7201#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
7202/**
7203 * TLV for roaming channel list
7204 */
7205typedef struct {
7206 A_UINT32 tlv_header;
7207 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
7208 /** unique id identifying the VDEV, generated by the caller */
7209 A_UINT32 vdev_id;
7210 /** WMI_CHAN_LIST_TAG */
7211 A_UINT32 chan_list_type;
7212 /** # if channels to scan */
7213 A_UINT32 num_chan;
7214/**
7215 * TLV (tag length value ) parameters follow the wmi_roam_chan_list
7216 * structure. The TLV's are:
7217 * A_UINT32 channel_list[];
7218 **/
7219} wmi_roam_chan_list_fixed_param;
7220
7221/** Authentication modes */
7222enum {
7223 WMI_AUTH_NONE, /* no upper level auth */
7224 WMI_AUTH_OPEN, /* open */
7225 WMI_AUTH_SHARED, /* shared-key */
7226 WMI_AUTH_8021X, /* 802.1x */
7227 WMI_AUTH_AUTO, /* Auto */
7228 WMI_AUTH_WPA, /* WPA */
7229 WMI_AUTH_RSNA, /* WPA2/RSNA */
7230 WMI_AUTH_CCKM, /* CCK */
7231 WMI_AUTH_WAPI, /* WAPI */
7232 WMI_AUTH_AUTO_PSK,
7233 WMI_AUTH_WPA_PSK,
7234 WMI_AUTH_RSNA_PSK,
7235 WMI_AUTH_WAPI_PSK,
7236 WMI_AUTH_FT_RSNA, /* 11r FT */
7237 WMI_AUTH_FT_RSNA_PSK,
7238 WMI_AUTH_RSNA_PSK_SHA256,
7239 WMI_AUTH_RSNA_8021X_SHA256,
7240};
7241
7242typedef struct {
7243 /** authentication mode (defined above) */
7244 A_UINT32 rsn_authmode;
7245 /** unicast cipher set */
7246 A_UINT32 rsn_ucastcipherset;
7247 /** mcast/group cipher set */
7248 A_UINT32 rsn_mcastcipherset;
7249 /** mcast/group management frames cipher set */
7250 A_UINT32 rsn_mcastmgmtcipherset;
7251} wmi_rsn_params;
7252
7253/** looking for a wps enabled AP */
7254#define WMI_AP_PROFILE_FLAG_WPS 0x1
7255/** looking for a secure AP */
7256#define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
7257/** looking for a PMF enabled AP */
7258#define WMI_AP_PROFILE_FLAG_PMF 0x4
7259
7260/** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
7261 * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
7262 * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
7263 * and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
7264 */
7265
7266typedef struct {
7267 A_UINT32 tlv_header;
7268 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
7269 /** flags as defined above */
7270 A_UINT32 flags;
7271 /**
7272 * rssi thresold value: the value of the the candidate AP should
7273 * higher by this threshold than the rssi of the currrently associated AP.
7274 */
7275 A_UINT32 rssi_threshold;
7276 /**
7277 * ssid vlaue to be matched.
7278 */
7279 wmi_ssid ssid;
7280
7281 /**
7282 * security params to be matched.
7283 */
7284 /** authentication mode (defined above) */
7285 A_UINT32 rsn_authmode;
7286 /** unicast cipher set */
7287 A_UINT32 rsn_ucastcipherset;
7288 /** mcast/group cipher set */
7289 A_UINT32 rsn_mcastcipherset;
7290 /** mcast/group management frames cipher set */
7291 A_UINT32 rsn_mcastmgmtcipherset;
7292} wmi_ap_profile;
7293
7294/** Support early stop roaming scanning when finding a strong candidate AP
7295 * A 'strong' candidate is
7296 * 1) Is eligible candidate
7297 * (all conditions are met in existing candidate selection).
7298 * 2) Its rssi is better than earlystop threshold.
7299 * Earlystop threshold will be relaxed as each channel is scanned.
7300 */
7301typedef struct {
7302 A_UINT32 tlv_header;
7303 /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
7304 A_UINT32 roam_earlystop_thres_min;
7305 /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
7306 A_UINT32 roam_earlystop_thres_max;
7307} wmi_roam_earlystop_rssi_thres_param;
7308
Govind Singhce8fd912016-01-21 10:24:19 +05307309typedef struct {
7310 /* TLV tag and len;
7311 * tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param
7312 */
7313 A_UINT32 tlv_header;
7314 /* rssi threshold offset under trffic and dense env */
7315 A_UINT32 roam_dense_rssi_thres_offset;
7316 /* minimum number of APs to determine dense env */
7317 A_UINT32 roam_dense_min_aps;
7318 /* initial dense status detected by host
7319 * at the time of initial connection */
7320 A_UINT32 roam_dense_status;
7321 /* traffic threshold to enable aggressive roaming in dense env;
7322 * units are percent of medium occupancy, 0 - 100
7323 */
7324 A_UINT32 roam_dense_traffic_thres;
7325} wmi_roam_dense_thres_param;
7326
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007327/** Beacon filter wmi command info */
7328
7329#define BCN_FLT_MAX_SUPPORTED_IES 256
7330#define BCN_FLT_MAX_ELEMS_IE_LIST BCN_FLT_MAX_SUPPORTED_IES/32
7331
7332typedef struct bss_bcn_stats {
7333 A_UINT32 vdev_id;
7334 A_UINT32 bss_bcnsdropped;
7335 A_UINT32 bss_bcnsdelivered;
7336} wmi_bss_bcn_stats_t;
7337
7338typedef struct bcn_filter_stats {
7339 A_UINT32 bcns_dropped;
7340 A_UINT32 bcns_delivered;
7341 A_UINT32 activefilters;
7342 wmi_bss_bcn_stats_t bss_stats;
7343} wmi_bcnfilter_stats_t;
7344
7345typedef struct wmi_add_bcn_filter_cmd {
7346 A_UINT32 tlv_header;
7347 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
7348 A_UINT32 vdev_id;
7349 /*
7350 * Following this structure is the TLV:
7351 * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
7352 */
7353} wmi_add_bcn_filter_cmd_fixed_param;
7354
7355typedef struct wmi_rmv_bcn_filter_cmd {
7356 A_UINT32 tlv_header;
7357 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
7358 A_UINT32 vdev_id;
7359} wmi_rmv_bcn_filter_cmd_fixed_param;
7360
7361#define WMI_BCN_SEND_DTIM_ZERO 1
7362#define WMI_BCN_SEND_DTIM_BITCTL_SET 2
7363typedef struct wmi_bcn_send_from_host {
7364 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */
7365 A_UINT32 vdev_id;
7366 A_UINT32 data_len;
Krishna Kumaar Natarajan7dde8c72016-03-25 15:11:49 -07007367 union {
7368 A_UINT32 frag_ptr; /* Physical address of the frame */
7369 A_UINT32 frag_ptr_lo; /* LSB of physical address of the frame */
7370 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007371 A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
7372 A_UINT32 dtim_flag; /* to control CABQ traffic */
Govind Singh32cced32016-02-01 13:33:09 +05307373 A_UINT32 bcn_antenna; /* Antenna for beacon transmission */
Krishna Kumaar Natarajan7dde8c72016-03-25 15:11:49 -07007374 A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007375} wmi_bcn_send_from_host_cmd_fixed_param;
7376
7377/* cmd to support bcn snd for all vaps at once */
7378typedef struct wmi_pdev_send_bcn {
7379 A_UINT32 num_vdevs;
7380 wmi_bcn_send_from_host_cmd_fixed_param bcn_cmd[1];
7381} wmi_pdev_send_bcn_cmd_t;
7382
7383/*
7384 * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming.
7385 */
7386typedef struct {
7387 A_UINT32 tlv_header;
7388 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
7389 /** id of AP criteria */
7390 A_UINT32 id;
7391
7392 /** unique id identifying the VDEV, generated by the caller */
7393 A_UINT32 vdev_id;
7394
7395 /*
7396 * Following this structure is the TLV:
7397 * wmi_ap_profile ap_profile; //AP profile info
7398 */
7399} wmi_roam_ap_profile_fixed_param;
7400
7401/**
7402 * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
7403 */
7404typedef struct {
7405 /** id of AP criteria */
7406 A_UINT32 id;
7407
7408 /** unique id identifying the VDEV, generated by the caller */
7409 A_UINT32 vdev_id;
7410
7411 /** AP profile info */
7412 wmi_ap_profile ap_profile;
7413
7414} wmi_ofl_scan_add_ap_profile;
7415
7416/**
7417 * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
7418 */
7419typedef struct {
7420 /** id of AP criteria */
7421 A_UINT32 id;
7422 /** unique id identifying the VDEV, generated by the caller */
7423 A_UINT32 vdev_id;
7424} wmi_ofl_scan_remove_ap_profile;
7425
7426/**
7427 * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
7428 * 0 will disable ofload scan and a very low value will perform a continous
7429 * scan.
7430 */
7431typedef struct {
7432 /** offload scan period value, used for scans used when not connected */
7433 A_UINT32 ofl_scan_period;
7434} wmi_ofl_scan_period;
7435
7436/* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
7437#define ROAM_OFFLOAD_PMK_BYTES (32)
7438#define ROAM_OFFLOAD_PSK_MSK_BYTES (32)
7439#define ROAM_OFFLOAD_KRK_BYTES (16)
7440#define ROAM_OFFLOAD_BTK_BYTES (32)
7441#define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
7442#define ROAM_OFFLOAD_NUM_MCS_SET (16)
7443
7444/* This TLV will be filled only in case roam offload
7445 * for wpa2-psk/okc/ese/11r is enabled */
7446typedef struct {
7447 A_UINT32 tlv_header;
7448 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
7449 A_UINT32 rssi_cat_gap; /* gap for every category bucket */
7450 A_UINT32 prefer_5g; /* prefer select 5G candidate */
7451 A_UINT32 select_5g_margin;
7452 A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */
7453 A_UINT32 capability;
7454 A_UINT32 ht_caps_info;
7455 A_UINT32 ampdu_param;
7456 A_UINT32 ht_ext_cap;
7457 A_UINT32 ht_txbf;
7458 A_UINT32 asel_cap;
7459 A_UINT32 qos_enabled;
7460 A_UINT32 qos_caps;
7461 A_UINT32 wmm_caps;
7462 A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET >> 2]; /* since this 4 byte aligned,
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307463 * we don't declare it as
7464 * tlv array */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007465} wmi_roam_offload_tlv_param;
7466
7467/* flags for 11i offload */
7468#define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */
7469/* from bit 1 to bit 31 are reserved */
7470
7471#define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
7472 (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307473} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007474
7475#define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
7476 (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307477} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007478
7479#define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \
7480 ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
7481
7482/* This TLV will be filled only in case of wpa-psk/wpa2-psk */
7483typedef struct {
7484 A_UINT32 tlv_header;
7485 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
7486 A_UINT32 flags;
7487 /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
7488 A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES >> 2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
7489 A_UINT32 pmk_len;
7490 /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
7491} wmi_roam_11i_offload_tlv_param;
7492
7493/* This TLV will be filled only in case of 11R*/
7494typedef struct {
7495 A_UINT32 tlv_header;
7496 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
7497 A_UINT32 mdie_present;
7498 A_UINT32 mdid;
7499 A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN >> 2];
7500 A_UINT32 r0kh_id_len;
7501 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 */
7502 A_UINT32 psk_msk_len;
7503 /**length of psk_msk*/
7504} wmi_roam_11r_offload_tlv_param;
7505
7506/* This TLV will be filled only in case of ESE */
7507typedef struct {
7508 A_UINT32 tlv_header;
7509 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
7510 A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES >> 2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
7511 A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES >> 2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
7512} wmi_roam_ese_offload_tlv_param;
7513
7514/** WMI_ROAM_EVENT: roam event triggering the host roam logic.
7515 * generated when ever a better AP is found in the recent roam scan (or)
7516 * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
7517 * from the current AP.
7518 */
7519typedef struct {
7520 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */
7521 /** unique id identifying the VDEV, generated by the caller */
7522 A_UINT32 vdev_id;
7523 /** reason for roam event */
7524 A_UINT32 reason;
7525 /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI*/
7526 A_UINT32 rssi;
Krishna Kumaar Natarajan79a2a082016-03-25 15:07:07 -07007527 /** roam notification */
7528 A_UINT32 notif;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007529
7530} wmi_roam_event_fixed_param;
7531
Nirav Shah439e6262015-11-05 10:53:18 +05307532/* roam_reason: bits 0-3 */
Krishna Kumaar Natarajan79a2a082016-03-25 15:07:07 -07007533
7534/** invalid reason. Do not interpret reason field */
7535#define WMI_ROAM_REASON_INVALID 0x0
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007536#define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
7537#define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */
7538#define WMI_ROAM_REASON_DEAUTH 0x2 /** deauth/disassoc received */
7539#define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */
7540#define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307541 SSID and Security profile in
7542 WMI_ROAM_AP_PROFILE, found during scan
7543 triggered upon FINAL_BMISS **/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007544#define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */
Govind Singhd0c80a32016-02-01 17:57:48 +05307545
7546/*
7547 * WMI_ROAM_REASON_INVOKE_ROAM_FAIL:
7548 * Result code of WMI_ROAM_INVOKE_CMDID.
7549 * Any roaming failure before reassociation will be indicated to host
7550 * with this reason.
7551 * Any roaming failure after reassociation will be indicated to host with
7552 * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not.
7553 */
7554#define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6
Nirav Shah439e6262015-11-05 10:53:18 +05307555/* reserved up through 0xF */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007556
Nirav Shah439e6262015-11-05 10:53:18 +05307557/* subnet status: bits 4-5 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007558typedef enum {
7559 WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
7560 WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
7561 WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
7562} wmi_roam_subnet_change_status;
7563
Nirav Shah439e6262015-11-05 10:53:18 +05307564#define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30
7565#define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4
7566
7567#define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
7568 do { \
7569 (roam_reason) |= \
7570 (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
7571 WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
7572 } while (0)
7573
7574#define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
7575 (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
7576 WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
7577
Krishna Kumaar Natarajan79a2a082016-03-25 15:07:07 -07007578/* roaming notification */
7579/** invalid notification. Do not interpret notif field */
7580#define WMI_ROAM_NOTIF_INVALID 0x0
7581/** indicate that roaming is started. sent only in non WOW state */
7582#define WMI_ROAM_NOTIF_ROAM_START 0x1
7583/** indicate that roaming is aborted. sent only in non WOW state */
7584#define WMI_ROAM_NOTIF_ROAM_ABORT 0x2
7585
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007586/**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
7587 * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations
7588 */
7589typedef struct {
7590 A_UINT32 tlv_header;
7591 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
7592 A_UINT32 vdev_id;
7593 /**unique id identifying the VDEV, generated by the caller*/
7594 A_UINT32 num_ric_request;
7595 /**number of ric request ie send to firmware.(max value is 2 now)*/
7596 A_UINT32 is_add_ric;
7597 /**support add ric or delete ric*/
7598} wmi_ric_request_fixed_param;
7599
7600/**tspec element: refer to 8.4.2.32 of 802.11 2012 spec
7601 * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
7602 */
7603typedef struct {
7604 A_UINT32 tlv_header;
7605 A_UINT32 ts_info; /** bits value of TS Info field.*/
7606 A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/
7607 A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/
7608 A_UINT32 min_service_interval; /**The Minimum Service Interval field*/
7609 A_UINT32 max_service_interval; /**The Maximum Service Interval field*/
7610 A_UINT32 inactivity_interval; /**The Inactivity Interval field*/
7611 A_UINT32 suspension_interval; /**The Suspension Interval field*/
7612 A_UINT32 svc_start_time; /**The Service Start Time field*/
7613 A_UINT32 min_data_rate; /**The Minimum Data Rate field*/
7614 A_UINT32 mean_data_rate; /**The Mean Data Rate field*/
7615 A_UINT32 peak_data_rate; /**The Peak Data Rate field*/
7616 A_UINT32 max_burst_size; /**The Burst Size field*/
7617 A_UINT32 delay_bound; /**The Delay Bound field*/
7618 A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/
7619 A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
7620 A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/
7621} wmi_ric_tspec;
7622
7623/* flags for roam_invoke_cmd */
7624/* add this channel into roam cache channel list after this command is finished */
7625#define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0
Govind Singhd0c80a32016-02-01 17:57:48 +05307626/* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */
7627#define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE 1
7628/* from bit 2 to bit 31 are reserved */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007629
7630#define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
7631 (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307632 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007633
7634#define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
7635 (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307636 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007637
7638#define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307639 ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007640
7641
7642#define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */
7643#define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */
7644#define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */
7645
7646#define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */
7647#define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */
7648
7649/** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
7650 *
7651 * if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
7652 * if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
7653 *
7654 * This command can be used to add specific channel into roam cached channel list by following
7655 * <roam_scan_ch_mode> = 0
7656 * <roam_ap_sel_mode> = 0
7657 * <roam_delay> = 0
7658 * <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
7659 * <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
7660 * <channel_no> = channel list to be added
7661 */
7662typedef struct {
7663 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
7664 A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
7665 A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
7666 A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
7667 A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
7668 A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
7669 A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
7670 A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */
7671 /**
7672 * TLV (tag length value ) parameters follows roam_invoke_req
7673 * The TLV's are:
7674 * A_UINT32 channel_list[];
7675 * wmi_mac_addr bssid_list[];
7676 */
7677} wmi_roam_invoke_cmd_fixed_param;
7678
7679/* Definition for op_bitmap */
7680enum {
7681 ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1,
7682 ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2,
7683 ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
7684};
7685
7686typedef struct {
7687 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
7688 A_UINT32 tlv_header;
7689 /** Unique id identifying the VDEV on which roaming filter is adopted */
7690 A_UINT32 vdev_id;
7691 A_UINT32 flags; /** flags for filter */
7692 /** 32 bit bitmap to be set on.
7693 * bit0 = first param,
7694 * bit 1 = second param...etc. Can be or'ed
7695 */
7696 A_UINT32 op_bitmap;
7697 /* number of blacklist in the TLV variable bssid_black_list */
7698 A_UINT32 num_bssid_black_list;
7699 /* number of whitelist in the TLV variable ssid_white_list */
7700 A_UINT32 num_ssid_white_list;
7701 /* only for lfr 3.0. number of preferred list & factor in the TLV */
7702 A_UINT32 num_bssid_preferred_list;
7703 /**
7704 * TLV (tag length value ) parameters follows roam_filter_list_cmd
7705 * The TLV's are:
7706 * wmi_mac_addr bssid_black_list[];
7707 * wmi_ssid ssid_white_list[];
7708 * wmi_mac_addr bssid_preferred_list[];
7709 * A_UINT32 bssid_preferred_factor[];
7710 */
7711} wmi_roam_filter_fixed_param;
7712
7713typedef struct {
7714 A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
7715} WMI_IPV4_ADDR;
7716
7717typedef struct _WMI_IPV6_ADDR {
7718 A_UINT8 address[16]; /* IPV6 in Network Byte Order */
7719} WMI_IPV6_ADDR;
7720
7721/* flags for subnet change detection */
7722#define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
7723#define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
7724/* bit 2 to bit 31 are reserved */
7725
7726/* set IPv4 enabled/disabled flag and get the flag */
7727#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
7728 (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
7729} while (0)
7730
7731#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
7732 (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
7733} while (0)
7734
7735#define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
7736 ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
7737
7738/* set IPv6 enabled flag, disabled and get the flag */
7739#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
7740 (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
7741} while (0)
7742
7743#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
7744 (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
7745} while (0)
7746
7747#define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
7748 ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
7749
7750/**
7751 * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
7752 * to FW. FW uses these parameters for subnet change detection.
7753 */
7754typedef struct {
7755 /*
7756 * TLV tag and len; tag equals
7757 * WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param
7758 */
7759 A_UINT32 tlv_header;
7760 /** unique id identifying the VDEV, generated by the caller */
7761 A_UINT32 vdev_id;
7762 /** IPv4/IPv6 enabled/disabled */
7763 /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/
7764 DISABLED */
7765 A_UINT32 flag;
7766 /** Gateway MAC address */
7767 wmi_mac_addr inet_gw_mac_addr;
7768 /** IP addresses */
7769 WMI_IPV4_ADDR inet_gw_ip_v4_addr;
7770 WMI_IPV6_ADDR inet_gw_ip_v6_addr;
7771 /** Number of software retries for ARP/Neighbor solicitation request */
7772 A_UINT32 max_retries;
7773 /** timeout in milliseconds for each ARP request*/
7774 A_UINT32 timeout;
7775 /** number of skipped aps **/
7776 A_UINT32 num_skip_subnet_change_detection_bssid_list;
7777/**
7778 * TLV (tag length value ) parameters follows roam_subnet_change_config_cmd
7779 * structure. The TLV's are:
7780 * wmi_mac_addr skip_subnet_change_detection_bssid_list [];
7781 **/
7782} wmi_roam_subnet_change_config_fixed_param;
7783
7784/** WMI_PROFILE_MATCH_EVENT: offload scan
7785 * generated when ever atleast one of the matching profiles is found
7786 * in recent NLO scan. no data is carried with the event.
7787 */
7788
7789/** P2P specific commands */
7790
7791/**
7792 * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
7793 * FW to generate P2P IE tobe carried in probe response frames.
7794 * FW will respond to probe requests while in listen state.
7795 */
7796typedef struct {
7797 /* number of secondary device types,supported */
7798 A_UINT32 num_secondary_dev_types;
7799 /**
7800 * followed by 8 bytes of primary device id and
7801 * num_secondary_dev_types * 8 bytes of secondary device
7802 * id.
7803 */
7804} wmi_p2p_dev_set_device_info;
7805
7806/** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
7807 * state. if enabled, an active STA/AP will respond to P2P probe requests on
7808 * the operating channel of the VDEV.
7809 */
7810
7811typedef struct {
7812 /* 1:enable disoverability, 0:disable discoverability */
7813 A_UINT32 enable_discoverability;
7814} wmi_p2p_set_discoverability;
7815
7816/** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
7817 * beacons generated by FW. used in FW beacon mode.
7818 * the FW will add this IE to beacon in addition to the beacon
7819 * template set by WMI_BCN_TMPL_CMDID command.
7820 */
7821typedef struct {
7822 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */
7823 /** unique id identifying the VDEV, generated by the caller */
7824 A_UINT32 vdev_id;
7825 /* ie length */
7826 A_UINT32 ie_buf_len;
7827 /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
7828 * A_UINT8 ie_data[]; // length in byte given by field num_data.
7829 */
7830
7831} wmi_p2p_go_set_beacon_ie_fixed_param;
7832
7833/** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
7834 * probe response generated by FW. used in FW beacon mode.
7835 * the FW will add this IE to probe response in addition to the probe response
7836 * template set by WMI_PRB_TMPL_CMDID command.
7837 */
7838typedef struct {
7839 /** unique id identifying the VDEV, generated by the caller */
7840 A_UINT32 vdev_id;
7841 /* ie length */
7842 A_UINT32 ie_buf_len;
7843 /*followed by byte stream of ie data of length ie_buf_len */
7844} wmi_p2p_go_set_probe_resp_ie;
7845
7846/** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
7847 * be used by the FW to parse the P2P NoA attribute in beacons, probe resposes
7848 * and action frames received by the P2P Client.
7849 */
7850typedef struct {
7851 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
7852 /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */
7853 A_UINT32 p2p_ie_oui_type;
7854 /** OS specific NoA Attribute ID */
7855 A_UINT32 p2p_noa_attribute;
7856} wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
7857
7858/*----P2P disc offload definition ----*/
7859
7860typedef struct {
7861 A_UINT32 pattern_type;
7862 /**
7863 * TLV (tag length value ) paramerters follow the pattern structure.
7864 * TLV can contain bssid list, ssid list and
7865 * ie. the TLV tags are defined above;
7866 */
7867} wmi_p2p_disc_offload_pattern_cmd;
7868
7869typedef struct {
7870 /* unique id identifying the VDEV, generated by the caller */
7871 A_UINT32 vdev_id;
7872 /* mgmt type of the ie */
7873 A_UINT32 mgmt_type;
7874 /* ie length */
7875 A_UINT32 ie_buf_len;
7876 /*followed by byte stream of ie data of length ie_buf_len */
7877} wmi_p2p_disc_offload_appie_cmd;
7878
7879typedef struct {
7880 /* enable/disable p2p find offload */
7881 A_UINT32 enable;
7882 /* unique id identifying the VDEV, generated by the caller */
7883 A_UINT32 vdev_id;
7884 /* p2p find type */
7885 A_UINT32 disc_type;
7886 /* p2p find perodic */
7887 A_UINT32 perodic;
7888 /* p2p find listen channel */
7889 A_UINT32 listen_channel;
7890 /* p2p find full channel number */
7891 A_UINT32 num_scan_chans;
7892 /**
7893 * TLV (tag length value ) paramerters follow the pattern structure.
7894 * TLV contain channel list
7895 */
7896} wmi_p2p_disc_offload_config_cmd;
7897
7898/*----P2P OppPS definition ----*/
7899typedef struct {
7900 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */
7901 A_UINT32 tlv_header;
7902 /* unique id identifying the VDEV, generated by the caller */
7903 A_UINT32 vdev_id;
7904 /* OppPS attributes */
7905 /** Bit 0: Indicate enable/disable of OppPS
7906 * Bits 7-1: Ctwindow in TUs
7907 * Bits 31-8: Reserved
7908 */
7909 A_UINT32 oppps_attr;
7910} wmi_p2p_set_oppps_cmd_fixed_param;
7911
7912#define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1
7913#define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0
7914
7915#define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \
7916 WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
7917
7918#define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \
7919 WMI_F_RMW((hdr)->oppps_attr, 0x1, \
7920 WMI_UNIFIED_OPPPS_ATTR_ENALBED);
7921
7922#define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe
7923#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1
7924
7925#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \
7926 WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
7927
7928#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \
7929 WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \
7930 WMI_UNIFIED_OPPPS_ATTR_CTWIN);
7931
7932typedef struct {
7933 A_UINT32 time32; /* upper 32 bits of time stamp */
7934 A_UINT32 time0; /* lower 32 bits of time stamp */
7935} A_TIME64;
7936
7937typedef enum wmi_peer_sta_kickout_reason {
7938 WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */
7939 WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
7940 WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
7941 WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
7942 WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */
7943 WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
7944} PEER_KICKOUT_REASON;
7945
7946typedef struct {
7947 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */
7948 /** peer mac address */
7949 wmi_mac_addr peer_macaddr;
7950 /** Reason code, defined as above */
7951 A_UINT32 reason;
7952 /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
7953 A_UINT32 rssi;
7954} wmi_peer_sta_kickout_event_fixed_param;
7955
7956#define WMI_WLAN_PROFILE_MAX_HIST 3
7957#define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
7958
7959typedef struct _wmi_wlan_profile_t {
7960 A_UINT32 tlv_header;
7961 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
7962 A_UINT32 id;
7963 A_UINT32 cnt;
7964 A_UINT32 tot;
7965 A_UINT32 min;
7966 A_UINT32 max;
7967 A_UINT32 hist_intvl;
7968 A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
7969} wmi_wlan_profile_t;
7970
7971typedef struct _wmi_wlan_profile_ctx_t {
7972 A_UINT32 tlv_header;
7973 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
7974 A_UINT32 tot; /* time in us */
7975 A_UINT32 tx_msdu_cnt;
7976 A_UINT32 tx_mpdu_cnt;
7977 A_UINT32 tx_ppdu_cnt;
7978 A_UINT32 rx_msdu_cnt;
7979 A_UINT32 rx_mpdu_cnt;
7980 A_UINT32 bin_count;
7981} wmi_wlan_profile_ctx_t;
7982
7983typedef struct {
7984 A_UINT32 tlv_header;
7985 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
7986 A_UINT32 enable;
7987} wmi_wlan_profile_trigger_cmd_fixed_param;
7988
7989typedef struct {
7990 A_UINT32 tlv_header;
7991 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
7992 A_UINT32 value;
7993} wmi_wlan_profile_get_prof_data_cmd_fixed_param;
7994
7995typedef struct {
7996 A_UINT32 tlv_header;
7997 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
7998 A_UINT32 profile_id;
7999 A_UINT32 value;
8000} wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
8001
8002typedef struct {
8003 A_UINT32 tlv_header;
8004 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
8005 A_UINT32 profile_id;
8006 A_UINT32 enable;
8007} wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
8008
8009/*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
8010 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
8011 when comparing wifi header.*/
8012/* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
8013#define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146
8014#define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
8015#define WOW_DEFAULT_BITMASK_SIZE 146
8016#define WOW_DEFAULT_BITMASK_SIZE_DWORD 37
8017#define WOW_MAX_BITMAP_FILTERS 32
8018#define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16
8019#define WOW_EXTEND_PATTERN_MATCH_CNT 16
8020#define WOW_SHORT_PATTERN_MATCH_CNT 8
8021#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 +05308022 The 148 comes from (128 - 14 ) payload size + 8bytes LLC + 26bytes MAC header */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008023#define WOW_DEFAULT_IOAC_PATTERN_SIZE 6
8024#define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
8025#define WOW_DEFAULT_IOAC_RANDOM_SIZE 6
8026#define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
8027#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120
8028#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
8029#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32
8030#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
8031#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32
8032#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08008033#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128
8034#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008035
8036typedef enum pattern_type_e {
8037 WOW_PATTERN_MIN = 0,
8038 WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
8039 WOW_IPV4_SYNC_PATTERN,
8040 WOW_IPV6_SYNC_PATTERN,
8041 WOW_WILD_CARD_PATTERN,
8042 WOW_TIMER_PATTERN,
8043 WOW_MAGIC_PATTERN,
8044 WOW_IPV6_RA_PATTERN,
8045 WOW_IOAC_PKT_PATTERN,
8046 WOW_IOAC_TMR_PATTERN,
8047 WOW_IOAC_SOCK_PATTERN,
8048 WOW_PATTERN_MAX
8049} WOW_PATTERN_TYPE;
8050
8051typedef enum event_type_e {
8052 WOW_BMISS_EVENT = 0,
8053 WOW_BETTER_AP_EVENT,
8054 WOW_DEAUTH_RECVD_EVENT,
8055 WOW_MAGIC_PKT_RECVD_EVENT,
8056 WOW_GTK_ERR_EVENT,
8057 WOW_FOURWAY_HSHAKE_EVENT,
8058 WOW_EAPOL_RECVD_EVENT,
8059 WOW_NLO_DETECTED_EVENT,
8060 WOW_DISASSOC_RECVD_EVENT,
8061 WOW_PATTERN_MATCH_EVENT,
8062 WOW_CSA_IE_EVENT,
8063 WOW_PROBE_REQ_WPS_IE_EVENT,
8064 WOW_AUTH_REQ_EVENT,
8065 WOW_ASSOC_REQ_EVENT,
8066 WOW_HTT_EVENT,
8067 WOW_RA_MATCH_EVENT,
8068 WOW_HOST_AUTO_SHUTDOWN_EVENT,
8069 WOW_IOAC_MAGIC_EVENT,
8070 WOW_IOAC_SHORT_EVENT,
8071 WOW_IOAC_EXTEND_EVENT,
8072 WOW_IOAC_TIMER_EVENT,
8073 WOW_DFS_PHYERR_RADAR_EVENT,
8074 WOW_BEACON_EVENT,
8075 WOW_CLIENT_KICKOUT_EVENT,
8076 WOW_NAN_EVENT,
8077 WOW_EXTSCAN_EVENT,
8078 WOW_IOAC_REV_KA_FAIL_EVENT,
8079 WOW_IOAC_SOCK_EVENT,
8080 WOW_NLO_SCAN_COMPLETE_EVENT,
Govind Singh941bd5e2016-02-04 17:15:25 +05308081 WOW_NAN_DATA_EVENT,
8082 WOW_NAN_RTT_EVENT,
Krishna Kumaar Natarajan3bd73642016-03-25 13:59:54 -07008083 WOW_TDLS_CONN_TRACKER_EVENT,
Anurag Chouhan05d05fe2016-04-18 17:09:24 +05308084 WOW_CRITICAL_LOG_EVENT,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008085} WOW_WAKE_EVENT_TYPE;
8086
8087typedef enum wake_reason_e {
8088 WOW_REASON_UNSPECIFIED = -1,
8089 WOW_REASON_NLOD = 0,
8090 WOW_REASON_AP_ASSOC_LOST,
8091 WOW_REASON_LOW_RSSI,
8092 WOW_REASON_DEAUTH_RECVD,
8093 WOW_REASON_DISASSOC_RECVD,
8094 WOW_REASON_GTK_HS_ERR,
8095 WOW_REASON_EAP_REQ,
8096 WOW_REASON_FOURWAY_HS_RECV,
8097 WOW_REASON_TIMER_INTR_RECV,
8098 WOW_REASON_PATTERN_MATCH_FOUND,
8099 WOW_REASON_RECV_MAGIC_PATTERN,
8100 WOW_REASON_P2P_DISC,
8101 WOW_REASON_WLAN_HB,
8102 WOW_REASON_CSA_EVENT,
8103 WOW_REASON_PROBE_REQ_WPS_IE_RECV,
8104 WOW_REASON_AUTH_REQ_RECV,
8105 WOW_REASON_ASSOC_REQ_RECV,
8106 WOW_REASON_HTT_EVENT,
8107 WOW_REASON_RA_MATCH,
8108 WOW_REASON_HOST_AUTO_SHUTDOWN,
8109 WOW_REASON_IOAC_MAGIC_EVENT,
8110 WOW_REASON_IOAC_SHORT_EVENT,
8111 WOW_REASON_IOAC_EXTEND_EVENT,
8112 WOW_REASON_IOAC_TIMER_EVENT,
8113 WOW_REASON_ROAM_HO,
8114 WOW_REASON_DFS_PHYERR_RADADR_EVENT,
8115 WOW_REASON_BEACON_RECV,
8116 WOW_REASON_CLIENT_KICKOUT_EVENT,
8117 WOW_REASON_NAN_EVENT,
8118 WOW_REASON_EXTSCAN,
8119 WOW_REASON_RSSI_BREACH_EVENT,
8120 WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
8121 WOW_REASON_IOAC_SOCK_EVENT,
8122 WOW_REASON_NLO_SCAN_COMPLETE,
8123 WOW_REASON_PACKET_FILTER_MATCH,
8124 WOW_REASON_ASSOC_RES_RECV,
8125 WOW_REASON_REASSOC_REQ_RECV,
8126 WOW_REASON_REASSOC_RES_RECV,
8127 WOW_REASON_ACTION_FRAME_RECV,
Manikandan Mohan130eb572015-12-23 13:53:34 -08008128 WOW_REASON_BPF_ALLOW,
Govind Singh941bd5e2016-02-04 17:15:25 +05308129 WOW_REASON_NAN_DATA,
8130 WOW_REASON_NAN_RTT,
Krishna Kumaar Natarajan3bd73642016-03-25 13:59:54 -07008131 WOW_REASON_TDLS_CONN_TRACKER_EVENT,
Anurag Chouhan05d05fe2016-04-18 17:09:24 +05308132 WOW_REASON_CRITICAL_LOG,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008133 WOW_REASON_DEBUG_TEST = 0xFF,
8134} WOW_WAKE_REASON_TYPE;
8135
8136typedef enum {
8137 WOW_IFACE_PAUSE_ENABLED,
8138 WOW_IFACE_PAUSE_DISABLED
8139} WOW_IFACE_STATUS;
8140
8141enum {
8142 /* some win10 platfrom will not assert pcie_reset for wow.*/
8143 WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001,
Govind Singhb5158e22016-02-04 15:38:30 +05308144 /*
8145 * WMI_WOW_FLAG_SEND_PM_PME
8146 * Some platforms have issues if the PM_PME message is sent after WoW,
8147 * so don't send PM_PME after WoW unless the host uses this flag
8148 * to request it.
8149 */
8150 WMI_WOW_FLAG_SEND_PM_PME = 0x00000002,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008151};
8152
8153
8154typedef struct {
8155 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */
8156 A_UINT32 enable;
8157 A_UINT32 pause_iface_config;
8158 A_UINT32 flags; /* WMI_WOW_FLAG enums */
8159} wmi_wow_enable_cmd_fixed_param;
8160
8161typedef struct {
8162 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */
8163 /** Reserved for future use */
8164 A_UINT32 reserved0;
8165} wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
8166
8167#define WOW_ICMPV6_NA_FILTER_DISABLE 0
8168#define WOW_ICMPV6_NA_FILTER_ENABLE 1
8169
8170typedef struct {
8171 /* TLV tag and len;
8172 * tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param
8173 */
8174 A_UINT32 tlv_header;
8175 A_UINT32 vdev_id;
8176 A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
8177} wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
8178
8179typedef struct bitmap_pattern_s {
8180 A_UINT32 tlv_header;
8181 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
8182 A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
8183 A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
8184 A_UINT32 pattern_offset;
8185 A_UINT32 pattern_len;
8186 A_UINT32 bitmask_len;
8187 A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
8188} WOW_BITMAP_PATTERN_T;
8189
8190typedef struct ipv4_sync_s {
8191 A_UINT32 tlv_header;
8192 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
8193 A_UINT32 ipv4_src_addr;
8194 A_UINT32 ipv4_dst_addr;
8195 A_UINT32 tcp_src_prt;
8196 A_UINT32 tcp_dst_prt;
8197} WOW_IPV4_SYNC_PATTERN_T;
8198
8199typedef struct ipv6_sync_s {
8200 A_UINT32 tlv_header;
8201 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
8202 A_UINT32 ipv6_src_addr[4];
8203 A_UINT32 ipv6_dst_addr[4];
8204 A_UINT32 tcp_src_prt;
8205 A_UINT32 tcp_dst_prt;
8206} WOW_IPV6_SYNC_PATTERN_T;
8207
8208typedef struct WOW_MAGIC_PATTERN_CMD {
8209 A_UINT32 tlv_header;
8210 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
8211 wmi_mac_addr macaddr;
8212} WOW_MAGIC_PATTERN_CMD;
8213
8214typedef enum wow_ioac_pattern_type {
8215 WOW_IOAC_MAGIC_PATTERN = 1,
8216 WOW_IOAC_SHORT_PATTERN,
8217 WOW_IOAC_EXTEND_PATTERN,
8218} WOW_IOAC_PATTERN_TYPE;
8219
8220typedef struct ioac_sock_pattern_s {
8221 /**
8222 * TLV tag and len;
8223 * tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T
8224 */
8225 A_UINT32 tlv_header;
8226 A_UINT32 id;
8227 A_UINT32 local_ipv4;
8228 A_UINT32 remote_ipv4;
8229 A_UINT32 local_port;
8230 A_UINT32 remote_port;
8231 A_UINT32 pattern_len; /* units = bytes */
8232 A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08008233 WMI_IPV6_ADDR local_ipv6;
8234 WMI_IPV6_ADDR remote_ipv6;
8235 A_UINT32 ack_nak_len;
8236 A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
8237 A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008238} WOW_IOAC_SOCK_PATTERN_T;
8239
8240typedef struct ioac_pkt_pattern_s {
8241 A_UINT32 tlv_header;
8242 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
8243 A_UINT32 pattern_type;
8244 A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
8245 A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
8246 A_UINT32 pattern_len;
8247 A_UINT32 random_len;
8248} WOW_IOAC_PKT_PATTERN_T;
8249
8250typedef struct ioac_tmr_pattern_s {
8251 A_UINT32 tlv_header;
8252 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
8253 A_UINT32 wake_in_s;
8254 A_UINT32 vdev_id;
8255} WOW_IOAC_TMR_PATTERN_T;
8256
8257typedef struct {
8258 A_UINT32 tlv_header;
8259 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
8260 A_UINT32 nID;
8261} WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
8262
8263typedef struct {
8264 A_UINT32 tlv_header;
8265 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
8266 A_UINT32 nID;
8267} WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
8268
8269typedef struct ioac_keepalive_s {
8270 A_UINT32 tlv_header;
8271 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
8272 A_UINT32
8273 keepalive_pkt_buf
8274 [WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
8275 A_UINT32 keepalive_pkt_len;
8276 A_UINT32 period_in_ms;
8277 A_UINT32 vdev_id;
8278 A_UINT32 max_loss_cnt;
8279 A_UINT32 local_ipv4;
8280 A_UINT32 remote_ipv4;
8281 A_UINT32 local_port;
8282 A_UINT32 remote_port;
8283 A_UINT32 recv_period_in_ms;
8284 A_UINT32 rev_ka_size;
8285 A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08008286 WMI_IPV6_ADDR local_ipv6;
8287 WMI_IPV6_ADDR remote_ipv6;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008288} WMI_WOW_IOAC_KEEPALIVE_T;
8289
8290typedef struct {
8291 A_UINT32 tlv_header;
8292 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
8293 A_UINT32 vdev_id;
8294 A_UINT32 pattern_type;
8295/*
8296 * Following this struct are these TLVs. Note that they are all array of structures
8297 * but can have at most one element. Which TLV is empty or has one element depends
8298 * on the field pattern_type. This is to emulate an union.
8299 * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
8300 * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
8301 */
8302} WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
8303
8304typedef struct {
8305 A_UINT32 tlv_header;
8306 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
8307 A_UINT32 vdev_id;
8308 A_UINT32 pattern_type;
8309 A_UINT32 pattern_id;
8310} WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
8311
8312typedef struct {
8313 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
8314 A_UINT32 vdev_id;
8315 A_UINT32 pattern_id;
8316 A_UINT32 pattern_type;
8317 /*
8318 * Following this struct are these TLVs. Note that they are all array of structures
8319 * but can have at most one element. Which TLV is empty or has one element depends
8320 * on the field pattern_type. This is to emulate an union.
8321 * WOW_BITMAP_PATTERN_T pattern_info_bitmap[];
8322 * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[];
8323 * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[];
8324 * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[];
8325 * A_UINT32 pattern_info_timeout[];
8326 * A_UINT32 ra_ratelimit_interval;
8327 */
8328} WMI_WOW_ADD_PATTERN_CMD_fixed_param;
8329
8330typedef struct {
8331 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
8332 A_UINT32 vdev_id;
8333 A_UINT32 pattern_id;
8334 A_UINT32 pattern_type;
8335} WMI_WOW_DEL_PATTERN_CMD_fixed_param;
8336
8337typedef struct {
8338 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */
8339 A_UINT32 vdev_id;
8340 A_UINT32 is_add;
8341 A_UINT32 event_bitmap;
8342} WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
8343
8344/*
8345 * This structure is used to set the pattern to check UDP packet in WOW mode.
8346 * If match, construct a tx frame in a local buffer to send through the peer
8347 * AP to the entity in the IP network that sent the UDP packet to this STA.
8348 */
8349typedef struct {
8350 /*
8351 * TLV tag and len;
8352 * tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param
8353 */
8354 A_UINT32 tlv_header;
8355 A_UINT32 vdev_id;
8356 A_UINT32 enable; /* 1: enable, 0: disable */
8357 /*
8358 * dest_port -
8359 * bits 7:0 contain the LSB of the UDP dest port,
8360 * bits 15:8 contain the MSB of the UDP dest port
8361 */
8362 A_UINT32 dest_port;
8363 A_UINT32 pattern_len; /* length in byte of pattern[] */
8364 A_UINT32 response_len; /* length in byte of response[] */
8365 /*
8366 * Following this struct are the TLV's:
8367 * payload of UDP packet to be checked, network byte order
8368 * A_UINT8 pattern[];
8369 * payload of UDP packet to be response, network byte order
8370 * A_UINT8 response[];
8371 */
8372} WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
8373
8374/*
8375 * This structure is used to set the pattern for WOW host wakeup pin pulse
8376 * pattern confirguration.
8377 */
8378typedef struct {
8379 /*
8380 * TLV tag and len; tag equals
8381 * WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param
8382 */
8383 A_UINT32 tlv_header;
8384
8385 /* 1: enable, 0: disable */
8386 A_UINT32 enable;
8387
8388 /* pin for host wakeup */
8389 A_UINT32 pin;
8390
8391 /* interval for keeping low voltage, unit: ms */
8392 A_UINT32 interval_low;
8393
8394 /* interval for keeping high voltage, unit: ms */
8395 A_UINT32 interval_high;
8396
8397 /* repeat times for pulse (0xffffffff means forever) */
8398 A_UINT32 repeat_cnt;
8399} WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
8400
8401typedef struct wow_event_info_s {
8402 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */
8403 A_UINT32 vdev_id;
8404 A_UINT32 flag; /*This is current reserved. */
8405 A_INT32 wake_reason;
8406 A_UINT32 data_len;
8407} WOW_EVENT_INFO_fixed_param;
8408
8409typedef struct wow_initial_wakeup_event_s {
8410 /*
8411 * TLV tag and len; tag equals
8412 * WOW_INITIAL_WAKEUP_EVENT_fixed_param
8413 */
8414 A_UINT32 tlv_header;
8415 A_UINT32 vdev_id;
8416} WOW_INITIAL_WAKEUP_EVENT_fixed_param;
8417
8418typedef enum {
8419 WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
8420 WOW_EVENT_INFO_TYPE_BITMAP,
8421 WOW_EVENT_INFO_TYPE_GTKIGTK,
8422} WOW_EVENT_INFO_TYPE;
8423
8424typedef struct wow_event_info_section_s {
8425 A_UINT32 data_type;
8426 A_UINT32 data_len;
8427} WOW_EVENT_INFO_SECTION;
8428
8429typedef struct wow_event_info_section_packet_s {
8430 A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
8431} WOW_EVENT_INFO_SECTION_PACKET;
8432
8433typedef struct wow_event_info_section_bitmap_s {
8434 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */
8435 A_UINT32 flag; /*This is current reserved. */
8436 A_UINT32 value; /*This could be the pattern id for bitmap pattern. */
8437 A_UINT32 org_len; /*The length of the orginal packet. */
8438} WOW_EVENT_INFO_SECTION_BITMAP;
8439
8440/**
8441 * This command is sent from WLAN host driver to firmware to
8442 * enable or disable D0-WOW. D0-WOW means APSS suspend with
8443 * PCIe link and DDR being active.
8444 *
8445 *
8446 * Entering D0-WOW Mode (based on kernel suspend request):
8447 * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
8448 * target: Take action (e.g. dbglog suspend)
8449 * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
8450 *
8451 * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
8452 * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
8453 * target: Take action (e.g. dbglog resume)
8454 * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
8455 *
8456 * This command is applicable only on the PCIE LL systems
8457 * Host can enter either D0-WOW or WOW mode, but NOT both at same time
8458 * Decision to enter D0-WOW or WOW is based on active interfaces
8459 *
8460 */
8461typedef struct {
8462 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */
8463 A_UINT32 enable; /* 1 = enable, 0 = disable */
8464} wmi_d0_wow_enable_disable_cmd_fixed_param;
8465
8466typedef enum extend_wow_type_e {
8467 EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */
8468 EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */
8469 EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08008470 EXTWOW_TYPE_APP_PULSETEST,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008471 EXTWOW_DISABLED = 255,
8472} EXTWOW_TYPE;
8473
8474typedef struct {
8475 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */
8476 A_UINT32 vdev_id;
8477 A_UINT32 type;
8478 A_UINT32 wakeup_pin_num;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08008479 A_UINT32 swol_pulsetest_type;
8480 A_UINT32 swol_pulsetest_application;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008481} wmi_extwow_enable_cmd_fixed_param;
8482
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08008483#define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
8484#define SWOL_INDOOR_KEY_LEN 16
8485
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008486typedef struct {
8487 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */
8488 A_UINT32 vdev_id;
8489 wmi_mac_addr wakee_mac;
8490 A_UINT8 ident[8];
8491 A_UINT8 passwd[16];
8492 A_UINT32 ident_len;
8493 A_UINT32 passwd_len;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08008494
8495 /* indoor check parameters */
8496 /* key for mac addresses specified in swol_indoor_key_mac
8497 * Big-endian hosts need to byte-swap the bytes within each 4-byte
8498 * segment of this array, so the bytes will return to their original
8499 * order when the entire WMI message contents are byte-swapped to
8500 * convert from big-endian to little-endian format.
8501 */
8502 A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
8503 /* key length for specified mac address index
8504 * Big-endian hosts need to byte-swap the bytes within each 4-byte
8505 * segment of this array, so the bytes will return to their original
8506 * order when the entire WMI message contents are byte-swapped to
8507 * convert from big-endian to little-endian format.
8508 */
8509 A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
8510 /* mac address array allowed to wakeup host*/
8511 wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
8512 /* app mask for the mac addresses specified in swol_indoor_key_mac */
8513 A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
8514 A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
8515 A_UINT32 swol_indoor_pw_check; /* whether to check password */
8516 A_UINT32 swol_indoor_pattern; /* wakeup pattern */
8517 A_UINT32 swol_indoor_exception; /* wakeup when exception happens */
8518 A_UINT32 swol_indoor_exception_app;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008519} wmi_extwow_set_app_type1_params_cmd_fixed_param;
8520
8521typedef struct {
8522 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */
8523 A_UINT32 vdev_id;
8524
8525 A_UINT8 rc4_key[16];
8526 A_UINT32 rc4_key_len;
8527
8528 /** ip header parameter */
8529 A_UINT32 ip_id; /* NC id */
8530 A_UINT32 ip_device_ip; /* NC IP address */
8531 A_UINT32 ip_server_ip; /* Push server IP address */
8532
8533 /** tcp header parameter */
8534 A_UINT16 tcp_src_port; /* NC TCP port */
8535 A_UINT16 tcp_dst_port; /* Push server TCP port */
8536 A_UINT32 tcp_seq;
8537 A_UINT32 tcp_ack_seq;
8538
8539 A_UINT32 keepalive_init; /* Initial ping interval */
8540 A_UINT32 keepalive_min; /* Minimum ping interval */
8541 A_UINT32 keepalive_max; /* Maximum ping interval */
8542 A_UINT32 keepalive_inc; /* Increment of ping interval */
8543
8544 wmi_mac_addr gateway_mac;
8545 A_UINT32 tcp_tx_timeout_val;
8546 A_UINT32 tcp_rx_timeout_val;
8547
8548 /** add extra parameter for backward-compatible */
8549 /*
8550 * For all byte arrays, natural order is used. E.g.
8551 * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
8552 * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
8553 */
8554
8555 /* used to encrypt transmit packet such as keep-alive */
8556 A_UINT8 rc4_write_sandbox[256];
8557 A_UINT32 rc4_write_x;
8558 A_UINT32 rc4_write_y;
8559
8560 /* used to decrypt received packet such as wow data */
8561 A_UINT8 rc4_read_sandbox[256];
8562 A_UINT32 rc4_read_x;
8563 A_UINT32 rc4_read_y;
8564
8565 /* used to caculate HMAC hash for transmit packet such as keep-alive */
8566 A_UINT8 ssl_write_seq[8];
8567 A_UINT8 ssl_sha1_write_key[64];
8568 A_UINT32 ssl_sha1_write_key_len;
8569
8570 /* used to calculate HAMC hash for receive packet such as wow data */
8571 A_UINT8 ssl_read_seq[8];
8572 A_UINT8 ssl_sha1_read_key[64];
8573 A_UINT32 ssl_sha1_read_key_len;
8574
8575 /* optional element for specifying TCP options data to include in
8576 * transmit packets such as keep-alive
8577 */
8578 A_UINT32 tcp_options_len;
8579 A_UINT8 tcp_options[40];
8580
8581 A_UINT32 async_id; /* keep-alive request id */
8582} wmi_extwow_set_app_type2_params_cmd_fixed_param;
8583
8584#define WMI_RXERR_CRC 0x01 /* CRC error on frame */
8585#define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
8586#define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */
8587#define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
8588
8589typedef enum {
8590 PKT_PWR_SAVE_PAID_MATCH = 0x0001,
8591 PKT_PWR_SAVE_GID_MATCH = 0x0002,
8592 PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x0004,
8593 PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x0008,
8594 PKT_PWR_SAVE_EOF_PAD_DELIM = 0x0010,
8595 PKT_PWR_SAVE_MACADDR_MISMATCH = 0x0020,
8596 PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x0040,
8597 PKT_PWR_SAVE_GID_NSTS_ZERO = 0x0080,
8598 PKT_PWR_SAVE_RSSI_CHECK = 0x0100,
8599 PKT_PWR_SAVE_5G_EBT = 0x0200,
8600 PKT_PWR_SAVE_2G_EBT = 0x0400,
8601 WMI_PKT_PWR_SAVE_MAX = 0x0800,
8602} WMI_PKT_PWR_SAVE_TYPE;
8603
8604typedef struct {
8605 A_UINT32 tlv_header;
8606 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
8607 A_UINT32 num_data;
8608 /** length in byte of data[]. */
Govind Singh869c9872016-02-22 18:36:34 +05308609 /** pdev_id for identifying the MAC
8610 * See macros starting with WMI_PDEV_ID_ for values.
8611 */
8612 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008613 /* This structure is used to send Factory Test Mode [FTM] command
8614 * from host to firmware for integrated chips which are binary blobs.
8615 * Following this structure is the TLV:
8616 * A_UINT8 data[]; // length in byte given by field num_data.
8617 */
8618} wmi_ftm_intg_cmd_fixed_param;
8619
8620typedef struct {
8621 A_UINT32 tlv_header;
8622 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
8623 A_UINT32 num_data;
8624 /** length in byte of data[]. */
8625 /* This structure is used to receive Factory Test Mode [FTM] event
8626 * from firmware to host for integrated chips which are binary blobs.
8627 * Following this structure is the TLV:
8628 * A_UINT8 data[]; // length in byte given by field num_data.
8629 */
8630} wmi_ftm_intg_event_fixed_param;
8631
8632#define WMI_MAX_NS_OFFLOADS 2
8633#define WMI_MAX_ARP_OFFLOADS 2
8634
8635#define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
8636#define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
8637#define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
8638
8639typedef struct {
8640 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
8641 A_UINT32 flags; /* flags */
8642 A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node */
8643 A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
8644 wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
8645} WMI_ARP_OFFLOAD_TUPLE;
8646
8647#define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
8648#define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
8649#define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
Govind Singh86180292016-02-01 14:03:37 +05308650/* whether the configured IPv6 address is anycast */
8651#define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008652
8653#define WMI_NSOFF_MAX_TARGET_IPS 2
8654
8655typedef struct {
8656 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
8657 A_UINT32 flags; /* flags */
8658 /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
8659 WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */
8660 WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
8661 WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
8662 wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
8663} WMI_NS_OFFLOAD_TUPLE;
8664
8665typedef struct {
8666 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
8667 A_UINT32 flags;
8668 A_UINT32 vdev_id;
8669 A_UINT32 num_ns_ext_tuples;
8670 /* Following this structure are the TLVs:
8671 * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS];
8672 * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
8673 * size of ns_ext_tuples is based on num_ns_ext_tuples
8674 * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[];
8675 */
8676} WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
8677
8678typedef struct {
8679 A_UINT32 tlv_header;
8680 A_UINT32 vdev_id;
8681 A_UINT32 pattern_id;
8682 A_UINT32 timeout;
8683 A_UINT32 length;
8684 /* Following this would be the pattern
8685 A_UINT8 pattern[] of length specifed by length
8686 field in the structure. */
8687} WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
8688
8689typedef struct {
8690 A_UINT32 tlv_header;
8691 A_UINT32 vdev_id;
8692 A_UINT32 pattern_id;
8693} WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
8694
8695typedef struct {
8696 A_UINT32 tlv_header;
8697 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
8698 /** unique id identifying the VDEV, generated by the caller */
8699 A_UINT32 vdev_id;
8700 /** peer MAC address */
8701 wmi_mac_addr peer_macaddr;
8702 /** Tid number */
8703 A_UINT32 tid;
8704 /** Initiator (1) or Responder (0) for this aggregation */
8705 A_UINT32 initiator;
8706 /** size of the negotiated window */
8707 A_UINT32 window_size;
8708 /** starting sequence number (only valid for initiator) */
8709 A_UINT32 ssn;
8710 /** timeout field represents the time to wait for Block Ack in
8711 * initiator case and the time to wait for BAR in responder
8712 * case. 0 represents no timeout. */
8713 A_UINT32 timeout;
8714 /* BA policy: immediate ACK (0) or delayed ACK (1) */
8715 A_UINT32 policy;
8716} wmi_peer_tid_addba_cmd_fixed_param;
8717
8718typedef struct {
8719 A_UINT32 tlv_header;
8720 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
8721 /** unique id identifying the VDEV, generated by the caller */
8722 A_UINT32 vdev_id;
8723 /** peer MAC address */
8724 wmi_mac_addr peer_macaddr;
8725 /** Tid number */
8726 A_UINT32 tid;
8727 /** Initiator (1) or Responder (0) for this aggregation */
8728 A_UINT32 initiator;
8729} wmi_peer_tid_delba_cmd_fixed_param;
8730
8731typedef struct {
8732 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
8733 /** unique id identifying the VDEV, generated by the caller */
8734 A_UINT32 vdev_id;
8735 /** peer MAC address */
8736 wmi_mac_addr peer_macaddr;
8737 /** Tid number */
8738 A_UINT32 tid;
8739 /** Event status */
8740 A_UINT32 status;
8741} wmi_tx_addba_complete_event_fixed_param;
8742
8743typedef struct {
8744 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
8745 /** unique id identifying the VDEV, generated by the caller */
8746 A_UINT32 vdev_id;
8747 /** peer MAC address */
8748 wmi_mac_addr peer_macaddr;
8749 /** Tid number */
8750 A_UINT32 tid;
8751 /** Event status */
8752 A_UINT32 status;
8753} wmi_tx_delba_complete_event_fixed_param;
8754/*
8755 * Structure to request sequence numbers for a given
8756 * peer station on different TIDs. The TIDs are
8757 * indicated in the tidBitMap, tid 0 would
8758 * be represented by LSB bit 0. tid 1 would be
8759 * represented by LSB bit 1 etc.
8760 * The target will retrieve the current sequence
8761 * numbers for the peer on all the TIDs requested
8762 * and send back a response in a WMI event.
8763 */
8764typedef struct {
8765 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308766 WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008767 wmi_mac_addr peer_macaddr;
8768 A_UINT32 tidBitmap;
8769} wmi_ba_req_ssn;
8770
8771typedef struct {
8772 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308773 WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008774 /** unique id identifying the VDEV, generated by the caller */
8775 A_UINT32 vdev_id;
8776 /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
8777 A_UINT32 num_ba_req_ssn;
8778/* Following this struc are the TLV's:
8779 * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
8780 */
8781} wmi_ba_req_ssn_cmd_fixed_param;
8782
8783/*
8784 * Max transmit categories
8785 *
8786 * Note: In future if we need to increase WMI_MAX_TC definition
8787 * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
8788 */
8789#define WMI_MAX_TC 8
8790
8791/*
8792 * Structure to send response sequence numbers
8793 * for a give peer and tidmap.
8794 */
8795typedef struct {
8796 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308797 WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008798 wmi_mac_addr peer_macaddr;
8799 /* A bool to indicate if ssn is present */
8800 A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
8801 /* The ssn from target, valid only if
8802 * ssn_present_for_tid[tidn] equals 1
8803 */
8804 A_UINT32 ssn_for_tid[WMI_MAX_TC];
8805} wmi_ba_event_ssn;
8806
8807typedef struct {
8808 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308809 WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008810 /** unique id identifying the VDEV, generated by the caller */
8811 A_UINT32 vdev_id;
8812 /** Event status, success or failure of the overall operation */
8813 A_UINT32 status;
8814 /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
8815 A_UINT32 num_ba_event_ssn;
8816/* Following this struc are the TLV's:
8817 * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
8818 */
8819} wmi_ba_rsp_ssn_event_fixed_param;
8820
8821enum wmi_aggr_state_req_type {
8822 WMI_DISABLE_AGGREGATION,
8823 WMI_ENABLE_AGGREGATION
8824};
8825
8826/*
8827 * This event is generated by the COEX module
8828 * when esco call is begins the coex module in fw genrated this event to host to
8829 * disable the RX aggregation and after completion of the esco call fw will indicate to
8830 * enable back the Rx aggregation .
8831 */
8832
8833typedef struct {
8834 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
8835 /** unique id identifying the VDEV, generated by the caller */
8836 A_UINT32 vdev_id;
8837 /** req_type contains values from enum
8838 * wmi_aggr_state_req_type; 0 (disable) 1(enable) */
8839 A_UINT32 req_type;
8840} wmi_aggr_state_trig_event_fixed_param;
8841
8842typedef struct {
8843 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
8844 /** unique id identifying the VDEV, generated by the caller */
8845 A_UINT32 vdev_id;
8846 /** MAC address used for installing */
8847 wmi_mac_addr peer_macaddr;
8848 /** key index */
8849 A_UINT32 key_ix;
8850 /** key flags */
8851 A_UINT32 key_flags;
8852 /** Event status */
8853 A_UINT32 status;
8854} wmi_vdev_install_key_complete_event_fixed_param;
8855
8856typedef enum _WMI_NLO_AUTH_ALGORITHM {
8857 WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
8858 WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
8859 WMI_NLO_AUTH_ALGO_WPA = 3,
8860 WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
8861 WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
8862 WMI_NLO_AUTH_ALGO_RSNA = 6,
8863 WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
8864} WMI_NLO_AUTH_ALGORITHM;
8865
8866typedef enum _WMI_NLO_CIPHER_ALGORITHM {
8867 WMI_NLO_CIPHER_ALGO_NONE = 0x00,
8868 WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
8869 WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
8870 WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
8871 WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
8872 WMI_NLO_CIPHER_ALGO_BIP = 0x06,
8873 WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
8874 WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
8875 WMI_NLO_CIPHER_ALGO_WEP = 0x101,
8876} WMI_NLO_CIPHER_ALGORITHM;
8877
8878/* SSID broadcast type passed in NLO params */
8879typedef enum _WMI_NLO_SSID_BcastNwType {
8880 WMI_NLO_BCAST_UNKNOWN = 0,
8881 WMI_NLO_BCAST_NORMAL = 1,
8882 WMI_NLO_BCAST_HIDDEN = 2,
8883} WMI_NLO_SSID_BcastNwType;
8884
8885#define WMI_NLO_MAX_SSIDS 16
8886#define WMI_NLO_MAX_CHAN 48
8887
8888#define WMI_NLO_CONFIG_STOP (0x1 << 0)
8889#define WMI_NLO_CONFIG_START (0x1 << 1)
8890#define WMI_NLO_CONFIG_RESET (0x1 << 2)
8891#define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4)
8892#define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5)
8893#define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6)
8894/* This bit is used to indicate if EPNO or supplicant PNO is enabled. Only
8895 * one of them can be enabled at a given time */
8896#define WMI_NLO_CONFIG_ENLO (0x1 << 7)
8897#define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8)
Govind Singh42f71542016-03-14 16:32:33 +05308898#define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008899
8900/* Whether directed scan needs to be performed (for hidden SSIDs) */
8901#define WMI_ENLO_FLAG_DIRECTED_SCAN 1
8902/* Whether PNO event shall be triggered if the network is found on A band */
8903#define WMI_ENLO_FLAG_A_BAND 2
8904/* Whether PNO event shall be triggered if the network is found on G band */
8905#define WMI_ENLO_FLAG_G_BAND 4
8906/* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
8907#define WMI_ENLO_FLAG_STRICT_MATCH 8
8908/* Code for matching the beacon AUTH IE - additional codes TBD open */
8909#define WMI_ENLO_AUTH_CODE_OPEN 1
8910/* WPA_PSK or WPA2PSK */
8911#define WMI_ENLO_AUTH_CODE_PSK 2
8912/* any EAPOL */
8913#define WMI_ENLO_AUTH_CODE_EAPOL 4
8914
8915/* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
8916typedef struct wmi_nlo_ssid_param {
8917 A_UINT32 valid;
8918 wmi_ssid ssid;
8919} wmi_nlo_ssid_param;
8920
8921/* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
8922typedef struct wmi_nlo_enc_param {
8923 A_UINT32 valid;
8924 A_UINT32 enc_type;
8925} wmi_nlo_enc_param;
8926
8927/* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
8928typedef struct wmi_nlo_auth_param {
8929 A_UINT32 valid;
8930 A_UINT32 auth_type;
8931} wmi_nlo_auth_param;
8932
8933/* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
8934typedef struct wmi_nlo_bcast_nw_param {
8935 A_UINT32 valid;
8936 /**
8937 * If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value
8938 * should be true/false.Otherwise EPNO is enabled. bcast_nw_type would be used
8939 * as a bit flag contains WMI_ENLO_FLAG_XXX
8940 */
8941 A_UINT32 bcast_nw_type;
8942} wmi_nlo_bcast_nw_param;
8943
8944/* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
8945typedef struct wmi_nlo_rssi_param {
8946 A_UINT32 valid;
8947 A_INT32 rssi;
8948} wmi_nlo_rssi_param;
8949
8950typedef struct nlo_configured_parameters {
8951 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
8952 wmi_nlo_ssid_param ssid;
8953 wmi_nlo_enc_param enc_type;
8954 wmi_nlo_auth_param auth_type;
8955 wmi_nlo_rssi_param rssi_cond;
8956 wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
8957} nlo_configured_parameters;
8958
8959/* Support channel prediction for PNO scan after scanning top_k_num channels
8960 * if stationary_threshold is met.
8961 */
8962typedef struct nlo_channel_prediction_cfg {
8963 A_UINT32 tlv_header;
8964 /* Enable or disable this feature. */
8965 A_UINT32 enable;
8966 /* Top K channels will be scanned before deciding whether to further
8967 * scan or stop. Minimum value is 3 and maximum is 5. */
8968 A_UINT32 top_k_num;
8969 /* Preconfigured stationary threshold. Lesser value means more
8970 * conservative. Bigger value means more aggressive.
8971 * Maximum is 100 and mininum is 0. */
8972 A_UINT32 stationary_threshold;
8973 /* Periodic full channel scan in milliseconds unit.
8974 * After full_scan_period_ms since last full scan, channel prediction
8975 * scan is suppressed and will do full scan.
8976 * This is to help detecting sudden AP power-on or -off.
8977 * Value 0 means no full scan at all (not recommended).
8978 */
8979 A_UINT32 full_scan_period_ms;
8980} nlo_channel_prediction_cfg;
8981
Govind Singh42f71542016-03-14 16:32:33 +05308982typedef struct enlo_candidate_score_params_t {
8983 /*
8984 * TLV tag and len;
8985 * tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param
8986 */
8987 A_UINT32 tlv_header;
8988 /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
8989 A_INT32 min5GHz_rssi;
8990 /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
8991 A_INT32 min24GHz_rssi;
8992 /* the maximum score that a network can have before bonuses */
8993 A_UINT32 initial_score_max;
8994 /* current_connection_bonus:
8995 * only report when there is a network's score this much higher
8996 * than the current connection
8997 */
8998 A_UINT32 current_connection_bonus;
8999 /* score bonus for all networks with the same network flag */
9000 A_UINT32 same_network_bonus;
9001 /* score bonus for networks that are not open */
9002 A_UINT32 secure_bonus;
9003 /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
9004 A_UINT32 band5GHz_bonus;
9005} enlo_candidate_score_params;
9006
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009007typedef struct wmi_nlo_config {
9008 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
9009 A_UINT32 flags;
9010 A_UINT32 vdev_id;
9011 A_UINT32 fast_scan_max_cycles;
9012 A_UINT32 active_dwell_time;
9013 A_UINT32 passive_dwell_time; /* PDT in msecs */
9014 A_UINT32 probe_bundle_size;
9015 A_UINT32 rest_time; /* ART = IRT */
9016 A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
9017 A_UINT32 scan_backoff_multiplier; /* SBM */
9018 A_UINT32 fast_scan_period; /* SCBM */
9019 A_UINT32 slow_scan_period; /* specific to windows */
9020 A_UINT32 no_of_ssids;
9021 A_UINT32 num_of_channels;
9022 A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
9023 /* The TLVs will follow.
9024 * nlo_configured_parameters nlo_list[];
9025 * A_UINT32 channel_list[];
9026 * nlo_channel_prediction_cfg ch_prediction_cfg;
Govind Singh42f71542016-03-14 16:32:33 +05309027 * enlo_candidate_score_params candidate_score_params;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009028 */
9029
9030} wmi_nlo_config_cmd_fixed_param;
9031
9032typedef struct wmi_nlo_event {
9033 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
9034 A_UINT32 vdev_id;
9035} wmi_nlo_event;
9036
9037/* WMI_PASSPOINT_CONFIG_SET
9038 * Sets a list for passpoint networks for PNO purposes;
9039 * it should be matched against any passpoint networks found
9040 * during regular PNO scan.
9041 */
9042#define WMI_PASSPOINT_CONFIG_SET (0x1 << 0)
9043/* WMI_PASSPOINT_CONFIG_RESET
9044 * Reset passpoint network list -
9045 * no Passpoint networks should be matched after this.
9046 */
9047#define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1)
9048#define PASSPOINT_REALM_LEN 256
9049#define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5
9050#define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
9051#define PASSPOINT_PLMN_ID_LEN 3
9052#define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
9053 (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
9054
9055/*
9056 * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
9057 * A_UINT8 realm[PASSPOINT_REALM_LEN]
9058 * array will end on a 4-byte boundary.
9059 * (This 4-byte alignment simplifies endianness-correction byte swapping.)
9060 */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309061A_COMPILE_TIME_ASSERT(check_passpoint_realm_size, (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009062
9063/*
9064 * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
9065 * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
9066 * roaming_consortium_ids array below will end on a 4-byte boundary.
9067 * (This 4-byte alignment simplifies endianness-correction byte swapping.)
9068 */
9069A_COMPILE_TIME_ASSERT(check_passpoint_roaming_consortium_ids_size,
9070((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
9071
9072/* wildcard ID to allow an action (reset) to apply to all networks */
9073#define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
9074typedef struct wmi_passpoint_config {
9075 /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
9076 A_UINT32 tlv_header;
9077 /* (network) id
9078 * identifier of the matched network, report this in event
9079 * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
9080 * that indicates the action should be applied to all networks.
9081 * Currently, the only action that is applied to all networks is "reset".
9082 * If a non-wildcard ID is specified, that particular network is configured.
9083 * If a wildcard ID is specified, all networks are reset.
9084 */
9085 A_UINT32 id;
9086 A_UINT32 req_id;
9087 /*null terminated UTF8 encoded realm, 0 if unspecified*/
9088 A_UINT8 realm[PASSPOINT_REALM_LEN];
9089 /*roaming consortium ids to match, 0s if unspecified*/
9090 A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN];
9091 /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
9092 /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
9093 A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN];
9094} wmi_passpoint_config_cmd_fixed_param;
9095
9096typedef struct {
9097 A_UINT32 tlv_header; /* TLV tag and len; tag equals
9098wmi_passpoint_event_hdr */
9099 A_UINT32 id; /* identifier of the matched network */
9100 A_UINT32 vdev_id;
9101 A_UINT32 timestamp; /* time since boot (in microsecond) when the
9102result was retrieved*/
9103 wmi_ssid ssid;
9104 wmi_mac_addr bssid; /* bssid of the network */
9105 A_UINT32 channel_mhz; /* channel frequency in MHz */
9106 A_UINT32 rssi; /* rssi value */
9107 A_UINT32 rtt; /* timestamp in nanoseconds*/
9108 A_UINT32 rtt_sd; /* standard deviation in rtt */
9109 A_UINT32 beacon_period; /* beacon advertised in the beacon */
9110 A_UINT32 capability; /* capabilities advertised in the beacon */
9111 A_UINT32 ie_length; /* size of the ie_data blob */
9112 A_UINT32 anqp_length; /* length of ANQP blob */
9113 /**
9114 * Following this structure is the byte stream of ie data of length ie_buf_len:
9115 * A_UINT8 ie_data[]; // length in byte given by field ie_length, blob of ie data in beacon
9116 * A_UINT8 anqp_ie[]; // length in byte given by field anqp_len, blob of anqp data of IE
9117 * Implicitly, combing ie_data and anqp_ie into a single bufp, and the bytes
9118 * stream of each ie should be same as BEACON/Action-frm by 802.11 spec
9119 */
9120} wmi_passpoint_event_hdr;
9121
9122#define GTK_OFFLOAD_OPCODE_MASK 0xFF000000
9123/** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
9124#define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000
9125/** Disable GTK offload */
9126#define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000
9127/** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
9128#define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000
9129enum wmi_chatter_mode {
9130 /* Chatter enter/exit happens
9131 * automatically based on preset
9132 * params
9133 */
9134 WMI_CHATTER_MODE_AUTO,
9135 /* Chatter enter is triggered
9136 * manually by the user
9137 */
9138 WMI_CHATTER_MODE_MANUAL_ENTER,
9139 /* Chatter exit is triggered
9140 * manually by the user
9141 */
9142 WMI_CHATTER_MODE_MANUAL_EXIT,
9143 /* Placeholder max value, always last */
9144 WMI_CHATTER_MODE_MAX
9145};
9146
9147enum wmi_chatter_query_type {
9148 /*query coalescing filter match counter */
9149 WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
9150 WMI_CHATTER_QUERY_MAX
9151};
9152
9153typedef struct {
9154 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */
9155 A_UINT32 chatter_mode;
9156} wmi_chatter_set_mode_cmd_fixed_param;
9157
9158/** maximum number of filter supported*/
9159#define CHATTER_MAX_COALESCING_RULES 11
9160/** maximum number of field tests per filter*/
9161#define CHATTER_MAX_FIELD_TEST 5
9162/** maximum field length in number of DWORDS*/
9163#define CHATTER_MAX_TEST_FIELD_LEN32 2
9164
9165/** field test kinds*/
9166#define CHATTER_COALESCING_TEST_EQUAL 1
9167#define CHATTER_COALESCING_TEST_MASKED_EQUAL 2
9168#define CHATTER_COALESCING_TEST_NOT_EQUAL 3
9169
9170/** packet type*/
9171#define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0)
9172#define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1)
9173#define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2)
9174
9175/** coalescing field test*/
9176typedef struct _chatter_pkt_coalescing_hdr_test {
9177 /** offset from start of mac header, for windows native wifi host driver
9178 * should assume standard 802.11 frame format without QoS info and address4
9179 * FW would account for any non-stand fields for final offset value.
9180 */
9181 A_UINT32 offset;
9182 A_UINT32 length; /* length of test field */
9183 A_UINT32 test; /*equal, not equal or masked equal */
9184 A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream */
9185 A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream */
9186} chatter_pkt_coalescing_hdr_test;
9187
9188/** packet coalescing filter*/
9189typedef struct _chatter_pkt_coalescing_filter {
9190 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
9191 A_UINT32 filter_id; /*unique id assigned by OS */
9192 A_UINT32 max_coalescing_delay; /*max miliseconds 1st pkt can be hold */
9193 A_UINT32 pkt_type; /*unicast/multicast/broadcast */
9194 A_UINT32 num_of_test_field; /*number of field test in table */
9195 chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /*field test tbl */
9196} chatter_pkt_coalescing_filter;
9197
9198/** packet coalescing filter add command*/
9199typedef struct {
9200 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
9201 A_UINT32 num_of_filters;
9202 /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
9203 chatter_pkt_coalescing_filter rx_filter[1]; */
9204} wmi_chatter_coalescing_add_filter_cmd_fixed_param;
9205/** packet coalescing filter delete command*/
9206typedef struct {
9207 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
9208 A_UINT32 filter_id; /*filter id which will be deleted */
9209} wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
9210/** packet coalescing query command*/
9211typedef struct {
9212 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
9213 A_UINT32 type; /*type of query */
9214} wmi_chatter_coalescing_query_cmd_fixed_param;
9215/** chatter query reply event*/
9216typedef struct {
9217 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */
9218 A_UINT32 type; /*query type */
9219 A_UINT32 filter_match_cnt; /*coalescing filter match counter */
9220} wmi_chatter_query_reply_event_fixed_param;
9221
9222/* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
9223 * cannot be changed without breaking WMI compatibility. */
9224#define GTK_OFFLOAD_KEK_BYTES 16
9225#define GTK_OFFLOAD_KCK_BYTES 16
9226/* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
9227#define GTK_REPLAY_COUNTER_BYTES 8
9228#define WMI_MAX_KEY_LEN 32
9229#define IGTK_PN_SIZE 6
9230
9231typedef struct {
9232 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
9233 A_UINT32 vdev_id;
9234 /** unique id identifying the VDEV */
9235 A_UINT32 flags; /* status flags */
9236 A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
9237 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
9238 A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
9239 A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
9240 A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
9241 A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
9242} WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
9243
9244typedef struct {
9245 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
9246 A_UINT32 vdev_id; /** unique id identifying the VDEV */
9247 A_UINT32 flags; /* control flags, GTK offload command use high byte */
9248 /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
9249 A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
9250 A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
9251 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
9252} WMI_GTK_OFFLOAD_CMD_fixed_param;
9253
9254typedef struct {
9255 /* TLV tag and len; tag equals
9256 * WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param
9257 */
9258 A_UINT32 tlv_header;
9259 A_UINT32 vdev_id;
9260 A_UINT32 sa_query_retry_interval; /* in msec */
9261 A_UINT32 sa_query_max_retry_count;
9262} WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
9263
9264typedef enum {
9265 WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
9266 WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
9267 WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK */
9268 /* gratuitous ARP req*/
9269 WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4,
9270} WMI_STA_KEEPALIVE_METHOD;
9271
9272typedef struct {
9273 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
9274 WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
9275 WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
9276 wmi_mac_addr dest_mac_addr; /* destination MAC address */
9277} WMI_STA_KEEPALVE_ARP_RESPONSE;
9278
9279typedef struct {
9280 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
9281 A_UINT32 vdev_id;
9282 A_UINT32 enable; /* 1 - Enable, 0 - disable */
9283 A_UINT32 method; /* keep alive method */
9284 A_UINT32 interval; /* time interval in seconds */
9285 /*
9286 * NOTE: following this structure is the TLV for ARP Resonse:
9287 * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; // ARP response
9288 */
9289} WMI_STA_KEEPALIVE_CMD_fixed_param;
9290
9291typedef struct {
9292 A_UINT32 tlv_header;
9293 A_UINT32 vdev_id;
9294 A_UINT32 action;
9295} WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
9296typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
9297
9298typedef struct {
9299 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
9300 A_UINT32 vdev_id;
9301 A_UINT32 keepaliveInterval; /* seconds */
9302 A_UINT32 keepaliveMethod;
9303} wmi_vdev_set_keepalive_cmd_fixed_param;
9304
9305typedef struct {
9306 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
9307 A_UINT32 vdev_id;
9308} wmi_vdev_get_keepalive_cmd_fixed_param;
9309
9310typedef struct {
9311 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
9312 A_UINT32 vdev_id;
9313 A_UINT32 keepaliveInterval; /* seconds */
9314 A_UINT32 keepaliveMethod; /* seconds */
9315} wmi_vdev_get_keepalive_event_fixed_param;
9316
9317#define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
9318#define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
9319
9320typedef struct {
9321 A_UINT32 tlv_header;
9322 A_UINT32 vdev_id;
9323 A_UINT32 action;
9324} WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
9325
9326typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param
9327WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
9328
9329typedef struct {
9330 A_UINT32 tlv_header;
9331 A_UINT32 vdev_id;
9332 A_UINT32 mcc_tbttmode;
9333 wmi_mac_addr mcc_bssid;
9334} wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
9335
9336typedef struct {
9337 A_UINT32 tlv_header;
9338 A_UINT32 vdev_id; /* home vdev id */
9339 A_UINT32 meas_token; /* from measure request frame */
9340 A_UINT32 dialog_token;
9341 A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
9342 A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst */
9343 A_UINT32 burst_cycle; /* times cycle through within one burst */
9344 A_UINT32 tx_power; /* for path frame */
9345 A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */
9346 wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
9347 A_UINT32 num_chans;
9348} wmi_vdev_plmreq_start_cmd_fixed_param;
9349
9350typedef struct {
9351 A_UINT32 tlv_header;
9352 A_UINT32 vdev_id;
9353 A_UINT32 meas_token; /* same value from req */
9354} wmi_vdev_plmreq_stop_cmd_fixed_param;
9355
9356typedef struct {
9357 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */
9358 A_UINT32 tlv_header;
9359 /* unique id identifying the VDEV, generated by the caller */
9360 A_UINT32 vdev_id;
9361 /* enable/disable NoA */
9362 A_UINT32 enable;
9363 /** number of NoA desc. In the TLV noa_descriptor[] */
9364 A_UINT32 num_noa;
9365 /**
9366 * TLV (tag length value ) paramerters follow the pattern structure.
9367 * TLV contain NoA desc with num of num_noa
9368 */
9369} wmi_p2p_set_noa_cmd_fixed_param;
9370
9371typedef struct {
9372 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */
9373 A_UINT32 tlv_header;
9374 /* unique id identifying the VDEV, generated by the caller */
9375 A_UINT32 vdev_id;
9376 /* Identify the wlan module */
9377 A_UINT32 module_id;
9378 /* Num of test arguments passed */
9379 A_UINT32 num_args;
9380/**
9381 * TLV (tag length value ) parameters follow the wmi_roam_chan_list
9382 * structure. The TLV's are:
9383 * A_UINT32 args[];
9384 **/
9385} wmi_unit_test_cmd_fixed_param;
9386
9387/** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
9388 * after it received WMI_ROAM_SYNCH_EVENTID.
9389 */
9390typedef struct {
9391 A_UINT32 tlv_header;
9392 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
9393 /** unique id identifying the VDEV, generated by the caller */
9394 A_UINT32 vdev_id;
9395} wmi_roam_synch_complete_fixed_param;
9396
9397typedef enum {
9398 RECOVERY_SIM_ASSERT = 0x01,
9399 RECOVERY_SIM_NO_DETECT = 0x02,
9400 RECOVERY_SIM_CTR_EP_FULL = 0x03,
9401 RECOVERY_SIM_EMPTY_POINT = 0x04,
9402 RECOVERY_SIM_STACK_OV = 0x05,
9403 RECOVERY_SIM_INFINITE_LOOP = 0x06,
9404 RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
9405 RECOVERY_SIM_SELF_RECOVERY = 0x08,
9406} RECOVERY_SIM_TYPE;
9407
9408/* WMI_FORCE_FW_HANG_CMDID */
9409typedef struct {
9410 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
9411 A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:... */
9412 A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms) */
9413} WMI_FORCE_FW_HANG_CMD_fixed_param;
9414#define WMI_MCAST_FILTER_SET 1
9415#define WMI_MCAST_FILTER_DELETE 2
9416typedef struct {
9417 A_UINT32 tlv_header;
9418 A_UINT32 vdev_id;
9419 A_UINT32 index;
9420 A_UINT32 action;
9421 wmi_mac_addr mcastbdcastaddr;
9422} WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
9423
9424/* GPIO Command and Event data structures */
9425
9426/* WMI_GPIO_CONFIG_CMDID */
9427enum {
9428 WMI_GPIO_PULL_NONE,
9429 WMI_GPIO_PULL_UP,
9430 WMI_GPIO_PULL_DOWN,
9431};
9432
9433enum {
9434 WMI_GPIO_INTTYPE_DISABLE,
9435 WMI_GPIO_INTTYPE_RISING_EDGE,
9436 WMI_GPIO_INTTYPE_FALLING_EDGE,
9437 WMI_GPIO_INTTYPE_BOTH_EDGE,
9438 WMI_GPIO_INTTYPE_LEVEL_LOW,
9439 WMI_GPIO_INTTYPE_LEVEL_HIGH
9440};
9441
9442typedef struct {
9443 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
9444 A_UINT32 gpio_num; /* GPIO number to be setup */
9445 A_UINT32 input; /* 0 - Output/ 1 - Input */
9446 A_UINT32 pull_type; /* Pull type defined above */
9447 A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
9448} wmi_gpio_config_cmd_fixed_param;
9449
9450/* WMI_GPIO_OUTPUT_CMDID */
9451typedef struct {
9452 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
9453 A_UINT32 gpio_num; /* GPIO number to be setup */
9454 A_UINT32 set; /* Set the GPIO pin */
9455} wmi_gpio_output_cmd_fixed_param;
9456
9457/* WMI_GPIO_INPUT_EVENTID */
9458typedef struct {
9459 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
9460 A_UINT32 gpio_num; /* GPIO number which changed state */
9461} wmi_gpio_input_event_fixed_param;
9462
9463/* WMI_P2P_DISC_EVENTID */
9464enum {
9465 P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
9466 P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
9467};
9468
9469enum {
9470 P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload */
9471 P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload */
9472 P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload */
9473};
9474
9475enum {
9476 P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
9477 P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
9478};
9479
9480typedef struct {
9481 A_UINT32 vdev_id;
9482 A_UINT32 reason; /* P2P DISC wake up reason */
9483} wmi_p2p_disc_event;
9484
9485typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param
9486WOW_EVENT_INFO_SECTION_GTKIGTK;
9487
9488typedef enum {
9489 WMI_FAKE_TXBFER_SEND_NDPA,
9490 WMI_FAKE_TXBFER_SEND_MU,
9491 WMI_FAKE_TXBFER_NDPA_FBTYPE,
9492 WMI_FAKE_TXBFER_NDPA_NCIDX,
9493 WMI_FAKE_TXBFER_NDPA_POLL,
9494 WMI_FAKE_TXBFER_NDPA_BW,
9495 WMI_FAKE_TXBFER_NDPA_PREAMBLE,
9496 WMI_FAKE_TXBFER_NDPA_RATE,
9497 WMI_FAKE_TXBFER_NDP_BW,
9498 WMI_FAKE_TXBFER_NDP_NSS,
9499 WMI_TXBFEE_ENABLE_UPLOAD_H,
9500 WMI_TXBFEE_ENABLE_CAPTURE_H,
9501 WMI_TXBFEE_SET_CBF_TBL,
9502 WMI_TXBFEE_CBF_TBL_LSIG,
9503 WMI_TXBFEE_CBF_TBL_SIGA1,
9504 WMI_TXBFEE_CBF_TBL_SIGA2,
9505 WMI_TXBFEE_CBF_TBL_SIGB,
9506 WMI_TXBFEE_CBF_TBL_PAD,
9507 WMI_TXBFEE_CBF_TBL_DUR,
9508 WMI_TXBFEE_SU_NCIDX,
9509 WMI_TXBFEE_CBIDX,
9510 WMI_TXBFEE_NGIDX,
9511} WMI_TXBF_PARAM_ID;
9512
9513typedef struct {
9514 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
9515 /** parameter id */
9516 A_UINT32 param_id;
9517 /** parameter value */
9518 A_UINT32 param_value;
9519} wmi_txbf_cmd_fixed_param;
9520
9521typedef struct {
9522 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
9523 A_UINT32 h_length;
9524 A_UINT32 cv_length;
9525 /* This TLV is followed by array of bytes:
9526 * // h_cv info buffer
9527 * A_UINT8 bufp[];
9528 */
9529} wmi_upload_h_hdr;
9530
9531typedef struct {
9532 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
9533 A_UINT32 svd_num;
9534 A_UINT32 tone_num;
9535 A_UINT32 reserved;
9536} wmi_capture_h_event_hdr;
9537
9538typedef struct {
9539 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
9540 A_UINT32 start_freq; /* start frequency, not channel center freq */
9541 A_UINT32 end_freq; /* end frequency */
9542} wmi_avoid_freq_range_desc;
9543
9544typedef struct {
9545 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
9546 /* bad channel range count, multi range is allowed, 0 means all channel clear */
9547 A_UINT32 num_freq_ranges;
9548
9549 /* The TLVs will follow.
9550 * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
9551 * wmi_avoid_freq_range_desc avd_freq_range[]; // message buffer, NULL terminated
9552 */
9553} wmi_avoid_freq_ranges_event_fixed_param;
9554
9555typedef struct {
9556 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */
9557 /** Reserved for future use */
9558 A_UINT32 reserved0;
9559 A_UINT32 vdev_id;
9560} wmi_gtk_rekey_fail_event_fixed_param;
9561
9562enum wmm_ac_downgrade_policy {
9563 WMM_AC_DOWNGRADE_DEPRIO,
9564 WMM_AC_DOWNGRADE_DROP,
9565 WMM_AC_DOWNGRADE_INVALID,
9566};
9567
9568typedef struct {
9569 A_UINT32 tlv_header;
9570 A_UINT32 cwmin;
9571 A_UINT32 cwmax;
9572 A_UINT32 aifs;
9573 A_UINT32 txoplimit;
9574 A_UINT32 acm;
9575 A_UINT32 no_ack;
9576} wmi_wmm_vparams;
9577
9578typedef struct {
9579 A_UINT32 tlv_header;
9580 A_UINT32 vdev_id;
9581 wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
9582} wmi_vdev_set_wmm_params_cmd_fixed_param;
9583
9584typedef struct {
9585 A_UINT32 tlv_header;
9586 A_UINT32 vdev_id;
9587 A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */
9588 A_UINT32 userGtxMask; /* host request for GTX mask */
9589 A_UINT32 gtxPERThreshold; /* default: 10% */
9590 A_UINT32 gtxPERMargin; /* default: 2% */
9591 A_UINT32 gtxTPCstep; /* default: 1 */
9592 A_UINT32 gtxTPCMin; /* default: 5 */
9593 A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */
9594} wmi_vdev_set_gtx_params_cmd_fixed_param;
9595
9596typedef struct {
9597 A_UINT32 tlv_header;
9598 A_UINT32 vdev_id;
9599 A_UINT32 ac;
9600 A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
9601 A_UINT32 downgrade_type;
9602} wmi_vdev_wmm_addts_cmd_fixed_param;
9603
9604typedef struct {
9605 A_UINT32 tlv_header;
9606 A_UINT32 vdev_id;
9607 A_UINT32 ac;
9608} wmi_vdev_wmm_delts_cmd_fixed_param;
9609
Govind Singh869c9872016-02-22 18:36:34 +05309610/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009611typedef struct {
9612 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */
9613 /** Reserved for future use */
9614 A_UINT32 reserved0;
9615} wmi_pdev_dfs_enable_cmd_fixed_param;
9616
Govind Singh869c9872016-02-22 18:36:34 +05309617/* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009618typedef struct {
9619 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 +05309620 /** pdev_id for identifying the MAC
9621 * See macros starting with WMI_PDEV_ID_ for values.
9622 */
9623 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009624} wmi_pdev_dfs_disable_cmd_fixed_param;
9625
9626typedef struct {
9627 /** TLV tag and len; tag equals
9628 * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
9629 */
9630 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +05309631 /** pdev_id for identifying the MAC
9632 * See macros starting with WMI_PDEV_ID_ for values.
9633 */
9634 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009635} wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
9636
9637typedef struct {
9638 /** TLV tag and len; tag equals
9639 * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
9640 */
9641 A_UINT32 tlv_header;
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +05309642 /** pdev_id for identifying the MAC
9643 * See macros starting with WMI_PDEV_ID_ for values.
9644 */
9645 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009646} wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
9647
9648/** TDLS COMMANDS */
9649
9650/* WMI_TDLS_SET_STATE_CMDID */
9651/* TDLS State */
9652enum wmi_tdls_state {
9653 /** TDLS disable */
9654 WMI_TDLS_DISABLE,
9655 /** TDLS enabled - no firmware connection tracking/notifications */
9656 WMI_TDLS_ENABLE_PASSIVE,
9657 /** TDLS enabled - with firmware connection tracking/notifications */
9658 WMI_TDLS_ENABLE_ACTIVE,
9659 /* TDLS enabled - firmware waits for peer mac for connection tracking */
9660 WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +05309661 /** TDLS enabled - TDLS connection tracking is done in host */
9662 WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009663};
9664
9665/* TDLS Options */
9666#define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */
9667#define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */
9668#define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */
9669
9670typedef struct {
9671 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */
9672 A_UINT32 tlv_header;
9673 /** unique id identifying the VDEV */
9674 A_UINT32 vdev_id;
9675 /** Enable/Disable TDLS (wmi_tdls_state) */
9676 A_UINT32 state;
9677 /* Duration (in ms) over which to calculate tx/rx threshold
9678 * to trigger TDLS Discovery
9679 */
9680 A_UINT32 notification_interval_ms;
9681 /** number of packets OVER which notify/suggest TDLS Discovery:
9682 * if current tx pps counter / notification interval >= threshold
9683 * then a notification will be sent to host to advise TDLS Discovery */
9684 A_UINT32 tx_discovery_threshold;
9685 /** number of packets UNDER which notify/suggest TDLS Teardown:
9686 * if current tx pps counter / notification interval < threshold
9687 * then a notification will be sent to host to advise TDLS Tear down */
9688 A_UINT32 tx_teardown_threshold;
9689 /** Absolute RSSI value under which notify/suggest TDLS Teardown */
9690 A_INT32 rssi_teardown_threshold;
9691 /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
9692 A_INT32 rssi_delta;
9693 /** TDLS Option Control
9694 * Off-Channel, Buffer STA, (later)Sleep STA support */
9695 A_UINT32 tdls_options;
9696 /* Buffering time in number of beacon intervals */
9697 A_UINT32 tdls_peer_traffic_ind_window;
9698 /* Wait time for PTR frame */
9699 A_UINT32 tdls_peer_traffic_response_timeout_ms;
9700 /* Self PUAPSD mask */
9701 A_UINT32 tdls_puapsd_mask;
9702 /* Inactivity timeout */
9703 A_UINT32 tdls_puapsd_inactivity_time_ms;
9704 /* Max of rx frame during SP */
9705 A_UINT32 tdls_puapsd_rx_frame_threshold;
9706 /* Duration (in ms) over which to check whether TDLS link
9707 * needs to be torn down
9708 */
9709 A_UINT32 teardown_notification_ms;
9710 /* STA kickout threshold for TDLS peer */
9711 A_UINT32 tdls_peer_kickout_threshold;
9712} wmi_tdls_set_state_cmd_fixed_param;
9713
9714/* WMI_TDLS_PEER_UPDATE_CMDID */
9715
9716enum wmi_tdls_peer_state {
9717 /** tx peer TDLS link setup now starting, traffic to DA should be
9718 * paused (except TDLS frames) until state is moved to CONNECTED (or
9719 * TEARDOWN on setup failure) */
9720 WMI_TDLS_PEER_STATE_PEERING,
9721 /** tx peer TDLS link established, running (all traffic to DA unpaused) */
9722 WMI_TDLS_PEER_STATE_CONNECTED,
9723 /** tx peer TDLS link tear down started (link paused, any frames
9724 * queued for DA will be requeued back through the AP)*/
9725 WMI_TDLS_PEER_STATE_TEARDOWN,
9726 /* Add peer mac into connection table */
9727 WMI_TDLS_PEER_ADD_MAC_ADDR,
9728 /* Remove peer mac from connection table */
9729 WMI_TDLS_PEER_REMOVE_MAC_ADDR,
9730};
9731
9732/* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
9733#define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
9734typedef struct {
9735 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */
9736 A_UINT32 tlv_header;
9737 /* Peer's QoS Info - for U-APSD */
9738 /* AC FLAGS - accessed through macros below */
9739 /* Ack, SP, More Data Ack - accessed through macros below */
9740 A_UINT32 peer_qos;
9741 /*TDLS Peer's U-APSD Buffer STA Support */
9742 A_UINT32 buff_sta_support;
9743 /*TDLS off channel related params */
9744 A_UINT32 off_chan_support;
9745 A_UINT32 peer_curr_operclass;
9746 A_UINT32 self_curr_operclass;
9747 /* Number of channels available for off channel operation */
9748 A_UINT32 peer_chan_len;
9749 A_UINT32 peer_operclass_len;
9750 A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
9751 /* Is peer initiator or responder of TDLS setup request */
9752 A_UINT32 is_peer_responder;
9753 /* Preferred off channel number as configured by user */
9754 A_UINT32 pref_offchan_num;
9755 /* Preferred off channel bandwidth as configured by user */
9756 A_UINT32 pref_offchan_bw;
9757
9758 /** Followed by the variable length TLV peer_chan_list:
9759 * wmi_channel peer_chan_list[].
9760 * Array size would be peer_chan_len.
9761 * This array is intersected channels which is supported by both peer
9762 * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
9763 * FW shall compute BW for an offchan based on peer's ht/vht cap
9764 * received in peer_assoc cmd during change STA operation
9765 */
9766} wmi_tdls_peer_capabilities;
9767
9768#define WMI_TDLS_QOS_VO_FLAG 0
9769#define WMI_TDLS_QOS_VI_FLAG 1
9770#define WMI_TDLS_QOS_BK_FLAG 2
9771#define WMI_TDLS_QOS_BE_FLAG 3
9772#define WMI_TDLS_QOS_ACK_FLAG 4
9773#define WMI_TDLS_QOS_SP_FLAG 5
9774#define WMI_TDLS_QOS_MOREDATA_FLAG 7
9775
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309776#define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009777 (ppeer_caps)->peer_qos |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309778} while (0)
9779#define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009780 (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
9781
9782#define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
9783 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
9784#define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
9785 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
9786#define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
9787 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
9788#define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
9789 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
9790#define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
9791 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
9792#define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
9793 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
9794#define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
9795 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
9796#define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
9797 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
9798#define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
9799 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
9800#define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
9801 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
9802/* SP has 2 bits */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309803#define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009804 (ppeer_caps)->peer_qos |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309805} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009806#define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
9807 (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
9808
9809#define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
9810 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
9811#define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
9812 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
9813
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309814#define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009815 (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309816} while (0)
9817#define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009818 (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
9819
9820#define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
9821 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
9822#define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
9823 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
9824#define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
9825 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
9826#define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
9827 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
9828#define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
9829 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
9830#define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
9831 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
9832#define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
9833 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
9834#define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
9835 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
9836#define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
9837 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
9838#define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
9839 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
9840/* SP has 2 bits */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309841#define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009842 (pset_cmd)->tdls_puapsd_mask |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309843} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009844#define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
9845 (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
9846
9847#define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
9848 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
9849#define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
9850 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
9851
9852typedef struct {
9853 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */
9854 A_UINT32 tlv_header;
9855 /** unique id identifying the VDEV */
9856 A_UINT32 vdev_id;
9857 /** peer MAC address */
9858 wmi_mac_addr peer_macaddr;
9859 /** new TDLS state for peer (wmi_tdls_peer_state) */
9860 A_UINT32 peer_state;
9861 /* The TLV for wmi_tdls_peer_capabilities will follow.
9862 * wmi_tdls_peer_capabilities peer_caps;
9863 */
9864 /** Followed by the variable length TLV chan_info:
9865 * wmi_channel chan_info[] */
9866} wmi_tdls_peer_update_cmd_fixed_param;
9867
9868/* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
9869
9870/* bitmap 20, 40, 80 or 160 MHz wide channel */
9871#define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */
9872#define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */
9873#define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */
9874#define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */
9875
9876enum wmi_tdls_offchan_mode {
9877 WMI_TDLS_ENABLE_OFFCHANNEL,
9878 WMI_TDLS_DISABLE_OFFCHANNEL
9879};
9880
9881typedef struct {
9882 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */
9883 A_UINT32 tlv_header;
9884 /** unique id identifying the VDEV */
9885 A_UINT32 vdev_id;
9886 /** Enable/Disable TDLS offchannel */
9887 A_UINT32 offchan_mode;
9888 /** peer MAC address */
9889 wmi_mac_addr peer_macaddr;
9890 /* Is peer initiator or responder of TDLS setup request */
9891 A_UINT32 is_peer_responder;
9892 /* off channel number */
9893 A_UINT32 offchan_num;
9894 /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
9895 A_UINT32 offchan_bw_bitmap;
9896 /* operating class for offchan */
9897 A_UINT32 offchan_oper_class;
9898} wmi_tdls_set_offchan_mode_cmd_fixed_param;
9899
9900/** TDLS EVENTS */
9901enum wmi_tdls_peer_notification {
9902 /** tdls discovery recommended for peer (based
9903 * on tx bytes per second > tx_discover threshold) */
9904 WMI_TDLS_SHOULD_DISCOVER,
9905 /** tdls link tear down recommended for peer
9906 * due to tx bytes per second below tx_teardown_threshold
9907 * NB: this notification sent once */
9908 WMI_TDLS_SHOULD_TEARDOWN,
9909 /** tx peer TDLS link tear down complete */
9910 WMI_TDLS_PEER_DISCONNECTED,
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +05309911 /** TDLS/BT role change notification for connection tracker */
9912 WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009913};
9914
9915enum wmi_tdls_peer_reason {
9916 /** tdls teardown recommended due to low transmits */
9917 WMI_TDLS_TEARDOWN_REASON_TX,
9918 /** tdls link tear down recommended due to poor RSSI */
9919 WMI_TDLS_TEARDOWN_REASON_RSSI,
9920 /** tdls link tear down recommended due to offchannel scan */
9921 WMI_TDLS_TEARDOWN_REASON_SCAN,
9922 /** tdls peer disconnected due to peer deletion */
9923 WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
9924 /** tdls peer disconnected due to PTR timeout */
9925 WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
9926 /** tdls peer disconnected due wrong PTR format */
9927 WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
9928 /** tdls peer not responding */
9929 WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
Sreelakshmi Konamki8fd1bfd2016-03-08 11:06:50 +05309930 /*
9931 * tdls entered buffer STA role, TDLS connection tracker
9932 * needs to handle this
9933 */
9934 WMI_TDLS_ENTER_BUF_STA,
9935 /*
9936 * tdls exited buffer STA role, TDLS connection tracker
9937 * needs to handle this
9938 */
9939 WMI_TDLS_EXIT_BUF_STA,
9940 /* BT entered busy mode, TDLS connection tracker needs to handle this */
9941 WMI_TDLS_ENTER_BT_BUSY_MODE,
9942 /** BT exited busy mode, TDLS connection tracker needs to handle this */
9943 WMI_TDLS_EXIT_BT_BUSY_MODE,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009944};
9945
9946/* WMI_TDLS_PEER_EVENTID */
9947typedef struct {
9948 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */
9949 A_UINT32 tlv_header;
9950 /** peer MAC address */
9951 wmi_mac_addr peer_macaddr;
9952 /** TDLS peer status (wmi_tdls_peer_notification)*/
9953 A_UINT32 peer_status;
9954 /** TDLS peer reason (wmi_tdls_peer_reason) */
9955 A_UINT32 peer_reason;
9956 /** unique id identifying the VDEV */
9957 A_UINT32 vdev_id;
9958} wmi_tdls_peer_event_fixed_param;
9959
9960/* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
9961 don't use this for any new implementations */
9962typedef struct {
9963 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */
9964 /** unique id identifying the VDEV, generated by the caller */
9965 A_UINT32 vdev_id;
9966 /* New beacon interval to be used for the specified VDEV suggested by firmware */
9967 A_UINT32 new_bcn_intvl;
9968} wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
9969
9970/* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
9971typedef struct {
9972 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
9973 A_UINT32 tlv_header;
9974 /** 1: enable fw based adaptive ocs,
9975 * 0: disable fw based adaptive ocs
9976 */
9977 A_UINT32 enable;
9978 /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
Govind Singh869c9872016-02-22 18:36:34 +05309979 union {
9980 /* OBSOLETE - will be removed once all refs are gone */
9981 A_UINT32 mac_id;
9982 /** pdev_id for identifying the MAC
9983 * See macros starting with WMI_PDEV_ID_ for values.
9984 */
9985 A_UINT32 pdev_id;
9986 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009987} wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
9988
9989/* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
9990typedef struct {
9991 /* Frequency of the channel for which the quota is set */
9992 A_UINT32 chan_mhz;
9993 /* Requested channel time quota expressed as percentage */
9994 A_UINT32 channel_time_quota;
9995} wmi_resmgr_chan_time_quota;
9996
9997typedef struct {
9998 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
9999 A_UINT32 tlv_header;
10000 /** number of channel time quota command structures
10001 * (wmi_resmgr_chan_time_quota) 1 or 2
10002 */
10003 A_UINT32 num_chans;
10004/* This TLV is followed by another TLV of array of bytes
10005 * A_UINT8 data[];
10006 * This data array contains
10007 * num_chans * size of(struct wmi_resmgr_chan_time_quota)
10008 */
10009} wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
10010
10011/* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
10012typedef struct {
10013 /* Frequency of the channel for which the latency is set */
10014 A_UINT32 chan_mhz;
10015 /* Requested channel latency in milliseconds */
10016 A_UINT32 latency;
10017} wmi_resmgr_chan_latency;
10018
10019typedef struct {
10020 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
10021 A_UINT32 tlv_header;
10022 /** number of channel latency command structures
10023 * (wmi_resmgr_chan_latency) 1 or 2
10024 */
10025 A_UINT32 num_chans;
10026/* This TLV is followed by another TLV of array of bytes
10027 * A_UINT8 data[];
10028 * This data array contains
10029 * num_chans * size of(struct wmi_resmgr_chan_latency)
10030 */
10031} wmi_resmgr_set_chan_latency_cmd_fixed_param;
10032
10033/* WMI_STA_SMPS_FORCE_MODE_CMDID */
10034
10035/** STA SMPS Forced Mode */
10036typedef enum {
10037 WMI_SMPS_FORCED_MODE_NONE = 0,
10038 WMI_SMPS_FORCED_MODE_DISABLED,
10039 WMI_SMPS_FORCED_MODE_STATIC,
10040 WMI_SMPS_FORCED_MODE_DYNAMIC
10041} wmi_sta_smps_forced_mode;
10042
10043typedef struct {
10044 /** TLV tag and len; tag equals
10045 * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
10046 A_UINT32 tlv_header;
10047 /** Unique id identifying the VDEV */
10048 A_UINT32 vdev_id;
10049 /** The mode of SMPS that is to be forced in the FW. */
10050 A_UINT32 forced_mode;
10051} wmi_sta_smps_force_mode_cmd_fixed_param;
10052
10053/** wlan HB commands */
10054#define WMI_WLAN_HB_ITEM_UDP 0x1
10055#define WMI_WLAN_HB_ITEM_TCP 0x2
10056#define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE, must be a multiple of 4 bytes */
10057
10058typedef struct {
10059 /** TLV tag and len; tag equals
10060 * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
10061 A_UINT32 tlv_header;
10062 A_UINT32 vdev_id;
10063 A_UINT32 enable;
10064 A_UINT32 item;
10065 A_UINT32 session;
10066} wmi_hb_set_enable_cmd_fixed_param;
10067
10068typedef struct {
10069 /** TLV tag and len; tag equals
10070 * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
10071 A_UINT32 tlv_header;
10072 A_UINT32 vdev_id;
10073 A_UINT32 srv_ip;
10074 A_UINT32 dev_ip;
10075 A_UINT32 seq;
10076 A_UINT32 src_port;
10077 A_UINT32 dst_port;
10078 A_UINT32 interval;
10079 A_UINT32 timeout;
10080 A_UINT32 session;
10081 wmi_mac_addr gateway_mac;
10082} wmi_hb_set_tcp_params_cmd_fixed_param;
10083
10084typedef struct {
10085 /** TLV tag and len; tag equals
10086 * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
10087 A_UINT32 tlv_header;
10088 A_UINT32 vdev_id;
10089 A_UINT32 length;
10090 A_UINT32 offset;
10091 A_UINT32 session;
10092 A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
10093} wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
10094
10095typedef struct {
10096 /** TLV tag and len; tag equals
10097 * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
10098 A_UINT32 tlv_header;
10099 A_UINT32 vdev_id;
10100 A_UINT32 srv_ip;
10101 A_UINT32 dev_ip;
10102 A_UINT32 src_port;
10103 A_UINT32 dst_port;
10104 A_UINT32 interval;
10105 A_UINT32 timeout;
10106 A_UINT32 session;
10107 wmi_mac_addr gateway_mac;
10108} wmi_hb_set_udp_params_cmd_fixed_param;
10109
10110typedef struct {
10111 /** TLV tag and len; tag equals
10112 * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
10113 A_UINT32 tlv_header;
10114 A_UINT32 vdev_id;
10115 A_UINT32 length;
10116 A_UINT32 offset;
10117 A_UINT32 session;
10118 A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
10119} wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
10120
10121/** wlan HB events */
10122typedef enum {
10123 WMI_WLAN_HB_REASON_UNKNOWN = 0,
10124 WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1,
10125 WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2,
10126} WMI_HB_WAKEUP_REASON;
10127
10128typedef struct {
10129 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
10130 A_UINT32 vdev_id; /* unique id identifying the VDEV */
10131 A_UINT32 session; /* Session ID from driver */
10132 A_UINT32 reason; /* wakeup reason */
10133} wmi_hb_ind_event_fixed_param;
10134
10135/** WMI_STA_SMPS_PARAM_CMDID */
10136typedef enum {
10137 /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
10138 WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
10139 /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
10140 * to enter D-SMPS mode from Stalled-D-SMPS mode */
10141 WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
10142 /** RSSI threshold to disable SMPS modes */
10143 WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
10144 /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
10145 WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
10146 /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
10147 WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
10148 /** Enable/Disable DTIM 1chRx feature */
10149 WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5
10150} wmi_sta_smps_param;
10151
10152typedef struct {
10153 /** TLV tag and len; tag equals
10154 * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
10155 A_UINT32 tlv_header;
10156 /** Unique id identifying the VDEV */
10157 A_UINT32 vdev_id;
10158 /** SMPS parameter (see wmi_sta_smps_param) */
10159 A_UINT32 param;
10160 /** Value of SMPS parameter */
10161 A_UINT32 value;
10162} wmi_sta_smps_param_cmd_fixed_param;
10163
10164typedef struct {
10165 /** TLV tag and len; tag equals
10166 * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
10167 A_UINT32 tlv_header;
10168 /* TX stats */
10169 A_UINT32 txBytesPushed;
10170 A_UINT32 txPacketsPushed;
10171 /* RX stats */
10172 A_UINT32 rxBytesRcvd;
10173 A_UINT32 rxPacketsRcvd;
10174 A_UINT32 rxTimeTotal;
10175 /** peer MAC address */
10176 wmi_mac_addr peer_macaddr;
10177} wmi_mcc_sched_sta_traffic_stats;
10178
10179typedef struct {
10180 /** TLV tag and len; tag equals
10181 * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
10182 A_UINT32 tlv_header;
10183 /** Duration over which the host stats were collected */
10184 A_UINT32 duration;
10185 /** Number of stations filled in following stats array */
10186 A_UINT32 num_sta;
10187 /* Following this struct are the TLVs:
10188 * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
10189 */
10190} wmi_mcc_sched_traffic_stats_cmd_fixed_param;
10191
10192typedef struct {
10193 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
10194 /* unique id identifying the VDEV, generated by the caller */
10195 A_UINT32 vdev_id;
10196 /*Batch scan enable command parameters */
10197 A_UINT32 scanInterval;
10198 A_UINT32 numScan2Batch;
10199 A_UINT32 bestNetworks;
10200 A_UINT32 rfBand;
10201 A_UINT32 rtt;
10202} wmi_batch_scan_enable_cmd_fixed_param;
10203
10204typedef struct {
10205 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */
10206 A_UINT32 supportedMscan;
10207} wmi_batch_scan_enabled_event_fixed_param;
10208
10209typedef struct {
10210 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
10211/* unique id identifying the VDEV, generated by the caller */
10212 A_UINT32 vdev_id;
10213 A_UINT32 param;
10214} wmi_batch_scan_disable_cmd_fixed_param;
10215
10216typedef struct {
10217 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
10218 /** unique id identifying the VDEV, generated by the caller */
10219 A_UINT32 vdev_id;
10220 A_UINT32 param;
10221} wmi_batch_scan_trigger_result_cmd_fixed_param;
10222
10223typedef struct {
10224 A_UINT32 tlv_header;
10225 wmi_mac_addr bssid; /* BSSID */
10226 wmi_ssid ssid; /* SSID */
10227 A_UINT32 ch; /* Channel */
10228 A_UINT32 rssi; /* RSSI or Level */
10229 /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
10230 A_UINT32 timestamp;
10231} wmi_batch_scan_result_network_info;
10232
10233typedef struct {
10234 A_UINT32 tlv_header;
10235 A_UINT32 scanId; /* Scan List ID. */
10236 /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
10237 A_UINT32 numNetworksInScanList;
10238 A_UINT32 netWorkStartIndex; /* indicate the start index of network info */
10239} wmi_batch_scan_result_scan_list;
10240
10241#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.*/
10242#define LPI_IE_BITMAP_IS_PROBE 0x00000002 /*send true or false based on scan response frame being a Probe Rsp or not*/
10243#define LPI_IE_BITMAP_SSID 0x00000004 /*send ssid from received scan response frame*/
10244#define LPI_IE_BITMAP_RSSI 0x00000008 /* end RSSI value reported by HW for the received scan response after adjusting with noise floor*/
10245#define LPI_IE_BITMAP_CHAN 0x00000010 /*send channel number from the received scan response*/
10246#define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* sen Tx power from TPC IE of scan rsp*/
10247#define LPI_IE_BITMAP_TX_RATE 0x00000040 /*send rate of the received frame as reported by HW.*/
10248#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.*/
10249#define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /*send timestamp reported in the received scan rsp frame.*/
10250#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.*/
10251/*
10252 * TEMPORARY alias of incorrect old name the correct name.
10253 * This alias will be removed once all references to the old name have been fixed.
10254 */
10255#define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
10256#define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false.*/
10257#define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP*/
10258#define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled*/
10259#define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device.*/
10260#define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel*/
10261#define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received.*/
10262#define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz*/
10263#define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above*/
10264#define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations*/
10265#define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan*/
10266#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.*/
10267#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*/
10268#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 +053010269/*
10270 * extscan will use this field to indicate to
10271 * LOWI LP whether to report result to context hub or not
10272 */
10273#define LPI_IE_BITMAP_REPORT_CONTEXT_HUB 0x00800000
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010274#define LPI_IE_BITMAP_ALL 0xFFFFFFFF
10275
10276typedef struct {
10277 A_UINT32 tlv_header;
10278 /**A_BOOL indicates LPI mgmt snooping enable/disable*/
10279 A_UINT32 enable;
10280 /**LPI snooping mode*/
10281 A_UINT32 snooping_mode;
10282 /** LPI interested IEs in snooping context */
10283 A_UINT32 ie_bitmap;
10284} wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
10285
10286typedef struct {
10287 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
10288 /** Scan ID */
10289 A_UINT32 scan_id;
10290 /** Scan requestor ID */
10291 A_UINT32 scan_req_id;
10292 /** VDEV id(interface) that is requesting scan */
10293 A_UINT32 vdev_id;
10294 /** LPI interested IEs in scan context */
10295 A_UINT32 ie_bitmap;
10296 /** Scan Priority, input to scan scheduler */
10297 A_UINT32 scan_priority;
10298 /** dwell time in msec on active channels */
10299 A_UINT32 dwell_time_active;
10300 /** dwell time in msec on passive channels */
10301 A_UINT32 dwell_time_passive;
10302 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
10303 A_UINT32 min_rest_time;
10304 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
10305 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
10306 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
10307 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
10308 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
10309 * irrespective of activity. activity is determined by the idle_time parameter.
10310 */
10311 A_UINT32 max_rest_time;
10312 /** time before sending next set of probe requests.
10313 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
10314 * The number of probe requests specified depends on the ssid_list and bssid_list
10315 */
10316 A_UINT32 repeat_probe_time;
10317 /** time in msec between 2 consequetive probe requests with in a set. */
10318 A_UINT32 probe_spacing_time;
10319 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
10320 A_UINT32 idle_time;
10321 /** maximum time in msec allowed for scan */
10322 A_UINT32 max_scan_time;
10323 /** delay in msec before sending first probe request after switching to a channel */
10324 A_UINT32 probe_delay;
10325 /** Scan control flags */
10326 A_UINT32 scan_ctrl_flags;
10327 /** Burst duration time in msec*/
10328 A_UINT32 burst_duration;
10329
10330 /** # if channels to scan. In the TLV channel_list[] */
10331 A_UINT32 num_chan;
10332 /** number of bssids. In the TLV bssid_list[] */
10333 A_UINT32 num_bssid;
10334 /** number of ssid. In the TLV ssid_list[] */
10335 A_UINT32 num_ssids;
10336 /** number of bytes in ie data. In the TLV ie_data[] */
10337 A_UINT32 ie_len;
10338
10339/**
10340 * TLV (tag length value ) parameters follow the scan_cmd
10341 * structure. The TLV's are:
10342 * A_UINT32 channel_list[];
10343 * wmi_ssid ssid_list[];
10344 * wmi_mac_addr bssid_list[];
10345 * A_UINT8 ie_data[];
10346 */
10347} wmi_lpi_start_scan_cmd_fixed_param;
10348
10349typedef struct {
10350 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
10351 /** Scan requestor ID */
10352 A_UINT32 scan_req_id;
10353 /** Scan ID */
10354 A_UINT32 scan_id;
10355 /**
10356 * Req Type
10357 * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
10358 * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
10359 * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
10360 * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
10361 */
10362 A_UINT32 req_type;
10363 /**
10364 * vDev ID
10365 * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
10366 */
10367 A_UINT32 vdev_id;
10368} wmi_lpi_stop_scan_cmd_fixed_param;
10369
10370typedef enum {
10371 WMI_LPI_DEVICE_TYPE_AP = 1,
10372 WMI_LPI_DEVICE_TYPE_P2P = 2,
10373 WMI_LPI_DEVICE_TYPE_NAN = 3,
10374} wmi_lpi_device_type;
10375
10376typedef struct {
10377 A_UINT32 tlv_header;
10378 /** Scan requestor ID */
10379 A_UINT32 scan_req_id;
10380 A_UINT32 ie_bitmap;
10381 A_UINT32 data_len;
10382} wmi_lpi_result_event_fixed_param;
10383
10384typedef enum {
10385 /** User scan Request completed */
10386 WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
10387 /** User Request was never serviced */
10388 WMI_LPI_STATUS_DROPPED_REQ = 1,
10389 /** Illegal channel Req */
10390 WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
10391 /** Illegal Operation Req */
10392 WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
10393 /** Request Aborted */
10394 WMI_LPI_STATUS_REQ_ABORTED = 4,
10395 /** Request Timed Out */
10396 WMI_LPI_STATUS_REQ_TIME_OUT = 5,
10397 /** Medium Busy, already there
10398 * is a scan is going on */
10399 WMI_LPI_STATUS_MEDIUM_BUSY = 6,
10400 /* Extscan is the scan client whose scan complete event is triggered */
10401 WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
10402} wmi_lpi_staus;
10403
10404typedef struct {
10405 A_UINT32 tlv_header;
10406 wmi_lpi_staus status;
10407 /** Scan requestor ID */
10408 A_UINT32 scan_req_id;
10409} wmi_lpi_status_event_fixed_param;
10410
10411typedef struct {
10412 A_UINT32 tlv_header;
10413 wmi_mac_addr bssid;
10414 wmi_ssid ssid;
10415 A_UINT32 freq;
10416 A_UINT32 rssi;
10417 A_UINT32 vdev_id;
10418} wmi_lpi_handoff_event_fixed_param;
10419
10420typedef struct {
10421 A_UINT32 tlv_header;
10422 A_UINT32 timestamp; /*timestamp of batch scan event */
10423 A_UINT32 numScanLists; /*number of scan in this event */
10424 A_UINT32 isLastResult; /*is this event a last event of the whole batch scan */
10425} wmi_batch_scan_result_event_fixed_param;
10426
10427typedef struct {
10428 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */
10429 A_UINT32 vdev_id;
10430 /* This TLV is followed by p2p_noa_info for vdev :
10431 * wmi_p2p_noa_info p2p_noa_info;
10432 */
10433} wmi_p2p_noa_event_fixed_param;
10434
10435#define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6
10436#define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1
10437
10438#define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0
10439#define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f
10440
10441#define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7
10442#define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf
10443
10444typedef struct {
10445 /** TLV tag and len; tag equals
10446 * */
10447 A_UINT32 tlv_header;
10448 /** gpip pin number */
10449 A_UINT32 gpio_pin_num;
10450 /** gpio interupt type */
10451 A_UINT32 int_type;
10452 /** RF radio status */
10453 A_UINT32 radio_state;
10454} wmi_rfkill_mode_param;
10455
10456typedef enum {
10457 WMI_SET_LED_SYS_POWEROFF,
10458 WMI_SET_LED_SYS_S3_SUSPEND,
10459 WMI_SET_LED_SYS_S4_S5,
10460 WMI_SET_LED_SYS_DRIVER_DISABLE,
10461 WMI_SET_LED_SYS_WAKEUP,
10462 WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
10463 WMI_SET_LED_SYS_POWERON,
10464} wmi_led_sys_state_param;
10465
10466typedef enum {
10467 WMI_CONFIG_LED_TO_VDD = 0,
10468 WMI_CONFIG_LED_TO_GND = 1,
10469} wmi_config_led_connect_type;
10470
10471typedef enum {
10472 WMI_CONFIG_LED_NOT_WITH_BT = 0,
10473 WMI_CONFIG_LED_WITH_BT = 1,
10474} wmi_config_led_with_bt_flag;
10475
10476typedef enum {
10477 WMI_CONFIG_LED_DISABLE = 0,
10478 WMI_CONFIG_LED_ENABLE = 1,
10479} wmi_config_led_enable_flag;
10480
Sreelakshmi Konamkif9bde842016-03-03 19:03:02 +053010481typedef enum {
10482 WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0,
10483 WMI_CONFIG_LED_HIGH_OFF = 1,
10484 WMI_CONFIG_LED_HIGH_ON = 2,
10485} wmi_config_led_on_flag;
10486
10487typedef enum {
10488 WMI_CONFIG_LED_UNSPECIFIED = 0,
10489 WMI_CONFIG_LED_ON = 1,
10490 WMI_CONFIG_LED_OFF = 2,
10491 WMI_CONFIG_LED_DIM = 3,
10492 WMI_CONFIG_LED_BLINK = 4,
10493 WMI_CONFIG_LED_TXRX = 5,
10494} wmi_config_led_operation_type;
10495
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010496typedef struct {
10497 /** TLV tag and len; tag equals
Govind Singh869c9872016-02-22 18:36:34 +053010498 * WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010499 A_UINT32 tlv_header;
10500 /* Set GPIO pin */
10501 A_UINT32 led_gpio_pin;
10502 /* Set connect type defined in wmi_config_led_connect_type */
10503 A_UINT32 connect_type;
10504 /* Set flag defined in wmi_config_led_with_bt_flag */
10505 A_UINT32 with_bt;
10506 /* Set LED enablement defined in wmi_config_led_enable_flag */
10507 A_UINT32 led_enable;
Govind Singh869c9872016-02-22 18:36:34 +053010508 /** pdev_id for identifying the MAC
10509 * See macros starting with WMI_PDEV_ID_ for values.
10510 */
10511 A_UINT32 pdev_id;
Sreelakshmi Konamkif9bde842016-03-03 19:03:02 +053010512 /* see wmi_config_led_operation_type enum */
10513 A_UINT32 led_operation_type;
10514 /* see wmi_config_led_on_flag enum */
10515 A_UINT32 led_on_flag; /* configure high/low on/off sense */
10516 A_UINT32 led_on_interval; /* for blink function; unit: ms */
10517 A_UINT32 led_off_interval; /* for blink function; unit: ms */
10518 A_UINT32 led_repeat_cnt; /* for blink function: how many blinks */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010519} wmi_pdev_set_led_config_cmd_fixed_param;
10520
10521#define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
10522#define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff
10523
10524/** WMI_PEER_INFO_REQ_CMDID
10525 * Request FW to provide peer info */
10526typedef struct {
10527 /** TLV tag and len; tag equals
10528 * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
10529 A_UINT32 tlv_header;
10530 /** In order to get the peer info for a single peer, host shall
10531 * issue the peer_mac_address of that peer. For getting the
10532 * info all peers, the host shall issue 0xFFFFFFFF as the mac
10533 * address. The firmware will return the peer info for all the
10534 * peers on the specified vdev_id */
10535 wmi_mac_addr peer_mac_address;
10536 /** vdev id */
10537 A_UINT32 vdev_id;
10538} wmi_peer_info_req_cmd_fixed_param;
10539
10540typedef struct {
10541 /** TLV tag and len; tag equals
10542 * WMITLV_TAG_STRUC_wmi_peer_info */
10543 A_UINT32 tlv_header;
10544 /** mac addr of the peer */
10545 wmi_mac_addr peer_mac_address;
10546 /** data_rate of the peer */
10547 A_UINT32 data_rate;
10548 /** rssi of the peer */
10549 A_UINT32 rssi;
10550 /** tx fail count */
10551 A_UINT32 tx_fail_cnt;
10552} wmi_peer_info;
10553
10554/** FW response with the peer info */
10555typedef struct {
10556 /** TLV tag and len; tag equals
10557 * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */
10558 A_UINT32 tlv_header;
10559 /** number of peers in peer_info */
10560 A_UINT32 num_peers;
Govind Singh869c9872016-02-22 18:36:34 +053010561 /* Set to 1 only if vdev_id field is valid */
10562 A_UINT32 valid_vdev_id;
10563 /* VDEV to which the peer belongs to */
10564 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010565 /* This TLV is followed by another TLV of array of structs
10566 * wmi_peer_info peer_info[];
10567 */
10568} wmi_peer_info_event_fixed_param;
10569
10570/** FW response when tx failure count has reached threshold
10571 * for a peer */
10572typedef struct {
10573 /** TLV tag and len; tag equals
10574 * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
10575 A_UINT32 tlv_header;
10576 /** vdev id*/
10577 A_UINT32 vdev_id;
10578 /** mac address */
10579 wmi_mac_addr peer_mac_address;
10580 /** tx failure count- will eventually be removed and not used * */
10581 A_UINT32 tx_fail_cnt;
10582 /** seq number of the nth tx_fail_event */
10583 A_UINT32 seq_no;
10584} wmi_peer_tx_fail_cnt_thr_event_fixed_param;
10585
10586enum wmi_rmc_mode {
10587 /** Disable RMC */
10588 WMI_RMC_MODE_DISABLED = 0,
10589 /** Enable RMC */
10590 WMI_RMC_MODE_ENABLED = 1,
10591};
10592
10593/** Enable RMC transmitter functionality. Upon
10594 * receiving this, the FW shall mutlicast frames with
10595 * reliablity. This is a vendor
10596 * proprietary feature. */
10597typedef struct {
10598 /** TLV tag and len; tag equals
10599 * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */
10600 A_UINT32 tlv_header;
10601 /** vdev id*/
10602 A_UINT32 vdev_id;
10603 /** enable_rmc contains values from enum wmi_rmc_mode;
10604 * Default value: 0 (disabled) */
10605 A_UINT32 enable_rmc;
10606} wmi_rmc_set_mode_cmd_fixed_param;
10607
10608/** Configure transmission periodicity of action frames in a
10609 * RMC network for the multicast transmitter */
10610typedef struct {
10611 /** TLV tag and len; tag equals
10612 * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
10613 A_UINT32 tlv_header;
10614 /** vdev id */
10615 A_UINT32 vdev_id;
10616 /** time period in milliseconds. Default: 300 ms.
10617 An action frame indicating the current leader is transmitted by the
10618 RMC transmitter once every 'periodity_msec' */
10619 A_UINT32 periodicity_msec;
10620} wmi_rmc_set_action_period_cmd_fixed_param;
10621
10622/** Optimise Leader selection process in RMC functionality. For
10623 * Enhancement/Debug purposes only */
10624typedef struct {
10625 /** TLV tag and len; tag equals
10626 * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */
10627 A_UINT32 tlv_header;
10628 /** vdev id */
10629 A_UINT32 vdev_id;
10630 /** flags ::
10631 * 0x0001 - Enable beacon averaging
10632 * 0x0002 - Force leader selection
10633 * 0x0004 - Enable Timer based leader switch
10634 * 0x0008 - Use qos/NULL based for multicast reliability */
10635 A_UINT32 flags;
10636 /** control leader change timeperiod (in seconds) */
10637 A_UINT32 peridocity_leader_switch;
10638 /** control activity timeout value for data rx (in seconds) */
10639 A_UINT32 data_activity_timeout;
10640 /** mac address of leader */
10641 wmi_mac_addr forced_leader_mac_addr;
10642} wmi_rmc_config_cmd_fixed_param;
10643
10644/** MHF is generally implemented in
10645 * the kernel. To decrease system power consumption, the
10646 * driver can enable offloading this to the chipset. In
10647 * order for the offload, the firmware needs the routing table.
10648 * The host shall plumb the routing table into FW. The firmware
10649 * shall perform an IP address lookup and forward the packet to
10650 * the next hop using next hop's mac address. This is a vendor
10651 * proprietary feature. */
10652enum wmi_mhf_ofl_mode {
10653 /** Disable MHF offload */
10654 WMI_MHF_OFL_MODE_DISABLED = 0,
10655 /** Enable MHF offload */
10656 WMI_MHF_OFL_MODE_ENABLED = 1,
10657};
10658
10659typedef struct {
10660 /** TLV tag and len; tag equals
10661 * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
10662 A_UINT32 tlv_header;
10663 /** vdev id*/
10664 A_UINT32 vdev_id;
10665 /** enable_mhf_ofl contains values from enum
10666 * wmi_mhf_ofl_mode; Default value: 0 (disabled) */
10667 A_UINT32 enable_mhf_ofl;
10668} wmi_mhf_offload_set_mode_cmd_fixed_param;
10669
10670enum wmi_mhf_ofl_table_action {
10671 /** Create forwarding offload table in FW */
10672 WMI_MHF_OFL_TBL_CREATE = 0,
10673 /** Append to existing MHF offload table */
10674 WMI_MHF_OFL_TBL_APPEND = 1,
10675 /** Flush entire MHF offload table in FW */
10676 WMI_MHF_OFL_TBL_FLUSH = 2,
10677};
10678
10679typedef struct {
10680 /** TLV tag and len; tag equals
10681 * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
10682 A_UINT32 tlv_header;
10683 /** vdev id*/
10684 A_UINT32 vdev_id;
10685 /** action corresponds to values from enum
10686 * wmi_mhf_ofl_table_action */
10687 A_UINT32 action;
10688 /** number of entries in the table */
10689 A_UINT32 num_entries;
10690/** Followed by the variable length TLV
10691 * wmi_mhf_offload_routing_table_entry entries[] */
10692} wmi_mhf_offload_plumb_routing_table_cmd;
10693
10694typedef struct {
10695 /** TLV tag and len; tag equals
10696 * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
10697 A_UINT32 tlv_header;
10698 /** Destination node's IP address */
10699 WMI_IPV4_ADDR dest_ipv4_addr;
10700 /** Next hop node's MAC address */
10701 wmi_mac_addr next_hop_mac_addr;
10702} wmi_mhf_offload_routing_table_entry;
10703
10704typedef struct {
10705 /** tlv tag and len, tag equals
10706 * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
10707 A_UINT32 tlv_header;
10708
10709 /** full 64 tsf timestamp get from MAC tsf timer indicates
10710 * the time that the radar event uploading to host, split
10711 * it to high 32 bit and lower 32 bit in fulltsf_high and
10712 * full_tsf_low
10713 */
10714 A_UINT32 upload_fullts_low;
10715 A_UINT32 upload_fullts_high;
10716
10717 /** timestamp indicates the time when DFS pulse is detected
10718 * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
10719 */
10720 A_UINT32 pulse_detect_ts;
10721
10722 /** the duaration of the pulse in us */
10723 A_UINT32 pulse_duration;
10724
10725 /** the center frequency of the radar pulse detected, KHz */
10726 A_UINT32 pulse_center_freq;
10727
10728 /** bandwidth of current DFS channel, MHz */
10729 A_UINT32 ch_bandwidth;
10730
10731 /** center channel frequency1 of current DFS channel, MHz */
10732 A_UINT16 ch_center_freq1;
10733
10734 /** center channel frequency2 of current DFS channel, MHz,
10735 * reserved for 160 BW mode
10736 */
10737 A_UINT16 ch_center_freq2;
10738
10739 /** flag to indicate if this pulse is chirp */
10740 A_UINT8 pulse_is_chirp;
10741
10742 /** RSSI recorded in the ppdu */
10743 A_UINT8 rssi;
10744
10745 /** extened RSSI info */
10746 A_UINT8 rssi_ext;
10747
10748 /** For 4-byte aligment padding */
10749 A_UINT8 reserved;
10750
Govind Singh869c9872016-02-22 18:36:34 +053010751 union {
10752 /* OBSOLETE - will be removed once all refs are gone */
10753 A_UINT8 pmac_id;
10754 /** pdev_id for identifying the MAC
10755 * See macros starting with WMI_PDEV_ID_ for values.
10756 */
10757 A_UINT8 pdev_id;
10758 };
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010759
10760 /** index of peak magnitude bin (signed) */
10761 A_INT32 peak_sidx;
10762
10763} wmi_dfs_radar_event_fixed_param;
10764
10765typedef struct {
10766 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */
10767
10768 /*Thermal thresholds */
10769 A_UINT32 lower_thresh_degreeC; /* in degree C */
10770 A_UINT32 upper_thresh_degreeC; /* in degree C */
10771
10772 /*Enable/Disable Thermal Monitoring for Mitigation */
10773 A_UINT32 enable;
10774} wmi_thermal_mgmt_cmd_fixed_param;
10775
10776typedef struct {
10777 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */
10778
10779 A_UINT32 temperature_degreeC; /* temperature in degree C */
10780} wmi_thermal_mgmt_event_fixed_param;
10781
10782/**
10783 * This command is sent from WLAN host driver to firmware to
10784 * request firmware to configure auto shutdown timer in fw
10785 * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
10786 */
10787typedef struct {
10788 A_UINT32 tlv_header;
10789 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */
10790 A_UINT32 timer_value;
10791 /** timer value; 0=disable */
10792} wmi_host_auto_shutdown_cfg_cmd_fixed_param;
10793
10794enum wmi_host_auto_shutdown_reason {
10795 WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
10796 WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
10797 WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
10798};
10799
10800/* WMI_HOST_AUTO_SHUTDOWN_EVENTID */
10801typedef struct {
10802 A_UINT32 tlv_header;
10803 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */
10804 A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
10805} wmi_host_auto_shutdown_event_fixed_param;
10806
10807/** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
10808 * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
10809 * This command is only used by some customer for verification test. It is not for end-user.
10810 *
10811 * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
10812 *
10813 * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
10814 * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condtion only. When multiple
10815 * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
10816 * <channel, ack_offset> pair is unique.
10817 *
10818 * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
10819 * called basic_config_info by bitmap
10820 * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
10821 *
10822 * '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
10823 * is ignored.
10824 * disable will remove preious conditions from FW.
10825 * conditions from the later command will over write conditions stored from a previous command.
10826 *
10827 */
10828
10829#define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */
10830#define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */
10831#define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */
10832#define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */
10833
10834#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */
10835#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */
10836#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */
10837#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */
10838
10839#define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */
10840#define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */
10841#define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */
10842#define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */
10843
10844#define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */
10845#define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */
10846
10847#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */
10848#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */
10849#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */
10850#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */
10851#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */
10852#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */
10853#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */
10854#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */
10855
10856#define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */
10857#define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */
10858
10859#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */
10860#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */
10861
10862#define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */
10863#define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */
10864
10865/** Bit map definition for basic_config_info starts */
10866#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0
10867#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010868#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
10869#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 -080010870
10871#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5
10872#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010873#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
10874#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 -080010875
10876#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10
10877#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010878#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
10879#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 -080010880
10881#define WMI_TPC_CHAINMASK_CONFIG_BT_S 12
10882#define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010883#define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BT)
10884#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 -080010885
10886#define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14
10887#define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010888#define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STBC)
10889#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 -080010890
10891#define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16
10892#define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010893#define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BAND)
10894#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 -080010895
10896#define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17
10897#define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010898#define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STREAM)
10899#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 -080010900
10901#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18
10902#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010903#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
10904#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 -080010905
10906#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21
10907/*
10908 * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
10909 * is temporarily maintained as an alias for the correct name
10910 * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
10911 */
10912#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
10913#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010914#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
10915#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 -080010916
10917#define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22
10918/*
10919 * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
10920 * is temporarily maintained as an alias for the correct name
10921 * (WMI_TPC_CHAINMASK_CONFIG_RATE)
10922 */
10923#define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
10924#define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
10925#define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010926#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 -080010927
10928/** Bit map definition for basic_config_info ends */
10929
10930typedef struct {
10931 A_UINT32 tlv_header;
10932 /** Basic condition defined as bit map above, bitmap is chosen to save memory.
10933 * Bit0 ~ Bit4: tpc offset which will be adjusted if condtion matches, the unit is 0.5dB. bit4 indicates signed
10934 * Bit5 ~ Bit9: ack offset which will be adjusted if condtion matches, the unit is 0.5dB. bit9 indicates signed
10935 * 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
10936 * 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
10937 * 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
10938 * Bit16 : band condition b'0: 2G, b'1: 5G
10939 * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams
10940 * 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
10941 * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
10942 * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
10943 * Bit23 ~ Bit31: reserved
10944 */
10945 A_UINT32 basic_config_info;
10946
10947 /** channel mapping bit rule: The lower bit corresponds with smaller channel.
10948 * it depends on Bit14 of basic_config_info
10949 * Total 24 channels for 5G
10950 * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
10951 * Total 14 channels for 2G
10952 * 1 ~ 14
10953 */
10954 A_UINT32 channel;
10955
10956 /** rate mapping bit rule: The lower bit corresponds with lower rate.
10957 * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
10958 * Legacy rates , 11b, 11g, 11A
10959 * 11n one stream ( ht20, ht40 ) 8+8
10960 * 11n two streams ( ht20, ht40 ) 8+8
10961 * 11ac one stream ( vht20, vht40, vht80 ) 10+10+10
10962 * 11ac two streams (vht20, vht40, vht80 ) 10+10+10
10963 */
10964 A_UINT32 rate0;
10965 /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
10966 * 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
10967 */
10968
10969 /** 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
10970 */
10971 A_UINT32 rate1;
10972} wmi_tpc_chainmask_config;
10973
10974#define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/
10975#define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/
10976
10977typedef struct {
10978 A_UINT32 tlv_header;
10979 A_UINT32 enable;
10980 /** enable to set tpc & chainmask when condtions meet, 0: disabled, 1: enabled. */
10981 A_UINT32 num_tpc_chainmask_configs;
10982 /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */
10983} wmi_tpc_chainmask_config_cmd_fixed_param;
10984
10985typedef struct {
10986 A_UINT32 tlv_header;
10987 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
10988 A_UINT32 data_len;
10989 /** length in byte of data[]. */
10990 /* This structure is used to send REQ binary blobs
10991 * from application/service to firmware where Host drv is pass through .
10992 * Following this structure is the TLV:
10993 * A_UINT8 data[]; // length in byte given by field data_len.
10994 */
10995} wmi_nan_cmd_param;
10996
10997typedef struct {
10998 A_UINT32 tlv_header;
10999 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
11000 A_UINT32 data_len;
11001 /** length in byte of data[]. */
11002 /* This structure is used to send REQ binary blobs
11003 * from firmware to application/service where Host drv is pass through .
11004 * Following this structure is the TLV:
11005 * A_UINT8 data[]; // length in byte given by field data_len.
11006 */
11007} wmi_nan_event_hdr;
11008
Govind Singh941bd5e2016-02-04 17:15:25 +053011009/**
11010 * Event to indicate NAN discovery interface created
11011 */
11012typedef struct {
11013 /*
11014 * TLV tag and len; tag equals
11015 * WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param
11016 */
11017 A_UINT32 tlv_header;
11018 /** Unique id identifying the VDEV */
11019 A_UINT32 vdev_id;
11020 /** NAN interface MAC address */
11021 wmi_mac_addr nan_interface_macaddr;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011022} wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE;
11023
11024#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 +053011025
11026/**
11027 * Event to indicate NAN discovery interface deleted
11028 */
11029typedef struct {
11030 /*
11031 * TLV tag and len; tag equals
11032 * WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param
11033 */
11034 A_UINT32 tlv_header;
11035 /** Unique id identifying the VDEV */
11036 A_UINT32 vdev_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011037} wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE;
11038
11039#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 +053011040
11041/**
11042 * Event to indicate NAN device started new cluster
11043 */
11044typedef struct {
11045 /*
11046 * TLV tag and len; tag equals
11047 * WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param
11048 */
11049 A_UINT32 tlv_header;
11050 /** Unique id identifying the VDEV */
11051 A_UINT32 vdev_id;
11052 /** NAN Cluster ID */
11053 A_UINT32 nan_cluster_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011054} wmi_nan_started_cluster_event_fixed_param_PROTOTYPE;
11055
11056#define wmi_nan_started_cluster_event_fixed_param wmi_nan_started_cluster_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011057
11058/**
11059 * Event to indicate NAN device joined to cluster
11060 */
11061typedef struct {
11062 /*
11063 * TLV tag and len; tag equals
11064 * WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param
11065 */
11066 A_UINT32 tlv_header;
11067 /** Unique id identifying the VDEV */
11068 A_UINT32 vdev_id;
11069 /** NAN Cluster ID */
11070 A_UINT32 nan_cluster_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011071} wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE;
11072
11073#define wmi_nan_joined_cluster_event_fixed_param wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011074
11075/** NAN DATA CMD's */
11076
11077/**
11078 * NAN Data get capabilities req
11079 */
11080typedef struct {
11081 /*
11082 * TLV tag and len; tag equals
11083 * WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param
11084 */
11085 A_UINT32 tlv_header;
11086 /** unique id generated in upper layer for the transaction */
11087 A_UINT32 transaction_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011088} wmi_ndi_get_cap_req_fixed_param_PROTOTYPE;
Govind Singh941bd5e2016-02-04 17:15:25 +053011089
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011090#define wmi_ndi_get_cap_req_fixed_param wmi_ndi_get_cap_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011091
11092/**
11093 * NDP Response code
11094 */
11095typedef enum {
11096 NDP_RSP_CODE_REQUEST_ACCEPT = 0x00,
11097 NDP_RSP_CODE_REQUEST_REJECT = 0x01,
11098 NDP_RSP_CODE_REQUEST_DEFER = 0x02,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011099} wmi_ndp_rsp_code_PROTOTYPE;
11100
11101#define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011102
11103/**
11104 * NDP Initiator requesting a data session
11105 */
11106typedef struct {
11107 /*
11108 * TLV tag and len; tag equals
11109 * WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param
11110 */
11111 A_UINT32 tlv_header;
11112 /** Unique id identifying the VDEV */
11113 A_UINT32 vdev_id;
11114 /** unique id generated in upper layer for the transaction */
11115 A_UINT32 transaction_id;
11116 /** Unique Instance Id identifying the Responder's service */
11117 A_UINT32 service_instance_id;
11118 /** Discovery MAC addr of the publisher/peer */
11119 wmi_mac_addr peer_discovery_mac_addr;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011120 /* Actual number of bytes in TLV ndp_cfg */
Govind Singh941bd5e2016-02-04 17:15:25 +053011121 A_UINT32 ndp_cfg_len;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011122 /* Actual number of bytes in TLV ndp_app_info */
Govind Singh941bd5e2016-02-04 17:15:25 +053011123 A_UINT32 ndp_app_info_len;
11124 /**
11125 * TLV (tag length value ) parameters follow the ndp_initiator_req
11126 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011127 * wmi_channel channel;
11128 * A_UINT8 ndp_cfg[];
11129 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053011130 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011131} wmi_ndp_initiator_req_fixed_param_PROTOTYPE;
11132
11133#define wmi_ndp_initiator_req_fixed_param wmi_ndp_initiator_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011134
11135/**
11136 * Initiate a data response on the responder side
11137 * for data request indication from the peer
11138 */
11139typedef struct {
11140 /*
11141 * TLV tag and len; tag equals
11142 * WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param
11143 */
11144 A_UINT32 tlv_header;
11145 /** Unique id identifying the VDEV */
11146 A_UINT32 vdev_id;
11147 /** unique id generated in upper layer for the transaction */
11148 A_UINT32 transaction_id;
11149 /**
11150 * Unique token Id generated on the initiator/responder
11151 * side used for a NDP session between two NAN devices
11152 */
11153 A_UINT32 ndp_instance_id;
11154 /** Response Code defined in wmi_ndp_rsp_code */
11155 A_UINT32 rsp_code;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011156 /** Number of bytes in TLV ndp_cfg */
Govind Singh941bd5e2016-02-04 17:15:25 +053011157 A_UINT32 ndp_cfg_len;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011158 /** Number of bytes in TLV ndp_app_info */
Govind Singh941bd5e2016-02-04 17:15:25 +053011159 A_UINT32 ndp_app_info_len;
11160 /**
11161 * TLV (tag length value ) parameters follow the ndp_responder_req
11162 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011163 * A_UINT8 ndp_cfg[];
11164 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053011165 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011166} wmi_ndp_responder_req_fixed_param_PROTOTYPE;
11167
11168#define wmi_ndp_responder_req_fixed_param wmi_ndp_responder_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011169
11170/**
11171 * NDP end type
11172 */
11173typedef enum {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011174 WMI_NDP_END_TYPE_UNSPECIFIED = 0x00,
11175 WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01,
11176 WMI_NDP_END_TYPE_OTA_FRAME = 0x02,
11177} wmi_ndp_end_type_PROTOTYPE;
11178
11179#define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011180
11181/**
11182 * NDP end reason code
11183 */
11184typedef enum {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011185 WMI_NDP_END_REASON_UNSPECIFIED = 0x00,
11186 WMI_NDP_END_REASON_INACTIVITY = 0x01,
11187 WMI_NDP_END_REASON_PEER_DATA_END = 0x02,
11188} wmi_ndp_end_reason_code_PROTOTYPE;
11189
11190#define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011191
11192/**
11193 * NDP end request
11194 */
11195typedef struct {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011196 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */
11197 A_UINT32 tlv_header;
Govind Singh941bd5e2016-02-04 17:15:25 +053011198 /** reason_code defined in wmi_ndp_end_reason_code */
11199 A_UINT32 reason_code;
11200 /** NDP instance id */
11201 A_UINT32 ndp_instance_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011202} wmi_ndp_end_req_PROTOTYPE;
Govind Singh941bd5e2016-02-04 17:15:25 +053011203
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011204#define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011205
11206/**
11207 * NDP End request
11208 */
11209typedef struct {
11210 /*
11211 * TLV tag and len; tag equals
11212 * WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param
11213 */
11214 A_UINT32 tlv_header;
11215 /** unique id generated in upper layer for the transaction */
11216 A_UINT32 transaction_id;
Govind Singh941bd5e2016-02-04 17:15:25 +053011217 /**
11218 * TLV (tag length value ) parameters follow the ndp_end_req
11219 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011220 * wmi_ndp_end_req ndp_end_req_list[];
Govind Singh941bd5e2016-02-04 17:15:25 +053011221 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011222} wmi_ndp_end_req_fixed_param_PROTOTYPE;
11223
11224#define wmi_ndp_end_req_fixed_param wmi_ndp_end_req_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011225
11226/* NAN DATA RSP EVENTS */
11227
11228/**
11229 * Event to indicate NAN Data Interface capabilities cmd
11230 */
11231typedef struct {
11232 /*
11233 * TLV tag and len; tag equals
11234 * WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param
11235 */
11236 A_UINT32 tlv_header;
11237 /** Copy of transaction_id received in wmi_ndi_get_cap_req */
11238 A_UINT32 transaction_id;
11239 /** Max ndi interface support */
11240 A_UINT32 max_ndi_interfaces;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011241 /** Max ndp sessions can support */
11242 A_UINT32 max_ndp_sessions;
Govind Singh941bd5e2016-02-04 17:15:25 +053011243 /** Max number of peer's per ndi */
11244 A_UINT32 max_peers_per_ndi;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011245} wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE;
11246
11247#define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011248
11249/**
11250 * NDP command response code
11251 */
11252typedef enum {
11253 NDP_CMD_RSP_STATUS_SUCCESS = 0x00,
11254 NDP_CMD_RSP_STATUS_ERROR = 0x01,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011255} wmi_ndp_cmd_rsp_status_PROTOTYPE;
11256
11257#define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011258
11259/**
11260 * NDP command reason code
11261 */
11262typedef enum {
11263 NDP_INVALID_VDEV_ID_PARAM = 0x00,
11264 NDP_INVALID_SERVICE_INSTANCE_ID_PARAM = 0x01,
11265 NDP_INVALID_PEER_DISC_MAC_ADDR_PARAM = 0x02,
11266 NDP_INVALID_NDP_CFG_SECURITY_PARAM = 0x03,
11267 NDP_INVALID_NDP_CFG_QOS_PARAM = 0x04,
11268 NDP_INVALID_APP_INFO_LEN_PARAM = 0x05,
11269 NDP_INVALID_NDP_INSTANCE_ID_PARAM = 0x06,
11270 NDP_INVALID_RSP_CODE_PARAM = 0x07,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011271 NDP_INVALID_CHANNEL_PARAM = 0x08,
11272 NDP_INVALID_APP_INFO = 0x09,
11273 NDP_INVALID_NDP_CFG = 0x0A,
11274 NDP_INVALID_NDP_CFG_LEN_PARAM = 0x0B,
11275 NDP_INVALID_NUM_NDP_INSTANCES_PARAM = 0x0C,
11276 NDP_INVALID_NDP_END_REQ_LEN_PARAM = 0x0D,
11277 NDP_INVALID_NDP_END_REQ = 0x0E,
11278 NDP_REACHED_MAX_NDP_INSTANCES = 0x0F,
11279} wmi_ndp_cmd_reason_code_PROTOTYPE;
11280
11281#define wmi_ndp_cmd_reason_code wmi_ndp_cmd_reason_code_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011282
11283/**
11284 * Event response for wmi_ndp_initiator_req
11285 */
11286typedef struct {
11287 /*
11288 * TLV tag and len; tag equals
11289 * WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param
11290 */
11291 A_UINT32 tlv_header;
11292 /** Unique id identifying the VDEV */
11293 A_UINT32 vdev_id;
11294 /** Copy of transaction_id received in wmi_ndp_initiator_req */
11295 A_UINT32 transaction_id;
11296 /** Response status defined in wmi_ndp_cmd_rsp_status*/
11297 A_UINT32 rsp_status;
11298 /** Reason code defined in wmi_ndp_cmd_reason_code */
11299 A_UINT32 reason_code;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011300 /*
11301 * Unique token Id generated on the initiator/responder
11302 * side used for a NDP session between two NAN devices
11303 */
11304 A_UINT32 ndp_instance_id;
11305} wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE;
11306
11307#define wmi_ndp_initiator_rsp_event_fixed_param wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011308
11309/**
11310 * Event response for wmi_ndp_responder_req cmd
11311 */
11312typedef struct {
11313 /*
11314 * TLV tag and len; tag equals
11315 * WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param
11316 */
11317 A_UINT32 tlv_header;
11318 /** Unique id identifying the VDEV */
11319 A_UINT32 vdev_id;
11320 /** Copy of transaction_id received in wmi_ndp_responder_req */
11321 A_UINT32 transaction_id;
11322 /** Response status defined in wmi_ndp_cmd_rsp_status*/
11323 A_UINT32 rsp_status;
11324 /** Reason code defined in wmi_ndp_cmd_reason_code */
11325 A_UINT32 reason_code;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011326 /*
11327 * Unique token Id generated on the initiator/responder
11328 * side used for a NDP session between two NAN devices
11329 */
11330 A_UINT32 ndp_instance_id;
11331 /* NDI mac address of the peer */
11332 wmi_mac_addr peer_ndi_mac_addr;
11333} wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE;
11334
11335#define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE
11336/**
11337 * Active ndp instance id
11338 */
11339typedef struct {
11340 /*
11341 * TLV tag and len; tag equals
11342 * WMITLV_TAG_STRUC_wmi_active_ndp_instance_id
11343 */
11344 A_UINT32 tlv_header;
11345 /* NDP instance id */
11346 A_UINT32 ndp_instance_id;
11347} wmi_active_ndp_instance_id_PROTOTYPE;
11348
11349#define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011350
11351/**
11352 * NDP end response per ndi
11353 */
11354typedef struct {
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011355 /*
11356 * TLV tag and len; tag equals
11357 * WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi
11358 */
11359 A_UINT32 tlv_header;
Govind Singh941bd5e2016-02-04 17:15:25 +053011360 /** Unique id identifying the VDEV */
11361 A_UINT32 vdev_id;
11362 /** Peer MAC addr */
11363 wmi_mac_addr peer_mac_addr;
11364 /** Number of active ndps on this ndi */
11365 A_UINT32 num_active_ndps_on_ndi;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011366} wmi_ndp_end_rsp_per_ndi_PROTOTYPE;
Govind Singh941bd5e2016-02-04 17:15:25 +053011367
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011368#define wmi_ndp_end_rsp_per_ndi wmi_ndp_end_rsp_per_ndi_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011369
11370/**
11371 * Event response for wmi_ndp_end_req cmd
11372 */
11373typedef struct {
11374 /*
11375 * TLV tag and len; tag equals
11376 * WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param
11377 */
11378 A_UINT32 tlv_header;
11379 /** Copy of transaction_id received in wmi_ndp_end_req */
11380 A_UINT32 transaction_id;
11381 /** Response status defined in wmi_ndp_cmd_rsp_status*/
11382 A_UINT32 rsp_status;
11383 /** Reason code defined in wmi_ndp_cmd_reason_code */
11384 A_UINT32 reason_code;
Govind Singh941bd5e2016-02-04 17:15:25 +053011385 /**
11386 * TLV (tag length value ) parameters follow the ndp_end_rsp
11387 * structure. The TLV's are:
11388 * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[];
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011389 * wmi_active_ndp_instance_id active_ndp_instances_id[];
Govind Singh941bd5e2016-02-04 17:15:25 +053011390 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011391} wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE;
11392
11393#define wmi_ndp_end_rsp_event_fixed_param wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011394
11395/** NAN DATA EVENTS */
11396
11397/**
11398 * NDP self role
11399 */
11400typedef enum {
11401 WMI_NDP_INITIATOR_ROLE,
11402 WMI_NDP_RESPONDER_ROLE,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011403} wmi_ndp_self_role_PROTOTYPE;
11404
11405#define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011406
11407/**
11408 * NDP accept policy
11409 */
11410typedef enum {
11411 WMI_NDP_ACCEPT_POLICY_NONE,
11412 WMI_NDP_ACCEPT_POLICY_ALL,
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011413} wmi_ndp_accept_policy_PROTOTYPE;
11414
11415#define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011416
11417/**
11418 * Event indication received on the responder side when a NDP Initiator request/
11419 * NDP session is initiated on the Initiator side
11420 * (self role will be NDP_RESPONDER_ROLE)
11421 *
11422 * Event indication received on the initiator side when a
11423 * NDP responder request on the Initiator side
11424 * (self role will be NDP_INITIATOR_ROLE)
11425 */
11426typedef struct {
11427 /*
11428 * TLV tag and len; tag equals
11429 * WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param
11430 */
11431 A_UINT32 tlv_header;
11432 /** Unique id identifying the VDEV */
11433 A_UINT32 vdev_id;
11434 /** Self NDP Role defined in wmi_ndp_self_role */
11435 A_UINT32 self_ndp_role;
11436 /** Accept policy defined in wmi_ndp_accept_policy */
11437 A_UINT32 accept_policy;
11438 /** Unique Instance Id corresponding to a service/session. */
11439 A_UINT32 service_instance_id;
11440 /** Discovery MAC addr of the peer/initiator */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011441 wmi_mac_addr peer_discovery_mac_addr;
11442 /* NDI mac address of the peer */
11443 wmi_mac_addr peer_ndi_mac_addr;
Govind Singh941bd5e2016-02-04 17:15:25 +053011444 /**
11445 * Unique token Id generated on the initiator/responder
11446 * side used for a NDP session between two NAN devices
11447 */
11448 A_UINT32 ndp_instance_id;
11449 /** Number of bytes in TLV wmi_ndp_cfg */
11450 A_UINT32 ndp_cfg_len;
11451 /** Number of bytes in TLV wmi_ndp_app_info */
11452 A_UINT32 ndp_app_info_len;
11453 /**
11454 * TLV (tag length value ) parameters follow the ndp_indication
11455 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011456 * A_UINT8 ndp_cfg[];
11457 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053011458 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011459} wmi_ndp_indication_event_fixed_param_PROTOTYPE;
11460
11461#define wmi_ndp_indication_event_fixed_param wmi_ndp_indication_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011462
11463/**
11464 * Event indication of data confirm is received on both
11465 * initiator and responder side confirming a NDP session
11466 */
11467typedef struct {
11468 /*
11469 * TLV tag and len; tag equals
11470 * WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param
11471 */
11472 A_UINT32 tlv_header;
11473 /** Unique id identifying the VDEV */
11474 A_UINT32 vdev_id;
11475 /**
11476 * Unique token Id generated on the initiator/responder
11477 * side used for a NDP session between two NAN devices
11478 */
11479 A_UINT32 ndp_instance_id;
11480 /*
11481 * NDI mac address of the peer
11482 * (required to derive target ipv6 address)
11483 */
11484 wmi_mac_addr peer_ndi_mac_addr;
11485 /** Response Code defined in wmi_ndp_rsp_code */
11486 A_UINT32 rsp_code;
11487 /** Number of bytes in TLV wmi_ndp_cfg */
11488 A_UINT32 ndp_cfg_len;
11489 /** Number of bytes in TLV wmi_ndp_app_info */
11490 A_UINT32 ndp_app_info_len;
11491 /**
11492 * TLV (tag length value ) parameters follow the ndp_confirm
11493 * structure. The TLV's are:
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011494 * A_UINT8 ndp_cfg[];
11495 * A_UINT8 ndp_app_info[];
Govind Singh941bd5e2016-02-04 17:15:25 +053011496 */
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011497} wmi_ndp_confirm_event_fixed_param_PROTOTYPE;
11498
11499#define wmi_ndp_confirm_event_fixed_param wmi_ndp_confirm_event_fixed_param_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011500
11501/**
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011502 * Event indication received on the initiator/responder side terminating a NDP session
Govind Singh941bd5e2016-02-04 17:15:25 +053011503 */
11504typedef struct {
11505 /*
11506 * TLV tag and len; tag equals
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011507 * WMITLV_TAG_STRUC_wmi_ndp_end_indication
Govind Singh941bd5e2016-02-04 17:15:25 +053011508 */
11509 A_UINT32 tlv_header;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011510 /** type defined in wmi_ndp_end_type */
11511 A_UINT32 type;
11512 /* Unique id identifying the VDEV */
Govind Singh941bd5e2016-02-04 17:15:25 +053011513 A_UINT32 vdev_id;
Anurag Chouhan08f66c62016-04-18 17:14:51 +053011514 /** reason_code defined in wmi_ndp_end_reason_code */
11515 A_UINT32 reason_code;
11516 /** NDP instance id */
11517 A_UINT32 ndp_instance_id;
11518 /* NDI MAC addr of the peer */
11519 wmi_mac_addr peer_ndi_mac_addr;
11520 /* Number of active ndps on this peer */
11521 A_UINT32 num_active_ndps_on_peer;
11522} wmi_ndp_end_indication_PROTOTYPE;
11523
11524#define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE
Govind Singh941bd5e2016-02-04 17:15:25 +053011525
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011526typedef struct {
11527 A_UINT32 tlv_header;
11528 A_UINT32 num_data;
11529 /* followed by WMITLV_TAG_ARRAY_BYTE */
11530} wmi_diag_data_container_event_fixed_param;
11531
11532enum {
11533 WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
11534 WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
11535 WMI_PDEV_PARAM_TXPOWER_REASON_MAX
11536};
11537
11538#define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF
11539#define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
11540
11541#define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00
11542#define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
11543
11544#define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \
11545 ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
11546
11547#define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \
11548 ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
11549
11550#define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \
11551 (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
11552
11553#define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \
11554 (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
11555
11556/**
11557 * This command is sent from WLAN host driver to firmware to
11558 * notify the current modem power state. Host would receive a
11559 * message from modem when modem is powered on. Host driver
11560 * would then send this command to firmware. Firmware would then
11561 * power on WCI-2 (UART) interface for LTE/MWS Coex.
11562 *
11563 * This command is only applicable for APQ platform which has
11564 * modem on the platform. If firmware doesn't support MWS Coex,
11565 * this command can be dropped by firmware.
11566 *
11567 * This is a requirement from modem team that WCN can't toggle
11568 * UART before modem is powered on.
11569 */
11570typedef struct {
11571 /** TLV tag and len; tag equals
11572 * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
11573 A_UINT32 tlv_header;
11574
11575 /** Modem power state parameter */
11576 A_UINT32 modem_power_state;
11577} wmi_modem_power_state_cmd_param;
11578
11579enum {
11580 WMI_MODEM_STATE_OFF = 0,
11581 WMI_MODEM_STATE_ON
11582};
11583
11584#define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
11585#define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */
11586
11587/** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
11588 generated whenever firmware roamed to new AP silently and
11589 (a) If the host is awake, FW sends the event to the host immediately .
11590 (b) If host is in sleep then either
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011591 (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011592 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 +053011593 (2) data/mgmt frame is received from roamed AP, which needs to return to host
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011594 */
11595
11596typedef struct {
11597 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
11598 A_UINT32 tlv_header;
11599
11600 A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
11601 A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
11602 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES];
11603} wmi_key_material;
11604
11605typedef struct {
11606 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */
11607 /** Unique id identifying the VDEV on which roaming is done by firmware */
11608 A_UINT32 vdev_id;
11609 /** auth_status: connected or authorized */
11610 A_UINT32 auth_status;
11611 /*
Nirav Shah439e6262015-11-05 10:53:18 +053011612 * roam_reason:
11613 * bits 0-3 for roam reason see WMI_ROAM_REASON_XXX
11614 * bits 4-5 for subnet status see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011615 */
11616 A_UINT32 roam_reason;
11617 /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
11618 A_UINT32 rssi;
11619 /** MAC address of roamed AP */
11620 wmi_mac_addr bssid; /* BSSID */
11621 /** whether the frame is beacon or probe rsp */
11622 A_UINT32 is_beacon;
11623 /** the length of beacon/probe rsp */
11624 A_UINT32 bcn_probe_rsp_len;
11625 /** the length of reassoc rsp */
11626 A_UINT32 reassoc_rsp_len;
Manikandan Mohan30728082015-12-09 12:35:24 -080011627 /** the length of reassoc req */
11628 A_UINT32 reassoc_req_len;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011629 /**
11630 * TLV (tag length value ) parameters follows roam_synch_event
11631 * The TLV's are:
11632 * A_UINT8 bcn_probe_rsp_frame[]; length identified by bcn_probe_rsp_len
11633 * A_UINT8 reassoc_rsp_frame[]; length identified by reassoc_rsp_len
11634 * wmi_channel chan;
11635 * wmi_key_material key;
11636 * A_UINT32 status; subnet changed status not being used
11637 * currently. will pass the information using roam_status.
Manikandan Mohan30728082015-12-09 12:35:24 -080011638 * A_UINT8 reassoc_req_frame[]; length identified by reassoc_req_len
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011639 **/
11640} wmi_roam_synch_event_fixed_param;
11641
11642#define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF
11643
11644typedef struct {
11645 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
11646 A_UINT32 tlv_header;
11647 /** MAC address of the peer for which the estimated link speed is required. */
11648 wmi_mac_addr peer_macaddr;
Govind Singh869c9872016-02-22 18:36:34 +053011649 /* Set to 1 only if vdev_id field is valid */
11650 A_UINT32 valid_vdev_id;
11651 /* VDEV to which the peer belongs to */
11652 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011653} wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
11654
11655typedef struct {
11656 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
11657 A_UINT32 tlv_header;
11658 /** MAC address of the peer for which the estimated link speed is required.
11659 */
11660 wmi_mac_addr peer_macaddr;
11661 /* Estimated link speed in kbps.
11662 * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
11663 */
11664 A_UINT32 est_linkspeed_kbps;
Govind Singh869c9872016-02-22 18:36:34 +053011665 /* Set to 1 only if vdev_id field is valid */
11666 A_UINT32 valid_vdev_id;
11667 /* VDEV to which the peer belongs to */
11668 A_UINT32 vdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011669} wmi_peer_estimated_linkspeed_event_fixed_param;
11670
11671typedef struct {
11672 A_UINT32 tlv_header; /* TLV tag and len; tag equals */
11673 /* vdev ID */
11674 A_UINT32 vdev_id;
11675 A_UINT32 data_len;
11676 /** length in byte of data[]. */
11677 /* This structure is used to send REQ binary blobs
11678 * from application/service to firmware where Host drv is pass through .
11679 * Following this structure is the TLV:
11680 * A_UINT8 data[]; // length in byte given by field data_len.
11681 */
11682} wmi_req_stats_ext_cmd_fixed_param;
11683
11684typedef struct {
11685 A_UINT32 tlv_header;
11686 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
11687 A_UINT32 vdev_id;
11688 /** vdev ID */
11689 A_UINT32 data_len;
11690 /** length in byte of data[]. */
11691 /* This structure is used to send REQ binary blobs
11692 * from firmware to application/service where Host drv is pass through .
11693 * Following this structure is the TLV:
11694 * A_UINT8 data[]; // length in byte given by field data_len.
11695 */
11696} wmi_stats_ext_event_fixed_param;
11697
11698typedef struct {
Manikandan Mohan429a0782015-12-23 14:35:54 -080011699 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */
11700 /** unique id identifying the VDEV, generated by the caller */
11701 A_UINT32 vdev_id;
11702 /** peer MAC address */
11703 wmi_mac_addr peer_macaddr;
11704} wmi_peer_delete_resp_event_fixed_param;
11705
11706typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011707 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
11708 A_UINT32 tlv_header;
11709 A_UINT32 vdev_id; /* vdev ID */
11710 /* MAC address of the peer for which the estimated link speed is required. */
11711 wmi_mac_addr peer_macaddr;
11712 A_UINT32 state; /* peer state */
11713} wmi_peer_state_event_fixed_param;
11714
11715typedef struct {
11716 /*
11717 * TLV tag and len; tag equals
11718 * WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param
11719 */
11720 A_UINT32 tlv_header;
11721 /* unique id identifying the VDEV, generated by the caller */
11722 A_UINT32 vdev_id;
11723 /* peer MAC address */
11724 wmi_mac_addr peer_macaddr;
11725} wmi_peer_assoc_conf_event_fixed_param;
11726
11727enum {
11728 WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0,
11729 /** scan_type: passive */
11730 WMI_2G4_HT40_OBSS_SCAN_ACTIVE,
11731 /** scan_type: active */
11732};
11733
11734typedef struct {
11735 /**
11736 * TLV tag and len;
11737 * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enalbe_cmd_fixed_param
11738 */
11739 A_UINT32 tlv_header;
11740 A_UINT32 vdev_id;
11741 /**
11742 * active or passive. if active all the channels are actively scanned.
11743 * if passive then all the channels are passively scanned
11744 */
11745 A_UINT32 scan_type;
11746 /**
11747 * FW can perform multiple scans with in a OBSS scan interval.
11748 * For each scan,
11749 * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel ,
11750 * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
11751 * The unit for these 2 parameters is TUs.
11752 */
11753 A_UINT32 obss_scan_passive_dwell;
11754 A_UINT32 obss_scan_active_dwell;
11755 /**
11756 * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
11757 * both min and total per channel dwell time requirement
11758 */
11759 A_UINT32 bss_channel_width_trigger_scan_interval;
11760 /**
11761 * FW can perform multiple scans with in a OBSS scan interval.
11762 * For each scan,
11763 * the total per channel dwell time across all scans with in OBSS scan interval should be
11764 * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
11765 * for active scans and ,
11766 * The unit for these 2 parameters is TUs.
11767 */
11768 A_UINT32 obss_scan_passive_total_per_channel;
11769 A_UINT32 obss_scan_active_total_per_channel;
11770 A_UINT32 bss_width_channel_transition_delay_factor;
11771 /** parameter to check exemption from scan */
11772 A_UINT32 obss_scan_activity_threshold;
11773 /** parameter to check exemption from scan */
11774 /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
11775 A_UINT32 forty_mhz_intolerant;
11776 /** STA 40M bandwidth intolerant capability */
11777 A_UINT32 current_operating_class;
11778 /** STA current operating class */
11779 /** length of 2.4GHz channel list to scan at, channel list in tlv->channels[] */
11780 A_UINT32 channel_len;
11781 /** length of optional ie data to append to probe reqest when active scan, ie data in tlv->ie_field[] */
11782 A_UINT32 ie_len;
11783} wmi_obss_scan_enable_cmd_fixed_param;
11784
11785typedef struct {
11786 /**
11787 * TLV tag and len;
11788 * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
11789 */
11790 A_UINT32 tlv_header;
11791 A_UINT32 vdev_id;
11792} wmi_obss_scan_disable_cmd_fixed_param;
11793
11794typedef struct {
11795 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
11796 A_UINT32 tlv_header;
11797 /** unique id identifying the VDEV */
11798 A_UINT32 vdev_id;
11799 /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
11800 A_UINT32 tx_status;
11801} wmi_offload_prb_rsp_tx_status_event_fixed_param;
11802
11803typedef enum {
11804 WMI_FRAME_TX_OK, /* frame tx ok */
11805 WMI_FRAME_TX_XRETRY, /* excessivley retried */
11806 WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */
11807 WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */
11808} WMI_FRAME_TX_STATUS;
11809
11810/**
11811 * This command is sent from WLAN host driver to firmware to
11812 * request firmware to send the latest channel avoidance range
11813 * to host.
11814 *
11815 * This command is only applicable for APQ platform which has
11816 * modem on the platform. If firmware doesn't support MWS Coex,
11817 * this command can be dropped by firmware.
11818 *
11819 * Host would send this command to firmware to request a channel
11820 * avoidance information update.
11821 */
11822typedef struct {
11823 /** TLV tag and len; tag equals
11824 * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
11825 A_UINT32 tlv_header;
11826} wmi_chan_avoid_update_cmd_param;
11827
11828/* ExtScan operation mode */
11829typedef enum {
11830 WMI_EXTSCAN_MODE_NONE = 0x0000,
11831 WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */
11832 WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */
11833 WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */
11834} wmi_extscan_operation_mode;
11835
11836/* Channel Mask */
11837typedef enum {
11838 WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
11839 WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */
11840 WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */
11841 WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */
11842} wmi_channel_band_mask;
11843
11844typedef enum {
11845 WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001,
11846 WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002,
11847 WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004,
11848 WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008,
11849 WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010,
11850 WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020,
Govind Singhfad2f212016-01-21 10:55:51 +053011851 WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040,
11852 WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011853
11854 WMI_EXTSCAN_EVENT_MAX = 0x8000
11855} wmi_extscan_event_type;
11856
11857#define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \
11858 WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
11859
11860#define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \
11861 WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
11862 WMI_EXTSCAN_BUCKET_FAILED_EVENT | \
11863 WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
11864
11865typedef enum {
11866 WMI_EXTSCAN_NO_FORWARDING = 0x0000,
11867 WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
11868} wmi_extscan_forwarding_flags;
11869
11870typedef enum {
11871 /* Use Motion Sensor Detection */
11872 WMI_EXTSCAN_USE_MSD = 0x0001,
11873 /* Extscan LPASS extended batching feature is supported and enabled */
11874 WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002,
11875} wmi_extscan_configuration_flags;
11876typedef enum {
11877 /*
11878 * Cache the results of bucket whose
11879 * configuration flags has this bit set
11880 */
11881 WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001,
Govind Singhfad2f212016-01-21 10:55:51 +053011882 /* Report ext scan results to context hub or not.*/
11883 WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011884} wmi_extscan_bucket_configuration_flags;
11885
11886typedef enum {
11887 WMI_EXTSCAN_STATUS_OK = 0,
11888 WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
11889 WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
11890 WMI_EXTSCAN_STATUS_INTERNAL_ERROR
11891} wmi_extscan_start_stop_status;
11892
11893typedef struct {
11894 /** Request ID - to identify command. Cannot be 0 */
11895 A_UINT32 request_id;
11896 /** Requestor ID - client requesting ExtScan */
11897 A_UINT32 requestor_id;
11898 /** VDEV id(interface) that is requesting scan */
11899 A_UINT32 vdev_id;
11900} wmi_extscan_command_id;
11901
11902typedef struct {
11903 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
11904 /** channel number */
11905 A_UINT32 channel;
11906
11907 /** dwell time in msec - use defaults if 0 */
11908 A_UINT32 min_dwell_time;
11909 A_UINT32 max_dwell_time;
11910 /** passive/active channel and other flags */
11911 A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */
11912} wmi_extscan_bucket_channel;
11913
11914/* Scan Bucket specification */
11915typedef struct {
11916 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
11917 /** Bucket ID - 0-based */
11918 A_UINT32 bucket_id;
11919 /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
11920 A_UINT32 notify_extscan_events;
11921 /** Options to forward scan results - see wmi_extscan_forwarding_flags */
11922 A_UINT32 forwarding_flags;
11923 /*
11924 * ExtScan configuration flags -
11925 * wmi_extscan__bucket_configuration_flags
11926 */
11927 A_UINT32 configuration_flags;
11928 /** DEPRECATED member:multiplier to be applied to the periodic scan's base period */
11929 A_UINT32 base_period_multiplier;
11930 /** dwell time in msec on active channels - use defaults if 0 */
11931 A_UINT32 min_dwell_time_active;
11932 A_UINT32 max_dwell_time_active;
11933 /** dwell time in msec on passive channels - use defaults if 0 */
11934 A_UINT32 min_dwell_time_passive;
11935 A_UINT32 max_dwell_time_passive;
11936 /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
11937 A_UINT32 channel_band;
11938 /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
11939 A_UINT32 num_channels;
11940 /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
11941 A_UINT32 min_period;
11942 /** period above which exponent is not applied anymore */
11943 A_UINT32 max_period;
11944 /**
11945 * back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
11946 * new_bucket_period = last_bucket_period + last_exponent_period exp_backoff
11947 */
11948 A_UINT32 exp_backoff;
11949 /** number of scans performed at a given periodicity after which exponential back off value is
11950 * applied to current periodicity to obtain a newer one
11951 */
11952 A_UINT32 exp_max_step_count;
11953/** Followed by the variable length TLV chan_list:
11954 * wmi_extscan_bucket_channel chan_list[] */
11955} wmi_extscan_bucket;
11956
11957typedef struct {
11958 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
11959 /** Request ID - to identify command. Cannot be 0 */
11960 A_UINT32 request_id;
11961 /** Requestor ID - client requesting ExtScan */
11962 A_UINT32 requestor_id;
11963 /** VDEV id(interface) that is requesting scan */
11964 A_UINT32 vdev_id;
11965 /** table ID - to allow support for multiple simultaneous requests */
11966 A_UINT32 table_id;
11967 /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
11968 A_UINT32 base_period;
11969 /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
11970 A_UINT32 max_iterations;
11971 /** Options to forward scan results - see wmi_extscan_forwarding_flags */
11972 A_UINT32 forwarding_flags;
11973 /** ExtScan configuration flags - wmi_extscan_configuration_flags */
11974 A_UINT32 configuration_flags;
11975 /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
11976 A_UINT32 notify_extscan_events;
11977 /** Scan Priority, input to scan scheduler */
11978 A_UINT32 scan_priority;
11979 /** Maximum number of BSSIDs to cache on each scan cycle */
11980 A_UINT32 max_bssids_per_scan_cycle;
11981 /** Minimum RSSI value to report */
11982 A_UINT32 min_rssi;
11983 /** Maximum table usage in percentage */
11984 A_UINT32 max_table_usage;
11985 /** default dwell time in msec on active channels */
11986 A_UINT32 min_dwell_time_active;
11987 A_UINT32 max_dwell_time_active;
11988 /** default dwell time in msec on passive channels */
11989 A_UINT32 min_dwell_time_passive;
11990 A_UINT32 max_dwell_time_passive;
11991 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
11992 A_UINT32 min_rest_time;
11993 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
11994 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
11995 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
11996 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
11997 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
11998 * irrespective of activity. activity is determined by the idle_time parameter.
11999 */
12000 A_UINT32 max_rest_time;
12001 /** time before sending next set of probe requests.
12002 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
12003 * The number of probe requests specified depends on the ssid_list and bssid_list
12004 */
12005 /** Max number of probes to be sent */
12006 A_UINT32 n_probes;
12007 /** time in msec between 2 sets of probe requests. */
12008 A_UINT32 repeat_probe_time;
12009 /** time in msec between 2 consequetive probe requests with in a set. */
12010 A_UINT32 probe_spacing_time;
12011 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
12012 A_UINT32 idle_time;
12013 /** maximum time in msec allowed for scan */
12014 A_UINT32 max_scan_time;
12015 /** delay in msec before sending first probe request after switching to a channel */
12016 A_UINT32 probe_delay;
12017 /** Scan control flags */
12018 A_UINT32 scan_ctrl_flags;
12019 /** Burst duration time in msec*/
12020 A_UINT32 burst_duration;
12021
12022 /** number of bssids in the TLV bssid_list[] */
12023 A_UINT32 num_bssid;
12024 /** number of ssid in the TLV ssid_list[] */
12025 A_UINT32 num_ssids;
12026 /** number of bytes in TLV ie_data[] */
12027 A_UINT32 ie_len;
12028 /** number of buckets in the TLV bucket_list[] */
12029 A_UINT32 num_buckets;
12030 /** in number of scans, send notifications to host after these many scans */
12031 A_UINT32 report_threshold_num_scans;
12032
12033 /** number of channels in channel_list[] determined by the
12034 sum of wmi_extscan_bucket.num_channels in array */
12035
12036/**
12037 * TLV (tag length value ) parameters follow the extscan_cmd
12038 * structure. The TLV's are:
12039 * wmi_ssid ssid_list[];
12040 * wmi_mac_addr bssid_list[];
12041 * A_UINT8 ie_data[];
12042 * wmi_extscan_bucket bucket_list[];
12043 * wmi_extscan_bucket_channel channel_list[];
12044 */
12045} wmi_extscan_start_cmd_fixed_param;
12046
12047typedef struct {
12048 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
12049 /** Request ID - to match running command. 0 matches any request */
12050 A_UINT32 request_id;
12051 /** Requestor ID - client requesting stop */
12052 A_UINT32 requestor_id;
12053 /** VDEV id(interface) that is requesting scan */
12054 A_UINT32 vdev_id;
12055 /** table ID - to allow support for multiple simultaneous requests */
12056 A_UINT32 table_id;
12057} wmi_extscan_stop_cmd_fixed_param;
12058
12059enum wmi_extscan_get_cached_results_flags {
12060 WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000,
12061 WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
12062};
12063
12064typedef struct {
12065 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
12066 /** request ID - used to correlate command with events */
12067 A_UINT32 request_id;
12068 /** Requestor ID - client that requested results */
12069 A_UINT32 requestor_id;
12070 /** VDEV id(interface) that is requesting scan */
12071 A_UINT32 vdev_id;
12072 /** table ID - to allow support for multiple simultaneous requests */
12073 A_UINT32 table_id;
12074 /** maximum number of results to be returned */
12075 A_UINT32 max_results;
12076 /** flush BSSID list - wmi_extscan_get_cached_results_flags */
12077 A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */
12078} wmi_extscan_get_cached_results_cmd_fixed_param;
12079
12080typedef struct {
12081 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
12082 /** request ID - used to correlate command with events */
12083 A_UINT32 request_id;
12084 /** Requestor ID - client that requested results */
12085 A_UINT32 requestor_id;
12086 /** VDEV id(interface) that is requesting scan */
12087 A_UINT32 vdev_id;
12088 /** table ID - to allow support for multiple simultaneous requests */
12089 A_UINT32 table_id;
12090} wmi_extscan_get_wlan_change_results_cmd_fixed_param;
12091
12092typedef struct {
12093 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12094 /**bssid */
12095 wmi_mac_addr bssid;
12096 /**channel number */
12097 A_UINT32 channel;
12098 /**upper RSSI limit */
12099 A_UINT32 upper_rssi_limit;
12100 /**lower RSSI limit */
12101 A_UINT32 lower_rssi_limit;
12102} wmi_extscan_wlan_change_bssid_param;
12103
12104typedef struct {
12105 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
12106 /** Request ID - to identify command. Cannot be 0 */
12107 A_UINT32 request_id;
12108 /** Requestor ID - client requesting wlan change monitoring */
12109 A_UINT32 requestor_id;
12110 /** VDEV id(interface) that is requesting scan */
12111 A_UINT32 vdev_id;
12112 /** table ID - to allow support for multiple simultaneous tables */
12113 A_UINT32 table_id;
12114 /** operation mode: start/stop */
12115 A_UINT32 mode; /* wmi_extscan_operation_mode */
12116 /** number of rssi samples to store */
12117 A_UINT32 max_rssi_samples;
12118 /** number of samples to use to calculate RSSI average */
12119 A_UINT32 rssi_averaging_samples;
12120 /** number of scans to confirm loss of contact with RSSI */
12121 A_UINT32 lost_ap_scan_count;
12122 /** number of out-of-range BSSIDs necessary to send event */
12123 A_UINT32 max_out_of_range_count;
12124 /** total number of bssid signal descriptors (in all pages) */
12125 A_UINT32 total_entries;
12126 /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
12127 A_UINT32 first_entry_index;
12128 /** number of bssid signal descriptors in this page */
12129 A_UINT32 num_entries_in_page;
12130 /* Following this structure is the TLV:
12131 * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[]; // number of elements given by field num_page_entries.
12132 */
12133} wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
12134
12135typedef struct {
12136 /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12137 A_UINT32 tlv_header;
12138 /**ssid */
12139 wmi_ssid ssid;
12140 /**band */
12141 A_UINT32 band;
12142 /**RSSI threshold for reporting */
12143 A_UINT32 min_rssi;
12144 A_UINT32 max_rssi;
12145} wmi_extscan_hotlist_ssid_entry;
12146
12147typedef struct {
12148 /**
12149 * TLV tag and len; tag equals
12150 * MITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param
12151 */
12152 A_UINT32 tlv_header;
12153 /** Request ID - to identify command. Cannot be 0 */
12154 A_UINT32 request_id;
12155 /** Requestor ID - client requesting hotlist ssid monitoring */
12156 A_UINT32 requestor_id;
12157 /** VDEV id(interface) that is requesting scan */
12158 A_UINT32 vdev_id;
12159 /** table ID - to allow support for multiple simultaneous tables */
12160 A_UINT32 table_id;
12161 /** operation mode: start/stop */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012162 A_UINT32 mode; /* wmi_extscan_operation_mode */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012163 /**total number of ssids (in all pages) */
12164 A_UINT32 total_entries;
12165 /**index of the first ssid entry found in the TLV extscan_hotlist_ssid_entry*/
12166 A_UINT32 first_entry_index;
12167 /**number of ssids in this page */
12168 A_UINT32 num_entries_in_page;
12169 /** number of consecutive scans to confirm loss of an ssid **/
12170 A_UINT32 lost_ap_scan_count;
12171 /* Following this structure is the TLV:
12172 * wmi_extscan_hotlist_ssid_entry hotlist_ssid[];
12173 * number of element given by field num_page_entries.
12174 */
12175} wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
12176
12177typedef struct {
12178 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12179 /**bssid */
12180 wmi_mac_addr bssid;
12181 /**RSSI min threshold for reporting */
12182 A_UINT32 min_rssi;
12183 /**Deprecated entry channel number */
12184 A_UINT32 channel;
12185 /** RSSI max threshold for reporting */
12186 A_UINT32 max_rssi;
12187} wmi_extscan_hotlist_entry;
12188
12189typedef struct {
12190 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
12191 /** Request ID - to identify command. Cannot be 0 */
12192 A_UINT32 request_id;
12193 /** Requestor ID - client requesting hotlist monitoring */
12194 A_UINT32 requestor_id;
12195 /** VDEV id(interface) that is requesting scan */
12196 A_UINT32 vdev_id;
12197 /** table ID - to allow support for multiple simultaneous tables */
12198 A_UINT32 table_id;
12199 /** operation mode: start/stop */
12200 A_UINT32 mode; /* wmi_extscan_operation_mode */
12201 /**total number of bssids (in all pages) */
12202 A_UINT32 total_entries;
12203 /**index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry*/
12204 A_UINT32 first_entry_index;
12205 /**number of bssids in this page */
12206 A_UINT32 num_entries_in_page;
12207 /** number of consecutive scans to confirm loss of contact with AP */
12208 A_UINT32 lost_ap_scan_count;
12209 /* Following this structure is the TLV:
12210 * wmi_extscan_hotlist_entry hotlist[]; // number of elements given by field num_page_entries.
12211 */
12212} wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
12213
12214 typedef struct {
12215 /* TLV tag and len; tag equals
12216 *WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
12217 A_UINT32 tlv_header;
12218 /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
12219 A_UINT32 config_request_id;
12220 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID
12221 that configured the table */
12222 A_UINT32 config_requestor_id;
12223 /**
12224 * VDEV id(interface) of the
12225 * WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table
12226 */
12227 A_UINT32 config_vdev_id;
12228 /** table ID - to allow support for multiple simultaneous tables */
12229 A_UINT32 table_id;
12230 /**total number of ssids (in all pages) */
12231 A_UINT32 total_entries;
12232 /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
12233 A_UINT32 first_entry_index;
12234 /**number of ssids in this page */
12235 A_UINT32 num_entries_in_page;
12236 /* Following this structure is the TLV:
12237 * wmi_extscan_wlan_descriptor hotlist_match[];
12238 * number of descriptors given by field num_entries_in_page
12239 */
12240} wmi_extscan_hotlist_ssid_match_event_fixed_param;
12241
12242typedef struct {
12243 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12244 /** table ID - to allow support for multiple simultaneous tables */
12245 A_UINT32 table_id;
12246 /** size in bytes of scan cache entry */
12247 A_UINT32 scan_cache_entry_size;
12248 /** maximum number of scan cache entries */
12249 A_UINT32 max_scan_cache_entries;
12250 /** maximum number of buckets per extscan request */
12251 A_UINT32 max_buckets;
12252 /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
12253 A_UINT32 max_bssid_per_scan;
12254 /** table usage level at which indication must be sent to host */
12255 A_UINT32 max_table_usage_threshold;
12256} wmi_extscan_cache_capabilities;
12257
12258typedef struct {
12259 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12260 /** table ID - to allow support for multiple simultaneous tables */
12261 A_UINT32 table_id;
12262 /** size in bytes of wlan change entry */
12263 A_UINT32 wlan_change_entry_size;
12264 /** maximum number of entries in wlan change table */
12265 A_UINT32 max_wlan_change_entries;
12266 /** number of RSSI samples used for averaging RSSI */
12267 A_UINT32 max_rssi_averaging_samples;
12268 /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
12269 A_UINT32 max_rssi_history_entries;
12270} wmi_extscan_wlan_change_monitor_capabilities;
12271
12272typedef struct {
12273 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12274 /** table ID - to allow support for multiple simultaneous tables */
12275 A_UINT32 table_id;
12276 /** size in bytes of hotlist entry */
12277 A_UINT32 wlan_hotlist_entry_size;
12278 /** maximum number of entries in wlan change table */
12279 A_UINT32 max_hotlist_entries;
12280} wmi_extscan_hotlist_monitor_capabilities;
12281
12282typedef struct {
12283 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
12284 /** Request ID - matches request ID used to start hot list monitoring */
12285 A_UINT32 request_id;
12286 /** Requestor ID - client requesting stop */
12287 A_UINT32 requestor_id;
12288 /** number of extscan caches */
12289 A_UINT32 num_extscan_cache_tables;
12290 /** number of wlan change lists */
12291 A_UINT32 num_wlan_change_monitor_tables;
12292 /** number of hotlists */
12293 A_UINT32 num_hotlist_monitor_tables;
12294 /** if one sided rtt data collection is supported */
12295 A_UINT32 rtt_one_sided_supported;
12296 /** if 11v data collection is supported */
12297 A_UINT32 rtt_11v_supported;
12298 /** if 11mc data collection is supported */
12299 A_UINT32 rtt_ftm_supported;
12300 /** number of extscan cache capabilities (one per table) */
12301 A_UINT32 num_extscan_cache_capabilities;
12302 /** number of wlan change capabilities (one per table) */
12303 A_UINT32 num_extscan_wlan_change_capabilities;
12304 /** number of extscan hotlist capabilities (one per table) */
12305 A_UINT32 num_extscan_hotlist_capabilities;
12306 /* Following this structure is the TLV:
12307 * wmi_extscan_cache_capabilities extscan_cache_capabilities; // number of capabilities given by num_extscan_caches
12308 * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; // number of capabilities given by num_wlan_change_monitor_tables
12309 * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; // number of capabilities given by num_hotlist_monitor_tables
12310 */
12311} wmi_extscan_set_capabilities_cmd_fixed_param;
12312
12313typedef struct {
12314 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
12315 /** Request ID - matches request ID used to start hot list monitoring */
12316 A_UINT32 request_id;
12317 /** Requestor ID - client requesting capabilities */
12318 A_UINT32 requestor_id;
12319} wmi_extscan_get_capabilities_cmd_fixed_param;
12320
12321typedef struct {
12322 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
12323 /** Request ID of the operation that was started/stopped */
12324 A_UINT32 request_id;
12325 /** Requestor ID of the operation that was started/stopped */
12326 A_UINT32 requestor_id;
12327 /** VDEV id(interface) of the operation that was started/stopped */
12328 A_UINT32 vdev_id;
12329 /** extscan WMI command */
12330 A_UINT32 command;
12331 /** operation mode: start/stop */
12332 A_UINT32 mode; /* wmi_extscan_operation_mode */
12333 /**success/failure */
12334 A_UINT32 status; /* enum wmi_extscan_start_stop_status */
12335 /** table ID - to allow support for multiple simultaneous requests */
12336 A_UINT32 table_id;
12337} wmi_extscan_start_stop_event_fixed_param;
12338
12339typedef struct {
12340 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
12341 /** Request ID of the extscan operation that is currently running */
12342 A_UINT32 request_id;
12343 /** Requestor ID of the extscan operation that is currently running */
12344 A_UINT32 requestor_id;
12345 /** VDEV id(interface) of the extscan operation that is currently running */
12346 A_UINT32 vdev_id;
12347 /** scan event (wmi_scan_event_type) */
12348 A_UINT32 event; /* wmi_extscan_event_type */
12349 /** table ID - to allow support for multiple simultaneous requests */
12350 A_UINT32 table_id;
12351 /**number of buckets */
12352 A_UINT32 num_buckets;
12353 /* Following this structure is the TLV:
12354 * A_UINT32 bucket_id[]; // number of elements given by field num_buckets.
12355 */
12356} wmi_extscan_operation_event_fixed_param;
12357
12358/* Types of extscan tables */
12359typedef enum {
12360 EXTSCAN_TABLE_NONE = 0,
12361 EXTSCAN_TABLE_BSSID = 1,
12362 EXTSCAN_TABLE_RSSI = 2,
12363} wmi_extscan_table_type;
12364
12365typedef struct {
12366 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
12367 /** Request ID of the extscan operation that is currently running */
12368 A_UINT32 request_id;
12369 /** Requestor ID of the extscan operation that is currently running */
12370 A_UINT32 requestor_id;
12371 /** VDEV id(interface) of the extscan operation that is currently running */
12372 A_UINT32 vdev_id;
12373 /** table ID - to allow support for multiple simultaneous tables */
12374 A_UINT32 table_id;
12375 /**see wmi_extscan_table_type for table reporting usage */
12376 A_UINT32 table_type;
12377 /**number of entries in use */
12378 A_UINT32 entries_in_use;
12379 /**maximum number of entries in table */
12380 A_UINT32 maximum_entries;
12381} wmi_extscan_table_usage_event_fixed_param;
12382
12383typedef enum {
12384 /**
12385 * Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
12386 * this can be used to discard scan results
12387 */
12388 WMI_SCAN_STATUS_INTERRUPTED = 1
12389} wmi_scan_status_flags;
12390
12391
12392typedef struct {
12393 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12394 /**RSSI */
12395 A_UINT32 rssi;
12396 /**time stamp in milliseconds */
12397 A_UINT32 tstamp;
12398 /** Extscan cycle during which this entry was scanned */
12399 A_UINT32 scan_cycle_id;
12400 /**
12401 * flag to indicate if the given result was obtained as part of
12402 * interrupted (aborted/large time gap preempted) scan
12403 */
12404 A_UINT32 flags;
12405} wmi_extscan_rssi_info;
12406
12407typedef struct {
12408 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12409 /**bssid */
12410 wmi_mac_addr bssid;
12411 /**ssid */
12412 wmi_ssid ssid;
12413 /**channel number */
12414 A_UINT32 channel;
12415 /* capabilities */
12416 A_UINT32 capabilities;
12417 /* beacon interval in TUs */
12418 A_UINT32 beacon_interval;
12419 /**time stamp in milliseconds - time last seen */
12420 A_UINT32 tstamp;
12421 /**flags - _tExtScanEntryFlags */
12422 A_UINT32 flags;
12423 /**RTT in ns */
12424 A_UINT32 rtt;
12425 /**rtt standard deviation */
12426 A_UINT32 rtt_sd;
12427 /* rssi information */
12428 A_UINT32 number_rssi_samples;
12429 /** IE length */
12430 A_UINT32 ie_length; /* length of IE data */
12431} wmi_extscan_wlan_descriptor;
12432
12433typedef struct {
12434 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
12435 /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
12436 A_UINT32 request_id;
12437 /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
12438 A_UINT32 requestor_id;
12439 /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
12440 A_UINT32 vdev_id;
12441 /** Request ID of the extscan operation that is currently running */
12442 A_UINT32 extscan_request_id;
12443 /** Requestor ID of the extscan operation that is currently running */
12444 A_UINT32 extscan_requestor_id;
12445 /** VDEV id(interface) of the extscan operation that is currently running */
12446 A_UINT32 extscan_vdev_id;
12447 /** table ID - to allow support for multiple simultaneous tables */
12448 A_UINT32 table_id;
12449 /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
12450 A_UINT32 current_tstamp;
12451 /**total number of bssids (in all pages) */
12452 A_UINT32 total_entries;
12453 /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
12454 A_UINT32 first_entry_index;
12455 /**number of bssids in this page */
12456 A_UINT32 num_entries_in_page;
Govind Singhfad2f212016-01-21 10:55:51 +053012457 /* number of buckets scanned */
12458 A_UINT32 buckets_scanned;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012459 /* Followed by the variable length TLVs
12460 * wmi_extscan_wlan_descriptor bssid_list[]
12461 * wmi_extscan_rssi_info rssi_list[]
12462 * A_UINT8 ie_list[]
12463 */
12464} wmi_extscan_cached_results_event_fixed_param;
12465
12466typedef enum {
12467 EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00,
12468 EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
12469 EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02,
12470} wmi_extscan_wlan_change_flags;
12471
12472typedef struct {
12473 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
12474 /**bssid */
12475 wmi_mac_addr bssid;
12476 /**time stamp in milliseconds */
12477 A_UINT32 tstamp;
12478 /**upper RSSI limit */
12479 A_UINT32 upper_rssi_limit;
12480 /**lower RSSI limit */
12481 A_UINT32 lower_rssi_limit;
12482 /** channel */
12483 A_UINT32 channel; /* in MHz */
12484 /**current RSSI average */
12485 A_UINT32 rssi_average;
12486 /**flags - wmi_extscan_wlan_change_flags */
12487 A_UINT32 flags;
12488 /**legnth of RSSI history to follow (number of values) */
12489 A_UINT32 num_rssi_samples;
12490} wmi_extscan_wlan_change_result_bssid;
12491
12492typedef struct {
12493 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
12494 /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
12495 A_UINT32 request_id;
12496 /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
12497 A_UINT32 requestor_id;
12498 /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
12499 A_UINT32 vdev_id;
12500 /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
12501 A_UINT32 config_request_id;
12502 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
12503 A_UINT32 config_requestor_id;
12504 /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
12505 A_UINT32 config_vdev_id;
12506 /** table ID - to allow support for multiple simultaneous tables */
12507 A_UINT32 table_id;
12508 /**number of entries with RSSI out of range or BSSID not detected */
12509 A_UINT32 change_count;
12510 /**total number of bssid signal descriptors (in all pages) */
12511 A_UINT32 total_entries;
12512 /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
12513 A_UINT32 first_entry_index;
12514 /**number of bssids signal descriptors in this page */
12515 A_UINT32 num_entries_in_page;
12516 /* Following this structure is the TLV:
12517 * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[]; // number of descriptors given by field num_entries_in_page.
12518 * Following this structure is the list of RSSI values (each is an A_UINT8):
12519 * A_UINT8 rssi_list[]; // last N RSSI values.
12520 */
12521} wmi_extscan_wlan_change_results_event_fixed_param;
12522
12523enum _tExtScanEntryFlags {
12524 WMI_HOTLIST_FLAG_NONE = 0x00,
12525 WMI_HOTLIST_FLAG_PRESENCE = 0x01,
12526 WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
12527};
12528
12529typedef struct {
12530 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
12531 /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
12532 A_UINT32 config_request_id;
12533 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
12534 A_UINT32 config_requestor_id;
12535 /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
12536 A_UINT32 config_vdev_id;
12537 /** table ID - to allow support for multiple simultaneous tables */
12538 A_UINT32 table_id;
12539 /**total number of bssids (in all pages) */
12540 A_UINT32 total_entries;
12541 /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
12542 A_UINT32 first_entry_index;
12543 /**number of bssids in this page */
12544 A_UINT32 num_entries_in_page;
12545 /* Following this structure is the TLV:
12546 * wmi_extscan_wlan_descriptor hotlist_match[]; // number of descriptors given by field num_entries_in_page.
12547 */
12548} wmi_extscan_hotlist_match_event_fixed_param;
12549
12550typedef struct {
12551 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
12552 /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
12553 A_UINT32 request_id;
12554 /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
12555 A_UINT32 requestor_id;
12556 /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
12557 A_UINT32 vdev_id;
12558 /** number of extscan caches */
12559 A_UINT32 num_extscan_cache_tables;
12560 /** number of wlan change lists */
12561 A_UINT32 num_wlan_change_monitor_tables;
12562 /** number of hotlists */
12563 A_UINT32 num_hotlist_monitor_tables;
12564 /** if one sided rtt data collection is supported */
12565 A_UINT32 rtt_one_sided_supported;
12566 /** if 11v data collection is supported */
12567 A_UINT32 rtt_11v_supported;
12568 /** if 11mc data collection is supported */
12569 A_UINT32 rtt_ftm_supported;
12570 /** number of extscan cache capabilities (one per table) */
12571 A_UINT32 num_extscan_cache_capabilities;
12572 /** number of wlan change capabilities (one per table) */
12573 A_UINT32 num_extscan_wlan_change_capabilities;
12574 /** number of extscan hotlist capabilities (one per table) */
12575 A_UINT32 num_extscan_hotlist_capabilities;
12576 /* max number of roaming ssid whitelist firmware can support */
12577 A_UINT32 num_roam_ssid_whitelist;
12578 /* max number of blacklist bssid firmware can support */
12579 A_UINT32 num_roam_bssid_blacklist;
12580 /* max number of preferred list firmware can support */
12581 A_UINT32 num_roam_bssid_preferred_list;
12582 /* max number of hotlist ssids firmware can support */
12583 A_UINT32 num_extscan_hotlist_ssid;
12584 /* max number of epno networks firmware can support */
12585 A_UINT32 num_epno_networks;
12586
12587 /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
12588 * supports multiple lists of each type.
12589 *
12590 * wmi_extscan_cache_capabilities extscan_cache_capabilities[] // capabilities of extscan cache (BSSID/RSSI lists)
12591 * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] // capabilities of wlan_change_monitor_tables
12592 * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] // capabilities of hotlist_monitor_tables
12593 */
12594} wmi_extscan_capabilities_event_fixed_param;
12595
12596/* WMI_D0_WOW_DISABLE_ACK_EVENTID */
12597typedef struct {
12598 A_UINT32 tlv_header;
12599 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */
12600 A_UINT32 reserved0; /* for future need */
12601} wmi_d0_wow_disable_ack_event_fixed_param;
12602
12603/** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
12604typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053012605 /** TLV tag and len; tag equals
12606 * WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param
12607 */
12608 A_UINT32 tlv_header;
12609 /** pdev_id for identifying the MAC
12610 * See macros starting with WMI_PDEV_ID_ for values.
12611 */
12612 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012613} wmi_pdev_resume_event_fixed_param;
12614
12615/** value representing all modules */
12616#define WMI_DEBUG_LOG_MODULE_ALL 0xffff
12617
12618/* param definitions */
12619
12620/**
12621 * Log level for a given module. Value contains both module id and log level.
12622 * here is the bitmap definition for value.
12623 * module Id : 16
12624 * Flags : reserved
12625 * Level : 8
12626 * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global).
12627 * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
12628 */
12629#define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1
12630
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012631#define WMI_DBGLOG_SET_LOG_LEVEL(val, lvl) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012632 (val) |= (lvl & 0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012633} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012634
12635#define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
12636
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012637#define WMI_DBGLOG_SET_MODULE_ID(val, mid) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012638 (val) |= ((mid & 0xffff) << 16); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012639} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012640
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012641#define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012642
12643/**
12644 * Enable the debug log for a given vdev. Value is vdev id
12645 */
12646#define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2
12647
12648/**
12649 * Disable the debug log for a given vdev. Value is vdev id
12650 * All the log level for a given VDEV is disabled except the ERROR log messages
12651 */
12652
12653#define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3
12654
12655/**
12656 * set vdev enable bitmap. value is the vden enable bitmap
12657 */
12658#define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4
12659
12660/**
12661 * set a given log level to all the modules specified in the module bitmap.
12662 * and set the log levle for all other modules to DBGLOG_ERR.
12663 * value: log levelt to be set.
12664 * module_id_bitmap : identifies the modules for which the log level should be set and
12665 * modules for which the log level should be reset to DBGLOG_ERR.
12666 */
12667#define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5
12668
12669#define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
12670
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012671#define WMI_MODULE_ENABLE(pmid_bitmap, mod_id) \
12672 ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
12673 (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012674
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012675#define WMI_MODULE_DISABLE(pmid_bitmap, mod_id) \
12676 ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \
12677 (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012678
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053012679#define WMI_MODULE_IS_ENABLED(pmid_bitmap, mod_id) \
12680 (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \
12681 (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012682
12683#define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
12684typedef struct {
12685 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
12686 A_UINT32 dbg_log_param;
12687 /** param types are defined above */
12688 A_UINT32 value;
12689 /* The below array will follow this tlv ->fixed length module_id_bitmap[]
12690 A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
12691 */
12692} wmi_debug_log_config_cmd_fixed_param;
12693
12694typedef struct {
12695 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */
12696 A_UINT32 param; /* Reserved for future use */
Govind Singh869c9872016-02-22 18:36:34 +053012697 /** pdev_id for identifying the MAC
12698 * See macros starting with WMI_PDEV_ID_ for values.
12699 */
12700 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012701} wmi_pdev_get_temperature_cmd_fixed_param;
12702
12703typedef struct {
12704 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
12705 A_INT32 value; /* temprature value in Celcius degree */
Govind Singh869c9872016-02-22 18:36:34 +053012706 /** pdev_id for identifying the MAC
12707 * See macros starting with WMI_PDEV_ID_ for values.
12708 */
12709 A_UINT32 pdev_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012710} wmi_pdev_temperature_event_fixed_param;
12711
12712typedef struct {
12713 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
12714 A_UINT32 vdev_id;
12715 A_UINT32 enable;
12716 A_UINT32 srv_ipv4; /* server IP */
12717 A_UINT32 start_lsb; /* starting address assigned to client */
12718 A_UINT32 num_client; /* number of clients we support */
12719} wmi_set_dhcp_server_offload_cmd_fixed_param;
12720
12721typedef enum {
12722 AP_RX_DATA_OFFLOAD = 0x00,
12723 STA_RX_DATA_OFFLOAD = 0x01,
12724} wmi_ipa_offload_types;
12725
12726/**
12727 * This command is sent from WLAN host driver to firmware for
12728 * enabling/disabling IPA data-path offload features.
12729 *
12730 *
12731 * Enabling data path offload to IPA(based on host INI configuration), example:
12732 * when STA interface comes up,
12733 * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
12734 * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
12735 *
12736 * Disabling data path offload to IPA, example:
12737 * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
12738 * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
12739 *
12740 *
12741 * This command is applicable only on the PCIE LL systems
12742 *
12743 */
12744typedef struct {
12745 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
12746 A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
12747 A_UINT32 vdev_id;
12748 A_UINT32 enable; /* 1 == enable, 0 == disable */
12749} wmi_ipa_offload_enable_disable_cmd_fixed_param;
12750
12751typedef enum {
12752 WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0,
12753 WMI_LED_FLASHING_PATTERN_CONNECTED = 1,
12754 WMI_LED_FLASHING_PATTERN_RESERVED = 2,
12755} wmi_set_led_flashing_type;
12756
12757/**
12758 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.
12759 Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
12760 remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
12761 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
12762 pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to
12763 High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
12764 Zero is reached, it is skipped and moves on to the next interval.
12765 */
12766typedef struct {
12767 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */
12768 A_UINT32 pattern_id; /* pattern identifier */
12769 A_UINT32 led_x0; /* led flashing parameter0 */
12770 A_UINT32 led_x1; /* led flashing parameter1 */
12771 A_UINT32 gpio_num; /* GPIO number */
12772} wmi_set_led_flashing_cmd_fixed_param;
12773
12774/**
12775 * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
12776 * within small networks that do not include a local name server.
12777 * It utilizes essentially the same programming interfaces, packet formats and operating semantics
12778 * as the unicast DNS, and the advantage is zero configuration service while no need for central or
12779 * global server.
12780 * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
12781 * by type in a specified domain using standard DNS queries.
12782 * Here, we provide the ability to advertise the available services by responding to mDNS queries.
12783 */
12784typedef struct {
12785 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
12786 A_UINT32 vdev_id;
12787 A_UINT32 enable;
12788} wmi_mdns_offload_cmd_fixed_param;
12789
12790#define WMI_MAX_MDNS_FQDN_LEN 64
12791#define WMI_MAX_MDNS_RESP_LEN 512
12792#define WMI_MDNS_FQDN_TYPE_GENERAL 0
12793#define WMI_MDNS_FQDN_TYPE_UNIQUE 1
12794
12795typedef struct {
12796 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
12797 A_UINT32 vdev_id;
12798 /** type of fqdn, general or unique */
12799 A_UINT32 type;
12800 /** length of fqdn */
12801 A_UINT32 fqdn_len;
12802 /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
12803 * A_UINT8 fqdn_data[]; // fully-qualified domain name to check if match with the received queries
12804 */
12805} wmi_mdns_set_fqdn_cmd_fixed_param;
12806
12807typedef struct {
12808 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
12809 A_UINT32 vdev_id;
12810 /** Answer Resource Record count */
12811 A_UINT32 AR_count;
12812 /** length of response */
12813 A_UINT32 resp_len;
12814 /* Following this structure is the TLV byte stream of resp data of length resp_len
12815 * A_UINT8 resp_data[]; // responses consisits of Resource Records
12816 */
12817} wmi_mdns_set_resp_cmd_fixed_param;
12818
12819typedef struct {
12820 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
12821 A_UINT32 vdev_id;
12822} wmi_mdns_get_stats_cmd_fixed_param;
12823
12824typedef struct {
12825 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
12826 A_UINT32 vdev_id;
12827 /** curTimestamp in milliseconds */
12828 A_UINT32 curTimestamp;
12829 /** last received Query in milliseconds */
12830 A_UINT32 lastQueryTimestamp;
12831 /** last sent Response in milliseconds */
12832 A_UINT32 lastResponseTimestamp;
12833 /** stats of received queries */
12834 A_UINT32 totalQueries;
12835 /** stats of macth queries */
12836 A_UINT32 totalMatches;
12837 /** stats of responses */
12838 A_UINT32 totalResponses;
12839 /** indicate the current status of mDNS offload */
12840 A_UINT32 status;
12841} wmi_mdns_stats_event_fixed_param;
12842
12843/**
12844 * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
12845 * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
12846 * request and create/remove connection even host is suspended.
12847 * 3 major components are offloaded:
12848 * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
12849 * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
12850 * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
12851 * Current implementation only supports WPA2 CCMP.
12852 */
12853
12854typedef struct {
12855 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
12856 /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
12857 A_UINT32 vdev_id;
12858 /** enable/disable sap auth offload */
12859 A_UINT32 enable;
12860 /** sap ssid */
12861 wmi_ssid ap_ssid;
12862 /** authentication mode (defined above) */
12863 A_UINT32 rsn_authmode;
12864 /** unicast cipher set */
12865 A_UINT32 rsn_ucastcipherset;
12866 /** mcast/group cipher set */
12867 A_UINT32 rsn_mcastcipherset;
12868 /** mcast/group management frames cipher set */
12869 A_UINT32 rsn_mcastmgmtcipherset;
12870 /** sap channel */
12871 A_UINT32 channel;
12872 /** length of psk */
12873 A_UINT32 psk_len;
12874 /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
12875 * A_UINT8 psk[];
12876 */
12877} wmi_sap_ofl_enable_cmd_fixed_param;
12878
12879typedef struct {
12880 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
12881 /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
12882 A_UINT32 vdev_id;
12883 /** aid (association id) of this station */
12884 A_UINT32 assoc_id;
12885 /** peer station's mac addr */
12886 wmi_mac_addr peer_macaddr;
12887 /** length of association request frame */
12888 A_UINT32 data_len;
12889 /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
12890 * A_UINT8 bufp[];
12891 */
12892} wmi_sap_ofl_add_sta_event_fixed_param;
12893
12894typedef enum {
12895 SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
12896 SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
12897} wmi_sap_ofl_del_sta_flags;
12898
12899typedef struct {
12900 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
12901 /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
12902 A_UINT32 vdev_id;
12903 /** aid (association id) of this station */
12904 A_UINT32 assoc_id;
12905 /** peer station's mac addr */
12906 wmi_mac_addr peer_macaddr;
12907 /** disassociation reason */
12908 A_UINT32 reason;
12909 /** flags - wmi_sap_ofl_del_sta_flags */
12910 A_UINT32 flags;
12911} wmi_sap_ofl_del_sta_event_fixed_param;
12912
12913typedef struct {
12914 /*
12915 * TLV tag and len; tag equals
12916 * WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param
12917 */
12918 A_UINT32 tlv_header;
12919 A_UINT32 vdev_id;
12920 /* Number of client failure connection attempt */
12921 A_UINT32 num_retry;
12922 /*Time in milliseconds to record the client's failure connection attempts*/
12923 A_UINT32 retry_allow_time_ms;
12924 /*
12925 * Time in milliseconds to drop the connection request if
12926 * client is blacklisted
12927 */
12928 A_UINT32 blackout_time_ms;
12929} wmi_sap_set_blacklist_param_cmd_fixed_param;
12930
12931typedef struct {
12932 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
12933 A_UINT32 data_len; /** length in byte of data[]. */
12934 /** This structure is used to send REQ binary blobs
12935 * from application/service to firmware where Host drv is pass through .
12936 * Following this structure is the TLV:
12937 * A_UINT8 data[]; // length in byte given by field data_len.
12938 */
12939} wmi_apfind_cmd_param;
12940
12941typedef enum apfind_event_type_e {
12942 APFIND_MATCH_EVENT = 0,
12943 APFIND_WAKEUP_EVENT,
12944} APFIND_EVENT_TYPE;
12945
12946typedef struct {
12947 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
12948 A_UINT32 event_type; /** APFIND_EVENT_TYPE */
12949 A_UINT32 data_len; /** length in byte of data[]. */
12950 /** This structure is used to send event binary blobs
12951 * from firmware to application/service and Host drv.
12952 * Following this structure is the TLV:
12953 * A_UINT8 data[]; // length in byte given by field data_len.
12954 */
12955} wmi_apfind_event_hdr;
12956
12957/**
12958 * OCB DCC types and structures.
12959 */
12960
12961/**
12962 * DCC types as described in ETSI TS 102 687
12963 * Type Format stepSize referenceValue numBits
12964 * -------------------------------------------------------------------------
12965 * ndlType_acPrio INTEGER (0...7) 1 number 3
12966 * ndlType_controlLoop INTEGER (0...7) 1 0 3
12967 * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13
12968 * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10
12969 * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13
12970 * ndlType_datarate INTEGER (0..7) Table 8 3
12971 * ndlType_distance INTEGER (0..4095) 1 m 0 12
12972 * ndlType_numberElements INTEGER (0..63) number 6
12973 * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11
12974 * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10
12975 * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5
12976 * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7
12977 * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7
12978 * ndlType_timing INTEGER (0..4095) 10 ms 0 12
12979 * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7
12980 * ndlType_ratio INTEGER (0..100) 1 % 0 % 7
12981 * ndlType_exponent INTEGER (0..100) 0.1 0 7
12982 * ndlType_queueStatus Enumeration Table A.2 1
12983 * ndlType_dccMechanism Bitset Table A.2 6
12984 *
12985 * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
12986 * cannot be changed without breaking WMI compatibility.
12987 *
12988 * NOTE: For each of the types, one additional bit is allocated. This
12989 * leftmost bit is used to indicate that the value is invalid.
12990 */
12991#define SIZE_NDLTYPE_ACPRIO (1 + 3)
12992#define SIZE_NDLTYPE_CONTROLLOOP (1 + 3)
12993#define SIZE_NDLTYPE_ARRIVALRATE (1 + 13)
12994#define SIZE_NDLTYPE_CHANNELLOAD (1 + 10)
12995#define SIZE_NDLTYPE_CHANNELUSE (1 + 13)
12996#define SIZE_NDLTYPE_DATARATE (1 + 3)
12997#define SIZE_NDLTYPE_DISTANCE (1 + 12)
12998#define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6)
12999#define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
13000#define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
13001#define SIZE_NDLTYPE_PATHLOSS (1 + 5)
13002#define SIZE_NDLTYPE_RXPOWER (1 + 7)
13003#define SIZE_NDLTYPE_SNR (1 + 7)
13004#define SIZE_NDLTYPE_TIMING (1 + 12)
13005#define SIZE_NDLTYPE_TXPOWER (1 + 7)
13006#define SIZE_NDLTYPE_RATIO (1 + 7)
13007#define SIZE_NDLTYPE_EXPONENT (1 + 7)
13008#define SIZE_NDLTYPE_QUEUESTATUS (1 + 1)
13009#define SIZE_NDLTYPE_DCCMECHANISM (1 + 6)
13010#define SIZE_BYTE (8)
13011
13012#define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
13013#define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
13014#define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
13015#define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
13016#define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
13017#define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1)
13018#define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
13019#define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
13020#define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
13021#define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
13022#define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
13023#define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
13024#define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1)
13025#define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1)
13026#define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
13027#define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1)
13028#define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
13029#define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
13030#define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
13031
13032/**
13033 * The MCS_COUNT macro cannot be modified without breaking
13034 * WMI compatibility.
13035 */
13036#define MCS_COUNT (8)
13037
13038/**
13039 * Flags for ndlType_dccMechanism.
13040 */
13041typedef enum {
13042 DCC_MECHANISM_TPC = 1,
13043 DCC_MECHANISM_TRC = 2,
13044 DCC_MECHANISM_TDC = 4,
13045 DCC_MECHANISM_DSC = 8,
13046 DCC_MECHANISM_TAC = 16,
13047 DCC_MECHANISM_RESERVED = 32,
13048 DCC_MECHANISM_ALL = 0x3f,
13049} wmi_dcc_ndl_type_dcc_mechanism;
13050
13051/** Values for ndlType_queueStatus. */
13052typedef enum {
13053 DCC_QUEUE_CLOSED = 0,
13054 DCC_QUEUE_OPEN = 1,
13055} wmi_dcc_ndl_type_queue_status;
13056
13057/**
13058 * For ndlType_acPrio, use the values in wmi_traffic_ac.
13059 * Values for ndlType_datarate.
13060 */
13061typedef enum {
13062 DCC_DATARATE_3_MBPS = 0,
13063 DCC_DATARATE_4_5_MBPS = 1,
13064 DCC_DATARATE_6_MBPS = 2,
13065 DCC_DATARATE_9_MBPS = 3,
13066 DCC_DATARATE_12_MBPS = 4,
13067 DCC_DATARATE_18_MBPS = 5,
13068 DCC_DATARATE_24_MBPS = 6,
13069 DCC_DATARATE_27_MBPS = 7,
13070} wmi_dcc_ndl_type_datarate;
13071
13072/** Data structure for active state configuration. */
13073typedef struct {
13074 /** TLV tag and len; tag equals
13075 * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config
13076 */
13077 A_UINT32 tlv_header;
13078 /**
13079 * NDL_asStateId, ndlType_numberElements, 1+6 bits.
13080 * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
13081 */
13082 A_UINT32 state_info;
13083 /**
13084 * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
13085 * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
13086 * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
13087 * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
13088 */
13089 A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
13090 /**
13091 * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
13092 * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
13093 * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
13094 * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
13095 */
13096 A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
13097 /**
13098 * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
13099 * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
13100 * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
13101 * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
13102 */
13103 A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
13104 /**
13105 * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
13106 * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
13107 * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
13108 * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
13109 */
13110 A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
13111 /**
13112 * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
13113 * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
13114 * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
13115 * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
13116 */
13117 A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
13118} wmi_dcc_ndl_active_state_config;
13119
13120#define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7)
13121#define WMI_NDL_AS_STATE_ID_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 0, 7, val)
13122#define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11)
13123#define WMI_NDL_AS_CHAN_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 7, 11, val)
13124#define WMI_NDL_AS_DCC_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
13125#define WMI_NDL_AS_DCC_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
13126#define WMI_NDL_AS_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
13127#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)
13128#define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
13129#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)
13130#define WMI_NDL_AS_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
13131#define WMI_NDL_AS_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
13132#define WMI_NDL_AS_CARRIER_SENSE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
13133#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)
13134
13135/** Data structure for EDCA/QOS parameters. */
13136typedef struct {
13137 /** TLV tag and len; tag equals
13138 * WMITLV_TAG_STRUC_wmi_qos_parameter */
13139 A_UINT32 tlv_header;
13140 /** Arbitration Inter-Frame Spacing. Range: 2-15 */
13141 A_UINT32 aifsn;
13142 /** Contention Window minimum. Range: 1 - 10 */
13143 A_UINT32 cwmin;
13144 /** Contention Window maximum. Range: 1 - 10 */
13145 A_UINT32 cwmax;
13146} wmi_qos_parameter;
13147
13148/** Data structure for information specific to a channel. */
13149typedef struct {
13150 /** TLV tag and len; tag equals
13151 * WMITLV_TAG_STRUC_wmi_ocb_channel */
13152 A_UINT32 tlv_header;
13153 A_UINT32 bandwidth; /* MHz units */
13154 wmi_mac_addr mac_address;
13155} wmi_ocb_channel;
13156
13157/** Data structure for an element of the schedule array. */
13158typedef struct {
13159 /** TLV tag and len; tag equals
13160 * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
13161 A_UINT32 tlv_header;
13162 A_UINT32 channel_freq; /* MHz units */
13163 A_UINT32 total_duration; /* ms units */
13164 A_UINT32 guard_interval; /* ms units */
13165} wmi_ocb_schedule_element;
13166
13167/** Data structure for OCB configuration. */
13168typedef struct {
13169 /** TLV tag and len; tag equals
13170 * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
13171 A_UINT32 tlv_header;
13172 /** VDEV id(interface) that is being configured */
13173 A_UINT32 vdev_id;
13174 A_UINT32 channel_count;
13175 A_UINT32 schedule_size;
13176 A_UINT32 flags;
13177
13178 /** This is followed by a TLV array of wmi_channel.
13179 * This is followed by a TLV array of wmi_ocb_channel.
13180 * This is followed by a TLV array of wmi_qos_parameter.
13181 * This is followed by a TLV array of wmi_dcc_ndl_chan.
13182 * This is followed by a TLV array of wmi_dcc_ndl_active_state_config.
13183 * This is followed by a TLV array of wmi_ocb_schedule_element.
13184 */
13185} wmi_ocb_set_config_cmd_fixed_param;
13186
13187
13188#define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0
13189#define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1
13190
13191#define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) \
13192 (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
13193
13194
13195/** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
13196typedef struct {
13197 /** TLV tag and len; tag equals
13198 * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param
13199 */
13200 A_UINT32 tlv_header;
13201 /* VDEV id(interface)*/
13202 A_UINT32 vdev_id;
13203 A_UINT32 status;
13204} wmi_ocb_set_config_resp_event_fixed_param;
13205
13206/* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
13207 * WMI compatibility.
13208 */
13209/* The size of the utc time in bytes. */
13210#define SIZE_UTC_TIME (10)
13211/* The size of the utc time error in bytes. */
13212#define SIZE_UTC_TIME_ERROR (5)
13213
13214/** Data structure to set the UTC time. */
13215typedef struct {
13216 /** TLV tag and len; tag equals
13217 * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
13218 A_UINT32 tlv_header;
13219 /*VDEV Identifier*/
13220 A_UINT32 vdev_id;
13221 /** 10 bytes of the utc time. */
13222 A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME, SIZE_BYTE)];
13223 /** 5 bytes of the time error. */
13224 A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR, SIZE_BYTE)];
13225} wmi_ocb_set_utc_time_cmd_fixed_param;
13226
13227#define WMI_UTC_TIME_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
13228#define WMI_UTC_TIME_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
13229#define WMI_TIME_ERROR_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
13230#define WMI_TIME_ERROR_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
13231
13232/** Data structure start the timing advertisement. The template for the
13233 * timing advertisement frame follows this structure in the WMI command.
13234 */
13235typedef struct {
13236 /** TLV tag and len; tag equals
13237 * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
13238 A_UINT32 tlv_header;
13239 /*VDEV Identifier*/
13240 A_UINT32 vdev_id;
13241 /** Number of times the TA is sent every 5 seconds. */
13242 A_UINT32 repeat_rate;
13243 /** The frequency on which to transmit. */
13244 A_UINT32 channel_freq; /* MHz units */
13245 /** The offset into the template of the timestamp. */
13246 A_UINT32 timestamp_offset;
13247 /** The offset into the template of the time value. */
13248 A_UINT32 time_value_offset;
13249 /** The length of the timing advertisement template. The
13250 * template is in the TLV data. */
13251 A_UINT32 timing_advert_template_length;
13252 /** This is followed by a binary array containing the TA template. */
13253} wmi_ocb_start_timing_advert_cmd_fixed_param;
13254
13255/** Data structure to stop the timing advertisement. */
13256typedef struct {
13257 /** TLV tag and len; tag equals
13258 * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
13259 A_UINT32 tlv_header;
13260 /*VDEV Identifier*/
13261 A_UINT32 vdev_id;
13262 A_UINT32 channel_freq; /* MHz units */
13263} wmi_ocb_stop_timing_advert_cmd_fixed_param;
13264
13265/** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
13266typedef struct {
13267 /** TLV tag and len; tag equals
13268 * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
13269 A_UINT32 tlv_header;
13270 /*VDEV Identifier*/
13271 A_UINT32 vdev_id;
13272 A_UINT32 reserved;
13273} wmi_ocb_get_tsf_timer_cmd_fixed_param;
13274
13275/** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
13276typedef struct {
13277 /** TLV tag and len; tag equals
13278 * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
13279 A_UINT32 tlv_header;
13280 /*VDEV Identifier*/
13281 A_UINT32 vdev_id;
13282 A_UINT32 tsf_timer_high;
13283 A_UINT32 tsf_timer_low;
13284} wmi_ocb_get_tsf_timer_resp_event_fixed_param;
13285
13286/** Data structure for DCC stats configuration per channel. */
13287typedef struct {
13288 /** TLV tag and len; tag equals
13289 * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
13290 A_UINT32 tlv_header;
13291
13292 /*VDEV Identifier*/
13293 A_UINT32 vdev_id;
13294
13295 /** The channel for which this applies, 16 bits.
13296 * The dcc_stats_bitmap, 8 bits. */
13297 A_UINT32 chan_info;
13298
13299 /** Demodulation model parameters.
13300 *
13301 * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
13302 * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
13303 * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
13304 * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
13305 * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
13306 * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
13307 * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
13308 * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
13309 */
13310 A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)];
13311
13312 /** Communication ranges.
13313 *
13314 * tx_power, ndlType_txPower, 1+7 bits.
13315 * datarate, ndlType_datarate, 1+3 bits.
13316 */
13317 A_UINT32 tx_power_datarate;
13318 /**
13319 * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
13320 * NDL_estCommRange, ndlType_distance, 1+12 bits.
13321 */
13322 A_UINT32 carrier_sense_est_comm_range;
13323
13324 /** Channel load measures. */
13325 /**
13326 * dccSensitivity, ndlType_rxPower, 1+7 bits.
13327 * carrierSense, ndlType_rxPower, 1+7 bits.
13328 * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
13329 */
13330 A_UINT32 dcc_stats;
13331 /**
13332 * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
13333 * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
13334 */
13335 A_UINT32 packet_stats;
13336 /**
13337 * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
13338 */
13339 A_UINT32 channel_busy_time;
13340 /**
13341 *Transmit packet statistics.
13342 * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
13343 * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
13344 * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
13345 * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
13346 */
13347 A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
13348 /**
13349 * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
13350 * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
13351 * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
13352 * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
13353 */
13354 A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
13355 /**
13356 * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
13357 * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
13358 * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
13359 * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
13360 */
13361 A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
13362 /**
13363 * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
13364 * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
13365 * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
13366 * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
13367 */
13368 A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
13369} wmi_dcc_ndl_stats_per_channel;
13370
13371#define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
13372#define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
13373#define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
13374#define WMI_NDL_STATS_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
13375#define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8)
13376#define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
13377#define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
13378#define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
13379#define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
13380#define WMI_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
13381#define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
13382#define WMI_TX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
13383#define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
13384#define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
13385#define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
13386#define WMI_NDL_EST_COMM_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
13387#define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
13388#define WMI_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
13389#define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
13390#define WMI_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
13391#define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
13392#define WMI_NDL_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
13393#define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14)
13394#define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
13395#define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12)
13396#define WMI_NDL_PACKET_AVG_DURATION_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
13397#define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
13398#define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr, val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
13399
13400#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)
13401#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)
13402#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)
13403#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)
13404#define WMI_NDL_TX_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
13405#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)
13406#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)
13407#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)
13408
13409/** Bitmap for DCC stats. */
13410typedef enum {
13411 DCC_STATS_DEMODULATION_MODEL = 1,
13412 DCC_STATS_COMMUNICATION_RANGES = 2,
13413 DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
13414 DCC_STATS_TRANSMIT_PACKET_STATS = 8,
13415 DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
13416 DCC_STATS_ALL = 0xff,
13417} wmi_dcc_stats_bitmap;
13418
13419/** Data structure for getting the DCC stats. */
13420typedef struct {
13421 /**
13422 * TLV tag and len; tag equals
13423 * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param
13424 */
13425 A_UINT32 tlv_header;
13426 /* VDEV identifier */
13427 A_UINT32 vdev_id;
13428 /**The number of channels for which stats are being requested. */
13429 A_UINT32 num_channels;
13430 /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
13431} wmi_dcc_get_stats_cmd_fixed_param;
13432
13433typedef struct {
13434 /**
13435 * TLV tag and len; tag equals
13436 * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request.
13437 */
13438 A_UINT32 tlv_header;
13439 /** The channel for which this applies. */
13440 A_UINT32 chan_freq; /* MHz units */
13441 /** The DCC stats being requested. */
13442 A_UINT32 dcc_stats_bitmap;
13443} wmi_dcc_channel_stats_request;
13444
13445/** Data structure for the response with the DCC stats. */
13446typedef struct {
13447 /**
13448 * TLV tag and len; tag equals
13449 * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param
13450 */
13451 A_UINT32 tlv_header;
13452 /* VDEV identifier */
13453 A_UINT32 vdev_id;
13454 /** Number of channels in the response. */
13455 A_UINT32 num_channels;
13456 /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
13457} wmi_dcc_get_stats_resp_event_fixed_param;
13458
13459/** Data structure for clearing the DCC stats. */
13460typedef struct {
13461 /**
13462 * TLV tag and len; tag equals
13463 * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param
13464 */
13465 A_UINT32 tlv_header;
13466 /* VDEV identifier */
13467 A_UINT32 vdev_id;
13468 A_UINT32 dcc_stats_bitmap;
13469} wmi_dcc_clear_stats_cmd_fixed_param;
13470
13471/** Data structure for the pushed DCC stats */
13472typedef struct {
13473 /**
13474 * TLV tag and len; tag equals
13475 * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param
13476 */
13477 A_UINT32 tlv_header;
13478 /* VDEV identifier */
13479 A_UINT32 vdev_id;
13480 /** The number of channels in the response. */
13481 A_UINT32 num_channels;
13482 /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
13483} wmi_dcc_stats_event_fixed_param;
13484
13485/** Data structure for updating NDL per channel. */
13486typedef struct {
13487 /**
13488 * TLV tag and len; tag equals
13489 * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan
13490 */
13491 A_UINT32 tlv_header;
13492 /**
13493 * Channel frequency, 16 bits
13494 * NDL_numActiveState, ndlType_numberElements, 1+6 bits
13495 */
13496 A_UINT32 chan_info;
13497 /**
13498 * NDL_minDccSampling, 10 bits.
13499 * Maximum time interval between subsequent checks of the DCC rules.
13500 */
13501 A_UINT32 ndl_min_dcc_sampling;
13502 /**
13503 * dcc_enable, 1 bit.
13504 * dcc_stats_enable, 1 bit.
13505 * dcc_stats_interval, 16 bits.
13506 */
13507 A_UINT32 dcc_flags;
13508 /** General DCC configuration.
13509 * NDL_timeUp, ndlType_timing, 1+12 bits.
13510 * NDL_timeDown, ndlType_timing, 1+12 bits.
13511 */
13512 A_UINT32 general_config;
13513 /** Transmit power thresholds.
13514 * NDL_minTxPower, ndlType_txPower, 1+7 bits.
13515 * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
13516 */
13517 /* see "ETSI TS 102 687" table above for units */
13518 A_UINT32 min_max_tx_power;
13519 /**
13520 * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
13521 * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
13522 * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
13523 * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
13524 */
13525 /* see "ETSI TS 102 687" table above for units */
13526 A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
13527 /** Packet timing thresholds.
13528 * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
13529 * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
13530 * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
13531 * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
13532 */
13533 A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
13534 /**
13535 * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
13536 * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
13537 */
13538 A_UINT32 min_max_packet_interval;
13539 /**
13540 * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
13541 * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
13542 * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
13543 * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits
13544 */
13545 A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
13546 /** Packet datarate thresholds.
13547 * NDL_minDatarate, ndlType_datarate, 1+3 bits.
13548 * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
13549 */
13550 A_UINT32 min_max_datarate;
13551 /**
13552 * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
13553 * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
13554 * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
13555 * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
13556 */
13557 A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
13558 /** Receive signal thresholds.
13559 * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
13560 * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
13561 * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
13562 */
13563 A_UINT32 min_max_def_carrier_sense;
13564
13565 /** Receive model parameter.
13566 * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
13567 * NDL_maxCsRange, ndlType_distance, 1+12 bits.
13568 * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
13569 */
13570 A_UINT32 receive_model_parameter;
13571
13572 /**
13573 * NDL_minSNR, ndlType_snr, 1+7 bits.
13574 */
13575 A_UINT32 receive_model_parameter_2;
13576
13577 /** Demodulation model parameters.
13578 * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
13579 * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
13580 * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
13581 * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
13582 * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
13583 * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
13584 * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
13585 * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
13586 */
13587 A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)];
13588 /** Transmit model parameters.
13589 * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
13590 * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
13591 * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
13592 * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
13593 */
13594 A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
13595 /**
13596 * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
13597 * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
13598 * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
13599 * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
13600 */
13601 A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
13602 /**
13603 * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
13604 * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
13605 * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
13606 * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
13607 */
13608 A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
13609 /* NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits. */
13610 A_UINT32 tm_max_channel_use;
13611 /**
13612 * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
13613 * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
13614 * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
13615 * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
13616 */
13617 A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
13618 /** Channel load thresholds.
13619 * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
13620 * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
13621 */
13622 A_UINT32 min_max_channel_load;
13623 /** Transmit queue parameters.
13624 * NDL_numQueue, ndlType_acPrio, 1+3 bits.
13625 * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
13626 * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
13627 * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
13628 * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
13629 */
13630 A_UINT32 transmit_queue_parameters;
13631 /**
13632 * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
13633 * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
13634 * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
13635 * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
13636 */
13637 A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
13638} wmi_dcc_ndl_chan;
13639
13640#define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
13641#define WMI_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
13642#define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7)
13643#define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
13644
13645#define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
13646#define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
13647
13648#define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
13649#define WMI_NDL_MEASURE_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
13650
13651
13652#define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
13653#define WMI_NDL_DCC_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
13654#define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
13655#define WMI_NDL_DCC_STATS_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
13656#define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
13657#define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
13658
13659#define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13)
13660#define WMI_NDL_TIME_UP_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 0, 13, val)
13661#define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13)
13662#define WMI_NDL_TIME_DOWN_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 13, 13, val)
13663
13664#define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
13665#define WMI_NDL_MIN_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
13666#define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
13667#define WMI_NDL_MAX_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
13668
13669#define WMI_NDL_DEF_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
13670#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)
13671
13672#define WMI_NDL_MAX_PACKET_DURATION_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
13673#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)
13674#define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
13675#define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
13676#define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
13677#define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
13678#define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
13679#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)
13680
13681#define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
13682#define WMI_NDL_MIN_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
13683#define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
13684#define WMI_NDL_MAX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
13685#define WMI_NDL_DEF_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
13686#define WMI_NDL_DEF_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
13687
13688#define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
13689#define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
13690#define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
13691#define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
13692#define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
13693#define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
13694
13695#define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
13696#define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
13697#define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
13698#define WMI_NDL_MAX_CS_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
13699#define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
13700#define WMI_NDL_REF_PATH_LOSS_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
13701
13702#define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
13703#define WMI_NDL_MIN_SNR_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
13704
13705#define WMI_NDL_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
13706#define WMI_NDL_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
13707
13708#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)
13709#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)
13710#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)
13711#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)
13712#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)
13713#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)
13714#define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
13715#define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr, val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
13716#define WMI_NDL_TM_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
13717#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)
13718
13719#define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
13720#define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
13721#define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
13722#define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
13723
13724#define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
13725#define WMI_NDL_NUM_QUEUE_SET(ptr, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
13726#define WMI_NDL_REF_QUEUE_STATUS_GET(ptr, acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
13727#define WMI_NDL_REF_QUEUE_STATUS_SET(ptr, acprio, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
13728#define WMI_NDL_REF_QUEUE_LEN_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
13729#define WMI_NDL_REF_QUEUE_LEN_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
13730
13731/** Data structure for updating the NDL. */
13732typedef struct {
13733 /** TLV tag and len; tag equals
13734 * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
13735 A_UINT32 tlv_header;
13736 /* VDEV identifier */
13737 A_UINT32 vdev_id;
13738 /** The number of channels in the request. */
13739 A_UINT32 num_channel;
13740 /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
13741 /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
13742} wmi_dcc_update_ndl_cmd_fixed_param;
13743
13744typedef struct {
13745 /**
13746 * TLV tag and len; tag equals
13747 * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param
13748 */
13749 A_UINT32 tlv_header;
13750 /* VDEV identifier */
13751 A_UINT32 vdev_id;
13752 A_UINT32 status;
13753} wmi_dcc_update_ndl_resp_event_fixed_param;
13754
13755/* Actions for TSF timestamp */
13756typedef enum {
13757 TSF_TSTAMP_CAPTURE_REQ = 1,
13758 TSF_TSTAMP_CAPTURE_RESET = 2,
13759 TSF_TSTAMP_READ_VALUE = 3,
Govind Singhd2970e32016-01-21 10:30:02 +053013760 TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013761} wmi_tsf_tstamp_action;
13762
13763typedef struct {
13764 /** TLV tag and len; tag equals
13765 * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
13766 A_UINT32 tlv_header;
13767 /** unique id identifying the VDEV, generated by the caller */
13768 A_UINT32 vdev_id;
13769 /* action type, refer to wmi_tsf_tstamp_action */
13770 A_UINT32 tsf_action;
13771} wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
13772
13773typedef struct {
13774 /* TLV tag and len; tag equals
13775 * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
13776 A_UINT32 tlv_header;
13777 /* VDEV identifier */
13778 A_UINT32 vdev_id;
13779 /* low 32bit of tsf */
13780 A_UINT32 tsf_low;
13781 /* high 32 bit of tsf */
13782 A_UINT32 tsf_high;
Krishna Kumaar Natarajan40b3c112016-03-25 14:36:18 -070013783 /* low 32 bits of qtimer */
13784 A_UINT32 qtimer_low;
13785 /* high 32 bits of qtimer */
13786 A_UINT32 qtimer_high;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013787} wmi_vdev_tsf_report_event_fixed_param;
13788
13789typedef struct {
13790 /** TLV tag and len; tag equals
13791 * WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
13792 A_UINT32 tlv_header;
13793 /* unique id identifying the VDEV, generated by the caller */
13794 A_UINT32 vdev_id;
13795 /* unique id to identify the ie_data as defined by ieee 802.11 spec */
13796 A_UINT32 ie_id;
13797 /* ie_len corresponds to num of bytes in ie_data[] */
13798 A_UINT32 ie_len;
13799 /*
13800 * Following this structure is the TLV byte stream of ie data of length
13801 * buf_len:
13802 * A_UINT8 ie_data[];
13803 */
13804} wmi_vdev_set_ie_cmd_fixed_param;
13805
Govind Singh869c9872016-02-22 18:36:34 +053013806/* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013807typedef struct {
13808 /*
13809 * TLV tag and len; tag equals
13810 * WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param
13811 * Set Preferred Channel List
13812 */
13813 A_UINT32 tlv_header;
13814
13815 /* # of channels to scan */
13816 A_UINT32 num_chan;
13817 /*
13818 * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd
13819 * structure. The TLV's are:
13820 * A_UINT32 channel_list[];
13821 */
13822} wmi_soc_set_pcl_cmd_fixed_param;
13823
13824typedef struct {
13825 /* TLV tag and len; tag equals
Govind Singh869c9872016-02-22 18:36:34 +053013826 * WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param
13827 */
13828 A_UINT32 tlv_header;
13829 /** Set Preferred Channel List **/
13830
13831 /** pdev_id for identifying the MAC
13832 * See macros starting with WMI_PDEV_ID_ for values.
13833 */
13834 A_UINT32 pdev_id;
13835
13836 /** # of channels to scan */
13837 A_UINT32 num_chan;
13838 /**
13839 * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd
13840 * structure. The TLV's are:
13841 * A_UINT32 channel_weight[];
13842 * channel order & size will be as per the list provided
13843 * in WMI_SCAN_CHAN_LIST_CMDID
13844 **/
13845} wmi_pdev_set_pcl_cmd_fixed_param;
13846
13847/* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */
13848typedef struct {
13849 /* TLV tag and len; tag equals
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013850 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param
13851 * Set Hardware Mode */
13852 A_UINT32 tlv_header;
13853
13854 /* Hardware Mode Index */
13855 A_UINT32 hw_mode_index;
13856} wmi_soc_set_hw_mode_cmd_fixed_param;
13857
13858typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053013859 /* TLV tag and len; tag equals
13860 * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param
13861 */
13862 A_UINT32 tlv_header;
13863 /** Set Hardware Mode **/
13864
13865 /** pdev_id for identifying the MAC
13866 * See macros starting with WMI_PDEV_ID_ for values.
13867 */
13868 A_UINT32 pdev_id;
13869
13870 /* Hardware Mode Index */
13871 A_UINT32 hw_mode_index;
13872} wmi_pdev_set_hw_mode_cmd_fixed_param;
13873
13874/* DEPRECATED - use wmi_pdev_set_mac_config_cmd_fixed_param instead */
13875typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013876 /*
13877 * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param
13878 * Set Dual MAC Firmware Configuration
13879 */
13880 A_UINT32 tlv_header;
13881
13882 /* Concurrent scan configuration bits */
13883 A_UINT32 concurrent_scan_config_bits;
13884 /* Firmware mode configuration bits */
13885 A_UINT32 fw_mode_config_bits;
13886} wmi_soc_set_dual_mac_config_cmd_fixed_param;
13887
13888typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053013889 /* TLV tag and len; tag equals
13890 * WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param
13891 */
13892 A_UINT32 tlv_header;
13893 /** Set Dual MAC Firmware Configuration **/
13894
13895 /** pdev_id for identifying the MAC
13896 * See macros starting with WMI_PDEV_ID_ for values.
13897 */
13898 A_UINT32 pdev_id;
13899
13900 /* Concurrent scan configuration bits */
13901 A_UINT32 concurrent_scan_config_bits;
13902 /* Firmware mode configuration bits */
13903 A_UINT32 fw_mode_config_bits;
13904} wmi_pdev_set_mac_config_cmd_fixed_param;
13905
13906typedef struct { /* DEPRECATED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013907 A_UINT32 num_tx_chains;
13908 A_UINT32 num_rx_chains;
13909 A_UINT32 reserved[2];
13910} soc_num_tx_rx_chains;
13911
13912typedef struct {
13913 A_UINT32 num_tx_chains_2g;
13914 A_UINT32 num_rx_chains_2g;
13915 A_UINT32 num_tx_chains_5g;
13916 A_UINT32 num_rx_chains_5g;
13917} band_num_tx_rx_chains;
13918
13919typedef union {
13920 soc_num_tx_rx_chains soc_txrx_chain_setting;
13921 band_num_tx_rx_chains band_txrx_chain_setting;
13922} antenna_num_tx_rx_chains;
13923
13924typedef enum {
13925 ANTENNA_MODE_DISABLED = 0x0,
13926 ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
13927 /* reserved */
13928} antenna_mode_reason;
13929
Govind Singh869c9872016-02-22 18:36:34 +053013930/* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013931typedef struct {
13932 /*
13933 * TLV tag and len;
13934 * tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param
13935 */
13936 A_UINT32 tlv_header;
13937
13938 /* the reason for setting antenna mode, refer antenna_mode_reason */
13939 A_UINT32 reason;
13940
13941 /*
13942 * The above reason parameter will select whether the following union
13943 * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
13944 */
13945 antenna_num_tx_rx_chains num_txrx_chains_setting;
13946} wmi_soc_set_antenna_mode_cmd_fixed_param;
13947
Govind Singh869c9872016-02-22 18:36:34 +053013948typedef struct {
13949 /* TLV tag and len; tag equals
13950 * WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param
13951 */
13952 A_UINT32 tlv_header;
13953
13954 /** pdev_id for identifying the MAC
13955 * See macros starting with WMI_PDEV_ID_ for values.
13956 */
13957 A_UINT32 pdev_id;
13958
13959 /* Bits 0-15 is the number of RX chains and
13960 * 16-31 is the number of TX chains
13961 */
13962 A_UINT32 num_txrx_chains;
13963} wmi_pdev_set_antenna_mode_cmd_fixed_param;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013964
13965/** Data structure for information specific to a VDEV to MAC mapping. */
Govind Singh869c9872016-02-22 18:36:34 +053013966/* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013967typedef struct {
13968 /*
13969 * TLV tag and len; tag equals
13970 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
13971 A_UINT32 tlv_header;
13972 A_UINT32 vdev_id; /* VDEV ID */
13973 A_UINT32 mac_id; /* MAC ID */
13974} wmi_soc_set_hw_mode_response_vdev_mac_entry;
13975
Govind Singh869c9872016-02-22 18:36:34 +053013976/** Data structure for information specific to a VDEV to MAC mapping. */
13977typedef struct {
13978 /** TLV tag and len; tag equals
13979 * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */
13980 A_UINT32 tlv_header;
13981
13982 /** pdev_id for identifying the MAC
13983 * See macros starting with WMI_PDEV_ID_ for values.
13984 */
13985 A_UINT32 pdev_id;
13986
13987 A_UINT32 vdev_id;
13988} wmi_pdev_set_hw_mode_response_vdev_mac_entry;
13989
13990/* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013991typedef struct {
13992 /* TLV tag and len; tag equals
13993 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param
13994 * Set Hardware Mode Response Event **/
13995 A_UINT32 tlv_header;
13996
13997 /* Status of set_hw_mode command
13998 * Values for Status:
13999 * 0 - OK; command successful
14000 * 1 - EINVAL; Requested invalid hw_mode
14001 * 2 - ECANCELED; HW mode change canceled
14002 * 3 - ENOTSUP; HW mode not supported
14003 * 4 - EHARDWARE; HW mode change prevented by hardware
14004 * 5 - EPENDING; HW mode change is pending
14005 * 6 - ECOEX; HW mode change conflict with Coex
14006 */
14007 A_UINT32 status;
14008 /* Configured Hardware Mode */
14009 A_UINT32 cfgd_hw_mode_index;
14010 /* Number of Vdev to Mac entries */
14011 A_UINT32 num_vdev_mac_entries;
14012 /*
14013 * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event
14014 * structure. The TLV's are:
14015 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
14016 */
14017} wmi_soc_set_hw_mode_response_event_fixed_param;
14018
14019typedef struct {
Govind Singh869c9872016-02-22 18:36:34 +053014020 /* TLV tag and len; tag equals
14021 * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param
14022 */
14023 A_UINT32 tlv_header;
14024 /** Set Hardware Mode Response Event **/
14025
14026 /** pdev_id for identifying the MAC
14027 * See macros starting with WMI_PDEV_ID_ for values.
14028 */
14029 A_UINT32 pdev_id;
14030
14031 /* Status of set_hw_mode command */
14032 /*
14033 * Values for Status:
14034 * 0 - OK; command successful
14035 * 1 - EINVAL; Requested invalid hw_mode
14036 * 2 - ECANCELED; HW mode change canceled
14037 * 3 - ENOTSUP; HW mode not supported
14038 * 4 - EHARDWARE; HW mode change prevented by hardware
14039 * 5 - EPENDING; HW mode change is pending
14040 * 6 - ECOEX; HW mode change conflict with Coex
14041 */
14042 A_UINT32 status;
14043 /* Configured Hardware Mode */
14044 A_UINT32 cfgd_hw_mode_index;
14045 /* Number of Vdev to Mac entries */
14046 A_UINT32 num_vdev_mac_entries;
14047 /**
14048 * TLV (tag length value ) parameters follow the
14049 * soc_set_hw_mode_response_event structure. The TLV's are:
14050 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
14051 */
14052} wmi_pdev_set_hw_mode_response_event_fixed_param;
14053
14054/* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */
14055typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014056 /*
14057 * TLV tag and len; tag equals
14058 * WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param
14059 * Hardware Mode Transition Event
14060 */
14061 A_UINT32 tlv_header;
14062 /* Original or old Hardware mode */
14063 A_UINT32 old_hw_mode_index;
14064 /* New Hardware Mode */
14065 A_UINT32 new_hw_mode_index;
14066 /* Number of Vdev to Mac entries */
14067 A_UINT32 num_vdev_mac_entries;
14068
14069 /**
14070 * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event
14071 * structure. The TLV's are:
14072 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
14073 */
14074} wmi_soc_hw_mode_transition_event_fixed_param;
14075
Govind Singh869c9872016-02-22 18:36:34 +053014076typedef struct {
14077 /* TLV tag and len; tag equals
14078 * WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param
14079 */
14080 A_UINT32 tlv_header;
14081 /** Hardware Mode Transition Event **/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014082
Govind Singh869c9872016-02-22 18:36:34 +053014083 /** pdev_id for identifying the MAC
14084 * See macros starting with WMI_PDEV_ID_ for values.
14085 */
14086 A_UINT32 pdev_id;
14087
14088 /* Original or old Hardware mode */
14089 A_UINT32 old_hw_mode_index;
14090 /* New Hardware Mode */
14091 A_UINT32 new_hw_mode_index;
14092 /* Number of Vdev to Mac entries */
14093 A_UINT32 num_vdev_mac_entries;
14094
14095 /**
14096 * TLV (tag length value ) parameters follow the
14097 * soc_set_hw_mode_response_event structure. The TLV's are:
14098 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
14099 */
14100} wmi_pdev_hw_mode_transition_event_fixed_param;
14101
14102/* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param
14103 * instead
14104 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014105typedef struct {
14106 /*
14107 * TLV tag and len; tag equals
14108 * WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param
14109 * Set Dual MAC Config Response Event
14110 */
14111 A_UINT32 tlv_header;
14112
14113 /* Status for set_dual_mac_config command */
14114 /*
14115 * Values for Status:
14116 * 0 - OK; command successful
14117 * 1 - EINVAL; Requested invalid hw_mode
14118 * 3 - ENOTSUP; HW mode not supported
14119 * 4 - EHARDWARE; HW mode change prevented by hardware
14120 * 6 - ECOEX; HW mode change conflict with Coex
14121 */
14122 A_UINT32 status;
14123} wmi_soc_set_dual_mac_config_response_event_fixed_param;
14124
Govind Singh869c9872016-02-22 18:36:34 +053014125typedef struct {
14126 /* TLV tag and len; tag equals
14127 * WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param
14128 */
14129 A_UINT32 tlv_header;
14130 /** Set Dual MAC Config Response Event **/
14131
14132 /** pdev_id for identifying the MAC
14133 * See macros starting with WMI_PDEV_ID_ for values.
14134 */
14135 A_UINT32 pdev_id;
14136
14137 /* Status for set_dual_mac_config command */
14138 /*
14139 * Values for Status:
14140 * 0 - OK; command successful
14141 * 1 - EINVAL; Requested invalid hw_mode
14142 * 3 - ENOTSUP; HW mode not supported
14143 * 4 - EHARDWARE; HW mode change prevented by hardware
14144 * 6 - ECOEX; HW mode change conflict with Coex
14145 */
14146 A_UINT32 status;
14147} wmi_pdev_set_mac_config_response_event_fixed_param;
14148
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014149typedef enum {
14150 MAWC_MOTION_STATE_UNKNOWN,
14151 MAWC_MOTION_STATE_STATIONARY,
14152 MAWC_MOTION_STATE_WALK,
14153 MAWC_MOTION_STATE_TRANSIT,
14154} MAWC_MOTION_STATE;
14155
14156typedef enum {
14157 MAWC_SENSOR_STATUS_OK,
14158 MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
14159 MAWC_SENSOR_STATUS_SHUTDOWN,
14160} MAWC_SENSOR_STATUS;
14161
14162typedef struct {
14163 /* TLV tag and len; tag equals
14164 * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
14165 A_UINT32 tlv_header;
14166 /** new motion state, MAWC_MOTION_STATE */
14167 A_UINT32 motion_state;
14168 /** status code of sensor, MAWC_SENSOR_STATUS */
14169 A_UINT32 sensor_status;
14170} wmi_mawc_sensor_report_ind_cmd_fixed_param;
14171
Govind Singh86180292016-02-01 14:03:37 +053014172/* MBO flag field definition */
14173/*
14174 * Bit 0: 0 - Allow to connect to both MBO and non-MBO AP
14175 * 1 - Allow to connect to MBO AP only
14176 * Bit 1-31 : reserved.
14177 */
14178#define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0)
14179
14180typedef struct {
14181 /*
14182 * TLV tag and len; tag equals
14183 * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param
14184 */
14185 A_UINT32 tlv_header;
14186 /** vdev id */
14187 A_UINT32 vdev_id;
14188 /** enable or disable MBO */
14189 A_UINT32 enable;
14190 /** MBO flags, refer to definition of MBO flags*/
14191 A_UINT32 flags;
14192} wmi_roam_set_mbo_fixed_param;
14193
14194typedef struct {
14195 /*
14196 * TLV tag and len; tag equals
14197 * WMITLV_TAG_ARRAY_STRUC
14198 */
14199 A_UINT32 tlv_header;
14200 /** Current operating class number */
14201 A_UINT32 cur_op_class;
14202 /*
14203 * Country string of current reg domain,
14204 * the expected value should be same as country str defined
14205 * in country IE.
14206 * 3 octets (COUNTRY_STR) + 1 octet (always 0)
14207 * The ordering of this array must be maintained,
14208 * even when a big-endian host's WMI messages undergo
14209 * automatic byte reordering for conversion to the
14210 * little-endian ordering required by the target.
14211 * On big-endian hosts, this array may need to be byte-swapped
14212 * by the host, so the subsequent automatic byte-swap
14213 * will result in the correct final byte order.
14214 * global operating class: set country_str[0]=0
14215 */
14216 A_UINT8 country_str[4];
14217 /** Supported operating class number in current regdomain */
14218 A_UINT32 supp_op_class_num;
14219 /* The TLVs will follow. */
14220 /* A_UINT32 supp_op_class_list[] */
14221} wmi_supported_operating_class_param;
14222
14223typedef struct {
14224 /*
14225 * TLV tag and len; tag equals
14226 * WMITLV_TAG_ARRAY_STRUC
14227 */
14228 A_UINT32 tlv_header;
14229 /** non preferred channel attribute length */
14230 A_UINT32 non_prefer_ch_attr_len;
14231 /* The TLVs will follow. */
14232 /** A_UINT8 non_prefer_ch_attr[];*/
14233} wmi_mbo_non_preferred_channel_report_param;
14234
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080014235typedef struct {
14236 /* TLV tag and len; tag equals
14237 * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
14238 A_UINT32 tlv_header;
14239 /* enable(1) or disable(0) */
14240 A_UINT32 enable;
14241} wmi_mawc_enable_sensor_event_fixed_param;
14242
14243typedef struct {
14244 /* TLV tag and len; tag equals
14245 * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
14246 A_UINT32 tlv_header;
14247 /* Unique id identifying the VDEV */
14248 A_UINT32 vdev_id;
14249 /* enable(1) or disable(0) MAWC */
14250 A_UINT32 enable;
14251 /* ratio of skipping suppressing scan, skip one out of x */
14252 A_UINT32 suppress_ratio;
14253} wmi_extscan_configure_mawc_cmd_fixed_param;
14254
14255typedef struct {
14256 /* TLV tag and len; tag equals
14257 * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
14258 A_UINT32 tlv_header;
14259 /* Unique id identifying the VDEV */
14260 A_UINT32 vdev_id;
14261 /* enable(1) or disable(0) MAWC */
14262 A_UINT32 enable;
14263 /* ratio of exponential backoff, next = current + current*ratio/100 */
14264 A_UINT32 exp_backoff_ratio;
14265 /* initial scan interval(msec) */
14266 A_UINT32 init_scan_interval;
14267 /* max scan interval(msec) */
14268 A_UINT32 max_scan_interval;
14269} wmi_nlo_configure_mawc_cmd_fixed_param;
14270
14271typedef struct {
14272 /* TLV tag and len; tag equals
14273 * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
14274 A_UINT32 tlv_header;
14275 /* Unique id identifying the VDEV */
14276 A_UINT32 vdev_id;
14277 /* enable(1) or disable(0) MAWC */
14278 A_UINT32 enable;
14279 /* data traffic load (kBps) to register CMC */
14280 A_UINT32 traffic_load_threshold;
14281 /* RSSI threshold (dBm) to scan for Best AP */
14282 A_UINT32 best_ap_rssi_threshold;
14283 /* high RSSI threshold adjustment in Stationary to suppress scan */
14284 A_UINT32 rssi_stationary_high_adjust;
14285 /* low RSSI threshold adjustment in Stationary to suppress scan */
14286 A_UINT32 rssi_stationary_low_adjust;
14287} wmi_roam_configure_mawc_cmd_fixed_param;
14288
14289#define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2
14290#define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 10
14291
14292typedef enum {
14293 PACKET_FILTER_TYPE_INVALID = 0,
14294 PACKET_FILTER_TYPE_FILTER_PKT,
14295 PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
14296 PACKET_FILTER_TYPE_MAX_ENUM_SIZE
14297} WMI_PACKET_FILTER_FILTER_TYPE;
14298
14299typedef enum {
14300 PACKET_FILTER_PROTO_TYPE_INVALID = 0,
14301
14302 /* L2 header */
14303 PACKET_FILTER_PROTO_TYPE_MAC,
14304 PACKET_FILTER_PROTO_TYPE_SNAP,
14305
14306 /* L3 header (EtherType) */
14307 PACKET_FILTER_PROTO_TYPE_IPV4,
14308 PACKET_FILTER_PROTO_TYPE_IPV6,
14309
14310 /* L4 header (IP protocol) */
14311 PACKET_FILTER_PROTO_TYPE_UDP,
14312 PACKET_FILTER_PROTO_TYPE_TCP,
14313 PACKET_FILTER_PROTO_TYPE_ICMPV6,
14314
14315 PACKET_FILTER_PROTO_TYPE_MAX
14316} WMI_PACKET_FILTER_PROTO_TYPE;
14317
14318typedef enum {
14319 PACKET_FILTER_CMP_TYPE_INVALID = 0,
14320 PACKET_FILTER_CMP_TYPE_EQUAL,
14321 PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
14322 PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
14323 PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
14324 PACKET_FILTER_CMP_TYPE_ADDRTYPE,
14325 PACKET_FILTER_CMP_TYPE_MAX
14326} WMI_PACKET_FILTER_CMP_TYPE;
14327
14328typedef enum {
14329 PACKET_FILTER_SET_INACTIVE = 0,
14330 PACKET_FILTER_SET_ACTIVE
14331} WMI_PACKET_FILTER_ACTION;
14332
14333typedef enum {
14334 PACKET_FILTER_SET_DISABLE = 0,
14335 PACKET_FILTER_SET_ENABLE
14336} WMI_PACKET_FILTER_RUNTIME_ENABLE;
14337
14338typedef struct {
14339 A_UINT32 proto_type;
14340 A_UINT32 cmp_type;
14341 A_UINT32 data_length; /* Length of the data to compare (units = bytes) */
14342 /*
14343 * from start of the respective frame header (
14344 * units = bytes)
14345 */
14346 A_UINT32 data_offset;
14347 /* Data to compare, little-endian order */
14348 A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD];
14349 /* Mask to be applied on rcvd packet data before compare, little-endian order */
14350 A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD];
14351} WMI_PACKET_FILTER_PARAMS_TYPE;
14352
14353typedef struct {
14354 A_UINT32 tlv_header;
14355 A_UINT32 vdev_id;
14356 A_UINT32 filter_id;
14357 A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */
14358 A_UINT32 filter_type;
14359 A_UINT32 num_params; /* how many entries in paramsData are valid */
14360 A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */
14361 WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
14362} WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
14363
14364/* enable / disable all filters within the specified vdev */
14365typedef struct {
14366 A_UINT32 tlv_header;
14367 A_UINT32 vdev_id;
14368 A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
14369} WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
14370
14371
14372#define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0
14373#define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
14374
14375#define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
14376 WMI_SET_BITS(tcp_flag_u32, \
14377 WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
14378 WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
14379 tcp_flag_values)
14380#define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
14381 WMI_GET_BITS(tcp_flag_u32, \
14382 WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
14383 WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
14384
14385#define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9
14386#define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
14387
14388#define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
14389 WMI_SET_BITS(tcp_flag_u32, \
14390 WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
14391 WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
14392 tcp_flags_mask)
14393#define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
14394 WMI_GET_BITS(tcp_flag_u32, \
14395 WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
14396 WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
14397
14398typedef struct {
14399 A_UINT32 tlv_header;
14400 /**
14401 * @brief lro_enable - indicates whether lro is enabled
14402 * [0] LRO Enable
14403 */
14404 A_UINT32 lro_enable;
14405 /**
14406 * @brief tcp_flag_u32 - mask of which TCP flags to check and
14407 * values to check for
14408 * [8:0] TCP flag values - If the TCP flags from the packet do not match
14409 * the values in this field after masking with TCP flags mask
14410 * below,LRO eligible will not be set
14411 * [17:9] TCP flags mask - Mask field for comparing the TCP values
14412 * provided above with the TCP flags field in the received packet
14413 * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
14414 * macros to isolate the mask field and values field that are packed
14415 * into this u32 "word".
14416 */
14417 A_UINT32 tcp_flag_u32;
14418 /**
14419 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
14420 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
14421 * bytes 0 to 3
14422 *
14423 * In this and all the below toeplitz_hash fields, the bytes are
14424 * specified in little-endian order. For example:
14425 * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0
14426 * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1
14427 * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
14428 * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
14429 */
14430 A_UINT32 toeplitz_hash_ipv4_0_3;
14431
14432 /**
14433 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
14434 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
14435 * bytes 4 to 7
14436 */
14437 A_UINT32 toeplitz_hash_ipv4_4_7;
14438
14439 /**
14440 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
14441 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
14442 * bytes 8 to 11
14443 */
14444 A_UINT32 toeplitz_hash_ipv4_8_11;
14445
14446 /**
14447 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
14448 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
14449 * bytes 12 to 15
14450 */
14451 A_UINT32 toeplitz_hash_ipv4_12_15;
14452
14453 /**
14454 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
14455 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
14456 * byte 16
14457 */
14458 A_UINT32 toeplitz_hash_ipv4_16;
14459
14460 /**
14461 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14462 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14463 * bytes 0 to 3
14464 */
14465 A_UINT32 toeplitz_hash_ipv6_0_3;
14466
14467 /**
14468 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14469 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14470 * bytes 4 to 7
14471 */
14472 A_UINT32 toeplitz_hash_ipv6_4_7;
14473
14474 /**
14475 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14476 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14477 * bytes 8 to 11
14478 */
14479 A_UINT32 toeplitz_hash_ipv6_8_11;
14480
14481 /**
14482 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14483 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14484 * bytes 12 to 15
14485 */
14486 A_UINT32 toeplitz_hash_ipv6_12_15;
14487
14488 /**
14489 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14490 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14491 * bytes 16 to 19
14492 */
14493 A_UINT32 toeplitz_hash_ipv6_16_19;
14494
14495 /**
14496 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14497 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14498 * bytes 20 to 22
14499 */
14500 A_UINT32 toeplitz_hash_ipv6_20_23;
14501
14502 /**
14503 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14504 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14505 * bytes 24 to 27
14506 */
14507 A_UINT32 toeplitz_hash_ipv6_24_27;
14508
14509 /**
14510 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14511 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14512 * bytes 28 to 31
14513 */
14514 A_UINT32 toeplitz_hash_ipv6_28_31;
14515
14516 /**
14517 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14518 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14519 * bytes 32 to 35
14520 */
14521 A_UINT32 toeplitz_hash_ipv6_32_35;
14522
14523 /**
14524 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14525 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14526 * bytes 36 to 39
14527 */
14528 A_UINT32 toeplitz_hash_ipv6_36_39;
14529
14530 /**
14531 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
14532 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
14533 * byte 40
14534 */
14535 A_UINT32 toeplitz_hash_ipv6_40;
14536} wmi_lro_info_cmd_fixed_param;
14537
Nirav Shahbf6450f2015-11-05 11:47:20 +053014538/*
14539 * This structure is used to set the pattern for WOW host wakeup pin pulse
14540 * pattern confirguration.
14541 */
14542typedef struct {
14543 /*
14544 * TLV tag and len; tag equals
14545 * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param
14546 */
14547 A_UINT32 tlv_header;
14548 /* flash offset to write, starting from 0 */
14549 A_UINT32 offset;
14550 /* vaild data length in buffer, unit: byte */
14551 A_UINT32 length;
14552} wmi_transfer_data_to_flash_cmd_fixed_param;
14553
14554typedef struct {
14555 /*
14556 * TLV tag and len; tag equals
14557 * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param
14558 */
14559 A_UINT32 tlv_header;
14560 /* Return status. 0 for success, non-zero otherwise */
14561 A_UINT32 status;
14562} wmi_transfer_data_to_flash_complete_event_fixed_param;
14563
Sreelakshmi Konamki58f4d622016-04-14 18:03:21 +053014564typedef enum {
14565 ENHANCED_MCAST_FILTER_DISABLED,
14566 ENHANCED_MCAST_FILTER_ENABLED
14567} ENHANCED_MCAST_FILTER_CONFIG;
14568
14569/*
14570 * Command to enable/disable filtering of multicast IP with unicast mac
14571 */
14572typedef struct {
14573 /*
14574 * TLV tag and len; tag equals
14575 * WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param
14576 */
14577 A_UINT32 tlv_header;
14578 /* Unique id identifying the VDEV */
14579 A_UINT32 vdev_id;
14580 /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */
14581 A_UINT32 enable;
14582} wmi_config_enhanced_mcast_filter_cmd_fixed_param;
14583
Anurag Chouhan05d05fe2016-04-18 17:09:24 +053014584typedef struct {
14585 /*
14586 * TLV tag and len; tag equals
14587 * WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param
14588 */
14589 A_UINT32 tlv_header;
14590 /* unique id identifying the VDEV, generated by the caller */
14591 A_UINT32 vdev_id;
14592 /* WISA enable / disable mode */
14593 A_UINT32 wisa_mode;
14594} wmi_vdev_wisa_cmd_fixed_param;
14595
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -080014596/*
Manikandan Mohan55c94d62015-12-04 13:47:58 -080014597 * This structure is used to report SMPS force mode set complete to host.
14598 */
14599typedef struct {
14600 /* TLV tag and len; tag equals
14601 * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param
14602 */
14603 A_UINT32 tlv_header;
14604 /* Unique id identifying the VDEV */
14605 A_UINT32 vdev_id;
14606 /* Return status. 0 for success, non-zero otherwise */
14607 A_UINT32 status;
14608} wmi_sta_smps_force_mode_complete_event_fixed_param;
14609
14610/*
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -080014611 * This structure is used to report SCPC calibrated data to host.
14612 */
14613typedef struct {
14614 /* TLV tag and len; tag equals
14615 * WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param
14616 */
14617 A_UINT32 tlv_header;
14618 /* number of BDF patches. Each patch contains offset, length and data */
14619 A_UINT32 num_patch;
14620 /* This TLV is followed by another TLV of array of bytes
14621 * A_UINT8 data[];
14622 * This data array contains, for example
14623 * patch1 offset(byte3~0), patch1 data length(byte7~4),
14624 * patch1 data(byte11~8)
14625 * patch2 offset(byte15~12), patch2 data length(byte19~16),
14626 * patch2 data(byte47~20)
14627 */
14628} wmi_scpc_event_fixed_param;
14629
Manikandan Mohan130eb572015-12-23 13:53:34 -080014630/* bpf interface structure */
14631typedef struct wmi_bpf_get_capability_cmd_s {
14632 A_UINT32 tlv_header;
14633 A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */
14634} wmi_bpf_get_capability_cmd_fixed_param;
14635
14636typedef struct wmi_bpf_capability_info_evt_s {
14637 A_UINT32 tlv_header;
14638 A_UINT32 bpf_version; /* fw's implement version */
14639 A_UINT32 max_bpf_filters; /* max filters that fw supports */
14640 A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
14641} wmi_bpf_capability_info_evt_fixed_param;
14642
14643/* bit 0 of flags: report counters */
14644#define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0
14645#define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1
14646typedef struct wmi_bpf_get_vdev_stats_cmd_s {
14647 A_UINT32 tlv_header;
14648 A_UINT32 flags;
14649 A_UINT32 vdev_id;
14650} wmi_bpf_get_vdev_stats_cmd_fixed_param;
14651
14652typedef struct wmi_bpf_vdev_stats_info_evt_s {
14653 A_UINT32 tlv_header;
14654 A_UINT32 vdev_id;
14655 A_UINT32 num_filters;
14656 A_UINT32 num_checked_pkts;
14657 A_UINT32 num_dropped_pkts;
14658 } wmi_bpf_vdev_stats_info_evt_fixed_param;
14659
14660typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
14661 A_UINT32 tlv_header;
14662 A_UINT32 vdev_id;
14663 A_UINT32 filter_id;
14664 A_UINT32 bpf_version; /* host bpf version */
14665 A_UINT32 total_length;
14666 A_UINT32 current_offset;
14667 A_UINT32 current_length;
Manikandan Mohan05ac7ee2015-12-23 14:18:36 -080014668 /*
14669 * The TLV follows:
14670 * A_UINT8 buf_inst[]; //Variable length buffer for the instuctions
14671 */
Manikandan Mohan130eb572015-12-23 13:53:34 -080014672} wmi_bpf_set_vdev_instructions_cmd_fixed_param;
14673
14674#define BPF_FILTER_ID_ALL 0xFFFFFFFF
14675typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
14676 A_UINT32 tlv_header;
14677 A_UINT32 vdev_id;
14678 A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */
14679} wmi_bpf_del_vdev_instructions_cmd_fixed_param;
14680
Govind Singhc7d51942016-02-01 12:09:31 +053014681#define AES_BLOCK_LEN 16 /* in bytes */
14682#define FIPS_KEY_LENGTH_128 16 /* in bytes */
14683#define FIPS_KEY_LENGTH_256 32 /* in bytes */
14684#define FIPS_ENCRYPT_CMD 0
14685#define FIPS_DECRYPT_CMD 1
14686#define FIPS_ENGINE_AES_CTR 0
14687#define FIPS_ENGINE_AES_MIC 1
14688#define FIPS_ERROR_OPER_TIMEOUT 1
14689
14690/* WMI_PDEV_FIPS_CMDID */
14691typedef struct {
14692 /*
14693 * TLV tag and len; tag equals
14694 * WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param
14695 */
14696 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053014697 union {
14698 /* OBSOLETE - will be removed once all refs are gone */
14699 A_UINT32 mac_id;
14700 /** pdev_id for identifying the MAC
14701 * See macros starting with WMI_PDEV_ID_ for values.
14702 */
14703 A_UINT32 pdev_id;
14704 };
Govind Singhc7d51942016-02-01 12:09:31 +053014705 A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
14706 /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
14707 A_UINT32 mode;
14708 /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
14709 A_UINT32 key_len;
14710 A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
14711 A_UINT32 data_len; /* data length */
14712 /*
14713 * Following this structure is the TLV:
14714 * A_UINT32 data[1]; - In Data (keep this in the end)
14715 */
14716} wmi_pdev_fips_cmd_fixed_param;
14717
14718typedef struct {
14719 /*
14720 * TLV tag and len; tag equals
14721 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param
14722 */
14723 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053014724 union {
14725 /* OBSOLETE - will be removed once all refs are gone */
14726 A_UINT32 mac_id;
14727 /** pdev_id for identifying the MAC
14728 * See macros starting with WMI_PDEV_ID_ for values.
14729 */
14730 A_UINT32 pdev_id;
14731 };
Govind Singhc7d51942016-02-01 12:09:31 +053014732 A_UINT32 enable; /* 1:enable, 0:disable */
14733 /* 1:GPIO parallel mode, 0:GPIO serial mode */
14734 A_UINT32 mode;
14735 A_UINT32 rx_antenna; /* rx antenna */
14736 A_UINT32 tx_default_antenna; /* tx default antenna */
14737 /*
14738 * Following this structure is the TLV:
14739 * wmi_pdev_smart_ant_gpio_handle
14740 */
14741} wmi_pdev_smart_ant_enable_cmd_fixed_param;
14742
14743/** GPIO pins/function values to control antennas */
14744typedef struct {
14745 /*
14746 * TLV tag and len; tag equals
14747 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle
14748 */
14749 A_UINT32 tlv_header;
14750 /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
14751 A_UINT32 gpio_pin;
14752 A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */
Govind Singh869c9872016-02-22 18:36:34 +053014753 /** pdev_id for identifying the MAC
14754 * See macros starting with WMI_PDEV_ID_ for values.
14755 */
14756 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053014757} wmi_pdev_smart_ant_gpio_handle;
14758
14759typedef struct {
14760 /*
14761 * TLV tag and len; tag equals
14762 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param
14763 */
14764 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053014765 union {
14766 /* OBSOLETE - will be removed once all refs are gone */
14767 A_UINT32 mac_id;
14768 /** pdev_id for identifying the MAC
14769 * See macros starting with WMI_PDEV_ID_ for values.
14770 */
14771 A_UINT32 pdev_id;
14772 };
Govind Singhc7d51942016-02-01 12:09:31 +053014773 A_UINT32 rx_antenna;
14774} wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
14775
14776typedef struct {
14777 /*
14778 * TLV tag and len; tag equals
14779 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param
14780 */
14781 A_UINT32 tlv_header;
14782 /** unique id identifying the vdev, generated by the caller */
Govind Singh869c9872016-02-22 18:36:34 +053014783 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053014784 /** peer MAC address */
14785 wmi_mac_addr peer_macaddr;
14786 /*
14787 * Following this structure is the TLV:
14788 * wmi_peer_smart_ant_set_tx_antenna_series
14789 */
14790} wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
14791
14792typedef struct {
14793 /*
14794 * TLV tag and len; tag equals
14795 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series
14796 */
14797 A_UINT32 tlv_header;
14798 /* antenna array */
14799 A_UINT32 antenna_series;
14800} wmi_peer_smart_ant_set_tx_antenna_series;
14801
14802typedef struct {
14803 /*
14804 * TLV tag and len; tag equals
14805 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param
14806 */
14807 A_UINT32 tlv_header;
14808 /* rate array */
14809 A_UINT32 train_rate_series;
14810 /* antenna array */
14811 A_UINT32 train_antenna_series;
14812 /* Rate flags */
14813 /* TODO: For future use? */
14814 A_UINT32 rc_flags;
14815} wmi_peer_smart_ant_set_train_antenna_param;
14816
14817typedef struct {
14818 /*
14819 * TLV tag and len; tag equals
14820 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param
14821 */
14822 A_UINT32 tlv_header;
14823 /** unique id identifying the VDEV, generated by the caller */
Govind Singh869c9872016-02-22 18:36:34 +053014824 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053014825 /** peer MAC address */
14826 wmi_mac_addr peer_macaddr;
14827 /* num packets; 0-stop training */
14828 A_UINT32 num_pkts;
14829 /*
14830 * Following this structure is the TLV:
14831 * wmi_peer_smart_ant_set_train_antenna_param
14832 */
14833} wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
14834
14835typedef struct {
14836 /*
14837 * TLV tag and len; tag equals
14838 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param
14839 */
14840 A_UINT32 tlv_header;
14841 /** unique id identifying the vdev, generated by the caller */
Govind Singh869c9872016-02-22 18:36:34 +053014842 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053014843 /** peer MAC address */
14844 wmi_mac_addr peer_macaddr;
14845 /* command id*/
14846 A_UINT32 cmd_id;
14847 /* number of arguments passed */
14848 A_UINT32 args_count;
14849 /*
14850 * Following this structure is the TLV:
14851 * A_UINT32 args[]; // argument list
14852 */
14853} wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
14854
14855typedef struct {
14856 /*
14857 * TLV tag and len; tag equals
14858 * WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain
14859 */
14860 A_UINT32 tlv_header;
14861 A_UINT32 antCtrlChain;
Govind Singh869c9872016-02-22 18:36:34 +053014862 /** pdev_id for identifying the MAC
14863 * See macros starting with WMI_PDEV_ID_ for values.
14864 */
14865 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053014866} wmi_pdev_set_ant_ctrl_chain;
14867
14868typedef struct {
14869 /*
14870 * TLV tag and len; tag equals
14871 * WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param
14872 */
14873 A_UINT32 tlv_header;
14874 A_UINT32 mac_id; /* MAC ID */
14875 A_UINT32 antCtrlCommon1;
14876 A_UINT32 antCtrlCommon2;
14877 /*
14878 * Following this structure is the TLV:
14879 * wmi_pdev_set_ant_ctrl_chain
14880 */
14881} wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
14882
14883typedef struct {
14884 /* TLV tag and len; tag equals
14885 * WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param
14886 */
14887 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053014888 union {
14889 /* OBSOLETE - will be removed once all refs are gone */
14890 A_UINT32 mac_id;
14891 /** pdev_id for identifying the MAC
14892 * See macros starting with WMI_PDEV_ID_ for values.
14893 */
14894 A_UINT32 pdev_id;
14895 };
Govind Singhc7d51942016-02-01 12:09:31 +053014896 /** len of CTL info */
14897 A_UINT32 ctl_len;
14898 /* ctl array (len adjusted to number of words)
14899 * Following this structure is the TLV:
14900 * A_UINT32 ctl_info[1];
14901 */
14902} wmi_pdev_set_ctl_table_cmd_fixed_param;
14903
14904typedef struct {
14905 /*
14906 * TLV tag and len; tag equals
14907 * WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param
14908 */
14909 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053014910 union {
14911 /* OBSOLETE - will be removed once all refs are gone */
14912 A_UINT32 mac_id;
14913 /** pdev_id for identifying the MAC
14914 * See macros starting with WMI_PDEV_ID_ for values.
14915 */
14916 A_UINT32 pdev_id;
14917 };
Govind Singhc7d51942016-02-01 12:09:31 +053014918 A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
14919 /*
14920 * Bit 7:0 len of array gain table
14921 * Bit 8 bypass multi chain gain or not
14922 */
14923 /*
14924 * array gain table(s) (len adjusted to number of words).
14925 * Following this structure is the TLV:
14926 * A_UINT32 arraygain_tbl[1];
14927 */
14928} wmi_pdev_set_mimogain_table_cmd_fixed_param;
14929
14930#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
14931#define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
14932#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_ARRAY_GAIN_LEN)
14933#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_ARRAY_GAIN_LEN)
14934
14935#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
14936#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
14937#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
14938#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
14939
14940
14941typedef struct {
14942 /*
14943 * TLV tag and len; tag equals
14944 * WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param
14945 */
14946 A_UINT32 tlv_header;
14947 /** parameter id */
14948 A_UINT32 param_id;
14949 /** parameter value */
14950 A_UINT32 param_value;
14951} wmi_fwtest_set_param_cmd_fixed_param;
14952
14953/* Expressed in 1 part in 1000 (permille) */
14954#define WMI_ATF_DENOMINATION 1000
14955
14956typedef struct {
14957 /*
14958 * TLV tag and len; tag equals
14959 * WMITLV_TAG_STRUC_wmi_atf_peer_info
14960 */
14961 A_UINT32 tlv_header;
14962 wmi_mac_addr peer_macaddr;
14963 A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
14964 A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
14965 /* Peer congestion threshold for future use */
14966 A_UINT32 atf_units_reserved;
14967} wmi_atf_peer_info;
14968
14969typedef struct {
14970 /*
14971 * TLV tag and len; tag equals
14972 * WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param
14973 */
14974 A_UINT32 tlv_header;
14975 A_UINT32 num_peers;
14976 /*
14977 * Following this structure is the TLV:
14978 * struct wmi_atf_peer_info peer_info[1];
14979 */
14980} wmi_peer_atf_request_fixed_param;
14981
14982/* Equal distribution of ATF air time within an VDEV. */
14983typedef struct {
14984 /*
14985 * TLV tag and len; tag equals
14986 * WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param
14987 */
14988 A_UINT32 tlv_header;
14989 A_UINT32 vdev_id;
14990 A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
14991} wmi_vdev_atf_request_fixed_param;
14992
14993typedef struct {
14994 /*
14995 * TLV tag and len; tag equals
14996 * WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param
14997 */
14998 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053014999 /** pdev_id for identifying the MAC
15000 * See macros starting with WMI_PDEV_ID_ for values.
15001 */
15002 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053015003 /** parameter */
15004 A_UINT32 param;
15005} wmi_pdev_get_ani_cck_config_cmd_fixed_param;
15006
15007typedef struct {
15008 /*
15009 * TLV tag and len; tag equals
15010 * WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param
15011 */
15012 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053015013 /** pdev_id for identifying the MAC
15014 * See macros starting with WMI_PDEV_ID_ for values.
15015 */
15016 A_UINT32 pdev_id;
Govind Singhc7d51942016-02-01 12:09:31 +053015017 /** parameter */
15018 A_UINT32 param;
15019} wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
15020
15021typedef struct {
15022 /*
15023 * TLV tag and len; tag equals
15024 * WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param
15025 */
15026 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053015027 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053015028 A_UINT32 qb_enable;
15029 wmi_mac_addr peer_macaddr;
15030} WMI_QBOOST_CFG_CMD_fixed_param;
15031
15032#define WMI_INST_STATS_INVALID_RSSI 0
15033
15034typedef struct {
15035 /*
15036 * TLV tag and len; tag equals
15037 * WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param
15038 */
15039 A_UINT32 tlv_header;
15040 A_UINT32 iRSSI; /* dBm above the noise floor */
15041 /* peer MAC address */
15042 wmi_mac_addr peer_macaddr;
Govind Singh869c9872016-02-22 18:36:34 +053015043 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053015044} wmi_inst_rssi_stats_resp_fixed_param;
15045
15046typedef struct {
15047 /*
15048 * TLV tag and len; tag equals
15049 * WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info
15050 */
15051 A_UINT32 tlv_header;
15052 A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
15053} wmi_peer_cck_ofdm_rate_info;
15054
15055typedef struct {
15056 /*
15057 * TLV tag and len; tag equals
15058 * WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info
15059 */
15060 A_UINT32 tlv_header;
15061 A_UINT32 ratecode_20; /* Rate code for 20MHz BW */
15062 A_UINT32 ratecode_40; /* Rate code for 40MHz BW */
15063 A_UINT32 ratecode_80; /* Rate code for 80MHz BW */
15064} wmi_peer_mcs_rate_info;
15065
15066typedef struct {
15067 /*
15068 * TLV tag and len; tag equals
15069 * WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param
15070 */
15071 A_UINT32 tlv_header;
15072 wmi_mac_addr peer_macaddr;
15073 A_UINT32 ratecount; /* Max Rate count for each mode */
Govind Singh869c9872016-02-22 18:36:34 +053015074 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053015075 /*
15076 * Following this structure are the TLV
15077 * struct wmi_peer_cck_ofdm_rate_info;
15078 * struct wmi_peer_mcs_rate_info;
15079 */
15080} wmi_peer_ratecode_list_event_fixed_param;
15081
15082typedef struct wmi_wds_addr_event {
15083 /*
15084 * TLV tag and len; tag equals
15085 * WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param
15086 */
15087 A_UINT32 tlv_header;
15088 A_UINT32 event_type[4];
15089 wmi_mac_addr peer_mac;
15090 wmi_mac_addr dest_mac;
Govind Singh869c9872016-02-22 18:36:34 +053015091 A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */
Govind Singhc7d51942016-02-01 12:09:31 +053015092} wmi_wds_addr_event_fixed_param;
15093
15094typedef struct {
15095 /*
15096 * TLV tag and len; tag equals
15097 * WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param
15098 */
15099 A_UINT32 tlv_header;
15100 wmi_mac_addr peer_macaddr;
15101 A_UINT32 peer_ps_state;
15102} wmi_peer_sta_ps_statechange_event_fixed_param;
15103
15104/* WMI_PDEV_FIPS_EVENTID */
15105typedef struct {
15106 /*
15107 * TLV tag and len; tag equals
15108 * WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param
15109 */
15110 A_UINT32 tlv_header;
Govind Singh869c9872016-02-22 18:36:34 +053015111 union {
15112 /* OBSOLETE - will be removed once all refs are gone */
15113 A_UINT32 mac_id;
15114 /** pdev_id for identifying the MAC
15115 * See macros starting with WMI_PDEV_ID_ for values.
15116 */
15117 A_UINT32 pdev_id;
15118 };
Govind Singhc7d51942016-02-01 12:09:31 +053015119 /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
15120 A_UINT32 error_status;
15121 A_UINT32 data_len; /* Data length */
15122 /*
15123 * Following this structure is the TLV:
15124 * A_UINT32 data[1]; // Out Data (keep this in the end)
15125 */
15126} wmi_pdev_fips_event_fixed_param;
15127
15128typedef struct {
15129 /*
15130 * TLV tag and len; tag equals
15131 * WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param
15132 */
15133 A_UINT32 tlv_header;
15134 A_UINT32 mac_id; /* MAC ID */
15135 /* Noise threshold iterations with high values */
15136 A_UINT32 noise_floor_report_iter;
15137 /* Total noise threshold iterations */
15138 A_UINT32 noise_floor_total_iter;
15139} wmi_pdev_channel_hopping_event_fixed_param;
15140
15141enum {
15142 WMI_PDEV_RESERVE_AST_ENTRY_OK,
15143 WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
15144 WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
15145};
15146
15147typedef struct {
15148 /*
15149 * TLV tag and len; tag equals
15150 * WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param
15151 */
15152 A_UINT32 tlv_header;
15153 A_UINT32 mac_id; /* MAC ID */
15154 A_UINT32 rate_flags;
15155 /**
15156 * FLAG_ONE_CHAIN 0x001 - one chain mask
15157 * FLAG_TWO_CHAIN 0x005 - two chain mask
15158 * FLAG_THREE_CHAIN 0x007 - three chain mask
15159 * FLAG_FOUR_CHAIN 0x00F - four chain mask
15160 * FLAG_STBC 0x010 - STBC is set
15161 * FLAG_40MHZ 0x020
15162 * FLAG_80MHZ 0x040
15163 * FLAG_160MHZ 0x080
15164 * FLAG_TXBF 0x0100 - Tx Bf enabled
15165 * FLAG_RTSENA 0x0200 - RTS enabled
15166 * FLAG_CTSENA 0x0400 - CTS enabled
15167 * FLAG_LDPC 0x0800 - LDPC set
15168 * FLAG_SERIES1 0x1000 -
15169 * FLAG_SGI 0x2000 - Short gaurd interval
15170 * FLAG_MU2 0x4000 - MU2 data
15171 * FLAG_MU3 0x8000 - MU3 data
15172 * */
15173 A_UINT32 nss;
15174 /**
15175 * NSS 0x0 - 0x3
15176 * */
15177 A_UINT32 preamble;
15178 /**
15179 * PREAM_OFDM - 0x0
15180 * PREAM_CCK - 0x1
15181 * PREAM_HT - 0x2
15182 * PREAM_VHT - 0x3
15183 * */
15184 A_UINT32 hw_rate;
15185 /**
15186 * *** HW_OFDM_RATE ***
15187 * OFDM_48_MBPS - 0x0
15188 * OFDM_24_MBPS - 0x1
15189 * OFDM_12_MBPS - 0x2
15190 * OFDM_6_MBPS - 0x3
15191 * OFDM_54_MBPS - 0x4
15192 * OFDM_36_MBPS - 0x5
15193 * OFDM_18_MBPS - 0x6
15194 * OFDM_9_MBPS - 0x7
15195 *
15196 * *** HW_CCK_RATE ***
15197 * CCK_11_LONG_MBPS - 0x0
15198 * CCK_5_5_LONG_MBPS - 0x1
15199 * CCK_2_LONG_MBPS - 0x2
15200 * CCK_1_LONG_MBPS - 0x3
15201 * CCK_11_SHORT_MBPS - 0x4
15202 * CCK_5_5_SHORT_MBPS - 0x5
15203 * CCK_2_SHORT_MBPS - 0x6
15204 *
15205 * *** HW_HT / VHT_RATE ***
15206 * MCS 0x0 - 0x9
15207 * */
15208} wmi_pdev_get_tpc_cmd_fixed_param;
15209
15210typedef struct {
15211 /*
15212 * TLV tag and len; tag equals
15213 * WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param
15214 */
15215 A_UINT32 tlv_header;
15216 A_UINT32 reserved0; /* for future need */
15217 /*
15218 * Following this structure is the TLV:
15219 * A_UINT32 tpc[1];
15220 */
15221} wmi_pdev_tpc_event_fixed_param;
15222
15223typedef struct {
15224 /*
15225 * TLV tag and len; tag equals
15226 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param
15227 */
15228 A_UINT32 tlv_header;
15229 A_UINT32 mac_id; /* MAC ID */
15230 A_UINT32 nfdBr_len;
15231 A_UINT32 nfdBm_len;
15232 A_UINT32 freqNum_len;
15233 /*
15234 * Following this structure is the TLV:
15235 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
15236 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
15237 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
15238 */
15239} wmi_pdev_nfcal_power_all_channels_event_fixed_param;
15240
15241typedef struct {
15242 /*
15243 * TLV tag and len; tag equals
15244 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr
15245 */
15246 A_UINT32 tlv_header;
15247 A_UINT32 nfdBr;
15248} wmi_pdev_nfcal_power_all_channels_nfdBr;
15249
15250typedef struct {
15251 /*
15252 * TLV tag and len; tag equals
15253 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm
15254 */
15255 A_UINT32 tlv_header;
15256 A_UINT32 nfdBm;
15257} wmi_pdev_nfcal_power_all_channels_nfdBm;
15258
15259typedef struct {
15260 /*
15261 * TLV tag and len; tag equals
15262 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum
15263 */
15264 A_UINT32 tlv_header;
15265 A_UINT32 freqNum;
15266} wmi_pdev_nfcal_power_all_channels_freqNum;
15267
15268typedef struct {
15269 /*
15270 * TLV tag and len; tag equals
15271 * WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param
15272 */
15273 A_UINT32 tlv_header;
15274 A_UINT32 cck_level;
15275} wmi_ani_cck_event_fixed_param;
15276
15277typedef struct {
15278 /*
15279 * TLV tag and len; tag equals
15280 * WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param
15281 */
15282 A_UINT32 tlv_header;
15283 A_UINT32 ofdm_level;
15284} wmi_ani_ofdm_event_fixed_param;
15285
Sreelakshmi Konamki02a4d7c2016-04-14 17:46:54 +053015286typedef enum wmi_coex_config_type {
15287 /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */
15288 WMI_COEX_CONFIG_PAGE_P2P_TDM = 1,
15289 /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */
15290 WMI_COEX_CONFIG_PAGE_STA_TDM = 2,
15291 /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */
15292 WMI_COEX_CONFIG_PAGE_SAP_TDM = 3,
15293} WMI_COEX_CONFIG_TYPE;
15294
15295typedef struct {
15296 A_UINT32 tlv_header;
15297 A_UINT32 vdev_id;
15298 /* wmi_coex_config_type enum */
15299 A_UINT32 config_type;
15300 A_UINT32 config_arg1;
15301 A_UINT32 config_arg2;
15302} WMI_COEX_CONFIG_CMD_fixed_param;
15303
Sandeep Puligillaff55fec2016-03-09 12:54:23 -080015304/**
15305 * This command is sent from WLAN host driver to firmware to
15306 * request firmware to enable/disable channel avoidance report
15307 * to host.
15308 */
15309enum {
15310 WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0,
15311 WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1
15312};
15313
15314typedef struct {
15315 /*
15316 * TLV tag and len; tag equals
15317 * WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param
15318 */
15319 A_UINT32 tlv_header;
15320 /* Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */
15321 A_UINT32 rpt_allow;
15322} WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param;
15323
Sandeep Puligilla1dbd7502016-04-16 13:34:09 +053015324/*
15325 * Periodic channel stats WMI command structure
15326 * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID
15327 */
15328typedef struct {
15329 /*
15330 * TLV tag and len; tag equals
15331 * WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param
15332 */
15333 A_UINT32 tlv_header;
15334 /** 1 = enable, 0 = disable */
15335 A_UINT32 enable;
15336 /** periodic stats duration (units are milliseconds) */
15337 A_UINT32 stats_period;
15338} wmi_set_periodic_channel_stats_config_fixed_param;
15339
Krishna Kumaar Natarajan4bed4ec2016-04-16 16:46:18 +053015340typedef struct {
15341 /*
15342 * TLV tag and len; tag equals
15343 * WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param
15344 */
15345 A_UINT32 tlv_header;
15346 /*
15347 * pdev_id for identifying the MAC
15348 * See macros starting with WMI_PDEV_ID_ for values.
15349 */
15350 A_UINT32 pdev_id;
15351 /* Identify the wlan module */
15352 A_UINT32 module_id;
15353 /* Num of elements in the following args[] array */
15354 A_UINT32 num_args;
15355/**
15356 * Following this structure are the TLVs:
15357 * A_UINT32 args[];
15358 **/
15359} wmi_pdev_wal_power_debug_cmd_fixed_param;
15360
Anurag Chouhan798fa4a2016-04-18 16:57:27 +053015361typedef enum {
15362 WLAN_2G_CAPABILITY = 0x1,
15363 WLAN_5G_CAPABILITY = 0x2,
15364} WLAN_BAND_CAPABILITY;
15365
15366#define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1)
15367#define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value)
15368
15369#define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1)
15370#define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value)
15371
15372#define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1)
15373#define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value)
15374
15375#define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1)
15376#define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value)
15377
15378#define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1)
15379#define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value)
15380
15381#define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1)
15382#define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value)
15383
15384typedef struct {
15385 /*
15386 * TLV tag and len; tag equals
15387 * WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES
15388 */
15389 A_UINT32 tlv_header;
15390 /*
15391 * hw_mode_id - identify a particular set of HW characteristics, as
15392 * specified by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element
15393 * must be mapped to its parent WMI_HW_MODE_CAPABILITIES element using
15394 * hw_mode_id. No particular ordering of WMI_MAC_PHY_CAPABILITIES
15395 * elements should be assumed, though in practice the elements may
15396 * always be ordered by hw_mode_id
15397 */
15398 A_UINT32 hw_mode_id;
15399 /*
15400 * pdev_id starts with 1. pdev_id 1 => phy_id 0,
15401 * pdev_id 2 => phy_id 1
15402 */
15403 A_UINT32 pdev_id;
15404 /* phy id. Starts with 0 */
15405 A_UINT32 phy_id;
15406 /* supported modulations */
15407 union {
15408 A_UINT32 supports_11b:1,
15409 supports_11g:1,
15410 supports_11a:1,
15411 supports_11n:1,
15412 supports_11ac:1,
15413 supports_11ax:1;
15414 A_UINT32 supported_flags;
15415 };
15416 /* supported bands, enum WLAN_BAND_CAPABILITY */
15417 A_UINT32 supported_bands;
15418 /*
15419 * ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us,
15420 * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us
15421 */
15422 A_UINT32 ampdu_density;
15423 /* max bw supported 2G, enum wmi_channel_width */
15424 A_UINT32 max_bw_supported_2G;
15425 /* WMI HT Capability, WMI_HT_CAP defines */
15426 A_UINT32 ht_cap_info_2G;
15427 /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
15428 A_UINT32 vht_cap_info_2G;
15429 /*
15430 * VHT Supported MCS Set field Rx/Tx same
15431 * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as
15432 * follows
15433 * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
15434 * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
15435 * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
15436 * - 3 indicates that n spatial streams is not supported
15437 */
15438 A_UINT32 vht_supp_mcs_2G;
15439 /* HE capability info field of 802.11ax, WMI_HE_CAP defines */
15440 A_UINT32 he_cap_info_2G;
15441 /* HE Supported MCS Set field Rx/Tx same */
15442 A_UINT32 he_supp_mcs_2G;
15443 /* Valid Transmit chain mask */
15444 A_UINT32 tx_chain_mask_2G;
15445 /* Valid Receive chain mask */
15446 A_UINT32 rx_chain_mask_2G;
15447 /* max bw supported 5G, enum wmi_channel_width */
15448 A_UINT32 max_bw_supported_5G;
15449 /* WMI HT Capability, WMI_HT_CAP defines */
15450 A_UINT32 ht_cap_info_5G;
15451 /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */
15452 A_UINT32 vht_cap_info_5G;
15453 /*
15454 * VHT Supported MCS Set field Rx/Tx same
15455 * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as
15456 * follows
15457 * - 0 indicates support for VHT-MCS 0-7 for n spatial streams
15458 * - 1 indicates support for VHT-MCS 0-8 for n spatial streams
15459 * - 2 indicates support for VHT-MCS 0-9 for n spatial streams
15460 * - 3 indicates that n spatial streams is not supported
15461 */
15462 A_UINT32 vht_supp_mcs_5G;
15463 /* HE capability info field of 802.11ax, WMI_HE_CAP defines */
15464 A_UINT32 he_cap_info_5G;
15465 /* HE Supported MCS Set field Rx/Tx same */
15466 A_UINT32 he_supp_mcs_5G;
15467 /* Valid Transmit chain mask */
15468 A_UINT32 tx_chain_mask_5G;
15469 /* Valid Receive chain mask */
15470 A_UINT32 rx_chain_mask_5G;
15471} WMI_MAC_PHY_CAPABILITIES;
15472
15473typedef struct {
15474 /*
15475 * TLV tag and len; tag equal
15476 * WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES
15477 */
15478 A_UINT32 tlv_header;
15479 /*
15480 * hw_mode_id - identify a particular set of HW characteristics,
15481 * as specified by the subsequent fields
15482 */
15483 A_UINT32 hw_mode_id;
15484 /* BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on */
15485 A_UINT32 phy_id_map;
15486 /*
15487 * number of bits set in phy_id_map represents number of
15488 * WMI_MAC_PHY_CAPABILITIES TLV's
15489 * one for each active PHY for current HW mode
15490 * identified by hw_mode_id. For example for
15491 * DBS/SBS mode there will be 2
15492 * WMI_MAC_PHY_CAPABILITIES TLVs and for
15493 * single MAC modes it
15494 * will be 1 WMI_MAC_PHY_CAPABILITIES
15495 * TLVs
15496 */
15497} WMI_HW_MODE_CAPABILITIES;
15498
15499typedef struct {
15500 /*
15501 * TLV tag and len; tag equals
15502 * WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS
15503 */
15504 A_UINT32 tlv_header;
15505 /* num HW modes */
15506 A_UINT32 num_hw_modes;
15507 /* num_hw_modes WMI_HW_MODE_CAPABILITIES TLV's */
15508} WMI_SOC_MAC_PHY_HW_MODE_CAPS;
15509
15510/*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/
15511typedef struct {
15512 /*
15513 * TLV tag and len; tag equals
15514 * WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT
15515 */
15516 A_UINT32 tlv_header;
15517 /* phy id */
15518 A_UINT32 phy_id;
15519 /* regdomain value specified in EEPROM */
15520 A_UINT32 eeprom_reg_domain;
15521 /* regdomain */
15522 A_UINT32 eeprom_reg_domain_ext;
15523 /*
15524 * CAP1 capabilities bit map, see REGDMN_CAP1_
15525 * defines
15526 */
15527 A_UINT32 regcap1;
15528 /*
15529 * REGDMN EEPROM CAP, see
15530 * REGDMN_EEPROM_EEREGCAP_ defines
15531 */
15532 A_UINT32 regcap2;
15533 /* REGDMN MODE, see REGDMN_MODE_ enum */
15534 A_UINT32 wireless_modes;
15535 A_UINT32 low_2ghz_chan;
15536 A_UINT32 high_2ghz_chan;
15537 A_UINT32 low_5ghz_chan;
15538 A_UINT32 high_5ghz_chan;
15539} WMI_HAL_REG_CAPABILITIES_EXT;
15540
15541typedef struct {
15542 /*
15543 * TLV tag and len; tag equals
15544 * WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES
15545 */
15546 A_UINT32 tlv_header;
15547 /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */
15548 A_UINT32 num_phy;
15549} WMI_SOC_HAL_REG_CAPABILITIES;
15550
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015551/* ADD NEW DEFS HERE */
15552
15553/*****************************************************************************
15554 * The following structures are deprecated. DO NOT USE THEM!
15555 */
15556
15557/** Max number of channels in the schedule. */
15558#define OCB_CHANNEL_MAX (5)
15559
15560/* NOTE: Make sure these data structures are identical to those 9235
15561* defined in sirApi.h */
15562
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053015563typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015564 /** Arbitration Inter-Frame Spacing. Range: 2-15 */
15565 A_UINT32 aifsn;
15566 /** Contention Window minimum. Range: 1 - 10 */
15567 A_UINT32 cwmin;
15568 /** Contention Window maximum. Range: 1 - 10 */
15569 A_UINT32 cwmax;
15570} wmi_qos_params_t;
15571
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053015572typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015573 /** Channel frequency in MHz */
15574 A_UINT32 chan_freq;
15575 /** Channel duration in ms */
15576 A_UINT32 duration;
15577 /** Start guard interval in ms */
15578 A_UINT32 start_guard_interval;
15579 /** End guard interval in ms */
15580 A_UINT32 end_guard_interval;
15581 /** Transmit power in dBm, range 0 - 23 */
15582 A_UINT32 tx_power;
15583 /** Transmit datarate in Mbps */
15584 A_UINT32 tx_rate;
15585 /** QoS parameters for each AC */
15586 wmi_qos_params_t qos_params[WLAN_MAX_AC];
15587 /** 1 to enable RX stats for this channel, 0 otherwise */
15588 A_UINT32 rx_stats;
15589} wmi_ocb_channel_t;
15590
15591typedef struct {
15592 /** TLV tag and len; tag equals
15593 * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
15594 A_UINT32 tlv_header;
15595 /* VDEV identifier */
15596 A_UINT32 vdev_id;
15597 /** Number of valid channels in the channels array */
15598 A_UINT32 num_channels;
15599 /** The array of channels */
15600 wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
15601 /** 1 to allow off-channel tx, 0 otherwise */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053015602 A_UINT32 off_channel_tx; /* Not supported */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080015603} wmi_ocb_set_sched_cmd_fixed_param;
15604
15605typedef struct {
15606 /** Return status. 0 for success, non-zero otherwise */
15607 A_UINT32 status;
15608} wmi_ocb_set_sched_event_fixed_param;
15609
15610/**
15611* END DEPRECATED
15612*/
15613#ifdef __cplusplus
15614}
15615#endif
15616#endif /*_WMI_UNIFIED_H_*/
15617/**@}*/