blob: 4a17e0f5d40690c6b3f9abbcc494619e130a3486 [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 */
1357
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301358#define WMI_SET_CHANNEL_FLAG(pwmi_channel, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001359 (pwmi_channel)->info |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301360} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001361
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301362#define WMI_GET_CHANNEL_FLAG(pwmi_channel, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001363 (((pwmi_channel)->info & (1 << flag)) >> flag)
1364
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301365#define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001366 (pwmi_channel)->reg_info_1 &= 0xffffff00; \
1367 (pwmi_channel)->reg_info_1 |= (val&0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301368} while (0)
1369#define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001370
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301371#define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001372 (pwmi_channel)->reg_info_1 &= 0xffff00ff; \
1373 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 8); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301374} while (0)
1375#define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001376
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301377#define WMI_SET_CHANNEL_REG_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001378 (pwmi_channel)->reg_info_1 &= 0xff00ffff; \
1379 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 16); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301380} while (0)
1381#define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff)
1382#define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001383 (pwmi_channel)->reg_info_1 &= 0x00ffffff; \
1384 (pwmi_channel)->reg_info_1 |= ((val&0xff) << 24); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301385} while (0)
1386#define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001387
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301388#define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001389 (pwmi_channel)->reg_info_2 &= 0xffffff00; \
1390 (pwmi_channel)->reg_info_2 |= (val&0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301391} while (0)
1392#define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001393
1394/* max tx power is in 1 dBm units */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301395#define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001396 (pwmi_channel)->reg_info_2 &= 0xffff00ff; \
1397 (pwmi_channel)->reg_info_2 |= ((val&0xff)<<8); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301398} while (0)
1399#define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001400
1401
1402/** HT Capabilities*/
1403#define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
1404#define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
1405#define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
1406#define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
1407#define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
1408#define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
1409#define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
1410#define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
1411#define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
1412#define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
1413#define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
1414#define WMI_HT_CAP_HT40_SGI 0x0800
1415
1416/* These macros should be used when we wish to advertise STBC support for
1417 * only 1SS or 2SS or 3SS. */
1418#define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
1419#define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
1420#define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
1421
1422#define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
1423 WMI_HT_CAP_HT20_SGI | \
1424 WMI_HT_CAP_HT40_SGI | \
1425 WMI_HT_CAP_TX_STBC | \
1426 WMI_HT_CAP_RX_STBC | \
1427 WMI_HT_CAP_LDPC)
1428
1429/* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
1430 field. The fields not defined here are not supported, or reserved.
1431 Do not change these masks and if you have to add new one follow the
1432 bitmask as specified by 802.11ac draft.
1433 */
1434
1435#define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
1436#define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
1437#define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
1438#define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004
1439#define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008
1440#define WMI_VHT_CAP_RX_LDPC 0x00000010
1441#define WMI_VHT_CAP_SGI_80MHZ 0x00000020
1442#define WMI_VHT_CAP_SGI_160MHZ 0x00000040
1443#define WMI_VHT_CAP_TX_STBC 0x00000080
1444#define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
1445#define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
1446#define WMI_VHT_CAP_SU_BFORMER 0x00000800
1447#define WMI_VHT_CAP_SU_BFORMEE 0x00001000
1448#define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
1449#define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
1450#define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
1451#define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
1452#define WMI_VHT_CAP_MU_BFORMER 0x00080000
1453#define WMI_VHT_CAP_MU_BFORMEE 0x00100000
1454#define WMI_VHT_CAP_TXOP_PS 0x00200000
1455#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
1456#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
1457#define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
1458#define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
1459
1460/* TEMPORARY:
1461 * Preserve the incorrect old name as an alias for the correct new name
1462 * until all references to the old name have been removed from all hosts
1463 * and targets.
1464 */
1465#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
1466
1467/* These macros should be used when we wish to advertise STBC support for
1468 * only 1SS or 2SS or 3SS. */
1469#define WMI_VHT_CAP_RX_STBC_1SS 0x00000100
1470#define WMI_VHT_CAP_RX_STBC_2SS 0x00000200
1471#define WMI_VHT_CAP_RX_STBC_3SS 0x00000300
1472
1473/* TEMPORARY:
1474 * Preserve the incorrect old name as an alias for the correct new name
1475 * until all references to the old name have been removed from all hosts
1476 * and targets.
1477 */
1478#define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS
1479
1480#define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
1481 WMI_VHT_CAP_SGI_80MHZ | \
1482 WMI_VHT_CAP_TX_STBC | \
1483 WMI_VHT_CAP_RX_STBC_MASK | \
1484 WMI_VHT_CAP_RX_LDPC | \
1485 WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
1486 WMI_VHT_CAP_RX_FIXED_ANT | \
1487 WMI_VHT_CAP_TX_FIXED_ANT)
1488
1489/* Interested readers refer to Rx/Tx MCS Map definition as defined in
1490 802.11ac
1491 */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05301492#define WMI_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001493#define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
1494#define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
1495
1496/* WMI_SYS_CAPS_* refer to the capabilities that system support
1497 */
1498#define WMI_SYS_CAP_ENABLE 0x00000001
1499#define WMI_SYS_CAP_TXPOWER 0x00000002
1500
1501/*
1502 * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions.
1503 * Bits 5:0 are reserved
1504 */
1505#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28)
1506#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24)
1507#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20)
1508#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16)
1509#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12)
1510#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8)
1511#define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7)
1512#define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6)
1513
1514#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
1515#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
1516#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
1517#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
1518#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
1519#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
1520#define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
1521#define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
1522
1523#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \
1524 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value)
1525#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \
1526 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value)
1527#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \
1528 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value)
1529#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \
1530 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value)
1531#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \
1532 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value)
1533#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \
1534 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value)
1535#define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \
1536 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value)
1537#define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \
1538 WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value)
1539
1540#define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \
1541 ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS)
1542#define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \
1543 ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS)
1544#define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \
1545 ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS)
1546#define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \
1547 ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS)
1548#define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \
1549 ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS)
1550#define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \
1551 ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS)
1552#define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \
1553 ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS)
1554#define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \
1555 ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS)
1556
1557#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31)
1558#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30)
1559#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29)
1560
1561#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
1562#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
1563#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
1564
1565#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \
1566 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value)
1567#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \
1568 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value)
1569#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \
1570 WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value)
1571
1572#define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \
1573 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS)
1574#define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \
1575 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS)
1576#define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \
1577 ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS)
1578
1579#define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31)
1580#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30)
1581
1582#define WMI_DBS_FW_MODE_CFG_DBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
1583#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
1584
1585#define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \
1586 WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value)
1587#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \
1588 WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value)
1589
1590#define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \
1591 ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS)
1592#define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \
1593 ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS)
1594
1595/** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */
1596typedef struct _wmi_abi_version {
1597 A_UINT32 abi_version_0;
1598 /** WMI Major and Minor versions */
1599 A_UINT32 abi_version_1;
1600 /** WMI change revision */
1601 A_UINT32 abi_version_ns_0;
1602 /** ABI version namespace first four dwords */
1603 A_UINT32 abi_version_ns_1;
1604 /** ABI version namespace second four dwords */
1605 A_UINT32 abi_version_ns_2;
1606 /** ABI version namespace third four dwords */
1607 A_UINT32 abi_version_ns_3;
1608 /** ABI version namespace fourth four dwords */
1609} wmi_abi_version;
1610
1611/*
1612 * maximum number of memroy requests allowed from FW.
1613 */
1614#define WMI_MAX_MEM_REQS 16
1615
1616/* !!NOTE!!:
1617 * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility.
1618 * Please don't change it.
1619 */
1620#define HW_BD_INFO_SIZE 5
1621
1622/**
1623 * The following struct holds optional payload for
1624 * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the
1625 * device capability to the host.
1626 */
1627typedef struct {
1628 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */
1629 A_UINT32 fw_build_vers; /* firmware build number */
1630 wmi_abi_version fw_abi_vers;
1631 A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */
1632 A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */
1633 A_UINT32 num_rf_chains;
1634 /* The following field is only valid for service type WMI_SERVICE_11AC */
1635 A_UINT32 ht_cap_info; /* WMI HT Capability */
1636 A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */
1637 A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
1638 A_UINT32 hw_min_tx_power;
1639 A_UINT32 hw_max_tx_power;
1640 A_UINT32 sys_cap_info;
1641 A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
1642 /** Max beacon and Probe Response IE offload size (includes
1643 * optional P2P IEs) */
1644 A_UINT32 max_bcn_ie_size;
1645 /*
1646 * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT.
1647 * FW uses this as FW extesnsion memory for saving its data structures. Only valid
1648 * for low latency interfaces like PCIE where FW can access this memory directly (or)
1649 * by DMA.
1650 */
1651 A_UINT32 num_mem_reqs;
1652 /* Max No. scan channels target can support
1653 * If FW is too old and doesn't indicate this number, host side value will default to
1654 * 0, and host will take the original compatible value (62) for future scan channel
1655 * setup.
1656 */
1657 A_UINT32 max_num_scan_channels;
1658
1659 /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID.
1660 * Default 0 means tha hw_bd_info[] is invalid(legacy board).
1661 */
1662 A_UINT32 hw_bd_id;
1663 A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */
1664
1665 /*
1666 * Number of MACs supported, i.e. a DBS-capable device will return 2
1667 */
1668 A_UINT32 max_supported_macs;
1669
1670 /*
1671 * FW sub-feature capabilities to be used in concurrence with
1672 * wmi_service_bitmap
1673 * values from enum WMI_FW_SUB_FEAT_CAPS
1674 */
1675 A_UINT32 wmi_fw_sub_feat_caps;
1676 /*
1677 * Number of Dual Band Simultaneous (DBS) hardware modes
1678 */
1679 A_UINT32 num_dbs_hw_modes;
1680 /*
1681 * txrx_chainmask
1682 * [7:0] - 2G band tx chain mask
1683 * [15:8] - 2G band rx chain mask
1684 * [23:16] - 5G band tx chain mask
1685 * [31:24] - 5G band rx chain mask
1686 *
1687 */
1688 A_UINT32 txrx_chainmask;
1689
1690 /*
1691 * default Dual Band Simultaneous (DBS) hardware mode
1692 */
1693 A_UINT32 default_dbs_hw_mode_index;
1694
1695 /*
1696 * Number of msdu descriptors target would use
1697 */
1698 A_UINT32 num_msdu_desc;
1699
1700 /* The TLVs for hal_reg_capabilities, wmi_service_bitmap and mem_reqs[] will follow this TLV.
1701 * HAL_REG_CAPABILITIES hal_reg_capabilities;
1702 * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
1703 * wlan_host_mem_req mem_reqs[];
1704 * wlan_dbs_hw_mode_list[];
1705 */
1706} wmi_service_ready_event_fixed_param;
1707
1708typedef struct {
1709 /* TLV tag and len; tag equals
1710 *WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT
1711 */
1712 A_UINT32 tlv_header;
1713 /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */
1714 A_UINT32 default_conc_scan_config_bits;
1715 /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */
1716 A_UINT32 default_fw_config_bits;
1717} wmi_service_ready_ext_event_fixed_param;
1718
1719typedef enum {
1720 WMI_HWBD_NONE = 0, /* No hw board information is given */
1721 WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */
1722 WMI_HWBD_QCA2582 = 2, /* Killer 1525 */
1723} WMI_HWBD_ID;
1724
1725typedef enum {
1726 WMI_FW_STA_RTT_INITR = 0x00000001,
1727 WMI_FW_STA_RTT_RESPR = 0x00000002,
1728 WMI_FW_P2P_CLI_RTT_INITR = 0x00000004,
1729 WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008,
1730 WMI_FW_P2P_GO_RTT_INITR = 0x00000010,
1731 WMI_FW_P2P_GO_RTT_RESPR = 0x00000020,
1732 WMI_FW_AP_RTT_INITR = 0x00000040,
1733 WMI_FW_AP_RTT_RESPR = 0x00000080,
1734 WMI_FW_NAN_RTT_INITR = 0x00000100,
1735 WMI_FW_NAN_RTT_RESPR = 0x00000200,
1736 /*
1737 * New fw sub feature capabilites before
1738 * WMI_FW_MAX_SUB_FEAT_CAP
1739 */
1740 WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000,
1741} WMI_FW_SUB_FEAT_CAPS;
1742
1743#define ATH_BD_DATA_REV_MASK 0x000000FF
1744#define ATH_BD_DATA_REV_SHIFT 0
1745
1746#define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00
1747#define ATH_BD_DATA_PROJ_ID_SHIFT 8
1748
1749#define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000
1750#define ATH_BD_DATA_CUST_ID_SHIFT 16
1751
1752#define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000
1753#define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24
1754
1755#define SET_BD_DATA_REV(bd_data_ver, value) \
1756 ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT))
1757
1758#define GET_BD_DATA_REV(bd_data_ver) \
1759 (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT)
1760
1761#define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \
1762 ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT))
1763
1764#define GET_BD_DATA_PROJ_ID(bd_data_ver) \
1765 (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT)
1766
1767#define SET_BD_DATA_CUST_ID(bd_data_ver, value) \
1768 ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT))
1769
1770#define GET_BD_DATA_CUST_ID(bd_data_ver) \
1771 (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT)
1772
1773#define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \
1774 ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT))
1775
1776#define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \
1777 (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT)
1778
1779#ifdef ROME_LTE_COEX_FREQ_AVOID
1780typedef struct {
1781 A_UINT32 start_freq; /* start frequency, not channel center freq */
1782 A_UINT32 end_freq; /* end frequency */
1783} avoid_freq_range_desc;
1784
1785typedef struct {
1786 /* bad channel range count, multi range is allowed, 0 means all channel clear */
1787 A_UINT32 num_freq_ranges;
1788 /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */
1789 avoid_freq_range_desc avd_freq_range[0];
1790} wmi_wlan_avoid_freq_ranges_event;
1791#endif
1792
1793/** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that retuned status */
1794#define WLAN_INIT_STATUS_SUCCESS 0x0
1795#define WLAN_INIT_STATUS_GEN_FAILED 0x1
1796#define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
1797#define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
1798
1799typedef A_UINT32 WLAN_INIT_STATUS;
1800
1801typedef struct {
1802 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */
1803 wmi_abi_version fw_abi_vers;
1804 wmi_mac_addr mac_addr;
1805 A_UINT32 status;
1806} wmi_ready_event_fixed_param;
1807
1808typedef struct {
1809 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */
1810/**
1811 * @brief num_vdev - number of virtual devices (VAPs) to support
1812 */
1813 A_UINT32 num_vdevs;
1814/**
1815 * @brief num_peers - number of peer nodes to support
1816 */
1817 A_UINT32 num_peers;
1818/*
1819 * @brief In offload mode target supports features like WOW, chatter and other
1820 * protocol offloads. In order to support them some functionalities like
1821 * reorder buffering, PN checking need to be done in target. This determines
1822 * maximum number of peers suported by target in offload mode
1823 */
1824 A_UINT32 num_offload_peers;
1825/* @brief Number of reorder buffers available for doing target based reorder
1826 * Rx reorder buffering
1827 */
1828 A_UINT32 num_offload_reorder_buffs;
1829/**
1830 * @brief num_peer_keys - number of keys per peer
1831 */
1832 A_UINT32 num_peer_keys;
1833/**
1834 * @brief num_peer_tids - number of TIDs to provide storage for per peer.
1835 */
1836 A_UINT32 num_tids;
1837/**
1838 * @brief ast_skid_limit - max skid for resolving hash collisions
1839 * @details
1840 * The address search table is sparse, so that if two MAC addresses
1841 * result in the same hash value, the second of these conflicting
1842 * entries can slide to the next index in the address search table,
1843 * and use it, if it is unoccupied. This ast_skid_limit parameter
1844 * specifies the upper bound on how many subsequent indices to search
1845 * over to find an unoccupied space.
1846 */
1847 A_UINT32 ast_skid_limit;
1848/**
1849 * @brief tx_chain_mask - the nominal chain mask for transmit
1850 * @details
1851 * The chain mask may be modified dynamically, e.g. to operate AP tx with
1852 * a reduced number of chains if no clients are associated.
1853 * This configuration parameter specifies the nominal chain-mask that
1854 * should be used when not operating with a reduced set of tx chains.
1855 */
1856 A_UINT32 tx_chain_mask;
1857/**
1858 * @brief rx_chain_mask - the nominal chain mask for receive
1859 * @details
1860 * The chain mask may be modified dynamically, e.g. for a client to use
1861 * a reduced number of chains for receive if the traffic to the client
1862 * is low enough that it doesn't require downlink MIMO or antenna
1863 * diversity.
1864 * This configuration parameter specifies the nominal chain-mask that
1865 * should be used when not operating with a reduced set of rx chains.
1866 */
1867 A_UINT32 rx_chain_mask;
1868/**
1869 * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC
1870 * @details
1871 * Each WMM access class (voice, video, best-effort, background) will
1872 * have its own timeout value to dictate how long to wait for missing
1873 * rx MPDUs to arrive before flushing subsequent MPDUs that have already
1874 * been received.
1875 * This parameter specifies the timeout in milliseconds for each class .
1876 * NOTE: the number of class (defined as 4) cannot be
1877 * changed in the future without breaking WMI compatibility.
1878 */
1879 A_UINT32 rx_timeout_pri[4];
1880/**
1881 * @brief rx_decap mode - what mode the rx should decap packets to
1882 * @details
1883 * MAC can decap to RAW (no decap), native wifi or Ethernet types
1884 * THis setting also determines the default TX behavior, however TX
1885 * behavior can be modified on a per VAP basis during VAP init
1886 */
1887 A_UINT32 rx_decap_mode;
1888 /**
1889 * @brief scan_max_pending_req - what is the maximum scan requests than can be queued
1890 */
1891 A_UINT32 scan_max_pending_req;
1892
1893 /**
1894 * @brief maximum VDEV that could use BMISS offload
1895 */
1896 A_UINT32 bmiss_offload_max_vdev;
1897
1898 /**
1899 * @brief maximum VDEV that could use offload roaming
1900 */
1901 A_UINT32 roam_offload_max_vdev;
1902
1903 /**
1904 * @brief maximum AP profiles that would push to offload roaming
1905 */
1906 A_UINT32 roam_offload_max_ap_profiles;
1907
1908/**
1909 * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion
1910 * @details
1911 * The target's WAL maintains a table to hold information regarding which
1912 * peers belong to a given multicast group, so that if multicast->unicast
1913 * conversion is enabled, the target can convert multicast tx frames to a
1914 * series of unicast tx frames, to each peer within the multicast group.
1915 * This num_mcast_groups configuration parameter tells the target how
1916 * many multicast groups to provide storage for within its multicast
1917 * group membership table.
1918 */
1919 A_UINT32 num_mcast_groups;
1920
1921/**
1922 * @brief num_mcast_table_elems - size to alloc for the mcast membership table
1923 * @details
1924 * This num_mcast_table_elems configuration parameter tells the target
1925 * how many peer elements it needs to provide storage for in its
1926 * multicast group membership table.
1927 * These multicast group membership table elements are shared by the
1928 * multicast groups stored within the table.
1929 */
1930 A_UINT32 num_mcast_table_elems;
1931
1932/**
1933 * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion
1934 * @details
1935 * This configuration parameter specifies whether the target should
1936 * perform multicast --> unicast conversion on transmit, and if so,
1937 * what to do if it finds no entries in its multicast group membership
1938 * table for the multicast IP address in the tx frame.
1939 * Configuration value:
1940 * 0 -> Do not perform multicast to unicast conversion.
1941 * 1 -> Convert multicast frames to unicast, if the IP multicast address
1942 * from the tx frame is found in the multicast group membership
1943 * table. If the IP multicast address is not found, drop the frame.
1944 * 2 -> Convert multicast frames to unicast, if the IP multicast address
1945 * from the tx frame is found in the multicast group membership
1946 * table. If the IP multicast address is not found, transmit the
1947 * frame as multicast.
1948 */
1949 A_UINT32 mcast2ucast_mode;
1950
1951 /**
1952 * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log
1953 * @details
1954 * This parameter controls how much memory the target will allocate to
1955 * store a log of tx PPDU meta-information (how large the PPDU was,
1956 * when it was sent, whether it was successful, etc.)
1957 */
1958 A_UINT32 tx_dbg_log_size;
1959
1960 /**
1961 * @brief num_wds_entries - how many AST entries to be allocated for WDS
1962 */
1963 A_UINT32 num_wds_entries;
1964
1965 /**
1966 * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI
1967 * this limit can be 0 -default, 1 256B
1968 */
1969 A_UINT32 dma_burst_size;
1970
1971 /**
1972 * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU
1973 * to account for interface latency to avoid underrun.
1974 */
1975 A_UINT32 mac_aggr_delim;
1976 /**
1977 * @brief rx_skip_defrag_timeout_dup_detection_check
1978 * @details
1979 * determine whether target is responsible for detecting duplicate
1980 * non-aggregate MPDU and timing out stale fragments.
1981 *
1982 * A-MPDU reordering is always performed on the target.
1983 *
1984 * 0: target responsible for frag timeout and dup checking
1985 * 1: host responsible for frag timeout and dup checking
1986 */
1987 A_UINT32 rx_skip_defrag_timeout_dup_detection_check;
1988
1989 /**
1990 * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported
1991 * and Max no of descriptors for each Video link (node).
1992 */
1993 A_UINT32 vow_config;
1994
1995 /**
1996 * @brief maximum VDEV that could use GTK offload
1997 */
1998 A_UINT32 gtk_offload_max_vdev;
1999
2000 /**
2001 * @brief num_msdu_desc - Number of msdu descriptors target should use
2002 */
2003 A_UINT32 num_msdu_desc; /* Number of msdu desc */
2004 /**
2005 * @brief max_frag_entry - Max. number of Tx fragments per MSDU
2006 * @details
2007 * This parameter controls the max number of Tx fragments per MSDU.
2008 * This is sent by the target as part of the WMI_SERVICE_READY event
2009 * and is overriden by the OS shim as required.
2010 */
2011 A_UINT32 max_frag_entries;
2012
2013 /**
2014 * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
2015 * @brief num_msdu_desc - Number of vdev that can support beacon offload
2016 */
2017
2018 A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
2019
2020 /**
2021 * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
2022 * @details
2023 * Each TDLS enabled vdev can track outgoing transmits/rssi/rates to/of
2024 * peers in a connection tracking table for possible TDLS link creation
2025 * or deletion. This controls the number of tracked peers per vdev.
2026 */
2027 A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
2028 A_UINT32 beacon_tx_offload_max_vdev;
2029 A_UINT32 num_multicast_filter_entries;
2030 A_UINT32 num_wow_filters; /*host can configure the number of wow filters */
2031
2032 /**
2033 * @brief num_keep_alive_pattern - Num of keep alive patterns configured
2034 * from host.
2035 */
2036 A_UINT32 num_keep_alive_pattern;
2037 /**
2038 * @brief keep_alive_pattern_size - keep alive pattern size.
2039 */
2040 A_UINT32 keep_alive_pattern_size;
2041
2042 /**
2043 * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported
2044 * @details
2045 * Each TDLS STA can become a sleep STA independently. This parameter
2046 * mentions how many such sleep STAs can be supported concurrently.
2047 */
2048 A_UINT32 max_tdls_concurrent_sleep_sta;
2049
2050 /**
2051 * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported
2052 * @details
2053 * Each TDLS STA can become a buffer STA independently. This parameter
2054 * mentions how many such buffer STAs can be supported concurrently.
2055 */
2056 A_UINT32 max_tdls_concurrent_buffer_sta;
2057
2058 /**
2059 * @brief wmi_send_separate - host configures fw to send the wmi separately
2060 */
2061 A_UINT32 wmi_send_separate;
2062
2063 /**
2064 * @brief num_ocb_vdevs - Number of vdevs used for OCB support
2065 */
2066 A_UINT32 num_ocb_vdevs;
2067
2068 /**
2069 * @brief num_ocb_channels - The supported number of simultaneous OCB channels
2070 */
2071 A_UINT32 num_ocb_channels;
2072
2073 /**
2074 * @brief num_ocb_schedules - The supported number of OCB schedule segments
2075 */
2076 A_UINT32 num_ocb_schedules;
Manikandan Mohan30728082015-12-09 12:35:24 -08002077 /**
2078 * @brief specific configuration from host, such as per platform configuration
2079 */
2080 #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0
2081 #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002082
2083 #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1
2084 #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2
2085
2086 #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2
2087 #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4
2088
2089 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3
2090 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8
2091
2092 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4
2093 #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10
2094
2095 #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5
2096 #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20
2097
2098 #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6
2099 #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40
2100
2101 #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7
2102 #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80
2103
2104 #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8
2105 #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100
2106
Manikandan Mohan30728082015-12-09 12:35:24 -08002107 A_UINT32 flag1;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002108
2109 /** @brief smart_ant_cap - Smart Antenna capabilities information
2110 * @details
2111 * 1 - Smart antenna is enabled.
2112 * 0 - Smart antenna is disabled.
2113 * In future this can contain smart antenna specifc capabilities.
2114 */
2115 A_UINT32 smart_ant_cap;
2116
2117 /**
2118 * User can configure the buffers allocated for each AC (BE, BK, VI, VO)
2119 * during init
2120 */
2121 A_UINT32 BK_Minfree;
2122 A_UINT32 BE_Minfree;
2123 A_UINT32 VI_Minfree;
2124 A_UINT32 VO_Minfree;
2125
2126 /**
2127 * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment
2128 * descriptor memory allocation.
2129 * 1 - Allocate fragment descriptor memory for data packet in firmware.
2130 * If host wants to transmit data packet at its desired rate,
2131 * this field must be set.
2132 * 0 - Don't allocate fragment descriptor for data packet.
2133 */
2134 A_UINT32 alloc_frag_desc_for_data_pkt;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002135} wmi_resource_config;
2136
Manikandan Mohan30728082015-12-09 12:35:24 -08002137#define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \
2138 do { \
2139 (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
2140 (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \
2141 WMI_RSRC_CFG_FLAG_ ## flag ## _M; \
2142 } while (0)
2143#define WMI_RSRC_CFG_FLAG_GET(word32, flag) \
2144 (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \
2145 WMI_RSRC_CFG_FLAG_ ## flag ## _S)
2146
2147#define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \
2148 WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value))
2149#define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \
2150 WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST)
2151
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08002152#define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \
2153 WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value))
2154#define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \
2155 WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT)
2156
2157#define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \
2158 WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value))
2159#define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \
2160 WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT)
2161
2162#define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \
2163 WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value))
2164#define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \
2165 WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF)
2166
2167#define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \
2168 WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value))
2169#define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \
2170 WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF)
2171
2172#define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \
2173 WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value))
2174#define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \
2175 WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64)
2176
2177#define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \
2178 WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value))
2179#define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \
2180 WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE)
2181
2182#define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \
2183 WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value))
2184#define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \
2185 WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE)
2186
2187#define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \
2188 WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value))
2189#define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \
2190 WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE)
2191
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002192typedef struct {
2193 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */
2194
2195 /** The following indicate the WMI versions to be supported by
2196 * the host driver. Note that the host driver decide to
2197 * "downgrade" its WMI version support and this may not be the
2198 * native version of the host driver. */
2199 wmi_abi_version host_abi_vers;
2200
2201 A_UINT32 num_host_mem_chunks;
2202 /** size of array host_mem_chunks[] */
2203 /* The TLVs for resource_config and host_mem_chunks[] will follow.
2204 * wmi_resource_config resource_config;
2205 * wlan_host_memory_chunk host_mem_chunks[];
2206 */
2207
2208} wmi_init_cmd_fixed_param;
2209
2210/**
2211 * TLV for channel list
2212 */
2213typedef struct {
2214 /** WMI_CHAN_LIST_TAG */
2215 A_UINT32 tag;
2216 /** # of channels to scan */
2217 A_UINT32 num_chan;
2218 /** channels in Mhz */
2219 A_UINT32 channel_list[1];
2220} wmi_chan_list;
2221
2222/**
2223 * TLV for bssid list
2224 */
2225typedef struct {
2226 /** WMI_BSSID_LIST_TAG */
2227 A_UINT32 tag;
2228 /** number of bssids */
2229 A_UINT32 num_bssid;
2230 /** bssid list */
2231 wmi_mac_addr bssid_list[1];
2232} wmi_bssid_list;
2233
2234/**
2235 * TLV for ie data.
2236 */
2237typedef struct {
2238 /** WMI_IE_TAG */
2239 A_UINT32 tag;
2240 /** number of bytes in ie data */
2241 A_UINT32 ie_len;
2242 /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4 ) */
2243 A_UINT32 ie_data[1];
2244} wmi_ie_data;
2245
2246typedef struct {
2247 /** Len of the SSID */
2248 A_UINT32 ssid_len;
2249 /** SSID */
2250 A_UINT32 ssid[8];
2251} wmi_ssid;
2252
2253typedef struct {
2254 /** WMI_SSID_LIST_TAG */
2255 A_UINT32 tag;
2256 A_UINT32 num_ssids;
2257 wmi_ssid ssids[1];
2258} wmi_ssid_list;
2259
2260/* prefix used by scan requestor ids on the host */
2261#define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
2262/* prefix used by scan request ids generated on the host */
2263/* host cycles through the lower 12 bits to generate ids */
2264#define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
2265
2266#define WLAN_SCAN_PARAMS_MAX_SSID 16
2267#define WLAN_SCAN_PARAMS_MAX_BSSID 4
2268#define WLAN_SCAN_PARAMS_MAX_IE_LEN 512
2269
2270typedef struct {
2271 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
2272 /** Scan ID */
2273 A_UINT32 scan_id;
2274 /** Scan requestor ID */
2275 A_UINT32 scan_req_id;
2276 /** VDEV id(interface) that is requesting scan */
2277 A_UINT32 vdev_id;
2278 /** Scan Priority, input to scan scheduler */
2279 A_UINT32 scan_priority;
2280 /** Scan events subscription */
2281 A_UINT32 notify_scan_events;
2282 /** dwell time in msec on active channels */
2283 A_UINT32 dwell_time_active;
2284 /** dwell time in msec on passive channels */
2285 A_UINT32 dwell_time_passive;
2286 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
2287 A_UINT32 min_rest_time;
2288 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
2289 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
2290 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
2291 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
2292 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
2293 * irrespective of activity. activity is determined by the idle_time parameter.
2294 */
2295 A_UINT32 max_rest_time;
2296 /** time before sending next set of probe requests.
2297 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
2298 * The number of probe requests specified depends on the ssid_list and bssid_list
2299 */
2300 A_UINT32 repeat_probe_time;
2301 /** time in msec between 2 consequetive probe requests with in a set. */
2302 A_UINT32 probe_spacing_time;
2303 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
2304 A_UINT32 idle_time;
2305 /** maximum time in msec allowed for scan */
2306 A_UINT32 max_scan_time;
2307 /** delay in msec before sending first probe request after switching to a channel */
2308 A_UINT32 probe_delay;
2309 /** Scan control flags */
2310 A_UINT32 scan_ctrl_flags;
2311 /** Burst duration time in msec*/
2312 A_UINT32 burst_duration;
2313
2314 /** # if channels to scan. In the TLV channel_list[] */
2315 A_UINT32 num_chan;
2316 /** number of bssids. In the TLV bssid_list[] */
2317 A_UINT32 num_bssid;
2318 /** number of ssid. In the TLV ssid_list[] */
2319 A_UINT32 num_ssids;
2320 /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */
2321 A_UINT32 ie_len;
2322 /** Max number of probes to be sent */
2323 A_UINT32 n_probes;
2324
2325 /**
2326 * TLV (tag length value ) parameters follow the scan_cmd
2327 * structure. The TLV's are:
2328 * A_UINT32 channel_list[];
2329 * wmi_ssid ssid_list[];
2330 * wmi_mac_addr bssid_list[];
2331 * A_UINT8 ie_data[];
2332 */
2333} wmi_start_scan_cmd_fixed_param;
2334
2335/**
2336 * scan control flags.
2337 */
2338
2339/** passively scan all channels including active channels */
2340#define WMI_SCAN_FLAG_PASSIVE 0x1
2341/** add wild card ssid probe request even though ssid_list is specified. */
2342#define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
2343/** add cck rates to rates/xrate ie for the generated probe request */
2344#define WMI_SCAN_ADD_CCK_RATES 0x4
2345/** add ofdm rates to rates/xrate ie for the generated probe request */
2346#define WMI_SCAN_ADD_OFDM_RATES 0x8
2347/** To enable indication of Chan load and Noise floor to host */
2348#define WMI_SCAN_CHAN_STAT_EVENT 0x10
2349/** Filter Probe request frames */
2350#define WMI_SCAN_FILTER_PROBE_REQ 0x20
2351/**When set, not to scan DFS channels*/
2352#define WMI_SCAN_BYPASS_DFS_CHN 0x40
2353/**When set, certain errors are ignored and scan continues.
2354 * Different FW scan engine may use its own logic to decide what errors to ignore*/
2355#define WMI_SCAN_CONTINUE_ON_ERROR 0x80
2356/** Enable promiscous mode for ese */
2357#define WMI_SCAN_FILTER_PROMISCOUS 0x100
2358/** allow to send probe req on DFS channel */
2359#define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200
2360/** add TPC content in probe req frame */
2361#define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400
2362/** add DS content in probe req frame */
2363#define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800
2364/** use random mac address for TA for probe request frame and add
2365 * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame.
2366 * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/
2367#define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000
2368
2369/** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
2370#define WMI_SCAN_CLASS_MASK 0xFF000000
2371
2372/*
2373 * Masks identifying types/ID of scans
2374 * Scan_Stop macros should be the same value as below defined in UMAC
2375 * #define IEEE80211_SPECIFIC_SCAN 0x00000000
2376 * #define IEEE80211_VAP_SCAN 0x01000000
2377 * #define IEEE80211_ALL_SCANS 0x04000000
2378 */
2379#define WMI_SCAN_STOP_ONE 0x00000000
2380#define WMI_SCN_STOP_VAP_ALL 0x01000000
2381#define WMI_SCAN_STOP_ALL 0x04000000
2382
2383typedef struct {
2384 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
2385 /** requestor requesting cancel */
2386 A_UINT32 requestor;
2387 /** Scan ID */
2388 A_UINT32 scan_id;
2389 /**
2390 * Req Type
2391 * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
2392 * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
2393 * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
2394 * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
2395 */
2396 A_UINT32 req_type;
2397 /**
2398 * vDev ID
2399 * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
2400 */
2401 A_UINT32 vdev_id;
2402} wmi_stop_scan_cmd_fixed_param;
2403
2404#define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */
2405#define APPEND_TO_EXISTING_CHAN_LIST 1
2406
2407typedef struct {
2408 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */
2409 A_UINT32 num_scan_chans;
2410 /** no of elements in chan_info[] */
2411 A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */
2412 /** Followed by the variable length TLV chan_info:
2413 * wmi_channel chan_info[] */
2414} wmi_scan_chan_list_cmd_fixed_param;
2415
2416/*
2417 * Priority numbers must be sequential, starting with 0.
2418 */
2419/* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */
2420typedef enum {
2421 WMI_SCAN_PRIORITY_VERY_LOW = 0,
2422 WMI_SCAN_PRIORITY_LOW,
2423 WMI_SCAN_PRIORITY_MEDIUM,
2424 WMI_SCAN_PRIORITY_HIGH,
2425 WMI_SCAN_PRIORITY_VERY_HIGH,
2426
2427 WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
2428} wmi_scan_priority;
2429
2430/* Five Levels for Requested Priority */
2431/* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */
2432typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT];
2433
2434/**
2435 * 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
2436 * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA
2437 * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact
2438 */
2439typedef struct {
2440 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */
2441 /**
2442 * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table
2443 * 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
2444 */
2445 A_UINT32 vdev_type;
2446 /**
2447 * number of rows in mapping_table for a specific vdev
2448 * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition)
2449 */
2450 A_UINT32 number_rows;
2451 /** mapping_table for a specific vdev follows this TLV
2452 * WLAN_PRIORITY_MAPPING mapping_table[]; */
2453} wmi_scan_sch_priority_table_cmd_fixed_param;
2454
2455/** update flags */
2456#define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1
2457#define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2
2458#define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4
2459
2460typedef struct {
2461 A_UINT32 tlv_header;
2462 /** requestor requesting update scan request */
2463 A_UINT32 requestor;
2464 /** Scan ID of the scan request that need to be update */
2465 A_UINT32 scan_id;
2466 /** update flags, indicating which of the following fields are valid and need to be updated*/
2467 A_UINT32 scan_update_flags;
2468 /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */
2469 A_UINT32 scan_priority;
2470 /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */
2471 A_UINT32 min_rest_time;
2472 /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */
2473 A_UINT32 max_rest_time;
2474} wmi_scan_update_request_cmd_fixed_param;
2475
2476typedef struct {
2477 A_UINT32 tlv_header;
2478 /** oui to be used in probe request frame when random mac addresss is
2479 * requested part of scan parameters. this is applied to both FW internal scans and
2480 * host initated scans. host can request for random mac address with
2481 * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */
2482 A_UINT32 prob_req_oui;
2483} wmi_scan_prob_req_oui_cmd_fixed_param;
2484
2485enum wmi_scan_event_type {
2486 WMI_SCAN_EVENT_STARTED = 0x1,
2487 WMI_SCAN_EVENT_COMPLETED = 0x2,
2488 WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
2489 WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
2490 WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */
2491 WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */
2492 WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */
Manikandan Mohan46b95c02015-12-09 12:23:08 -08002493 WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */
2494 WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002495 WMI_SCAN_EVENT_MAX = 0x8000
2496};
2497
2498enum wmi_scan_completion_reason {
2499 /** scan related events */
2500 WMI_SCAN_REASON_NONE = 0xFF,
2501 WMI_SCAN_REASON_COMPLETED = 0,
2502 WMI_SCAN_REASON_CANCELLED = 1,
2503 WMI_SCAN_REASON_PREEMPTED = 2,
2504 WMI_SCAN_REASON_TIMEDOUT = 3,
2505 WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */
2506 WMI_SCAN_REASON_MAX,
2507};
2508
2509typedef struct {
2510 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */
2511 /** scan event (wmi_scan_event_type) */
2512 A_UINT32 event;
2513 /** status of the scan completion event */
2514 A_UINT32 reason;
2515 /** channel freq , only valid for FOREIGN channel event*/
2516 A_UINT32 channel_freq;
2517 /**id of the requestor whose scan is in progress */
2518 A_UINT32 requestor;
2519 /**id of the scan that is in progress */
2520 A_UINT32 scan_id;
2521 /**id of VDEV that requested the scan */
2522 A_UINT32 vdev_id;
2523} wmi_scan_event_fixed_param;
2524
2525/* WMI Diag event */
2526typedef struct {
2527 A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */
2528 A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */
2529 A_UINT32 count; /* Number of diag frames added to current event */
2530 A_UINT32 dropped;
2531 /* followed by WMITLV_TAG_ARRAY_BYTE */
2532} wmi_diag_event_fixed_param;
2533
2534/*
2535 * If FW has multiple active channels due to MCC(multi channel concurrency),
2536 * then these stats are combined stats for all the active channels.
2537 */
2538typedef struct {
2539 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */
2540 /** ack count, it is an incremental number, not accumulated number */
2541 A_UINT32 ackRcvBad;
2542 /** bad rts count, it is an incremental number, not accumulated number */
2543 A_UINT32 rtsBad;
2544 /** good rts, it is an incremental number, not accumulated number */
2545 A_UINT32 rtsGood;
2546 /** fcs count, it is an incremental number, not accumulated number */
2547 A_UINT32 fcsBad;
2548 /** beacon count, it is an incremental number, not accumulated number */
2549 A_UINT32 noBeacons;
2550} wmi_update_whal_mib_stats_event_fixed_param;
2551
2552/*
2553 * This defines how much headroom is kept in the
2554 * receive frame between the descriptor and the
2555 * payload, in order for the WMI PHY error and
2556 * management handler to insert header contents.
2557 *
2558 * This is in bytes.
2559 */
2560#define WMI_MGMT_RX_HDR_HEADROOM sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr)
2561
2562/** This event will be used for sending scan results
2563 * as well as rx mgmt frames to the host. The rx buffer
2564 * will be sent as part of this WMI event. It would be a
2565 * good idea to pass all the fields in the RX status
2566 * descriptor up to the host.
2567 */
2568/* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
2569#define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
2570
2571/** flag indicating that the the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */
2572#define WMI_MGMT_RX_HDR_EXTSCAN 0x01
2573
2574/**
2575 * flag indicating that the the mgmt frame (probe req/beacon) is received in
2576 * the context of matched network by FW ENLO
2577 */
2578#define WMI_MGMT_RX_HDR_ENLO 0x02
2579
2580typedef struct {
2581 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
2582 /** channel on which this frame is received. */
2583 A_UINT32 channel;
2584 /** snr information used to cal rssi */
2585 A_UINT32 snr;
2586 /** Rate kbps */
2587 A_UINT32 rate;
2588 /** rx phy mode WLAN_PHY_MODE */
2589 A_UINT32 phy_mode;
2590 /** length of the frame */
2591 A_UINT32 buf_len;
2592 /** rx status */
2593 A_UINT32 status;
2594 /** RSSI of PRI 20MHz for each chain. */
2595 A_UINT32 rssi_ctl[ATH_MAX_ANTENNA];
2596 /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */
2597 A_UINT32 flags;
2598 /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */
2599 A_INT32 rssi;
2600
2601 /** delta between local TSF(TSF timestamp when frame was RXd)
2602 * and remote TSF(TSF timestamp in the IE for mgmt frame
2603 * beacon,proberesp for e.g). If remote TSF is not available,
2604 * delta set to 0.
2605 * Although tsf_delta is stored as A_UINT32, it can be negative,
2606 * and thus would need to be sign-extended if added to a value
2607 * larger than 32 bits.
2608 */
2609 A_UINT32 tsf_delta;
2610 /* This TLV is followed by array of bytes:
2611 * // management frame buffer
2612 * A_UINT8 bufp[];
2613 */
2614} wmi_mgmt_rx_hdr;
2615
2616/* WMI PHY Error RX */
2617
2618typedef struct {
2619 /** TSF timestamp */
2620 A_UINT32 tsf_timestamp;
2621
2622 /**
2623 * Current freq1, freq2
2624 *
2625 * [7:0]: freq1[lo]
2626 * [15:8] : freq1[hi]
2627 * [23:16]: freq2[lo]
2628 * [31:24]: freq2[hi]
2629 */
2630 A_UINT32 freq_info_1;
2631
2632 /**
2633 * Combined RSSI over all chains and channel width for this PHY error
2634 *
2635 * [7:0]: RSSI combined
2636 * [15:8]: Channel width (MHz)
2637 * [23:16]: PHY error code
2638 * [24:16]: reserved (future use)
2639 */
2640 A_UINT32 freq_info_2;
2641
2642 /**
2643 * RSSI on chain 0 through 3
2644 *
2645 * This is formatted the same as the PPDU_START RX descriptor
2646 * field:
2647 *
2648 * [7:0]: pri20
2649 * [15:8]: sec20
2650 * [23:16]: sec40
2651 * [31:24]: sec80
2652 */
2653 A_UINT32 rssi_chain0;
2654 A_UINT32 rssi_chain1;
2655 A_UINT32 rssi_chain2;
2656 A_UINT32 rssi_chain3;
2657
2658 /**
2659 * Last calibrated NF value for chain 0 through 3
2660 *
2661 * nf_list_1:
2662 *
2663 * + [15:0] - chain 0
2664 * + [31:16] - chain 1
2665 *
2666 * nf_list_2:
2667 *
2668 * + [15:0] - chain 2
2669 * + [31:16] - chain 3
2670 */
2671 A_UINT32 nf_list_1;
2672 A_UINT32 nf_list_2;
2673
2674 /** Length of the frame */
2675 A_UINT32 buf_len;
2676} wmi_single_phyerr_rx_hdr;
2677
2678#define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff
2679#define WMI_UNIFIED_FREQINFO_1_LO_S 0
2680#define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00
2681#define WMI_UNIFIED_FREQINFO_1_HI_S 8
2682#define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000
2683#define WMI_UNIFIED_FREQINFO_2_LO_S 16
2684#define WMI_UNIFIED_FREQINFO_2_HI 0xff000000
2685#define WMI_UNIFIED_FREQINFO_2_HI_S 24
2686
2687/*
2688 * Please keep in mind that these _SET macros break macro side effect
2689 * assumptions; don't be clever with them.
2690 */
2691#define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05302692 (WMI_F_MS((hdr)->freq_info_1, \
2693 WMI_UNIFIED_FREQINFO_ ## f ## _LO) \
2694 | (WMI_F_MS((hdr)->freq_info_1, \
2695 WMI_UNIFIED_FREQINFO_ ## f ## _HI) << 8))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002696
2697#define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \
2698 do { \
2699 WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \
2700 WMI_UNIFIED_FREQINFO_ ## f ## _LO); \
2701 WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \
2702 WMI_UNIFIED_FREQINFO_ ## f ## _HI); \
2703 } while (0)
2704
2705#define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff
2706#define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0
2707#define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00
2708#define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8
2709#define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000
2710#define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16
2711
2712#define WMI_UNIFIED_RSSI_COMB_GET(hdr) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05302713 ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002714 WMI_UNIFIED_FREQINFO_2_RSSI_COMB)))
2715
2716#define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \
2717 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
2718 WMI_UNIFIED_FREQINFO_2_RSSI_COMB);
2719
2720#define WMI_UNIFIED_CHWIDTH_GET(hdr) \
2721 WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH)
2722
2723#define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \
2724 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
2725 WMI_UNIFIED_FREQINFO_2_CHWIDTH);
2726
2727#define WMI_UNIFIED_PHYERRCODE_GET(hdr) \
2728 WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE)
2729
2730#define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \
2731 WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \
2732 WMI_UNIFIED_FREQINFO_2_PHYERRCODE);
2733
2734#define WMI_UNIFIED_CHAIN_0 0x0000ffff
2735#define WMI_UNIFIED_CHAIN_0_S 0
2736#define WMI_UNIFIED_CHAIN_1 0xffff0000
2737#define WMI_UNIFIED_CHAIN_1_S 16
2738#define WMI_UNIFIED_CHAIN_2 0x0000ffff
2739#define WMI_UNIFIED_CHAIN_2_S 0
2740#define WMI_UNIFIED_CHAIN_3 0xffff0000
2741#define WMI_UNIFIED_CHAIN_3_S 16
2742
2743#define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1
2744#define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1
2745#define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2
2746#define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2
2747
2748#define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \
2749 ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, \
2750 WMI_UNIFIED_CHAIN_ ## c)))
2751
2752#define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \
2753 WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, (nf) & 0xffff, \
2754 WMI_UNIFIED_CHAIN_ ## c);
2755
2756/*
2757 * For now, this matches what the underlying hardware is doing.
2758 * Update ar6000ProcRxDesc() to use these macros when populating
2759 * the rx descriptor and then we can just copy the field over
2760 * to the WMI PHY notification without worrying about breaking
2761 * things.
2762 */
2763#define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff
2764#define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0
2765#define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00
2766#define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8
2767#define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000
2768#define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16
2769#define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000
2770#define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24
2771
2772#define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \
2773 WMI_F_RMW((hdr)->rssi_chain ## c, (rssi) & 0xff, \
2774 WMI_UNIFIED_RSSI_CHAN_ ## ch);
2775
2776#define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \
2777 ((int8_t) (WMI_F_MS((hdr)->rssi_chain ## c, \
2778 WMI_UNIFIED_RSSI_CHAN_ ## ch)))
2779
2780typedef struct {
2781 /** Phy error event header */
2782 wmi_single_phyerr_rx_hdr hdr;
2783 /** frame buffer */
2784 A_UINT8 bufp[1];
2785} wmi_single_phyerr_rx_event;
2786
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08002787/* PHY ERROR MASK 0 */
2788/* bits 1:0 defined but not published */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05302789#define WMI_PHY_ERROR_MASK0_RADAR (1<<2)
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08002790/* bits 23:3 defined but not published */
2791#define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1<<24)
2792/* bits 25:24 defined but not published */
2793#define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1<<26)
2794/* bits 31:27 defined but not published */
2795
2796/* PHY ERROR MASK 1
2797 * bits 13:0 defined but not published
2798 * bits 31:14 reserved
2799 */
2800
2801/* PHY ERROR MASK 2
2802 * bits 31:0 reserved
2803 */
2804
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002805typedef struct {
2806 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr */
2807 /** Phy error phy error count */
2808 A_UINT32 num_phyerr_events;
2809 A_UINT32 tsf_l32;
2810 A_UINT32 tsf_u32;
2811 A_UINT32 buf_len;
2812 A_UINT32 pmac_id;
Krishna Kumaar Natarajanc7681992015-11-19 16:45:59 -08002813 A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */
2814 A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */
2815 A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */
2816
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002817 /* This TLV is followed by array of bytes:
2818 * // frame buffer - contains multiple payloads in the order:
2819 * // header - payload, header - payload...
2820 * (The header is of type: wmi_single_phyerr_rx_hdr)
2821 * A_UINT8 bufp[];
2822 */
2823} wmi_comb_phyerr_rx_hdr;
2824
2825/* WMI MGMT TX */
2826typedef struct {
2827 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */
2828 /** unique id identifying the VDEV, generated by the caller */
2829 A_UINT32 vdev_id;
2830 /** peer MAC address */
2831 wmi_mac_addr peer_macaddr;
2832 /** xmit rate */
2833 A_UINT32 tx_rate;
2834 /** xmit power */
2835 A_UINT32 tx_power;
2836 /** Buffer length in bytes */
2837 A_UINT32 buf_len;
2838 /* This TLV is followed by array of bytes:
2839 * // management frame buffer
2840 * A_UINT8 bufp[];
2841 */
2842} wmi_mgmt_tx_hdr;
2843
2844typedef struct {
2845 /*
2846 * TLV tag and len;
2847 * tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param
2848 */
2849 A_UINT32 tlv_header;
2850 A_UINT32 vdev_id;
2851 /* echoed in tx_compl_event */
2852 A_UINT32 desc_id;
2853 /* MHz units */
2854 A_UINT32 chanfreq;
2855 A_UINT32 paddr_lo;
2856 A_UINT32 paddr_hi;
2857 A_UINT32 frame_len;
2858 /* Buffer length in bytes */
2859 A_UINT32 buf_len;
2860 /*
2861 * This TLV is followed by array of bytes:
2862 * First 64 bytes of management frame
2863 * A_UINT8 bufp[];
2864 */
2865} wmi_mgmt_tx_send_cmd_fixed_param;
2866
2867typedef struct {
2868 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */
2869 A_UINT32 value;
2870} wmi_echo_event_fixed_param;
2871
2872typedef struct {
2873 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */
2874 A_UINT32 value;
2875} wmi_echo_cmd_fixed_param;
2876
2877typedef struct {
2878 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param */
2879
2880 A_UINT32 reserved0;
2881 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
2882 /** reg domain code */
2883 A_UINT32 reg_domain;
2884 A_UINT32 reg_domain_2G;
2885 A_UINT32 reg_domain_5G;
2886 A_UINT32 conformance_test_limit_2G;
2887 A_UINT32 conformance_test_limit_5G;
2888} wmi_pdev_set_regdomain_cmd_fixed_param;
2889
2890typedef struct {
2891 /** true for scan start and flase for scan end */
2892 A_UINT32 scan_start;
2893} wmi_pdev_scan_cmd;
2894
Govind Singhc7d51942016-02-01 12:09:31 +05302895/* WMI support for setting ratemask in target */
2896
2897typedef struct {
2898 A_UINT32 tlv_header;
2899 /*
2900 * TLV tag and len; tag equals
2901 * WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param
2902 */
2903 A_UINT32 vdev_id;
2904 /*
2905 * 0 - cck/ofdm
2906 * 1 - HT
2907 * 2 - VHT */
2908 A_UINT32 type;
2909
2910 A_UINT32 mask_lower32;
2911 A_UINT32 mask_higher32;
2912} wmi_vdev_config_ratemask_cmd_fixed_param;
2913
2914/* nrp action - Filter Neighbor Rx Packets - add/remove filter */
2915enum {
2916 WMI_FILTER_NRP_ACTION_ADD = 0x1,
2917 WMI_FILTER_NRP_ACTION_REMOVE = 0x2,
2918 WMI_FILTER_NRP_ACTION_GET_LIST = 0x3,
2919}; /* nrp - Neighbor Rx Packets */
2920
2921/* nrp type - Filter Neighbor Rx Packets - ap/client addr */
2922enum {
2923 WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1,
2924 WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2,
2925};
2926
2927/* nrp flag - Filter Neighbor Rx Packets
2928 * (capture flag, 2 & 3 not initially supported)
2929 */
2930enum {
2931 WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1,
2932 WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2,
2933 WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3,
2934};
2935
2936/* Filter for Neighbor Rx Packets */
2937typedef struct {
2938 A_UINT32 tlv_header;
2939 /*
2940 * TLV tag and len; tag equals
2941 * WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param
2942 */
2943 A_UINT32 vdev_id;
2944 /* AP Bssid or Client Mac-addr */
2945 wmi_mac_addr addr;
2946 /* Add/Remove NRF Filter */
2947 A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */
2948 /* client/ap filter */
2949 A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */
2950 /* optional - tx/rx capture */
2951 A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */
2952 /* BSSID index - index of the BSSID register */
2953 A_UINT32 bssid_idx;
2954} wmi_vdev_filter_nrp_config_cmd_fixed_param;
2955
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08002956/*Command to set/unset chip in quiet mode*/
2957typedef struct {
2958 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param */
2959 A_UINT32 reserved0;
2960 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
2961 A_UINT32 period; /*period in TUs */
2962 A_UINT32 duration; /*duration in TUs */
2963 A_UINT32 next_start; /*offset in TUs */
2964 A_UINT32 enabled; /*enable/disable */
2965} wmi_pdev_set_quiet_cmd_fixed_param;
2966
2967/*
2968 * Command to enable/disable Green AP Power Save.
2969 * This helps conserve power during AP operation. When the AP has no
2970 * stations associated with it, the host can enable Green AP Power Save
2971 * to request the firmware to shut down all but one transmit and receive
2972 * chains.
2973 */
2974typedef struct {
2975 A_UINT32 tlv_header;
2976 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param */
2977 A_UINT32 reserved0;
2978 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
2979 A_UINT32 enable; /*1:enable, 0:disable */
2980} wmi_pdev_green_ap_ps_enable_cmd_fixed_param;
2981
2982#define MAX_HT_IE_LEN 32
2983typedef struct {
2984 A_UINT32 tlv_header;
2985 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */
2986 A_UINT32 reserved0;
2987 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
2988 A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */
2989 A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
2990 A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
2991 /** The TLV for the HT IE follows:
2992 * A_UINT32 ie_data[];
2993 */
2994} wmi_pdev_set_ht_ie_cmd_fixed_param;
2995
2996#define MAX_VHT_IE_LEN 32
2997typedef struct {
2998 A_UINT32 tlv_header;
2999 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */
3000 A_UINT32 reserved0;
3001 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3002 A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */
3003 A_UINT32 tx_streams; /* Tx streams supported for this HT IE */
3004 A_UINT32 rx_streams; /* Rx streams supported for this HT IE */
3005 /** The TLV for the VHT IE follows:
3006 * A_UINT32 ie_data[];
3007 */
3008} wmi_pdev_set_vht_ie_cmd_fixed_param;
3009
3010typedef struct {
3011 A_UINT32 tlv_header;
3012 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param */
3013 A_UINT32 reserved0;
3014 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3015 wmi_mac_addr base_macaddr;
3016} wmi_pdev_set_base_macaddr_cmd_fixed_param;
3017
3018/*
3019 * For now, the spectral configuration is global rather than
3020 * per-vdev. The vdev is a placeholder and will be ignored
3021 * by the firmware.
3022 */
3023typedef struct {
3024 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */
3025 A_UINT32 vdev_id;
3026 A_UINT32 spectral_scan_count;
3027 A_UINT32 spectral_scan_period;
3028 A_UINT32 spectral_scan_priority;
3029 A_UINT32 spectral_scan_fft_size;
3030 A_UINT32 spectral_scan_gc_ena;
3031 A_UINT32 spectral_scan_restart_ena;
3032 A_UINT32 spectral_scan_noise_floor_ref;
3033 A_UINT32 spectral_scan_init_delay;
3034 A_UINT32 spectral_scan_nb_tone_thr;
3035 A_UINT32 spectral_scan_str_bin_thr;
3036 A_UINT32 spectral_scan_wb_rpt_mode;
3037 A_UINT32 spectral_scan_rssi_rpt_mode;
3038 A_UINT32 spectral_scan_rssi_thr;
3039 A_UINT32 spectral_scan_pwr_format;
3040 A_UINT32 spectral_scan_rpt_mode;
3041 A_UINT32 spectral_scan_bin_scale;
3042 A_UINT32 spectral_scan_dBm_adj;
3043 A_UINT32 spectral_scan_chn_mask;
3044} wmi_vdev_spectral_configure_cmd_fixed_param;
3045
3046/*
3047 * Enabling, disabling and triggering the spectral scan
3048 * is a per-vdev operation. That is, it will set channel
3049 * flags per vdev rather than globally; so concurrent scan/run
3050 * and multiple STA (eg p2p, tdls, multi-band STA) is possible.
3051 */
3052typedef struct {
3053 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */
3054 A_UINT32 vdev_id;
3055 /* 0 - ignore; 1 - trigger, 2 - clear trigger */
3056 A_UINT32 trigger_cmd;
3057 /* 0 - ignore; 1 - enable, 2 - disable */
3058 A_UINT32 enable_cmd;
3059} wmi_vdev_spectral_enable_cmd_fixed_param;
3060
3061typedef enum {
3062 WMI_CSA_IE_PRESENT = 0x00000001,
3063 WMI_XCSA_IE_PRESENT = 0x00000002,
3064 WMI_WBW_IE_PRESENT = 0x00000004,
3065 WMI_CSWARP_IE_PRESENT = 0x00000008,
3066} WMI_CSA_EVENT_IES_PRESENT_FLAG;
3067
3068/* wmi CSA receive event from beacon frame */
3069typedef struct {
3070 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */
3071 A_UINT32 i_fc_dur;
3072/* Bit 0-15: FC */
3073/* Bit 16-31: DUR */
3074 wmi_mac_addr i_addr1;
3075 wmi_mac_addr i_addr2;
3076 /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be
3077 * changed in the future without breaking WMI compatibility */
3078 A_UINT32 csa_ie[2];
3079 A_UINT32 xcsa_ie[2];
3080 A_UINT32 wb_ie[2];
3081 A_UINT32 cswarp_ie;
3082 A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */
3083} wmi_csa_event_fixed_param;
3084
3085typedef enum {
3086 /** TX chain mask */
3087 WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
3088 /** RX chain mask */
3089 WMI_PDEV_PARAM_RX_CHAIN_MASK,
3090 /** TX power limit for 2G Radio */
3091 WMI_PDEV_PARAM_TXPOWER_LIMIT2G,
3092 /** TX power limit for 5G Radio */
3093 WMI_PDEV_PARAM_TXPOWER_LIMIT5G,
3094 /** TX power scale */
3095 WMI_PDEV_PARAM_TXPOWER_SCALE,
3096 /** Beacon generation mode . 0: host, 1: target */
3097 WMI_PDEV_PARAM_BEACON_GEN_MODE,
3098 /** Beacon generation mode . 0: staggered 1: bursted */
3099 WMI_PDEV_PARAM_BEACON_TX_MODE,
3100 /** Resource manager off chan mode .
3101 * 0: turn off off chan mode. 1: turn on offchan mode
3102 */
3103 WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
3104 /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */
3105 WMI_PDEV_PARAM_PROTECTION_MODE,
3106 /** Dynamic bandwidth 0: disable 1: enable */
3107 WMI_PDEV_PARAM_DYNAMIC_BW,
3108 /** Non aggregrate/ 11g sw retry threshold.0-disable */
3109 WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
3110 /** aggregrate sw retry threshold. 0-disable*/
3111 WMI_PDEV_PARAM_AGG_SW_RETRY_TH,
3112 /** Station kickout threshold (non of consecutive failures).0-disable */
3113 WMI_PDEV_PARAM_STA_KICKOUT_TH,
3114 /** Aggerate size scaling configuration per AC */
3115 WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING,
3116 /** LTR enable */
3117 WMI_PDEV_PARAM_LTR_ENABLE,
3118 /** LTR latency for BE, in us */
3119 WMI_PDEV_PARAM_LTR_AC_LATENCY_BE,
3120 /** LTR latency for BK, in us */
3121 WMI_PDEV_PARAM_LTR_AC_LATENCY_BK,
3122 /** LTR latency for VI, in us */
3123 WMI_PDEV_PARAM_LTR_AC_LATENCY_VI,
3124 /** LTR latency for VO, in us */
3125 WMI_PDEV_PARAM_LTR_AC_LATENCY_VO,
3126 /** LTR AC latency timeout, in ms */
3127 WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
3128 /** LTR platform latency override, in us */
3129 WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
3130 /** LTR-M override, in us */
3131 WMI_PDEV_PARAM_LTR_RX_OVERRIDE,
3132 /** Tx activity timeout for LTR, in us */
3133 WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
3134 /** L1SS state machine enable */
3135 WMI_PDEV_PARAM_L1SS_ENABLE,
3136 /** Deep sleep state machine enable */
3137 WMI_PDEV_PARAM_DSLEEP_ENABLE,
3138 /** RX buffering flush enable */
3139 WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
3140 /** RX buffering matermark */
3141 WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
3142 /** RX buffering timeout enable */
3143 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
3144 /** RX buffering timeout value */
3145 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
3146 /** pdev level stats update period in ms */
3147 WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
3148 /** vdev level stats update period in ms */
3149 WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
3150 /** peer level stats update period in ms */
3151 WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
3152 /** beacon filter status update period */
3153 WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
3154 /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
3155 WMI_PDEV_PARAM_PMF_QOS,
3156 /** Access category on which ARP frames are sent */
3157 WMI_PDEV_PARAM_ARP_AC_OVERRIDE,
3158 /** DCS configuration */
3159 WMI_PDEV_PARAM_DCS,
3160 /** Enable/Disable ANI on target */
3161 WMI_PDEV_PARAM_ANI_ENABLE,
3162 /** configure the ANI polling period */
3163 WMI_PDEV_PARAM_ANI_POLL_PERIOD,
3164 /** configure the ANI listening period */
3165 WMI_PDEV_PARAM_ANI_LISTEN_PERIOD,
3166 /** configure OFDM immunity level */
3167 WMI_PDEV_PARAM_ANI_OFDM_LEVEL,
3168 /** configure CCK immunity level */
3169 WMI_PDEV_PARAM_ANI_CCK_LEVEL,
3170 /** Enable/Disable CDD for 1x1 STAs in rate control module */
3171 WMI_PDEV_PARAM_DYNTXCHAIN,
3172 /** Enable/Disable proxy STA */
3173 WMI_PDEV_PARAM_PROXY_STA,
3174 /** Enable/Disable low power state when all VDEVs are inactive/idle. */
3175 WMI_PDEV_PARAM_IDLE_PS_CONFIG,
3176 /** Enable/Disable power gating sleep */
3177 WMI_PDEV_PARAM_POWER_GATING_SLEEP,
3178 /** Enable/Disable Rfkill */
3179 WMI_PDEV_PARAM_RFKILL_ENABLE,
3180 /** Set Bursting DUR */
3181 WMI_PDEV_PARAM_BURST_DUR,
3182 /** Set Bursting ENABLE */
3183 WMI_PDEV_PARAM_BURST_ENABLE,
3184 /** HW rfkill config */
3185 WMI_PDEV_PARAM_HW_RFKILL_CONFIG,
3186 /** Enable radio low power features */
3187 WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE,
3188 /** L1SS entry and residency time track */
3189 WMI_PDEV_PARAM_L1SS_TRACK,
3190 /** set hyst at runtime, requirement from SS */
3191 WMI_PDEV_PARAM_HYST_EN,
3192 /** Enable/ Disable POWER COLLAPSE */
3193 WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE,
3194 /** configure LED system state */
3195 WMI_PDEV_PARAM_LED_SYS_STATE,
3196 /** Enable/Disable LED */
3197 WMI_PDEV_PARAM_LED_ENABLE,
3198 /** set DIRECT AUDIO time latency */
3199 WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY,
3200 /** set DIRECT AUDIO Feature ENABLE */
3201 WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE,
3202 /** pdev level whal mib stats update enable */
3203 WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE,
3204 /** ht/vht info based on vdev */
3205 WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD,
3206 /** Set CTS channel BW for dynamic BW adjustment feature */
3207 WMI_PDEV_PARAM_CTS_CBW,
3208 /** Set GPIO pin info used by WNTS */
3209 WMI_PDEV_PARAM_WNTS_CONFIG,
3210 /** Enable/Disable hardware adaptive early rx feature */
3211 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE,
3212 /** The minimum early rx duration, to ensure early rx duration is non-zero */
3213 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP,
3214 /** Increasing/decreasing step used by hardware */
3215 WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP,
3216 /** The fixed early rx duration when adaptive early rx is disabled */
3217 WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP,
3218 /** Enable/Disable bmiss based adaptive beacon timeout feature */
3219 WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE,
3220 /*
3221 * The minimum beacon timeout duration, to ensure beacon timeout
3222 * duration is non-zero
3223 */
3224 WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT,
3225 /** Increasing/decreasing step used by hardware */
3226 WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP,
3227 /*
3228 * The fixed beacon timeout duration when bmiss based adaptive beacon
3229 * timeout is disabled
3230 */
3231 WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT,
3232 /*
3233 * Enable/Disable Congestion Estimator based adaptive beacon
3234 * timeout feature */
3235 WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE,
3236 /*
3237 * combo value of ce_id, ce_threshold, ce_time, refer
3238 * to WMI_CE_BTO_CE_ID_MASK
3239 */
3240 WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE,
3241 /** 2G TX chain mask */
3242 WMI_PDEV_PARAM_TX_CHAIN_MASK_2G,
3243 /** 2G RX chain mask */
3244 WMI_PDEV_PARAM_RX_CHAIN_MASK_2G,
3245 /** 5G TX chain mask */
3246 WMI_PDEV_PARAM_TX_CHAIN_MASK_5G,
3247 /** 5G RX chain mask */
3248 WMI_PDEV_PARAM_RX_CHAIN_MASK_5G,
3249 /* Set tx chain mask for CCK rates */
3250 WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK,
3251 /* Set tx chain mask for 1SS stream */
3252 WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS,
Nirav Shahe1e4a812015-11-05 11:15:54 +05303253 /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected*/
3254 WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG,
Nirav Shah47062ff2015-11-05 11:21:08 +05303255 /* TX power backoff in dB: tx power -= param value
3256 * Host passes values(DB) to Halphy, Halphy reduces the power table by
3257 * the values. Safety check will happen in Halphy
3258 */
3259 WMI_PDEV_PARAM_TXPOWER_DECR_DB,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003260} WMI_PDEV_PARAM;
3261
3262typedef enum {
3263 /** Set the loglevel */
3264 WMI_DBGLOG_LOG_LEVEL = 0x1,
3265 /** Enable VAP level debug */
3266 WMI_DBGLOG_VAP_ENABLE,
3267 /** Disable VAP level debug */
3268 WMI_DBGLOG_VAP_DISABLE,
3269 /** Enable MODULE level debug */
3270 WMI_DBGLOG_MODULE_ENABLE,
3271 /** Disable MODULE level debug */
3272 WMI_DBGLOG_MODULE_DISABLE,
3273 /** Enable MODULE level debug */
3274 WMI_DBGLOG_MOD_LOG_LEVEL,
3275 /** set type of the debug output */
3276 WMI_DBGLOG_TYPE,
3277 /** Enable Disable debug */
3278 WMI_DBGLOG_REPORT_ENABLE
3279} WMI_DBG_PARAM;
3280
3281/* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */
3282typedef enum {
3283 WMI_CTS_CBW_INVALID = 0,
3284 WMI_CTS_CBW_20,
3285 WMI_CTS_CBW_40,
3286 WMI_CTS_CBW_80,
3287 WMI_CTS_CBW_80_80,
3288 WMI_CTS_CBW_160,
3289} WMI_CTS_CBW;
3290
3291typedef struct {
3292 A_UINT32 tlv_header;
3293 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param */
3294 A_UINT32 reserved0;
3295 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3296 /** parameter id */
3297 A_UINT32 param_id;
3298 /** parametr value */
3299 A_UINT32 param_value;
3300} wmi_pdev_set_param_cmd_fixed_param;
3301
3302typedef struct {
3303 A_UINT32 tlv_header;
3304 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param */
3305 A_UINT32 reserved0;
3306 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3307 /** parameter */
3308 A_UINT32 param;
3309} wmi_pdev_get_tpc_config_cmd_fixed_param;
3310
3311#define WMI_FAST_DIVERSITY_BIT_OFFSET 0
3312#define WMI_SLOW_DIVERSITY_BIT_OFFSET 1
3313
3314typedef struct {
3315 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param */
3316 A_UINT32 mac_id; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3317 /** parameter */
3318 A_UINT32 value; /** bit0 is for enable/disable FAST diversity, and bit1 is for enable/disable SLOW diversity, 0->disable, 1->enable */
3319} wmi_pdev_set_antenna_diversity_cmd_fixed_param;
3320
3321#define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3
3322
3323typedef struct {
3324 /*
3325 * TLV tag and len; tag equals
3326 * WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param
3327 */
3328 A_UINT32 tlv_header;
3329 /* vdev_id, where RSSI monitoring will take place */
3330 A_UINT32 vdev_id;
3331 /*
3332 * host will configure request_id and firmware echo
3333 * this id in RSSI_BREACH_EVENT
3334 */
3335 A_UINT32 request_id;
3336 /*
3337 * bit [0-2] = low_rssi_breach_enabled[0-2]
3338 * enabled, bit [3-5] = hi_rssi_breach_enabled[0-2]
3339 */
3340 A_UINT32 enabled_bitmap;
3341 /* unit dBm. host driver to make sure [0] > [1] > [2] */
3342 A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED];
3343 /* unit dBm. host driver to make sure [0] < [1] < [2] */
3344 A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED];
3345 /*
3346 * unit dBm. once low rssi[] breached, same event
3347 * bitmap will be generated only after signal gets better
3348 * than this level. This value is adopted for all low_rssi_breach_threshold[3]
3349 */
3350 A_UINT32 lo_rssi_reenable_hysteresis;
3351 /*
3352 * unit dBm. once hi rssi[] breached, same event bitmap
3353 * will be generated only after signal gets worse than this
3354 * level. This value is adopted for all hi_rssi_breach_threshold[3]
3355 */
3356 A_UINT32 hi_rssi_reenable_histeresis;
3357 /*
3358 * After last event is generated, we wait
3359 * until this interval to generate next event
3360 */
3361 A_UINT32 min_report_interval;
3362 /* this is to suppress number of event to be generated */
3363 A_UINT32 max_num_report;
3364} wmi_rssi_breach_monitor_config_fixed_param;
3365
3366typedef struct {
3367 /** parameter */
3368 A_UINT32 param;
3369} wmi_pdev_dump_cmd;
3370
3371typedef enum {
3372 PAUSE_TYPE_CHOP = 0x1,
3373 /** for MCC (switch channel), only vdev_map is valid */
3374 PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */
3375 PAUSE_TYPE_UAPSD = 0x3,
3376 /** for uapsd, only peer_id and tid_map are valid. */
3377 PAUSE_TYPE_P2P_CLIENT_NOA = 0x4,
3378 /** only vdev_map is valid, actually only one vdev id is set at one time */
3379 PAUSE_TYPE_P2P_GO_PS = 0x5,
3380 /** only vdev_map is valid, actually only one vdev id is set at one time */
3381 PAUSE_TYPE_STA_ADD_BA = 0x6,
3382 /** only peer_id and tid_map are valid, actually only one tid is set at one time */
3383 PAUSE_TYPE_AP_PS = 0x7,
3384 /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */
3385 PAUSE_TYPE_IBSS_PS = 0x8,
3386 /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */
3387 PAUSE_TYPE_HOST = 0x15,
3388 /** host is requesting vdev pause */
3389} wmi_tx_pause_type;
3390
3391typedef enum {
3392 ACTION_PAUSE = 0x0,
3393 ACTION_UNPAUSE = 0x1,
3394} wmi_tx_pause_action;
3395
3396typedef struct {
3397 A_UINT32 tlv_header;
3398 A_UINT32 pause_type;
3399 A_UINT32 action;
3400 A_UINT32 vdev_map;
3401 A_UINT32 peer_id;
3402 A_UINT32 tid_map;
3403} wmi_tx_pause_event_fixed_param;
3404
3405typedef enum {
3406 WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0,
3407 WMI_MGMT_TX_COMP_TYPE_DISCARD,
3408 WMI_MGMT_TX_COMP_TYPE_INSPECT,
3409 WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK,
3410 WMI_MGMT_TX_COMP_TYPE_MAX,
3411} WMI_MGMT_TX_COMP_STATUS_TYPE;
3412
3413typedef struct {
3414 A_UINT32 tlv_header;
3415 A_UINT32 desc_id; /* from tx_send_cmd */
3416 A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */
3417} wmi_mgmt_tx_compl_event_fixed_param;
3418
3419#define WMI_TPC_RATE_MAX 160
3420/* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
3421#define WMI_TPC_TX_NUM_CHAIN 4
3422
3423typedef enum {
3424 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
3425 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
3426 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
3427} WMI_TPC_CONFIG_EVENT_FLAG;
3428
3429typedef struct {
3430 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param */
3431 A_UINT32 regDomain;
3432 A_UINT32 chanFreq;
3433 A_UINT32 phyMode;
3434 A_UINT32 twiceAntennaReduction;
3435 A_UINT32 twiceMaxRDPower;
3436 A_INT32 twiceAntennaGain;
3437 A_UINT32 powerLimit;
3438 A_UINT32 rateMax;
3439 A_UINT32 numTxChain;
3440 A_UINT32 ctl;
3441 A_UINT32 flags;
3442 /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */
3443 A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN];
3444 A_INT8
3445 maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN]
3446 [WMI_TPC_TX_NUM_CHAIN];
3447 A_INT8
3448 maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN]
3449 [WMI_TPC_TX_NUM_CHAIN];
3450 A_INT8
3451 maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN]
3452 [WMI_TPC_TX_NUM_CHAIN];
3453 /* This TLV is followed by a byte array:
3454 * A_UINT8 ratesArray[];
3455 */
3456} wmi_pdev_tpc_config_event_fixed_param;
3457
3458typedef struct {
3459 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */
3460 A_UINT32 periodCnt;
3461 A_UINT32 L1Cnt;
3462 A_UINT32 L11Cnt;
3463 A_UINT32 L12Cnt;
3464 A_UINT32 L1Entry;
3465 A_UINT32 L11Entry;
3466 A_UINT32 L12Entry;
3467} wmi_pdev_l1ss_track_event_fixed_param;
3468
3469typedef struct {
3470 A_UINT32 len;
3471 A_UINT32 msgref;
3472 A_UINT32 segmentInfo;
3473} wmi_pdev_seg_hdr_info;
3474
3475/*
3476 * Transmit power scale factor.
3477 *
3478 */
3479typedef enum {
3480 WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
3481 WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
3482 WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
3483 WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
3484 WMI_TP_SCALE_MIN = 4, /* min, but still on */
3485 WMI_TP_SCALE_SIZE = 5, /* max num of enum */
3486} WMI_TP_SCALE;
3487
3488#define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32)
3489
3490typedef struct {
3491 /** message buffer, NULL terminated */
3492 char bufp[WMI_MAX_DEBUG_MESG];
3493} wmi_debug_mesg_event;
3494
3495enum {
3496 /** IBSS station */
3497 VDEV_TYPE_IBSS = 0,
3498 /** infra STA */
3499 VDEV_TYPE_STA = 1,
3500 /** infra AP */
3501 VDEV_TYPE_AP = 2,
3502 /** Monitor */
3503 VDEV_TYPE_MONITOR = 3,
3504 /** OCB */
3505 VDEV_TYPE_OCB = 6,
3506};
3507
3508enum {
3509 /** P2P device */
3510 VDEV_SUBTYPE_P2PDEV = 0,
3511 /** P2P client */
3512 VDEV_SUBTYPE_P2PCLI,
3513 /** P2P GO */
3514 VDEV_SUBTYPE_P2PGO,
3515 /** BT3.0 HS */
3516 VDEV_SUBTYPE_BT,
3517};
3518
3519typedef struct {
3520 /** idnore power , only use flags , mode and freq */
3521 wmi_channel chan;
3522} wmi_pdev_set_channel_cmd;
3523
3524typedef enum {
3525 WMI_PKTLOG_EVENT_RX = 0x1,
3526 WMI_PKTLOG_EVENT_TX = 0x2,
3527 WMI_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
3528 WMI_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
3529 /* 0x10 used by deprecated DBG_PRINT */
3530 WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x20, /* To support Smart Antenna */
3531} WMI_PKTLOG_EVENT;
3532
3533typedef struct {
3534 A_UINT32 tlv_header;
3535 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param */
3536 A_UINT32 reserved0;
3537 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3538 WMI_PKTLOG_EVENT evlist;
3539} wmi_pdev_pktlog_enable_cmd_fixed_param;
3540
3541typedef struct {
3542 A_UINT32 tlv_header;
3543 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param */
3544 A_UINT32 reserved0;
3545} wmi_pdev_pktlog_disable_cmd_fixed_param;
3546
3547/** Customize the DSCP (bit) to TID (0-7) mapping for QOS.
3548 * NOTE: This constant cannot be changed without breaking
3549 * WMI Compatibility. */
3550
3551#define WMI_DSCP_MAP_MAX (64)
3552/*
3553 * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target
3554 * @details
3555 * Create an API for sending the custom DSCP-to-TID map to the target
3556 * If this is a request from the user space or from above the UMAC
3557 * then the best place to implement this is in the umac_if_offload of the OL path.
3558 * Provide a place holder for this API in the ieee80211com (ic).
3559 *
3560 * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping
3561 * in the target should be directed to the function pointer in the ic.
3562 *
3563 * Implementation details of the API to send the map to the target are as described-
3564 *
3565 * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map.
3566 * DSCP-to-TID map is a one dimensional uint32_t array of length 64 to accomodate
3567 * 64 TID values for 2^6 (64) DSCP ids.
3568 * Example:
3569 * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = {
3570 * 0, 0, 0, 0, 0, 0, 0, 0,
3571 * 1, 1, 1, 1, 1, 1, 1, 1,
3572 * 2, 2, 2, 2, 2, 2, 2, 2,
3573 * 3, 3, 3, 3, 3, 3, 3, 3,
3574 * 4, 4, 4, 4, 4, 4, 4, 4,
3575 * 5, 5, 5, 5, 5, 5, 5, 5,
3576 * 6, 6, 6, 6, 6, 6, 6, 6,
3577 * 7, 7, 7, 7, 7, 7, 7, 7,
3578 * };
3579 *
3580 * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map.
3581 *
3582 * 3. Copy the DSCP-to-TID map into the WMI buffer.
3583 *
3584 * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the
3585 * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API
3586 * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and
3587 * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id.
3588 *
3589 */
3590typedef struct {
3591 A_UINT32 tlv_header;
3592 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */
3593 A_UINT32 reserved0;
3594 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3595 /* map indicating DSCP to TID conversion */
3596 A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
3597} wmi_pdev_set_dscp_tid_map_cmd_fixed_param;
3598
Govind Singhc7d51942016-02-01 12:09:31 +05303599typedef struct {
3600 A_UINT32 tlv_header;
3601 /*
3602 * TLV tag and len; tag equals
3603 * WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param
3604 */
3605 A_UINT32 vdev_id;
3606 /** map indicating DSCP to TID conversion */
3607 A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
3608} wmi_vdev_set_dscp_tid_map_cmd_fixed_param;
3609
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003610/** Fixed rate (rate-code) for broadcast/ multicast data frames */
3611/* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames
3612 * @details
3613 * Create an API for setting the custom rate for the MCAST and BCAST frames
3614 * in the target. If this is a request from the user space or from above the UMAC
3615 * then the best place to implement this is in the umac_if_offload of the OL path.
3616 * Provide a place holder for this API in the ieee80211com (ic).
3617 *
3618 * Implementation details of the API to set custom rates for MCAST and BCAST in
3619 * the target are as described-
3620 *
3621 * 1. The function will have 3 arguments-
3622 * vap structure,
3623 * MCAST/ BCAST identifier code,
3624 * 8 bit rate code
3625 *
3626 * The rate-code is a 1-byte field in which:for given rate, nss and preamble
3627 * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
3628 * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
3629 * b'3-b'0 indicate the rate, which is indicated as follows:
3630 * OFDM : 0: OFDM 48 Mbps
3631 * 1: OFDM 24 Mbps
3632 * 2: OFDM 12 Mbps
3633 * 3: OFDM 6 Mbps
3634 * 4: OFDM 54 Mbps
3635 * 5: OFDM 36 Mbps
3636 * 6: OFDM 18 Mbps
3637 * 7: OFDM 9 Mbps
3638 * CCK (pream == 1)
3639 * 0: CCK 11 Mbps Long
3640 * 1: CCK 5.5 Mbps Long
3641 * 2: CCK 2 Mbps Long
3642 * 3: CCK 1 Mbps Long
3643 * 4: CCK 11 Mbps Short
3644 * 5: CCK 5.5 Mbps Short
3645 * 6: CCK 2 Mbps Short
3646 * HT/VHT (pream == 2/3)
3647 * 0..7: MCS0..MCS7 (HT)
3648 * 0..9: MCS0..MCS9 (VHT)
3649 *
3650 * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value
3651 * to the target.
3652 * Arguments to the API are-
3653 * wmi handle,
3654 * VAP interface id (av_if_id) defined in ol_ath_vap_net80211,
3655 * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE,
3656 * rate value.
3657 */
3658typedef enum {
3659 WMI_SET_MCAST_RATE,
3660 WMI_SET_BCAST_RATE
3661} MCAST_BCAST_RATE_ID;
3662
3663typedef struct {
3664 MCAST_BCAST_RATE_ID rate_id;
3665 A_UINT32 rate;
3666} mcast_bcast_rate;
3667
3668typedef struct {
3669 A_UINT32 tlv_header;
3670 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */
3671 A_UINT32 cwmin;
3672 A_UINT32 cwmax;
3673 A_UINT32 aifs;
3674 A_UINT32 txoplimit;
3675 A_UINT32 acm;
3676 A_UINT32 no_ack;
3677} wmi_wmm_params;
3678
3679typedef struct {
3680 A_UINT32 tlv_header;
3681 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
3682 A_UINT32 reserved0;
3683 /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
3684 A_UINT32 dg_type;
3685
3686 /* The TLVs for the 4 AC follows:
3687 * wmi_wmm_params wmm_params_ac_be;
3688 * wmi_wmm_params wmm_params_ac_bk;
3689 * wmi_wmm_params wmm_params_ac_vi;
3690 * wmi_wmm_params wmm_params_ac_vo;
3691 */
3692} wmi_pdev_set_wmm_params_cmd_fixed_param;
3693
3694typedef enum {
3695 WMI_REQUEST_PEER_STAT = 0x01,
3696 WMI_REQUEST_AP_STAT = 0x02,
3697 WMI_REQUEST_PDEV_STAT = 0x04,
3698 WMI_REQUEST_VDEV_STAT = 0x08,
3699 WMI_REQUEST_BCNFLT_STAT = 0x10,
3700 WMI_REQUEST_VDEV_RATE_STAT = 0x20,
3701} wmi_stats_id;
3702
3703typedef struct {
3704 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */
3705 wmi_stats_id stats_id;
3706 /** unique id identifying the VDEV, generated by the caller */
3707 A_UINT32 vdev_id;
3708 /** peer MAC address */
3709 wmi_mac_addr peer_macaddr;
3710} wmi_request_stats_cmd_fixed_param;
3711
3712/* stats type bitmap */
3713#define WMI_LINK_STATS_RADIO 0x00000001
3714#define WMI_LINK_STATS_IFACE 0x00000002
3715#define WMI_LINK_STATS_ALL_PEER 0x00000004
3716#define WMI_LINK_STATS_PER_PEER 0x00000008
3717
3718/* wifi clear statistics bitmap */
3719#define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */
3720#define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */
3721#define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */
3722#define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */
3723#define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */
3724#define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */
3725#define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */
3726#define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */
3727#define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */
3728#define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */
3729
3730/** Default value for stats if the stats collection has not started */
3731#define WMI_STATS_VALUE_INVALID 0xffffffff
3732
3733#define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16)
3734#define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value)
3735#define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1)
3736#define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value)
3737#define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
3738#define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
3739
3740typedef struct {
3741 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */
3742 A_UINT32 num_of_diag_events_logs;
3743/* The TLVs will follow.
3744 * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
3745 * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
3746 * Bit 17 Indicate if the DIAG type is Enabled/Disabled.
3747 */
3748} wmi_diag_event_log_config_fixed_param;
3749
3750#define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1)
3751#define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value)
3752#define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1)
3753#define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value)
3754
3755typedef struct {
3756 A_UINT32 tlv_header;
3757 A_UINT32 num_of_diag_events_logs;
3758/* The TLVs will follow.
3759 * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID,
3760 * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG
3761 * Bit 17 - Frequncy of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0
3762 * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework
3763 */
3764} wmi_diag_event_log_supported_event_fixed_params;
3765
3766typedef struct {
3767 /**
3768 * TLV tag and len; tag equals
3769 * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param
3770 */
3771 A_UINT32 tlv_header;
3772 /** placeholder for future */
3773 A_UINT32 reserved0;
3774} wmi_debug_mesg_flush_fixed_param;
3775
3776typedef struct {
3777 /**
3778 * TLV tag and len; tag equals
3779 * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param
3780 */
3781 A_UINT32 tlv_header;
3782 /** placeholder for future */
3783 A_UINT32 reserved0;
3784} wmi_debug_mesg_flush_complete_fixed_param;
3785
3786
3787typedef struct {
3788 /*
3789 * TLV tag and len; tag equals
3790 * WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param
3791 * vdev_id, where RSSI breach event occurred
3792 */
3793 A_UINT32 tlv_header;
3794 A_UINT32 vdev_id;
3795 /* request id */
3796 A_UINT32 request_id;
3797 /*
3798 * bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is
3799 * corresponding to hi_rssi[0-2]
3800 */
3801 A_UINT32 event_bitmap;
3802 /* rssi at the time of RSSI breach. Unit dBm */
3803 A_UINT32 rssi;
3804 /* bssid of the monitored AP's */
3805 wmi_mac_addr bssid;
3806} wmi_rssi_breach_event_fixed_param;
3807
3808
3809typedef struct {
3810 /** TLV tag and len; tag equals
3811 * WMITLV_TAG_STRUC_wmi_fw_mem_dump */
3812 A_UINT32 tlv_header;
3813 /** unique id identifying the segment */
3814 A_UINT32 seg_id;
3815 /** Start address of the segment to be read */
3816 A_UINT32 seg_start_addr_lo;
3817 A_UINT32 seg_start_addr_hi;
3818 /** Length of the segment to be read */
3819 A_UINT32 seg_length;
3820 /** Host bufeer address to which the segment will be read and dumped */
3821 A_UINT32 dest_addr_lo;
3822 A_UINT32 dest_addr_hi;
3823} wmi_fw_mem_dump;
3824
3825/* Command to get firmware memory dump*/
3826typedef struct {
3827 /** TLV tag and len; tag equals
3828 * WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */
3829 A_UINT32 tlv_header;
3830 /** unique id identifying the request */
3831 A_UINT32 request_id;
3832 /** number of memory dump segments */
3833 A_UINT32 num_fw_mem_dump_segs;
3834 /**
3835 * This TLV is followed by another TLV
3836 * wmi_fw_mem_dump fw_mem_dump[];
3837 */
3838} wmi_get_fw_mem_dump_fixed_param;
3839
3840/** Event to indicate the completion of fw mem dump */
3841typedef struct {
3842 /* TLV tag and len; tag equals
3843 * WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */
3844 A_UINT32 tlv_header;
3845 /** unique id identifying the request, given
3846 * in the request stats command */
3847 A_UINT32 request_id;
3848 /*In case of Firmware memory dump */
3849 A_UINT32 fw_mem_dump_complete;
3850} wmi_update_fw_mem_dump_fixed_param;
3851
3852typedef enum {
3853 WMI_ROAMING_IDLE = 0,
3854 WMI_ROAMING_ACTIVE = 1,
3855} wmi_roam_state;
3856
3857/* access categories */
3858typedef enum {
3859 WMI_AC_VO = 0,
3860 WMI_AC_VI = 1,
3861 WMI_AC_BE = 2,
3862 WMI_AC_BK = 3,
3863 WMI_AC_MAX = 4,
3864} wmi_traffic_ac;
3865
3866typedef enum {
3867 WMI_STA_STATS = 0,
3868 WMI_SOFTAP_STATS = 1,
3869 WMI_IBSS_STATS = 2,
3870 WMI_P2P_CLIENT_STATS = 3,
3871 WMI_P2P_GO_STATS = 4,
3872 WMI_NAN_STATS = 5,
3873 WMI_MESH_STATS = 6,
3874} wmi_link_iface_type;
3875
3876/* channel operating width */
3877typedef enum {
3878 WMI_CHAN_WIDTH_20 = 0,
3879 WMI_CHAN_WIDTH_40 = 1,
3880 WMI_CHAN_WIDTH_80 = 2,
3881 WMI_CHAN_WIDTH_160 = 3,
3882 WMI_CHAN_WIDTH_80P80 = 4,
3883 WMI_CHAN_WIDTH_5 = 5,
3884 WMI_CHAN_WIDTH_10 = 6,
3885} wmi_channel_width;
3886
3887/*Clear stats*/
3888typedef struct {
3889 A_UINT32 tlv_header;
3890 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */
3891 /** unique id identifying the VDEV, generated by the caller */
3892 A_UINT32 vdev_id;
3893 /** stop_stats_collection_req = 1 will imply stop the statistics collection */
3894 A_UINT32 stop_stats_collection_req;
3895 /** identifies what stats to be cleared */
3896 A_UINT32 stats_clear_req_mask;
3897 /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */
3898 wmi_mac_addr peer_macaddr;
3899} wmi_clear_link_stats_cmd_fixed_param;
3900
3901/* Link Stats configuration params. Trigger the link layer statistics collection*/
3902typedef struct {
3903 A_UINT32 tlv_header;
3904 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */
3905 /** threshold to classify the pkts as short or long */
3906 A_UINT32 mpdu_size_threshold;
3907 /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/
3908 A_UINT32 aggressive_statistics_gathering;
3909} wmi_start_link_stats_cmd_fixed_param;
3910
3911typedef struct {
3912 A_UINT32 tlv_header;
3913 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */
3914 /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */
3915 A_UINT32 stats_type;
3916 /** unique id identifying the VDEV, generated by the caller */
3917 A_UINT32 vdev_id;
3918 /** unique id identifying the request, generated by the caller */
3919 A_UINT32 request_id;
3920 /** peer MAC address */
3921 wmi_mac_addr peer_macaddr;
3922} wmi_request_link_stats_cmd_fixed_param;
3923
3924/* channel statistics */
3925typedef struct {
3926 A_UINT32 tlv_header;
3927 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */
3928 /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/
3929 A_UINT32 channel_width;
3930 /** Primary 20 MHz channel */
3931 A_UINT32 center_freq;
3932 /** center frequency (MHz) first segment */
3933 A_UINT32 center_freq0;
3934 /** center frequency (MHz) second segment */
3935 A_UINT32 center_freq1;
3936 /** msecs the radio is awake (32 bits number accruing over time) */
3937 A_UINT32 radio_awake_time;
3938 /** msecs the CCA register is busy (32 bits number accruing over time) */
3939 A_UINT32 cca_busy_time;
3940} wmi_channel_stats;
3941
3942/* radio statistics */
3943typedef struct {
3944 A_UINT32 tlv_header;
3945 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */
3946 /** Wifi radio (if multiple radio supported) */
3947 A_UINT32 radio_id;
3948 /** msecs the radio is awake (32 bits number accruing over time) */
3949 A_UINT32 on_time;
3950 /** msecs the radio is transmitting (32 bits number accruing over time) */
3951 A_UINT32 tx_time;
3952 /** msecs the radio is in active receive (32 bits number accruing over time) */
3953 A_UINT32 rx_time;
3954 /** msecs the radio is awake due to all scan (32 bits number accruing over time) */
3955 A_UINT32 on_time_scan;
3956 /** msecs the radio is awake due to NAN (32 bits number accruing over time) */
3957 A_UINT32 on_time_nbd;
3958 /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */
3959 A_UINT32 on_time_gscan;
3960 /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */
3961 A_UINT32 on_time_roam_scan;
3962 /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */
3963 A_UINT32 on_time_pno_scan;
3964 /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */
3965 A_UINT32 on_time_hs20;
3966 /** number of channels */
3967 A_UINT32 num_channels;
3968} wmi_radio_link_stats;
3969
3970/** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */
3971typedef struct {
3972 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
3973 /** unique id identifying the request, given in the request stats command */
3974 A_UINT32 request_id;
3975 /** Number of radios*/
3976 A_UINT32 num_radio;
3977 /** more_data will be set depending on the number of radios */
3978 A_UINT32 more_radio_events;
3979/*
3980 * This TLV is followed by another TLV of array of bytes
3981 * size of(struct wmi_radio_link_stats);
3982 *
3983 * This TLV is followed by another TLV of array of bytes
3984 * num_channels * size of(struct wmi_channel_stats)
3985 */
3986
3987} wmi_radio_link_stats_event_fixed_param;
3988
3989/* per rate statistics */
3990typedef struct {
3991 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */
3992 /** rate information
3993 * The rate-code is a 1-byte field in which:for given rate, nss and preamble
3994 * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT)
3995 * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3)
3996 * b'3-b'0 indicate the rate, which is indicated as follows:
3997 * OFDM : 0: OFDM 48 Mbps
3998 * 1: OFDM 24 Mbps
3999 * 2: OFDM 12 Mbps
4000 * 3: OFDM 6 Mbps
4001 * 4: OFDM 54 Mbps
4002 * 5: OFDM 36 Mbps
4003 * 6: OFDM 18 Mbps
4004 * 7: OFDM 9 Mbps
4005 * CCK (pream == 1)
4006 * 0: CCK 11 Mbps Long
4007 * 1: CCK 5.5 Mbps Long
4008 * 2: CCK 2 Mbps Long
4009 * 3: CCK 1 Mbps Long
4010 * 4: CCK 11 Mbps Short
4011 * 5: CCK 5.5 Mbps Short
4012 * 6: CCK 2 Mbps Short
4013 * HT/VHT (pream == 2/3)
4014 * 0..7: MCS0..MCS7 (HT)
4015 * 0..9: MCS0..MCS9 (VHT)
4016 */
4017 A_UINT32 rate;
4018 /** units of 100 Kbps */
4019 A_UINT32 bitrate;
4020 /** number of successfully transmitted data pkts (ACK rcvd) */
4021 A_UINT32 tx_mpdu;
4022 /** number of received data pkts */
4023 A_UINT32 rx_mpdu;
4024 /** number of data packet losses (no ACK) */
4025 A_UINT32 mpdu_lost;
4026 /** total number of data pkt retries */
4027 A_UINT32 retries;
4028 /** number of short data pkt retries */
4029 A_UINT32 retries_short;
4030 /** number of long data pkt retries */
4031 A_UINT32 retries_long;
4032} wmi_rate_stats;
4033
4034typedef struct {
4035 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */
4036 /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/
4037 A_UINT32 peer_type;
4038 /** mac address */
4039 wmi_mac_addr peer_mac_address;
4040 /** peer wmi_CAPABILITY_XXX */
4041 A_UINT32 capabilities;
4042 /** number of rates */
4043 A_UINT32 num_rates;
4044} wmi_peer_link_stats;
4045
4046/** PEER statistics (once started) reset and start afresh after each connection */
4047typedef struct {
4048 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */
4049 /** unique id identifying the request, given in the request stats command */
4050 A_UINT32 request_id;
4051 /** number of peers accomidated in this particular event */
4052 A_UINT32 num_peers;
4053 /** Indicates the fragment number */
4054 A_UINT32 peer_event_number;
4055 /** Indicates if there are more peers which will be sent as seperate peer_stats event */
4056 A_UINT32 more_data;
4057
4058/**
4059 * This TLV is followed by another TLV
4060 * num_peers * size of(struct wmi_peer_stats)
4061 * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers.
4062 */
4063} wmi_peer_stats_event_fixed_param;
4064
4065/* per access category statistics */
4066typedef struct {
4067 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */
4068 /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/
4069 A_UINT32 ac_type;
4070 /** number of successfully transmitted unicast data pkts (ACK rcvd) */
4071 A_UINT32 tx_mpdu;
4072 /** number of received unicast mpdus */
4073 A_UINT32 rx_mpdu;
4074 /** number of succesfully transmitted multicast data packets */
4075 /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */
4076 A_UINT32 tx_mcast;
4077 /** number of received multicast data packets */
4078 A_UINT32 rx_mcast;
4079 /** number of received unicast a-mpdus */
4080 A_UINT32 rx_ampdu;
4081 /** number of transmitted unicast a-mpdus */
4082 A_UINT32 tx_ampdu;
4083 /** number of data pkt losses (no ACK) */
4084 A_UINT32 mpdu_lost;
4085 /** total number of data pkt retries */
4086 A_UINT32 retries;
4087 /** number of short data pkt retries */
4088 A_UINT32 retries_short;
4089 /** number of long data pkt retries */
4090 A_UINT32 retries_long;
4091 /** data pkt min contention time (usecs) */
4092 A_UINT32 contention_time_min;
4093 /** data pkt max contention time (usecs) */
4094 A_UINT32 contention_time_max;
4095 /** data pkt avg contention time (usecs) */
4096 A_UINT32 contention_time_avg;
4097 /** num of data pkts used for contention statistics */
4098 A_UINT32 contention_num_samples;
4099} wmi_wmm_ac_stats;
4100
4101/* interface statistics */
4102typedef struct {
4103 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */
4104 /** access point beacon received count from connected AP */
4105 A_UINT32 beacon_rx;
4106 /** access point mgmt frames received count from connected AP (including Beacon) */
4107 A_UINT32 mgmt_rx;
4108 /** action frames received count */
4109 A_UINT32 mgmt_action_rx;
4110 /** action frames transmit count */
4111 A_UINT32 mgmt_action_tx;
4112 /** access Point Beacon and Management frames RSSI (averaged) */
4113 A_UINT32 rssi_mgmt;
4114 /** access Point Data Frames RSSI (averaged) from connected AP */
4115 A_UINT32 rssi_data;
4116 /** access Point ACK RSSI (averaged) from connected AP */
4117 A_UINT32 rssi_ack;
4118 /** number of peers */
4119 A_UINT32 num_peers;
4120 /** Indicates how many peer_stats events will be sent depending on the num_peers. */
4121 A_UINT32 num_peer_events;
4122 /** number of ac */
4123 A_UINT32 num_ac;
4124 /** Roaming Stat */
4125 A_UINT32 roam_state;
4126 /**
4127 * Average Beacon spread offset is the averaged time delay between TBTT
4128 * and beacon TSF */
4129 /** Upper 32 bits of averaged 64 bit beacon spread offset */
4130 A_UINT32 avg_bcn_spread_offset_high;
4131 /** Lower 32 bits of averaged 64 bit beacon spread offset */
4132 A_UINT32 avg_bcn_spread_offset_low;
4133 /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */
4134 A_UINT32 is_leaky_ap;
4135 /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */
4136 A_UINT32 avg_rx_frms_leaked;
4137 /** Rx leak watch window currently in force to minimize data loss
4138 * because of leaky AP. Rx leak window is the
4139 * time driver waits before shutting down the radio or switching the
4140 * channel and after receiving an ACK for
4141 * a data frame with PM bit set) */
4142 A_UINT32 rx_leak_window;
4143} wmi_iface_link_stats;
4144
4145/** Interface statistics (once started) reset and start afresh after each connection */
4146typedef struct {
4147 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */
4148 /** unique id identifying the request, given in the request stats command */
4149 A_UINT32 request_id;
4150 /** unique id identifying the VDEV, generated by the caller */
4151 A_UINT32 vdev_id;
4152/*
4153 * This TLV is followed by another TLV
4154 * wmi_iface_link_stats iface_link_stats;
4155 * num_ac * size of(struct wmi_wmm_ac_stats)
4156 */
4157} wmi_iface_link_stats_event_fixed_param;
4158
4159/** Suspend option */
4160enum {
4161 WMI_PDEV_SUSPEND, /* suspend */
4162 WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */
4163};
4164
4165typedef struct {
4166 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */
4167 /* suspend option sent to target */
4168 A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
4169 A_UINT32 suspend_opt;
4170} wmi_pdev_suspend_cmd_fixed_param;
4171
4172typedef struct {
4173 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param */
4174 /** Reserved for future use */
4175 A_UINT32 reserved0;
4176} wmi_pdev_resume_cmd_fixed_param;
4177
4178typedef struct {
4179 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */
4180 A_UINT32 num_vdev_stats; /* number of vdevs */
4181} wmi_vdev_rate_stats_event_fixed_param;
4182
4183typedef struct {
4184 A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info */
4185 A_UINT32 vdevid; /* Id of the wlan vdev */
4186 A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted */
4187 A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above */
4188 A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */
4189 A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */
4190} wmi_vdev_rate_ht_info;
4191
4192typedef struct {
4193 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */
4194 wmi_stats_id stats_id;
4195 /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */
4196 A_UINT32 num_pdev_stats;
4197 /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */
4198 A_UINT32 num_vdev_stats;
4199 /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */
4200 A_UINT32 num_peer_stats;
4201 A_UINT32 num_bcnflt_stats;
4202 /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */
4203 A_UINT32 num_chan_stats;
4204 /* This TLV is followed by another TLV of array of bytes
4205 * A_UINT8 data[];
4206 * This data array contains
4207 * num_pdev_stats * size of(struct wmi_pdev_stats)
4208 * num_vdev_stats * size of(struct wmi_vdev_stats)
4209 * num_peer_stats * size of(struct wmi_peer_stats)
4210 * num_bcnflt_stats * size_of()
4211 * num_chan_stats * size of(struct wmi_chan_stats)
4212 *
4213 */
4214} wmi_stats_event_fixed_param;
4215
4216/**
4217 * PDEV statistics
4218 * @todo
4219 * add all PDEV stats here
4220 */
4221typedef struct {
4222 /** Channel noise floor */
4223 A_INT32 chan_nf;
4224 /** TX frame count */
4225 A_UINT32 tx_frame_count;
4226 /** RX frame count */
4227 A_UINT32 rx_frame_count;
4228 /** rx clear count */
4229 A_UINT32 rx_clear_count;
4230 /** cycle count */
4231 A_UINT32 cycle_count;
4232 /** Phy error count */
4233 A_UINT32 phy_err_count;
4234 /** Channel Tx Power */
4235 A_UINT32 chan_tx_pwr;
4236 /** WAL dbg stats */
4237 struct wlan_dbg_stats pdev_stats;
4238
4239} wmi_pdev_stats;
4240
4241/**
4242 * VDEV statistics
4243 * @todo
4244 * add all VDEV stats here
4245 */
4246
4247typedef struct {
4248 A_INT32 bcn_snr;
4249 A_INT32 dat_snr;
4250} wmi_snr_info;
4251
4252typedef struct {
4253 /** unique id identifying the VDEV, generated by the caller */
4254 A_UINT32 vdev_id;
4255 wmi_snr_info vdev_snr;
4256 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) */
4257 A_UINT32 rx_frm_cnt; /* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast) */
4258 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 +05304259 that the 802.11 station successfully transmitted after more than one retransmission attempt */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004260 A_UINT32 fail_cnt[WLAN_MAX_AC]; /*Total number packets(per AC) failed to transmit */
4261 A_UINT32 rts_fail_cnt; /*Total number of RTS/CTS sequence failures for transmission of a packet */
4262 A_UINT32 rts_succ_cnt; /*Total number of RTS/CTS sequence success for transmission of a packet */
4263 A_UINT32 rx_err_cnt; /*The receive error count. HAL will provide the RxP FCS error global */
4264 A_UINT32 rx_discard_cnt; /* The sum of the receive error count and dropped-receive-buffer error count. (FCS error) */
4265 A_UINT32 ack_fail_cnt; /*Total number packets failed transmit because of no ACK from the remote entity */
4266 A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES]; /*History of last ten transmit rate, in units of 500 kbit/sec */
4267 A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES]; /*History of last ten Beacon rssi of the connected Bss */
4268} wmi_vdev_stats;
4269
4270/**
4271 * peer statistics.
4272 *
4273 * @todo
4274 * add more stats
4275 *
4276 */
4277typedef struct {
4278 /** peer MAC address */
4279 wmi_mac_addr peer_macaddr;
4280 /** rssi */
4281 A_UINT32 peer_rssi;
4282 /** last tx data rate used for peer */
4283 A_UINT32 peer_tx_rate;
4284 /** last rx data rate used for peer */
4285 A_UINT32 peer_rx_rate;
4286} wmi_peer_stats;
4287
4288typedef struct {
4289 /** Primary channel freq of the channel for which stats are sent */
4290 A_UINT32 chan_mhz;
4291 /** Time spent on the channel */
4292 A_UINT32 sampling_period_us;
4293 /** Aggregate duration over a sampling period for which channel activity was observed */
4294 A_UINT32 rx_clear_count;
4295 /** Accumalation of the TX PPDU duration over a sampling period */
4296 A_UINT32 tx_duration_us;
4297 /** Accumalation of the RX PPDU duration over a sampling period */
4298 A_UINT32 rx_duration_us;
4299} wmi_chan_stats;
4300
4301typedef struct {
4302 A_UINT32 tlv_header;
4303 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
4304 /** unique id identifying the VDEV, generated by the caller */
4305 A_UINT32 vdev_id;
4306 /** VDEV type (AP,STA,IBSS,MONITOR) */
4307 A_UINT32 vdev_type;
4308 /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0)*/
4309 A_UINT32 vdev_subtype;
4310 /** VDEV MAC address */
4311 wmi_mac_addr vdev_macaddr;
4312 /* Number of configured txrx streams */
4313 A_UINT32 num_cfg_txrx_streams;
4314 /*
4315 * This TLV is followed by another TLV of array of structures
4316 * wmi_vdev_txrx_streams cfg_txrx_streams[];
4317 */
4318} wmi_vdev_create_cmd_fixed_param;
4319
4320typedef struct {
4321 /*
4322 * TLV tag and len; tag equals
4323 * WMITLV_TAG_STRUC_wmi_vdev_txrx_streams
4324 */
4325 A_UINT32 tlv_header;
4326 /* band - Should take values from wmi_channel_band_mask */
4327 A_UINT32 band;
4328 /* max supported tx streams per given band for this vdev */
4329 A_UINT32 supported_tx_streams;
4330 /* max supported rx streams per given band for this vdev */
4331 A_UINT32 supported_rx_streams;
4332} wmi_vdev_txrx_streams;
4333
4334/* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */
4335typedef struct {
4336 A_UINT32 tlv_header;
4337 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */
4338 A_UINT32 type_count;
4339 /** 255: continuous schedule, 0: reserved */
4340 A_UINT32 duration;
4341 /** Absent period duration in micro seconds */
4342 A_UINT32 interval;
4343 /** Absent period interval in micro seconds */
4344 A_UINT32 start_time;
4345 /** 32 bit tsf time when in starts */
4346} wmi_p2p_noa_descriptor;
4347
4348/** values for vdev_type */
4349#define WMI_VDEV_TYPE_AP 0x1
4350#define WMI_VDEV_TYPE_STA 0x2
4351#define WMI_VDEV_TYPE_IBSS 0x3
4352#define WMI_VDEV_TYPE_MONITOR 0x4
4353
4354/** VDEV type is for social wifi interface.This VDEV is Currently mainly needed
4355 * by FW to execute the NAN specific WMI commands and also implement NAN specific
4356 * operations like Network discovery, service provisioning and service
4357 * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create
4358 * WMI command to create this VDEV once during initialization and host is not
4359 * expected to use any VDEV specific WMI commands on this VDEV.
4360 **/
4361#define WMI_VDEV_TYPE_NAN 0x5
4362
4363#define WMI_VDEV_TYPE_OCB 0x6
4364
4365/** values for vdev_subtype */
4366#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1
4367#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2
4368#define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3
4369
4370/** values for vdev_start_request flags */
4371/** Indicates that AP VDEV uses hidden ssid. only valid for
4372 * AP/GO */
4373#define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0)
4374/** Indicates if robust management frame/management frame
4375 * protection is enabled. For GO/AP vdevs, it indicates that
4376 * it may support station/client associations with RMF enabled.
4377 * For STA/client vdevs, it indicates that sta will
4378 * associate with AP with RMF enabled. */
4379#define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1)
4380
4381/*
4382 * Host is sending bcn_tx_rate to override the beacon tx rates.
4383 */
4384#define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2)
4385
4386typedef struct {
4387 A_UINT32 tlv_header;
4388 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */
4389 /** unique id identifying the VDEV, generated by the caller */
4390 A_UINT32 vdev_id;
4391 /** requestor id identifying the caller module */
4392 A_UINT32 requestor_id;
4393 /** beacon interval from received beacon */
4394 A_UINT32 beacon_interval;
4395 /** DTIM Period from the received beacon */
4396 A_UINT32 dtim_period;
4397 /** Flags */
4398 A_UINT32 flags;
4399 /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
4400 wmi_ssid ssid;
4401 /** beacon/probe reponse xmit rate. Applicable for SoftAP. */
4402 /** This field will be invalid and ignored unless the */
4403 /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */
4404 /** When valid, this field contains the fixed tx rate for the beacon */
4405 /** and probe response frames send by the GO or SoftAP */
4406 A_UINT32 bcn_tx_rate;
4407 /** beacon/probe reponse xmit power. Applicable for SoftAP. */
4408 A_UINT32 bcn_txPower;
4409 /** number of p2p NOA descriptor(s) from scan entry */
4410 A_UINT32 num_noa_descriptors;
4411 /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
4412 During CAC, Our HW shouldn't ack ditected frames */
4413 A_UINT32 disable_hw_ack;
4414 /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
4415 /** The DBS policy manager indicates the preferred number of transmit streams. */
4416 A_UINT32 preferred_tx_streams;
4417 /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */
4418 /** the DBS policy manager indicates the preferred number of receive streams. */
4419 A_UINT32 preferred_rx_streams;
4420 /* The TLVs follows this structure:
4421 * wmi_channel chan; //WMI channel
4422 * wmi_p2p_noa_descriptor noa_descriptors[]; //actual p2p NOA descriptor from scan entry
4423 */
4424} wmi_vdev_start_request_cmd_fixed_param;
4425
4426typedef struct {
4427 A_UINT32 tlv_header;
4428 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */
4429 /** unique id identifying the VDEV, generated by the caller */
4430 A_UINT32 vdev_id;
4431} wmi_vdev_delete_cmd_fixed_param;
4432
4433typedef struct {
4434 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */
4435 /** unique id identifying the VDEV, generated by the caller */
4436 A_UINT32 vdev_id;
4437 /** aid (assoc id) received in association response for STA VDEV */
4438 A_UINT32 vdev_assoc_id;
4439 /** bssid of the BSS the VDEV is joining */
4440 wmi_mac_addr vdev_bssid;
4441} wmi_vdev_up_cmd_fixed_param;
4442
4443typedef struct {
4444 A_UINT32 tlv_header;
4445 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */
4446 /** unique id identifying the VDEV, generated by the caller */
4447 A_UINT32 vdev_id;
4448} wmi_vdev_stop_cmd_fixed_param;
4449
4450typedef struct {
4451 A_UINT32 tlv_header;
4452 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */
4453 /** unique id identifying the VDEV, generated by the caller */
4454 A_UINT32 vdev_id;
4455} wmi_vdev_down_cmd_fixed_param;
4456
4457typedef struct {
4458 /** unique id identifying the VDEV, generated by the caller */
4459 A_UINT32 vdev_id;
4460} wmi_vdev_standby_response_cmd;
4461
4462typedef struct {
4463 /** unique id identifying the VDEV, generated by the caller */
4464 A_UINT32 vdev_id;
4465} wmi_vdev_resume_response_cmd;
4466
4467typedef struct {
4468 A_UINT32 tlv_header;
4469 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */
4470 /** unique id identifying the VDEV, generated by the caller */
4471 A_UINT32 vdev_id;
4472 /** parameter id */
4473 A_UINT32 param_id;
4474 /** parameter value */
4475 A_UINT32 param_value;
4476} wmi_vdev_set_param_cmd_fixed_param;
4477
4478typedef struct {
4479 A_UINT32 key_seq_counter_l;
4480 A_UINT32 key_seq_counter_h;
4481} wmi_key_seq_counter;
4482
4483#define WMI_CIPHER_NONE 0x0 /* clear key */
4484#define WMI_CIPHER_WEP 0x1
4485#define WMI_CIPHER_TKIP 0x2
4486#define WMI_CIPHER_AES_OCB 0x3
4487#define WMI_CIPHER_AES_CCM 0x4
4488#define WMI_CIPHER_WAPI 0x5
4489#define WMI_CIPHER_CKIP 0x6
4490#define WMI_CIPHER_AES_CMAC 0x7
4491#define WMI_CIPHER_ANY 0x8
4492
4493typedef struct {
4494 A_UINT32 tlv_header;
4495 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */
4496 /** unique id identifying the VDEV, generated by the caller */
4497 A_UINT32 vdev_id;
4498 /** MAC address used for installing */
4499 wmi_mac_addr peer_macaddr;
4500 /** key index */
4501 A_UINT32 key_ix;
4502 /** key flags */
4503 A_UINT32 key_flags;
4504 /** key cipher, defined above */
4505 A_UINT32 key_cipher;
4506 /** key rsc counter */
4507 wmi_key_seq_counter key_rsc_counter;
4508 /** global key rsc counter */
4509 wmi_key_seq_counter key_global_rsc_counter;
4510 /** global key tsc counter */
4511 wmi_key_seq_counter key_tsc_counter;
4512 /** WAPI key rsc counter */
4513 A_UINT8 wpi_key_rsc_counter[16];
4514 /** WAPI key tsc counter */
4515 A_UINT8 wpi_key_tsc_counter[16];
4516 /** key length */
4517 A_UINT32 key_len;
4518 /** key tx mic length */
4519 A_UINT32 key_txmic_len;
4520 /** key rx mic length */
4521 A_UINT32 key_rxmic_len;
4522 /*
4523 * Following this struct are this TLV.
4524 * // actual key data
4525 * A_UINT8 key_data[]; // contains key followed by tx mic followed by rx mic
4526 */
4527} wmi_vdev_install_key_cmd_fixed_param;
4528
4529/** Preamble types to be used with VDEV fixed rate configuration */
4530typedef enum {
4531 WMI_RATE_PREAMBLE_OFDM,
4532 WMI_RATE_PREAMBLE_CCK,
4533 WMI_RATE_PREAMBLE_HT,
4534 WMI_RATE_PREAMBLE_VHT,
4535} WMI_RATE_PREAMBLE;
4536
4537/** Value to disable fixed rate setting */
4538#define WMI_FIXED_RATE_NONE (0xff)
4539
4540/** the definition of different VDEV parameters */
4541typedef enum {
4542 /** RTS Threshold */
4543 WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
4544 /** Fragmentation threshold */
4545 WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
4546 /** beacon interval in TUs */
4547 WMI_VDEV_PARAM_BEACON_INTERVAL,
4548 /** Listen interval in TUs */
4549 WMI_VDEV_PARAM_LISTEN_INTERVAL,
4550 /** muticast rate in Mbps */
4551 WMI_VDEV_PARAM_MULTICAST_RATE,
4552 /** management frame rate in Mbps */
4553 WMI_VDEV_PARAM_MGMT_TX_RATE,
4554 /** slot time (long vs short) */
4555 WMI_VDEV_PARAM_SLOT_TIME,
4556 /** preamble (long vs short) */
4557 WMI_VDEV_PARAM_PREAMBLE,
4558 /** SWBA time (time before tbtt in msec) */
4559 WMI_VDEV_PARAM_SWBA_TIME,
4560 /** time period for updating VDEV stats */
4561 WMI_VDEV_STATS_UPDATE_PERIOD,
4562 /** age out time in msec for frames queued for station in power save*/
4563 WMI_VDEV_PWRSAVE_AGEOUT_TIME,
4564 /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */
4565 WMI_VDEV_HOST_SWBA_INTERVAL,
4566 /** DTIM period (specified in units of num beacon intervals) */
4567 WMI_VDEV_PARAM_DTIM_PERIOD,
4568 /** scheduler air time limit for this VDEV. used by off chan scheduler */
4569 WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
4570 /** enable/dsiable WDS for this VDEV */
4571 WMI_VDEV_PARAM_WDS,
4572 /** ATIM Window */
4573 WMI_VDEV_PARAM_ATIM_WINDOW,
4574 /** BMISS max */
4575 WMI_VDEV_PARAM_BMISS_COUNT_MAX,
4576 /** BMISS first time */
4577 WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
4578 /** BMISS final time */
4579 WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
4580 /** WMM enables/disabled */
4581 WMI_VDEV_PARAM_FEATURE_WMM,
4582 /** Channel width */
4583 WMI_VDEV_PARAM_CHWIDTH,
4584 /** Channel Offset */
4585 WMI_VDEV_PARAM_CHEXTOFFSET,
4586 /** Disable HT Protection */
4587 WMI_VDEV_PARAM_DISABLE_HTPROTECTION,
4588 /** Quick STA Kickout */
4589 WMI_VDEV_PARAM_STA_QUICKKICKOUT,
4590 /** Rate to be used with Management frames */
4591 WMI_VDEV_PARAM_MGMT_RATE,
4592 /** Protection Mode */
4593 WMI_VDEV_PARAM_PROTECTION_MODE,
4594 /** Fixed rate setting */
4595 WMI_VDEV_PARAM_FIXED_RATE,
4596 /** Short GI Enable/Disable */
4597 WMI_VDEV_PARAM_SGI,
4598 /** Enable LDPC */
4599 WMI_VDEV_PARAM_LDPC,
4600 /** Enable Tx STBC */
4601 WMI_VDEV_PARAM_TX_STBC,
4602 /** Enable Rx STBC */
4603 WMI_VDEV_PARAM_RX_STBC,
4604 /** Intra BSS forwarding */
4605 WMI_VDEV_PARAM_INTRA_BSS_FWD,
4606 /** Setting Default xmit key for Vdev */
4607 WMI_VDEV_PARAM_DEF_KEYID,
4608 /** NSS width */
4609 WMI_VDEV_PARAM_NSS,
4610 /** Set the custom rate for the broadcast data frames */
4611 WMI_VDEV_PARAM_BCAST_DATA_RATE,
4612 /** Set the custom rate (rate-code) for multicast data frames */
4613 WMI_VDEV_PARAM_MCAST_DATA_RATE,
4614 /** Tx multicast packet indicate Enable/Disable */
4615 WMI_VDEV_PARAM_MCAST_INDICATE,
4616 /** Tx DHCP packet indicate Enable/Disable */
4617 WMI_VDEV_PARAM_DHCP_INDICATE,
4618 /** Enable host inspection of Tx unicast packet to unknown destination */
4619 WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
4620
4621 /* The minimum amount of time AP begins to consider STA inactive */
4622 WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
4623
4624 /* An associated STA is considered inactive when there is no recent TX/RX
4625 * activity and no downlink frames are buffered for it. Once a STA exceeds
4626 * the maximum idle inactive time, the AP will send an 802.11 data-null as
4627 * a keep alive to verify the STA is still associated. If the STA does ACK
4628 * the data-null, or if the data-null is buffered and the STA does not
4629 * retrieve it, the STA will be considered unresponsive (see
4630 * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */
4631 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
4632
4633 /* An associated STA is considered unresponsive if there is no recent
4634 * TX/RX activity and downlink frames are buffered for it. Once a STA
4635 * exceeds the maximum unresponsive time, the AP will send a
4636 * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
4637 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
4638
4639 /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
4640 WMI_VDEV_PARAM_AP_ENABLE_NAWDS,
4641 /** Enable/Disable RTS-CTS */
4642 WMI_VDEV_PARAM_ENABLE_RTSCTS,
4643 /* Enable TXBFee/er */
4644 WMI_VDEV_PARAM_TXBF,
4645
4646 /**Set packet power save */
4647 WMI_VDEV_PARAM_PACKET_POWERSAVE,
4648
4649 /**Drops un-encrypted packets if any received in an encryted connection
4650 * otherwise forwards to host
4651 */
4652 WMI_VDEV_PARAM_DROP_UNENCRY,
4653
4654 /*
4655 * Set TX encap type.
4656 *
4657 * enum wmi_pkt_type is to be used as the parameter
4658 * specifying the encap type.
4659 */
4660 WMI_VDEV_PARAM_TX_ENCAP_TYPE,
4661
4662 /*
4663 * Try to detect stations that woke-up and exited power save but did not
4664 * successfully transmit data-null with PM=0 to AP. When this happens,
4665 * STA and AP power save state are out-of-sync. Use buffered but
4666 * undelivered MSDU to the STA as a hint that the STA is really awake
4667 * and expecting normal ASAP delivery, rather than retrieving BU with
4668 * PS-Poll, U-APSD trigger, etc.
4669 *
4670 * 0 disables out-of-sync detection. Maximum time is 255 seconds.
4671 */
4672 WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,
4673
4674 /* Enable/Disable early rx dynamic adjust feature.
4675 * Early-rx dynamic adjust is a advance power save feature.
4676 * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various
4677 * timing discrepancies in the system.
4678 * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum.
4679 * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed
4680 * properly to minimum the power consume.*/
4681 WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE,
4682
4683 /* set target bmiss number per sample cycle if bmiss adjust was chosen.
4684 * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate
4685 * which can be set by user through WMI command.
4686 */
4687 WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM,
4688
4689 /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */
4690 WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE,
4691
4692 /* set slop_step */
4693 WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP,
4694
4695 /* set init slop */
4696 WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP,
4697
4698 /* pause adjust enable/disable */
4699 WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE,
4700
4701 /* Set channel pwr limit value of the vdev the minimal value of all
4702 * vdevs operating on this channel will be set as channel tx power
4703 * limit, which is used to configure ratearray
4704 */
4705 WMI_VDEV_PARAM_TX_PWRLIMIT,
4706
4707 /* set the count of snr value for calculation in snr monitor */
4708 WMI_VDEV_PARAM_SNR_NUM_FOR_CAL,
4709
4710 /** Roaming offload */
4711 WMI_VDEV_PARAM_ROAM_FW_OFFLOAD,
4712
4713 /** Enable Leader request RX functionality for RMC */
4714 WMI_VDEV_PARAM_ENABLE_RMC,
4715
4716 /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event
4717 * by himself. If the beacon lost time exceed this threshold, the peer is
4718 * thought to be gone. */
4719 WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS,
4720
4721 /** max rate in kpbs, transmit rate can't go beyond it */
4722 WMI_VDEV_PARAM_MAX_RATE,
4723
4724 /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift */
4725 WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE,
4726 /* set Tx failure count threshold for the vdev */
4727 WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR,
4728
4729 /* set ebt resync timeout value, in the unit of TU */
4730 WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT,
4731
4732 /* Enable Aggregation State Trigger Event */
4733 WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE,
4734
4735 /* This parameter indicates whether IBSS station can enter into power save
4736 * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay
4737 * awake all the time and should never set PM=1 in its transmitted frames.
4738 * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH
4739 * is non-zero. */
4740 WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED,
4741
4742 /* This parameter indicates if this station can enter into power collapse
4743 * for the remaining beacon interval after the ATIM window.
4744 * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED
4745 * is set to true. */
4746 WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED,
4747
4748 /* This parameter indicates whether IBSS station exit power save mode and
4749 * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window)
4750 * whenever there is a TX/RX activity. */
4751 WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED,
4752
4753 /* If Awake on TX/RX activity is enabled, this parameter indicates
4754 * the data inactivity time in number of beacon intervals after which
4755 * IBSS station reenters power save by sending Null frame with PM=1. */
4756 WMI_VDEV_PARAM_INACTIVITY_CNT,
4757
4758 /* Inactivity time in msec after which TX Service Period (SP) is
4759 * terminated by sending a Qos Null frame with EOSP.
4760 * If value is 0, TX SP is terminated with the last buffered packet itself
4761 * instead of waiting for the inactivity timeout. */
4762 WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS,
4763
4764 /** DTIM policy */
4765 WMI_VDEV_PARAM_DTIM_POLICY,
4766
4767 /* When IBSS network is initialized, PS-supporting device
4768 * does not enter protocol sleep state during first
4769 * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
4770 WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS,
4771
4772 /* Enable/Disable 1 RX chain usage during the ATIM window */
4773 WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE,
4774 /**
4775 * RX Leak window is the time driver waits before shutting down
4776 * the radio or switching the channel and after receiving an ACK
4777 * for a data frame with PM bit set)
4778 */
4779 WMI_VDEV_PARAM_RX_LEAK_WINDOW,
4780
4781 /**
4782 * Averaging factor(16 bit value) is used in the calculations to
4783 * perform averaging of different link level statistics like average
4784 * beacon spread or average number of frames leaked
4785 */
4786 WMI_VDEV_PARAM_STATS_AVG_FACTOR,
4787 /*
4788 * disconnect threshold, once the consecutive error for specific peer
4789 * exceed this threhold, FW will send kickout event to host
4790 */
4791 WMI_VDEV_PARAM_DISCONNECT_TH,
4792 /*
4793 * The rate_code of RTS_CTS changed by host. Now FW can support
4794 * more non-HT rates rather than 1Mbps or 6Mbps */
4795 WMI_VDEV_PARAM_RTSCTS_RATE,
4796
4797 /** This parameter indicates whether using a long duration RTS-CTS
4798 * protection when a SAP goes off channel in MCC mode */
4799 WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE,
4800
4801 /*
4802 * This parameter indicates whether using a broadcast probe response
4803 * to increase the detectability of SAP in MCC mode
4804 */
4805 WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE,
Nirav Shah47062ff2015-11-05 11:21:08 +05304806
4807 /* This parameter indicates the power backoff in percentage
4808 * currently supports 100%, 50%, 25%, 12.5%, and minimum
4809 * Host passes 0, 1, 2, 3, 4 to Firmware
4810 * 0 --> 100% --> no changes, 1 --> 50% --> -3dB,
4811 * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB
4812 */
4813 WMI_VDEV_PARAM_TXPOWER_SCALE,
4814
4815 /* TX power backoff in dB: tx power -= param value
4816 * Host passes values(DB) to Halphy, Halphy reduces the power table
4817 * by the values. Safety check will happen in Halphy.
4818 */
4819 WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB,
4820
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004821} WMI_VDEV_PARAM;
4822
4823/* Length of ATIM Window in TU */
4824#define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW
4825
4826enum wmi_pkt_type {
4827 WMI_PKT_TYPE_RAW = 0,
4828 WMI_PKT_TYPE_NATIVE_WIFI = 1,
4829 WMI_PKT_TYPE_ETHERNET = 2,
4830};
4831
4832typedef struct {
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05304833 A_UINT8 sutxbfee:1, mutxbfee:1, sutxbfer:1, mutxbfer:1,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004834#if defined(AR900B)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05304835 txb_sts_cap:3, implicit_bf:1;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004836#else
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05304837 reserved:4;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004838#endif
4839} wmi_vdev_txbf_en;
4840
4841/** Upto 8 bits are available for Roaming module to be sent along with
4842 WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/
4843/* Enable Roaming FW offload LFR1.5/LFR2.0 implementation */
4844#define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1
4845/* Enable Roaming module in FW to do scan based on Final BMISS */
4846#define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2
4847
4848/** slot time long */
4849#define WMI_VDEV_SLOT_TIME_LONG 0x1
4850/** slot time short */
4851#define WMI_VDEV_SLOT_TIME_SHORT 0x2
4852/** preablbe long */
4853#define WMI_VDEV_PREAMBLE_LONG 0x1
4854/** preablbe short */
4855#define WMI_VDEV_PREAMBLE_SHORT 0x2
4856
4857/** the definition of different START/RESTART Event response */
4858typedef enum {
4859 /* Event respose of START CMD */
4860 WMI_VDEV_START_RESP_EVENT = 0,
4861 /* Event respose of RESTART CMD */
4862 WMI_VDEV_RESTART_RESP_EVENT,
4863} WMI_START_EVENT_PARAM;
4864
4865typedef struct {
4866 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */
4867 /** unique id identifying the VDEV, generated by the caller */
4868 A_UINT32 vdev_id;
4869 /** requestor id that requested the VDEV start request */
4870 A_UINT32 requestor_id;
4871 /* Respose of Event type START/RESTART */
4872 WMI_START_EVENT_PARAM resp_type;
4873 /** status of the response */
4874 A_UINT32 status;
4875 /** Vdev chain mask */
4876 A_UINT32 chain_mask;
4877 /** Vdev mimo power save mode */
4878 A_UINT32 smps_mode;
4879 /** mac_id field contains the MAC identifier that the VDEV is bound to. The valid range is 0 to (num_macs-1). */
4880 A_UINT32 mac_id;
4881 /** Configured Transmit Streams **/
4882 A_UINT32 cfgd_tx_streams;
4883 /** Configured Receive Streams **/
4884 A_UINT32 cfgd_rx_streams;
4885} wmi_vdev_start_response_event_fixed_param;
4886
4887typedef struct {
4888 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */
4889 /** unique id identifying the VDEV, generated by the caller */
4890 A_UINT32 vdev_id;
4891} wmi_vdev_stopped_event_fixed_param;
4892
Manikandan Mohan429a0782015-12-23 14:35:54 -08004893typedef struct {
4894 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */
4895 /** unique id identifying the VDEV, generated by the caller */
4896 A_UINT32 vdev_id;
4897} wmi_vdev_delete_resp_event_fixed_param;
4898
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004899/** common structure used for simple events (stopped, resume_req, standby response) */
4900typedef struct {
4901 A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */
4902 /** unique id identifying the VDEV, generated by the caller */
4903 A_UINT32 vdev_id;
4904} wmi_vdev_simple_event_fixed_param;
4905
4906/** VDEV start response status codes */
4907#define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV succesfully started */
4908#define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */
4909#define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */
4910
4911/** Beacon processing related command and event structures */
4912typedef struct {
4913 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */
4914 /** unique id identifying the VDEV, generated by the caller */
4915 A_UINT32 vdev_id;
4916 /** xmit rate */
4917 A_UINT32 tx_rate;
4918 /** xmit power */
4919 A_UINT32 txPower;
4920 /** beacon buffer length in bytes */
4921 A_UINT32 buf_len;
4922 /* This TLV is followed by array of bytes:
4923 * // beacon frame buffer
4924 * A_UINT8 bufp[];
4925 */
4926} wmi_bcn_tx_hdr;
4927
4928/* Beacon filter */
4929#define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
4930#define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
4931#define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
4932#define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
4933#define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
4934
4935typedef struct {
4936 /** Filter ID */
4937 A_UINT32 bcn_filter_id;
4938 /** Filter type - wmi_bcn_filter */
4939 A_UINT32 bcn_filter;
4940 /** Buffer len */
4941 A_UINT32 bcn_filter_len;
4942 /** Filter info (threshold, BSSID, RSSI) */
4943 A_UINT8 *bcn_filter_buf;
4944} wmi_bcn_filter_rx_cmd;
4945
4946/** Capabilities and IEs to be passed to firmware */
4947typedef struct {
4948 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */
4949 /** Capabilities */
4950 A_UINT32 caps;
4951 /** ERP info */
4952 A_UINT32 erp;
4953 /** Advanced capabilities */
4954 /** HT capabilities */
4955 /** HT Info */
4956 /** ibss_dfs */
4957 /** wpa Info */
4958 /** rsn Info */
4959 /** rrm info */
4960 /** ath_ext */
4961 /** app IE */
4962} wmi_bcn_prb_info;
4963
4964typedef struct {
4965 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */
4966 /** unique id identifying the VDEV, generated by the caller */
4967 A_UINT32 vdev_id;
4968 /** TIM IE offset from the beginning of the template. */
4969 A_UINT32 tim_ie_offset;
4970 /** beacon buffer length. data is in TLV data[] */
4971 A_UINT32 buf_len;
4972 /*
4973 * The TLVs follows:
4974 * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs
4975 * A_UINT8 data[]; //Variable length data
4976 */
4977} wmi_bcn_tmpl_cmd_fixed_param;
4978
4979typedef struct {
4980 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */
4981 /** unique id identifying the VDEV, generated by the caller */
4982 A_UINT32 vdev_id;
4983 /** beacon buffer length. data is in TLV data[] */
4984 A_UINT32 buf_len;
4985 /*
4986 * The TLVs follows:
4987 * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs
4988 * A_UINT8 data[]; //Variable length data
4989 */
4990} wmi_prb_tmpl_cmd_fixed_param;
4991
4992typedef struct {
4993 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */
4994 A_UINT32 tlv_header;
4995 /** unique id identifying the VDEV */
4996 A_UINT32 vdev_id;
4997 /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */
4998 A_UINT32 tx_status;
4999} wmi_offload_bcn_tx_status_event_fixed_param;
5000
5001enum wmi_sta_ps_mode {
5002 /** enable power save for the given STA VDEV */
5003 WMI_STA_PS_MODE_DISABLED = 0,
5004 /** disable power save for a given STA VDEV */
5005 WMI_STA_PS_MODE_ENABLED = 1,
5006};
5007
5008typedef struct {
5009 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */
5010 /** unique id identifying the VDEV, generated by the caller */
5011 A_UINT32 vdev_id;
5012
5013 /** Power save mode
5014 *
5015 * (see enum wmi_sta_ps_mode)
5016 */
5017 A_UINT32 sta_ps_mode;
5018} wmi_sta_powersave_mode_cmd_fixed_param;
5019
5020enum wmi_csa_offload_en {
5021 WMI_CSA_OFFLOAD_DISABLE = 0,
5022 WMI_CSA_OFFLOAD_ENABLE = 1,
5023};
5024
5025typedef struct {
5026 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */
5027 A_UINT32 vdev_id;
5028 A_UINT32 csa_offload_enable;
5029} wmi_csa_offload_enable_cmd_fixed_param;
5030
5031typedef struct {
5032 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */
5033 A_UINT32 vdev_id;
5034 /*
5035 * The TLVs follows:
5036 * wmi_channel chan;
5037 */
5038} wmi_csa_offload_chanswitch_cmd_fixed_param;
5039/**
5040 * This parameter controls the policy for retrieving frames from AP while the
5041 * STA is in sleep state.
5042 *
5043 * Only takes affect if the sta_ps_mode is enabled
5044 */
5045enum wmi_sta_ps_param_rx_wake_policy {
5046 /* Wake up when ever there is an RX activity on the VDEV. In this mode
5047 * the Power save SM(state machine) will come out of sleep by either
5048 * sending null frame (or) a data frame (with PS==0) in response to TIM
5049 * bit set in the received beacon frame from AP.
5050 */
5051 WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
5052
5053 /* Here the power save state machine will not wakeup in response to TIM
5054 * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
5055 * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
5056 * access categories are delivery-enabled, the station will send a UAPSD
5057 * trigger frame, otherwise it will send a PS-Poll.
5058 */
5059 WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
5060};
5061
5062/** Number of tx frames/beacon that cause the power save SM to wake up.
5063 *
5064 * Value 1 causes the SM to wake up for every TX. Value 0 has a special
5065 * meaning, It will cause the SM to never wake up. This is useful if you want
5066 * to keep the system to sleep all the time for some kind of test mode . host
5067 * can change this parameter any time. It will affect at the next tx frame.
5068 */
5069enum wmi_sta_ps_param_tx_wake_threshold {
5070 WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
5071 WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
5072
5073 /* Values greater than one indicate that many TX attempts per beacon
5074 * interval before the STA will wake up
5075 */
5076};
5077
5078/**
5079 * The maximum number of PS-Poll frames the FW will send in response to
5080 * traffic advertised in TIM before waking up (by sending a null frame with PS
5081 * = 0). Value 0 has a special meaning: there is no maximum count and the FW
5082 * will send as many PS-Poll as are necessary to retrieve buffered BU. This
5083 * parameter is used when the RX wake policy is
5084 * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
5085 * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
5086 */
5087enum wmi_sta_ps_param_pspoll_count {
5088 WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
5089 /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
5090 * will send before waking up.
5091 */
5092};
5093
5094/*
5095 * This will include the delivery and trigger enabled state for every AC.
5096 * This is the negotiated state with AP. The host MLME needs to set this based
5097 * on AP capability and the state Set in the association request by the
5098 * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
5099 */
5100#define WMI_UAPSD_AC_TYPE_DELI 0
5101#define WMI_UAPSD_AC_TYPE_TRIG 1
5102
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05305103#define WMI_UAPSD_AC_BIT_MASK(ac, type) \
5104 do { \
5105 (type == WMI_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) : \
5106 (1<<((ac<<1)+1)) \
5107 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005108
5109enum wmi_sta_ps_param_uapsd {
5110 WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
5111 WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
5112 WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
5113 WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
5114 WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
5115 WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
5116 WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
5117 WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
5118};
5119
5120enum wmi_sta_powersave_param {
5121 /**
5122 * Controls how frames are retrievd from AP while STA is sleeping
5123 *
5124 * (see enum wmi_sta_ps_param_rx_wake_policy)
5125 */
5126 WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
5127
5128 /**
5129 * The STA will go active after this many TX
5130 *
5131 * (see enum wmi_sta_ps_param_tx_wake_threshold)
5132 */
5133 WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
5134
5135 /**
5136 * Number of PS-Poll to send before STA wakes up
5137 *
5138 * (see enum wmi_sta_ps_param_pspoll_count)
5139 *
5140 */
5141 WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
5142
5143 /**
5144 * TX/RX inactivity time in msec before going to sleep.
5145 *
5146 * The power save SM will monitor tx/rx activity on the VDEV, if no
5147 * activity for the specified msec of the parameter the Power save SM will
5148 * go to sleep.
5149 */
5150 WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
5151
5152 /**
5153 * Set uapsd configuration.
5154 *
5155 * (see enum wmi_sta_ps_param_uapsd)
5156 */
5157 WMI_STA_PS_PARAM_UAPSD = 4,
5158 /**
5159 * Number of PS-Poll to send before STA wakes up in QPower Mode
5160 */
5161 WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
5162
5163 /**
5164 * Enable QPower
5165 */
5166 WMI_STA_PS_ENABLE_QPOWER = 6,
5167
5168 /**
5169 * Number of TX frames before the entering the Active state
5170 */
5171 WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7,
5172
5173 /**
5174 * QPower SPEC PSPOLL interval
5175 */
5176 WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8,
5177
5178 /**
5179 * Max SPEC PSPOLL to be sent when the PSPOLL response has
5180 * no-data bit set
5181 */
5182 WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9,
5183};
5184
5185typedef struct {
5186 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */
5187 /** unique id identifying the VDEV, generated by the caller */
5188 A_UINT32 vdev_id;
5189 /** station power save parameter (see enum wmi_sta_powersave_param) */
5190 A_UINT32 param;
5191 A_UINT32 value;
5192} wmi_sta_powersave_param_cmd_fixed_param;
5193
5194/** No MIMO power save */
5195#define WMI_STA_MIMO_PS_MODE_DISABLE
5196/** mimo powersave mode static*/
5197#define WMI_STA_MIMO_PS_MODE_STATIC
5198/** mimo powersave mode dynamic */
5199#define WMI_STA_MIMO_PS_MODE_DYNAMI
5200
5201typedef struct {
5202 /** unique id identifying the VDEV, generated by the caller */
5203 A_UINT32 vdev_id;
5204 /** mimo powersave mode as defined above */
5205 A_UINT32 mimo_pwrsave_mode;
5206} wmi_sta_mimo_ps_mode_cmd;
5207
5208/** U-APSD configuration of peer station from (re)assoc request and TSPECs */
5209enum wmi_ap_ps_param_uapsd {
5210 WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
5211 WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
5212 WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
5213 WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
5214 WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
5215 WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
5216 WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
5217 WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
5218};
5219
5220/** U-APSD maximum service period of peer station */
5221enum wmi_ap_ps_peer_param_max_sp {
5222 WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
5223 WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
5224 WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
5225 WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
5226
5227 /* keep last! */
5228 MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
5229};
5230
5231/**
5232 * AP power save parameter
5233 * Set a power save specific parameter for a peer station
5234 */
5235enum wmi_ap_ps_peer_param {
5236 /** Set uapsd configuration for a given peer.
5237 *
5238 * This will include the delivery and trigger enabled state for every AC.
5239 * The host MLME needs to set this based on AP capability and stations
5240 * request Set in the association request received from the station.
5241 *
5242 * Lower 8 bits of the value specify the UAPSD configuration.
5243 *
5244 * (see enum wmi_ap_ps_param_uapsd)
5245 * The default value is 0.
5246 */
5247 WMI_AP_PS_PEER_PARAM_UAPSD = 0,
5248
5249 /**
5250 * Set the service period for a UAPSD capable station
5251 *
5252 * The service period from wme ie in the (re)assoc request frame.
5253 *
5254 * (see enum wmi_ap_ps_peer_param_max_sp)
5255 */
5256 WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
5257
5258 /** Time in seconds for aging out buffered frames for STA in power save */
5259 WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
5260};
5261
5262typedef struct {
5263 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */
5264 /** unique id identifying the VDEV, generated by the caller */
5265 A_UINT32 vdev_id;
5266 /** peer MAC address */
5267 wmi_mac_addr peer_macaddr;
5268 /** AP powersave param (see enum wmi_ap_ps_peer_param) */
5269 A_UINT32 param;
5270 /** AP powersave param value */
5271 A_UINT32 value;
5272} wmi_ap_ps_peer_cmd_fixed_param;
5273
5274/** Configure peer station 11v U-APSD coexistance
5275 *
5276 * Two parameters from uaspd coexistence ie info (as specified in 11v) are
5277 * sent down to FW along with this command.
5278 *
5279 * The semantics of these fields are described in the following text extracted
5280 * from 802.11v.
5281 *
5282 * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the
5283 * U-APSD Coexistence element, the AP should not transmit frames to the
5284 * non-AP STA outside of the U-APSD Coexistence Service Period, which
5285 * begins when the AP receives the U-APSD trigger frame and ends after
5286 * the transmission period specified by the result of the following
5287 * calculation:
5288 *
5289 * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval))
5290 *
5291 * Where T is the time the U-APSD trigger frame was received at the AP
5292 * Interval is the UAPSD Coexistence element Duration/Interval field
5293 * value (see 7.3.2.91) or upon the successful transmission of a frame
5294 * with EOSP bit set to 1, whichever is earlier.
5295 *
5296 *
5297 * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD
5298 * Coexistence element, the AP should not transmit frames to the non-AP
5299 * STA outside of the U-APSD Coexistence Service Period, which begins
5300 * when the AP receives a U-APSD trigger frame and ends after the
5301 * transmission period specified by the result of the following
5302 * calculation: End of transmission period = T + Duration
5303 */
5304typedef struct {
5305 /** unique id identifying the VDEV, generated by the caller */
5306 A_UINT32 vdev_id;
5307 /** peer MAC address */
5308 wmi_mac_addr peer_macaddr;
5309 /** Enable U-APSD coexistence support for this peer
5310 *
5311 * 0 -> disabled (default)
5312 * 1 -> enabled
5313 */
5314 A_UINT32 enabled;
5315 /** Duration/Interval as defined by 11v U-ASPD coexistance */
5316 A_UINT32 duration_interval;
5317 /** Upper 32 bits of 64-bit TSF offset */
5318 A_UINT32 tsf_offset_high;
5319 /** Lower 32 bits of 64-bit TSF offset */
5320 A_UINT32 tsf_offset_low;
5321} wmi_ap_powersave_peer_uapsd_coex_cmd;
5322
5323typedef enum {
5324 WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001,
5325 WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002,
5326 WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004,
5327
5328 WMI_AP_PS_EGAP_FLAG_MAX = 0x8000
5329} wmi_ap_ps_egap_flag_type;
5330
5331/**
5332 * configure ehanced green ap parameters
5333 */
5334typedef struct {
5335 /*
5336 * TLV tag and len; tag equals
5337 * wmi_ap_powersave_egap_param_cmd_fixed_param
5338 */
5339 A_UINT32 tlv_header;
5340 /** Enable enhanced green ap
5341 * 0 -> disabled
5342 * 1 -> enabled
5343 */
5344 A_UINT32 enable;
5345 /** The param indicates a duration that all STAs connected
5346 * to S-AP have no traffic.
5347 */
5348 A_UINT32 inactivity_time; /* in unit of milliseconds */
5349 /** The param indicates a duration that all STAs connected
5350 * to S-AP have no traffic, after all STAs have entered powersave.
5351 */
5352 A_UINT32 wait_time; /* in unit of milliseconds */
5353 /** The param is used to turn on/off some functions within E-GAP.
5354 */
5355 A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */
5356} wmi_ap_ps_egap_param_cmd_fixed_param;
5357
5358typedef enum {
5359 WMI_AP_PS_EGAP_STATUS_IDLE = 1,
5360 WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2,
5361 WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3,
5362
5363 WMI_AP_PS_EGAP_STATUS_MAX = 15
5364} wmi_ap_ps_egap_status_type;
5365
5366/**
5367 * send ehanced green ap status to host
5368 */
5369typedef struct {
Manikandan Mohan0c7ae402015-12-03 17:56:41 -08005370 /* TLV tag and len; tag equals
5371 * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list
5372 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005373 A_UINT32 tlv_header;
5374 /** The param indicates a mac under dual-mac */
5375 A_UINT32 mac_id;
5376 /** The param indicates the current tx chainmask with the mac id. */
5377 A_UINT32 tx_chainmask;
5378 /** The param indicates the current rx chainmask with the mac id. */
5379 A_UINT32 rx_chainmask;
5380} wmi_ap_ps_egap_info_chainmask_list;
5381
5382typedef struct {
5383 /*
5384 * TLV tag and len; tag equals
5385 * wmi_ap_powersave_egap_param_cmd_fixed_param
5386 */
5387 A_UINT32 tlv_header;
5388 /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */
5389 A_UINT32 status;
5390 /* This TLV is followed by
5391 * wmi_ap_ps_egap_info_chainmask_list chainmask_list[];
5392 */
5393} wmi_ap_ps_egap_info_event_fixed_param;
5394
5395
5396/* 128 clients = 4 words */
5397/* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */
5398#define WMI_TIM_BITMAP_ARRAY_SIZE 4
5399
5400typedef struct {
5401 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */
5402 /** TIM bitmap len (in bytes)*/
5403 A_UINT32 tim_len;
5404 /** TIM Partial Virtual Bitmap */
5405 A_UINT32 tim_mcast;
5406 A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
5407 A_UINT32 tim_changed;
5408 A_UINT32 tim_num_ps_pending;
5409} wmi_tim_info;
5410
5411typedef struct {
5412 /** Flag to enable quiet period IE support */
5413 A_UINT32 is_enabled;
5414 /** Quiet start */
5415 A_UINT32 tbttcount;
5416 /** Beacon intervals between quiets*/
5417 A_UINT32 period;
5418 /** TUs of each quiet*/
5419 A_UINT32 duration;
5420 /** TUs of from TBTT of quiet start*/
5421 A_UINT32 offset;
5422} wmi_quiet_info;
5423
5424/* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */
5425#define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */
5426
5427typedef struct {
5428 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */
5429 /** Bit 0: Flag to indicate an update in NOA schedule
5430 * Bits 7-1: Reserved
5431 * Bits 15-8: Index (identifies the instance of NOA sub element)
5432 * Bit 16: Opp PS state of the AP
5433 * Bits 23-17: Ctwindow in TUs
5434 * Bits 31-24: Number of NOA descriptors
5435 */
5436 A_UINT32 noa_attributes;
5437 wmi_p2p_noa_descriptor
5438 noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
5439} wmi_p2p_noa_info;
5440
5441#define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1
5442#define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0
5443
5444#define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \
5445 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED)
5446
5447#define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \
5448 WMI_F_RMW((hdr)->noa_attributes, 0x1, \
5449 WMI_UNIFIED_NOA_ATTR_MODIFIED);
5450
5451#define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00
5452#define WMI_UNIFIED_NOA_ATTR_INDEX_S 8
5453
5454#define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \
5455 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX)
5456
5457#define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \
5458 WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
5459 WMI_UNIFIED_NOA_ATTR_INDEX);
5460
5461#define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000
5462#define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16
5463
5464#define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \
5465 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS)
5466
5467#define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \
5468 WMI_F_RMW((hdr)->noa_attributes, 0x1, \
5469 WMI_UNIFIED_NOA_ATTR_OPP_PS);
5470
5471#define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000
5472#define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17
5473
5474#define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \
5475 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN)
5476
5477#define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \
5478 WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \
5479 WMI_UNIFIED_NOA_ATTR_CTWIN);
5480
5481#define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000
5482#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24
5483
5484#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \
5485 WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC)
5486
5487#define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \
5488 WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \
5489 WMI_UNIFIED_NOA_ATTR_NUM_DESC);
5490
5491typedef struct {
5492 /** TIM info */
5493 wmi_tim_info tim_info;
5494 /** P2P NOA info */
5495 wmi_p2p_noa_info p2p_noa_info;
5496 /* TBD: More info elements to be added later */
5497} wmi_bcn_info;
5498
5499typedef struct {
5500 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */
5501 /** bitmap identifying the VDEVs, generated by the caller */
5502 A_UINT32 vdev_map;
5503 /* This TLV is followed by tim_info and p2p_noa_info for each vdev in vdevmap :
5504 * wmi_tim_info tim_info[];
5505 * wmi_p2p_noa_info p2p_noa_info[];
5506 *
5507 */
5508} wmi_host_swba_event_fixed_param;
5509
5510#define WMI_MAX_AP_VDEV 16
5511
5512typedef struct {
5513 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */
5514 /** bimtap of VDEVs that has tbtt offset updated */
5515 A_UINT32 vdev_map;
5516 /* The TLVs for tbttoffset_list will follow this TLV.
5517 * tbtt offset list in the order of the LSB to MSB in the vdev_map bitmap
5518 * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV];
5519 */
5520} wmi_tbtt_offset_event_fixed_param;
5521
5522/* Peer Specific commands and events */
5523
5524typedef struct {
5525 A_UINT32 percentage; /* in unit of 12.5% */
5526 A_UINT32 min_delta; /* in unit of Mbps */
5527} rate_delta_t;
5528
5529#define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01
5530#define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02
5531#define MAX_NUM_OF_RATE_THRESH 4
5532
5533typedef struct {
5534 /*
5535 * PEER_RATE_REPORT_COND_FLAG_DELTA,
5536 * PEER_RATE_REPORT_COND_FLAG_THRESHOLD
5537 * Any of these two conditions or both of
5538 * them can be set.
5539 */
5540 A_UINT32 val_cond_flags;
5541 rate_delta_t rate_delta;
5542 /*
5543 * In unit of Mbps. There are at most 4 thresholds
5544 * If the threshold count is less than 4, set zero to
5545 * the one following the last threshold
5546 */
5547 A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH];
5548} report_cond_per_phy_t;
5549
5550
5551enum peer_rate_report_cond_phy_type {
5552 PEER_RATE_REPORT_COND_11B = 0,
5553 PEER_RATE_REPORT_COND_11A_G,
5554 PEER_RATE_REPORT_COND_11N,
5555 PEER_RATE_REPORT_COND_11AC,
5556 PEER_RATE_REPORT_COND_MAX_NUM
5557};
5558
5559typedef struct {
5560 /*
5561 * TLV tag and len; tag equals
5562 * WMITLV_TAG_STRUC_wmi_peer_rate_report_condtion_fixed_param
5563 */
5564 A_UINT32 tlv_header;
5565 /* 1= enable, 0=disable */
5566 A_UINT32 enable_rate_report;
5567 A_UINT32 report_backoff_time; /* in unit of msecond */
5568 A_UINT32 report_timer_period; /* in unit of msecond */
5569 /*
5570 *In the following field, the array index means the phy type,
5571 * please see enum peer_rate_report_cond_phy_type for detail
5572 */
5573 report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM];
5574} wmi_peer_set_rate_report_condition_fixed_param;
5575
5576/* Peer Type:
5577 * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based
5578 * on address and vdev opmode. This is largely here to allow host to indicate that
5579 * peer is explicitly a TDLS peer
5580 */
5581enum wmi_peer_type {
5582 WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
5583 WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
5584 WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
5585 WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */
5586 WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05305587 * is assigned up to 127 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08005588 /* Reserved from 128 - 255 for
5589 * target internal use.*/
5590 WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */
5591};
5592
5593typedef struct {
5594 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */
5595 /** unique id identifying the VDEV, generated by the caller */
5596 A_UINT32 vdev_id;
5597 /** peer MAC address */
5598 wmi_mac_addr peer_macaddr;
5599 /** peer type: see enum values above */
5600 A_UINT32 peer_type;
5601} wmi_peer_create_cmd_fixed_param;
5602
5603typedef struct {
5604 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */
5605 /** unique id identifying the VDEV, generated by the caller */
5606 A_UINT32 vdev_id;
5607 /** peer MAC address */
5608 wmi_mac_addr peer_macaddr;
5609} wmi_peer_delete_cmd_fixed_param;
5610
5611typedef struct {
5612 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */
5613 /** unique id identifying the VDEV, generated by the caller */
5614 A_UINT32 vdev_id;
5615 /** peer MAC address */
5616 wmi_mac_addr peer_macaddr;
5617 /** tid bitmap identifying the tids to flush */
5618 A_UINT32 peer_tid_bitmap;
5619} wmi_peer_flush_tids_cmd_fixed_param;
5620
5621typedef struct {
5622 /** rate mode . 0: disable fixed rate (auto rate)
5623 * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
5624 * 2: ht20 11n rate specified as mcs index
5625 * 3: ht40 11n rate specified as mcs index
5626 */
5627 A_UINT32 rate_mode;
5628 /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
5629 * and series 3 is stored at byte 3 (MSB) */
5630 A_UINT32 rate_series;
5631 /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB)
5632 * and retry count for rate 3 is stored at byte 3 (MSB) */
5633 A_UINT32 rate_retries;
5634} wmi_fixed_rate;
5635
5636typedef struct {
5637 /** unique id identifying the VDEV, generated by the caller */
5638 A_UINT32 vdev_id;
5639 /** peer MAC address */
5640 wmi_mac_addr peer_macaddr;
5641 /** fixed rate */
5642 wmi_fixed_rate peer_fixed_rate;
5643} wmi_peer_fixed_rate_cmd;
5644
5645#define WMI_MGMT_TID 17
5646
5647typedef struct {
5648 A_UINT32 tlv_header;
5649 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */
5650 /** unique id identifying the VDEV, generated by the caller */
5651 A_UINT32 vdev_id;
5652 /** peer MAC address */
5653 wmi_mac_addr peer_macaddr;
5654} wmi_addba_clear_resp_cmd_fixed_param;
5655
5656typedef struct {
5657 A_UINT32 tlv_header;
5658 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */
5659 /** unique id identifying the VDEV, generated by the caller */
5660 A_UINT32 vdev_id;
5661 /** peer MAC address */
5662 wmi_mac_addr peer_macaddr;
5663 /** Tid number */
5664 A_UINT32 tid;
5665 /** Buffer/Window size*/
5666 A_UINT32 buffersize;
5667} wmi_addba_send_cmd_fixed_param;
5668
5669typedef struct {
5670 A_UINT32 tlv_header;
5671 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */
5672 /** unique id identifying the VDEV, generated by the caller */
5673 A_UINT32 vdev_id;
5674 /** peer MAC address */
5675 wmi_mac_addr peer_macaddr;
5676 /** Tid number */
5677 A_UINT32 tid;
5678 /** Is Initiator */
5679 A_UINT32 initiator;
5680 /** Reason code */
5681 A_UINT32 reasoncode;
5682} wmi_delba_send_cmd_fixed_param;
5683
5684typedef struct {
5685 A_UINT32 tlv_header;
5686 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */
5687 /** unique id identifying the vdev, generated by the caller */
5688 A_UINT32 vdev_id;
5689 /** peer mac address */
5690 wmi_mac_addr peer_macaddr;
5691 /** Tid number */
5692 A_UINT32 tid;
5693 /** status code */
5694 A_UINT32 statuscode;
5695} wmi_addba_setresponse_cmd_fixed_param;
5696
5697typedef struct {
5698 A_UINT32 tlv_header;
5699 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */
5700 /** unique id identifying the vdev, generated by the caller */
5701 A_UINT32 vdev_id;
5702 /** peer mac address */
5703 wmi_mac_addr peer_macaddr;
5704 /** Tid number */
5705 A_UINT32 tid;
5706} wmi_send_singleamsdu_cmd_fixed_param;
5707
5708/* Type of Station DTIM Power Save method */
5709enum {
5710 /* For NORMAL DTIM, the parameter is the number of beacon intervals and
5711 * also the same value as the listen interval. For this method, the
5712 * station will wake up based on the listen interval. If this
5713 * listen interval is not equal to DTIM, then the station may
5714 * miss certain DTIM beacons. If this value is 1, then the
5715 * station will wake up for every beacon.
5716 */
5717 WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01,
5718 /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip.
5719 * When this value is 1, then the station will wake at every DTIM beacon.
5720 * If this value is >1, then the station will skip certain DTIM beacons.
5721 * This value is the multiple of DTIM intervals that the station will
5722 * wake up to receive the DTIM beacons.
5723 */
5724 WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02,
5725};
5726
5727/* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */
5728typedef struct {
5729 A_UINT32 tlv_header;
5730 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */
5731 /** unique id identifying the VDEV, generated by the caller */
5732 A_UINT32 vdev_id;
5733 /* Station DTIM Power Save method as defined above */
5734 A_UINT32 dtim_pwrsave_method;
5735 /* DTIM PS value. Contents depends on the method */
5736 A_UINT32 value;
5737 /* Modulated DTIM value */
5738 A_UINT32 MaxLIModulatedDTIM;
5739} wmi_sta_dtim_ps_method_cmd_fixed_param;
5740
5741/*
5742 * For Station UAPSD Auto Trigger feature, the Firmware monitors the
5743 * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs.
5744 * If there is no uplink/download for the specified service interval (field service_interval),
5745 * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value
5746 * specified in the UP (field user_priority).
5747 * Firmware also monitors the responses for these QOS-NULL triggers.
5748 * If the peer does not have any delivery frames, it will respond with
5749 * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all
5750 * firmware implementation. For this basic implementation, the suspend_interval and delay_interval
5751 * are unused and should be set to 0.
5752 * When service_interval is 0, then the firmware will not send any trigger frames. This is for
5753 * certain host-based implementations that don't want this firmware offload.
5754 * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals
5755 * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms
5756 * and rest of the AC default to 300 ms.
5757 *
5758 * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature
5759 * of variable auto trigger is supported. The suspend_interval and delay_interval is used in
5760 * the more advanced monitoring method.
5761 * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the
5762 * suspend interval (field suspend_interval), firmware will change its auto trigger interval
5763 * to delay interval (field delay_interval). This way, when there is no traffic, the station
5764 * will save more power by waking up less and sending less trigger frames.
5765 * The (service_interval < suspend_interval) and (service_interval < delay_interval).
5766 * If this variable auto trigger is not required, then the suspend_interval and delay_interval
5767 * should be 0.
5768 */
5769typedef struct {
5770 A_UINT32 tlv_header;
5771 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */
5772 /** WMM Access category from 0 to 3 */
5773 A_UINT32 wmm_ac;
5774 /** User priority to use in trigger frames. It is the TID
5775 * value. This field needs to be specified and may not be
5776 * equivalent to AC since some implementation may use the TSPEC
5777 * to enable UAPSD and negotiate a particular user priority. */
5778 A_UINT32 user_priority;
5779 /** service interval in ms */
5780 A_UINT32 service_interval;
5781 /** Suspend interval in ms */
5782 A_UINT32 suspend_interval;
5783 /** delay interval in ms */
5784 A_UINT32 delay_interval;
5785} wmi_sta_uapsd_auto_trig_param;
5786
5787typedef struct {
5788 A_UINT32 tlv_header;
5789 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */
5790 /** unique id identifying the VDEV, generated by the caller */
5791 A_UINT32 vdev_id;
5792 /** peer mac address */
5793 wmi_mac_addr peer_macaddr;
5794 /** Number of AC to specify */
5795 A_UINT32 num_ac;
5796 /*
5797 * Following this struc is the TLV:
5798 * wmi_sta_uapsd_auto_trig_param ac_param[]; //Variable number of AC parameters (defined by field num_ac)
5799 */
5800
5801} wmi_sta_uapsd_auto_trig_cmd_fixed_param;
5802
5803/** mimo powersave state */
5804#define WMI_PEER_MIMO_PS_STATE 0x1
5805/** enable/disable AMPDU . initial value (enabled) */
5806#define WMI_PEER_AMPDU 0x2
5807/** authorize/unauthorize peer. initial value is unauthorized (0) */
5808#define WMI_PEER_AUTHORIZE 0x3
5809/** peer channel bandwidth */
5810#define WMI_PEER_CHWIDTH 0x4
5811/** peer NSS */
5812#define WMI_PEER_NSS 0x5
5813/** USE 4 ADDR */
5814#define WMI_PEER_USE_4ADDR 0x6
5815/* set group membership status */
5816#define WMI_PEER_MEMBERSHIP 0x7
5817#define WMI_PEER_USERPOS 0x8
5818/*
5819 * A critical high-level protocol is being used with this peer. Target
5820 * should take appropriate measures (if possible) to ensure more
5821 * reliable link with minimal latency. This *may* include modifying the
5822 * station power save policy, enabling more RX chains, increased
5823 * priority of channel scheduling, etc.
5824 *
5825 * NOTE: This parameter should only be considered a hint as specific
5826 * behavior will depend on many factors including current network load
5827 * and vdev/peer configuration.
5828 *
5829 * For STA VDEV this peer corresponds to the AP's BSS peer.
5830 * For AP VDEV this peer corresponds to the remote peer STA.
5831 */
5832#define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9
5833/* set Tx failure count threshold for the peer - Currently unused */
5834#define WMI_PEER_TX_FAIL_CNT_THR 0xA
5835/* Enable H/W retry and Enable H/W Send CTS2S before Data */
5836#define WMI_PEER_SET_HW_RETRY_CTS2S 0xB
5837
5838/* Set peer advertised IBSS atim window length */
5839#define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC
5840
5841/** peer phy mode */
5842#define WMI_PEER_PHYMODE 0xD
5843
5844/** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
5845#define WMI_PEER_MIMO_PS_NONE 0x0
5846#define WMI_PEER_MIMO_PS_STATIC 0x1
5847#define WMI_PEER_MIMO_PS_DYNAMIC 0x2
5848
5849typedef struct {
5850 A_UINT32 tlv_header;
5851 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_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 /** parameter id */
5857 A_UINT32 param_id;
5858 /** parametr value */
5859 A_UINT32 param_value;
5860} wmi_peer_set_param_cmd_fixed_param;
5861
5862#define MAX_SUPPORTED_RATES 128
5863
5864typedef struct {
5865 /** total number of rates */
5866 A_UINT32 num_rates;
5867 /**
5868 * rates (each 8bit value) packed into a 32 bit word.
5869 * the rates are filled from least significant byte to most
5870 * significant byte.
5871 */
5872 A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
5873} wmi_rate_set;
5874
5875/* NOTE: It would bea good idea to represent the Tx MCS
5876 * info in one word and Rx in another word. This is split
5877 * into multiple words for convenience
5878 */
5879typedef struct {
5880 A_UINT32 tlv_header;
5881 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */
5882 A_UINT32 rx_max_rate; /* Max Rx data rate */
5883 A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */
5884 A_UINT32 tx_max_rate; /* Max Tx data rate */
5885 A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */
5886} wmi_vht_rate_set;
5887
5888/*
5889 * IMPORTANT: Make sure the bit definitions here are consistent
5890 * with the ni_flags definitions in wlan_peer.h
5891 */
5892#define WMI_PEER_AUTH 0x00000001 /* Authorized for data */
5893#define WMI_PEER_QOS 0x00000002 /* QoS enabled */
5894#define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */
5895#define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */
5896#define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */
5897#define WMI_PEER_HT 0x00001000 /* HT enabled */
5898#define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */
5899#define WMI_PEER_STBC 0x00008000 /* STBC Enabled */
5900#define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */
5901#define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */
5902#define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */
5903#define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */
5904#define WMI_PEER_VHT 0x02000000 /* VHT Enabled */
5905#define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */
5906#define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */
5907/** CAUTION TODO: Place holder for WLAN_PEER_F_PS_PRESEND_REQUIRED = 0x10000000. Need to be clean up */
5908#define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */
5909#define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */
5910#define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */
5911
5912/**
5913 * Peer rate capabilities.
5914 *
5915 * This is of interest to the ratecontrol
5916 * module which resides in the firmware. The bit definitions are
5917 * consistent with that defined in if_athrate.c.
5918 *
5919 * @todo
5920 * Move this to a common header file later so there is no need to
5921 * duplicate the definitions or maintain consistency.
5922 */
5923#define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */
5924#define WMI_RC_CW40_FLAG 0x02 /* CW 40 */
5925#define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */
5926#define WMI_RC_HT_FLAG 0x08 /* HT */
5927#define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
5928#define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */
5929#define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */
5930#define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
5931#define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
5932#define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
5933#define WMI_RC_TS_FLAG 0x200 /* Three stream flag */
5934#define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
5935
5936typedef struct {
5937 A_UINT32 tlv_header;
5938 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */
5939 /** peer MAC address */
5940 wmi_mac_addr peer_macaddr;
5941 /** VDEV id */
5942 A_UINT32 vdev_id;
5943 /** assoc = 1 reassoc = 0 */
5944 A_UINT32 peer_new_assoc;
5945 /** peer associd (16 bits) */
5946 A_UINT32 peer_associd;
5947 /** peer station flags: see definition above */
5948 A_UINT32 peer_flags;
5949 /** negotiated capabilities (lower 16 bits)*/
5950 A_UINT32 peer_caps;
5951 /** Listen interval */
5952 A_UINT32 peer_listen_intval;
5953 /** HT capabilties of the peer */
5954 A_UINT32 peer_ht_caps;
5955 /** maximum rx A-MPDU length */
5956 A_UINT32 peer_max_mpdu;
5957 /** mpdu density of the peer in usec(0 to 16) */
5958 A_UINT32 peer_mpdu_density;
5959 /** peer rate capabilties see flags above */
5960 A_UINT32 peer_rate_caps;
5961 /** num spatial streams */
5962 A_UINT32 peer_nss;
5963 /** VHT capabilties of the peer */
5964 A_UINT32 peer_vht_caps;
5965 /** phy mode */
5966 A_UINT32 peer_phymode;
5967 /** HT Operation Element of the peer. Five bytes packed in 2
5968 * INT32 array and filled from lsb to msb.
5969 * Note that the size of array peer_ht_info[] cannotbe changed
5970 * without breaking WMI Compatibility. */
5971 A_UINT32 peer_ht_info[2];
5972 /** total number of negotiated legacy rate set. Also the sizeof
5973 * peer_legacy_rates[] */
5974 A_UINT32 num_peer_legacy_rates;
5975 /** total number of negotiated ht rate set. Also the sizeof
5976 * peer_ht_rates[] */
5977 A_UINT32 num_peer_ht_rates;
5978 /* Following this struc are the TLV's:
5979 * A_UINT8 peer_legacy_rates[];
5980 * A_UINT8 peer_ht_rates[];
5981 * wmi_vht_rate_set peer_vht_rates; //VHT capabilties of the peer
5982 */
5983} wmi_peer_assoc_complete_cmd_fixed_param;
5984
5985typedef struct {
5986 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */
5987 /** peer MAC address */
5988 wmi_mac_addr peer_macaddr;
5989 /** wds MAC addr */
5990 wmi_mac_addr wds_macaddr;
5991} wmi_peer_add_wds_entry_cmd_fixed_param;
5992
5993typedef struct {
5994 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */
5995 /** wds MAC addr */
5996 wmi_mac_addr wds_macaddr;
5997} wmi_peer_remove_wds_entry_cmd_fixed_param;
5998
5999typedef struct {
6000 /** peer MAC address */
6001 wmi_mac_addr peer_macaddr;
6002} wmi_peer_q_empty_callback_event;
6003
Govind Singhc7d51942016-02-01 12:09:31 +05306004/*
6005 * Command to update an already existing WDS entry. Different address setting
6006 * combinations are possible.
6007 *
6008 * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated.
6009 * Valid wds and null peer -> Associated WDS entry flags will be updated.
6010 * Null wds and Valid peer-> Flags will be updated for all WDS entries
6011 * behind the peer.
6012 * Null wds and peer -> Flags will be updated for all WDS entries.
6013 */
6014typedef struct {
6015 /*
6016 * TLV tag and len; tag equals
6017 * WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param
6018 */
6019 A_UINT32 tlv_header;
6020 /** peer MAC address */
6021 wmi_mac_addr peer_macaddr;
6022 /** wds MAC addr */
6023 wmi_mac_addr wds_macaddr;
6024 /* Flags associated with WDS entry */
6025 A_UINT32 flags;
6026} wmi_peer_update_wds_entry_cmd_fixed_param;
6027
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006028/**
6029 * Channel info WMI event
6030 */
6031typedef struct {
6032 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */
6033 /** Error code */
6034 A_UINT32 err_code;
6035 /** Channel freq */
6036 A_UINT32 freq;
6037 /** Read flags */
6038 A_UINT32 cmd_flags;
6039 /** Noise Floor value */
6040 A_UINT32 noise_floor;
6041 /** rx clear count */
6042 A_UINT32 rx_clear_count;
6043 /** cycle count */
6044 A_UINT32 cycle_count;
6045} wmi_chan_info_event_fixed_param;
6046
6047/**
6048 * Non wlan interference event
6049 */
6050typedef struct {
6051 A_UINT32 tlv_header;
6052 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_ath_dcs_cw_int */
6053 A_UINT32 channel; /* either number or freq in mhz */
6054} ath_dcs_cw_int;
6055
6056/**
6057 * wlan_dcs_im_tgt_stats
6058 *
6059 */
6060typedef struct _wlan_dcs_im_tgt_stats {
6061 /** current running TSF from the TSF-1 */
6062 A_UINT32 reg_tsf32;
6063
6064 /** Known last frame rssi, in case of multiple stations, if
6065 * and at different ranges, this would not gaurantee that
6066 * this is the least rssi.
6067 */
6068 A_UINT32 last_ack_rssi;
6069
6070 /** Sum of all the failed durations in the last one second interval.
6071 */
6072 A_UINT32 tx_waste_time;
6073 /** count how many times the hal_rxerr_phy is marked, in this
6074 * time period
6075 */
6076 A_UINT32 rx_time;
6077 A_UINT32 phyerr_cnt;
6078
6079 /**
6080 * WLAN IM stats from target to host
6081 *
6082 * Below statistics are sent from target to host periodically.
6083 * These are collected at target as long as target is running
6084 * and target chip is not in sleep.
6085 *
6086 */
6087
6088 /** listen time from ANI */
6089 A_INT32 listen_time;
6090
6091 /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */
6092 A_UINT32 reg_tx_frame_cnt;
6093
6094 /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */
6095 A_UINT32 reg_rx_frame_cnt;
6096
6097 /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */
6098 A_UINT32 reg_rxclr_cnt;
6099
6100 /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */
6101 A_UINT32 reg_cycle_cnt; /* delta cycle count */
6102
6103 /** extenstion channel rx clear count */
6104 A_UINT32 reg_rxclr_ext_cnt;
6105
6106 /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */
6107 A_UINT32 reg_ofdm_phyerr_cnt;
6108
6109 /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */
6110 A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */
6111
6112} wlan_dcs_im_tgt_stats_t;
6113
6114/**
6115 * wmi_dcs_interference_event_t
6116 *
6117 * Right now this is event and stats together. Partly this is
6118 * because cw interference is handled in target now. This
6119 * can be done at host itself, if we can carry the NF alone
6120 * as a stats event. In future this would be done and this
6121 * event would carry only stats.
6122 */
6123typedef struct {
6124 A_UINT32 tlv_header;
6125 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */
6126 /**
6127 * Type of the event present, either the cw interference event, or the wlan_im stats
6128 */
6129 A_UINT32 interference_type; /* type of interference, wlan or cw */
6130 /*
6131 * Following this struct are these TLVs. Note that they are both array of structures
6132 * but can have at most one element. Which TLV is empty or has one element depends
6133 * on the field interference_type. This is to emulate an union with cw_int and wlan_stat
6134 * elements (not arrays). union { ath_dcs_cw_int cw_int; wlan_dcs_im_tgt_stats_t wlan_stat; } int_event;
6135 *
6136 * //cw_interference event
6137 * ath_dcs_cw_int cw_int[]; this element
6138 * // wlan im interfernce stats
6139 * wlan_dcs_im_tgt_stats_t wlan_stat[];
6140 */
6141} wmi_dcs_interference_event_fixed_param;
6142
6143enum wmi_peer_mcast_group_action {
6144 wmi_peer_mcast_group_action_add = 0,
6145 wmi_peer_mcast_group_action_del = 1
6146};
6147#define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1
6148#define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0
6149#define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2
6150#define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1
6151/* multicast group membership commands */
6152/* TODO: Converting this will be tricky since it uses an union.
6153 Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */
6154typedef struct {
6155 A_UINT32 tlv_header;
6156 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */
6157 A_UINT32 flags;
6158 wmi_mac_addr ucast_mac_addr;
6159 A_UINT8 mcast_ip_addr[16]; /* in network byte order */
6160} wmi_peer_mcast_group_cmd_fixed_param;
6161
6162/** Offload Scan and Roaming related commands */
6163/** The FW performs 2 different kinds of offload scans independent
6164 * of host. One is Roam scan which is primarily performed on a
6165 * station VDEV after association to look for a better AP that
6166 * the station VDEV can roam to. The second scan is connect scan
6167 * which is mainly performed when the station is not associated
6168 * and to look for a matching AP profile from a list of
6169 * configured profiles. */
6170
6171/**
6172 * WMI_ROAM_SCAN_MODE: Set Roam Scan mode
6173 * the roam scan mode is one of the periodic, rssi change, both, none.
6174 * None : Disable Roam scan. No Roam scan at all.
6175 * Periodic : Scan periodically with a configurable period.
6176 * Rssi change : Scan when ever rssi to current AP changes by the threshold value
6177 * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command.
6178 * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount)
6179 *
6180 */
6181typedef struct {
6182 A_UINT32 tlv_header;
6183 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
6184 A_UINT32 roam_scan_mode;
6185 A_UINT32 vdev_id;
6186} wmi_roam_scan_mode_fixed_param;
6187
6188#define WMI_ROAM_SCAN_MODE_NONE 0x0
6189#define WMI_ROAM_SCAN_MODE_PERIODIC 0x1
6190#define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
6191#define WMI_ROAM_SCAN_MODE_BOTH 0x3
6192/* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
6193#define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
6194
6195typedef struct {
6196 A_UINT32 tlv_header;
6197 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
6198 A_UINT32 vdev_id;
6199 A_UINT32 command_arg;
6200} wmi_roam_scan_cmd_fixed_param;
6201
6202#define WMI_ROAM_SCAN_STOP_CMD 0x1
6203
6204/**
6205 * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan rssi thresold
6206 * scan rssi threshold is the rssi threshold below which the FW will start running Roam scans.
6207 * Applicable when WMI_ROAM_SCAN_MODE is not set to none.
6208 */
6209typedef struct {
6210 A_UINT32 tlv_header;
6211 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */
6212 /** unique id identifying the VDEV, generated by the caller */
6213 A_UINT32 vdev_id;
6214 /** roam scan rssi threshold */
6215 A_UINT32 roam_scan_rssi_thresh;
6216 /** When using Hw generated beacon RSSI interrupts */
6217 A_UINT32 roam_rssi_thresh_diff;
6218 /** 5G scan max count */
6219 A_UINT32 hirssi_scan_max_count;
6220 /** 5G scan rssi change threshold value */
6221 A_UINT32 hirssi_scan_delta;
6222 /** 5G scan upper bound */
6223 A_UINT32 hirssi_upper_bound;
6224 /* The TLVs will follow.
6225 * wmi_roam_scan_extended_threshold_param extended_param;
6226 * wmi_roam_earlystop_rssi_thres_param earlystop_param;
Govind Singhce8fd912016-01-21 10:24:19 +05306227 * wmi_roam_dense_thres_param dense_param;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006228 */
6229} wmi_roam_scan_rssi_threshold_fixed_param;
6230
6231#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0
6232#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1
6233#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2
6234#define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3
6235
6236typedef struct {
6237 /** TLV tag and len; tag equals
6238 *WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */
6239 A_UINT32 tlv_header;
6240 A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */
6241 A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */
6242 A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
6243 A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */
6244 A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */
6245 A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */
6246 A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */
6247 A_UINT32 max_penalty_5g; /** maximum penality that can be applied to a 5GHz RSSI */
6248 /**
6249 * RSSI below which roam is kicked in by background scan
6250 * although rssi is still good
6251 */
6252 A_UINT32 good_rssi_threshold;
6253} wmi_roam_scan_extended_threshold_param;
6254
6255
6256/**
6257 * WMI_ROAM_SCAN_PERIOD: period for roam scan.
6258 * Applicable when the scan mode is Periodic or both.
6259 */
6260typedef struct {
6261 A_UINT32 tlv_header;
6262 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */
6263 /** unique id identifying the VDEV, generated by the caller */
6264 A_UINT32 vdev_id;
6265 /** roam scan period value */
6266 A_UINT32 roam_scan_period;
6267 /** Aging for Roam scans */
6268 A_UINT32 roam_scan_age;
6269} wmi_roam_scan_period_fixed_param;
6270
6271/**
6272 * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : rssi delta to trigger the roam scan.
6273 * Rssi change threshold used when mode is Rssi change (or) Both.
6274 * The FW will run the roam scan when ever the rssi changes (up or down) by the value set by this parameter.
6275 * Note scan is triggered based on the rssi threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD
6276 */
6277typedef struct {
6278 A_UINT32 tlv_header;
6279 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */
6280 /** unique id identifying the VDEV, generated by the caller */
6281 A_UINT32 vdev_id;
6282 /** roam scan rssi change threshold value */
6283 A_UINT32 roam_scan_rssi_change_thresh;
6284 /** When using Hw generated beacon RSSI interrupts */
6285 A_UINT32 bcn_rssi_weight;
6286 /** Minimum delay between two 5G scans */
6287 A_UINT32 hirssi_delay_btw_scans;
6288} wmi_roam_scan_rssi_change_threshold_fixed_param;
6289
6290#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
6291#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
6292#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
6293/**
6294 * TLV for roaming channel list
6295 */
6296typedef struct {
6297 A_UINT32 tlv_header;
6298 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
6299 /** unique id identifying the VDEV, generated by the caller */
6300 A_UINT32 vdev_id;
6301 /** WMI_CHAN_LIST_TAG */
6302 A_UINT32 chan_list_type;
6303 /** # if channels to scan */
6304 A_UINT32 num_chan;
6305/**
6306 * TLV (tag length value ) parameters follow the wmi_roam_chan_list
6307 * structure. The TLV's are:
6308 * A_UINT32 channel_list[];
6309 **/
6310} wmi_roam_chan_list_fixed_param;
6311
6312/** Authentication modes */
6313enum {
6314 WMI_AUTH_NONE, /* no upper level auth */
6315 WMI_AUTH_OPEN, /* open */
6316 WMI_AUTH_SHARED, /* shared-key */
6317 WMI_AUTH_8021X, /* 802.1x */
6318 WMI_AUTH_AUTO, /* Auto */
6319 WMI_AUTH_WPA, /* WPA */
6320 WMI_AUTH_RSNA, /* WPA2/RSNA */
6321 WMI_AUTH_CCKM, /* CCK */
6322 WMI_AUTH_WAPI, /* WAPI */
6323 WMI_AUTH_AUTO_PSK,
6324 WMI_AUTH_WPA_PSK,
6325 WMI_AUTH_RSNA_PSK,
6326 WMI_AUTH_WAPI_PSK,
6327 WMI_AUTH_FT_RSNA, /* 11r FT */
6328 WMI_AUTH_FT_RSNA_PSK,
6329 WMI_AUTH_RSNA_PSK_SHA256,
6330 WMI_AUTH_RSNA_8021X_SHA256,
6331};
6332
6333typedef struct {
6334 /** authentication mode (defined above) */
6335 A_UINT32 rsn_authmode;
6336 /** unicast cipher set */
6337 A_UINT32 rsn_ucastcipherset;
6338 /** mcast/group cipher set */
6339 A_UINT32 rsn_mcastcipherset;
6340 /** mcast/group management frames cipher set */
6341 A_UINT32 rsn_mcastmgmtcipherset;
6342} wmi_rsn_params;
6343
6344/** looking for a wps enabled AP */
6345#define WMI_AP_PROFILE_FLAG_WPS 0x1
6346/** looking for a secure AP */
6347#define WMI_AP_PROFILE_FLAG_CRYPTO 0x2
6348/** looking for a PMF enabled AP */
6349#define WMI_AP_PROFILE_FLAG_PMF 0x4
6350
6351/** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE
6352 * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear.
6353 * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE
6354 * and WMI_AP_PROFILE_FLAG_CRYPTO should be set .
6355 */
6356
6357typedef struct {
6358 A_UINT32 tlv_header;
6359 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */
6360 /** flags as defined above */
6361 A_UINT32 flags;
6362 /**
6363 * rssi thresold value: the value of the the candidate AP should
6364 * higher by this threshold than the rssi of the currrently associated AP.
6365 */
6366 A_UINT32 rssi_threshold;
6367 /**
6368 * ssid vlaue to be matched.
6369 */
6370 wmi_ssid ssid;
6371
6372 /**
6373 * security params to be matched.
6374 */
6375 /** authentication mode (defined above) */
6376 A_UINT32 rsn_authmode;
6377 /** unicast cipher set */
6378 A_UINT32 rsn_ucastcipherset;
6379 /** mcast/group cipher set */
6380 A_UINT32 rsn_mcastcipherset;
6381 /** mcast/group management frames cipher set */
6382 A_UINT32 rsn_mcastmgmtcipherset;
6383} wmi_ap_profile;
6384
6385/** Support early stop roaming scanning when finding a strong candidate AP
6386 * A 'strong' candidate is
6387 * 1) Is eligible candidate
6388 * (all conditions are met in existing candidate selection).
6389 * 2) Its rssi is better than earlystop threshold.
6390 * Earlystop threshold will be relaxed as each channel is scanned.
6391 */
6392typedef struct {
6393 A_UINT32 tlv_header;
6394 /* Minimum RSSI threshold value for early stop, unit is dB above NF. */
6395 A_UINT32 roam_earlystop_thres_min;
6396 /* Maminum RSSI threshold value for early stop, unit is dB above NF. */
6397 A_UINT32 roam_earlystop_thres_max;
6398} wmi_roam_earlystop_rssi_thres_param;
6399
Govind Singhce8fd912016-01-21 10:24:19 +05306400typedef struct {
6401 /* TLV tag and len;
6402 * tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param
6403 */
6404 A_UINT32 tlv_header;
6405 /* rssi threshold offset under trffic and dense env */
6406 A_UINT32 roam_dense_rssi_thres_offset;
6407 /* minimum number of APs to determine dense env */
6408 A_UINT32 roam_dense_min_aps;
6409 /* initial dense status detected by host
6410 * at the time of initial connection */
6411 A_UINT32 roam_dense_status;
6412 /* traffic threshold to enable aggressive roaming in dense env;
6413 * units are percent of medium occupancy, 0 - 100
6414 */
6415 A_UINT32 roam_dense_traffic_thres;
6416} wmi_roam_dense_thres_param;
6417
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006418/** Beacon filter wmi command info */
6419
6420#define BCN_FLT_MAX_SUPPORTED_IES 256
6421#define BCN_FLT_MAX_ELEMS_IE_LIST BCN_FLT_MAX_SUPPORTED_IES/32
6422
6423typedef struct bss_bcn_stats {
6424 A_UINT32 vdev_id;
6425 A_UINT32 bss_bcnsdropped;
6426 A_UINT32 bss_bcnsdelivered;
6427} wmi_bss_bcn_stats_t;
6428
6429typedef struct bcn_filter_stats {
6430 A_UINT32 bcns_dropped;
6431 A_UINT32 bcns_delivered;
6432 A_UINT32 activefilters;
6433 wmi_bss_bcn_stats_t bss_stats;
6434} wmi_bcnfilter_stats_t;
6435
6436typedef struct wmi_add_bcn_filter_cmd {
6437 A_UINT32 tlv_header;
6438 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */
6439 A_UINT32 vdev_id;
6440 /*
6441 * Following this structure is the TLV:
6442 * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
6443 */
6444} wmi_add_bcn_filter_cmd_fixed_param;
6445
6446typedef struct wmi_rmv_bcn_filter_cmd {
6447 A_UINT32 tlv_header;
6448 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */
6449 A_UINT32 vdev_id;
6450} wmi_rmv_bcn_filter_cmd_fixed_param;
6451
6452#define WMI_BCN_SEND_DTIM_ZERO 1
6453#define WMI_BCN_SEND_DTIM_BITCTL_SET 2
6454typedef struct wmi_bcn_send_from_host {
6455 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */
6456 A_UINT32 vdev_id;
6457 A_UINT32 data_len;
6458 A_UINT32 frag_ptr; /* Physical address of the frame */
6459 A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */
6460 A_UINT32 dtim_flag; /* to control CABQ traffic */
6461} wmi_bcn_send_from_host_cmd_fixed_param;
6462
6463/* cmd to support bcn snd for all vaps at once */
6464typedef struct wmi_pdev_send_bcn {
6465 A_UINT32 num_vdevs;
6466 wmi_bcn_send_from_host_cmd_fixed_param bcn_cmd[1];
6467} wmi_pdev_send_bcn_cmd_t;
6468
6469/*
6470 * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming.
6471 */
6472typedef struct {
6473 A_UINT32 tlv_header;
6474 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */
6475 /** id of AP criteria */
6476 A_UINT32 id;
6477
6478 /** unique id identifying the VDEV, generated by the caller */
6479 A_UINT32 vdev_id;
6480
6481 /*
6482 * Following this structure is the TLV:
6483 * wmi_ap_profile ap_profile; //AP profile info
6484 */
6485} wmi_roam_ap_profile_fixed_param;
6486
6487/**
6488 * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
6489 */
6490typedef struct {
6491 /** id of AP criteria */
6492 A_UINT32 id;
6493
6494 /** unique id identifying the VDEV, generated by the caller */
6495 A_UINT32 vdev_id;
6496
6497 /** AP profile info */
6498 wmi_ap_profile ap_profile;
6499
6500} wmi_ofl_scan_add_ap_profile;
6501
6502/**
6503 * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile.
6504 */
6505typedef struct {
6506 /** id of AP criteria */
6507 A_UINT32 id;
6508 /** unique id identifying the VDEV, generated by the caller */
6509 A_UINT32 vdev_id;
6510} wmi_ofl_scan_remove_ap_profile;
6511
6512/**
6513 * WMI_OFL_SCAN_PERIOD: period in msec for offload scan.
6514 * 0 will disable ofload scan and a very low value will perform a continous
6515 * scan.
6516 */
6517typedef struct {
6518 /** offload scan period value, used for scans used when not connected */
6519 A_UINT32 ofl_scan_period;
6520} wmi_ofl_scan_period;
6521
6522/* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
6523#define ROAM_OFFLOAD_PMK_BYTES (32)
6524#define ROAM_OFFLOAD_PSK_MSK_BYTES (32)
6525#define ROAM_OFFLOAD_KRK_BYTES (16)
6526#define ROAM_OFFLOAD_BTK_BYTES (32)
6527#define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
6528#define ROAM_OFFLOAD_NUM_MCS_SET (16)
6529
6530/* This TLV will be filled only in case roam offload
6531 * for wpa2-psk/okc/ese/11r is enabled */
6532typedef struct {
6533 A_UINT32 tlv_header;
6534 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
6535 A_UINT32 rssi_cat_gap; /* gap for every category bucket */
6536 A_UINT32 prefer_5g; /* prefer select 5G candidate */
6537 A_UINT32 select_5g_margin;
6538 A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */
6539 A_UINT32 capability;
6540 A_UINT32 ht_caps_info;
6541 A_UINT32 ampdu_param;
6542 A_UINT32 ht_ext_cap;
6543 A_UINT32 ht_txbf;
6544 A_UINT32 asel_cap;
6545 A_UINT32 qos_enabled;
6546 A_UINT32 qos_caps;
6547 A_UINT32 wmm_caps;
6548 A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET >> 2]; /* since this 4 byte aligned,
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306549 * we don't declare it as
6550 * tlv array */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006551} wmi_roam_offload_tlv_param;
6552
6553/* flags for 11i offload */
6554#define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */
6555/* from bit 1 to bit 31 are reserved */
6556
6557#define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
6558 (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306559} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006560
6561#define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
6562 (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306563} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006564
6565#define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \
6566 ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
6567
6568/* This TLV will be filled only in case of wpa-psk/wpa2-psk */
6569typedef struct {
6570 A_UINT32 tlv_header;
6571 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
6572 A_UINT32 flags;
6573 /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
6574 A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES >> 2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
6575 A_UINT32 pmk_len;
6576 /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/
6577} wmi_roam_11i_offload_tlv_param;
6578
6579/* This TLV will be filled only in case of 11R*/
6580typedef struct {
6581 A_UINT32 tlv_header;
6582 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
6583 A_UINT32 mdie_present;
6584 A_UINT32 mdid;
6585 A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN >> 2];
6586 A_UINT32 r0kh_id_len;
6587 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 */
6588 A_UINT32 psk_msk_len;
6589 /**length of psk_msk*/
6590} wmi_roam_11r_offload_tlv_param;
6591
6592/* This TLV will be filled only in case of ESE */
6593typedef struct {
6594 A_UINT32 tlv_header;
6595 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
6596 A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES >> 2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
6597 A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES >> 2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
6598} wmi_roam_ese_offload_tlv_param;
6599
6600/** WMI_ROAM_EVENT: roam event triggering the host roam logic.
6601 * generated when ever a better AP is found in the recent roam scan (or)
6602 * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received
6603 * from the current AP.
6604 */
6605typedef struct {
6606 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */
6607 /** unique id identifying the VDEV, generated by the caller */
6608 A_UINT32 vdev_id;
6609 /** reason for roam event */
6610 A_UINT32 reason;
6611 /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI*/
6612 A_UINT32 rssi;
6613
6614} wmi_roam_event_fixed_param;
6615
Nirav Shah439e6262015-11-05 10:53:18 +05306616/* roam_reason: bits 0-3 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006617#define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */
6618#define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */
6619#define WMI_ROAM_REASON_DEAUTH 0x2 /** deauth/disassoc received */
6620#define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */
6621#define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306622 SSID and Security profile in
6623 WMI_ROAM_AP_PROFILE, found during scan
6624 triggered upon FINAL_BMISS **/
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006625#define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */
Nirav Shah439e6262015-11-05 10:53:18 +05306626/* reserved up through 0xF */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006627
Nirav Shah439e6262015-11-05 10:53:18 +05306628/* subnet status: bits 4-5 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006629typedef enum {
6630 WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0,
6631 WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED,
6632 WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED,
6633} wmi_roam_subnet_change_status;
6634
Nirav Shah439e6262015-11-05 10:53:18 +05306635#define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30
6636#define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4
6637
6638#define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \
6639 do { \
6640 (roam_reason) |= \
6641 (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \
6642 WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \
6643 } while (0)
6644
6645#define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \
6646 (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \
6647 WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT)
6648
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006649/**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc)
6650 * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations
6651 */
6652typedef struct {
6653 A_UINT32 tlv_header;
6654 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */
6655 A_UINT32 vdev_id;
6656 /**unique id identifying the VDEV, generated by the caller*/
6657 A_UINT32 num_ric_request;
6658 /**number of ric request ie send to firmware.(max value is 2 now)*/
6659 A_UINT32 is_add_ric;
6660 /**support add ric or delete ric*/
6661} wmi_ric_request_fixed_param;
6662
6663/**tspec element: refer to 8.4.2.32 of 802.11 2012 spec
6664 * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming
6665 */
6666typedef struct {
6667 A_UINT32 tlv_header;
6668 A_UINT32 ts_info; /** bits value of TS Info field.*/
6669 A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/
6670 A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/
6671 A_UINT32 min_service_interval; /**The Minimum Service Interval field*/
6672 A_UINT32 max_service_interval; /**The Maximum Service Interval field*/
6673 A_UINT32 inactivity_interval; /**The Inactivity Interval field*/
6674 A_UINT32 suspension_interval; /**The Suspension Interval field*/
6675 A_UINT32 svc_start_time; /**The Service Start Time field*/
6676 A_UINT32 min_data_rate; /**The Minimum Data Rate field*/
6677 A_UINT32 mean_data_rate; /**The Mean Data Rate field*/
6678 A_UINT32 peak_data_rate; /**The Peak Data Rate field*/
6679 A_UINT32 max_burst_size; /**The Burst Size field*/
6680 A_UINT32 delay_bound; /**The Delay Bound field*/
6681 A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/
6682 A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/
6683 A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/
6684} wmi_ric_tspec;
6685
6686/* flags for roam_invoke_cmd */
6687/* add this channel into roam cache channel list after this command is finished */
6688#define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0
6689/* from bit 1 to bit 31 are reserved */
6690
6691#define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
6692 (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306693 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006694
6695#define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \
6696 (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306697 } while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006698
6699#define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05306700 ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08006701
6702
6703#define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */
6704#define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */
6705#define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */
6706
6707#define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */
6708#define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */
6709
6710/** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully
6711 *
6712 * if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed.
6713 * if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed
6714 *
6715 * This command can be used to add specific channel into roam cached channel list by following
6716 * <roam_scan_ch_mode> = 0
6717 * <roam_ap_sel_mode> = 0
6718 * <roam_delay> = 0
6719 * <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE
6720 * <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given)
6721 * <channel_no> = channel list to be added
6722 */
6723typedef struct {
6724 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */
6725 A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */
6726 A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */
6727 A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */
6728 A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */
6729 A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */
6730 A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */
6731 A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */
6732 /**
6733 * TLV (tag length value ) parameters follows roam_invoke_req
6734 * The TLV's are:
6735 * A_UINT32 channel_list[];
6736 * wmi_mac_addr bssid_list[];
6737 */
6738} wmi_roam_invoke_cmd_fixed_param;
6739
6740/* Definition for op_bitmap */
6741enum {
6742 ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1,
6743 ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2,
6744 ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4,
6745};
6746
6747typedef struct {
6748 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */
6749 A_UINT32 tlv_header;
6750 /** Unique id identifying the VDEV on which roaming filter is adopted */
6751 A_UINT32 vdev_id;
6752 A_UINT32 flags; /** flags for filter */
6753 /** 32 bit bitmap to be set on.
6754 * bit0 = first param,
6755 * bit 1 = second param...etc. Can be or'ed
6756 */
6757 A_UINT32 op_bitmap;
6758 /* number of blacklist in the TLV variable bssid_black_list */
6759 A_UINT32 num_bssid_black_list;
6760 /* number of whitelist in the TLV variable ssid_white_list */
6761 A_UINT32 num_ssid_white_list;
6762 /* only for lfr 3.0. number of preferred list & factor in the TLV */
6763 A_UINT32 num_bssid_preferred_list;
6764 /**
6765 * TLV (tag length value ) parameters follows roam_filter_list_cmd
6766 * The TLV's are:
6767 * wmi_mac_addr bssid_black_list[];
6768 * wmi_ssid ssid_white_list[];
6769 * wmi_mac_addr bssid_preferred_list[];
6770 * A_UINT32 bssid_preferred_factor[];
6771 */
6772} wmi_roam_filter_fixed_param;
6773
6774typedef struct {
6775 A_UINT8 address[4]; /* IPV4 address in Network Byte Order */
6776} WMI_IPV4_ADDR;
6777
6778typedef struct _WMI_IPV6_ADDR {
6779 A_UINT8 address[16]; /* IPV6 in Network Byte Order */
6780} WMI_IPV6_ADDR;
6781
6782/* flags for subnet change detection */
6783#define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0
6784#define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1
6785/* bit 2 to bit 31 are reserved */
6786
6787/* set IPv4 enabled/disabled flag and get the flag */
6788#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \
6789 (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
6790} while (0)
6791
6792#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \
6793 (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \
6794} while (0)
6795
6796#define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \
6797 ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED))
6798
6799/* set IPv6 enabled flag, disabled and get the flag */
6800#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \
6801 (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
6802} while (0)
6803
6804#define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \
6805 (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \
6806} while (0)
6807
6808#define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \
6809 ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED))
6810
6811/**
6812 * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses
6813 * to FW. FW uses these parameters for subnet change detection.
6814 */
6815typedef struct {
6816 /*
6817 * TLV tag and len; tag equals
6818 * WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param
6819 */
6820 A_UINT32 tlv_header;
6821 /** unique id identifying the VDEV, generated by the caller */
6822 A_UINT32 vdev_id;
6823 /** IPv4/IPv6 enabled/disabled */
6824 /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/
6825 DISABLED */
6826 A_UINT32 flag;
6827 /** Gateway MAC address */
6828 wmi_mac_addr inet_gw_mac_addr;
6829 /** IP addresses */
6830 WMI_IPV4_ADDR inet_gw_ip_v4_addr;
6831 WMI_IPV6_ADDR inet_gw_ip_v6_addr;
6832 /** Number of software retries for ARP/Neighbor solicitation request */
6833 A_UINT32 max_retries;
6834 /** timeout in milliseconds for each ARP request*/
6835 A_UINT32 timeout;
6836 /** number of skipped aps **/
6837 A_UINT32 num_skip_subnet_change_detection_bssid_list;
6838/**
6839 * TLV (tag length value ) parameters follows roam_subnet_change_config_cmd
6840 * structure. The TLV's are:
6841 * wmi_mac_addr skip_subnet_change_detection_bssid_list [];
6842 **/
6843} wmi_roam_subnet_change_config_fixed_param;
6844
6845/** WMI_PROFILE_MATCH_EVENT: offload scan
6846 * generated when ever atleast one of the matching profiles is found
6847 * in recent NLO scan. no data is carried with the event.
6848 */
6849
6850/** P2P specific commands */
6851
6852/**
6853 * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by
6854 * FW to generate P2P IE tobe carried in probe response frames.
6855 * FW will respond to probe requests while in listen state.
6856 */
6857typedef struct {
6858 /* number of secondary device types,supported */
6859 A_UINT32 num_secondary_dev_types;
6860 /**
6861 * followed by 8 bytes of primary device id and
6862 * num_secondary_dev_types * 8 bytes of secondary device
6863 * id.
6864 */
6865} wmi_p2p_dev_set_device_info;
6866
6867/** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability
6868 * state. if enabled, an active STA/AP will respond to P2P probe requests on
6869 * the operating channel of the VDEV.
6870 */
6871
6872typedef struct {
6873 /* 1:enable disoverability, 0:disable discoverability */
6874 A_UINT32 enable_discoverability;
6875} wmi_p2p_set_discoverability;
6876
6877/** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to
6878 * beacons generated by FW. used in FW beacon mode.
6879 * the FW will add this IE to beacon in addition to the beacon
6880 * template set by WMI_BCN_TMPL_CMDID command.
6881 */
6882typedef struct {
6883 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */
6884 /** unique id identifying the VDEV, generated by the caller */
6885 A_UINT32 vdev_id;
6886 /* ie length */
6887 A_UINT32 ie_buf_len;
6888 /* Following this structure is the TLV byte stream of ie data of length ie_buf_len:
6889 * A_UINT8 ie_data[]; // length in byte given by field num_data.
6890 */
6891
6892} wmi_p2p_go_set_beacon_ie_fixed_param;
6893
6894/** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to
6895 * probe response generated by FW. used in FW beacon mode.
6896 * the FW will add this IE to probe response in addition to the probe response
6897 * template set by WMI_PRB_TMPL_CMDID command.
6898 */
6899typedef struct {
6900 /** unique id identifying the VDEV, generated by the caller */
6901 A_UINT32 vdev_id;
6902 /* ie length */
6903 A_UINT32 ie_buf_len;
6904 /*followed by byte stream of ie data of length ie_buf_len */
6905} wmi_p2p_go_set_probe_resp_ie;
6906
6907/** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will
6908 * be used by the FW to parse the P2P NoA attribute in beacons, probe resposes
6909 * and action frames received by the P2P Client.
6910 */
6911typedef struct {
6912 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */
6913 /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */
6914 A_UINT32 p2p_ie_oui_type;
6915 /** OS specific NoA Attribute ID */
6916 A_UINT32 p2p_noa_attribute;
6917} wmi_p2p_set_vendor_ie_data_cmd_fixed_param;
6918
6919/*----P2P disc offload definition ----*/
6920
6921typedef struct {
6922 A_UINT32 pattern_type;
6923 /**
6924 * TLV (tag length value ) paramerters follow the pattern structure.
6925 * TLV can contain bssid list, ssid list and
6926 * ie. the TLV tags are defined above;
6927 */
6928} wmi_p2p_disc_offload_pattern_cmd;
6929
6930typedef struct {
6931 /* unique id identifying the VDEV, generated by the caller */
6932 A_UINT32 vdev_id;
6933 /* mgmt type of the ie */
6934 A_UINT32 mgmt_type;
6935 /* ie length */
6936 A_UINT32 ie_buf_len;
6937 /*followed by byte stream of ie data of length ie_buf_len */
6938} wmi_p2p_disc_offload_appie_cmd;
6939
6940typedef struct {
6941 /* enable/disable p2p find offload */
6942 A_UINT32 enable;
6943 /* unique id identifying the VDEV, generated by the caller */
6944 A_UINT32 vdev_id;
6945 /* p2p find type */
6946 A_UINT32 disc_type;
6947 /* p2p find perodic */
6948 A_UINT32 perodic;
6949 /* p2p find listen channel */
6950 A_UINT32 listen_channel;
6951 /* p2p find full channel number */
6952 A_UINT32 num_scan_chans;
6953 /**
6954 * TLV (tag length value ) paramerters follow the pattern structure.
6955 * TLV contain channel list
6956 */
6957} wmi_p2p_disc_offload_config_cmd;
6958
6959/*----P2P OppPS definition ----*/
6960typedef struct {
6961 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */
6962 A_UINT32 tlv_header;
6963 /* unique id identifying the VDEV, generated by the caller */
6964 A_UINT32 vdev_id;
6965 /* OppPS attributes */
6966 /** Bit 0: Indicate enable/disable of OppPS
6967 * Bits 7-1: Ctwindow in TUs
6968 * Bits 31-8: Reserved
6969 */
6970 A_UINT32 oppps_attr;
6971} wmi_p2p_set_oppps_cmd_fixed_param;
6972
6973#define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1
6974#define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0
6975
6976#define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \
6977 WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
6978
6979#define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \
6980 WMI_F_RMW((hdr)->oppps_attr, 0x1, \
6981 WMI_UNIFIED_OPPPS_ATTR_ENALBED);
6982
6983#define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe
6984#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1
6985
6986#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \
6987 WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
6988
6989#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \
6990 WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \
6991 WMI_UNIFIED_OPPPS_ATTR_CTWIN);
6992
6993typedef struct {
6994 A_UINT32 time32; /* upper 32 bits of time stamp */
6995 A_UINT32 time0; /* lower 32 bits of time stamp */
6996} A_TIME64;
6997
6998typedef enum wmi_peer_sta_kickout_reason {
6999 WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */
7000 WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1,
7001 WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2,
7002 WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3,
7003 WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */
7004 WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5,
7005} PEER_KICKOUT_REASON;
7006
7007typedef struct {
7008 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */
7009 /** peer mac address */
7010 wmi_mac_addr peer_macaddr;
7011 /** Reason code, defined as above */
7012 A_UINT32 reason;
7013 /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */
7014 A_UINT32 rssi;
7015} wmi_peer_sta_kickout_event_fixed_param;
7016
7017#define WMI_WLAN_PROFILE_MAX_HIST 3
7018#define WMI_WLAN_PROFILE_MAX_BIN_CNT 32
7019
7020typedef struct _wmi_wlan_profile_t {
7021 A_UINT32 tlv_header;
7022 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */
7023 A_UINT32 id;
7024 A_UINT32 cnt;
7025 A_UINT32 tot;
7026 A_UINT32 min;
7027 A_UINT32 max;
7028 A_UINT32 hist_intvl;
7029 A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST];
7030} wmi_wlan_profile_t;
7031
7032typedef struct _wmi_wlan_profile_ctx_t {
7033 A_UINT32 tlv_header;
7034 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */
7035 A_UINT32 tot; /* time in us */
7036 A_UINT32 tx_msdu_cnt;
7037 A_UINT32 tx_mpdu_cnt;
7038 A_UINT32 tx_ppdu_cnt;
7039 A_UINT32 rx_msdu_cnt;
7040 A_UINT32 rx_mpdu_cnt;
7041 A_UINT32 bin_count;
7042} wmi_wlan_profile_ctx_t;
7043
7044typedef struct {
7045 A_UINT32 tlv_header;
7046 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */
7047 A_UINT32 enable;
7048} wmi_wlan_profile_trigger_cmd_fixed_param;
7049
7050typedef struct {
7051 A_UINT32 tlv_header;
7052 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */
7053 A_UINT32 value;
7054} wmi_wlan_profile_get_prof_data_cmd_fixed_param;
7055
7056typedef struct {
7057 A_UINT32 tlv_header;
7058 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */
7059 A_UINT32 profile_id;
7060 A_UINT32 value;
7061} wmi_wlan_profile_set_hist_intvl_cmd_fixed_param;
7062
7063typedef struct {
7064 A_UINT32 tlv_header;
7065 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */
7066 A_UINT32 profile_id;
7067 A_UINT32 enable;
7068} wmi_wlan_profile_enable_profile_id_cmd_fixed_param;
7069
7070/*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20.
7071 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS
7072 when comparing wifi header.*/
7073/* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */
7074#define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146
7075#define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */
7076#define WOW_DEFAULT_BITMASK_SIZE 146
7077#define WOW_DEFAULT_BITMASK_SIZE_DWORD 37
7078#define WOW_MAX_BITMAP_FILTERS 32
7079#define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16
7080#define WOW_EXTEND_PATTERN_MATCH_CNT 16
7081#define WOW_SHORT_PATTERN_MATCH_CNT 8
7082#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 +05307083 The 148 comes from (128 - 14 ) payload size + 8bytes LLC + 26bytes MAC header */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007084#define WOW_DEFAULT_IOAC_PATTERN_SIZE 6
7085#define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2
7086#define WOW_DEFAULT_IOAC_RANDOM_SIZE 6
7087#define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2
7088#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120
7089#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30
7090#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32
7091#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8
7092#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32
7093#define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08007094#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128
7095#define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007096
7097typedef enum pattern_type_e {
7098 WOW_PATTERN_MIN = 0,
7099 WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
7100 WOW_IPV4_SYNC_PATTERN,
7101 WOW_IPV6_SYNC_PATTERN,
7102 WOW_WILD_CARD_PATTERN,
7103 WOW_TIMER_PATTERN,
7104 WOW_MAGIC_PATTERN,
7105 WOW_IPV6_RA_PATTERN,
7106 WOW_IOAC_PKT_PATTERN,
7107 WOW_IOAC_TMR_PATTERN,
7108 WOW_IOAC_SOCK_PATTERN,
7109 WOW_PATTERN_MAX
7110} WOW_PATTERN_TYPE;
7111
7112typedef enum event_type_e {
7113 WOW_BMISS_EVENT = 0,
7114 WOW_BETTER_AP_EVENT,
7115 WOW_DEAUTH_RECVD_EVENT,
7116 WOW_MAGIC_PKT_RECVD_EVENT,
7117 WOW_GTK_ERR_EVENT,
7118 WOW_FOURWAY_HSHAKE_EVENT,
7119 WOW_EAPOL_RECVD_EVENT,
7120 WOW_NLO_DETECTED_EVENT,
7121 WOW_DISASSOC_RECVD_EVENT,
7122 WOW_PATTERN_MATCH_EVENT,
7123 WOW_CSA_IE_EVENT,
7124 WOW_PROBE_REQ_WPS_IE_EVENT,
7125 WOW_AUTH_REQ_EVENT,
7126 WOW_ASSOC_REQ_EVENT,
7127 WOW_HTT_EVENT,
7128 WOW_RA_MATCH_EVENT,
7129 WOW_HOST_AUTO_SHUTDOWN_EVENT,
7130 WOW_IOAC_MAGIC_EVENT,
7131 WOW_IOAC_SHORT_EVENT,
7132 WOW_IOAC_EXTEND_EVENT,
7133 WOW_IOAC_TIMER_EVENT,
7134 WOW_DFS_PHYERR_RADAR_EVENT,
7135 WOW_BEACON_EVENT,
7136 WOW_CLIENT_KICKOUT_EVENT,
7137 WOW_NAN_EVENT,
7138 WOW_EXTSCAN_EVENT,
7139 WOW_IOAC_REV_KA_FAIL_EVENT,
7140 WOW_IOAC_SOCK_EVENT,
7141 WOW_NLO_SCAN_COMPLETE_EVENT,
7142} WOW_WAKE_EVENT_TYPE;
7143
7144typedef enum wake_reason_e {
7145 WOW_REASON_UNSPECIFIED = -1,
7146 WOW_REASON_NLOD = 0,
7147 WOW_REASON_AP_ASSOC_LOST,
7148 WOW_REASON_LOW_RSSI,
7149 WOW_REASON_DEAUTH_RECVD,
7150 WOW_REASON_DISASSOC_RECVD,
7151 WOW_REASON_GTK_HS_ERR,
7152 WOW_REASON_EAP_REQ,
7153 WOW_REASON_FOURWAY_HS_RECV,
7154 WOW_REASON_TIMER_INTR_RECV,
7155 WOW_REASON_PATTERN_MATCH_FOUND,
7156 WOW_REASON_RECV_MAGIC_PATTERN,
7157 WOW_REASON_P2P_DISC,
7158 WOW_REASON_WLAN_HB,
7159 WOW_REASON_CSA_EVENT,
7160 WOW_REASON_PROBE_REQ_WPS_IE_RECV,
7161 WOW_REASON_AUTH_REQ_RECV,
7162 WOW_REASON_ASSOC_REQ_RECV,
7163 WOW_REASON_HTT_EVENT,
7164 WOW_REASON_RA_MATCH,
7165 WOW_REASON_HOST_AUTO_SHUTDOWN,
7166 WOW_REASON_IOAC_MAGIC_EVENT,
7167 WOW_REASON_IOAC_SHORT_EVENT,
7168 WOW_REASON_IOAC_EXTEND_EVENT,
7169 WOW_REASON_IOAC_TIMER_EVENT,
7170 WOW_REASON_ROAM_HO,
7171 WOW_REASON_DFS_PHYERR_RADADR_EVENT,
7172 WOW_REASON_BEACON_RECV,
7173 WOW_REASON_CLIENT_KICKOUT_EVENT,
7174 WOW_REASON_NAN_EVENT,
7175 WOW_REASON_EXTSCAN,
7176 WOW_REASON_RSSI_BREACH_EVENT,
7177 WOW_REASON_IOAC_REV_KA_FAIL_EVENT,
7178 WOW_REASON_IOAC_SOCK_EVENT,
7179 WOW_REASON_NLO_SCAN_COMPLETE,
7180 WOW_REASON_PACKET_FILTER_MATCH,
7181 WOW_REASON_ASSOC_RES_RECV,
7182 WOW_REASON_REASSOC_REQ_RECV,
7183 WOW_REASON_REASSOC_RES_RECV,
7184 WOW_REASON_ACTION_FRAME_RECV,
Manikandan Mohan130eb572015-12-23 13:53:34 -08007185 WOW_REASON_BPF_ALLOW,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007186 WOW_REASON_DEBUG_TEST = 0xFF,
7187} WOW_WAKE_REASON_TYPE;
7188
7189typedef enum {
7190 WOW_IFACE_PAUSE_ENABLED,
7191 WOW_IFACE_PAUSE_DISABLED
7192} WOW_IFACE_STATUS;
7193
7194enum {
7195 /* some win10 platfrom will not assert pcie_reset for wow.*/
7196 WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001,
7197};
7198
7199
7200typedef struct {
7201 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */
7202 A_UINT32 enable;
7203 A_UINT32 pause_iface_config;
7204 A_UINT32 flags; /* WMI_WOW_FLAG enums */
7205} wmi_wow_enable_cmd_fixed_param;
7206
7207typedef struct {
7208 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */
7209 /** Reserved for future use */
7210 A_UINT32 reserved0;
7211} wmi_wow_hostwakeup_from_sleep_cmd_fixed_param;
7212
7213#define WOW_ICMPV6_NA_FILTER_DISABLE 0
7214#define WOW_ICMPV6_NA_FILTER_ENABLE 1
7215
7216typedef struct {
7217 /* TLV tag and len;
7218 * tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param
7219 */
7220 A_UINT32 tlv_header;
7221 A_UINT32 vdev_id;
7222 A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */
7223} wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param;
7224
7225typedef struct bitmap_pattern_s {
7226 A_UINT32 tlv_header;
7227 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */
7228 A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD];
7229 A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD];
7230 A_UINT32 pattern_offset;
7231 A_UINT32 pattern_len;
7232 A_UINT32 bitmask_len;
7233 A_UINT32 pattern_id; /* must be less than max_bitmap_filters */
7234} WOW_BITMAP_PATTERN_T;
7235
7236typedef struct ipv4_sync_s {
7237 A_UINT32 tlv_header;
7238 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */
7239 A_UINT32 ipv4_src_addr;
7240 A_UINT32 ipv4_dst_addr;
7241 A_UINT32 tcp_src_prt;
7242 A_UINT32 tcp_dst_prt;
7243} WOW_IPV4_SYNC_PATTERN_T;
7244
7245typedef struct ipv6_sync_s {
7246 A_UINT32 tlv_header;
7247 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */
7248 A_UINT32 ipv6_src_addr[4];
7249 A_UINT32 ipv6_dst_addr[4];
7250 A_UINT32 tcp_src_prt;
7251 A_UINT32 tcp_dst_prt;
7252} WOW_IPV6_SYNC_PATTERN_T;
7253
7254typedef struct WOW_MAGIC_PATTERN_CMD {
7255 A_UINT32 tlv_header;
7256 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */
7257 wmi_mac_addr macaddr;
7258} WOW_MAGIC_PATTERN_CMD;
7259
7260typedef enum wow_ioac_pattern_type {
7261 WOW_IOAC_MAGIC_PATTERN = 1,
7262 WOW_IOAC_SHORT_PATTERN,
7263 WOW_IOAC_EXTEND_PATTERN,
7264} WOW_IOAC_PATTERN_TYPE;
7265
7266typedef struct ioac_sock_pattern_s {
7267 /**
7268 * TLV tag and len;
7269 * tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T
7270 */
7271 A_UINT32 tlv_header;
7272 A_UINT32 id;
7273 A_UINT32 local_ipv4;
7274 A_UINT32 remote_ipv4;
7275 A_UINT32 local_port;
7276 A_UINT32 remote_port;
7277 A_UINT32 pattern_len; /* units = bytes */
7278 A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD];
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08007279 WMI_IPV6_ADDR local_ipv6;
7280 WMI_IPV6_ADDR remote_ipv6;
7281 A_UINT32 ack_nak_len;
7282 A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
7283 A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007284} WOW_IOAC_SOCK_PATTERN_T;
7285
7286typedef struct ioac_pkt_pattern_s {
7287 A_UINT32 tlv_header;
7288 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */
7289 A_UINT32 pattern_type;
7290 A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD];
7291 A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD];
7292 A_UINT32 pattern_len;
7293 A_UINT32 random_len;
7294} WOW_IOAC_PKT_PATTERN_T;
7295
7296typedef struct ioac_tmr_pattern_s {
7297 A_UINT32 tlv_header;
7298 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */
7299 A_UINT32 wake_in_s;
7300 A_UINT32 vdev_id;
7301} WOW_IOAC_TMR_PATTERN_T;
7302
7303typedef struct {
7304 A_UINT32 tlv_header;
7305 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */
7306 A_UINT32 nID;
7307} WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param;
7308
7309typedef struct {
7310 A_UINT32 tlv_header;
7311 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */
7312 A_UINT32 nID;
7313} WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param;
7314
7315typedef struct ioac_keepalive_s {
7316 A_UINT32 tlv_header;
7317 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */
7318 A_UINT32
7319 keepalive_pkt_buf
7320 [WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD];
7321 A_UINT32 keepalive_pkt_len;
7322 A_UINT32 period_in_ms;
7323 A_UINT32 vdev_id;
7324 A_UINT32 max_loss_cnt;
7325 A_UINT32 local_ipv4;
7326 A_UINT32 remote_ipv4;
7327 A_UINT32 local_port;
7328 A_UINT32 remote_port;
7329 A_UINT32 recv_period_in_ms;
7330 A_UINT32 rev_ka_size;
7331 A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD];
Krishna Kumaar Natarajan04c4e912015-11-19 16:04:32 -08007332 WMI_IPV6_ADDR local_ipv6;
7333 WMI_IPV6_ADDR remote_ipv6;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007334} WMI_WOW_IOAC_KEEPALIVE_T;
7335
7336typedef struct {
7337 A_UINT32 tlv_header;
7338 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */
7339 A_UINT32 vdev_id;
7340 A_UINT32 pattern_type;
7341/*
7342 * Following this struct are these TLVs. Note that they are all array of structures
7343 * but can have at most one element. Which TLV is empty or has one element depends
7344 * on the field pattern_type. This is to emulate an union.
7345 * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[];
7346 * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[];
7347 */
7348} WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param;
7349
7350typedef struct {
7351 A_UINT32 tlv_header;
7352 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */
7353 A_UINT32 vdev_id;
7354 A_UINT32 pattern_type;
7355 A_UINT32 pattern_id;
7356} WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param;
7357
7358typedef struct {
7359 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */
7360 A_UINT32 vdev_id;
7361 A_UINT32 pattern_id;
7362 A_UINT32 pattern_type;
7363 /*
7364 * Following this struct are these TLVs. Note that they are all array of structures
7365 * but can have at most one element. Which TLV is empty or has one element depends
7366 * on the field pattern_type. This is to emulate an union.
7367 * WOW_BITMAP_PATTERN_T pattern_info_bitmap[];
7368 * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[];
7369 * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[];
7370 * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[];
7371 * A_UINT32 pattern_info_timeout[];
7372 * A_UINT32 ra_ratelimit_interval;
7373 */
7374} WMI_WOW_ADD_PATTERN_CMD_fixed_param;
7375
7376typedef struct {
7377 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */
7378 A_UINT32 vdev_id;
7379 A_UINT32 pattern_id;
7380 A_UINT32 pattern_type;
7381} WMI_WOW_DEL_PATTERN_CMD_fixed_param;
7382
7383typedef struct {
7384 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */
7385 A_UINT32 vdev_id;
7386 A_UINT32 is_add;
7387 A_UINT32 event_bitmap;
7388} WMI_WOW_ADD_DEL_EVT_CMD_fixed_param;
7389
7390/*
7391 * This structure is used to set the pattern to check UDP packet in WOW mode.
7392 * If match, construct a tx frame in a local buffer to send through the peer
7393 * AP to the entity in the IP network that sent the UDP packet to this STA.
7394 */
7395typedef struct {
7396 /*
7397 * TLV tag and len;
7398 * tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param
7399 */
7400 A_UINT32 tlv_header;
7401 A_UINT32 vdev_id;
7402 A_UINT32 enable; /* 1: enable, 0: disable */
7403 /*
7404 * dest_port -
7405 * bits 7:0 contain the LSB of the UDP dest port,
7406 * bits 15:8 contain the MSB of the UDP dest port
7407 */
7408 A_UINT32 dest_port;
7409 A_UINT32 pattern_len; /* length in byte of pattern[] */
7410 A_UINT32 response_len; /* length in byte of response[] */
7411 /*
7412 * Following this struct are the TLV's:
7413 * payload of UDP packet to be checked, network byte order
7414 * A_UINT8 pattern[];
7415 * payload of UDP packet to be response, network byte order
7416 * A_UINT8 response[];
7417 */
7418} WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param;
7419
7420/*
7421 * This structure is used to set the pattern for WOW host wakeup pin pulse
7422 * pattern confirguration.
7423 */
7424typedef struct {
7425 /*
7426 * TLV tag and len; tag equals
7427 * WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param
7428 */
7429 A_UINT32 tlv_header;
7430
7431 /* 1: enable, 0: disable */
7432 A_UINT32 enable;
7433
7434 /* pin for host wakeup */
7435 A_UINT32 pin;
7436
7437 /* interval for keeping low voltage, unit: ms */
7438 A_UINT32 interval_low;
7439
7440 /* interval for keeping high voltage, unit: ms */
7441 A_UINT32 interval_high;
7442
7443 /* repeat times for pulse (0xffffffff means forever) */
7444 A_UINT32 repeat_cnt;
7445} WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param;
7446
7447typedef struct wow_event_info_s {
7448 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */
7449 A_UINT32 vdev_id;
7450 A_UINT32 flag; /*This is current reserved. */
7451 A_INT32 wake_reason;
7452 A_UINT32 data_len;
7453} WOW_EVENT_INFO_fixed_param;
7454
7455typedef struct wow_initial_wakeup_event_s {
7456 /*
7457 * TLV tag and len; tag equals
7458 * WOW_INITIAL_WAKEUP_EVENT_fixed_param
7459 */
7460 A_UINT32 tlv_header;
7461 A_UINT32 vdev_id;
7462} WOW_INITIAL_WAKEUP_EVENT_fixed_param;
7463
7464typedef enum {
7465 WOW_EVENT_INFO_TYPE_PACKET = 0x0001,
7466 WOW_EVENT_INFO_TYPE_BITMAP,
7467 WOW_EVENT_INFO_TYPE_GTKIGTK,
7468} WOW_EVENT_INFO_TYPE;
7469
7470typedef struct wow_event_info_section_s {
7471 A_UINT32 data_type;
7472 A_UINT32 data_len;
7473} WOW_EVENT_INFO_SECTION;
7474
7475typedef struct wow_event_info_section_packet_s {
7476 A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE];
7477} WOW_EVENT_INFO_SECTION_PACKET;
7478
7479typedef struct wow_event_info_section_bitmap_s {
7480 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */
7481 A_UINT32 flag; /*This is current reserved. */
7482 A_UINT32 value; /*This could be the pattern id for bitmap pattern. */
7483 A_UINT32 org_len; /*The length of the orginal packet. */
7484} WOW_EVENT_INFO_SECTION_BITMAP;
7485
7486/**
7487 * This command is sent from WLAN host driver to firmware to
7488 * enable or disable D0-WOW. D0-WOW means APSS suspend with
7489 * PCIe link and DDR being active.
7490 *
7491 *
7492 * Entering D0-WOW Mode (based on kernel suspend request):
7493 * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1)
7494 * target: Take action (e.g. dbglog suspend)
7495 * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message)
7496 *
7497 * Exiting D0-WOW mode (based on kernel resume OR target->host message received)
7498 * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0)
7499 * target: Take action (e.g. dbglog resume)
7500 * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID
7501 *
7502 * This command is applicable only on the PCIE LL systems
7503 * Host can enter either D0-WOW or WOW mode, but NOT both at same time
7504 * Decision to enter D0-WOW or WOW is based on active interfaces
7505 *
7506 */
7507typedef struct {
7508 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */
7509 A_UINT32 enable; /* 1 = enable, 0 = disable */
7510} wmi_d0_wow_enable_disable_cmd_fixed_param;
7511
7512typedef enum extend_wow_type_e {
7513 EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */
7514 EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */
7515 EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08007516 EXTWOW_TYPE_APP_PULSETEST,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007517 EXTWOW_DISABLED = 255,
7518} EXTWOW_TYPE;
7519
7520typedef struct {
7521 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */
7522 A_UINT32 vdev_id;
7523 A_UINT32 type;
7524 A_UINT32 wakeup_pin_num;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08007525 A_UINT32 swol_pulsetest_type;
7526 A_UINT32 swol_pulsetest_application;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007527} wmi_extwow_enable_cmd_fixed_param;
7528
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08007529#define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8
7530#define SWOL_INDOOR_KEY_LEN 16
7531
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007532typedef struct {
7533 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */
7534 A_UINT32 vdev_id;
7535 wmi_mac_addr wakee_mac;
7536 A_UINT8 ident[8];
7537 A_UINT8 passwd[16];
7538 A_UINT32 ident_len;
7539 A_UINT32 passwd_len;
Manikandan Mohan7a32f7e2015-12-23 12:35:12 -08007540
7541 /* indoor check parameters */
7542 /* key for mac addresses specified in swol_indoor_key_mac
7543 * Big-endian hosts need to byte-swap the bytes within each 4-byte
7544 * segment of this array, so the bytes will return to their original
7545 * order when the entire WMI message contents are byte-swapped to
7546 * convert from big-endian to little-endian format.
7547 */
7548 A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN];
7549 /* key length for specified mac address index
7550 * Big-endian hosts need to byte-swap the bytes within each 4-byte
7551 * segment of this array, so the bytes will return to their original
7552 * order when the entire WMI message contents are byte-swapped to
7553 * convert from big-endian to little-endian format.
7554 */
7555 A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
7556 /* mac address array allowed to wakeup host*/
7557 wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
7558 /* app mask for the mac addresses specified in swol_indoor_key_mac */
7559 A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX];
7560 A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */
7561 A_UINT32 swol_indoor_pw_check; /* whether to check password */
7562 A_UINT32 swol_indoor_pattern; /* wakeup pattern */
7563 A_UINT32 swol_indoor_exception; /* wakeup when exception happens */
7564 A_UINT32 swol_indoor_exception_app;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007565} wmi_extwow_set_app_type1_params_cmd_fixed_param;
7566
7567typedef struct {
7568 A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */
7569 A_UINT32 vdev_id;
7570
7571 A_UINT8 rc4_key[16];
7572 A_UINT32 rc4_key_len;
7573
7574 /** ip header parameter */
7575 A_UINT32 ip_id; /* NC id */
7576 A_UINT32 ip_device_ip; /* NC IP address */
7577 A_UINT32 ip_server_ip; /* Push server IP address */
7578
7579 /** tcp header parameter */
7580 A_UINT16 tcp_src_port; /* NC TCP port */
7581 A_UINT16 tcp_dst_port; /* Push server TCP port */
7582 A_UINT32 tcp_seq;
7583 A_UINT32 tcp_ack_seq;
7584
7585 A_UINT32 keepalive_init; /* Initial ping interval */
7586 A_UINT32 keepalive_min; /* Minimum ping interval */
7587 A_UINT32 keepalive_max; /* Maximum ping interval */
7588 A_UINT32 keepalive_inc; /* Increment of ping interval */
7589
7590 wmi_mac_addr gateway_mac;
7591 A_UINT32 tcp_tx_timeout_val;
7592 A_UINT32 tcp_rx_timeout_val;
7593
7594 /** add extra parameter for backward-compatible */
7595 /*
7596 * For all byte arrays, natural order is used. E.g.
7597 * rc4_write_sandbox[0] holds the 1st RC4 S-box byte,
7598 * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc.
7599 */
7600
7601 /* used to encrypt transmit packet such as keep-alive */
7602 A_UINT8 rc4_write_sandbox[256];
7603 A_UINT32 rc4_write_x;
7604 A_UINT32 rc4_write_y;
7605
7606 /* used to decrypt received packet such as wow data */
7607 A_UINT8 rc4_read_sandbox[256];
7608 A_UINT32 rc4_read_x;
7609 A_UINT32 rc4_read_y;
7610
7611 /* used to caculate HMAC hash for transmit packet such as keep-alive */
7612 A_UINT8 ssl_write_seq[8];
7613 A_UINT8 ssl_sha1_write_key[64];
7614 A_UINT32 ssl_sha1_write_key_len;
7615
7616 /* used to calculate HAMC hash for receive packet such as wow data */
7617 A_UINT8 ssl_read_seq[8];
7618 A_UINT8 ssl_sha1_read_key[64];
7619 A_UINT32 ssl_sha1_read_key_len;
7620
7621 /* optional element for specifying TCP options data to include in
7622 * transmit packets such as keep-alive
7623 */
7624 A_UINT32 tcp_options_len;
7625 A_UINT8 tcp_options[40];
7626
7627 A_UINT32 async_id; /* keep-alive request id */
7628} wmi_extwow_set_app_type2_params_cmd_fixed_param;
7629
7630#define WMI_RXERR_CRC 0x01 /* CRC error on frame */
7631#define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
7632#define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */
7633#define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
7634
7635typedef enum {
7636 PKT_PWR_SAVE_PAID_MATCH = 0x0001,
7637 PKT_PWR_SAVE_GID_MATCH = 0x0002,
7638 PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x0004,
7639 PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x0008,
7640 PKT_PWR_SAVE_EOF_PAD_DELIM = 0x0010,
7641 PKT_PWR_SAVE_MACADDR_MISMATCH = 0x0020,
7642 PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x0040,
7643 PKT_PWR_SAVE_GID_NSTS_ZERO = 0x0080,
7644 PKT_PWR_SAVE_RSSI_CHECK = 0x0100,
7645 PKT_PWR_SAVE_5G_EBT = 0x0200,
7646 PKT_PWR_SAVE_2G_EBT = 0x0400,
7647 WMI_PKT_PWR_SAVE_MAX = 0x0800,
7648} WMI_PKT_PWR_SAVE_TYPE;
7649
7650typedef struct {
7651 A_UINT32 tlv_header;
7652 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */
7653 A_UINT32 num_data;
7654 /** length in byte of data[]. */
7655 /* This structure is used to send Factory Test Mode [FTM] command
7656 * from host to firmware for integrated chips which are binary blobs.
7657 * Following this structure is the TLV:
7658 * A_UINT8 data[]; // length in byte given by field num_data.
7659 */
7660} wmi_ftm_intg_cmd_fixed_param;
7661
7662typedef struct {
7663 A_UINT32 tlv_header;
7664 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */
7665 A_UINT32 num_data;
7666 /** length in byte of data[]. */
7667 /* This structure is used to receive Factory Test Mode [FTM] event
7668 * from firmware to host for integrated chips which are binary blobs.
7669 * Following this structure is the TLV:
7670 * A_UINT8 data[]; // length in byte given by field num_data.
7671 */
7672} wmi_ftm_intg_event_fixed_param;
7673
7674#define WMI_MAX_NS_OFFLOADS 2
7675#define WMI_MAX_ARP_OFFLOADS 2
7676
7677#define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
7678#define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
7679#define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
7680
7681typedef struct {
7682 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */
7683 A_UINT32 flags; /* flags */
7684 A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node */
7685 A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */
7686 wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
7687} WMI_ARP_OFFLOAD_TUPLE;
7688
7689#define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */
7690#define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */
7691#define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */
7692
7693#define WMI_NSOFF_MAX_TARGET_IPS 2
7694
7695typedef struct {
7696 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */
7697 A_UINT32 flags; /* flags */
7698 /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */
7699 WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */
7700 WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */
7701 WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */
7702 wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */
7703} WMI_NS_OFFLOAD_TUPLE;
7704
7705typedef struct {
7706 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */
7707 A_UINT32 flags;
7708 A_UINT32 vdev_id;
7709 A_UINT32 num_ns_ext_tuples;
7710 /* Following this structure are the TLVs:
7711 * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS];
7712 * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS];
7713 * size of ns_ext_tuples is based on num_ns_ext_tuples
7714 * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[];
7715 */
7716} WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param;
7717
7718typedef struct {
7719 A_UINT32 tlv_header;
7720 A_UINT32 vdev_id;
7721 A_UINT32 pattern_id;
7722 A_UINT32 timeout;
7723 A_UINT32 length;
7724 /* Following this would be the pattern
7725 A_UINT8 pattern[] of length specifed by length
7726 field in the structure. */
7727} WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
7728
7729typedef struct {
7730 A_UINT32 tlv_header;
7731 A_UINT32 vdev_id;
7732 A_UINT32 pattern_id;
7733} WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param;
7734
7735typedef struct {
7736 A_UINT32 tlv_header;
7737 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */
7738 /** unique id identifying the VDEV, generated by the caller */
7739 A_UINT32 vdev_id;
7740 /** peer MAC address */
7741 wmi_mac_addr peer_macaddr;
7742 /** Tid number */
7743 A_UINT32 tid;
7744 /** Initiator (1) or Responder (0) for this aggregation */
7745 A_UINT32 initiator;
7746 /** size of the negotiated window */
7747 A_UINT32 window_size;
7748 /** starting sequence number (only valid for initiator) */
7749 A_UINT32 ssn;
7750 /** timeout field represents the time to wait for Block Ack in
7751 * initiator case and the time to wait for BAR in responder
7752 * case. 0 represents no timeout. */
7753 A_UINT32 timeout;
7754 /* BA policy: immediate ACK (0) or delayed ACK (1) */
7755 A_UINT32 policy;
7756} wmi_peer_tid_addba_cmd_fixed_param;
7757
7758typedef struct {
7759 A_UINT32 tlv_header;
7760 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */
7761 /** unique id identifying the VDEV, generated by the caller */
7762 A_UINT32 vdev_id;
7763 /** peer MAC address */
7764 wmi_mac_addr peer_macaddr;
7765 /** Tid number */
7766 A_UINT32 tid;
7767 /** Initiator (1) or Responder (0) for this aggregation */
7768 A_UINT32 initiator;
7769} wmi_peer_tid_delba_cmd_fixed_param;
7770
7771typedef struct {
7772 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */
7773 /** unique id identifying the VDEV, generated by the caller */
7774 A_UINT32 vdev_id;
7775 /** peer MAC address */
7776 wmi_mac_addr peer_macaddr;
7777 /** Tid number */
7778 A_UINT32 tid;
7779 /** Event status */
7780 A_UINT32 status;
7781} wmi_tx_addba_complete_event_fixed_param;
7782
7783typedef struct {
7784 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */
7785 /** unique id identifying the VDEV, generated by the caller */
7786 A_UINT32 vdev_id;
7787 /** peer MAC address */
7788 wmi_mac_addr peer_macaddr;
7789 /** Tid number */
7790 A_UINT32 tid;
7791 /** Event status */
7792 A_UINT32 status;
7793} wmi_tx_delba_complete_event_fixed_param;
7794/*
7795 * Structure to request sequence numbers for a given
7796 * peer station on different TIDs. The TIDs are
7797 * indicated in the tidBitMap, tid 0 would
7798 * be represented by LSB bit 0. tid 1 would be
7799 * represented by LSB bit 1 etc.
7800 * The target will retrieve the current sequence
7801 * numbers for the peer on all the TIDs requested
7802 * and send back a response in a WMI event.
7803 */
7804typedef struct {
7805 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307806 WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007807 wmi_mac_addr peer_macaddr;
7808 A_UINT32 tidBitmap;
7809} wmi_ba_req_ssn;
7810
7811typedef struct {
7812 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307813 WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007814 /** unique id identifying the VDEV, generated by the caller */
7815 A_UINT32 vdev_id;
7816 /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
7817 A_UINT32 num_ba_req_ssn;
7818/* Following this struc are the TLV's:
7819 * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
7820 */
7821} wmi_ba_req_ssn_cmd_fixed_param;
7822
7823/*
7824 * Max transmit categories
7825 *
7826 * Note: In future if we need to increase WMI_MAX_TC definition
7827 * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
7828 */
7829#define WMI_MAX_TC 8
7830
7831/*
7832 * Structure to send response sequence numbers
7833 * for a give peer and tidmap.
7834 */
7835typedef struct {
7836 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307837 WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007838 wmi_mac_addr peer_macaddr;
7839 /* A bool to indicate if ssn is present */
7840 A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
7841 /* The ssn from target, valid only if
7842 * ssn_present_for_tid[tidn] equals 1
7843 */
7844 A_UINT32 ssn_for_tid[WMI_MAX_TC];
7845} wmi_ba_event_ssn;
7846
7847typedef struct {
7848 A_UINT32 tlv_header; /* TLV tag and len; tag equals
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05307849 WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007850 /** unique id identifying the VDEV, generated by the caller */
7851 A_UINT32 vdev_id;
7852 /** Event status, success or failure of the overall operation */
7853 A_UINT32 status;
7854 /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
7855 A_UINT32 num_ba_event_ssn;
7856/* Following this struc are the TLV's:
7857 * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
7858 */
7859} wmi_ba_rsp_ssn_event_fixed_param;
7860
7861enum wmi_aggr_state_req_type {
7862 WMI_DISABLE_AGGREGATION,
7863 WMI_ENABLE_AGGREGATION
7864};
7865
7866/*
7867 * This event is generated by the COEX module
7868 * when esco call is begins the coex module in fw genrated this event to host to
7869 * disable the RX aggregation and after completion of the esco call fw will indicate to
7870 * enable back the Rx aggregation .
7871 */
7872
7873typedef struct {
7874 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */
7875 /** unique id identifying the VDEV, generated by the caller */
7876 A_UINT32 vdev_id;
7877 /** req_type contains values from enum
7878 * wmi_aggr_state_req_type; 0 (disable) 1(enable) */
7879 A_UINT32 req_type;
7880} wmi_aggr_state_trig_event_fixed_param;
7881
7882typedef struct {
7883 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
7884 /** unique id identifying the VDEV, generated by the caller */
7885 A_UINT32 vdev_id;
7886 /** MAC address used for installing */
7887 wmi_mac_addr peer_macaddr;
7888 /** key index */
7889 A_UINT32 key_ix;
7890 /** key flags */
7891 A_UINT32 key_flags;
7892 /** Event status */
7893 A_UINT32 status;
7894} wmi_vdev_install_key_complete_event_fixed_param;
7895
7896typedef enum _WMI_NLO_AUTH_ALGORITHM {
7897 WMI_NLO_AUTH_ALGO_80211_OPEN = 1,
7898 WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2,
7899 WMI_NLO_AUTH_ALGO_WPA = 3,
7900 WMI_NLO_AUTH_ALGO_WPA_PSK = 4,
7901 WMI_NLO_AUTH_ALGO_WPA_NONE = 5,
7902 WMI_NLO_AUTH_ALGO_RSNA = 6,
7903 WMI_NLO_AUTH_ALGO_RSNA_PSK = 7,
7904} WMI_NLO_AUTH_ALGORITHM;
7905
7906typedef enum _WMI_NLO_CIPHER_ALGORITHM {
7907 WMI_NLO_CIPHER_ALGO_NONE = 0x00,
7908 WMI_NLO_CIPHER_ALGO_WEP40 = 0x01,
7909 WMI_NLO_CIPHER_ALGO_TKIP = 0x02,
7910 WMI_NLO_CIPHER_ALGO_CCMP = 0x04,
7911 WMI_NLO_CIPHER_ALGO_WEP104 = 0x05,
7912 WMI_NLO_CIPHER_ALGO_BIP = 0x06,
7913 WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
7914 WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
7915 WMI_NLO_CIPHER_ALGO_WEP = 0x101,
7916} WMI_NLO_CIPHER_ALGORITHM;
7917
7918/* SSID broadcast type passed in NLO params */
7919typedef enum _WMI_NLO_SSID_BcastNwType {
7920 WMI_NLO_BCAST_UNKNOWN = 0,
7921 WMI_NLO_BCAST_NORMAL = 1,
7922 WMI_NLO_BCAST_HIDDEN = 2,
7923} WMI_NLO_SSID_BcastNwType;
7924
7925#define WMI_NLO_MAX_SSIDS 16
7926#define WMI_NLO_MAX_CHAN 48
7927
7928#define WMI_NLO_CONFIG_STOP (0x1 << 0)
7929#define WMI_NLO_CONFIG_START (0x1 << 1)
7930#define WMI_NLO_CONFIG_RESET (0x1 << 2)
7931#define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4)
7932#define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5)
7933#define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6)
7934/* This bit is used to indicate if EPNO or supplicant PNO is enabled. Only
7935 * one of them can be enabled at a given time */
7936#define WMI_NLO_CONFIG_ENLO (0x1 << 7)
7937#define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8)
Govind Singh42f71542016-03-14 16:32:33 +05307938#define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08007939
7940/* Whether directed scan needs to be performed (for hidden SSIDs) */
7941#define WMI_ENLO_FLAG_DIRECTED_SCAN 1
7942/* Whether PNO event shall be triggered if the network is found on A band */
7943#define WMI_ENLO_FLAG_A_BAND 2
7944/* Whether PNO event shall be triggered if the network is found on G band */
7945#define WMI_ENLO_FLAG_G_BAND 4
7946/* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */
7947#define WMI_ENLO_FLAG_STRICT_MATCH 8
7948/* Code for matching the beacon AUTH IE - additional codes TBD open */
7949#define WMI_ENLO_AUTH_CODE_OPEN 1
7950/* WPA_PSK or WPA2PSK */
7951#define WMI_ENLO_AUTH_CODE_PSK 2
7952/* any EAPOL */
7953#define WMI_ENLO_AUTH_CODE_EAPOL 4
7954
7955/* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */
7956typedef struct wmi_nlo_ssid_param {
7957 A_UINT32 valid;
7958 wmi_ssid ssid;
7959} wmi_nlo_ssid_param;
7960
7961/* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */
7962typedef struct wmi_nlo_enc_param {
7963 A_UINT32 valid;
7964 A_UINT32 enc_type;
7965} wmi_nlo_enc_param;
7966
7967/* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */
7968typedef struct wmi_nlo_auth_param {
7969 A_UINT32 valid;
7970 A_UINT32 auth_type;
7971} wmi_nlo_auth_param;
7972
7973/* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */
7974typedef struct wmi_nlo_bcast_nw_param {
7975 A_UINT32 valid;
7976 /**
7977 * If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value
7978 * should be true/false.Otherwise EPNO is enabled. bcast_nw_type would be used
7979 * as a bit flag contains WMI_ENLO_FLAG_XXX
7980 */
7981 A_UINT32 bcast_nw_type;
7982} wmi_nlo_bcast_nw_param;
7983
7984/* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
7985typedef struct wmi_nlo_rssi_param {
7986 A_UINT32 valid;
7987 A_INT32 rssi;
7988} wmi_nlo_rssi_param;
7989
7990typedef struct nlo_configured_parameters {
7991 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
7992 wmi_nlo_ssid_param ssid;
7993 wmi_nlo_enc_param enc_type;
7994 wmi_nlo_auth_param auth_type;
7995 wmi_nlo_rssi_param rssi_cond;
7996 wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */
7997} nlo_configured_parameters;
7998
7999/* Support channel prediction for PNO scan after scanning top_k_num channels
8000 * if stationary_threshold is met.
8001 */
8002typedef struct nlo_channel_prediction_cfg {
8003 A_UINT32 tlv_header;
8004 /* Enable or disable this feature. */
8005 A_UINT32 enable;
8006 /* Top K channels will be scanned before deciding whether to further
8007 * scan or stop. Minimum value is 3 and maximum is 5. */
8008 A_UINT32 top_k_num;
8009 /* Preconfigured stationary threshold. Lesser value means more
8010 * conservative. Bigger value means more aggressive.
8011 * Maximum is 100 and mininum is 0. */
8012 A_UINT32 stationary_threshold;
8013 /* Periodic full channel scan in milliseconds unit.
8014 * After full_scan_period_ms since last full scan, channel prediction
8015 * scan is suppressed and will do full scan.
8016 * This is to help detecting sudden AP power-on or -off.
8017 * Value 0 means no full scan at all (not recommended).
8018 */
8019 A_UINT32 full_scan_period_ms;
8020} nlo_channel_prediction_cfg;
8021
Govind Singh42f71542016-03-14 16:32:33 +05308022typedef struct enlo_candidate_score_params_t {
8023 /*
8024 * TLV tag and len;
8025 * tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param
8026 */
8027 A_UINT32 tlv_header;
8028 /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */
8029 A_INT32 min5GHz_rssi;
8030 /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */
8031 A_INT32 min24GHz_rssi;
8032 /* the maximum score that a network can have before bonuses */
8033 A_UINT32 initial_score_max;
8034 /* current_connection_bonus:
8035 * only report when there is a network's score this much higher
8036 * than the current connection
8037 */
8038 A_UINT32 current_connection_bonus;
8039 /* score bonus for all networks with the same network flag */
8040 A_UINT32 same_network_bonus;
8041 /* score bonus for networks that are not open */
8042 A_UINT32 secure_bonus;
8043 /* 5GHz RSSI score bonus (applied to all 5GHz networks) */
8044 A_UINT32 band5GHz_bonus;
8045} enlo_candidate_score_params;
8046
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008047typedef struct wmi_nlo_config {
8048 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */
8049 A_UINT32 flags;
8050 A_UINT32 vdev_id;
8051 A_UINT32 fast_scan_max_cycles;
8052 A_UINT32 active_dwell_time;
8053 A_UINT32 passive_dwell_time; /* PDT in msecs */
8054 A_UINT32 probe_bundle_size;
8055 A_UINT32 rest_time; /* ART = IRT */
8056 A_UINT32 max_rest_time; /* Max value that can be reached after SBM */
8057 A_UINT32 scan_backoff_multiplier; /* SBM */
8058 A_UINT32 fast_scan_period; /* SCBM */
8059 A_UINT32 slow_scan_period; /* specific to windows */
8060 A_UINT32 no_of_ssids;
8061 A_UINT32 num_of_channels;
8062 A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
8063 /* The TLVs will follow.
8064 * nlo_configured_parameters nlo_list[];
8065 * A_UINT32 channel_list[];
8066 * nlo_channel_prediction_cfg ch_prediction_cfg;
Govind Singh42f71542016-03-14 16:32:33 +05308067 * enlo_candidate_score_params candidate_score_params;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008068 */
8069
8070} wmi_nlo_config_cmd_fixed_param;
8071
8072typedef struct wmi_nlo_event {
8073 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */
8074 A_UINT32 vdev_id;
8075} wmi_nlo_event;
8076
8077/* WMI_PASSPOINT_CONFIG_SET
8078 * Sets a list for passpoint networks for PNO purposes;
8079 * it should be matched against any passpoint networks found
8080 * during regular PNO scan.
8081 */
8082#define WMI_PASSPOINT_CONFIG_SET (0x1 << 0)
8083/* WMI_PASSPOINT_CONFIG_RESET
8084 * Reset passpoint network list -
8085 * no Passpoint networks should be matched after this.
8086 */
8087#define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1)
8088#define PASSPOINT_REALM_LEN 256
8089#define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5
8090#define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
8091#define PASSPOINT_PLMN_ID_LEN 3
8092#define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \
8093 (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2)
8094
8095/*
8096 * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the
8097 * A_UINT8 realm[PASSPOINT_REALM_LEN]
8098 * array will end on a 4-byte boundary.
8099 * (This 4-byte alignment simplifies endianness-correction byte swapping.)
8100 */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308101A_COMPILE_TIME_ASSERT(check_passpoint_realm_size, (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008102
8103/*
8104 * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and
8105 * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the
8106 * roaming_consortium_ids array below will end on a 4-byte boundary.
8107 * (This 4-byte alignment simplifies endianness-correction byte swapping.)
8108 */
8109A_COMPILE_TIME_ASSERT(check_passpoint_roaming_consortium_ids_size,
8110((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0);
8111
8112/* wildcard ID to allow an action (reset) to apply to all networks */
8113#define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF
8114typedef struct wmi_passpoint_config {
8115 /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */
8116 A_UINT32 tlv_header;
8117 /* (network) id
8118 * identifier of the matched network, report this in event
8119 * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD)
8120 * that indicates the action should be applied to all networks.
8121 * Currently, the only action that is applied to all networks is "reset".
8122 * If a non-wildcard ID is specified, that particular network is configured.
8123 * If a wildcard ID is specified, all networks are reset.
8124 */
8125 A_UINT32 id;
8126 A_UINT32 req_id;
8127 /*null terminated UTF8 encoded realm, 0 if unspecified*/
8128 A_UINT8 realm[PASSPOINT_REALM_LEN];
8129 /*roaming consortium ids to match, 0s if unspecified*/
8130 A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN];
8131 /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/
8132 /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */
8133 A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN];
8134} wmi_passpoint_config_cmd_fixed_param;
8135
8136typedef struct {
8137 A_UINT32 tlv_header; /* TLV tag and len; tag equals
8138wmi_passpoint_event_hdr */
8139 A_UINT32 id; /* identifier of the matched network */
8140 A_UINT32 vdev_id;
8141 A_UINT32 timestamp; /* time since boot (in microsecond) when the
8142result was retrieved*/
8143 wmi_ssid ssid;
8144 wmi_mac_addr bssid; /* bssid of the network */
8145 A_UINT32 channel_mhz; /* channel frequency in MHz */
8146 A_UINT32 rssi; /* rssi value */
8147 A_UINT32 rtt; /* timestamp in nanoseconds*/
8148 A_UINT32 rtt_sd; /* standard deviation in rtt */
8149 A_UINT32 beacon_period; /* beacon advertised in the beacon */
8150 A_UINT32 capability; /* capabilities advertised in the beacon */
8151 A_UINT32 ie_length; /* size of the ie_data blob */
8152 A_UINT32 anqp_length; /* length of ANQP blob */
8153 /**
8154 * Following this structure is the byte stream of ie data of length ie_buf_len:
8155 * A_UINT8 ie_data[]; // length in byte given by field ie_length, blob of ie data in beacon
8156 * A_UINT8 anqp_ie[]; // length in byte given by field anqp_len, blob of anqp data of IE
8157 * Implicitly, combing ie_data and anqp_ie into a single bufp, and the bytes
8158 * stream of each ie should be same as BEACON/Action-frm by 802.11 spec
8159 */
8160} wmi_passpoint_event_hdr;
8161
8162#define GTK_OFFLOAD_OPCODE_MASK 0xFF000000
8163/** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
8164#define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000
8165/** Disable GTK offload */
8166#define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000
8167/** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
8168#define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000
8169enum wmi_chatter_mode {
8170 /* Chatter enter/exit happens
8171 * automatically based on preset
8172 * params
8173 */
8174 WMI_CHATTER_MODE_AUTO,
8175 /* Chatter enter is triggered
8176 * manually by the user
8177 */
8178 WMI_CHATTER_MODE_MANUAL_ENTER,
8179 /* Chatter exit is triggered
8180 * manually by the user
8181 */
8182 WMI_CHATTER_MODE_MANUAL_EXIT,
8183 /* Placeholder max value, always last */
8184 WMI_CHATTER_MODE_MAX
8185};
8186
8187enum wmi_chatter_query_type {
8188 /*query coalescing filter match counter */
8189 WMI_CHATTER_QUERY_FILTER_MATCH_CNT,
8190 WMI_CHATTER_QUERY_MAX
8191};
8192
8193typedef struct {
8194 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */
8195 A_UINT32 chatter_mode;
8196} wmi_chatter_set_mode_cmd_fixed_param;
8197
8198/** maximum number of filter supported*/
8199#define CHATTER_MAX_COALESCING_RULES 11
8200/** maximum number of field tests per filter*/
8201#define CHATTER_MAX_FIELD_TEST 5
8202/** maximum field length in number of DWORDS*/
8203#define CHATTER_MAX_TEST_FIELD_LEN32 2
8204
8205/** field test kinds*/
8206#define CHATTER_COALESCING_TEST_EQUAL 1
8207#define CHATTER_COALESCING_TEST_MASKED_EQUAL 2
8208#define CHATTER_COALESCING_TEST_NOT_EQUAL 3
8209
8210/** packet type*/
8211#define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0)
8212#define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1)
8213#define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2)
8214
8215/** coalescing field test*/
8216typedef struct _chatter_pkt_coalescing_hdr_test {
8217 /** offset from start of mac header, for windows native wifi host driver
8218 * should assume standard 802.11 frame format without QoS info and address4
8219 * FW would account for any non-stand fields for final offset value.
8220 */
8221 A_UINT32 offset;
8222 A_UINT32 length; /* length of test field */
8223 A_UINT32 test; /*equal, not equal or masked equal */
8224 A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream */
8225 A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream */
8226} chatter_pkt_coalescing_hdr_test;
8227
8228/** packet coalescing filter*/
8229typedef struct _chatter_pkt_coalescing_filter {
8230 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */
8231 A_UINT32 filter_id; /*unique id assigned by OS */
8232 A_UINT32 max_coalescing_delay; /*max miliseconds 1st pkt can be hold */
8233 A_UINT32 pkt_type; /*unicast/multicast/broadcast */
8234 A_UINT32 num_of_test_field; /*number of field test in table */
8235 chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /*field test tbl */
8236} chatter_pkt_coalescing_filter;
8237
8238/** packet coalescing filter add command*/
8239typedef struct {
8240 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */
8241 A_UINT32 num_of_filters;
8242 /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter
8243 chatter_pkt_coalescing_filter rx_filter[1]; */
8244} wmi_chatter_coalescing_add_filter_cmd_fixed_param;
8245/** packet coalescing filter delete command*/
8246typedef struct {
8247 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */
8248 A_UINT32 filter_id; /*filter id which will be deleted */
8249} wmi_chatter_coalescing_delete_filter_cmd_fixed_param;
8250/** packet coalescing query command*/
8251typedef struct {
8252 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */
8253 A_UINT32 type; /*type of query */
8254} wmi_chatter_coalescing_query_cmd_fixed_param;
8255/** chatter query reply event*/
8256typedef struct {
8257 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */
8258 A_UINT32 type; /*query type */
8259 A_UINT32 filter_match_cnt; /*coalescing filter match counter */
8260} wmi_chatter_query_reply_event_fixed_param;
8261
8262/* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES
8263 * cannot be changed without breaking WMI compatibility. */
8264#define GTK_OFFLOAD_KEK_BYTES 16
8265#define GTK_OFFLOAD_KCK_BYTES 16
8266/* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */
8267#define GTK_REPLAY_COUNTER_BYTES 8
8268#define WMI_MAX_KEY_LEN 32
8269#define IGTK_PN_SIZE 6
8270
8271typedef struct {
8272 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */
8273 A_UINT32 vdev_id;
8274 /** unique id identifying the VDEV */
8275 A_UINT32 flags; /* status flags */
8276 A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */
8277 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */
8278 A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */
8279 A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */
8280 A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */
8281 A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */
8282} WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param;
8283
8284typedef struct {
8285 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */
8286 A_UINT32 vdev_id; /** unique id identifying the VDEV */
8287 A_UINT32 flags; /* control flags, GTK offload command use high byte */
8288 /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */
8289 A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */
8290 A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */
8291 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */
8292} WMI_GTK_OFFLOAD_CMD_fixed_param;
8293
8294typedef struct {
8295 /* TLV tag and len; tag equals
8296 * WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param
8297 */
8298 A_UINT32 tlv_header;
8299 A_UINT32 vdev_id;
8300 A_UINT32 sa_query_retry_interval; /* in msec */
8301 A_UINT32 sa_query_max_retry_count;
8302} WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param;
8303
8304typedef enum {
8305 WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */
8306 WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */
8307 WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK */
8308 /* gratuitous ARP req*/
8309 WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4,
8310} WMI_STA_KEEPALIVE_METHOD;
8311
8312typedef struct {
8313 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */
8314 WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */
8315 WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */
8316 wmi_mac_addr dest_mac_addr; /* destination MAC address */
8317} WMI_STA_KEEPALVE_ARP_RESPONSE;
8318
8319typedef struct {
8320 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */
8321 A_UINT32 vdev_id;
8322 A_UINT32 enable; /* 1 - Enable, 0 - disable */
8323 A_UINT32 method; /* keep alive method */
8324 A_UINT32 interval; /* time interval in seconds */
8325 /*
8326 * NOTE: following this structure is the TLV for ARP Resonse:
8327 * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; // ARP response
8328 */
8329} WMI_STA_KEEPALIVE_CMD_fixed_param;
8330
8331typedef struct {
8332 A_UINT32 tlv_header;
8333 A_UINT32 vdev_id;
8334 A_UINT32 action;
8335} WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
8336typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
8337
8338typedef struct {
8339 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
8340 A_UINT32 vdev_id;
8341 A_UINT32 keepaliveInterval; /* seconds */
8342 A_UINT32 keepaliveMethod;
8343} wmi_vdev_set_keepalive_cmd_fixed_param;
8344
8345typedef struct {
8346 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */
8347 A_UINT32 vdev_id;
8348} wmi_vdev_get_keepalive_cmd_fixed_param;
8349
8350typedef struct {
8351 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */
8352 A_UINT32 vdev_id;
8353 A_UINT32 keepaliveInterval; /* seconds */
8354 A_UINT32 keepaliveMethod; /* seconds */
8355} wmi_vdev_get_keepalive_event_fixed_param;
8356
8357#define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0
8358#define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1
8359
8360typedef struct {
8361 A_UINT32 tlv_header;
8362 A_UINT32 vdev_id;
8363 A_UINT32 action;
8364} WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param;
8365
8366typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param
8367WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD;
8368
8369typedef struct {
8370 A_UINT32 tlv_header;
8371 A_UINT32 vdev_id;
8372 A_UINT32 mcc_tbttmode;
8373 wmi_mac_addr mcc_bssid;
8374} wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
8375
8376typedef struct {
8377 A_UINT32 tlv_header;
8378 A_UINT32 vdev_id; /* home vdev id */
8379 A_UINT32 meas_token; /* from measure request frame */
8380 A_UINT32 dialog_token;
8381 A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */
8382 A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst */
8383 A_UINT32 burst_cycle; /* times cycle through within one burst */
8384 A_UINT32 tx_power; /* for path frame */
8385 A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */
8386 wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */
8387 A_UINT32 num_chans;
8388} wmi_vdev_plmreq_start_cmd_fixed_param;
8389
8390typedef struct {
8391 A_UINT32 tlv_header;
8392 A_UINT32 vdev_id;
8393 A_UINT32 meas_token; /* same value from req */
8394} wmi_vdev_plmreq_stop_cmd_fixed_param;
8395
8396typedef struct {
8397 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */
8398 A_UINT32 tlv_header;
8399 /* unique id identifying the VDEV, generated by the caller */
8400 A_UINT32 vdev_id;
8401 /* enable/disable NoA */
8402 A_UINT32 enable;
8403 /** number of NoA desc. In the TLV noa_descriptor[] */
8404 A_UINT32 num_noa;
8405 /**
8406 * TLV (tag length value ) paramerters follow the pattern structure.
8407 * TLV contain NoA desc with num of num_noa
8408 */
8409} wmi_p2p_set_noa_cmd_fixed_param;
8410
8411typedef struct {
8412 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */
8413 A_UINT32 tlv_header;
8414 /* unique id identifying the VDEV, generated by the caller */
8415 A_UINT32 vdev_id;
8416 /* Identify the wlan module */
8417 A_UINT32 module_id;
8418 /* Num of test arguments passed */
8419 A_UINT32 num_args;
8420/**
8421 * TLV (tag length value ) parameters follow the wmi_roam_chan_list
8422 * structure. The TLV's are:
8423 * A_UINT32 args[];
8424 **/
8425} wmi_unit_test_cmd_fixed_param;
8426
8427/** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
8428 * after it received WMI_ROAM_SYNCH_EVENTID.
8429 */
8430typedef struct {
8431 A_UINT32 tlv_header;
8432 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
8433 /** unique id identifying the VDEV, generated by the caller */
8434 A_UINT32 vdev_id;
8435} wmi_roam_synch_complete_fixed_param;
8436
8437typedef enum {
8438 RECOVERY_SIM_ASSERT = 0x01,
8439 RECOVERY_SIM_NO_DETECT = 0x02,
8440 RECOVERY_SIM_CTR_EP_FULL = 0x03,
8441 RECOVERY_SIM_EMPTY_POINT = 0x04,
8442 RECOVERY_SIM_STACK_OV = 0x05,
8443 RECOVERY_SIM_INFINITE_LOOP = 0x06,
8444 RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
8445 RECOVERY_SIM_SELF_RECOVERY = 0x08,
8446} RECOVERY_SIM_TYPE;
8447
8448/* WMI_FORCE_FW_HANG_CMDID */
8449typedef struct {
8450 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */
8451 A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:... */
8452 A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms) */
8453} WMI_FORCE_FW_HANG_CMD_fixed_param;
8454#define WMI_MCAST_FILTER_SET 1
8455#define WMI_MCAST_FILTER_DELETE 2
8456typedef struct {
8457 A_UINT32 tlv_header;
8458 A_UINT32 vdev_id;
8459 A_UINT32 index;
8460 A_UINT32 action;
8461 wmi_mac_addr mcastbdcastaddr;
8462} WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
8463
8464/* GPIO Command and Event data structures */
8465
8466/* WMI_GPIO_CONFIG_CMDID */
8467enum {
8468 WMI_GPIO_PULL_NONE,
8469 WMI_GPIO_PULL_UP,
8470 WMI_GPIO_PULL_DOWN,
8471};
8472
8473enum {
8474 WMI_GPIO_INTTYPE_DISABLE,
8475 WMI_GPIO_INTTYPE_RISING_EDGE,
8476 WMI_GPIO_INTTYPE_FALLING_EDGE,
8477 WMI_GPIO_INTTYPE_BOTH_EDGE,
8478 WMI_GPIO_INTTYPE_LEVEL_LOW,
8479 WMI_GPIO_INTTYPE_LEVEL_HIGH
8480};
8481
8482typedef struct {
8483 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */
8484 A_UINT32 gpio_num; /* GPIO number to be setup */
8485 A_UINT32 input; /* 0 - Output/ 1 - Input */
8486 A_UINT32 pull_type; /* Pull type defined above */
8487 A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */
8488} wmi_gpio_config_cmd_fixed_param;
8489
8490/* WMI_GPIO_OUTPUT_CMDID */
8491typedef struct {
8492 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */
8493 A_UINT32 gpio_num; /* GPIO number to be setup */
8494 A_UINT32 set; /* Set the GPIO pin */
8495} wmi_gpio_output_cmd_fixed_param;
8496
8497/* WMI_GPIO_INPUT_EVENTID */
8498typedef struct {
8499 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */
8500 A_UINT32 gpio_num; /* GPIO number which changed state */
8501} wmi_gpio_input_event_fixed_param;
8502
8503/* WMI_P2P_DISC_EVENTID */
8504enum {
8505 P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */
8506 P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */
8507};
8508
8509enum {
8510 P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload */
8511 P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload */
8512 P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload */
8513};
8514
8515enum {
8516 P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */
8517 P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */
8518};
8519
8520typedef struct {
8521 A_UINT32 vdev_id;
8522 A_UINT32 reason; /* P2P DISC wake up reason */
8523} wmi_p2p_disc_event;
8524
8525typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param
8526WOW_EVENT_INFO_SECTION_GTKIGTK;
8527
8528typedef enum {
8529 WMI_FAKE_TXBFER_SEND_NDPA,
8530 WMI_FAKE_TXBFER_SEND_MU,
8531 WMI_FAKE_TXBFER_NDPA_FBTYPE,
8532 WMI_FAKE_TXBFER_NDPA_NCIDX,
8533 WMI_FAKE_TXBFER_NDPA_POLL,
8534 WMI_FAKE_TXBFER_NDPA_BW,
8535 WMI_FAKE_TXBFER_NDPA_PREAMBLE,
8536 WMI_FAKE_TXBFER_NDPA_RATE,
8537 WMI_FAKE_TXBFER_NDP_BW,
8538 WMI_FAKE_TXBFER_NDP_NSS,
8539 WMI_TXBFEE_ENABLE_UPLOAD_H,
8540 WMI_TXBFEE_ENABLE_CAPTURE_H,
8541 WMI_TXBFEE_SET_CBF_TBL,
8542 WMI_TXBFEE_CBF_TBL_LSIG,
8543 WMI_TXBFEE_CBF_TBL_SIGA1,
8544 WMI_TXBFEE_CBF_TBL_SIGA2,
8545 WMI_TXBFEE_CBF_TBL_SIGB,
8546 WMI_TXBFEE_CBF_TBL_PAD,
8547 WMI_TXBFEE_CBF_TBL_DUR,
8548 WMI_TXBFEE_SU_NCIDX,
8549 WMI_TXBFEE_CBIDX,
8550 WMI_TXBFEE_NGIDX,
8551} WMI_TXBF_PARAM_ID;
8552
8553typedef struct {
8554 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */
8555 /** parameter id */
8556 A_UINT32 param_id;
8557 /** parameter value */
8558 A_UINT32 param_value;
8559} wmi_txbf_cmd_fixed_param;
8560
8561typedef struct {
8562 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */
8563 A_UINT32 h_length;
8564 A_UINT32 cv_length;
8565 /* This TLV is followed by array of bytes:
8566 * // h_cv info buffer
8567 * A_UINT8 bufp[];
8568 */
8569} wmi_upload_h_hdr;
8570
8571typedef struct {
8572 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */
8573 A_UINT32 svd_num;
8574 A_UINT32 tone_num;
8575 A_UINT32 reserved;
8576} wmi_capture_h_event_hdr;
8577
8578typedef struct {
8579 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */
8580 A_UINT32 start_freq; /* start frequency, not channel center freq */
8581 A_UINT32 end_freq; /* end frequency */
8582} wmi_avoid_freq_range_desc;
8583
8584typedef struct {
8585 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */
8586 /* bad channel range count, multi range is allowed, 0 means all channel clear */
8587 A_UINT32 num_freq_ranges;
8588
8589 /* The TLVs will follow.
8590 * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
8591 * wmi_avoid_freq_range_desc avd_freq_range[]; // message buffer, NULL terminated
8592 */
8593} wmi_avoid_freq_ranges_event_fixed_param;
8594
8595typedef struct {
8596 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */
8597 /** Reserved for future use */
8598 A_UINT32 reserved0;
8599 A_UINT32 vdev_id;
8600} wmi_gtk_rekey_fail_event_fixed_param;
8601
8602enum wmm_ac_downgrade_policy {
8603 WMM_AC_DOWNGRADE_DEPRIO,
8604 WMM_AC_DOWNGRADE_DROP,
8605 WMM_AC_DOWNGRADE_INVALID,
8606};
8607
8608typedef struct {
8609 A_UINT32 tlv_header;
8610 A_UINT32 cwmin;
8611 A_UINT32 cwmax;
8612 A_UINT32 aifs;
8613 A_UINT32 txoplimit;
8614 A_UINT32 acm;
8615 A_UINT32 no_ack;
8616} wmi_wmm_vparams;
8617
8618typedef struct {
8619 A_UINT32 tlv_header;
8620 A_UINT32 vdev_id;
8621 wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
8622} wmi_vdev_set_wmm_params_cmd_fixed_param;
8623
8624typedef struct {
8625 A_UINT32 tlv_header;
8626 A_UINT32 vdev_id;
8627 A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */
8628 A_UINT32 userGtxMask; /* host request for GTX mask */
8629 A_UINT32 gtxPERThreshold; /* default: 10% */
8630 A_UINT32 gtxPERMargin; /* default: 2% */
8631 A_UINT32 gtxTPCstep; /* default: 1 */
8632 A_UINT32 gtxTPCMin; /* default: 5 */
8633 A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */
8634} wmi_vdev_set_gtx_params_cmd_fixed_param;
8635
8636typedef struct {
8637 A_UINT32 tlv_header;
8638 A_UINT32 vdev_id;
8639 A_UINT32 ac;
8640 A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
8641 A_UINT32 downgrade_type;
8642} wmi_vdev_wmm_addts_cmd_fixed_param;
8643
8644typedef struct {
8645 A_UINT32 tlv_header;
8646 A_UINT32 vdev_id;
8647 A_UINT32 ac;
8648} wmi_vdev_wmm_delts_cmd_fixed_param;
8649
8650typedef struct {
8651 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */
8652 /** Reserved for future use */
8653 A_UINT32 reserved0;
8654} wmi_pdev_dfs_enable_cmd_fixed_param;
8655
8656typedef struct {
8657 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_disable_cmd_fixed_param */
8658 /** Reserved for future use */
8659 A_UINT32 reserved0;
8660} wmi_pdev_dfs_disable_cmd_fixed_param;
8661
8662typedef struct {
8663 /** TLV tag and len; tag equals
8664 * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param
8665 */
8666 A_UINT32 tlv_header;
8667
8668 /** Reserved for future use */
8669 A_UINT32 reserved0;
8670} wmi_dfs_phyerr_filter_ena_cmd_fixed_param;
8671
8672typedef struct {
8673 /** TLV tag and len; tag equals
8674 * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param
8675 */
8676 A_UINT32 tlv_header;
8677 /** Reserved for future use */
8678 A_UINT32 reserved0;
8679} wmi_dfs_phyerr_filter_dis_cmd_fixed_param;
8680
8681/** TDLS COMMANDS */
8682
8683/* WMI_TDLS_SET_STATE_CMDID */
8684/* TDLS State */
8685enum wmi_tdls_state {
8686 /** TDLS disable */
8687 WMI_TDLS_DISABLE,
8688 /** TDLS enabled - no firmware connection tracking/notifications */
8689 WMI_TDLS_ENABLE_PASSIVE,
8690 /** TDLS enabled - with firmware connection tracking/notifications */
8691 WMI_TDLS_ENABLE_ACTIVE,
8692 /* TDLS enabled - firmware waits for peer mac for connection tracking */
8693 WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
8694};
8695
8696/* TDLS Options */
8697#define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */
8698#define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */
8699#define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */
8700
8701typedef struct {
8702 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */
8703 A_UINT32 tlv_header;
8704 /** unique id identifying the VDEV */
8705 A_UINT32 vdev_id;
8706 /** Enable/Disable TDLS (wmi_tdls_state) */
8707 A_UINT32 state;
8708 /* Duration (in ms) over which to calculate tx/rx threshold
8709 * to trigger TDLS Discovery
8710 */
8711 A_UINT32 notification_interval_ms;
8712 /** number of packets OVER which notify/suggest TDLS Discovery:
8713 * if current tx pps counter / notification interval >= threshold
8714 * then a notification will be sent to host to advise TDLS Discovery */
8715 A_UINT32 tx_discovery_threshold;
8716 /** number of packets UNDER which notify/suggest TDLS Teardown:
8717 * if current tx pps counter / notification interval < threshold
8718 * then a notification will be sent to host to advise TDLS Tear down */
8719 A_UINT32 tx_teardown_threshold;
8720 /** Absolute RSSI value under which notify/suggest TDLS Teardown */
8721 A_INT32 rssi_teardown_threshold;
8722 /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */
8723 A_INT32 rssi_delta;
8724 /** TDLS Option Control
8725 * Off-Channel, Buffer STA, (later)Sleep STA support */
8726 A_UINT32 tdls_options;
8727 /* Buffering time in number of beacon intervals */
8728 A_UINT32 tdls_peer_traffic_ind_window;
8729 /* Wait time for PTR frame */
8730 A_UINT32 tdls_peer_traffic_response_timeout_ms;
8731 /* Self PUAPSD mask */
8732 A_UINT32 tdls_puapsd_mask;
8733 /* Inactivity timeout */
8734 A_UINT32 tdls_puapsd_inactivity_time_ms;
8735 /* Max of rx frame during SP */
8736 A_UINT32 tdls_puapsd_rx_frame_threshold;
8737 /* Duration (in ms) over which to check whether TDLS link
8738 * needs to be torn down
8739 */
8740 A_UINT32 teardown_notification_ms;
8741 /* STA kickout threshold for TDLS peer */
8742 A_UINT32 tdls_peer_kickout_threshold;
8743} wmi_tdls_set_state_cmd_fixed_param;
8744
8745/* WMI_TDLS_PEER_UPDATE_CMDID */
8746
8747enum wmi_tdls_peer_state {
8748 /** tx peer TDLS link setup now starting, traffic to DA should be
8749 * paused (except TDLS frames) until state is moved to CONNECTED (or
8750 * TEARDOWN on setup failure) */
8751 WMI_TDLS_PEER_STATE_PEERING,
8752 /** tx peer TDLS link established, running (all traffic to DA unpaused) */
8753 WMI_TDLS_PEER_STATE_CONNECTED,
8754 /** tx peer TDLS link tear down started (link paused, any frames
8755 * queued for DA will be requeued back through the AP)*/
8756 WMI_TDLS_PEER_STATE_TEARDOWN,
8757 /* Add peer mac into connection table */
8758 WMI_TDLS_PEER_ADD_MAC_ADDR,
8759 /* Remove peer mac from connection table */
8760 WMI_TDLS_PEER_REMOVE_MAC_ADDR,
8761};
8762
8763/* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
8764#define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
8765typedef struct {
8766 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */
8767 A_UINT32 tlv_header;
8768 /* Peer's QoS Info - for U-APSD */
8769 /* AC FLAGS - accessed through macros below */
8770 /* Ack, SP, More Data Ack - accessed through macros below */
8771 A_UINT32 peer_qos;
8772 /*TDLS Peer's U-APSD Buffer STA Support */
8773 A_UINT32 buff_sta_support;
8774 /*TDLS off channel related params */
8775 A_UINT32 off_chan_support;
8776 A_UINT32 peer_curr_operclass;
8777 A_UINT32 self_curr_operclass;
8778 /* Number of channels available for off channel operation */
8779 A_UINT32 peer_chan_len;
8780 A_UINT32 peer_operclass_len;
8781 A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
8782 /* Is peer initiator or responder of TDLS setup request */
8783 A_UINT32 is_peer_responder;
8784 /* Preferred off channel number as configured by user */
8785 A_UINT32 pref_offchan_num;
8786 /* Preferred off channel bandwidth as configured by user */
8787 A_UINT32 pref_offchan_bw;
8788
8789 /** Followed by the variable length TLV peer_chan_list:
8790 * wmi_channel peer_chan_list[].
8791 * Array size would be peer_chan_len.
8792 * This array is intersected channels which is supported by both peer
8793 * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0.
8794 * FW shall compute BW for an offchan based on peer's ht/vht cap
8795 * received in peer_assoc cmd during change STA operation
8796 */
8797} wmi_tdls_peer_capabilities;
8798
8799#define WMI_TDLS_QOS_VO_FLAG 0
8800#define WMI_TDLS_QOS_VI_FLAG 1
8801#define WMI_TDLS_QOS_BK_FLAG 2
8802#define WMI_TDLS_QOS_BE_FLAG 3
8803#define WMI_TDLS_QOS_ACK_FLAG 4
8804#define WMI_TDLS_QOS_SP_FLAG 5
8805#define WMI_TDLS_QOS_MOREDATA_FLAG 7
8806
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308807#define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008808 (ppeer_caps)->peer_qos |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308809} while (0)
8810#define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008811 (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
8812
8813#define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
8814 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
8815#define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \
8816 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
8817#define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
8818 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
8819#define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \
8820 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
8821#define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
8822 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
8823#define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \
8824 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
8825#define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
8826 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
8827#define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \
8828 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
8829#define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
8830 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
8831#define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \
8832 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
8833/* SP has 2 bits */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308834#define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008835 (ppeer_caps)->peer_qos |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308836} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008837#define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \
8838 (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
8839
8840#define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
8841 WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
8842#define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \
8843 WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
8844
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308845#define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, flag) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008846 (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308847} while (0)
8848#define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, flag) \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008849 (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag)
8850
8851#define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \
8852 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
8853#define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \
8854 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG)
8855#define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \
8856 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
8857#define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \
8858 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG)
8859#define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \
8860 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
8861#define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \
8862 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG)
8863#define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \
8864 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
8865#define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \
8866 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG)
8867#define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
8868 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
8869#define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \
8870 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG)
8871/* SP has 2 bits */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308872#define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd, val) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008873 (pset_cmd)->tdls_puapsd_mask |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05308874} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08008875#define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \
8876 (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
8877
8878#define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
8879 WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
8880#define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \
8881 WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG)
8882
8883typedef struct {
8884 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */
8885 A_UINT32 tlv_header;
8886 /** unique id identifying the VDEV */
8887 A_UINT32 vdev_id;
8888 /** peer MAC address */
8889 wmi_mac_addr peer_macaddr;
8890 /** new TDLS state for peer (wmi_tdls_peer_state) */
8891 A_UINT32 peer_state;
8892 /* The TLV for wmi_tdls_peer_capabilities will follow.
8893 * wmi_tdls_peer_capabilities peer_caps;
8894 */
8895 /** Followed by the variable length TLV chan_info:
8896 * wmi_channel chan_info[] */
8897} wmi_tdls_peer_update_cmd_fixed_param;
8898
8899/* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */
8900
8901/* bitmap 20, 40, 80 or 160 MHz wide channel */
8902#define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */
8903#define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */
8904#define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */
8905#define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */
8906
8907enum wmi_tdls_offchan_mode {
8908 WMI_TDLS_ENABLE_OFFCHANNEL,
8909 WMI_TDLS_DISABLE_OFFCHANNEL
8910};
8911
8912typedef struct {
8913 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */
8914 A_UINT32 tlv_header;
8915 /** unique id identifying the VDEV */
8916 A_UINT32 vdev_id;
8917 /** Enable/Disable TDLS offchannel */
8918 A_UINT32 offchan_mode;
8919 /** peer MAC address */
8920 wmi_mac_addr peer_macaddr;
8921 /* Is peer initiator or responder of TDLS setup request */
8922 A_UINT32 is_peer_responder;
8923 /* off channel number */
8924 A_UINT32 offchan_num;
8925 /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */
8926 A_UINT32 offchan_bw_bitmap;
8927 /* operating class for offchan */
8928 A_UINT32 offchan_oper_class;
8929} wmi_tdls_set_offchan_mode_cmd_fixed_param;
8930
8931/** TDLS EVENTS */
8932enum wmi_tdls_peer_notification {
8933 /** tdls discovery recommended for peer (based
8934 * on tx bytes per second > tx_discover threshold) */
8935 WMI_TDLS_SHOULD_DISCOVER,
8936 /** tdls link tear down recommended for peer
8937 * due to tx bytes per second below tx_teardown_threshold
8938 * NB: this notification sent once */
8939 WMI_TDLS_SHOULD_TEARDOWN,
8940 /** tx peer TDLS link tear down complete */
8941 WMI_TDLS_PEER_DISCONNECTED,
8942};
8943
8944enum wmi_tdls_peer_reason {
8945 /** tdls teardown recommended due to low transmits */
8946 WMI_TDLS_TEARDOWN_REASON_TX,
8947 /** tdls link tear down recommended due to poor RSSI */
8948 WMI_TDLS_TEARDOWN_REASON_RSSI,
8949 /** tdls link tear down recommended due to offchannel scan */
8950 WMI_TDLS_TEARDOWN_REASON_SCAN,
8951 /** tdls peer disconnected due to peer deletion */
8952 WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
8953 /** tdls peer disconnected due to PTR timeout */
8954 WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
8955 /** tdls peer disconnected due wrong PTR format */
8956 WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
8957 /** tdls peer not responding */
8958 WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
8959};
8960
8961/* WMI_TDLS_PEER_EVENTID */
8962typedef struct {
8963 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */
8964 A_UINT32 tlv_header;
8965 /** peer MAC address */
8966 wmi_mac_addr peer_macaddr;
8967 /** TDLS peer status (wmi_tdls_peer_notification)*/
8968 A_UINT32 peer_status;
8969 /** TDLS peer reason (wmi_tdls_peer_reason) */
8970 A_UINT32 peer_reason;
8971 /** unique id identifying the VDEV */
8972 A_UINT32 vdev_id;
8973} wmi_tdls_peer_event_fixed_param;
8974
8975/* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
8976 don't use this for any new implementations */
8977typedef struct {
8978 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */
8979 /** unique id identifying the VDEV, generated by the caller */
8980 A_UINT32 vdev_id;
8981 /* New beacon interval to be used for the specified VDEV suggested by firmware */
8982 A_UINT32 new_bcn_intvl;
8983} wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
8984
8985/* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */
8986typedef struct {
8987 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */
8988 A_UINT32 tlv_header;
8989 /** 1: enable fw based adaptive ocs,
8990 * 0: disable fw based adaptive ocs
8991 */
8992 A_UINT32 enable;
8993 /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */
8994 /** The valid range is 0 to (num_macs-1). */
8995 A_UINT32 mac_id;
8996} wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param;
8997
8998/* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
8999typedef struct {
9000 /* Frequency of the channel for which the quota is set */
9001 A_UINT32 chan_mhz;
9002 /* Requested channel time quota expressed as percentage */
9003 A_UINT32 channel_time_quota;
9004} wmi_resmgr_chan_time_quota;
9005
9006typedef struct {
9007 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
9008 A_UINT32 tlv_header;
9009 /** number of channel time quota command structures
9010 * (wmi_resmgr_chan_time_quota) 1 or 2
9011 */
9012 A_UINT32 num_chans;
9013/* This TLV is followed by another TLV of array of bytes
9014 * A_UINT8 data[];
9015 * This data array contains
9016 * num_chans * size of(struct wmi_resmgr_chan_time_quota)
9017 */
9018} wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
9019
9020/* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
9021typedef struct {
9022 /* Frequency of the channel for which the latency is set */
9023 A_UINT32 chan_mhz;
9024 /* Requested channel latency in milliseconds */
9025 A_UINT32 latency;
9026} wmi_resmgr_chan_latency;
9027
9028typedef struct {
9029 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
9030 A_UINT32 tlv_header;
9031 /** number of channel latency command structures
9032 * (wmi_resmgr_chan_latency) 1 or 2
9033 */
9034 A_UINT32 num_chans;
9035/* This TLV is followed by another TLV of array of bytes
9036 * A_UINT8 data[];
9037 * This data array contains
9038 * num_chans * size of(struct wmi_resmgr_chan_latency)
9039 */
9040} wmi_resmgr_set_chan_latency_cmd_fixed_param;
9041
9042/* WMI_STA_SMPS_FORCE_MODE_CMDID */
9043
9044/** STA SMPS Forced Mode */
9045typedef enum {
9046 WMI_SMPS_FORCED_MODE_NONE = 0,
9047 WMI_SMPS_FORCED_MODE_DISABLED,
9048 WMI_SMPS_FORCED_MODE_STATIC,
9049 WMI_SMPS_FORCED_MODE_DYNAMIC
9050} wmi_sta_smps_forced_mode;
9051
9052typedef struct {
9053 /** TLV tag and len; tag equals
9054 * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
9055 A_UINT32 tlv_header;
9056 /** Unique id identifying the VDEV */
9057 A_UINT32 vdev_id;
9058 /** The mode of SMPS that is to be forced in the FW. */
9059 A_UINT32 forced_mode;
9060} wmi_sta_smps_force_mode_cmd_fixed_param;
9061
9062/** wlan HB commands */
9063#define WMI_WLAN_HB_ITEM_UDP 0x1
9064#define WMI_WLAN_HB_ITEM_TCP 0x2
9065#define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE, must be a multiple of 4 bytes */
9066
9067typedef struct {
9068 /** TLV tag and len; tag equals
9069 * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */
9070 A_UINT32 tlv_header;
9071 A_UINT32 vdev_id;
9072 A_UINT32 enable;
9073 A_UINT32 item;
9074 A_UINT32 session;
9075} wmi_hb_set_enable_cmd_fixed_param;
9076
9077typedef struct {
9078 /** TLV tag and len; tag equals
9079 * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */
9080 A_UINT32 tlv_header;
9081 A_UINT32 vdev_id;
9082 A_UINT32 srv_ip;
9083 A_UINT32 dev_ip;
9084 A_UINT32 seq;
9085 A_UINT32 src_port;
9086 A_UINT32 dst_port;
9087 A_UINT32 interval;
9088 A_UINT32 timeout;
9089 A_UINT32 session;
9090 wmi_mac_addr gateway_mac;
9091} wmi_hb_set_tcp_params_cmd_fixed_param;
9092
9093typedef struct {
9094 /** TLV tag and len; tag equals
9095 * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */
9096 A_UINT32 tlv_header;
9097 A_UINT32 vdev_id;
9098 A_UINT32 length;
9099 A_UINT32 offset;
9100 A_UINT32 session;
9101 A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
9102} wmi_hb_set_tcp_pkt_filter_cmd_fixed_param;
9103
9104typedef struct {
9105 /** TLV tag and len; tag equals
9106 * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */
9107 A_UINT32 tlv_header;
9108 A_UINT32 vdev_id;
9109 A_UINT32 srv_ip;
9110 A_UINT32 dev_ip;
9111 A_UINT32 src_port;
9112 A_UINT32 dst_port;
9113 A_UINT32 interval;
9114 A_UINT32 timeout;
9115 A_UINT32 session;
9116 wmi_mac_addr gateway_mac;
9117} wmi_hb_set_udp_params_cmd_fixed_param;
9118
9119typedef struct {
9120 /** TLV tag and len; tag equals
9121 * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */
9122 A_UINT32 tlv_header;
9123 A_UINT32 vdev_id;
9124 A_UINT32 length;
9125 A_UINT32 offset;
9126 A_UINT32 session;
9127 A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE];
9128} wmi_hb_set_udp_pkt_filter_cmd_fixed_param;
9129
9130/** wlan HB events */
9131typedef enum {
9132 WMI_WLAN_HB_REASON_UNKNOWN = 0,
9133 WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1,
9134 WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2,
9135} WMI_HB_WAKEUP_REASON;
9136
9137typedef struct {
9138 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */
9139 A_UINT32 vdev_id; /* unique id identifying the VDEV */
9140 A_UINT32 session; /* Session ID from driver */
9141 A_UINT32 reason; /* wakeup reason */
9142} wmi_hb_ind_event_fixed_param;
9143
9144/** WMI_STA_SMPS_PARAM_CMDID */
9145typedef enum {
9146 /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
9147 WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
9148 /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
9149 * to enter D-SMPS mode from Stalled-D-SMPS mode */
9150 WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
9151 /** RSSI threshold to disable SMPS modes */
9152 WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
9153 /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
9154 WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
9155 /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
9156 WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4,
9157 /** Enable/Disable DTIM 1chRx feature */
9158 WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5
9159} wmi_sta_smps_param;
9160
9161typedef struct {
9162 /** TLV tag and len; tag equals
9163 * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
9164 A_UINT32 tlv_header;
9165 /** Unique id identifying the VDEV */
9166 A_UINT32 vdev_id;
9167 /** SMPS parameter (see wmi_sta_smps_param) */
9168 A_UINT32 param;
9169 /** Value of SMPS parameter */
9170 A_UINT32 value;
9171} wmi_sta_smps_param_cmd_fixed_param;
9172
9173typedef struct {
9174 /** TLV tag and len; tag equals
9175 * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */
9176 A_UINT32 tlv_header;
9177 /* TX stats */
9178 A_UINT32 txBytesPushed;
9179 A_UINT32 txPacketsPushed;
9180 /* RX stats */
9181 A_UINT32 rxBytesRcvd;
9182 A_UINT32 rxPacketsRcvd;
9183 A_UINT32 rxTimeTotal;
9184 /** peer MAC address */
9185 wmi_mac_addr peer_macaddr;
9186} wmi_mcc_sched_sta_traffic_stats;
9187
9188typedef struct {
9189 /** TLV tag and len; tag equals
9190 * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */
9191 A_UINT32 tlv_header;
9192 /** Duration over which the host stats were collected */
9193 A_UINT32 duration;
9194 /** Number of stations filled in following stats array */
9195 A_UINT32 num_sta;
9196 /* Following this struct are the TLVs:
9197 * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list;
9198 */
9199} wmi_mcc_sched_traffic_stats_cmd_fixed_param;
9200
9201typedef struct {
9202 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */
9203 /* unique id identifying the VDEV, generated by the caller */
9204 A_UINT32 vdev_id;
9205 /*Batch scan enable command parameters */
9206 A_UINT32 scanInterval;
9207 A_UINT32 numScan2Batch;
9208 A_UINT32 bestNetworks;
9209 A_UINT32 rfBand;
9210 A_UINT32 rtt;
9211} wmi_batch_scan_enable_cmd_fixed_param;
9212
9213typedef struct {
9214 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */
9215 A_UINT32 supportedMscan;
9216} wmi_batch_scan_enabled_event_fixed_param;
9217
9218typedef struct {
9219 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */
9220/* unique id identifying the VDEV, generated by the caller */
9221 A_UINT32 vdev_id;
9222 A_UINT32 param;
9223} wmi_batch_scan_disable_cmd_fixed_param;
9224
9225typedef struct {
9226 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */
9227 /** unique id identifying the VDEV, generated by the caller */
9228 A_UINT32 vdev_id;
9229 A_UINT32 param;
9230} wmi_batch_scan_trigger_result_cmd_fixed_param;
9231
9232typedef struct {
9233 A_UINT32 tlv_header;
9234 wmi_mac_addr bssid; /* BSSID */
9235 wmi_ssid ssid; /* SSID */
9236 A_UINT32 ch; /* Channel */
9237 A_UINT32 rssi; /* RSSI or Level */
9238 /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */
9239 A_UINT32 timestamp;
9240} wmi_batch_scan_result_network_info;
9241
9242typedef struct {
9243 A_UINT32 tlv_header;
9244 A_UINT32 scanId; /* Scan List ID. */
9245 /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */
9246 A_UINT32 numNetworksInScanList;
9247 A_UINT32 netWorkStartIndex; /* indicate the start index of network info */
9248} wmi_batch_scan_result_scan_list;
9249
9250#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.*/
9251#define LPI_IE_BITMAP_IS_PROBE 0x00000002 /*send true or false based on scan response frame being a Probe Rsp or not*/
9252#define LPI_IE_BITMAP_SSID 0x00000004 /*send ssid from received scan response frame*/
9253#define LPI_IE_BITMAP_RSSI 0x00000008 /* end RSSI value reported by HW for the received scan response after adjusting with noise floor*/
9254#define LPI_IE_BITMAP_CHAN 0x00000010 /*send channel number from the received scan response*/
9255#define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* sen Tx power from TPC IE of scan rsp*/
9256#define LPI_IE_BITMAP_TX_RATE 0x00000040 /*send rate of the received frame as reported by HW.*/
9257#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.*/
9258#define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /*send timestamp reported in the received scan rsp frame.*/
9259#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.*/
9260/*
9261 * TEMPORARY alias of incorrect old name the correct name.
9262 * This alias will be removed once all references to the old name have been fixed.
9263 */
9264#define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT
9265#define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false.*/
9266#define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP*/
9267#define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled*/
9268#define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device.*/
9269#define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel*/
9270#define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received.*/
9271#define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz*/
9272#define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above*/
9273#define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations*/
9274#define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan*/
9275#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.*/
9276#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*/
9277#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 +05309278/*
9279 * extscan will use this field to indicate to
9280 * LOWI LP whether to report result to context hub or not
9281 */
9282#define LPI_IE_BITMAP_REPORT_CONTEXT_HUB 0x00800000
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08009283#define LPI_IE_BITMAP_ALL 0xFFFFFFFF
9284
9285typedef struct {
9286 A_UINT32 tlv_header;
9287 /**A_BOOL indicates LPI mgmt snooping enable/disable*/
9288 A_UINT32 enable;
9289 /**LPI snooping mode*/
9290 A_UINT32 snooping_mode;
9291 /** LPI interested IEs in snooping context */
9292 A_UINT32 ie_bitmap;
9293} wmi_lpi_mgmt_snooping_config_cmd_fixed_param;
9294
9295typedef struct {
9296 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */
9297 /** Scan ID */
9298 A_UINT32 scan_id;
9299 /** Scan requestor ID */
9300 A_UINT32 scan_req_id;
9301 /** VDEV id(interface) that is requesting scan */
9302 A_UINT32 vdev_id;
9303 /** LPI interested IEs in scan context */
9304 A_UINT32 ie_bitmap;
9305 /** Scan Priority, input to scan scheduler */
9306 A_UINT32 scan_priority;
9307 /** dwell time in msec on active channels */
9308 A_UINT32 dwell_time_active;
9309 /** dwell time in msec on passive channels */
9310 A_UINT32 dwell_time_passive;
9311 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
9312 A_UINT32 min_rest_time;
9313 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
9314 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
9315 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
9316 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
9317 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
9318 * irrespective of activity. activity is determined by the idle_time parameter.
9319 */
9320 A_UINT32 max_rest_time;
9321 /** time before sending next set of probe requests.
9322 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
9323 * The number of probe requests specified depends on the ssid_list and bssid_list
9324 */
9325 A_UINT32 repeat_probe_time;
9326 /** time in msec between 2 consequetive probe requests with in a set. */
9327 A_UINT32 probe_spacing_time;
9328 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
9329 A_UINT32 idle_time;
9330 /** maximum time in msec allowed for scan */
9331 A_UINT32 max_scan_time;
9332 /** delay in msec before sending first probe request after switching to a channel */
9333 A_UINT32 probe_delay;
9334 /** Scan control flags */
9335 A_UINT32 scan_ctrl_flags;
9336 /** Burst duration time in msec*/
9337 A_UINT32 burst_duration;
9338
9339 /** # if channels to scan. In the TLV channel_list[] */
9340 A_UINT32 num_chan;
9341 /** number of bssids. In the TLV bssid_list[] */
9342 A_UINT32 num_bssid;
9343 /** number of ssid. In the TLV ssid_list[] */
9344 A_UINT32 num_ssids;
9345 /** number of bytes in ie data. In the TLV ie_data[] */
9346 A_UINT32 ie_len;
9347
9348/**
9349 * TLV (tag length value ) parameters follow the scan_cmd
9350 * structure. The TLV's are:
9351 * A_UINT32 channel_list[];
9352 * wmi_ssid ssid_list[];
9353 * wmi_mac_addr bssid_list[];
9354 * A_UINT8 ie_data[];
9355 */
9356} wmi_lpi_start_scan_cmd_fixed_param;
9357
9358typedef struct {
9359 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
9360 /** Scan requestor ID */
9361 A_UINT32 scan_req_id;
9362 /** Scan ID */
9363 A_UINT32 scan_id;
9364 /**
9365 * Req Type
9366 * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL
9367 * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id
9368 * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id
9369 * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine
9370 */
9371 A_UINT32 req_type;
9372 /**
9373 * vDev ID
9374 * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan
9375 */
9376 A_UINT32 vdev_id;
9377} wmi_lpi_stop_scan_cmd_fixed_param;
9378
9379typedef enum {
9380 WMI_LPI_DEVICE_TYPE_AP = 1,
9381 WMI_LPI_DEVICE_TYPE_P2P = 2,
9382 WMI_LPI_DEVICE_TYPE_NAN = 3,
9383} wmi_lpi_device_type;
9384
9385typedef struct {
9386 A_UINT32 tlv_header;
9387 /** Scan requestor ID */
9388 A_UINT32 scan_req_id;
9389 A_UINT32 ie_bitmap;
9390 A_UINT32 data_len;
9391} wmi_lpi_result_event_fixed_param;
9392
9393typedef enum {
9394 /** User scan Request completed */
9395 WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0,
9396 /** User Request was never serviced */
9397 WMI_LPI_STATUS_DROPPED_REQ = 1,
9398 /** Illegal channel Req */
9399 WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2,
9400 /** Illegal Operation Req */
9401 WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3,
9402 /** Request Aborted */
9403 WMI_LPI_STATUS_REQ_ABORTED = 4,
9404 /** Request Timed Out */
9405 WMI_LPI_STATUS_REQ_TIME_OUT = 5,
9406 /** Medium Busy, already there
9407 * is a scan is going on */
9408 WMI_LPI_STATUS_MEDIUM_BUSY = 6,
9409 /* Extscan is the scan client whose scan complete event is triggered */
9410 WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7,
9411} wmi_lpi_staus;
9412
9413typedef struct {
9414 A_UINT32 tlv_header;
9415 wmi_lpi_staus status;
9416 /** Scan requestor ID */
9417 A_UINT32 scan_req_id;
9418} wmi_lpi_status_event_fixed_param;
9419
9420typedef struct {
9421 A_UINT32 tlv_header;
9422 wmi_mac_addr bssid;
9423 wmi_ssid ssid;
9424 A_UINT32 freq;
9425 A_UINT32 rssi;
9426 A_UINT32 vdev_id;
9427} wmi_lpi_handoff_event_fixed_param;
9428
9429typedef struct {
9430 A_UINT32 tlv_header;
9431 A_UINT32 timestamp; /*timestamp of batch scan event */
9432 A_UINT32 numScanLists; /*number of scan in this event */
9433 A_UINT32 isLastResult; /*is this event a last event of the whole batch scan */
9434} wmi_batch_scan_result_event_fixed_param;
9435
9436typedef struct {
9437 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */
9438 A_UINT32 vdev_id;
9439 /* This TLV is followed by p2p_noa_info for vdev :
9440 * wmi_p2p_noa_info p2p_noa_info;
9441 */
9442} wmi_p2p_noa_event_fixed_param;
9443
9444#define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6
9445#define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1
9446
9447#define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0
9448#define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f
9449
9450#define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7
9451#define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf
9452
9453typedef struct {
9454 /** TLV tag and len; tag equals
9455 * */
9456 A_UINT32 tlv_header;
9457 /** gpip pin number */
9458 A_UINT32 gpio_pin_num;
9459 /** gpio interupt type */
9460 A_UINT32 int_type;
9461 /** RF radio status */
9462 A_UINT32 radio_state;
9463} wmi_rfkill_mode_param;
9464
9465typedef enum {
9466 WMI_SET_LED_SYS_POWEROFF,
9467 WMI_SET_LED_SYS_S3_SUSPEND,
9468 WMI_SET_LED_SYS_S4_S5,
9469 WMI_SET_LED_SYS_DRIVER_DISABLE,
9470 WMI_SET_LED_SYS_WAKEUP,
9471 WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */
9472 WMI_SET_LED_SYS_POWERON,
9473} wmi_led_sys_state_param;
9474
9475typedef enum {
9476 WMI_CONFIG_LED_TO_VDD = 0,
9477 WMI_CONFIG_LED_TO_GND = 1,
9478} wmi_config_led_connect_type;
9479
9480typedef enum {
9481 WMI_CONFIG_LED_NOT_WITH_BT = 0,
9482 WMI_CONFIG_LED_WITH_BT = 1,
9483} wmi_config_led_with_bt_flag;
9484
9485typedef enum {
9486 WMI_CONFIG_LED_DISABLE = 0,
9487 WMI_CONFIG_LED_ENABLE = 1,
9488} wmi_config_led_enable_flag;
9489
9490typedef struct {
9491 /** TLV tag and len; tag equals
9492 * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
9493 A_UINT32 tlv_header;
9494 /* Set GPIO pin */
9495 A_UINT32 led_gpio_pin;
9496 /* Set connect type defined in wmi_config_led_connect_type */
9497 A_UINT32 connect_type;
9498 /* Set flag defined in wmi_config_led_with_bt_flag */
9499 A_UINT32 with_bt;
9500 /* Set LED enablement defined in wmi_config_led_enable_flag */
9501 A_UINT32 led_enable;
9502} wmi_pdev_set_led_config_cmd_fixed_param;
9503
9504#define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0
9505#define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff
9506
9507/** WMI_PEER_INFO_REQ_CMDID
9508 * Request FW to provide peer info */
9509typedef struct {
9510 /** TLV tag and len; tag equals
9511 * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */
9512 A_UINT32 tlv_header;
9513 /** In order to get the peer info for a single peer, host shall
9514 * issue the peer_mac_address of that peer. For getting the
9515 * info all peers, the host shall issue 0xFFFFFFFF as the mac
9516 * address. The firmware will return the peer info for all the
9517 * peers on the specified vdev_id */
9518 wmi_mac_addr peer_mac_address;
9519 /** vdev id */
9520 A_UINT32 vdev_id;
9521} wmi_peer_info_req_cmd_fixed_param;
9522
9523typedef struct {
9524 /** TLV tag and len; tag equals
9525 * WMITLV_TAG_STRUC_wmi_peer_info */
9526 A_UINT32 tlv_header;
9527 /** mac addr of the peer */
9528 wmi_mac_addr peer_mac_address;
9529 /** data_rate of the peer */
9530 A_UINT32 data_rate;
9531 /** rssi of the peer */
9532 A_UINT32 rssi;
9533 /** tx fail count */
9534 A_UINT32 tx_fail_cnt;
9535} wmi_peer_info;
9536
9537/** FW response with the peer info */
9538typedef struct {
9539 /** TLV tag and len; tag equals
9540 * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */
9541 A_UINT32 tlv_header;
9542 /** number of peers in peer_info */
9543 A_UINT32 num_peers;
9544 /* This TLV is followed by another TLV of array of structs
9545 * wmi_peer_info peer_info[];
9546 */
9547} wmi_peer_info_event_fixed_param;
9548
9549/** FW response when tx failure count has reached threshold
9550 * for a peer */
9551typedef struct {
9552 /** TLV tag and len; tag equals
9553 * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */
9554 A_UINT32 tlv_header;
9555 /** vdev id*/
9556 A_UINT32 vdev_id;
9557 /** mac address */
9558 wmi_mac_addr peer_mac_address;
9559 /** tx failure count- will eventually be removed and not used * */
9560 A_UINT32 tx_fail_cnt;
9561 /** seq number of the nth tx_fail_event */
9562 A_UINT32 seq_no;
9563} wmi_peer_tx_fail_cnt_thr_event_fixed_param;
9564
9565enum wmi_rmc_mode {
9566 /** Disable RMC */
9567 WMI_RMC_MODE_DISABLED = 0,
9568 /** Enable RMC */
9569 WMI_RMC_MODE_ENABLED = 1,
9570};
9571
9572/** Enable RMC transmitter functionality. Upon
9573 * receiving this, the FW shall mutlicast frames with
9574 * reliablity. This is a vendor
9575 * proprietary feature. */
9576typedef struct {
9577 /** TLV tag and len; tag equals
9578 * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */
9579 A_UINT32 tlv_header;
9580 /** vdev id*/
9581 A_UINT32 vdev_id;
9582 /** enable_rmc contains values from enum wmi_rmc_mode;
9583 * Default value: 0 (disabled) */
9584 A_UINT32 enable_rmc;
9585} wmi_rmc_set_mode_cmd_fixed_param;
9586
9587/** Configure transmission periodicity of action frames in a
9588 * RMC network for the multicast transmitter */
9589typedef struct {
9590 /** TLV tag and len; tag equals
9591 * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */
9592 A_UINT32 tlv_header;
9593 /** vdev id */
9594 A_UINT32 vdev_id;
9595 /** time period in milliseconds. Default: 300 ms.
9596 An action frame indicating the current leader is transmitted by the
9597 RMC transmitter once every 'periodity_msec' */
9598 A_UINT32 periodicity_msec;
9599} wmi_rmc_set_action_period_cmd_fixed_param;
9600
9601/** Optimise Leader selection process in RMC functionality. For
9602 * Enhancement/Debug purposes only */
9603typedef struct {
9604 /** TLV tag and len; tag equals
9605 * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */
9606 A_UINT32 tlv_header;
9607 /** vdev id */
9608 A_UINT32 vdev_id;
9609 /** flags ::
9610 * 0x0001 - Enable beacon averaging
9611 * 0x0002 - Force leader selection
9612 * 0x0004 - Enable Timer based leader switch
9613 * 0x0008 - Use qos/NULL based for multicast reliability */
9614 A_UINT32 flags;
9615 /** control leader change timeperiod (in seconds) */
9616 A_UINT32 peridocity_leader_switch;
9617 /** control activity timeout value for data rx (in seconds) */
9618 A_UINT32 data_activity_timeout;
9619 /** mac address of leader */
9620 wmi_mac_addr forced_leader_mac_addr;
9621} wmi_rmc_config_cmd_fixed_param;
9622
9623/** MHF is generally implemented in
9624 * the kernel. To decrease system power consumption, the
9625 * driver can enable offloading this to the chipset. In
9626 * order for the offload, the firmware needs the routing table.
9627 * The host shall plumb the routing table into FW. The firmware
9628 * shall perform an IP address lookup and forward the packet to
9629 * the next hop using next hop's mac address. This is a vendor
9630 * proprietary feature. */
9631enum wmi_mhf_ofl_mode {
9632 /** Disable MHF offload */
9633 WMI_MHF_OFL_MODE_DISABLED = 0,
9634 /** Enable MHF offload */
9635 WMI_MHF_OFL_MODE_ENABLED = 1,
9636};
9637
9638typedef struct {
9639 /** TLV tag and len; tag equals
9640 * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */
9641 A_UINT32 tlv_header;
9642 /** vdev id*/
9643 A_UINT32 vdev_id;
9644 /** enable_mhf_ofl contains values from enum
9645 * wmi_mhf_ofl_mode; Default value: 0 (disabled) */
9646 A_UINT32 enable_mhf_ofl;
9647} wmi_mhf_offload_set_mode_cmd_fixed_param;
9648
9649enum wmi_mhf_ofl_table_action {
9650 /** Create forwarding offload table in FW */
9651 WMI_MHF_OFL_TBL_CREATE = 0,
9652 /** Append to existing MHF offload table */
9653 WMI_MHF_OFL_TBL_APPEND = 1,
9654 /** Flush entire MHF offload table in FW */
9655 WMI_MHF_OFL_TBL_FLUSH = 2,
9656};
9657
9658typedef struct {
9659 /** TLV tag and len; tag equals
9660 * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */
9661 A_UINT32 tlv_header;
9662 /** vdev id*/
9663 A_UINT32 vdev_id;
9664 /** action corresponds to values from enum
9665 * wmi_mhf_ofl_table_action */
9666 A_UINT32 action;
9667 /** number of entries in the table */
9668 A_UINT32 num_entries;
9669/** Followed by the variable length TLV
9670 * wmi_mhf_offload_routing_table_entry entries[] */
9671} wmi_mhf_offload_plumb_routing_table_cmd;
9672
9673typedef struct {
9674 /** TLV tag and len; tag equals
9675 * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */
9676 A_UINT32 tlv_header;
9677 /** Destination node's IP address */
9678 WMI_IPV4_ADDR dest_ipv4_addr;
9679 /** Next hop node's MAC address */
9680 wmi_mac_addr next_hop_mac_addr;
9681} wmi_mhf_offload_routing_table_entry;
9682
9683typedef struct {
9684 /** tlv tag and len, tag equals
9685 * WMITLV_TAG_STRUC_wmi_dfs_radar_event */
9686 A_UINT32 tlv_header;
9687
9688 /** full 64 tsf timestamp get from MAC tsf timer indicates
9689 * the time that the radar event uploading to host, split
9690 * it to high 32 bit and lower 32 bit in fulltsf_high and
9691 * full_tsf_low
9692 */
9693 A_UINT32 upload_fullts_low;
9694 A_UINT32 upload_fullts_high;
9695
9696 /** timestamp indicates the time when DFS pulse is detected
9697 * equal to ppdu_end_ts - radar_pusle_summary_ts_offset
9698 */
9699 A_UINT32 pulse_detect_ts;
9700
9701 /** the duaration of the pulse in us */
9702 A_UINT32 pulse_duration;
9703
9704 /** the center frequency of the radar pulse detected, KHz */
9705 A_UINT32 pulse_center_freq;
9706
9707 /** bandwidth of current DFS channel, MHz */
9708 A_UINT32 ch_bandwidth;
9709
9710 /** center channel frequency1 of current DFS channel, MHz */
9711 A_UINT16 ch_center_freq1;
9712
9713 /** center channel frequency2 of current DFS channel, MHz,
9714 * reserved for 160 BW mode
9715 */
9716 A_UINT16 ch_center_freq2;
9717
9718 /** flag to indicate if this pulse is chirp */
9719 A_UINT8 pulse_is_chirp;
9720
9721 /** RSSI recorded in the ppdu */
9722 A_UINT8 rssi;
9723
9724 /** extened RSSI info */
9725 A_UINT8 rssi_ext;
9726
9727 /** For 4-byte aligment padding */
9728 A_UINT8 reserved;
9729
9730 /** pmac_id for the radar event */
9731 A_UINT8 pmac_id;
9732
9733 /** index of peak magnitude bin (signed) */
9734 A_INT32 peak_sidx;
9735
9736} wmi_dfs_radar_event_fixed_param;
9737
9738typedef struct {
9739 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */
9740
9741 /*Thermal thresholds */
9742 A_UINT32 lower_thresh_degreeC; /* in degree C */
9743 A_UINT32 upper_thresh_degreeC; /* in degree C */
9744
9745 /*Enable/Disable Thermal Monitoring for Mitigation */
9746 A_UINT32 enable;
9747} wmi_thermal_mgmt_cmd_fixed_param;
9748
9749typedef struct {
9750 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */
9751
9752 A_UINT32 temperature_degreeC; /* temperature in degree C */
9753} wmi_thermal_mgmt_event_fixed_param;
9754
9755/**
9756 * This command is sent from WLAN host driver to firmware to
9757 * request firmware to configure auto shutdown timer in fw
9758 * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum>
9759 */
9760typedef struct {
9761 A_UINT32 tlv_header;
9762 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */
9763 A_UINT32 timer_value;
9764 /** timer value; 0=disable */
9765} wmi_host_auto_shutdown_cfg_cmd_fixed_param;
9766
9767enum wmi_host_auto_shutdown_reason {
9768 WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0,
9769 WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1,
9770 WMI_HOST_AUTO_SHUTDOWN_REASON_MAX,
9771};
9772
9773/* WMI_HOST_AUTO_SHUTDOWN_EVENTID */
9774typedef struct {
9775 A_UINT32 tlv_header;
9776 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */
9777 A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */
9778} wmi_host_auto_shutdown_event_fixed_param;
9779
9780/** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command.
9781 * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet.
9782 * This command is only used by some customer for verification test. It is not for end-user.
9783 *
9784 * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions.
9785 *
9786 * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet,
9787 * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condtion only. When multiple
9788 * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the
9789 * <channel, ack_offset> pair is unique.
9790 *
9791 * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word
9792 * called basic_config_info by bitmap
9793 * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination.
9794 *
9795 * '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
9796 * is ignored.
9797 * disable will remove preious conditions from FW.
9798 * conditions from the later command will over write conditions stored from a previous command.
9799 *
9800 */
9801
9802#define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */
9803#define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */
9804#define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */
9805#define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */
9806
9807#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */
9808#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */
9809#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */
9810#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */
9811
9812#define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */
9813#define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */
9814#define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */
9815#define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */
9816
9817#define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */
9818#define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */
9819
9820#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */
9821#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */
9822#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */
9823#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */
9824#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */
9825#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */
9826#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */
9827#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */
9828
9829#define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */
9830#define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */
9831
9832#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */
9833#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */
9834
9835#define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */
9836#define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */
9837
9838/** Bit map definition for basic_config_info starts */
9839#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0
9840#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309841#define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET)
9842#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 -08009843
9844#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5
9845#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309846#define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET)
9847#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 -08009848
9849#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10
9850#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309851#define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK)
9852#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 -08009853
9854#define WMI_TPC_CHAINMASK_CONFIG_BT_S 12
9855#define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309856#define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BT)
9857#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 -08009858
9859#define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14
9860#define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309861#define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STBC)
9862#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 -08009863
9864#define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16
9865#define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309866#define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BAND)
9867#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 -08009868
9869#define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17
9870#define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309871#define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STREAM)
9872#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 -08009873
9874#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18
9875#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309876#define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE)
9877#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 -08009878
9879#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21
9880/*
9881 * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST)
9882 * is temporarily maintained as an alias for the correct name
9883 * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
9884 */
9885#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL
9886#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309887#define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHANNEL)
9888#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 -08009889
9890#define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22
9891/*
9892 * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST)
9893 * is temporarily maintained as an alias for the correct name
9894 * (WMI_TPC_CHAINMASK_CONFIG_RATE)
9895 */
9896#define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE
9897#define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S)
9898#define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE)
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +05309899#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 -08009900
9901/** Bit map definition for basic_config_info ends */
9902
9903typedef struct {
9904 A_UINT32 tlv_header;
9905 /** Basic condition defined as bit map above, bitmap is chosen to save memory.
9906 * Bit0 ~ Bit4: tpc offset which will be adjusted if condtion matches, the unit is 0.5dB. bit4 indicates signed
9907 * Bit5 ~ Bit9: ack offset which will be adjusted if condtion matches, the unit is 0.5dB. bit9 indicates signed
9908 * 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
9909 * 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
9910 * 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
9911 * Bit16 : band condition b'0: 2G, b'1: 5G
9912 * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams
9913 * 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
9914 * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored
9915 * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored.
9916 * Bit23 ~ Bit31: reserved
9917 */
9918 A_UINT32 basic_config_info;
9919
9920 /** channel mapping bit rule: The lower bit corresponds with smaller channel.
9921 * it depends on Bit14 of basic_config_info
9922 * Total 24 channels for 5G
9923 * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165
9924 * Total 14 channels for 2G
9925 * 1 ~ 14
9926 */
9927 A_UINT32 channel;
9928
9929 /** rate mapping bit rule: The lower bit corresponds with lower rate.
9930 * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition"
9931 * Legacy rates , 11b, 11g, 11A
9932 * 11n one stream ( ht20, ht40 ) 8+8
9933 * 11n two streams ( ht20, ht40 ) 8+8
9934 * 11ac one stream ( vht20, vht40, vht80 ) 10+10+10
9935 * 11ac two streams (vht20, vht40, vht80 ) 10+10+10
9936 */
9937 A_UINT32 rate0;
9938 /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true.
9939 * 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
9940 */
9941
9942 /** 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
9943 */
9944 A_UINT32 rate1;
9945} wmi_tpc_chainmask_config;
9946
9947#define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/
9948#define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/
9949
9950typedef struct {
9951 A_UINT32 tlv_header;
9952 A_UINT32 enable;
9953 /** enable to set tpc & chainmask when condtions meet, 0: disabled, 1: enabled. */
9954 A_UINT32 num_tpc_chainmask_configs;
9955 /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */
9956} wmi_tpc_chainmask_config_cmd_fixed_param;
9957
9958typedef struct {
9959 A_UINT32 tlv_header;
9960 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */
9961 A_UINT32 data_len;
9962 /** length in byte of data[]. */
9963 /* This structure is used to send REQ binary blobs
9964 * from application/service to firmware where Host drv is pass through .
9965 * Following this structure is the TLV:
9966 * A_UINT8 data[]; // length in byte given by field data_len.
9967 */
9968} wmi_nan_cmd_param;
9969
9970typedef struct {
9971 A_UINT32 tlv_header;
9972 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */
9973 A_UINT32 data_len;
9974 /** length in byte of data[]. */
9975 /* This structure is used to send REQ binary blobs
9976 * from firmware to application/service where Host drv is pass through .
9977 * Following this structure is the TLV:
9978 * A_UINT8 data[]; // length in byte given by field data_len.
9979 */
9980} wmi_nan_event_hdr;
9981
9982typedef struct {
9983 A_UINT32 tlv_header;
9984 A_UINT32 num_data;
9985 /* followed by WMITLV_TAG_ARRAY_BYTE */
9986} wmi_diag_data_container_event_fixed_param;
9987
9988enum {
9989 WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0,
9990 WMI_PDEV_PARAM_TXPOWER_REASON_SAR,
9991 WMI_PDEV_PARAM_TXPOWER_REASON_MAX
9992};
9993
9994#define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF
9995#define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0
9996
9997#define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00
9998#define PDEV_PARAM_TXPOWER_REASON_SHIFT 8
9999
10000#define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \
10001 ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT))
10002
10003#define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \
10004 ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT))
10005
10006#define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \
10007 (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT)
10008
10009#define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \
10010 (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT)
10011
10012/**
10013 * This command is sent from WLAN host driver to firmware to
10014 * notify the current modem power state. Host would receive a
10015 * message from modem when modem is powered on. Host driver
10016 * would then send this command to firmware. Firmware would then
10017 * power on WCI-2 (UART) interface for LTE/MWS Coex.
10018 *
10019 * This command is only applicable for APQ platform which has
10020 * modem on the platform. If firmware doesn't support MWS Coex,
10021 * this command can be dropped by firmware.
10022 *
10023 * This is a requirement from modem team that WCN can't toggle
10024 * UART before modem is powered on.
10025 */
10026typedef struct {
10027 /** TLV tag and len; tag equals
10028 * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */
10029 A_UINT32 tlv_header;
10030
10031 /** Modem power state parameter */
10032 A_UINT32 modem_power_state;
10033} wmi_modem_power_state_cmd_param;
10034
10035enum {
10036 WMI_MODEM_STATE_OFF = 0,
10037 WMI_MODEM_STATE_ON
10038};
10039
10040#define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
10041#define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */
10042
10043/** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
10044 generated whenever firmware roamed to new AP silently and
10045 (a) If the host is awake, FW sends the event to the host immediately .
10046 (b) If host is in sleep then either
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010047 (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010048 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 +053010049 (2) data/mgmt frame is received from roamed AP, which needs to return to host
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010050 */
10051
10052typedef struct {
10053 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */
10054 A_UINT32 tlv_header;
10055
10056 A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */
10057 A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */
10058 A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES];
10059} wmi_key_material;
10060
10061typedef struct {
10062 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */
10063 /** Unique id identifying the VDEV on which roaming is done by firmware */
10064 A_UINT32 vdev_id;
10065 /** auth_status: connected or authorized */
10066 A_UINT32 auth_status;
10067 /*
Nirav Shah439e6262015-11-05 10:53:18 +053010068 * roam_reason:
10069 * bits 0-3 for roam reason see WMI_ROAM_REASON_XXX
10070 * bits 4-5 for subnet status see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010071 */
10072 A_UINT32 roam_reason;
10073 /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
10074 A_UINT32 rssi;
10075 /** MAC address of roamed AP */
10076 wmi_mac_addr bssid; /* BSSID */
10077 /** whether the frame is beacon or probe rsp */
10078 A_UINT32 is_beacon;
10079 /** the length of beacon/probe rsp */
10080 A_UINT32 bcn_probe_rsp_len;
10081 /** the length of reassoc rsp */
10082 A_UINT32 reassoc_rsp_len;
Manikandan Mohan30728082015-12-09 12:35:24 -080010083 /** the length of reassoc req */
10084 A_UINT32 reassoc_req_len;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010085 /**
10086 * TLV (tag length value ) parameters follows roam_synch_event
10087 * The TLV's are:
10088 * A_UINT8 bcn_probe_rsp_frame[]; length identified by bcn_probe_rsp_len
10089 * A_UINT8 reassoc_rsp_frame[]; length identified by reassoc_rsp_len
10090 * wmi_channel chan;
10091 * wmi_key_material key;
10092 * A_UINT32 status; subnet changed status not being used
10093 * currently. will pass the information using roam_status.
Manikandan Mohan30728082015-12-09 12:35:24 -080010094 * A_UINT8 reassoc_req_frame[]; length identified by reassoc_req_len
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010095 **/
10096} wmi_roam_synch_event_fixed_param;
10097
10098#define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF
10099
10100typedef struct {
10101 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */
10102 A_UINT32 tlv_header;
10103 /** MAC address of the peer for which the estimated link speed is required. */
10104 wmi_mac_addr peer_macaddr;
10105} wmi_peer_get_estimated_linkspeed_cmd_fixed_param;
10106
10107typedef struct {
10108 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */
10109 A_UINT32 tlv_header;
10110 /** MAC address of the peer for which the estimated link speed is required.
10111 */
10112 wmi_mac_addr peer_macaddr;
10113 /* Estimated link speed in kbps.
10114 * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID.
10115 */
10116 A_UINT32 est_linkspeed_kbps;
10117} wmi_peer_estimated_linkspeed_event_fixed_param;
10118
10119typedef struct {
10120 A_UINT32 tlv_header; /* TLV tag and len; tag equals */
10121 /* vdev ID */
10122 A_UINT32 vdev_id;
10123 A_UINT32 data_len;
10124 /** length in byte of data[]. */
10125 /* This structure is used to send REQ binary blobs
10126 * from application/service to firmware where Host drv is pass through .
10127 * Following this structure is the TLV:
10128 * A_UINT8 data[]; // length in byte given by field data_len.
10129 */
10130} wmi_req_stats_ext_cmd_fixed_param;
10131
10132typedef struct {
10133 A_UINT32 tlv_header;
10134 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */
10135 A_UINT32 vdev_id;
10136 /** vdev ID */
10137 A_UINT32 data_len;
10138 /** length in byte of data[]. */
10139 /* This structure is used to send REQ binary blobs
10140 * from firmware to application/service where Host drv is pass through .
10141 * Following this structure is the TLV:
10142 * A_UINT8 data[]; // length in byte given by field data_len.
10143 */
10144} wmi_stats_ext_event_fixed_param;
10145
10146typedef struct {
Manikandan Mohan429a0782015-12-23 14:35:54 -080010147 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */
10148 /** unique id identifying the VDEV, generated by the caller */
10149 A_UINT32 vdev_id;
10150 /** peer MAC address */
10151 wmi_mac_addr peer_macaddr;
10152} wmi_peer_delete_resp_event_fixed_param;
10153
10154typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010155 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */
10156 A_UINT32 tlv_header;
10157 A_UINT32 vdev_id; /* vdev ID */
10158 /* MAC address of the peer for which the estimated link speed is required. */
10159 wmi_mac_addr peer_macaddr;
10160 A_UINT32 state; /* peer state */
10161} wmi_peer_state_event_fixed_param;
10162
10163typedef struct {
10164 /*
10165 * TLV tag and len; tag equals
10166 * WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param
10167 */
10168 A_UINT32 tlv_header;
10169 /* unique id identifying the VDEV, generated by the caller */
10170 A_UINT32 vdev_id;
10171 /* peer MAC address */
10172 wmi_mac_addr peer_macaddr;
10173} wmi_peer_assoc_conf_event_fixed_param;
10174
10175enum {
10176 WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0,
10177 /** scan_type: passive */
10178 WMI_2G4_HT40_OBSS_SCAN_ACTIVE,
10179 /** scan_type: active */
10180};
10181
10182typedef struct {
10183 /**
10184 * TLV tag and len;
10185 * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enalbe_cmd_fixed_param
10186 */
10187 A_UINT32 tlv_header;
10188 A_UINT32 vdev_id;
10189 /**
10190 * active or passive. if active all the channels are actively scanned.
10191 * if passive then all the channels are passively scanned
10192 */
10193 A_UINT32 scan_type;
10194 /**
10195 * FW can perform multiple scans with in a OBSS scan interval.
10196 * For each scan,
10197 * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel ,
10198 * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel .
10199 * The unit for these 2 parameters is TUs.
10200 */
10201 A_UINT32 obss_scan_passive_dwell;
10202 A_UINT32 obss_scan_active_dwell;
10203 /**
10204 * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the
10205 * both min and total per channel dwell time requirement
10206 */
10207 A_UINT32 bss_channel_width_trigger_scan_interval;
10208 /**
10209 * FW can perform multiple scans with in a OBSS scan interval.
10210 * For each scan,
10211 * the total per channel dwell time across all scans with in OBSS scan interval should be
10212 * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel
10213 * for active scans and ,
10214 * The unit for these 2 parameters is TUs.
10215 */
10216 A_UINT32 obss_scan_passive_total_per_channel;
10217 A_UINT32 obss_scan_active_total_per_channel;
10218 A_UINT32 bss_width_channel_transition_delay_factor;
10219 /** parameter to check exemption from scan */
10220 A_UINT32 obss_scan_activity_threshold;
10221 /** parameter to check exemption from scan */
10222 /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */
10223 A_UINT32 forty_mhz_intolerant;
10224 /** STA 40M bandwidth intolerant capability */
10225 A_UINT32 current_operating_class;
10226 /** STA current operating class */
10227 /** length of 2.4GHz channel list to scan at, channel list in tlv->channels[] */
10228 A_UINT32 channel_len;
10229 /** length of optional ie data to append to probe reqest when active scan, ie data in tlv->ie_field[] */
10230 A_UINT32 ie_len;
10231} wmi_obss_scan_enable_cmd_fixed_param;
10232
10233typedef struct {
10234 /**
10235 * TLV tag and len;
10236 * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param
10237 */
10238 A_UINT32 tlv_header;
10239 A_UINT32 vdev_id;
10240} wmi_obss_scan_disable_cmd_fixed_param;
10241
10242typedef struct {
10243 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */
10244 A_UINT32 tlv_header;
10245 /** unique id identifying the VDEV */
10246 A_UINT32 vdev_id;
10247 /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */
10248 A_UINT32 tx_status;
10249} wmi_offload_prb_rsp_tx_status_event_fixed_param;
10250
10251typedef enum {
10252 WMI_FRAME_TX_OK, /* frame tx ok */
10253 WMI_FRAME_TX_XRETRY, /* excessivley retried */
10254 WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */
10255 WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */
10256} WMI_FRAME_TX_STATUS;
10257
10258/**
10259 * This command is sent from WLAN host driver to firmware to
10260 * request firmware to send the latest channel avoidance range
10261 * to host.
10262 *
10263 * This command is only applicable for APQ platform which has
10264 * modem on the platform. If firmware doesn't support MWS Coex,
10265 * this command can be dropped by firmware.
10266 *
10267 * Host would send this command to firmware to request a channel
10268 * avoidance information update.
10269 */
10270typedef struct {
10271 /** TLV tag and len; tag equals
10272 * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */
10273 A_UINT32 tlv_header;
10274} wmi_chan_avoid_update_cmd_param;
10275
10276/* ExtScan operation mode */
10277typedef enum {
10278 WMI_EXTSCAN_MODE_NONE = 0x0000,
10279 WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */
10280 WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */
10281 WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */
10282} wmi_extscan_operation_mode;
10283
10284/* Channel Mask */
10285typedef enum {
10286 WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000,
10287 WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */
10288 WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */
10289 WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */
10290} wmi_channel_band_mask;
10291
10292typedef enum {
10293 WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001,
10294 WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002,
10295 WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004,
10296 WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008,
10297 WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010,
10298 WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020,
Govind Singhfad2f212016-01-21 10:55:51 +053010299 WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040,
10300 WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010301
10302 WMI_EXTSCAN_EVENT_MAX = 0x8000
10303} wmi_extscan_event_type;
10304
10305#define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \
10306 WMI_EXTSCAN_CYCLE_COMPLETED_EVENT)
10307
10308#define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \
10309 WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \
10310 WMI_EXTSCAN_BUCKET_FAILED_EVENT | \
10311 WMI_EXTSCAN_BUCKET_OVERRUN_EVENT)
10312
10313typedef enum {
10314 WMI_EXTSCAN_NO_FORWARDING = 0x0000,
10315 WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001
10316} wmi_extscan_forwarding_flags;
10317
10318typedef enum {
10319 /* Use Motion Sensor Detection */
10320 WMI_EXTSCAN_USE_MSD = 0x0001,
10321 /* Extscan LPASS extended batching feature is supported and enabled */
10322 WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002,
10323} wmi_extscan_configuration_flags;
10324typedef enum {
10325 /*
10326 * Cache the results of bucket whose
10327 * configuration flags has this bit set
10328 */
10329 WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001,
Govind Singhfad2f212016-01-21 10:55:51 +053010330 /* Report ext scan results to context hub or not.*/
10331 WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010332} wmi_extscan_bucket_configuration_flags;
10333
10334typedef enum {
10335 WMI_EXTSCAN_STATUS_OK = 0,
10336 WMI_EXTSCAN_STATUS_ERROR = 0x80000000,
10337 WMI_EXTSCAN_STATUS_INVALID_PARAMETERS,
10338 WMI_EXTSCAN_STATUS_INTERNAL_ERROR
10339} wmi_extscan_start_stop_status;
10340
10341typedef struct {
10342 /** Request ID - to identify command. Cannot be 0 */
10343 A_UINT32 request_id;
10344 /** Requestor ID - client requesting ExtScan */
10345 A_UINT32 requestor_id;
10346 /** VDEV id(interface) that is requesting scan */
10347 A_UINT32 vdev_id;
10348} wmi_extscan_command_id;
10349
10350typedef struct {
10351 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
10352 /** channel number */
10353 A_UINT32 channel;
10354
10355 /** dwell time in msec - use defaults if 0 */
10356 A_UINT32 min_dwell_time;
10357 A_UINT32 max_dwell_time;
10358 /** passive/active channel and other flags */
10359 A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */
10360} wmi_extscan_bucket_channel;
10361
10362/* Scan Bucket specification */
10363typedef struct {
10364 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
10365 /** Bucket ID - 0-based */
10366 A_UINT32 bucket_id;
10367 /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */
10368 A_UINT32 notify_extscan_events;
10369 /** Options to forward scan results - see wmi_extscan_forwarding_flags */
10370 A_UINT32 forwarding_flags;
10371 /*
10372 * ExtScan configuration flags -
10373 * wmi_extscan__bucket_configuration_flags
10374 */
10375 A_UINT32 configuration_flags;
10376 /** DEPRECATED member:multiplier to be applied to the periodic scan's base period */
10377 A_UINT32 base_period_multiplier;
10378 /** dwell time in msec on active channels - use defaults if 0 */
10379 A_UINT32 min_dwell_time_active;
10380 A_UINT32 max_dwell_time_active;
10381 /** dwell time in msec on passive channels - use defaults if 0 */
10382 A_UINT32 min_dwell_time_passive;
10383 A_UINT32 max_dwell_time_passive;
10384 /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */
10385 A_UINT32 channel_band;
10386 /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */
10387 A_UINT32 num_channels;
10388 /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */
10389 A_UINT32 min_period;
10390 /** period above which exponent is not applied anymore */
10391 A_UINT32 max_period;
10392 /**
10393 * back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles
10394 * new_bucket_period = last_bucket_period + last_exponent_period exp_backoff
10395 */
10396 A_UINT32 exp_backoff;
10397 /** number of scans performed at a given periodicity after which exponential back off value is
10398 * applied to current periodicity to obtain a newer one
10399 */
10400 A_UINT32 exp_max_step_count;
10401/** Followed by the variable length TLV chan_list:
10402 * wmi_extscan_bucket_channel chan_list[] */
10403} wmi_extscan_bucket;
10404
10405typedef struct {
10406 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */
10407 /** Request ID - to identify command. Cannot be 0 */
10408 A_UINT32 request_id;
10409 /** Requestor ID - client requesting ExtScan */
10410 A_UINT32 requestor_id;
10411 /** VDEV id(interface) that is requesting scan */
10412 A_UINT32 vdev_id;
10413 /** table ID - to allow support for multiple simultaneous requests */
10414 A_UINT32 table_id;
10415 /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */
10416 A_UINT32 base_period;
10417 /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */
10418 A_UINT32 max_iterations;
10419 /** Options to forward scan results - see wmi_extscan_forwarding_flags */
10420 A_UINT32 forwarding_flags;
10421 /** ExtScan configuration flags - wmi_extscan_configuration_flags */
10422 A_UINT32 configuration_flags;
10423 /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */
10424 A_UINT32 notify_extscan_events;
10425 /** Scan Priority, input to scan scheduler */
10426 A_UINT32 scan_priority;
10427 /** Maximum number of BSSIDs to cache on each scan cycle */
10428 A_UINT32 max_bssids_per_scan_cycle;
10429 /** Minimum RSSI value to report */
10430 A_UINT32 min_rssi;
10431 /** Maximum table usage in percentage */
10432 A_UINT32 max_table_usage;
10433 /** default dwell time in msec on active channels */
10434 A_UINT32 min_dwell_time_active;
10435 A_UINT32 max_dwell_time_active;
10436 /** default dwell time in msec on passive channels */
10437 A_UINT32 min_dwell_time_passive;
10438 A_UINT32 max_dwell_time_passive;
10439 /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/
10440 A_UINT32 min_rest_time;
10441 /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/
10442 /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner
10443 * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will
10444 * switch to off channel. if there is activity the scanner will let the radio on the bss channel
10445 * until max_rest_time expires.at max_rest_time scanner will switch to off channel
10446 * irrespective of activity. activity is determined by the idle_time parameter.
10447 */
10448 A_UINT32 max_rest_time;
10449 /** time before sending next set of probe requests.
10450 * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time.
10451 * The number of probe requests specified depends on the ssid_list and bssid_list
10452 */
10453 /** Max number of probes to be sent */
10454 A_UINT32 n_probes;
10455 /** time in msec between 2 sets of probe requests. */
10456 A_UINT32 repeat_probe_time;
10457 /** time in msec between 2 consequetive probe requests with in a set. */
10458 A_UINT32 probe_spacing_time;
10459 /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */
10460 A_UINT32 idle_time;
10461 /** maximum time in msec allowed for scan */
10462 A_UINT32 max_scan_time;
10463 /** delay in msec before sending first probe request after switching to a channel */
10464 A_UINT32 probe_delay;
10465 /** Scan control flags */
10466 A_UINT32 scan_ctrl_flags;
10467 /** Burst duration time in msec*/
10468 A_UINT32 burst_duration;
10469
10470 /** number of bssids in the TLV bssid_list[] */
10471 A_UINT32 num_bssid;
10472 /** number of ssid in the TLV ssid_list[] */
10473 A_UINT32 num_ssids;
10474 /** number of bytes in TLV ie_data[] */
10475 A_UINT32 ie_len;
10476 /** number of buckets in the TLV bucket_list[] */
10477 A_UINT32 num_buckets;
10478 /** in number of scans, send notifications to host after these many scans */
10479 A_UINT32 report_threshold_num_scans;
10480
10481 /** number of channels in channel_list[] determined by the
10482 sum of wmi_extscan_bucket.num_channels in array */
10483
10484/**
10485 * TLV (tag length value ) parameters follow the extscan_cmd
10486 * structure. The TLV's are:
10487 * wmi_ssid ssid_list[];
10488 * wmi_mac_addr bssid_list[];
10489 * A_UINT8 ie_data[];
10490 * wmi_extscan_bucket bucket_list[];
10491 * wmi_extscan_bucket_channel channel_list[];
10492 */
10493} wmi_extscan_start_cmd_fixed_param;
10494
10495typedef struct {
10496 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */
10497 /** Request ID - to match running command. 0 matches any request */
10498 A_UINT32 request_id;
10499 /** Requestor ID - client requesting stop */
10500 A_UINT32 requestor_id;
10501 /** VDEV id(interface) that is requesting scan */
10502 A_UINT32 vdev_id;
10503 /** table ID - to allow support for multiple simultaneous requests */
10504 A_UINT32 table_id;
10505} wmi_extscan_stop_cmd_fixed_param;
10506
10507enum wmi_extscan_get_cached_results_flags {
10508 WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000,
10509 WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001
10510};
10511
10512typedef struct {
10513 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */
10514 /** request ID - used to correlate command with events */
10515 A_UINT32 request_id;
10516 /** Requestor ID - client that requested results */
10517 A_UINT32 requestor_id;
10518 /** VDEV id(interface) that is requesting scan */
10519 A_UINT32 vdev_id;
10520 /** table ID - to allow support for multiple simultaneous requests */
10521 A_UINT32 table_id;
10522 /** maximum number of results to be returned */
10523 A_UINT32 max_results;
10524 /** flush BSSID list - wmi_extscan_get_cached_results_flags */
10525 A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */
10526} wmi_extscan_get_cached_results_cmd_fixed_param;
10527
10528typedef struct {
10529 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */
10530 /** request ID - used to correlate command with events */
10531 A_UINT32 request_id;
10532 /** Requestor ID - client that requested results */
10533 A_UINT32 requestor_id;
10534 /** VDEV id(interface) that is requesting scan */
10535 A_UINT32 vdev_id;
10536 /** table ID - to allow support for multiple simultaneous requests */
10537 A_UINT32 table_id;
10538} wmi_extscan_get_wlan_change_results_cmd_fixed_param;
10539
10540typedef struct {
10541 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
10542 /**bssid */
10543 wmi_mac_addr bssid;
10544 /**channel number */
10545 A_UINT32 channel;
10546 /**upper RSSI limit */
10547 A_UINT32 upper_rssi_limit;
10548 /**lower RSSI limit */
10549 A_UINT32 lower_rssi_limit;
10550} wmi_extscan_wlan_change_bssid_param;
10551
10552typedef struct {
10553 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */
10554 /** Request ID - to identify command. Cannot be 0 */
10555 A_UINT32 request_id;
10556 /** Requestor ID - client requesting wlan change monitoring */
10557 A_UINT32 requestor_id;
10558 /** VDEV id(interface) that is requesting scan */
10559 A_UINT32 vdev_id;
10560 /** table ID - to allow support for multiple simultaneous tables */
10561 A_UINT32 table_id;
10562 /** operation mode: start/stop */
10563 A_UINT32 mode; /* wmi_extscan_operation_mode */
10564 /** number of rssi samples to store */
10565 A_UINT32 max_rssi_samples;
10566 /** number of samples to use to calculate RSSI average */
10567 A_UINT32 rssi_averaging_samples;
10568 /** number of scans to confirm loss of contact with RSSI */
10569 A_UINT32 lost_ap_scan_count;
10570 /** number of out-of-range BSSIDs necessary to send event */
10571 A_UINT32 max_out_of_range_count;
10572 /** total number of bssid signal descriptors (in all pages) */
10573 A_UINT32 total_entries;
10574 /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/
10575 A_UINT32 first_entry_index;
10576 /** number of bssid signal descriptors in this page */
10577 A_UINT32 num_entries_in_page;
10578 /* Following this structure is the TLV:
10579 * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[]; // number of elements given by field num_page_entries.
10580 */
10581} wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param;
10582
10583typedef struct {
10584 /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
10585 A_UINT32 tlv_header;
10586 /**ssid */
10587 wmi_ssid ssid;
10588 /**band */
10589 A_UINT32 band;
10590 /**RSSI threshold for reporting */
10591 A_UINT32 min_rssi;
10592 A_UINT32 max_rssi;
10593} wmi_extscan_hotlist_ssid_entry;
10594
10595typedef struct {
10596 /**
10597 * TLV tag and len; tag equals
10598 * MITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param
10599 */
10600 A_UINT32 tlv_header;
10601 /** Request ID - to identify command. Cannot be 0 */
10602 A_UINT32 request_id;
10603 /** Requestor ID - client requesting hotlist ssid monitoring */
10604 A_UINT32 requestor_id;
10605 /** VDEV id(interface) that is requesting scan */
10606 A_UINT32 vdev_id;
10607 /** table ID - to allow support for multiple simultaneous tables */
10608 A_UINT32 table_id;
10609 /** operation mode: start/stop */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053010610 A_UINT32 mode; /* wmi_extscan_operation_mode */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010611 /**total number of ssids (in all pages) */
10612 A_UINT32 total_entries;
10613 /**index of the first ssid entry found in the TLV extscan_hotlist_ssid_entry*/
10614 A_UINT32 first_entry_index;
10615 /**number of ssids in this page */
10616 A_UINT32 num_entries_in_page;
10617 /** number of consecutive scans to confirm loss of an ssid **/
10618 A_UINT32 lost_ap_scan_count;
10619 /* Following this structure is the TLV:
10620 * wmi_extscan_hotlist_ssid_entry hotlist_ssid[];
10621 * number of element given by field num_page_entries.
10622 */
10623} wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param;
10624
10625typedef struct {
10626 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
10627 /**bssid */
10628 wmi_mac_addr bssid;
10629 /**RSSI min threshold for reporting */
10630 A_UINT32 min_rssi;
10631 /**Deprecated entry channel number */
10632 A_UINT32 channel;
10633 /** RSSI max threshold for reporting */
10634 A_UINT32 max_rssi;
10635} wmi_extscan_hotlist_entry;
10636
10637typedef struct {
10638 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */
10639 /** Request ID - to identify command. Cannot be 0 */
10640 A_UINT32 request_id;
10641 /** Requestor ID - client requesting hotlist monitoring */
10642 A_UINT32 requestor_id;
10643 /** VDEV id(interface) that is requesting scan */
10644 A_UINT32 vdev_id;
10645 /** table ID - to allow support for multiple simultaneous tables */
10646 A_UINT32 table_id;
10647 /** operation mode: start/stop */
10648 A_UINT32 mode; /* wmi_extscan_operation_mode */
10649 /**total number of bssids (in all pages) */
10650 A_UINT32 total_entries;
10651 /**index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry*/
10652 A_UINT32 first_entry_index;
10653 /**number of bssids in this page */
10654 A_UINT32 num_entries_in_page;
10655 /** number of consecutive scans to confirm loss of contact with AP */
10656 A_UINT32 lost_ap_scan_count;
10657 /* Following this structure is the TLV:
10658 * wmi_extscan_hotlist_entry hotlist[]; // number of elements given by field num_page_entries.
10659 */
10660} wmi_extscan_configure_hotlist_monitor_cmd_fixed_param;
10661
10662 typedef struct {
10663 /* TLV tag and len; tag equals
10664 *WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
10665 A_UINT32 tlv_header;
10666 /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */
10667 A_UINT32 config_request_id;
10668 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID
10669 that configured the table */
10670 A_UINT32 config_requestor_id;
10671 /**
10672 * VDEV id(interface) of the
10673 * WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table
10674 */
10675 A_UINT32 config_vdev_id;
10676 /** table ID - to allow support for multiple simultaneous tables */
10677 A_UINT32 table_id;
10678 /**total number of ssids (in all pages) */
10679 A_UINT32 total_entries;
10680 /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/
10681 A_UINT32 first_entry_index;
10682 /**number of ssids in this page */
10683 A_UINT32 num_entries_in_page;
10684 /* Following this structure is the TLV:
10685 * wmi_extscan_wlan_descriptor hotlist_match[];
10686 * number of descriptors given by field num_entries_in_page
10687 */
10688} wmi_extscan_hotlist_ssid_match_event_fixed_param;
10689
10690typedef struct {
10691 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
10692 /** table ID - to allow support for multiple simultaneous tables */
10693 A_UINT32 table_id;
10694 /** size in bytes of scan cache entry */
10695 A_UINT32 scan_cache_entry_size;
10696 /** maximum number of scan cache entries */
10697 A_UINT32 max_scan_cache_entries;
10698 /** maximum number of buckets per extscan request */
10699 A_UINT32 max_buckets;
10700 /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */
10701 A_UINT32 max_bssid_per_scan;
10702 /** table usage level at which indication must be sent to host */
10703 A_UINT32 max_table_usage_threshold;
10704} wmi_extscan_cache_capabilities;
10705
10706typedef struct {
10707 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
10708 /** table ID - to allow support for multiple simultaneous tables */
10709 A_UINT32 table_id;
10710 /** size in bytes of wlan change entry */
10711 A_UINT32 wlan_change_entry_size;
10712 /** maximum number of entries in wlan change table */
10713 A_UINT32 max_wlan_change_entries;
10714 /** number of RSSI samples used for averaging RSSI */
10715 A_UINT32 max_rssi_averaging_samples;
10716 /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */
10717 A_UINT32 max_rssi_history_entries;
10718} wmi_extscan_wlan_change_monitor_capabilities;
10719
10720typedef struct {
10721 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
10722 /** table ID - to allow support for multiple simultaneous tables */
10723 A_UINT32 table_id;
10724 /** size in bytes of hotlist entry */
10725 A_UINT32 wlan_hotlist_entry_size;
10726 /** maximum number of entries in wlan change table */
10727 A_UINT32 max_hotlist_entries;
10728} wmi_extscan_hotlist_monitor_capabilities;
10729
10730typedef struct {
10731 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */
10732 /** Request ID - matches request ID used to start hot list monitoring */
10733 A_UINT32 request_id;
10734 /** Requestor ID - client requesting stop */
10735 A_UINT32 requestor_id;
10736 /** number of extscan caches */
10737 A_UINT32 num_extscan_cache_tables;
10738 /** number of wlan change lists */
10739 A_UINT32 num_wlan_change_monitor_tables;
10740 /** number of hotlists */
10741 A_UINT32 num_hotlist_monitor_tables;
10742 /** if one sided rtt data collection is supported */
10743 A_UINT32 rtt_one_sided_supported;
10744 /** if 11v data collection is supported */
10745 A_UINT32 rtt_11v_supported;
10746 /** if 11mc data collection is supported */
10747 A_UINT32 rtt_ftm_supported;
10748 /** number of extscan cache capabilities (one per table) */
10749 A_UINT32 num_extscan_cache_capabilities;
10750 /** number of wlan change capabilities (one per table) */
10751 A_UINT32 num_extscan_wlan_change_capabilities;
10752 /** number of extscan hotlist capabilities (one per table) */
10753 A_UINT32 num_extscan_hotlist_capabilities;
10754 /* Following this structure is the TLV:
10755 * wmi_extscan_cache_capabilities extscan_cache_capabilities; // number of capabilities given by num_extscan_caches
10756 * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; // number of capabilities given by num_wlan_change_monitor_tables
10757 * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; // number of capabilities given by num_hotlist_monitor_tables
10758 */
10759} wmi_extscan_set_capabilities_cmd_fixed_param;
10760
10761typedef struct {
10762 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */
10763 /** Request ID - matches request ID used to start hot list monitoring */
10764 A_UINT32 request_id;
10765 /** Requestor ID - client requesting capabilities */
10766 A_UINT32 requestor_id;
10767} wmi_extscan_get_capabilities_cmd_fixed_param;
10768
10769typedef struct {
10770 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */
10771 /** Request ID of the operation that was started/stopped */
10772 A_UINT32 request_id;
10773 /** Requestor ID of the operation that was started/stopped */
10774 A_UINT32 requestor_id;
10775 /** VDEV id(interface) of the operation that was started/stopped */
10776 A_UINT32 vdev_id;
10777 /** extscan WMI command */
10778 A_UINT32 command;
10779 /** operation mode: start/stop */
10780 A_UINT32 mode; /* wmi_extscan_operation_mode */
10781 /**success/failure */
10782 A_UINT32 status; /* enum wmi_extscan_start_stop_status */
10783 /** table ID - to allow support for multiple simultaneous requests */
10784 A_UINT32 table_id;
10785} wmi_extscan_start_stop_event_fixed_param;
10786
10787typedef struct {
10788 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */
10789 /** Request ID of the extscan operation that is currently running */
10790 A_UINT32 request_id;
10791 /** Requestor ID of the extscan operation that is currently running */
10792 A_UINT32 requestor_id;
10793 /** VDEV id(interface) of the extscan operation that is currently running */
10794 A_UINT32 vdev_id;
10795 /** scan event (wmi_scan_event_type) */
10796 A_UINT32 event; /* wmi_extscan_event_type */
10797 /** table ID - to allow support for multiple simultaneous requests */
10798 A_UINT32 table_id;
10799 /**number of buckets */
10800 A_UINT32 num_buckets;
10801 /* Following this structure is the TLV:
10802 * A_UINT32 bucket_id[]; // number of elements given by field num_buckets.
10803 */
10804} wmi_extscan_operation_event_fixed_param;
10805
10806/* Types of extscan tables */
10807typedef enum {
10808 EXTSCAN_TABLE_NONE = 0,
10809 EXTSCAN_TABLE_BSSID = 1,
10810 EXTSCAN_TABLE_RSSI = 2,
10811} wmi_extscan_table_type;
10812
10813typedef struct {
10814 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */
10815 /** Request ID of the extscan operation that is currently running */
10816 A_UINT32 request_id;
10817 /** Requestor ID of the extscan operation that is currently running */
10818 A_UINT32 requestor_id;
10819 /** VDEV id(interface) of the extscan operation that is currently running */
10820 A_UINT32 vdev_id;
10821 /** table ID - to allow support for multiple simultaneous tables */
10822 A_UINT32 table_id;
10823 /**see wmi_extscan_table_type for table reporting usage */
10824 A_UINT32 table_type;
10825 /**number of entries in use */
10826 A_UINT32 entries_in_use;
10827 /**maximum number of entries in table */
10828 A_UINT32 maximum_entries;
10829} wmi_extscan_table_usage_event_fixed_param;
10830
10831typedef enum {
10832 /**
10833 * Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec)
10834 * this can be used to discard scan results
10835 */
10836 WMI_SCAN_STATUS_INTERRUPTED = 1
10837} wmi_scan_status_flags;
10838
10839
10840typedef struct {
10841 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
10842 /**RSSI */
10843 A_UINT32 rssi;
10844 /**time stamp in milliseconds */
10845 A_UINT32 tstamp;
10846 /** Extscan cycle during which this entry was scanned */
10847 A_UINT32 scan_cycle_id;
10848 /**
10849 * flag to indicate if the given result was obtained as part of
10850 * interrupted (aborted/large time gap preempted) scan
10851 */
10852 A_UINT32 flags;
10853} wmi_extscan_rssi_info;
10854
10855typedef struct {
10856 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
10857 /**bssid */
10858 wmi_mac_addr bssid;
10859 /**ssid */
10860 wmi_ssid ssid;
10861 /**channel number */
10862 A_UINT32 channel;
10863 /* capabilities */
10864 A_UINT32 capabilities;
10865 /* beacon interval in TUs */
10866 A_UINT32 beacon_interval;
10867 /**time stamp in milliseconds - time last seen */
10868 A_UINT32 tstamp;
10869 /**flags - _tExtScanEntryFlags */
10870 A_UINT32 flags;
10871 /**RTT in ns */
10872 A_UINT32 rtt;
10873 /**rtt standard deviation */
10874 A_UINT32 rtt_sd;
10875 /* rssi information */
10876 A_UINT32 number_rssi_samples;
10877 /** IE length */
10878 A_UINT32 ie_length; /* length of IE data */
10879} wmi_extscan_wlan_descriptor;
10880
10881typedef struct {
10882 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */
10883 /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
10884 A_UINT32 request_id;
10885 /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
10886 A_UINT32 requestor_id;
10887 /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */
10888 A_UINT32 vdev_id;
10889 /** Request ID of the extscan operation that is currently running */
10890 A_UINT32 extscan_request_id;
10891 /** Requestor ID of the extscan operation that is currently running */
10892 A_UINT32 extscan_requestor_id;
10893 /** VDEV id(interface) of the extscan operation that is currently running */
10894 A_UINT32 extscan_vdev_id;
10895 /** table ID - to allow support for multiple simultaneous tables */
10896 A_UINT32 table_id;
10897 /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */
10898 A_UINT32 current_tstamp;
10899 /**total number of bssids (in all pages) */
10900 A_UINT32 total_entries;
10901 /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
10902 A_UINT32 first_entry_index;
10903 /**number of bssids in this page */
10904 A_UINT32 num_entries_in_page;
Govind Singhfad2f212016-01-21 10:55:51 +053010905 /* number of buckets scanned */
10906 A_UINT32 buckets_scanned;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080010907 /* Followed by the variable length TLVs
10908 * wmi_extscan_wlan_descriptor bssid_list[]
10909 * wmi_extscan_rssi_info rssi_list[]
10910 * A_UINT8 ie_list[]
10911 */
10912} wmi_extscan_cached_results_event_fixed_param;
10913
10914typedef enum {
10915 EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00,
10916 EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01,
10917 EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02,
10918} wmi_extscan_wlan_change_flags;
10919
10920typedef struct {
10921 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */
10922 /**bssid */
10923 wmi_mac_addr bssid;
10924 /**time stamp in milliseconds */
10925 A_UINT32 tstamp;
10926 /**upper RSSI limit */
10927 A_UINT32 upper_rssi_limit;
10928 /**lower RSSI limit */
10929 A_UINT32 lower_rssi_limit;
10930 /** channel */
10931 A_UINT32 channel; /* in MHz */
10932 /**current RSSI average */
10933 A_UINT32 rssi_average;
10934 /**flags - wmi_extscan_wlan_change_flags */
10935 A_UINT32 flags;
10936 /**legnth of RSSI history to follow (number of values) */
10937 A_UINT32 num_rssi_samples;
10938} wmi_extscan_wlan_change_result_bssid;
10939
10940typedef struct {
10941 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */
10942 /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
10943 A_UINT32 request_id;
10944 /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
10945 A_UINT32 requestor_id;
10946 /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */
10947 A_UINT32 vdev_id;
10948 /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
10949 A_UINT32 config_request_id;
10950 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
10951 A_UINT32 config_requestor_id;
10952 /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */
10953 A_UINT32 config_vdev_id;
10954 /** table ID - to allow support for multiple simultaneous tables */
10955 A_UINT32 table_id;
10956 /**number of entries with RSSI out of range or BSSID not detected */
10957 A_UINT32 change_count;
10958 /**total number of bssid signal descriptors (in all pages) */
10959 A_UINT32 total_entries;
10960 /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/
10961 A_UINT32 first_entry_index;
10962 /**number of bssids signal descriptors in this page */
10963 A_UINT32 num_entries_in_page;
10964 /* Following this structure is the TLV:
10965 * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[]; // number of descriptors given by field num_entries_in_page.
10966 * Following this structure is the list of RSSI values (each is an A_UINT8):
10967 * A_UINT8 rssi_list[]; // last N RSSI values.
10968 */
10969} wmi_extscan_wlan_change_results_event_fixed_param;
10970
10971enum _tExtScanEntryFlags {
10972 WMI_HOTLIST_FLAG_NONE = 0x00,
10973 WMI_HOTLIST_FLAG_PRESENCE = 0x01,
10974 WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80,
10975};
10976
10977typedef struct {
10978 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */
10979 /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
10980 A_UINT32 config_request_id;
10981 /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
10982 A_UINT32 config_requestor_id;
10983 /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */
10984 A_UINT32 config_vdev_id;
10985 /** table ID - to allow support for multiple simultaneous tables */
10986 A_UINT32 table_id;
10987 /**total number of bssids (in all pages) */
10988 A_UINT32 total_entries;
10989 /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/
10990 A_UINT32 first_entry_index;
10991 /**number of bssids in this page */
10992 A_UINT32 num_entries_in_page;
10993 /* Following this structure is the TLV:
10994 * wmi_extscan_wlan_descriptor hotlist_match[]; // number of descriptors given by field num_entries_in_page.
10995 */
10996} wmi_extscan_hotlist_match_event_fixed_param;
10997
10998typedef struct {
10999 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */
11000 /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
11001 A_UINT32 request_id;
11002 /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
11003 A_UINT32 requestor_id;
11004 /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */
11005 A_UINT32 vdev_id;
11006 /** number of extscan caches */
11007 A_UINT32 num_extscan_cache_tables;
11008 /** number of wlan change lists */
11009 A_UINT32 num_wlan_change_monitor_tables;
11010 /** number of hotlists */
11011 A_UINT32 num_hotlist_monitor_tables;
11012 /** if one sided rtt data collection is supported */
11013 A_UINT32 rtt_one_sided_supported;
11014 /** if 11v data collection is supported */
11015 A_UINT32 rtt_11v_supported;
11016 /** if 11mc data collection is supported */
11017 A_UINT32 rtt_ftm_supported;
11018 /** number of extscan cache capabilities (one per table) */
11019 A_UINT32 num_extscan_cache_capabilities;
11020 /** number of wlan change capabilities (one per table) */
11021 A_UINT32 num_extscan_wlan_change_capabilities;
11022 /** number of extscan hotlist capabilities (one per table) */
11023 A_UINT32 num_extscan_hotlist_capabilities;
11024 /* max number of roaming ssid whitelist firmware can support */
11025 A_UINT32 num_roam_ssid_whitelist;
11026 /* max number of blacklist bssid firmware can support */
11027 A_UINT32 num_roam_bssid_blacklist;
11028 /* max number of preferred list firmware can support */
11029 A_UINT32 num_roam_bssid_preferred_list;
11030 /* max number of hotlist ssids firmware can support */
11031 A_UINT32 num_extscan_hotlist_ssid;
11032 /* max number of epno networks firmware can support */
11033 A_UINT32 num_epno_networks;
11034
11035 /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically
11036 * supports multiple lists of each type.
11037 *
11038 * wmi_extscan_cache_capabilities extscan_cache_capabilities[] // capabilities of extscan cache (BSSID/RSSI lists)
11039 * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] // capabilities of wlan_change_monitor_tables
11040 * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] // capabilities of hotlist_monitor_tables
11041 */
11042} wmi_extscan_capabilities_event_fixed_param;
11043
11044/* WMI_D0_WOW_DISABLE_ACK_EVENTID */
11045typedef struct {
11046 A_UINT32 tlv_header;
11047 /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */
11048 A_UINT32 reserved0; /* for future need */
11049} wmi_d0_wow_disable_ack_event_fixed_param;
11050
11051/** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */
11052typedef struct {
11053 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param */
11054 A_UINT32 rsvd; /* for future need */
11055} wmi_pdev_resume_event_fixed_param;
11056
11057/** value representing all modules */
11058#define WMI_DEBUG_LOG_MODULE_ALL 0xffff
11059
11060/* param definitions */
11061
11062/**
11063 * Log level for a given module. Value contains both module id and log level.
11064 * here is the bitmap definition for value.
11065 * module Id : 16
11066 * Flags : reserved
11067 * Level : 8
11068 * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global).
11069 * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting.
11070 */
11071#define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1
11072
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011073#define WMI_DBGLOG_SET_LOG_LEVEL(val, lvl) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011074 (val) |= (lvl & 0xff); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011075} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011076
11077#define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff)
11078
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011079#define WMI_DBGLOG_SET_MODULE_ID(val, mid) do { \
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011080 (val) |= ((mid & 0xffff) << 16); \
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011081} while (0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011082
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011083#define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011084
11085/**
11086 * Enable the debug log for a given vdev. Value is vdev id
11087 */
11088#define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2
11089
11090/**
11091 * Disable the debug log for a given vdev. Value is vdev id
11092 * All the log level for a given VDEV is disabled except the ERROR log messages
11093 */
11094
11095#define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3
11096
11097/**
11098 * set vdev enable bitmap. value is the vden enable bitmap
11099 */
11100#define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4
11101
11102/**
11103 * set a given log level to all the modules specified in the module bitmap.
11104 * and set the log levle for all other modules to DBGLOG_ERR.
11105 * value: log levelt to be set.
11106 * module_id_bitmap : identifies the modules for which the log level should be set and
11107 * modules for which the log level should be reset to DBGLOG_ERR.
11108 */
11109#define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5
11110
11111#define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3)
11112
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011113#define WMI_MODULE_ENABLE(pmid_bitmap, mod_id) \
11114 ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \
11115 (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011116
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011117#define WMI_MODULE_DISABLE(pmid_bitmap, mod_id) \
11118 ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \
11119 (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY))))
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011120
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053011121#define WMI_MODULE_IS_ENABLED(pmid_bitmap, mod_id) \
11122 (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \
11123 (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080011124
11125#define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */
11126typedef struct {
11127 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */
11128 A_UINT32 dbg_log_param;
11129 /** param types are defined above */
11130 A_UINT32 value;
11131 /* The below array will follow this tlv ->fixed length module_id_bitmap[]
11132 A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS];
11133 */
11134} wmi_debug_log_config_cmd_fixed_param;
11135
11136typedef struct {
11137 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */
11138 A_UINT32 param; /* Reserved for future use */
11139} wmi_pdev_get_temperature_cmd_fixed_param;
11140
11141typedef struct {
11142 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */
11143 A_INT32 value; /* temprature value in Celcius degree */
11144} wmi_pdev_temperature_event_fixed_param;
11145
11146typedef struct {
11147 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */
11148 A_UINT32 vdev_id;
11149 A_UINT32 enable;
11150 A_UINT32 srv_ipv4; /* server IP */
11151 A_UINT32 start_lsb; /* starting address assigned to client */
11152 A_UINT32 num_client; /* number of clients we support */
11153} wmi_set_dhcp_server_offload_cmd_fixed_param;
11154
11155typedef enum {
11156 AP_RX_DATA_OFFLOAD = 0x00,
11157 STA_RX_DATA_OFFLOAD = 0x01,
11158} wmi_ipa_offload_types;
11159
11160/**
11161 * This command is sent from WLAN host driver to firmware for
11162 * enabling/disabling IPA data-path offload features.
11163 *
11164 *
11165 * Enabling data path offload to IPA(based on host INI configuration), example:
11166 * when STA interface comes up,
11167 * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
11168 * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
11169 *
11170 * Disabling data path offload to IPA, example:
11171 * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD,
11172 * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD)
11173 *
11174 *
11175 * This command is applicable only on the PCIE LL systems
11176 *
11177 */
11178typedef struct {
11179 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */
11180 A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */
11181 A_UINT32 vdev_id;
11182 A_UINT32 enable; /* 1 == enable, 0 == disable */
11183} wmi_ipa_offload_enable_disable_cmd_fixed_param;
11184
11185typedef enum {
11186 WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0,
11187 WMI_LED_FLASHING_PATTERN_CONNECTED = 1,
11188 WMI_LED_FLASHING_PATTERN_RESERVED = 2,
11189} wmi_set_led_flashing_type;
11190
11191/**
11192 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.
11193 Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will
11194 remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts
11195 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
11196 pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to
11197 High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of
11198 Zero is reached, it is skipped and moves on to the next interval.
11199 */
11200typedef struct {
11201 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */
11202 A_UINT32 pattern_id; /* pattern identifier */
11203 A_UINT32 led_x0; /* led flashing parameter0 */
11204 A_UINT32 led_x1; /* led flashing parameter1 */
11205 A_UINT32 gpio_num; /* GPIO number */
11206} wmi_set_led_flashing_cmd_fixed_param;
11207
11208/**
11209 * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses
11210 * within small networks that do not include a local name server.
11211 * It utilizes essentially the same programming interfaces, packet formats and operating semantics
11212 * as the unicast DNS, and the advantage is zero configuration service while no need for central or
11213 * global server.
11214 * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services
11215 * by type in a specified domain using standard DNS queries.
11216 * Here, we provide the ability to advertise the available services by responding to mDNS queries.
11217 */
11218typedef struct {
11219 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */
11220 A_UINT32 vdev_id;
11221 A_UINT32 enable;
11222} wmi_mdns_offload_cmd_fixed_param;
11223
11224#define WMI_MAX_MDNS_FQDN_LEN 64
11225#define WMI_MAX_MDNS_RESP_LEN 512
11226#define WMI_MDNS_FQDN_TYPE_GENERAL 0
11227#define WMI_MDNS_FQDN_TYPE_UNIQUE 1
11228
11229typedef struct {
11230 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */
11231 A_UINT32 vdev_id;
11232 /** type of fqdn, general or unique */
11233 A_UINT32 type;
11234 /** length of fqdn */
11235 A_UINT32 fqdn_len;
11236 /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len
11237 * A_UINT8 fqdn_data[]; // fully-qualified domain name to check if match with the received queries
11238 */
11239} wmi_mdns_set_fqdn_cmd_fixed_param;
11240
11241typedef struct {
11242 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */
11243 A_UINT32 vdev_id;
11244 /** Answer Resource Record count */
11245 A_UINT32 AR_count;
11246 /** length of response */
11247 A_UINT32 resp_len;
11248 /* Following this structure is the TLV byte stream of resp data of length resp_len
11249 * A_UINT8 resp_data[]; // responses consisits of Resource Records
11250 */
11251} wmi_mdns_set_resp_cmd_fixed_param;
11252
11253typedef struct {
11254 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */
11255 A_UINT32 vdev_id;
11256} wmi_mdns_get_stats_cmd_fixed_param;
11257
11258typedef struct {
11259 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */
11260 A_UINT32 vdev_id;
11261 /** curTimestamp in milliseconds */
11262 A_UINT32 curTimestamp;
11263 /** last received Query in milliseconds */
11264 A_UINT32 lastQueryTimestamp;
11265 /** last sent Response in milliseconds */
11266 A_UINT32 lastResponseTimestamp;
11267 /** stats of received queries */
11268 A_UINT32 totalQueries;
11269 /** stats of macth queries */
11270 A_UINT32 totalMatches;
11271 /** stats of responses */
11272 A_UINT32 totalResponses;
11273 /** indicate the current status of mDNS offload */
11274 A_UINT32 status;
11275} wmi_mdns_stats_event_fixed_param;
11276
11277/**
11278 * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process
11279 * down to the firmware. When this feature is enabled, firmware can process the association/disassociation
11280 * request and create/remove connection even host is suspended.
11281 * 3 major components are offloaded:
11282 * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response.
11283 * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4.
11284 * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK.
11285 * Current implementation only supports WPA2 CCMP.
11286 */
11287
11288typedef struct {
11289 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */
11290 /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */
11291 A_UINT32 vdev_id;
11292 /** enable/disable sap auth offload */
11293 A_UINT32 enable;
11294 /** sap ssid */
11295 wmi_ssid ap_ssid;
11296 /** authentication mode (defined above) */
11297 A_UINT32 rsn_authmode;
11298 /** unicast cipher set */
11299 A_UINT32 rsn_ucastcipherset;
11300 /** mcast/group cipher set */
11301 A_UINT32 rsn_mcastcipherset;
11302 /** mcast/group management frames cipher set */
11303 A_UINT32 rsn_mcastmgmtcipherset;
11304 /** sap channel */
11305 A_UINT32 channel;
11306 /** length of psk */
11307 A_UINT32 psk_len;
11308 /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len
11309 * A_UINT8 psk[];
11310 */
11311} wmi_sap_ofl_enable_cmd_fixed_param;
11312
11313typedef struct {
11314 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */
11315 /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */
11316 A_UINT32 vdev_id;
11317 /** aid (association id) of this station */
11318 A_UINT32 assoc_id;
11319 /** peer station's mac addr */
11320 wmi_mac_addr peer_macaddr;
11321 /** length of association request frame */
11322 A_UINT32 data_len;
11323 /* Following this structure is the TLV byte stream of a whole association request frame of length data_len
11324 * A_UINT8 bufp[];
11325 */
11326} wmi_sap_ofl_add_sta_event_fixed_param;
11327
11328typedef enum {
11329 SAP_OFL_DEL_STA_FLAG_NONE = 0x00,
11330 SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01,
11331} wmi_sap_ofl_del_sta_flags;
11332
11333typedef struct {
11334 A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */
11335 /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */
11336 A_UINT32 vdev_id;
11337 /** aid (association id) of this station */
11338 A_UINT32 assoc_id;
11339 /** peer station's mac addr */
11340 wmi_mac_addr peer_macaddr;
11341 /** disassociation reason */
11342 A_UINT32 reason;
11343 /** flags - wmi_sap_ofl_del_sta_flags */
11344 A_UINT32 flags;
11345} wmi_sap_ofl_del_sta_event_fixed_param;
11346
11347typedef struct {
11348 /*
11349 * TLV tag and len; tag equals
11350 * WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param
11351 */
11352 A_UINT32 tlv_header;
11353 A_UINT32 vdev_id;
11354 /* Number of client failure connection attempt */
11355 A_UINT32 num_retry;
11356 /*Time in milliseconds to record the client's failure connection attempts*/
11357 A_UINT32 retry_allow_time_ms;
11358 /*
11359 * Time in milliseconds to drop the connection request if
11360 * client is blacklisted
11361 */
11362 A_UINT32 blackout_time_ms;
11363} wmi_sap_set_blacklist_param_cmd_fixed_param;
11364
11365typedef struct {
11366 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */
11367 A_UINT32 data_len; /** length in byte of data[]. */
11368 /** This structure is used to send REQ binary blobs
11369 * from application/service to firmware where Host drv is pass through .
11370 * Following this structure is the TLV:
11371 * A_UINT8 data[]; // length in byte given by field data_len.
11372 */
11373} wmi_apfind_cmd_param;
11374
11375typedef enum apfind_event_type_e {
11376 APFIND_MATCH_EVENT = 0,
11377 APFIND_WAKEUP_EVENT,
11378} APFIND_EVENT_TYPE;
11379
11380typedef struct {
11381 A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */
11382 A_UINT32 event_type; /** APFIND_EVENT_TYPE */
11383 A_UINT32 data_len; /** length in byte of data[]. */
11384 /** This structure is used to send event binary blobs
11385 * from firmware to application/service and Host drv.
11386 * Following this structure is the TLV:
11387 * A_UINT8 data[]; // length in byte given by field data_len.
11388 */
11389} wmi_apfind_event_hdr;
11390
11391/**
11392 * OCB DCC types and structures.
11393 */
11394
11395/**
11396 * DCC types as described in ETSI TS 102 687
11397 * Type Format stepSize referenceValue numBits
11398 * -------------------------------------------------------------------------
11399 * ndlType_acPrio INTEGER (0...7) 1 number 3
11400 * ndlType_controlLoop INTEGER (0...7) 1 0 3
11401 * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13
11402 * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10
11403 * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13
11404 * ndlType_datarate INTEGER (0..7) Table 8 3
11405 * ndlType_distance INTEGER (0..4095) 1 m 0 12
11406 * ndlType_numberElements INTEGER (0..63) number 6
11407 * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11
11408 * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10
11409 * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5
11410 * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7
11411 * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7
11412 * ndlType_timing INTEGER (0..4095) 10 ms 0 12
11413 * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7
11414 * ndlType_ratio INTEGER (0..100) 1 % 0 % 7
11415 * ndlType_exponent INTEGER (0..100) 0.1 0 7
11416 * ndlType_queueStatus Enumeration Table A.2 1
11417 * ndlType_dccMechanism Bitset Table A.2 6
11418 *
11419 * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE)
11420 * cannot be changed without breaking WMI compatibility.
11421 *
11422 * NOTE: For each of the types, one additional bit is allocated. This
11423 * leftmost bit is used to indicate that the value is invalid.
11424 */
11425#define SIZE_NDLTYPE_ACPRIO (1 + 3)
11426#define SIZE_NDLTYPE_CONTROLLOOP (1 + 3)
11427#define SIZE_NDLTYPE_ARRIVALRATE (1 + 13)
11428#define SIZE_NDLTYPE_CHANNELLOAD (1 + 10)
11429#define SIZE_NDLTYPE_CHANNELUSE (1 + 13)
11430#define SIZE_NDLTYPE_DATARATE (1 + 3)
11431#define SIZE_NDLTYPE_DISTANCE (1 + 12)
11432#define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6)
11433#define SIZE_NDLTYPE_PACKETDURATION (1 + 11)
11434#define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10)
11435#define SIZE_NDLTYPE_PATHLOSS (1 + 5)
11436#define SIZE_NDLTYPE_RXPOWER (1 + 7)
11437#define SIZE_NDLTYPE_SNR (1 + 7)
11438#define SIZE_NDLTYPE_TIMING (1 + 12)
11439#define SIZE_NDLTYPE_TXPOWER (1 + 7)
11440#define SIZE_NDLTYPE_RATIO (1 + 7)
11441#define SIZE_NDLTYPE_EXPONENT (1 + 7)
11442#define SIZE_NDLTYPE_QUEUESTATUS (1 + 1)
11443#define SIZE_NDLTYPE_DCCMECHANISM (1 + 6)
11444#define SIZE_BYTE (8)
11445
11446#define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1)
11447#define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1)
11448#define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1)
11449#define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1)
11450#define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1)
11451#define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1)
11452#define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1)
11453#define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1)
11454#define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1)
11455#define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1)
11456#define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1)
11457#define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1)
11458#define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1)
11459#define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1)
11460#define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1)
11461#define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1)
11462#define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1)
11463#define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1)
11464#define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1)
11465
11466/**
11467 * The MCS_COUNT macro cannot be modified without breaking
11468 * WMI compatibility.
11469 */
11470#define MCS_COUNT (8)
11471
11472/**
11473 * Flags for ndlType_dccMechanism.
11474 */
11475typedef enum {
11476 DCC_MECHANISM_TPC = 1,
11477 DCC_MECHANISM_TRC = 2,
11478 DCC_MECHANISM_TDC = 4,
11479 DCC_MECHANISM_DSC = 8,
11480 DCC_MECHANISM_TAC = 16,
11481 DCC_MECHANISM_RESERVED = 32,
11482 DCC_MECHANISM_ALL = 0x3f,
11483} wmi_dcc_ndl_type_dcc_mechanism;
11484
11485/** Values for ndlType_queueStatus. */
11486typedef enum {
11487 DCC_QUEUE_CLOSED = 0,
11488 DCC_QUEUE_OPEN = 1,
11489} wmi_dcc_ndl_type_queue_status;
11490
11491/**
11492 * For ndlType_acPrio, use the values in wmi_traffic_ac.
11493 * Values for ndlType_datarate.
11494 */
11495typedef enum {
11496 DCC_DATARATE_3_MBPS = 0,
11497 DCC_DATARATE_4_5_MBPS = 1,
11498 DCC_DATARATE_6_MBPS = 2,
11499 DCC_DATARATE_9_MBPS = 3,
11500 DCC_DATARATE_12_MBPS = 4,
11501 DCC_DATARATE_18_MBPS = 5,
11502 DCC_DATARATE_24_MBPS = 6,
11503 DCC_DATARATE_27_MBPS = 7,
11504} wmi_dcc_ndl_type_datarate;
11505
11506/** Data structure for active state configuration. */
11507typedef struct {
11508 /** TLV tag and len; tag equals
11509 * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config
11510 */
11511 A_UINT32 tlv_header;
11512 /**
11513 * NDL_asStateId, ndlType_numberElements, 1+6 bits.
11514 * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits.
11515 */
11516 A_UINT32 state_info;
11517 /**
11518 * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits.
11519 * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits.
11520 * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits.
11521 * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits.
11522 */
11523 A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)];
11524 /**
11525 * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits.
11526 * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits.
11527 * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits.
11528 * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits.
11529 */
11530 A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
11531 /**
11532 * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
11533 * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
11534 * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
11535 * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits.
11536 */
11537 A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
11538 /**
11539 * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits.
11540 * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits.
11541 * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits.
11542 * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits.
11543 */
11544 A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
11545 /**
11546 * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits.
11547 * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits.
11548 * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits.
11549 * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits.
11550 */
11551 A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)];
11552} wmi_dcc_ndl_active_state_config;
11553
11554#define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7)
11555#define WMI_NDL_AS_STATE_ID_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 0, 7, val)
11556#define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11)
11557#define WMI_NDL_AS_CHAN_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 7, 11, val)
11558#define WMI_NDL_AS_DCC_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM)
11559#define WMI_NDL_AS_DCC_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val)
11560#define WMI_NDL_AS_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
11561#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)
11562#define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
11563#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)
11564#define WMI_NDL_AS_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
11565#define WMI_NDL_AS_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
11566#define WMI_NDL_AS_CARRIER_SENSE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER)
11567#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)
11568
11569/** Data structure for EDCA/QOS parameters. */
11570typedef struct {
11571 /** TLV tag and len; tag equals
11572 * WMITLV_TAG_STRUC_wmi_qos_parameter */
11573 A_UINT32 tlv_header;
11574 /** Arbitration Inter-Frame Spacing. Range: 2-15 */
11575 A_UINT32 aifsn;
11576 /** Contention Window minimum. Range: 1 - 10 */
11577 A_UINT32 cwmin;
11578 /** Contention Window maximum. Range: 1 - 10 */
11579 A_UINT32 cwmax;
11580} wmi_qos_parameter;
11581
11582/** Data structure for information specific to a channel. */
11583typedef struct {
11584 /** TLV tag and len; tag equals
11585 * WMITLV_TAG_STRUC_wmi_ocb_channel */
11586 A_UINT32 tlv_header;
11587 A_UINT32 bandwidth; /* MHz units */
11588 wmi_mac_addr mac_address;
11589} wmi_ocb_channel;
11590
11591/** Data structure for an element of the schedule array. */
11592typedef struct {
11593 /** TLV tag and len; tag equals
11594 * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */
11595 A_UINT32 tlv_header;
11596 A_UINT32 channel_freq; /* MHz units */
11597 A_UINT32 total_duration; /* ms units */
11598 A_UINT32 guard_interval; /* ms units */
11599} wmi_ocb_schedule_element;
11600
11601/** Data structure for OCB configuration. */
11602typedef struct {
11603 /** TLV tag and len; tag equals
11604 * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */
11605 A_UINT32 tlv_header;
11606 /** VDEV id(interface) that is being configured */
11607 A_UINT32 vdev_id;
11608 A_UINT32 channel_count;
11609 A_UINT32 schedule_size;
11610 A_UINT32 flags;
11611
11612 /** This is followed by a TLV array of wmi_channel.
11613 * This is followed by a TLV array of wmi_ocb_channel.
11614 * This is followed by a TLV array of wmi_qos_parameter.
11615 * This is followed by a TLV array of wmi_dcc_ndl_chan.
11616 * This is followed by a TLV array of wmi_dcc_ndl_active_state_config.
11617 * This is followed by a TLV array of wmi_ocb_schedule_element.
11618 */
11619} wmi_ocb_set_config_cmd_fixed_param;
11620
11621
11622#define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0
11623#define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1
11624
11625#define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) \
11626 (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET)
11627
11628
11629/** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */
11630typedef struct {
11631 /** TLV tag and len; tag equals
11632 * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param
11633 */
11634 A_UINT32 tlv_header;
11635 /* VDEV id(interface)*/
11636 A_UINT32 vdev_id;
11637 A_UINT32 status;
11638} wmi_ocb_set_config_resp_event_fixed_param;
11639
11640/* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking
11641 * WMI compatibility.
11642 */
11643/* The size of the utc time in bytes. */
11644#define SIZE_UTC_TIME (10)
11645/* The size of the utc time error in bytes. */
11646#define SIZE_UTC_TIME_ERROR (5)
11647
11648/** Data structure to set the UTC time. */
11649typedef struct {
11650 /** TLV tag and len; tag equals
11651 * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */
11652 A_UINT32 tlv_header;
11653 /*VDEV Identifier*/
11654 A_UINT32 vdev_id;
11655 /** 10 bytes of the utc time. */
11656 A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME, SIZE_BYTE)];
11657 /** 5 bytes of the time error. */
11658 A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR, SIZE_BYTE)];
11659} wmi_ocb_set_utc_time_cmd_fixed_param;
11660
11661#define WMI_UTC_TIME_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE)
11662#define WMI_UTC_TIME_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val)
11663#define WMI_TIME_ERROR_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE)
11664#define WMI_TIME_ERROR_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val)
11665
11666/** Data structure start the timing advertisement. The template for the
11667 * timing advertisement frame follows this structure in the WMI command.
11668 */
11669typedef struct {
11670 /** TLV tag and len; tag equals
11671 * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */
11672 A_UINT32 tlv_header;
11673 /*VDEV Identifier*/
11674 A_UINT32 vdev_id;
11675 /** Number of times the TA is sent every 5 seconds. */
11676 A_UINT32 repeat_rate;
11677 /** The frequency on which to transmit. */
11678 A_UINT32 channel_freq; /* MHz units */
11679 /** The offset into the template of the timestamp. */
11680 A_UINT32 timestamp_offset;
11681 /** The offset into the template of the time value. */
11682 A_UINT32 time_value_offset;
11683 /** The length of the timing advertisement template. The
11684 * template is in the TLV data. */
11685 A_UINT32 timing_advert_template_length;
11686 /** This is followed by a binary array containing the TA template. */
11687} wmi_ocb_start_timing_advert_cmd_fixed_param;
11688
11689/** Data structure to stop the timing advertisement. */
11690typedef struct {
11691 /** TLV tag and len; tag equals
11692 * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */
11693 A_UINT32 tlv_header;
11694 /*VDEV Identifier*/
11695 A_UINT32 vdev_id;
11696 A_UINT32 channel_freq; /* MHz units */
11697} wmi_ocb_stop_timing_advert_cmd_fixed_param;
11698
11699/** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */
11700typedef struct {
11701 /** TLV tag and len; tag equals
11702 * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */
11703 A_UINT32 tlv_header;
11704 /*VDEV Identifier*/
11705 A_UINT32 vdev_id;
11706 A_UINT32 reserved;
11707} wmi_ocb_get_tsf_timer_cmd_fixed_param;
11708
11709/** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */
11710typedef struct {
11711 /** TLV tag and len; tag equals
11712 * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */
11713 A_UINT32 tlv_header;
11714 /*VDEV Identifier*/
11715 A_UINT32 vdev_id;
11716 A_UINT32 tsf_timer_high;
11717 A_UINT32 tsf_timer_low;
11718} wmi_ocb_get_tsf_timer_resp_event_fixed_param;
11719
11720/** Data structure for DCC stats configuration per channel. */
11721typedef struct {
11722 /** TLV tag and len; tag equals
11723 * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */
11724 A_UINT32 tlv_header;
11725
11726 /*VDEV Identifier*/
11727 A_UINT32 vdev_id;
11728
11729 /** The channel for which this applies, 16 bits.
11730 * The dcc_stats_bitmap, 8 bits. */
11731 A_UINT32 chan_info;
11732
11733 /** Demodulation model parameters.
11734 *
11735 * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
11736 * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
11737 * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
11738 * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
11739 * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
11740 * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
11741 * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
11742 * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
11743 */
11744 A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)];
11745
11746 /** Communication ranges.
11747 *
11748 * tx_power, ndlType_txPower, 1+7 bits.
11749 * datarate, ndlType_datarate, 1+3 bits.
11750 */
11751 A_UINT32 tx_power_datarate;
11752 /**
11753 * NDL_carrierSenseRange, ndlType_distance, 1+12 bits.
11754 * NDL_estCommRange, ndlType_distance, 1+12 bits.
11755 */
11756 A_UINT32 carrier_sense_est_comm_range;
11757
11758 /** Channel load measures. */
11759 /**
11760 * dccSensitivity, ndlType_rxPower, 1+7 bits.
11761 * carrierSense, ndlType_rxPower, 1+7 bits.
11762 * NDL_channelLoad, ndlType_channelLoad, 1+10 bits.
11763 */
11764 A_UINT32 dcc_stats;
11765 /**
11766 * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits.
11767 * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits.
11768 */
11769 A_UINT32 packet_stats;
11770 /**
11771 * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits.
11772 */
11773 A_UINT32 channel_busy_time;
11774 /**
11775 *Transmit packet statistics.
11776 * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
11777 * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
11778 * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
11779 * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
11780 */
11781 A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
11782 /**
11783 * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
11784 * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
11785 * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
11786 * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
11787 */
11788 A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
11789 /**
11790 * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
11791 * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
11792 * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
11793 * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
11794 */
11795 A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
11796 /**
11797 * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
11798 * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
11799 * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
11800 * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
11801 */
11802 A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
11803} wmi_dcc_ndl_stats_per_channel;
11804
11805#define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
11806#define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
11807#define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
11808#define WMI_NDL_STATS_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
11809#define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8)
11810#define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val)
11811#define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
11812#define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
11813#define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8)
11814#define WMI_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val)
11815#define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4)
11816#define WMI_TX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val)
11817#define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13)
11818#define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val)
11819#define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13)
11820#define WMI_NDL_EST_COMM_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val)
11821#define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8)
11822#define WMI_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val)
11823#define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8)
11824#define WMI_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val)
11825#define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11)
11826#define WMI_NDL_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val)
11827#define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14)
11828#define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val)
11829#define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12)
11830#define WMI_NDL_PACKET_AVG_DURATION_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val)
11831#define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11)
11832#define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr, val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val)
11833
11834#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)
11835#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)
11836#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)
11837#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)
11838#define WMI_NDL_TX_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
11839#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)
11840#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)
11841#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)
11842
11843/** Bitmap for DCC stats. */
11844typedef enum {
11845 DCC_STATS_DEMODULATION_MODEL = 1,
11846 DCC_STATS_COMMUNICATION_RANGES = 2,
11847 DCC_STATS_CHANNEL_LOAD_MEASURES = 4,
11848 DCC_STATS_TRANSMIT_PACKET_STATS = 8,
11849 DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16,
11850 DCC_STATS_ALL = 0xff,
11851} wmi_dcc_stats_bitmap;
11852
11853/** Data structure for getting the DCC stats. */
11854typedef struct {
11855 /**
11856 * TLV tag and len; tag equals
11857 * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param
11858 */
11859 A_UINT32 tlv_header;
11860 /* VDEV identifier */
11861 A_UINT32 vdev_id;
11862 /**The number of channels for which stats are being requested. */
11863 A_UINT32 num_channels;
11864 /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */
11865} wmi_dcc_get_stats_cmd_fixed_param;
11866
11867typedef struct {
11868 /**
11869 * TLV tag and len; tag equals
11870 * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request.
11871 */
11872 A_UINT32 tlv_header;
11873 /** The channel for which this applies. */
11874 A_UINT32 chan_freq; /* MHz units */
11875 /** The DCC stats being requested. */
11876 A_UINT32 dcc_stats_bitmap;
11877} wmi_dcc_channel_stats_request;
11878
11879/** Data structure for the response with the DCC stats. */
11880typedef struct {
11881 /**
11882 * TLV tag and len; tag equals
11883 * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param
11884 */
11885 A_UINT32 tlv_header;
11886 /* VDEV identifier */
11887 A_UINT32 vdev_id;
11888 /** Number of channels in the response. */
11889 A_UINT32 num_channels;
11890 /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
11891} wmi_dcc_get_stats_resp_event_fixed_param;
11892
11893/** Data structure for clearing the DCC stats. */
11894typedef struct {
11895 /**
11896 * TLV tag and len; tag equals
11897 * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param
11898 */
11899 A_UINT32 tlv_header;
11900 /* VDEV identifier */
11901 A_UINT32 vdev_id;
11902 A_UINT32 dcc_stats_bitmap;
11903} wmi_dcc_clear_stats_cmd_fixed_param;
11904
11905/** Data structure for the pushed DCC stats */
11906typedef struct {
11907 /**
11908 * TLV tag and len; tag equals
11909 * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param
11910 */
11911 A_UINT32 tlv_header;
11912 /* VDEV identifier */
11913 A_UINT32 vdev_id;
11914 /** The number of channels in the response. */
11915 A_UINT32 num_channels;
11916 /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */
11917} wmi_dcc_stats_event_fixed_param;
11918
11919/** Data structure for updating NDL per channel. */
11920typedef struct {
11921 /**
11922 * TLV tag and len; tag equals
11923 * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan
11924 */
11925 A_UINT32 tlv_header;
11926 /**
11927 * Channel frequency, 16 bits
11928 * NDL_numActiveState, ndlType_numberElements, 1+6 bits
11929 */
11930 A_UINT32 chan_info;
11931 /**
11932 * NDL_minDccSampling, 10 bits.
11933 * Maximum time interval between subsequent checks of the DCC rules.
11934 */
11935 A_UINT32 ndl_min_dcc_sampling;
11936 /**
11937 * dcc_enable, 1 bit.
11938 * dcc_stats_enable, 1 bit.
11939 * dcc_stats_interval, 16 bits.
11940 */
11941 A_UINT32 dcc_flags;
11942 /** General DCC configuration.
11943 * NDL_timeUp, ndlType_timing, 1+12 bits.
11944 * NDL_timeDown, ndlType_timing, 1+12 bits.
11945 */
11946 A_UINT32 general_config;
11947 /** Transmit power thresholds.
11948 * NDL_minTxPower, ndlType_txPower, 1+7 bits.
11949 * NDL_maxTxPower, ndlType_txPower, 1+7 bits.
11950 */
11951 /* see "ETSI TS 102 687" table above for units */
11952 A_UINT32 min_max_tx_power;
11953 /**
11954 * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits.
11955 * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits.
11956 * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits.
11957 * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits.
11958 */
11959 /* see "ETSI TS 102 687" table above for units */
11960 A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
11961 /** Packet timing thresholds.
11962 * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
11963 * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
11964 * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
11965 * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
11966 */
11967 A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
11968 /**
11969 * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits.
11970 * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits.
11971 */
11972 A_UINT32 min_max_packet_interval;
11973 /**
11974 * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits.
11975 * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits.
11976 * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits.
11977 * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits
11978 */
11979 A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)];
11980 /** Packet datarate thresholds.
11981 * NDL_minDatarate, ndlType_datarate, 1+3 bits.
11982 * NDL_maxDatarate, ndlType_datarate, 1+3 bits.
11983 */
11984 A_UINT32 min_max_datarate;
11985 /**
11986 * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits.
11987 * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits.
11988 * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits.
11989 * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits.
11990 */
11991 A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)];
11992 /** Receive signal thresholds.
11993 * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits.
11994 * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits.
11995 * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits.
11996 */
11997 A_UINT32 min_max_def_carrier_sense;
11998
11999 /** Receive model parameter.
12000 * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits.
12001 * NDL_maxCsRange, ndlType_distance, 1+12 bits.
12002 * NDL_refPathLoss, ndlType_pathloss, 1+5 bits.
12003 */
12004 A_UINT32 receive_model_parameter;
12005
12006 /**
12007 * NDL_minSNR, ndlType_snr, 1+7 bits.
12008 */
12009 A_UINT32 receive_model_parameter_2;
12010
12011 /** Demodulation model parameters.
12012 * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits.
12013 * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits.
12014 * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits.
12015 * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits.
12016 * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits.
12017 * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits.
12018 * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits.
12019 * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits.
12020 */
12021 A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)];
12022 /** Transmit model parameters.
12023 * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits.
12024 * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits.
12025 * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits.
12026 * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits.
12027 */
12028 A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)];
12029 /**
12030 * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits.
12031 * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits.
12032 * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits.
12033 * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits.
12034 */
12035 A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)];
12036 /**
12037 * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits.
12038 * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits.
12039 * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits.
12040 * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits.
12041 */
12042 A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)];
12043 /* NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits. */
12044 A_UINT32 tm_max_channel_use;
12045 /**
12046 * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits.
12047 * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits.
12048 * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits.
12049 * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits.
12050 */
12051 A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)];
12052 /** Channel load thresholds.
12053 * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits.
12054 * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits.
12055 */
12056 A_UINT32 min_max_channel_load;
12057 /** Transmit queue parameters.
12058 * NDL_numQueue, ndlType_acPrio, 1+3 bits.
12059 * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit.
12060 * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit.
12061 * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit.
12062 * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit.
12063 */
12064 A_UINT32 transmit_queue_parameters;
12065 /**
12066 * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits.
12067 * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits.
12068 * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits.
12069 * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits.
12070 */
12071 A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)];
12072} wmi_dcc_ndl_chan;
12073
12074#define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16)
12075#define WMI_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val)
12076#define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7)
12077#define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val)
12078
12079#define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10)
12080#define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val)
12081
12082#define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16)
12083#define WMI_NDL_MEASURE_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val)
12084
12085
12086#define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1)
12087#define WMI_NDL_DCC_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val)
12088#define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1)
12089#define WMI_NDL_DCC_STATS_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val)
12090#define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16)
12091#define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val)
12092
12093#define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13)
12094#define WMI_NDL_TIME_UP_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 0, 13, val)
12095#define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13)
12096#define WMI_NDL_TIME_DOWN_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 13, 13, val)
12097
12098#define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8)
12099#define WMI_NDL_MIN_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val)
12100#define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8)
12101#define WMI_NDL_MAX_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val)
12102
12103#define WMI_NDL_DEF_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER)
12104#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)
12105
12106#define WMI_NDL_MAX_PACKET_DURATION_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION)
12107#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)
12108#define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11)
12109#define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val)
12110#define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11)
12111#define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val)
12112#define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL)
12113#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)
12114
12115#define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4)
12116#define WMI_NDL_MIN_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val)
12117#define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4)
12118#define WMI_NDL_MAX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val)
12119#define WMI_NDL_DEF_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE)
12120#define WMI_NDL_DEF_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val)
12121
12122#define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8)
12123#define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val)
12124#define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8)
12125#define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val)
12126#define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8)
12127#define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val)
12128
12129#define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8)
12130#define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val)
12131#define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13)
12132#define WMI_NDL_MAX_CS_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val)
12133#define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6)
12134#define WMI_NDL_REF_PATH_LOSS_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val)
12135
12136#define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8)
12137#define WMI_NDL_MIN_SNR_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val)
12138
12139#define WMI_NDL_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR)
12140#define WMI_NDL_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val)
12141
12142#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)
12143#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)
12144#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)
12145#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)
12146#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)
12147#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)
12148#define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14)
12149#define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr, val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val)
12150#define WMI_NDL_TM_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE)
12151#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)
12152
12153#define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11)
12154#define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val)
12155#define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11)
12156#define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val)
12157
12158#define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4)
12159#define WMI_NDL_NUM_QUEUE_SET(ptr, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val)
12160#define WMI_NDL_REF_QUEUE_STATUS_GET(ptr, acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2)
12161#define WMI_NDL_REF_QUEUE_STATUS_SET(ptr, acprio, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val)
12162#define WMI_NDL_REF_QUEUE_LEN_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS)
12163#define WMI_NDL_REF_QUEUE_LEN_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val)
12164
12165/** Data structure for updating the NDL. */
12166typedef struct {
12167 /** TLV tag and len; tag equals
12168 * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */
12169 A_UINT32 tlv_header;
12170 /* VDEV identifier */
12171 A_UINT32 vdev_id;
12172 /** The number of channels in the request. */
12173 A_UINT32 num_channel;
12174 /** This is followed by a TLV array of wmi_dcc_ndl_chan. */
12175 /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */
12176} wmi_dcc_update_ndl_cmd_fixed_param;
12177
12178typedef struct {
12179 /**
12180 * TLV tag and len; tag equals
12181 * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param
12182 */
12183 A_UINT32 tlv_header;
12184 /* VDEV identifier */
12185 A_UINT32 vdev_id;
12186 A_UINT32 status;
12187} wmi_dcc_update_ndl_resp_event_fixed_param;
12188
12189/* Actions for TSF timestamp */
12190typedef enum {
12191 TSF_TSTAMP_CAPTURE_REQ = 1,
12192 TSF_TSTAMP_CAPTURE_RESET = 2,
12193 TSF_TSTAMP_READ_VALUE = 3,
Govind Singhd2970e32016-01-21 10:30:02 +053012194 TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012195} wmi_tsf_tstamp_action;
12196
12197typedef struct {
12198 /** TLV tag and len; tag equals
12199 * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */
12200 A_UINT32 tlv_header;
12201 /** unique id identifying the VDEV, generated by the caller */
12202 A_UINT32 vdev_id;
12203 /* action type, refer to wmi_tsf_tstamp_action */
12204 A_UINT32 tsf_action;
Govind Singhd2970e32016-01-21 10:30:02 +053012205 /* low 32 bits of qtimer */
12206 A_UINT32 qtimer_low;
12207 /* high 32 bits of qtimer */
12208 A_UINT32 qtimer_high;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080012209} wmi_vdev_tsf_tstamp_action_cmd_fixed_param;
12210
12211typedef struct {
12212 /* TLV tag and len; tag equals
12213 * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */
12214 A_UINT32 tlv_header;
12215 /* VDEV identifier */
12216 A_UINT32 vdev_id;
12217 /* low 32bit of tsf */
12218 A_UINT32 tsf_low;
12219 /* high 32 bit of tsf */
12220 A_UINT32 tsf_high;
12221} wmi_vdev_tsf_report_event_fixed_param;
12222
12223typedef struct {
12224 /** TLV tag and len; tag equals
12225 * WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */
12226 A_UINT32 tlv_header;
12227 /* unique id identifying the VDEV, generated by the caller */
12228 A_UINT32 vdev_id;
12229 /* unique id to identify the ie_data as defined by ieee 802.11 spec */
12230 A_UINT32 ie_id;
12231 /* ie_len corresponds to num of bytes in ie_data[] */
12232 A_UINT32 ie_len;
12233 /*
12234 * Following this structure is the TLV byte stream of ie data of length
12235 * buf_len:
12236 * A_UINT8 ie_data[];
12237 */
12238} wmi_vdev_set_ie_cmd_fixed_param;
12239
12240typedef struct {
12241 /*
12242 * TLV tag and len; tag equals
12243 * WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param
12244 * Set Preferred Channel List
12245 */
12246 A_UINT32 tlv_header;
12247
12248 /* # of channels to scan */
12249 A_UINT32 num_chan;
12250 /*
12251 * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd
12252 * structure. The TLV's are:
12253 * A_UINT32 channel_list[];
12254 */
12255} wmi_soc_set_pcl_cmd_fixed_param;
12256
12257typedef struct {
12258 /* TLV tag and len; tag equals
12259 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param
12260 * Set Hardware Mode */
12261 A_UINT32 tlv_header;
12262
12263 /* Hardware Mode Index */
12264 A_UINT32 hw_mode_index;
12265} wmi_soc_set_hw_mode_cmd_fixed_param;
12266
12267typedef struct {
12268 /*
12269 * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param
12270 * Set Dual MAC Firmware Configuration
12271 */
12272 A_UINT32 tlv_header;
12273
12274 /* Concurrent scan configuration bits */
12275 A_UINT32 concurrent_scan_config_bits;
12276 /* Firmware mode configuration bits */
12277 A_UINT32 fw_mode_config_bits;
12278} wmi_soc_set_dual_mac_config_cmd_fixed_param;
12279
12280typedef struct {
12281 A_UINT32 num_tx_chains;
12282 A_UINT32 num_rx_chains;
12283 A_UINT32 reserved[2];
12284} soc_num_tx_rx_chains;
12285
12286typedef struct {
12287 A_UINT32 num_tx_chains_2g;
12288 A_UINT32 num_rx_chains_2g;
12289 A_UINT32 num_tx_chains_5g;
12290 A_UINT32 num_rx_chains_5g;
12291} band_num_tx_rx_chains;
12292
12293typedef union {
12294 soc_num_tx_rx_chains soc_txrx_chain_setting;
12295 band_num_tx_rx_chains band_txrx_chain_setting;
12296} antenna_num_tx_rx_chains;
12297
12298typedef enum {
12299 ANTENNA_MODE_DISABLED = 0x0,
12300 ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01,
12301 /* reserved */
12302} antenna_mode_reason;
12303
12304typedef struct {
12305 /*
12306 * TLV tag and len;
12307 * tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param
12308 */
12309 A_UINT32 tlv_header;
12310
12311 /* the reason for setting antenna mode, refer antenna_mode_reason */
12312 A_UINT32 reason;
12313
12314 /*
12315 * The above reason parameter will select whether the following union
12316 * is soc_num_tx_rx_chains or band_num_tx_rx_chains.
12317 */
12318 antenna_num_tx_rx_chains num_txrx_chains_setting;
12319} wmi_soc_set_antenna_mode_cmd_fixed_param;
12320
12321
12322/** Data structure for information specific to a VDEV to MAC mapping. */
12323typedef struct {
12324 /*
12325 * TLV tag and len; tag equals
12326 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */
12327 A_UINT32 tlv_header;
12328 A_UINT32 vdev_id; /* VDEV ID */
12329 A_UINT32 mac_id; /* MAC ID */
12330} wmi_soc_set_hw_mode_response_vdev_mac_entry;
12331
12332typedef struct {
12333 /* TLV tag and len; tag equals
12334 * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param
12335 * Set Hardware Mode Response Event **/
12336 A_UINT32 tlv_header;
12337
12338 /* Status of set_hw_mode command
12339 * Values for Status:
12340 * 0 - OK; command successful
12341 * 1 - EINVAL; Requested invalid hw_mode
12342 * 2 - ECANCELED; HW mode change canceled
12343 * 3 - ENOTSUP; HW mode not supported
12344 * 4 - EHARDWARE; HW mode change prevented by hardware
12345 * 5 - EPENDING; HW mode change is pending
12346 * 6 - ECOEX; HW mode change conflict with Coex
12347 */
12348 A_UINT32 status;
12349 /* Configured Hardware Mode */
12350 A_UINT32 cfgd_hw_mode_index;
12351 /* Number of Vdev to Mac entries */
12352 A_UINT32 num_vdev_mac_entries;
12353 /*
12354 * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event
12355 * structure. The TLV's are:
12356 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
12357 */
12358} wmi_soc_set_hw_mode_response_event_fixed_param;
12359
12360typedef struct {
12361 /*
12362 * TLV tag and len; tag equals
12363 * WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param
12364 * Hardware Mode Transition Event
12365 */
12366 A_UINT32 tlv_header;
12367 /* Original or old Hardware mode */
12368 A_UINT32 old_hw_mode_index;
12369 /* New Hardware Mode */
12370 A_UINT32 new_hw_mode_index;
12371 /* Number of Vdev to Mac entries */
12372 A_UINT32 num_vdev_mac_entries;
12373
12374 /**
12375 * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event
12376 * structure. The TLV's are:
12377 * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[];
12378 */
12379} wmi_soc_hw_mode_transition_event_fixed_param;
12380
12381
12382typedef struct {
12383 /*
12384 * TLV tag and len; tag equals
12385 * WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param
12386 * Set Dual MAC Config Response Event
12387 */
12388 A_UINT32 tlv_header;
12389
12390 /* Status for set_dual_mac_config command */
12391 /*
12392 * Values for Status:
12393 * 0 - OK; command successful
12394 * 1 - EINVAL; Requested invalid hw_mode
12395 * 3 - ENOTSUP; HW mode not supported
12396 * 4 - EHARDWARE; HW mode change prevented by hardware
12397 * 6 - ECOEX; HW mode change conflict with Coex
12398 */
12399 A_UINT32 status;
12400} wmi_soc_set_dual_mac_config_response_event_fixed_param;
12401
12402typedef enum {
12403 MAWC_MOTION_STATE_UNKNOWN,
12404 MAWC_MOTION_STATE_STATIONARY,
12405 MAWC_MOTION_STATE_WALK,
12406 MAWC_MOTION_STATE_TRANSIT,
12407} MAWC_MOTION_STATE;
12408
12409typedef enum {
12410 MAWC_SENSOR_STATUS_OK,
12411 MAWC_SENSOR_STATUS_FAILED_TO_ENABLE,
12412 MAWC_SENSOR_STATUS_SHUTDOWN,
12413} MAWC_SENSOR_STATUS;
12414
12415typedef struct {
12416 /* TLV tag and len; tag equals
12417 * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */
12418 A_UINT32 tlv_header;
12419 /** new motion state, MAWC_MOTION_STATE */
12420 A_UINT32 motion_state;
12421 /** status code of sensor, MAWC_SENSOR_STATUS */
12422 A_UINT32 sensor_status;
12423} wmi_mawc_sensor_report_ind_cmd_fixed_param;
12424
12425typedef struct {
12426 /* TLV tag and len; tag equals
12427 * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */
12428 A_UINT32 tlv_header;
12429 /* enable(1) or disable(0) */
12430 A_UINT32 enable;
12431} wmi_mawc_enable_sensor_event_fixed_param;
12432
12433typedef struct {
12434 /* TLV tag and len; tag equals
12435 * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */
12436 A_UINT32 tlv_header;
12437 /* Unique id identifying the VDEV */
12438 A_UINT32 vdev_id;
12439 /* enable(1) or disable(0) MAWC */
12440 A_UINT32 enable;
12441 /* ratio of skipping suppressing scan, skip one out of x */
12442 A_UINT32 suppress_ratio;
12443} wmi_extscan_configure_mawc_cmd_fixed_param;
12444
12445typedef struct {
12446 /* TLV tag and len; tag equals
12447 * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */
12448 A_UINT32 tlv_header;
12449 /* Unique id identifying the VDEV */
12450 A_UINT32 vdev_id;
12451 /* enable(1) or disable(0) MAWC */
12452 A_UINT32 enable;
12453 /* ratio of exponential backoff, next = current + current*ratio/100 */
12454 A_UINT32 exp_backoff_ratio;
12455 /* initial scan interval(msec) */
12456 A_UINT32 init_scan_interval;
12457 /* max scan interval(msec) */
12458 A_UINT32 max_scan_interval;
12459} wmi_nlo_configure_mawc_cmd_fixed_param;
12460
12461typedef struct {
12462 /* TLV tag and len; tag equals
12463 * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */
12464 A_UINT32 tlv_header;
12465 /* Unique id identifying the VDEV */
12466 A_UINT32 vdev_id;
12467 /* enable(1) or disable(0) MAWC */
12468 A_UINT32 enable;
12469 /* data traffic load (kBps) to register CMC */
12470 A_UINT32 traffic_load_threshold;
12471 /* RSSI threshold (dBm) to scan for Best AP */
12472 A_UINT32 best_ap_rssi_threshold;
12473 /* high RSSI threshold adjustment in Stationary to suppress scan */
12474 A_UINT32 rssi_stationary_high_adjust;
12475 /* low RSSI threshold adjustment in Stationary to suppress scan */
12476 A_UINT32 rssi_stationary_low_adjust;
12477} wmi_roam_configure_mawc_cmd_fixed_param;
12478
12479#define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2
12480#define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 10
12481
12482typedef enum {
12483 PACKET_FILTER_TYPE_INVALID = 0,
12484 PACKET_FILTER_TYPE_FILTER_PKT,
12485 PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */
12486 PACKET_FILTER_TYPE_MAX_ENUM_SIZE
12487} WMI_PACKET_FILTER_FILTER_TYPE;
12488
12489typedef enum {
12490 PACKET_FILTER_PROTO_TYPE_INVALID = 0,
12491
12492 /* L2 header */
12493 PACKET_FILTER_PROTO_TYPE_MAC,
12494 PACKET_FILTER_PROTO_TYPE_SNAP,
12495
12496 /* L3 header (EtherType) */
12497 PACKET_FILTER_PROTO_TYPE_IPV4,
12498 PACKET_FILTER_PROTO_TYPE_IPV6,
12499
12500 /* L4 header (IP protocol) */
12501 PACKET_FILTER_PROTO_TYPE_UDP,
12502 PACKET_FILTER_PROTO_TYPE_TCP,
12503 PACKET_FILTER_PROTO_TYPE_ICMPV6,
12504
12505 PACKET_FILTER_PROTO_TYPE_MAX
12506} WMI_PACKET_FILTER_PROTO_TYPE;
12507
12508typedef enum {
12509 PACKET_FILTER_CMP_TYPE_INVALID = 0,
12510 PACKET_FILTER_CMP_TYPE_EQUAL,
12511 PACKET_FILTER_CMP_TYPE_MASK_EQUAL,
12512 PACKET_FILTER_CMP_TYPE_NOT_EQUAL,
12513 PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
12514 PACKET_FILTER_CMP_TYPE_ADDRTYPE,
12515 PACKET_FILTER_CMP_TYPE_MAX
12516} WMI_PACKET_FILTER_CMP_TYPE;
12517
12518typedef enum {
12519 PACKET_FILTER_SET_INACTIVE = 0,
12520 PACKET_FILTER_SET_ACTIVE
12521} WMI_PACKET_FILTER_ACTION;
12522
12523typedef enum {
12524 PACKET_FILTER_SET_DISABLE = 0,
12525 PACKET_FILTER_SET_ENABLE
12526} WMI_PACKET_FILTER_RUNTIME_ENABLE;
12527
12528typedef struct {
12529 A_UINT32 proto_type;
12530 A_UINT32 cmp_type;
12531 A_UINT32 data_length; /* Length of the data to compare (units = bytes) */
12532 /*
12533 * from start of the respective frame header (
12534 * units = bytes)
12535 */
12536 A_UINT32 data_offset;
12537 /* Data to compare, little-endian order */
12538 A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD];
12539 /* Mask to be applied on rcvd packet data before compare, little-endian order */
12540 A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD];
12541} WMI_PACKET_FILTER_PARAMS_TYPE;
12542
12543typedef struct {
12544 A_UINT32 tlv_header;
12545 A_UINT32 vdev_id;
12546 A_UINT32 filter_id;
12547 A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */
12548 A_UINT32 filter_type;
12549 A_UINT32 num_params; /* how many entries in paramsData are valid */
12550 A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */
12551 WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER];
12552} WMI_PACKET_FILTER_CONFIG_CMD_fixed_param;
12553
12554/* enable / disable all filters within the specified vdev */
12555typedef struct {
12556 A_UINT32 tlv_header;
12557 A_UINT32 vdev_id;
12558 A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */
12559} WMI_PACKET_FILTER_ENABLE_CMD_fixed_param;
12560
12561
12562#define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0
12563#define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9
12564
12565#define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \
12566 WMI_SET_BITS(tcp_flag_u32, \
12567 WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
12568 WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \
12569 tcp_flag_values)
12570#define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \
12571 WMI_GET_BITS(tcp_flag_u32, \
12572 WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \
12573 WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS)
12574
12575#define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9
12576#define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9
12577
12578#define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \
12579 WMI_SET_BITS(tcp_flag_u32, \
12580 WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
12581 WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \
12582 tcp_flags_mask)
12583#define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \
12584 WMI_GET_BITS(tcp_flag_u32, \
12585 WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \
12586 WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS)
12587
12588typedef struct {
12589 A_UINT32 tlv_header;
12590 /**
12591 * @brief lro_enable - indicates whether lro is enabled
12592 * [0] LRO Enable
12593 */
12594 A_UINT32 lro_enable;
12595 /**
12596 * @brief tcp_flag_u32 - mask of which TCP flags to check and
12597 * values to check for
12598 * [8:0] TCP flag values - If the TCP flags from the packet do not match
12599 * the values in this field after masking with TCP flags mask
12600 * below,LRO eligible will not be set
12601 * [17:9] TCP flags mask - Mask field for comparing the TCP values
12602 * provided above with the TCP flags field in the received packet
12603 * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK
12604 * macros to isolate the mask field and values field that are packed
12605 * into this u32 "word".
12606 */
12607 A_UINT32 tcp_flag_u32;
12608 /**
12609 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
12610 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
12611 * bytes 0 to 3
12612 *
12613 * In this and all the below toeplitz_hash fields, the bytes are
12614 * specified in little-endian order. For example:
12615 * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0
12616 * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1
12617 * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2
12618 * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3
12619 */
12620 A_UINT32 toeplitz_hash_ipv4_0_3;
12621
12622 /**
12623 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
12624 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
12625 * bytes 4 to 7
12626 */
12627 A_UINT32 toeplitz_hash_ipv4_4_7;
12628
12629 /**
12630 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
12631 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
12632 * bytes 8 to 11
12633 */
12634 A_UINT32 toeplitz_hash_ipv4_8_11;
12635
12636 /**
12637 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
12638 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
12639 * bytes 12 to 15
12640 */
12641 A_UINT32 toeplitz_hash_ipv4_12_15;
12642
12643 /**
12644 * @brief toeplitz_hash_ipv4 - contains seed needed to compute
12645 * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains
12646 * byte 16
12647 */
12648 A_UINT32 toeplitz_hash_ipv4_16;
12649
12650 /**
12651 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12652 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12653 * bytes 0 to 3
12654 */
12655 A_UINT32 toeplitz_hash_ipv6_0_3;
12656
12657 /**
12658 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12659 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12660 * bytes 4 to 7
12661 */
12662 A_UINT32 toeplitz_hash_ipv6_4_7;
12663
12664 /**
12665 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12666 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12667 * bytes 8 to 11
12668 */
12669 A_UINT32 toeplitz_hash_ipv6_8_11;
12670
12671 /**
12672 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12673 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12674 * bytes 12 to 15
12675 */
12676 A_UINT32 toeplitz_hash_ipv6_12_15;
12677
12678 /**
12679 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12680 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12681 * bytes 16 to 19
12682 */
12683 A_UINT32 toeplitz_hash_ipv6_16_19;
12684
12685 /**
12686 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12687 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12688 * bytes 20 to 22
12689 */
12690 A_UINT32 toeplitz_hash_ipv6_20_23;
12691
12692 /**
12693 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12694 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12695 * bytes 24 to 27
12696 */
12697 A_UINT32 toeplitz_hash_ipv6_24_27;
12698
12699 /**
12700 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12701 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12702 * bytes 28 to 31
12703 */
12704 A_UINT32 toeplitz_hash_ipv6_28_31;
12705
12706 /**
12707 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12708 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12709 * bytes 32 to 35
12710 */
12711 A_UINT32 toeplitz_hash_ipv6_32_35;
12712
12713 /**
12714 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12715 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12716 * bytes 36 to 39
12717 */
12718 A_UINT32 toeplitz_hash_ipv6_36_39;
12719
12720 /**
12721 * @brief toeplitz_hash_ipv6 - contains seed needed to compute
12722 * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains
12723 * byte 40
12724 */
12725 A_UINT32 toeplitz_hash_ipv6_40;
12726} wmi_lro_info_cmd_fixed_param;
12727
Nirav Shahbf6450f2015-11-05 11:47:20 +053012728/*
12729 * This structure is used to set the pattern for WOW host wakeup pin pulse
12730 * pattern confirguration.
12731 */
12732typedef struct {
12733 /*
12734 * TLV tag and len; tag equals
12735 * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param
12736 */
12737 A_UINT32 tlv_header;
12738 /* flash offset to write, starting from 0 */
12739 A_UINT32 offset;
12740 /* vaild data length in buffer, unit: byte */
12741 A_UINT32 length;
12742} wmi_transfer_data_to_flash_cmd_fixed_param;
12743
12744typedef struct {
12745 /*
12746 * TLV tag and len; tag equals
12747 * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param
12748 */
12749 A_UINT32 tlv_header;
12750 /* Return status. 0 for success, non-zero otherwise */
12751 A_UINT32 status;
12752} wmi_transfer_data_to_flash_complete_event_fixed_param;
12753
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -080012754/*
Manikandan Mohan55c94d62015-12-04 13:47:58 -080012755 * This structure is used to report SMPS force mode set complete to host.
12756 */
12757typedef struct {
12758 /* TLV tag and len; tag equals
12759 * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param
12760 */
12761 A_UINT32 tlv_header;
12762 /* Unique id identifying the VDEV */
12763 A_UINT32 vdev_id;
12764 /* Return status. 0 for success, non-zero otherwise */
12765 A_UINT32 status;
12766} wmi_sta_smps_force_mode_complete_event_fixed_param;
12767
12768/*
Krishna Kumaar Natarajane2c70462015-11-19 16:24:50 -080012769 * This structure is used to report SCPC calibrated data to host.
12770 */
12771typedef struct {
12772 /* TLV tag and len; tag equals
12773 * WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param
12774 */
12775 A_UINT32 tlv_header;
12776 /* number of BDF patches. Each patch contains offset, length and data */
12777 A_UINT32 num_patch;
12778 /* This TLV is followed by another TLV of array of bytes
12779 * A_UINT8 data[];
12780 * This data array contains, for example
12781 * patch1 offset(byte3~0), patch1 data length(byte7~4),
12782 * patch1 data(byte11~8)
12783 * patch2 offset(byte15~12), patch2 data length(byte19~16),
12784 * patch2 data(byte47~20)
12785 */
12786} wmi_scpc_event_fixed_param;
12787
Manikandan Mohan130eb572015-12-23 13:53:34 -080012788/* bpf interface structure */
12789typedef struct wmi_bpf_get_capability_cmd_s {
12790 A_UINT32 tlv_header;
12791 A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */
12792} wmi_bpf_get_capability_cmd_fixed_param;
12793
12794typedef struct wmi_bpf_capability_info_evt_s {
12795 A_UINT32 tlv_header;
12796 A_UINT32 bpf_version; /* fw's implement version */
12797 A_UINT32 max_bpf_filters; /* max filters that fw supports */
12798 A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */
12799} wmi_bpf_capability_info_evt_fixed_param;
12800
12801/* bit 0 of flags: report counters */
12802#define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0
12803#define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1
12804typedef struct wmi_bpf_get_vdev_stats_cmd_s {
12805 A_UINT32 tlv_header;
12806 A_UINT32 flags;
12807 A_UINT32 vdev_id;
12808} wmi_bpf_get_vdev_stats_cmd_fixed_param;
12809
12810typedef struct wmi_bpf_vdev_stats_info_evt_s {
12811 A_UINT32 tlv_header;
12812 A_UINT32 vdev_id;
12813 A_UINT32 num_filters;
12814 A_UINT32 num_checked_pkts;
12815 A_UINT32 num_dropped_pkts;
12816 } wmi_bpf_vdev_stats_info_evt_fixed_param;
12817
12818typedef struct wmi_bpf_set_vdev_instructions_cmd_s {
12819 A_UINT32 tlv_header;
12820 A_UINT32 vdev_id;
12821 A_UINT32 filter_id;
12822 A_UINT32 bpf_version; /* host bpf version */
12823 A_UINT32 total_length;
12824 A_UINT32 current_offset;
12825 A_UINT32 current_length;
Manikandan Mohan05ac7ee2015-12-23 14:18:36 -080012826 /*
12827 * The TLV follows:
12828 * A_UINT8 buf_inst[]; //Variable length buffer for the instuctions
12829 */
Manikandan Mohan130eb572015-12-23 13:53:34 -080012830} wmi_bpf_set_vdev_instructions_cmd_fixed_param;
12831
12832#define BPF_FILTER_ID_ALL 0xFFFFFFFF
12833typedef struct wmi_bpf_del_vdev_instructions_cmd_s {
12834 A_UINT32 tlv_header;
12835 A_UINT32 vdev_id;
12836 A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */
12837} wmi_bpf_del_vdev_instructions_cmd_fixed_param;
12838
Govind Singhc7d51942016-02-01 12:09:31 +053012839#define AES_BLOCK_LEN 16 /* in bytes */
12840#define FIPS_KEY_LENGTH_128 16 /* in bytes */
12841#define FIPS_KEY_LENGTH_256 32 /* in bytes */
12842#define FIPS_ENCRYPT_CMD 0
12843#define FIPS_DECRYPT_CMD 1
12844#define FIPS_ENGINE_AES_CTR 0
12845#define FIPS_ENGINE_AES_MIC 1
12846#define FIPS_ERROR_OPER_TIMEOUT 1
12847
12848/* WMI_PDEV_FIPS_CMDID */
12849typedef struct {
12850 /*
12851 * TLV tag and len; tag equals
12852 * WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param
12853 */
12854 A_UINT32 tlv_header;
12855 A_UINT32 mac_id; /* MAC ID */
12856 A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */
12857 /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */
12858 A_UINT32 mode;
12859 /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */
12860 A_UINT32 key_len;
12861 A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */
12862 A_UINT32 data_len; /* data length */
12863 /*
12864 * Following this structure is the TLV:
12865 * A_UINT32 data[1]; - In Data (keep this in the end)
12866 */
12867} wmi_pdev_fips_cmd_fixed_param;
12868
12869typedef struct {
12870 /*
12871 * TLV tag and len; tag equals
12872 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param
12873 */
12874 A_UINT32 tlv_header;
12875 A_UINT32 mac_id; /* MAC ID */
12876 A_UINT32 enable; /* 1:enable, 0:disable */
12877 /* 1:GPIO parallel mode, 0:GPIO serial mode */
12878 A_UINT32 mode;
12879 A_UINT32 rx_antenna; /* rx antenna */
12880 A_UINT32 tx_default_antenna; /* tx default antenna */
12881 /*
12882 * Following this structure is the TLV:
12883 * wmi_pdev_smart_ant_gpio_handle
12884 */
12885} wmi_pdev_smart_ant_enable_cmd_fixed_param;
12886
12887/** GPIO pins/function values to control antennas */
12888typedef struct {
12889 /*
12890 * TLV tag and len; tag equals
12891 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle
12892 */
12893 A_UINT32 tlv_header;
12894 /* For serial: index 0-strobe index 1-data, For Parallel: per stream */
12895 A_UINT32 gpio_pin;
12896 A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */
12897} wmi_pdev_smart_ant_gpio_handle;
12898
12899typedef struct {
12900 /*
12901 * TLV tag and len; tag equals
12902 * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param
12903 */
12904 A_UINT32 tlv_header;
12905 A_UINT32 mac_id;
12906 A_UINT32 rx_antenna;
12907} wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param;
12908
12909typedef struct {
12910 /*
12911 * TLV tag and len; tag equals
12912 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param
12913 */
12914 A_UINT32 tlv_header;
12915 /** unique id identifying the vdev, generated by the caller */
12916 A_UINT32 vdev_id;
12917 /** peer MAC address */
12918 wmi_mac_addr peer_macaddr;
12919 /*
12920 * Following this structure is the TLV:
12921 * wmi_peer_smart_ant_set_tx_antenna_series
12922 */
12923} wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param;
12924
12925typedef struct {
12926 /*
12927 * TLV tag and len; tag equals
12928 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series
12929 */
12930 A_UINT32 tlv_header;
12931 /* antenna array */
12932 A_UINT32 antenna_series;
12933} wmi_peer_smart_ant_set_tx_antenna_series;
12934
12935typedef struct {
12936 /*
12937 * TLV tag and len; tag equals
12938 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param
12939 */
12940 A_UINT32 tlv_header;
12941 /* rate array */
12942 A_UINT32 train_rate_series;
12943 /* antenna array */
12944 A_UINT32 train_antenna_series;
12945 /* Rate flags */
12946 /* TODO: For future use? */
12947 A_UINT32 rc_flags;
12948} wmi_peer_smart_ant_set_train_antenna_param;
12949
12950typedef struct {
12951 /*
12952 * TLV tag and len; tag equals
12953 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param
12954 */
12955 A_UINT32 tlv_header;
12956 /** unique id identifying the VDEV, generated by the caller */
12957 A_UINT32 vdev_id;
12958 /** peer MAC address */
12959 wmi_mac_addr peer_macaddr;
12960 /* num packets; 0-stop training */
12961 A_UINT32 num_pkts;
12962 /*
12963 * Following this structure is the TLV:
12964 * wmi_peer_smart_ant_set_train_antenna_param
12965 */
12966} wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param;
12967
12968typedef struct {
12969 /*
12970 * TLV tag and len; tag equals
12971 * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param
12972 */
12973 A_UINT32 tlv_header;
12974 /** unique id identifying the vdev, generated by the caller */
12975 A_UINT32 vdev_id;
12976 /** peer MAC address */
12977 wmi_mac_addr peer_macaddr;
12978 /* command id*/
12979 A_UINT32 cmd_id;
12980 /* number of arguments passed */
12981 A_UINT32 args_count;
12982 /*
12983 * Following this structure is the TLV:
12984 * A_UINT32 args[]; // argument list
12985 */
12986} wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param;
12987
12988typedef struct {
12989 /*
12990 * TLV tag and len; tag equals
12991 * WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain
12992 */
12993 A_UINT32 tlv_header;
12994 A_UINT32 antCtrlChain;
12995} wmi_pdev_set_ant_ctrl_chain;
12996
12997typedef struct {
12998 /*
12999 * TLV tag and len; tag equals
13000 * WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param
13001 */
13002 A_UINT32 tlv_header;
13003 A_UINT32 mac_id; /* MAC ID */
13004 A_UINT32 antCtrlCommon1;
13005 A_UINT32 antCtrlCommon2;
13006 /*
13007 * Following this structure is the TLV:
13008 * wmi_pdev_set_ant_ctrl_chain
13009 */
13010} wmi_pdev_set_ant_switch_tbl_cmd_fixed_param;
13011
13012typedef struct {
13013 /* TLV tag and len; tag equals
13014 * WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param
13015 */
13016 A_UINT32 tlv_header;
13017 A_UINT32 mac_id; /* MAC ID */
13018 /** len of CTL info */
13019 A_UINT32 ctl_len;
13020 /* ctl array (len adjusted to number of words)
13021 * Following this structure is the TLV:
13022 * A_UINT32 ctl_info[1];
13023 */
13024} wmi_pdev_set_ctl_table_cmd_fixed_param;
13025
13026typedef struct {
13027 /*
13028 * TLV tag and len; tag equals
13029 * WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param
13030 */
13031 A_UINT32 tlv_header;
13032 A_UINT32 mac_id; /* MAC ID */
13033 A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */
13034 /*
13035 * Bit 7:0 len of array gain table
13036 * Bit 8 bypass multi chain gain or not
13037 */
13038 /*
13039 * array gain table(s) (len adjusted to number of words).
13040 * Following this structure is the TLV:
13041 * A_UINT32 arraygain_tbl[1];
13042 */
13043} wmi_pdev_set_mimogain_table_cmd_fixed_param;
13044
13045#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0
13046#define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S)
13047#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_ARRAY_GAIN_LEN)
13048#define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_ARRAY_GAIN_LEN)
13049
13050#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8
13051#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S)
13052#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
13053#define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS)
13054
13055
13056typedef struct {
13057 /*
13058 * TLV tag and len; tag equals
13059 * WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param
13060 */
13061 A_UINT32 tlv_header;
13062 /** parameter id */
13063 A_UINT32 param_id;
13064 /** parameter value */
13065 A_UINT32 param_value;
13066} wmi_fwtest_set_param_cmd_fixed_param;
13067
13068/* Expressed in 1 part in 1000 (permille) */
13069#define WMI_ATF_DENOMINATION 1000
13070
13071typedef struct {
13072 /*
13073 * TLV tag and len; tag equals
13074 * WMITLV_TAG_STRUC_wmi_atf_peer_info
13075 */
13076 A_UINT32 tlv_header;
13077 wmi_mac_addr peer_macaddr;
13078 A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */
13079 A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */
13080 /* Peer congestion threshold for future use */
13081 A_UINT32 atf_units_reserved;
13082} wmi_atf_peer_info;
13083
13084typedef struct {
13085 /*
13086 * TLV tag and len; tag equals
13087 * WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param
13088 */
13089 A_UINT32 tlv_header;
13090 A_UINT32 num_peers;
13091 /*
13092 * Following this structure is the TLV:
13093 * struct wmi_atf_peer_info peer_info[1];
13094 */
13095} wmi_peer_atf_request_fixed_param;
13096
13097/* Equal distribution of ATF air time within an VDEV. */
13098typedef struct {
13099 /*
13100 * TLV tag and len; tag equals
13101 * WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param
13102 */
13103 A_UINT32 tlv_header;
13104 A_UINT32 vdev_id;
13105 A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */
13106} wmi_vdev_atf_request_fixed_param;
13107
13108typedef struct {
13109 /*
13110 * TLV tag and len; tag equals
13111 * WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param
13112 */
13113 A_UINT32 tlv_header;
13114 A_UINT32 mac_id; /* MAC ID */
13115 /** parameter */
13116 A_UINT32 param;
13117} wmi_pdev_get_ani_cck_config_cmd_fixed_param;
13118
13119typedef struct {
13120 /*
13121 * TLV tag and len; tag equals
13122 * WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param
13123 */
13124 A_UINT32 tlv_header;
13125 A_UINT32 mac_id; /* MAC ID */
13126 /** parameter */
13127 A_UINT32 param;
13128} wmi_pdev_get_ani_ofdm_config_cmd_fixed_param;
13129
13130typedef struct {
13131 /*
13132 * TLV tag and len; tag equals
13133 * WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param
13134 */
13135 A_UINT32 tlv_header;
13136 A_UINT32 vdev_id;
13137 A_UINT32 qb_enable;
13138 wmi_mac_addr peer_macaddr;
13139} WMI_QBOOST_CFG_CMD_fixed_param;
13140
13141#define WMI_INST_STATS_INVALID_RSSI 0
13142
13143typedef struct {
13144 /*
13145 * TLV tag and len; tag equals
13146 * WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param
13147 */
13148 A_UINT32 tlv_header;
13149 A_UINT32 iRSSI; /* dBm above the noise floor */
13150 /* peer MAC address */
13151 wmi_mac_addr peer_macaddr;
13152} wmi_inst_rssi_stats_resp_fixed_param;
13153
13154typedef struct {
13155 /*
13156 * TLV tag and len; tag equals
13157 * WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info
13158 */
13159 A_UINT32 tlv_header;
13160 A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */
13161} wmi_peer_cck_ofdm_rate_info;
13162
13163typedef struct {
13164 /*
13165 * TLV tag and len; tag equals
13166 * WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info
13167 */
13168 A_UINT32 tlv_header;
13169 A_UINT32 ratecode_20; /* Rate code for 20MHz BW */
13170 A_UINT32 ratecode_40; /* Rate code for 40MHz BW */
13171 A_UINT32 ratecode_80; /* Rate code for 80MHz BW */
13172} wmi_peer_mcs_rate_info;
13173
13174typedef struct {
13175 /*
13176 * TLV tag and len; tag equals
13177 * WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param
13178 */
13179 A_UINT32 tlv_header;
13180 wmi_mac_addr peer_macaddr;
13181 A_UINT32 ratecount; /* Max Rate count for each mode */
13182 /*
13183 * Following this structure are the TLV
13184 * struct wmi_peer_cck_ofdm_rate_info;
13185 * struct wmi_peer_mcs_rate_info;
13186 */
13187} wmi_peer_ratecode_list_event_fixed_param;
13188
13189typedef struct wmi_wds_addr_event {
13190 /*
13191 * TLV tag and len; tag equals
13192 * WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param
13193 */
13194 A_UINT32 tlv_header;
13195 A_UINT32 event_type[4];
13196 wmi_mac_addr peer_mac;
13197 wmi_mac_addr dest_mac;
13198} wmi_wds_addr_event_fixed_param;
13199
13200typedef struct {
13201 /*
13202 * TLV tag and len; tag equals
13203 * WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param
13204 */
13205 A_UINT32 tlv_header;
13206 wmi_mac_addr peer_macaddr;
13207 A_UINT32 peer_ps_state;
13208} wmi_peer_sta_ps_statechange_event_fixed_param;
13209
13210/* WMI_PDEV_FIPS_EVENTID */
13211typedef struct {
13212 /*
13213 * TLV tag and len; tag equals
13214 * WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param
13215 */
13216 A_UINT32 tlv_header;
13217 A_UINT32 mac_id; /* MAC ID */
13218 /* Error status: 0 (no err), 1, or OPER_TIMEOUT */
13219 A_UINT32 error_status;
13220 A_UINT32 data_len; /* Data length */
13221 /*
13222 * Following this structure is the TLV:
13223 * A_UINT32 data[1]; // Out Data (keep this in the end)
13224 */
13225} wmi_pdev_fips_event_fixed_param;
13226
13227typedef struct {
13228 /*
13229 * TLV tag and len; tag equals
13230 * WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param
13231 */
13232 A_UINT32 tlv_header;
13233 A_UINT32 mac_id; /* MAC ID */
13234 /* Noise threshold iterations with high values */
13235 A_UINT32 noise_floor_report_iter;
13236 /* Total noise threshold iterations */
13237 A_UINT32 noise_floor_total_iter;
13238} wmi_pdev_channel_hopping_event_fixed_param;
13239
13240enum {
13241 WMI_PDEV_RESERVE_AST_ENTRY_OK,
13242 WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION,
13243 WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY,
13244};
13245
13246typedef struct {
13247 /*
13248 * TLV tag and len; tag equals
13249 * WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param
13250 */
13251 A_UINT32 tlv_header;
13252 A_UINT32 mac_id; /* MAC ID */
13253 A_UINT32 rate_flags;
13254 /**
13255 * FLAG_ONE_CHAIN 0x001 - one chain mask
13256 * FLAG_TWO_CHAIN 0x005 - two chain mask
13257 * FLAG_THREE_CHAIN 0x007 - three chain mask
13258 * FLAG_FOUR_CHAIN 0x00F - four chain mask
13259 * FLAG_STBC 0x010 - STBC is set
13260 * FLAG_40MHZ 0x020
13261 * FLAG_80MHZ 0x040
13262 * FLAG_160MHZ 0x080
13263 * FLAG_TXBF 0x0100 - Tx Bf enabled
13264 * FLAG_RTSENA 0x0200 - RTS enabled
13265 * FLAG_CTSENA 0x0400 - CTS enabled
13266 * FLAG_LDPC 0x0800 - LDPC set
13267 * FLAG_SERIES1 0x1000 -
13268 * FLAG_SGI 0x2000 - Short gaurd interval
13269 * FLAG_MU2 0x4000 - MU2 data
13270 * FLAG_MU3 0x8000 - MU3 data
13271 * */
13272 A_UINT32 nss;
13273 /**
13274 * NSS 0x0 - 0x3
13275 * */
13276 A_UINT32 preamble;
13277 /**
13278 * PREAM_OFDM - 0x0
13279 * PREAM_CCK - 0x1
13280 * PREAM_HT - 0x2
13281 * PREAM_VHT - 0x3
13282 * */
13283 A_UINT32 hw_rate;
13284 /**
13285 * *** HW_OFDM_RATE ***
13286 * OFDM_48_MBPS - 0x0
13287 * OFDM_24_MBPS - 0x1
13288 * OFDM_12_MBPS - 0x2
13289 * OFDM_6_MBPS - 0x3
13290 * OFDM_54_MBPS - 0x4
13291 * OFDM_36_MBPS - 0x5
13292 * OFDM_18_MBPS - 0x6
13293 * OFDM_9_MBPS - 0x7
13294 *
13295 * *** HW_CCK_RATE ***
13296 * CCK_11_LONG_MBPS - 0x0
13297 * CCK_5_5_LONG_MBPS - 0x1
13298 * CCK_2_LONG_MBPS - 0x2
13299 * CCK_1_LONG_MBPS - 0x3
13300 * CCK_11_SHORT_MBPS - 0x4
13301 * CCK_5_5_SHORT_MBPS - 0x5
13302 * CCK_2_SHORT_MBPS - 0x6
13303 *
13304 * *** HW_HT / VHT_RATE ***
13305 * MCS 0x0 - 0x9
13306 * */
13307} wmi_pdev_get_tpc_cmd_fixed_param;
13308
13309typedef struct {
13310 /*
13311 * TLV tag and len; tag equals
13312 * WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param
13313 */
13314 A_UINT32 tlv_header;
13315 A_UINT32 reserved0; /* for future need */
13316 /*
13317 * Following this structure is the TLV:
13318 * A_UINT32 tpc[1];
13319 */
13320} wmi_pdev_tpc_event_fixed_param;
13321
13322typedef struct {
13323 /*
13324 * TLV tag and len; tag equals
13325 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param
13326 */
13327 A_UINT32 tlv_header;
13328 A_UINT32 mac_id; /* MAC ID */
13329 A_UINT32 nfdBr_len;
13330 A_UINT32 nfdBm_len;
13331 A_UINT32 freqNum_len;
13332 /*
13333 * Following this structure is the TLV:
13334 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr;
13335 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm;
13336 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum;
13337 */
13338} wmi_pdev_nfcal_power_all_channels_event_fixed_param;
13339
13340typedef struct {
13341 /*
13342 * TLV tag and len; tag equals
13343 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr
13344 */
13345 A_UINT32 tlv_header;
13346 A_UINT32 nfdBr;
13347} wmi_pdev_nfcal_power_all_channels_nfdBr;
13348
13349typedef struct {
13350 /*
13351 * TLV tag and len; tag equals
13352 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm
13353 */
13354 A_UINT32 tlv_header;
13355 A_UINT32 nfdBm;
13356} wmi_pdev_nfcal_power_all_channels_nfdBm;
13357
13358typedef struct {
13359 /*
13360 * TLV tag and len; tag equals
13361 * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum
13362 */
13363 A_UINT32 tlv_header;
13364 A_UINT32 freqNum;
13365} wmi_pdev_nfcal_power_all_channels_freqNum;
13366
13367typedef struct {
13368 /*
13369 * TLV tag and len; tag equals
13370 * WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param
13371 */
13372 A_UINT32 tlv_header;
13373 A_UINT32 cck_level;
13374} wmi_ani_cck_event_fixed_param;
13375
13376typedef struct {
13377 /*
13378 * TLV tag and len; tag equals
13379 * WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param
13380 */
13381 A_UINT32 tlv_header;
13382 A_UINT32 ofdm_level;
13383} wmi_ani_ofdm_event_fixed_param;
13384
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013385/* ADD NEW DEFS HERE */
13386
13387/*****************************************************************************
13388 * The following structures are deprecated. DO NOT USE THEM!
13389 */
13390
13391/** Max number of channels in the schedule. */
13392#define OCB_CHANNEL_MAX (5)
13393
13394/* NOTE: Make sure these data structures are identical to those 9235
13395* defined in sirApi.h */
13396
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013397typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013398 /** Arbitration Inter-Frame Spacing. Range: 2-15 */
13399 A_UINT32 aifsn;
13400 /** Contention Window minimum. Range: 1 - 10 */
13401 A_UINT32 cwmin;
13402 /** Contention Window maximum. Range: 1 - 10 */
13403 A_UINT32 cwmax;
13404} wmi_qos_params_t;
13405
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013406typedef struct {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013407 /** Channel frequency in MHz */
13408 A_UINT32 chan_freq;
13409 /** Channel duration in ms */
13410 A_UINT32 duration;
13411 /** Start guard interval in ms */
13412 A_UINT32 start_guard_interval;
13413 /** End guard interval in ms */
13414 A_UINT32 end_guard_interval;
13415 /** Transmit power in dBm, range 0 - 23 */
13416 A_UINT32 tx_power;
13417 /** Transmit datarate in Mbps */
13418 A_UINT32 tx_rate;
13419 /** QoS parameters for each AC */
13420 wmi_qos_params_t qos_params[WLAN_MAX_AC];
13421 /** 1 to enable RX stats for this channel, 0 otherwise */
13422 A_UINT32 rx_stats;
13423} wmi_ocb_channel_t;
13424
13425typedef struct {
13426 /** TLV tag and len; tag equals
13427 * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */
13428 A_UINT32 tlv_header;
13429 /* VDEV identifier */
13430 A_UINT32 vdev_id;
13431 /** Number of valid channels in the channels array */
13432 A_UINT32 num_channels;
13433 /** The array of channels */
13434 wmi_ocb_channel_t channels[OCB_CHANNEL_MAX];
13435 /** 1 to allow off-channel tx, 0 otherwise */
Anurag Chouhan2ed1fce2016-02-22 15:07:01 +053013436 A_UINT32 off_channel_tx; /* Not supported */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080013437} wmi_ocb_set_sched_cmd_fixed_param;
13438
13439typedef struct {
13440 /** Return status. 0 for success, non-zero otherwise */
13441 A_UINT32 status;
13442} wmi_ocb_set_sched_event_fixed_param;
13443
13444/**
13445* END DEPRECATED
13446*/
13447#ifdef __cplusplus
13448}
13449#endif
13450#endif /*_WMI_UNIFIED_H_*/
13451/**@}*/