blob: 6f89a043f27b77920356df0a1adbf6c71d22e2d1 [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 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800235} WMI_GRP_ID;
236
237#define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
238#define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
239
240/**
241 * Command IDs and commange events
242 */
243typedef enum {
244 /** initialize the wlan sub system */
245 WMI_INIT_CMDID = 0x1,
246
247 /* Scan specific commands */
248
249 /** start scan request to FW */
250 WMI_START_SCAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SCAN),
251 /** stop scan request to FW */
252 WMI_STOP_SCAN_CMDID,
253 /** full list of channels as defined by the regulatory that will be used by scanner */
254 WMI_SCAN_CHAN_LIST_CMDID,
255 /** overwrite default priority table in scan scheduler */
256 WMI_SCAN_SCH_PRIO_TBL_CMDID,
257 /** This command to adjust the priority and min.max_rest_time
258 * of an on ongoing scan request.
259 */
260 WMI_SCAN_UPDATE_REQUEST_CMDID,
261
262 /** set OUI to be used in probe request if enabled */
263 WMI_SCAN_PROB_REQ_OUI_CMDID,
264
265 /* PDEV(physical device) specific commands */
266 /** set regulatorty ctl id used by FW to determine the exact ctl power limits */
267 WMI_PDEV_SET_REGDOMAIN_CMDID =
268 WMI_CMD_GRP_START_ID(WMI_GRP_PDEV),
269 /** set channel. mainly used for supporting monitor mode */
270 WMI_PDEV_SET_CHANNEL_CMDID,
271 /** set pdev specific parameters */
272 WMI_PDEV_SET_PARAM_CMDID,
273 /** enable packet log */
274 WMI_PDEV_PKTLOG_ENABLE_CMDID,
275 /** disable packet log*/
276 WMI_PDEV_PKTLOG_DISABLE_CMDID,
277 /** set wmm parameters */
278 WMI_PDEV_SET_WMM_PARAMS_CMDID,
279 /** set HT cap ie that needs to be carried probe requests HT/VHT channels */
280 WMI_PDEV_SET_HT_CAP_IE_CMDID,
281 /** set VHT cap ie that needs to be carried on probe requests on VHT channels */
282 WMI_PDEV_SET_VHT_CAP_IE_CMDID,
283
284 /** Command to send the DSCP-to-TID map to the target */
285 WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
286 /** set quiet ie parameters. primarily used in AP mode */
287 WMI_PDEV_SET_QUIET_MODE_CMDID,
288 /** Enable/Disable Green AP Power Save */
289 WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
290 /** get TPC config for the current operating channel */
291 WMI_PDEV_GET_TPC_CONFIG_CMDID,
292
293 /** set the base MAC address for the physical device before a VDEV is created.
294 * For firmware that doesn't support this feature and this command, the pdev
295 * MAC address will not be changed. */
296 WMI_PDEV_SET_BASE_MACADDR_CMDID,
297
298 /* eeprom content dump , the same to bdboard data */
299 WMI_PDEV_DUMP_CMDID,
300 /* set LED configuration */
301 WMI_PDEV_SET_LED_CONFIG_CMDID,
302 /* Get Current temprature of chip in Celcius degree */
303 WMI_PDEV_GET_TEMPERATURE_CMDID,
304 /* Set LED flashing behavior */
305 WMI_PDEV_SET_LED_FLASHING_CMDID,
Govind Singhc7d51942016-02-01 12:09:31 +0530306 /** Enable/Disable Smart Antenna */
307 WMI_PDEV_SMART_ANT_ENABLE_CMDID,
308 /** Set Smart Antenna RX antenna*/
309 WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
310 /** Override the antenna switch table */
311 WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
312 /** Override the CTL table */
313 WMI_PDEV_SET_CTL_TABLE_CMDID,
314 /** Override the array gain table */
315 WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID,
316 /** FIPS test mode command */
317 WMI_PDEV_FIPS_CMDID,
318 /** get CCK ANI level */
319 WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID,
320 /** get OFDM ANI level */
321 WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID,
322 /** NF Cal Power dBr/dBm */
323 WMI_PDEV_GET_NFCAL_POWER_CMDID,
324 /** TxPPDU TPC */
325 WMI_PDEV_GET_TPC_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800326
327 /* VDEV(virtual device) specific commands */
328 /** vdev create */
329 WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VDEV),
330 /** vdev delete */
331 WMI_VDEV_DELETE_CMDID,
332 /** vdev start request */
333 WMI_VDEV_START_REQUEST_CMDID,
334 /** vdev restart request (RX only, NO TX, used for CAC period)*/
335 WMI_VDEV_RESTART_REQUEST_CMDID,
336 /** vdev up request */
337 WMI_VDEV_UP_CMDID,
338 /** vdev stop request */
339 WMI_VDEV_STOP_CMDID,
340 /** vdev down request */
341 WMI_VDEV_DOWN_CMDID,
342 /* set a vdev param */
343 WMI_VDEV_SET_PARAM_CMDID,
344 /* set a key (used for setting per peer unicast and per vdev multicast) */
345 WMI_VDEV_INSTALL_KEY_CMDID,
346
347 /* wnm sleep mode command */
348 WMI_VDEV_WNM_SLEEPMODE_CMDID,
349 WMI_VDEV_WMM_ADDTS_CMDID,
350 WMI_VDEV_WMM_DELTS_CMDID,
351 WMI_VDEV_SET_WMM_PARAMS_CMDID,
352 WMI_VDEV_SET_GTX_PARAMS_CMDID,
353 WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID,
354
355 WMI_VDEV_PLMREQ_START_CMDID,
356 WMI_VDEV_PLMREQ_STOP_CMDID,
357 /* TSF timestamp action for specified vdev */
358 WMI_VDEV_TSF_TSTAMP_ACTION_CMDID,
359 /*
360 * set the capabilties IE, e.g. for extended caps in probe
361 * requests, assoc req etc for frames FW locally generates
362 */
363 WMI_VDEV_SET_IE_CMDID,
364
Govind Singhc7d51942016-02-01 12:09:31 +0530365 WMI_VDEV_RATEMASK_CMDID,
366 /** ATF VDEV REQUEST commands. */
367 WMI_VDEV_ATF_REQUEST_CMDID,
368 /** Command to send the DSCP-to-TID map to the target for VAP */
369 WMI_VDEV_SET_DSCP_TID_MAP_CMDID,
370 /*
371 * Configure filter for Neighbor Rx Pkt
372 * (smart mesh selective listening)
373 */
374 WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800375 /* peer specific commands */
376
377 /** create a peer */
378 WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER),
379 /** delete a peer */
380 WMI_PEER_DELETE_CMDID,
381 /** flush specific tid queues of a peer */
382 WMI_PEER_FLUSH_TIDS_CMDID,
383 /** set a parameter of a peer */
384 WMI_PEER_SET_PARAM_CMDID,
385 /** set peer to associated state. will cary all parameters determined during assocication time */
386 WMI_PEER_ASSOC_CMDID,
387 /**add a wds (4 address ) entry. used only for testing WDS feature on AP products */
388 WMI_PEER_ADD_WDS_ENTRY_CMDID,
389 /**remove wds (4 address ) entry. used only for testing WDS feature on AP products */
390 WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
391 /** set up mcast group infor for multicast to unicast conversion */
392 WMI_PEER_MCAST_GROUP_CMDID,
393 /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */
394 WMI_PEER_INFO_REQ_CMDID,
395
396 /** request the estimated link speed for the peer. FW shall respond with
397 * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID.
398 */
399 WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID,
400 /*
401 * Set the conditions to report peer justified rate to driver
402 * The justified rate means the the user-rate is justified by PER.
403 */
404 WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID,
Govind Singhc7d51942016-02-01 12:09:31 +0530405 /** update a wds (4 address) entry */
406 WMI_PEER_UPDATE_WDS_ENTRY_CMDID,
407 /** add a proxy sta entry */
408 WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID,
409 /** Set Smart Antenna TX antenna */
410 WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
411 /** Set Smart Antenna TX train info */
412 WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
413 /** Set SA node config options */
414 WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
415 /** ATF PEER REQUEST commands */
416 WMI_PEER_ATF_REQUEST_CMDID,
417
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800418 /* beacon/management specific commands */
419
420 /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */
421 WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT),
422 /** transmit beacon by value */
423 WMI_PDEV_SEND_BCN_CMDID,
424 /** set the beacon template. used in beacon offload mode to setup the
425 * the common beacon template with the FW to be used by FW to generate beacons */
426 WMI_BCN_TMPL_CMDID,
427 /** set beacon filter with FW */
428 WMI_BCN_FILTER_RX_CMDID,
429 /* enable/disable filtering of probe requests in the firmware */
430 WMI_PRB_REQ_FILTER_RX_CMDID,
431 /** transmit management frame by value. will be deprecated */
432 WMI_MGMT_TX_CMDID,
433 /** set the probe response template. used in beacon offload mode to setup the
434 * the common probe response template with the FW to be used by FW to generate
435 * probe responses */
436 WMI_PRB_TMPL_CMDID,
437 /** Transmit Mgmt frame by reference */
438 WMI_MGMT_TX_SEND_CMDID,
439
440 /** commands to directly control ba negotiation directly from host. only used in test mode */
441
442 /** turn off FW Auto addba mode and let host control addba */
443 WMI_ADDBA_CLEAR_RESP_CMDID =
444 WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG),
445 /** send add ba request */
446 WMI_ADDBA_SEND_CMDID,
447 WMI_ADDBA_STATUS_CMDID,
448 /** send del ba */
449 WMI_DELBA_SEND_CMDID,
450 /** set add ba response will be used by FW to generate addba response*/
451 WMI_ADDBA_SET_RESP_CMDID,
452 /** send single VHT MPDU with AMSDU */
453 WMI_SEND_SINGLEAMSDU_CMDID,
454
455 /** Station power save specific config */
456 /** enable/disable station powersave */
457 WMI_STA_POWERSAVE_MODE_CMDID =
458 WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS),
459 /** set station power save specific parameter */
460 WMI_STA_POWERSAVE_PARAM_CMDID,
461 /** set station mimo powersave mode */
462 WMI_STA_MIMO_PS_MODE_CMDID,
463
464 /** DFS-specific commands */
465 /** enable DFS (radar detection)*/
466 WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS),
467 /** disable DFS (radar detection)*/
468 WMI_PDEV_DFS_DISABLE_CMDID,
469 /** enable DFS phyerr/parse filter offload */
470 WMI_DFS_PHYERR_FILTER_ENA_CMDID,
471 /** enable DFS phyerr/parse filter offload */
472 WMI_DFS_PHYERR_FILTER_DIS_CMDID,
473
474 /* Roaming specific commands */
475 /** set roam scan mode */
476 WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM),
477 /** set roam scan rssi threshold below which roam scan is enabled */
478 WMI_ROAM_SCAN_RSSI_THRESHOLD,
479 /** set roam scan period for periodic roam scan mode */
480 WMI_ROAM_SCAN_PERIOD,
481 /** set roam scan trigger rssi change threshold */
482 WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
483 /** set roam AP profile */
484 WMI_ROAM_AP_PROFILE,
485 /** set channel list for roam scans */
486 WMI_ROAM_CHAN_LIST,
487 /** Stop scan command */
488 WMI_ROAM_SCAN_CMD,
489 /** roaming sme offload sync complete */
490 WMI_ROAM_SYNCH_COMPLETE,
491 /** set ric request element for 11r roaming */
492 WMI_ROAM_SET_RIC_REQUEST_CMDID,
493 /** Invoke roaming forcefully */
494 WMI_ROAM_INVOKE_CMDID,
495 /** roaming filter cmd to allow further filtering of roaming candidate */
496 WMI_ROAM_FILTER_CMDID,
497 /** set gateway ip, mac and retries for subnet change detection */
498 WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID,
499 /** configure thresholds for MAWC */
500 WMI_ROAM_CONFIGURE_MAWC_CMDID,
501
502 /** offload scan specific commands */
503 /** set offload scan AP profile */
504 WMI_OFL_SCAN_ADD_AP_PROFILE =
505 WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN),
506 /** remove offload scan AP profile */
507 WMI_OFL_SCAN_REMOVE_AP_PROFILE,
508 /** set offload scan period */
509 WMI_OFL_SCAN_PERIOD,
510
511 /* P2P specific commands */
512 /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response
513 * generated during p2p listen and for p2p discoverability */
514 WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P),
515 /** enable/disable p2p discoverability on STA/AP VDEVs */
516 WMI_P2P_DEV_SET_DISCOVERABILITY,
517 /** set p2p ie to be carried in beacons generated by FW for GO */
518 WMI_P2P_GO_SET_BEACON_IE,
519 /** set p2p ie to be carried in probe response frames generated by FW for GO */
520 WMI_P2P_GO_SET_PROBE_RESP_IE,
521 /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA
522 * attribute in the beacons/probe responses received.
523 */
524 WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
525 /** set the configure of p2p find offload */
526 WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID,
527 /** set the vendor specific p2p ie data for p2p find offload using */
528 WMI_P2P_DISC_OFFLOAD_APPIE_CMDID,
529 /** set the BSSID/device name pattern of p2p find offload */
530 WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID,
531 /** set OppPS related parameters **/
532 WMI_P2P_SET_OPPPS_PARAM_CMDID,
533
534 /** AP power save specific config */
535 /** set AP power save specific param */
536 WMI_AP_PS_PEER_PARAM_CMDID =
537 WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS),
538 /** set AP UAPSD coex pecific param */
539 WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
540
541 /** set Enhanced Green AP param */
542 WMI_AP_PS_EGAP_PARAM_CMDID,
543
544 /** Rate-control specific commands */
545 WMI_PEER_RATE_RETRY_SCHED_CMDID =
546 WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL),
547
548 /** WLAN Profiling commands. */
549 WMI_WLAN_PROFILE_TRIGGER_CMDID =
550 WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE),
551 WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
552 WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
553 WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
554 WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
555
556 /** Suspend resume command Ids */
557 WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND),
558 WMI_PDEV_RESUME_CMDID,
559
560 /* Beacon filter commands */
561 /** add a beacon filter */
562 WMI_ADD_BCN_FILTER_CMDID =
563 WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER),
564 /** remove a beacon filter */
565 WMI_RMV_BCN_FILTER_CMDID,
566
567 /* WOW Specific WMI commands */
568 /** add pattern for awake */
569 WMI_WOW_ADD_WAKE_PATTERN_CMDID =
570 WMI_CMD_GRP_START_ID(WMI_GRP_WOW),
571 /** deleta a wake pattern */
572 WMI_WOW_DEL_WAKE_PATTERN_CMDID,
573 /** enable/deisable wake event */
574 WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
575 /** enable WOW */
576 WMI_WOW_ENABLE_CMDID,
577 /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */
578 WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
579 /* IOAC add keep alive cmd. */
580 WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID,
581 /* IOAC del keep alive cmd. */
582 WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID,
583 /* IOAC add pattern for awake */
584 WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID,
585 /* IOAC deleta a wake pattern */
586 WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID,
587 /* D0-WOW enable or disable cmd */
588 WMI_D0_WOW_ENABLE_DISABLE_CMDID,
589 /* enable extend WoW */
590 WMI_EXTWOW_ENABLE_CMDID,
591 /* Extend WoW command to configure app type1 parameter */
592 WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID,
593 /* Extend WoW command to configure app type2 parameter */
594 WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID,
595 /* enable ICMPv6 Network advertisement filtering */
596 WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID,
597 /*
598 * Set a pattern to match UDP packet in WOW mode.
599 * If match, construct a tx frame in a local buffer
600 * to send through the peer AP to the entity in the
601 * IP network that sent the UDP packet to this STA.
602 */
603 WMI_WOW_UDP_SVC_OFLD_CMDID,
604
605 /* configure WOW host wakeup PIN pattern */
606 WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID,
607
608 /* RTT measurement related cmd */
609 /** request to make an RTT measurement */
610 WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT),
611 /** request to report a tsf measurement */
612 WMI_RTT_TSF_CMDID,
613
614 /** spectral scan command */
615 /** configure spectral scan */
616 WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID =
617 WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL),
618 /** enable/disable spectral scan and trigger */
619 WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
620
621 /* F/W stats */
622 /** one time request for stats */
623 WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS),
624 /** Push MCC Adaptive Scheduler Stats to Firmware */
625 WMI_MCC_SCHED_TRAFFIC_STATS_CMDID,
626 /** one time request for txrx stats */
627 WMI_REQUEST_STATS_EXT_CMDID,
628
629 /* Link Layer stats */
630 /** Request for link layer stats */
631 WMI_REQUEST_LINK_STATS_CMDID,
632 /** Request for setting params to link layer stats */
633 WMI_START_LINK_STATS_CMDID,
634 /** Request to clear stats*/
635 WMI_CLEAR_LINK_STATS_CMDID,
636
637 /** Request for getting the Firmware Memory Dump */
638 WMI_GET_FW_MEM_DUMP_CMDID,
639
640 /** Request to flush of the buffered debug messages */
641 WMI_DEBUG_MESG_FLUSH_CMDID,
642
643 /** Cmd to configure the verbose level */
644 WMI_DIAG_EVENT_LOG_CONFIG_CMDID,
645
646 /** ARP OFFLOAD REQUEST*/
647 WMI_SET_ARP_NS_OFFLOAD_CMDID =
648 WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL),
649
650 /** Proactive ARP Response Add Pattern Command*/
651 WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID,
652
653 /** Proactive ARP Response Del Pattern Command*/
654 WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID,
655
656 /** NS offload config*/
657 WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID =
658 WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL),
659
660 /** APFIND Config */
661 WMI_APFIND_CMDID,
662
663 /** Passpoint list config */
664 WMI_PASSPOINT_LIST_CONFIG_CMDID,
665
666 /** configure supprssing parameters for MAWC */
667 WMI_NLO_CONFIGURE_MAWC_CMDID,
668
669 /* GTK offload Specific WMI commands */
670 WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL),
671
672 /* CSA offload Specific WMI commands */
673 /** csa offload enable */
674 WMI_CSA_OFFLOAD_ENABLE_CMDID =
675 WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL),
676 /** chan switch command */
677 WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
678
679 /* Chatter commands */
680 /* Change chatter mode of operation */
681 WMI_CHATTER_SET_MODE_CMDID =
682 WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER),
683 /** chatter add coalescing filter command */
684 WMI_CHATTER_ADD_COALESCING_FILTER_CMDID,
685 /** chatter delete coalescing filter command */
686 WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID,
687 /** chatter coalecing query command */
688 WMI_CHATTER_COALESCING_QUERY_CMDID,
689
690 /**addba specific commands */
691 /** start the aggregation on this TID */
692 WMI_PEER_TID_ADDBA_CMDID =
693 WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA),
694 /** stop the aggregation on this TID */
695 WMI_PEER_TID_DELBA_CMDID,
696
697 /** set station mimo powersave method */
698 WMI_STA_DTIM_PS_METHOD_CMDID,
699 /** Configure the Station UAPSD AC Auto Trigger Parameters */
700 WMI_STA_UAPSD_AUTO_TRIG_CMDID,
701 /** Configure the Keep Alive Parameters */
702 WMI_STA_KEEPALIVE_CMDID,
703
704 /* Request ssn from target for a sta/tid pair */
705 WMI_BA_REQ_SSN_CMDID,
706 /* misc command group */
707 /** echo command mainly used for testing */
708 WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC),
709
710 /* !!IMPORTANT!!
711 * If you need to add a new WMI command to the WMI_GRP_MISC sub-group,
712 * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID,
713 * as we MUST have a fixed value here to maintain compatibility between
714 * UTF and the ART2 driver
715 */
716 /** UTF WMI commands */
717 WMI_PDEV_UTF_CMDID,
718
719 /** set debug log config */
720 WMI_DBGLOG_CFG_CMDID,
721 /* QVIT specific command id */
722 WMI_PDEV_QVIT_CMDID,
723 /* Factory Testing Mode request command
724 * used for integrated chipsets */
725 WMI_PDEV_FTM_INTG_CMDID,
726 /* set and get keepalive parameters command */
727 WMI_VDEV_SET_KEEPALIVE_CMDID,
728 WMI_VDEV_GET_KEEPALIVE_CMDID,
729 /* For fw recovery test command */
730 WMI_FORCE_FW_HANG_CMDID,
731 /* Set Mcast/Bdcast filter */
732 WMI_SET_MCASTBCAST_FILTER_CMDID,
733 /** set thermal management params **/
734 WMI_THERMAL_MGMT_CMDID,
735 /** set host auto shutdown params **/
736 WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID,
737 /** set tpc chainmask config command */
738 WMI_TPC_CHAINMASK_CONFIG_CMDID,
739 /** set Antenna diversity command */
740 WMI_SET_ANTENNA_DIVERSITY_CMDID,
741 /** Set OCB Sched Request, deprecated */
742 WMI_OCB_SET_SCHED_CMDID,
743 /* Set rssi monitoring config command */
744 WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID,
745 /* Enable/disable Large Receive Offload processing;
746 * provide cfg params */
747 WMI_LRO_CONFIG_CMDID,
Nirav Shahbf6450f2015-11-05 11:47:20 +0530748 /*transfer data from host to firmware to write flash */
749 WMI_TRANSFER_DATA_TO_FLASH_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800750 /* GPIO Configuration */
751 WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
752 WMI_GPIO_OUTPUT_CMDID,
753
754 /* Txbf configuration command */
755 WMI_TXBF_CMDID,
756
757 /* FWTEST Commands */
758 WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID =
759 WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
760 /** set NoA descs **/
761 WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
762 /* UNIT Tests */
763 WMI_UNIT_TEST_CMDID,
Govind Singhc7d51942016-02-01 12:09:31 +0530764 /* set debug and tuning parameters */
765 WMI_FWTEST_CMDID,
766 /* Q-Boost configuration test commands */
767 WMI_QBOOST_CFG_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800768
769 /** TDLS Configuration */
770 /** enable/disable TDLS */
771 WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS),
772 /** set tdls peer state */
773 WMI_TDLS_PEER_UPDATE_CMDID,
774 /** TDLS Offchannel control */
775 WMI_TDLS_SET_OFFCHAN_MODE_CMDID,
776
777 /** Resmgr Configuration */
778 /** Adaptive OCS is enabled by default in the FW. This command is used to
779 * disable FW based adaptive OCS.
780 */
781 WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID =
782 WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR),
783 /** set the requested channel time quota for the home channels */
784 WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID,
785 /** set the requested latency for the home channels */
786 WMI_RESMGR_SET_CHAN_LATENCY_CMDID,
787
788 /** STA SMPS Configuration */
789 /** force SMPS mode */
790 WMI_STA_SMPS_FORCE_MODE_CMDID =
791 WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS),
792 /** set SMPS parameters */
793 WMI_STA_SMPS_PARAM_CMDID,
794
795 /* Wlan HB commands */
796 /* enalbe/disable wlan HB */
797 WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB),
798 /* set tcp parameters for wlan HB */
799 WMI_HB_SET_TCP_PARAMS_CMDID,
800 /* set tcp pkt filter for wlan HB */
801 WMI_HB_SET_TCP_PKT_FILTER_CMDID,
802 /* set udp parameters for wlan HB */
803 WMI_HB_SET_UDP_PARAMS_CMDID,
804 /* set udp pkt filter for wlan HB */
805 WMI_HB_SET_UDP_PKT_FILTER_CMDID,
806
807 /** Wlan RMC commands*/
808 /** enable/disable RMC */
809 WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC),
810 /** configure action frame period */
811 WMI_RMC_SET_ACTION_PERIOD_CMDID,
812 /** For debug/future enhancement purposes only,
813 * configures/finetunes RMC algorithms */
814 WMI_RMC_CONFIG_CMDID,
815
816 /** WLAN MHF offload commands */
817 /** enable/disable MHF offload */
818 WMI_MHF_OFFLOAD_SET_MODE_CMDID =
819 WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL),
820 /** Plumb routing table for MHF offload */
821 WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID,
822
823 /*location scan commands */
824 /*start batch scan */
825 WMI_BATCH_SCAN_ENABLE_CMDID =
826 WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
827 /*stop batch scan */
828 WMI_BATCH_SCAN_DISABLE_CMDID,
829 /*get batch scan result */
830 WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID,
831 /* OEM related cmd */
Manikandan Mohan05ac7ee2015-12-23 14:18:36 -0800832 WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM),
833 WMI_OEM_REQUEST_CMDID, /* UNUSED */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800834
835 /** Nan Request */
836 WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN),
837
838 /** Modem power state command */
839 WMI_MODEM_POWER_STATE_CMDID =
840 WMI_CMD_GRP_START_ID(WMI_GRP_COEX),
841 WMI_CHAN_AVOID_UPDATE_CMDID,
842
843 /**
844 * OBSS scan offload enable/disable commands
845 * OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true:
846 * 1. WMI_SERVICE_OBSS_SCAN is reported by FW in service ready,
847 * 2. STA connect to a 2.4Ghz ht20/ht40 AP,
848 * 3. AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response)
849 * If OBSS parameters from beacon changed, also use enable CMD to update parameters.
850 * OBSS scan disable CMD will send to FW if have enabled when tearing down connection.
851 */
852 WMI_OBSS_SCAN_ENABLE_CMDID =
853 WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL),
854 WMI_OBSS_SCAN_DISABLE_CMDID,
855
856 /**LPI commands*/
857 /**LPI mgmt snooping config command*/
858 WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID =
859 WMI_CMD_GRP_START_ID(WMI_GRP_LPI),
860 /**LPI scan start command*/
861 WMI_LPI_START_SCAN_CMDID,
862 /**LPI scan stop command*/
863 WMI_LPI_STOP_SCAN_CMDID,
864
865 /** ExtScan commands */
866 WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN),
867 WMI_EXTSCAN_STOP_CMDID,
868 WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID,
869 WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID,
870 WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID,
871 WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID,
872 WMI_EXTSCAN_SET_CAPABILITIES_CMDID,
873 WMI_EXTSCAN_GET_CAPABILITIES_CMDID,
874 WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID,
875 WMI_EXTSCAN_CONFIGURE_MAWC_CMDID,
876
877 /** DHCP server offload commands */
878 WMI_SET_DHCP_SERVER_OFFLOAD_CMDID =
879 WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL),
880
881 /** IPA Offload features related commands */
882 WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID =
883 WMI_CMD_GRP_START_ID(WMI_GRP_IPA),
884
885 /** mDNS responder offload commands */
886 WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL),
887 WMI_MDNS_SET_FQDN_CMDID,
888 WMI_MDNS_SET_RESPONSE_CMDID,
889 WMI_MDNS_GET_STATS_CMDID,
890
891 /* enable/disable AP Authentication offload */
892 WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL),
893 WMI_SAP_SET_BLACKLIST_PARAM_CMDID,
894
895 /** Out-of-context-of-BSS (OCB) commands */
896 WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB),
897 WMI_OCB_SET_UTC_TIME_CMDID,
898 WMI_OCB_START_TIMING_ADVERT_CMDID,
899 WMI_OCB_STOP_TIMING_ADVERT_CMDID,
900 WMI_OCB_GET_TSF_TIMER_CMDID,
901 WMI_DCC_GET_STATS_CMDID,
902 WMI_DCC_CLEAR_STATS_CMDID,
903 WMI_DCC_UPDATE_NDL_CMDID,
904 /* System-On-Chip commands */
905 WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC),
906 WMI_SOC_SET_HW_MODE_CMDID,
907 WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID,
908 WMI_SOC_SET_ANTENNA_MODE_CMDID,
909
910 /* packet filter commands */
911 WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER),
912 WMI_PACKET_FILTER_ENABLE_CMDID,
913 /** Motion Aided WiFi Connectivity (MAWC) commands */
914 WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC),
915
916 /** WMI commands related to PMF 11w Offload */
917 WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID =
918 WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD),
919
Manikandan Mohan130eb572015-12-23 13:53:34 -0800920 /** WMI commands related to pkt filter (BPF) offload */
921 WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
922 WMI_BPF_GET_VDEV_STATS_CMDID,
923 WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID,
924 WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800925} WMI_CMD_ID;
926
927typedef enum {
928 /** WMI service is ready; after this event WMI messages can be sent/received */
929 WMI_SERVICE_READY_EVENTID = 0x1,
930 /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */
931 WMI_READY_EVENTID,
932
933 /** Scan specific events */
934 WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
935
936 /* PDEV specific events */
937 /** TPC config for the current operating channel */
938 WMI_PDEV_TPC_CONFIG_EVENTID =
939 WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
940 /** Channel stats event */
941 WMI_CHAN_INFO_EVENTID,
942
943 /** PHY Error specific WMI event */
944 WMI_PHYERR_EVENTID,
945
946 /** eeprom dump event */
947 WMI_PDEV_DUMP_EVENTID,
948
949 /** traffic pause event */
950 WMI_TX_PAUSE_EVENTID,
951
952 /** DFS radar event */
953 WMI_DFS_RADAR_EVENTID,
954
955 /** track L1SS entry and residency event */
956 WMI_PDEV_L1SS_TRACK_EVENTID,
957
958 /** Report current temprature of the chip in Celcius degree */
959 WMI_PDEV_TEMPERATURE_EVENTID,
960
961 /* Extension of WMI_SERVICE_READY msg with
962 * extra target capability info
963 */
964 WMI_SERVICE_READY_EXT_EVENTID,
965
Govind Singhc7d51942016-02-01 12:09:31 +0530966 /** FIPS test mode event */
967 WMI_PDEV_FIPS_EVENTID,
968
969 /** Channel hopping avoidance */
970 WMI_PDEV_CHANNEL_HOPPING_EVENTID,
971
972 /** CCK ANI level event */
973 WMI_PDEV_ANI_CCK_LEVEL_EVENTID,
974
975 /** OFDM ANI level event */
976 WMI_PDEV_ANI_OFDM_LEVEL_EVENTID,
977
978 /** Tx PPDU params */
979 WMI_PDEV_TPC_EVENTID,
980
981 /** NF Cal Power in DBR/DBM for all channels */
982 WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800983 /* VDEV specific events */
984 /** VDEV started event in response to VDEV_START request */
985 WMI_VDEV_START_RESP_EVENTID =
986 WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
987 /** vdev stopped event , generated in response to VDEV_STOP request */
988 WMI_VDEV_STOPPED_EVENTID,
989 /* Indicate the set key (used for setting per
990 * peer unicast and per vdev multicast)
991 * operation has completed */
992 WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
993 /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please
994 don't use this for any new implementations */
995 /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario.
996 This request is valid only for vdevs operating in soft AP or P2P GO mode */
997 WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID,
998
999 /* Return the TSF timestamp of specified vdev */
1000 WMI_VDEV_TSF_REPORT_EVENTID,
Manikandan Mohan429a0782015-12-23 14:35:54 -08001001
1002 /* FW response to Host for vdev delete cmdid */
1003 WMI_VDEV_DELETE_RESP_EVENTID,
1004
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001005 /* peer specific events */
1006 /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
1007 WMI_PEER_STA_KICKOUT_EVENTID =
1008 WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
1009
1010 /** Peer Info Event with data_rate, rssi, tx_fail_cnt etc */
1011 WMI_PEER_INFO_EVENTID,
1012
1013 /** Event indicating that TX fail count reaching threshold */
1014 WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
1015 /** Return the estimate link speed for the Peer specified in the
1016 * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command.
1017 */
1018 WMI_PEER_ESTIMATED_LINKSPEED_EVENTID,
1019 /* Return the peer state
1020 * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE
1021 */
1022 WMI_PEER_STATE_EVENTID,
1023
1024 /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD.
1025 * After that, host will send Mx message.
1026 * Otherwise, host will pause any Mx(STA:M2/M4) message
1027 */
1028 WMI_PEER_ASSOC_CONF_EVENTID,
1029
Manikandan Mohan429a0782015-12-23 14:35:54 -08001030 /* FW response to Host for peer delete cmdid */
1031 WMI_PEER_DELETE_RESP_EVENTID,
1032
Govind Singhc7d51942016-02-01 12:09:31 +05301033 /** Valid rate code list for peer */
1034 WMI_PEER_RATECODE_LIST_EVENTID,
1035 WMI_WDS_PEER_EVENTID,
1036 WMI_PEER_STA_PS_STATECHG_EVENTID,
1037
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001038 /* beacon/mgmt specific events */
1039 /** RX management frame. the entire frame is carried along with the event. */
1040 WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
1041 /** software beacon alert event to Host requesting host to Queue a beacon for transmission
1042 use only in host beacon mode */
1043 WMI_HOST_SWBA_EVENTID,
1044 /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theritical value.
1045 tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in
1046 staggered beacon transmission mode */
1047 WMI_TBTTOFFSET_UPDATE_EVENTID,
1048
1049 /** event after the first beacon is transmitted following
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301050 a change in the template.*/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001051 WMI_OFFLOAD_BCN_TX_STATUS_EVENTID,
1052 /** event after the first probe response is transmitted following
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301053 a change in the template.*/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001054 WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID,
1055 /** Event for Mgmt TX completion event */
1056 WMI_MGMT_TX_COMPLETION_EVENTID,
1057
1058 /*ADDBA Related WMI Events */
1059 /** Indication the completion of the prior
1060 WMI_PEER_TID_DELBA_CMDID(initiator) */
1061 WMI_TX_DELBA_COMPLETE_EVENTID =
1062 WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
1063 /** Indication the completion of the prior
1064 *WMI_PEER_TID_ADDBA_CMDID(initiator) */
1065 WMI_TX_ADDBA_COMPLETE_EVENTID,
1066
1067 /* Seq num returned from hw for a sta/tid pair */
1068 WMI_BA_RSP_SSN_EVENTID,
1069
1070 /* Aggregation state requested by BTC */
1071 WMI_AGGR_STATE_TRIG_EVENTID,
1072
1073 /** Roam event to trigger roaming on host */
1074 WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
1075
1076 /** matching AP found from list of profiles */
1077 WMI_PROFILE_MATCH,
1078 /** roam synch event */
1079 WMI_ROAM_SYNCH_EVENTID,
1080
1081 /** P2P disc found */
1082 WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
1083
1084 /*send noa info to host when noa is changed for beacon tx offload enable */
1085 WMI_P2P_NOA_EVENTID,
1086
1087 /** Send EGAP Info to host */
1088 WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS),
1089
1090 /* send pdev resume event to host after pdev resume. */
1091 WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND),
1092
1093 /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID.
1094 will cary wake reason */
1095 WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
1096 WMI_D0_WOW_DISABLE_ACK_EVENTID,
1097 WMI_WOW_INITIAL_WAKEUP_EVENTID,
1098
1099 /*RTT related event ID */
1100 /** RTT measurement report */
1101 WMI_RTT_MEASUREMENT_REPORT_EVENTID =
1102 WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
1103 /** TSF measurement report */
1104 WMI_TSF_MEASUREMENT_REPORT_EVENTID,
1105 /** RTT error report */
1106 WMI_RTT_ERROR_REPORT_EVENTID,
1107 /*STATS specific events */
1108 /** txrx stats event requested by host */
1109 WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS),
1110 /** FW iface link stats Event */
1111 WMI_IFACE_LINK_STATS_EVENTID,
1112 /** FW iface peer link stats Event */
1113 WMI_PEER_LINK_STATS_EVENTID,
1114 /** FW Update radio stats Event */
1115 WMI_RADIO_LINK_STATS_EVENTID,
1116 /** Firmware memory dump Complete event*/
1117 WMI_UPDATE_FW_MEM_DUMP_EVENTID,
1118
1119 /** Event indicating the DIAG logs/events supported by FW */
1120 WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID,
1121
Govind Singhc7d51942016-02-01 12:09:31 +05301122 /* Instantaneous RSSI event */
1123 WMI_INST_RSSI_STATS_EVENTID,
1124
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001125 /** NLO specific events */
1126 /** NLO match event after the first match */
1127 WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL),
1128
1129 /** NLO scan complete event */
1130 WMI_NLO_SCAN_COMPLETE_EVENTID,
1131
1132 /** APFIND specific events */
1133 WMI_APFIND_EVENTID,
1134
1135 /** passpoint network match event */
1136 WMI_PASSPOINT_MATCH_EVENTID,
1137
1138 /** GTK offload stautus event requested by host */
1139 WMI_GTK_OFFLOAD_STATUS_EVENTID =
1140 WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
1141
1142 /** GTK offload failed to rekey event */
1143 WMI_GTK_REKEY_FAIL_EVENTID,
1144 /* CSA IE received event */
1145 WMI_CSA_HANDLING_EVENTID =
1146 WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
1147
1148 /*chatter query reply event */
1149 WMI_CHATTER_PC_QUERY_EVENTID =
1150 WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER),
1151
1152 /** echo event in response to echo command */
1153 WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
1154
1155 /* !!IMPORTANT!!
1156 * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group,
1157 * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID,
1158 * as we MUST have a fixed value here to maintain compatibility between
1159 * UTF and the ART2 driver
1160 */
1161 /** UTF specific WMI event */
1162 WMI_PDEV_UTF_EVENTID,
1163
1164 /** event carries buffered debug messages */
1165 WMI_DEBUG_MESG_EVENTID,
1166 /** FW stats(periodic or on shot) */
1167 WMI_UPDATE_STATS_EVENTID,
1168 /** debug print message used for tracing FW code while debugging */
1169 WMI_DEBUG_PRINT_EVENTID,
1170 /** DCS wlan or non-wlan interference event
1171 */
1172 WMI_DCS_INTERFERENCE_EVENTID,
1173 /** VI spoecific event */
1174 WMI_PDEV_QVIT_EVENTID,
1175 /** FW code profile data in response to profile request */
1176 WMI_WLAN_PROFILE_DATA_EVENTID,
1177 /* Factory Testing Mode request event
1178 * used for integrated chipsets */
1179 WMI_PDEV_FTM_INTG_EVENTID,
1180 /* avoid list of frequencies .
1181 */
1182 WMI_WLAN_FREQ_AVOID_EVENTID,
1183 /* Indicate the keepalive parameters */
1184 WMI_VDEV_GET_KEEPALIVE_EVENTID,
1185 /* Thermal Management event */
1186 WMI_THERMAL_MGMT_EVENTID,
1187
1188 /* Container for QXDM/DIAG events */
1189 WMI_DIAG_DATA_CONTAINER_EVENTID,
1190
1191 /* host auto shutdown event */
1192 WMI_HOST_AUTO_SHUTDOWN_EVENTID,
1193
1194 /*update mib counters together with WMI_UPDATE_STATS_EVENTID */
1195 WMI_UPDATE_WHAL_MIB_STATS_EVENTID,
1196
1197 /*update ht/vht info based on vdev (rx and tx NSS and preamble) */
1198 WMI_UPDATE_VDEV_RATE_STATS_EVENTID,
1199
1200 WMI_DIAG_EVENTID,
1201
1202 /** Set OCB Sched Response, deprecated */
1203 WMI_OCB_SET_SCHED_EVENTID,
1204
1205 /* event to indicate the flush of the buffered debug messages is complete*/
1206 WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID,
1207 /* event to report mix/max RSSI breach events */
1208 WMI_RSSI_BREACH_EVENTID,
Nirav Shahbf6450f2015-11-05 11:47:20 +05301209 /* event to report completion of data storage into flash memory */
1210 WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001211
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -08001212 /** event to report SCPC calibrated data to host */
1213 WMI_PDEV_UTF_SCPC_EVENTID,
1214
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001215 /* GPIO Event */
1216 WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
1217 /** upload H_CV info WMI event
1218 * to indicate uploaded H_CV info to host
1219 */
1220 WMI_UPLOADH_EVENTID,
1221
1222 /** capture H info WMI event
1223 * to indicate captured H info to host
1224 */
1225 WMI_CAPTUREH_EVENTID,
1226 /* hw RFkill */
1227 WMI_RFKILL_STATE_CHANGE_EVENTID,
1228
1229 /* TDLS Event */
1230 WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
1231
Manikandan Mohan55c94d62015-12-04 13:47:58 -08001232 /* STA SMPS Event */
1233 /* force SMPS mode */
1234 WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID =
1235 WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS),
1236
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001237 /*location scan event */
1238 /*report the firmware's capability of batch scan */
1239 WMI_BATCH_SCAN_ENABLED_EVENTID =
1240 WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN),
1241 /*batch scan result */
1242 WMI_BATCH_SCAN_RESULT_EVENTID,
1243 /* OEM Event */
Krishna Kumaar Natarajan1dfa3532015-11-19 16:16:20 -08001244 WMI_OEM_CAPABILITY_EVENTID = /* DEPRECATED */
1245 WMI_EVT_GRP_START_ID(WMI_GRP_OEM),
1246 WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */
1247 WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */
1248 WMI_OEM_RESPONSE_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001249
1250 /* NAN Event */
1251 WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN),
1252
1253 /* LPI Event */
1254 WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI),
1255 WMI_LPI_STATUS_EVENTID,
1256 WMI_LPI_HANDOFF_EVENTID,
1257
1258 /* ExtScan events */
1259 WMI_EXTSCAN_START_STOP_EVENTID =
1260 WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN),
1261 WMI_EXTSCAN_OPERATION_EVENTID,
1262 WMI_EXTSCAN_TABLE_USAGE_EVENTID,
1263 WMI_EXTSCAN_CACHED_RESULTS_EVENTID,
1264 WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID,
1265 WMI_EXTSCAN_HOTLIST_MATCH_EVENTID,
1266 WMI_EXTSCAN_CAPABILITIES_EVENTID,
1267 WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID,
1268
1269 /* mDNS offload events */
1270 WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL),
1271
1272 /* SAP Authentication offload events */
1273 WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL),
1274 WMI_SAP_OFL_DEL_STA_EVENTID,
1275
1276 /** Out-of-context-of-bss (OCB) events */
1277 WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB),
1278 WMI_OCB_GET_TSF_TIMER_RESP_EVENTID,
1279 WMI_DCC_GET_STATS_RESP_EVENTID,
1280 WMI_DCC_UPDATE_NDL_RESP_EVENTID,
1281 WMI_DCC_STATS_EVENTID,
1282 /* System-On-Chip events */
1283 WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC),
1284 WMI_SOC_HW_MODE_TRANSITION_EVENTID,
1285 WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID,
1286 /** Motion Aided WiFi Connectivity (MAWC) events */
1287 WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC),
1288
Manikandan Mohan130eb572015-12-23 13:53:34 -08001289 /** pkt filter (BPF) offload relevant events */
1290 WMI_BPF_CAPABILIY_INFO_EVENTID =
1291 WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD),
1292 WMI_BPF_VDEV_STATS_INFO_EVENTID,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001293} WMI_EVT_ID;
1294
1295/* defines for OEM message sub-types */
1296#define WMI_OEM_CAPABILITY_REQ 0x01
1297#define WMI_OEM_CAPABILITY_RSP 0x02
1298#define WMI_OEM_MEASUREMENT_REQ 0x03
1299#define WMI_OEM_MEASUREMENT_RSP 0x04
1300#define WMI_OEM_ERROR_REPORT_RSP 0x05
1301#define WMI_OEM_NAN_MEAS_REQ 0x06
1302#define WMI_OEM_NAN_MEAS_RSP 0x07
1303#define WMI_OEM_NAN_PEER_INFO 0x08
1304#define WMI_OEM_CONFIGURE_LCR 0x09
1305#define WMI_OEM_CONFIGURE_LCI 0x0A
1306
1307/* below message subtype is internal to CLD. Target should
1308 * never use internal response type
1309 */
1310#define WMI_OEM_INTERNAL_RSP 0xdeadbeef
1311
1312#define WMI_CHAN_LIST_TAG 0x1
1313#define WMI_SSID_LIST_TAG 0x2
1314#define WMI_BSSID_LIST_TAG 0x3
1315#define WMI_IE_TAG 0x4
1316
1317typedef struct {
1318 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
1319 /** primary 20 MHz channel frequency in mhz */
1320 A_UINT32 mhz;
1321 /** Center frequency 1 in MHz*/
1322 A_UINT32 band_center_freq1;
1323 /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
1324 A_UINT32 band_center_freq2;
1325 /** channel info described below */
1326 A_UINT32 info;
1327 /** contains min power, max power, reg power and reg class id. */
1328 A_UINT32 reg_info_1;
1329 /** contains antennamax */
1330 A_UINT32 reg_info_2;
1331} wmi_channel;
1332
1333typedef enum {
1334 WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
1335 WMI_CHANNEL_CHANGE_CAUSE_CSA,
1336} wmi_channel_change_cause;
1337
1338/** channel info consists of 6 bits of channel mode */
1339
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301340#define WMI_SET_CHANNEL_MODE(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001341 (pwmi_channel)->info &= 0xffffffc0; \
1342 (pwmi_channel)->info |= (val); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301343} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001344
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301345#define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001346
1347#define WMI_CHAN_FLAG_HT40_PLUS 6
1348#define WMI_CHAN_FLAG_PASSIVE 7
1349#define WMI_CHAN_ADHOC_ALLOWED 8
1350#define WMI_CHAN_AP_DISABLED 9
1351#define WMI_CHAN_FLAG_DFS 10
1352#define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */
1353#define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */
1354#define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */
1355#define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */
1356#define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */
Govind Singh32cced32016-02-01 13:33:09 +05301357/* Enable radar event reporting for sec80 in VHT80p80 */
1358#define WMI_CHAN_FLAG_DFS_CFREQ2 16
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001359
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301360#define WMI_SET_CHANNEL_FLAG(pwmi_channel, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001361 (pwmi_channel)->info |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301362} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001363
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301364#define WMI_GET_CHANNEL_FLAG(pwmi_channel, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001365 (((pwmi_channel)->info & (1 << flag)) >> flag)
1366
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301367#define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001368 (pwmi_channel)->reg_info_1 &= 0xffffff00; \
1369 (pwmi_channel)->reg_info_1 |= (val&0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301370} while (0)
1371#define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001372
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301373#define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001374 (pwmi_channel)->reg_info_1 &= 0xffff00ff; \
1375 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 8); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301376} while (0)
1377#define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001378
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301379#define WMI_SET_CHANNEL_REG_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001380 (pwmi_channel)->reg_info_1 &= 0xff00ffff; \
1381 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 16); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301382} while (0)
1383#define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
1384#define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001385 (pwmi_channel)->reg_info_1 &= 0x00ffffff; \
1386 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 24); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301387} while (0)
1388#define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001389
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301390#define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001391 (pwmi_channel)->reg_info_2 &= 0xffffff00; \
1392 (pwmi_channel)->reg_info_2 |= (val&0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301393} while (0)
1394#define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001395
1396/* max tx power is in 1 dBm units */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301397#define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001398 (pwmi_channel)->reg_info_2 &= 0xffff00ff; \
1399 (pwmi_channel)->reg_info_2 |= ((val&0xff)<<8); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301400} while (0)
1401#define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001402
1403
1404/** HT Capabilities*/
1405#define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
1406#define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
1407#define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
1408#define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
1409#define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
1410#define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
1411#define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
1412#define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
1413#define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
1414#define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
1415#define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
1416#define WMI_HT_CAP_HT40_SGI 0x0800
1417
1418/* These macros should be used when we wish to advertise STBC support for
1419 * only 1SS or 2SS or 3SS. */
1420#define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
1421#define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
1422#define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
1423
1424#define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
1425 WMI_HT_CAP_HT20_SGI | \
1426 WMI_HT_CAP_HT40_SGI | \
1427 WMI_HT_CAP_TX_STBC | \
1428 WMI_HT_CAP_RX_STBC | \
1429 WMI_HT_CAP_LDPC)
1430
1431/* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
1432 field. The fields not defined here are not supported, or reserved.
1433 Do not change these masks and if you have to add new one follow the
1434 bitmask as specified by 802.11ac draft.
1435 */
1436
1437#define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
1438#define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
1439#define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
1440#define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004
1441#define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008
1442#define WMI_VHT_CAP_RX_LDPC 0x00000010
1443#define WMI_VHT_CAP_SGI_80MHZ 0x00000020
1444#define WMI_VHT_CAP_SGI_160MHZ 0x00000040
1445#define WMI_VHT_CAP_TX_STBC 0x00000080
1446#define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
1447#define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
1448#define WMI_VHT_CAP_SU_BFORMER 0x00000800
1449#define WMI_VHT_CAP_SU_BFORMEE 0x00001000
1450#define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
1451#define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
1452#define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
1453#define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
1454#define WMI_VHT_CAP_MU_BFORMER 0x00080000
1455#define WMI_VHT_CAP_MU_BFORMEE 0x00100000
1456#define WMI_VHT_CAP_TXOP_PS 0x00200000
1457#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
1458#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
1459#define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
1460#define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
1461
1462/* TEMPORARY:
1463 * Preserve the incorrect old name as an alias for the correct new name
1464 * until all references to the old name have been removed from all hosts
1465 * and targets.
1466 */
1467#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
1468
1469/* These macros should be used when we wish to advertise STBC support for
1470 * only 1SS or 2SS or 3SS. */
1471#define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
1472#define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
1473#define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
1474
1475/* TEMPORARY:
1476 * Preserve the incorrect old name as an alias for the correct new name
1477 * until all references to the old name have been removed from all hosts
1478 * and targets.
1479 */
1480#define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
1481
1482#define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
1483 WMI_VHT_CAP_SGI_80MHZ | \
1484 WMI_VHT_CAP_TX_STBC | \
1485 WMI_VHT_CAP_RX_STBC_MASK | \
1486 WMI_VHT_CAP_RX_LDPC | \
1487 WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
1488 WMI_VHT_CAP_RX_FIXED_ANT | \
1489 WMI_VHT_CAP_TX_FIXED_ANT)
1490
1491/* Interested readers refer to Rx/Tx MCS Map definition as defined in
1492 802.11ac
1493 */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301494#define WMI_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001495#define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
1496#define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
1497
1498/* WMI_SYS_CAPS_* refer to the capabilities that system support
1499 */
1500#define WMI_SYS_CAP_ENABLE 0x00000001
1501#define WMI_SYS_CAP_TXPOWER 0x00000002
1502
1503/*
1504 * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
1505 * Bits 5:0 are reserved
1506 */
1507#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
1508#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
1509#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
1510#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
1511#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
1512#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
1513#define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7)
1514#define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
1515
1516#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
1517#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
1518#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
1519#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
1520#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
1521#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
1522#define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
1523#define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
1524
1525#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
1526 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
1527#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
1528 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
1529#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
1530 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
1531#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
1532 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
1533#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
1534 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
1535#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
1536 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
1537#define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \
1538 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
1539#define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
1540 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
1541
1542#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
1543 ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
1544#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
1545 ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
1546#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
1547 ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
1548#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
1549 ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
1550#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
1551 ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
1552#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
1553 ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
1554#define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \
1555 ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
1556#define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \
1557 ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
1558
1559#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31)
1560#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30)
1561#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29)
1562
1563#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
1564#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
1565#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
1566
1567#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
1568 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
1569#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
1570 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
1571#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
1572 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
1573
1574#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \
1575 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
1576#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \
1577 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
1578#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \
1579 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
1580
1581#define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31)
1582#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30)
1583
1584#define WMI_DBS_FW_MODE_CFG_DBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
1585#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
1586
1587#define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
1588 WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
1589#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
1590 WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
1591
1592#define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \
1593 ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
1594#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \
1595 ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
1596
1597/** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
1598typedef struct _wmi_abi_version {
1599 A_UINT32 abi_version_0;
1600 /** WMI Major and Minor versions */
1601 A_UINT32 abi_version_1;
1602 /** WMI change revision */
1603 A_UINT32 abi_version_ns_0;
1604 /** ABI version namespace first four dwords */
1605 A_UINT32 abi_version_ns_1;
1606 /** ABI version namespace second four dwords */
1607 A_UINT32 abi_version_ns_2;
1608 /** ABI version namespace third four dwords */
1609 A_UINT32 abi_version_ns_3;
1610 /** ABI version namespace fourth four dwords */
1611} wmi_abi_version;
1612
1613/*
1614 * maximum number of memroy requests allowed from FW.
1615 */
1616#define WMI_MAX_MEM_REQS 16
1617
1618/* !!NOTE!!:
1619 * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
1620 * Please don't change it.
1621 */
1622#define HW_BD_INFO_SIZE 5
1623
1624/**
1625 * The following struct holds optional payload for
1626 * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
1627 * device capability to the host.
1628 */
1629typedef struct {
1630 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
1631 A_UINT32 fw_build_vers; /* firmware build number */
1632 wmi_abi_version fw_abi_vers;
1633 A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
1634 A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
1635 A_UINT32 num_rf_chains;
1636 /* The following field is only valid for service type WMI_SERVICE_11AC */
1637 A_UINT32 ht_cap_info; /* WMI HT Capability */
1638 A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
1639 A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
1640 A_UINT32 hw_min_tx_power;
1641 A_UINT32 hw_max_tx_power;
1642 A_UINT32 sys_cap_info;
1643 A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
1644 /** Max beacon and Probe Response IE offload size (includes
1645 * optional P2P IEs) */
1646 A_UINT32 max_bcn_ie_size;
1647 /*
1648 * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
1649 * FW uses this as FW extesnsion memory for saving its data structures. Only valid
1650 * for low latency interfaces like PCIE where FW can access this memory directly (or)
1651 * by DMA.
1652 */
1653 A_UINT32 num_mem_reqs;
1654 /* Max No. scan channels target can support
1655 * If FW is too old and doesn't indicate this number, host side value will default to
1656 * 0, and host will take the original compatible value (62) for future scan channel
1657 * setup.
1658 */
1659 A_UINT32 max_num_scan_channels;
1660
1661 /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
1662 * Default 0 means tha hw_bd_info[] is invalid(legacy board).
1663 */
1664 A_UINT32 hw_bd_id;
1665 A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
1666
1667 /*
1668 * Number of MACs supported, i.e. a DBS-capable device will return 2
1669 */
1670 A_UINT32 max_supported_macs;
1671
1672 /*
1673 * FW sub-feature capabilities to be used in concurrence with
1674 * wmi_service_bitmap
1675 * values from enum WMI_FW_SUB_FEAT_CAPS
1676 */
1677 A_UINT32 wmi_fw_sub_feat_caps;
1678 /*
1679 * Number of Dual Band Simultaneous (DBS) hardware modes
1680 */
1681 A_UINT32 num_dbs_hw_modes;
1682 /*
1683 * txrx_chainmask
1684 * [7:0] - 2G band tx chain mask
1685 * [15:8] - 2G band rx chain mask
1686 * [23:16] - 5G band tx chain mask
1687 * [31:24] - 5G band rx chain mask
1688 *
1689 */
1690 A_UINT32 txrx_chainmask;
1691
1692 /*
1693 * default Dual Band Simultaneous (DBS) hardware mode
1694 */
1695 A_UINT32 default_dbs_hw_mode_index;
1696
1697 /*
1698 * Number of msdu descriptors target would use
1699 */
1700 A_UINT32 num_msdu_desc;
1701
1702 /* The TLVs for hal_reg_capabilities, wmi_service_bitmap and mem_reqs[] will follow this TLV.
1703 * HAL_REG_CAPABILITIES hal_reg_capabilities;
1704 * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
1705 * wlan_host_mem_req mem_reqs[];
1706 * wlan_dbs_hw_mode_list[];
1707 */
1708} wmi_service_ready_event_fixed_param;
1709
1710typedef struct {
1711 /* TLV tag and len; tag equals
1712 *WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT
1713 */
1714 A_UINT32 tlv_header;
1715 /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
1716 A_UINT32 default_conc_scan_config_bits;
1717 /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
1718 A_UINT32 default_fw_config_bits;
1719} wmi_service_ready_ext_event_fixed_param;
1720
1721typedef enum {
1722 WMI_HWBD_NONE = 0, /* No hw board information is given */
1723 WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */
1724 WMI_HWBD_QCA2582 = 2, /* Killer 1525 */
1725} WMI_HWBD_ID;
1726
1727typedef enum {
1728 WMI_FW_STA_RTT_INITR = 0x00000001,
1729 WMI_FW_STA_RTT_RESPR = 0x00000002,
1730 WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
1731 WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
1732 WMI_FW_P2P_GO_RTT_INITR = 0x00000010,
1733 WMI_FW_P2P_GO_RTT_RESPR = 0x00000020,
1734 WMI_FW_AP_RTT_INITR = 0x00000040,
1735 WMI_FW_AP_RTT_RESPR = 0x00000080,
1736 WMI_FW_NAN_RTT_INITR = 0x00000100,
1737 WMI_FW_NAN_RTT_RESPR = 0x00000200,
1738 /*
1739 * New fw sub feature capabilites before
1740 * WMI_FW_MAX_SUB_FEAT_CAP
1741 */
1742 WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000,
1743} WMI_FW_SUB_FEAT_CAPS;
1744
1745#define ATH_BD_DATA_REV_MASK 0x000000FF
1746#define ATH_BD_DATA_REV_SHIFT 0
1747
1748#define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00
1749#define ATH_BD_DATA_PROJ_ID_SHIFT 8
1750
1751#define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000
1752#define ATH_BD_DATA_CUST_ID_SHIFT 16
1753
1754#define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000
1755#define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
1756
1757#define SET_BD_DATA_REV(bd_data_ver, value) \
1758 ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
1759
1760#define GET_BD_DATA_REV(bd_data_ver) \
1761 (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
1762
1763#define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
1764 ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
1765
1766#define GET_BD_DATA_PROJ_ID(bd_data_ver) \
1767 (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
1768
1769#define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
1770 ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
1771
1772#define GET_BD_DATA_CUST_ID(bd_data_ver) \
1773 (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
1774
1775#define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \
1776 ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
1777
1778#define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \
1779 (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
1780
1781#ifdef ROME_LTE_COEX_FREQ_AVOID
1782typedef struct {
1783 A_UINT32 start_freq; /* start frequency, not channel center freq */
1784 A_UINT32 end_freq; /* end frequency */
1785} avoid_freq_range_desc;
1786
1787typedef struct {
1788 /* bad channel range count, multi range is allowed, 0 means all channel clear */
1789 A_UINT32 num_freq_ranges;
1790 /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
1791 avoid_freq_range_desc avd_freq_range[0];
1792} wmi_wlan_avoid_freq_ranges_event;
1793#endif
1794
1795/** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that retuned status */
1796#define WLAN_INIT_STATUS_SUCCESS 0x0
1797#define WLAN_INIT_STATUS_GEN_FAILED 0x1
1798#define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
1799#define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
1800
1801typedef A_UINT32 WLAN_INIT_STATUS;
1802
1803typedef struct {
1804 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
1805 wmi_abi_version fw_abi_vers;
1806 wmi_mac_addr mac_addr;
1807 A_UINT32 status;
1808} wmi_ready_event_fixed_param;
1809
1810typedef struct {
1811 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
1812/**
1813 * @brief num_vdev - number of virtual devices (VAPs) to support
1814 */
1815 A_UINT32 num_vdevs;
1816/**
1817 * @brief num_peers - number of peer nodes to support
1818 */
1819 A_UINT32 num_peers;
1820/*
1821 * @brief In offload mode target supports features like WOW, chatter and other
1822 * protocol offloads. In order to support them some functionalities like
1823 * reorder buffering, PN checking need to be done in target. This determines
1824 * maximum number of peers suported by target in offload mode
1825 */
1826 A_UINT32 num_offload_peers;
1827/* @brief Number of reorder buffers available for doing target based reorder
1828 * Rx reorder buffering
1829 */
1830 A_UINT32 num_offload_reorder_buffs;
1831/**
1832 * @brief num_peer_keys - number of keys per peer
1833 */
1834 A_UINT32 num_peer_keys;
1835/**
1836 * @brief num_peer_tids - number of TIDs to provide storage for per peer.
1837 */
1838 A_UINT32 num_tids;
1839/**
1840 * @brief ast_skid_limit - max skid for resolving hash collisions
1841 * @details
1842 * The address search table is sparse, so that if two MAC addresses
1843 * result in the same hash value, the second of these conflicting
1844 * entries can slide to the next index in the address search table,
1845 * and use it, if it is unoccupied. This ast_skid_limit parameter
1846 * specifies the upper bound on how many subsequent indices to search
1847 * over to find an unoccupied space.
1848 */
1849 A_UINT32 ast_skid_limit;
1850/**
1851 * @brief tx_chain_mask - the nominal chain mask for transmit
1852 * @details
1853 * The chain mask may be modified dynamically, e.g. to operate AP tx with
1854 * a reduced number of chains if no clients are associated.
1855 * This configuration parameter specifies the nominal chain-mask that
1856 * should be used when not operating with a reduced set of tx chains.
1857 */
1858 A_UINT32 tx_chain_mask;
1859/**
1860 * @brief rx_chain_mask - the nominal chain mask for receive
1861 * @details
1862 * The chain mask may be modified dynamically, e.g. for a client to use
1863 * a reduced number of chains for receive if the traffic to the client
1864 * is low enough that it doesn't require downlink MIMO or antenna
1865 * diversity.
1866 * This configuration parameter specifies the nominal chain-mask that
1867 * should be used when not operating with a reduced set of rx chains.
1868 */
1869 A_UINT32 rx_chain_mask;
1870/**
1871 * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
1872 * @details
1873 * Each WMM access class (voice, video, best-effort, background) will
1874 * have its own timeout value to dictate how long to wait for missing
1875 * rx MPDUs to arrive before flushing subsequent MPDUs that have already
1876 * been received.
1877 * This parameter specifies the timeout in milliseconds for each class .
1878 * NOTE: the number of class (defined as 4) cannot be
1879 * changed in the future without breaking WMI compatibility.
1880 */
1881 A_UINT32 rx_timeout_pri[4];
1882/**
1883 * @brief rx_decap mode - what mode the rx should decap packets to
1884 * @details
1885 * MAC can decap to RAW (no decap), native wifi or Ethernet types
1886 * THis setting also determines the default TX behavior, however TX
1887 * behavior can be modified on a per VAP basis during VAP init
1888 */
1889 A_UINT32 rx_decap_mode;
1890 /**
1891 * @brief scan_max_pending_req - what is the maximum scan requests than can be queued
1892 */
1893 A_UINT32 scan_max_pending_req;
1894
1895 /**
1896 * @brief maximum VDEV that could use BMISS offload
1897 */
1898 A_UINT32 bmiss_offload_max_vdev;
1899
1900 /**
1901 * @brief maximum VDEV that could use offload roaming
1902 */
1903 A_UINT32 roam_offload_max_vdev;
1904
1905 /**
1906 * @brief maximum AP profiles that would push to offload roaming
1907 */
1908 A_UINT32 roam_offload_max_ap_profiles;
1909
1910/**
1911 * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
1912 * @details
1913 * The target's WAL maintains a table to hold information regarding which
1914 * peers belong to a given multicast group, so that if multicast->unicast
1915 * conversion is enabled, the target can convert multicast tx frames to a
1916 * series of unicast tx frames, to each peer within the multicast group.
1917 * This num_mcast_groups configuration parameter tells the target how
1918 * many multicast groups to provide storage for within its multicast
1919 * group membership table.
1920 */
1921 A_UINT32 num_mcast_groups;
1922
1923/**
1924 * @brief num_mcast_table_elems - size to alloc for the mcast membership table
1925 * @details
1926 * This num_mcast_table_elems configuration parameter tells the target
1927 * how many peer elements it needs to provide storage for in its
1928 * multicast group membership table.
1929 * These multicast group membership table elements are shared by the
1930 * multicast groups stored within the table.
1931 */
1932 A_UINT32 num_mcast_table_elems;
1933
1934/**
1935 * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
1936 * @details
1937 * This configuration parameter specifies whether the target should
1938 * perform multicast --> unicast conversion on transmit, and if so,
1939 * what to do if it finds no entries in its multicast group membership
1940 * table for the multicast IP address in the tx frame.
1941 * Configuration value:
1942 * 0 -> Do not perform multicast to unicast conversion.
1943 * 1 -> Convert multicast frames to unicast, if the IP multicast address
1944 * from the tx frame is found in the multicast group membership
1945 * table. If the IP multicast address is not found, drop the frame.
1946 * 2 -> Convert multicast frames to unicast, if the IP multicast address
1947 * from the tx frame is found in the multicast group membership
1948 * table. If the IP multicast address is not found, transmit the
1949 * frame as multicast.
1950 */
1951 A_UINT32 mcast2ucast_mode;
1952
1953 /**
1954 * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
1955 * @details
1956 * This parameter controls how much memory the target will allocate to
1957 * store a log of tx PPDU meta-information (how large the PPDU was,
1958 * when it was sent, whether it was successful, etc.)
1959 */
1960 A_UINT32 tx_dbg_log_size;
1961
1962 /**
1963 * @brief num_wds_entries - how many AST entries to be allocated for WDS
1964 */
1965 A_UINT32 num_wds_entries;
1966
1967 /**
1968 * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
1969 * this limit can be 0 -default, 1 256B
1970 */
1971 A_UINT32 dma_burst_size;
1972
1973 /**
1974 * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
1975 * to account for interface latency to avoid underrun.
1976 */
1977 A_UINT32 mac_aggr_delim;
1978 /**
1979 * @brief rx_skip_defrag_timeout_dup_detection_check
1980 * @details
1981 * determine whether target is responsible for detecting duplicate
1982 * non-aggregate MPDU and timing out stale fragments.
1983 *
1984 * A-MPDU reordering is always performed on the target.
1985 *
1986 * 0: target responsible for frag timeout and dup checking
1987 * 1: host responsible for frag timeout and dup checking
1988 */
1989 A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
1990
1991 /**
1992 * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
1993 * and Max no of descriptors for each Video link (node).
1994 */
1995 A_UINT32 vow_config;
1996
1997 /**
1998 * @brief maximum VDEV that could use GTK offload
1999 */
2000 A_UINT32 gtk_offload_max_vdev;
2001
2002 /**
2003 * @brief num_msdu_desc - Number of msdu descriptors target should use
2004 */
2005 A_UINT32 num_msdu_desc; /* Number of msdu desc */
2006 /**
2007 * @brief max_frag_entry - Max. number of Tx fragments per MSDU
2008 * @details
2009 * This parameter controls the max number of Tx fragments per MSDU.
2010 * This is sent by the target as part of the WMI_SERVICE_READY event
2011 * and is overriden by the OS shim as required.
2012 */
2013 A_UINT32 max_frag_entries;
2014
2015 /**
2016 * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
2017 * @brief num_msdu_desc - Number of vdev that can support beacon offload
2018 */
2019
2020 A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
2021
2022 /**
2023 * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
2024 * @details
2025 * Each TDLS enabled vdev can track outgoing transmits/rssi/rates to/of
2026 * peers in a connection tracking table for possible TDLS link creation
2027 * or deletion. This controls the number of tracked peers per vdev.
2028 */
2029 A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
2030 A_UINT32 beacon_tx_offload_max_vdev;
2031 A_UINT32 num_multicast_filter_entries;
2032 A_UINT32 num_wow_filters; /*host can configure the number of wow filters */
2033
2034 /**
2035 * @brief num_keep_alive_pattern - Num of keep alive patterns configured
2036 * from host.
2037 */
2038 A_UINT32 num_keep_alive_pattern;
2039 /**
2040 * @brief keep_alive_pattern_size - keep alive pattern size.
2041 */
2042 A_UINT32 keep_alive_pattern_size;
2043
2044 /**
2045 * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
2046 * @details
2047 * Each TDLS STA can become a sleep STA independently. This parameter
2048 * mentions how many such sleep STAs can be supported concurrently.
2049 */
2050 A_UINT32 max_tdls_concurrent_sleep_sta;
2051
2052 /**
2053 * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
2054 * @details
2055 * Each TDLS STA can become a buffer STA independently. This parameter
2056 * mentions how many such buffer STAs can be supported concurrently.
2057 */
2058 A_UINT32 max_tdls_concurrent_buffer_sta;
2059
2060 /**
2061 * @brief wmi_send_separate - host configures fw to send the wmi separately
2062 */
2063 A_UINT32 wmi_send_separate;
2064
2065 /**
2066 * @brief num_ocb_vdevs - Number of vdevs used for OCB support
2067 */
2068 A_UINT32 num_ocb_vdevs;
2069
2070 /**
2071 * @brief num_ocb_channels - The supported number of simultaneous OCB channels
2072 */
2073 A_UINT32 num_ocb_channels;
2074
2075 /**
2076 * @brief num_ocb_schedules - The supported number of OCB schedule segments
2077 */
2078 A_UINT32 num_ocb_schedules;
Manikandan Mohan30728082015-12-09 12:35:24 -08002079 /**
2080 * @brief specific configuration from host, such as per platform configuration
2081 */
2082 #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
2083 #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002084
2085 #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
2086 #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
2087
2088 #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
2089 #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
2090
2091 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
2092 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
2093
2094 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
2095 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
2096
2097 #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
2098 #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
2099
2100 #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
2101 #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
2102
2103 #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
2104 #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
2105
2106 #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
2107 #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
2108
Manikandan Mohan30728082015-12-09 12:35:24 -08002109 A_UINT32 flag1;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002110
2111 /** @brief smart_ant_cap - Smart Antenna capabilities information
2112 * @details
2113 * 1 - Smart antenna is enabled.
2114 * 0 - Smart antenna is disabled.
2115 * In future this can contain smart antenna specifc capabilities.
2116 */
2117 A_UINT32 smart_ant_cap;
2118
2119 /**
2120 * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
2121 * during init
2122 */
2123 A_UINT32 BK_Minfree;
2124 A_UINT32 BE_Minfree;
2125 A_UINT32 VI_Minfree;
2126 A_UINT32 VO_Minfree;
2127
2128 /**
2129 * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
2130 * descriptor memory allocation.
2131 * 1 - Allocate fragment descriptor memory for data packet in firmware.
2132 * If host wants to transmit data packet at its desired rate,
2133 * this field must be set.
2134 * 0 - Don't allocate fragment descriptor for data packet.
2135 */
2136 A_UINT32 alloc_frag_desc_for_data_pkt;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002137} wmi_resource_config;
2138
Manikandan Mohan30728082015-12-09 12:35:24 -08002139#define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
2140 do { \
2141 (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
2142 (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
2143 WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
2144 } while (0)
2145#define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
2146 (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
2147 WMI_RSRC_CFG_FLAG_ ## flag ## _S)
2148
2149#define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
2150 WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
2151#define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
2152 WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
2153
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002154#define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
2155 WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
2156#define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
2157 WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
2158
2159#define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
2160 WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
2161#define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
2162 WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
2163
2164#define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
2165 WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
2166#define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
2167 WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
2168
2169#define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
2170 WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
2171#define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
2172 WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
2173
2174#define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
2175 WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
2176#define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
2177 WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
2178
2179#define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
2180 WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
2181#define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
2182 WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
2183
2184#define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
2185 WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
2186#define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
2187 WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
2188
2189#define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
2190 WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
2191#define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
2192 WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
2193
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002194typedef struct {
2195 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
2196
2197 /** The following indicate the WMI versions to be supported by
2198 * the host driver. Note that the host driver decide to
2199 * "downgrade" its WMI version support and this may not be the
2200 * native version of the host driver. */
2201 wmi_abi_version host_abi_vers;
2202
2203 A_UINT32 num_host_mem_chunks;
2204 /** size of array host_mem_chunks[] */
2205 /* The TLVs for resource_config and host_mem_chunks[] will follow.
2206 * wmi_resource_config resource_config;
2207 * wlan_host_memory_chunk host_mem_chunks[];
2208 */
2209
2210} wmi_init_cmd_fixed_param;
2211
2212/**
2213 * TLV for channel list
2214 */
2215typedef struct {
2216 /** WMI_CHAN_LIST_TAG */
2217 A_UINT32 tag;
2218 /** # of channels to scan */
2219 A_UINT32 num_chan;
2220 /** channels in Mhz */
2221 A_UINT32 channel_list[1];
2222} wmi_chan_list;
2223
2224/**
2225 * TLV for bssid list
2226 */
2227typedef struct {
2228 /** WMI_BSSID_LIST_TAG */
2229 A_UINT32 tag;
2230 /** number of bssids */
2231 A_UINT32 num_bssid;
2232 /** bssid list */
2233 wmi_mac_addr bssid_list[1];
2234} wmi_bssid_list;
2235
2236/**
2237 * TLV for ie data.
2238 */
2239typedef struct {
2240 /** WMI_IE_TAG */
2241 A_UINT32 tag;
2242 /** number of bytes in ie data */
2243 A_UINT32 ie_len;
2244 /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4 ) */
2245 A_UINT32 ie_data[1];
2246} wmi_ie_data;
2247
2248typedef struct {
2249 /** Len of the SSID */
2250 A_UINT32 ssid_len;
2251 /** SSID */
2252 A_UINT32 ssid[8];
2253} wmi_ssid;
2254
2255typedef struct {
2256 /** WMI_SSID_LIST_TAG */
2257 A_UINT32 tag;
2258 A_UINT32 num_ssids;
2259 wmi_ssid ssids[1];
2260} wmi_ssid_list;
2261
2262/* prefix used by scan requestor ids on the host */
2263#define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
2264/* prefix used by scan request ids generated on the host */
2265/* host cycles through the lower 12 bits to generate ids */
2266#define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
2267
2268#define WLAN_SCAN_PARAMS_MAX_SSID 16
2269#define WLAN_SCAN_PARAMS_MAX_BSSID 4
2270#define WLAN_SCAN_PARAMS_MAX_IE_LEN 512
2271
2272typedef struct {
2273 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
2274 /** Scan ID */
2275 A_UINT32 scan_id;
2276 /** Scan requestor ID */
2277 A_UINT32 scan_req_id;
2278 /** VDEV id(interface) that is requesting scan */
2279 A_UINT32 vdev_id;
2280 /** Scan Priority, input to scan scheduler */
2281 A_UINT32 scan_priority;
2282 /** Scan events subscription */
2283 A_UINT32 notify_scan_events;
2284 /** dwell time in msec on active channels */
2285 A_UINT32 dwell_time_active;
2286 /** dwell time in msec on passive channels */
2287 A_UINT32 dwell_time_passive;
2288 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
2289 A_UINT32 min_rest_time;
2290 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
2291 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
2292 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
2293 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
2294 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
2295 * irrespective of activity. activity is determined by the idle_time parameter.
2296 */
2297 A_UINT32 max_rest_time;
2298 /** time before sending next set of probe requests.
2299 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
2300 * The number of probe requests specified depends on the ssid_list and bssid_list
2301 */
2302 A_UINT32 repeat_probe_time;
2303 /** time in msec between 2 consequetive probe requests with in a set. */
2304 A_UINT32 probe_spacing_time;
2305 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
2306 A_UINT32 idle_time;
2307 /** maximum time in msec allowed for scan */
2308 A_UINT32 max_scan_time;
2309 /** delay in msec before sending first probe request after switching to a channel */
2310 A_UINT32 probe_delay;
2311 /** Scan control flags */
2312 A_UINT32 scan_ctrl_flags;
2313 /** Burst duration time in msec*/
2314 A_UINT32 burst_duration;
2315
2316 /** # if channels to scan. In the TLV channel_list[] */
2317 A_UINT32 num_chan;
2318 /** number of bssids. In the TLV bssid_list[] */
2319 A_UINT32 num_bssid;
2320 /** number of ssid. In the TLV ssid_list[] */
2321 A_UINT32 num_ssids;
2322 /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
2323 A_UINT32 ie_len;
2324 /** Max number of probes to be sent */
2325 A_UINT32 n_probes;
2326
2327 /**
2328 * TLV (tag length value ) parameters follow the scan_cmd
2329 * structure. The TLV's are:
2330 * A_UINT32 channel_list[];
2331 * wmi_ssid ssid_list[];
2332 * wmi_mac_addr bssid_list[];
2333 * A_UINT8 ie_data[];
2334 */
2335} wmi_start_scan_cmd_fixed_param;
2336
2337/**
2338 * scan control flags.
2339 */
2340
2341/** passively scan all channels including active channels */
2342#define WMI_SCAN_FLAG_PASSIVE 0x1
2343/** add wild card ssid probe request even though ssid_list is specified. */
2344#define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
2345/** add cck rates to rates/xrate ie for the generated probe request */
2346#define WMI_SCAN_ADD_CCK_RATES 0x4
2347/** add ofdm rates to rates/xrate ie for the generated probe request */
2348#define WMI_SCAN_ADD_OFDM_RATES 0x8
2349/** To enable indication of Chan load and Noise floor to host */
2350#define WMI_SCAN_CHAN_STAT_EVENT 0x10
2351/** Filter Probe request frames */
2352#define WMI_SCAN_FILTER_PROBE_REQ 0x20
2353/**When set, not to scan DFS channels*/
2354#define WMI_SCAN_BYPASS_DFS_CHN 0x40
2355/**When set, certain errors are ignored and scan continues.
2356 * Different FW scan engine may use its own logic to decide what errors to ignore*/
2357#define WMI_SCAN_CONTINUE_ON_ERROR 0x80
2358/** Enable promiscous mode for ese */
2359#define WMI_SCAN_FILTER_PROMISCOUS 0x100
2360/** allow to send probe req on DFS channel */
2361#define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
2362/** add TPC content in probe req frame */
2363#define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400
2364/** add DS content in probe req frame */
2365#define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800
2366/** use random mac address for TA for probe request frame and add
2367 * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
2368 * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/
2369#define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000
Govind Singh32cced32016-02-01 13:33:09 +05302370/** allow mgmt transmission during off channel scan */
2371#define WMI_SCAN_OFFCHAN_MGMT_TX 0x2000
2372/** allow data transmission during off channel scan */
2373#define WMI_SCAN_OFFCHAN_DATA_TX 0x4000
2374/** allow capture ppdu with phy errrors */
2375#define WMI_SCAN_CAPTURE_PHY_ERROR 0x8000
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002376
2377/** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
2378#define WMI_SCAN_CLASS_MASK 0xFF000000
2379
2380/*
2381 * Masks identifying types/ID of scans
2382 * Scan_Stop macros should be the same value as below defined in UMAC
2383 * #define IEEE80211_SPECIFIC_SCAN 0x00000000
2384 * #define IEEE80211_VAP_SCAN 0x01000000
2385 * #define IEEE80211_ALL_SCANS 0x04000000
2386 */
2387#define WMI_SCAN_STOP_ONE 0x00000000
2388#define WMI_SCN_STOP_VAP_ALL 0x01000000
2389#define WMI_SCAN_STOP_ALL 0x04000000
2390
2391typedef struct {
2392 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
2393 /** requestor requesting cancel */
2394 A_UINT32 requestor;
2395 /** Scan ID */
2396 A_UINT32 scan_id;
2397 /**
2398 * Req Type
2399 * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
2400 * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
2401 * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
2402 * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
2403 */
2404 A_UINT32 req_type;
2405 /**
2406 * vDev ID
2407 * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
2408 */
2409 A_UINT32 vdev_id;
2410} wmi_stop_scan_cmd_fixed_param;
2411
2412#define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */
2413#define APPEND_TO_EXISTING_CHAN_LIST 1
2414
2415typedef struct {
2416 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
2417 A_UINT32 num_scan_chans;
2418 /** no of elements in chan_info[] */
2419 A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
2420 /** Followed by the variable length TLV chan_info:
2421 * wmi_channel chan_info[] */
2422} wmi_scan_chan_list_cmd_fixed_param;
2423
2424/*
2425 * Priority numbers must be sequential, starting with 0.
2426 */
2427/* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
2428typedef enum {
2429 WMI_SCAN_PRIORITY_VERY_LOW = 0,
2430 WMI_SCAN_PRIORITY_LOW,
2431 WMI_SCAN_PRIORITY_MEDIUM,
2432 WMI_SCAN_PRIORITY_HIGH,
2433 WMI_SCAN_PRIORITY_VERY_HIGH,
2434
2435 WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
2436} wmi_scan_priority;
2437
2438/* Five Levels for Requested Priority */
2439/* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */
2440typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
2441
2442/**
2443 * 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
2444 * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
2445 * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
2446 */
2447typedef struct {
2448 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
2449 /**
2450 * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
2451 * 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
2452 */
2453 A_UINT32 vdev_type;
2454 /**
2455 * number of rows in mapping_table for a specific vdev
2456 * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
2457 */
2458 A_UINT32 number_rows;
2459 /** mapping_table for a specific vdev follows this TLV
2460 * WLAN_PRIORITY_MAPPING mapping_table[]; */
2461} wmi_scan_sch_priority_table_cmd_fixed_param;
2462
2463/** update flags */
2464#define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1
2465#define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2
2466#define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4
2467
2468typedef struct {
2469 A_UINT32 tlv_header;
2470 /** requestor requesting update scan request */
2471 A_UINT32 requestor;
2472 /** Scan ID of the scan request that need to be update */
2473 A_UINT32 scan_id;
2474 /** update flags, indicating which of the following fields are valid and need to be updated*/
2475 A_UINT32 scan_update_flags;
2476 /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
2477 A_UINT32 scan_priority;
2478 /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
2479 A_UINT32 min_rest_time;
2480 /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
2481 A_UINT32 max_rest_time;
2482} wmi_scan_update_request_cmd_fixed_param;
2483
2484typedef struct {
2485 A_UINT32 tlv_header;
2486 /** oui to be used in probe request frame when random mac addresss is
2487 * requested part of scan parameters. this is applied to both FW internal scans and
2488 * host initated scans. host can request for random mac address with
2489 * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */
2490 A_UINT32 prob_req_oui;
2491} wmi_scan_prob_req_oui_cmd_fixed_param;
2492
2493enum wmi_scan_event_type {
2494 WMI_SCAN_EVENT_STARTED = 0x1,
2495 WMI_SCAN_EVENT_COMPLETED = 0x2,
2496 WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
2497 WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
2498 WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
2499 WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
2500 WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
Manikandan Mohan46b95c02015-12-09 12:23:08 -08002501 WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
2502 WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002503 WMI_SCAN_EVENT_MAX = 0x8000
2504};
2505
2506enum wmi_scan_completion_reason {
2507 /** scan related events */
2508 WMI_SCAN_REASON_NONE = 0xFF,
2509 WMI_SCAN_REASON_COMPLETED = 0,
2510 WMI_SCAN_REASON_CANCELLED = 1,
2511 WMI_SCAN_REASON_PREEMPTED = 2,
2512 WMI_SCAN_REASON_TIMEDOUT = 3,
2513 WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
2514 WMI_SCAN_REASON_MAX,
2515};
2516
2517typedef struct {
2518 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
2519 /** scan event (wmi_scan_event_type) */
2520 A_UINT32 event;
2521 /** status of the scan completion event */
2522 A_UINT32 reason;
2523 /** channel freq , only valid for FOREIGN channel event*/
2524 A_UINT32 channel_freq;
2525 /**id of the requestor whose scan is in progress */
2526 A_UINT32 requestor;
2527 /**id of the scan that is in progress */
2528 A_UINT32 scan_id;
2529 /**id of VDEV that requested the scan */
2530 A_UINT32 vdev_id;
2531} wmi_scan_event_fixed_param;
2532
2533/* WMI Diag event */
2534typedef struct {
2535 A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
2536 A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
2537 A_UINT32 count; /* Number of diag frames added to current event */
2538 A_UINT32 dropped;
2539 /* followed by WMITLV_TAG_ARRAY_BYTE */
2540} wmi_diag_event_fixed_param;
2541
2542/*
2543 * If FW has multiple active channels due to MCC(multi channel concurrency),
2544 * then these stats are combined stats for all the active channels.
2545 */
2546typedef struct {
2547 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
2548 /** ack count, it is an incremental number, not accumulated number */
2549 A_UINT32 ackRcvBad;
2550 /** bad rts count, it is an incremental number, not accumulated number */
2551 A_UINT32 rtsBad;
2552 /** good rts, it is an incremental number, not accumulated number */
2553 A_UINT32 rtsGood;
2554 /** fcs count, it is an incremental number, not accumulated number */
2555 A_UINT32 fcsBad;
2556 /** beacon count, it is an incremental number, not accumulated number */
2557 A_UINT32 noBeacons;
2558} wmi_update_whal_mib_stats_event_fixed_param;
2559
2560/*
2561 * This defines how much headroom is kept in the
2562 * receive frame between the descriptor and the
2563 * payload, in order for the WMI PHY error and
2564 * management handler to insert header contents.
2565 *
2566 * This is in bytes.
2567 */
2568#define WMI_MGMT_RX_HDR_HEADROOM sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr)
2569
2570/** This event will be used for sending scan results
2571 * as well as rx mgmt frames to the host. The rx buffer
2572 * will be sent as part of this WMI event. It would be a
2573 * good idea to pass all the fields in the RX status
2574 * descriptor up to the host.
2575 */
2576/* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
2577#define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
2578
2579/** flag indicating that the the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
2580#define WMI_MGMT_RX_HDR_EXTSCAN 0x01
2581
2582/**
2583 * flag indicating that the the mgmt frame (probe req/beacon) is received in
2584 * the context of matched network by FW ENLO
2585 */
2586#define WMI_MGMT_RX_HDR_ENLO 0x02
2587
2588typedef struct {
2589 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
2590 /** channel on which this frame is received. */
2591 A_UINT32 channel;
2592 /** snr information used to cal rssi */
2593 A_UINT32 snr;
2594 /** Rate kbps */
2595 A_UINT32 rate;
2596 /** rx phy mode WLAN_PHY_MODE */
2597 A_UINT32 phy_mode;
2598 /** length of the frame */
2599 A_UINT32 buf_len;
2600 /** rx status */
2601 A_UINT32 status;
2602 /** RSSI of PRI 20MHz for each chain. */
2603 A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
2604 /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
2605 A_UINT32 flags;
2606 /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
2607 A_INT32 rssi;
2608
2609 /** delta between local TSF(TSF timestamp when frame was RXd)
2610 * and remote TSF(TSF timestamp in the IE for mgmt frame
2611 * beacon,proberesp for e.g). If remote TSF is not available,
2612 * delta set to 0.
2613 * Although tsf_delta is stored as A_UINT32, it can be negative,
2614 * and thus would need to be sign-extended if added to a value
2615 * larger than 32 bits.
2616 */
2617 A_UINT32 tsf_delta;
2618 /* This TLV is followed by array of bytes:
2619 * // management frame buffer
2620 * A_UINT8 bufp[];
2621 */
2622} wmi_mgmt_rx_hdr;
2623
2624/* WMI PHY Error RX */
2625
2626typedef struct {
2627 /** TSF timestamp */
2628 A_UINT32 tsf_timestamp;
2629
2630 /**
2631 * Current freq1, freq2
2632 *
2633 * [7:0]: freq1[lo]
2634 * [15:8] : freq1[hi]
2635 * [23:16]: freq2[lo]
2636 * [31:24]: freq2[hi]
2637 */
2638 A_UINT32 freq_info_1;
2639
2640 /**
2641 * Combined RSSI over all chains and channel width for this PHY error
2642 *
2643 * [7:0]: RSSI combined
2644 * [15:8]: Channel width (MHz)
2645 * [23:16]: PHY error code
2646 * [24:16]: reserved (future use)
2647 */
2648 A_UINT32 freq_info_2;
2649
2650 /**
2651 * RSSI on chain 0 through 3
2652 *
2653 * This is formatted the same as the PPDU_START RX descriptor
2654 * field:
2655 *
2656 * [7:0]: pri20
2657 * [15:8]: sec20
2658 * [23:16]: sec40
2659 * [31:24]: sec80
2660 */
2661 A_UINT32 rssi_chain0;
2662 A_UINT32 rssi_chain1;
2663 A_UINT32 rssi_chain2;
2664 A_UINT32 rssi_chain3;
2665
2666 /**
2667 * Last calibrated NF value for chain 0 through 3
2668 *
2669 * nf_list_1:
2670 *
2671 * + [15:0] - chain 0
2672 * + [31:16] - chain 1
2673 *
2674 * nf_list_2:
2675 *
2676 * + [15:0] - chain 2
2677 * + [31:16] - chain 3
2678 */
2679 A_UINT32 nf_list_1;
2680 A_UINT32 nf_list_2;
2681
2682 /** Length of the frame */
2683 A_UINT32 buf_len;
2684} wmi_single_phyerr_rx_hdr;
2685
2686#define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff
2687#define WMI_UNIFIED_FREQINFO_1_LO_S 0
2688#define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00
2689#define WMI_UNIFIED_FREQINFO_1_HI_S 8
2690#define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000
2691#define WMI_UNIFIED_FREQINFO_2_LO_S 16
2692#define WMI_UNIFIED_FREQINFO_2_HI 0xff000000
2693#define WMI_UNIFIED_FREQINFO_2_HI_S 24
2694
2695/*
2696 * Please keep in mind that these _SET macros break macro side effect
2697 * assumptions; don't be clever with them.
2698 */
2699#define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05302700 (WMI_F_MS((hdr)->freq_info_1, \
2701 WMI_UNIFIED_FREQINFO_ ## f ## _LO) \
2702 | (WMI_F_MS((hdr)->freq_info_1, \
2703 WMI_UNIFIED_FREQINFO_ ## f ## _HI) << 8))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002704
2705#define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \
2706 do { \
2707 WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \
2708 WMI_UNIFIED_FREQINFO_ ## f ## _LO); \
2709 WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \
2710 WMI_UNIFIED_FREQINFO_ ## f ## _HI); \
2711 } while (0)
2712
2713#define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff
2714#define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0
2715#define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00
2716#define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8
2717#define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000
2718#define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
2719
2720#define WMI_UNIFIED_RSSI_COMB_GET(hdr) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05302721 ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002722 WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
2723
2724#define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \
2725 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
2726 WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
2727
2728#define WMI_UNIFIED_CHWIDTH_GET(hdr) \
2729 WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
2730
2731#define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \
2732 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
2733 WMI_UNIFIED_FREQINFO_2_CHWIDTH);
2734
2735#define WMI_UNIFIED_PHYERRCODE_GET(hdr) \
2736 WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
2737
2738#define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \
2739 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
2740 WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
2741
2742#define WMI_UNIFIED_CHAIN_0 0x0000ffff
2743#define WMI_UNIFIED_CHAIN_0_S 0
2744#define WMI_UNIFIED_CHAIN_1 0xffff0000
2745#define WMI_UNIFIED_CHAIN_1_S 16
2746#define WMI_UNIFIED_CHAIN_2 0x0000ffff
2747#define WMI_UNIFIED_CHAIN_2_S 0
2748#define WMI_UNIFIED_CHAIN_3 0xffff0000
2749#define WMI_UNIFIED_CHAIN_3_S 16
2750
2751#define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1
2752#define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1
2753#define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2
2754#define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2
2755
2756#define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \
2757 ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, \
2758 WMI_UNIFIED_CHAIN_ ## c)))
2759
2760#define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \
2761 WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, (nf) & 0xffff, \
2762 WMI_UNIFIED_CHAIN_ ## c);
2763
2764/*
2765 * For now, this matches what the underlying hardware is doing.
2766 * Update ar6000ProcRxDesc() to use these macros when populating
2767 * the rx descriptor and then we can just copy the field over
2768 * to the WMI PHY notification without worrying about breaking
2769 * things.
2770 */
2771#define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff
2772#define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0
2773#define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00
2774#define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8
2775#define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000
2776#define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16
2777#define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000
2778#define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24
2779
2780#define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \
2781 WMI_F_RMW((hdr)->rssi_chain ## c, (rssi) & 0xff, \
2782 WMI_UNIFIED_RSSI_CHAN_ ## ch);
2783
2784#define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \
2785 ((int8_t) (WMI_F_MS((hdr)->rssi_chain ## c, \
2786 WMI_UNIFIED_RSSI_CHAN_ ## ch)))
2787
2788typedef struct {
2789 /** Phy error event header */
2790 wmi_single_phyerr_rx_hdr hdr;
2791 /** frame buffer */
2792 A_UINT8 bufp[1];
2793} wmi_single_phyerr_rx_event;
2794
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08002795/* PHY ERROR MASK 0 */
2796/* bits 1:0 defined but not published */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05302797#define WMI_PHY_ERROR_MASK0_RADAR (1<<2)
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08002798/* bits 23:3 defined but not published */
2799#define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1<<24)
2800/* bits 25:24 defined but not published */
2801#define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1<<26)
2802/* bits 31:27 defined but not published */
2803
2804/* PHY ERROR MASK 1
2805 * bits 13:0 defined but not published
2806 * bits 31:14 reserved
2807 */
2808
2809/* PHY ERROR MASK 2
2810 * bits 31:0 reserved
2811 */
2812
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002813typedef struct {
2814 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr */
2815 /** Phy error phy error count */
2816 A_UINT32 num_phyerr_events;
2817 A_UINT32 tsf_l32;
2818 A_UINT32 tsf_u32;
2819 A_UINT32 buf_len;
2820 A_UINT32 pmac_id;
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08002821 A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
2822 A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
2823 A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
2824
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002825 /* This TLV is followed by array of bytes:
2826 * // frame buffer - contains multiple payloads in the order:
2827 * // header - payload, header - payload...
2828 * (The header is of type: wmi_single_phyerr_rx_hdr)
2829 * A_UINT8 bufp[];
2830 */
2831} wmi_comb_phyerr_rx_hdr;
2832
2833/* WMI MGMT TX */
2834typedef struct {
2835 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
2836 /** unique id identifying the VDEV, generated by the caller */
2837 A_UINT32 vdev_id;
2838 /** peer MAC address */
2839 wmi_mac_addr peer_macaddr;
2840 /** xmit rate */
2841 A_UINT32 tx_rate;
2842 /** xmit power */
2843 A_UINT32 tx_power;
2844 /** Buffer length in bytes */
2845 A_UINT32 buf_len;
2846 /* This TLV is followed by array of bytes:
2847 * // management frame buffer
2848 * A_UINT8 bufp[];
2849 */
2850} wmi_mgmt_tx_hdr;
2851
2852typedef struct {
2853 /*
2854 * TLV tag and len;
2855 * tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param
2856 */
2857 A_UINT32 tlv_header;
2858 A_UINT32 vdev_id;
2859 /* echoed in tx_compl_event */
2860 A_UINT32 desc_id;
2861 /* MHz units */
2862 A_UINT32 chanfreq;
2863 A_UINT32 paddr_lo;
2864 A_UINT32 paddr_hi;
2865 A_UINT32 frame_len;
2866 /* Buffer length in bytes */
2867 A_UINT32 buf_len;
2868 /*
2869 * This TLV is followed by array of bytes:
2870 * First 64 bytes of management frame
2871 * A_UINT8 bufp[];
2872 */
2873} wmi_mgmt_tx_send_cmd_fixed_param;
2874
2875typedef struct {
2876 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
2877 A_UINT32 value;
2878} wmi_echo_event_fixed_param;
2879
2880typedef struct {
2881 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
2882 A_UINT32 value;
2883} wmi_echo_cmd_fixed_param;
2884
2885typedef struct {
2886 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param */
2887
2888 A_UINT32 reserved0;
2889 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
2890 /** reg domain code */
2891 A_UINT32 reg_domain;
2892 A_UINT32 reg_domain_2G;
2893 A_UINT32 reg_domain_5G;
2894 A_UINT32 conformance_test_limit_2G;
2895 A_UINT32 conformance_test_limit_5G;
Govind Singh32cced32016-02-01 13:33:09 +05302896 A_UINT32 dfs_domain;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002897} wmi_pdev_set_regdomain_cmd_fixed_param;
2898
2899typedef struct {
2900 /** true for scan start and flase for scan end */
2901 A_UINT32 scan_start;
2902} wmi_pdev_scan_cmd;
2903
Govind Singhc7d51942016-02-01 12:09:31 +05302904/* WMI support for setting ratemask in target */
2905
2906typedef struct {
2907 A_UINT32 tlv_header;
2908 /*
2909 * TLV tag and len; tag equals
2910 * WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param
2911 */
2912 A_UINT32 vdev_id;
2913 /*
2914 * 0 - cck/ofdm
2915 * 1 - HT
2916 * 2 - VHT */
2917 A_UINT32 type;
2918
2919 A_UINT32 mask_lower32;
2920 A_UINT32 mask_higher32;
2921} wmi_vdev_config_ratemask_cmd_fixed_param;
2922
2923/* nrp action - Filter Neighbor Rx Packets - add/remove filter */
2924enum {
2925 WMI_FILTER_NRP_ACTION_ADD = 0x1,
2926 WMI_FILTER_NRP_ACTION_REMOVE = 0x2,
2927 WMI_FILTER_NRP_ACTION_GET_LIST = 0x3,
2928}; /* nrp - Neighbor Rx Packets */
2929
2930/* nrp type - Filter Neighbor Rx Packets - ap/client addr */
2931enum {
2932 WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1,
2933 WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2,
2934};
2935
2936/* nrp flag - Filter Neighbor Rx Packets
2937 * (capture flag, 2 & 3 not initially supported)
2938 */
2939enum {
2940 WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1,
2941 WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2,
2942 WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3,
2943};
2944
2945/* Filter for Neighbor Rx Packets */
2946typedef struct {
2947 A_UINT32 tlv_header;
2948 /*
2949 * TLV tag and len; tag equals
2950 * WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param
2951 */
2952 A_UINT32 vdev_id;
2953 /* AP Bssid or Client Mac-addr */
2954 wmi_mac_addr addr;
2955 /* Add/Remove NRF Filter */
2956 A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
2957 /* client/ap filter */
2958 A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
2959 /* optional - tx/rx capture */
2960 A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
2961 /* BSSID index - index of the BSSID register */
2962 A_UINT32 bssid_idx;
2963} wmi_vdev_filter_nrp_config_cmd_fixed_param;
2964
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002965/*Command to set/unset chip in quiet mode*/
2966typedef struct {
2967 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param */
2968 A_UINT32 reserved0;
2969 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
2970 A_UINT32 period; /*period in TUs */
2971 A_UINT32 duration; /*duration in TUs */
2972 A_UINT32 next_start; /*offset in TUs */
2973 A_UINT32 enabled; /*enable/disable */
2974} wmi_pdev_set_quiet_cmd_fixed_param;
2975
2976/*
2977 * Command to enable/disable Green AP Power Save.
2978 * This helps conserve power during AP operation. When the AP has no
2979 * stations associated with it, the host can enable Green AP Power Save
2980 * to request the firmware to shut down all but one transmit and receive
2981 * chains.
2982 */
2983typedef struct {
2984 A_UINT32 tlv_header;
2985 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param */
2986 A_UINT32 reserved0;
2987 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
2988 A_UINT32 enable; /*1:enable, 0:disable */
2989} wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
2990
2991#define MAX_HT_IE_LEN 32
2992typedef struct {
2993 A_UINT32 tlv_header;
2994 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
2995 A_UINT32 reserved0;
2996 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
2997 A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
2998 A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
2999 A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
3000 /** The TLV for the HT IE follows:
3001 * A_UINT32 ie_data[];
3002 */
3003} wmi_pdev_set_ht_ie_cmd_fixed_param;
3004
3005#define MAX_VHT_IE_LEN 32
3006typedef struct {
3007 A_UINT32 tlv_header;
3008 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
3009 A_UINT32 reserved0;
3010 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3011 A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
3012 A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
3013 A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
3014 /** The TLV for the VHT IE follows:
3015 * A_UINT32 ie_data[];
3016 */
3017} wmi_pdev_set_vht_ie_cmd_fixed_param;
3018
3019typedef struct {
3020 A_UINT32 tlv_header;
3021 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param */
3022 A_UINT32 reserved0;
3023 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3024 wmi_mac_addr base_macaddr;
3025} wmi_pdev_set_base_macaddr_cmd_fixed_param;
3026
3027/*
3028 * For now, the spectral configuration is global rather than
3029 * per-vdev. The vdev is a placeholder and will be ignored
3030 * by the firmware.
3031 */
3032typedef struct {
3033 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
3034 A_UINT32 vdev_id;
3035 A_UINT32 spectral_scan_count;
3036 A_UINT32 spectral_scan_period;
3037 A_UINT32 spectral_scan_priority;
3038 A_UINT32 spectral_scan_fft_size;
3039 A_UINT32 spectral_scan_gc_ena;
3040 A_UINT32 spectral_scan_restart_ena;
3041 A_UINT32 spectral_scan_noise_floor_ref;
3042 A_UINT32 spectral_scan_init_delay;
3043 A_UINT32 spectral_scan_nb_tone_thr;
3044 A_UINT32 spectral_scan_str_bin_thr;
3045 A_UINT32 spectral_scan_wb_rpt_mode;
3046 A_UINT32 spectral_scan_rssi_rpt_mode;
3047 A_UINT32 spectral_scan_rssi_thr;
3048 A_UINT32 spectral_scan_pwr_format;
3049 A_UINT32 spectral_scan_rpt_mode;
3050 A_UINT32 spectral_scan_bin_scale;
3051 A_UINT32 spectral_scan_dBm_adj;
3052 A_UINT32 spectral_scan_chn_mask;
3053} wmi_vdev_spectral_configure_cmd_fixed_param;
3054
3055/*
3056 * Enabling, disabling and triggering the spectral scan
3057 * is a per-vdev operation. That is, it will set channel
3058 * flags per vdev rather than globally; so concurrent scan/run
3059 * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
3060 */
3061typedef struct {
3062 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
3063 A_UINT32 vdev_id;
3064 /* 0 - ignore; 1 - trigger, 2 - clear trigger */
3065 A_UINT32 trigger_cmd;
3066 /* 0 - ignore; 1 - enable, 2 - disable */
3067 A_UINT32 enable_cmd;
3068} wmi_vdev_spectral_enable_cmd_fixed_param;
3069
3070typedef enum {
3071 WMI_CSA_IE_PRESENT = 0x00000001,
3072 WMI_XCSA_IE_PRESENT = 0x00000002,
3073 WMI_WBW_IE_PRESENT = 0x00000004,
3074 WMI_CSWARP_IE_PRESENT = 0x00000008,
3075} WMI_CSA_EVENT_IES_PRESENT_FLAG;
3076
3077/* wmi CSA receive event from beacon frame */
3078typedef struct {
3079 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
3080 A_UINT32 i_fc_dur;
3081/* Bit 0-15: FC */
3082/* Bit 16-31: DUR */
3083 wmi_mac_addr i_addr1;
3084 wmi_mac_addr i_addr2;
3085 /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
3086 * changed in the future without breaking WMI compatibility */
3087 A_UINT32 csa_ie[2];
3088 A_UINT32 xcsa_ie[2];
3089 A_UINT32 wb_ie[2];
3090 A_UINT32 cswarp_ie;
3091 A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
3092} wmi_csa_event_fixed_param;
3093
3094typedef enum {
Govind Singh32cced32016-02-01 13:33:09 +05303095 WAL_PEER_MCAST2UCAST_DISABLED = 0,
3096 /* Drop the frames if match is not found */
3097 WAL_PEER_MCAST2UCAST_DROP_EMPTY = 1,
3098 /* Send as mcast if match is not found */
3099 WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2,
3100} WMI_PEER_MCAST2UCAST_MODE;
3101
3102typedef enum {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003103 /** TX chain mask */
3104 WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
3105 /** RX chain mask */
3106 WMI_PDEV_PARAM_RX_CHAIN_MASK,
3107 /** TX power limit for 2G Radio */
3108 WMI_PDEV_PARAM_TXPOWER_LIMIT2G,
3109 /** TX power limit for 5G Radio */
3110 WMI_PDEV_PARAM_TXPOWER_LIMIT5G,
3111 /** TX power scale */
3112 WMI_PDEV_PARAM_TXPOWER_SCALE,
3113 /** Beacon generation mode . 0: host, 1: target */
3114 WMI_PDEV_PARAM_BEACON_GEN_MODE,
3115 /** Beacon generation mode . 0: staggered 1: bursted */
3116 WMI_PDEV_PARAM_BEACON_TX_MODE,
3117 /** Resource manager off chan mode .
3118 * 0: turn off off chan mode. 1: turn on offchan mode
3119 */
3120 WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
3121 /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */
3122 WMI_PDEV_PARAM_PROTECTION_MODE,
3123 /** Dynamic bandwidth 0: disable 1: enable */
3124 WMI_PDEV_PARAM_DYNAMIC_BW,
3125 /** Non aggregrate/ 11g sw retry threshold.0-disable */
3126 WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
3127 /** aggregrate sw retry threshold. 0-disable*/
3128 WMI_PDEV_PARAM_AGG_SW_RETRY_TH,
3129 /** Station kickout threshold (non of consecutive failures).0-disable */
3130 WMI_PDEV_PARAM_STA_KICKOUT_TH,
3131 /** Aggerate size scaling configuration per AC */
3132 WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING,
3133 /** LTR enable */
3134 WMI_PDEV_PARAM_LTR_ENABLE,
3135 /** LTR latency for BE, in us */
3136 WMI_PDEV_PARAM_LTR_AC_LATENCY_BE,
3137 /** LTR latency for BK, in us */
3138 WMI_PDEV_PARAM_LTR_AC_LATENCY_BK,
3139 /** LTR latency for VI, in us */
3140 WMI_PDEV_PARAM_LTR_AC_LATENCY_VI,
3141 /** LTR latency for VO, in us */
3142 WMI_PDEV_PARAM_LTR_AC_LATENCY_VO,
3143 /** LTR AC latency timeout, in ms */
3144 WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
3145 /** LTR platform latency override, in us */
3146 WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
3147 /** LTR-M override, in us */
3148 WMI_PDEV_PARAM_LTR_RX_OVERRIDE,
3149 /** Tx activity timeout for LTR, in us */
3150 WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
3151 /** L1SS state machine enable */
3152 WMI_PDEV_PARAM_L1SS_ENABLE,
3153 /** Deep sleep state machine enable */
3154 WMI_PDEV_PARAM_DSLEEP_ENABLE,
3155 /** RX buffering flush enable */
3156 WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
3157 /** RX buffering matermark */
3158 WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
3159 /** RX buffering timeout enable */
3160 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
3161 /** RX buffering timeout value */
3162 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
3163 /** pdev level stats update period in ms */
3164 WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
3165 /** vdev level stats update period in ms */
3166 WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
3167 /** peer level stats update period in ms */
3168 WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
3169 /** beacon filter status update period */
3170 WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
3171 /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
3172 WMI_PDEV_PARAM_PMF_QOS,
3173 /** Access category on which ARP frames are sent */
3174 WMI_PDEV_PARAM_ARP_AC_OVERRIDE,
3175 /** DCS configuration */
3176 WMI_PDEV_PARAM_DCS,
3177 /** Enable/Disable ANI on target */
3178 WMI_PDEV_PARAM_ANI_ENABLE,
3179 /** configure the ANI polling period */
3180 WMI_PDEV_PARAM_ANI_POLL_PERIOD,
3181 /** configure the ANI listening period */
3182 WMI_PDEV_PARAM_ANI_LISTEN_PERIOD,
3183 /** configure OFDM immunity level */
3184 WMI_PDEV_PARAM_ANI_OFDM_LEVEL,
3185 /** configure CCK immunity level */
3186 WMI_PDEV_PARAM_ANI_CCK_LEVEL,
3187 /** Enable/Disable CDD for 1x1 STAs in rate control module */
3188 WMI_PDEV_PARAM_DYNTXCHAIN,
3189 /** Enable/Disable proxy STA */
3190 WMI_PDEV_PARAM_PROXY_STA,
3191 /** Enable/Disable low power state when all VDEVs are inactive/idle. */
3192 WMI_PDEV_PARAM_IDLE_PS_CONFIG,
3193 /** Enable/Disable power gating sleep */
3194 WMI_PDEV_PARAM_POWER_GATING_SLEEP,
3195 /** Enable/Disable Rfkill */
3196 WMI_PDEV_PARAM_RFKILL_ENABLE,
3197 /** Set Bursting DUR */
3198 WMI_PDEV_PARAM_BURST_DUR,
3199 /** Set Bursting ENABLE */
3200 WMI_PDEV_PARAM_BURST_ENABLE,
3201 /** HW rfkill config */
3202 WMI_PDEV_PARAM_HW_RFKILL_CONFIG,
3203 /** Enable radio low power features */
3204 WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE,
3205 /** L1SS entry and residency time track */
3206 WMI_PDEV_PARAM_L1SS_TRACK,
3207 /** set hyst at runtime, requirement from SS */
3208 WMI_PDEV_PARAM_HYST_EN,
3209 /** Enable/ Disable POWER COLLAPSE */
3210 WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE,
3211 /** configure LED system state */
3212 WMI_PDEV_PARAM_LED_SYS_STATE,
3213 /** Enable/Disable LED */
3214 WMI_PDEV_PARAM_LED_ENABLE,
3215 /** set DIRECT AUDIO time latency */
3216 WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY,
3217 /** set DIRECT AUDIO Feature ENABLE */
3218 WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE,
3219 /** pdev level whal mib stats update enable */
3220 WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE,
3221 /** ht/vht info based on vdev */
3222 WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD,
3223 /** Set CTS channel BW for dynamic BW adjustment feature */
3224 WMI_PDEV_PARAM_CTS_CBW,
3225 /** Set GPIO pin info used by WNTS */
3226 WMI_PDEV_PARAM_WNTS_CONFIG,
3227 /** Enable/Disable hardware adaptive early rx feature */
3228 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE,
3229 /** The minimum early rx duration, to ensure early rx duration is non-zero */
3230 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP,
3231 /** Increasing/decreasing step used by hardware */
3232 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP,
3233 /** The fixed early rx duration when adaptive early rx is disabled */
3234 WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP,
3235 /** Enable/Disable bmiss based adaptive beacon timeout feature */
3236 WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE,
3237 /*
3238 * The minimum beacon timeout duration, to ensure beacon timeout
3239 * duration is non-zero
3240 */
3241 WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT,
3242 /** Increasing/decreasing step used by hardware */
3243 WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP,
3244 /*
3245 * The fixed beacon timeout duration when bmiss based adaptive beacon
3246 * timeout is disabled
3247 */
3248 WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT,
3249 /*
3250 * Enable/Disable Congestion Estimator based adaptive beacon
3251 * timeout feature */
3252 WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE,
3253 /*
3254 * combo value of ce_id, ce_threshold, ce_time, refer
3255 * to WMI_CE_BTO_CE_ID_MASK
3256 */
3257 WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE,
3258 /** 2G TX chain mask */
3259 WMI_PDEV_PARAM_TX_CHAIN_MASK_2G,
3260 /** 2G RX chain mask */
3261 WMI_PDEV_PARAM_RX_CHAIN_MASK_2G,
3262 /** 5G TX chain mask */
3263 WMI_PDEV_PARAM_TX_CHAIN_MASK_5G,
3264 /** 5G RX chain mask */
3265 WMI_PDEV_PARAM_RX_CHAIN_MASK_5G,
3266 /* Set tx chain mask for CCK rates */
3267 WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK,
3268 /* Set tx chain mask for 1SS stream */
3269 WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS,
Nirav Shahe1e4a812015-11-05 11:15:54 +05303270 /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected*/
3271 WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG,
Nirav Shah47062ff2015-11-05 11:21:08 +05303272 /* TX power backoff in dB: tx power -= param value
3273 * Host passes values(DB) to Halphy, Halphy reduces the power table by
3274 * the values. Safety check will happen in Halphy
3275 */
3276 WMI_PDEV_PARAM_TXPOWER_DECR_DB,
Govind Singh32cced32016-02-01 13:33:09 +05303277 /** enable and disable aggregate burst along with duration */
3278 WMI_PDEV_PARAM_AGGR_BURST,
3279 /** Set the global RX decap mode */
3280 WMI_PDEV_PARAM_RX_DECAP_MODE,
3281 /** Enable/Disable Fast channel reset */
3282 WMI_PDEV_PARAM_FAST_CHANNEL_RESET,
3283 /** Default antenna for Smart antenna */
3284 WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA,
3285 /** Set the user-specified antenna gain */
3286 WMI_PDEV_PARAM_ANTENNA_GAIN,
3287 /** Set the user-specified RX filter */
3288 WMI_PDEV_PARAM_RX_FILTER,
3289 /*
3290 * configure the user-specified MCAST tid for managed mcast feature
3291 * 0-15 is the valid range. 0xff will clear the tid setting
3292 */
3293 WMI_PDEV_SET_MCAST_TO_UCAST_TID,
3294 /** Enable/Disable Proxy sta mode */
3295 WMI_PDEV_PARAM_PROXY_STA_MODE,
3296 /*
3297 * configure the mcast2ucast mode for the pdev->peer_mcast.
3298 * See WMI_PEER_MCAST2UCAST_MODE for possible values
3299 */
3300 WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE,
3301 /** Sets the Mcast buffers for cloning, to support Mcast enhancement */
3302 WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER,
3303 /** Remove the Mcast buffers added by host */
3304 WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER,
3305 /** En/disable station power save state indication */
3306 WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE,
3307 /** Access category on which ARP frames are sent */
3308 WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE,
3309 /** allow or disallow interbss frame forwarding */
3310 WMI_PDEV_PARAM_BLOCK_INTERBSS,
3311 /** Enable/Disable reset */
3312 WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID,
3313 /** Enable/Disable/Set MSDU_TTL in milliseconds. */
3314 WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID,
3315 /** Set global PPDU duration limit (usec). */
3316 WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID,
3317 /** set txbf sounding period of vap in milliseconds */
3318 WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID,
3319 /** Set promiscuous mode */
3320 WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID,
3321 /** Set burst mode */
3322 WMI_PDEV_PARAM_SET_BURST_MODE_CMDID,
3323 /** enable enhanced stats */
3324 WMI_PDEV_PARAM_EN_STATS,
3325 /** Set mu-grouping policy */
3326 WMI_PDEV_PARAM_MU_GROUP_POLICY,
3327 /** Channel Hopping Enable */
3328 WMI_PDEV_PARAM_NOISE_DETECTION,
3329 /** Set Channel Hopping NF threshold in dBm */
3330 WMI_PDEV_PARAM_NOISE_THRESHOLD,
3331 /** Set PAPRD policy */
3332 WMI_PDEV_PARAM_DPD_ENABLE,
3333 /** Enable/disable mcast/bcast echo, used by ProxySTA */
3334 WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO,
3335 /** ATF enable/disable strict schedule */
3336 WMI_PDEV_PARAM_ATF_STRICT_SCH,
3337 /** ATF set access category duration, B0-B29 duration, B30-B31: AC */
3338 WMI_PDEV_PARAM_ATF_SCHED_DURATION,
3339 /** Default antenna polarization */
3340 WMI_PDEV_PARAM_ANT_PLZN,
3341 /** Set mgmt retry limit */
3342 WMI_PDEV_PARAM_MGMT_RETRY_LIMIT,
3343 /** Set CCA sensitivity level in dBm */
3344 WMI_PDEV_PARAM_SENSITIVITY_LEVEL,
3345 /** Set 2G positive and negative Tx power in 0.5dBm units */
3346 WMI_PDEV_PARAM_SIGNED_TXPOWER_2G,
3347 /** Set 5G positive and negative Tx power in 0.5dBm units */
3348 WMI_PDEV_PARAM_SIGNED_TXPOWER_5G,
3349 /** Enable/disble AMSDU for tids */
3350 WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU,
3351 /** Enable/disable AMPDU for tids */
3352 WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU,
3353 /** Set CCA threshold in dBm */
3354 WMI_PDEV_PARAM_CCA_THRESHOLD,
3355 /** RTS Fixed rate setting */
3356 WMI_PDEV_PARAM_RTS_FIXED_RATE,
3357 /** Pdev reset */
3358 WMI_PDEV_PARAM_PDEV_RESET,
3359 /** wapi mbssid offset **/
3360 WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET,
3361 /** ARP DEBUG source address*/
3362 WMI_PDEV_PARAM_ARP_DBG_SRCADDR,
3363 /** ARP DEBUG destination address*/
3364 WMI_PDEV_PARAM_ARP_DBG_DSTADDR,
3365 /** ATF enable/disable obss noise scheduling */
3366 WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH,
3367 /** ATF obss noise scaling factor */
3368 WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR,
3369 /**
3370 * TX power reduction scaling exponent - final tx power is the
3371 * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by
3372 * 2^(scale exponent). For example:
3373 * If this scale exponent is 0, the power is unchanged (divided by 2^0)
3374 * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB
3375 * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB
3376 * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB
3377 */
3378 WMI_PDEV_PARAM_CUST_TXPOWER_SCALE,
3379 /** ATF enabe/disabe dynamically */
3380 WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE,
3381
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003382} WMI_PDEV_PARAM;
3383
3384typedef enum {
3385 /** Set the loglevel */
3386 WMI_DBGLOG_LOG_LEVEL = 0x1,
3387 /** Enable VAP level debug */
3388 WMI_DBGLOG_VAP_ENABLE,
3389 /** Disable VAP level debug */
3390 WMI_DBGLOG_VAP_DISABLE,
3391 /** Enable MODULE level debug */
3392 WMI_DBGLOG_MODULE_ENABLE,
3393 /** Disable MODULE level debug */
3394 WMI_DBGLOG_MODULE_DISABLE,
3395 /** Enable MODULE level debug */
3396 WMI_DBGLOG_MOD_LOG_LEVEL,
3397 /** set type of the debug output */
3398 WMI_DBGLOG_TYPE,
3399 /** Enable Disable debug */
3400 WMI_DBGLOG_REPORT_ENABLE
3401} WMI_DBG_PARAM;
3402
3403/* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
3404typedef enum {
3405 WMI_CTS_CBW_INVALID = 0,
3406 WMI_CTS_CBW_20,
3407 WMI_CTS_CBW_40,
3408 WMI_CTS_CBW_80,
3409 WMI_CTS_CBW_80_80,
3410 WMI_CTS_CBW_160,
3411} WMI_CTS_CBW;
3412
3413typedef struct {
3414 A_UINT32 tlv_header;
3415 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param */
3416 A_UINT32 reserved0;
3417 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3418 /** parameter id */
3419 A_UINT32 param_id;
3420 /** parametr value */
3421 A_UINT32 param_value;
3422} wmi_pdev_set_param_cmd_fixed_param;
3423
3424typedef struct {
3425 A_UINT32 tlv_header;
3426 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param */
3427 A_UINT32 reserved0;
3428 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3429 /** parameter */
3430 A_UINT32 param;
3431} wmi_pdev_get_tpc_config_cmd_fixed_param;
3432
3433#define WMI_FAST_DIVERSITY_BIT_OFFSET 0
3434#define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
3435
3436typedef struct {
3437 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param */
3438 A_UINT32 mac_id; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3439 /** parameter */
3440 A_UINT32 value; /** bit0 is for enable/disable FAST diversity, and bit1 is for enable/disable SLOW diversity, 0->disable, 1->enable */
3441} wmi_pdev_set_antenna_diversity_cmd_fixed_param;
3442
3443#define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
3444
3445typedef struct {
3446 /*
3447 * TLV tag and len; tag equals
3448 * WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param
3449 */
3450 A_UINT32 tlv_header;
3451 /* vdev_id, where RSSI monitoring will take place */
3452 A_UINT32 vdev_id;
3453 /*
3454 * host will configure request_id and firmware echo
3455 * this id in RSSI_BREACH_EVENT
3456 */
3457 A_UINT32 request_id;
3458 /*
3459 * bit [0-2] = low_rssi_breach_enabled[0-2]
3460 * enabled, bit [3-5] = hi_rssi_breach_enabled[0-2]
3461 */
3462 A_UINT32 enabled_bitmap;
3463 /* unit dBm. host driver to make sure [0] > [1] > [2] */
3464 A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED];
3465 /* unit dBm. host driver to make sure [0] < [1] < [2] */
3466 A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED];
3467 /*
3468 * unit dBm. once low rssi[] breached, same event
3469 * bitmap will be generated only after signal gets better
3470 * than this level. This value is adopted for all low_rssi_breach_threshold[3]
3471 */
3472 A_UINT32 lo_rssi_reenable_hysteresis;
3473 /*
3474 * unit dBm. once hi rssi[] breached, same event bitmap
3475 * will be generated only after signal gets worse than this
3476 * level. This value is adopted for all hi_rssi_breach_threshold[3]
3477 */
3478 A_UINT32 hi_rssi_reenable_histeresis;
3479 /*
3480 * After last event is generated, we wait
3481 * until this interval to generate next event
3482 */
3483 A_UINT32 min_report_interval;
3484 /* this is to suppress number of event to be generated */
3485 A_UINT32 max_num_report;
3486} wmi_rssi_breach_monitor_config_fixed_param;
3487
3488typedef struct {
3489 /** parameter */
3490 A_UINT32 param;
3491} wmi_pdev_dump_cmd;
3492
3493typedef enum {
3494 PAUSE_TYPE_CHOP = 0x1,
3495 /** for MCC (switch channel), only vdev_map is valid */
3496 PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */
3497 PAUSE_TYPE_UAPSD = 0x3,
3498 /** for uapsd, only peer_id and tid_map are valid. */
3499 PAUSE_TYPE_P2P_CLIENT_NOA = 0x4,
3500 /** only vdev_map is valid, actually only one vdev id is set at one time */
3501 PAUSE_TYPE_P2P_GO_PS = 0x5,
3502 /** only vdev_map is valid, actually only one vdev id is set at one time */
3503 PAUSE_TYPE_STA_ADD_BA = 0x6,
3504 /** only peer_id and tid_map are valid, actually only one tid is set at one time */
3505 PAUSE_TYPE_AP_PS = 0x7,
3506 /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
3507 PAUSE_TYPE_IBSS_PS = 0x8,
3508 /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
3509 PAUSE_TYPE_HOST = 0x15,
3510 /** host is requesting vdev pause */
3511} wmi_tx_pause_type;
3512
3513typedef enum {
3514 ACTION_PAUSE = 0x0,
3515 ACTION_UNPAUSE = 0x1,
3516} wmi_tx_pause_action;
3517
3518typedef struct {
3519 A_UINT32 tlv_header;
3520 A_UINT32 pause_type;
3521 A_UINT32 action;
3522 A_UINT32 vdev_map;
3523 A_UINT32 peer_id;
3524 A_UINT32 tid_map;
3525} wmi_tx_pause_event_fixed_param;
3526
3527typedef enum {
3528 WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
3529 WMI_MGMT_TX_COMP_TYPE_DISCARD,
3530 WMI_MGMT_TX_COMP_TYPE_INSPECT,
3531 WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
3532 WMI_MGMT_TX_COMP_TYPE_MAX,
3533} WMI_MGMT_TX_COMP_STATUS_TYPE;
3534
3535typedef struct {
3536 A_UINT32 tlv_header;
3537 A_UINT32 desc_id; /* from tx_send_cmd */
3538 A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */
3539} wmi_mgmt_tx_compl_event_fixed_param;
3540
3541#define WMI_TPC_RATE_MAX 160
3542/* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
3543#define WMI_TPC_TX_NUM_CHAIN 4
3544
3545typedef enum {
3546 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
3547 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
3548 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
3549} WMI_TPC_CONFIG_EVENT_FLAG;
3550
3551typedef struct {
3552 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param */
3553 A_UINT32 regDomain;
3554 A_UINT32 chanFreq;
3555 A_UINT32 phyMode;
3556 A_UINT32 twiceAntennaReduction;
3557 A_UINT32 twiceMaxRDPower;
3558 A_INT32 twiceAntennaGain;
3559 A_UINT32 powerLimit;
3560 A_UINT32 rateMax;
3561 A_UINT32 numTxChain;
3562 A_UINT32 ctl;
3563 A_UINT32 flags;
3564 /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
3565 A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
3566 A_INT8
3567 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN]
3568 [WMI_TPC_TX_NUM_CHAIN];
3569 A_INT8
3570 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN]
3571 [WMI_TPC_TX_NUM_CHAIN];
3572 A_INT8
3573 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN]
3574 [WMI_TPC_TX_NUM_CHAIN];
3575 /* This TLV is followed by a byte array:
3576 * A_UINT8 ratesArray[];
3577 */
3578} wmi_pdev_tpc_config_event_fixed_param;
3579
3580typedef struct {
3581 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */
3582 A_UINT32 periodCnt;
3583 A_UINT32 L1Cnt;
3584 A_UINT32 L11Cnt;
3585 A_UINT32 L12Cnt;
3586 A_UINT32 L1Entry;
3587 A_UINT32 L11Entry;
3588 A_UINT32 L12Entry;
3589} wmi_pdev_l1ss_track_event_fixed_param;
3590
3591typedef struct {
3592 A_UINT32 len;
3593 A_UINT32 msgref;
3594 A_UINT32 segmentInfo;
3595} wmi_pdev_seg_hdr_info;
3596
3597/*
3598 * Transmit power scale factor.
3599 *
3600 */
3601typedef enum {
3602 WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
3603 WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
3604 WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
3605 WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
3606 WMI_TP_SCALE_MIN = 4, /* min, but still on */
3607 WMI_TP_SCALE_SIZE = 5, /* max num of enum */
3608} WMI_TP_SCALE;
3609
3610#define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
3611
3612typedef struct {
3613 /** message buffer, NULL terminated */
3614 char bufp[WMI_MAX_DEBUG_MESG];
3615} wmi_debug_mesg_event;
3616
3617enum {
3618 /** IBSS station */
3619 VDEV_TYPE_IBSS = 0,
3620 /** infra STA */
3621 VDEV_TYPE_STA = 1,
3622 /** infra AP */
3623 VDEV_TYPE_AP = 2,
3624 /** Monitor */
3625 VDEV_TYPE_MONITOR = 3,
3626 /** OCB */
3627 VDEV_TYPE_OCB = 6,
3628};
3629
3630enum {
3631 /** P2P device */
3632 VDEV_SUBTYPE_P2PDEV = 0,
3633 /** P2P client */
3634 VDEV_SUBTYPE_P2PCLI,
3635 /** P2P GO */
3636 VDEV_SUBTYPE_P2PGO,
3637 /** BT3.0 HS */
3638 VDEV_SUBTYPE_BT,
3639};
3640
3641typedef struct {
3642 /** idnore power , only use flags , mode and freq */
3643 wmi_channel chan;
3644} wmi_pdev_set_channel_cmd;
3645
3646typedef enum {
3647 WMI_PKTLOG_EVENT_RX = 0x1,
3648 WMI_PKTLOG_EVENT_TX = 0x2,
3649 WMI_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
3650 WMI_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
3651 /* 0x10 used by deprecated DBG_PRINT */
3652 WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x20, /* To support Smart Antenna */
3653} WMI_PKTLOG_EVENT;
3654
3655typedef struct {
3656 A_UINT32 tlv_header;
3657 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param */
3658 A_UINT32 reserved0;
3659 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3660 WMI_PKTLOG_EVENT evlist;
3661} wmi_pdev_pktlog_enable_cmd_fixed_param;
3662
3663typedef struct {
3664 A_UINT32 tlv_header;
3665 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param */
3666 A_UINT32 reserved0;
3667} wmi_pdev_pktlog_disable_cmd_fixed_param;
3668
3669/** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
3670 * NOTE: This constant cannot be changed without breaking
3671 * WMI Compatibility. */
3672
3673#define WMI_DSCP_MAP_MAX (64)
3674/*
3675 * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
3676 * @details
3677 * Create an API for sending the custom DSCP-to-TID map to the target
3678 * If this is a request from the user space or from above the UMAC
3679 * then the best place to implement this is in the umac_if_offload of the OL path.
3680 * Provide a place holder for this API in the ieee80211com (ic).
3681 *
3682 * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
3683 * in the target should be directed to the function pointer in the ic.
3684 *
3685 * Implementation details of the API to send the map to the target are as described-
3686 *
3687 * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
3688 * DSCP-to-TID map is a one dimensional uint32_t array of length 64 to accomodate
3689 * 64 TID values for 2^6 (64) DSCP ids.
3690 * Example:
3691 * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
3692 * 0, 0, 0, 0, 0, 0, 0, 0,
3693 * 1, 1, 1, 1, 1, 1, 1, 1,
3694 * 2, 2, 2, 2, 2, 2, 2, 2,
3695 * 3, 3, 3, 3, 3, 3, 3, 3,
3696 * 4, 4, 4, 4, 4, 4, 4, 4,
3697 * 5, 5, 5, 5, 5, 5, 5, 5,
3698 * 6, 6, 6, 6, 6, 6, 6, 6,
3699 * 7, 7, 7, 7, 7, 7, 7, 7,
3700 * };
3701 *
3702 * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
3703 *
3704 * 3. Copy the DSCP-to-TID map into the WMI buffer.
3705 *
3706 * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
3707 * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
3708 * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
3709 * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
3710 *
3711 */
3712typedef struct {
3713 A_UINT32 tlv_header;
3714 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
3715 A_UINT32 reserved0;
3716 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3717 /* map indicating DSCP to TID conversion */
3718 A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
3719} wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
3720
Govind Singhc7d51942016-02-01 12:09:31 +05303721typedef struct {
3722 A_UINT32 tlv_header;
3723 /*
3724 * TLV tag and len; tag equals
3725 * WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param
3726 */
3727 A_UINT32 vdev_id;
3728 /** map indicating DSCP to TID conversion */
3729 A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
3730} wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
3731
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003732/** Fixed rate (rate-code) for broadcast/ multicast data frames */
3733/* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
3734 * @details
3735 * Create an API for setting the custom rate for the MCAST and BCAST frames
3736 * in the target. If this is a request from the user space or from above the UMAC
3737 * then the best place to implement this is in the umac_if_offload of the OL path.
3738 * Provide a place holder for this API in the ieee80211com (ic).
3739 *
3740 * Implementation details of the API to set custom rates for MCAST and BCAST in
3741 * the target are as described-
3742 *
3743 * 1. The function will have 3 arguments-
3744 * vap structure,
3745 * MCAST/ BCAST identifier code,
3746 * 8 bit rate code
3747 *
3748 * The rate-code is a 1-byte field in which:for given rate, nss and preamble
3749 * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
3750 * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
3751 * b'3-b'0 indicate the rate, which is indicated as follows:
3752 * OFDM : 0: OFDM 48 Mbps
3753 * 1: OFDM 24 Mbps
3754 * 2: OFDM 12 Mbps
3755 * 3: OFDM 6 Mbps
3756 * 4: OFDM 54 Mbps
3757 * 5: OFDM 36 Mbps
3758 * 6: OFDM 18 Mbps
3759 * 7: OFDM 9 Mbps
3760 * CCK (pream == 1)
3761 * 0: CCK 11 Mbps Long
3762 * 1: CCK 5.5 Mbps Long
3763 * 2: CCK 2 Mbps Long
3764 * 3: CCK 1 Mbps Long
3765 * 4: CCK 11 Mbps Short
3766 * 5: CCK 5.5 Mbps Short
3767 * 6: CCK 2 Mbps Short
3768 * HT/VHT (pream == 2/3)
3769 * 0..7: MCS0..MCS7 (HT)
3770 * 0..9: MCS0..MCS9 (VHT)
3771 *
3772 * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
3773 * to the target.
3774 * Arguments to the API are-
3775 * wmi handle,
3776 * VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
3777 * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
3778 * rate value.
3779 */
3780typedef enum {
3781 WMI_SET_MCAST_RATE,
3782 WMI_SET_BCAST_RATE
3783} MCAST_BCAST_RATE_ID;
3784
3785typedef struct {
3786 MCAST_BCAST_RATE_ID rate_id;
3787 A_UINT32 rate;
3788} mcast_bcast_rate;
3789
3790typedef struct {
3791 A_UINT32 tlv_header;
3792 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
3793 A_UINT32 cwmin;
3794 A_UINT32 cwmax;
3795 A_UINT32 aifs;
3796 A_UINT32 txoplimit;
3797 A_UINT32 acm;
3798 A_UINT32 no_ack;
3799} wmi_wmm_params;
3800
3801typedef struct {
3802 A_UINT32 tlv_header;
3803 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
3804 A_UINT32 reserved0;
3805 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3806 A_UINT32 dg_type;
3807
3808 /* The TLVs for the 4 AC follows:
3809 * wmi_wmm_params wmm_params_ac_be;
3810 * wmi_wmm_params wmm_params_ac_bk;
3811 * wmi_wmm_params wmm_params_ac_vi;
3812 * wmi_wmm_params wmm_params_ac_vo;
3813 */
3814} wmi_pdev_set_wmm_params_cmd_fixed_param;
3815
3816typedef enum {
3817 WMI_REQUEST_PEER_STAT = 0x01,
3818 WMI_REQUEST_AP_STAT = 0x02,
3819 WMI_REQUEST_PDEV_STAT = 0x04,
3820 WMI_REQUEST_VDEV_STAT = 0x08,
3821 WMI_REQUEST_BCNFLT_STAT = 0x10,
3822 WMI_REQUEST_VDEV_RATE_STAT = 0x20,
Govind Singh32cced32016-02-01 13:33:09 +05303823 WMI_REQUEST_INST_STAT = 0x40,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003824} wmi_stats_id;
3825
3826typedef struct {
3827 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
3828 wmi_stats_id stats_id;
3829 /** unique id identifying the VDEV, generated by the caller */
3830 A_UINT32 vdev_id;
3831 /** peer MAC address */
3832 wmi_mac_addr peer_macaddr;
3833} wmi_request_stats_cmd_fixed_param;
3834
3835/* stats type bitmap */
3836#define WMI_LINK_STATS_RADIO 0x00000001
3837#define WMI_LINK_STATS_IFACE 0x00000002
3838#define WMI_LINK_STATS_ALL_PEER 0x00000004
3839#define WMI_LINK_STATS_PER_PEER 0x00000008
3840
3841/* wifi clear statistics bitmap */
3842#define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
3843#define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
3844#define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
3845#define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
3846#define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
3847#define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
3848#define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
3849#define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
3850#define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */
3851#define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */
3852
3853/** Default value for stats if the stats collection has not started */
3854#define WMI_STATS_VALUE_INVALID 0xffffffff
3855
3856#define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16)
3857#define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value)
3858#define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1)
3859#define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value)
3860#define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
3861#define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
3862
3863typedef struct {
3864 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
3865 A_UINT32 num_of_diag_events_logs;
3866/* The TLVs will follow.
3867 * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
3868 * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
3869 * Bit 17 Indicate if the DIAG type is Enabled/Disabled.
3870 */
3871} wmi_diag_event_log_config_fixed_param;
3872
3873#define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
3874#define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
3875#define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1)
3876#define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
3877
3878typedef struct {
3879 A_UINT32 tlv_header;
3880 A_UINT32 num_of_diag_events_logs;
3881/* The TLVs will follow.
3882 * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
3883 * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
3884 * Bit 17 - Frequncy of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
3885 * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
3886 */
3887} wmi_diag_event_log_supported_event_fixed_params;
3888
3889typedef struct {
3890 /**
3891 * TLV tag and len; tag equals
3892 * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param
3893 */
3894 A_UINT32 tlv_header;
3895 /** placeholder for future */
3896 A_UINT32 reserved0;
3897} wmi_debug_mesg_flush_fixed_param;
3898
3899typedef struct {
3900 /**
3901 * TLV tag and len; tag equals
3902 * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param
3903 */
3904 A_UINT32 tlv_header;
3905 /** placeholder for future */
3906 A_UINT32 reserved0;
3907} wmi_debug_mesg_flush_complete_fixed_param;
3908
3909
3910typedef struct {
3911 /*
3912 * TLV tag and len; tag equals
3913 * WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param
3914 * vdev_id, where RSSI breach event occurred
3915 */
3916 A_UINT32 tlv_header;
3917 A_UINT32 vdev_id;
3918 /* request id */
3919 A_UINT32 request_id;
3920 /*
3921 * bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is
3922 * corresponding to hi_rssi[0-2]
3923 */
3924 A_UINT32 event_bitmap;
3925 /* rssi at the time of RSSI breach. Unit dBm */
3926 A_UINT32 rssi;
3927 /* bssid of the monitored AP's */
3928 wmi_mac_addr bssid;
3929} wmi_rssi_breach_event_fixed_param;
3930
3931
3932typedef struct {
3933 /** TLV tag and len; tag equals
3934 * WMITLV_TAG_STRUC_wmi_fw_mem_dump */
3935 A_UINT32 tlv_header;
3936 /** unique id identifying the segment */
3937 A_UINT32 seg_id;
3938 /** Start address of the segment to be read */
3939 A_UINT32 seg_start_addr_lo;
3940 A_UINT32 seg_start_addr_hi;
3941 /** Length of the segment to be read */
3942 A_UINT32 seg_length;
3943 /** Host bufeer address to which the segment will be read and dumped */
3944 A_UINT32 dest_addr_lo;
3945 A_UINT32 dest_addr_hi;
3946} wmi_fw_mem_dump;
3947
3948/* Command to get firmware memory dump*/
3949typedef struct {
3950 /** TLV tag and len; tag equals
3951 * WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
3952 A_UINT32 tlv_header;
3953 /** unique id identifying the request */
3954 A_UINT32 request_id;
3955 /** number of memory dump segments */
3956 A_UINT32 num_fw_mem_dump_segs;
3957 /**
3958 * This TLV is followed by another TLV
3959 * wmi_fw_mem_dump fw_mem_dump[];
3960 */
3961} wmi_get_fw_mem_dump_fixed_param;
3962
3963/** Event to indicate the completion of fw mem dump */
3964typedef struct {
3965 /* TLV tag and len; tag equals
3966 * WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
3967 A_UINT32 tlv_header;
3968 /** unique id identifying the request, given
3969 * in the request stats command */
3970 A_UINT32 request_id;
3971 /*In case of Firmware memory dump */
3972 A_UINT32 fw_mem_dump_complete;
3973} wmi_update_fw_mem_dump_fixed_param;
3974
3975typedef enum {
3976 WMI_ROAMING_IDLE = 0,
3977 WMI_ROAMING_ACTIVE = 1,
3978} wmi_roam_state;
3979
3980/* access categories */
3981typedef enum {
3982 WMI_AC_VO = 0,
3983 WMI_AC_VI = 1,
3984 WMI_AC_BE = 2,
3985 WMI_AC_BK = 3,
3986 WMI_AC_MAX = 4,
3987} wmi_traffic_ac;
3988
3989typedef enum {
3990 WMI_STA_STATS = 0,
3991 WMI_SOFTAP_STATS = 1,
3992 WMI_IBSS_STATS = 2,
3993 WMI_P2P_CLIENT_STATS = 3,
3994 WMI_P2P_GO_STATS = 4,
3995 WMI_NAN_STATS = 5,
3996 WMI_MESH_STATS = 6,
3997} wmi_link_iface_type;
3998
3999/* channel operating width */
4000typedef enum {
4001 WMI_CHAN_WIDTH_20 = 0,
4002 WMI_CHAN_WIDTH_40 = 1,
4003 WMI_CHAN_WIDTH_80 = 2,
4004 WMI_CHAN_WIDTH_160 = 3,
4005 WMI_CHAN_WIDTH_80P80 = 4,
4006 WMI_CHAN_WIDTH_5 = 5,
4007 WMI_CHAN_WIDTH_10 = 6,
4008} wmi_channel_width;
4009
4010/*Clear stats*/
4011typedef struct {
4012 A_UINT32 tlv_header;
4013 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
4014 /** unique id identifying the VDEV, generated by the caller */
4015 A_UINT32 vdev_id;
4016 /** stop_stats_collection_req = 1 will imply stop the statistics collection */
4017 A_UINT32 stop_stats_collection_req;
4018 /** identifies what stats to be cleared */
4019 A_UINT32 stats_clear_req_mask;
4020 /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
4021 wmi_mac_addr peer_macaddr;
4022} wmi_clear_link_stats_cmd_fixed_param;
4023
4024/* Link Stats configuration params. Trigger the link layer statistics collection*/
4025typedef struct {
4026 A_UINT32 tlv_header;
4027 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
4028 /** threshold to classify the pkts as short or long */
4029 A_UINT32 mpdu_size_threshold;
4030 /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
4031 A_UINT32 aggressive_statistics_gathering;
4032} wmi_start_link_stats_cmd_fixed_param;
4033
4034typedef struct {
4035 A_UINT32 tlv_header;
4036 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
4037 /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
4038 A_UINT32 stats_type;
4039 /** unique id identifying the VDEV, generated by the caller */
4040 A_UINT32 vdev_id;
4041 /** unique id identifying the request, generated by the caller */
4042 A_UINT32 request_id;
4043 /** peer MAC address */
4044 wmi_mac_addr peer_macaddr;
4045} wmi_request_link_stats_cmd_fixed_param;
4046
4047/* channel statistics */
4048typedef struct {
4049 A_UINT32 tlv_header;
4050 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
4051 /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
4052 A_UINT32 channel_width;
4053 /** Primary 20 MHz channel */
4054 A_UINT32 center_freq;
4055 /** center frequency (MHz) first segment */
4056 A_UINT32 center_freq0;
4057 /** center frequency (MHz) second segment */
4058 A_UINT32 center_freq1;
4059 /** msecs the radio is awake (32 bits number accruing over time) */
4060 A_UINT32 radio_awake_time;
4061 /** msecs the CCA register is busy (32 bits number accruing over time) */
4062 A_UINT32 cca_busy_time;
4063} wmi_channel_stats;
4064
4065/* radio statistics */
4066typedef struct {
4067 A_UINT32 tlv_header;
4068 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
4069 /** Wifi radio (if multiple radio supported) */
4070 A_UINT32 radio_id;
4071 /** msecs the radio is awake (32 bits number accruing over time) */
4072 A_UINT32 on_time;
4073 /** msecs the radio is transmitting (32 bits number accruing over time) */
4074 A_UINT32 tx_time;
4075 /** msecs the radio is in active receive (32 bits number accruing over time) */
4076 A_UINT32 rx_time;
4077 /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
4078 A_UINT32 on_time_scan;
4079 /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
4080 A_UINT32 on_time_nbd;
4081 /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
4082 A_UINT32 on_time_gscan;
4083 /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
4084 A_UINT32 on_time_roam_scan;
4085 /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
4086 A_UINT32 on_time_pno_scan;
4087 /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
4088 A_UINT32 on_time_hs20;
4089 /** number of channels */
4090 A_UINT32 num_channels;
4091} wmi_radio_link_stats;
4092
4093/** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
4094typedef struct {
4095 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
4096 /** unique id identifying the request, given in the request stats command */
4097 A_UINT32 request_id;
4098 /** Number of radios*/
4099 A_UINT32 num_radio;
4100 /** more_data will be set depending on the number of radios */
4101 A_UINT32 more_radio_events;
4102/*
4103 * This TLV is followed by another TLV of array of bytes
4104 * size of(struct wmi_radio_link_stats);
4105 *
4106 * This TLV is followed by another TLV of array of bytes
4107 * num_channels * size of(struct wmi_channel_stats)
4108 */
4109
4110} wmi_radio_link_stats_event_fixed_param;
4111
4112/* per rate statistics */
4113typedef struct {
4114 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
4115 /** rate information
4116 * The rate-code is a 1-byte field in which:for given rate, nss and preamble
4117 * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
4118 * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
4119 * b'3-b'0 indicate the rate, which is indicated as follows:
4120 * OFDM : 0: OFDM 48 Mbps
4121 * 1: OFDM 24 Mbps
4122 * 2: OFDM 12 Mbps
4123 * 3: OFDM 6 Mbps
4124 * 4: OFDM 54 Mbps
4125 * 5: OFDM 36 Mbps
4126 * 6: OFDM 18 Mbps
4127 * 7: OFDM 9 Mbps
4128 * CCK (pream == 1)
4129 * 0: CCK 11 Mbps Long
4130 * 1: CCK 5.5 Mbps Long
4131 * 2: CCK 2 Mbps Long
4132 * 3: CCK 1 Mbps Long
4133 * 4: CCK 11 Mbps Short
4134 * 5: CCK 5.5 Mbps Short
4135 * 6: CCK 2 Mbps Short
4136 * HT/VHT (pream == 2/3)
4137 * 0..7: MCS0..MCS7 (HT)
4138 * 0..9: MCS0..MCS9 (VHT)
4139 */
4140 A_UINT32 rate;
4141 /** units of 100 Kbps */
4142 A_UINT32 bitrate;
4143 /** number of successfully transmitted data pkts (ACK rcvd) */
4144 A_UINT32 tx_mpdu;
4145 /** number of received data pkts */
4146 A_UINT32 rx_mpdu;
4147 /** number of data packet losses (no ACK) */
4148 A_UINT32 mpdu_lost;
4149 /** total number of data pkt retries */
4150 A_UINT32 retries;
4151 /** number of short data pkt retries */
4152 A_UINT32 retries_short;
4153 /** number of long data pkt retries */
4154 A_UINT32 retries_long;
4155} wmi_rate_stats;
4156
4157typedef struct {
4158 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
4159 /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
4160 A_UINT32 peer_type;
4161 /** mac address */
4162 wmi_mac_addr peer_mac_address;
4163 /** peer wmi_CAPABILITY_XXX */
4164 A_UINT32 capabilities;
4165 /** number of rates */
4166 A_UINT32 num_rates;
4167} wmi_peer_link_stats;
4168
4169/** PEER statistics (once started) reset and start afresh after each connection */
4170typedef struct {
4171 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
4172 /** unique id identifying the request, given in the request stats command */
4173 A_UINT32 request_id;
4174 /** number of peers accomidated in this particular event */
4175 A_UINT32 num_peers;
4176 /** Indicates the fragment number */
4177 A_UINT32 peer_event_number;
4178 /** Indicates if there are more peers which will be sent as seperate peer_stats event */
4179 A_UINT32 more_data;
4180
4181/**
4182 * This TLV is followed by another TLV
4183 * num_peers * size of(struct wmi_peer_stats)
4184 * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
4185 */
4186} wmi_peer_stats_event_fixed_param;
4187
4188/* per access category statistics */
4189typedef struct {
4190 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
4191 /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
4192 A_UINT32 ac_type;
4193 /** number of successfully transmitted unicast data pkts (ACK rcvd) */
4194 A_UINT32 tx_mpdu;
4195 /** number of received unicast mpdus */
4196 A_UINT32 rx_mpdu;
4197 /** number of succesfully transmitted multicast data packets */
4198 /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
4199 A_UINT32 tx_mcast;
4200 /** number of received multicast data packets */
4201 A_UINT32 rx_mcast;
4202 /** number of received unicast a-mpdus */
4203 A_UINT32 rx_ampdu;
4204 /** number of transmitted unicast a-mpdus */
4205 A_UINT32 tx_ampdu;
4206 /** number of data pkt losses (no ACK) */
4207 A_UINT32 mpdu_lost;
4208 /** total number of data pkt retries */
4209 A_UINT32 retries;
4210 /** number of short data pkt retries */
4211 A_UINT32 retries_short;
4212 /** number of long data pkt retries */
4213 A_UINT32 retries_long;
4214 /** data pkt min contention time (usecs) */
4215 A_UINT32 contention_time_min;
4216 /** data pkt max contention time (usecs) */
4217 A_UINT32 contention_time_max;
4218 /** data pkt avg contention time (usecs) */
4219 A_UINT32 contention_time_avg;
4220 /** num of data pkts used for contention statistics */
4221 A_UINT32 contention_num_samples;
4222} wmi_wmm_ac_stats;
4223
4224/* interface statistics */
4225typedef struct {
4226 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
4227 /** access point beacon received count from connected AP */
4228 A_UINT32 beacon_rx;
4229 /** access point mgmt frames received count from connected AP (including Beacon) */
4230 A_UINT32 mgmt_rx;
4231 /** action frames received count */
4232 A_UINT32 mgmt_action_rx;
4233 /** action frames transmit count */
4234 A_UINT32 mgmt_action_tx;
4235 /** access Point Beacon and Management frames RSSI (averaged) */
4236 A_UINT32 rssi_mgmt;
4237 /** access Point Data Frames RSSI (averaged) from connected AP */
4238 A_UINT32 rssi_data;
4239 /** access Point ACK RSSI (averaged) from connected AP */
4240 A_UINT32 rssi_ack;
4241 /** number of peers */
4242 A_UINT32 num_peers;
4243 /** Indicates how many peer_stats events will be sent depending on the num_peers. */
4244 A_UINT32 num_peer_events;
4245 /** number of ac */
4246 A_UINT32 num_ac;
4247 /** Roaming Stat */
4248 A_UINT32 roam_state;
4249 /**
4250 * Average Beacon spread offset is the averaged time delay between TBTT
4251 * and beacon TSF */
4252 /** Upper 32 bits of averaged 64 bit beacon spread offset */
4253 A_UINT32 avg_bcn_spread_offset_high;
4254 /** Lower 32 bits of averaged 64 bit beacon spread offset */
4255 A_UINT32 avg_bcn_spread_offset_low;
4256 /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
4257 A_UINT32 is_leaky_ap;
4258 /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
4259 A_UINT32 avg_rx_frms_leaked;
4260 /** Rx leak watch window currently in force to minimize data loss
4261 * because of leaky AP. Rx leak window is the
4262 * time driver waits before shutting down the radio or switching the
4263 * channel and after receiving an ACK for
4264 * a data frame with PM bit set) */
4265 A_UINT32 rx_leak_window;
4266} wmi_iface_link_stats;
4267
4268/** Interface statistics (once started) reset and start afresh after each connection */
4269typedef struct {
4270 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
4271 /** unique id identifying the request, given in the request stats command */
4272 A_UINT32 request_id;
4273 /** unique id identifying the VDEV, generated by the caller */
4274 A_UINT32 vdev_id;
4275/*
4276 * This TLV is followed by another TLV
4277 * wmi_iface_link_stats iface_link_stats;
4278 * num_ac * size of(struct wmi_wmm_ac_stats)
4279 */
4280} wmi_iface_link_stats_event_fixed_param;
4281
4282/** Suspend option */
4283enum {
4284 WMI_PDEV_SUSPEND, /* suspend */
4285 WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
4286};
4287
4288typedef struct {
4289 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */
4290 /* suspend option sent to target */
4291 A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
4292 A_UINT32 suspend_opt;
4293} wmi_pdev_suspend_cmd_fixed_param;
4294
4295typedef struct {
4296 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param */
4297 /** Reserved for future use */
4298 A_UINT32 reserved0;
4299} wmi_pdev_resume_cmd_fixed_param;
4300
4301typedef struct {
4302 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */
4303 A_UINT32 num_vdev_stats; /* number of vdevs */
4304} wmi_vdev_rate_stats_event_fixed_param;
4305
4306typedef struct {
4307 A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info */
4308 A_UINT32 vdevid; /* Id of the wlan vdev */
4309 A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted */
4310 A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above */
4311 A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
4312 A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
4313} wmi_vdev_rate_ht_info;
4314
4315typedef struct {
4316 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
4317 wmi_stats_id stats_id;
4318 /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
4319 A_UINT32 num_pdev_stats;
4320 /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */
4321 A_UINT32 num_vdev_stats;
4322 /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */
4323 A_UINT32 num_peer_stats;
4324 A_UINT32 num_bcnflt_stats;
4325 /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */
4326 A_UINT32 num_chan_stats;
4327 /* This TLV is followed by another TLV of array of bytes
4328 * A_UINT8 data[];
4329 * This data array contains
4330 * num_pdev_stats * size of(struct wmi_pdev_stats)
4331 * num_vdev_stats * size of(struct wmi_vdev_stats)
4332 * num_peer_stats * size of(struct wmi_peer_stats)
4333 * num_bcnflt_stats * size_of()
4334 * num_chan_stats * size of(struct wmi_chan_stats)
4335 *
4336 */
4337} wmi_stats_event_fixed_param;
4338
4339/**
4340 * PDEV statistics
4341 * @todo
4342 * add all PDEV stats here
4343 */
4344typedef struct {
4345 /** Channel noise floor */
4346 A_INT32 chan_nf;
4347 /** TX frame count */
4348 A_UINT32 tx_frame_count;
4349 /** RX frame count */
4350 A_UINT32 rx_frame_count;
4351 /** rx clear count */
4352 A_UINT32 rx_clear_count;
4353 /** cycle count */
4354 A_UINT32 cycle_count;
4355 /** Phy error count */
4356 A_UINT32 phy_err_count;
4357 /** Channel Tx Power */
4358 A_UINT32 chan_tx_pwr;
4359 /** WAL dbg stats */
4360 struct wlan_dbg_stats pdev_stats;
4361
4362} wmi_pdev_stats;
4363
4364/**
4365 * VDEV statistics
4366 * @todo
4367 * add all VDEV stats here
4368 */
4369
4370typedef struct {
4371 A_INT32 bcn_snr;
4372 A_INT32 dat_snr;
4373} wmi_snr_info;
4374
4375typedef struct {
4376 /** unique id identifying the VDEV, generated by the caller */
4377 A_UINT32 vdev_id;
4378 wmi_snr_info vdev_snr;
4379 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) */
4380 A_UINT32 rx_frm_cnt; /* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast) */
4381 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 +05304382 that the 802.11 station successfully transmitted after more than one retransmission attempt */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004383 A_UINT32 fail_cnt[WLAN_MAX_AC]; /*Total number packets(per AC) failed to transmit */
4384 A_UINT32 rts_fail_cnt; /*Total number of RTS/CTS sequence failures for transmission of a packet */
4385 A_UINT32 rts_succ_cnt; /*Total number of RTS/CTS sequence success for transmission of a packet */
4386 A_UINT32 rx_err_cnt; /*The receive error count. HAL will provide the RxP FCS error global */
4387 A_UINT32 rx_discard_cnt; /* The sum of the receive error count and dropped-receive-buffer error count. (FCS error) */
4388 A_UINT32 ack_fail_cnt; /*Total number packets failed transmit because of no ACK from the remote entity */
4389 A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES]; /*History of last ten transmit rate, in units of 500 kbit/sec */
4390 A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES]; /*History of last ten Beacon rssi of the connected Bss */
4391} wmi_vdev_stats;
4392
4393/**
4394 * peer statistics.
4395 *
4396 * @todo
4397 * add more stats
4398 *
4399 */
4400typedef struct {
4401 /** peer MAC address */
4402 wmi_mac_addr peer_macaddr;
4403 /** rssi */
4404 A_UINT32 peer_rssi;
4405 /** last tx data rate used for peer */
4406 A_UINT32 peer_tx_rate;
4407 /** last rx data rate used for peer */
4408 A_UINT32 peer_rx_rate;
4409} wmi_peer_stats;
4410
4411typedef struct {
4412 /** Primary channel freq of the channel for which stats are sent */
4413 A_UINT32 chan_mhz;
4414 /** Time spent on the channel */
4415 A_UINT32 sampling_period_us;
4416 /** Aggregate duration over a sampling period for which channel activity was observed */
4417 A_UINT32 rx_clear_count;
4418 /** Accumalation of the TX PPDU duration over a sampling period */
4419 A_UINT32 tx_duration_us;
4420 /** Accumalation of the RX PPDU duration over a sampling period */
4421 A_UINT32 rx_duration_us;
4422} wmi_chan_stats;
4423
4424typedef struct {
4425 A_UINT32 tlv_header;
4426 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
4427 /** unique id identifying the VDEV, generated by the caller */
4428 A_UINT32 vdev_id;
4429 /** VDEV type (AP,STA,IBSS,MONITOR) */
4430 A_UINT32 vdev_type;
4431 /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0)*/
4432 A_UINT32 vdev_subtype;
4433 /** VDEV MAC address */
4434 wmi_mac_addr vdev_macaddr;
4435 /* Number of configured txrx streams */
4436 A_UINT32 num_cfg_txrx_streams;
4437 /*
4438 * This TLV is followed by another TLV of array of structures
4439 * wmi_vdev_txrx_streams cfg_txrx_streams[];
4440 */
4441} wmi_vdev_create_cmd_fixed_param;
4442
4443typedef struct {
4444 /*
4445 * TLV tag and len; tag equals
4446 * WMITLV_TAG_STRUC_wmi_vdev_txrx_streams
4447 */
4448 A_UINT32 tlv_header;
4449 /* band - Should take values from wmi_channel_band_mask */
4450 A_UINT32 band;
4451 /* max supported tx streams per given band for this vdev */
4452 A_UINT32 supported_tx_streams;
4453 /* max supported rx streams per given band for this vdev */
4454 A_UINT32 supported_rx_streams;
4455} wmi_vdev_txrx_streams;
4456
4457/* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
4458typedef struct {
4459 A_UINT32 tlv_header;
4460 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
4461 A_UINT32 type_count;
4462 /** 255: continuous schedule, 0: reserved */
4463 A_UINT32 duration;
4464 /** Absent period duration in micro seconds */
4465 A_UINT32 interval;
4466 /** Absent period interval in micro seconds */
4467 A_UINT32 start_time;
4468 /** 32 bit tsf time when in starts */
4469} wmi_p2p_noa_descriptor;
4470
4471/** values for vdev_type */
4472#define WMI_VDEV_TYPE_AP 0x1
4473#define WMI_VDEV_TYPE_STA 0x2
4474#define WMI_VDEV_TYPE_IBSS 0x3
4475#define WMI_VDEV_TYPE_MONITOR 0x4
4476
4477/** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
4478 * by FW to execute the NAN specific WMI commands and also implement NAN specific
4479 * operations like Network discovery, service provisioning and service
4480 * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create
4481 * WMI command to create this VDEV once during initialization and host is not
4482 * expected to use any VDEV specific WMI commands on this VDEV.
4483 **/
4484#define WMI_VDEV_TYPE_NAN 0x5
4485
4486#define WMI_VDEV_TYPE_OCB 0x6
4487
4488/** values for vdev_subtype */
4489#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
4490#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
4491#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3
Govind Singh32cced32016-02-01 13:33:09 +05304492#define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA 0x4
4493#define WMI_UNIFIED_VDEV_SUBTYPE_MESH 0x5
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004494
4495/** values for vdev_start_request flags */
4496/** Indicates that AP VDEV uses hidden ssid. only valid for
4497 * AP/GO */
4498#define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0)
4499/** Indicates if robust management frame/management frame
4500 * protection is enabled. For GO/AP vdevs, it indicates that
4501 * it may support station/client associations with RMF enabled.
4502 * For STA/client vdevs, it indicates that sta will
4503 * associate with AP with RMF enabled. */
4504#define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1)
4505
4506/*
4507 * Host is sending bcn_tx_rate to override the beacon tx rates.
4508 */
4509#define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
4510
4511typedef struct {
4512 A_UINT32 tlv_header;
4513 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
4514 /** unique id identifying the VDEV, generated by the caller */
4515 A_UINT32 vdev_id;
4516 /** requestor id identifying the caller module */
4517 A_UINT32 requestor_id;
4518 /** beacon interval from received beacon */
4519 A_UINT32 beacon_interval;
4520 /** DTIM Period from the received beacon */
4521 A_UINT32 dtim_period;
4522 /** Flags */
4523 A_UINT32 flags;
4524 /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
4525 wmi_ssid ssid;
4526 /** beacon/probe reponse xmit rate. Applicable for SoftAP. */
4527 /** This field will be invalid and ignored unless the */
4528 /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
4529 /** When valid, this field contains the fixed tx rate for the beacon */
4530 /** and probe response frames send by the GO or SoftAP */
4531 A_UINT32 bcn_tx_rate;
4532 /** beacon/probe reponse xmit power. Applicable for SoftAP. */
4533 A_UINT32 bcn_txPower;
4534 /** number of p2p NOA descriptor(s) from scan entry */
4535 A_UINT32 num_noa_descriptors;
4536 /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
4537 During CAC, Our HW shouldn't ack ditected frames */
4538 A_UINT32 disable_hw_ack;
4539 /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
4540 /** The DBS policy manager indicates the preferred number of transmit streams. */
4541 A_UINT32 preferred_tx_streams;
4542 /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
4543 /** the DBS policy manager indicates the preferred number of receive streams. */
4544 A_UINT32 preferred_rx_streams;
4545 /* The TLVs follows this structure:
4546 * wmi_channel chan; //WMI channel
4547 * wmi_p2p_noa_descriptor noa_descriptors[]; //actual p2p NOA descriptor from scan entry
4548 */
4549} wmi_vdev_start_request_cmd_fixed_param;
4550
4551typedef struct {
4552 A_UINT32 tlv_header;
4553 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
4554 /** unique id identifying the VDEV, generated by the caller */
4555 A_UINT32 vdev_id;
4556} wmi_vdev_delete_cmd_fixed_param;
4557
4558typedef struct {
4559 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
4560 /** unique id identifying the VDEV, generated by the caller */
4561 A_UINT32 vdev_id;
4562 /** aid (assoc id) received in association response for STA VDEV */
4563 A_UINT32 vdev_assoc_id;
4564 /** bssid of the BSS the VDEV is joining */
4565 wmi_mac_addr vdev_bssid;
4566} wmi_vdev_up_cmd_fixed_param;
4567
4568typedef struct {
4569 A_UINT32 tlv_header;
4570 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
4571 /** unique id identifying the VDEV, generated by the caller */
4572 A_UINT32 vdev_id;
4573} wmi_vdev_stop_cmd_fixed_param;
4574
4575typedef struct {
4576 A_UINT32 tlv_header;
4577 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
4578 /** unique id identifying the VDEV, generated by the caller */
4579 A_UINT32 vdev_id;
4580} wmi_vdev_down_cmd_fixed_param;
4581
4582typedef struct {
4583 /** unique id identifying the VDEV, generated by the caller */
4584 A_UINT32 vdev_id;
4585} wmi_vdev_standby_response_cmd;
4586
4587typedef struct {
4588 /** unique id identifying the VDEV, generated by the caller */
4589 A_UINT32 vdev_id;
4590} wmi_vdev_resume_response_cmd;
4591
4592typedef struct {
4593 A_UINT32 tlv_header;
4594 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
4595 /** unique id identifying the VDEV, generated by the caller */
4596 A_UINT32 vdev_id;
4597 /** parameter id */
4598 A_UINT32 param_id;
4599 /** parameter value */
4600 A_UINT32 param_value;
4601} wmi_vdev_set_param_cmd_fixed_param;
4602
4603typedef struct {
4604 A_UINT32 key_seq_counter_l;
4605 A_UINT32 key_seq_counter_h;
4606} wmi_key_seq_counter;
4607
4608#define WMI_CIPHER_NONE 0x0 /* clear key */
4609#define WMI_CIPHER_WEP 0x1
4610#define WMI_CIPHER_TKIP 0x2
4611#define WMI_CIPHER_AES_OCB 0x3
4612#define WMI_CIPHER_AES_CCM 0x4
4613#define WMI_CIPHER_WAPI 0x5
4614#define WMI_CIPHER_CKIP 0x6
4615#define WMI_CIPHER_AES_CMAC 0x7
4616#define WMI_CIPHER_ANY 0x8
4617
4618typedef struct {
4619 A_UINT32 tlv_header;
4620 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
4621 /** unique id identifying the VDEV, generated by the caller */
4622 A_UINT32 vdev_id;
4623 /** MAC address used for installing */
4624 wmi_mac_addr peer_macaddr;
4625 /** key index */
4626 A_UINT32 key_ix;
4627 /** key flags */
4628 A_UINT32 key_flags;
4629 /** key cipher, defined above */
4630 A_UINT32 key_cipher;
4631 /** key rsc counter */
4632 wmi_key_seq_counter key_rsc_counter;
4633 /** global key rsc counter */
4634 wmi_key_seq_counter key_global_rsc_counter;
4635 /** global key tsc counter */
4636 wmi_key_seq_counter key_tsc_counter;
4637 /** WAPI key rsc counter */
4638 A_UINT8 wpi_key_rsc_counter[16];
4639 /** WAPI key tsc counter */
4640 A_UINT8 wpi_key_tsc_counter[16];
4641 /** key length */
4642 A_UINT32 key_len;
4643 /** key tx mic length */
4644 A_UINT32 key_txmic_len;
4645 /** key rx mic length */
4646 A_UINT32 key_rxmic_len;
4647 /*
4648 * Following this struct are this TLV.
4649 * // actual key data
4650 * A_UINT8 key_data[]; // contains key followed by tx mic followed by rx mic
4651 */
4652} wmi_vdev_install_key_cmd_fixed_param;
4653
4654/** Preamble types to be used with VDEV fixed rate configuration */
4655typedef enum {
4656 WMI_RATE_PREAMBLE_OFDM,
4657 WMI_RATE_PREAMBLE_CCK,
4658 WMI_RATE_PREAMBLE_HT,
4659 WMI_RATE_PREAMBLE_VHT,
4660} WMI_RATE_PREAMBLE;
4661
4662/** Value to disable fixed rate setting */
4663#define WMI_FIXED_RATE_NONE (0xff)
4664
4665/** the definition of different VDEV parameters */
4666typedef enum {
4667 /** RTS Threshold */
4668 WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
4669 /** Fragmentation threshold */
4670 WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
4671 /** beacon interval in TUs */
4672 WMI_VDEV_PARAM_BEACON_INTERVAL,
4673 /** Listen interval in TUs */
4674 WMI_VDEV_PARAM_LISTEN_INTERVAL,
4675 /** muticast rate in Mbps */
4676 WMI_VDEV_PARAM_MULTICAST_RATE,
4677 /** management frame rate in Mbps */
4678 WMI_VDEV_PARAM_MGMT_TX_RATE,
4679 /** slot time (long vs short) */
4680 WMI_VDEV_PARAM_SLOT_TIME,
4681 /** preamble (long vs short) */
4682 WMI_VDEV_PARAM_PREAMBLE,
4683 /** SWBA time (time before tbtt in msec) */
4684 WMI_VDEV_PARAM_SWBA_TIME,
4685 /** time period for updating VDEV stats */
4686 WMI_VDEV_STATS_UPDATE_PERIOD,
4687 /** age out time in msec for frames queued for station in power save*/
4688 WMI_VDEV_PWRSAVE_AGEOUT_TIME,
4689 /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
4690 WMI_VDEV_HOST_SWBA_INTERVAL,
4691 /** DTIM period (specified in units of num beacon intervals) */
4692 WMI_VDEV_PARAM_DTIM_PERIOD,
4693 /** scheduler air time limit for this VDEV. used by off chan scheduler */
4694 WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
4695 /** enable/dsiable WDS for this VDEV */
4696 WMI_VDEV_PARAM_WDS,
4697 /** ATIM Window */
4698 WMI_VDEV_PARAM_ATIM_WINDOW,
4699 /** BMISS max */
4700 WMI_VDEV_PARAM_BMISS_COUNT_MAX,
4701 /** BMISS first time */
4702 WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
4703 /** BMISS final time */
4704 WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
4705 /** WMM enables/disabled */
4706 WMI_VDEV_PARAM_FEATURE_WMM,
4707 /** Channel width */
4708 WMI_VDEV_PARAM_CHWIDTH,
4709 /** Channel Offset */
4710 WMI_VDEV_PARAM_CHEXTOFFSET,
4711 /** Disable HT Protection */
4712 WMI_VDEV_PARAM_DISABLE_HTPROTECTION,
4713 /** Quick STA Kickout */
4714 WMI_VDEV_PARAM_STA_QUICKKICKOUT,
4715 /** Rate to be used with Management frames */
4716 WMI_VDEV_PARAM_MGMT_RATE,
4717 /** Protection Mode */
4718 WMI_VDEV_PARAM_PROTECTION_MODE,
4719 /** Fixed rate setting */
4720 WMI_VDEV_PARAM_FIXED_RATE,
4721 /** Short GI Enable/Disable */
4722 WMI_VDEV_PARAM_SGI,
4723 /** Enable LDPC */
4724 WMI_VDEV_PARAM_LDPC,
4725 /** Enable Tx STBC */
4726 WMI_VDEV_PARAM_TX_STBC,
4727 /** Enable Rx STBC */
4728 WMI_VDEV_PARAM_RX_STBC,
4729 /** Intra BSS forwarding */
4730 WMI_VDEV_PARAM_INTRA_BSS_FWD,
4731 /** Setting Default xmit key for Vdev */
4732 WMI_VDEV_PARAM_DEF_KEYID,
4733 /** NSS width */
4734 WMI_VDEV_PARAM_NSS,
4735 /** Set the custom rate for the broadcast data frames */
4736 WMI_VDEV_PARAM_BCAST_DATA_RATE,
4737 /** Set the custom rate (rate-code) for multicast data frames */
4738 WMI_VDEV_PARAM_MCAST_DATA_RATE,
4739 /** Tx multicast packet indicate Enable/Disable */
4740 WMI_VDEV_PARAM_MCAST_INDICATE,
4741 /** Tx DHCP packet indicate Enable/Disable */
4742 WMI_VDEV_PARAM_DHCP_INDICATE,
4743 /** Enable host inspection of Tx unicast packet to unknown destination */
4744 WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
4745
4746 /* The minimum amount of time AP begins to consider STA inactive */
4747 WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
4748
4749 /* An associated STA is considered inactive when there is no recent TX/RX
4750 * activity and no downlink frames are buffered for it. Once a STA exceeds
4751 * the maximum idle inactive time, the AP will send an 802.11 data-null as
4752 * a keep alive to verify the STA is still associated. If the STA does ACK
4753 * the data-null, or if the data-null is buffered and the STA does not
4754 * retrieve it, the STA will be considered unresponsive (see
4755 * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
4756 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
4757
4758 /* An associated STA is considered unresponsive if there is no recent
4759 * TX/RX activity and downlink frames are buffered for it. Once a STA
4760 * exceeds the maximum unresponsive time, the AP will send a
4761 * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
4762 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
4763
4764 /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
4765 WMI_VDEV_PARAM_AP_ENABLE_NAWDS,
4766 /** Enable/Disable RTS-CTS */
4767 WMI_VDEV_PARAM_ENABLE_RTSCTS,
4768 /* Enable TXBFee/er */
4769 WMI_VDEV_PARAM_TXBF,
4770
4771 /**Set packet power save */
4772 WMI_VDEV_PARAM_PACKET_POWERSAVE,
4773
4774 /**Drops un-encrypted packets if any received in an encryted connection
4775 * otherwise forwards to host
4776 */
4777 WMI_VDEV_PARAM_DROP_UNENCRY,
4778
4779 /*
4780 * Set TX encap type.
4781 *
4782 * enum wmi_pkt_type is to be used as the parameter
4783 * specifying the encap type.
4784 */
4785 WMI_VDEV_PARAM_TX_ENCAP_TYPE,
4786
4787 /*
4788 * Try to detect stations that woke-up and exited power save but did not
4789 * successfully transmit data-null with PM=0 to AP. When this happens,
4790 * STA and AP power save state are out-of-sync. Use buffered but
4791 * undelivered MSDU to the STA as a hint that the STA is really awake
4792 * and expecting normal ASAP delivery, rather than retrieving BU with
4793 * PS-Poll, U-APSD trigger, etc.
4794 *
4795 * 0 disables out-of-sync detection. Maximum time is 255 seconds.
4796 */
4797 WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,
4798
4799 /* Enable/Disable early rx dynamic adjust feature.
4800 * Early-rx dynamic adjust is a advance power save feature.
4801 * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
4802 * timing discrepancies in the system.
4803 * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
4804 * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
4805 * properly to minimum the power consume.*/
4806 WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE,
4807
4808 /* set target bmiss number per sample cycle if bmiss adjust was chosen.
4809 * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
4810 * which can be set by user through WMI command.
4811 */
4812 WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM,
4813
4814 /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
4815 WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE,
4816
4817 /* set slop_step */
4818 WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP,
4819
4820 /* set init slop */
4821 WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP,
4822
4823 /* pause adjust enable/disable */
4824 WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE,
4825
4826 /* Set channel pwr limit value of the vdev the minimal value of all
4827 * vdevs operating on this channel will be set as channel tx power
4828 * limit, which is used to configure ratearray
4829 */
4830 WMI_VDEV_PARAM_TX_PWRLIMIT,
4831
4832 /* set the count of snr value for calculation in snr monitor */
4833 WMI_VDEV_PARAM_SNR_NUM_FOR_CAL,
4834
4835 /** Roaming offload */
4836 WMI_VDEV_PARAM_ROAM_FW_OFFLOAD,
4837
4838 /** Enable Leader request RX functionality for RMC */
4839 WMI_VDEV_PARAM_ENABLE_RMC,
4840
4841 /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
4842 * by himself. If the beacon lost time exceed this threshold, the peer is
4843 * thought to be gone. */
4844 WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS,
4845
4846 /** max rate in kpbs, transmit rate can't go beyond it */
4847 WMI_VDEV_PARAM_MAX_RATE,
4848
4849 /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift */
4850 WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE,
4851 /* set Tx failure count threshold for the vdev */
4852 WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR,
4853
4854 /* set ebt resync timeout value, in the unit of TU */
4855 WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT,
4856
4857 /* Enable Aggregation State Trigger Event */
4858 WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE,
4859
4860 /* This parameter indicates whether IBSS station can enter into power save
4861 * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
4862 * awake all the time and should never set PM=1 in its transmitted frames.
4863 * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
4864 * is non-zero. */
4865 WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED,
4866
4867 /* This parameter indicates if this station can enter into power collapse
4868 * for the remaining beacon interval after the ATIM window.
4869 * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
4870 * is set to true. */
4871 WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED,
4872
4873 /* This parameter indicates whether IBSS station exit power save mode and
4874 * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
4875 * whenever there is a TX/RX activity. */
4876 WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED,
4877
4878 /* If Awake on TX/RX activity is enabled, this parameter indicates
4879 * the data inactivity time in number of beacon intervals after which
4880 * IBSS station reenters power save by sending Null frame with PM=1. */
4881 WMI_VDEV_PARAM_INACTIVITY_CNT,
4882
4883 /* Inactivity time in msec after which TX Service Period (SP) is
4884 * terminated by sending a Qos Null frame with EOSP.
4885 * If value is 0, TX SP is terminated with the last buffered packet itself
4886 * instead of waiting for the inactivity timeout. */
4887 WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS,
4888
4889 /** DTIM policy */
4890 WMI_VDEV_PARAM_DTIM_POLICY,
4891
4892 /* When IBSS network is initialized, PS-supporting device
4893 * does not enter protocol sleep state during first
4894 * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
4895 WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS,
4896
4897 /* Enable/Disable 1 RX chain usage during the ATIM window */
4898 WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE,
4899 /**
4900 * RX Leak window is the time driver waits before shutting down
4901 * the radio or switching the channel and after receiving an ACK
4902 * for a data frame with PM bit set)
4903 */
4904 WMI_VDEV_PARAM_RX_LEAK_WINDOW,
4905
4906 /**
4907 * Averaging factor(16 bit value) is used in the calculations to
4908 * perform averaging of different link level statistics like average
4909 * beacon spread or average number of frames leaked
4910 */
4911 WMI_VDEV_PARAM_STATS_AVG_FACTOR,
4912 /*
4913 * disconnect threshold, once the consecutive error for specific peer
4914 * exceed this threhold, FW will send kickout event to host
4915 */
4916 WMI_VDEV_PARAM_DISCONNECT_TH,
4917 /*
4918 * The rate_code of RTS_CTS changed by host. Now FW can support
4919 * more non-HT rates rather than 1Mbps or 6Mbps */
4920 WMI_VDEV_PARAM_RTSCTS_RATE,
4921
4922 /** This parameter indicates whether using a long duration RTS-CTS
4923 * protection when a SAP goes off channel in MCC mode */
4924 WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE,
4925
4926 /*
4927 * This parameter indicates whether using a broadcast probe response
4928 * to increase the detectability of SAP in MCC mode
4929 */
4930 WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE,
Nirav Shah47062ff2015-11-05 11:21:08 +05304931
4932 /* This parameter indicates the power backoff in percentage
4933 * currently supports 100%, 50%, 25%, 12.5%, and minimum
4934 * Host passes 0, 1, 2, 3, 4 to Firmware
4935 * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
4936 * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
4937 */
4938 WMI_VDEV_PARAM_TXPOWER_SCALE,
4939
4940 /* TX power backoff in dB: tx power -= param value
4941 * Host passes values(DB) to Halphy, Halphy reduces the power table
4942 * by the values. Safety check will happen in Halphy.
4943 */
4944 WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB,
Govind Singh32cced32016-02-01 13:33:09 +05304945 /** Multicast to Unicast conversion setting */
4946 WMI_VDEV_PARAM_MCAST2UCAST_SET,
4947
4948 /** Total number of HW retries */
4949 WMI_VDEV_PARAM_RC_NUM_RETRIES,
4950
4951 /** Max tx percentage for cabq */
4952 WMI_VDEV_PARAM_CABQ_MAXDUR,
4953
4954 /** MFPTEST settings */
4955 WMI_VDEV_PARAM_MFPTEST_SET,
4956
4957 /** RTS Fixed rate setting */
4958 WMI_VDEV_PARAM_RTS_FIXED_RATE,
4959
4960 /** VHT SGI MASK */
4961 WMI_VDEV_PARAM_VHT_SGIMASK,
4962
4963 /** VHT80 Auto Rate MASK */
4964 WMI_VDEV_PARAM_VHT80_RATEMASK,
4965
4966 /** set Proxy STA features for this vap */
4967 WMI_VDEV_PARAM_PROXY_STA,
4968
4969 /** set virtual cell mode - enable/disable */
4970 WMI_VDEV_PARAM_VIRTUAL_CELL_MODE,
4971
4972 /** Set receive packet type */
4973 WMI_VDEV_PARAM_RX_DECAP_TYPE,
4974
4975 /** Set ratemask with specific Bandwidth and NSS */
4976 WMI_VDEV_PARAM_BW_NSS_RATEMASK,
4977
4978 /** Set SENSOR Support */
4979 WMI_VDEV_PARAM_SENSOR_AP,
4980
4981 /** Set beacon rate */
4982 WMI_VDEV_PARAM_BEACON_RATE,
4983
4984 /** Enable CTS to self for DTIM beacon */
4985 WMI_VDEV_PARAM_DTIM_ENABLE_CTS,
4986
4987 /** Disable station kickout at Vap level */
4988 WMI_VDEV_PARAM_STA_KICKOUT,
Nirav Shah47062ff2015-11-05 11:21:08 +05304989
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004990} WMI_VDEV_PARAM;
4991
4992/* Length of ATIM Window in TU */
4993#define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
4994
4995enum wmi_pkt_type {
4996 WMI_PKT_TYPE_RAW = 0,
4997 WMI_PKT_TYPE_NATIVE_WIFI = 1,
4998 WMI_PKT_TYPE_ETHERNET = 2,
4999};
5000
5001typedef struct {
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05305002 A_UINT8 sutxbfee:1, mutxbfee:1, sutxbfer:1, mutxbfer:1,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005003#if defined(AR900B)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05305004 txb_sts_cap:3, implicit_bf:1;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005005#else
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05305006 reserved:4;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005007#endif
5008} wmi_vdev_txbf_en;
5009
5010/** Upto 8 bits are available for Roaming module to be sent along with
5011 WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
5012/* Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
5013#define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1
5014/* Enable Roaming module in FW to do scan based on Final BMISS */
5015#define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2
5016
5017/** slot time long */
5018#define WMI_VDEV_SLOT_TIME_LONG 0x1
5019/** slot time short */
5020#define WMI_VDEV_SLOT_TIME_SHORT 0x2
5021/** preablbe long */
5022#define WMI_VDEV_PREAMBLE_LONG 0x1
5023/** preablbe short */
5024#define WMI_VDEV_PREAMBLE_SHORT 0x2
5025
5026/** the definition of different START/RESTART Event response */
5027typedef enum {
5028 /* Event respose of START CMD */
5029 WMI_VDEV_START_RESP_EVENT = 0,
5030 /* Event respose of RESTART CMD */
5031 WMI_VDEV_RESTART_RESP_EVENT,
5032} WMI_START_EVENT_PARAM;
5033
5034typedef struct {
5035 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */
5036 /** unique id identifying the VDEV, generated by the caller */
5037 A_UINT32 vdev_id;
5038 /** requestor id that requested the VDEV start request */
5039 A_UINT32 requestor_id;
5040 /* Respose of Event type START/RESTART */
5041 WMI_START_EVENT_PARAM resp_type;
5042 /** status of the response */
5043 A_UINT32 status;
5044 /** Vdev chain mask */
5045 A_UINT32 chain_mask;
5046 /** Vdev mimo power save mode */
5047 A_UINT32 smps_mode;
5048 /** mac_id field contains the MAC identifier that the VDEV is bound to. The valid range is 0 to (num_macs-1). */
5049 A_UINT32 mac_id;
5050 /** Configured Transmit Streams **/
5051 A_UINT32 cfgd_tx_streams;
5052 /** Configured Receive Streams **/
5053 A_UINT32 cfgd_rx_streams;
5054} wmi_vdev_start_response_event_fixed_param;
5055
5056typedef struct {
5057 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */
5058 /** unique id identifying the VDEV, generated by the caller */
5059 A_UINT32 vdev_id;
5060} wmi_vdev_stopped_event_fixed_param;
5061
Manikandan Mohan429a0782015-12-23 14:35:54 -08005062typedef struct {
5063 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */
5064 /** unique id identifying the VDEV, generated by the caller */
5065 A_UINT32 vdev_id;
5066} wmi_vdev_delete_resp_event_fixed_param;
5067
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005068/** common structure used for simple events (stopped, resume_req, standby response) */
5069typedef struct {
5070 A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */
5071 /** unique id identifying the VDEV, generated by the caller */
5072 A_UINT32 vdev_id;
5073} wmi_vdev_simple_event_fixed_param;
5074
5075/** VDEV start response status codes */
5076#define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV succesfully started */
5077#define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */
5078#define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */
5079
5080/** Beacon processing related command and event structures */
5081typedef struct {
5082 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
5083 /** unique id identifying the VDEV, generated by the caller */
5084 A_UINT32 vdev_id;
5085 /** xmit rate */
5086 A_UINT32 tx_rate;
5087 /** xmit power */
5088 A_UINT32 txPower;
5089 /** beacon buffer length in bytes */
5090 A_UINT32 buf_len;
5091 /* This TLV is followed by array of bytes:
5092 * // beacon frame buffer
5093 * A_UINT8 bufp[];
5094 */
5095} wmi_bcn_tx_hdr;
5096
5097/* Beacon filter */
5098#define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
5099#define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
5100#define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
5101#define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
5102#define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
5103
5104typedef struct {
5105 /** Filter ID */
5106 A_UINT32 bcn_filter_id;
5107 /** Filter type - wmi_bcn_filter */
5108 A_UINT32 bcn_filter;
5109 /** Buffer len */
5110 A_UINT32 bcn_filter_len;
5111 /** Filter info (threshold, BSSID, RSSI) */
5112 A_UINT8 *bcn_filter_buf;
5113} wmi_bcn_filter_rx_cmd;
5114
5115/** Capabilities and IEs to be passed to firmware */
5116typedef struct {
5117 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
5118 /** Capabilities */
5119 A_UINT32 caps;
5120 /** ERP info */
5121 A_UINT32 erp;
5122 /** Advanced capabilities */
5123 /** HT capabilities */
5124 /** HT Info */
5125 /** ibss_dfs */
5126 /** wpa Info */
5127 /** rsn Info */
5128 /** rrm info */
5129 /** ath_ext */
5130 /** app IE */
5131} wmi_bcn_prb_info;
5132
5133typedef struct {
5134 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
5135 /** unique id identifying the VDEV, generated by the caller */
5136 A_UINT32 vdev_id;
5137 /** TIM IE offset from the beginning of the template. */
5138 A_UINT32 tim_ie_offset;
5139 /** beacon buffer length. data is in TLV data[] */
5140 A_UINT32 buf_len;
5141 /*
5142 * The TLVs follows:
5143 * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs
5144 * A_UINT8 data[]; //Variable length data
5145 */
5146} wmi_bcn_tmpl_cmd_fixed_param;
5147
5148typedef struct {
5149 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
5150 /** unique id identifying the VDEV, generated by the caller */
5151 A_UINT32 vdev_id;
5152 /** beacon buffer length. data is in TLV data[] */
5153 A_UINT32 buf_len;
5154 /*
5155 * The TLVs follows:
5156 * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs
5157 * A_UINT8 data[]; //Variable length data
5158 */
5159} wmi_prb_tmpl_cmd_fixed_param;
5160
5161typedef struct {
5162 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
5163 A_UINT32 tlv_header;
5164 /** unique id identifying the VDEV */
5165 A_UINT32 vdev_id;
5166 /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
5167 A_UINT32 tx_status;
5168} wmi_offload_bcn_tx_status_event_fixed_param;
5169
5170enum wmi_sta_ps_mode {
5171 /** enable power save for the given STA VDEV */
5172 WMI_STA_PS_MODE_DISABLED = 0,
5173 /** disable power save for a given STA VDEV */
5174 WMI_STA_PS_MODE_ENABLED = 1,
5175};
5176
5177typedef struct {
5178 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
5179 /** unique id identifying the VDEV, generated by the caller */
5180 A_UINT32 vdev_id;
5181
5182 /** Power save mode
5183 *
5184 * (see enum wmi_sta_ps_mode)
5185 */
5186 A_UINT32 sta_ps_mode;
5187} wmi_sta_powersave_mode_cmd_fixed_param;
5188
5189enum wmi_csa_offload_en {
5190 WMI_CSA_OFFLOAD_DISABLE = 0,
5191 WMI_CSA_OFFLOAD_ENABLE = 1,
5192};
5193
5194typedef struct {
5195 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */
5196 A_UINT32 vdev_id;
5197 A_UINT32 csa_offload_enable;
5198} wmi_csa_offload_enable_cmd_fixed_param;
5199
5200typedef struct {
5201 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */
5202 A_UINT32 vdev_id;
5203 /*
5204 * The TLVs follows:
5205 * wmi_channel chan;
5206 */
5207} wmi_csa_offload_chanswitch_cmd_fixed_param;
5208/**
5209 * This parameter controls the policy for retrieving frames from AP while the
5210 * STA is in sleep state.
5211 *
5212 * Only takes affect if the sta_ps_mode is enabled
5213 */
5214enum wmi_sta_ps_param_rx_wake_policy {
5215 /* Wake up when ever there is an RX activity on the VDEV. In this mode
5216 * the Power save SM(state machine) will come out of sleep by either
5217 * sending null frame (or) a data frame (with PS==0) in response to TIM
5218 * bit set in the received beacon frame from AP.
5219 */
5220 WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
5221
5222 /* Here the power save state machine will not wakeup in response to TIM
5223 * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
5224 * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
5225 * access categories are delivery-enabled, the station will send a UAPSD
5226 * trigger frame, otherwise it will send a PS-Poll.
5227 */
5228 WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
5229};
5230
5231/** Number of tx frames/beacon that cause the power save SM to wake up.
5232 *
5233 * Value 1 causes the SM to wake up for every TX. Value 0 has a special
5234 * meaning, It will cause the SM to never wake up. This is useful if you want
5235 * to keep the system to sleep all the time for some kind of test mode . host
5236 * can change this parameter any time. It will affect at the next tx frame.
5237 */
5238enum wmi_sta_ps_param_tx_wake_threshold {
5239 WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
5240 WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
5241
5242 /* Values greater than one indicate that many TX attempts per beacon
5243 * interval before the STA will wake up
5244 */
5245};
5246
5247/**
5248 * The maximum number of PS-Poll frames the FW will send in response to
5249 * traffic advertised in TIM before waking up (by sending a null frame with PS
5250 * = 0). Value 0 has a special meaning: there is no maximum count and the FW
5251 * will send as many PS-Poll as are necessary to retrieve buffered BU. This
5252 * parameter is used when the RX wake policy is
5253 * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
5254 * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
5255 */
5256enum wmi_sta_ps_param_pspoll_count {
5257 WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
5258 /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
5259 * will send before waking up.
5260 */
5261};
5262
5263/*
5264 * This will include the delivery and trigger enabled state for every AC.
5265 * This is the negotiated state with AP. The host MLME needs to set this based
5266 * on AP capability and the state Set in the association request by the
5267 * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
5268 */
5269#define WMI_UAPSD_AC_TYPE_DELI 0
5270#define WMI_UAPSD_AC_TYPE_TRIG 1
5271
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05305272#define WMI_UAPSD_AC_BIT_MASK(ac, type) \
5273 do { \
5274 (type == WMI_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) : \
5275 (1<<((ac<<1)+1)) \
5276 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005277
5278enum wmi_sta_ps_param_uapsd {
5279 WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
5280 WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
5281 WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
5282 WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
5283 WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
5284 WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
5285 WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
5286 WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
5287};
5288
5289enum wmi_sta_powersave_param {
5290 /**
5291 * Controls how frames are retrievd from AP while STA is sleeping
5292 *
5293 * (see enum wmi_sta_ps_param_rx_wake_policy)
5294 */
5295 WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
5296
5297 /**
5298 * The STA will go active after this many TX
5299 *
5300 * (see enum wmi_sta_ps_param_tx_wake_threshold)
5301 */
5302 WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
5303
5304 /**
5305 * Number of PS-Poll to send before STA wakes up
5306 *
5307 * (see enum wmi_sta_ps_param_pspoll_count)
5308 *
5309 */
5310 WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
5311
5312 /**
5313 * TX/RX inactivity time in msec before going to sleep.
5314 *
5315 * The power save SM will monitor tx/rx activity on the VDEV, if no
5316 * activity for the specified msec of the parameter the Power save SM will
5317 * go to sleep.
5318 */
5319 WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
5320
5321 /**
5322 * Set uapsd configuration.
5323 *
5324 * (see enum wmi_sta_ps_param_uapsd)
5325 */
5326 WMI_STA_PS_PARAM_UAPSD = 4,
5327 /**
5328 * Number of PS-Poll to send before STA wakes up in QPower Mode
5329 */
5330 WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
5331
5332 /**
5333 * Enable QPower
5334 */
5335 WMI_STA_PS_ENABLE_QPOWER = 6,
5336
5337 /**
5338 * Number of TX frames before the entering the Active state
5339 */
5340 WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
5341
5342 /**
5343 * QPower SPEC PSPOLL interval
5344 */
5345 WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
5346
5347 /**
5348 * Max SPEC PSPOLL to be sent when the PSPOLL response has
5349 * no-data bit set
5350 */
5351 WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
5352};
5353
5354typedef struct {
5355 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
5356 /** unique id identifying the VDEV, generated by the caller */
5357 A_UINT32 vdev_id;
5358 /** station power save parameter (see enum wmi_sta_powersave_param) */
5359 A_UINT32 param;
5360 A_UINT32 value;
5361} wmi_sta_powersave_param_cmd_fixed_param;
5362
5363/** No MIMO power save */
5364#define WMI_STA_MIMO_PS_MODE_DISABLE
5365/** mimo powersave mode static*/
5366#define WMI_STA_MIMO_PS_MODE_STATIC
5367/** mimo powersave mode dynamic */
5368#define WMI_STA_MIMO_PS_MODE_DYNAMI
5369
5370typedef struct {
5371 /** unique id identifying the VDEV, generated by the caller */
5372 A_UINT32 vdev_id;
5373 /** mimo powersave mode as defined above */
5374 A_UINT32 mimo_pwrsave_mode;
5375} wmi_sta_mimo_ps_mode_cmd;
5376
5377/** U-APSD configuration of peer station from (re)assoc request and TSPECs */
5378enum wmi_ap_ps_param_uapsd {
5379 WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
5380 WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
5381 WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
5382 WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
5383 WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
5384 WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
5385 WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
5386 WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
5387};
5388
5389/** U-APSD maximum service period of peer station */
5390enum wmi_ap_ps_peer_param_max_sp {
5391 WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
5392 WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
5393 WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
5394 WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
5395
5396 /* keep last! */
5397 MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
5398};
5399
5400/**
5401 * AP power save parameter
5402 * Set a power save specific parameter for a peer station
5403 */
5404enum wmi_ap_ps_peer_param {
5405 /** Set uapsd configuration for a given peer.
5406 *
5407 * This will include the delivery and trigger enabled state for every AC.
5408 * The host MLME needs to set this based on AP capability and stations
5409 * request Set in the association request received from the station.
5410 *
5411 * Lower 8 bits of the value specify the UAPSD configuration.
5412 *
5413 * (see enum wmi_ap_ps_param_uapsd)
5414 * The default value is 0.
5415 */
5416 WMI_AP_PS_PEER_PARAM_UAPSD = 0,
5417
5418 /**
5419 * Set the service period for a UAPSD capable station
5420 *
5421 * The service period from wme ie in the (re)assoc request frame.
5422 *
5423 * (see enum wmi_ap_ps_peer_param_max_sp)
5424 */
5425 WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
5426
5427 /** Time in seconds for aging out buffered frames for STA in power save */
5428 WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
Govind Singh32cced32016-02-01 13:33:09 +05305429 /** Specify frame types that are considered SIFS RESP trigger frame */
5430 WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
5431
5432 /*
5433 * Specifies the trigger state of TID.
5434 * Valid only for UAPSD frame type
5435 */
5436 WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
5437
5438 /** Specifies the WNM sleep state of a STA */
5439 WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005440};
5441
5442typedef struct {
5443 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
5444 /** unique id identifying the VDEV, generated by the caller */
5445 A_UINT32 vdev_id;
5446 /** peer MAC address */
5447 wmi_mac_addr peer_macaddr;
5448 /** AP powersave param (see enum wmi_ap_ps_peer_param) */
5449 A_UINT32 param;
5450 /** AP powersave param value */
5451 A_UINT32 value;
5452} wmi_ap_ps_peer_cmd_fixed_param;
5453
5454/** Configure peer station 11v U-APSD coexistance
5455 *
5456 * Two parameters from uaspd coexistence ie info (as specified in 11v) are
5457 * sent down to FW along with this command.
5458 *
5459 * The semantics of these fields are described in the following text extracted
5460 * from 802.11v.
5461 *
5462 * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the
5463 * U-APSD Coexistence element, the AP should not transmit frames to the
5464 * non-AP STA outside of the U-APSD Coexistence Service Period, which
5465 * begins when the AP receives the U-APSD trigger frame and ends after
5466 * the transmission period specified by the result of the following
5467 * calculation:
5468 *
5469 * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
5470 *
5471 * Where T is the time the U-APSD trigger frame was received at the AP
5472 * Interval is the UAPSD Coexistence element Duration/Interval field
5473 * value (see 7.3.2.91) or upon the successful transmission of a frame
5474 * with EOSP bit set to 1, whichever is earlier.
5475 *
5476 *
5477 * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
5478 * Coexistence element, the AP should not transmit frames to the non-AP
5479 * STA outside of the U-APSD Coexistence Service Period, which begins
5480 * when the AP receives a U-APSD trigger frame and ends after the
5481 * transmission period specified by the result of the following
5482 * calculation: End of transmission period = T + Duration
5483 */
5484typedef struct {
5485 /** unique id identifying the VDEV, generated by the caller */
5486 A_UINT32 vdev_id;
5487 /** peer MAC address */
5488 wmi_mac_addr peer_macaddr;
5489 /** Enable U-APSD coexistence support for this peer
5490 *
5491 * 0 -> disabled (default)
5492 * 1 -> enabled
5493 */
5494 A_UINT32 enabled;
5495 /** Duration/Interval as defined by 11v U-ASPD coexistance */
5496 A_UINT32 duration_interval;
5497 /** Upper 32 bits of 64-bit TSF offset */
5498 A_UINT32 tsf_offset_high;
5499 /** Lower 32 bits of 64-bit TSF offset */
5500 A_UINT32 tsf_offset_low;
5501} wmi_ap_powersave_peer_uapsd_coex_cmd;
5502
5503typedef enum {
5504 WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001,
5505 WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002,
5506 WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
5507
5508 WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
5509} wmi_ap_ps_egap_flag_type;
5510
5511/**
5512 * configure ehanced green ap parameters
5513 */
5514typedef struct {
5515 /*
5516 * TLV tag and len; tag equals
5517 * wmi_ap_powersave_egap_param_cmd_fixed_param
5518 */
5519 A_UINT32 tlv_header;
5520 /** Enable enhanced green ap
5521 * 0 -> disabled
5522 * 1 -> enabled
5523 */
5524 A_UINT32 enable;
5525 /** The param indicates a duration that all STAs connected
5526 * to S-AP have no traffic.
5527 */
5528 A_UINT32 inactivity_time; /* in unit of milliseconds */
5529 /** The param indicates a duration that all STAs connected
5530 * to S-AP have no traffic, after all STAs have entered powersave.
5531 */
5532 A_UINT32 wait_time; /* in unit of milliseconds */
5533 /** The param is used to turn on/off some functions within E-GAP.
5534 */
5535 A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
5536} wmi_ap_ps_egap_param_cmd_fixed_param;
5537
5538typedef enum {
5539 WMI_AP_PS_EGAP_STATUS_IDLE = 1,
5540 WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
5541 WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3,
5542
5543 WMI_AP_PS_EGAP_STATUS_MAX = 15
5544} wmi_ap_ps_egap_status_type;
5545
5546/**
5547 * send ehanced green ap status to host
5548 */
5549typedef struct {
Manikandan Mohan0c7ae402015-12-03 17:56:41 -08005550 /* TLV tag and len; tag equals
5551 * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list
5552 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005553 A_UINT32 tlv_header;
5554 /** The param indicates a mac under dual-mac */
5555 A_UINT32 mac_id;
5556 /** The param indicates the current tx chainmask with the mac id. */
5557 A_UINT32 tx_chainmask;
5558 /** The param indicates the current rx chainmask with the mac id. */
5559 A_UINT32 rx_chainmask;
5560} wmi_ap_ps_egap_info_chainmask_list;
5561
5562typedef struct {
5563 /*
5564 * TLV tag and len; tag equals
5565 * wmi_ap_powersave_egap_param_cmd_fixed_param
5566 */
5567 A_UINT32 tlv_header;
5568 /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
5569 A_UINT32 status;
5570 /* This TLV is followed by
5571 * wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
5572 */
5573} wmi_ap_ps_egap_info_event_fixed_param;
5574
5575
5576/* 128 clients = 4 words */
5577/* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
5578#define WMI_TIM_BITMAP_ARRAY_SIZE 4
5579
5580typedef struct {
5581 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
5582 /** TIM bitmap len (in bytes)*/
5583 A_UINT32 tim_len;
5584 /** TIM Partial Virtual Bitmap */
5585 A_UINT32 tim_mcast;
5586 A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
5587 A_UINT32 tim_changed;
5588 A_UINT32 tim_num_ps_pending;
5589} wmi_tim_info;
5590
5591typedef struct {
5592 /** Flag to enable quiet period IE support */
5593 A_UINT32 is_enabled;
5594 /** Quiet start */
5595 A_UINT32 tbttcount;
5596 /** Beacon intervals between quiets*/
5597 A_UINT32 period;
5598 /** TUs of each quiet*/
5599 A_UINT32 duration;
5600 /** TUs of from TBTT of quiet start*/
5601 A_UINT32 offset;
5602} wmi_quiet_info;
5603
5604/* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
5605#define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
5606
5607typedef struct {
5608 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
5609 /** Bit 0: Flag to indicate an update in NOA schedule
5610 * Bits 7-1: Reserved
5611 * Bits 15-8: Index (identifies the instance of NOA sub element)
5612 * Bit 16: Opp PS state of the AP
5613 * Bits 23-17: Ctwindow in TUs
5614 * Bits 31-24: Number of NOA descriptors
5615 */
5616 A_UINT32 noa_attributes;
5617 wmi_p2p_noa_descriptor
5618 noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
5619} wmi_p2p_noa_info;
5620
5621#define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
5622#define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
5623
5624#define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \
5625 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
5626
5627#define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \
5628 WMI_F_RMW((hdr)->noa_attributes, 0x1, \
5629 WMI_UNIFIED_NOA_ATTR_MODIFIED);
5630
5631#define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00
5632#define WMI_UNIFIED_NOA_ATTR_INDEX_S 8
5633
5634#define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \
5635 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
5636
5637#define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \
5638 WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
5639 WMI_UNIFIED_NOA_ATTR_INDEX);
5640
5641#define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000
5642#define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16
5643
5644#define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \
5645 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
5646
5647#define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \
5648 WMI_F_RMW((hdr)->noa_attributes, 0x1, \
5649 WMI_UNIFIED_NOA_ATTR_OPP_PS);
5650
5651#define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000
5652#define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17
5653
5654#define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \
5655 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
5656
5657#define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \
5658 WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \
5659 WMI_UNIFIED_NOA_ATTR_CTWIN);
5660
5661#define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000
5662#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24
5663
5664#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \
5665 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
5666
5667#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \
5668 WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
5669 WMI_UNIFIED_NOA_ATTR_NUM_DESC);
5670
5671typedef struct {
5672 /** TIM info */
5673 wmi_tim_info tim_info;
5674 /** P2P NOA info */
5675 wmi_p2p_noa_info p2p_noa_info;
5676 /* TBD: More info elements to be added later */
5677} wmi_bcn_info;
5678
5679typedef struct {
5680 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
5681 /** bitmap identifying the VDEVs, generated by the caller */
5682 A_UINT32 vdev_map;
5683 /* This TLV is followed by tim_info and p2p_noa_info for each vdev in vdevmap :
5684 * wmi_tim_info tim_info[];
5685 * wmi_p2p_noa_info p2p_noa_info[];
5686 *
5687 */
5688} wmi_host_swba_event_fixed_param;
5689
5690#define WMI_MAX_AP_VDEV 16
5691
5692typedef struct {
5693 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
5694 /** bimtap of VDEVs that has tbtt offset updated */
5695 A_UINT32 vdev_map;
5696 /* The TLVs for tbttoffset_list will follow this TLV.
5697 * tbtt offset list in the order of the LSB to MSB in the vdev_map bitmap
5698 * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
5699 */
5700} wmi_tbtt_offset_event_fixed_param;
5701
5702/* Peer Specific commands and events */
5703
5704typedef struct {
5705 A_UINT32 percentage; /* in unit of 12.5% */
5706 A_UINT32 min_delta; /* in unit of Mbps */
5707} rate_delta_t;
5708
5709#define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01
5710#define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02
5711#define MAX_NUM_OF_RATE_THRESH 4
5712
5713typedef struct {
5714 /*
5715 * PEER_RATE_REPORT_COND_FLAG_DELTA,
5716 * PEER_RATE_REPORT_COND_FLAG_THRESHOLD
5717 * Any of these two conditions or both of
5718 * them can be set.
5719 */
5720 A_UINT32 val_cond_flags;
5721 rate_delta_t rate_delta;
5722 /*
5723 * In unit of Mbps. There are at most 4 thresholds
5724 * If the threshold count is less than 4, set zero to
5725 * the one following the last threshold
5726 */
5727 A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH];
5728} report_cond_per_phy_t;
5729
5730
5731enum peer_rate_report_cond_phy_type {
5732 PEER_RATE_REPORT_COND_11B = 0,
5733 PEER_RATE_REPORT_COND_11A_G,
5734 PEER_RATE_REPORT_COND_11N,
5735 PEER_RATE_REPORT_COND_11AC,
5736 PEER_RATE_REPORT_COND_MAX_NUM
5737};
5738
5739typedef struct {
5740 /*
5741 * TLV tag and len; tag equals
5742 * WMITLV_TAG_STRUC_wmi_peer_rate_report_condtion_fixed_param
5743 */
5744 A_UINT32 tlv_header;
5745 /* 1= enable, 0=disable */
5746 A_UINT32 enable_rate_report;
5747 A_UINT32 report_backoff_time; /* in unit of msecond */
5748 A_UINT32 report_timer_period; /* in unit of msecond */
5749 /*
5750 *In the following field, the array index means the phy type,
5751 * please see enum peer_rate_report_cond_phy_type for detail
5752 */
5753 report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
5754} wmi_peer_set_rate_report_condition_fixed_param;
5755
5756/* Peer Type:
5757 * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
5758 * on address and vdev opmode. This is largely here to allow host to indicate that
5759 * peer is explicitly a TDLS peer
5760 */
5761enum wmi_peer_type {
5762 WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
5763 WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
5764 WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
5765 WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
5766 WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05305767 * is assigned up to 127 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005768 /* Reserved from 128 - 255 for
5769 * target internal use.*/
5770 WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
5771};
5772
5773typedef struct {
5774 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
5775 /** unique id identifying the VDEV, generated by the caller */
5776 A_UINT32 vdev_id;
5777 /** peer MAC address */
5778 wmi_mac_addr peer_macaddr;
5779 /** peer type: see enum values above */
5780 A_UINT32 peer_type;
5781} wmi_peer_create_cmd_fixed_param;
5782
5783typedef struct {
5784 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
5785 /** unique id identifying the VDEV, generated by the caller */
5786 A_UINT32 vdev_id;
5787 /** peer MAC address */
5788 wmi_mac_addr peer_macaddr;
5789} wmi_peer_delete_cmd_fixed_param;
5790
5791typedef struct {
5792 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
5793 /** unique id identifying the VDEV, generated by the caller */
5794 A_UINT32 vdev_id;
5795 /** peer MAC address */
5796 wmi_mac_addr peer_macaddr;
5797 /** tid bitmap identifying the tids to flush */
5798 A_UINT32 peer_tid_bitmap;
5799} wmi_peer_flush_tids_cmd_fixed_param;
5800
5801typedef struct {
5802 /** rate mode . 0: disable fixed rate (auto rate)
5803 * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
5804 * 2: ht20 11n rate specified as mcs index
5805 * 3: ht40 11n rate specified as mcs index
5806 */
5807 A_UINT32 rate_mode;
5808 /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
5809 * and series 3 is stored at byte 3 (MSB) */
5810 A_UINT32 rate_series;
5811 /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
5812 * and retry count for rate 3 is stored at byte 3 (MSB) */
5813 A_UINT32 rate_retries;
5814} wmi_fixed_rate;
5815
5816typedef struct {
5817 /** unique id identifying the VDEV, generated by the caller */
5818 A_UINT32 vdev_id;
5819 /** peer MAC address */
5820 wmi_mac_addr peer_macaddr;
5821 /** fixed rate */
5822 wmi_fixed_rate peer_fixed_rate;
5823} wmi_peer_fixed_rate_cmd;
5824
5825#define WMI_MGMT_TID 17
5826
5827typedef struct {
5828 A_UINT32 tlv_header;
5829 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
5830 /** unique id identifying the VDEV, generated by the caller */
5831 A_UINT32 vdev_id;
5832 /** peer MAC address */
5833 wmi_mac_addr peer_macaddr;
5834} wmi_addba_clear_resp_cmd_fixed_param;
5835
5836typedef struct {
5837 A_UINT32 tlv_header;
5838 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */
5839 /** unique id identifying the VDEV, generated by the caller */
5840 A_UINT32 vdev_id;
5841 /** peer MAC address */
5842 wmi_mac_addr peer_macaddr;
5843 /** Tid number */
5844 A_UINT32 tid;
5845 /** Buffer/Window size*/
5846 A_UINT32 buffersize;
5847} wmi_addba_send_cmd_fixed_param;
5848
5849typedef struct {
5850 A_UINT32 tlv_header;
5851 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
5852 /** unique id identifying the VDEV, generated by the caller */
5853 A_UINT32 vdev_id;
5854 /** peer MAC address */
5855 wmi_mac_addr peer_macaddr;
5856 /** Tid number */
5857 A_UINT32 tid;
5858 /** Is Initiator */
5859 A_UINT32 initiator;
5860 /** Reason code */
5861 A_UINT32 reasoncode;
5862} wmi_delba_send_cmd_fixed_param;
5863
5864typedef struct {
5865 A_UINT32 tlv_header;
5866 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
5867 /** unique id identifying the vdev, generated by the caller */
5868 A_UINT32 vdev_id;
5869 /** peer mac address */
5870 wmi_mac_addr peer_macaddr;
5871 /** Tid number */
5872 A_UINT32 tid;
5873 /** status code */
5874 A_UINT32 statuscode;
5875} wmi_addba_setresponse_cmd_fixed_param;
5876
5877typedef struct {
5878 A_UINT32 tlv_header;
5879 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
5880 /** unique id identifying the vdev, generated by the caller */
5881 A_UINT32 vdev_id;
5882 /** peer mac address */
5883 wmi_mac_addr peer_macaddr;
5884 /** Tid number */
5885 A_UINT32 tid;
5886} wmi_send_singleamsdu_cmd_fixed_param;
5887
5888/* Type of Station DTIM Power Save method */
5889enum {
5890 /* For NORMAL DTIM, the parameter is the number of beacon intervals and
5891 * also the same value as the listen interval. For this method, the
5892 * station will wake up based on the listen interval. If this
5893 * listen interval is not equal to DTIM, then the station may
5894 * miss certain DTIM beacons. If this value is 1, then the
5895 * station will wake up for every beacon.
5896 */
5897 WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
5898 /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
5899 * When this value is 1, then the station will wake at every DTIM beacon.
5900 * If this value is >1, then the station will skip certain DTIM beacons.
5901 * This value is the multiple of DTIM intervals that the station will
5902 * wake up to receive the DTIM beacons.
5903 */
5904 WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
5905};
5906
5907/* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
5908typedef struct {
5909 A_UINT32 tlv_header;
5910 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
5911 /** unique id identifying the VDEV, generated by the caller */
5912 A_UINT32 vdev_id;
5913 /* Station DTIM Power Save method as defined above */
5914 A_UINT32 dtim_pwrsave_method;
5915 /* DTIM PS value. Contents depends on the method */
5916 A_UINT32 value;
5917 /* Modulated DTIM value */
5918 A_UINT32 MaxLIModulatedDTIM;
5919} wmi_sta_dtim_ps_method_cmd_fixed_param;
5920
5921/*
5922 * For Station UAPSD Auto Trigger feature, the Firmware monitors the
5923 * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
5924 * If there is no uplink/download for the specified service interval (field service_interval),
5925 * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
5926 * specified in the UP (field user_priority).
5927 * Firmware also monitors the responses for these QOS-NULL triggers.
5928 * If the peer does not have any delivery frames, it will respond with
5929 * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
5930 * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
5931 * are unused and should be set to 0.
5932 * When service_interval is 0, then the firmware will not send any trigger frames. This is for
5933 * certain host-based implementations that don't want this firmware offload.
5934 * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
5935 * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
5936 * and rest of the AC default to 300 ms.
5937 *
5938 * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
5939 * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
5940 * the more advanced monitoring method.
5941 * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
5942 * suspend interval (field suspend_interval), firmware will change its auto trigger interval
5943 * to delay interval (field delay_interval). This way, when there is no traffic, the station
5944 * will save more power by waking up less and sending less trigger frames.
5945 * The (service_interval < suspend_interval) and (service_interval < delay_interval).
5946 * If this variable auto trigger is not required, then the suspend_interval and delay_interval
5947 * should be 0.
5948 */
5949typedef struct {
5950 A_UINT32 tlv_header;
5951 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
5952 /** WMM Access category from 0 to 3 */
5953 A_UINT32 wmm_ac;
5954 /** User priority to use in trigger frames. It is the TID
5955 * value. This field needs to be specified and may not be
5956 * equivalent to AC since some implementation may use the TSPEC
5957 * to enable UAPSD and negotiate a particular user priority. */
5958 A_UINT32 user_priority;
5959 /** service interval in ms */
5960 A_UINT32 service_interval;
5961 /** Suspend interval in ms */
5962 A_UINT32 suspend_interval;
5963 /** delay interval in ms */
5964 A_UINT32 delay_interval;
5965} wmi_sta_uapsd_auto_trig_param;
5966
5967typedef struct {
5968 A_UINT32 tlv_header;
5969 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
5970 /** unique id identifying the VDEV, generated by the caller */
5971 A_UINT32 vdev_id;
5972 /** peer mac address */
5973 wmi_mac_addr peer_macaddr;
5974 /** Number of AC to specify */
5975 A_UINT32 num_ac;
5976 /*
5977 * Following this struc is the TLV:
5978 * wmi_sta_uapsd_auto_trig_param ac_param[]; //Variable number of AC parameters (defined by field num_ac)
5979 */
5980
5981} wmi_sta_uapsd_auto_trig_cmd_fixed_param;
5982
5983/** mimo powersave state */
5984#define WMI_PEER_MIMO_PS_STATE 0x1
5985/** enable/disable AMPDU . initial value (enabled) */
5986#define WMI_PEER_AMPDU 0x2
5987/** authorize/unauthorize peer. initial value is unauthorized (0) */
5988#define WMI_PEER_AUTHORIZE 0x3
5989/** peer channel bandwidth */
5990#define WMI_PEER_CHWIDTH 0x4
5991/** peer NSS */
5992#define WMI_PEER_NSS 0x5
5993/** USE 4 ADDR */
5994#define WMI_PEER_USE_4ADDR 0x6
5995/* set group membership status */
5996#define WMI_PEER_MEMBERSHIP 0x7
5997#define WMI_PEER_USERPOS 0x8
5998/*
5999 * A critical high-level protocol is being used with this peer. Target
6000 * should take appropriate measures (if possible) to ensure more
6001 * reliable link with minimal latency. This *may* include modifying the
6002 * station power save policy, enabling more RX chains, increased
6003 * priority of channel scheduling, etc.
6004 *
6005 * NOTE: This parameter should only be considered a hint as specific
6006 * behavior will depend on many factors including current network load
6007 * and vdev/peer configuration.
6008 *
6009 * For STA VDEV this peer corresponds to the AP's BSS peer.
6010 * For AP VDEV this peer corresponds to the remote peer STA.
6011 */
6012#define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9
6013/* set Tx failure count threshold for the peer - Currently unused */
6014#define WMI_PEER_TX_FAIL_CNT_THR 0xA
6015/* Enable H/W retry and Enable H/W Send CTS2S before Data */
6016#define WMI_PEER_SET_HW_RETRY_CTS2S 0xB
6017
6018/* Set peer advertised IBSS atim window length */
6019#define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC
6020
6021/** peer phy mode */
6022#define WMI_PEER_PHYMODE 0xD
Govind Singh32cced32016-02-01 13:33:09 +05306023/** Use FIXED Pwr */
6024#define WMI_PEER_USE_FIXED_PWR 0xE
6025/** Set peer fixed rate */
6026#define WMI_PEER_PARAM_FIXED_RATE 0xF
6027/** Whitelist peer TIDs */
6028#define WMI_PEER_SET_MU_WHITELIST 0x10
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006029
6030/** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
6031#define WMI_PEER_MIMO_PS_NONE 0x0
6032#define WMI_PEER_MIMO_PS_STATIC 0x1
6033#define WMI_PEER_MIMO_PS_DYNAMIC 0x2
6034
6035typedef struct {
6036 A_UINT32 tlv_header;
6037 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */
6038 /** unique id identifying the VDEV, generated by the caller */
6039 A_UINT32 vdev_id;
6040 /** peer MAC address */
6041 wmi_mac_addr peer_macaddr;
6042 /** parameter id */
6043 A_UINT32 param_id;
6044 /** parametr value */
6045 A_UINT32 param_value;
6046} wmi_peer_set_param_cmd_fixed_param;
6047
6048#define MAX_SUPPORTED_RATES 128
6049
6050typedef struct {
6051 /** total number of rates */
6052 A_UINT32 num_rates;
6053 /**
6054 * rates (each 8bit value) packed into a 32 bit word.
6055 * the rates are filled from least significant byte to most
6056 * significant byte.
6057 */
6058 A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
6059} wmi_rate_set;
6060
6061/* NOTE: It would bea good idea to represent the Tx MCS
6062 * info in one word and Rx in another word. This is split
6063 * into multiple words for convenience
6064 */
6065typedef struct {
6066 A_UINT32 tlv_header;
6067 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
6068 A_UINT32 rx_max_rate; /* Max Rx data rate */
6069 A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
6070 A_UINT32 tx_max_rate; /* Max Tx data rate */
6071 A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
Govind Singh32cced32016-02-01 13:33:09 +05306072 A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006073} wmi_vht_rate_set;
6074
6075/*
6076 * IMPORTANT: Make sure the bit definitions here are consistent
6077 * with the ni_flags definitions in wlan_peer.h
6078 */
6079#define WMI_PEER_AUTH 0x00000001 /* Authorized for data */
6080#define WMI_PEER_QOS 0x00000002 /* QoS enabled */
6081#define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */
6082#define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */
6083#define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */
6084#define WMI_PEER_HT 0x00001000 /* HT enabled */
6085#define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */
6086#define WMI_PEER_STBC 0x00008000 /* STBC Enabled */
6087#define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */
6088#define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */
6089#define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */
6090#define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */
6091#define WMI_PEER_VHT 0x02000000 /* VHT Enabled */
6092#define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */
6093#define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */
6094/** CAUTION TODO: Place holder for WLAN_PEER_F_PS_PRESEND_REQUIRED = 0x10000000. Need to be clean up */
6095#define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */
6096#define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */
6097#define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */
6098
6099/**
6100 * Peer rate capabilities.
6101 *
6102 * This is of interest to the ratecontrol
6103 * module which resides in the firmware. The bit definitions are
6104 * consistent with that defined in if_athrate.c.
6105 *
6106 * @todo
6107 * Move this to a common header file later so there is no need to
6108 * duplicate the definitions or maintain consistency.
6109 */
6110#define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */
6111#define WMI_RC_CW40_FLAG 0x02 /* CW 40 */
6112#define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */
6113#define WMI_RC_HT_FLAG 0x08 /* HT */
6114#define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
6115#define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */
6116#define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */
6117#define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
6118#define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
6119#define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
6120#define WMI_RC_TS_FLAG 0x200 /* Three stream flag */
6121#define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
6122
6123typedef struct {
6124 A_UINT32 tlv_header;
6125 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
6126 /** peer MAC address */
6127 wmi_mac_addr peer_macaddr;
6128 /** VDEV id */
6129 A_UINT32 vdev_id;
6130 /** assoc = 1 reassoc = 0 */
6131 A_UINT32 peer_new_assoc;
6132 /** peer associd (16 bits) */
6133 A_UINT32 peer_associd;
6134 /** peer station flags: see definition above */
6135 A_UINT32 peer_flags;
6136 /** negotiated capabilities (lower 16 bits)*/
6137 A_UINT32 peer_caps;
6138 /** Listen interval */
6139 A_UINT32 peer_listen_intval;
6140 /** HT capabilties of the peer */
6141 A_UINT32 peer_ht_caps;
6142 /** maximum rx A-MPDU length */
6143 A_UINT32 peer_max_mpdu;
6144 /** mpdu density of the peer in usec(0 to 16) */
6145 A_UINT32 peer_mpdu_density;
6146 /** peer rate capabilties see flags above */
6147 A_UINT32 peer_rate_caps;
6148 /** num spatial streams */
6149 A_UINT32 peer_nss;
6150 /** VHT capabilties of the peer */
6151 A_UINT32 peer_vht_caps;
6152 /** phy mode */
6153 A_UINT32 peer_phymode;
6154 /** HT Operation Element of the peer. Five bytes packed in 2
6155 * INT32 array and filled from lsb to msb.
6156 * Note that the size of array peer_ht_info[] cannotbe changed
6157 * without breaking WMI Compatibility. */
6158 A_UINT32 peer_ht_info[2];
6159 /** total number of negotiated legacy rate set. Also the sizeof
6160 * peer_legacy_rates[] */
6161 A_UINT32 num_peer_legacy_rates;
6162 /** total number of negotiated ht rate set. Also the sizeof
6163 * peer_ht_rates[] */
6164 A_UINT32 num_peer_ht_rates;
Govind Singh32cced32016-02-01 13:33:09 +05306165 /**
6166 * Bitmap providing QCA proprietary mapping of bandwidths to max Rx NSS
6167 * for this peer.
6168 * This is required since 802.11 standard currently facilitates peer to
6169 * be able to advertise only a single max Rx NSS value across all
6170 * bandwidths.
6171 * Some QCA chipsets might need to be able to advertise a different max
6172 * Rx NSS value for 160 MHz, than that for 80 MHz and lower.
6173 *
6174 * bit[2:0] : Represents value of Rx NSS for VHT 160 MHz
6175 * bit[30:3]: Reserved
6176 * bit[31] : MSB(0/1): 1 in case of valid data else all bits will be
6177 * set to 0 by host
6178 */
6179 A_UINT32 peer_bw_rxnss_override;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006180 /* Following this struc are the TLV's:
6181 * A_UINT8 peer_legacy_rates[];
6182 * A_UINT8 peer_ht_rates[];
6183 * wmi_vht_rate_set peer_vht_rates; //VHT capabilties of the peer
6184 */
6185} wmi_peer_assoc_complete_cmd_fixed_param;
6186
Govind Singh32cced32016-02-01 13:33:09 +05306187/* WDS Entry Flags */
6188#define WMI_WDS_FLAG_STATIC 0x1 /* Disable aging & learning */
6189
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006190typedef struct {
6191 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
6192 /** peer MAC address */
6193 wmi_mac_addr peer_macaddr;
6194 /** wds MAC addr */
6195 wmi_mac_addr wds_macaddr;
Govind Singh32cced32016-02-01 13:33:09 +05306196 /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */
6197 A_UINT32 flags;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006198} wmi_peer_add_wds_entry_cmd_fixed_param;
6199
6200typedef struct {
6201 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
6202 /** wds MAC addr */
6203 wmi_mac_addr wds_macaddr;
6204} wmi_peer_remove_wds_entry_cmd_fixed_param;
6205
6206typedef struct {
6207 /** peer MAC address */
6208 wmi_mac_addr peer_macaddr;
6209} wmi_peer_q_empty_callback_event;
6210
Govind Singhc7d51942016-02-01 12:09:31 +05306211/*
6212 * Command to update an already existing WDS entry. Different address setting
6213 * combinations are possible.
6214 *
6215 * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated.
6216 * Valid wds and null peer -> Associated WDS entry flags will be updated.
6217 * Null wds and Valid peer-> Flags will be updated for all WDS entries
6218 * behind the peer.
6219 * Null wds and peer -> Flags will be updated for all WDS entries.
6220 */
6221typedef struct {
6222 /*
6223 * TLV tag and len; tag equals
6224 * WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param
6225 */
6226 A_UINT32 tlv_header;
6227 /** peer MAC address */
6228 wmi_mac_addr peer_macaddr;
6229 /** wds MAC addr */
6230 wmi_mac_addr wds_macaddr;
6231 /* Flags associated with WDS entry */
6232 A_UINT32 flags;
6233} wmi_peer_update_wds_entry_cmd_fixed_param;
6234
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006235/**
6236 * Channel info WMI event
6237 */
6238typedef struct {
6239 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
6240 /** Error code */
6241 A_UINT32 err_code;
6242 /** Channel freq */
6243 A_UINT32 freq;
6244 /** Read flags */
6245 A_UINT32 cmd_flags;
6246 /** Noise Floor value */
6247 A_UINT32 noise_floor;
6248 /** rx clear count */
6249 A_UINT32 rx_clear_count;
6250 /** cycle count */
6251 A_UINT32 cycle_count;
Govind Singh32cced32016-02-01 13:33:09 +05306252 /** channel tx power per range in 0.5dBm steps */
6253 A_UINT32 chan_tx_pwr_range;
6254 /** channel tx power per throughput */
6255 A_UINT32 chan_tx_pwr_tp;
6256 /** rx frame count (cumulative) */
6257 A_UINT32 rx_frame_count;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006258} wmi_chan_info_event_fixed_param;
6259
6260/**
6261 * Non wlan interference event
6262 */
6263typedef struct {
6264 A_UINT32 tlv_header;
6265 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_ath_dcs_cw_int */
6266 A_UINT32 channel; /* either number or freq in mhz */
6267} ath_dcs_cw_int;
6268
6269/**
6270 * wlan_dcs_im_tgt_stats
6271 *
6272 */
6273typedef struct _wlan_dcs_im_tgt_stats {
6274 /** current running TSF from the TSF-1 */
6275 A_UINT32 reg_tsf32;
6276
6277 /** Known last frame rssi, in case of multiple stations, if
6278 * and at different ranges, this would not gaurantee that
6279 * this is the least rssi.
6280 */
6281 A_UINT32 last_ack_rssi;
6282
6283 /** Sum of all the failed durations in the last one second interval.
6284 */
6285 A_UINT32 tx_waste_time;
6286 /** count how many times the hal_rxerr_phy is marked, in this
6287 * time period
6288 */
6289 A_UINT32 rx_time;
6290 A_UINT32 phyerr_cnt;
6291
6292 /**
6293 * WLAN IM stats from target to host
6294 *
6295 * Below statistics are sent from target to host periodically.
6296 * These are collected at target as long as target is running
6297 * and target chip is not in sleep.
6298 *
6299 */
6300
6301 /** listen time from ANI */
6302 A_INT32 listen_time;
6303
6304 /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
6305 A_UINT32 reg_tx_frame_cnt;
6306
6307 /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
6308 A_UINT32 reg_rx_frame_cnt;
6309
6310 /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
6311 A_UINT32 reg_rxclr_cnt;
6312
6313 /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
6314 A_UINT32 reg_cycle_cnt; /* delta cycle count */
6315
6316 /** extenstion channel rx clear count */
6317 A_UINT32 reg_rxclr_ext_cnt;
6318
6319 /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
6320 A_UINT32 reg_ofdm_phyerr_cnt;
6321
6322 /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
6323 A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
6324
6325} wlan_dcs_im_tgt_stats_t;
6326
6327/**
6328 * wmi_dcs_interference_event_t
6329 *
6330 * Right now this is event and stats together. Partly this is
6331 * because cw interference is handled in target now. This
6332 * can be done at host itself, if we can carry the NF alone
6333 * as a stats event. In future this would be done and this
6334 * event would carry only stats.
6335 */
6336typedef struct {
6337 A_UINT32 tlv_header;
6338 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
6339 /**
6340 * Type of the event present, either the cw interference event, or the wlan_im stats
6341 */
6342 A_UINT32 interference_type; /* type of interference, wlan or cw */
6343 /*
6344 * Following this struct are these TLVs. Note that they are both array of structures
6345 * but can have at most one element. Which TLV is empty or has one element depends
6346 * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
6347 * elements (not arrays). union { ath_dcs_cw_int cw_int; wlan_dcs_im_tgt_stats_t wlan_stat; } int_event;
6348 *
6349 * //cw_interference event
6350 * ath_dcs_cw_int cw_int[]; this element
6351 * // wlan im interfernce stats
6352 * wlan_dcs_im_tgt_stats_t wlan_stat[];
6353 */
6354} wmi_dcs_interference_event_fixed_param;
6355
6356enum wmi_peer_mcast_group_action {
6357 wmi_peer_mcast_group_action_add = 0,
6358 wmi_peer_mcast_group_action_del = 1
6359};
6360#define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1
6361#define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0
6362#define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
6363#define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
Govind Singh32cced32016-02-01 13:33:09 +05306364/* flag to exclude an ip while filtering.set to exclude */
6365#define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4
6366#define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2
6367/* flag to say ipv4/ipv6. Will be set for ipv6 */
6368#define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8
6369#define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3
6370/* delete all mcast table entries. */
6371#define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10
6372#define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4
6373
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006374/* multicast group membership commands */
6375/* TODO: Converting this will be tricky since it uses an union.
6376 Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
6377typedef struct {
6378 A_UINT32 tlv_header;
6379 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
6380 A_UINT32 flags;
6381 wmi_mac_addr ucast_mac_addr;
Govind Singh32cced32016-02-01 13:33:09 +05306382 /*
6383 * for ipv4, bytes (12-15) should contain ip address and
6384 * other lower bytes 0. ipv6 should have all bytes valid
6385 */
6386 A_UINT8 mcast_ip_addr[16]; /* in network byte order */
6387 /*
6388 * for ipv6, all 16 bytes has to be valid;
6389 * for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s
6390 */
6391 A_UINT8 mcast_ip_mask[16]; /* zero out lower bytes if ipv4 */
6392 /* number of address filters - irrespective of ipv4/ipv6 addresses */
6393 A_UINT32 num_filter_addr;
6394 /*
6395 * this array should contain the src IPs that are to be filtered
6396 * during find. The array should be packed. If there are 2 ipv4
6397 * addresses, there should be 8 bytes and rest all 0s
6398 */
6399 A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */
6400 A_UINT8 vdev_id; /* vdev of this mcast group */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006401} wmi_peer_mcast_group_cmd_fixed_param;
6402
6403/** Offload Scan and Roaming related commands */
6404/** The FW performs 2 different kinds of offload scans independent
6405 * of host. One is Roam scan which is primarily performed on a
6406 * station VDEV after association to look for a better AP that
6407 * the station VDEV can roam to. The second scan is connect scan
6408 * which is mainly performed when the station is not associated
6409 * and to look for a matching AP profile from a list of
6410 * configured profiles. */
6411
6412/**
6413 * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
6414 * the roam scan mode is one of the periodic, rssi change, both, none.
6415 * None : Disable Roam scan. No Roam scan at all.
6416 * Periodic : Scan periodically with a configurable period.
6417 * Rssi change : Scan when ever rssi to current AP changes by the threshold value
6418 * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
6419 * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount)
6420 *
6421 */
6422typedef struct {
6423 A_UINT32 tlv_header;
6424 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
6425 A_UINT32 roam_scan_mode;
6426 A_UINT32 vdev_id;
6427} wmi_roam_scan_mode_fixed_param;
6428
6429#define WMI_ROAM_SCAN_MODE_NONE 0x0
6430#define WMI_ROAM_SCAN_MODE_PERIODIC 0x1
6431#define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
6432#define WMI_ROAM_SCAN_MODE_BOTH 0x3
6433/* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
6434#define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
6435
6436typedef struct {
6437 A_UINT32 tlv_header;
6438 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
6439 A_UINT32 vdev_id;
6440 A_UINT32 command_arg;
6441} wmi_roam_scan_cmd_fixed_param;
6442
6443#define WMI_ROAM_SCAN_STOP_CMD 0x1
6444
6445/**
6446 * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan rssi thresold
6447 * scan rssi threshold is the rssi threshold below which the FW will start running Roam scans.
6448 * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
6449 */
6450typedef struct {
6451 A_UINT32 tlv_header;
6452 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
6453 /** unique id identifying the VDEV, generated by the caller */
6454 A_UINT32 vdev_id;
6455 /** roam scan rssi threshold */
6456 A_UINT32 roam_scan_rssi_thresh;
6457 /** When using Hw generated beacon RSSI interrupts */
6458 A_UINT32 roam_rssi_thresh_diff;
6459 /** 5G scan max count */
6460 A_UINT32 hirssi_scan_max_count;
6461 /** 5G scan rssi change threshold value */
6462 A_UINT32 hirssi_scan_delta;
6463 /** 5G scan upper bound */
6464 A_UINT32 hirssi_upper_bound;
6465 /* The TLVs will follow.
6466 * wmi_roam_scan_extended_threshold_param extended_param;
6467 * wmi_roam_earlystop_rssi_thres_param earlystop_param;
Govind Singhce8fd912016-01-21 10:24:19 +05306468 * wmi_roam_dense_thres_param dense_param;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006469 */
6470} wmi_roam_scan_rssi_threshold_fixed_param;
6471
6472#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0
6473#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
6474#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2
6475#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3
6476
6477typedef struct {
6478 /** TLV tag and len; tag equals
6479 *WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
6480 A_UINT32 tlv_header;
6481 A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
6482 A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
6483 A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
6484 A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
6485 A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
6486 A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
6487 A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
6488 A_UINT32 max_penalty_5g; /** maximum penality that can be applied to a 5GHz RSSI */
6489 /**
6490 * RSSI below which roam is kicked in by background scan
6491 * although rssi is still good
6492 */
6493 A_UINT32 good_rssi_threshold;
6494} wmi_roam_scan_extended_threshold_param;
6495
6496
6497/**
6498 * WMI_ROAM_SCAN_PERIOD: period for roam scan.
6499 * Applicable when the scan mode is Periodic or both.
6500 */
6501typedef struct {
6502 A_UINT32 tlv_header;
6503 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
6504 /** unique id identifying the VDEV, generated by the caller */
6505 A_UINT32 vdev_id;
6506 /** roam scan period value */
6507 A_UINT32 roam_scan_period;
6508 /** Aging for Roam scans */
6509 A_UINT32 roam_scan_age;
6510} wmi_roam_scan_period_fixed_param;
6511
6512/**
6513 * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : rssi delta to trigger the roam scan.
6514 * Rssi change threshold used when mode is Rssi change (or) Both.
6515 * The FW will run the roam scan when ever the rssi changes (up or down) by the value set by this parameter.
6516 * Note scan is triggered based on the rssi threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
6517 */
6518typedef struct {
6519 A_UINT32 tlv_header;
6520 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
6521 /** unique id identifying the VDEV, generated by the caller */
6522 A_UINT32 vdev_id;
6523 /** roam scan rssi change threshold value */
6524 A_UINT32 roam_scan_rssi_change_thresh;
6525 /** When using Hw generated beacon RSSI interrupts */
6526 A_UINT32 bcn_rssi_weight;
6527 /** Minimum delay between two 5G scans */
6528 A_UINT32 hirssi_delay_btw_scans;
6529} wmi_roam_scan_rssi_change_threshold_fixed_param;
6530
6531#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
6532#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
6533#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
6534/**
6535 * TLV for roaming channel list
6536 */
6537typedef struct {
6538 A_UINT32 tlv_header;
6539 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
6540 /** unique id identifying the VDEV, generated by the caller */
6541 A_UINT32 vdev_id;
6542 /** WMI_CHAN_LIST_TAG */
6543 A_UINT32 chan_list_type;
6544 /** # if channels to scan */
6545 A_UINT32 num_chan;
6546/**
6547 * TLV (tag length value ) parameters follow the wmi_roam_chan_list
6548 * structure. The TLV's are:
6549 * A_UINT32 channel_list[];
6550 **/
6551} wmi_roam_chan_list_fixed_param;
6552
6553/** Authentication modes */
6554enum {
6555 WMI_AUTH_NONE, /* no upper level auth */
6556 WMI_AUTH_OPEN, /* open */
6557 WMI_AUTH_SHARED, /* shared-key */
6558 WMI_AUTH_8021X, /* 802.1x */
6559 WMI_AUTH_AUTO, /* Auto */
6560 WMI_AUTH_WPA, /* WPA */
6561 WMI_AUTH_RSNA, /* WPA2/RSNA */
6562 WMI_AUTH_CCKM, /* CCK */
6563 WMI_AUTH_WAPI, /* WAPI */
6564 WMI_AUTH_AUTO_PSK,
6565 WMI_AUTH_WPA_PSK,
6566 WMI_AUTH_RSNA_PSK,
6567 WMI_AUTH_WAPI_PSK,
6568 WMI_AUTH_FT_RSNA, /* 11r FT */
6569 WMI_AUTH_FT_RSNA_PSK,
6570 WMI_AUTH_RSNA_PSK_SHA256,
6571 WMI_AUTH_RSNA_8021X_SHA256,
6572};
6573
6574typedef struct {
6575 /** authentication mode (defined above) */
6576 A_UINT32 rsn_authmode;
6577 /** unicast cipher set */
6578 A_UINT32 rsn_ucastcipherset;
6579 /** mcast/group cipher set */
6580 A_UINT32 rsn_mcastcipherset;
6581 /** mcast/group management frames cipher set */
6582 A_UINT32 rsn_mcastmgmtcipherset;
6583} wmi_rsn_params;
6584
6585/** looking for a wps enabled AP */
6586#define WMI_AP_PROFILE_FLAG_WPS 0x1
6587/** looking for a secure AP */
6588#define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
6589/** looking for a PMF enabled AP */
6590#define WMI_AP_PROFILE_FLAG_PMF 0x4
6591
6592/** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
6593 * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
6594 * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
6595 * and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
6596 */
6597
6598typedef struct {
6599 A_UINT32 tlv_header;
6600 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
6601 /** flags as defined above */
6602 A_UINT32 flags;
6603 /**
6604 * rssi thresold value: the value of the the candidate AP should
6605 * higher by this threshold than the rssi of the currrently associated AP.
6606 */
6607 A_UINT32 rssi_threshold;
6608 /**
6609 * ssid vlaue to be matched.
6610 */
6611 wmi_ssid ssid;
6612
6613 /**
6614 * security params to be matched.
6615 */
6616 /** authentication mode (defined above) */
6617 A_UINT32 rsn_authmode;
6618 /** unicast cipher set */
6619 A_UINT32 rsn_ucastcipherset;
6620 /** mcast/group cipher set */
6621 A_UINT32 rsn_mcastcipherset;
6622 /** mcast/group management frames cipher set */
6623 A_UINT32 rsn_mcastmgmtcipherset;
6624} wmi_ap_profile;
6625
6626/** Support early stop roaming scanning when finding a strong candidate AP
6627 * A 'strong' candidate is
6628 * 1) Is eligible candidate
6629 * (all conditions are met in existing candidate selection).
6630 * 2) Its rssi is better than earlystop threshold.
6631 * Earlystop threshold will be relaxed as each channel is scanned.
6632 */
6633typedef struct {
6634 A_UINT32 tlv_header;
6635 /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
6636 A_UINT32 roam_earlystop_thres_min;
6637 /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
6638 A_UINT32 roam_earlystop_thres_max;
6639} wmi_roam_earlystop_rssi_thres_param;
6640
Govind Singhce8fd912016-01-21 10:24:19 +05306641typedef struct {
6642 /* TLV tag and len;
6643 * tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param
6644 */
6645 A_UINT32 tlv_header;
6646 /* rssi threshold offset under trffic and dense env */
6647 A_UINT32 roam_dense_rssi_thres_offset;
6648 /* minimum number of APs to determine dense env */
6649 A_UINT32 roam_dense_min_aps;
6650 /* initial dense status detected by host
6651 * at the time of initial connection */
6652 A_UINT32 roam_dense_status;
6653 /* traffic threshold to enable aggressive roaming in dense env;
6654 * units are percent of medium occupancy, 0 - 100
6655 */
6656 A_UINT32 roam_dense_traffic_thres;
6657} wmi_roam_dense_thres_param;
6658
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006659/** Beacon filter wmi command info */
6660
6661#define BCN_FLT_MAX_SUPPORTED_IES 256
6662#define BCN_FLT_MAX_ELEMS_IE_LIST BCN_FLT_MAX_SUPPORTED_IES/32
6663
6664typedef struct bss_bcn_stats {
6665 A_UINT32 vdev_id;
6666 A_UINT32 bss_bcnsdropped;
6667 A_UINT32 bss_bcnsdelivered;
6668} wmi_bss_bcn_stats_t;
6669
6670typedef struct bcn_filter_stats {
6671 A_UINT32 bcns_dropped;
6672 A_UINT32 bcns_delivered;
6673 A_UINT32 activefilters;
6674 wmi_bss_bcn_stats_t bss_stats;
6675} wmi_bcnfilter_stats_t;
6676
6677typedef struct wmi_add_bcn_filter_cmd {
6678 A_UINT32 tlv_header;
6679 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
6680 A_UINT32 vdev_id;
6681 /*
6682 * Following this structure is the TLV:
6683 * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
6684 */
6685} wmi_add_bcn_filter_cmd_fixed_param;
6686
6687typedef struct wmi_rmv_bcn_filter_cmd {
6688 A_UINT32 tlv_header;
6689 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
6690 A_UINT32 vdev_id;
6691} wmi_rmv_bcn_filter_cmd_fixed_param;
6692
6693#define WMI_BCN_SEND_DTIM_ZERO 1
6694#define WMI_BCN_SEND_DTIM_BITCTL_SET 2
6695typedef struct wmi_bcn_send_from_host {
6696 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */
6697 A_UINT32 vdev_id;
6698 A_UINT32 data_len;
6699 A_UINT32 frag_ptr; /* Physical address of the frame */
6700 A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
6701 A_UINT32 dtim_flag; /* to control CABQ traffic */
Govind Singh32cced32016-02-01 13:33:09 +05306702 A_UINT32 bcn_antenna; /* Antenna for beacon transmission */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006703} wmi_bcn_send_from_host_cmd_fixed_param;
6704
6705/* cmd to support bcn snd for all vaps at once */
6706typedef struct wmi_pdev_send_bcn {
6707 A_UINT32 num_vdevs;
6708 wmi_bcn_send_from_host_cmd_fixed_param bcn_cmd[1];
6709} wmi_pdev_send_bcn_cmd_t;
6710
6711/*
6712 * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming.
6713 */
6714typedef struct {
6715 A_UINT32 tlv_header;
6716 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
6717 /** id of AP criteria */
6718 A_UINT32 id;
6719
6720 /** unique id identifying the VDEV, generated by the caller */
6721 A_UINT32 vdev_id;
6722
6723 /*
6724 * Following this structure is the TLV:
6725 * wmi_ap_profile ap_profile; //AP profile info
6726 */
6727} wmi_roam_ap_profile_fixed_param;
6728
6729/**
6730 * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
6731 */
6732typedef struct {
6733 /** id of AP criteria */
6734 A_UINT32 id;
6735
6736 /** unique id identifying the VDEV, generated by the caller */
6737 A_UINT32 vdev_id;
6738
6739 /** AP profile info */
6740 wmi_ap_profile ap_profile;
6741
6742} wmi_ofl_scan_add_ap_profile;
6743
6744/**
6745 * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
6746 */
6747typedef struct {
6748 /** id of AP criteria */
6749 A_UINT32 id;
6750 /** unique id identifying the VDEV, generated by the caller */
6751 A_UINT32 vdev_id;
6752} wmi_ofl_scan_remove_ap_profile;
6753
6754/**
6755 * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
6756 * 0 will disable ofload scan and a very low value will perform a continous
6757 * scan.
6758 */
6759typedef struct {
6760 /** offload scan period value, used for scans used when not connected */
6761 A_UINT32 ofl_scan_period;
6762} wmi_ofl_scan_period;
6763
6764/* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
6765#define ROAM_OFFLOAD_PMK_BYTES (32)
6766#define ROAM_OFFLOAD_PSK_MSK_BYTES (32)
6767#define ROAM_OFFLOAD_KRK_BYTES (16)
6768#define ROAM_OFFLOAD_BTK_BYTES (32)
6769#define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
6770#define ROAM_OFFLOAD_NUM_MCS_SET (16)
6771
6772/* This TLV will be filled only in case roam offload
6773 * for wpa2-psk/okc/ese/11r is enabled */
6774typedef struct {
6775 A_UINT32 tlv_header;
6776 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
6777 A_UINT32 rssi_cat_gap; /* gap for every category bucket */
6778 A_UINT32 prefer_5g; /* prefer select 5G candidate */
6779 A_UINT32 select_5g_margin;
6780 A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */
6781 A_UINT32 capability;
6782 A_UINT32 ht_caps_info;
6783 A_UINT32 ampdu_param;
6784 A_UINT32 ht_ext_cap;
6785 A_UINT32 ht_txbf;
6786 A_UINT32 asel_cap;
6787 A_UINT32 qos_enabled;
6788 A_UINT32 qos_caps;
6789 A_UINT32 wmm_caps;
6790 A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET >> 2]; /* since this 4 byte aligned,
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306791 * we don't declare it as
6792 * tlv array */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006793} wmi_roam_offload_tlv_param;
6794
6795/* flags for 11i offload */
6796#define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */
6797/* from bit 1 to bit 31 are reserved */
6798
6799#define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
6800 (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306801} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006802
6803#define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
6804 (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306805} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006806
6807#define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \
6808 ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
6809
6810/* This TLV will be filled only in case of wpa-psk/wpa2-psk */
6811typedef struct {
6812 A_UINT32 tlv_header;
6813 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
6814 A_UINT32 flags;
6815 /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
6816 A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES >> 2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
6817 A_UINT32 pmk_len;
6818 /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
6819} wmi_roam_11i_offload_tlv_param;
6820
6821/* This TLV will be filled only in case of 11R*/
6822typedef struct {
6823 A_UINT32 tlv_header;
6824 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
6825 A_UINT32 mdie_present;
6826 A_UINT32 mdid;
6827 A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN >> 2];
6828 A_UINT32 r0kh_id_len;
6829 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 */
6830 A_UINT32 psk_msk_len;
6831 /**length of psk_msk*/
6832} wmi_roam_11r_offload_tlv_param;
6833
6834/* This TLV will be filled only in case of ESE */
6835typedef struct {
6836 A_UINT32 tlv_header;
6837 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
6838 A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES >> 2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
6839 A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES >> 2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
6840} wmi_roam_ese_offload_tlv_param;
6841
6842/** WMI_ROAM_EVENT: roam event triggering the host roam logic.
6843 * generated when ever a better AP is found in the recent roam scan (or)
6844 * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
6845 * from the current AP.
6846 */
6847typedef struct {
6848 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */
6849 /** unique id identifying the VDEV, generated by the caller */
6850 A_UINT32 vdev_id;
6851 /** reason for roam event */
6852 A_UINT32 reason;
6853 /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI*/
6854 A_UINT32 rssi;
6855
6856} wmi_roam_event_fixed_param;
6857
Nirav Shah439e6262015-11-05 10:53:18 +05306858/* roam_reason: bits 0-3 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006859#define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
6860#define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */
6861#define WMI_ROAM_REASON_DEAUTH 0x2 /** deauth/disassoc received */
6862#define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */
6863#define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306864 SSID and Security profile in
6865 WMI_ROAM_AP_PROFILE, found during scan
6866 triggered upon FINAL_BMISS **/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006867#define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */
Nirav Shah439e6262015-11-05 10:53:18 +05306868/* reserved up through 0xF */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006869
Nirav Shah439e6262015-11-05 10:53:18 +05306870/* subnet status: bits 4-5 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006871typedef enum {
6872 WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
6873 WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
6874 WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
6875} wmi_roam_subnet_change_status;
6876
Nirav Shah439e6262015-11-05 10:53:18 +05306877#define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30
6878#define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4
6879
6880#define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
6881 do { \
6882 (roam_reason) |= \
6883 (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
6884 WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
6885 } while (0)
6886
6887#define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
6888 (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
6889 WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
6890
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006891/**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
6892 * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations
6893 */
6894typedef struct {
6895 A_UINT32 tlv_header;
6896 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
6897 A_UINT32 vdev_id;
6898 /**unique id identifying the VDEV, generated by the caller*/
6899 A_UINT32 num_ric_request;
6900 /**number of ric request ie send to firmware.(max value is 2 now)*/
6901 A_UINT32 is_add_ric;
6902 /**support add ric or delete ric*/
6903} wmi_ric_request_fixed_param;
6904
6905/**tspec element: refer to 8.4.2.32 of 802.11 2012 spec
6906 * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
6907 */
6908typedef struct {
6909 A_UINT32 tlv_header;
6910 A_UINT32 ts_info; /** bits value of TS Info field.*/
6911 A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/
6912 A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/
6913 A_UINT32 min_service_interval; /**The Minimum Service Interval field*/
6914 A_UINT32 max_service_interval; /**The Maximum Service Interval field*/
6915 A_UINT32 inactivity_interval; /**The Inactivity Interval field*/
6916 A_UINT32 suspension_interval; /**The Suspension Interval field*/
6917 A_UINT32 svc_start_time; /**The Service Start Time field*/
6918 A_UINT32 min_data_rate; /**The Minimum Data Rate field*/
6919 A_UINT32 mean_data_rate; /**The Mean Data Rate field*/
6920 A_UINT32 peak_data_rate; /**The Peak Data Rate field*/
6921 A_UINT32 max_burst_size; /**The Burst Size field*/
6922 A_UINT32 delay_bound; /**The Delay Bound field*/
6923 A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/
6924 A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
6925 A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/
6926} wmi_ric_tspec;
6927
6928/* flags for roam_invoke_cmd */
6929/* add this channel into roam cache channel list after this command is finished */
6930#define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0
6931/* from bit 1 to bit 31 are reserved */
6932
6933#define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
6934 (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306935 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006936
6937#define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
6938 (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306939 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006940
6941#define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306942 ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006943
6944
6945#define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */
6946#define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */
6947#define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */
6948
6949#define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */
6950#define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */
6951
6952/** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
6953 *
6954 * if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
6955 * if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
6956 *
6957 * This command can be used to add specific channel into roam cached channel list by following
6958 * <roam_scan_ch_mode> = 0
6959 * <roam_ap_sel_mode> = 0
6960 * <roam_delay> = 0
6961 * <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
6962 * <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
6963 * <channel_no> = channel list to be added
6964 */
6965typedef struct {
6966 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
6967 A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
6968 A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
6969 A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
6970 A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
6971 A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
6972 A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
6973 A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */
6974 /**
6975 * TLV (tag length value ) parameters follows roam_invoke_req
6976 * The TLV's are:
6977 * A_UINT32 channel_list[];
6978 * wmi_mac_addr bssid_list[];
6979 */
6980} wmi_roam_invoke_cmd_fixed_param;
6981
6982/* Definition for op_bitmap */
6983enum {
6984 ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1,
6985 ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2,
6986 ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
6987};
6988
6989typedef struct {
6990 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
6991 A_UINT32 tlv_header;
6992 /** Unique id identifying the VDEV on which roaming filter is adopted */
6993 A_UINT32 vdev_id;
6994 A_UINT32 flags; /** flags for filter */
6995 /** 32 bit bitmap to be set on.
6996 * bit0 = first param,
6997 * bit 1 = second param...etc. Can be or'ed
6998 */
6999 A_UINT32 op_bitmap;
7000 /* number of blacklist in the TLV variable bssid_black_list */
7001 A_UINT32 num_bssid_black_list;
7002 /* number of whitelist in the TLV variable ssid_white_list */
7003 A_UINT32 num_ssid_white_list;
7004 /* only for lfr 3.0. number of preferred list & factor in the TLV */
7005 A_UINT32 num_bssid_preferred_list;
7006 /**
7007 * TLV (tag length value ) parameters follows roam_filter_list_cmd
7008 * The TLV's are:
7009 * wmi_mac_addr bssid_black_list[];
7010 * wmi_ssid ssid_white_list[];
7011 * wmi_mac_addr bssid_preferred_list[];
7012 * A_UINT32 bssid_preferred_factor[];
7013 */
7014} wmi_roam_filter_fixed_param;
7015
7016typedef struct {
7017 A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
7018} WMI_IPV4_ADDR;
7019
7020typedef struct _WMI_IPV6_ADDR {
7021 A_UINT8 address[16]; /* IPV6 in Network Byte Order */
7022} WMI_IPV6_ADDR;
7023
7024/* flags for subnet change detection */
7025#define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
7026#define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
7027/* bit 2 to bit 31 are reserved */
7028
7029/* set IPv4 enabled/disabled flag and get the flag */
7030#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
7031 (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
7032} while (0)
7033
7034#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
7035 (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
7036} while (0)
7037
7038#define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
7039 ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
7040
7041/* set IPv6 enabled flag, disabled and get the flag */
7042#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
7043 (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
7044} while (0)
7045
7046#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
7047 (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
7048} while (0)
7049
7050#define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
7051 ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
7052
7053/**
7054 * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
7055 * to FW. FW uses these parameters for subnet change detection.
7056 */
7057typedef struct {
7058 /*
7059 * TLV tag and len; tag equals
7060 * WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param
7061 */
7062 A_UINT32 tlv_header;
7063 /** unique id identifying the VDEV, generated by the caller */
7064 A_UINT32 vdev_id;
7065 /** IPv4/IPv6 enabled/disabled */
7066 /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/
7067 DISABLED */
7068 A_UINT32 flag;
7069 /** Gateway MAC address */
7070 wmi_mac_addr inet_gw_mac_addr;
7071 /** IP addresses */
7072 WMI_IPV4_ADDR inet_gw_ip_v4_addr;
7073 WMI_IPV6_ADDR inet_gw_ip_v6_addr;
7074 /** Number of software retries for ARP/Neighbor solicitation request */
7075 A_UINT32 max_retries;
7076 /** timeout in milliseconds for each ARP request*/
7077 A_UINT32 timeout;
7078 /** number of skipped aps **/
7079 A_UINT32 num_skip_subnet_change_detection_bssid_list;
7080/**
7081 * TLV (tag length value ) parameters follows roam_subnet_change_config_cmd
7082 * structure. The TLV's are:
7083 * wmi_mac_addr skip_subnet_change_detection_bssid_list [];
7084 **/
7085} wmi_roam_subnet_change_config_fixed_param;
7086
7087/** WMI_PROFILE_MATCH_EVENT: offload scan
7088 * generated when ever atleast one of the matching profiles is found
7089 * in recent NLO scan. no data is carried with the event.
7090 */
7091
7092/** P2P specific commands */
7093
7094/**
7095 * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
7096 * FW to generate P2P IE tobe carried in probe response frames.
7097 * FW will respond to probe requests while in listen state.
7098 */
7099typedef struct {
7100 /* number of secondary device types,supported */
7101 A_UINT32 num_secondary_dev_types;
7102 /**
7103 * followed by 8 bytes of primary device id and
7104 * num_secondary_dev_types * 8 bytes of secondary device
7105 * id.
7106 */
7107} wmi_p2p_dev_set_device_info;
7108
7109/** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
7110 * state. if enabled, an active STA/AP will respond to P2P probe requests on
7111 * the operating channel of the VDEV.
7112 */
7113
7114typedef struct {
7115 /* 1:enable disoverability, 0:disable discoverability */
7116 A_UINT32 enable_discoverability;
7117} wmi_p2p_set_discoverability;
7118
7119/** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
7120 * beacons generated by FW. used in FW beacon mode.
7121 * the FW will add this IE to beacon in addition to the beacon
7122 * template set by WMI_BCN_TMPL_CMDID command.
7123 */
7124typedef struct {
7125 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */
7126 /** unique id identifying the VDEV, generated by the caller */
7127 A_UINT32 vdev_id;
7128 /* ie length */
7129 A_UINT32 ie_buf_len;
7130 /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
7131 * A_UINT8 ie_data[]; // length in byte given by field num_data.
7132 */
7133
7134} wmi_p2p_go_set_beacon_ie_fixed_param;
7135
7136/** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
7137 * probe response generated by FW. used in FW beacon mode.
7138 * the FW will add this IE to probe response in addition to the probe response
7139 * template set by WMI_PRB_TMPL_CMDID command.
7140 */
7141typedef struct {
7142 /** unique id identifying the VDEV, generated by the caller */
7143 A_UINT32 vdev_id;
7144 /* ie length */
7145 A_UINT32 ie_buf_len;
7146 /*followed by byte stream of ie data of length ie_buf_len */
7147} wmi_p2p_go_set_probe_resp_ie;
7148
7149/** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
7150 * be used by the FW to parse the P2P NoA attribute in beacons, probe resposes
7151 * and action frames received by the P2P Client.
7152 */
7153typedef struct {
7154 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
7155 /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */
7156 A_UINT32 p2p_ie_oui_type;
7157 /** OS specific NoA Attribute ID */
7158 A_UINT32 p2p_noa_attribute;
7159} wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
7160
7161/*----P2P disc offload definition ----*/
7162
7163typedef struct {
7164 A_UINT32 pattern_type;
7165 /**
7166 * TLV (tag length value ) paramerters follow the pattern structure.
7167 * TLV can contain bssid list, ssid list and
7168 * ie. the TLV tags are defined above;
7169 */
7170} wmi_p2p_disc_offload_pattern_cmd;
7171
7172typedef struct {
7173 /* unique id identifying the VDEV, generated by the caller */
7174 A_UINT32 vdev_id;
7175 /* mgmt type of the ie */
7176 A_UINT32 mgmt_type;
7177 /* ie length */
7178 A_UINT32 ie_buf_len;
7179 /*followed by byte stream of ie data of length ie_buf_len */
7180} wmi_p2p_disc_offload_appie_cmd;
7181
7182typedef struct {
7183 /* enable/disable p2p find offload */
7184 A_UINT32 enable;
7185 /* unique id identifying the VDEV, generated by the caller */
7186 A_UINT32 vdev_id;
7187 /* p2p find type */
7188 A_UINT32 disc_type;
7189 /* p2p find perodic */
7190 A_UINT32 perodic;
7191 /* p2p find listen channel */
7192 A_UINT32 listen_channel;
7193 /* p2p find full channel number */
7194 A_UINT32 num_scan_chans;
7195 /**
7196 * TLV (tag length value ) paramerters follow the pattern structure.
7197 * TLV contain channel list
7198 */
7199} wmi_p2p_disc_offload_config_cmd;
7200
7201/*----P2P OppPS definition ----*/
7202typedef struct {
7203 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */
7204 A_UINT32 tlv_header;
7205 /* unique id identifying the VDEV, generated by the caller */
7206 A_UINT32 vdev_id;
7207 /* OppPS attributes */
7208 /** Bit 0: Indicate enable/disable of OppPS
7209 * Bits 7-1: Ctwindow in TUs
7210 * Bits 31-8: Reserved
7211 */
7212 A_UINT32 oppps_attr;
7213} wmi_p2p_set_oppps_cmd_fixed_param;
7214
7215#define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1
7216#define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0
7217
7218#define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \
7219 WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
7220
7221#define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \
7222 WMI_F_RMW((hdr)->oppps_attr, 0x1, \
7223 WMI_UNIFIED_OPPPS_ATTR_ENALBED);
7224
7225#define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe
7226#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1
7227
7228#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \
7229 WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
7230
7231#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \
7232 WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \
7233 WMI_UNIFIED_OPPPS_ATTR_CTWIN);
7234
7235typedef struct {
7236 A_UINT32 time32; /* upper 32 bits of time stamp */
7237 A_UINT32 time0; /* lower 32 bits of time stamp */
7238} A_TIME64;
7239
7240typedef enum wmi_peer_sta_kickout_reason {
7241 WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */
7242 WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
7243 WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
7244 WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
7245 WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */
7246 WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
7247} PEER_KICKOUT_REASON;
7248
7249typedef struct {
7250 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */
7251 /** peer mac address */
7252 wmi_mac_addr peer_macaddr;
7253 /** Reason code, defined as above */
7254 A_UINT32 reason;
7255 /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
7256 A_UINT32 rssi;
7257} wmi_peer_sta_kickout_event_fixed_param;
7258
7259#define WMI_WLAN_PROFILE_MAX_HIST 3
7260#define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
7261
7262typedef struct _wmi_wlan_profile_t {
7263 A_UINT32 tlv_header;
7264 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
7265 A_UINT32 id;
7266 A_UINT32 cnt;
7267 A_UINT32 tot;
7268 A_UINT32 min;
7269 A_UINT32 max;
7270 A_UINT32 hist_intvl;
7271 A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
7272} wmi_wlan_profile_t;
7273
7274typedef struct _wmi_wlan_profile_ctx_t {
7275 A_UINT32 tlv_header;
7276 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
7277 A_UINT32 tot; /* time in us */
7278 A_UINT32 tx_msdu_cnt;
7279 A_UINT32 tx_mpdu_cnt;
7280 A_UINT32 tx_ppdu_cnt;
7281 A_UINT32 rx_msdu_cnt;
7282 A_UINT32 rx_mpdu_cnt;
7283 A_UINT32 bin_count;
7284} wmi_wlan_profile_ctx_t;
7285
7286typedef struct {
7287 A_UINT32 tlv_header;
7288 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
7289 A_UINT32 enable;
7290} wmi_wlan_profile_trigger_cmd_fixed_param;
7291
7292typedef struct {
7293 A_UINT32 tlv_header;
7294 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
7295 A_UINT32 value;
7296} wmi_wlan_profile_get_prof_data_cmd_fixed_param;
7297
7298typedef struct {
7299 A_UINT32 tlv_header;
7300 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
7301 A_UINT32 profile_id;
7302 A_UINT32 value;
7303} wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
7304
7305typedef struct {
7306 A_UINT32 tlv_header;
7307 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
7308 A_UINT32 profile_id;
7309 A_UINT32 enable;
7310} wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
7311
7312/*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
7313 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
7314 when comparing wifi header.*/
7315/* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
7316#define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146
7317#define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
7318#define WOW_DEFAULT_BITMASK_SIZE 146
7319#define WOW_DEFAULT_BITMASK_SIZE_DWORD 37
7320#define WOW_MAX_BITMAP_FILTERS 32
7321#define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16
7322#define WOW_EXTEND_PATTERN_MATCH_CNT 16
7323#define WOW_SHORT_PATTERN_MATCH_CNT 8
7324#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 +05307325 The 148 comes from (128 - 14 ) payload size + 8bytes LLC + 26bytes MAC header */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007326#define WOW_DEFAULT_IOAC_PATTERN_SIZE 6
7327#define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
7328#define WOW_DEFAULT_IOAC_RANDOM_SIZE 6
7329#define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
7330#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120
7331#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
7332#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32
7333#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
7334#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32
7335#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08007336#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128
7337#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007338
7339typedef enum pattern_type_e {
7340 WOW_PATTERN_MIN = 0,
7341 WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
7342 WOW_IPV4_SYNC_PATTERN,
7343 WOW_IPV6_SYNC_PATTERN,
7344 WOW_WILD_CARD_PATTERN,
7345 WOW_TIMER_PATTERN,
7346 WOW_MAGIC_PATTERN,
7347 WOW_IPV6_RA_PATTERN,
7348 WOW_IOAC_PKT_PATTERN,
7349 WOW_IOAC_TMR_PATTERN,
7350 WOW_IOAC_SOCK_PATTERN,
7351 WOW_PATTERN_MAX
7352} WOW_PATTERN_TYPE;
7353
7354typedef enum event_type_e {
7355 WOW_BMISS_EVENT = 0,
7356 WOW_BETTER_AP_EVENT,
7357 WOW_DEAUTH_RECVD_EVENT,
7358 WOW_MAGIC_PKT_RECVD_EVENT,
7359 WOW_GTK_ERR_EVENT,
7360 WOW_FOURWAY_HSHAKE_EVENT,
7361 WOW_EAPOL_RECVD_EVENT,
7362 WOW_NLO_DETECTED_EVENT,
7363 WOW_DISASSOC_RECVD_EVENT,
7364 WOW_PATTERN_MATCH_EVENT,
7365 WOW_CSA_IE_EVENT,
7366 WOW_PROBE_REQ_WPS_IE_EVENT,
7367 WOW_AUTH_REQ_EVENT,
7368 WOW_ASSOC_REQ_EVENT,
7369 WOW_HTT_EVENT,
7370 WOW_RA_MATCH_EVENT,
7371 WOW_HOST_AUTO_SHUTDOWN_EVENT,
7372 WOW_IOAC_MAGIC_EVENT,
7373 WOW_IOAC_SHORT_EVENT,
7374 WOW_IOAC_EXTEND_EVENT,
7375 WOW_IOAC_TIMER_EVENT,
7376 WOW_DFS_PHYERR_RADAR_EVENT,
7377 WOW_BEACON_EVENT,
7378 WOW_CLIENT_KICKOUT_EVENT,
7379 WOW_NAN_EVENT,
7380 WOW_EXTSCAN_EVENT,
7381 WOW_IOAC_REV_KA_FAIL_EVENT,
7382 WOW_IOAC_SOCK_EVENT,
7383 WOW_NLO_SCAN_COMPLETE_EVENT,
7384} WOW_WAKE_EVENT_TYPE;
7385
7386typedef enum wake_reason_e {
7387 WOW_REASON_UNSPECIFIED = -1,
7388 WOW_REASON_NLOD = 0,
7389 WOW_REASON_AP_ASSOC_LOST,
7390 WOW_REASON_LOW_RSSI,
7391 WOW_REASON_DEAUTH_RECVD,
7392 WOW_REASON_DISASSOC_RECVD,
7393 WOW_REASON_GTK_HS_ERR,
7394 WOW_REASON_EAP_REQ,
7395 WOW_REASON_FOURWAY_HS_RECV,
7396 WOW_REASON_TIMER_INTR_RECV,
7397 WOW_REASON_PATTERN_MATCH_FOUND,
7398 WOW_REASON_RECV_MAGIC_PATTERN,
7399 WOW_REASON_P2P_DISC,
7400 WOW_REASON_WLAN_HB,
7401 WOW_REASON_CSA_EVENT,
7402 WOW_REASON_PROBE_REQ_WPS_IE_RECV,
7403 WOW_REASON_AUTH_REQ_RECV,
7404 WOW_REASON_ASSOC_REQ_RECV,
7405 WOW_REASON_HTT_EVENT,
7406 WOW_REASON_RA_MATCH,
7407 WOW_REASON_HOST_AUTO_SHUTDOWN,
7408 WOW_REASON_IOAC_MAGIC_EVENT,
7409 WOW_REASON_IOAC_SHORT_EVENT,
7410 WOW_REASON_IOAC_EXTEND_EVENT,
7411 WOW_REASON_IOAC_TIMER_EVENT,
7412 WOW_REASON_ROAM_HO,
7413 WOW_REASON_DFS_PHYERR_RADADR_EVENT,
7414 WOW_REASON_BEACON_RECV,
7415 WOW_REASON_CLIENT_KICKOUT_EVENT,
7416 WOW_REASON_NAN_EVENT,
7417 WOW_REASON_EXTSCAN,
7418 WOW_REASON_RSSI_BREACH_EVENT,
7419 WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
7420 WOW_REASON_IOAC_SOCK_EVENT,
7421 WOW_REASON_NLO_SCAN_COMPLETE,
7422 WOW_REASON_PACKET_FILTER_MATCH,
7423 WOW_REASON_ASSOC_RES_RECV,
7424 WOW_REASON_REASSOC_REQ_RECV,
7425 WOW_REASON_REASSOC_RES_RECV,
7426 WOW_REASON_ACTION_FRAME_RECV,
Manikandan Mohan130eb572015-12-23 13:53:34 -08007427 WOW_REASON_BPF_ALLOW,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007428 WOW_REASON_DEBUG_TEST = 0xFF,
7429} WOW_WAKE_REASON_TYPE;
7430
7431typedef enum {
7432 WOW_IFACE_PAUSE_ENABLED,
7433 WOW_IFACE_PAUSE_DISABLED
7434} WOW_IFACE_STATUS;
7435
7436enum {
7437 /* some win10 platfrom will not assert pcie_reset for wow.*/
7438 WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001,
7439};
7440
7441
7442typedef struct {
7443 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */
7444 A_UINT32 enable;
7445 A_UINT32 pause_iface_config;
7446 A_UINT32 flags; /* WMI_WOW_FLAG enums */
7447} wmi_wow_enable_cmd_fixed_param;
7448
7449typedef struct {
7450 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */
7451 /** Reserved for future use */
7452 A_UINT32 reserved0;
7453} wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
7454
7455#define WOW_ICMPV6_NA_FILTER_DISABLE 0
7456#define WOW_ICMPV6_NA_FILTER_ENABLE 1
7457
7458typedef struct {
7459 /* TLV tag and len;
7460 * tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param
7461 */
7462 A_UINT32 tlv_header;
7463 A_UINT32 vdev_id;
7464 A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
7465} wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
7466
7467typedef struct bitmap_pattern_s {
7468 A_UINT32 tlv_header;
7469 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
7470 A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
7471 A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
7472 A_UINT32 pattern_offset;
7473 A_UINT32 pattern_len;
7474 A_UINT32 bitmask_len;
7475 A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
7476} WOW_BITMAP_PATTERN_T;
7477
7478typedef struct ipv4_sync_s {
7479 A_UINT32 tlv_header;
7480 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
7481 A_UINT32 ipv4_src_addr;
7482 A_UINT32 ipv4_dst_addr;
7483 A_UINT32 tcp_src_prt;
7484 A_UINT32 tcp_dst_prt;
7485} WOW_IPV4_SYNC_PATTERN_T;
7486
7487typedef struct ipv6_sync_s {
7488 A_UINT32 tlv_header;
7489 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
7490 A_UINT32 ipv6_src_addr[4];
7491 A_UINT32 ipv6_dst_addr[4];
7492 A_UINT32 tcp_src_prt;
7493 A_UINT32 tcp_dst_prt;
7494} WOW_IPV6_SYNC_PATTERN_T;
7495
7496typedef struct WOW_MAGIC_PATTERN_CMD {
7497 A_UINT32 tlv_header;
7498 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
7499 wmi_mac_addr macaddr;
7500} WOW_MAGIC_PATTERN_CMD;
7501
7502typedef enum wow_ioac_pattern_type {
7503 WOW_IOAC_MAGIC_PATTERN = 1,
7504 WOW_IOAC_SHORT_PATTERN,
7505 WOW_IOAC_EXTEND_PATTERN,
7506} WOW_IOAC_PATTERN_TYPE;
7507
7508typedef struct ioac_sock_pattern_s {
7509 /**
7510 * TLV tag and len;
7511 * tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T
7512 */
7513 A_UINT32 tlv_header;
7514 A_UINT32 id;
7515 A_UINT32 local_ipv4;
7516 A_UINT32 remote_ipv4;
7517 A_UINT32 local_port;
7518 A_UINT32 remote_port;
7519 A_UINT32 pattern_len; /* units = bytes */
7520 A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08007521 WMI_IPV6_ADDR local_ipv6;
7522 WMI_IPV6_ADDR remote_ipv6;
7523 A_UINT32 ack_nak_len;
7524 A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
7525 A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007526} WOW_IOAC_SOCK_PATTERN_T;
7527
7528typedef struct ioac_pkt_pattern_s {
7529 A_UINT32 tlv_header;
7530 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
7531 A_UINT32 pattern_type;
7532 A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
7533 A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
7534 A_UINT32 pattern_len;
7535 A_UINT32 random_len;
7536} WOW_IOAC_PKT_PATTERN_T;
7537
7538typedef struct ioac_tmr_pattern_s {
7539 A_UINT32 tlv_header;
7540 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
7541 A_UINT32 wake_in_s;
7542 A_UINT32 vdev_id;
7543} WOW_IOAC_TMR_PATTERN_T;
7544
7545typedef struct {
7546 A_UINT32 tlv_header;
7547 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
7548 A_UINT32 nID;
7549} WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
7550
7551typedef struct {
7552 A_UINT32 tlv_header;
7553 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
7554 A_UINT32 nID;
7555} WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
7556
7557typedef struct ioac_keepalive_s {
7558 A_UINT32 tlv_header;
7559 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
7560 A_UINT32
7561 keepalive_pkt_buf
7562 [WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
7563 A_UINT32 keepalive_pkt_len;
7564 A_UINT32 period_in_ms;
7565 A_UINT32 vdev_id;
7566 A_UINT32 max_loss_cnt;
7567 A_UINT32 local_ipv4;
7568 A_UINT32 remote_ipv4;
7569 A_UINT32 local_port;
7570 A_UINT32 remote_port;
7571 A_UINT32 recv_period_in_ms;
7572 A_UINT32 rev_ka_size;
7573 A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08007574 WMI_IPV6_ADDR local_ipv6;
7575 WMI_IPV6_ADDR remote_ipv6;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007576} WMI_WOW_IOAC_KEEPALIVE_T;
7577
7578typedef struct {
7579 A_UINT32 tlv_header;
7580 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
7581 A_UINT32 vdev_id;
7582 A_UINT32 pattern_type;
7583/*
7584 * Following this struct are these TLVs. Note that they are all array of structures
7585 * but can have at most one element. Which TLV is empty or has one element depends
7586 * on the field pattern_type. This is to emulate an union.
7587 * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
7588 * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
7589 */
7590} WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
7591
7592typedef struct {
7593 A_UINT32 tlv_header;
7594 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
7595 A_UINT32 vdev_id;
7596 A_UINT32 pattern_type;
7597 A_UINT32 pattern_id;
7598} WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
7599
7600typedef struct {
7601 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
7602 A_UINT32 vdev_id;
7603 A_UINT32 pattern_id;
7604 A_UINT32 pattern_type;
7605 /*
7606 * Following this struct are these TLVs. Note that they are all array of structures
7607 * but can have at most one element. Which TLV is empty or has one element depends
7608 * on the field pattern_type. This is to emulate an union.
7609 * WOW_BITMAP_PATTERN_T pattern_info_bitmap[];
7610 * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[];
7611 * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[];
7612 * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[];
7613 * A_UINT32 pattern_info_timeout[];
7614 * A_UINT32 ra_ratelimit_interval;
7615 */
7616} WMI_WOW_ADD_PATTERN_CMD_fixed_param;
7617
7618typedef struct {
7619 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
7620 A_UINT32 vdev_id;
7621 A_UINT32 pattern_id;
7622 A_UINT32 pattern_type;
7623} WMI_WOW_DEL_PATTERN_CMD_fixed_param;
7624
7625typedef struct {
7626 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */
7627 A_UINT32 vdev_id;
7628 A_UINT32 is_add;
7629 A_UINT32 event_bitmap;
7630} WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
7631
7632/*
7633 * This structure is used to set the pattern to check UDP packet in WOW mode.
7634 * If match, construct a tx frame in a local buffer to send through the peer
7635 * AP to the entity in the IP network that sent the UDP packet to this STA.
7636 */
7637typedef struct {
7638 /*
7639 * TLV tag and len;
7640 * tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param
7641 */
7642 A_UINT32 tlv_header;
7643 A_UINT32 vdev_id;
7644 A_UINT32 enable; /* 1: enable, 0: disable */
7645 /*
7646 * dest_port -
7647 * bits 7:0 contain the LSB of the UDP dest port,
7648 * bits 15:8 contain the MSB of the UDP dest port
7649 */
7650 A_UINT32 dest_port;
7651 A_UINT32 pattern_len; /* length in byte of pattern[] */
7652 A_UINT32 response_len; /* length in byte of response[] */
7653 /*
7654 * Following this struct are the TLV's:
7655 * payload of UDP packet to be checked, network byte order
7656 * A_UINT8 pattern[];
7657 * payload of UDP packet to be response, network byte order
7658 * A_UINT8 response[];
7659 */
7660} WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
7661
7662/*
7663 * This structure is used to set the pattern for WOW host wakeup pin pulse
7664 * pattern confirguration.
7665 */
7666typedef struct {
7667 /*
7668 * TLV tag and len; tag equals
7669 * WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param
7670 */
7671 A_UINT32 tlv_header;
7672
7673 /* 1: enable, 0: disable */
7674 A_UINT32 enable;
7675
7676 /* pin for host wakeup */
7677 A_UINT32 pin;
7678
7679 /* interval for keeping low voltage, unit: ms */
7680 A_UINT32 interval_low;
7681
7682 /* interval for keeping high voltage, unit: ms */
7683 A_UINT32 interval_high;
7684
7685 /* repeat times for pulse (0xffffffff means forever) */
7686 A_UINT32 repeat_cnt;
7687} WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
7688
7689typedef struct wow_event_info_s {
7690 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */
7691 A_UINT32 vdev_id;
7692 A_UINT32 flag; /*This is current reserved. */
7693 A_INT32 wake_reason;
7694 A_UINT32 data_len;
7695} WOW_EVENT_INFO_fixed_param;
7696
7697typedef struct wow_initial_wakeup_event_s {
7698 /*
7699 * TLV tag and len; tag equals
7700 * WOW_INITIAL_WAKEUP_EVENT_fixed_param
7701 */
7702 A_UINT32 tlv_header;
7703 A_UINT32 vdev_id;
7704} WOW_INITIAL_WAKEUP_EVENT_fixed_param;
7705
7706typedef enum {
7707 WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
7708 WOW_EVENT_INFO_TYPE_BITMAP,
7709 WOW_EVENT_INFO_TYPE_GTKIGTK,
7710} WOW_EVENT_INFO_TYPE;
7711
7712typedef struct wow_event_info_section_s {
7713 A_UINT32 data_type;
7714 A_UINT32 data_len;
7715} WOW_EVENT_INFO_SECTION;
7716
7717typedef struct wow_event_info_section_packet_s {
7718 A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
7719} WOW_EVENT_INFO_SECTION_PACKET;
7720
7721typedef struct wow_event_info_section_bitmap_s {
7722 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */
7723 A_UINT32 flag; /*This is current reserved. */
7724 A_UINT32 value; /*This could be the pattern id for bitmap pattern. */
7725 A_UINT32 org_len; /*The length of the orginal packet. */
7726} WOW_EVENT_INFO_SECTION_BITMAP;
7727
7728/**
7729 * This command is sent from WLAN host driver to firmware to
7730 * enable or disable D0-WOW. D0-WOW means APSS suspend with
7731 * PCIe link and DDR being active.
7732 *
7733 *
7734 * Entering D0-WOW Mode (based on kernel suspend request):
7735 * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
7736 * target: Take action (e.g. dbglog suspend)
7737 * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
7738 *
7739 * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
7740 * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
7741 * target: Take action (e.g. dbglog resume)
7742 * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
7743 *
7744 * This command is applicable only on the PCIE LL systems
7745 * Host can enter either D0-WOW or WOW mode, but NOT both at same time
7746 * Decision to enter D0-WOW or WOW is based on active interfaces
7747 *
7748 */
7749typedef struct {
7750 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */
7751 A_UINT32 enable; /* 1 = enable, 0 = disable */
7752} wmi_d0_wow_enable_disable_cmd_fixed_param;
7753
7754typedef enum extend_wow_type_e {
7755 EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */
7756 EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */
7757 EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08007758 EXTWOW_TYPE_APP_PULSETEST,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007759 EXTWOW_DISABLED = 255,
7760} EXTWOW_TYPE;
7761
7762typedef struct {
7763 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */
7764 A_UINT32 vdev_id;
7765 A_UINT32 type;
7766 A_UINT32 wakeup_pin_num;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08007767 A_UINT32 swol_pulsetest_type;
7768 A_UINT32 swol_pulsetest_application;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007769} wmi_extwow_enable_cmd_fixed_param;
7770
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08007771#define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
7772#define SWOL_INDOOR_KEY_LEN 16
7773
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007774typedef struct {
7775 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */
7776 A_UINT32 vdev_id;
7777 wmi_mac_addr wakee_mac;
7778 A_UINT8 ident[8];
7779 A_UINT8 passwd[16];
7780 A_UINT32 ident_len;
7781 A_UINT32 passwd_len;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08007782
7783 /* indoor check parameters */
7784 /* key for mac addresses specified in swol_indoor_key_mac
7785 * Big-endian hosts need to byte-swap the bytes within each 4-byte
7786 * segment of this array, so the bytes will return to their original
7787 * order when the entire WMI message contents are byte-swapped to
7788 * convert from big-endian to little-endian format.
7789 */
7790 A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
7791 /* key length for specified mac address index
7792 * Big-endian hosts need to byte-swap the bytes within each 4-byte
7793 * segment of this array, so the bytes will return to their original
7794 * order when the entire WMI message contents are byte-swapped to
7795 * convert from big-endian to little-endian format.
7796 */
7797 A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
7798 /* mac address array allowed to wakeup host*/
7799 wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
7800 /* app mask for the mac addresses specified in swol_indoor_key_mac */
7801 A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
7802 A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
7803 A_UINT32 swol_indoor_pw_check; /* whether to check password */
7804 A_UINT32 swol_indoor_pattern; /* wakeup pattern */
7805 A_UINT32 swol_indoor_exception; /* wakeup when exception happens */
7806 A_UINT32 swol_indoor_exception_app;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007807} wmi_extwow_set_app_type1_params_cmd_fixed_param;
7808
7809typedef struct {
7810 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */
7811 A_UINT32 vdev_id;
7812
7813 A_UINT8 rc4_key[16];
7814 A_UINT32 rc4_key_len;
7815
7816 /** ip header parameter */
7817 A_UINT32 ip_id; /* NC id */
7818 A_UINT32 ip_device_ip; /* NC IP address */
7819 A_UINT32 ip_server_ip; /* Push server IP address */
7820
7821 /** tcp header parameter */
7822 A_UINT16 tcp_src_port; /* NC TCP port */
7823 A_UINT16 tcp_dst_port; /* Push server TCP port */
7824 A_UINT32 tcp_seq;
7825 A_UINT32 tcp_ack_seq;
7826
7827 A_UINT32 keepalive_init; /* Initial ping interval */
7828 A_UINT32 keepalive_min; /* Minimum ping interval */
7829 A_UINT32 keepalive_max; /* Maximum ping interval */
7830 A_UINT32 keepalive_inc; /* Increment of ping interval */
7831
7832 wmi_mac_addr gateway_mac;
7833 A_UINT32 tcp_tx_timeout_val;
7834 A_UINT32 tcp_rx_timeout_val;
7835
7836 /** add extra parameter for backward-compatible */
7837 /*
7838 * For all byte arrays, natural order is used. E.g.
7839 * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
7840 * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
7841 */
7842
7843 /* used to encrypt transmit packet such as keep-alive */
7844 A_UINT8 rc4_write_sandbox[256];
7845 A_UINT32 rc4_write_x;
7846 A_UINT32 rc4_write_y;
7847
7848 /* used to decrypt received packet such as wow data */
7849 A_UINT8 rc4_read_sandbox[256];
7850 A_UINT32 rc4_read_x;
7851 A_UINT32 rc4_read_y;
7852
7853 /* used to caculate HMAC hash for transmit packet such as keep-alive */
7854 A_UINT8 ssl_write_seq[8];
7855 A_UINT8 ssl_sha1_write_key[64];
7856 A_UINT32 ssl_sha1_write_key_len;
7857
7858 /* used to calculate HAMC hash for receive packet such as wow data */
7859 A_UINT8 ssl_read_seq[8];
7860 A_UINT8 ssl_sha1_read_key[64];
7861 A_UINT32 ssl_sha1_read_key_len;
7862
7863 /* optional element for specifying TCP options data to include in
7864 * transmit packets such as keep-alive
7865 */
7866 A_UINT32 tcp_options_len;
7867 A_UINT8 tcp_options[40];
7868
7869 A_UINT32 async_id; /* keep-alive request id */
7870} wmi_extwow_set_app_type2_params_cmd_fixed_param;
7871
7872#define WMI_RXERR_CRC 0x01 /* CRC error on frame */
7873#define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
7874#define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */
7875#define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
7876
7877typedef enum {
7878 PKT_PWR_SAVE_PAID_MATCH = 0x0001,
7879 PKT_PWR_SAVE_GID_MATCH = 0x0002,
7880 PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x0004,
7881 PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x0008,
7882 PKT_PWR_SAVE_EOF_PAD_DELIM = 0x0010,
7883 PKT_PWR_SAVE_MACADDR_MISMATCH = 0x0020,
7884 PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x0040,
7885 PKT_PWR_SAVE_GID_NSTS_ZERO = 0x0080,
7886 PKT_PWR_SAVE_RSSI_CHECK = 0x0100,
7887 PKT_PWR_SAVE_5G_EBT = 0x0200,
7888 PKT_PWR_SAVE_2G_EBT = 0x0400,
7889 WMI_PKT_PWR_SAVE_MAX = 0x0800,
7890} WMI_PKT_PWR_SAVE_TYPE;
7891
7892typedef struct {
7893 A_UINT32 tlv_header;
7894 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
7895 A_UINT32 num_data;
7896 /** length in byte of data[]. */
7897 /* This structure is used to send Factory Test Mode [FTM] command
7898 * from host to firmware for integrated chips which are binary blobs.
7899 * Following this structure is the TLV:
7900 * A_UINT8 data[]; // length in byte given by field num_data.
7901 */
7902} wmi_ftm_intg_cmd_fixed_param;
7903
7904typedef struct {
7905 A_UINT32 tlv_header;
7906 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
7907 A_UINT32 num_data;
7908 /** length in byte of data[]. */
7909 /* This structure is used to receive Factory Test Mode [FTM] event
7910 * from firmware to host for integrated chips which are binary blobs.
7911 * Following this structure is the TLV:
7912 * A_UINT8 data[]; // length in byte given by field num_data.
7913 */
7914} wmi_ftm_intg_event_fixed_param;
7915
7916#define WMI_MAX_NS_OFFLOADS 2
7917#define WMI_MAX_ARP_OFFLOADS 2
7918
7919#define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
7920#define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
7921#define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
7922
7923typedef struct {
7924 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
7925 A_UINT32 flags; /* flags */
7926 A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node */
7927 A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
7928 wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
7929} WMI_ARP_OFFLOAD_TUPLE;
7930
7931#define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
7932#define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
7933#define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
7934
7935#define WMI_NSOFF_MAX_TARGET_IPS 2
7936
7937typedef struct {
7938 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
7939 A_UINT32 flags; /* flags */
7940 /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
7941 WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */
7942 WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
7943 WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
7944 wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
7945} WMI_NS_OFFLOAD_TUPLE;
7946
7947typedef struct {
7948 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
7949 A_UINT32 flags;
7950 A_UINT32 vdev_id;
7951 A_UINT32 num_ns_ext_tuples;
7952 /* Following this structure are the TLVs:
7953 * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS];
7954 * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
7955 * size of ns_ext_tuples is based on num_ns_ext_tuples
7956 * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[];
7957 */
7958} WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
7959
7960typedef struct {
7961 A_UINT32 tlv_header;
7962 A_UINT32 vdev_id;
7963 A_UINT32 pattern_id;
7964 A_UINT32 timeout;
7965 A_UINT32 length;
7966 /* Following this would be the pattern
7967 A_UINT8 pattern[] of length specifed by length
7968 field in the structure. */
7969} WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
7970
7971typedef struct {
7972 A_UINT32 tlv_header;
7973 A_UINT32 vdev_id;
7974 A_UINT32 pattern_id;
7975} WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
7976
7977typedef struct {
7978 A_UINT32 tlv_header;
7979 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
7980 /** unique id identifying the VDEV, generated by the caller */
7981 A_UINT32 vdev_id;
7982 /** peer MAC address */
7983 wmi_mac_addr peer_macaddr;
7984 /** Tid number */
7985 A_UINT32 tid;
7986 /** Initiator (1) or Responder (0) for this aggregation */
7987 A_UINT32 initiator;
7988 /** size of the negotiated window */
7989 A_UINT32 window_size;
7990 /** starting sequence number (only valid for initiator) */
7991 A_UINT32 ssn;
7992 /** timeout field represents the time to wait for Block Ack in
7993 * initiator case and the time to wait for BAR in responder
7994 * case. 0 represents no timeout. */
7995 A_UINT32 timeout;
7996 /* BA policy: immediate ACK (0) or delayed ACK (1) */
7997 A_UINT32 policy;
7998} wmi_peer_tid_addba_cmd_fixed_param;
7999
8000typedef struct {
8001 A_UINT32 tlv_header;
8002 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
8003 /** unique id identifying the VDEV, generated by the caller */
8004 A_UINT32 vdev_id;
8005 /** peer MAC address */
8006 wmi_mac_addr peer_macaddr;
8007 /** Tid number */
8008 A_UINT32 tid;
8009 /** Initiator (1) or Responder (0) for this aggregation */
8010 A_UINT32 initiator;
8011} wmi_peer_tid_delba_cmd_fixed_param;
8012
8013typedef struct {
8014 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
8015 /** unique id identifying the VDEV, generated by the caller */
8016 A_UINT32 vdev_id;
8017 /** peer MAC address */
8018 wmi_mac_addr peer_macaddr;
8019 /** Tid number */
8020 A_UINT32 tid;
8021 /** Event status */
8022 A_UINT32 status;
8023} wmi_tx_addba_complete_event_fixed_param;
8024
8025typedef struct {
8026 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
8027 /** unique id identifying the VDEV, generated by the caller */
8028 A_UINT32 vdev_id;
8029 /** peer MAC address */
8030 wmi_mac_addr peer_macaddr;
8031 /** Tid number */
8032 A_UINT32 tid;
8033 /** Event status */
8034 A_UINT32 status;
8035} wmi_tx_delba_complete_event_fixed_param;
8036/*
8037 * Structure to request sequence numbers for a given
8038 * peer station on different TIDs. The TIDs are
8039 * indicated in the tidBitMap, tid 0 would
8040 * be represented by LSB bit 0. tid 1 would be
8041 * represented by LSB bit 1 etc.
8042 * The target will retrieve the current sequence
8043 * numbers for the peer on all the TIDs requested
8044 * and send back a response in a WMI event.
8045 */
8046typedef struct {
8047 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308048 WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008049 wmi_mac_addr peer_macaddr;
8050 A_UINT32 tidBitmap;
8051} wmi_ba_req_ssn;
8052
8053typedef struct {
8054 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308055 WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008056 /** unique id identifying the VDEV, generated by the caller */
8057 A_UINT32 vdev_id;
8058 /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
8059 A_UINT32 num_ba_req_ssn;
8060/* Following this struc are the TLV's:
8061 * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
8062 */
8063} wmi_ba_req_ssn_cmd_fixed_param;
8064
8065/*
8066 * Max transmit categories
8067 *
8068 * Note: In future if we need to increase WMI_MAX_TC definition
8069 * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
8070 */
8071#define WMI_MAX_TC 8
8072
8073/*
8074 * Structure to send response sequence numbers
8075 * for a give peer and tidmap.
8076 */
8077typedef struct {
8078 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308079 WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008080 wmi_mac_addr peer_macaddr;
8081 /* A bool to indicate if ssn is present */
8082 A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
8083 /* The ssn from target, valid only if
8084 * ssn_present_for_tid[tidn] equals 1
8085 */
8086 A_UINT32 ssn_for_tid[WMI_MAX_TC];
8087} wmi_ba_event_ssn;
8088
8089typedef struct {
8090 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308091 WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008092 /** unique id identifying the VDEV, generated by the caller */
8093 A_UINT32 vdev_id;
8094 /** Event status, success or failure of the overall operation */
8095 A_UINT32 status;
8096 /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
8097 A_UINT32 num_ba_event_ssn;
8098/* Following this struc are the TLV's:
8099 * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
8100 */
8101} wmi_ba_rsp_ssn_event_fixed_param;
8102
8103enum wmi_aggr_state_req_type {
8104 WMI_DISABLE_AGGREGATION,
8105 WMI_ENABLE_AGGREGATION
8106};
8107
8108/*
8109 * This event is generated by the COEX module
8110 * when esco call is begins the coex module in fw genrated this event to host to
8111 * disable the RX aggregation and after completion of the esco call fw will indicate to
8112 * enable back the Rx aggregation .
8113 */
8114
8115typedef struct {
8116 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
8117 /** unique id identifying the VDEV, generated by the caller */
8118 A_UINT32 vdev_id;
8119 /** req_type contains values from enum
8120 * wmi_aggr_state_req_type; 0 (disable) 1(enable) */
8121 A_UINT32 req_type;
8122} wmi_aggr_state_trig_event_fixed_param;
8123
8124typedef struct {
8125 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
8126 /** unique id identifying the VDEV, generated by the caller */
8127 A_UINT32 vdev_id;
8128 /** MAC address used for installing */
8129 wmi_mac_addr peer_macaddr;
8130 /** key index */
8131 A_UINT32 key_ix;
8132 /** key flags */
8133 A_UINT32 key_flags;
8134 /** Event status */
8135 A_UINT32 status;
8136} wmi_vdev_install_key_complete_event_fixed_param;
8137
8138typedef enum _WMI_NLO_AUTH_ALGORITHM {
8139 WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
8140 WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
8141 WMI_NLO_AUTH_ALGO_WPA = 3,
8142 WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
8143 WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
8144 WMI_NLO_AUTH_ALGO_RSNA = 6,
8145 WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
8146} WMI_NLO_AUTH_ALGORITHM;
8147
8148typedef enum _WMI_NLO_CIPHER_ALGORITHM {
8149 WMI_NLO_CIPHER_ALGO_NONE = 0x00,
8150 WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
8151 WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
8152 WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
8153 WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
8154 WMI_NLO_CIPHER_ALGO_BIP = 0x06,
8155 WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
8156 WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
8157 WMI_NLO_CIPHER_ALGO_WEP = 0x101,
8158} WMI_NLO_CIPHER_ALGORITHM;
8159
8160/* SSID broadcast type passed in NLO params */
8161typedef enum _WMI_NLO_SSID_BcastNwType {
8162 WMI_NLO_BCAST_UNKNOWN = 0,
8163 WMI_NLO_BCAST_NORMAL = 1,
8164 WMI_NLO_BCAST_HIDDEN = 2,
8165} WMI_NLO_SSID_BcastNwType;
8166
8167#define WMI_NLO_MAX_SSIDS 16
8168#define WMI_NLO_MAX_CHAN 48
8169
8170#define WMI_NLO_CONFIG_STOP (0x1 << 0)
8171#define WMI_NLO_CONFIG_START (0x1 << 1)
8172#define WMI_NLO_CONFIG_RESET (0x1 << 2)
8173#define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4)
8174#define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5)
8175#define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6)
8176/* This bit is used to indicate if EPNO or supplicant PNO is enabled. Only
8177 * one of them can be enabled at a given time */
8178#define WMI_NLO_CONFIG_ENLO (0x1 << 7)
8179#define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8)
Govind Singh42f71542016-03-14 16:32:33 +05308180#define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008181
8182/* Whether directed scan needs to be performed (for hidden SSIDs) */
8183#define WMI_ENLO_FLAG_DIRECTED_SCAN 1
8184/* Whether PNO event shall be triggered if the network is found on A band */
8185#define WMI_ENLO_FLAG_A_BAND 2
8186/* Whether PNO event shall be triggered if the network is found on G band */
8187#define WMI_ENLO_FLAG_G_BAND 4
8188/* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
8189#define WMI_ENLO_FLAG_STRICT_MATCH 8
8190/* Code for matching the beacon AUTH IE - additional codes TBD open */
8191#define WMI_ENLO_AUTH_CODE_OPEN 1
8192/* WPA_PSK or WPA2PSK */
8193#define WMI_ENLO_AUTH_CODE_PSK 2
8194/* any EAPOL */
8195#define WMI_ENLO_AUTH_CODE_EAPOL 4
8196
8197/* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
8198typedef struct wmi_nlo_ssid_param {
8199 A_UINT32 valid;
8200 wmi_ssid ssid;
8201} wmi_nlo_ssid_param;
8202
8203/* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
8204typedef struct wmi_nlo_enc_param {
8205 A_UINT32 valid;
8206 A_UINT32 enc_type;
8207} wmi_nlo_enc_param;
8208
8209/* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
8210typedef struct wmi_nlo_auth_param {
8211 A_UINT32 valid;
8212 A_UINT32 auth_type;
8213} wmi_nlo_auth_param;
8214
8215/* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
8216typedef struct wmi_nlo_bcast_nw_param {
8217 A_UINT32 valid;
8218 /**
8219 * If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value
8220 * should be true/false.Otherwise EPNO is enabled. bcast_nw_type would be used
8221 * as a bit flag contains WMI_ENLO_FLAG_XXX
8222 */
8223 A_UINT32 bcast_nw_type;
8224} wmi_nlo_bcast_nw_param;
8225
8226/* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
8227typedef struct wmi_nlo_rssi_param {
8228 A_UINT32 valid;
8229 A_INT32 rssi;
8230} wmi_nlo_rssi_param;
8231
8232typedef struct nlo_configured_parameters {
8233 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
8234 wmi_nlo_ssid_param ssid;
8235 wmi_nlo_enc_param enc_type;
8236 wmi_nlo_auth_param auth_type;
8237 wmi_nlo_rssi_param rssi_cond;
8238 wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
8239} nlo_configured_parameters;
8240
8241/* Support channel prediction for PNO scan after scanning top_k_num channels
8242 * if stationary_threshold is met.
8243 */
8244typedef struct nlo_channel_prediction_cfg {
8245 A_UINT32 tlv_header;
8246 /* Enable or disable this feature. */
8247 A_UINT32 enable;
8248 /* Top K channels will be scanned before deciding whether to further
8249 * scan or stop. Minimum value is 3 and maximum is 5. */
8250 A_UINT32 top_k_num;
8251 /* Preconfigured stationary threshold. Lesser value means more
8252 * conservative. Bigger value means more aggressive.
8253 * Maximum is 100 and mininum is 0. */
8254 A_UINT32 stationary_threshold;
8255 /* Periodic full channel scan in milliseconds unit.
8256 * After full_scan_period_ms since last full scan, channel prediction
8257 * scan is suppressed and will do full scan.
8258 * This is to help detecting sudden AP power-on or -off.
8259 * Value 0 means no full scan at all (not recommended).
8260 */
8261 A_UINT32 full_scan_period_ms;
8262} nlo_channel_prediction_cfg;
8263
Govind Singh42f71542016-03-14 16:32:33 +05308264typedef struct enlo_candidate_score_params_t {
8265 /*
8266 * TLV tag and len;
8267 * tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param
8268 */
8269 A_UINT32 tlv_header;
8270 /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
8271 A_INT32 min5GHz_rssi;
8272 /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
8273 A_INT32 min24GHz_rssi;
8274 /* the maximum score that a network can have before bonuses */
8275 A_UINT32 initial_score_max;
8276 /* current_connection_bonus:
8277 * only report when there is a network's score this much higher
8278 * than the current connection
8279 */
8280 A_UINT32 current_connection_bonus;
8281 /* score bonus for all networks with the same network flag */
8282 A_UINT32 same_network_bonus;
8283 /* score bonus for networks that are not open */
8284 A_UINT32 secure_bonus;
8285 /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
8286 A_UINT32 band5GHz_bonus;
8287} enlo_candidate_score_params;
8288
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008289typedef struct wmi_nlo_config {
8290 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
8291 A_UINT32 flags;
8292 A_UINT32 vdev_id;
8293 A_UINT32 fast_scan_max_cycles;
8294 A_UINT32 active_dwell_time;
8295 A_UINT32 passive_dwell_time; /* PDT in msecs */
8296 A_UINT32 probe_bundle_size;
8297 A_UINT32 rest_time; /* ART = IRT */
8298 A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
8299 A_UINT32 scan_backoff_multiplier; /* SBM */
8300 A_UINT32 fast_scan_period; /* SCBM */
8301 A_UINT32 slow_scan_period; /* specific to windows */
8302 A_UINT32 no_of_ssids;
8303 A_UINT32 num_of_channels;
8304 A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
8305 /* The TLVs will follow.
8306 * nlo_configured_parameters nlo_list[];
8307 * A_UINT32 channel_list[];
8308 * nlo_channel_prediction_cfg ch_prediction_cfg;
Govind Singh42f71542016-03-14 16:32:33 +05308309 * enlo_candidate_score_params candidate_score_params;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008310 */
8311
8312} wmi_nlo_config_cmd_fixed_param;
8313
8314typedef struct wmi_nlo_event {
8315 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
8316 A_UINT32 vdev_id;
8317} wmi_nlo_event;
8318
8319/* WMI_PASSPOINT_CONFIG_SET
8320 * Sets a list for passpoint networks for PNO purposes;
8321 * it should be matched against any passpoint networks found
8322 * during regular PNO scan.
8323 */
8324#define WMI_PASSPOINT_CONFIG_SET (0x1 << 0)
8325/* WMI_PASSPOINT_CONFIG_RESET
8326 * Reset passpoint network list -
8327 * no Passpoint networks should be matched after this.
8328 */
8329#define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1)
8330#define PASSPOINT_REALM_LEN 256
8331#define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5
8332#define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
8333#define PASSPOINT_PLMN_ID_LEN 3
8334#define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
8335 (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
8336
8337/*
8338 * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
8339 * A_UINT8 realm[PASSPOINT_REALM_LEN]
8340 * array will end on a 4-byte boundary.
8341 * (This 4-byte alignment simplifies endianness-correction byte swapping.)
8342 */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308343A_COMPILE_TIME_ASSERT(check_passpoint_realm_size, (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008344
8345/*
8346 * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
8347 * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
8348 * roaming_consortium_ids array below will end on a 4-byte boundary.
8349 * (This 4-byte alignment simplifies endianness-correction byte swapping.)
8350 */
8351A_COMPILE_TIME_ASSERT(check_passpoint_roaming_consortium_ids_size,
8352((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
8353
8354/* wildcard ID to allow an action (reset) to apply to all networks */
8355#define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
8356typedef struct wmi_passpoint_config {
8357 /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
8358 A_UINT32 tlv_header;
8359 /* (network) id
8360 * identifier of the matched network, report this in event
8361 * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
8362 * that indicates the action should be applied to all networks.
8363 * Currently, the only action that is applied to all networks is "reset".
8364 * If a non-wildcard ID is specified, that particular network is configured.
8365 * If a wildcard ID is specified, all networks are reset.
8366 */
8367 A_UINT32 id;
8368 A_UINT32 req_id;
8369 /*null terminated UTF8 encoded realm, 0 if unspecified*/
8370 A_UINT8 realm[PASSPOINT_REALM_LEN];
8371 /*roaming consortium ids to match, 0s if unspecified*/
8372 A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN];
8373 /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
8374 /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
8375 A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN];
8376} wmi_passpoint_config_cmd_fixed_param;
8377
8378typedef struct {
8379 A_UINT32 tlv_header; /* TLV tag and len; tag equals
8380wmi_passpoint_event_hdr */
8381 A_UINT32 id; /* identifier of the matched network */
8382 A_UINT32 vdev_id;
8383 A_UINT32 timestamp; /* time since boot (in microsecond) when the
8384result was retrieved*/
8385 wmi_ssid ssid;
8386 wmi_mac_addr bssid; /* bssid of the network */
8387 A_UINT32 channel_mhz; /* channel frequency in MHz */
8388 A_UINT32 rssi; /* rssi value */
8389 A_UINT32 rtt; /* timestamp in nanoseconds*/
8390 A_UINT32 rtt_sd; /* standard deviation in rtt */
8391 A_UINT32 beacon_period; /* beacon advertised in the beacon */
8392 A_UINT32 capability; /* capabilities advertised in the beacon */
8393 A_UINT32 ie_length; /* size of the ie_data blob */
8394 A_UINT32 anqp_length; /* length of ANQP blob */
8395 /**
8396 * Following this structure is the byte stream of ie data of length ie_buf_len:
8397 * A_UINT8 ie_data[]; // length in byte given by field ie_length, blob of ie data in beacon
8398 * A_UINT8 anqp_ie[]; // length in byte given by field anqp_len, blob of anqp data of IE
8399 * Implicitly, combing ie_data and anqp_ie into a single bufp, and the bytes
8400 * stream of each ie should be same as BEACON/Action-frm by 802.11 spec
8401 */
8402} wmi_passpoint_event_hdr;
8403
8404#define GTK_OFFLOAD_OPCODE_MASK 0xFF000000
8405/** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
8406#define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000
8407/** Disable GTK offload */
8408#define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000
8409/** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
8410#define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000
8411enum wmi_chatter_mode {
8412 /* Chatter enter/exit happens
8413 * automatically based on preset
8414 * params
8415 */
8416 WMI_CHATTER_MODE_AUTO,
8417 /* Chatter enter is triggered
8418 * manually by the user
8419 */
8420 WMI_CHATTER_MODE_MANUAL_ENTER,
8421 /* Chatter exit is triggered
8422 * manually by the user
8423 */
8424 WMI_CHATTER_MODE_MANUAL_EXIT,
8425 /* Placeholder max value, always last */
8426 WMI_CHATTER_MODE_MAX
8427};
8428
8429enum wmi_chatter_query_type {
8430 /*query coalescing filter match counter */
8431 WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
8432 WMI_CHATTER_QUERY_MAX
8433};
8434
8435typedef struct {
8436 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */
8437 A_UINT32 chatter_mode;
8438} wmi_chatter_set_mode_cmd_fixed_param;
8439
8440/** maximum number of filter supported*/
8441#define CHATTER_MAX_COALESCING_RULES 11
8442/** maximum number of field tests per filter*/
8443#define CHATTER_MAX_FIELD_TEST 5
8444/** maximum field length in number of DWORDS*/
8445#define CHATTER_MAX_TEST_FIELD_LEN32 2
8446
8447/** field test kinds*/
8448#define CHATTER_COALESCING_TEST_EQUAL 1
8449#define CHATTER_COALESCING_TEST_MASKED_EQUAL 2
8450#define CHATTER_COALESCING_TEST_NOT_EQUAL 3
8451
8452/** packet type*/
8453#define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0)
8454#define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1)
8455#define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2)
8456
8457/** coalescing field test*/
8458typedef struct _chatter_pkt_coalescing_hdr_test {
8459 /** offset from start of mac header, for windows native wifi host driver
8460 * should assume standard 802.11 frame format without QoS info and address4
8461 * FW would account for any non-stand fields for final offset value.
8462 */
8463 A_UINT32 offset;
8464 A_UINT32 length; /* length of test field */
8465 A_UINT32 test; /*equal, not equal or masked equal */
8466 A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream */
8467 A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream */
8468} chatter_pkt_coalescing_hdr_test;
8469
8470/** packet coalescing filter*/
8471typedef struct _chatter_pkt_coalescing_filter {
8472 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
8473 A_UINT32 filter_id; /*unique id assigned by OS */
8474 A_UINT32 max_coalescing_delay; /*max miliseconds 1st pkt can be hold */
8475 A_UINT32 pkt_type; /*unicast/multicast/broadcast */
8476 A_UINT32 num_of_test_field; /*number of field test in table */
8477 chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /*field test tbl */
8478} chatter_pkt_coalescing_filter;
8479
8480/** packet coalescing filter add command*/
8481typedef struct {
8482 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
8483 A_UINT32 num_of_filters;
8484 /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
8485 chatter_pkt_coalescing_filter rx_filter[1]; */
8486} wmi_chatter_coalescing_add_filter_cmd_fixed_param;
8487/** packet coalescing filter delete command*/
8488typedef struct {
8489 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
8490 A_UINT32 filter_id; /*filter id which will be deleted */
8491} wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
8492/** packet coalescing query command*/
8493typedef struct {
8494 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
8495 A_UINT32 type; /*type of query */
8496} wmi_chatter_coalescing_query_cmd_fixed_param;
8497/** chatter query reply event*/
8498typedef struct {
8499 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */
8500 A_UINT32 type; /*query type */
8501 A_UINT32 filter_match_cnt; /*coalescing filter match counter */
8502} wmi_chatter_query_reply_event_fixed_param;
8503
8504/* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
8505 * cannot be changed without breaking WMI compatibility. */
8506#define GTK_OFFLOAD_KEK_BYTES 16
8507#define GTK_OFFLOAD_KCK_BYTES 16
8508/* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
8509#define GTK_REPLAY_COUNTER_BYTES 8
8510#define WMI_MAX_KEY_LEN 32
8511#define IGTK_PN_SIZE 6
8512
8513typedef struct {
8514 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
8515 A_UINT32 vdev_id;
8516 /** unique id identifying the VDEV */
8517 A_UINT32 flags; /* status flags */
8518 A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
8519 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
8520 A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
8521 A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
8522 A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
8523 A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
8524} WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
8525
8526typedef struct {
8527 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
8528 A_UINT32 vdev_id; /** unique id identifying the VDEV */
8529 A_UINT32 flags; /* control flags, GTK offload command use high byte */
8530 /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
8531 A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
8532 A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
8533 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
8534} WMI_GTK_OFFLOAD_CMD_fixed_param;
8535
8536typedef struct {
8537 /* TLV tag and len; tag equals
8538 * WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param
8539 */
8540 A_UINT32 tlv_header;
8541 A_UINT32 vdev_id;
8542 A_UINT32 sa_query_retry_interval; /* in msec */
8543 A_UINT32 sa_query_max_retry_count;
8544} WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
8545
8546typedef enum {
8547 WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
8548 WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
8549 WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK */
8550 /* gratuitous ARP req*/
8551 WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4,
8552} WMI_STA_KEEPALIVE_METHOD;
8553
8554typedef struct {
8555 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
8556 WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
8557 WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
8558 wmi_mac_addr dest_mac_addr; /* destination MAC address */
8559} WMI_STA_KEEPALVE_ARP_RESPONSE;
8560
8561typedef struct {
8562 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
8563 A_UINT32 vdev_id;
8564 A_UINT32 enable; /* 1 - Enable, 0 - disable */
8565 A_UINT32 method; /* keep alive method */
8566 A_UINT32 interval; /* time interval in seconds */
8567 /*
8568 * NOTE: following this structure is the TLV for ARP Resonse:
8569 * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; // ARP response
8570 */
8571} WMI_STA_KEEPALIVE_CMD_fixed_param;
8572
8573typedef struct {
8574 A_UINT32 tlv_header;
8575 A_UINT32 vdev_id;
8576 A_UINT32 action;
8577} WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
8578typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
8579
8580typedef struct {
8581 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
8582 A_UINT32 vdev_id;
8583 A_UINT32 keepaliveInterval; /* seconds */
8584 A_UINT32 keepaliveMethod;
8585} wmi_vdev_set_keepalive_cmd_fixed_param;
8586
8587typedef struct {
8588 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
8589 A_UINT32 vdev_id;
8590} wmi_vdev_get_keepalive_cmd_fixed_param;
8591
8592typedef struct {
8593 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
8594 A_UINT32 vdev_id;
8595 A_UINT32 keepaliveInterval; /* seconds */
8596 A_UINT32 keepaliveMethod; /* seconds */
8597} wmi_vdev_get_keepalive_event_fixed_param;
8598
8599#define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
8600#define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
8601
8602typedef struct {
8603 A_UINT32 tlv_header;
8604 A_UINT32 vdev_id;
8605 A_UINT32 action;
8606} WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
8607
8608typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param
8609WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
8610
8611typedef struct {
8612 A_UINT32 tlv_header;
8613 A_UINT32 vdev_id;
8614 A_UINT32 mcc_tbttmode;
8615 wmi_mac_addr mcc_bssid;
8616} wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
8617
8618typedef struct {
8619 A_UINT32 tlv_header;
8620 A_UINT32 vdev_id; /* home vdev id */
8621 A_UINT32 meas_token; /* from measure request frame */
8622 A_UINT32 dialog_token;
8623 A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
8624 A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst */
8625 A_UINT32 burst_cycle; /* times cycle through within one burst */
8626 A_UINT32 tx_power; /* for path frame */
8627 A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */
8628 wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
8629 A_UINT32 num_chans;
8630} wmi_vdev_plmreq_start_cmd_fixed_param;
8631
8632typedef struct {
8633 A_UINT32 tlv_header;
8634 A_UINT32 vdev_id;
8635 A_UINT32 meas_token; /* same value from req */
8636} wmi_vdev_plmreq_stop_cmd_fixed_param;
8637
8638typedef struct {
8639 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */
8640 A_UINT32 tlv_header;
8641 /* unique id identifying the VDEV, generated by the caller */
8642 A_UINT32 vdev_id;
8643 /* enable/disable NoA */
8644 A_UINT32 enable;
8645 /** number of NoA desc. In the TLV noa_descriptor[] */
8646 A_UINT32 num_noa;
8647 /**
8648 * TLV (tag length value ) paramerters follow the pattern structure.
8649 * TLV contain NoA desc with num of num_noa
8650 */
8651} wmi_p2p_set_noa_cmd_fixed_param;
8652
8653typedef struct {
8654 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */
8655 A_UINT32 tlv_header;
8656 /* unique id identifying the VDEV, generated by the caller */
8657 A_UINT32 vdev_id;
8658 /* Identify the wlan module */
8659 A_UINT32 module_id;
8660 /* Num of test arguments passed */
8661 A_UINT32 num_args;
8662/**
8663 * TLV (tag length value ) parameters follow the wmi_roam_chan_list
8664 * structure. The TLV's are:
8665 * A_UINT32 args[];
8666 **/
8667} wmi_unit_test_cmd_fixed_param;
8668
8669/** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
8670 * after it received WMI_ROAM_SYNCH_EVENTID.
8671 */
8672typedef struct {
8673 A_UINT32 tlv_header;
8674 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
8675 /** unique id identifying the VDEV, generated by the caller */
8676 A_UINT32 vdev_id;
8677} wmi_roam_synch_complete_fixed_param;
8678
8679typedef enum {
8680 RECOVERY_SIM_ASSERT = 0x01,
8681 RECOVERY_SIM_NO_DETECT = 0x02,
8682 RECOVERY_SIM_CTR_EP_FULL = 0x03,
8683 RECOVERY_SIM_EMPTY_POINT = 0x04,
8684 RECOVERY_SIM_STACK_OV = 0x05,
8685 RECOVERY_SIM_INFINITE_LOOP = 0x06,
8686 RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
8687 RECOVERY_SIM_SELF_RECOVERY = 0x08,
8688} RECOVERY_SIM_TYPE;
8689
8690/* WMI_FORCE_FW_HANG_CMDID */
8691typedef struct {
8692 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
8693 A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:... */
8694 A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms) */
8695} WMI_FORCE_FW_HANG_CMD_fixed_param;
8696#define WMI_MCAST_FILTER_SET 1
8697#define WMI_MCAST_FILTER_DELETE 2
8698typedef struct {
8699 A_UINT32 tlv_header;
8700 A_UINT32 vdev_id;
8701 A_UINT32 index;
8702 A_UINT32 action;
8703 wmi_mac_addr mcastbdcastaddr;
8704} WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
8705
8706/* GPIO Command and Event data structures */
8707
8708/* WMI_GPIO_CONFIG_CMDID */
8709enum {
8710 WMI_GPIO_PULL_NONE,
8711 WMI_GPIO_PULL_UP,
8712 WMI_GPIO_PULL_DOWN,
8713};
8714
8715enum {
8716 WMI_GPIO_INTTYPE_DISABLE,
8717 WMI_GPIO_INTTYPE_RISING_EDGE,
8718 WMI_GPIO_INTTYPE_FALLING_EDGE,
8719 WMI_GPIO_INTTYPE_BOTH_EDGE,
8720 WMI_GPIO_INTTYPE_LEVEL_LOW,
8721 WMI_GPIO_INTTYPE_LEVEL_HIGH
8722};
8723
8724typedef struct {
8725 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
8726 A_UINT32 gpio_num; /* GPIO number to be setup */
8727 A_UINT32 input; /* 0 - Output/ 1 - Input */
8728 A_UINT32 pull_type; /* Pull type defined above */
8729 A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
8730} wmi_gpio_config_cmd_fixed_param;
8731
8732/* WMI_GPIO_OUTPUT_CMDID */
8733typedef struct {
8734 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
8735 A_UINT32 gpio_num; /* GPIO number to be setup */
8736 A_UINT32 set; /* Set the GPIO pin */
8737} wmi_gpio_output_cmd_fixed_param;
8738
8739/* WMI_GPIO_INPUT_EVENTID */
8740typedef struct {
8741 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
8742 A_UINT32 gpio_num; /* GPIO number which changed state */
8743} wmi_gpio_input_event_fixed_param;
8744
8745/* WMI_P2P_DISC_EVENTID */
8746enum {
8747 P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
8748 P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
8749};
8750
8751enum {
8752 P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload */
8753 P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload */
8754 P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload */
8755};
8756
8757enum {
8758 P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
8759 P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
8760};
8761
8762typedef struct {
8763 A_UINT32 vdev_id;
8764 A_UINT32 reason; /* P2P DISC wake up reason */
8765} wmi_p2p_disc_event;
8766
8767typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param
8768WOW_EVENT_INFO_SECTION_GTKIGTK;
8769
8770typedef enum {
8771 WMI_FAKE_TXBFER_SEND_NDPA,
8772 WMI_FAKE_TXBFER_SEND_MU,
8773 WMI_FAKE_TXBFER_NDPA_FBTYPE,
8774 WMI_FAKE_TXBFER_NDPA_NCIDX,
8775 WMI_FAKE_TXBFER_NDPA_POLL,
8776 WMI_FAKE_TXBFER_NDPA_BW,
8777 WMI_FAKE_TXBFER_NDPA_PREAMBLE,
8778 WMI_FAKE_TXBFER_NDPA_RATE,
8779 WMI_FAKE_TXBFER_NDP_BW,
8780 WMI_FAKE_TXBFER_NDP_NSS,
8781 WMI_TXBFEE_ENABLE_UPLOAD_H,
8782 WMI_TXBFEE_ENABLE_CAPTURE_H,
8783 WMI_TXBFEE_SET_CBF_TBL,
8784 WMI_TXBFEE_CBF_TBL_LSIG,
8785 WMI_TXBFEE_CBF_TBL_SIGA1,
8786 WMI_TXBFEE_CBF_TBL_SIGA2,
8787 WMI_TXBFEE_CBF_TBL_SIGB,
8788 WMI_TXBFEE_CBF_TBL_PAD,
8789 WMI_TXBFEE_CBF_TBL_DUR,
8790 WMI_TXBFEE_SU_NCIDX,
8791 WMI_TXBFEE_CBIDX,
8792 WMI_TXBFEE_NGIDX,
8793} WMI_TXBF_PARAM_ID;
8794
8795typedef struct {
8796 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
8797 /** parameter id */
8798 A_UINT32 param_id;
8799 /** parameter value */
8800 A_UINT32 param_value;
8801} wmi_txbf_cmd_fixed_param;
8802
8803typedef struct {
8804 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
8805 A_UINT32 h_length;
8806 A_UINT32 cv_length;
8807 /* This TLV is followed by array of bytes:
8808 * // h_cv info buffer
8809 * A_UINT8 bufp[];
8810 */
8811} wmi_upload_h_hdr;
8812
8813typedef struct {
8814 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
8815 A_UINT32 svd_num;
8816 A_UINT32 tone_num;
8817 A_UINT32 reserved;
8818} wmi_capture_h_event_hdr;
8819
8820typedef struct {
8821 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
8822 A_UINT32 start_freq; /* start frequency, not channel center freq */
8823 A_UINT32 end_freq; /* end frequency */
8824} wmi_avoid_freq_range_desc;
8825
8826typedef struct {
8827 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
8828 /* bad channel range count, multi range is allowed, 0 means all channel clear */
8829 A_UINT32 num_freq_ranges;
8830
8831 /* The TLVs will follow.
8832 * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
8833 * wmi_avoid_freq_range_desc avd_freq_range[]; // message buffer, NULL terminated
8834 */
8835} wmi_avoid_freq_ranges_event_fixed_param;
8836
8837typedef struct {
8838 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */
8839 /** Reserved for future use */
8840 A_UINT32 reserved0;
8841 A_UINT32 vdev_id;
8842} wmi_gtk_rekey_fail_event_fixed_param;
8843
8844enum wmm_ac_downgrade_policy {
8845 WMM_AC_DOWNGRADE_DEPRIO,
8846 WMM_AC_DOWNGRADE_DROP,
8847 WMM_AC_DOWNGRADE_INVALID,
8848};
8849
8850typedef struct {
8851 A_UINT32 tlv_header;
8852 A_UINT32 cwmin;
8853 A_UINT32 cwmax;
8854 A_UINT32 aifs;
8855 A_UINT32 txoplimit;
8856 A_UINT32 acm;
8857 A_UINT32 no_ack;
8858} wmi_wmm_vparams;
8859
8860typedef struct {
8861 A_UINT32 tlv_header;
8862 A_UINT32 vdev_id;
8863 wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
8864} wmi_vdev_set_wmm_params_cmd_fixed_param;
8865
8866typedef struct {
8867 A_UINT32 tlv_header;
8868 A_UINT32 vdev_id;
8869 A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */
8870 A_UINT32 userGtxMask; /* host request for GTX mask */
8871 A_UINT32 gtxPERThreshold; /* default: 10% */
8872 A_UINT32 gtxPERMargin; /* default: 2% */
8873 A_UINT32 gtxTPCstep; /* default: 1 */
8874 A_UINT32 gtxTPCMin; /* default: 5 */
8875 A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */
8876} wmi_vdev_set_gtx_params_cmd_fixed_param;
8877
8878typedef struct {
8879 A_UINT32 tlv_header;
8880 A_UINT32 vdev_id;
8881 A_UINT32 ac;
8882 A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
8883 A_UINT32 downgrade_type;
8884} wmi_vdev_wmm_addts_cmd_fixed_param;
8885
8886typedef struct {
8887 A_UINT32 tlv_header;
8888 A_UINT32 vdev_id;
8889 A_UINT32 ac;
8890} wmi_vdev_wmm_delts_cmd_fixed_param;
8891
8892typedef struct {
8893 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */
8894 /** Reserved for future use */
8895 A_UINT32 reserved0;
8896} wmi_pdev_dfs_enable_cmd_fixed_param;
8897
8898typedef struct {
8899 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_disable_cmd_fixed_param */
8900 /** Reserved for future use */
8901 A_UINT32 reserved0;
8902} wmi_pdev_dfs_disable_cmd_fixed_param;
8903
8904typedef struct {
8905 /** TLV tag and len; tag equals
8906 * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
8907 */
8908 A_UINT32 tlv_header;
8909
8910 /** Reserved for future use */
8911 A_UINT32 reserved0;
8912} wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
8913
8914typedef struct {
8915 /** TLV tag and len; tag equals
8916 * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
8917 */
8918 A_UINT32 tlv_header;
8919 /** Reserved for future use */
8920 A_UINT32 reserved0;
8921} wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
8922
8923/** TDLS COMMANDS */
8924
8925/* WMI_TDLS_SET_STATE_CMDID */
8926/* TDLS State */
8927enum wmi_tdls_state {
8928 /** TDLS disable */
8929 WMI_TDLS_DISABLE,
8930 /** TDLS enabled - no firmware connection tracking/notifications */
8931 WMI_TDLS_ENABLE_PASSIVE,
8932 /** TDLS enabled - with firmware connection tracking/notifications */
8933 WMI_TDLS_ENABLE_ACTIVE,
8934 /* TDLS enabled - firmware waits for peer mac for connection tracking */
8935 WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
8936};
8937
8938/* TDLS Options */
8939#define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */
8940#define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */
8941#define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */
8942
8943typedef struct {
8944 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */
8945 A_UINT32 tlv_header;
8946 /** unique id identifying the VDEV */
8947 A_UINT32 vdev_id;
8948 /** Enable/Disable TDLS (wmi_tdls_state) */
8949 A_UINT32 state;
8950 /* Duration (in ms) over which to calculate tx/rx threshold
8951 * to trigger TDLS Discovery
8952 */
8953 A_UINT32 notification_interval_ms;
8954 /** number of packets OVER which notify/suggest TDLS Discovery:
8955 * if current tx pps counter / notification interval >= threshold
8956 * then a notification will be sent to host to advise TDLS Discovery */
8957 A_UINT32 tx_discovery_threshold;
8958 /** number of packets UNDER which notify/suggest TDLS Teardown:
8959 * if current tx pps counter / notification interval < threshold
8960 * then a notification will be sent to host to advise TDLS Tear down */
8961 A_UINT32 tx_teardown_threshold;
8962 /** Absolute RSSI value under which notify/suggest TDLS Teardown */
8963 A_INT32 rssi_teardown_threshold;
8964 /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
8965 A_INT32 rssi_delta;
8966 /** TDLS Option Control
8967 * Off-Channel, Buffer STA, (later)Sleep STA support */
8968 A_UINT32 tdls_options;
8969 /* Buffering time in number of beacon intervals */
8970 A_UINT32 tdls_peer_traffic_ind_window;
8971 /* Wait time for PTR frame */
8972 A_UINT32 tdls_peer_traffic_response_timeout_ms;
8973 /* Self PUAPSD mask */
8974 A_UINT32 tdls_puapsd_mask;
8975 /* Inactivity timeout */
8976 A_UINT32 tdls_puapsd_inactivity_time_ms;
8977 /* Max of rx frame during SP */
8978 A_UINT32 tdls_puapsd_rx_frame_threshold;
8979 /* Duration (in ms) over which to check whether TDLS link
8980 * needs to be torn down
8981 */
8982 A_UINT32 teardown_notification_ms;
8983 /* STA kickout threshold for TDLS peer */
8984 A_UINT32 tdls_peer_kickout_threshold;
8985} wmi_tdls_set_state_cmd_fixed_param;
8986
8987/* WMI_TDLS_PEER_UPDATE_CMDID */
8988
8989enum wmi_tdls_peer_state {
8990 /** tx peer TDLS link setup now starting, traffic to DA should be
8991 * paused (except TDLS frames) until state is moved to CONNECTED (or
8992 * TEARDOWN on setup failure) */
8993 WMI_TDLS_PEER_STATE_PEERING,
8994 /** tx peer TDLS link established, running (all traffic to DA unpaused) */
8995 WMI_TDLS_PEER_STATE_CONNECTED,
8996 /** tx peer TDLS link tear down started (link paused, any frames
8997 * queued for DA will be requeued back through the AP)*/
8998 WMI_TDLS_PEER_STATE_TEARDOWN,
8999 /* Add peer mac into connection table */
9000 WMI_TDLS_PEER_ADD_MAC_ADDR,
9001 /* Remove peer mac from connection table */
9002 WMI_TDLS_PEER_REMOVE_MAC_ADDR,
9003};
9004
9005/* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
9006#define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
9007typedef struct {
9008 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */
9009 A_UINT32 tlv_header;
9010 /* Peer's QoS Info - for U-APSD */
9011 /* AC FLAGS - accessed through macros below */
9012 /* Ack, SP, More Data Ack - accessed through macros below */
9013 A_UINT32 peer_qos;
9014 /*TDLS Peer's U-APSD Buffer STA Support */
9015 A_UINT32 buff_sta_support;
9016 /*TDLS off channel related params */
9017 A_UINT32 off_chan_support;
9018 A_UINT32 peer_curr_operclass;
9019 A_UINT32 self_curr_operclass;
9020 /* Number of channels available for off channel operation */
9021 A_UINT32 peer_chan_len;
9022 A_UINT32 peer_operclass_len;
9023 A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
9024 /* Is peer initiator or responder of TDLS setup request */
9025 A_UINT32 is_peer_responder;
9026 /* Preferred off channel number as configured by user */
9027 A_UINT32 pref_offchan_num;
9028 /* Preferred off channel bandwidth as configured by user */
9029 A_UINT32 pref_offchan_bw;
9030
9031 /** Followed by the variable length TLV peer_chan_list:
9032 * wmi_channel peer_chan_list[].
9033 * Array size would be peer_chan_len.
9034 * This array is intersected channels which is supported by both peer
9035 * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
9036 * FW shall compute BW for an offchan based on peer's ht/vht cap
9037 * received in peer_assoc cmd during change STA operation
9038 */
9039} wmi_tdls_peer_capabilities;
9040
9041#define WMI_TDLS_QOS_VO_FLAG 0
9042#define WMI_TDLS_QOS_VI_FLAG 1
9043#define WMI_TDLS_QOS_BK_FLAG 2
9044#define WMI_TDLS_QOS_BE_FLAG 3
9045#define WMI_TDLS_QOS_ACK_FLAG 4
9046#define WMI_TDLS_QOS_SP_FLAG 5
9047#define WMI_TDLS_QOS_MOREDATA_FLAG 7
9048
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309049#define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009050 (ppeer_caps)->peer_qos |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309051} while (0)
9052#define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009053 (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
9054
9055#define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
9056 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
9057#define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
9058 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
9059#define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
9060 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
9061#define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
9062 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
9063#define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
9064 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
9065#define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
9066 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
9067#define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
9068 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
9069#define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
9070 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
9071#define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
9072 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
9073#define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
9074 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
9075/* SP has 2 bits */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309076#define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009077 (ppeer_caps)->peer_qos |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309078} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009079#define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
9080 (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
9081
9082#define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
9083 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
9084#define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
9085 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
9086
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309087#define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009088 (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309089} while (0)
9090#define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009091 (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
9092
9093#define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
9094 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
9095#define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
9096 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
9097#define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
9098 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
9099#define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
9100 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
9101#define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
9102 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
9103#define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
9104 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
9105#define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
9106 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
9107#define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
9108 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
9109#define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
9110 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
9111#define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
9112 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
9113/* SP has 2 bits */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309114#define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009115 (pset_cmd)->tdls_puapsd_mask |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309116} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009117#define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
9118 (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
9119
9120#define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
9121 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
9122#define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
9123 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
9124
9125typedef struct {
9126 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */
9127 A_UINT32 tlv_header;
9128 /** unique id identifying the VDEV */
9129 A_UINT32 vdev_id;
9130 /** peer MAC address */
9131 wmi_mac_addr peer_macaddr;
9132 /** new TDLS state for peer (wmi_tdls_peer_state) */
9133 A_UINT32 peer_state;
9134 /* The TLV for wmi_tdls_peer_capabilities will follow.
9135 * wmi_tdls_peer_capabilities peer_caps;
9136 */
9137 /** Followed by the variable length TLV chan_info:
9138 * wmi_channel chan_info[] */
9139} wmi_tdls_peer_update_cmd_fixed_param;
9140
9141/* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
9142
9143/* bitmap 20, 40, 80 or 160 MHz wide channel */
9144#define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */
9145#define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */
9146#define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */
9147#define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */
9148
9149enum wmi_tdls_offchan_mode {
9150 WMI_TDLS_ENABLE_OFFCHANNEL,
9151 WMI_TDLS_DISABLE_OFFCHANNEL
9152};
9153
9154typedef struct {
9155 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */
9156 A_UINT32 tlv_header;
9157 /** unique id identifying the VDEV */
9158 A_UINT32 vdev_id;
9159 /** Enable/Disable TDLS offchannel */
9160 A_UINT32 offchan_mode;
9161 /** peer MAC address */
9162 wmi_mac_addr peer_macaddr;
9163 /* Is peer initiator or responder of TDLS setup request */
9164 A_UINT32 is_peer_responder;
9165 /* off channel number */
9166 A_UINT32 offchan_num;
9167 /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
9168 A_UINT32 offchan_bw_bitmap;
9169 /* operating class for offchan */
9170 A_UINT32 offchan_oper_class;
9171} wmi_tdls_set_offchan_mode_cmd_fixed_param;
9172
9173/** TDLS EVENTS */
9174enum wmi_tdls_peer_notification {
9175 /** tdls discovery recommended for peer (based
9176 * on tx bytes per second > tx_discover threshold) */
9177 WMI_TDLS_SHOULD_DISCOVER,
9178 /** tdls link tear down recommended for peer
9179 * due to tx bytes per second below tx_teardown_threshold
9180 * NB: this notification sent once */
9181 WMI_TDLS_SHOULD_TEARDOWN,
9182 /** tx peer TDLS link tear down complete */
9183 WMI_TDLS_PEER_DISCONNECTED,
9184};
9185
9186enum wmi_tdls_peer_reason {
9187 /** tdls teardown recommended due to low transmits */
9188 WMI_TDLS_TEARDOWN_REASON_TX,
9189 /** tdls link tear down recommended due to poor RSSI */
9190 WMI_TDLS_TEARDOWN_REASON_RSSI,
9191 /** tdls link tear down recommended due to offchannel scan */
9192 WMI_TDLS_TEARDOWN_REASON_SCAN,
9193 /** tdls peer disconnected due to peer deletion */
9194 WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
9195 /** tdls peer disconnected due to PTR timeout */
9196 WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
9197 /** tdls peer disconnected due wrong PTR format */
9198 WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
9199 /** tdls peer not responding */
9200 WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
9201};
9202
9203/* WMI_TDLS_PEER_EVENTID */
9204typedef struct {
9205 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */
9206 A_UINT32 tlv_header;
9207 /** peer MAC address */
9208 wmi_mac_addr peer_macaddr;
9209 /** TDLS peer status (wmi_tdls_peer_notification)*/
9210 A_UINT32 peer_status;
9211 /** TDLS peer reason (wmi_tdls_peer_reason) */
9212 A_UINT32 peer_reason;
9213 /** unique id identifying the VDEV */
9214 A_UINT32 vdev_id;
9215} wmi_tdls_peer_event_fixed_param;
9216
9217/* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
9218 don't use this for any new implementations */
9219typedef struct {
9220 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */
9221 /** unique id identifying the VDEV, generated by the caller */
9222 A_UINT32 vdev_id;
9223 /* New beacon interval to be used for the specified VDEV suggested by firmware */
9224 A_UINT32 new_bcn_intvl;
9225} wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
9226
9227/* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
9228typedef struct {
9229 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
9230 A_UINT32 tlv_header;
9231 /** 1: enable fw based adaptive ocs,
9232 * 0: disable fw based adaptive ocs
9233 */
9234 A_UINT32 enable;
9235 /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
9236 /** The valid range is 0 to (num_macs-1). */
9237 A_UINT32 mac_id;
9238} wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
9239
9240/* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
9241typedef struct {
9242 /* Frequency of the channel for which the quota is set */
9243 A_UINT32 chan_mhz;
9244 /* Requested channel time quota expressed as percentage */
9245 A_UINT32 channel_time_quota;
9246} wmi_resmgr_chan_time_quota;
9247
9248typedef struct {
9249 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
9250 A_UINT32 tlv_header;
9251 /** number of channel time quota command structures
9252 * (wmi_resmgr_chan_time_quota) 1 or 2
9253 */
9254 A_UINT32 num_chans;
9255/* This TLV is followed by another TLV of array of bytes
9256 * A_UINT8 data[];
9257 * This data array contains
9258 * num_chans * size of(struct wmi_resmgr_chan_time_quota)
9259 */
9260} wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
9261
9262/* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
9263typedef struct {
9264 /* Frequency of the channel for which the latency is set */
9265 A_UINT32 chan_mhz;
9266 /* Requested channel latency in milliseconds */
9267 A_UINT32 latency;
9268} wmi_resmgr_chan_latency;
9269
9270typedef struct {
9271 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
9272 A_UINT32 tlv_header;
9273 /** number of channel latency command structures
9274 * (wmi_resmgr_chan_latency) 1 or 2
9275 */
9276 A_UINT32 num_chans;
9277/* This TLV is followed by another TLV of array of bytes
9278 * A_UINT8 data[];
9279 * This data array contains
9280 * num_chans * size of(struct wmi_resmgr_chan_latency)
9281 */
9282} wmi_resmgr_set_chan_latency_cmd_fixed_param;
9283
9284/* WMI_STA_SMPS_FORCE_MODE_CMDID */
9285
9286/** STA SMPS Forced Mode */
9287typedef enum {
9288 WMI_SMPS_FORCED_MODE_NONE = 0,
9289 WMI_SMPS_FORCED_MODE_DISABLED,
9290 WMI_SMPS_FORCED_MODE_STATIC,
9291 WMI_SMPS_FORCED_MODE_DYNAMIC
9292} wmi_sta_smps_forced_mode;
9293
9294typedef struct {
9295 /** TLV tag and len; tag equals
9296 * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
9297 A_UINT32 tlv_header;
9298 /** Unique id identifying the VDEV */
9299 A_UINT32 vdev_id;
9300 /** The mode of SMPS that is to be forced in the FW. */
9301 A_UINT32 forced_mode;
9302} wmi_sta_smps_force_mode_cmd_fixed_param;
9303
9304/** wlan HB commands */
9305#define WMI_WLAN_HB_ITEM_UDP 0x1
9306#define WMI_WLAN_HB_ITEM_TCP 0x2
9307#define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE, must be a multiple of 4 bytes */
9308
9309typedef struct {
9310 /** TLV tag and len; tag equals
9311 * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
9312 A_UINT32 tlv_header;
9313 A_UINT32 vdev_id;
9314 A_UINT32 enable;
9315 A_UINT32 item;
9316 A_UINT32 session;
9317} wmi_hb_set_enable_cmd_fixed_param;
9318
9319typedef struct {
9320 /** TLV tag and len; tag equals
9321 * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
9322 A_UINT32 tlv_header;
9323 A_UINT32 vdev_id;
9324 A_UINT32 srv_ip;
9325 A_UINT32 dev_ip;
9326 A_UINT32 seq;
9327 A_UINT32 src_port;
9328 A_UINT32 dst_port;
9329 A_UINT32 interval;
9330 A_UINT32 timeout;
9331 A_UINT32 session;
9332 wmi_mac_addr gateway_mac;
9333} wmi_hb_set_tcp_params_cmd_fixed_param;
9334
9335typedef struct {
9336 /** TLV tag and len; tag equals
9337 * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
9338 A_UINT32 tlv_header;
9339 A_UINT32 vdev_id;
9340 A_UINT32 length;
9341 A_UINT32 offset;
9342 A_UINT32 session;
9343 A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
9344} wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
9345
9346typedef struct {
9347 /** TLV tag and len; tag equals
9348 * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
9349 A_UINT32 tlv_header;
9350 A_UINT32 vdev_id;
9351 A_UINT32 srv_ip;
9352 A_UINT32 dev_ip;
9353 A_UINT32 src_port;
9354 A_UINT32 dst_port;
9355 A_UINT32 interval;
9356 A_UINT32 timeout;
9357 A_UINT32 session;
9358 wmi_mac_addr gateway_mac;
9359} wmi_hb_set_udp_params_cmd_fixed_param;
9360
9361typedef struct {
9362 /** TLV tag and len; tag equals
9363 * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
9364 A_UINT32 tlv_header;
9365 A_UINT32 vdev_id;
9366 A_UINT32 length;
9367 A_UINT32 offset;
9368 A_UINT32 session;
9369 A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
9370} wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
9371
9372/** wlan HB events */
9373typedef enum {
9374 WMI_WLAN_HB_REASON_UNKNOWN = 0,
9375 WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1,
9376 WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2,
9377} WMI_HB_WAKEUP_REASON;
9378
9379typedef struct {
9380 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
9381 A_UINT32 vdev_id; /* unique id identifying the VDEV */
9382 A_UINT32 session; /* Session ID from driver */
9383 A_UINT32 reason; /* wakeup reason */
9384} wmi_hb_ind_event_fixed_param;
9385
9386/** WMI_STA_SMPS_PARAM_CMDID */
9387typedef enum {
9388 /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
9389 WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
9390 /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
9391 * to enter D-SMPS mode from Stalled-D-SMPS mode */
9392 WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
9393 /** RSSI threshold to disable SMPS modes */
9394 WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
9395 /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
9396 WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
9397 /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
9398 WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
9399 /** Enable/Disable DTIM 1chRx feature */
9400 WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5
9401} wmi_sta_smps_param;
9402
9403typedef struct {
9404 /** TLV tag and len; tag equals
9405 * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
9406 A_UINT32 tlv_header;
9407 /** Unique id identifying the VDEV */
9408 A_UINT32 vdev_id;
9409 /** SMPS parameter (see wmi_sta_smps_param) */
9410 A_UINT32 param;
9411 /** Value of SMPS parameter */
9412 A_UINT32 value;
9413} wmi_sta_smps_param_cmd_fixed_param;
9414
9415typedef struct {
9416 /** TLV tag and len; tag equals
9417 * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
9418 A_UINT32 tlv_header;
9419 /* TX stats */
9420 A_UINT32 txBytesPushed;
9421 A_UINT32 txPacketsPushed;
9422 /* RX stats */
9423 A_UINT32 rxBytesRcvd;
9424 A_UINT32 rxPacketsRcvd;
9425 A_UINT32 rxTimeTotal;
9426 /** peer MAC address */
9427 wmi_mac_addr peer_macaddr;
9428} wmi_mcc_sched_sta_traffic_stats;
9429
9430typedef struct {
9431 /** TLV tag and len; tag equals
9432 * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
9433 A_UINT32 tlv_header;
9434 /** Duration over which the host stats were collected */
9435 A_UINT32 duration;
9436 /** Number of stations filled in following stats array */
9437 A_UINT32 num_sta;
9438 /* Following this struct are the TLVs:
9439 * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
9440 */
9441} wmi_mcc_sched_traffic_stats_cmd_fixed_param;
9442
9443typedef struct {
9444 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
9445 /* unique id identifying the VDEV, generated by the caller */
9446 A_UINT32 vdev_id;
9447 /*Batch scan enable command parameters */
9448 A_UINT32 scanInterval;
9449 A_UINT32 numScan2Batch;
9450 A_UINT32 bestNetworks;
9451 A_UINT32 rfBand;
9452 A_UINT32 rtt;
9453} wmi_batch_scan_enable_cmd_fixed_param;
9454
9455typedef struct {
9456 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */
9457 A_UINT32 supportedMscan;
9458} wmi_batch_scan_enabled_event_fixed_param;
9459
9460typedef struct {
9461 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
9462/* unique id identifying the VDEV, generated by the caller */
9463 A_UINT32 vdev_id;
9464 A_UINT32 param;
9465} wmi_batch_scan_disable_cmd_fixed_param;
9466
9467typedef struct {
9468 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
9469 /** unique id identifying the VDEV, generated by the caller */
9470 A_UINT32 vdev_id;
9471 A_UINT32 param;
9472} wmi_batch_scan_trigger_result_cmd_fixed_param;
9473
9474typedef struct {
9475 A_UINT32 tlv_header;
9476 wmi_mac_addr bssid; /* BSSID */
9477 wmi_ssid ssid; /* SSID */
9478 A_UINT32 ch; /* Channel */
9479 A_UINT32 rssi; /* RSSI or Level */
9480 /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
9481 A_UINT32 timestamp;
9482} wmi_batch_scan_result_network_info;
9483
9484typedef struct {
9485 A_UINT32 tlv_header;
9486 A_UINT32 scanId; /* Scan List ID. */
9487 /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
9488 A_UINT32 numNetworksInScanList;
9489 A_UINT32 netWorkStartIndex; /* indicate the start index of network info */
9490} wmi_batch_scan_result_scan_list;
9491
9492#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.*/
9493#define LPI_IE_BITMAP_IS_PROBE 0x00000002 /*send true or false based on scan response frame being a Probe Rsp or not*/
9494#define LPI_IE_BITMAP_SSID 0x00000004 /*send ssid from received scan response frame*/
9495#define LPI_IE_BITMAP_RSSI 0x00000008 /* end RSSI value reported by HW for the received scan response after adjusting with noise floor*/
9496#define LPI_IE_BITMAP_CHAN 0x00000010 /*send channel number from the received scan response*/
9497#define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* sen Tx power from TPC IE of scan rsp*/
9498#define LPI_IE_BITMAP_TX_RATE 0x00000040 /*send rate of the received frame as reported by HW.*/
9499#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.*/
9500#define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /*send timestamp reported in the received scan rsp frame.*/
9501#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.*/
9502/*
9503 * TEMPORARY alias of incorrect old name the correct name.
9504 * This alias will be removed once all references to the old name have been fixed.
9505 */
9506#define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
9507#define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false.*/
9508#define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP*/
9509#define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled*/
9510#define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device.*/
9511#define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel*/
9512#define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received.*/
9513#define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz*/
9514#define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above*/
9515#define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations*/
9516#define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan*/
9517#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.*/
9518#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*/
9519#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 +05309520/*
9521 * extscan will use this field to indicate to
9522 * LOWI LP whether to report result to context hub or not
9523 */
9524#define LPI_IE_BITMAP_REPORT_CONTEXT_HUB 0x00800000
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009525#define LPI_IE_BITMAP_ALL 0xFFFFFFFF
9526
9527typedef struct {
9528 A_UINT32 tlv_header;
9529 /**A_BOOL indicates LPI mgmt snooping enable/disable*/
9530 A_UINT32 enable;
9531 /**LPI snooping mode*/
9532 A_UINT32 snooping_mode;
9533 /** LPI interested IEs in snooping context */
9534 A_UINT32 ie_bitmap;
9535} wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
9536
9537typedef struct {
9538 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
9539 /** Scan ID */
9540 A_UINT32 scan_id;
9541 /** Scan requestor ID */
9542 A_UINT32 scan_req_id;
9543 /** VDEV id(interface) that is requesting scan */
9544 A_UINT32 vdev_id;
9545 /** LPI interested IEs in scan context */
9546 A_UINT32 ie_bitmap;
9547 /** Scan Priority, input to scan scheduler */
9548 A_UINT32 scan_priority;
9549 /** dwell time in msec on active channels */
9550 A_UINT32 dwell_time_active;
9551 /** dwell time in msec on passive channels */
9552 A_UINT32 dwell_time_passive;
9553 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
9554 A_UINT32 min_rest_time;
9555 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
9556 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
9557 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
9558 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
9559 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
9560 * irrespective of activity. activity is determined by the idle_time parameter.
9561 */
9562 A_UINT32 max_rest_time;
9563 /** time before sending next set of probe requests.
9564 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
9565 * The number of probe requests specified depends on the ssid_list and bssid_list
9566 */
9567 A_UINT32 repeat_probe_time;
9568 /** time in msec between 2 consequetive probe requests with in a set. */
9569 A_UINT32 probe_spacing_time;
9570 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
9571 A_UINT32 idle_time;
9572 /** maximum time in msec allowed for scan */
9573 A_UINT32 max_scan_time;
9574 /** delay in msec before sending first probe request after switching to a channel */
9575 A_UINT32 probe_delay;
9576 /** Scan control flags */
9577 A_UINT32 scan_ctrl_flags;
9578 /** Burst duration time in msec*/
9579 A_UINT32 burst_duration;
9580
9581 /** # if channels to scan. In the TLV channel_list[] */
9582 A_UINT32 num_chan;
9583 /** number of bssids. In the TLV bssid_list[] */
9584 A_UINT32 num_bssid;
9585 /** number of ssid. In the TLV ssid_list[] */
9586 A_UINT32 num_ssids;
9587 /** number of bytes in ie data. In the TLV ie_data[] */
9588 A_UINT32 ie_len;
9589
9590/**
9591 * TLV (tag length value ) parameters follow the scan_cmd
9592 * structure. The TLV's are:
9593 * A_UINT32 channel_list[];
9594 * wmi_ssid ssid_list[];
9595 * wmi_mac_addr bssid_list[];
9596 * A_UINT8 ie_data[];
9597 */
9598} wmi_lpi_start_scan_cmd_fixed_param;
9599
9600typedef struct {
9601 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
9602 /** Scan requestor ID */
9603 A_UINT32 scan_req_id;
9604 /** Scan ID */
9605 A_UINT32 scan_id;
9606 /**
9607 * Req Type
9608 * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
9609 * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
9610 * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
9611 * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
9612 */
9613 A_UINT32 req_type;
9614 /**
9615 * vDev ID
9616 * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
9617 */
9618 A_UINT32 vdev_id;
9619} wmi_lpi_stop_scan_cmd_fixed_param;
9620
9621typedef enum {
9622 WMI_LPI_DEVICE_TYPE_AP = 1,
9623 WMI_LPI_DEVICE_TYPE_P2P = 2,
9624 WMI_LPI_DEVICE_TYPE_NAN = 3,
9625} wmi_lpi_device_type;
9626
9627typedef struct {
9628 A_UINT32 tlv_header;
9629 /** Scan requestor ID */
9630 A_UINT32 scan_req_id;
9631 A_UINT32 ie_bitmap;
9632 A_UINT32 data_len;
9633} wmi_lpi_result_event_fixed_param;
9634
9635typedef enum {
9636 /** User scan Request completed */
9637 WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
9638 /** User Request was never serviced */
9639 WMI_LPI_STATUS_DROPPED_REQ = 1,
9640 /** Illegal channel Req */
9641 WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
9642 /** Illegal Operation Req */
9643 WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
9644 /** Request Aborted */
9645 WMI_LPI_STATUS_REQ_ABORTED = 4,
9646 /** Request Timed Out */
9647 WMI_LPI_STATUS_REQ_TIME_OUT = 5,
9648 /** Medium Busy, already there
9649 * is a scan is going on */
9650 WMI_LPI_STATUS_MEDIUM_BUSY = 6,
9651 /* Extscan is the scan client whose scan complete event is triggered */
9652 WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
9653} wmi_lpi_staus;
9654
9655typedef struct {
9656 A_UINT32 tlv_header;
9657 wmi_lpi_staus status;
9658 /** Scan requestor ID */
9659 A_UINT32 scan_req_id;
9660} wmi_lpi_status_event_fixed_param;
9661
9662typedef struct {
9663 A_UINT32 tlv_header;
9664 wmi_mac_addr bssid;
9665 wmi_ssid ssid;
9666 A_UINT32 freq;
9667 A_UINT32 rssi;
9668 A_UINT32 vdev_id;
9669} wmi_lpi_handoff_event_fixed_param;
9670
9671typedef struct {
9672 A_UINT32 tlv_header;
9673 A_UINT32 timestamp; /*timestamp of batch scan event */
9674 A_UINT32 numScanLists; /*number of scan in this event */
9675 A_UINT32 isLastResult; /*is this event a last event of the whole batch scan */
9676} wmi_batch_scan_result_event_fixed_param;
9677
9678typedef struct {
9679 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */
9680 A_UINT32 vdev_id;
9681 /* This TLV is followed by p2p_noa_info for vdev :
9682 * wmi_p2p_noa_info p2p_noa_info;
9683 */
9684} wmi_p2p_noa_event_fixed_param;
9685
9686#define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6
9687#define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1
9688
9689#define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0
9690#define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f
9691
9692#define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7
9693#define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf
9694
9695typedef struct {
9696 /** TLV tag and len; tag equals
9697 * */
9698 A_UINT32 tlv_header;
9699 /** gpip pin number */
9700 A_UINT32 gpio_pin_num;
9701 /** gpio interupt type */
9702 A_UINT32 int_type;
9703 /** RF radio status */
9704 A_UINT32 radio_state;
9705} wmi_rfkill_mode_param;
9706
9707typedef enum {
9708 WMI_SET_LED_SYS_POWEROFF,
9709 WMI_SET_LED_SYS_S3_SUSPEND,
9710 WMI_SET_LED_SYS_S4_S5,
9711 WMI_SET_LED_SYS_DRIVER_DISABLE,
9712 WMI_SET_LED_SYS_WAKEUP,
9713 WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
9714 WMI_SET_LED_SYS_POWERON,
9715} wmi_led_sys_state_param;
9716
9717typedef enum {
9718 WMI_CONFIG_LED_TO_VDD = 0,
9719 WMI_CONFIG_LED_TO_GND = 1,
9720} wmi_config_led_connect_type;
9721
9722typedef enum {
9723 WMI_CONFIG_LED_NOT_WITH_BT = 0,
9724 WMI_CONFIG_LED_WITH_BT = 1,
9725} wmi_config_led_with_bt_flag;
9726
9727typedef enum {
9728 WMI_CONFIG_LED_DISABLE = 0,
9729 WMI_CONFIG_LED_ENABLE = 1,
9730} wmi_config_led_enable_flag;
9731
9732typedef struct {
9733 /** TLV tag and len; tag equals
9734 * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
9735 A_UINT32 tlv_header;
9736 /* Set GPIO pin */
9737 A_UINT32 led_gpio_pin;
9738 /* Set connect type defined in wmi_config_led_connect_type */
9739 A_UINT32 connect_type;
9740 /* Set flag defined in wmi_config_led_with_bt_flag */
9741 A_UINT32 with_bt;
9742 /* Set LED enablement defined in wmi_config_led_enable_flag */
9743 A_UINT32 led_enable;
9744} wmi_pdev_set_led_config_cmd_fixed_param;
9745
9746#define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
9747#define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff
9748
9749/** WMI_PEER_INFO_REQ_CMDID
9750 * Request FW to provide peer info */
9751typedef struct {
9752 /** TLV tag and len; tag equals
9753 * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
9754 A_UINT32 tlv_header;
9755 /** In order to get the peer info for a single peer, host shall
9756 * issue the peer_mac_address of that peer. For getting the
9757 * info all peers, the host shall issue 0xFFFFFFFF as the mac
9758 * address. The firmware will return the peer info for all the
9759 * peers on the specified vdev_id */
9760 wmi_mac_addr peer_mac_address;
9761 /** vdev id */
9762 A_UINT32 vdev_id;
9763} wmi_peer_info_req_cmd_fixed_param;
9764
9765typedef struct {
9766 /** TLV tag and len; tag equals
9767 * WMITLV_TAG_STRUC_wmi_peer_info */
9768 A_UINT32 tlv_header;
9769 /** mac addr of the peer */
9770 wmi_mac_addr peer_mac_address;
9771 /** data_rate of the peer */
9772 A_UINT32 data_rate;
9773 /** rssi of the peer */
9774 A_UINT32 rssi;
9775 /** tx fail count */
9776 A_UINT32 tx_fail_cnt;
9777} wmi_peer_info;
9778
9779/** FW response with the peer info */
9780typedef struct {
9781 /** TLV tag and len; tag equals
9782 * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */
9783 A_UINT32 tlv_header;
9784 /** number of peers in peer_info */
9785 A_UINT32 num_peers;
9786 /* This TLV is followed by another TLV of array of structs
9787 * wmi_peer_info peer_info[];
9788 */
9789} wmi_peer_info_event_fixed_param;
9790
9791/** FW response when tx failure count has reached threshold
9792 * for a peer */
9793typedef struct {
9794 /** TLV tag and len; tag equals
9795 * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
9796 A_UINT32 tlv_header;
9797 /** vdev id*/
9798 A_UINT32 vdev_id;
9799 /** mac address */
9800 wmi_mac_addr peer_mac_address;
9801 /** tx failure count- will eventually be removed and not used * */
9802 A_UINT32 tx_fail_cnt;
9803 /** seq number of the nth tx_fail_event */
9804 A_UINT32 seq_no;
9805} wmi_peer_tx_fail_cnt_thr_event_fixed_param;
9806
9807enum wmi_rmc_mode {
9808 /** Disable RMC */
9809 WMI_RMC_MODE_DISABLED = 0,
9810 /** Enable RMC */
9811 WMI_RMC_MODE_ENABLED = 1,
9812};
9813
9814/** Enable RMC transmitter functionality. Upon
9815 * receiving this, the FW shall mutlicast frames with
9816 * reliablity. This is a vendor
9817 * proprietary feature. */
9818typedef struct {
9819 /** TLV tag and len; tag equals
9820 * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */
9821 A_UINT32 tlv_header;
9822 /** vdev id*/
9823 A_UINT32 vdev_id;
9824 /** enable_rmc contains values from enum wmi_rmc_mode;
9825 * Default value: 0 (disabled) */
9826 A_UINT32 enable_rmc;
9827} wmi_rmc_set_mode_cmd_fixed_param;
9828
9829/** Configure transmission periodicity of action frames in a
9830 * RMC network for the multicast transmitter */
9831typedef struct {
9832 /** TLV tag and len; tag equals
9833 * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
9834 A_UINT32 tlv_header;
9835 /** vdev id */
9836 A_UINT32 vdev_id;
9837 /** time period in milliseconds. Default: 300 ms.
9838 An action frame indicating the current leader is transmitted by the
9839 RMC transmitter once every 'periodity_msec' */
9840 A_UINT32 periodicity_msec;
9841} wmi_rmc_set_action_period_cmd_fixed_param;
9842
9843/** Optimise Leader selection process in RMC functionality. For
9844 * Enhancement/Debug purposes only */
9845typedef struct {
9846 /** TLV tag and len; tag equals
9847 * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */
9848 A_UINT32 tlv_header;
9849 /** vdev id */
9850 A_UINT32 vdev_id;
9851 /** flags ::
9852 * 0x0001 - Enable beacon averaging
9853 * 0x0002 - Force leader selection
9854 * 0x0004 - Enable Timer based leader switch
9855 * 0x0008 - Use qos/NULL based for multicast reliability */
9856 A_UINT32 flags;
9857 /** control leader change timeperiod (in seconds) */
9858 A_UINT32 peridocity_leader_switch;
9859 /** control activity timeout value for data rx (in seconds) */
9860 A_UINT32 data_activity_timeout;
9861 /** mac address of leader */
9862 wmi_mac_addr forced_leader_mac_addr;
9863} wmi_rmc_config_cmd_fixed_param;
9864
9865/** MHF is generally implemented in
9866 * the kernel. To decrease system power consumption, the
9867 * driver can enable offloading this to the chipset. In
9868 * order for the offload, the firmware needs the routing table.
9869 * The host shall plumb the routing table into FW. The firmware
9870 * shall perform an IP address lookup and forward the packet to
9871 * the next hop using next hop's mac address. This is a vendor
9872 * proprietary feature. */
9873enum wmi_mhf_ofl_mode {
9874 /** Disable MHF offload */
9875 WMI_MHF_OFL_MODE_DISABLED = 0,
9876 /** Enable MHF offload */
9877 WMI_MHF_OFL_MODE_ENABLED = 1,
9878};
9879
9880typedef struct {
9881 /** TLV tag and len; tag equals
9882 * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
9883 A_UINT32 tlv_header;
9884 /** vdev id*/
9885 A_UINT32 vdev_id;
9886 /** enable_mhf_ofl contains values from enum
9887 * wmi_mhf_ofl_mode; Default value: 0 (disabled) */
9888 A_UINT32 enable_mhf_ofl;
9889} wmi_mhf_offload_set_mode_cmd_fixed_param;
9890
9891enum wmi_mhf_ofl_table_action {
9892 /** Create forwarding offload table in FW */
9893 WMI_MHF_OFL_TBL_CREATE = 0,
9894 /** Append to existing MHF offload table */
9895 WMI_MHF_OFL_TBL_APPEND = 1,
9896 /** Flush entire MHF offload table in FW */
9897 WMI_MHF_OFL_TBL_FLUSH = 2,
9898};
9899
9900typedef struct {
9901 /** TLV tag and len; tag equals
9902 * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
9903 A_UINT32 tlv_header;
9904 /** vdev id*/
9905 A_UINT32 vdev_id;
9906 /** action corresponds to values from enum
9907 * wmi_mhf_ofl_table_action */
9908 A_UINT32 action;
9909 /** number of entries in the table */
9910 A_UINT32 num_entries;
9911/** Followed by the variable length TLV
9912 * wmi_mhf_offload_routing_table_entry entries[] */
9913} wmi_mhf_offload_plumb_routing_table_cmd;
9914
9915typedef struct {
9916 /** TLV tag and len; tag equals
9917 * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
9918 A_UINT32 tlv_header;
9919 /** Destination node's IP address */
9920 WMI_IPV4_ADDR dest_ipv4_addr;
9921 /** Next hop node's MAC address */
9922 wmi_mac_addr next_hop_mac_addr;
9923} wmi_mhf_offload_routing_table_entry;
9924
9925typedef struct {
9926 /** tlv tag and len, tag equals
9927 * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
9928 A_UINT32 tlv_header;
9929
9930 /** full 64 tsf timestamp get from MAC tsf timer indicates
9931 * the time that the radar event uploading to host, split
9932 * it to high 32 bit and lower 32 bit in fulltsf_high and
9933 * full_tsf_low
9934 */
9935 A_UINT32 upload_fullts_low;
9936 A_UINT32 upload_fullts_high;
9937
9938 /** timestamp indicates the time when DFS pulse is detected
9939 * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
9940 */
9941 A_UINT32 pulse_detect_ts;
9942
9943 /** the duaration of the pulse in us */
9944 A_UINT32 pulse_duration;
9945
9946 /** the center frequency of the radar pulse detected, KHz */
9947 A_UINT32 pulse_center_freq;
9948
9949 /** bandwidth of current DFS channel, MHz */
9950 A_UINT32 ch_bandwidth;
9951
9952 /** center channel frequency1 of current DFS channel, MHz */
9953 A_UINT16 ch_center_freq1;
9954
9955 /** center channel frequency2 of current DFS channel, MHz,
9956 * reserved for 160 BW mode
9957 */
9958 A_UINT16 ch_center_freq2;
9959
9960 /** flag to indicate if this pulse is chirp */
9961 A_UINT8 pulse_is_chirp;
9962
9963 /** RSSI recorded in the ppdu */
9964 A_UINT8 rssi;
9965
9966 /** extened RSSI info */
9967 A_UINT8 rssi_ext;
9968
9969 /** For 4-byte aligment padding */
9970 A_UINT8 reserved;
9971
9972 /** pmac_id for the radar event */
9973 A_UINT8 pmac_id;
9974
9975 /** index of peak magnitude bin (signed) */
9976 A_INT32 peak_sidx;
9977
9978} wmi_dfs_radar_event_fixed_param;
9979
9980typedef struct {
9981 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */
9982
9983 /*Thermal thresholds */
9984 A_UINT32 lower_thresh_degreeC; /* in degree C */
9985 A_UINT32 upper_thresh_degreeC; /* in degree C */
9986
9987 /*Enable/Disable Thermal Monitoring for Mitigation */
9988 A_UINT32 enable;
9989} wmi_thermal_mgmt_cmd_fixed_param;
9990
9991typedef struct {
9992 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */
9993
9994 A_UINT32 temperature_degreeC; /* temperature in degree C */
9995} wmi_thermal_mgmt_event_fixed_param;
9996
9997/**
9998 * This command is sent from WLAN host driver to firmware to
9999 * request firmware to configure auto shutdown timer in fw
10000 * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
10001 */
10002typedef struct {
10003 A_UINT32 tlv_header;
10004 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */
10005 A_UINT32 timer_value;
10006 /** timer value; 0=disable */
10007} wmi_host_auto_shutdown_cfg_cmd_fixed_param;
10008
10009enum wmi_host_auto_shutdown_reason {
10010 WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
10011 WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
10012 WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
10013};
10014
10015/* WMI_HOST_AUTO_SHUTDOWN_EVENTID */
10016typedef struct {
10017 A_UINT32 tlv_header;
10018 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */
10019 A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
10020} wmi_host_auto_shutdown_event_fixed_param;
10021
10022/** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
10023 * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
10024 * This command is only used by some customer for verification test. It is not for end-user.
10025 *
10026 * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
10027 *
10028 * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
10029 * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condtion only. When multiple
10030 * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
10031 * <channel, ack_offset> pair is unique.
10032 *
10033 * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
10034 * called basic_config_info by bitmap
10035 * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
10036 *
10037 * '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
10038 * is ignored.
10039 * disable will remove preious conditions from FW.
10040 * conditions from the later command will over write conditions stored from a previous command.
10041 *
10042 */
10043
10044#define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */
10045#define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */
10046#define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */
10047#define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */
10048
10049#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */
10050#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */
10051#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */
10052#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */
10053
10054#define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */
10055#define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */
10056#define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */
10057#define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */
10058
10059#define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */
10060#define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */
10061
10062#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */
10063#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */
10064#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */
10065#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */
10066#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */
10067#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */
10068#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */
10069#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */
10070
10071#define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */
10072#define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */
10073
10074#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */
10075#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */
10076
10077#define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */
10078#define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */
10079
10080/** Bit map definition for basic_config_info starts */
10081#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0
10082#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010083#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
10084#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 -080010085
10086#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5
10087#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010088#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
10089#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 -080010090
10091#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10
10092#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010093#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
10094#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 -080010095
10096#define WMI_TPC_CHAINMASK_CONFIG_BT_S 12
10097#define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010098#define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BT)
10099#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 -080010100
10101#define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14
10102#define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010103#define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STBC)
10104#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 -080010105
10106#define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16
10107#define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010108#define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BAND)
10109#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 -080010110
10111#define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17
10112#define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010113#define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STREAM)
10114#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 -080010115
10116#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18
10117#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010118#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
10119#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 -080010120
10121#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21
10122/*
10123 * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
10124 * is temporarily maintained as an alias for the correct name
10125 * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
10126 */
10127#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
10128#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010129#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
10130#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 -080010131
10132#define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22
10133/*
10134 * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
10135 * is temporarily maintained as an alias for the correct name
10136 * (WMI_TPC_CHAINMASK_CONFIG_RATE)
10137 */
10138#define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
10139#define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
10140#define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010141#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 -080010142
10143/** Bit map definition for basic_config_info ends */
10144
10145typedef struct {
10146 A_UINT32 tlv_header;
10147 /** Basic condition defined as bit map above, bitmap is chosen to save memory.
10148 * Bit0 ~ Bit4: tpc offset which will be adjusted if condtion matches, the unit is 0.5dB. bit4 indicates signed
10149 * Bit5 ~ Bit9: ack offset which will be adjusted if condtion matches, the unit is 0.5dB. bit9 indicates signed
10150 * 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
10151 * 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
10152 * 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
10153 * Bit16 : band condition b'0: 2G, b'1: 5G
10154 * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams
10155 * 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
10156 * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
10157 * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
10158 * Bit23 ~ Bit31: reserved
10159 */
10160 A_UINT32 basic_config_info;
10161
10162 /** channel mapping bit rule: The lower bit corresponds with smaller channel.
10163 * it depends on Bit14 of basic_config_info
10164 * Total 24 channels for 5G
10165 * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
10166 * Total 14 channels for 2G
10167 * 1 ~ 14
10168 */
10169 A_UINT32 channel;
10170
10171 /** rate mapping bit rule: The lower bit corresponds with lower rate.
10172 * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
10173 * Legacy rates , 11b, 11g, 11A
10174 * 11n one stream ( ht20, ht40 ) 8+8
10175 * 11n two streams ( ht20, ht40 ) 8+8
10176 * 11ac one stream ( vht20, vht40, vht80 ) 10+10+10
10177 * 11ac two streams (vht20, vht40, vht80 ) 10+10+10
10178 */
10179 A_UINT32 rate0;
10180 /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
10181 * 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
10182 */
10183
10184 /** 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
10185 */
10186 A_UINT32 rate1;
10187} wmi_tpc_chainmask_config;
10188
10189#define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/
10190#define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/
10191
10192typedef struct {
10193 A_UINT32 tlv_header;
10194 A_UINT32 enable;
10195 /** enable to set tpc & chainmask when condtions meet, 0: disabled, 1: enabled. */
10196 A_UINT32 num_tpc_chainmask_configs;
10197 /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */
10198} wmi_tpc_chainmask_config_cmd_fixed_param;
10199
10200typedef struct {
10201 A_UINT32 tlv_header;
10202 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
10203 A_UINT32 data_len;
10204 /** length in byte of data[]. */
10205 /* This structure is used to send REQ binary blobs
10206 * from application/service to firmware where Host drv is pass through .
10207 * Following this structure is the TLV:
10208 * A_UINT8 data[]; // length in byte given by field data_len.
10209 */
10210} wmi_nan_cmd_param;
10211
10212typedef struct {
10213 A_UINT32 tlv_header;
10214 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
10215 A_UINT32 data_len;
10216 /** length in byte of data[]. */
10217 /* This structure is used to send REQ binary blobs
10218 * from firmware to application/service where Host drv is pass through .
10219 * Following this structure is the TLV:
10220 * A_UINT8 data[]; // length in byte given by field data_len.
10221 */
10222} wmi_nan_event_hdr;
10223
10224typedef struct {
10225 A_UINT32 tlv_header;
10226 A_UINT32 num_data;
10227 /* followed by WMITLV_TAG_ARRAY_BYTE */
10228} wmi_diag_data_container_event_fixed_param;
10229
10230enum {
10231 WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
10232 WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
10233 WMI_PDEV_PARAM_TXPOWER_REASON_MAX
10234};
10235
10236#define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF
10237#define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
10238
10239#define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00
10240#define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
10241
10242#define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \
10243 ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
10244
10245#define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \
10246 ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
10247
10248#define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \
10249 (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
10250
10251#define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \
10252 (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
10253
10254/**
10255 * This command is sent from WLAN host driver to firmware to
10256 * notify the current modem power state. Host would receive a
10257 * message from modem when modem is powered on. Host driver
10258 * would then send this command to firmware. Firmware would then
10259 * power on WCI-2 (UART) interface for LTE/MWS Coex.
10260 *
10261 * This command is only applicable for APQ platform which has
10262 * modem on the platform. If firmware doesn't support MWS Coex,
10263 * this command can be dropped by firmware.
10264 *
10265 * This is a requirement from modem team that WCN can't toggle
10266 * UART before modem is powered on.
10267 */
10268typedef struct {
10269 /** TLV tag and len; tag equals
10270 * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
10271 A_UINT32 tlv_header;
10272
10273 /** Modem power state parameter */
10274 A_UINT32 modem_power_state;
10275} wmi_modem_power_state_cmd_param;
10276
10277enum {
10278 WMI_MODEM_STATE_OFF = 0,
10279 WMI_MODEM_STATE_ON
10280};
10281
10282#define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
10283#define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */
10284
10285/** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
10286 generated whenever firmware roamed to new AP silently and
10287 (a) If the host is awake, FW sends the event to the host immediately .
10288 (b) If host is in sleep then either
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010289 (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010290 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 +053010291 (2) data/mgmt frame is received from roamed AP, which needs to return to host
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010292 */
10293
10294typedef struct {
10295 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
10296 A_UINT32 tlv_header;
10297
10298 A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
10299 A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
10300 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES];
10301} wmi_key_material;
10302
10303typedef struct {
10304 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */
10305 /** Unique id identifying the VDEV on which roaming is done by firmware */
10306 A_UINT32 vdev_id;
10307 /** auth_status: connected or authorized */
10308 A_UINT32 auth_status;
10309 /*
Nirav Shah439e6262015-11-05 10:53:18 +053010310 * roam_reason:
10311 * bits 0-3 for roam reason see WMI_ROAM_REASON_XXX
10312 * bits 4-5 for subnet status see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010313 */
10314 A_UINT32 roam_reason;
10315 /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
10316 A_UINT32 rssi;
10317 /** MAC address of roamed AP */
10318 wmi_mac_addr bssid; /* BSSID */
10319 /** whether the frame is beacon or probe rsp */
10320 A_UINT32 is_beacon;
10321 /** the length of beacon/probe rsp */
10322 A_UINT32 bcn_probe_rsp_len;
10323 /** the length of reassoc rsp */
10324 A_UINT32 reassoc_rsp_len;
Manikandan Mohan30728082015-12-09 12:35:24 -080010325 /** the length of reassoc req */
10326 A_UINT32 reassoc_req_len;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010327 /**
10328 * TLV (tag length value ) parameters follows roam_synch_event
10329 * The TLV's are:
10330 * A_UINT8 bcn_probe_rsp_frame[]; length identified by bcn_probe_rsp_len
10331 * A_UINT8 reassoc_rsp_frame[]; length identified by reassoc_rsp_len
10332 * wmi_channel chan;
10333 * wmi_key_material key;
10334 * A_UINT32 status; subnet changed status not being used
10335 * currently. will pass the information using roam_status.
Manikandan Mohan30728082015-12-09 12:35:24 -080010336 * A_UINT8 reassoc_req_frame[]; length identified by reassoc_req_len
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010337 **/
10338} wmi_roam_synch_event_fixed_param;
10339
10340#define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF
10341
10342typedef struct {
10343 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
10344 A_UINT32 tlv_header;
10345 /** MAC address of the peer for which the estimated link speed is required. */
10346 wmi_mac_addr peer_macaddr;
10347} wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
10348
10349typedef struct {
10350 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
10351 A_UINT32 tlv_header;
10352 /** MAC address of the peer for which the estimated link speed is required.
10353 */
10354 wmi_mac_addr peer_macaddr;
10355 /* Estimated link speed in kbps.
10356 * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
10357 */
10358 A_UINT32 est_linkspeed_kbps;
10359} wmi_peer_estimated_linkspeed_event_fixed_param;
10360
10361typedef struct {
10362 A_UINT32 tlv_header; /* TLV tag and len; tag equals */
10363 /* vdev ID */
10364 A_UINT32 vdev_id;
10365 A_UINT32 data_len;
10366 /** length in byte of data[]. */
10367 /* This structure is used to send REQ binary blobs
10368 * from application/service to firmware where Host drv is pass through .
10369 * Following this structure is the TLV:
10370 * A_UINT8 data[]; // length in byte given by field data_len.
10371 */
10372} wmi_req_stats_ext_cmd_fixed_param;
10373
10374typedef struct {
10375 A_UINT32 tlv_header;
10376 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
10377 A_UINT32 vdev_id;
10378 /** vdev ID */
10379 A_UINT32 data_len;
10380 /** length in byte of data[]. */
10381 /* This structure is used to send REQ binary blobs
10382 * from firmware to application/service where Host drv is pass through .
10383 * Following this structure is the TLV:
10384 * A_UINT8 data[]; // length in byte given by field data_len.
10385 */
10386} wmi_stats_ext_event_fixed_param;
10387
10388typedef struct {
Manikandan Mohan429a0782015-12-23 14:35:54 -080010389 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */
10390 /** unique id identifying the VDEV, generated by the caller */
10391 A_UINT32 vdev_id;
10392 /** peer MAC address */
10393 wmi_mac_addr peer_macaddr;
10394} wmi_peer_delete_resp_event_fixed_param;
10395
10396typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010397 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
10398 A_UINT32 tlv_header;
10399 A_UINT32 vdev_id; /* vdev ID */
10400 /* MAC address of the peer for which the estimated link speed is required. */
10401 wmi_mac_addr peer_macaddr;
10402 A_UINT32 state; /* peer state */
10403} wmi_peer_state_event_fixed_param;
10404
10405typedef struct {
10406 /*
10407 * TLV tag and len; tag equals
10408 * WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param
10409 */
10410 A_UINT32 tlv_header;
10411 /* unique id identifying the VDEV, generated by the caller */
10412 A_UINT32 vdev_id;
10413 /* peer MAC address */
10414 wmi_mac_addr peer_macaddr;
10415} wmi_peer_assoc_conf_event_fixed_param;
10416
10417enum {
10418 WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0,
10419 /** scan_type: passive */
10420 WMI_2G4_HT40_OBSS_SCAN_ACTIVE,
10421 /** scan_type: active */
10422};
10423
10424typedef struct {
10425 /**
10426 * TLV tag and len;
10427 * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enalbe_cmd_fixed_param
10428 */
10429 A_UINT32 tlv_header;
10430 A_UINT32 vdev_id;
10431 /**
10432 * active or passive. if active all the channels are actively scanned.
10433 * if passive then all the channels are passively scanned
10434 */
10435 A_UINT32 scan_type;
10436 /**
10437 * FW can perform multiple scans with in a OBSS scan interval.
10438 * For each scan,
10439 * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel ,
10440 * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
10441 * The unit for these 2 parameters is TUs.
10442 */
10443 A_UINT32 obss_scan_passive_dwell;
10444 A_UINT32 obss_scan_active_dwell;
10445 /**
10446 * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
10447 * both min and total per channel dwell time requirement
10448 */
10449 A_UINT32 bss_channel_width_trigger_scan_interval;
10450 /**
10451 * FW can perform multiple scans with in a OBSS scan interval.
10452 * For each scan,
10453 * the total per channel dwell time across all scans with in OBSS scan interval should be
10454 * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
10455 * for active scans and ,
10456 * The unit for these 2 parameters is TUs.
10457 */
10458 A_UINT32 obss_scan_passive_total_per_channel;
10459 A_UINT32 obss_scan_active_total_per_channel;
10460 A_UINT32 bss_width_channel_transition_delay_factor;
10461 /** parameter to check exemption from scan */
10462 A_UINT32 obss_scan_activity_threshold;
10463 /** parameter to check exemption from scan */
10464 /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
10465 A_UINT32 forty_mhz_intolerant;
10466 /** STA 40M bandwidth intolerant capability */
10467 A_UINT32 current_operating_class;
10468 /** STA current operating class */
10469 /** length of 2.4GHz channel list to scan at, channel list in tlv->channels[] */
10470 A_UINT32 channel_len;
10471 /** length of optional ie data to append to probe reqest when active scan, ie data in tlv->ie_field[] */
10472 A_UINT32 ie_len;
10473} wmi_obss_scan_enable_cmd_fixed_param;
10474
10475typedef struct {
10476 /**
10477 * TLV tag and len;
10478 * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
10479 */
10480 A_UINT32 tlv_header;
10481 A_UINT32 vdev_id;
10482} wmi_obss_scan_disable_cmd_fixed_param;
10483
10484typedef struct {
10485 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
10486 A_UINT32 tlv_header;
10487 /** unique id identifying the VDEV */
10488 A_UINT32 vdev_id;
10489 /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
10490 A_UINT32 tx_status;
10491} wmi_offload_prb_rsp_tx_status_event_fixed_param;
10492
10493typedef enum {
10494 WMI_FRAME_TX_OK, /* frame tx ok */
10495 WMI_FRAME_TX_XRETRY, /* excessivley retried */
10496 WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */
10497 WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */
10498} WMI_FRAME_TX_STATUS;
10499
10500/**
10501 * This command is sent from WLAN host driver to firmware to
10502 * request firmware to send the latest channel avoidance range
10503 * to host.
10504 *
10505 * This command is only applicable for APQ platform which has
10506 * modem on the platform. If firmware doesn't support MWS Coex,
10507 * this command can be dropped by firmware.
10508 *
10509 * Host would send this command to firmware to request a channel
10510 * avoidance information update.
10511 */
10512typedef struct {
10513 /** TLV tag and len; tag equals
10514 * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
10515 A_UINT32 tlv_header;
10516} wmi_chan_avoid_update_cmd_param;
10517
10518/* ExtScan operation mode */
10519typedef enum {
10520 WMI_EXTSCAN_MODE_NONE = 0x0000,
10521 WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */
10522 WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */
10523 WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */
10524} wmi_extscan_operation_mode;
10525
10526/* Channel Mask */
10527typedef enum {
10528 WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
10529 WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */
10530 WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */
10531 WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */
10532} wmi_channel_band_mask;
10533
10534typedef enum {
10535 WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001,
10536 WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002,
10537 WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004,
10538 WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008,
10539 WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010,
10540 WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020,
Govind Singhfad2f212016-01-21 10:55:51 +053010541 WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040,
10542 WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010543
10544 WMI_EXTSCAN_EVENT_MAX = 0x8000
10545} wmi_extscan_event_type;
10546
10547#define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \
10548 WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
10549
10550#define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \
10551 WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
10552 WMI_EXTSCAN_BUCKET_FAILED_EVENT | \
10553 WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
10554
10555typedef enum {
10556 WMI_EXTSCAN_NO_FORWARDING = 0x0000,
10557 WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
10558} wmi_extscan_forwarding_flags;
10559
10560typedef enum {
10561 /* Use Motion Sensor Detection */
10562 WMI_EXTSCAN_USE_MSD = 0x0001,
10563 /* Extscan LPASS extended batching feature is supported and enabled */
10564 WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002,
10565} wmi_extscan_configuration_flags;
10566typedef enum {
10567 /*
10568 * Cache the results of bucket whose
10569 * configuration flags has this bit set
10570 */
10571 WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001,
Govind Singhfad2f212016-01-21 10:55:51 +053010572 /* Report ext scan results to context hub or not.*/
10573 WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010574} wmi_extscan_bucket_configuration_flags;
10575
10576typedef enum {
10577 WMI_EXTSCAN_STATUS_OK = 0,
10578 WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
10579 WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
10580 WMI_EXTSCAN_STATUS_INTERNAL_ERROR
10581} wmi_extscan_start_stop_status;
10582
10583typedef struct {
10584 /** Request ID - to identify command. Cannot be 0 */
10585 A_UINT32 request_id;
10586 /** Requestor ID - client requesting ExtScan */
10587 A_UINT32 requestor_id;
10588 /** VDEV id(interface) that is requesting scan */
10589 A_UINT32 vdev_id;
10590} wmi_extscan_command_id;
10591
10592typedef struct {
10593 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
10594 /** channel number */
10595 A_UINT32 channel;
10596
10597 /** dwell time in msec - use defaults if 0 */
10598 A_UINT32 min_dwell_time;
10599 A_UINT32 max_dwell_time;
10600 /** passive/active channel and other flags */
10601 A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */
10602} wmi_extscan_bucket_channel;
10603
10604/* Scan Bucket specification */
10605typedef struct {
10606 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
10607 /** Bucket ID - 0-based */
10608 A_UINT32 bucket_id;
10609 /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
10610 A_UINT32 notify_extscan_events;
10611 /** Options to forward scan results - see wmi_extscan_forwarding_flags */
10612 A_UINT32 forwarding_flags;
10613 /*
10614 * ExtScan configuration flags -
10615 * wmi_extscan__bucket_configuration_flags
10616 */
10617 A_UINT32 configuration_flags;
10618 /** DEPRECATED member:multiplier to be applied to the periodic scan's base period */
10619 A_UINT32 base_period_multiplier;
10620 /** dwell time in msec on active channels - use defaults if 0 */
10621 A_UINT32 min_dwell_time_active;
10622 A_UINT32 max_dwell_time_active;
10623 /** dwell time in msec on passive channels - use defaults if 0 */
10624 A_UINT32 min_dwell_time_passive;
10625 A_UINT32 max_dwell_time_passive;
10626 /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
10627 A_UINT32 channel_band;
10628 /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
10629 A_UINT32 num_channels;
10630 /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
10631 A_UINT32 min_period;
10632 /** period above which exponent is not applied anymore */
10633 A_UINT32 max_period;
10634 /**
10635 * back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
10636 * new_bucket_period = last_bucket_period + last_exponent_period exp_backoff
10637 */
10638 A_UINT32 exp_backoff;
10639 /** number of scans performed at a given periodicity after which exponential back off value is
10640 * applied to current periodicity to obtain a newer one
10641 */
10642 A_UINT32 exp_max_step_count;
10643/** Followed by the variable length TLV chan_list:
10644 * wmi_extscan_bucket_channel chan_list[] */
10645} wmi_extscan_bucket;
10646
10647typedef struct {
10648 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
10649 /** Request ID - to identify command. Cannot be 0 */
10650 A_UINT32 request_id;
10651 /** Requestor ID - client requesting ExtScan */
10652 A_UINT32 requestor_id;
10653 /** VDEV id(interface) that is requesting scan */
10654 A_UINT32 vdev_id;
10655 /** table ID - to allow support for multiple simultaneous requests */
10656 A_UINT32 table_id;
10657 /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
10658 A_UINT32 base_period;
10659 /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
10660 A_UINT32 max_iterations;
10661 /** Options to forward scan results - see wmi_extscan_forwarding_flags */
10662 A_UINT32 forwarding_flags;
10663 /** ExtScan configuration flags - wmi_extscan_configuration_flags */
10664 A_UINT32 configuration_flags;
10665 /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
10666 A_UINT32 notify_extscan_events;
10667 /** Scan Priority, input to scan scheduler */
10668 A_UINT32 scan_priority;
10669 /** Maximum number of BSSIDs to cache on each scan cycle */
10670 A_UINT32 max_bssids_per_scan_cycle;
10671 /** Minimum RSSI value to report */
10672 A_UINT32 min_rssi;
10673 /** Maximum table usage in percentage */
10674 A_UINT32 max_table_usage;
10675 /** default dwell time in msec on active channels */
10676 A_UINT32 min_dwell_time_active;
10677 A_UINT32 max_dwell_time_active;
10678 /** default dwell time in msec on passive channels */
10679 A_UINT32 min_dwell_time_passive;
10680 A_UINT32 max_dwell_time_passive;
10681 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
10682 A_UINT32 min_rest_time;
10683 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
10684 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
10685 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
10686 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
10687 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
10688 * irrespective of activity. activity is determined by the idle_time parameter.
10689 */
10690 A_UINT32 max_rest_time;
10691 /** time before sending next set of probe requests.
10692 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
10693 * The number of probe requests specified depends on the ssid_list and bssid_list
10694 */
10695 /** Max number of probes to be sent */
10696 A_UINT32 n_probes;
10697 /** time in msec between 2 sets of probe requests. */
10698 A_UINT32 repeat_probe_time;
10699 /** time in msec between 2 consequetive probe requests with in a set. */
10700 A_UINT32 probe_spacing_time;
10701 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
10702 A_UINT32 idle_time;
10703 /** maximum time in msec allowed for scan */
10704 A_UINT32 max_scan_time;
10705 /** delay in msec before sending first probe request after switching to a channel */
10706 A_UINT32 probe_delay;
10707 /** Scan control flags */
10708 A_UINT32 scan_ctrl_flags;
10709 /** Burst duration time in msec*/
10710 A_UINT32 burst_duration;
10711
10712 /** number of bssids in the TLV bssid_list[] */
10713 A_UINT32 num_bssid;
10714 /** number of ssid in the TLV ssid_list[] */
10715 A_UINT32 num_ssids;
10716 /** number of bytes in TLV ie_data[] */
10717 A_UINT32 ie_len;
10718 /** number of buckets in the TLV bucket_list[] */
10719 A_UINT32 num_buckets;
10720 /** in number of scans, send notifications to host after these many scans */
10721 A_UINT32 report_threshold_num_scans;
10722
10723 /** number of channels in channel_list[] determined by the
10724 sum of wmi_extscan_bucket.num_channels in array */
10725
10726/**
10727 * TLV (tag length value ) parameters follow the extscan_cmd
10728 * structure. The TLV's are:
10729 * wmi_ssid ssid_list[];
10730 * wmi_mac_addr bssid_list[];
10731 * A_UINT8 ie_data[];
10732 * wmi_extscan_bucket bucket_list[];
10733 * wmi_extscan_bucket_channel channel_list[];
10734 */
10735} wmi_extscan_start_cmd_fixed_param;
10736
10737typedef struct {
10738 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
10739 /** Request ID - to match running command. 0 matches any request */
10740 A_UINT32 request_id;
10741 /** Requestor ID - client requesting stop */
10742 A_UINT32 requestor_id;
10743 /** VDEV id(interface) that is requesting scan */
10744 A_UINT32 vdev_id;
10745 /** table ID - to allow support for multiple simultaneous requests */
10746 A_UINT32 table_id;
10747} wmi_extscan_stop_cmd_fixed_param;
10748
10749enum wmi_extscan_get_cached_results_flags {
10750 WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000,
10751 WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
10752};
10753
10754typedef struct {
10755 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
10756 /** request ID - used to correlate command with events */
10757 A_UINT32 request_id;
10758 /** Requestor ID - client that requested results */
10759 A_UINT32 requestor_id;
10760 /** VDEV id(interface) that is requesting scan */
10761 A_UINT32 vdev_id;
10762 /** table ID - to allow support for multiple simultaneous requests */
10763 A_UINT32 table_id;
10764 /** maximum number of results to be returned */
10765 A_UINT32 max_results;
10766 /** flush BSSID list - wmi_extscan_get_cached_results_flags */
10767 A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */
10768} wmi_extscan_get_cached_results_cmd_fixed_param;
10769
10770typedef struct {
10771 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
10772 /** request ID - used to correlate command with events */
10773 A_UINT32 request_id;
10774 /** Requestor ID - client that requested results */
10775 A_UINT32 requestor_id;
10776 /** VDEV id(interface) that is requesting scan */
10777 A_UINT32 vdev_id;
10778 /** table ID - to allow support for multiple simultaneous requests */
10779 A_UINT32 table_id;
10780} wmi_extscan_get_wlan_change_results_cmd_fixed_param;
10781
10782typedef struct {
10783 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
10784 /**bssid */
10785 wmi_mac_addr bssid;
10786 /**channel number */
10787 A_UINT32 channel;
10788 /**upper RSSI limit */
10789 A_UINT32 upper_rssi_limit;
10790 /**lower RSSI limit */
10791 A_UINT32 lower_rssi_limit;
10792} wmi_extscan_wlan_change_bssid_param;
10793
10794typedef struct {
10795 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
10796 /** Request ID - to identify command. Cannot be 0 */
10797 A_UINT32 request_id;
10798 /** Requestor ID - client requesting wlan change monitoring */
10799 A_UINT32 requestor_id;
10800 /** VDEV id(interface) that is requesting scan */
10801 A_UINT32 vdev_id;
10802 /** table ID - to allow support for multiple simultaneous tables */
10803 A_UINT32 table_id;
10804 /** operation mode: start/stop */
10805 A_UINT32 mode; /* wmi_extscan_operation_mode */
10806 /** number of rssi samples to store */
10807 A_UINT32 max_rssi_samples;
10808 /** number of samples to use to calculate RSSI average */
10809 A_UINT32 rssi_averaging_samples;
10810 /** number of scans to confirm loss of contact with RSSI */
10811 A_UINT32 lost_ap_scan_count;
10812 /** number of out-of-range BSSIDs necessary to send event */
10813 A_UINT32 max_out_of_range_count;
10814 /** total number of bssid signal descriptors (in all pages) */
10815 A_UINT32 total_entries;
10816 /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
10817 A_UINT32 first_entry_index;
10818 /** number of bssid signal descriptors in this page */
10819 A_UINT32 num_entries_in_page;
10820 /* Following this structure is the TLV:
10821 * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[]; // number of elements given by field num_page_entries.
10822 */
10823} wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
10824
10825typedef struct {
10826 /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
10827 A_UINT32 tlv_header;
10828 /**ssid */
10829 wmi_ssid ssid;
10830 /**band */
10831 A_UINT32 band;
10832 /**RSSI threshold for reporting */
10833 A_UINT32 min_rssi;
10834 A_UINT32 max_rssi;
10835} wmi_extscan_hotlist_ssid_entry;
10836
10837typedef struct {
10838 /**
10839 * TLV tag and len; tag equals
10840 * MITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param
10841 */
10842 A_UINT32 tlv_header;
10843 /** Request ID - to identify command. Cannot be 0 */
10844 A_UINT32 request_id;
10845 /** Requestor ID - client requesting hotlist ssid monitoring */
10846 A_UINT32 requestor_id;
10847 /** VDEV id(interface) that is requesting scan */
10848 A_UINT32 vdev_id;
10849 /** table ID - to allow support for multiple simultaneous tables */
10850 A_UINT32 table_id;
10851 /** operation mode: start/stop */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010852 A_UINT32 mode; /* wmi_extscan_operation_mode */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010853 /**total number of ssids (in all pages) */
10854 A_UINT32 total_entries;
10855 /**index of the first ssid entry found in the TLV extscan_hotlist_ssid_entry*/
10856 A_UINT32 first_entry_index;
10857 /**number of ssids in this page */
10858 A_UINT32 num_entries_in_page;
10859 /** number of consecutive scans to confirm loss of an ssid **/
10860 A_UINT32 lost_ap_scan_count;
10861 /* Following this structure is the TLV:
10862 * wmi_extscan_hotlist_ssid_entry hotlist_ssid[];
10863 * number of element given by field num_page_entries.
10864 */
10865} wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
10866
10867typedef struct {
10868 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
10869 /**bssid */
10870 wmi_mac_addr bssid;
10871 /**RSSI min threshold for reporting */
10872 A_UINT32 min_rssi;
10873 /**Deprecated entry channel number */
10874 A_UINT32 channel;
10875 /** RSSI max threshold for reporting */
10876 A_UINT32 max_rssi;
10877} wmi_extscan_hotlist_entry;
10878
10879typedef struct {
10880 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
10881 /** Request ID - to identify command. Cannot be 0 */
10882 A_UINT32 request_id;
10883 /** Requestor ID - client requesting hotlist monitoring */
10884 A_UINT32 requestor_id;
10885 /** VDEV id(interface) that is requesting scan */
10886 A_UINT32 vdev_id;
10887 /** table ID - to allow support for multiple simultaneous tables */
10888 A_UINT32 table_id;
10889 /** operation mode: start/stop */
10890 A_UINT32 mode; /* wmi_extscan_operation_mode */
10891 /**total number of bssids (in all pages) */
10892 A_UINT32 total_entries;
10893 /**index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry*/
10894 A_UINT32 first_entry_index;
10895 /**number of bssids in this page */
10896 A_UINT32 num_entries_in_page;
10897 /** number of consecutive scans to confirm loss of contact with AP */
10898 A_UINT32 lost_ap_scan_count;
10899 /* Following this structure is the TLV:
10900 * wmi_extscan_hotlist_entry hotlist[]; // number of elements given by field num_page_entries.
10901 */
10902} wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
10903
10904 typedef struct {
10905 /* TLV tag and len; tag equals
10906 *WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
10907 A_UINT32 tlv_header;
10908 /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
10909 A_UINT32 config_request_id;
10910 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID
10911 that configured the table */
10912 A_UINT32 config_requestor_id;
10913 /**
10914 * VDEV id(interface) of the
10915 * WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table
10916 */
10917 A_UINT32 config_vdev_id;
10918 /** table ID - to allow support for multiple simultaneous tables */
10919 A_UINT32 table_id;
10920 /**total number of ssids (in all pages) */
10921 A_UINT32 total_entries;
10922 /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
10923 A_UINT32 first_entry_index;
10924 /**number of ssids in this page */
10925 A_UINT32 num_entries_in_page;
10926 /* Following this structure is the TLV:
10927 * wmi_extscan_wlan_descriptor hotlist_match[];
10928 * number of descriptors given by field num_entries_in_page
10929 */
10930} wmi_extscan_hotlist_ssid_match_event_fixed_param;
10931
10932typedef struct {
10933 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
10934 /** table ID - to allow support for multiple simultaneous tables */
10935 A_UINT32 table_id;
10936 /** size in bytes of scan cache entry */
10937 A_UINT32 scan_cache_entry_size;
10938 /** maximum number of scan cache entries */
10939 A_UINT32 max_scan_cache_entries;
10940 /** maximum number of buckets per extscan request */
10941 A_UINT32 max_buckets;
10942 /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
10943 A_UINT32 max_bssid_per_scan;
10944 /** table usage level at which indication must be sent to host */
10945 A_UINT32 max_table_usage_threshold;
10946} wmi_extscan_cache_capabilities;
10947
10948typedef struct {
10949 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
10950 /** table ID - to allow support for multiple simultaneous tables */
10951 A_UINT32 table_id;
10952 /** size in bytes of wlan change entry */
10953 A_UINT32 wlan_change_entry_size;
10954 /** maximum number of entries in wlan change table */
10955 A_UINT32 max_wlan_change_entries;
10956 /** number of RSSI samples used for averaging RSSI */
10957 A_UINT32 max_rssi_averaging_samples;
10958 /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
10959 A_UINT32 max_rssi_history_entries;
10960} wmi_extscan_wlan_change_monitor_capabilities;
10961
10962typedef struct {
10963 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
10964 /** table ID - to allow support for multiple simultaneous tables */
10965 A_UINT32 table_id;
10966 /** size in bytes of hotlist entry */
10967 A_UINT32 wlan_hotlist_entry_size;
10968 /** maximum number of entries in wlan change table */
10969 A_UINT32 max_hotlist_entries;
10970} wmi_extscan_hotlist_monitor_capabilities;
10971
10972typedef struct {
10973 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
10974 /** Request ID - matches request ID used to start hot list monitoring */
10975 A_UINT32 request_id;
10976 /** Requestor ID - client requesting stop */
10977 A_UINT32 requestor_id;
10978 /** number of extscan caches */
10979 A_UINT32 num_extscan_cache_tables;
10980 /** number of wlan change lists */
10981 A_UINT32 num_wlan_change_monitor_tables;
10982 /** number of hotlists */
10983 A_UINT32 num_hotlist_monitor_tables;
10984 /** if one sided rtt data collection is supported */
10985 A_UINT32 rtt_one_sided_supported;
10986 /** if 11v data collection is supported */
10987 A_UINT32 rtt_11v_supported;
10988 /** if 11mc data collection is supported */
10989 A_UINT32 rtt_ftm_supported;
10990 /** number of extscan cache capabilities (one per table) */
10991 A_UINT32 num_extscan_cache_capabilities;
10992 /** number of wlan change capabilities (one per table) */
10993 A_UINT32 num_extscan_wlan_change_capabilities;
10994 /** number of extscan hotlist capabilities (one per table) */
10995 A_UINT32 num_extscan_hotlist_capabilities;
10996 /* Following this structure is the TLV:
10997 * wmi_extscan_cache_capabilities extscan_cache_capabilities; // number of capabilities given by num_extscan_caches
10998 * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; // number of capabilities given by num_wlan_change_monitor_tables
10999 * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; // number of capabilities given by num_hotlist_monitor_tables
11000 */
11001} wmi_extscan_set_capabilities_cmd_fixed_param;
11002
11003typedef struct {
11004 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
11005 /** Request ID - matches request ID used to start hot list monitoring */
11006 A_UINT32 request_id;
11007 /** Requestor ID - client requesting capabilities */
11008 A_UINT32 requestor_id;
11009} wmi_extscan_get_capabilities_cmd_fixed_param;
11010
11011typedef struct {
11012 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
11013 /** Request ID of the operation that was started/stopped */
11014 A_UINT32 request_id;
11015 /** Requestor ID of the operation that was started/stopped */
11016 A_UINT32 requestor_id;
11017 /** VDEV id(interface) of the operation that was started/stopped */
11018 A_UINT32 vdev_id;
11019 /** extscan WMI command */
11020 A_UINT32 command;
11021 /** operation mode: start/stop */
11022 A_UINT32 mode; /* wmi_extscan_operation_mode */
11023 /**success/failure */
11024 A_UINT32 status; /* enum wmi_extscan_start_stop_status */
11025 /** table ID - to allow support for multiple simultaneous requests */
11026 A_UINT32 table_id;
11027} wmi_extscan_start_stop_event_fixed_param;
11028
11029typedef struct {
11030 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
11031 /** Request ID of the extscan operation that is currently running */
11032 A_UINT32 request_id;
11033 /** Requestor ID of the extscan operation that is currently running */
11034 A_UINT32 requestor_id;
11035 /** VDEV id(interface) of the extscan operation that is currently running */
11036 A_UINT32 vdev_id;
11037 /** scan event (wmi_scan_event_type) */
11038 A_UINT32 event; /* wmi_extscan_event_type */
11039 /** table ID - to allow support for multiple simultaneous requests */
11040 A_UINT32 table_id;
11041 /**number of buckets */
11042 A_UINT32 num_buckets;
11043 /* Following this structure is the TLV:
11044 * A_UINT32 bucket_id[]; // number of elements given by field num_buckets.
11045 */
11046} wmi_extscan_operation_event_fixed_param;
11047
11048/* Types of extscan tables */
11049typedef enum {
11050 EXTSCAN_TABLE_NONE = 0,
11051 EXTSCAN_TABLE_BSSID = 1,
11052 EXTSCAN_TABLE_RSSI = 2,
11053} wmi_extscan_table_type;
11054
11055typedef struct {
11056 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
11057 /** Request ID of the extscan operation that is currently running */
11058 A_UINT32 request_id;
11059 /** Requestor ID of the extscan operation that is currently running */
11060 A_UINT32 requestor_id;
11061 /** VDEV id(interface) of the extscan operation that is currently running */
11062 A_UINT32 vdev_id;
11063 /** table ID - to allow support for multiple simultaneous tables */
11064 A_UINT32 table_id;
11065 /**see wmi_extscan_table_type for table reporting usage */
11066 A_UINT32 table_type;
11067 /**number of entries in use */
11068 A_UINT32 entries_in_use;
11069 /**maximum number of entries in table */
11070 A_UINT32 maximum_entries;
11071} wmi_extscan_table_usage_event_fixed_param;
11072
11073typedef enum {
11074 /**
11075 * Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
11076 * this can be used to discard scan results
11077 */
11078 WMI_SCAN_STATUS_INTERRUPTED = 1
11079} wmi_scan_status_flags;
11080
11081
11082typedef struct {
11083 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
11084 /**RSSI */
11085 A_UINT32 rssi;
11086 /**time stamp in milliseconds */
11087 A_UINT32 tstamp;
11088 /** Extscan cycle during which this entry was scanned */
11089 A_UINT32 scan_cycle_id;
11090 /**
11091 * flag to indicate if the given result was obtained as part of
11092 * interrupted (aborted/large time gap preempted) scan
11093 */
11094 A_UINT32 flags;
11095} wmi_extscan_rssi_info;
11096
11097typedef struct {
11098 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
11099 /**bssid */
11100 wmi_mac_addr bssid;
11101 /**ssid */
11102 wmi_ssid ssid;
11103 /**channel number */
11104 A_UINT32 channel;
11105 /* capabilities */
11106 A_UINT32 capabilities;
11107 /* beacon interval in TUs */
11108 A_UINT32 beacon_interval;
11109 /**time stamp in milliseconds - time last seen */
11110 A_UINT32 tstamp;
11111 /**flags - _tExtScanEntryFlags */
11112 A_UINT32 flags;
11113 /**RTT in ns */
11114 A_UINT32 rtt;
11115 /**rtt standard deviation */
11116 A_UINT32 rtt_sd;
11117 /* rssi information */
11118 A_UINT32 number_rssi_samples;
11119 /** IE length */
11120 A_UINT32 ie_length; /* length of IE data */
11121} wmi_extscan_wlan_descriptor;
11122
11123typedef struct {
11124 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
11125 /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
11126 A_UINT32 request_id;
11127 /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
11128 A_UINT32 requestor_id;
11129 /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
11130 A_UINT32 vdev_id;
11131 /** Request ID of the extscan operation that is currently running */
11132 A_UINT32 extscan_request_id;
11133 /** Requestor ID of the extscan operation that is currently running */
11134 A_UINT32 extscan_requestor_id;
11135 /** VDEV id(interface) of the extscan operation that is currently running */
11136 A_UINT32 extscan_vdev_id;
11137 /** table ID - to allow support for multiple simultaneous tables */
11138 A_UINT32 table_id;
11139 /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
11140 A_UINT32 current_tstamp;
11141 /**total number of bssids (in all pages) */
11142 A_UINT32 total_entries;
11143 /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
11144 A_UINT32 first_entry_index;
11145 /**number of bssids in this page */
11146 A_UINT32 num_entries_in_page;
Govind Singhfad2f212016-01-21 10:55:51 +053011147 /* number of buckets scanned */
11148 A_UINT32 buckets_scanned;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011149 /* Followed by the variable length TLVs
11150 * wmi_extscan_wlan_descriptor bssid_list[]
11151 * wmi_extscan_rssi_info rssi_list[]
11152 * A_UINT8 ie_list[]
11153 */
11154} wmi_extscan_cached_results_event_fixed_param;
11155
11156typedef enum {
11157 EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00,
11158 EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
11159 EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02,
11160} wmi_extscan_wlan_change_flags;
11161
11162typedef struct {
11163 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
11164 /**bssid */
11165 wmi_mac_addr bssid;
11166 /**time stamp in milliseconds */
11167 A_UINT32 tstamp;
11168 /**upper RSSI limit */
11169 A_UINT32 upper_rssi_limit;
11170 /**lower RSSI limit */
11171 A_UINT32 lower_rssi_limit;
11172 /** channel */
11173 A_UINT32 channel; /* in MHz */
11174 /**current RSSI average */
11175 A_UINT32 rssi_average;
11176 /**flags - wmi_extscan_wlan_change_flags */
11177 A_UINT32 flags;
11178 /**legnth of RSSI history to follow (number of values) */
11179 A_UINT32 num_rssi_samples;
11180} wmi_extscan_wlan_change_result_bssid;
11181
11182typedef struct {
11183 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
11184 /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
11185 A_UINT32 request_id;
11186 /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
11187 A_UINT32 requestor_id;
11188 /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
11189 A_UINT32 vdev_id;
11190 /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
11191 A_UINT32 config_request_id;
11192 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
11193 A_UINT32 config_requestor_id;
11194 /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
11195 A_UINT32 config_vdev_id;
11196 /** table ID - to allow support for multiple simultaneous tables */
11197 A_UINT32 table_id;
11198 /**number of entries with RSSI out of range or BSSID not detected */
11199 A_UINT32 change_count;
11200 /**total number of bssid signal descriptors (in all pages) */
11201 A_UINT32 total_entries;
11202 /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
11203 A_UINT32 first_entry_index;
11204 /**number of bssids signal descriptors in this page */
11205 A_UINT32 num_entries_in_page;
11206 /* Following this structure is the TLV:
11207 * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[]; // number of descriptors given by field num_entries_in_page.
11208 * Following this structure is the list of RSSI values (each is an A_UINT8):
11209 * A_UINT8 rssi_list[]; // last N RSSI values.
11210 */
11211} wmi_extscan_wlan_change_results_event_fixed_param;
11212
11213enum _tExtScanEntryFlags {
11214 WMI_HOTLIST_FLAG_NONE = 0x00,
11215 WMI_HOTLIST_FLAG_PRESENCE = 0x01,
11216 WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
11217};
11218
11219typedef struct {
11220 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
11221 /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
11222 A_UINT32 config_request_id;
11223 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
11224 A_UINT32 config_requestor_id;
11225 /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
11226 A_UINT32 config_vdev_id;
11227 /** table ID - to allow support for multiple simultaneous tables */
11228 A_UINT32 table_id;
11229 /**total number of bssids (in all pages) */
11230 A_UINT32 total_entries;
11231 /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
11232 A_UINT32 first_entry_index;
11233 /**number of bssids in this page */
11234 A_UINT32 num_entries_in_page;
11235 /* Following this structure is the TLV:
11236 * wmi_extscan_wlan_descriptor hotlist_match[]; // number of descriptors given by field num_entries_in_page.
11237 */
11238} wmi_extscan_hotlist_match_event_fixed_param;
11239
11240typedef struct {
11241 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
11242 /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
11243 A_UINT32 request_id;
11244 /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
11245 A_UINT32 requestor_id;
11246 /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
11247 A_UINT32 vdev_id;
11248 /** number of extscan caches */
11249 A_UINT32 num_extscan_cache_tables;
11250 /** number of wlan change lists */
11251 A_UINT32 num_wlan_change_monitor_tables;
11252 /** number of hotlists */
11253 A_UINT32 num_hotlist_monitor_tables;
11254 /** if one sided rtt data collection is supported */
11255 A_UINT32 rtt_one_sided_supported;
11256 /** if 11v data collection is supported */
11257 A_UINT32 rtt_11v_supported;
11258 /** if 11mc data collection is supported */
11259 A_UINT32 rtt_ftm_supported;
11260 /** number of extscan cache capabilities (one per table) */
11261 A_UINT32 num_extscan_cache_capabilities;
11262 /** number of wlan change capabilities (one per table) */
11263 A_UINT32 num_extscan_wlan_change_capabilities;
11264 /** number of extscan hotlist capabilities (one per table) */
11265 A_UINT32 num_extscan_hotlist_capabilities;
11266 /* max number of roaming ssid whitelist firmware can support */
11267 A_UINT32 num_roam_ssid_whitelist;
11268 /* max number of blacklist bssid firmware can support */
11269 A_UINT32 num_roam_bssid_blacklist;
11270 /* max number of preferred list firmware can support */
11271 A_UINT32 num_roam_bssid_preferred_list;
11272 /* max number of hotlist ssids firmware can support */
11273 A_UINT32 num_extscan_hotlist_ssid;
11274 /* max number of epno networks firmware can support */
11275 A_UINT32 num_epno_networks;
11276
11277 /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
11278 * supports multiple lists of each type.
11279 *
11280 * wmi_extscan_cache_capabilities extscan_cache_capabilities[] // capabilities of extscan cache (BSSID/RSSI lists)
11281 * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] // capabilities of wlan_change_monitor_tables
11282 * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] // capabilities of hotlist_monitor_tables
11283 */
11284} wmi_extscan_capabilities_event_fixed_param;
11285
11286/* WMI_D0_WOW_DISABLE_ACK_EVENTID */
11287typedef struct {
11288 A_UINT32 tlv_header;
11289 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */
11290 A_UINT32 reserved0; /* for future need */
11291} wmi_d0_wow_disable_ack_event_fixed_param;
11292
11293/** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
11294typedef struct {
11295 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param */
11296 A_UINT32 rsvd; /* for future need */
11297} wmi_pdev_resume_event_fixed_param;
11298
11299/** value representing all modules */
11300#define WMI_DEBUG_LOG_MODULE_ALL 0xffff
11301
11302/* param definitions */
11303
11304/**
11305 * Log level for a given module. Value contains both module id and log level.
11306 * here is the bitmap definition for value.
11307 * module Id : 16
11308 * Flags : reserved
11309 * Level : 8
11310 * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global).
11311 * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
11312 */
11313#define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1
11314
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011315#define WMI_DBGLOG_SET_LOG_LEVEL(val, lvl) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011316 (val) |= (lvl & 0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011317} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011318
11319#define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
11320
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011321#define WMI_DBGLOG_SET_MODULE_ID(val, mid) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011322 (val) |= ((mid & 0xffff) << 16); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011323} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011324
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011325#define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011326
11327/**
11328 * Enable the debug log for a given vdev. Value is vdev id
11329 */
11330#define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2
11331
11332/**
11333 * Disable the debug log for a given vdev. Value is vdev id
11334 * All the log level for a given VDEV is disabled except the ERROR log messages
11335 */
11336
11337#define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3
11338
11339/**
11340 * set vdev enable bitmap. value is the vden enable bitmap
11341 */
11342#define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4
11343
11344/**
11345 * set a given log level to all the modules specified in the module bitmap.
11346 * and set the log levle for all other modules to DBGLOG_ERR.
11347 * value: log levelt to be set.
11348 * module_id_bitmap : identifies the modules for which the log level should be set and
11349 * modules for which the log level should be reset to DBGLOG_ERR.
11350 */
11351#define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5
11352
11353#define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
11354
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011355#define WMI_MODULE_ENABLE(pmid_bitmap, mod_id) \
11356 ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
11357 (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011358
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011359#define WMI_MODULE_DISABLE(pmid_bitmap, mod_id) \
11360 ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \
11361 (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011362
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011363#define WMI_MODULE_IS_ENABLED(pmid_bitmap, mod_id) \
11364 (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \
11365 (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011366
11367#define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
11368typedef struct {
11369 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
11370 A_UINT32 dbg_log_param;
11371 /** param types are defined above */
11372 A_UINT32 value;
11373 /* The below array will follow this tlv ->fixed length module_id_bitmap[]
11374 A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
11375 */
11376} wmi_debug_log_config_cmd_fixed_param;
11377
11378typedef struct {
11379 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */
11380 A_UINT32 param; /* Reserved for future use */
11381} wmi_pdev_get_temperature_cmd_fixed_param;
11382
11383typedef struct {
11384 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
11385 A_INT32 value; /* temprature value in Celcius degree */
11386} wmi_pdev_temperature_event_fixed_param;
11387
11388typedef struct {
11389 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
11390 A_UINT32 vdev_id;
11391 A_UINT32 enable;
11392 A_UINT32 srv_ipv4; /* server IP */
11393 A_UINT32 start_lsb; /* starting address assigned to client */
11394 A_UINT32 num_client; /* number of clients we support */
11395} wmi_set_dhcp_server_offload_cmd_fixed_param;
11396
11397typedef enum {
11398 AP_RX_DATA_OFFLOAD = 0x00,
11399 STA_RX_DATA_OFFLOAD = 0x01,
11400} wmi_ipa_offload_types;
11401
11402/**
11403 * This command is sent from WLAN host driver to firmware for
11404 * enabling/disabling IPA data-path offload features.
11405 *
11406 *
11407 * Enabling data path offload to IPA(based on host INI configuration), example:
11408 * when STA interface comes up,
11409 * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
11410 * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
11411 *
11412 * Disabling data path offload to IPA, example:
11413 * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
11414 * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
11415 *
11416 *
11417 * This command is applicable only on the PCIE LL systems
11418 *
11419 */
11420typedef struct {
11421 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
11422 A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
11423 A_UINT32 vdev_id;
11424 A_UINT32 enable; /* 1 == enable, 0 == disable */
11425} wmi_ipa_offload_enable_disable_cmd_fixed_param;
11426
11427typedef enum {
11428 WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0,
11429 WMI_LED_FLASHING_PATTERN_CONNECTED = 1,
11430 WMI_LED_FLASHING_PATTERN_RESERVED = 2,
11431} wmi_set_led_flashing_type;
11432
11433/**
11434 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.
11435 Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
11436 remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
11437 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
11438 pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to
11439 High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
11440 Zero is reached, it is skipped and moves on to the next interval.
11441 */
11442typedef struct {
11443 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */
11444 A_UINT32 pattern_id; /* pattern identifier */
11445 A_UINT32 led_x0; /* led flashing parameter0 */
11446 A_UINT32 led_x1; /* led flashing parameter1 */
11447 A_UINT32 gpio_num; /* GPIO number */
11448} wmi_set_led_flashing_cmd_fixed_param;
11449
11450/**
11451 * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
11452 * within small networks that do not include a local name server.
11453 * It utilizes essentially the same programming interfaces, packet formats and operating semantics
11454 * as the unicast DNS, and the advantage is zero configuration service while no need for central or
11455 * global server.
11456 * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
11457 * by type in a specified domain using standard DNS queries.
11458 * Here, we provide the ability to advertise the available services by responding to mDNS queries.
11459 */
11460typedef struct {
11461 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
11462 A_UINT32 vdev_id;
11463 A_UINT32 enable;
11464} wmi_mdns_offload_cmd_fixed_param;
11465
11466#define WMI_MAX_MDNS_FQDN_LEN 64
11467#define WMI_MAX_MDNS_RESP_LEN 512
11468#define WMI_MDNS_FQDN_TYPE_GENERAL 0
11469#define WMI_MDNS_FQDN_TYPE_UNIQUE 1
11470
11471typedef struct {
11472 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
11473 A_UINT32 vdev_id;
11474 /** type of fqdn, general or unique */
11475 A_UINT32 type;
11476 /** length of fqdn */
11477 A_UINT32 fqdn_len;
11478 /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
11479 * A_UINT8 fqdn_data[]; // fully-qualified domain name to check if match with the received queries
11480 */
11481} wmi_mdns_set_fqdn_cmd_fixed_param;
11482
11483typedef struct {
11484 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
11485 A_UINT32 vdev_id;
11486 /** Answer Resource Record count */
11487 A_UINT32 AR_count;
11488 /** length of response */
11489 A_UINT32 resp_len;
11490 /* Following this structure is the TLV byte stream of resp data of length resp_len
11491 * A_UINT8 resp_data[]; // responses consisits of Resource Records
11492 */
11493} wmi_mdns_set_resp_cmd_fixed_param;
11494
11495typedef struct {
11496 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
11497 A_UINT32 vdev_id;
11498} wmi_mdns_get_stats_cmd_fixed_param;
11499
11500typedef struct {
11501 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
11502 A_UINT32 vdev_id;
11503 /** curTimestamp in milliseconds */
11504 A_UINT32 curTimestamp;
11505 /** last received Query in milliseconds */
11506 A_UINT32 lastQueryTimestamp;
11507 /** last sent Response in milliseconds */
11508 A_UINT32 lastResponseTimestamp;
11509 /** stats of received queries */
11510 A_UINT32 totalQueries;
11511 /** stats of macth queries */
11512 A_UINT32 totalMatches;
11513 /** stats of responses */
11514 A_UINT32 totalResponses;
11515 /** indicate the current status of mDNS offload */
11516 A_UINT32 status;
11517} wmi_mdns_stats_event_fixed_param;
11518
11519/**
11520 * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
11521 * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
11522 * request and create/remove connection even host is suspended.
11523 * 3 major components are offloaded:
11524 * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
11525 * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
11526 * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
11527 * Current implementation only supports WPA2 CCMP.
11528 */
11529
11530typedef struct {
11531 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
11532 /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
11533 A_UINT32 vdev_id;
11534 /** enable/disable sap auth offload */
11535 A_UINT32 enable;
11536 /** sap ssid */
11537 wmi_ssid ap_ssid;
11538 /** authentication mode (defined above) */
11539 A_UINT32 rsn_authmode;
11540 /** unicast cipher set */
11541 A_UINT32 rsn_ucastcipherset;
11542 /** mcast/group cipher set */
11543 A_UINT32 rsn_mcastcipherset;
11544 /** mcast/group management frames cipher set */
11545 A_UINT32 rsn_mcastmgmtcipherset;
11546 /** sap channel */
11547 A_UINT32 channel;
11548 /** length of psk */
11549 A_UINT32 psk_len;
11550 /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
11551 * A_UINT8 psk[];
11552 */
11553} wmi_sap_ofl_enable_cmd_fixed_param;
11554
11555typedef struct {
11556 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
11557 /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
11558 A_UINT32 vdev_id;
11559 /** aid (association id) of this station */
11560 A_UINT32 assoc_id;
11561 /** peer station's mac addr */
11562 wmi_mac_addr peer_macaddr;
11563 /** length of association request frame */
11564 A_UINT32 data_len;
11565 /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
11566 * A_UINT8 bufp[];
11567 */
11568} wmi_sap_ofl_add_sta_event_fixed_param;
11569
11570typedef enum {
11571 SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
11572 SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
11573} wmi_sap_ofl_del_sta_flags;
11574
11575typedef struct {
11576 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
11577 /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
11578 A_UINT32 vdev_id;
11579 /** aid (association id) of this station */
11580 A_UINT32 assoc_id;
11581 /** peer station's mac addr */
11582 wmi_mac_addr peer_macaddr;
11583 /** disassociation reason */
11584 A_UINT32 reason;
11585 /** flags - wmi_sap_ofl_del_sta_flags */
11586 A_UINT32 flags;
11587} wmi_sap_ofl_del_sta_event_fixed_param;
11588
11589typedef struct {
11590 /*
11591 * TLV tag and len; tag equals
11592 * WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param
11593 */
11594 A_UINT32 tlv_header;
11595 A_UINT32 vdev_id;
11596 /* Number of client failure connection attempt */
11597 A_UINT32 num_retry;
11598 /*Time in milliseconds to record the client's failure connection attempts*/
11599 A_UINT32 retry_allow_time_ms;
11600 /*
11601 * Time in milliseconds to drop the connection request if
11602 * client is blacklisted
11603 */
11604 A_UINT32 blackout_time_ms;
11605} wmi_sap_set_blacklist_param_cmd_fixed_param;
11606
11607typedef struct {
11608 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
11609 A_UINT32 data_len; /** length in byte of data[]. */
11610 /** This structure is used to send REQ binary blobs
11611 * from application/service to firmware where Host drv is pass through .
11612 * Following this structure is the TLV:
11613 * A_UINT8 data[]; // length in byte given by field data_len.
11614 */
11615} wmi_apfind_cmd_param;
11616
11617typedef enum apfind_event_type_e {
11618 APFIND_MATCH_EVENT = 0,
11619 APFIND_WAKEUP_EVENT,
11620} APFIND_EVENT_TYPE;
11621
11622typedef struct {
11623 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
11624 A_UINT32 event_type; /** APFIND_EVENT_TYPE */
11625 A_UINT32 data_len; /** length in byte of data[]. */
11626 /** This structure is used to send event binary blobs
11627 * from firmware to application/service and Host drv.
11628 * Following this structure is the TLV:
11629 * A_UINT8 data[]; // length in byte given by field data_len.
11630 */
11631} wmi_apfind_event_hdr;
11632
11633/**
11634 * OCB DCC types and structures.
11635 */
11636
11637/**
11638 * DCC types as described in ETSI TS 102 687
11639 * Type Format stepSize referenceValue numBits
11640 * -------------------------------------------------------------------------
11641 * ndlType_acPrio INTEGER (0...7) 1 number 3
11642 * ndlType_controlLoop INTEGER (0...7) 1 0 3
11643 * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13
11644 * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10
11645 * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13
11646 * ndlType_datarate INTEGER (0..7) Table 8 3
11647 * ndlType_distance INTEGER (0..4095) 1 m 0 12
11648 * ndlType_numberElements INTEGER (0..63) number 6
11649 * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11
11650 * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10
11651 * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5
11652 * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7
11653 * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7
11654 * ndlType_timing INTEGER (0..4095) 10 ms 0 12
11655 * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7
11656 * ndlType_ratio INTEGER (0..100) 1 % 0 % 7
11657 * ndlType_exponent INTEGER (0..100) 0.1 0 7
11658 * ndlType_queueStatus Enumeration Table A.2 1
11659 * ndlType_dccMechanism Bitset Table A.2 6
11660 *
11661 * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
11662 * cannot be changed without breaking WMI compatibility.
11663 *
11664 * NOTE: For each of the types, one additional bit is allocated. This
11665 * leftmost bit is used to indicate that the value is invalid.
11666 */
11667#define SIZE_NDLTYPE_ACPRIO (1 + 3)
11668#define SIZE_NDLTYPE_CONTROLLOOP (1 + 3)
11669#define SIZE_NDLTYPE_ARRIVALRATE (1 + 13)
11670#define SIZE_NDLTYPE_CHANNELLOAD (1 + 10)
11671#define SIZE_NDLTYPE_CHANNELUSE (1 + 13)
11672#define SIZE_NDLTYPE_DATARATE (1 + 3)
11673#define SIZE_NDLTYPE_DISTANCE (1 + 12)
11674#define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6)
11675#define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
11676#define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
11677#define SIZE_NDLTYPE_PATHLOSS (1 + 5)
11678#define SIZE_NDLTYPE_RXPOWER (1 + 7)
11679#define SIZE_NDLTYPE_SNR (1 + 7)
11680#define SIZE_NDLTYPE_TIMING (1 + 12)
11681#define SIZE_NDLTYPE_TXPOWER (1 + 7)
11682#define SIZE_NDLTYPE_RATIO (1 + 7)
11683#define SIZE_NDLTYPE_EXPONENT (1 + 7)
11684#define SIZE_NDLTYPE_QUEUESTATUS (1 + 1)
11685#define SIZE_NDLTYPE_DCCMECHANISM (1 + 6)
11686#define SIZE_BYTE (8)
11687
11688#define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
11689#define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
11690#define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
11691#define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
11692#define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
11693#define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1)
11694#define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
11695#define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
11696#define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
11697#define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
11698#define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
11699#define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
11700#define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1)
11701#define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1)
11702#define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
11703#define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1)
11704#define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
11705#define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
11706#define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
11707
11708/**
11709 * The MCS_COUNT macro cannot be modified without breaking
11710 * WMI compatibility.
11711 */
11712#define MCS_COUNT (8)
11713
11714/**
11715 * Flags for ndlType_dccMechanism.
11716 */
11717typedef enum {
11718 DCC_MECHANISM_TPC = 1,
11719 DCC_MECHANISM_TRC = 2,
11720 DCC_MECHANISM_TDC = 4,
11721 DCC_MECHANISM_DSC = 8,
11722 DCC_MECHANISM_TAC = 16,
11723 DCC_MECHANISM_RESERVED = 32,
11724 DCC_MECHANISM_ALL = 0x3f,
11725} wmi_dcc_ndl_type_dcc_mechanism;
11726
11727/** Values for ndlType_queueStatus. */
11728typedef enum {
11729 DCC_QUEUE_CLOSED = 0,
11730 DCC_QUEUE_OPEN = 1,
11731} wmi_dcc_ndl_type_queue_status;
11732
11733/**
11734 * For ndlType_acPrio, use the values in wmi_traffic_ac.
11735 * Values for ndlType_datarate.
11736 */
11737typedef enum {
11738 DCC_DATARATE_3_MBPS = 0,
11739 DCC_DATARATE_4_5_MBPS = 1,
11740 DCC_DATARATE_6_MBPS = 2,
11741 DCC_DATARATE_9_MBPS = 3,
11742 DCC_DATARATE_12_MBPS = 4,
11743 DCC_DATARATE_18_MBPS = 5,
11744 DCC_DATARATE_24_MBPS = 6,
11745 DCC_DATARATE_27_MBPS = 7,
11746} wmi_dcc_ndl_type_datarate;
11747
11748/** Data structure for active state configuration. */
11749typedef struct {
11750 /** TLV tag and len; tag equals
11751 * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config
11752 */
11753 A_UINT32 tlv_header;
11754 /**
11755 * NDL_asStateId, ndlType_numberElements, 1+6 bits.
11756 * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
11757 */
11758 A_UINT32 state_info;
11759 /**
11760 * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
11761 * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
11762 * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
11763 * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
11764 */
11765 A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
11766 /**
11767 * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
11768 * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
11769 * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
11770 * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
11771 */
11772 A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
11773 /**
11774 * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
11775 * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
11776 * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
11777 * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
11778 */
11779 A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
11780 /**
11781 * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
11782 * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
11783 * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
11784 * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
11785 */
11786 A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
11787 /**
11788 * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
11789 * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
11790 * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
11791 * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
11792 */
11793 A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
11794} wmi_dcc_ndl_active_state_config;
11795
11796#define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7)
11797#define WMI_NDL_AS_STATE_ID_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 0, 7, val)
11798#define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11)
11799#define WMI_NDL_AS_CHAN_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 7, 11, val)
11800#define WMI_NDL_AS_DCC_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
11801#define WMI_NDL_AS_DCC_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
11802#define WMI_NDL_AS_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
11803#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)
11804#define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
11805#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)
11806#define WMI_NDL_AS_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
11807#define WMI_NDL_AS_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
11808#define WMI_NDL_AS_CARRIER_SENSE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
11809#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)
11810
11811/** Data structure for EDCA/QOS parameters. */
11812typedef struct {
11813 /** TLV tag and len; tag equals
11814 * WMITLV_TAG_STRUC_wmi_qos_parameter */
11815 A_UINT32 tlv_header;
11816 /** Arbitration Inter-Frame Spacing. Range: 2-15 */
11817 A_UINT32 aifsn;
11818 /** Contention Window minimum. Range: 1 - 10 */
11819 A_UINT32 cwmin;
11820 /** Contention Window maximum. Range: 1 - 10 */
11821 A_UINT32 cwmax;
11822} wmi_qos_parameter;
11823
11824/** Data structure for information specific to a channel. */
11825typedef struct {
11826 /** TLV tag and len; tag equals
11827 * WMITLV_TAG_STRUC_wmi_ocb_channel */
11828 A_UINT32 tlv_header;
11829 A_UINT32 bandwidth; /* MHz units */
11830 wmi_mac_addr mac_address;
11831} wmi_ocb_channel;
11832
11833/** Data structure for an element of the schedule array. */
11834typedef struct {
11835 /** TLV tag and len; tag equals
11836 * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
11837 A_UINT32 tlv_header;
11838 A_UINT32 channel_freq; /* MHz units */
11839 A_UINT32 total_duration; /* ms units */
11840 A_UINT32 guard_interval; /* ms units */
11841} wmi_ocb_schedule_element;
11842
11843/** Data structure for OCB configuration. */
11844typedef struct {
11845 /** TLV tag and len; tag equals
11846 * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
11847 A_UINT32 tlv_header;
11848 /** VDEV id(interface) that is being configured */
11849 A_UINT32 vdev_id;
11850 A_UINT32 channel_count;
11851 A_UINT32 schedule_size;
11852 A_UINT32 flags;
11853
11854 /** This is followed by a TLV array of wmi_channel.
11855 * This is followed by a TLV array of wmi_ocb_channel.
11856 * This is followed by a TLV array of wmi_qos_parameter.
11857 * This is followed by a TLV array of wmi_dcc_ndl_chan.
11858 * This is followed by a TLV array of wmi_dcc_ndl_active_state_config.
11859 * This is followed by a TLV array of wmi_ocb_schedule_element.
11860 */
11861} wmi_ocb_set_config_cmd_fixed_param;
11862
11863
11864#define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0
11865#define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1
11866
11867#define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) \
11868 (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
11869
11870
11871/** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
11872typedef struct {
11873 /** TLV tag and len; tag equals
11874 * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param
11875 */
11876 A_UINT32 tlv_header;
11877 /* VDEV id(interface)*/
11878 A_UINT32 vdev_id;
11879 A_UINT32 status;
11880} wmi_ocb_set_config_resp_event_fixed_param;
11881
11882/* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
11883 * WMI compatibility.
11884 */
11885/* The size of the utc time in bytes. */
11886#define SIZE_UTC_TIME (10)
11887/* The size of the utc time error in bytes. */
11888#define SIZE_UTC_TIME_ERROR (5)
11889
11890/** Data structure to set the UTC time. */
11891typedef struct {
11892 /** TLV tag and len; tag equals
11893 * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
11894 A_UINT32 tlv_header;
11895 /*VDEV Identifier*/
11896 A_UINT32 vdev_id;
11897 /** 10 bytes of the utc time. */
11898 A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME, SIZE_BYTE)];
11899 /** 5 bytes of the time error. */
11900 A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR, SIZE_BYTE)];
11901} wmi_ocb_set_utc_time_cmd_fixed_param;
11902
11903#define WMI_UTC_TIME_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
11904#define WMI_UTC_TIME_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
11905#define WMI_TIME_ERROR_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
11906#define WMI_TIME_ERROR_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
11907
11908/** Data structure start the timing advertisement. The template for the
11909 * timing advertisement frame follows this structure in the WMI command.
11910 */
11911typedef struct {
11912 /** TLV tag and len; tag equals
11913 * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
11914 A_UINT32 tlv_header;
11915 /*VDEV Identifier*/
11916 A_UINT32 vdev_id;
11917 /** Number of times the TA is sent every 5 seconds. */
11918 A_UINT32 repeat_rate;
11919 /** The frequency on which to transmit. */
11920 A_UINT32 channel_freq; /* MHz units */
11921 /** The offset into the template of the timestamp. */
11922 A_UINT32 timestamp_offset;
11923 /** The offset into the template of the time value. */
11924 A_UINT32 time_value_offset;
11925 /** The length of the timing advertisement template. The
11926 * template is in the TLV data. */
11927 A_UINT32 timing_advert_template_length;
11928 /** This is followed by a binary array containing the TA template. */
11929} wmi_ocb_start_timing_advert_cmd_fixed_param;
11930
11931/** Data structure to stop the timing advertisement. */
11932typedef struct {
11933 /** TLV tag and len; tag equals
11934 * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
11935 A_UINT32 tlv_header;
11936 /*VDEV Identifier*/
11937 A_UINT32 vdev_id;
11938 A_UINT32 channel_freq; /* MHz units */
11939} wmi_ocb_stop_timing_advert_cmd_fixed_param;
11940
11941/** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
11942typedef struct {
11943 /** TLV tag and len; tag equals
11944 * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
11945 A_UINT32 tlv_header;
11946 /*VDEV Identifier*/
11947 A_UINT32 vdev_id;
11948 A_UINT32 reserved;
11949} wmi_ocb_get_tsf_timer_cmd_fixed_param;
11950
11951/** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
11952typedef struct {
11953 /** TLV tag and len; tag equals
11954 * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
11955 A_UINT32 tlv_header;
11956 /*VDEV Identifier*/
11957 A_UINT32 vdev_id;
11958 A_UINT32 tsf_timer_high;
11959 A_UINT32 tsf_timer_low;
11960} wmi_ocb_get_tsf_timer_resp_event_fixed_param;
11961
11962/** Data structure for DCC stats configuration per channel. */
11963typedef struct {
11964 /** TLV tag and len; tag equals
11965 * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
11966 A_UINT32 tlv_header;
11967
11968 /*VDEV Identifier*/
11969 A_UINT32 vdev_id;
11970
11971 /** The channel for which this applies, 16 bits.
11972 * The dcc_stats_bitmap, 8 bits. */
11973 A_UINT32 chan_info;
11974
11975 /** Demodulation model parameters.
11976 *
11977 * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
11978 * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
11979 * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
11980 * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
11981 * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
11982 * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
11983 * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
11984 * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
11985 */
11986 A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)];
11987
11988 /** Communication ranges.
11989 *
11990 * tx_power, ndlType_txPower, 1+7 bits.
11991 * datarate, ndlType_datarate, 1+3 bits.
11992 */
11993 A_UINT32 tx_power_datarate;
11994 /**
11995 * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
11996 * NDL_estCommRange, ndlType_distance, 1+12 bits.
11997 */
11998 A_UINT32 carrier_sense_est_comm_range;
11999
12000 /** Channel load measures. */
12001 /**
12002 * dccSensitivity, ndlType_rxPower, 1+7 bits.
12003 * carrierSense, ndlType_rxPower, 1+7 bits.
12004 * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
12005 */
12006 A_UINT32 dcc_stats;
12007 /**
12008 * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
12009 * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
12010 */
12011 A_UINT32 packet_stats;
12012 /**
12013 * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
12014 */
12015 A_UINT32 channel_busy_time;
12016 /**
12017 *Transmit packet statistics.
12018 * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
12019 * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
12020 * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
12021 * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
12022 */
12023 A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
12024 /**
12025 * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
12026 * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
12027 * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
12028 * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
12029 */
12030 A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
12031 /**
12032 * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
12033 * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
12034 * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
12035 * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
12036 */
12037 A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
12038 /**
12039 * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
12040 * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
12041 * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
12042 * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
12043 */
12044 A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
12045} wmi_dcc_ndl_stats_per_channel;
12046
12047#define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
12048#define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
12049#define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
12050#define WMI_NDL_STATS_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
12051#define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8)
12052#define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
12053#define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
12054#define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
12055#define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
12056#define WMI_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
12057#define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
12058#define WMI_TX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
12059#define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
12060#define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
12061#define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
12062#define WMI_NDL_EST_COMM_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
12063#define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
12064#define WMI_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
12065#define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
12066#define WMI_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
12067#define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
12068#define WMI_NDL_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
12069#define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14)
12070#define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
12071#define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12)
12072#define WMI_NDL_PACKET_AVG_DURATION_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
12073#define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
12074#define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr, val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
12075
12076#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)
12077#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)
12078#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)
12079#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)
12080#define WMI_NDL_TX_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
12081#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)
12082#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)
12083#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)
12084
12085/** Bitmap for DCC stats. */
12086typedef enum {
12087 DCC_STATS_DEMODULATION_MODEL = 1,
12088 DCC_STATS_COMMUNICATION_RANGES = 2,
12089 DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
12090 DCC_STATS_TRANSMIT_PACKET_STATS = 8,
12091 DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
12092 DCC_STATS_ALL = 0xff,
12093} wmi_dcc_stats_bitmap;
12094
12095/** Data structure for getting the DCC stats. */
12096typedef struct {
12097 /**
12098 * TLV tag and len; tag equals
12099 * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param
12100 */
12101 A_UINT32 tlv_header;
12102 /* VDEV identifier */
12103 A_UINT32 vdev_id;
12104 /**The number of channels for which stats are being requested. */
12105 A_UINT32 num_channels;
12106 /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
12107} wmi_dcc_get_stats_cmd_fixed_param;
12108
12109typedef struct {
12110 /**
12111 * TLV tag and len; tag equals
12112 * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request.
12113 */
12114 A_UINT32 tlv_header;
12115 /** The channel for which this applies. */
12116 A_UINT32 chan_freq; /* MHz units */
12117 /** The DCC stats being requested. */
12118 A_UINT32 dcc_stats_bitmap;
12119} wmi_dcc_channel_stats_request;
12120
12121/** Data structure for the response with the DCC stats. */
12122typedef struct {
12123 /**
12124 * TLV tag and len; tag equals
12125 * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param
12126 */
12127 A_UINT32 tlv_header;
12128 /* VDEV identifier */
12129 A_UINT32 vdev_id;
12130 /** Number of channels in the response. */
12131 A_UINT32 num_channels;
12132 /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
12133} wmi_dcc_get_stats_resp_event_fixed_param;
12134
12135/** Data structure for clearing the DCC stats. */
12136typedef struct {
12137 /**
12138 * TLV tag and len; tag equals
12139 * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param
12140 */
12141 A_UINT32 tlv_header;
12142 /* VDEV identifier */
12143 A_UINT32 vdev_id;
12144 A_UINT32 dcc_stats_bitmap;
12145} wmi_dcc_clear_stats_cmd_fixed_param;
12146
12147/** Data structure for the pushed DCC stats */
12148typedef struct {
12149 /**
12150 * TLV tag and len; tag equals
12151 * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param
12152 */
12153 A_UINT32 tlv_header;
12154 /* VDEV identifier */
12155 A_UINT32 vdev_id;
12156 /** The number of channels in the response. */
12157 A_UINT32 num_channels;
12158 /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
12159} wmi_dcc_stats_event_fixed_param;
12160
12161/** Data structure for updating NDL per channel. */
12162typedef struct {
12163 /**
12164 * TLV tag and len; tag equals
12165 * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan
12166 */
12167 A_UINT32 tlv_header;
12168 /**
12169 * Channel frequency, 16 bits
12170 * NDL_numActiveState, ndlType_numberElements, 1+6 bits
12171 */
12172 A_UINT32 chan_info;
12173 /**
12174 * NDL_minDccSampling, 10 bits.
12175 * Maximum time interval between subsequent checks of the DCC rules.
12176 */
12177 A_UINT32 ndl_min_dcc_sampling;
12178 /**
12179 * dcc_enable, 1 bit.
12180 * dcc_stats_enable, 1 bit.
12181 * dcc_stats_interval, 16 bits.
12182 */
12183 A_UINT32 dcc_flags;
12184 /** General DCC configuration.
12185 * NDL_timeUp, ndlType_timing, 1+12 bits.
12186 * NDL_timeDown, ndlType_timing, 1+12 bits.
12187 */
12188 A_UINT32 general_config;
12189 /** Transmit power thresholds.
12190 * NDL_minTxPower, ndlType_txPower, 1+7 bits.
12191 * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
12192 */
12193 /* see "ETSI TS 102 687" table above for units */
12194 A_UINT32 min_max_tx_power;
12195 /**
12196 * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
12197 * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
12198 * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
12199 * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
12200 */
12201 /* see "ETSI TS 102 687" table above for units */
12202 A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
12203 /** Packet timing thresholds.
12204 * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
12205 * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
12206 * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
12207 * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
12208 */
12209 A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
12210 /**
12211 * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
12212 * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
12213 */
12214 A_UINT32 min_max_packet_interval;
12215 /**
12216 * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
12217 * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
12218 * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
12219 * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits
12220 */
12221 A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
12222 /** Packet datarate thresholds.
12223 * NDL_minDatarate, ndlType_datarate, 1+3 bits.
12224 * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
12225 */
12226 A_UINT32 min_max_datarate;
12227 /**
12228 * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
12229 * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
12230 * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
12231 * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
12232 */
12233 A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
12234 /** Receive signal thresholds.
12235 * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
12236 * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
12237 * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
12238 */
12239 A_UINT32 min_max_def_carrier_sense;
12240
12241 /** Receive model parameter.
12242 * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
12243 * NDL_maxCsRange, ndlType_distance, 1+12 bits.
12244 * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
12245 */
12246 A_UINT32 receive_model_parameter;
12247
12248 /**
12249 * NDL_minSNR, ndlType_snr, 1+7 bits.
12250 */
12251 A_UINT32 receive_model_parameter_2;
12252
12253 /** Demodulation model parameters.
12254 * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
12255 * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
12256 * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
12257 * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
12258 * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
12259 * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
12260 * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
12261 * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
12262 */
12263 A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)];
12264 /** Transmit model parameters.
12265 * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
12266 * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
12267 * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
12268 * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
12269 */
12270 A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
12271 /**
12272 * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
12273 * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
12274 * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
12275 * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
12276 */
12277 A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
12278 /**
12279 * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
12280 * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
12281 * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
12282 * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
12283 */
12284 A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
12285 /* NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits. */
12286 A_UINT32 tm_max_channel_use;
12287 /**
12288 * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
12289 * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
12290 * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
12291 * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
12292 */
12293 A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
12294 /** Channel load thresholds.
12295 * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
12296 * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
12297 */
12298 A_UINT32 min_max_channel_load;
12299 /** Transmit queue parameters.
12300 * NDL_numQueue, ndlType_acPrio, 1+3 bits.
12301 * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
12302 * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
12303 * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
12304 * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
12305 */
12306 A_UINT32 transmit_queue_parameters;
12307 /**
12308 * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
12309 * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
12310 * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
12311 * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
12312 */
12313 A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
12314} wmi_dcc_ndl_chan;
12315
12316#define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
12317#define WMI_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
12318#define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7)
12319#define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
12320
12321#define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
12322#define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
12323
12324#define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
12325#define WMI_NDL_MEASURE_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
12326
12327
12328#define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
12329#define WMI_NDL_DCC_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
12330#define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
12331#define WMI_NDL_DCC_STATS_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
12332#define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
12333#define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
12334
12335#define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13)
12336#define WMI_NDL_TIME_UP_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 0, 13, val)
12337#define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13)
12338#define WMI_NDL_TIME_DOWN_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 13, 13, val)
12339
12340#define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
12341#define WMI_NDL_MIN_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
12342#define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
12343#define WMI_NDL_MAX_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
12344
12345#define WMI_NDL_DEF_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
12346#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)
12347
12348#define WMI_NDL_MAX_PACKET_DURATION_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
12349#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)
12350#define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
12351#define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
12352#define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
12353#define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
12354#define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
12355#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)
12356
12357#define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
12358#define WMI_NDL_MIN_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
12359#define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
12360#define WMI_NDL_MAX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
12361#define WMI_NDL_DEF_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
12362#define WMI_NDL_DEF_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
12363
12364#define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
12365#define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
12366#define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
12367#define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
12368#define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
12369#define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
12370
12371#define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
12372#define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
12373#define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
12374#define WMI_NDL_MAX_CS_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
12375#define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
12376#define WMI_NDL_REF_PATH_LOSS_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
12377
12378#define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
12379#define WMI_NDL_MIN_SNR_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
12380
12381#define WMI_NDL_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
12382#define WMI_NDL_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
12383
12384#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)
12385#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)
12386#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)
12387#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)
12388#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)
12389#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)
12390#define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
12391#define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr, val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
12392#define WMI_NDL_TM_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
12393#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)
12394
12395#define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
12396#define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
12397#define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
12398#define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
12399
12400#define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
12401#define WMI_NDL_NUM_QUEUE_SET(ptr, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
12402#define WMI_NDL_REF_QUEUE_STATUS_GET(ptr, acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
12403#define WMI_NDL_REF_QUEUE_STATUS_SET(ptr, acprio, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
12404#define WMI_NDL_REF_QUEUE_LEN_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
12405#define WMI_NDL_REF_QUEUE_LEN_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
12406
12407/** Data structure for updating the NDL. */
12408typedef struct {
12409 /** TLV tag and len; tag equals
12410 * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
12411 A_UINT32 tlv_header;
12412 /* VDEV identifier */
12413 A_UINT32 vdev_id;
12414 /** The number of channels in the request. */
12415 A_UINT32 num_channel;
12416 /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
12417 /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
12418} wmi_dcc_update_ndl_cmd_fixed_param;
12419
12420typedef struct {
12421 /**
12422 * TLV tag and len; tag equals
12423 * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param
12424 */
12425 A_UINT32 tlv_header;
12426 /* VDEV identifier */
12427 A_UINT32 vdev_id;
12428 A_UINT32 status;
12429} wmi_dcc_update_ndl_resp_event_fixed_param;
12430
12431/* Actions for TSF timestamp */
12432typedef enum {
12433 TSF_TSTAMP_CAPTURE_REQ = 1,
12434 TSF_TSTAMP_CAPTURE_RESET = 2,
12435 TSF_TSTAMP_READ_VALUE = 3,
Govind Singhd2970e32016-01-21 10:30:02 +053012436 TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012437} wmi_tsf_tstamp_action;
12438
12439typedef struct {
12440 /** TLV tag and len; tag equals
12441 * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
12442 A_UINT32 tlv_header;
12443 /** unique id identifying the VDEV, generated by the caller */
12444 A_UINT32 vdev_id;
12445 /* action type, refer to wmi_tsf_tstamp_action */
12446 A_UINT32 tsf_action;
Govind Singhd2970e32016-01-21 10:30:02 +053012447 /* low 32 bits of qtimer */
12448 A_UINT32 qtimer_low;
12449 /* high 32 bits of qtimer */
12450 A_UINT32 qtimer_high;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012451} wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
12452
12453typedef struct {
12454 /* TLV tag and len; tag equals
12455 * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
12456 A_UINT32 tlv_header;
12457 /* VDEV identifier */
12458 A_UINT32 vdev_id;
12459 /* low 32bit of tsf */
12460 A_UINT32 tsf_low;
12461 /* high 32 bit of tsf */
12462 A_UINT32 tsf_high;
12463} wmi_vdev_tsf_report_event_fixed_param;
12464
12465typedef struct {
12466 /** TLV tag and len; tag equals
12467 * WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
12468 A_UINT32 tlv_header;
12469 /* unique id identifying the VDEV, generated by the caller */
12470 A_UINT32 vdev_id;
12471 /* unique id to identify the ie_data as defined by ieee 802.11 spec */
12472 A_UINT32 ie_id;
12473 /* ie_len corresponds to num of bytes in ie_data[] */
12474 A_UINT32 ie_len;
12475 /*
12476 * Following this structure is the TLV byte stream of ie data of length
12477 * buf_len:
12478 * A_UINT8 ie_data[];
12479 */
12480} wmi_vdev_set_ie_cmd_fixed_param;
12481
12482typedef struct {
12483 /*
12484 * TLV tag and len; tag equals
12485 * WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param
12486 * Set Preferred Channel List
12487 */
12488 A_UINT32 tlv_header;
12489
12490 /* # of channels to scan */
12491 A_UINT32 num_chan;
12492 /*
12493 * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd
12494 * structure. The TLV's are:
12495 * A_UINT32 channel_list[];
12496 */
12497} wmi_soc_set_pcl_cmd_fixed_param;
12498
12499typedef struct {
12500 /* TLV tag and len; tag equals
12501 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param
12502 * Set Hardware Mode */
12503 A_UINT32 tlv_header;
12504
12505 /* Hardware Mode Index */
12506 A_UINT32 hw_mode_index;
12507} wmi_soc_set_hw_mode_cmd_fixed_param;
12508
12509typedef struct {
12510 /*
12511 * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param
12512 * Set Dual MAC Firmware Configuration
12513 */
12514 A_UINT32 tlv_header;
12515
12516 /* Concurrent scan configuration bits */
12517 A_UINT32 concurrent_scan_config_bits;
12518 /* Firmware mode configuration bits */
12519 A_UINT32 fw_mode_config_bits;
12520} wmi_soc_set_dual_mac_config_cmd_fixed_param;
12521
12522typedef struct {
12523 A_UINT32 num_tx_chains;
12524 A_UINT32 num_rx_chains;
12525 A_UINT32 reserved[2];
12526} soc_num_tx_rx_chains;
12527
12528typedef struct {
12529 A_UINT32 num_tx_chains_2g;
12530 A_UINT32 num_rx_chains_2g;
12531 A_UINT32 num_tx_chains_5g;
12532 A_UINT32 num_rx_chains_5g;
12533} band_num_tx_rx_chains;
12534
12535typedef union {
12536 soc_num_tx_rx_chains soc_txrx_chain_setting;
12537 band_num_tx_rx_chains band_txrx_chain_setting;
12538} antenna_num_tx_rx_chains;
12539
12540typedef enum {
12541 ANTENNA_MODE_DISABLED = 0x0,
12542 ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
12543 /* reserved */
12544} antenna_mode_reason;
12545
12546typedef struct {
12547 /*
12548 * TLV tag and len;
12549 * tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param
12550 */
12551 A_UINT32 tlv_header;
12552
12553 /* the reason for setting antenna mode, refer antenna_mode_reason */
12554 A_UINT32 reason;
12555
12556 /*
12557 * The above reason parameter will select whether the following union
12558 * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
12559 */
12560 antenna_num_tx_rx_chains num_txrx_chains_setting;
12561} wmi_soc_set_antenna_mode_cmd_fixed_param;
12562
12563
12564/** Data structure for information specific to a VDEV to MAC mapping. */
12565typedef struct {
12566 /*
12567 * TLV tag and len; tag equals
12568 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
12569 A_UINT32 tlv_header;
12570 A_UINT32 vdev_id; /* VDEV ID */
12571 A_UINT32 mac_id; /* MAC ID */
12572} wmi_soc_set_hw_mode_response_vdev_mac_entry;
12573
12574typedef struct {
12575 /* TLV tag and len; tag equals
12576 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param
12577 * Set Hardware Mode Response Event **/
12578 A_UINT32 tlv_header;
12579
12580 /* Status of set_hw_mode command
12581 * Values for Status:
12582 * 0 - OK; command successful
12583 * 1 - EINVAL; Requested invalid hw_mode
12584 * 2 - ECANCELED; HW mode change canceled
12585 * 3 - ENOTSUP; HW mode not supported
12586 * 4 - EHARDWARE; HW mode change prevented by hardware
12587 * 5 - EPENDING; HW mode change is pending
12588 * 6 - ECOEX; HW mode change conflict with Coex
12589 */
12590 A_UINT32 status;
12591 /* Configured Hardware Mode */
12592 A_UINT32 cfgd_hw_mode_index;
12593 /* Number of Vdev to Mac entries */
12594 A_UINT32 num_vdev_mac_entries;
12595 /*
12596 * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event
12597 * structure. The TLV's are:
12598 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
12599 */
12600} wmi_soc_set_hw_mode_response_event_fixed_param;
12601
12602typedef struct {
12603 /*
12604 * TLV tag and len; tag equals
12605 * WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param
12606 * Hardware Mode Transition Event
12607 */
12608 A_UINT32 tlv_header;
12609 /* Original or old Hardware mode */
12610 A_UINT32 old_hw_mode_index;
12611 /* New Hardware Mode */
12612 A_UINT32 new_hw_mode_index;
12613 /* Number of Vdev to Mac entries */
12614 A_UINT32 num_vdev_mac_entries;
12615
12616 /**
12617 * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event
12618 * structure. The TLV's are:
12619 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
12620 */
12621} wmi_soc_hw_mode_transition_event_fixed_param;
12622
12623
12624typedef struct {
12625 /*
12626 * TLV tag and len; tag equals
12627 * WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param
12628 * Set Dual MAC Config Response Event
12629 */
12630 A_UINT32 tlv_header;
12631
12632 /* Status for set_dual_mac_config command */
12633 /*
12634 * Values for Status:
12635 * 0 - OK; command successful
12636 * 1 - EINVAL; Requested invalid hw_mode
12637 * 3 - ENOTSUP; HW mode not supported
12638 * 4 - EHARDWARE; HW mode change prevented by hardware
12639 * 6 - ECOEX; HW mode change conflict with Coex
12640 */
12641 A_UINT32 status;
12642} wmi_soc_set_dual_mac_config_response_event_fixed_param;
12643
12644typedef enum {
12645 MAWC_MOTION_STATE_UNKNOWN,
12646 MAWC_MOTION_STATE_STATIONARY,
12647 MAWC_MOTION_STATE_WALK,
12648 MAWC_MOTION_STATE_TRANSIT,
12649} MAWC_MOTION_STATE;
12650
12651typedef enum {
12652 MAWC_SENSOR_STATUS_OK,
12653 MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
12654 MAWC_SENSOR_STATUS_SHUTDOWN,
12655} MAWC_SENSOR_STATUS;
12656
12657typedef struct {
12658 /* TLV tag and len; tag equals
12659 * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
12660 A_UINT32 tlv_header;
12661 /** new motion state, MAWC_MOTION_STATE */
12662 A_UINT32 motion_state;
12663 /** status code of sensor, MAWC_SENSOR_STATUS */
12664 A_UINT32 sensor_status;
12665} wmi_mawc_sensor_report_ind_cmd_fixed_param;
12666
12667typedef struct {
12668 /* TLV tag and len; tag equals
12669 * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
12670 A_UINT32 tlv_header;
12671 /* enable(1) or disable(0) */
12672 A_UINT32 enable;
12673} wmi_mawc_enable_sensor_event_fixed_param;
12674
12675typedef struct {
12676 /* TLV tag and len; tag equals
12677 * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
12678 A_UINT32 tlv_header;
12679 /* Unique id identifying the VDEV */
12680 A_UINT32 vdev_id;
12681 /* enable(1) or disable(0) MAWC */
12682 A_UINT32 enable;
12683 /* ratio of skipping suppressing scan, skip one out of x */
12684 A_UINT32 suppress_ratio;
12685} wmi_extscan_configure_mawc_cmd_fixed_param;
12686
12687typedef struct {
12688 /* TLV tag and len; tag equals
12689 * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
12690 A_UINT32 tlv_header;
12691 /* Unique id identifying the VDEV */
12692 A_UINT32 vdev_id;
12693 /* enable(1) or disable(0) MAWC */
12694 A_UINT32 enable;
12695 /* ratio of exponential backoff, next = current + current*ratio/100 */
12696 A_UINT32 exp_backoff_ratio;
12697 /* initial scan interval(msec) */
12698 A_UINT32 init_scan_interval;
12699 /* max scan interval(msec) */
12700 A_UINT32 max_scan_interval;
12701} wmi_nlo_configure_mawc_cmd_fixed_param;
12702
12703typedef struct {
12704 /* TLV tag and len; tag equals
12705 * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
12706 A_UINT32 tlv_header;
12707 /* Unique id identifying the VDEV */
12708 A_UINT32 vdev_id;
12709 /* enable(1) or disable(0) MAWC */
12710 A_UINT32 enable;
12711 /* data traffic load (kBps) to register CMC */
12712 A_UINT32 traffic_load_threshold;
12713 /* RSSI threshold (dBm) to scan for Best AP */
12714 A_UINT32 best_ap_rssi_threshold;
12715 /* high RSSI threshold adjustment in Stationary to suppress scan */
12716 A_UINT32 rssi_stationary_high_adjust;
12717 /* low RSSI threshold adjustment in Stationary to suppress scan */
12718 A_UINT32 rssi_stationary_low_adjust;
12719} wmi_roam_configure_mawc_cmd_fixed_param;
12720
12721#define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2
12722#define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 10
12723
12724typedef enum {
12725 PACKET_FILTER_TYPE_INVALID = 0,
12726 PACKET_FILTER_TYPE_FILTER_PKT,
12727 PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
12728 PACKET_FILTER_TYPE_MAX_ENUM_SIZE
12729} WMI_PACKET_FILTER_FILTER_TYPE;
12730
12731typedef enum {
12732 PACKET_FILTER_PROTO_TYPE_INVALID = 0,
12733
12734 /* L2 header */
12735 PACKET_FILTER_PROTO_TYPE_MAC,
12736 PACKET_FILTER_PROTO_TYPE_SNAP,
12737
12738 /* L3 header (EtherType) */
12739 PACKET_FILTER_PROTO_TYPE_IPV4,
12740 PACKET_FILTER_PROTO_TYPE_IPV6,
12741
12742 /* L4 header (IP protocol) */
12743 PACKET_FILTER_PROTO_TYPE_UDP,
12744 PACKET_FILTER_PROTO_TYPE_TCP,
12745 PACKET_FILTER_PROTO_TYPE_ICMPV6,
12746
12747 PACKET_FILTER_PROTO_TYPE_MAX
12748} WMI_PACKET_FILTER_PROTO_TYPE;
12749
12750typedef enum {
12751 PACKET_FILTER_CMP_TYPE_INVALID = 0,
12752 PACKET_FILTER_CMP_TYPE_EQUAL,
12753 PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
12754 PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
12755 PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
12756 PACKET_FILTER_CMP_TYPE_ADDRTYPE,
12757 PACKET_FILTER_CMP_TYPE_MAX
12758} WMI_PACKET_FILTER_CMP_TYPE;
12759
12760typedef enum {
12761 PACKET_FILTER_SET_INACTIVE = 0,
12762 PACKET_FILTER_SET_ACTIVE
12763} WMI_PACKET_FILTER_ACTION;
12764
12765typedef enum {
12766 PACKET_FILTER_SET_DISABLE = 0,
12767 PACKET_FILTER_SET_ENABLE
12768} WMI_PACKET_FILTER_RUNTIME_ENABLE;
12769
12770typedef struct {
12771 A_UINT32 proto_type;
12772 A_UINT32 cmp_type;
12773 A_UINT32 data_length; /* Length of the data to compare (units = bytes) */
12774 /*
12775 * from start of the respective frame header (
12776 * units = bytes)
12777 */
12778 A_UINT32 data_offset;
12779 /* Data to compare, little-endian order */
12780 A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD];
12781 /* Mask to be applied on rcvd packet data before compare, little-endian order */
12782 A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD];
12783} WMI_PACKET_FILTER_PARAMS_TYPE;
12784
12785typedef struct {
12786 A_UINT32 tlv_header;
12787 A_UINT32 vdev_id;
12788 A_UINT32 filter_id;
12789 A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */
12790 A_UINT32 filter_type;
12791 A_UINT32 num_params; /* how many entries in paramsData are valid */
12792 A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */
12793 WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
12794} WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
12795
12796/* enable / disable all filters within the specified vdev */
12797typedef struct {
12798 A_UINT32 tlv_header;
12799 A_UINT32 vdev_id;
12800 A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
12801} WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
12802
12803
12804#define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0
12805#define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
12806
12807#define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
12808 WMI_SET_BITS(tcp_flag_u32, \
12809 WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
12810 WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
12811 tcp_flag_values)
12812#define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
12813 WMI_GET_BITS(tcp_flag_u32, \
12814 WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
12815 WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
12816
12817#define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9
12818#define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
12819
12820#define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
12821 WMI_SET_BITS(tcp_flag_u32, \
12822 WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
12823 WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
12824 tcp_flags_mask)
12825#define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
12826 WMI_GET_BITS(tcp_flag_u32, \
12827 WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
12828 WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
12829
12830typedef struct {
12831 A_UINT32 tlv_header;
12832 /**
12833 * @brief lro_enable - indicates whether lro is enabled
12834 * [0] LRO Enable
12835 */
12836 A_UINT32 lro_enable;
12837 /**
12838 * @brief tcp_flag_u32 - mask of which TCP flags to check and
12839 * values to check for
12840 * [8:0] TCP flag values - If the TCP flags from the packet do not match
12841 * the values in this field after masking with TCP flags mask
12842 * below,LRO eligible will not be set
12843 * [17:9] TCP flags mask - Mask field for comparing the TCP values
12844 * provided above with the TCP flags field in the received packet
12845 * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
12846 * macros to isolate the mask field and values field that are packed
12847 * into this u32 "word".
12848 */
12849 A_UINT32 tcp_flag_u32;
12850 /**
12851 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
12852 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
12853 * bytes 0 to 3
12854 *
12855 * In this and all the below toeplitz_hash fields, the bytes are
12856 * specified in little-endian order. For example:
12857 * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0
12858 * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1
12859 * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
12860 * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
12861 */
12862 A_UINT32 toeplitz_hash_ipv4_0_3;
12863
12864 /**
12865 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
12866 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
12867 * bytes 4 to 7
12868 */
12869 A_UINT32 toeplitz_hash_ipv4_4_7;
12870
12871 /**
12872 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
12873 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
12874 * bytes 8 to 11
12875 */
12876 A_UINT32 toeplitz_hash_ipv4_8_11;
12877
12878 /**
12879 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
12880 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
12881 * bytes 12 to 15
12882 */
12883 A_UINT32 toeplitz_hash_ipv4_12_15;
12884
12885 /**
12886 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
12887 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
12888 * byte 16
12889 */
12890 A_UINT32 toeplitz_hash_ipv4_16;
12891
12892 /**
12893 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12894 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12895 * bytes 0 to 3
12896 */
12897 A_UINT32 toeplitz_hash_ipv6_0_3;
12898
12899 /**
12900 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12901 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12902 * bytes 4 to 7
12903 */
12904 A_UINT32 toeplitz_hash_ipv6_4_7;
12905
12906 /**
12907 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12908 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12909 * bytes 8 to 11
12910 */
12911 A_UINT32 toeplitz_hash_ipv6_8_11;
12912
12913 /**
12914 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12915 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12916 * bytes 12 to 15
12917 */
12918 A_UINT32 toeplitz_hash_ipv6_12_15;
12919
12920 /**
12921 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12922 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12923 * bytes 16 to 19
12924 */
12925 A_UINT32 toeplitz_hash_ipv6_16_19;
12926
12927 /**
12928 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12929 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12930 * bytes 20 to 22
12931 */
12932 A_UINT32 toeplitz_hash_ipv6_20_23;
12933
12934 /**
12935 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12936 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12937 * bytes 24 to 27
12938 */
12939 A_UINT32 toeplitz_hash_ipv6_24_27;
12940
12941 /**
12942 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12943 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12944 * bytes 28 to 31
12945 */
12946 A_UINT32 toeplitz_hash_ipv6_28_31;
12947
12948 /**
12949 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12950 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12951 * bytes 32 to 35
12952 */
12953 A_UINT32 toeplitz_hash_ipv6_32_35;
12954
12955 /**
12956 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12957 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12958 * bytes 36 to 39
12959 */
12960 A_UINT32 toeplitz_hash_ipv6_36_39;
12961
12962 /**
12963 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12964 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12965 * byte 40
12966 */
12967 A_UINT32 toeplitz_hash_ipv6_40;
12968} wmi_lro_info_cmd_fixed_param;
12969
Nirav Shahbf6450f2015-11-05 11:47:20 +053012970/*
12971 * This structure is used to set the pattern for WOW host wakeup pin pulse
12972 * pattern confirguration.
12973 */
12974typedef struct {
12975 /*
12976 * TLV tag and len; tag equals
12977 * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param
12978 */
12979 A_UINT32 tlv_header;
12980 /* flash offset to write, starting from 0 */
12981 A_UINT32 offset;
12982 /* vaild data length in buffer, unit: byte */
12983 A_UINT32 length;
12984} wmi_transfer_data_to_flash_cmd_fixed_param;
12985
12986typedef struct {
12987 /*
12988 * TLV tag and len; tag equals
12989 * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param
12990 */
12991 A_UINT32 tlv_header;
12992 /* Return status. 0 for success, non-zero otherwise */
12993 A_UINT32 status;
12994} wmi_transfer_data_to_flash_complete_event_fixed_param;
12995
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -080012996/*
Manikandan Mohan55c94d62015-12-04 13:47:58 -080012997 * This structure is used to report SMPS force mode set complete to host.
12998 */
12999typedef struct {
13000 /* TLV tag and len; tag equals
13001 * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param
13002 */
13003 A_UINT32 tlv_header;
13004 /* Unique id identifying the VDEV */
13005 A_UINT32 vdev_id;
13006 /* Return status. 0 for success, non-zero otherwise */
13007 A_UINT32 status;
13008} wmi_sta_smps_force_mode_complete_event_fixed_param;
13009
13010/*
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -080013011 * This structure is used to report SCPC calibrated data to host.
13012 */
13013typedef struct {
13014 /* TLV tag and len; tag equals
13015 * WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param
13016 */
13017 A_UINT32 tlv_header;
13018 /* number of BDF patches. Each patch contains offset, length and data */
13019 A_UINT32 num_patch;
13020 /* This TLV is followed by another TLV of array of bytes
13021 * A_UINT8 data[];
13022 * This data array contains, for example
13023 * patch1 offset(byte3~0), patch1 data length(byte7~4),
13024 * patch1 data(byte11~8)
13025 * patch2 offset(byte15~12), patch2 data length(byte19~16),
13026 * patch2 data(byte47~20)
13027 */
13028} wmi_scpc_event_fixed_param;
13029
Manikandan Mohan130eb572015-12-23 13:53:34 -080013030/* bpf interface structure */
13031typedef struct wmi_bpf_get_capability_cmd_s {
13032 A_UINT32 tlv_header;
13033 A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */
13034} wmi_bpf_get_capability_cmd_fixed_param;
13035
13036typedef struct wmi_bpf_capability_info_evt_s {
13037 A_UINT32 tlv_header;
13038 A_UINT32 bpf_version; /* fw's implement version */
13039 A_UINT32 max_bpf_filters; /* max filters that fw supports */
13040 A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
13041} wmi_bpf_capability_info_evt_fixed_param;
13042
13043/* bit 0 of flags: report counters */
13044#define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0
13045#define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1
13046typedef struct wmi_bpf_get_vdev_stats_cmd_s {
13047 A_UINT32 tlv_header;
13048 A_UINT32 flags;
13049 A_UINT32 vdev_id;
13050} wmi_bpf_get_vdev_stats_cmd_fixed_param;
13051
13052typedef struct wmi_bpf_vdev_stats_info_evt_s {
13053 A_UINT32 tlv_header;
13054 A_UINT32 vdev_id;
13055 A_UINT32 num_filters;
13056 A_UINT32 num_checked_pkts;
13057 A_UINT32 num_dropped_pkts;
13058 } wmi_bpf_vdev_stats_info_evt_fixed_param;
13059
13060typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
13061 A_UINT32 tlv_header;
13062 A_UINT32 vdev_id;
13063 A_UINT32 filter_id;
13064 A_UINT32 bpf_version; /* host bpf version */
13065 A_UINT32 total_length;
13066 A_UINT32 current_offset;
13067 A_UINT32 current_length;
Manikandan Mohan05ac7ee2015-12-23 14:18:36 -080013068 /*
13069 * The TLV follows:
13070 * A_UINT8 buf_inst[]; //Variable length buffer for the instuctions
13071 */
Manikandan Mohan130eb572015-12-23 13:53:34 -080013072} wmi_bpf_set_vdev_instructions_cmd_fixed_param;
13073
13074#define BPF_FILTER_ID_ALL 0xFFFFFFFF
13075typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
13076 A_UINT32 tlv_header;
13077 A_UINT32 vdev_id;
13078 A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */
13079} wmi_bpf_del_vdev_instructions_cmd_fixed_param;
13080
Govind Singhc7d51942016-02-01 12:09:31 +053013081#define AES_BLOCK_LEN 16 /* in bytes */
13082#define FIPS_KEY_LENGTH_128 16 /* in bytes */
13083#define FIPS_KEY_LENGTH_256 32 /* in bytes */
13084#define FIPS_ENCRYPT_CMD 0
13085#define FIPS_DECRYPT_CMD 1
13086#define FIPS_ENGINE_AES_CTR 0
13087#define FIPS_ENGINE_AES_MIC 1
13088#define FIPS_ERROR_OPER_TIMEOUT 1
13089
13090/* WMI_PDEV_FIPS_CMDID */
13091typedef struct {
13092 /*
13093 * TLV tag and len; tag equals
13094 * WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param
13095 */
13096 A_UINT32 tlv_header;
13097 A_UINT32 mac_id; /* MAC ID */
13098 A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
13099 /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
13100 A_UINT32 mode;
13101 /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
13102 A_UINT32 key_len;
13103 A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
13104 A_UINT32 data_len; /* data length */
13105 /*
13106 * Following this structure is the TLV:
13107 * A_UINT32 data[1]; - In Data (keep this in the end)
13108 */
13109} wmi_pdev_fips_cmd_fixed_param;
13110
13111typedef struct {
13112 /*
13113 * TLV tag and len; tag equals
13114 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param
13115 */
13116 A_UINT32 tlv_header;
13117 A_UINT32 mac_id; /* MAC ID */
13118 A_UINT32 enable; /* 1:enable, 0:disable */
13119 /* 1:GPIO parallel mode, 0:GPIO serial mode */
13120 A_UINT32 mode;
13121 A_UINT32 rx_antenna; /* rx antenna */
13122 A_UINT32 tx_default_antenna; /* tx default antenna */
13123 /*
13124 * Following this structure is the TLV:
13125 * wmi_pdev_smart_ant_gpio_handle
13126 */
13127} wmi_pdev_smart_ant_enable_cmd_fixed_param;
13128
13129/** GPIO pins/function values to control antennas */
13130typedef struct {
13131 /*
13132 * TLV tag and len; tag equals
13133 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle
13134 */
13135 A_UINT32 tlv_header;
13136 /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
13137 A_UINT32 gpio_pin;
13138 A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */
13139} wmi_pdev_smart_ant_gpio_handle;
13140
13141typedef struct {
13142 /*
13143 * TLV tag and len; tag equals
13144 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param
13145 */
13146 A_UINT32 tlv_header;
13147 A_UINT32 mac_id;
13148 A_UINT32 rx_antenna;
13149} wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
13150
13151typedef struct {
13152 /*
13153 * TLV tag and len; tag equals
13154 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param
13155 */
13156 A_UINT32 tlv_header;
13157 /** unique id identifying the vdev, generated by the caller */
13158 A_UINT32 vdev_id;
13159 /** peer MAC address */
13160 wmi_mac_addr peer_macaddr;
13161 /*
13162 * Following this structure is the TLV:
13163 * wmi_peer_smart_ant_set_tx_antenna_series
13164 */
13165} wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
13166
13167typedef struct {
13168 /*
13169 * TLV tag and len; tag equals
13170 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series
13171 */
13172 A_UINT32 tlv_header;
13173 /* antenna array */
13174 A_UINT32 antenna_series;
13175} wmi_peer_smart_ant_set_tx_antenna_series;
13176
13177typedef struct {
13178 /*
13179 * TLV tag and len; tag equals
13180 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param
13181 */
13182 A_UINT32 tlv_header;
13183 /* rate array */
13184 A_UINT32 train_rate_series;
13185 /* antenna array */
13186 A_UINT32 train_antenna_series;
13187 /* Rate flags */
13188 /* TODO: For future use? */
13189 A_UINT32 rc_flags;
13190} wmi_peer_smart_ant_set_train_antenna_param;
13191
13192typedef struct {
13193 /*
13194 * TLV tag and len; tag equals
13195 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param
13196 */
13197 A_UINT32 tlv_header;
13198 /** unique id identifying the VDEV, generated by the caller */
13199 A_UINT32 vdev_id;
13200 /** peer MAC address */
13201 wmi_mac_addr peer_macaddr;
13202 /* num packets; 0-stop training */
13203 A_UINT32 num_pkts;
13204 /*
13205 * Following this structure is the TLV:
13206 * wmi_peer_smart_ant_set_train_antenna_param
13207 */
13208} wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
13209
13210typedef struct {
13211 /*
13212 * TLV tag and len; tag equals
13213 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param
13214 */
13215 A_UINT32 tlv_header;
13216 /** unique id identifying the vdev, generated by the caller */
13217 A_UINT32 vdev_id;
13218 /** peer MAC address */
13219 wmi_mac_addr peer_macaddr;
13220 /* command id*/
13221 A_UINT32 cmd_id;
13222 /* number of arguments passed */
13223 A_UINT32 args_count;
13224 /*
13225 * Following this structure is the TLV:
13226 * A_UINT32 args[]; // argument list
13227 */
13228} wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
13229
13230typedef struct {
13231 /*
13232 * TLV tag and len; tag equals
13233 * WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain
13234 */
13235 A_UINT32 tlv_header;
13236 A_UINT32 antCtrlChain;
13237} wmi_pdev_set_ant_ctrl_chain;
13238
13239typedef struct {
13240 /*
13241 * TLV tag and len; tag equals
13242 * WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param
13243 */
13244 A_UINT32 tlv_header;
13245 A_UINT32 mac_id; /* MAC ID */
13246 A_UINT32 antCtrlCommon1;
13247 A_UINT32 antCtrlCommon2;
13248 /*
13249 * Following this structure is the TLV:
13250 * wmi_pdev_set_ant_ctrl_chain
13251 */
13252} wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
13253
13254typedef struct {
13255 /* TLV tag and len; tag equals
13256 * WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param
13257 */
13258 A_UINT32 tlv_header;
13259 A_UINT32 mac_id; /* MAC ID */
13260 /** len of CTL info */
13261 A_UINT32 ctl_len;
13262 /* ctl array (len adjusted to number of words)
13263 * Following this structure is the TLV:
13264 * A_UINT32 ctl_info[1];
13265 */
13266} wmi_pdev_set_ctl_table_cmd_fixed_param;
13267
13268typedef struct {
13269 /*
13270 * TLV tag and len; tag equals
13271 * WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param
13272 */
13273 A_UINT32 tlv_header;
13274 A_UINT32 mac_id; /* MAC ID */
13275 A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
13276 /*
13277 * Bit 7:0 len of array gain table
13278 * Bit 8 bypass multi chain gain or not
13279 */
13280 /*
13281 * array gain table(s) (len adjusted to number of words).
13282 * Following this structure is the TLV:
13283 * A_UINT32 arraygain_tbl[1];
13284 */
13285} wmi_pdev_set_mimogain_table_cmd_fixed_param;
13286
13287#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
13288#define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
13289#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_ARRAY_GAIN_LEN)
13290#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_ARRAY_GAIN_LEN)
13291
13292#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
13293#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
13294#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
13295#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
13296
13297
13298typedef struct {
13299 /*
13300 * TLV tag and len; tag equals
13301 * WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param
13302 */
13303 A_UINT32 tlv_header;
13304 /** parameter id */
13305 A_UINT32 param_id;
13306 /** parameter value */
13307 A_UINT32 param_value;
13308} wmi_fwtest_set_param_cmd_fixed_param;
13309
13310/* Expressed in 1 part in 1000 (permille) */
13311#define WMI_ATF_DENOMINATION 1000
13312
13313typedef struct {
13314 /*
13315 * TLV tag and len; tag equals
13316 * WMITLV_TAG_STRUC_wmi_atf_peer_info
13317 */
13318 A_UINT32 tlv_header;
13319 wmi_mac_addr peer_macaddr;
13320 A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
13321 A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
13322 /* Peer congestion threshold for future use */
13323 A_UINT32 atf_units_reserved;
13324} wmi_atf_peer_info;
13325
13326typedef struct {
13327 /*
13328 * TLV tag and len; tag equals
13329 * WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param
13330 */
13331 A_UINT32 tlv_header;
13332 A_UINT32 num_peers;
13333 /*
13334 * Following this structure is the TLV:
13335 * struct wmi_atf_peer_info peer_info[1];
13336 */
13337} wmi_peer_atf_request_fixed_param;
13338
13339/* Equal distribution of ATF air time within an VDEV. */
13340typedef struct {
13341 /*
13342 * TLV tag and len; tag equals
13343 * WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param
13344 */
13345 A_UINT32 tlv_header;
13346 A_UINT32 vdev_id;
13347 A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
13348} wmi_vdev_atf_request_fixed_param;
13349
13350typedef struct {
13351 /*
13352 * TLV tag and len; tag equals
13353 * WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param
13354 */
13355 A_UINT32 tlv_header;
13356 A_UINT32 mac_id; /* MAC ID */
13357 /** parameter */
13358 A_UINT32 param;
13359} wmi_pdev_get_ani_cck_config_cmd_fixed_param;
13360
13361typedef struct {
13362 /*
13363 * TLV tag and len; tag equals
13364 * WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param
13365 */
13366 A_UINT32 tlv_header;
13367 A_UINT32 mac_id; /* MAC ID */
13368 /** parameter */
13369 A_UINT32 param;
13370} wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
13371
13372typedef struct {
13373 /*
13374 * TLV tag and len; tag equals
13375 * WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param
13376 */
13377 A_UINT32 tlv_header;
13378 A_UINT32 vdev_id;
13379 A_UINT32 qb_enable;
13380 wmi_mac_addr peer_macaddr;
13381} WMI_QBOOST_CFG_CMD_fixed_param;
13382
13383#define WMI_INST_STATS_INVALID_RSSI 0
13384
13385typedef struct {
13386 /*
13387 * TLV tag and len; tag equals
13388 * WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param
13389 */
13390 A_UINT32 tlv_header;
13391 A_UINT32 iRSSI; /* dBm above the noise floor */
13392 /* peer MAC address */
13393 wmi_mac_addr peer_macaddr;
13394} wmi_inst_rssi_stats_resp_fixed_param;
13395
13396typedef struct {
13397 /*
13398 * TLV tag and len; tag equals
13399 * WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info
13400 */
13401 A_UINT32 tlv_header;
13402 A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
13403} wmi_peer_cck_ofdm_rate_info;
13404
13405typedef struct {
13406 /*
13407 * TLV tag and len; tag equals
13408 * WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info
13409 */
13410 A_UINT32 tlv_header;
13411 A_UINT32 ratecode_20; /* Rate code for 20MHz BW */
13412 A_UINT32 ratecode_40; /* Rate code for 40MHz BW */
13413 A_UINT32 ratecode_80; /* Rate code for 80MHz BW */
13414} wmi_peer_mcs_rate_info;
13415
13416typedef struct {
13417 /*
13418 * TLV tag and len; tag equals
13419 * WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param
13420 */
13421 A_UINT32 tlv_header;
13422 wmi_mac_addr peer_macaddr;
13423 A_UINT32 ratecount; /* Max Rate count for each mode */
13424 /*
13425 * Following this structure are the TLV
13426 * struct wmi_peer_cck_ofdm_rate_info;
13427 * struct wmi_peer_mcs_rate_info;
13428 */
13429} wmi_peer_ratecode_list_event_fixed_param;
13430
13431typedef struct wmi_wds_addr_event {
13432 /*
13433 * TLV tag and len; tag equals
13434 * WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param
13435 */
13436 A_UINT32 tlv_header;
13437 A_UINT32 event_type[4];
13438 wmi_mac_addr peer_mac;
13439 wmi_mac_addr dest_mac;
13440} wmi_wds_addr_event_fixed_param;
13441
13442typedef struct {
13443 /*
13444 * TLV tag and len; tag equals
13445 * WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param
13446 */
13447 A_UINT32 tlv_header;
13448 wmi_mac_addr peer_macaddr;
13449 A_UINT32 peer_ps_state;
13450} wmi_peer_sta_ps_statechange_event_fixed_param;
13451
13452/* WMI_PDEV_FIPS_EVENTID */
13453typedef struct {
13454 /*
13455 * TLV tag and len; tag equals
13456 * WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param
13457 */
13458 A_UINT32 tlv_header;
13459 A_UINT32 mac_id; /* MAC ID */
13460 /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
13461 A_UINT32 error_status;
13462 A_UINT32 data_len; /* Data length */
13463 /*
13464 * Following this structure is the TLV:
13465 * A_UINT32 data[1]; // Out Data (keep this in the end)
13466 */
13467} wmi_pdev_fips_event_fixed_param;
13468
13469typedef struct {
13470 /*
13471 * TLV tag and len; tag equals
13472 * WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param
13473 */
13474 A_UINT32 tlv_header;
13475 A_UINT32 mac_id; /* MAC ID */
13476 /* Noise threshold iterations with high values */
13477 A_UINT32 noise_floor_report_iter;
13478 /* Total noise threshold iterations */
13479 A_UINT32 noise_floor_total_iter;
13480} wmi_pdev_channel_hopping_event_fixed_param;
13481
13482enum {
13483 WMI_PDEV_RESERVE_AST_ENTRY_OK,
13484 WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
13485 WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
13486};
13487
13488typedef struct {
13489 /*
13490 * TLV tag and len; tag equals
13491 * WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param
13492 */
13493 A_UINT32 tlv_header;
13494 A_UINT32 mac_id; /* MAC ID */
13495 A_UINT32 rate_flags;
13496 /**
13497 * FLAG_ONE_CHAIN 0x001 - one chain mask
13498 * FLAG_TWO_CHAIN 0x005 - two chain mask
13499 * FLAG_THREE_CHAIN 0x007 - three chain mask
13500 * FLAG_FOUR_CHAIN 0x00F - four chain mask
13501 * FLAG_STBC 0x010 - STBC is set
13502 * FLAG_40MHZ 0x020
13503 * FLAG_80MHZ 0x040
13504 * FLAG_160MHZ 0x080
13505 * FLAG_TXBF 0x0100 - Tx Bf enabled
13506 * FLAG_RTSENA 0x0200 - RTS enabled
13507 * FLAG_CTSENA 0x0400 - CTS enabled
13508 * FLAG_LDPC 0x0800 - LDPC set
13509 * FLAG_SERIES1 0x1000 -
13510 * FLAG_SGI 0x2000 - Short gaurd interval
13511 * FLAG_MU2 0x4000 - MU2 data
13512 * FLAG_MU3 0x8000 - MU3 data
13513 * */
13514 A_UINT32 nss;
13515 /**
13516 * NSS 0x0 - 0x3
13517 * */
13518 A_UINT32 preamble;
13519 /**
13520 * PREAM_OFDM - 0x0
13521 * PREAM_CCK - 0x1
13522 * PREAM_HT - 0x2
13523 * PREAM_VHT - 0x3
13524 * */
13525 A_UINT32 hw_rate;
13526 /**
13527 * *** HW_OFDM_RATE ***
13528 * OFDM_48_MBPS - 0x0
13529 * OFDM_24_MBPS - 0x1
13530 * OFDM_12_MBPS - 0x2
13531 * OFDM_6_MBPS - 0x3
13532 * OFDM_54_MBPS - 0x4
13533 * OFDM_36_MBPS - 0x5
13534 * OFDM_18_MBPS - 0x6
13535 * OFDM_9_MBPS - 0x7
13536 *
13537 * *** HW_CCK_RATE ***
13538 * CCK_11_LONG_MBPS - 0x0
13539 * CCK_5_5_LONG_MBPS - 0x1
13540 * CCK_2_LONG_MBPS - 0x2
13541 * CCK_1_LONG_MBPS - 0x3
13542 * CCK_11_SHORT_MBPS - 0x4
13543 * CCK_5_5_SHORT_MBPS - 0x5
13544 * CCK_2_SHORT_MBPS - 0x6
13545 *
13546 * *** HW_HT / VHT_RATE ***
13547 * MCS 0x0 - 0x9
13548 * */
13549} wmi_pdev_get_tpc_cmd_fixed_param;
13550
13551typedef struct {
13552 /*
13553 * TLV tag and len; tag equals
13554 * WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param
13555 */
13556 A_UINT32 tlv_header;
13557 A_UINT32 reserved0; /* for future need */
13558 /*
13559 * Following this structure is the TLV:
13560 * A_UINT32 tpc[1];
13561 */
13562} wmi_pdev_tpc_event_fixed_param;
13563
13564typedef struct {
13565 /*
13566 * TLV tag and len; tag equals
13567 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param
13568 */
13569 A_UINT32 tlv_header;
13570 A_UINT32 mac_id; /* MAC ID */
13571 A_UINT32 nfdBr_len;
13572 A_UINT32 nfdBm_len;
13573 A_UINT32 freqNum_len;
13574 /*
13575 * Following this structure is the TLV:
13576 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
13577 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
13578 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
13579 */
13580} wmi_pdev_nfcal_power_all_channels_event_fixed_param;
13581
13582typedef struct {
13583 /*
13584 * TLV tag and len; tag equals
13585 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr
13586 */
13587 A_UINT32 tlv_header;
13588 A_UINT32 nfdBr;
13589} wmi_pdev_nfcal_power_all_channels_nfdBr;
13590
13591typedef struct {
13592 /*
13593 * TLV tag and len; tag equals
13594 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm
13595 */
13596 A_UINT32 tlv_header;
13597 A_UINT32 nfdBm;
13598} wmi_pdev_nfcal_power_all_channels_nfdBm;
13599
13600typedef struct {
13601 /*
13602 * TLV tag and len; tag equals
13603 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum
13604 */
13605 A_UINT32 tlv_header;
13606 A_UINT32 freqNum;
13607} wmi_pdev_nfcal_power_all_channels_freqNum;
13608
13609typedef struct {
13610 /*
13611 * TLV tag and len; tag equals
13612 * WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param
13613 */
13614 A_UINT32 tlv_header;
13615 A_UINT32 cck_level;
13616} wmi_ani_cck_event_fixed_param;
13617
13618typedef struct {
13619 /*
13620 * TLV tag and len; tag equals
13621 * WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param
13622 */
13623 A_UINT32 tlv_header;
13624 A_UINT32 ofdm_level;
13625} wmi_ani_ofdm_event_fixed_param;
13626
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013627/* ADD NEW DEFS HERE */
13628
13629/*****************************************************************************
13630 * The following structures are deprecated. DO NOT USE THEM!
13631 */
13632
13633/** Max number of channels in the schedule. */
13634#define OCB_CHANNEL_MAX (5)
13635
13636/* NOTE: Make sure these data structures are identical to those 9235
13637* defined in sirApi.h */
13638
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013639typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013640 /** Arbitration Inter-Frame Spacing. Range: 2-15 */
13641 A_UINT32 aifsn;
13642 /** Contention Window minimum. Range: 1 - 10 */
13643 A_UINT32 cwmin;
13644 /** Contention Window maximum. Range: 1 - 10 */
13645 A_UINT32 cwmax;
13646} wmi_qos_params_t;
13647
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013648typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013649 /** Channel frequency in MHz */
13650 A_UINT32 chan_freq;
13651 /** Channel duration in ms */
13652 A_UINT32 duration;
13653 /** Start guard interval in ms */
13654 A_UINT32 start_guard_interval;
13655 /** End guard interval in ms */
13656 A_UINT32 end_guard_interval;
13657 /** Transmit power in dBm, range 0 - 23 */
13658 A_UINT32 tx_power;
13659 /** Transmit datarate in Mbps */
13660 A_UINT32 tx_rate;
13661 /** QoS parameters for each AC */
13662 wmi_qos_params_t qos_params[WLAN_MAX_AC];
13663 /** 1 to enable RX stats for this channel, 0 otherwise */
13664 A_UINT32 rx_stats;
13665} wmi_ocb_channel_t;
13666
13667typedef struct {
13668 /** TLV tag and len; tag equals
13669 * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
13670 A_UINT32 tlv_header;
13671 /* VDEV identifier */
13672 A_UINT32 vdev_id;
13673 /** Number of valid channels in the channels array */
13674 A_UINT32 num_channels;
13675 /** The array of channels */
13676 wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
13677 /** 1 to allow off-channel tx, 0 otherwise */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013678 A_UINT32 off_channel_tx; /* Not supported */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013679} wmi_ocb_set_sched_cmd_fixed_param;
13680
13681typedef struct {
13682 /** Return status. 0 for success, non-zero otherwise */
13683 A_UINT32 status;
13684} wmi_ocb_set_sched_event_fixed_param;
13685
13686/**
13687* END DEPRECATED
13688*/
13689#ifdef __cplusplus
13690}
13691#endif
13692#endif /*_WMI_UNIFIED_H_*/
13693/**@}*/