blob: 54d3f8d3e08f47a7b616692105297155c0584cde [file] [log] [blame]
Govind Singh3ddda1f2016-03-09 11:34:12 +05301/*
2 * Copyright (c) 2016 The Linux Foundation. All rights reserved.
3 *
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 * This file contains the API definitions for the Unified Wireless Module
30 * Interface (WMI).
31 */
32
33#ifndef _WMI_UNIFIED_PARAM_H_
34#define _WMI_UNIFIED_PARAM_H_
Govind Singh3ddda1f2016-03-09 11:34:12 +053035#define IEEE80211_ADDR_LEN 6 /* size of 802.11 address */
Govind Singh3ddda1f2016-03-09 11:34:12 +053036#define WMI_MAC_MAX_SSID_LENGTH 32
37#define WMI_SCAN_MAX_NUM_SSID 0x0A
38#define mgmt_tx_dl_frm_len 64
39#define WMI_SMPS_MASK_LOWER_16BITS 0xFF
40#define WMI_SMPS_MASK_UPPER_3BITS 0x7
41#define WMI_SMPS_PARAM_VALUE_S 29
Govind Singhae855362016-03-07 14:24:22 +053042#define WMI_MAX_NUM_ARGS 8
Govind Singhe7b800c2016-03-01 15:30:53 +053043/* The size of the utc time in bytes. */
44#define WMI_SIZE_UTC_TIME (10)
45/* The size of the utc time error in bytes. */
46#define WMI_SIZE_UTC_TIME_ERROR (5)
Govind Singh9bad0002016-03-01 15:54:59 +053047#define WMI_MCC_MIN_CHANNEL_QUOTA 20
48#define WMI_MCC_MAX_CHANNEL_QUOTA 80
49#define WMI_MCC_MIN_NON_ZERO_CHANNEL_LATENCY 30
50#define WMI_BEACON_TX_BUFFER_SIZE (512)
51#define WMI_WIFI_SCANNING_MAC_OUI_LENGTH 3
52#define WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64
53#define WMI_RSSI_THOLD_DEFAULT -300
54#define WMI_NLO_FREQ_THRESH 1000
55#define WMI_SEC_TO_MSEC(sec) (sec * 1000)
56#define WMI_MSEC_TO_USEC(msec) (msec * 1000)
57#define WMI_ETH_LEN 64
58#define WMI_QOS_NUM_TSPEC_MAX 2
59#define WMI_QOS_NUM_AC_MAX 4
Govind Singhae855362016-03-07 14:24:22 +053060#define WMI_IPV4_ADDR_LEN 4
61#define WMI_KEEP_ALIVE_NULL_PKT 1
62#define WMI_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
Himanshu Agarwal9efd9bf2016-03-09 18:49:18 +053063#define WMI_MAC_MAX_KEY_LENGTH 32
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +053064#define WMI_KRK_KEY_LEN 16
65#ifdef WLAN_FEATURE_ROAM_OFFLOAD
66#define WMI_BTK_KEY_LEN 32
67#define WMI_ROAM_R0KH_ID_MAX_LEN 48
68#define WMI_ROAM_SCAN_PSK_SIZE 32
69#endif
70#define WMI_NOISE_FLOOR_DBM_DEFAULT (-96)
Govind Singh89727882016-04-15 13:58:27 +053071#define WMI_MAC_IPV6_ADDR_LEN 16
Govind Singhc7cd2d62016-06-21 14:33:26 +053072#define WMI_OFFLOAD_DISABLE 0
73#define WMI_OFFLOAD_ENABLE 1
Govind Singhfa201d92016-06-08 19:40:11 +053074#ifdef WLAN_NS_OFFLOAD
Govind Singhae855362016-03-07 14:24:22 +053075/* support only one IPv6 offload */
76#define WMI_MAC_NS_OFFLOAD_SIZE 1
77/* Number of target IP V6 addresses for NS offload */
78#define WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA 16
Govind Singhae855362016-03-07 14:24:22 +053079#define WMI_IPV6_ADDR_VALID 1
80#endif /* WLAN_NS_OFFLOAD */
81#define WMI_EXTSCAN_MAX_HOTLIST_SSIDS 8
82#define WMI_ROAM_MAX_CHANNELS 80
Govind Singhd7468a52016-03-09 14:32:57 +053083#ifdef FEATURE_WLAN_EXTSCAN
84#define WMI_MAX_EXTSCAN_MSG_SIZE 1536
85#define WMI_EXTSCAN_REST_TIME 100
86#define WMI_EXTSCAN_MAX_SCAN_TIME 50000
87#define WMI_EXTSCAN_BURST_DURATION 150
88#endif
89#define WMI_SCAN_NPROBES_DEFAULT (2)
90#define WMI_SEC_TO_MSEC(sec) (sec * 1000) /* sec to msec */
91#define WMI_MSEC_TO_USEC(msec) (msec * 1000) /* msec to usec */
92#define WMI_NLO_FREQ_THRESH 1000 /* in MHz */
Govind Singh89727882016-04-15 13:58:27 +053093
94#define MAX_UTF_EVENT_LENGTH 2048
95#define MAX_WMI_UTF_LEN 252
96#define MAX_WMI_QVIT_LEN 252
97#define THERMAL_LEVELS 4
98#define WMI_HOST_BCN_FLT_MAX_SUPPORTED_IES 256
99#define WMI_HOST_BCN_FLT_MAX_ELEMS_IE_LIST \
100 (WMI_HOST_BCN_FLT_MAX_SUPPORTED_IES/32)
101#define LTEU_MAX_BINS 10
102#define ATF_ACTIVED_MAX_CLIENTS 50
103#define ATF_ACTIVED_MAX_ATFGROUPS 8
104#define CTL_5G_SIZE 1536
105#define CTL_2G_SIZE 684
106#define MAX_CTL_SIZE (CTL_5G_SIZE > CTL_2G_SIZE ? CTL_5G_SIZE : CTL_2G_SIZE)
107#define IEEE80211_MICBUF_SIZE (8+8)
108#define IEEE80211_TID_SIZE 17
109#define WME_NUM_AC 4
110#define SMART_ANT_MODE_SERIAL 0
111#define SMART_ANT_MODE_PARALLEL 1
112#define IEEE80211_WEP_NKID 4 /* number of key ids */
113#define WPI_IV_LEN 16
114#define WMI_SCAN_MAX_NUM_BSSID 10
115#define MAX_CHANS 1023
116#define TARGET_OEM_CONFIGURE_LCI 0x0A
117#define RTT_LCI_ALTITUDE_MASK 0x3FFFFFFF
118#define TARGET_OEM_CONFIGURE_LCR 0x09
119#define RTT_TIMEOUT_MS 180
120#define MAX_SUPPORTED_RATES 128
121#define WMI_HOST_MAX_BUFFER_SIZE 1712
Govind Singh41da3152016-05-06 20:20:25 +0530122#define WMI_HAL_MAX_SANTENNA 4
Govind Singh89727882016-04-15 13:58:27 +0530123
Govind Singhec1401a2016-07-08 19:00:56 +0530124#ifdef CONFIG_WIN
125#if ATH_SUPPORT_FIPS
126#define FIPS_ALIGN 4
127#define FIPS_ALIGNTO(__addr, __to) ((((unsigned long int)(__addr)) + (__to) - 1) & ~((__to) - 1))
128#define FIPS_IS_ALIGNED(__addr, __to) (!(((unsigned long int)(__addr)) & ((__to)-1)))
129#endif
130#endif
131
Govind Singh89727882016-04-15 13:58:27 +0530132#define WMI_HOST_F_MS(_v, _f) \
133 (((_v) & (_f)) >> (_f##_S))
134
135#define WMI_HOST_F_RMW(_var, _v, _f) \
136 do { \
137 (_var) &= ~(_f); \
138 (_var) |= (((_v) << (_f##_S)) & (_f)); \
139 } while (0)
140
141/* TXBF capabilities masks */
142#define WMI_HOST_TXBF_CONF_SU_TX_BFEE_S 0
143#define WMI_HOST_TXBF_CONF_SU_TX_BFEE_M 0x1
144#define WMI_HOST_TXBF_CONF_SU_TX_BFEE \
145 (WMI_HOST_TXBF_CONF_SU_TX_BFEE_M << WMI_HOST_TXBF_CONF_SU_TX_BFEE_S)
146#define WMI_HOST_TXBF_CONF_SU_TX_BFEE_GET(x) \
147 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_SU_TX_BFEE)
148#define WMI_HOST_TXBF_CONF_SU_TX_BFEE_SET(x, z) \
149 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_SU_TX_BFEE)
150
151#define WMI_HOST_TXBF_CONF_MU_TX_BFEE_S 1
152#define WMI_HOST_TXBF_CONF_MU_TX_BFEE_M 0x1
153#define WMI_HOST_TXBF_CONF_MU_TX_BFEE \
154 (WMI_HOST_TXBF_CONF_MU_TX_BFEE_M << WMI_HOST_TXBF_CONF_MU_TX_BFEE_S)
155#define WMI_HOST_TXBF_CONF_MU_TX_BFEE_GET(x) \
156 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_MU_TX_BFEE)
157#define WMI_HOST_TXBF_CONF_MU_TX_BFEE_SET(x, z) \
158 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_MU_TX_BFEE)
159
160#define WMI_HOST_TXBF_CONF_SU_TX_BFER_S 2
161#define WMI_HOST_TXBF_CONF_SU_TX_BFER_M 0x1
162#define WMI_HOST_TXBF_CONF_SU_TX_BFER \
163 (WMI_HOST_TXBF_CONF_SU_TX_BFER_M << WMI_HOST_TXBF_CONF_SU_TX_BFER_S)
164#define WMI_HOST_TXBF_CONF_SU_TX_BFER_GET(x) \
165 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_SU_TX_BFER)
166#define WMI_HOST_TXBF_CONF_SU_TX_BFER_SET(x, z) \
167 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_SU_TX_BFER)
168
169#define WMI_HOST_TXBF_CONF_MU_TX_BFER_S 3
170#define WMI_HOST_TXBF_CONF_MU_TX_BFER_M 0x1
171#define WMI_HOST_TXBF_CONF_MU_TX_BFER \
172 (WMI_HOST_TXBF_CONF_MU_TX_BFER_M << WMI_HOST_TXBF_CONF_MU_TX_BFER_S)
173#define WMI_HOST_TXBF_CONF_MU_TX_BFER_GET(x) \
174 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_MU_TX_BFER)
175#define WMI_HOST_TXBF_CONF_MU_TX_BFER_SET(x, z) \
176 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_MU_TX_BFER)
177
178#define WMI_HOST_TXBF_CONF_STS_CAP_S 4
179#define WMI_HOST_TXBF_CONF_STS_CAP_M 0x7
180#define WMI_HOST_TXBF_CONF_STS_CAP \
181 (WMI_HOST_TXBF_CONF_STS_CAP_M << WMI_HOST_TXBF_CONF_STS_CAP_S)
182#define WMI_HOST_TXBF_CONF_STS_CAP_GET(x) \
183 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_STS_CAP);
184#define WMI_HOST_TXBF_CONF_STS_CAP_SET(x, z) \
185 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_STS_CAP)
186
187#define WMI_HOST_TXBF_CONF_IMPLICIT_BF_S 7
188#define WMI_HOST_TXBF_CONF_IMPLICIT_BF_M 0x1
189#define WMI_HOST_TXBF_CONF_IMPLICIT_BF \
190 (WMI_HOST_TXBF_CONF_IMPLICIT_BF_M << WMI_HOST_TXBF_CONF_IMPLICIT_BF_S)
191#define WMI_HOST_TXBF_CONF_IMPLICIT_BF_GET(x) \
192 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_IMPLICIT_BF)
193#define WMI_HOST_TXBF_CONF_IMPLICIT_BF_SET(x, z) \
194 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_IMPLICIT_BF)
195
196#define WMI_HOST_TXBF_CONF_BF_SND_DIM_S 8
197#define WMI_HOST_TXBF_CONF_BF_SND_DIM_M 0x7
198#define WMI_HOST_TXBF_CONF_BF_SND_DIM \
199 (WMI_HOST_TXBF_CONF_BF_SND_DIM_M << WMI_HOST_TXBF_CONF_BF_SND_DIM_S)
200#define WMI_HOST_TXBF_CONF_BF_SND_DIM_GET(x) \
201 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_BF_SND_DIM)
202#define WMI_HOST_TXBF_CONF_BF_SND_DIM_SET(x, z) \
203 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_BF_SND_DIM)
204
205#define WMI_HOST_TPC_RATE_MAX 160
206#define WMI_HOST_TPC_TX_NUM_CHAIN 4
207#define WMI_HOST_RXG_CAL_CHAN_MAX 4
208#define WMI_HOST_MAX_NUM_CHAINS 4
Poddar, Siddarth794b9962016-04-28 15:49:11 +0530209#define WMI_MAX_NUM_OF_RATE_THRESH 4
Govind Singh89727882016-04-15 13:58:27 +0530210
Himanshu Agarwal7e4f4bc2016-03-09 16:49:38 +0530211#include "qdf_atomic.h"
Govind Singhd7468a52016-03-09 14:32:57 +0530212
Govind Singh89727882016-04-15 13:58:27 +0530213#ifdef BIG_ENDIAN_HOST
214 /* This API is used in copying in elements to WMI message,
215 since WMI message uses multilpes of 4 bytes, This API
216 converts length into multiples of 4 bytes, and performs copy
217 */
218#define WMI_HOST_IF_MSG_COPY_CHAR_ARRAY(destp, srcp, len) do { \
219 int j; \
220 u_int32_t *src, *dest; \
221 src = (u_int32_t *)srcp; \
222 dest = (u_int32_t *)destp; \
223 for (j = 0; j < roundup(len, sizeof(u_int32_t))/4; j++) { \
224 *(dest+j) = qdf_le32_to_cpu(*(src+j)); \
225 } \
226} while (0)
227#else
228
229#define WMI_HOST_IF_MSG_COPY_CHAR_ARRAY(destp, srcp, len) OS_MEMCPY(destp,\
230 srcp, len)
231
232#endif
233
234/** macro to convert MAC address from WMI word format to char array */
235#define WMI_HOST_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr, c_macaddr) do { \
236 (c_macaddr)[0] = ((pwmi_mac_addr)->mac_addr31to0) & 0xff; \
237 (c_macaddr)[1] = (((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \
238 (c_macaddr)[2] = (((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \
239 (c_macaddr)[3] = (((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff; \
240 (c_macaddr)[4] = ((pwmi_mac_addr)->mac_addr47to32) & 0xff; \
241 (c_macaddr)[5] = (((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \
242 } while (0)
243
244#define TARGET_INIT_STATUS_SUCCESS 0x0
245#define TARGET_INIT_STATUS_GEN_FAILED 0x1
246#define TARGET_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
247#define TARGET_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
Selvaraj, Sridhar0a1427f2016-07-04 21:40:23 +0530248
249#define MAX_ASSOC_IE_LENGTH 1024
Govind Singh89727882016-04-15 13:58:27 +0530250typedef uint32_t TARGET_INIT_STATUS;
251
252typedef enum {
253 WMI_HOST_MODE_11A = 0, /* 11a Mode */
254 WMI_HOST_MODE_11G = 1, /* 11b/g Mode */
255 WMI_HOST_MODE_11B = 2, /* 11b Mode */
256 WMI_HOST_MODE_11GONLY = 3, /* 11g only Mode */
257 WMI_HOST_MODE_11NA_HT20 = 4, /* 11a HT20 mode */
258 WMI_HOST_MODE_11NG_HT20 = 5, /* 11g HT20 mode */
259 WMI_HOST_MODE_11NA_HT40 = 6, /* 11a HT40 mode */
260 WMI_HOST_MODE_11NG_HT40 = 7, /* 11g HT40 mode */
261 WMI_HOST_MODE_11AC_VHT20 = 8,
262 WMI_HOST_MODE_11AC_VHT40 = 9,
263 WMI_HOST_MODE_11AC_VHT80 = 10,
264 WMI_HOST_MODE_11AC_VHT20_2G = 11,
265 WMI_HOST_MODE_11AC_VHT40_2G = 12,
266 WMI_HOST_MODE_11AC_VHT80_2G = 13,
267 WMI_HOST_MODE_11AC_VHT80_80 = 14,
268 WMI_HOST_MODE_11AC_VHT160 = 15,
269 WMI_HOST_MODE_UNKNOWN = 16,
270 WMI_HOST_MODE_MAX = 16
271} WMI_HOST_WLAN_PHY_MODE;
272
273
Gupta, Kapil7b768002016-04-25 19:14:19 +0530274/**
275 * enum wmi_dwelltime_adaptive_mode: dwelltime_mode
276 * @WMI_DWELL_MODE_DEFAULT: Use firmware default mode
277 * @WMI_DWELL_MODE_CONSERVATIVE: Conservative adaptive mode
278 * @WMI_DWELL_MODE_MODERATE: Moderate adaptive mode
279 * @WMI_DWELL_MODE_AGGRESSIVE: Aggressive adaptive mode
280 * @WMI_DWELL_MODE_STATIC: static adaptive mode
281 */
282enum wmi_dwelltime_adaptive_mode {
283 WMI_DWELL_MODE_DEFAULT = 0,
284 WMI_DWELL_MODE_CONSERVATIVE = 1,
285 WMI_DWELL_MODE_MODERATE = 2,
286 WMI_DWELL_MODE_AGGRESSIVE = 3,
287 WMI_DWELL_MODE_STATIC = 4
288};
289
Manishekar Chandrasekaranb8c59382016-04-21 19:16:32 +0530290#define MAX_NUM_CHAN 128
291
Govind Singhc7cd2d62016-06-21 14:33:26 +0530292/* WME stream classes */
Himanshu Agarwal56c292f2016-07-19 15:41:51 +0530293#define WMI_HOST_AC_BE 0 /* best effort */
294#define WMI_HOST_AC_BK 1 /* background */
295#define WMI_HOST_AC_VI 2 /* video */
296#define WMI_HOST_AC_VO 3 /* voice */
Govind Singhc7cd2d62016-06-21 14:33:26 +0530297#define WMI_TID_TO_AC(_tid) (\
Himanshu Agarwal56c292f2016-07-19 15:41:51 +0530298 (((_tid) == 0) || ((_tid) == 3)) ? WMI_HOST_AC_BE : \
299 (((_tid) == 1) || ((_tid) == 2)) ? WMI_HOST_AC_BK : \
300 (((_tid) == 4) || ((_tid) == 5)) ? WMI_HOST_AC_VI : \
301 WMI_HOST_AC_VO)
Govind Singhc7cd2d62016-06-21 14:33:26 +0530302
Govind Singh3ddda1f2016-03-09 11:34:12 +0530303/**
304 * struct vdev_create_params - vdev create cmd parameter
305 * @if_id: interface id
306 * @type: interface type
307 * @subtype: interface subtype
308 */
309struct vdev_create_params {
310 uint8_t if_id;
311 uint32_t type;
312 uint32_t subtype;
Kiran Kumar Lokere0ae9fb92016-05-02 12:32:27 -0700313 uint8_t nss_2g;
314 uint8_t nss_5g;
Govind Singh3ddda1f2016-03-09 11:34:12 +0530315};
316
317/**
318 * struct vdev_delete_params - vdev delete cmd parameter
319 * @if_id: interface id
320 */
321struct vdev_delete_params {
322 uint8_t if_id;
323};
324
325/**
Govind Singh89727882016-04-15 13:58:27 +0530326 * struct channel_param - Channel paramters with all
327 * info required by target.
328 * @chan_id: channel id
329 * @pwr: channel power
330 * @mhz: channel frequency
331 * @half_rate: is half rate
332 * @quarter_rate: is quarter rate
333 * @dfs_set: is dfs channel
334 * @dfs_set_cfreq2: is secondary freq dfs channel
335 * @is_chan_passive: is this passive channel
336 * @allow_ht: HT allowed in chan
337 * @allow_vht: VHT allowed on chan
338 * @phy_mode: phymode (vht80 or ht40 or ...)
339 * @cfreq1: centre frequency on primary
340 * @cfreq2: centre frequency on secondary
341 * @maxpower: max power for channel
342 * @minpower: min power for channel
343 * @maxreqpower: Max regulatory power
344 * @antennamac: Max antenna
345 * @reg_class_id: Regulatory class id.
346 */
347
348struct channel_param {
349 uint8_t chan_id;
350 uint8_t pwr;
351 uint32_t mhz;
352 uint32_t half_rate:1,
353 quarter_rate:1,
354 dfs_set:1,
355 dfs_set_cfreq2:1,
356 is_chan_passive:1,
357 allow_ht:1,
358 allow_vht:1;
359 uint32_t phy_mode;
360 uint32_t cfreq1;
361 uint32_t cfreq2;
362 int8_t maxpower;
363 int8_t minpower;
364 int8_t maxregpower;
365 uint8_t antennamax;
366 uint8_t reg_class_id;
367};
368
369/**
Govind Singh3ddda1f2016-03-09 11:34:12 +0530370 * struct vdev_stop_params - vdev stop cmd parameter
371 * @vdev_id: vdev id
372 */
373struct vdev_stop_params {
374 uint8_t vdev_id;
375};
376
377/**
378 * struct vdev_up_params - vdev up cmd parameter
379 * @vdev_id: vdev id
380 * @assoc_id: association id
381 */
382struct vdev_up_params {
383 uint8_t vdev_id;
384 uint16_t assoc_id;
385};
386
387/**
388 * struct vdev_down_params - vdev down cmd parameter
389 * @vdev_id: vdev id
390 */
391struct vdev_down_params {
392 uint8_t vdev_id;
393};
394
395/**
Himanshu Agarwal7e4f4bc2016-03-09 16:49:38 +0530396 * struct mac_ssid - mac ssid structure
397 * @length:
398 * @mac_ssid[WMI_MAC_MAX_SSID_LENGTH]:
399 */
400struct mac_ssid {
401 uint8_t length;
402 uint8_t mac_ssid[WMI_MAC_MAX_SSID_LENGTH];
403} qdf_packed;
404
405/**
406 * struct vdev_start_params - vdev start cmd parameter
407 * @vdev_id: vdev id
408 * @chan_freq: channel frequency
409 * @chan_mode: channel mode
410 * @band_center_freq1: center freq 1
411 * @band_center_freq2: center freq 2
412 * @flags: flags to set like pmf_enabled etc.
413 * @is_dfs: flag to check if dfs enabled
414 * @beacon_intval: beacon interval
415 * @dtim_period: dtim period
416 * @max_txpow: max tx power
417 * @is_restart: flag to check if it is vdev
418 * @ssid: ssid and ssid length info
419 * @preferred_tx_streams: preferred tx streams
420 * @preferred_rx_streams: preferred rx streams
421 * @intr_update: flag to check if need to update
422 * required wma interface params
423 * @intr_ssid: pointer to wma interface ssid
424 * @intr_flags: poiter to wma interface flags
425 * @requestor_id: to update requestor id
426 * @disable_hw_ack: to update disable hw ack flag
427 * @info: to update channel info
428 * @reg_info_1: to update min power, max power,
429 * reg power and reg class id
430 * @reg_info_2: to update antennamax
Govind Singh89727882016-04-15 13:58:27 +0530431 * @oper_mode: Operating mode
432 * @dfs_pri_multiplier: DFS primary multiplier
433 * allow pulse if they are within multiple of PRI for the radar type
434 * @dot11_mode: Phy mode (VHT20/VHT80...)
435 * @disable_hw_ack: Disable hw ack if chan is dfs channel for cac
436 * @channel_param: Channel params required by target.
Himanshu Agarwal7e4f4bc2016-03-09 16:49:38 +0530437 */
438struct vdev_start_params {
439 uint8_t vdev_id;
440 uint32_t chan_freq;
441 uint32_t chan_mode;
442 uint32_t band_center_freq1;
443 uint32_t band_center_freq2;
444 uint32_t flags;
445 bool is_dfs;
446 uint32_t beacon_intval;
447 uint32_t dtim_period;
448 int32_t max_txpow;
449 bool is_restart;
Siddarth Poddar466963e2016-03-29 15:13:26 +0530450 bool is_half_rate;
451 bool is_quarter_rate;
452 uint32_t dis_hw_ack;
453 uint32_t flag_dfs;
454 uint8_t hidden_ssid;
455 uint8_t pmf_enabled;
Himanshu Agarwal7e4f4bc2016-03-09 16:49:38 +0530456 struct mac_ssid ssid;
Siddarth Poddar466963e2016-03-29 15:13:26 +0530457 uint32_t num_noa_descriptors;
Himanshu Agarwal7e4f4bc2016-03-09 16:49:38 +0530458 uint32_t preferred_rx_streams;
459 uint32_t preferred_tx_streams;
Govind Singh89727882016-04-15 13:58:27 +0530460#ifdef WMI_NON_TLV_SUPPORT
461 uint8_t oper_mode;
462 int32_t dfs_pri_multiplier;
463 uint8_t dot11_mode;
464 uint8_t disable_hw_ack;
465 struct channel_param channel;
466#endif
Himanshu Agarwal7e4f4bc2016-03-09 16:49:38 +0530467};
468
469/**
470 * struct hidden_ssid_vdev_restart_params -
471 * vdev restart cmd parameter
472 * @session_id: session id
473 * @ssid_len: ssid length
474 * @ssid: ssid
475 * @flags: flags
476 * @requestor_id: requestor id
477 * @disable_hw_ack: flag to disable hw ack feature
478 * @mhz: channel frequency
479 * @band_center_freq1: center freq 1
480 * @band_center_freq2: center freq 2
481 * @info: channel info
482 * @reg_info_1: contains min power, max power,
483 * reg power and reg class id
484 * @reg_info_2: contains antennamax
485 * @hidden_ssid_restart_in_progress:
486 * flag to check if restart is in progress
487 */
488struct hidden_ssid_vdev_restart_params {
489 uint8_t session_id;
490 uint32_t ssid_len;
491 uint32_t ssid[8];
492 uint32_t flags;
493 uint32_t requestor_id;
494 uint32_t disable_hw_ack;
495 uint32_t mhz;
496 uint32_t band_center_freq1;
497 uint32_t band_center_freq2;
498 uint32_t info;
499 uint32_t reg_info_1;
500 uint32_t reg_info_2;
501 qdf_atomic_t hidden_ssid_restart_in_progress;
502};
503
504/**
Govind Singh3ddda1f2016-03-09 11:34:12 +0530505 * struct vdev_set_params - vdev set cmd parameter
506 * @if_id: vdev id
507 * @param_id: parameter id
508 * @param_value: parameter value
509 */
510struct vdev_set_params {
511 uint32_t if_id;
512 uint32_t param_id;
513 uint32_t param_value;
514};
515
516/**
Govind Singh89727882016-04-15 13:58:27 +0530517 * struct vdev_install_key_params - vdev key set cmd parameter
518 * @wk_keylen: key length
519 * @wk_flags: key flags
520 * @ic_cipher: cipher
521 * @if_id: vdev id
522 * @is_group_key: Group key
523 * @wk_keyix: key index
524 * @def_keyid: default key index
525 * @wk_keytsc: Key TSC
526 * @wk_keyrsc: key RSC
527 * @key_data: pounter to key data
528 * @force_none: force
529 * @is_host_based_crypt: Host based encrypt
530 * @is_xmit_or_recv_key: xmit or recieve key
531 * @wk_recviv: WAPI recv IV
532 * @wk_txiv: WAPI TX IV
533 */
534struct vdev_install_key_params {
535 uint8_t wk_keylen;
536 uint16_t wk_flags;
537 uint8_t ic_cipher;
538 uint8_t if_id;
539 bool is_group_key;
540 uint16_t wk_keyix;
541 uint8_t def_keyid;
542 uint64_t wk_keytsc;
543 uint64_t *wk_keyrsc;
544 uint8_t *key_data;
545 uint8_t force_none;
546 bool is_host_based_crypt;
547 bool is_xmit_or_recv_key;
548#if ATH_SUPPORT_WAPI
549 uint8_t *wk_recviv;
550 uint32_t *wk_txiv;
551#endif
552};
553
554/**
Govind Singh3ddda1f2016-03-09 11:34:12 +0530555 * struct peer_delete_params - peer delete cmd parameter
556 * @vdev_id: vdev id
557 */
558struct peer_delete_params {
559 uint8_t vdev_id;
560};
561
562/**
563 * struct peer_flush_params - peer flush cmd parameter
564 * @peer_tid_bitmap: peer tid bitmap
565 * @vdev_id: vdev id
566 */
567struct peer_flush_params {
568 uint32_t peer_tid_bitmap;
569 uint8_t vdev_id;
570};
571
572/**
573 * struct peer_set_params - peer set cmd parameter
574 * @param_id: parameter id
575 * @param_value: parameter value
576 * @vdev_id: vdev id
577 */
578struct peer_set_params {
579 uint32_t param_id;
580 uint32_t param_value;
581 uint32_t vdev_id;
582};
583
584/**
585 * struct peer_create_params - peer create cmd parameter
586 * @peer_addr: peer mac addr
587 * @peer_type: peer type
588 * @vdev_id: vdev id
589 */
590struct peer_create_params {
591 const uint8_t *peer_addr;
592 uint32_t peer_type;
593 uint32_t vdev_id;
594};
595
596/**
597 * struct peer_remove_params - peer remove cmd parameter
598 * @bssid: bss id
599 * @vdev_id: vdev id
600 * @roam_synch_in_progress: flag to indicate if roaming is in progress
601 */
602struct peer_remove_params {
603 uint8_t *bssid;
604 uint8_t vdev_id;
605 bool roam_synch_in_progress;
606};
607
608/**
Govind Singh89727882016-04-15 13:58:27 +0530609 * Stats ID enums defined in host
610 */
611typedef enum {
612 WMI_HOST_REQUEST_PEER_STAT = 0x01,
613 WMI_HOST_REQUEST_AP_STAT = 0x02,
614 WMI_HOST_REQUEST_PDEV_STAT = 0x04,
615 WMI_HOST_REQUEST_VDEV_STAT = 0x08,
616 WMI_HOST_REQUEST_BCNFLT_STAT = 0x10,
617 WMI_HOST_REQUEST_VDEV_RATE_STAT = 0x20,
618 WMI_HOST_REQUEST_INST_STAT = 0x40,
619 WMI_HOST_REQUEST_PEER_EXTD_STAT = 0x80,
620 WMI_HOST_REQUEST_VDEV_EXTD_STAT = 0x100,
621} wmi_host_stats_id;
622
623typedef struct {
624 uint16_t cfg_retry_count;
625 uint16_t retry_count;
626} wmi_host_inst_rssi_args;
627
628/**
Govind Singh3ddda1f2016-03-09 11:34:12 +0530629 * struct stats_request_params - stats_request cmd parameter
630 * @stats_id: statistics id
631 * @vdev_id: vdev id
Govind Singh89727882016-04-15 13:58:27 +0530632 * @wmi_host_inst_rssi_args: Instantaneous rssi stats args
Govind Singh3ddda1f2016-03-09 11:34:12 +0530633 */
634struct stats_request_params {
635 uint32_t stats_id;
636 uint32_t vdev_id;
Govind Singh89727882016-04-15 13:58:27 +0530637#ifdef WMI_NON_TLV_SUPPORT
638 wmi_host_inst_rssi_args rssi_args;
639#endif
640};
641
642/**
643 * struct bss_chan_info_request_params - BSS chan info params
644 * @param: parameter value
645 */
646struct bss_chan_info_request_params {
647 uint32_t param;
Govind Singh3ddda1f2016-03-09 11:34:12 +0530648};
649
650/**
651 * struct green_ap_ps_params - green ap ps cmd parameter
652 * @value: parameter value
653 */
654struct green_ap_ps_params {
655 uint32_t value;
656};
657
658/**
659 * struct wow_cmd_params - wow cmd parameter
660 * @enable: wow enable or disable flag
661 * @can_suspend_link: flag to indicate if link can be suspended
662 * @pause_iface_config: interface config
663 */
664struct wow_cmd_params {
665 bool enable;
666 bool can_suspend_link;
667 uint8_t pause_iface_config;
668};
669
670/**
Govind Singh89727882016-04-15 13:58:27 +0530671 * struct wow_add_wakeup_params - wow wakeup parameter
672 * @type: param type
673 */
674struct wow_add_wakeup_params {
675 uint32_t type;
676};
677
678/**
679 * struct wow_add_wakeup_pattern_params - Add WoW pattern params
680 * @pattern_bytes: pointer to pattern bytes
681 * @mask_bytes: pointer to mask bytes
682 * @pattern_len: pattern length
683 * @pattern_id: pattern id
684 */
685struct wow_add_wakeup_pattern_params {
686 uint8_t *pattern_bytes;
687 uint8_t *mask_bytes;
688 uint32_t pattern_len;
689 uint32_t pattern_id;
690};
691
692/**
693 * struct wow_remove_wakeup_pattern params - WoW remove pattern param
694 * @pattern_bytes: pointer to pattern bytes
695 * @mask_bytes: Mask bytes
696 * @pattern_id: pattern identifier
697 */
698struct wow_remove_wakeup_pattern_params {
699 uint32_t *pattern_bytes;
700 uint32_t *mask_bytes;
701 uint32_t pattern_id;
702};
703
704
705/**
Govind Singh3ddda1f2016-03-09 11:34:12 +0530706 * struct packet_enable_params - packet enable cmd parameter
707 * @vdev_id: vdev id
708 * @enable: flag to indicate if parameter can be enabled or disabled
709 */
710struct packet_enable_params {
711 uint8_t vdev_id;
712 bool enable;
713};
714
715/**
716 * struct suspend_params - suspend cmd parameter
717 * @disable_target_intr: disable target interrupt
718 */
719struct suspend_params {
720 uint8_t disable_target_intr;
721};
722
723/**
724 * struct pdev_params - pdev set cmd parameter
725 * @param_id: parameter id
726 * @param_value: parameter value
727 */
728struct pdev_params {
729 uint32_t param_id;
730 uint32_t param_value;
731};
732
733/**
Govind Singh89727882016-04-15 13:58:27 +0530734 * struct beacon_tmpl_params - beacon template cmd parameter
735 * @vdev_id: vdev id
736 * @tim_ie_offset: tim ie offset
737 * @tmpl_len: beacon template length
738 * @tmpl_len_aligned: beacon template alignment
739 * @frm: beacon template parameter
740 */
741struct beacon_tmpl_params {
742 uint8_t vdev_id;
743 uint32_t tim_ie_offset;
744 uint32_t tmpl_len;
745 uint32_t tmpl_len_aligned;
746 uint8_t *frm;
747};
748
Govind Singhfa201d92016-06-08 19:40:11 +0530749#ifdef CONFIG_MCL
Govind Singh89727882016-04-15 13:58:27 +0530750/**
751 * struct beacon_params - beacon cmd parameter
Govind Singh3ddda1f2016-03-09 11:34:12 +0530752 * @vdev_id: vdev id
753 * @tim_ie_offset: tim ie offset
754 * @tmpl_len: beacon template length
755 * @tmpl_len_aligned: beacon template alignment
756 * @frm: beacon template parameter
757 */
758struct beacon_params {
759 uint8_t vdev_id;
760 uint32_t tim_ie_offset;
761 uint32_t tmpl_len;
762 uint32_t tmpl_len_aligned;
763 uint8_t *frm;
764};
Govind Singh89727882016-04-15 13:58:27 +0530765#else
766/**
767 * struct beacon_params - beacon cmd parameter
768 * @vdev_id: vdev id
769 * @beaconInterval: Beacon interval
770 * @wbuf: beacon buffer
771 * @frame_ctrl: frame control field
772 * @bcn_txant: beacon antenna
773 * @is_dtim_count_zero: is it dtim beacon
774 * @is_bitctl_reqd: is Bit control required
775 * @is_high_latency: Is this high latency target
776 */
777struct beacon_params {
778 uint8_t vdev_id;
779 uint16_t beaconInterval;
780 qdf_nbuf_t wbuf;
781 uint16_t frame_ctrl;
782 uint32_t bcn_txant;
783 bool is_dtim_count_zero;
784 bool is_bitctl_reqd;
785 bool is_high_latency;
786};
787#endif
788
789/**
790 * struct bcn_prb_template_params - beacon probe template parameter
791 * @vdev_id: vdev id
792 * @buf_len: Template length
793 * @caps: capabilities field
794 * @erp: ERP field
795 */
796struct bcn_prb_template_params {
797 uint8_t vdev_id;
798 int buf_len;
799 uint16_t caps;
800 uint8_t erp;
801};
802
803#define WMI_MAX_SUPPORTED_RATES 128
804/**
805 * struct target_rate_set - Rate set bitmap
806 * @num_rate: number of rates in rates bitmap
807 * @rates: rates (each 8bit value) packed into a 32 bit word.
808 * the rates are filled from least significant byte to most
809 * significant byte.
810 */
811typedef struct {
812 uint32_t num_rates;
813 uint32_t rates[(WMI_MAX_SUPPORTED_RATES / 4) + 1];
814} target_rate_set;
Govind Singh3ddda1f2016-03-09 11:34:12 +0530815
816/**
Himanshu Agarwal56c292f2016-07-19 15:41:51 +0530817 * struct wmi_host_mac_addr - host mac addr 2 word representation of MAC addr
818 * @mac_addr31to0: upper 4 bytes of MAC address
819 * @mac_addr47to32: lower 2 bytes of MAC address
820 */
821typedef struct {
822 uint32_t mac_addr31to0;
823 uint32_t mac_addr47to32;
824} wmi_host_mac_addr;
825
826/**
Govind Singh3ddda1f2016-03-09 11:34:12 +0530827 * struct peer_assoc_params - peer assoc cmd parameter
828 * @peer_macaddr: peer mac address
829 * @vdev_id: vdev id
830 * @peer_new_assoc: peer association type
831 * @peer_associd: peer association id
832 * @peer_flags: peer flags
833 * @peer_caps: peer capabalities
834 * @peer_listen_intval: peer listen interval
835 * @peer_ht_caps: HT capabalities
836 * @peer_max_mpdu: 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k
837 * @peer_mpdu_density: 3 : 0~7 : 2^(11nAMPDUdensity -4)
838 * @peer_rate_caps: peer rate capabalities
839 * @peer_nss: peer nss
840 * @peer_phymode: peer phymode
841 * @peer_ht_info: peer HT info
842 * @peer_legacy_rates: peer legacy rates
843 * @peer_ht_rates: peer ht rates
Govind Singh3ddda1f2016-03-09 11:34:12 +0530844 * @rx_max_rate: max rx rates
845 * @rx_mcs_set: rx mcs
846 * @tx_max_rate: max tx rates
847 * @tx_mcs_set: tx mcs
848 * @vht_capable: VHT capabalities
Govind Singh89727882016-04-15 13:58:27 +0530849 * @tx_max_mcs_nss: max tx MCS and NSS
850 * @peer_bw_rxnss_override: Peer BW RX NSS overriden or not.
851 * @is_pmf_enabled: PMF enabled
852 * @is_wme_set: WME enabled
853 * @qos_flag: QoS Flags
854 * @apsd_flag: APSD flags
855 * @ht_flag: HT flags
856 * @bw_40: 40 capabale
857 * @bw_80: 80 capabale
858 * @bw_160: 160 capabale
859 * @stbc_flag: STBC flag
860 * @ldpc_flag: LDPC flag
861 * @static_mimops_flag: statis MIMO PS flags
862 * @dynamic_mimops_flag: Dynamic MIMO PS flags
863 * @spatial_mux_flag: spatial MUX flags
864 * @vht_flag: VHT flags
865 * @vht_ng_flag: VHT on 11N/G flags
866 * @need_ptk_4_way: Needs 4 way handshake
867 * @need_gtk_2_way: Needs 2 way GTK
868 * @auth_flag: Is peer authenticated
869 * @safe_mode_enabled: Safe enabled for this peer
870 * @amsdu_disable: AMSDU disble
871 * @peer_mac: Peer mac address
Govind Singh3ddda1f2016-03-09 11:34:12 +0530872 */
873struct peer_assoc_params {
Himanshu Agarwal56c292f2016-07-19 15:41:51 +0530874 wmi_host_mac_addr peer_macaddr;
Govind Singh3ddda1f2016-03-09 11:34:12 +0530875 uint32_t vdev_id;
876 uint32_t peer_new_assoc;
877 uint32_t peer_associd;
878 uint32_t peer_flags;
879 uint32_t peer_caps;
880 uint32_t peer_listen_intval;
881 uint32_t peer_ht_caps;
882 uint32_t peer_max_mpdu;
883 uint32_t peer_mpdu_density;
884 uint32_t peer_rate_caps;
885 uint32_t peer_nss;
886 uint32_t peer_vht_caps;
887 uint32_t peer_phymode;
888 uint32_t peer_ht_info[2];
Govind Singh89727882016-04-15 13:58:27 +0530889 target_rate_set peer_legacy_rates;
890 target_rate_set peer_ht_rates;
Govind Singh3ddda1f2016-03-09 11:34:12 +0530891 uint32_t rx_max_rate;
892 uint32_t rx_mcs_set;
893 uint32_t tx_max_rate;
894 uint32_t tx_mcs_set;
895 uint8_t vht_capable;
Govind Singh89727882016-04-15 13:58:27 +0530896#ifdef WMI_NON_TLV_SUPPORT
897 uint32_t tx_max_mcs_nss;
898 uint32_t peer_bw_rxnss_override;
899 bool is_pmf_enabled;
900 bool is_wme_set;
901 bool qos_flag;
902 bool apsd_flag;
903 bool ht_flag;
904 bool bw_40;
905 bool bw_80;
906 bool bw_160;
907 bool stbc_flag;
908 bool ldpc_flag;
909 bool static_mimops_flag;
910 bool dynamic_mimops_flag;
911 bool spatial_mux_flag;
912 bool vht_flag;
913 bool vht_ng_flag;
914 bool need_ptk_4_way;
915 bool need_gtk_2_way;
916 bool auth_flag;
917 bool safe_mode_enabled;
918 bool amsdu_disable;
919 /* Use common structure */
920 uint8_t peer_mac[IEEE80211_ADDR_LEN];
921#endif
Govind Singh3ddda1f2016-03-09 11:34:12 +0530922};
923
924/**
925 * struct sta_ps_params - sta ps cmd parameter
926 * @vdev_id: vdev id
927 * @param: sta ps paramter
928 * @value: sta ps parameter value
929 */
930struct sta_ps_params {
931 uint32_t vdev_id;
932 uint32_t param;
933 uint32_t value;
934};
935
936/**
937 * struct ap_ps_params - ap ps cmd parameter
938 * @vdev_id: vdev id
939 * @param: ap ps paramter
940 * @value: ap ps paramter value
941 */
942struct ap_ps_params {
943 uint32_t vdev_id;
944 uint32_t param;
945 uint32_t value;
946};
947
Govind Singh89727882016-04-15 13:58:27 +0530948#define WMI_HOST_SCAN_CHAN_FREQ_SHIFT 0
949#define WMI_HOST_SCAN_CHAN_FREQ_MASK 0xffff
950#define WMI_HOST_SCAN_CHAN_MODE_SHIFT 16
951#define WMI_HOST_SCAN_CHAN_MODE_MASK 0xff
952
Govind Singh3ddda1f2016-03-09 11:34:12 +0530953/**
Govind Singh3ddda1f2016-03-09 11:34:12 +0530954 * struct scan_start_params - start scan cmd parameter
955 * @scan_id: scan id
956 * @scan_req_id: requeted scan id
957 * @vdev_id: vdev id
958 * @scan_priority: scan priority
959 * @notify_scan_events: flag to indicate if scan to be notified
960 * @dwell_time_active: active dwell time
961 * @dwell_time_passive: passive dwell time
962 * @min_rest_time: min rest time
963 * @max_rest_time: max rest time
964 * @repeat_probe_time: repeat probe time
965 * @probe_spacing_time: probe spacing time
966 * @idle_time: idle time
967 * @max_scan_time: max scan time
968 * @probe_delay: probe delay
969 * @scan_ctrl_flags: scan control flag
970 * @burst_duration: burst duration
971 * @num_chan: no of channel
972 * @num_bssid: no of bssid
973 * @num_ssids: no of ssid
974 * @ie_len: ie length
975 * @n_probes: no of probe
976 * @chan_list: channel list
977 * @ie_len_with_pad: ie length with padding
978 * @num_ssid: no of ssid
979 * @sid: pointer to mac_ssid structure
980 * @uie_fieldOffset: ie field offset
981 * @mac_add_bytes: mac address bytes
Govind Singh89727882016-04-15 13:58:27 +0530982 * @is_strict_pscan_en: Is this a strict passive scan
983 * @is_promiscous_mode: Is promiscous mode
984 * @is_phy_error: is Phy error
985 * @add_cck_rates: Add cck rates
986 * @chan_stat_enable: channel stats enabled
987 * @offchan_tx_mgmt: Offchan tx scan
988 * @offchan_tx_data: offchan tx data
989 * @add_bcast_probe_reqd: Add bcast probe request
990 * @bssid_list: Lisst of bssid to scan
991 * @ie_data: IE data buffer pointer
992 * @passive_flag: Is this passive scan
Govind Singh3ddda1f2016-03-09 11:34:12 +0530993 */
994struct scan_start_params {
995 uint32_t scan_id;
996 uint32_t scan_req_id;
997 uint32_t vdev_id;
998 uint32_t scan_priority;
999 uint32_t notify_scan_events;
1000 uint32_t dwell_time_active;
1001 uint32_t dwell_time_passive;
1002 uint32_t min_rest_time;
1003 uint32_t max_rest_time;
1004 uint32_t repeat_probe_time;
1005 uint32_t probe_spacing_time;
1006 uint32_t idle_time;
1007 uint32_t max_scan_time;
1008 uint32_t probe_delay;
1009 uint32_t scan_ctrl_flags;
1010 uint32_t burst_duration;
1011 uint32_t num_chan;
1012 uint32_t num_bssid;
1013 uint32_t num_ssids;
1014 uint32_t ie_len;
1015 uint32_t n_probes;
1016 uint32_t *chan_list;
1017 uint32_t ie_len_with_pad;
1018 struct mac_ssid ssid[WMI_SCAN_MAX_NUM_SSID];
1019 uint8_t *ie_base;
1020 uint16_t uie_fieldOffset;
1021 uint8_t mac_add_bytes[IEEE80211_ADDR_LEN];
Govind Singh89727882016-04-15 13:58:27 +05301022#ifdef WMI_NON_TLV_SUPPORT
1023 bool is_strict_pscan_en;
1024 bool is_promiscous_mode;
1025 bool is_phy_error;
1026 bool add_cck_rates;
1027 bool chan_stat_enable;
1028 bool offchan_tx_mgmt;
1029 bool offchan_tx_data;
1030 bool add_bcast_probe_reqd;
1031 uint8_t bssid_list[WMI_SCAN_MAX_NUM_BSSID][IEEE80211_ADDR_LEN];
1032 uint8_t *ie_data;
1033 int passive_flag;
1034#endif
Govind Singh3ddda1f2016-03-09 11:34:12 +05301035};
1036
1037/**
1038 * struct scan_stop_params - stop scan cmd parameter
1039 * @requestor: scan requestor
1040 * @scan_id: scan id
1041 * @req_type: scan request type
1042 * @vdev_id: vdev id
Govind Singh89727882016-04-15 13:58:27 +05301043 * @all_scans: Stop all scans
1044 * @vap_scans: stop vap scans
1045 * @specific_scan: specific scan
1046 * @flags: scan flags
1047 * @ss_scan_id: ss scan id
Govind Singh3ddda1f2016-03-09 11:34:12 +05301048 */
1049struct scan_stop_params {
1050 uint32_t requestor;
1051 uint32_t scan_id;
1052 uint32_t req_type;
1053 uint32_t vdev_id;
Govind Singh89727882016-04-15 13:58:27 +05301054#ifdef WMI_NON_TLV_SUPPORT
1055 bool all_scans;
1056 bool vap_scans;
1057 bool specific_scan;
1058 uint32_t flags;
1059 uint32_t ss_scan_id;
1060#endif
Govind Singh3ddda1f2016-03-09 11:34:12 +05301061};
1062
1063/**
1064 * struct scan_chan_list_params - scan channel list cmd parameter
1065 * @num_scan_chans: no of scan channels
1066 * @chan_info: pointer to wmi channel info
1067 */
Govind Singhfa201d92016-06-08 19:40:11 +05301068#ifdef CONFIG_MCL
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301069/* TODO: This needs clean-up based on how its processed. */
1070typedef struct {
1071 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
1072 uint32_t tlv_header;
1073 /** primary 20 MHz channel frequency in mhz */
1074 uint32_t mhz;
1075 /** Center frequency 1 in MHz*/
1076 uint32_t band_center_freq1;
1077 /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
1078 uint32_t band_center_freq2;
1079 /** channel info described below */
1080 uint32_t info;
1081 /** contains min power, max power, reg power and reg class id. */
1082 uint32_t reg_info_1;
1083 /** contains antennamax */
1084 uint32_t reg_info_2;
1085} wmi_channel_param;
1086
Govind Singh3ddda1f2016-03-09 11:34:12 +05301087struct scan_chan_list_params {
1088 uint8_t num_scan_chans;
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301089 wmi_channel_param *chan_info;
Govind Singh3ddda1f2016-03-09 11:34:12 +05301090};
Govind Singh89727882016-04-15 13:58:27 +05301091#else
1092/**
1093 * struct scan_chan_list_params - scan channel list cmd parameter
1094 * @num_chan: no of scan channels
1095 * @nallchans: nall chans
1096 * @ch_param: pointer to channel_paramw
1097 */
1098struct scan_chan_list_params {
1099 uint8_t num_chan;
1100 uint16_t nallchans;
1101 struct channel_param ch_param[1];
1102};
1103#endif
Govind Singh3ddda1f2016-03-09 11:34:12 +05301104
1105/**
1106 * struct fw_hang_params - fw hang command parameters
1107 * @type: 0:unused 1: ASSERT, 2:not respond detect command, 3:simulate ep-full
1108 * @delay_time_ms: 0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)
1109 */
1110struct fw_hang_params {
1111 uint32_t type;
1112 uint32_t delay_time_ms;
1113};
1114
1115/**
1116 * struct pdev_utf_params - pdev utf command parameters
1117 * @utf_payload:
1118 * @len:
Govind Singh89727882016-04-15 13:58:27 +05301119 * @is_ar900b: is it 900b target
Govind Singh3ddda1f2016-03-09 11:34:12 +05301120 */
1121struct pdev_utf_params {
1122 uint8_t *utf_payload;
1123 uint32_t len;
Govind Singh89727882016-04-15 13:58:27 +05301124#ifdef WMI_NON_TLV_SUPPORT
1125 bool is_ar900b;
1126#endif
Govind Singh3ddda1f2016-03-09 11:34:12 +05301127};
1128
Govind Singh89727882016-04-15 13:58:27 +05301129/*Adding this due to dependency on wmi_unified.h
1130 */
1131typedef struct {
1132 uint32_t len;
1133 uint32_t msgref;
1134 uint32_t segmentInfo;
1135} QVIT_SEG_HDR_INFO_STRUCT;
1136
1137struct pdev_qvit_params {
1138 uint8_t *utf_payload;
1139 uint32_t len;
1140};
Govind Singh3ddda1f2016-03-09 11:34:12 +05301141/**
1142 * struct crash_inject - crash inject command parameters
1143 * @type: crash inject type
1144 * @delay_time_ms: time in milliseconds for FW to delay the crash
1145 */
1146struct crash_inject {
1147 uint32_t type;
1148 uint32_t delay_time_ms;
1149};
1150
1151/**
1152 * struct dbglog_params - fw deboglog command parameters
1153 * @param: command parameter
1154 * @val: parameter value
1155 * @module_id_bitmap: fixed length module id bitmap
1156 * @bitmap_len: module id bitmap length
Govind Singh89727882016-04-15 13:58:27 +05301157 * @cfgvalid: cfgvalid
Govind Singh3ddda1f2016-03-09 11:34:12 +05301158 */
1159struct dbglog_params {
1160 uint32_t param;
1161 uint32_t val;
1162 uint32_t *module_id_bitmap;
1163 uint32_t bitmap_len;
Govind Singh89727882016-04-15 13:58:27 +05301164#ifdef WMI_NON_TLV_SUPPORT
1165 uint32_t cfgvalid[2];
1166#endif
Govind Singh3ddda1f2016-03-09 11:34:12 +05301167};
1168
1169/**
1170 * struct seg_hdr_info - header info
1171 * @len: length
1172 * @msgref: message refrence
1173 * @segmentInfo: segment info
1174 * @pad: padding
1175 */
1176struct seg_hdr_info {
1177 uint32_t len;
1178 uint32_t msgref;
1179 uint32_t segmentInfo;
1180 uint32_t pad;
1181};
1182
1183/**
1184 * struct wmi_mgmt_params - wmi mgmt cmd paramters
1185 * @tx_frame: management tx frame
Govind Singh89727882016-04-15 13:58:27 +05301186 * @frm_len: frame length
Govind Singh3ddda1f2016-03-09 11:34:12 +05301187 * @vdev_id: vdev id
1188 * @tx_complete_cb: tx download callback handler
1189 * @tx_ota_post_proc_cb: OTA complition handler
1190 * @chanfreq: channel frequency
1191 * @pdata: frame data
1192 * @wmi_desc: command descriptor
Govind Singh89727882016-04-15 13:58:27 +05301193 * @desc_id: descriptor id relyaed back by target
1194 * @macaddr - macaddr of peer
Govind Singh3ddda1f2016-03-09 11:34:12 +05301195 */
1196struct wmi_mgmt_params {
1197 void *tx_frame;
1198 uint16_t frm_len;
1199 uint8_t vdev_id;
Govind Singh3ddda1f2016-03-09 11:34:12 +05301200 uint16_t chanfreq;
1201 void *pdata;
Govind Singh89727882016-04-15 13:58:27 +05301202 uint16_t desc_id;
1203 uint8_t *macaddr;
Govind Singhd7468a52016-03-09 14:32:57 +05301204 void *qdf_ctx;
Govind Singh3ddda1f2016-03-09 11:34:12 +05301205};
Govind Singhbffe4de2016-02-26 17:50:39 +05301206
1207/**
1208 * struct p2p_ps_params - P2P powersave related params
1209 * @opp_ps: opportunistic power save
1210 * @ctwindow: CT window
1211 * @count: count
1212 * @duration: duration
1213 * @interval: interval
1214 * @single_noa_duration: single shot noa duration
1215 * @ps_selection: power save selection
1216 * @session_id: session id
1217 */
1218struct p2p_ps_params {
1219 uint8_t opp_ps;
1220 uint32_t ctwindow;
1221 uint8_t count;
1222 uint32_t duration;
1223 uint32_t interval;
1224 uint32_t single_noa_duration;
1225 uint8_t ps_selection;
1226 uint8_t session_id;
1227};
1228
1229
1230/**
1231 * struct ta_uapsd_trig_params - uapsd trigger parameter
1232 * @vdevid: vdev id
1233 * @peer_addr: peer address
1234 * @auto_triggerparam: trigger parameters
1235 * @num_ac: no of access category
1236 */
1237struct sta_uapsd_trig_params {
1238 uint32_t vdevid;
1239 uint8_t peer_addr[IEEE80211_ADDR_LEN];
1240 uint8_t *auto_triggerparam;
1241 uint32_t num_ac;
1242};
Govind Singhe7b800c2016-03-01 15:30:53 +05301243
1244/**
1245 * struct ocb_utc_param
1246 * @vdev_id: session id
1247 * @utc_time: number of nanoseconds from Jan 1st 1958
1248 * @time_error: the error in the UTC time. All 1's for unknown
1249 */
1250struct ocb_utc_param {
1251 uint32_t vdev_id;
1252 uint8_t utc_time[WMI_SIZE_UTC_TIME];
1253 uint8_t time_error[WMI_SIZE_UTC_TIME_ERROR];
1254};
1255
1256/**
1257 * struct ocb_timing_advert_param
1258 * @vdev_id: session id
1259 * @chan_freq: frequency on which to advertise
1260 * @repeat_rate: the number of times it will send TA in 5 seconds
1261 * @timestamp_offset: offset of the timestamp field in the TA frame
1262 * @time_value_offset: offset of the time_value field in the TA frame
1263 * @template_length: size in bytes of the TA frame
1264 * @template_value: the TA frame
1265 */
1266struct ocb_timing_advert_param {
1267 uint32_t vdev_id;
1268 uint32_t chan_freq;
1269 uint32_t repeat_rate;
1270 uint32_t timestamp_offset;
1271 uint32_t time_value_offset;
1272 uint32_t template_length;
1273 uint8_t *template_value;
1274};
1275
1276/**
1277 * struct dcc_get_stats_param
1278 * @vdev_id: session id
1279 * @channel_count: number of dcc channels
1280 * @request_array_len: size in bytes of the request array
1281 * @request_array: the request array
1282 */
1283struct dcc_get_stats_param {
1284 uint32_t vdev_id;
1285 uint32_t channel_count;
1286 uint32_t request_array_len;
1287 void *request_array;
1288};
1289
1290/**
1291 * struct dcc_update_ndl_param
1292 * @vdev_id: session id
1293 * @channel_count: number of channels to be updated
1294 * @dcc_ndl_chan_list_len: size in bytes of the ndl_chan array
1295 * @dcc_ndl_chan_list: the ndl_chan array
1296 * @dcc_ndl_active_state_list_len: size in bytes of the active_state array
1297 * @dcc_ndl_active_state_list: the active state array
1298 */
1299struct dcc_update_ndl_param {
1300 uint32_t vdev_id;
1301 uint32_t channel_count;
1302 uint32_t dcc_ndl_chan_list_len;
1303 void *dcc_ndl_chan_list;
1304 uint32_t dcc_ndl_active_state_list_len;
1305 void *dcc_ndl_active_state_list;
1306};
1307
1308/**
1309 * struct ocb_config_sched
1310 * @chan_freq: frequency of the channel
1311 * @total_duration: duration of the schedule
1312 * @guard_interval: guard interval on the start of the schedule
1313 */
1314struct ocb_config_sched {
1315 uint32_t chan_freq;
1316 uint32_t total_duration;
1317 uint32_t guard_interval;
1318};
1319
1320/**
1321 * OCB structures
1322 */
1323
1324#define WMI_NUM_AC (4)
1325#define WMI_OCB_CHANNEL_MAX (5)
1326#define WMI_MAX_NUM_AC 4
1327struct wmi_ocb_qos_params {
1328 uint8_t aifsn;
1329 uint8_t cwmin;
1330 uint8_t cwmax;
1331};
1332/**
1333 * struct ocb_config_channel
1334 * @chan_freq: frequency of the channel
1335 * @bandwidth: bandwidth of the channel, either 10 or 20 MHz
1336 * @mac_address: MAC address assigned to this channel
1337 * @qos_params: QoS parameters
1338 * @max_pwr: maximum transmit power of the channel (dBm)
1339 * @min_pwr: minimum transmit power of the channel (dBm)
1340 * @reg_pwr: maximum transmit power specified by the regulatory domain (dBm)
1341 * @antenna_max: maximum antenna gain specified by the regulatory domain (dB)
1342 */
1343struct ocb_config_channel {
1344 uint32_t chan_freq;
1345 uint32_t bandwidth;
Govind Singhd7468a52016-03-09 14:32:57 +05301346 struct qdf_mac_addr mac_address;
Govind Singhe7b800c2016-03-01 15:30:53 +05301347 struct wmi_ocb_qos_params qos_params[WMI_MAX_NUM_AC];
1348 uint32_t max_pwr;
1349 uint32_t min_pwr;
1350 uint8_t reg_pwr;
1351 uint8_t antenna_max;
1352 uint16_t flags;
1353};
1354
1355/**
1356 * struct ocb_config_param
1357 * @session_id: session id
1358 * @channel_count: number of channels
1359 * @schedule_size: size of the channel schedule
1360 * @flags: reserved
1361 * @channels: array of OCB channels
1362 * @schedule: array of OCB schedule elements
1363 * @dcc_ndl_chan_list_len: size of the ndl_chan array
1364 * @dcc_ndl_chan_list: array of dcc channel info
1365 * @dcc_ndl_active_state_list_len: size of the active state array
1366 * @dcc_ndl_active_state_list: array of active states
1367 * @adapter: the OCB adapter
1368 * @dcc_stats_callback: callback for the response event
1369 */
1370struct ocb_config_param {
1371 uint8_t session_id;
1372 uint32_t channel_count;
1373 uint32_t schedule_size;
1374 uint32_t flags;
1375 struct ocb_config_channel *channels;
1376 struct ocb_config_sched *schedule;
1377 uint32_t dcc_ndl_chan_list_len;
1378 void *dcc_ndl_chan_list;
1379 uint32_t dcc_ndl_active_state_list_len;
1380 void *dcc_ndl_active_state_list;
1381};
Govind Singh9bad0002016-03-01 15:54:59 +05301382
Poddar, Siddarth794b9962016-04-28 15:49:11 +05301383enum wmi_peer_rate_report_cond_phy_type {
1384 WMI_PEER_RATE_REPORT_COND_11B = 0,
1385 WMI_PEER_RATE_REPORT_COND_11A_G,
1386 WMI_PEER_RATE_REPORT_COND_11N,
1387 WMI_PEER_RATE_REPORT_COND_11AC,
1388 WMI_PEER_RATE_REPORT_COND_MAX_NUM
1389};
1390
1391/**
1392 * struct report_rate_delta - peer specific parameters
1393 * @percent: percentage
1394 * @delta_min: rate min delta
1395 */
1396struct report_rate_delta {
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301397 uint32_t percent; /* in unit of 12.5% */
1398 uint32_t delta_min; /* in unit of Mbps */
Poddar, Siddarth794b9962016-04-28 15:49:11 +05301399};
1400
1401/**
1402 * struct report_rate_per_phy - per phy report parameters
1403 * @cond_flags: condition flag val
1404 * @delta: rate delta
1405 * @report_rate_threshold: rate threshold
1406 */
1407struct report_rate_per_phy {
1408 /*
1409 * PEER_RATE_REPORT_COND_FLAG_DELTA,
1410 * PEER_RATE_REPORT_COND_FLAG_THRESHOLD
1411 * Any of these two conditions or both of
1412 * them can be set.
1413 */
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301414 uint32_t cond_flags;
Poddar, Siddarth794b9962016-04-28 15:49:11 +05301415 struct report_rate_delta delta;
1416 /*
1417 * In unit of Mbps. There are at most 4 thresholds
1418 * If the threshold count is less than 4, set zero to
1419 * the one following the last threshold
1420 */
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301421 uint32_t report_rate_threshold[WMI_MAX_NUM_OF_RATE_THRESH];
Poddar, Siddarth794b9962016-04-28 15:49:11 +05301422};
1423
1424/**
1425 * struct peer_rate_report_params - peer rate report parameters
1426 * @rate_report_enable: enable rate report param
1427 * @backoff_time: backoff time
1428 * @timer_period: timer
1429 * @report_per_phy: report per phy type
1430 */
1431struct wmi_peer_rate_report_params {
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301432 uint32_t rate_report_enable;
1433 uint32_t backoff_time; /* in unit of msecond */
1434 uint32_t timer_period; /* in unit of msecond */
Poddar, Siddarth794b9962016-04-28 15:49:11 +05301435 /*
1436 *In the following field, the array index means the phy type,
1437 * please see enum wmi_peer_rate_report_cond_phy_type for detail
1438 */
1439 struct report_rate_per_phy report_per_phy[
1440 WMI_PEER_RATE_REPORT_COND_MAX_NUM];
1441
1442};
1443
Govind Singh9bad0002016-03-01 15:54:59 +05301444/**
1445 * struct t_thermal_cmd_params - thermal command parameters
1446 * @min_temp: minimum temprature
1447 * @max_temp: maximum temprature
1448 * @thermal_enable: thermal enable
1449 */
1450struct thermal_cmd_params {
1451 uint16_t min_temp;
1452 uint16_t max_temp;
1453 uint8_t thermal_enable;
1454};
1455
1456#define WMI_LRO_IPV4_SEED_ARR_SZ 5
1457#define WMI_LRO_IPV6_SEED_ARR_SZ 11
1458
1459/**
1460 * struct wmi_lro_config_cmd_t - set LRO init parameters
1461 * @lro_enable: indicates whether lro is enabled
1462 * @tcp_flag: If the TCP flags from the packet do not match
1463 * the values in this field after masking with TCP flags mask
1464 * below, packet is not LRO eligible
1465 * @tcp_flag_mask: field for comparing the TCP values provided
1466 * above with the TCP flags field in the received packet
1467 * @toeplitz_hash_ipv4: contains seed needed to compute the flow id
1468 * 5-tuple toeplitz hash for ipv4 packets
1469 * @toeplitz_hash_ipv6: contains seed needed to compute the flow id
1470 * 5-tuple toeplitz hash for ipv6 packets
1471 */
1472struct wmi_lro_config_cmd_t {
1473 uint32_t lro_enable;
1474 uint32_t tcp_flag:9,
1475 tcp_flag_mask:9;
1476 uint32_t toeplitz_hash_ipv4[WMI_LRO_IPV4_SEED_ARR_SZ];
1477 uint32_t toeplitz_hash_ipv6[WMI_LRO_IPV6_SEED_ARR_SZ];
1478};
Govind Singhae855362016-03-07 14:24:22 +05301479
1480/**
1481 * struct gtx_config_t - GTX config
1482 * @gtx_rt_mask: for HT and VHT rate masks
1483 * @gtx_usrcfg: host request for GTX mask
1484 * @gtx_threshold: PER Threshold (default: 10%)
1485 * @gtx_margin: PER margin (default: 2%)
1486 * @gtx_tcpstep: TCP step (default: 1)
1487 * @gtx_tpcMin: TCP min (default: 5)
1488 * @gtx_bwmask: BW mask (20/40/80/160 Mhz)
1489 */
1490struct wmi_gtx_config {
1491 uint32_t gtx_rt_mask[2];
1492 uint32_t gtx_usrcfg;
1493 uint32_t gtx_threshold;
1494 uint32_t gtx_margin;
1495 uint32_t gtx_tpcstep;
1496 uint32_t gtx_tpcmin;
1497 uint32_t gtx_bwmask;
1498};
1499
1500/**
1501 * struct wmi_probe_resp_params - send probe response parameters
1502 * @bssId: BSSID
1503 * @pProbeRespTemplate: probe response template
1504 * @probeRespTemplateLen: probe response template length
1505 * @ucProxyProbeReqValidIEBmap: valid IE bitmap
1506 */
1507struct wmi_probe_resp_params {
Govind Singh8675b862016-03-28 22:09:18 +05301508 uint8_t bssId[IEEE80211_ADDR_LEN];
Govind Singhae855362016-03-07 14:24:22 +05301509 uint8_t *pProbeRespTemplate;
1510 uint32_t probeRespTemplateLen;
1511 uint32_t ucProxyProbeReqValidIEBmap[8];
1512};
1513
Himanshu Agarwal9efd9bf2016-03-09 18:49:18 +05301514/* struct set_key_params: structure containing
1515 * installation key parameters
1516 * @vdev_id: vdev id
1517 * @key_len: key length
1518 * @key_idx: key index
1519 * @peer_mac: peer mac address
1520 * @key_flags: key flags, 0:pairwise key, 1:group key, 2:static key
1521 * @key_cipher: key cipher based on security mode
1522 * @key_txmic_len: tx mic length
1523 * @key_rxmic_len: rx mic length
1524 * @rx_iv: receive IV, applicable only in case of WAPI
1525 * @tx_iv: transmit IV, applicable only in case of WAPI
1526 * @key_data: key data
1527 */
1528struct set_key_params {
1529 uint8_t vdev_id;
1530 uint16_t key_len;
1531 uint32_t key_idx;
1532 uint8_t peer_mac[IEEE80211_ADDR_LEN];
1533 uint32_t key_flags;
1534 uint32_t key_cipher;
1535 uint32_t key_txmic_len;
1536 uint32_t key_rxmic_len;
1537#ifdef FEATURE_WLAN_WAPI
1538 uint8_t rx_iv[16];
1539 uint8_t tx_iv[16];
1540#endif
1541 uint8_t key_data[WMI_MAC_MAX_KEY_LENGTH];
1542};
1543
Govind Singhae855362016-03-07 14:24:22 +05301544/**
1545 * struct sta_params - sta keep alive parameters
1546 * @vdev_id: vdev id
1547 * @method: keep alive method
1548 * @timeperiod: time to keep alive
1549 * @hostv4addr: host ipv4 address
1550 * @destv4addr: destination ipv4 address
1551 * @destmac: destination mac address
1552 */
1553struct sta_params {
1554 uint8_t vdev_id;
1555 uint32_t method;
1556 uint32_t timeperiod;
1557 uint8_t *hostv4addr;
1558 uint8_t *destv4addr;
1559 uint8_t *destmac;
1560};
1561
1562/**
1563 * struct gateway_update_req_param - gateway parameter update request
1564 * @request_id: request id
1565 * @session_id: session id
1566 * @max_retries: Max ARP/NS retry attempts
1567 * @timeout: Retry interval
1568 * @ipv4_addr_type: on ipv4 network
1569 * @ipv6_addr_type: on ipv6 network
1570 * @gw_mac_addr: gateway mac addr
1571 * @ipv4_addr: ipv4 addr
1572 * @ipv6_addr: ipv6 addr
1573 */
1574struct gateway_update_req_param {
1575 uint32_t request_id;
1576 uint32_t session_id;
1577 uint32_t max_retries;
1578 uint32_t timeout;
1579 uint32_t ipv4_addr_type;
1580 uint32_t ipv6_addr_type;
Govind Singhd7468a52016-03-09 14:32:57 +05301581 struct qdf_mac_addr gw_mac_addr;
1582 uint8_t ipv4_addr[QDF_IPV4_ADDR_SIZE];
1583 uint8_t ipv6_addr[QDF_IPV6_ADDR_SIZE];
Govind Singhae855362016-03-07 14:24:22 +05301584};
1585
1586/**
1587 * struct rssi_monitor_param - rssi monitoring
1588 * @request_id: request id
1589 * @session_id: session id
1590 * @min_rssi: minimum rssi
1591 * @max_rssi: maximum rssi
1592 * @control: flag to indicate start or stop
1593 */
1594struct rssi_monitor_param {
1595 uint32_t request_id;
1596 uint32_t session_id;
1597 int8_t min_rssi;
1598 int8_t max_rssi;
1599 bool control;
1600};
1601
1602/**
1603 * struct scan_mac_oui - oui paramters
1604 * @oui: oui parameters
1605 */
1606struct scan_mac_oui {
1607 uint8_t oui[WMI_WIFI_SCANNING_MAC_OUI_LENGTH];
1608};
1609
1610#define WMI_PASSPOINT_REALM_LEN 256
1611#define WMI_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
1612#define WMI_PASSPOINT_PLMN_LEN 3
1613/**
1614 * struct wifi_passpoint_network_param - passpoint network block
1615 * @id: identifier of this network block
1616 * @realm: null terminated UTF8 encoded realm, 0 if unspecified
1617 * @roaming_consortium_ids: roaming consortium ids to match, 0s if unspecified
1618 * @plmn: mcc/mnc combination as per rules, 0s if unspecified
1619 */
1620struct wifi_passpoint_network_param {
1621 uint32_t id;
1622 uint8_t realm[WMI_PASSPOINT_REALM_LEN];
1623 int64_t roaming_consortium_ids[WMI_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM];
1624 uint8_t plmn[WMI_PASSPOINT_PLMN_LEN];
1625};
1626
1627/**
1628 * struct wifi_passpoint_req_param - passpoint request
1629 * @request_id: request identifier
1630 * @num_networks: number of networks
1631 * @networks: passpoint networks
1632 */
1633struct wifi_passpoint_req_param {
1634 uint32_t request_id;
1635 uint32_t session_id;
1636 uint32_t num_networks;
1637 struct wifi_passpoint_network_param networks[];
1638};
1639
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301640/* struct mobility_domain_info - structure containing
1641 * mobility domain info
1642 * @mdie_present: mobility domain present or not
1643 * @mobility_domain: mobility domain
1644 */
1645struct mobility_domain_info {
1646 uint8_t mdie_present;
1647 uint16_t mobility_domain;
1648};
1649
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301650#define WMI_HOST_ROAM_OFFLOAD_NUM_MCS_SET (16)
1651
1652/* This TLV will be filled only in case roam offload
1653 * for wpa2-psk/okc/ese/11r is enabled */
1654typedef struct {
1655 /*
1656 * TLV tag and len; tag equals
1657 * WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param
1658 */
1659 uint32_t tlv_header;
1660 uint32_t rssi_cat_gap; /* gap for every category bucket */
1661 uint32_t prefer_5g; /* prefer select 5G candidate */
1662 uint32_t select_5g_margin;
1663 uint32_t reassoc_failure_timeout; /* reassoc failure timeout */
1664 uint32_t capability;
1665 uint32_t ht_caps_info;
1666 uint32_t ampdu_param;
1667 uint32_t ht_ext_cap;
1668 uint32_t ht_txbf;
1669 uint32_t asel_cap;
1670 uint32_t qos_enabled;
1671 uint32_t qos_caps;
1672 uint32_t wmm_caps;
1673 /* since this is 4 byte aligned, we don't declare it as tlv array */
1674 uint32_t mcsset[WMI_HOST_ROAM_OFFLOAD_NUM_MCS_SET >> 2];
1675} roam_offload_param;
1676
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301677/* struct roam_offload_scan_params - structure
1678 * containing roaming offload scan parameters
1679 * @is_roam_req_valid: flag to tell whether roam req
1680 * is valid or NULL
1681 * @mode: stores flags for scan
1682 * @vdev_id: vdev id
1683 * @roam_offload_enabled: flag for offload enable
1684 * @psk_pmk: pre shared key/pairwise master key
1685 * @pmk_len: length of PMK
1686 * @prefer_5ghz: prefer select 5G candidate
1687 * @roam_rssi_cat_gap: gap for every category bucket
1688 * @select_5ghz_margin: select 5 Ghz margin
1689 * @krk: KRK
1690 * @btk: BTK
1691 * @reassoc_failure_timeout: reassoc failure timeout
1692 * @rokh_id_length: r0kh id length
1693 * @rokh_id: r0kh id
1694 * @roam_key_mgmt_offload_enabled: roam offload flag
1695 * @auth_mode: authentication mode
Deepak Dhamdhere3ae33a32016-08-22 18:04:00 -07001696 * @okc_enabled: enable opportunistic key caching
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301697 * @is_ese_assoc: flag to determine ese assoc
1698 * @mdid: mobility domain info
1699 * @roam_offload_params: roam offload tlv params
1700 */
1701struct roam_offload_scan_params {
1702 uint8_t is_roam_req_valid;
1703 uint32_t mode;
1704 uint32_t vdev_id;
1705#ifdef WLAN_FEATURE_ROAM_OFFLOAD
1706 uint8_t roam_offload_enabled;
1707 uint8_t psk_pmk[WMI_ROAM_SCAN_PSK_SIZE];
1708 uint32_t pmk_len;
1709 uint8_t prefer_5ghz;
1710 uint8_t roam_rssi_cat_gap;
1711 uint8_t select_5ghz_margin;
1712 uint8_t krk[WMI_KRK_KEY_LEN];
1713 uint8_t btk[WMI_BTK_KEY_LEN];
1714 uint32_t reassoc_failure_timeout;
1715 uint32_t rokh_id_length;
1716 uint8_t rokh_id[WMI_ROAM_R0KH_ID_MAX_LEN];
1717 uint8_t roam_key_mgmt_offload_enabled;
1718 int auth_mode;
Deepak Dhamdhere3ae33a32016-08-22 18:04:00 -07001719 bool okc_enabled;
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301720#endif
1721 bool is_ese_assoc;
1722 struct mobility_domain_info mdid;
Govind Singh89727882016-04-15 13:58:27 +05301723#ifndef WMI_NON_TLV_SUPPORT
1724 /* THis is not available in non tlv target.
1725 * please remove this and replace with a host based
1726 * structure */
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301727 roam_offload_param roam_offload_params;
Govind Singh89727882016-04-15 13:58:27 +05301728#endif
Selvaraj, Sridhar0a1427f2016-07-04 21:40:23 +05301729 uint32_t assoc_ie_length;
1730 uint8_t assoc_ie[MAX_ASSOC_IE_LENGTH];
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301731};
1732
1733/* struct roam_offload_scan_rssi_params - structure containing
1734 * parameters for roam offload scan based on RSSI
1735 * @rssi_thresh: rssi threshold
1736 * @rssi_thresh_diff: difference in rssi threshold
1737 * @hi_rssi_scan_max_count: 5G scan max count
1738 * @hi_rssi_scan_rssi_delta: 5G scan rssi change threshold value
1739 * @hi_rssi_scan_rssi_ub: 5G scan upper bound
1740 * @raise_rssi_thresh_5g: flag to determine penalty and boost thresholds
1741 * @session_id: vdev id
1742 * @penalty_threshold_5g: RSSI threshold below which 5GHz RSSI is penalized
1743 * @boost_threshold_5g: RSSI threshold above which 5GHz RSSI is favored
1744 * @raise_factor_5g: factor by which 5GHz RSSI is boosted
1745 * @drop_factor_5g: factor by which 5GHz RSSI is penalized
1746 * @max_raise_rssi_5g: maximum boost that can be applied to a 5GHz RSSI
1747 * @max_drop_rssi_5g: maximum penalty that can be applied to a 5GHz RSSI
1748 * @good_rssi_threshold: RSSI below which roam is kicked in by background
1749 * scan although rssi is still good
1750 * @roam_earlystop_thres_min: Minimum RSSI threshold value for early stop,
1751 * unit is dB above NF
1752 * @roam_earlystop_thres_max: Maximum RSSI threshold value for early stop,
1753 * unit is dB above NF
Gupta, Kapil1f4a4c32016-04-12 15:02:00 +05301754 * @dense_rssi_thresh_offset: dense roam RSSI threshold difference
1755 * @dense_min_aps_cnt: dense roam minimum APs
1756 * @initial_dense_status: dense status detected by host
1757 * @traffic_threshold: dense roam RSSI threshold
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301758 */
1759struct roam_offload_scan_rssi_params {
1760 int8_t rssi_thresh;
1761 uint8_t rssi_thresh_diff;
1762 uint32_t hi_rssi_scan_max_count;
1763 uint32_t hi_rssi_scan_rssi_delta;
1764 int32_t hi_rssi_scan_rssi_ub;
1765 int raise_rssi_thresh_5g;
1766 uint8_t session_id;
1767 uint32_t penalty_threshold_5g;
1768 uint32_t boost_threshold_5g;
1769 uint8_t raise_factor_5g;
1770 uint8_t drop_factor_5g;
1771 int max_raise_rssi_5g;
1772 int max_drop_rssi_5g;
1773 uint32_t good_rssi_threshold;
1774 uint32_t roam_earlystop_thres_min;
1775 uint32_t roam_earlystop_thres_max;
Gupta, Kapil1f4a4c32016-04-12 15:02:00 +05301776 int dense_rssi_thresh_offset;
1777 int dense_min_aps_cnt;
1778 int initial_dense_status;
1779 int traffic_threshold;
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301780};
1781
Govind Singhae855362016-03-07 14:24:22 +05301782/**
1783 * struct wifi_epno_network - enhanced pno network block
1784 * @ssid: ssid
1785 * @rssi_threshold: threshold for considering this SSID as found, required
1786 * granularity for this threshold is 4dBm to 8dBm
1787 * @flags: WIFI_PNO_FLAG_XXX
1788 * @auth_bit_field: auth bit field for matching WPA IE
1789 */
1790struct wifi_epno_network_params {
1791 struct mac_ssid ssid;
1792 int8_t rssi_threshold;
1793 uint8_t flags;
1794 uint8_t auth_bit_field;
1795};
1796
1797/**
1798 * struct wifi_enhanched_pno_params - enhanced pno network params
1799 * @num_networks: number of ssids
1800 * @networks: PNO networks
1801 */
1802struct wifi_enhanched_pno_params {
1803 uint32_t request_id;
1804 uint32_t session_id;
1805 uint32_t num_networks;
1806 struct wifi_epno_network_params networks[];
1807};
1808
1809enum {
1810 WMI_AP_RX_DATA_OFFLOAD = 0x00,
1811 WMI_STA_RX_DATA_OFFLOAD = 0x01,
1812};
1813
1814/**
Govind Singhc7cd2d62016-06-21 14:33:26 +05301815 * enum extscan_configuration_flags - extscan config flags
1816 * @WMI_EXTSCAN_LP_EXTENDED_BATCHING: extended batching
1817 */
1818enum wmi_extscan_configuration_flags {
1819 WMI_EXTSCAN_LP_EXTENDED_BATCHING = 0x00000001,
1820};
1821
1822/**
Govind Singhae855362016-03-07 14:24:22 +05301823 * enum extscan_report_events_type - extscan report events type
1824 * @EXTSCAN_REPORT_EVENTS_BUFFER_FULL: report only when scan history is % full
1825 * @EXTSCAN_REPORT_EVENTS_EACH_SCAN: report a scan completion event after scan
1826 * @EXTSCAN_REPORT_EVENTS_FULL_RESULTS: forward scan results
1827 * (beacons/probe responses + IEs)
1828 * in real time to HAL, in addition to completion events.
1829 * Note: To keep backward compatibility,
1830 * fire completion events regardless of REPORT_EVENTS_EACH_SCAN.
1831 * @EXTSCAN_REPORT_EVENTS_NO_BATCH: controls batching,
1832 * 0 => batching, 1 => no batching
1833 */
1834enum wmi_extscan_report_events_type {
1835 WMI_EXTSCAN_REPORT_EVENTS_BUFFER_FULL = 0x00,
1836 WMI_EXTSCAN_REPORT_EVENTS_EACH_SCAN = 0x01,
1837 WMI_EXTSCAN_REPORT_EVENTS_FULL_RESULTS = 0x02,
1838 WMI_EXTSCAN_REPORT_EVENTS_NO_BATCH = 0x04,
1839};
1840
1841/**
1842 * struct ipa_offload_control_params - ipa offload parameters
1843 * @offload_type: ipa offload type
1844 * @vdev_id: vdev id
1845 * @enable: ipa offload enable/disable
1846 */
1847struct ipa_offload_control_params {
1848 uint32_t offload_type;
1849 uint32_t vdev_id;
1850 uint32_t enable;
1851};
1852
1853/**
1854 * struct extscan_capabilities_params - ext scan capablities
1855 * @request_id: request_id
1856 * @session_id: session_id
1857 */
1858struct extscan_capabilities_params {
1859 uint32_t request_id;
1860 uint8_t session_id;
1861};
1862
1863/**
1864 * struct extscan_capabilities_reset_params - ext scan capablities reset parameter
1865 * @request_id: request_id
1866 * @session_id: session_id
1867 */
1868struct extscan_capabilities_reset_params {
1869 uint32_t request_id;
1870 uint8_t session_id;
1871};
1872
1873/**
1874 * struct extscan_bssid_hotlist_reset_params - ext scan hotlist reset parameter
1875 * @request_id: request_id
1876 * @session_id: session_id
1877 */
1878struct extscan_bssid_hotlist_reset_params {
1879 uint32_t request_id;
1880 uint8_t session_id;
1881};
1882
1883/**
1884 * struct extscan_stop_req_params - ext scan stop parameter
1885 * @request_id: request_id
1886 * @session_id: session_id
1887 */
1888struct extscan_stop_req_params {
1889 uint32_t request_id;
1890 uint8_t session_id;
1891};
1892
1893/**
1894 * struct ap_threshold_params - ap threshold parameter
1895 * @bssid: mac address
1896 * @low: low threshold
1897 * @high: high threshold
1898 */
1899struct ap_threshold_params {
Govind Singhd7468a52016-03-09 14:32:57 +05301900 struct qdf_mac_addr bssid;
Govind Singhae855362016-03-07 14:24:22 +05301901 int32_t low;
1902 int32_t high;
1903};
1904
1905/**
1906 * struct extscan_set_sig_changereq_params - ext scan channel parameter
1907 * @request_id: mac address
1908 * @session_id: low threshold
1909 * @rssi_sample_size: Number of samples for averaging RSSI
1910 * @lostap_sample_size: Number of missed samples to confirm AP loss
1911 * @min_breaching: Number of APs breaching threshold required for firmware
1912 * @num_ap: no of scanned ap
1913 * @ap: ap threshold parameter
1914 */
1915struct extscan_set_sig_changereq_params {
1916 uint32_t request_id;
1917 uint8_t session_id;
1918 uint32_t rssi_sample_size;
1919 uint32_t lostap_sample_size;
1920 uint32_t min_breaching;
1921 uint32_t num_ap;
1922 struct ap_threshold_params ap[WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS];
1923};
1924
1925/**
1926 * struct extscan_cached_result_params - ext scan cached parameter
1927 * @request_id: mac address
1928 * @session_id: low threshold
1929 * @flush: cached results flush
1930 */
1931struct extscan_cached_result_params {
1932 uint32_t request_id;
1933 uint8_t session_id;
1934 bool flush;
1935};
1936
Govind Singhae855362016-03-07 14:24:22 +05301937/* Set PNO */
1938#define WMI_PNO_MAX_NETW_CHANNELS 26
1939#define WMI_PNO_MAX_NETW_CHANNELS_EX 60
1940#define WMI_PNO_MAX_SUPP_NETWORKS 16
1941
1942/*
1943 * size based of dot11 declaration without extra IEs as we will not carry those
1944 * for PNO
1945 */
1946#define WMI_PNO_MAX_PB_REQ_SIZE 450
1947
1948#define WMI_PNO_24G_DEFAULT_CH 1
1949#define WMI_PNO_5G_DEFAULT_CH 36
1950
1951/**
1952 * enum pno_mode - pno mode types
1953 * @WMI_PNO_MODE_IMMEDIATE: immidiate mode
1954 * @WMI_PNO_MODE_ON_SUSPEND: suspend on mode
1955 * @WMI_PNO_MODE_ON_RESUME: resume on mode
1956 * @WMI_PNO_MODE_MAX: max range
1957 */
1958enum pno_mode {
1959 WMI_PNO_MODE_IMMEDIATE,
1960 WMI_PNO_MODE_ON_SUSPEND,
1961 WMI_PNO_MODE_ON_RESUME,
1962 WMI_PNO_MODE_MAX
1963};
1964
1965/**
1966 * struct pno_nw_type - pno nw type
1967 * @ssid: mac ssid
1968 * @authentication: authentication type
1969 * @encryption: encryption type
1970 * @bcastNetwType: broadcast nw type
1971 * @ucChannelCount: uc channel count
1972 * @aChannels: pno channel
1973 * @rssiThreshold: rssi threshold
1974 */
1975struct pno_nw_type {
1976 struct mac_ssid ssid;
1977 uint32_t authentication;
1978 uint32_t encryption;
1979 uint32_t bcastNetwType;
1980 uint8_t ucChannelCount;
1981 uint8_t aChannels[WMI_PNO_MAX_NETW_CHANNELS_EX];
1982 int32_t rssiThreshold;
1983};
1984
1985/**
1986 * struct pno_scan_req_params - PNO Scan request structure
1987 * @enable: flag to enable or disable
1988 * @modePNO: PNO Mode
1989 * @ucNetworksCount: Number of networks
1990 * @aNetworks: Preferred network list
1991 * @sessionId: Session identifier
1992 * @fast_scan_period: Fast Scan period
1993 * @slow_scan_period: Slow scan period
1994 * @fast_scan_max_cycles: Fast scan max cycles
1995 * @us24GProbeTemplateLen: 2.4G probe template length
1996 * @p24GProbeTemplate: 2.4G probe template
1997 * @us5GProbeTemplateLen: 5G probe template length
1998 * @p5GProbeTemplate: 5G probe template
Gupta, Kapil7b768002016-04-25 19:14:19 +05301999 * @pno_channel_prediction: PNO channel prediction feature status
2000 * @top_k_num_of_channels: top K number of channels are used for tanimoto
2001 * distance calculation.
2002 * @stationary_thresh: threshold value to determine that the STA is stationary.
2003 * @pnoscan_adaptive_dwell_mode: adaptive dwelltime mode for pno scan
2004 * @channel_prediction_full_scan: periodic timer upon which a full scan needs
2005 * to be triggered.
Govind Singhae855362016-03-07 14:24:22 +05302006 */
2007struct pno_scan_req_params {
2008 uint8_t enable;
2009 enum pno_mode modePNO;
2010 uint8_t ucNetworksCount;
2011 struct pno_nw_type aNetworks[WMI_PNO_MAX_SUPP_NETWORKS];
2012 uint8_t sessionId;
2013 uint32_t fast_scan_period;
2014 uint32_t slow_scan_period;
2015 uint8_t fast_scan_max_cycles;
2016 uint32_t active_min_time;
2017 uint32_t active_max_time;
2018 uint32_t passive_min_time;
2019 uint32_t passive_max_time;
2020 uint16_t us24GProbeTemplateLen;
2021 uint8_t p24GProbeTemplate[WMI_PNO_MAX_PB_REQ_SIZE];
2022 uint16_t us5GProbeTemplateLen;
2023 uint8_t p5GProbeTemplate[WMI_PNO_MAX_PB_REQ_SIZE];
2024#ifdef FEATURE_WLAN_SCAN_PNO
2025 bool pno_channel_prediction;
2026 uint8_t top_k_num_of_channels;
2027 uint8_t stationary_thresh;
Gupta, Kapil7b768002016-04-25 19:14:19 +05302028 enum wmi_dwelltime_adaptive_mode pnoscan_adaptive_dwell_mode;
Govind Singhae855362016-03-07 14:24:22 +05302029 uint32_t channel_prediction_full_scan;
2030#endif
2031};
2032
Govind Singhae855362016-03-07 14:24:22 +05302033
2034#define WMI_WLAN_EXTSCAN_MAX_CHANNELS 36
2035#define WMI_WLAN_EXTSCAN_MAX_BUCKETS 16
2036#define WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS 128
2037#define WMI_WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64
2038#define WMI_EXTSCAN_MAX_HOTLIST_SSIDS 8
2039
2040/**
2041 * struct wifi_scan_channelspec_params - wifi scan channel parameter
2042 * @channel: Frequency in MHz
2043 * @dwellTimeMs: dwell time
2044 * @flush: cached results flush
2045 * @passive: passive scan
2046 * @chnlClass: channel class
2047 */
2048struct wifi_scan_channelspec_params {
2049 uint32_t channel;
2050 uint32_t dwellTimeMs;
2051 bool passive;
2052 uint8_t chnlClass;
2053};
2054
2055/**
2056 * enum wmi_wifi_band - wifi band
2057 * @WMI_WIFI_BAND_UNSPECIFIED: unspecified band
2058 * @WMI_WIFI_BAND_BG: 2.4 GHz
2059 * @WMI_WIFI_BAND_A: 5 GHz without DFS
2060 * @WMI_WIFI_BAND_ABG: 2.4 GHz + 5 GHz; no DFS
2061 * @WMI_WIFI_BAND_A_DFS_ONLY: 5 GHz DFS only
2062 * @WMI_WIFI_BAND_A_WITH_DFS: 5 GHz with DFS
2063 * @WMI_WIFI_BAND_ABG_WITH_DFS: 2.4 GHz + 5 GHz with DFS
2064 * @WMI_WIFI_BAND_MAX: max range
2065 */
2066enum wmi_wifi_band {
2067 WMI_WIFI_BAND_UNSPECIFIED,
2068 WMI_WIFI_BAND_BG = 1,
2069 WMI_WIFI_BAND_A = 2,
2070 WMI_WIFI_BAND_ABG = 3,
2071 WMI_WIFI_BAND_A_DFS_ONLY = 4,
2072 /* 5 is reserved */
2073 WMI_WIFI_BAND_A_WITH_DFS = 6,
2074 WMI_WIFI_BAND_ABG_WITH_DFS = 7,
2075 /* Keep it last */
2076 WMI_WIFI_BAND_MAX
2077};
2078
2079/**
2080 * struct wifi_scan_bucket_params - wifi scan bucket spec
2081 * @bucket: bucket identifier
2082 * @band: wifi band
2083 * @period: Desired period, in millisecond; if this is too
2084 * low, the firmware should choose to generate results as fast as
2085 * it can instead of failing the command byte
2086 * for exponential backoff bucket this is the min_period
2087 * @reportEvents: 0 => normal reporting (reporting rssi history
2088 * only, when rssi history buffer is % full)
2089 * 1 => same as 0 + report a scan completion event after scanning
2090 * this bucket
2091 * 2 => same as 1 + forward scan results
2092 * (beacons/probe responses + IEs) in real time to HAL
2093 * @max_period: if max_period is non zero or different than period,
2094 * then this bucket is an exponential backoff bucket and
2095 * the scan period will grow exponentially as per formula:
2096 * actual_period(N) = period ^ (N/(step_count+1)) to a
2097 * maximum period of max_period
2098 * @exponent: for exponential back off bucket: multiplier:
2099 * new_period = old_period * exponent
2100 * @step_count: for exponential back off bucket, number of scans performed
2101 * at a given period and until the exponent is applied
2102 * @numChannels: channels to scan; these may include DFS channels
2103 * Note that a given channel may appear in multiple buckets
2104 * @min_dwell_time_active: per bucket minimum active dwell time
2105 * @max_dwell_time_active: per bucket maximum active dwell time
2106 * @min_dwell_time_passive: per bucket minimum passive dwell time
2107 * @max_dwell_time_passive: per bucket maximum passive dwell time
2108 * @channels: Channel list
2109 */
2110struct wifi_scan_bucket_params {
2111 uint8_t bucket;
2112 enum wmi_wifi_band band;
2113 uint32_t period;
2114 uint32_t reportEvents;
2115 uint32_t max_period;
2116 uint32_t exponent;
2117 uint32_t step_count;
2118 uint32_t numChannels;
2119 uint32_t min_dwell_time_active;
2120 uint32_t max_dwell_time_active;
2121 uint32_t min_dwell_time_passive;
2122 uint32_t max_dwell_time_passive;
2123 struct wifi_scan_channelspec_params channels[WMI_WLAN_EXTSCAN_MAX_CHANNELS];
2124};
2125
2126/**
2127 * struct wifi_scan_cmd_req_params - wifi scan command request params
2128 * @basePeriod: base timer period
2129 * @maxAPperScan: max ap per scan
2130 * @report_threshold_percent: report threshold
2131 * in %, when buffer is this much full, wake up host
2132 * @report_threshold_num_scans: report threshold number of scans
2133 * in number of scans, wake up host after these many scans
2134 * @requestId: request id
2135 * @sessionId: session id
2136 * @numBuckets: number of buckets
2137 * @min_dwell_time_active: per bucket minimum active dwell time
2138 * @max_dwell_time_active: per bucket maximum active dwell time
2139 * @min_dwell_time_passive: per bucket minimum passive dwell time
2140 * @max_dwell_time_passive: per bucket maximum passive dwell time
2141 * @configuration_flags: configuration flags
Gupta, Kapil7b768002016-04-25 19:14:19 +05302142 * @extscan_adaptive_dwell_mode: adaptive dwelltime mode for extscan
Govind Singhae855362016-03-07 14:24:22 +05302143 * @buckets: buckets array
2144 */
2145struct wifi_scan_cmd_req_params {
2146 uint32_t basePeriod;
2147 uint32_t maxAPperScan;
2148
2149 uint32_t report_threshold_percent;
2150 uint32_t report_threshold_num_scans;
2151
2152 uint32_t requestId;
2153 uint8_t sessionId;
2154 uint32_t numBuckets;
2155
2156 uint32_t min_dwell_time_active;
2157 uint32_t max_dwell_time_active;
2158 uint32_t min_dwell_time_passive;
2159 uint32_t max_dwell_time_passive;
2160 uint32_t configuration_flags;
Gupta, Kapil7b768002016-04-25 19:14:19 +05302161 enum wmi_dwelltime_adaptive_mode extscan_adaptive_dwell_mode;
Govind Singhae855362016-03-07 14:24:22 +05302162 struct wifi_scan_bucket_params buckets[WMI_WLAN_EXTSCAN_MAX_BUCKETS];
2163};
2164
Govind Singhae855362016-03-07 14:24:22 +05302165#define WMI_CFG_VALID_CHANNEL_LIST_LEN 100
Govind Singhc7cd2d62016-06-21 14:33:26 +05302166/* Occupied channel list remains static */
2167#define WMI_CHANNEL_LIST_STATIC 1
2168/* Occupied channel list can be learnt after init */
2169#define WMI_CHANNEL_LIST_DYNAMIC_INIT 2
2170/* Occupied channel list can be learnt after flush */
2171#define WMI_CHANNEL_LIST_DYNAMIC_FLUSH 3
2172/* Occupied channel list can be learnt after update */
2173#define WMI_CHANNEL_LIST_DYNAMIC_UPDATE 4
Govind Singhae855362016-03-07 14:24:22 +05302174
2175/**
2176 * struct plm_req_params - plm req parameter
2177 * @diag_token: Dialog token
2178 * @meas_token: measurement token
2179 * @num_bursts: total number of bursts
2180 * @burst_int: burst interval in seconds
2181 * @meas_duration:in TU's,STA goes off-ch
2182 * @burst_len: no of times the STA should cycle through PLM ch list
2183 * @desired_tx_pwr: desired tx power
2184 * @mac_addr: MC dest addr
2185 * @plm_num_ch: channel numbers
2186 * @plm_ch_list: channel list
2187 * @session_id: session id
2188 * @enable: enable/disable
2189 */
2190struct plm_req_params {
2191 uint16_t diag_token;
2192 uint16_t meas_token;
2193 uint16_t num_bursts;
2194 uint16_t burst_int;
2195 uint16_t meas_duration;
2196 /* no of times the STA should cycle through PLM ch list */
2197 uint8_t burst_len;
2198 int8_t desired_tx_pwr;
Govind Singhd7468a52016-03-09 14:32:57 +05302199 struct qdf_mac_addr mac_addr;
Govind Singhae855362016-03-07 14:24:22 +05302200 /* no of channels */
2201 uint8_t plm_num_ch;
2202 /* channel numbers */
2203 uint8_t plm_ch_list[WMI_CFG_VALID_CHANNEL_LIST_LEN];
2204 uint8_t session_id;
2205 bool enable;
2206};
Naveen Rawatd5ffe152016-04-14 23:42:46 -07002207
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05302208#define MAX_SSID_ALLOWED_LIST 4
2209#define MAX_BSSID_AVOID_LIST 16
2210#define MAX_BSSID_FAVORED 16
Govind Singhae855362016-03-07 14:24:22 +05302211
2212
2213/**
2214 * struct mac_ts_info_tfc - mac ts info parameters
2215 * @burstSizeDefn: burst size
2216 * @reserved: reserved
2217 * @ackPolicy: ack policy
2218 * @psb: psb
2219 * @aggregation: aggregation
2220 * @accessPolicy: access policy
2221 * @direction: direction
2222 * @tsid: direction
2223 * @trafficType: traffic type
2224 */
2225struct mac_ts_info_tfc {
2226#ifndef ANI_LITTLE_BIT_ENDIAN
2227 uint8_t burstSizeDefn:1;
2228 uint8_t reserved:7;
2229#else
2230 uint8_t reserved:7;
2231 uint8_t burstSizeDefn:1;
2232#endif
2233
2234#ifndef ANI_LITTLE_BIT_ENDIAN
2235 uint16_t ackPolicy:2;
2236 uint16_t userPrio:3;
2237 uint16_t psb:1;
2238 uint16_t aggregation:1;
2239 uint16_t accessPolicy:2;
2240 uint16_t direction:2;
2241 uint16_t tsid:4;
2242 uint16_t trafficType:1;
2243#else
2244 uint16_t trafficType:1;
2245 uint16_t tsid:4;
2246 uint16_t direction:2;
2247 uint16_t accessPolicy:2;
2248 uint16_t aggregation:1;
2249 uint16_t psb:1;
2250 uint16_t userPrio:3;
2251 uint16_t ackPolicy:2;
2252#endif
Govind Singhd7468a52016-03-09 14:32:57 +05302253} qdf_packed;
Govind Singhae855362016-03-07 14:24:22 +05302254
2255/**
2256 * struct mac_ts_info_sch - mac ts info schedule parameters
2257 * @rsvd: reserved
2258 * @schedule: schedule bit
2259 */
2260struct mac_ts_info_sch {
2261#ifndef ANI_LITTLE_BIT_ENDIAN
2262 uint8_t rsvd:7;
2263 uint8_t schedule:1;
2264#else
2265 uint8_t schedule:1;
2266 uint8_t rsvd:7;
2267#endif
Govind Singhd7468a52016-03-09 14:32:57 +05302268} qdf_packed;
Govind Singhae855362016-03-07 14:24:22 +05302269
2270/**
2271 * struct mac_ts_info_sch - mac ts info schedule parameters
2272 * @traffic: mac tfc parameter
2273 * @schedule: mac schedule parameters
2274 */
2275struct mac_ts_info {
2276 struct mac_ts_info_tfc traffic;
2277 struct mac_ts_info_sch schedule;
Govind Singhd7468a52016-03-09 14:32:57 +05302278} qdf_packed;
Govind Singhae855362016-03-07 14:24:22 +05302279
2280/**
2281 * struct mac_tspec_ie - mac ts spec
2282 * @type: type
2283 * @length: length
2284 * @tsinfo: tsinfo
2285 * @nomMsduSz: nomMsduSz
2286 * @maxMsduSz: maxMsduSz
2287 * @minSvcInterval: minSvcInterval
2288 * @maxSvcInterval: maxSvcInterval
2289 * @inactInterval: inactInterval
2290 * @suspendInterval: suspendInterval
2291 * @svcStartTime: svcStartTime
2292 * @minDataRate: minDataRate
2293 * @meanDataRate: meanDataRate
2294 * @peakDataRate: peakDataRate
2295 * @maxBurstSz: maxBurstSz
2296 * @delayBound: delayBound
2297 * @minPhyRate: minPhyRate
2298 * @surplusBw: surplusBw
2299 * @mediumTime: mediumTime
2300 */
2301struct mac_tspec_ie {
2302 uint8_t type;
2303 uint8_t length;
2304 struct mac_ts_info tsinfo;
2305 uint16_t nomMsduSz;
2306 uint16_t maxMsduSz;
2307 uint32_t minSvcInterval;
2308 uint32_t maxSvcInterval;
2309 uint32_t inactInterval;
2310 uint32_t suspendInterval;
2311 uint32_t svcStartTime;
2312 uint32_t minDataRate;
2313 uint32_t meanDataRate;
2314 uint32_t peakDataRate;
2315 uint32_t maxBurstSz;
2316 uint32_t delayBound;
2317 uint32_t minPhyRate;
2318 uint16_t surplusBw;
2319 uint16_t mediumTime;
Govind Singhd7468a52016-03-09 14:32:57 +05302320} qdf_packed;
Govind Singhae855362016-03-07 14:24:22 +05302321
2322/**
2323 * struct add_ts_param - ADDTS related parameters
2324 * @staIdx: station index
2325 * @tspecIdx: TSPEC handler uniquely identifying a TSPEC for a STA in a BSS
2326 * @tspec: tspec value
2327 * @status: CDF status
2328 * @sessionId: session id
Govind Singhd7468a52016-03-09 14:32:57 +05302329 * @tsm_interval: TSM interval period passed from UMAC to WMI
Govind Singhae855362016-03-07 14:24:22 +05302330 * @setRICparams: RIC parameters
2331 * @sme_session_id: sme session id
2332 */
2333struct add_ts_param {
2334 uint16_t staIdx;
2335 uint16_t tspecIdx;
2336 struct mac_tspec_ie tspec;
Govind Singhd7468a52016-03-09 14:32:57 +05302337 QDF_STATUS status;
Govind Singhae855362016-03-07 14:24:22 +05302338 uint8_t sessionId;
2339#ifdef FEATURE_WLAN_ESE
2340 uint16_t tsm_interval;
2341#endif /* FEATURE_WLAN_ESE */
2342#ifdef WLAN_FEATURE_ROAM_OFFLOAD
2343 uint8_t setRICparams;
2344#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
2345 uint8_t sme_session_id;
2346};
2347
2348/**
2349 * struct delts_req_info - DELTS request parameter
2350 * @tsinfo: ts info
2351 * @tspec: ts spec
2352 * @wmeTspecPresent: wme ts spec flag
2353 * @wsmTspecPresent: wsm ts spec flag
2354 * @lleTspecPresent: lle ts spec flag
2355 */
2356struct delts_req_info {
2357 struct mac_ts_info tsinfo;
2358 struct mac_tspec_ie tspec;
2359 uint8_t wmeTspecPresent:1;
2360 uint8_t wsmTspecPresent:1;
2361 uint8_t lleTspecPresent:1;
2362};
2363
2364/**
2365 * struct del_ts_params - DELTS related parameters
2366 * @staIdx: station index
2367 * @tspecIdx: TSPEC identifier uniquely identifying a TSPEC for a STA in a BSS
2368 * @bssId: BSSID
2369 * @sessionId: session id
2370 * @userPrio: user priority
2371 * @delTsInfo: DELTS info
2372 * @setRICparams: RIC parameters
2373 */
2374struct del_ts_params {
2375 uint16_t staIdx;
2376 uint16_t tspecIdx;
Govind Singh8675b862016-03-28 22:09:18 +05302377 uint8_t bssId[IEEE80211_ADDR_LEN];
Govind Singhae855362016-03-07 14:24:22 +05302378 uint8_t sessionId;
2379 uint8_t userPrio;
2380#ifdef WLAN_FEATURE_ROAM_OFFLOAD
2381 struct delts_req_info delTsInfo;
2382 uint8_t setRICparams;
2383#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
2384};
2385
2386/**
2387 * struct ll_stats_clear_params - ll stats clear parameter
2388 * @req_id: request id
2389 * @sta_id: sta id
2390 * @stats_clear_mask: stats clear mask
2391 * @stop_req: stop request
2392 */
2393struct ll_stats_clear_params {
2394 uint32_t req_id;
2395 uint8_t sta_id;
2396 uint32_t stats_clear_mask;
2397 uint8_t stop_req;
2398};
2399
2400/**
2401 * struct ll_stats_set_params - ll stats get parameter
2402 * @req_id: request id
2403 * @sta_id: sta id
2404 * @mpdu_size_threshold: mpdu sixe threshold
2405 * @aggressive_statistics_gathering: aggressive_statistics_gathering
2406 */
2407struct ll_stats_set_params {
2408 uint32_t req_id;
2409 uint8_t sta_id;
2410 uint32_t mpdu_size_threshold;
2411 uint32_t aggressive_statistics_gathering;
2412};
2413
2414/**
2415 * struct ll_stats_get_params - ll stats parameter
2416 * @req_id: request id
2417 * @sta_id: sta id
2418 * @param_id_mask: param is mask
2419 */
2420struct ll_stats_get_params {
2421 uint32_t req_id;
2422 uint8_t sta_id;
2423 uint32_t param_id_mask;
2424};
2425
2426/**
2427 * struct pe_stats_req - pe stats parameter
2428 * @msg_type: message type is same as the request type
2429 * @msg_len: length of the entire request
2430 * @sta_id: Per STA stats request must contain valid
2431 * @stats_mask: categories of stats requested
2432 * @session_id: wsm ts spec flag
2433 */
2434struct pe_stats_req {
2435 /* Common for all types are requests */
2436 uint16_t msg_type;
2437 uint16_t msg_len;
2438 uint32_t sta_id;
2439 /* categories of stats requested. look at ePEStatsMask */
2440 uint32_t stats_mask;
2441 uint8_t session_id;
2442};
2443
2444/**
2445 * struct link_status_params - link stats parameter
2446 * @msg_type: message type is same as the request type
2447 * @msg_len: length of the entire request
2448 * @link_status: wme ts spec flag
2449 * @session_id: wsm ts spec flag
2450 */
2451struct link_status_params {
2452 uint16_t msg_type;
2453 uint16_t msg_len;
2454 uint8_t link_status;
2455 uint8_t session_id;
2456};
2457
2458/**
2459 * struct dhcp_stop_ind_params - DHCP Stop indication message
2460 * @msgtype: message type is same as the request type
2461 * @msglen: length of the entire request
2462 * @device_mode: Mode of the device(ex:STA, AP)
2463 * @adapter_macaddr: MAC address of the adapter
2464 * @peer_macaddr: MAC address of the connected peer
2465 */
2466struct dhcp_stop_ind_params {
2467 uint16_t msgtype;
2468 uint16_t msglen;
2469 uint8_t device_mode;
Govind Singhd7468a52016-03-09 14:32:57 +05302470 struct qdf_mac_addr adapter_macaddr;
2471 struct qdf_mac_addr peer_macaddr;
Govind Singhae855362016-03-07 14:24:22 +05302472};
2473
2474/**
2475 * struct aggr_add_ts_param - ADDTS parameters
2476 * @staIdx: station index
2477 * @tspecIdx: TSPEC handler uniquely identifying a TSPEC for a STA in a BSS
2478 * @tspec: tspec value
2479 * @status: CDF status
2480 * @sessionId: session id
2481 */
2482struct aggr_add_ts_param {
2483 uint16_t staIdx;
2484 uint16_t tspecIdx;
2485 struct mac_tspec_ie tspec[WMI_QOS_NUM_AC_MAX];
Govind Singhd7468a52016-03-09 14:32:57 +05302486 QDF_STATUS status[WMI_QOS_NUM_AC_MAX];
Govind Singhae855362016-03-07 14:24:22 +05302487 uint8_t sessionId;
2488};
2489
2490#define WMI_MAX_FILTER_TEST_DATA_LEN 8
2491#define WMI_MAX_NUM_MULTICAST_ADDRESS 240
2492#define WMI_MAX_NUM_FILTERS 20
2493#define WMI_MAX_NUM_TESTS_PER_FILTER 10
2494
2495/**
2496 * enum packet_filter_type - packet filter type
2497 * @WMI_RCV_FILTER_TYPE_INVALID: invalid type
2498 * @WMI_RCV_FILTER_TYPE_FILTER_PKT: filter packet type
2499 * @WMI_RCV_FILTER_TYPE_BUFFER_PKT: buffer packet type
2500 * @WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE: max enum size
2501 */
2502enum packet_filter_type {
2503 WMI_RCV_FILTER_TYPE_INVALID,
2504 WMI_RCV_FILTER_TYPE_FILTER_PKT,
2505 WMI_RCV_FILTER_TYPE_BUFFER_PKT,
2506 WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE
2507};
2508
2509/**
2510 * enum packet_protocol_type - packet protocol type
2511 * @WMI_FILTER_HDR_TYPE_INVALID: invalid type
2512 * @WMI_FILTER_HDR_TYPE_MAC: mac type
2513 * @WMI_FILTER_HDR_TYPE_ARP: trp type
2514 * @WMI_FILTER_HDR_TYPE_IPV4: ipv4 type
2515 * @WMI_FILTER_HDR_TYPE_IPV6: ipv6 type
2516 * @WMI_FILTER_HDR_TYPE_UDP: udp type
2517 * @WMI_FILTER_HDR_TYPE_MAX: max type
2518 */
2519enum packet_protocol_type {
2520 WMI_FILTER_HDR_TYPE_INVALID,
2521 WMI_FILTER_HDR_TYPE_MAC,
2522 WMI_FILTER_HDR_TYPE_ARP,
2523 WMI_FILTER_HDR_TYPE_IPV4,
2524 WMI_FILTER_HDR_TYPE_IPV6,
2525 WMI_FILTER_HDR_TYPE_UDP,
2526 WMI_FILTER_HDR_TYPE_MAX
2527};
2528
2529/**
2530 * enum packet_filter_comp_type - packet filter comparison type
2531 * @WMI_FILTER_CMP_TYPE_INVALID: invalid type
2532 * @WMI_FILTER_CMP_TYPE_EQUAL: type equal
2533 * @WMI_FILTER_CMP_TYPE_MASK_EQUAL: mask equal
2534 * @WMI_FILTER_CMP_TYPE_NOT_EQUAL: type not equal
2535 * @WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL: mask not equal
2536 * @WMI_FILTER_CMP_TYPE_MAX: max type
2537 */
2538enum packet_filter_comp_type {
2539 WMI_FILTER_CMP_TYPE_INVALID,
2540 WMI_FILTER_CMP_TYPE_EQUAL,
2541 WMI_FILTER_CMP_TYPE_MASK_EQUAL,
2542 WMI_FILTER_CMP_TYPE_NOT_EQUAL,
2543 WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
2544 WMI_FILTER_CMP_TYPE_MAX
2545};
2546
2547/**
2548 * struct rcv_pkt_filter_params - recieve packet filter parameters
2549 * @protocolLayer - protocol layer
2550 * @cmpFlag - comparison flag
2551 * @dataLength - data length
2552 * @dataOffset - data offset
2553 * @reserved - resserved
2554 * @compareData - compare data
2555 * @dataMask - data mask
2556 */
2557struct rcv_pkt_filter_params {
2558 enum packet_protocol_type protocolLayer;
2559 enum packet_filter_comp_type cmpFlag;
2560 uint16_t dataLength;
2561 uint8_t dataOffset;
2562 uint8_t reserved;
2563 uint8_t compareData[WMI_MAX_FILTER_TEST_DATA_LEN];
2564 uint8_t dataMask[WMI_MAX_FILTER_TEST_DATA_LEN];
2565};
2566
2567/**
2568 * struct rcv_pkt_filter_config - recieve packet filter info
2569 * @filterId - filter id
2570 * @filterType - filter type
2571 * @numFieldParams - no of fields
2572 * @coalesceTime - reserved parameter
2573 * @self_macaddr - self mac address
2574 * @bssid - Bssid of the connected AP
2575 * @paramsData - data parameter
2576 */
2577struct rcv_pkt_filter_config {
2578 uint8_t filterId;
2579 enum packet_filter_type filterType;
2580 uint32_t numFieldParams;
2581 uint32_t coalesceTime;
Govind Singhd7468a52016-03-09 14:32:57 +05302582 struct qdf_mac_addr self_macaddr;
2583 struct qdf_mac_addr bssid;
Govind Singhae855362016-03-07 14:24:22 +05302584 struct rcv_pkt_filter_params paramsData[WMI_MAX_NUM_TESTS_PER_FILTER];
2585};
2586
2587/**
2588 * struct vdev_ie_info_param - IE info
2589 * @vdev_id - vdev for which the IE is being sent
2590 * @ie_id - ID of the IE
2591 * @length - length of the IE data
2592 * @data - IE data
2593 *
2594 * This structure is used to store the IE information.
2595 */
2596struct vdev_ie_info_param {
2597 uint32_t vdev_id;
2598 uint32_t ie_id;
2599 uint32_t length;
Selvaraj, Sridharce064292016-07-25 16:25:14 +05302600 uint32_t ie_source;
Naveen Rawat71268882016-08-03 16:41:33 -07002601 uint32_t band;
Govind Singhae855362016-03-07 14:24:22 +05302602 uint8_t *data;
2603};
2604
2605#define WMI_MAX_NUM_FW_SEGMENTS 4
2606
2607/**
2608 * struct fw_dump_seg_req_param - individual segment details
2609 * @seg_id - segment id.
2610 * @seg_start_addr_lo - lower address of the segment.
2611 * @seg_start_addr_hi - higher address of the segment.
2612 * @seg_length - length of the segment.
2613 * @dst_addr_lo - lower address of the destination buffer.
2614 * @dst_addr_hi - higher address of the destination buffer.
2615 *
2616 * This structure carries the information to firmware about the
2617 * individual segments. This structure is part of firmware memory
2618 * dump request.
2619 */
2620struct fw_dump_seg_req_param {
2621 uint8_t seg_id;
2622 uint32_t seg_start_addr_lo;
2623 uint32_t seg_start_addr_hi;
2624 uint32_t seg_length;
2625 uint32_t dst_addr_lo;
2626 uint32_t dst_addr_hi;
2627};
2628
2629/**
2630 * struct fw_dump_req_param - firmware memory dump request details.
2631 * @request_id - request id.
2632 * @num_seg - requested number of segments.
2633 * @fw_dump_seg_req - individual segment information.
2634 *
2635 * This structure carries information about the firmware
2636 * memory dump request.
2637 */
2638struct fw_dump_req_param {
2639 uint32_t request_id;
2640 uint32_t num_seg;
2641 struct fw_dump_seg_req_param segment[WMI_MAX_NUM_FW_SEGMENTS];
2642};
2643
2644#define WMI_TDLS_MAX_SUPP_CHANNELS 128
2645#define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
2646#define WMI_2_4_GHZ_MAX_FREQ 3000
2647
2648/**
2649 * struct tdls_update_ch_params - channel parameters
2650 * @chanId: ID of the channel
2651 * @pwr: power level
2652 * @dfsSet: is dfs supported or not
2653 * @half_rate: is the channel operating at 10MHz
2654 * @quarter_rate: is the channel operating at 5MHz
2655 */
2656struct tdls_update_ch_params {
2657 uint8_t chanId;
2658 uint8_t pwr;
2659 bool dfsSet;
2660 bool half_rate;
2661 bool quarter_rate;
2662};
2663
2664/**
2665 * struct tdls_peer_cap_params - TDLS peer capablities parameters
2666 * @isPeerResponder: is peer responder or not
2667 * @peerUapsdQueue: peer uapsd queue
2668 * @peerMaxSp: peer max SP value
2669 * @peerBuffStaSupport: peer buffer sta supported or not
2670 * @peerOffChanSupport: peer offchannel support
2671 * @peerCurrOperClass: peer current operating class
2672 * @selfCurrOperClass: self current operating class
2673 * @peerChanLen: peer channel length
2674 * @peerChan: peer channel list
2675 * @peerOperClassLen: peer operating class length
2676 * @peerOperClass: peer operating class
2677 * @prefOffChanNum: peer offchannel number
2678 * @prefOffChanBandwidth: peer offchannel bandwidth
2679 * @opClassForPrefOffChan: operating class for offchannel
2680 */
2681struct tdls_peer_cap_params {
2682 uint8_t isPeerResponder;
2683 uint8_t peerUapsdQueue;
2684 uint8_t peerMaxSp;
2685 uint8_t peerBuffStaSupport;
2686 uint8_t peerOffChanSupport;
2687 uint8_t peerCurrOperClass;
2688 uint8_t selfCurrOperClass;
2689 uint8_t peerChanLen;
2690 struct tdls_update_ch_params peerChan[WMI_TDLS_MAX_SUPP_CHANNELS];
2691 uint8_t peerOperClassLen;
2692 uint8_t peerOperClass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
2693 uint8_t prefOffChanNum;
2694 uint8_t prefOffChanBandwidth;
2695 uint8_t opClassForPrefOffChan;
2696};
2697
2698/**
2699 * struct tdls_peer_state_params - TDLS peer state parameters
2700 * @vdevId: vdev id
2701 * @peerMacAddr: peer mac address
2702 * @peerCap: peer capabality
2703 */
2704struct tdls_peer_state_params {
2705 uint32_t vdevId;
Govind Singh8675b862016-03-28 22:09:18 +05302706 uint8_t peerMacAddr[IEEE80211_ADDR_LEN];
Govind Singhae855362016-03-07 14:24:22 +05302707 uint32_t peerState;
2708 struct tdls_peer_cap_params peerCap;
2709};
2710
2711/**
2712 * struct wmi_tdls_params - TDLS parameters
2713 * @vdev_id: vdev id
2714 * @tdls_state: TDLS state
2715 * @notification_interval_ms: notification inerval
2716 * @tx_discovery_threshold: tx discovery threshold
2717 * @tx_teardown_threshold: tx teardown threashold
2718 * @rssi_teardown_threshold: RSSI teardown threshold
2719 * @rssi_delta: RSSI delta
2720 * @tdls_options: TDLS options
2721 * @peer_traffic_ind_window: raffic indication window
2722 * @peer_traffic_response_timeout: traffic response timeout
2723 * @puapsd_mask: uapsd mask
2724 * @puapsd_inactivity_time: uapsd inactivity time
2725 * @puapsd_rx_frame_threshold: uapsd rx frame threshold
2726 * @teardown_notification_ms: tdls teardown notification interval
2727 * @tdls_peer_kickout_threshold: tdls packet threshold for
2728 * peer kickout operation
2729 */
2730struct wmi_tdls_params {
2731 uint32_t vdev_id;
2732 uint32_t tdls_state;
2733 uint32_t notification_interval_ms;
2734 uint32_t tx_discovery_threshold;
2735 uint32_t tx_teardown_threshold;
2736 int32_t rssi_teardown_threshold;
2737 int32_t rssi_delta;
2738 uint32_t tdls_options;
2739 uint32_t peer_traffic_ind_window;
2740 uint32_t peer_traffic_response_timeout;
2741 uint32_t puapsd_mask;
2742 uint32_t puapsd_inactivity_time;
2743 uint32_t puapsd_rx_frame_threshold;
2744 uint32_t teardown_notification_ms;
2745 uint32_t tdls_peer_kickout_threshold;
2746};
2747
2748/**
2749 * struct tdls_chan_switch_params - channel switch parameter structure
2750 * @vdev_id: vdev ID
2751 * @peer_mac_addr: Peer mac address
2752 * @tdls_off_ch_bw_offset: Target off-channel bandwitdh offset
2753 * @tdls_off_ch: Target Off Channel
2754 * @oper_class: Operating class for target channel
2755 * @is_responder: Responder or initiator
2756 */
2757struct tdls_channel_switch_params {
2758 uint32_t vdev_id;
Govind Singh8675b862016-03-28 22:09:18 +05302759 uint8_t peer_mac_addr[IEEE80211_ADDR_LEN];
Govind Singhae855362016-03-07 14:24:22 +05302760 uint16_t tdls_off_ch_bw_offset;
2761 uint8_t tdls_off_ch;
2762 uint8_t tdls_sw_mode;
2763 uint8_t oper_class;
2764 uint8_t is_responder;
2765};
2766
2767/**
2768 * struct dhcp_offload_info_params - dhcp offload parameters
2769 * @vdev_id: request data length
2770 * @dhcpSrvOffloadEnabled: dhcp offload enabled
2771 * @dhcpClientNum: dhcp client no
2772 * @dhcpSrvIP: dhcp server ip
2773 */
2774struct dhcp_offload_info_params {
2775 uint32_t vdev_id;
2776 uint32_t dhcpSrvOffloadEnabled;
2777 uint32_t dhcpClientNum;
2778 uint32_t dhcpSrvIP;
2779};
2780
2781/**
2782 * struct nan_req_params - NAN request params
2783 * @request_data_len: request data length
2784 * @request_data: request data
2785 */
2786struct nan_req_params {
2787 uint16_t request_data_len;
2788 uint8_t request_data[];
2789};
2790
2791
2792/**
2793 * struct app_type2_params - app type2parameter
2794 * @vdev_id: vdev id
2795 * @rc4_key: rc4 key
2796 * @rc4_key_len: rc4 key length
2797 * @ip_id: NC id
2798 * @ip_device_ip: NC IP addres
2799 * @ip_server_ip: Push server IP address
2800 * @tcp_src_port: NC TCP port
2801 * @tcp_dst_port: Push server TCP port
2802 * @tcp_seq: tcp sequence
2803 * @tcp_ack_seq: tcp ack sequence
2804 * @keepalive_init: Initial ping interval
2805 * @keepalive_min: Minimum ping interval
2806 * @keepalive_max: Maximum ping interval
2807 * @keepalive_inc: Increment of ping interval
2808 * @gateway_mac: gateway mac address
2809 * @tcp_tx_timeout_val: tcp tx timeout value
2810 * @tcp_rx_timeout_val: tcp rx timeout value
2811 */
2812struct app_type2_params {
2813 uint8_t vdev_id;
2814 uint8_t rc4_key[16];
2815 uint32_t rc4_key_len;
2816 /** ip header parameter */
2817 uint32_t ip_id;
2818 uint32_t ip_device_ip;
2819 uint32_t ip_server_ip;
2820 /** tcp header parameter */
2821 uint16_t tcp_src_port;
2822 uint16_t tcp_dst_port;
2823 uint32_t tcp_seq;
2824 uint32_t tcp_ack_seq;
2825 uint32_t keepalive_init;
2826 uint32_t keepalive_min;
2827 uint32_t keepalive_max;
2828 uint32_t keepalive_inc;
Govind Singhd7468a52016-03-09 14:32:57 +05302829 struct qdf_mac_addr gateway_mac;
Govind Singhae855362016-03-07 14:24:22 +05302830 uint32_t tcp_tx_timeout_val;
2831 uint32_t tcp_rx_timeout_val;
2832};
2833
2834/**
2835 * struct app_type1_params - app type1 parameter
2836 * @vdev_id: vdev id
2837 * @wakee_mac_addr: mac address
2838 * @identification_id: identification id
2839 * @password: password
2840 * @id_length: id length
2841 * @pass_length: password length
2842 */
2843struct app_type1_params {
2844 uint8_t vdev_id;
Govind Singhd7468a52016-03-09 14:32:57 +05302845 struct qdf_mac_addr wakee_mac_addr;
Govind Singhae855362016-03-07 14:24:22 +05302846 uint8_t identification_id[8];
2847 uint8_t password[16];
2848 uint32_t id_length;
2849 uint32_t pass_length;
2850};
2851
2852/**
2853 * enum wmi_ext_wow_type - wow type
2854 * @WMI_EXT_WOW_TYPE_APP_TYPE1: only enable wakeup for app type1
2855 * @WMI_EXT_WOW_TYPE_APP_TYPE2: only enable wakeup for app type2
2856 * @WMI_EXT_WOW_TYPE_APP_TYPE1_2: enable wakeup for app type1&2
2857 */
2858enum wmi_ext_wow_type {
2859 WMI_EXT_WOW_TYPE_APP_TYPE1,
2860 WMI_EXT_WOW_TYPE_APP_TYPE2,
2861 WMI_EXT_WOW_TYPE_APP_TYPE1_2,
2862};
2863
2864/**
2865 * struct ext_wow_params - ext wow parameters
2866 * @vdev_id: vdev id
2867 * @type: wow type
2868 * @wakeup_pin_num: wake up gpio no
2869 */
2870struct ext_wow_params {
2871 uint8_t vdev_id;
2872 enum wmi_ext_wow_type type;
2873 uint32_t wakeup_pin_num;
2874};
2875
2876/**
2877 * struct stats_ext_params - ext stats request
2878 * @vdev_id: vdev id
2879 * @request_data_len: request data length
2880 * @request_data: request data
2881 */
2882struct stats_ext_params {
2883 uint32_t vdev_id;
2884 uint32_t request_data_len;
2885 uint8_t request_data[];
2886};
2887
2888#define WMI_PERIODIC_TX_PTRN_MAX_SIZE 1536
2889/**
2890 * struct periodic_tx_pattern - periodic tx pattern
2891 * @mac_address: MAC Address for the adapter
2892 * @ucPtrnId: Pattern ID
2893 * @ucPtrnSize: Pattern size
2894 * @usPtrnIntervalMs: in ms
2895 * @ucPattern: Pattern buffer
2896 */
2897struct periodic_tx_pattern {
Govind Singhd7468a52016-03-09 14:32:57 +05302898 struct qdf_mac_addr mac_address;
Govind Singhae855362016-03-07 14:24:22 +05302899 uint8_t ucPtrnId;
2900 uint16_t ucPtrnSize;
2901 uint32_t usPtrnIntervalMs;
2902 uint8_t ucPattern[WMI_PERIODIC_TX_PTRN_MAX_SIZE];
2903};
2904
2905#define WMI_GTK_OFFLOAD_KEK_BYTES 16
2906#define WMI_GTK_OFFLOAD_KCK_BYTES 16
Siddarth Poddard9221542016-04-01 17:45:06 +05302907#define WMI_GTK_OFFLOAD_ENABLE 0
2908#define WMI_GTK_OFFLOAD_DISABLE 1
Govind Singhae855362016-03-07 14:24:22 +05302909
2910/**
2911 * struct gtk_offload_params - gtk offload parameters
2912 * @ulFlags: optional flags
2913 * @aKCK: Key confirmation key
2914 * @aKEK: key encryption key
2915 * @ullKeyReplayCounter: replay counter
2916 * @bssid: bss id
2917 */
2918struct gtk_offload_params {
2919 uint32_t ulFlags;
2920 uint8_t aKCK[WMI_GTK_OFFLOAD_KCK_BYTES];
2921 uint8_t aKEK[WMI_GTK_OFFLOAD_KEK_BYTES];
2922 uint64_t ullKeyReplayCounter;
Govind Singhd7468a52016-03-09 14:32:57 +05302923 struct qdf_mac_addr bssid;
Govind Singhae855362016-03-07 14:24:22 +05302924};
2925
2926/**
2927 * struct flashing_req_params - led flashing parameter
2928 * @reqId: request id
2929 * @pattern_id: pattern identifier. 0: disconnected 1: connected
2930 * @led_x0: led flashing parameter0
2931 * @led_x1: led flashing parameter1
2932 */
2933struct flashing_req_params {
2934 uint32_t req_id;
2935 uint32_t pattern_id;
2936 uint32_t led_x0;
2937 uint32_t led_x1;
2938};
2939
Govind Singh89727882016-04-15 13:58:27 +05302940#define MAX_MEM_CHUNKS 32
2941/**
2942 * struct wmi_host_mem_chunk - host memory chunk structure
2943 * @vaddr: Pointer to virtual address
2944 * @paddr: Physical address
2945 * @memctx: qdf memory context for mapped address.
2946 * @len: length of chunk
2947 * @req_id: request id from target
2948 */
Govind Singhae855362016-03-07 14:24:22 +05302949struct wmi_host_mem_chunk {
2950 uint32_t *vaddr;
2951 uint32_t paddr;
Govind Singhd7468a52016-03-09 14:32:57 +05302952 qdf_dma_mem_context(memctx);
Govind Singhae855362016-03-07 14:24:22 +05302953 uint32_t len;
2954 uint32_t req_id;
2955};
2956
Govind Singh89727882016-04-15 13:58:27 +05302957/**
2958 * struct target_resource_config - Resource config given to target
2959 * This structure is union of wmi_resource_config defined
2960 * by both TLV and non-TLV target.
2961 */
Govind Singhae855362016-03-07 14:24:22 +05302962struct target_resource_config {
2963 uint32_t num_vdevs;
2964 uint32_t num_peers;
2965 uint32_t num_active_peers;
2966 uint32_t num_offload_peers;
2967 uint32_t num_offload_reorder_buffs;
2968 uint32_t num_peer_keys;
2969 uint32_t num_tids;
2970 uint32_t ast_skid_limit;
2971 uint32_t tx_chain_mask;
2972 uint32_t rx_chain_mask;
2973 uint32_t rx_timeout_pri[4];
2974 uint32_t rx_decap_mode;
2975 uint32_t scan_max_pending_req;
2976 uint32_t bmiss_offload_max_vdev;
2977 uint32_t roam_offload_max_vdev;
2978 uint32_t roam_offload_max_ap_profiles;
2979 uint32_t num_mcast_groups;
2980 uint32_t num_mcast_table_elems;
2981 uint32_t mcast2ucast_mode;
2982 uint32_t tx_dbg_log_size;
2983 uint32_t num_wds_entries;
2984 uint32_t dma_burst_size;
2985 uint32_t mac_aggr_delim;
2986 uint32_t rx_skip_defrag_timeout_dup_detection_check;
2987 uint32_t vow_config;
2988 uint32_t gtk_offload_max_vdev;
2989 uint32_t num_msdu_desc; /* Number of msdu desc */
2990 uint32_t max_frag_entries;
2991 /* End common */
2992
2993 /* Added in MCL */
2994 uint32_t num_tdls_vdevs;
2995 uint32_t num_tdls_conn_table_entries;
2996 uint32_t beacon_tx_offload_max_vdev;
2997 uint32_t num_multicast_filter_entries;
2998 uint32_t num_wow_filters;
2999 uint32_t num_keep_alive_pattern;
3000 uint32_t keep_alive_pattern_size;
3001 uint32_t max_tdls_concurrent_sleep_sta;
3002 uint32_t max_tdls_concurrent_buffer_sta;
3003 uint32_t wmi_send_separate;
3004 uint32_t num_ocb_vdevs;
3005 uint32_t num_ocb_channels;
3006 uint32_t num_ocb_schedules;
3007};
3008
3009/**
3010 * struct wmi_wifi_start_log - Structure to store the params sent to start/
3011 * stop logging
3012 * @name: Attribute which indicates the type of logging like per packet
3013 * statistics, connectivity etc.
3014 * @verbose_level: Verbose level which can be 0,1,2,3
3015 * @flag: Flag field for future use
3016 */
3017struct wmi_wifi_start_log {
3018 uint32_t ring_id;
3019 uint32_t verbose_level;
3020 uint32_t flag;
3021};
3022
3023/**
3024 * struct wmi_pcl_list - Format of PCL
3025 * @pcl_list: List of preferred channels
Manishekar Chandrasekaranb8c59382016-04-21 19:16:32 +05303026 * @weight_list: Weights of the PCL
Govind Singhae855362016-03-07 14:24:22 +05303027 * @pcl_len: Number of channels in the PCL
3028 */
3029struct wmi_pcl_list {
3030 uint8_t pcl_list[128];
Manishekar Chandrasekaranb8c59382016-04-21 19:16:32 +05303031 uint8_t weight_list[128];
Govind Singhae855362016-03-07 14:24:22 +05303032 uint32_t pcl_len;
3033};
3034
3035/**
Manishekar Chandrasekaranb8c59382016-04-21 19:16:32 +05303036 * struct wmi_pcl_chan_weights - Params to get the valid weighed list
3037 * @pcl_list: Preferred channel list already sorted in the order of preference
3038 * @pcl_len: Length of the PCL
3039 * @saved_chan_list: Valid channel list updated as part of
3040 * WMA_UPDATE_CHAN_LIST_REQ
3041 * @saved_num_chan: Length of the valid channel list
3042 * @weighed_valid_list: Weights of the valid channel list. This will have one
3043 * to one mapping with valid_chan_list. FW expects channel order and size to be
3044 * as per the list provided in WMI_SCAN_CHAN_LIST_CMDID.
3045 * @weight_list: Weights assigned by policy manager
3046 */
3047struct wmi_pcl_chan_weights {
3048 uint8_t pcl_list[MAX_NUM_CHAN];
3049 uint32_t pcl_len;
3050 uint8_t saved_chan_list[MAX_NUM_CHAN];
3051 uint32_t saved_num_chan;
3052 uint8_t weighed_valid_list[MAX_NUM_CHAN];
3053 uint8_t weight_list[MAX_NUM_CHAN];
3054};
3055
3056/**
Govind Singhae855362016-03-07 14:24:22 +05303057 * struct wmi_hw_mode_params - HW mode params
3058 * @mac0_tx_ss: MAC0 Tx spatial stream
3059 * @mac0_rx_ss: MAC0 Rx spatial stream
3060 * @mac1_tx_ss: MAC1 Tx spatial stream
3061 * @mac1_rx_ss: MAC1 Rx spatial stream
3062 * @mac0_bw: MAC0 bandwidth
3063 * @mac1_bw: MAC1 bandwidth
3064 * @dbs_cap: DBS capabality
3065 * @agile_dfs_cap: Agile DFS capabality
3066 */
3067struct wmi_hw_mode_params {
3068 uint8_t mac0_tx_ss;
3069 uint8_t mac0_rx_ss;
3070 uint8_t mac1_tx_ss;
3071 uint8_t mac1_rx_ss;
3072 uint8_t mac0_bw;
3073 uint8_t mac1_bw;
3074 uint8_t dbs_cap;
3075 uint8_t agile_dfs_cap;
3076};
3077
3078/**
3079 * struct wmi_dual_mac_config - Dual MAC configuration
3080 * @scan_config: Scan configuration
3081 * @fw_mode_config: FW mode configuration
3082 * @set_dual_mac_cb: Callback function to be executed on response to the command
3083 */
3084struct wmi_dual_mac_config {
3085 uint32_t scan_config;
3086 uint32_t fw_mode_config;
3087 void *set_dual_mac_cb;
3088};
3089
3090#ifdef WLAN_NS_OFFLOAD
3091/**
3092 * struct ns_offload_req_params - ns offload request paramter
3093 * @srcIPv6Addr: src ipv6 address
3094 * @selfIPv6Addr: self ipv6 address
3095 * @targetIPv6Addr: target ipv6 address
3096 * @self_macaddr: self mac address
3097 * @srcIPv6AddrValid: src ipv6 address valid flag
3098 * @targetIPv6AddrValid: target ipv6 address valid flag
Sravan Kumar Kairam33b95492016-07-26 17:59:59 +05303099 * @target_ipv6_addr_ac_type: target ipv6 address type
Govind Singhae855362016-03-07 14:24:22 +05303100 * @slotIdx: slot index
3101 */
3102struct ns_offload_req_params {
3103 uint8_t srcIPv6Addr[WMI_MAC_IPV6_ADDR_LEN];
3104 uint8_t selfIPv6Addr[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][WMI_MAC_IPV6_ADDR_LEN];
3105 uint8_t targetIPv6Addr[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][WMI_MAC_IPV6_ADDR_LEN];
Govind Singhd7468a52016-03-09 14:32:57 +05303106 struct qdf_mac_addr self_macaddr;
Govind Singhae855362016-03-07 14:24:22 +05303107 uint8_t srcIPv6AddrValid;
3108 uint8_t targetIPv6AddrValid[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
Sravan Kumar Kairam33b95492016-07-26 17:59:59 +05303109 uint8_t target_ipv6_addr_ac_type[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
Govind Singhae855362016-03-07 14:24:22 +05303110 uint8_t slotIdx;
3111};
3112#endif /* WLAN_NS_OFFLOAD */
3113
3114/**
3115 * struct host_offload_req_param - arp offload parameter
3116 * @offloadType: offload type
3117 * @enableOrDisable: enable or disable
3118 * @num_ns_offload_count: offload count
3119 */
3120struct host_offload_req_param {
3121 uint8_t offloadType;
3122 uint8_t enableOrDisable;
3123 uint32_t num_ns_offload_count;
3124 union {
3125 uint8_t hostIpv4Addr[WMI_IPV4_ADDR_LEN];
3126 uint8_t hostIpv6Addr[WMI_MAC_IPV6_ADDR_LEN];
3127 } params;
3128#ifdef WLAN_NS_OFFLOAD
3129 struct ns_offload_req_params nsOffloadInfo;
3130#endif /* WLAN_NS_OFFLOAD */
Govind Singhd7468a52016-03-09 14:32:57 +05303131 struct qdf_mac_addr bssid;
Govind Singhae855362016-03-07 14:24:22 +05303132};
3133
3134/**
3135 * struct ssid_hotlist_param - param for SSID Hotlist
3136 * @ssid: SSID which is being hotlisted
3137 * @band: Band in which the given SSID should be scanned
3138 * @rssi_low: Low bound on RSSI
3139 * @rssi_high: High bound on RSSI
3140 */
3141struct ssid_hotlist_param {
3142 struct mac_ssid ssid;
3143 uint8_t band;
3144 int32_t rssi_low;
3145 int32_t rssi_high;
3146};
3147
3148/**
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05303149 * struct roam_scan_filter_params - Structure holding roaming scan
3150 * parameters
3151 * @len: length
3152 * @op_bitmap: bitmap to determine reason of roaming
3153 * @session_id: vdev id
3154 * @num_bssid_black_list: The number of BSSID's that we should
3155 * avoid connecting to. It is like a
3156 * blacklist of BSSID's.
3157 * @num_ssid_white_list: The number of SSID profiles that are
3158 * in the Whitelist. When roaming, we
3159 * consider the BSSID's with this SSID
3160 * also for roaming apart from the connected one's
3161 * @num_bssid_preferred_list: Number of BSSID's which have a preference over
3162 * others
3163 * @bssid_avoid_list: Blacklist SSID's
3164 * @ssid_allowed_list: Whitelist SSID's
3165 * @bssid_favored: Favorable BSSID's
3166 * @bssid_favored_factor: RSSI to be added to this BSSID to prefer it
3167 *
3168 * This structure holds all the key parameters related to
3169 * initial connection and roaming connections.
3170 */
3171
3172struct roam_scan_filter_params {
3173 uint32_t len;
3174 uint32_t op_bitmap;
3175 uint8_t session_id;
3176 uint32_t num_bssid_black_list;
3177 uint32_t num_ssid_white_list;
3178 uint32_t num_bssid_preferred_list;
3179 struct qdf_mac_addr bssid_avoid_list[MAX_BSSID_AVOID_LIST];
3180 struct mac_ssid ssid_allowed_list[MAX_SSID_ALLOWED_LIST];
3181 struct qdf_mac_addr bssid_favored[MAX_BSSID_FAVORED];
3182 uint8_t bssid_favored_factor[MAX_BSSID_FAVORED];
3183};
3184
3185/**
Govind Singhae855362016-03-07 14:24:22 +05303186 * struct ssid_hotlist_request_params - set SSID hotlist request struct
3187 * @request_id: ID of the request
3188 * @session_id: ID of the session
3189 * @lost_ssid_sample_size: Number of consecutive scans in which the SSID
3190 * must not be seen in order to consider the SSID "lost"
3191 * @ssid_count: Number of valid entries in the @ssids array
3192 * @ssids: Array that defines the SSIDs that are in the hotlist
3193 */
3194struct ssid_hotlist_request_params {
3195 uint32_t request_id;
3196 uint8_t session_id;
3197 uint32_t lost_ssid_sample_size;
3198 uint32_t ssid_count;
3199 struct ssid_hotlist_param ssids[WMI_EXTSCAN_MAX_HOTLIST_SSIDS];
3200};
3201
3202/**
3203 * struct wmi_unit_test_cmd - unit test command parameters
3204 * @vdev_id: vdev id
3205 * @module_id: module id
3206 * @num_args: number of arguments
3207 * @args: arguments
3208 */
3209struct wmi_unit_test_cmd {
3210 uint32_t vdev_id;
Govind Singh89727882016-04-15 13:58:27 +05303211 uint32_t module_id;
Govind Singhae855362016-03-07 14:24:22 +05303212 uint32_t num_args;
3213 uint32_t args[WMI_MAX_NUM_ARGS];
3214};
3215
3216/**
3217 * struct wmi_roam_invoke_cmd - roam invoke command
3218 * @vdev_id: vdev id
3219 * @bssid: mac address
3220 * @channel: channel
3221 */
3222struct wmi_roam_invoke_cmd {
3223 uint32_t vdev_id;
3224 uint8_t bssid[IEEE80211_ADDR_LEN];
3225 uint32_t channel;
3226};
3227
3228/**
3229 * struct ext_scan_setbssi_hotlist_params - set hotlist request
3230 * @requestId: request identifier
3231 * @sessionId: session identifier
3232 * @lost_ap_sample_size: number of samples to confirm AP loss
3233 * @numAp: Number of hotlist APs
3234 * @ap: hotlist APs
3235 */
3236struct ext_scan_setbssi_hotlist_params {
3237 uint32_t requestId;
3238 uint8_t sessionId;
3239
3240 uint32_t lost_ap_sample_size;
3241 uint32_t numAp;
3242 struct ap_threshold_params ap[WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS];
3243};
Govind Singh89727882016-04-15 13:58:27 +05303244
3245/**
3246 * struct TARGET_HAL_REG_CAPABILITIES - This is replication of REG table
3247 * structure defined by target. This is added here to remove dependency
3248 * on FW headers so that host can be agnostic to different defintions in
3249 * both the targets.
3250 */
3251typedef struct {
3252 uint32_t eeprom_rd; /* regdomain value specified in EEPROM */
3253 uint32_t eeprom_rd_ext; /* regdomain */
3254 uint32_t regcap1; /* CAP1 capabilities bit map */
3255 uint32_t regcap2; /* REGDMN EEPROM CAP */
3256 uint32_t wireless_modes; /* REGDMN MODE */
3257 uint32_t low_2ghz_chan;
3258 uint32_t high_2ghz_chan;
3259 uint32_t low_5ghz_chan;
3260 uint32_t high_5ghz_chan;
3261} TARGET_HAL_REG_CAPABILITIES;
3262
3263/**
3264 * struct host_mem_req - Host memory request paramseters request by target
3265 * @req_id: Request id to identify the request.
3266 * @unit_size: Size of single unit requested.
3267 * @num_unit_info: Memory chunk info
3268 * @num_units: number of units requested.
3269 */
3270typedef struct {
3271 uint32_t req_id;
3272 uint32_t unit_size;
3273 uint32_t num_unit_info;
3274 uint32_t num_units;
3275} host_mem_req;
3276
3277#define WMI_HOST_DSCP_MAP_MAX (64)
3278
3279/**
3280 * struct wmi_host_ext_resource_config - Extended resource config
3281 * @host_platform_config: Host plaform configuration.
3282 * @fw_featuew_bitmap: FW feature requested bitmap.
3283 */
3284typedef struct {
3285 uint32_t host_platform_config;
3286
3287#define WMI_HOST_FW_FEATURE_LTEU_SUPPORT 0x0001
3288#define WMI_HOST_FW_FEATURE_COEX_GPIO_SUPPORT 0x0002
3289#define WMI_HOST_FW_FEATURE_AUX_RADIO_SPECTRAL_INTF 0x0004
3290#define WMI_HOST_FW_FEATURE_AUX_RADIO_CHAN_LOAD_INTF 0x0008
3291#define WMI_HOST_FW_FEATURE_BSS_CHANNEL_INFO_64 0x0010
3292#define WMI_HOST_FW_FEATURE_PEER_STATS 0x0020
3293#define WMI_HOST_FW_FEATURE_VDEV_STATS 0x0040
3294 /**
3295 * @brief fw_feature_bitmask - Enable/Disable features in FW
3296 * @details
3297 * The bits in fw_feature_bitmask are used as shown by the masks below:
3298 * 0x0001 - LTEU Config enable/disable
3299 * 0x0002 - COEX GPIO Config enable/disable
3300 * 0x0004 - Aux Radio enhancement for spectral scan enable/disable
3301 * 0x0008 - Aux Radio enhancement for chan load scan enable/disable
3302 * 0x0010 - BSS channel info stats enable/disable
3303 * The features in question are enabled by setting
3304 * the feature's bit to 1,
3305 * or disabled by setting the feature's bit to 0.
3306 */
3307 uint32_t fw_feature_bitmap;
3308
3309 /* add new members here */
3310} wmi_host_ext_resource_config;
3311
3312/**
3313 * struct set_neighbour_rx_params - Neighbour RX params
3314 * @vdev_id: vdev id
3315 * @idx: index of param
3316 * @action: action
3317 * @type: Type of param
3318 */
3319struct set_neighbour_rx_params {
3320 uint8_t vdev_id;
3321 uint32_t idx;
3322 uint32_t action;
3323 uint32_t type;
3324};
3325
3326/**
3327 * struct set_fwtest_params - FW test params
3328 * @arg: FW param id
3329 * @value: value
3330 */
3331struct set_fwtest_params {
3332 uint32_t arg;
3333 uint32_t value;
3334};
3335
3336/**
3337 * struct config_ratemask_params - ratemask config parameters
3338 * @vdev_id: vdev id
3339 * @type: Type
3340 * @lower32: Lower 32 bits
3341 * @higher32: Hogher 32 bits
3342 */
3343struct config_ratemask_params {
3344 uint8_t vdev_id;
3345 uint8_t type;
3346 uint32_t lower32;
3347 uint32_t higher32;
3348};
3349
3350/**
3351 * struct peer_add_wds_entry_params - WDS peer entry add params
3352 * @dest_addr: Pointer to destination macaddr
3353 * @peer_addr: Pointer to peer mac addr
3354 * @flags: flags
3355 */
3356struct peer_add_wds_entry_params {
3357 const uint8_t *dest_addr;
3358 uint8_t *peer_addr;
3359 uint32_t flags;
3360};
3361
3362/**
3363 * struct peer_del_wds_entry_params - WDS peer entry del params
3364 * @dest_addr: Pointer to destination macaddr
3365 */
3366struct peer_del_wds_entry_params {
3367 uint8_t *dest_addr;
3368};
3369
3370/**
3371 * struct peer_updatewds_entry_params - WDS peer entry update params
3372 * @wds_macaddr: Pointer to destination macaddr
3373 * @peer_add: Pointer to peer mac addr
3374 * @flags: flags
3375 */
3376struct peer_update_wds_entry_params {
3377 uint8_t *wds_macaddr;
3378 uint8_t *peer_macaddr;
3379 uint32_t flags;
3380};
3381
3382/**
3383 * struct set_ps_mode_params - PS mode params
3384 * @vdev_id: vdev id
3385 * @psmode: PS mode
3386 */
3387struct set_ps_mode_params {
3388 uint8_t vdev_id;
3389 uint8_t psmode;
3390};
3391
3392/**
3393 * @struct tt_level_config - Set Thermal throttlling config
3394 * @tmplwm: Temperature low water mark
3395 * @tmphwm: Temperature high water mark
3396 * @dcoffpercent: dc off percentage
3397 * @priority: priority
3398 */
3399typedef struct {
3400 uint32_t tmplwm;
3401 uint32_t tmphwm;
3402 uint32_t dcoffpercent;
3403 uint32_t priority;
3404} tt_level_config;
3405
3406/**
3407 * struct thermal_mitigation_params - Thermal mitigation params
3408 * @enable: Enable/Disable Thermal mitigation
3409 * @dc: DC
3410 * @dc_per_event: DC per event
3411 * @tt_level_config: TT level config params
3412 */
3413struct thermal_mitigation_params {
3414 uint32_t enable;
3415 uint32_t dc;
3416 uint32_t dc_per_event;
3417 tt_level_config levelconf[THERMAL_LEVELS];
3418};
3419
3420/**
3421 * struct smart_ant_enable_params - Smart antenna params
3422 * @enable: Enable/Disable
3423 * @mode: SA mode
3424 * @rx_antenna: RX antenna config
Govind Singh41da3152016-05-06 20:20:25 +05303425 * @gpio_pin : GPIO pin config
3426 * @gpio_func : GPIO function config
Govind Singh89727882016-04-15 13:58:27 +05303427 */
3428struct smart_ant_enable_params {
3429 uint32_t enable;
3430 uint32_t mode;
3431 uint32_t rx_antenna;
Govind Singh41da3152016-05-06 20:20:25 +05303432 uint32_t gpio_pin[WMI_HAL_MAX_SANTENNA];
3433 uint32_t gpio_func[WMI_HAL_MAX_SANTENNA];
Govind Singh89727882016-04-15 13:58:27 +05303434};
3435
3436/**
3437 * struct smart_ant_rx_ant_params - RX antenna params
3438 * @antenna: RX antenna
3439 */
3440struct smart_ant_rx_ant_params {
3441 uint32_t antenna;
3442};
3443
3444/**
3445 * struct smart_ant_tx_ant_params - TX antenna param
3446 * @antenna_array: Antenna arry
3447 * @vdev_id: VDEV id
3448 */
3449struct smart_ant_tx_ant_params {
3450 uint32_t *antenna_array;
3451 uint8_t vdev_id;
3452};
3453
3454/**
3455 * struct smart_ant_training_info_params - SA training params
3456 * @vdev_id: VDEV id
3457 * @rate_array: Rates array
3458 * @antenna_array: Antenna array
3459 * @numpkts: num packets for training
3460 */
3461struct smart_ant_training_info_params {
3462 uint8_t vdev_id;
3463 uint32_t *rate_array;
3464 uint32_t *antenna_array;
3465 uint32_t numpkts;
3466};
3467
3468/**
3469 * struct smart_ant_node_config_params - SA node config params
3470 * @vdev_id: VDEV id
3471 * @cmd_id: Command id
3472 * @args_count: Arguments count
3473 */
3474struct smart_ant_node_config_params {
3475 uint8_t vdev_id;
3476 uint32_t cmd_id;
3477 uint16_t args_count;
3478 uint32_t *args_arr;
3479};
3480/**
3481 * struct smart_ant_enable_tx_feedback_params - SA tx feeback params
3482 * @enable: Enable TX feedback for SA
3483 */
3484struct smart_ant_enable_tx_feedback_params {
3485 int enable;
3486};
3487
3488/**
3489 * struct vdev_spectral_configure_params - SPectral config params
3490 * @vdev_id: VDEV id
3491 * @count: count
3492 * @period: period
3493 * @spectral_pri: Spectral priority
3494 * @fft_size: FFT size
3495 * @gc_enable: GC enable
3496 * @restart_enable: restart enabled
3497 * @noise_floor_ref: Noise floor reference
3498 * @init_delay: Init delays
3499 * @nb_tone_thr: NB tone threshold
3500 * @str_bin_thr: STR BIN threshold
3501 * @wb_rpt_mode: WB BIN threshold
3502 * @rssi_rpt_mode: RSSI report mode
3503 * @rssi_thr: RSSI threshold
3504 * @pwr_format: Power format
3505 * @rpt_mode: Report mdoe
3506 * @bin_scale: BIN scale
3507 * @dBm_adj: DBM adjust
3508 * @chn_mask: chain mask
3509 */
3510struct vdev_spectral_configure_params {
3511 uint8_t vdev_id;
3512 uint16_t count;
3513 uint16_t period;
3514 uint16_t spectral_pri;
3515 uint16_t fft_size;
3516 uint16_t gc_enable;
3517 uint16_t restart_enable;
3518 uint16_t noise_floor_ref;
3519 uint16_t init_delay;
3520 uint16_t nb_tone_thr;
3521 uint16_t str_bin_thr;
3522 uint16_t wb_rpt_mode;
3523 uint16_t rssi_rpt_mode;
3524 uint16_t rssi_thr;
3525 uint16_t pwr_format;
3526 uint16_t rpt_mode;
3527 uint16_t bin_scale;
3528 uint16_t dBm_adj;
3529 uint16_t chn_mask;
3530};
3531
3532/**
3533 * struct vdev_spectral_enable_params - Spectral enabled params
3534 * @vdev_id: VDEV id
3535 * @active_valid: Active valid
3536 * @active: active
3537 * @enabled_valid: Enabled valid
3538 * @enabled: enabled
3539 */
3540struct vdev_spectral_enable_params {
3541 uint8_t vdev_id;
3542 uint8_t active_valid;
3543 uint8_t active;
3544 uint8_t enabled_valid;
3545 uint8_t enabled;
3546};
3547
3548/**
3549 * struct pdev_set_regdomain_params - PDEV set reg domain params
3550 * @currentRDinuse: Current Reg domain
3551 * @currentRD2G: Current Reg domain 2G
3552 * @currentRD5G: Current Reg domain 5G
3553 * @ctl_2G: CTL 2G
3554 * @ctl_5G: CTL 5G
3555 * @dfsDomain: DFS domain
3556 */
3557struct pdev_set_regdomain_params {
3558 uint16_t currentRDinuse;
3559 uint16_t currentRD2G;
3560 uint16_t currentRD5G;
3561 uint32_t ctl_2G;
3562 uint32_t ctl_5G;
3563 uint8_t dfsDomain;
3564};
3565
3566/**
3567 * struct set_quiet_mode_params - Set quiet mode params
3568 * @enabled: Enabled
3569 * @period: Quite period
3570 * @intval: Quite interval
3571 * @duration: Quite duration
3572 * @offset: offset
3573 */
3574struct set_quiet_mode_params {
3575 uint8_t enabled;
3576 uint8_t period;
3577 uint16_t intval;
3578 uint16_t duration;
3579 uint16_t offset;
3580};
3581
3582/**
3583 * struct set_beacon_filter_params - Set beacon filter params
3584 * @vdev_id: VDEV id
3585 * @ie: Pointer to IE fields
3586 */
3587struct set_beacon_filter_params {
3588 uint8_t vdev_id;
3589 uint32_t *ie;
3590};
3591
3592/**
3593 * struct remove_beacon_filter_params - Remove beacon filter params
3594 * @vdev_id: VDEV id
3595 */
3596struct remove_beacon_filter_params {
3597 uint8_t vdev_id;
3598};
3599
3600/**
3601 * struct mgmt_params - Mgmt params
3602 * @vdev_id: vdev id
3603 * @buf_len: lenght of frame buffer
3604 * @wbuf: frame buffer
3605 */
3606struct mgmt_params {
3607 int vdev_id;
3608 uint32_t buf_len;
3609 qdf_nbuf_t wbuf;
3610};
3611
3612/**
3613 * struct addba_clearresponse_params - Addba clear response params
3614 * @vdev_id: VDEV id
3615 */
3616struct addba_clearresponse_params {
3617 uint8_t vdev_id;
3618};
3619
3620/**
3621 * struct addba_send_params - ADDBA send params
3622 * @vdev_id: vdev id
3623 * @tidno: TID
3624 * @buffersize: buffer size
3625 */
3626struct addba_send_params {
3627 uint8_t vdev_id;
3628 uint8_t tidno;
3629 uint16_t buffersize;
3630};
3631
3632/**
3633 * struct delba_send_params - DELBA send params
3634 * @vdev_id: vdev id
3635 * @tidno: TID
3636 * @initiator: initiator
3637 * @reasoncode: reason code
3638 */
3639struct delba_send_params {
3640 uint8_t vdev_id;
3641 uint8_t tidno;
3642 uint8_t initiator;
3643 uint16_t reasoncode;
3644};
3645/**
3646 * struct addba_setresponse_arams - Set ADDBA response params
3647 * @vdev_id: vdev id
3648 * @tidno: TID
3649 * @statuscode: status code in response
3650 */
3651struct addba_setresponse_params {
3652 uint8_t vdev_id;
3653 uint8_t tidno;
3654 uint16_t statuscode;
3655};
3656
3657/**
3658 * struct singleamsdu_params - Single AMSDU params
3659 * @vdev_id: vdev is
3660 * @tidno: TID
3661 */
3662struct singleamsdu_params {
3663 uint8_t vdev_id;
3664 uint8_t tidno;
3665};
3666
3667/**
3668 * struct set_qbosst_params - Set QBOOST params
3669 * @vdev_id: vdev id
3670 * @value: value
3671 */
3672struct set_qboost_params {
3673 uint8_t vdev_id;
3674 uint32_t value;
3675};
3676
3677/**
3678 * struct mu_scan_params - MU scan params
3679 * @id: id
3680 * @type: type
3681 * @duration: Duration
3682 * @lteu_tx_power: LTEU tx power
3683 */
3684struct mu_scan_params {
3685 uint8_t id;
3686 uint8_t type;
3687 uint32_t duration;
3688 uint32_t lteu_tx_power;
3689};
3690
3691/**
3692 * struct lteu_config_params - LTEU config params
3693 * @lteu_gpio_start: start MU/AP scan after GPIO toggle
3694 * @lteu_num_bins: no. of elements in the following arrays
3695 * @use_actual_nf: whether to use the actual NF obtained or a hardcoded one
3696 * @lteu_weight: weights for MU algo
3697 * @lteu_thresh: thresholds for MU algo
3698 * @lteu_gamma: gamma's for MU algo
3699 * @lteu_scan_timeout: timeout in ms to gpio toggle
3700 * @alpha_num_ssid: alpha for num active bssid calculation
3701 * @wifi_tx_power: Wifi Tx power
3702 */
3703struct lteu_config_params {
3704 uint8_t lteu_gpio_start;
3705 uint8_t lteu_num_bins;
3706 uint8_t use_actual_nf;
3707 uint32_t lteu_weight[LTEU_MAX_BINS];
3708 uint32_t lteu_thresh[LTEU_MAX_BINS];
3709 uint32_t lteu_gamma[LTEU_MAX_BINS];
3710 uint32_t lteu_scan_timeout;
3711 uint32_t alpha_num_bssid;
3712 uint32_t wifi_tx_power;
3713};
3714
3715struct wmi_macaddr_t {
3716 /** upper 4 bytes of MAC address */
3717 uint32_t mac_addr31to0;
3718 /** lower 2 bytes of MAC address */
3719 uint32_t mac_addr47to32;
3720};
3721
3722/**
3723 * struct atf_peer_info - ATF peer info params
3724 * @peer_macaddr: peer mac addr
3725 * @percentage_peer: percentage of air time for this peer
3726 */
3727typedef struct {
3728 struct wmi_macaddr_t peer_macaddr;
3729 uint32_t percentage_peer;
3730} atf_peer_info;
3731
3732/**
Sathish Kumar50232d72016-08-09 16:50:46 +05303733 * struct bwf_peer_info_t - BWF peer info params
3734 * @peer_macaddr: peer mac addr
3735 * @throughput: Throughput
3736 * @max_airtime: Max airtime
3737 * @priority: Priority level
3738 * @reserved: Reserved array
3739 */
3740typedef struct {
3741 struct wmi_macaddr_t peer_macaddr;
3742 uint32_t throughput;
3743 uint32_t max_airtime;
3744 uint32_t priority;
3745 uint32_t reserved[4];
3746} bwf_peer_info;
3747
3748/**
3749 * struct set_bwf_params - BWF params
3750 * @num_peers: number of peers
3751 * @atf_peer_info: BWF peer info
3752 */
3753struct set_bwf_params {
3754 uint32_t num_peers;
3755 bwf_peer_info peer_info[1];
3756};
3757
3758/**
Govind Singh89727882016-04-15 13:58:27 +05303759 * struct set_atf_params - ATF params
3760 * @num_peers: number of peers
3761 * @atf_peer_info: ATF peer info
3762 */
3763struct set_atf_params {
3764 uint32_t num_peers;
3765 atf_peer_info peer_info[ATF_ACTIVED_MAX_CLIENTS];
3766};
3767
3768/**
3769 * struct atf_peer_ext_info - ATF peer ext info params
3770 * @peer_macaddr: peer mac address
3771 * @group_index: group index
3772 * @atf_index_reserved: ATF index rsvd
3773 */
3774typedef struct {
3775 struct wmi_macaddr_t peer_macaddr;
3776 uint32_t group_index;
3777 uint32_t atf_index_reserved;
3778} atf_peer_ext_info;
3779
3780/**
3781 * struct atf_peer_request_params - ATF peer req params
3782 * @num_peers: number of peers
3783 * @atf_peer_ext_info: ATF peer ext info
3784 */
3785struct atf_peer_request_params {
3786 uint32_t num_peers;
3787 atf_peer_ext_info peer_ext_info[ATF_ACTIVED_MAX_CLIENTS];
3788};
3789
3790/**
3791 * struct atf_group_info - ATF group info params
3792 * @percentage_group: Percentage AT for group
3793 * @atf_group_units_reserved: ATF group information
3794 */
3795typedef struct {
3796 uint32_t percentage_group;
3797 uint32_t atf_group_units_reserved;
3798} atf_group_info;
3799
3800/**
3801 * struct atf_grouping_params - ATF grouping params
3802 * @num_groups: number of groups
3803 * @group_inf: Group informaition
3804 */
3805struct atf_grouping_params {
3806 uint32_t num_groups;
3807 atf_group_info group_info[ATF_ACTIVED_MAX_ATFGROUPS];
3808};
3809
3810/**
3811 * struct wlan_profile_params - WLAN profile params
3812 * @param_id: param id
3813 * @profile_id: profile id
3814 * @enable: enable
3815 */
3816struct wlan_profile_params {
3817 uint32_t param_id;
3818 uint32_t profile_id;
3819 uint32_t enable;
3820};
3821
3822/* struct ht_ie_params - HT IE params
3823 * @ie_len: IE length
3824 * @ie_data: pointer to IE data
3825 */
3826struct ht_ie_params {
3827 uint32_t ie_len;
3828 uint8_t *ie_data;
3829};
3830
3831/* struct vht_ie_params - VHT IE params
3832 * @ie_len: IE length
3833 * @ie_data: pointer to IE data
3834 */
3835struct vht_ie_params {
3836 uint32_t ie_len;
3837 uint8_t *ie_data;
3838};
3839
3840/**
3841 * struct wmi_host_wmeParams - WME params
3842 * @wmep_acm: ACM paramete
3843 * @wmep_aifsn: AIFSN parameters
3844 * @wmep_logcwmin: cwmin in exponential form
3845 * @wmep_logcwmax: cwmax in exponential form
3846 * @wmep_txopLimit: txopLimit
3847 * @wmep_noackPolicy: No-Ack Policy: 0=ack, 1=no-ack
3848 */
3849struct wmi_host_wmeParams {
3850 u_int8_t wmep_acm;
3851 u_int8_t wmep_aifsn;
3852 u_int8_t wmep_logcwmin;
3853 u_int8_t wmep_logcwmax;
3854 u_int16_t wmep_txopLimit;
3855 u_int8_t wmep_noackPolicy;
3856};
3857
3858/**
3859 * struct wmm_update_params - WMM update params
3860 * @wmep_array: WME params for each AC
3861 */
3862struct wmm_update_params {
3863 struct wmi_host_wmeParams *wmep_array;
3864};
3865
3866/**
3867 * struct ant_switch_tbl_params - Antenna switch table params
3868 * @ant_ctrl_common1: ANtenna control common param 1
3869 * @ant_ctrl_common2: Antenna control commn param 2
3870 */
3871struct ant_switch_tbl_params {
3872 uint32_t ant_ctrl_common1;
3873 uint32_t ant_ctrl_common2;
3874};
3875
3876/**
3877 * struct ratepwr_table_params - Rate power table params
3878 * @ratepwr_tbl: pointer to rate power table
3879 * @ratepwr_len: rate power table len
3880 */
3881struct ratepwr_table_params {
3882 uint8_t *ratepwr_tbl;
3883 uint16_t ratepwr_len;
3884};
3885
3886/**
3887 * struct ctl_table_params - Ctl table params
3888 * @ctl_array: pointer to ctl array
3889 * @ctl_len: ctl length
3890 * @is_acfg_ctl: is acfg_ctl table
3891 */
3892struct ctl_table_params {
3893 uint8_t *ctl_array;
3894 uint16_t ctl_len;
3895 bool is_acfg_ctl;
3896};
3897
3898/**
3899 * struct mimogain_table_params - MIMO gain table params
3900 * @array_gain: pointer to array gain table
3901 * @tbl_len: table length
3902 * @multichain_gain_bypass: bypass multichain gain
3903 */
3904struct mimogain_table_params {
3905 uint8_t *array_gain;
3906 uint16_t tbl_len;
3907 bool multichain_gain_bypass;
3908};
3909
3910/**
3911 * struct ratepwr_chainmask_params - Rate power chainmask params
3912 * @ratepwr_chain_tbl: pointer to ratepwr chain table
3913 * @num_rate: number of rate in table
3914 * @pream_type: preamble type
3915 * @ops: ops
3916 */
3917struct ratepwr_chainmsk_params {
3918 uint32_t *ratepwr_chain_tbl;
3919 uint16_t num_rate;
3920 uint8_t pream_type;
3921 uint8_t ops;
3922};
3923
3924struct macaddr_params {
3925 uint8_t *macaddr;
3926};
3927
3928/**
3929 * struct acparams_params - acparams config structure
3930 * @ac: AC to configure
3931 * @use_rts: Use rts for this AC
3932 * @aggrsize_scaling: Aggregrate size scaling for the AC
3933 * @min_kbps: min kbps req
3934 */
3935struct acparams_params {
3936 uint8_t ac;
3937 uint8_t use_rts;
3938 uint8_t aggrsize_scaling;
3939 uint32_t min_kbps;
3940};
3941
3942/**
3943 * struct vap_dscp_tid_map_params - DSCP tid map params
3944 * @vdev_id: vdev id
3945 * @dscp_to_tid_map: pointer to arry of tid to dscp map table
3946 */
3947struct vap_dscp_tid_map_params {
3948 uint8_t vdev_id;
3949 uint32_t *dscp_to_tid_map;
3950};
3951
3952/**
3953 * struct proxy_ast_reserve_params - Proxy AST reserve params
3954 * @macaddr: macaddr for proxy ast entry
3955 */
3956struct proxy_ast_reserve_params {
3957 uint8_t *macaddr;
3958};
3959
3960/**
3961 * struct fips_params - FIPS params config
3962 * @key: pointer to key
3963 * @key_len: length of key
3964 * @data: pointer data buf
3965 * @data_len: lenght of sata buf
3966 * @mode: mode
3967 * @op: operation
3968 */
3969struct fips_params {
3970 uint8_t *key;
3971 uint32_t key_len;
3972 uint8_t *data;
3973 uint32_t data_len;
3974 uint32_t mode;
3975 uint32_t op;
3976};
3977
3978/**
3979 * struct mcast_group_update_param - Mcast group table update to target
3980 * @action: Addition/deletion
3981 * @wildcard: iwldcard table entry?
3982 * @mcast_ip_addr: mcast ip address to be updated
3983 * @mcast_ip_addr_bytes: mcast ip addr bytes
3984 * @ucast_mac_addr: ucast peer mac subscribed to mcast ip
3985 * @filter_mode: filter mode
3986 * @nsrcs: number of entries in source list
3987 * @srcs: source mac accpted
3988 * @mask: mask
3989 * @vap_id: vdev id
3990 * @is_action_delete: is delete
3991 * @is_filter_mode_snoop:
3992 * @is_mcast_addr_len:
3993 */
3994struct mcast_group_update_params {
3995 int action;
3996 int wildcard;
3997 uint8_t *mcast_ip_addr;
3998 int mcast_ip_addr_bytes;
3999 uint8_t *ucast_mac_addr;
4000 uint8_t filter_mode;
4001 uint8_t nsrcs;
4002 uint8_t *srcs;
4003 uint8_t *mask;
4004 uint8_t vap_id;
4005 bool is_action_delete;
4006 bool is_filter_mode_snoop;
4007 bool is_mcast_addr_len;
4008};
4009
4010/**
4011 * struct periodic_chan_stats_param - periodic channel stats req param
4012 * @stats_period: stats period update
4013 * @enable: enable/disable
4014 */
4015struct periodic_chan_stats_params {
4016 uint32_t stats_period;
4017 bool enable;
4018};
4019
4020/**
4021 * struct packet_power_info_params - packet power info params
4022 * @rate_flags: rate flags
4023 * @nss: number of spatial streams
4024 * @preamble: preamble
4025 * @hw_rate:
4026 */
4027struct packet_power_info_params {
4028 uint16_t rate_flags;
4029 uint16_t nss;
4030 uint16_t preamble;
4031 uint16_t hw_rate;
4032};
4033
4034/**
4035 * WMI_GPIO_CONFIG_CMDID
4036 */
4037enum {
4038 WMI_HOST_GPIO_PULL_NONE,
4039 WMI_HOST_GPIO_PULL_UP,
4040 WMI_HOST_GPIO_PULL_DOWN,
4041};
4042
4043/**
4044 * WMI_GPIO_INTTYPE
4045 */
4046enum {
4047 WMI_HOST_GPIO_INTTYPE_DISABLE,
4048 WMI_HOST_GPIO_INTTYPE_RISING_EDGE,
4049 WMI_HOST_GPIO_INTTYPE_FALLING_EDGE,
4050 WMI_HOST_GPIO_INTTYPE_BOTH_EDGE,
4051 WMI_HOST_GPIO_INTTYPE_LEVEL_LOW,
4052 WMI_HOST_GPIO_INTTYPE_LEVEL_HIGH
4053};
4054
4055/**
4056 * struct wmi_host_gpio_input_event - GPIO input event structure
4057 * @gpio_num: GPIO number which changed state
4058 */
4059typedef struct {
4060 uint32_t gpio_num; /* GPIO number which changed state */
4061} wmi_host_gpio_input_event;
4062
4063/**
4064 * struct gpio_config_params - GPIO config params
4065 * @gpio_num: GPIO number to config
4066 * @input: input/output
4067 * @pull_type: pull type
4068 * @intr_mode: int mode
4069 */
4070struct gpio_config_params {
4071 uint32_t gpio_num;
4072 uint32_t input;
4073 uint32_t pull_type;
4074 uint32_t intr_mode;
4075};
4076
4077/**
4078 * struct gpio_output_params - GPIO output params
4079 * @gpio_num: GPIO number to configure
4080 * @set: set/reset
4081 */
4082struct gpio_output_params {
4083 uint32_t gpio_num;
4084 uint32_t set;
4085};
4086
4087#define WMI_HOST_RTT_REPORT_CFR 0
4088#define WMI_HOST_RTT_NO_REPORT_CFR 1
4089#define WMI_HOST_RTT_AGGREGATE_REPORT_NON_CFR 2
4090/**
4091 * struct rtt_meas_req_test_params
4092 * @peer: peer mac address
4093 * @req_frame_type: RTT request frame type
4094 * @req_bw: requested bandwidth
4095 * @req_preamble: Preamble
4096 * @req_num_req: num of requests
4097 * @req_report_type: report type
4098 * @num_measurements: number of measurements
4099 * @asap_mode: priority
4100 * @lci_requested: LCI requested
4101 * @loc_civ_requested:
4102 * @channel_param: channel param
4103 * @req_id: requested id
4104 */
4105struct rtt_meas_req_test_params {
4106 uint8_t peer[IEEE80211_ADDR_LEN];
4107 int req_frame_type;
4108 int req_bw;
4109 int req_preamble;
4110 int req_num_req;
4111 int req_report_type;
4112 uint32_t num_measurements;
4113 uint32_t asap_mode;
4114 uint32_t lci_requested;
4115 uint32_t loc_civ_requested;
4116 struct channel_param channel;
4117 uint8_t req_id;
4118};
4119
4120/**
4121 * struct rtt_meas_req_params - RTT measurement request params
4122 * @req_id: Request id
4123 * @vdev_id: vdev id
4124 * @sta_mac_addr: pointer to station mac address
4125 * @spoof_mac_addr: pointer to spoof mac address
4126 * @is_mode_na: 11NA
4127 * @is_mode_ac: AC
4128 * @is_bw_20: 20
4129 * @is_bw_40: 40
4130 * @is_bw_80: 80
4131 * @num_probe_rqst: number of probe request
4132 * @channel_param: channel param
4133 */
4134struct rtt_meas_req_params {
4135 uint8_t req_id;
4136 uint8_t vdev_id;
4137 uint8_t *sta_mac_addr;
4138 uint8_t *spoof_mac_addr;
4139 bool is_mode_na;
4140 bool is_mode_ac;
4141 bool is_bw_20;
4142 bool is_bw_40;
4143 bool is_bw_80;
4144 uint32_t num_probe_rqst;
4145 struct channel_param channel;
4146};
4147
4148/**
4149 * struct lci_set_params - LCI params
4150 * @lci_data: pointer to LCI data
4151 * @latitude_unc: latitude
4152 * @latitude_0_12: bits 0 to 1 of latitude
4153 * @latitude_2_33: bits 2 to 33 of latitude
4154 * @longitude_unc: longitude
4155 * @longitude_0_1: bits 0 to 1 of longitude
4156 * @longitude_2_33: bits 2 to 33 of longitude
4157 * @altitude_type: altitude type
4158 * @altitude_unc_0_3: altitude bits 0 - 3
4159 * @altitude_unc_4_5: altitude bits 4 - 5
4160 * @altitude: altitude
4161 * @datum: dataum
4162 * @reg_loc_agmt:
4163 * @reg_loc_dse:
4164 * @dep_sta:
4165 * @version: version
4166 */
4167struct lci_set_params {
4168 void *lci_data;
4169 uint8_t latitude_unc:6,
4170 latitude_0_1:2;
4171 uint32_t latitude_2_33;
4172 uint8_t longitude_unc:6,
4173 longitude_0_1:2;
4174 uint32_t longitude_2_33;
4175 uint8_t altitude_type:4,
4176 altitude_unc_0_3:4;
4177 uint32_t altitude_unc_4_5:2,
4178 altitude:30;
4179 uint8_t datum:3,
4180 reg_loc_agmt:1,
4181 reg_loc_dse:1,
4182 dep_sta:1,
4183 version:2;
4184};
4185
4186/**
4187 * struct lcr_set_params - LCR params
4188 * @lcr_data: pointer to lcr data
4189 */
4190struct lcr_set_params {
4191 void *lcr_data;
4192};
4193
4194/**
4195 * struct rtt_keepalive_req_params - RTT keepalive params
4196 * @macaddr: pointer to macaddress
4197 * @req_id: Request id
4198 * @vdev_id: vdev id
4199 * @stop: start/stop
4200 */
4201struct rtt_keepalive_req_params {
4202 uint8_t *macaddr;
4203 uint8_t req_id;
4204 uint8_t vdev_id;
4205 bool stop;
4206};
4207
4208/**
4209 * struct wmi_host_stats_event - Stats event params
4210 * @stats_id: stats id of type wmi_host_stats_event
4211 * @num_pdev_stats: number of pdev stats event structures 0 or 1
4212 * @num_pdev_ext_stats: number of pdev ext stats event structures
4213 * @num_vdev_stats: number of vdev stats
4214 * @num_peer_stats: number of peer stats event structures 0 or max peers
4215 * @num_bcnflt_stats: number of beacon filter stats
4216 * @num_chan_stats: number of channel stats
4217 */
4218typedef struct {
4219 wmi_host_stats_id stats_id;
4220 uint32_t num_pdev_stats;
4221 uint32_t num_pdev_ext_stats;
4222 uint32_t num_vdev_stats;
4223 uint32_t num_peer_stats;
4224 uint32_t num_bcnflt_stats;
4225 uint32_t num_chan_stats;
4226} wmi_host_stats_event;
4227
4228/**
Govind Singh89727882016-04-15 13:58:27 +05304229 * struct wmi_host_peer_extd_stats - peer extd stats event structure
4230 * @peer_macaddr: Peer mac address
4231 * @inactive_time: inactive time in secs
4232 * @peer_chain_rssi: peer rssi
4233 * @rx_duration: RX duration
4234 * @peer_tx_bytes: TX bytes
4235 * @peer_rx_bytes: RX bytes
4236 * @last_tx_rate_code: Tx rate code of last frame
4237 * @last_tx_power: Tx power latest
4238 * @atf_tokens_allocated: atf tokens allocated
4239 * @atf_tokens_utilized: atf tokens utilized
4240 * @reserved: for future use
4241 */
4242typedef struct {
4243 wmi_host_mac_addr peer_macaddr;
4244 uint32_t inactive_time;
4245 uint32_t peer_chain_rssi;
4246 uint32_t rx_duration;
4247 uint32_t peer_tx_bytes;
4248 uint32_t peer_rx_bytes;
4249 uint32_t last_tx_rate_code;
4250 uint32_t last_tx_power;
4251 uint32_t atf_tokens_allocated;
4252 uint32_t atf_tokens_utilized;
4253 uint32_t reserved[4];
4254} wmi_host_peer_extd_stats;
4255
4256/**
4257 * struct wmi_host_pdev_ext_stats - peer ext stats structure
4258 * @rx_rssi_comb: RX rssi
4259 * @rx_rssi_chain0: RX rssi chain 0
4260 * @rx_rssi_chain1: RX rssi chain 1
4261 * @rx_rssi_chain2: RX rssi chain 2
4262 * @rx_rssi_chain3: RX rssi chain 3
4263 * @rx_mcs: RX MCS array
4264 * @tx_mcs: TX MCS array
4265 * @ack_rssi: Ack rssi
4266 */
4267typedef struct {
4268 uint32_t rx_rssi_comb;
4269 uint32_t rx_rssi_chain0;
4270 uint32_t rx_rssi_chain1;
4271 uint32_t rx_rssi_chain2;
4272 uint32_t rx_rssi_chain3;
4273 uint32_t rx_mcs[10];
4274 uint32_t tx_mcs[10];
4275 uint32_t ack_rssi;
4276} wmi_host_pdev_ext_stats;
4277
4278/**
4279 * struct wmi_host_dbg_tx_stats - Debug stats
4280 * @comp_queued: Num HTT cookies queued to dispatch list
4281 * @comp_delivered: Num HTT cookies dispatched
4282 * @msdu_enqued: Num MSDU queued to WAL
4283 * @mpdu_enqued: Num MPDU queue to WAL
4284 * @wmm_drop: Num MSDUs dropped by WMM limit
4285 * @local_enqued: Num Local frames queued
4286 * @local_freed: Num Local frames done
4287 * @hw_queued: Num queued to HW
4288 * @hw_reaped: Num PPDU reaped from HW
4289 * @underrun: Num underruns
4290 * @hw_paused: HW Paused.
4291 * @tx_abort: Num PPDUs cleaned up in TX abort
4292 * @mpdus_requed: Num MPDUs requed by SW
4293 * @tx_ko: excessive retries
4294 * @tx_xretry:
4295 * @data_rc: data hw rate code
4296 * @self_triggers: Scheduler self triggers
4297 * @sw_retry_failure: frames dropped due to excessive sw retries
4298 * @illgl_rate_phy_err: illegal rate phy errors
4299 * @pdev_cont_xretry: wal pdev continous xretry
4300 * @pdev_tx_timeout: wal pdev continous xretry
4301 * @pdev_resets: wal pdev resets
4302 * @stateless_tid_alloc_failure: frames dropped due to non-availability of
4303 * stateless TIDs
4304 * @phy_underrun: PhY/BB underrun
4305 * @txop_ovf: MPDU is more than txop limit
4306 * @seq_posted: Number of Sequences posted
4307 * @seq_failed_queueing: Number of Sequences failed queueing
4308 * @seq_completed: Number of Sequences completed
4309 * @seq_restarted: Number of Sequences restarted
4310 * @mu_seq_posted: Number of MU Sequences posted
4311 * @mpdus_sw_flush: Num MPDUs flushed by SW, HWPAUSED, SW TXABORT
4312 * (Reset,channel change)
4313 * @mpdus_hw_filter: Num MPDUs filtered by HW, all filter condition
4314 * (TTL expired)
4315 * @mpdus_truncated: Num MPDUs truncated by PDG (TXOP, TBTT,
4316 * PPDU_duration based on rate, dyn_bw)
4317 * @mpdus_ack_failed: Num MPDUs that was tried but didn't receive ACK or BA
4318 * @mpdus_expired: Num MPDUs that was dropped du to expiry.
4319 * @mc_dropr: Num mc drops
4320 */
4321typedef struct {
4322 int32_t comp_queued;
4323 int32_t comp_delivered;
4324 int32_t msdu_enqued;
4325 int32_t mpdu_enqued;
4326 int32_t wmm_drop;
4327 int32_t local_enqued;
4328 int32_t local_freed;
4329 int32_t hw_queued;
4330 int32_t hw_reaped;
4331 int32_t underrun;
4332 uint32_t hw_paused;
4333 int32_t tx_abort;
4334 int32_t mpdus_requed;
4335 uint32_t tx_ko;
4336 uint32_t tx_xretry;
4337 uint32_t data_rc;
4338 uint32_t self_triggers;
4339 uint32_t sw_retry_failure;
4340 uint32_t illgl_rate_phy_err;
4341 uint32_t pdev_cont_xretry;
4342 uint32_t pdev_tx_timeout;
4343 uint32_t pdev_resets;
4344 uint32_t stateless_tid_alloc_failure;
4345 uint32_t phy_underrun;
4346 uint32_t txop_ovf;
4347 uint32_t seq_posted;
4348 uint32_t seq_failed_queueing;
4349 uint32_t seq_completed;
4350 uint32_t seq_restarted;
4351 uint32_t mu_seq_posted;
4352 int32_t mpdus_sw_flush;
4353 int32_t mpdus_hw_filter;
4354 int32_t mpdus_truncated;
4355 int32_t mpdus_ack_failed;
4356 int32_t mpdus_expired;
4357 uint32_t mc_drop;
4358} wmi_host_dbg_tx_stats;
4359
4360/**
4361 * struct wmi_host_dbg_rx_stats - RX Debug stats
4362 * @mid_ppdu_route_change: Cnts any change in ring routing mid-ppdu
4363 * @status_rcvd: Total number of statuses processed
4364 * @r0_frags: Extra frags on rings 0
4365 * @r1_frags: Extra frags on rings 1
4366 * @r2_frags: Extra frags on rings 2
4367 * @r3_frags: Extra frags on rings 3
4368 * @htt_msdus: MSDUs delivered to HTT
4369 * @htt_mpdus: MPDUs delivered to HTT
4370 * @loc_msdus: MSDUs delivered to local stack
4371 * @loc_mpdus: MPDUS delivered to local stack
4372 * @oversize_amsdu: AMSDUs that have more MSDUs than the status ring size
4373 * @phy_errs: Number of PHY errors
4374 * @phy_err_drop: Number of PHY errors drops
4375 * @mpdu_errs: Number of mpdu errors - FCS, MIC, ENC etc.
4376 * @pdev_rx_timeout: Number of rx inactivity timeouts
4377 * @rx_ovfl_errs: Number of rx overflow errors.
4378 */
4379typedef struct {
4380 int32_t mid_ppdu_route_change;
4381 int32_t status_rcvd;
4382 int32_t r0_frags;
4383 int32_t r1_frags;
4384 int32_t r2_frags;
4385 int32_t r3_frags;
4386 int32_t htt_msdus;
4387 int32_t htt_mpdus;
4388 int32_t loc_msdus;
4389 int32_t loc_mpdus;
4390 int32_t oversize_amsdu;
4391 int32_t phy_errs;
4392 int32_t phy_err_drop;
4393 int32_t mpdu_errs;
4394 uint32_t pdev_rx_timeout;
4395 int32_t rx_ovfl_errs;
4396} wmi_host_dbg_rx_stats;
4397
4398/** struct wmi_host_dbg_mem_stats - memory stats
4399 * @iram_free_size: IRAM free size on target
4400 * @dram_free_size: DRAM free size on target
4401 * @sram_free_size: SRAM free size on target
4402 */
4403typedef struct {
4404 uint32_t iram_free_size;
4405 uint32_t dram_free_size;
4406 /* Only Non-TLV */
4407 uint32_t sram_free_size;
4408} wmi_host_dbg_mem_stats;
4409
4410typedef struct {
4411 /* Only TLV */
4412 int32_t dummy;/* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */
4413} wmi_host_dbg_peer_stats;
4414
4415/**
4416 * struct wmi_host_dbg_stats - host debug stats
4417 * @tx: TX stats of type wmi_host_dbg_tx_stats
4418 * @rx: RX stats of type wmi_host_dbg_rx_stats
4419 * @mem: Memory stats of type wmi_host_dbg_mem_stats
4420 * @peer: peer stats of type wmi_host_dbg_peer_stats
4421 */
4422typedef struct {
4423 wmi_host_dbg_tx_stats tx;
4424 wmi_host_dbg_rx_stats rx;
4425 wmi_host_dbg_mem_stats mem;
4426 wmi_host_dbg_peer_stats peer;
4427} wmi_host_dbg_stats;
4428
4429/**
4430 * struct wmi_host_pdev_stats - PDEV stats
4431 * @chan_nf: Channel noise floor
4432 * @tx_frame_count: TX frame count
4433 * @rx_frame_count: RX frame count
4434 * @rx_clear_count: rx clear count
4435 * @cycle_count: cycle count
4436 * @phy_err_count: Phy error count
4437 * @chan_tx_pwr: Channel Tx Power
4438 * @pdev_stats: WAL dbg stats
4439 * @ackRcvBad:
4440 * @rtsBad:
4441 * @rtsGood:
4442 * @fcsBad:
4443 * @noBeacons:
4444 * @mib_int_count:
4445 */
4446typedef struct {
4447 int32_t chan_nf;
4448 uint32_t tx_frame_count;
4449 uint32_t rx_frame_count;
4450 uint32_t rx_clear_count;
4451 uint32_t cycle_count;
4452 uint32_t phy_err_count;
4453 uint32_t chan_tx_pwr;
4454 wmi_host_dbg_stats pdev_stats;
4455 uint32_t ackRcvBad;
4456 uint32_t rtsBad;
4457 uint32_t rtsGood;
4458 uint32_t fcsBad;
4459 uint32_t noBeacons;
4460 uint32_t mib_int_count;
4461} wmi_host_pdev_stats;
4462
4463/**
4464 * struct wmi_host_snr_info - WMI host Signal to noise ration info
4465 * @bcn_snr: beacon SNR
4466 * @dat_snr: Data frames SNR
4467 */
4468typedef struct {
4469 int32_t bcn_snr;
4470 int32_t dat_snr;
4471} wmi_host_snr_info;
4472
4473#define WMI_HOST_MAX_TX_RATE_VALUES 10 /*Max Tx Rates */
4474#define WMI_HOST_MAX_RSSI_VALUES 10 /*Max Rssi values */
4475
4476/* The WLAN_MAX_AC macro cannot be changed without breaking
4477 * * WMI compatibility.
4478 * * The maximum value of access category
4479 * */
4480#define WMI_HOST_WLAN_MAX_AC 4
4481
4482/**
4483 * struct wmi_host_vdev_stats - vdev stats structure
4484 * @vdev_id: unique id identifying the VDEV, generated by the caller
4485 * Rest all Only TLV
4486 * @vdev_snr: wmi_host_snr_info
4487 * @tx_frm_cnt: Total number of packets(per AC) that were successfully
4488 * transmitted (with and without retries,
4489 * including multi-cast, broadcast)
4490 * @rx_frm_cnt: Total number of packets that were successfully received
4491 * (after appropriate filter rules including multi-cast, broadcast)
4492 * @multiple_retry_cnt: The number of MSDU packets and MMPDU frames per AC
4493 * that the 802.11 station successfully transmitted after
4494 * more than one retransmission attempt
4495 * @fail_cnt: Total number packets(per AC) failed to transmit
4496 * @rts_fail_cnt: Total number of RTS/CTS sequence failures for transmission
4497 * of a packet
4498 * @rts_succ_cnt: Total number of RTS/CTS sequence success for transmission
4499 * of a packet
4500 * @rx_err_cnt: The receive error count. HAL will provide the
4501 * RxP FCS error global
4502 * @rx_discard_cnt: The sum of the receive error count and
4503 * dropped-receive-buffer error count (FCS error)
4504 * @ack_fail_cnt: Total number packets failed transmit because of no
4505 * ACK from the remote entity
4506 * @tx_rate_history:History of last ten transmit rate, in units of 500 kbit/sec
4507 * @bcn_rssi_history: History of last ten Beacon rssi of the connected Bss
4508 */
4509typedef struct {
4510 uint32_t vdev_id;
4511 /* Rest all Only TLV */
4512 wmi_host_snr_info vdev_snr;
4513 uint32_t tx_frm_cnt[WMI_HOST_WLAN_MAX_AC];
4514 uint32_t rx_frm_cnt;
4515 uint32_t multiple_retry_cnt[WMI_HOST_WLAN_MAX_AC];
4516 uint32_t fail_cnt[WMI_HOST_WLAN_MAX_AC];
4517 uint32_t rts_fail_cnt;
4518 uint32_t rts_succ_cnt;
4519 uint32_t rx_err_cnt;
4520 uint32_t rx_discard_cnt;
4521 uint32_t ack_fail_cnt;
4522 uint32_t tx_rate_history[WMI_HOST_MAX_TX_RATE_VALUES];
4523 uint32_t bcn_rssi_history[WMI_HOST_MAX_RSSI_VALUES];
4524} wmi_host_vdev_stats;
4525
4526/**
4527 * struct wmi_host_vdev_extd_stats - VDEV extended stats
4528 * @vdev_id: unique id identifying the VDEV, generated by the caller
4529 * @ppdu_aggr_cnt: No of Aggrs Queued to HW
4530 * @ppdu_noack: No of PPDU's not Acked includes both aggr and nonaggr's
4531 * @mpdu_queued: No of MPDU/Subframes's queued to HW in Aggregates
4532 * @ppdu_nonaggr_cnt: No of NonAggr/MPDU/Subframes's queued to HW
4533 * in Legacy NonAggregates
4534 * @mpdu_sw_requed: No of MPDU/Subframes's SW requeued includes
4535 * both Aggr and NonAggr
4536 * @mpdu_suc_retry: No of MPDU/Subframes's transmitted Successfully
4537 * after Single/mul HW retry
4538 * @mpdu_suc_multitry: No of MPDU/Subframes's transmitted Success
4539 * after Multiple HW retry
4540 * @mpdu_fail_retry: No of MPDU/Subframes's failed transmission
4541 * after Multiple HW retry
4542 * @reserved[13]: for future extensions set to 0x0
4543 */
4544typedef struct {
4545 uint32_t vdev_id;
4546 uint32_t ppdu_aggr_cnt;
4547 uint32_t ppdu_noack;
4548 uint32_t mpdu_queued;
4549 uint32_t ppdu_nonaggr_cnt;
4550 uint32_t mpdu_sw_requed;
4551 uint32_t mpdu_suc_retry;
4552 uint32_t mpdu_suc_multitry;
4553 uint32_t mpdu_fail_retry;
4554 uint32_t reserved[13];
4555} wmi_host_vdev_extd_stats;
4556
4557/**
4558 * struct wmi_host_peer_stats - peer stats
4559 * @peer_macaddr: peer MAC address
4560 * @peer_rssi: rssi
4561 * @peer_rssi_seq_num: rssi sequence number
4562 * @peer_tx_rate: last tx data rate used for peer
4563 * @peer_rx_rate: last rx data rate used for peer
4564 * @currentper: Current PER
4565 * @retries: Retries happend during transmission
4566 * @txratecount: Maximum Aggregation Size
4567 * @max4msframelen: Max4msframelen of tx rates used
4568 * @totalsubframes: Total no of subframes
4569 * @txbytes: No of bytes transmitted to the client
4570 * @nobuffs[4]: Packet Loss due to buffer overflows
4571 * @excretries[4]: Packet Loss due to excessive retries
4572 * @peer_rssi_changed: how many times peer's RSSI changed by a
4573 * non-negligible amount
4574 */
4575typedef struct {
4576 wmi_host_mac_addr peer_macaddr;
4577 uint32_t peer_rssi;
4578 uint32_t peer_rssi_seq_num;
4579 uint32_t peer_tx_rate;
4580 uint32_t peer_rx_rate;
4581 uint32_t currentper;
4582 uint32_t retries;
4583 uint32_t txratecount;
4584 uint32_t max4msframelen;
4585 uint32_t totalsubframes;
4586 uint32_t txbytes;
4587 uint32_t nobuffs[4];
4588 uint32_t excretries[4];
4589 uint32_t peer_rssi_changed;
4590} wmi_host_peer_stats;
4591
4592typedef struct {
4593 uint32_t dummy;
4594} wmi_host_bcnflt_stats;
4595
4596/**
4597 * struct wmi_host_chan_stats - WMI chan stats
4598 * @chan_mhz: Primary channel freq of the channel for which stats are sent
4599 * @sampling_period_us: Time spent on the channel
4600 * @rx_clear_count: Aggregate duration over a sampling period for
4601 * which channel activity was observed
4602 * @tx_duration_us: Accumalation of the TX PPDU duration over a sampling period
4603 * @rx_duration_us: Accumalation of the RX PPDU duration over a sampling period
4604 */
4605typedef struct {
4606 uint32_t chan_mhz;
4607 uint32_t sampling_period_us;
4608 uint32_t rx_clear_count;
4609 uint32_t tx_duration_us;
4610 uint32_t rx_duration_us;
4611} wmi_host_chan_stats;
4612
4613#define WMI_EVENT_ID_INVALID 0
4614/**
4615 * Host based ENUM IDs for events to abstract target enums for event_id
4616 */
4617typedef enum {
4618 wmi_service_ready_event_id = 0,
4619 wmi_ready_event_id,
4620 wmi_dbg_msg_event_id,
4621 wmi_scan_event_id,
4622 wmi_echo_event_id,
4623 wmi_update_stats_event_id,
4624 wmi_inst_rssi_stats_event_id,
4625 wmi_vdev_start_resp_event_id,
4626 wmi_vdev_standby_req_event_id,
4627 wmi_vdev_resume_req_event_id,
4628 wmi_vdev_stopped_event_id,
4629 wmi_peer_sta_kickout_event_id,
4630 wmi_host_swba_event_id,
4631 wmi_tbttoffset_update_event_id,
4632 wmi_mgmt_rx_event_id,
4633 wmi_chan_info_event_id,
4634 wmi_phyerr_event_id,
4635 wmi_roam_event_id,
4636 wmi_profile_match,
4637 wmi_debug_print_event_id,
4638 wmi_pdev_qvit_event_id,
4639 wmi_wlan_profile_data_event_id,
4640 wmi_rtt_meas_report_event_id,
4641 wmi_tsf_meas_report_event_id,
4642 wmi_rtt_error_report_event_id,
4643 wmi_rtt_keepalive_event_id,
4644 wmi_oem_cap_event_id,
4645 wmi_oem_meas_report_event_id,
4646 wmi_oem_report_event_id,
4647 wmi_nan_event_id,
4648 wmi_wow_wakeup_host_event_id,
4649 wmi_gtk_offload_status_event_id,
4650 wmi_gtk_rekey_fail_event_id,
4651 wmi_dcs_interference_event_id,
4652 wmi_pdev_tpc_config_event_id,
4653 wmi_csa_handling_event_id,
4654 wmi_gpio_input_event_id,
4655 wmi_peer_ratecode_list_event_id,
4656 wmi_generic_buffer_event_id,
4657 wmi_mcast_buf_release_event_id,
4658 wmi_mcast_list_ageout_event_id,
4659 wmi_vdev_get_keepalive_event_id,
4660 wmi_wds_peer_event_id,
4661 wmi_peer_sta_ps_statechg_event_id,
4662 wmi_pdev_fips_event_id,
4663 wmi_tt_stats_event_id,
4664 wmi_pdev_channel_hopping_event_id,
4665 wmi_pdev_ani_cck_level_event_id,
4666 wmi_pdev_ani_ofdm_level_event_id,
4667 wmi_pdev_reserve_ast_entry_event_id,
4668 wmi_pdev_nfcal_power_event_id,
4669 wmi_pdev_tpc_event_id,
4670 wmi_pdev_get_ast_info_event_id,
4671 wmi_pdev_temperature_event_id,
4672 wmi_pdev_nfcal_power_all_channels_event_id,
4673 wmi_pdev_bss_chan_info_event_id,
4674 wmi_mu_report_event_id,
4675 wmi_pdev_utf_event_id,
4676 wmi_pdev_dump_event_id,
4677 wmi_tx_pause_event_id,
4678 wmi_dfs_radar_event_id,
4679 wmi_pdev_l1ss_track_event_id,
4680 wmi_service_ready_ext_event_id,
4681 wmi_vdev_install_key_complete_event_id,
4682 wmi_vdev_mcc_bcn_intvl_change_req_event_id,
4683 wmi_vdev_tsf_report_event_id,
4684 wmi_peer_info_event_id,
4685 wmi_peer_tx_fail_cnt_thr_event_id,
4686 wmi_peer_estimated_linkspeed_event_id,
4687 wmi_peer_state_event_id,
4688 wmi_offload_bcn_tx_status_event_id,
4689 wmi_offload_prob_resp_tx_status_event_id,
4690 wmi_mgmt_tx_completion_event_id,
4691 wmi_tx_delba_complete_event_id,
4692 wmi_tx_addba_complete_event_id,
4693 wmi_ba_rsp_ssn_event_id,
4694 wmi_aggr_state_trig_event_id,
4695 wmi_roam_synch_event_id,
4696 wmi_p2p_disc_event_id,
4697 wmi_p2p_noa_event_id,
4698 wmi_pdev_resume_event_id,
4699 wmi_do_wow_disable_ack_event_id,
4700 wmi_wow_initial_wakeup_event_id,
4701 wmi_stats_ext_event_id,
4702 wmi_iface_link_stats_event_id,
4703 wmi_peer_link_stats_event_id,
4704 wmi_radio_link_stats_link,
4705 wmi_update_fw_mem_dump_event_id,
4706 wmi_diag_event_id_log_supported_event_id,
4707 wmi_nlo_match_event_id,
4708 wmi_nlo_scan_complete_event_id,
4709 wmi_apfind_event_id,
4710 wmi_passpoint_match_event_id,
4711 wmi_chatter_pc_query_event_id,
4712 wmi_pdev_ftm_intg_event_id,
4713 wmi_wlan_freq_avoid_event_id,
4714 wmi_thermal_mgmt_event_id,
4715 wmi_diag_container_event_id,
4716 wmi_host_auto_shutdown_event_id,
4717 wmi_update_whal_mib_stats_event_id,
4718 wmi_update_vdev_rate_stats_event_id,
4719 wmi_diag_event_id,
4720 wmi_ocb_set_sched_event_id,
4721 wmi_dbg_mesg_flush_complete_event_id,
4722 wmi_rssi_breach_event_id,
4723 wmi_uploadh_event_id,
4724 wmi_captureh_event_id,
4725 wmi_rfkill_state_change_event_id,
4726 wmi_tdls_peer_event_id,
4727 wmi_batch_scan_enabled_event_id,
4728 wmi_batch_scan_result_event_id,
4729 wmi_lpi_result_event_id,
4730 wmi_lpi_status_event_id,
4731 wmi_lpi_handoff_event_id,
4732 wmi_extscan_start_stop_event_id,
4733 wmi_extscan_operation_event_id,
4734 wmi_extscan_table_usage_event_id,
4735 wmi_extscan_cached_results_event_id,
4736 wmi_extscan_wlan_change_results_event_id,
4737 wmi_extscan_hotlist_match_event_id,
4738 wmi_extscan_capabilities_event_id,
4739 wmi_extscan_hotlist_ssid_match_event_id,
4740 wmi_mdns_stats_event_id,
4741 wmi_sap_ofl_add_sta_event_id,
4742 wmi_sap_ofl_del_sta_event_id,
4743 wmi_ocb_set_config_resp_event_id,
4744 wmi_ocb_get_tsf_timer_resp_event_id,
4745 wmi_dcc_get_stats_resp_event_id,
4746 wmi_dcc_update_ndl_resp_event_id,
4747 wmi_dcc_stats_event_id,
4748 wmi_soc_set_hw_mode_resp_event_id,
4749 wmi_soc_hw_mode_transition_event_id,
4750 wmi_soc_set_dual_mac_config_resp_event_id,
4751 wmi_tx_data_traffic_ctrl_event_id,
4752
4753 wmi_events_max,
4754} wmi_conv_event_id;
4755
4756#define WMI_UNAVAILABLE_PARAM 0
4757/**
4758 * Host based ENUM IDs for PDEV params to abstract target enums
4759 */
4760typedef enum {
4761 wmi_pdev_param_tx_chain_mask = 0,
4762 wmi_pdev_param_rx_chain_mask,
4763 wmi_pdev_param_txpower_limit2g,
4764 wmi_pdev_param_txpower_limit5g,
4765 wmi_pdev_param_txpower_scale,
4766 wmi_pdev_param_beacon_gen_mode,
4767 wmi_pdev_param_beacon_tx_mode,
4768 wmi_pdev_param_resmgr_offchan_mode,
4769 wmi_pdev_param_protection_mode,
4770 wmi_pdev_param_dynamic_bw,
4771 wmi_pdev_param_non_agg_sw_retry_th,
4772 wmi_pdev_param_agg_sw_retry_th,
4773 wmi_pdev_param_sta_kickout_th,
4774 wmi_pdev_param_ac_aggrsize_scaling,
4775 wmi_pdev_param_ltr_enable,
4776 wmi_pdev_param_ltr_ac_latency_be,
4777 wmi_pdev_param_ltr_ac_latency_bk,
4778 wmi_pdev_param_ltr_ac_latency_vi,
4779 wmi_pdev_param_ltr_ac_latency_vo,
4780 wmi_pdev_param_ltr_ac_latency_timeout,
4781 wmi_pdev_param_ltr_sleep_override,
4782 wmi_pdev_param_ltr_rx_override,
4783 wmi_pdev_param_ltr_tx_activity_timeout,
4784 wmi_pdev_param_l1ss_enable,
4785 wmi_pdev_param_dsleep_enable,
4786 wmi_pdev_param_pcielp_txbuf_flush,
4787 wmi_pdev_param_pcielp_txbuf_watermark,
4788 wmi_pdev_param_pcielp_txbuf_tmo_en,
4789 wmi_pdev_param_pcielp_txbuf_tmo_value,
4790 wmi_pdev_param_pdev_stats_update_period,
4791 wmi_pdev_param_vdev_stats_update_period,
4792 wmi_pdev_param_peer_stats_update_period,
4793 wmi_pdev_param_bcnflt_stats_update_period,
4794 wmi_pdev_param_pmf_qos,
4795 wmi_pdev_param_arp_ac_override,
4796 wmi_pdev_param_dcs,
4797 wmi_pdev_param_ani_enable,
4798 wmi_pdev_param_ani_poll_period,
4799 wmi_pdev_param_ani_listen_period,
4800 wmi_pdev_param_ani_ofdm_level,
4801 wmi_pdev_param_ani_cck_level,
4802 wmi_pdev_param_dyntxchain,
4803 wmi_pdev_param_proxy_sta,
4804 wmi_pdev_param_idle_ps_config,
4805 wmi_pdev_param_power_gating_sleep,
4806 wmi_pdev_param_aggr_burst,
4807 wmi_pdev_param_rx_decap_mode,
4808 wmi_pdev_param_fast_channel_reset,
4809 wmi_pdev_param_burst_dur,
4810 wmi_pdev_param_burst_enable,
4811 wmi_pdev_param_smart_antenna_default_antenna,
4812 wmi_pdev_param_igmpmld_override,
4813 wmi_pdev_param_igmpmld_tid,
4814 wmi_pdev_param_antenna_gain,
4815 wmi_pdev_param_rx_filter,
4816 wmi_pdev_set_mcast_to_ucast_tid,
4817 wmi_pdev_param_proxy_sta_mode,
4818 wmi_pdev_param_set_mcast2ucast_mode,
4819 wmi_pdev_param_set_mcast2ucast_buffer,
4820 wmi_pdev_param_remove_mcast2ucast_buffer,
4821 wmi_pdev_peer_sta_ps_statechg_enable,
4822 wmi_pdev_param_igmpmld_ac_override,
4823 wmi_pdev_param_block_interbss,
4824 wmi_pdev_param_set_disable_reset_cmdid,
4825 wmi_pdev_param_set_msdu_ttl_cmdid,
4826 wmi_pdev_param_set_ppdu_duration_cmdid,
4827 wmi_pdev_param_txbf_sound_period_cmdid,
4828 wmi_pdev_param_set_promisc_mode_cmdid,
4829 wmi_pdev_param_set_burst_mode_cmdid,
4830 wmi_pdev_param_en_stats,
4831 wmi_pdev_param_mu_group_policy,
4832 wmi_pdev_param_noise_detection,
4833 wmi_pdev_param_noise_threshold,
4834 wmi_pdev_param_dpd_enable,
4835 wmi_pdev_param_set_mcast_bcast_echo,
4836 wmi_pdev_param_atf_strict_sch,
4837 wmi_pdev_param_atf_sched_duration,
4838 wmi_pdev_param_ant_plzn,
4839 wmi_pdev_param_mgmt_retry_limit,
4840 wmi_pdev_param_sensitivity_level,
4841 wmi_pdev_param_signed_txpower_2g,
4842 wmi_pdev_param_signed_txpower_5g,
4843 wmi_pdev_param_enable_per_tid_amsdu,
4844 wmi_pdev_param_enable_per_tid_ampdu,
4845 wmi_pdev_param_cca_threshold,
4846 wmi_pdev_param_rts_fixed_rate,
4847 wmi_pdev_param_cal_period,
4848 wmi_pdev_param_pdev_reset,
4849 wmi_pdev_param_wapi_mbssid_offset,
4850 wmi_pdev_param_arp_srcaddr,
4851 wmi_pdev_param_arp_dstaddr,
4852 wmi_pdev_param_txpower_decr_db,
4853 wmi_pdev_param_rx_batchmode,
4854 wmi_pdev_param_packet_aggr_delay,
4855 wmi_pdev_param_atf_obss_noise_sch,
4856 wmi_pdev_param_atf_obss_noise_scaling_factor,
4857 wmi_pdev_param_cust_txpower_scale,
4858 wmi_pdev_param_atf_dynamic_enable,
4859 wmi_pdev_param_atf_ssid_group_policy,
4860 wmi_pdev_param_rfkill_enable,
4861 wmi_pdev_param_hw_rfkill_config,
4862 wmi_pdev_param_low_power_rf_enable,
4863 wmi_pdev_param_l1ss_track,
4864 wmi_pdev_param_hyst_en,
4865 wmi_pdev_param_power_collapse_enable,
4866 wmi_pdev_param_led_sys_state,
4867 wmi_pdev_param_led_enable,
4868 wmi_pdev_param_audio_over_wlan_latency,
4869 wmi_pdev_param_audio_over_wlan_enable,
4870 wmi_pdev_param_whal_mib_stats_update_enable,
4871 wmi_pdev_param_vdev_rate_stats_update_period,
4872 wmi_pdev_param_cts_cbw,
4873 wmi_pdev_param_wnts_config,
4874 wmi_pdev_param_adaptive_early_rx_enable,
4875 wmi_pdev_param_adaptive_early_rx_min_sleep_slop,
4876 wmi_pdev_param_adaptive_early_rx_inc_dec_step,
4877 wmi_pdev_param_early_rx_fix_sleep_slop,
4878 wmi_pdev_param_bmiss_based_adaptive_bto_enable,
4879 wmi_pdev_param_bmiss_bto_min_bcn_timeout,
4880 wmi_pdev_param_bmiss_bto_inc_dec_step,
4881 wmi_pdev_param_bto_fix_bcn_timeout,
4882 wmi_pdev_param_ce_based_adaptive_bto_enable,
4883 wmi_pdev_param_ce_bto_combo_ce_value,
4884 wmi_pdev_param_tx_chain_mask_2g,
4885 wmi_pdev_param_rx_chain_mask_2g,
4886 wmi_pdev_param_tx_chain_mask_5g,
4887 wmi_pdev_param_rx_chain_mask_5g,
4888 wmi_pdev_param_tx_chain_mask_cck,
4889 wmi_pdev_param_tx_chain_mask_1ss,
4890
4891 wmi_pdev_param_max,
4892} wmi_conv_pdev_params_id;
4893
4894
4895/**
4896 * Host based ENUM IDs for VDEV params to abstract target enums
4897 */
4898typedef enum {
4899 wmi_vdev_param_rts_threshold = 0,
4900 wmi_vdev_param_fragmentation_threshold,
4901 wmi_vdev_param_beacon_interval,
4902 wmi_vdev_param_listen_interval,
4903 wmi_vdev_param_multicast_rate,
4904 wmi_vdev_param_mgmt_tx_rate,
4905 wmi_vdev_param_slot_time,
4906 wmi_vdev_param_preamble,
4907 wmi_vdev_param_swba_time,
4908 wmi_vdev_stats_update_period,
4909 wmi_vdev_pwrsave_ageout_time,
4910 wmi_vdev_host_swba_interval,
4911 wmi_vdev_param_dtim_period,
4912 wmi_vdev_oc_scheduler_air_time_limit,
4913 wmi_vdev_param_wds,
4914 wmi_vdev_param_atim_window,
4915 wmi_vdev_param_bmiss_count_max,
4916 wmi_vdev_param_bmiss_first_bcnt,
4917 wmi_vdev_param_bmiss_final_bcnt,
4918 wmi_vdev_param_feature_wmm,
4919 wmi_vdev_param_chwidth,
4920 wmi_vdev_param_chextoffset,
4921 wmi_vdev_param_disable_htprotection,
4922 wmi_vdev_param_sta_quickkickout,
4923 wmi_vdev_param_mgmt_rate,
4924 wmi_vdev_param_protection_mode,
4925 wmi_vdev_param_fixed_rate,
4926 wmi_vdev_param_sgi,
4927 wmi_vdev_param_ldpc,
4928 wmi_vdev_param_tx_stbc,
4929 wmi_vdev_param_rx_stbc,
4930 wmi_vdev_param_intra_bss_fwd,
4931 wmi_vdev_param_def_keyid,
4932 wmi_vdev_param_nss,
4933 wmi_vdev_param_bcast_data_rate,
4934 wmi_vdev_param_mcast_data_rate,
4935 wmi_vdev_param_mcast_indicate,
4936 wmi_vdev_param_dhcp_indicate,
4937 wmi_vdev_param_unknown_dest_indicate,
4938 wmi_vdev_param_ap_keepalive_min_idle_inactive_time_secs,
4939 wmi_vdev_param_ap_keepalive_max_idle_inactive_time_secs,
4940 wmi_vdev_param_ap_keepalive_max_unresponsive_time_secs,
4941 wmi_vdev_param_ap_enable_nawds,
4942 wmi_vdev_param_mcast2ucast_set,
4943 wmi_vdev_param_enable_rtscts,
4944 wmi_vdev_param_rc_num_retries,
4945 wmi_vdev_param_txbf,
4946 wmi_vdev_param_packet_powersave,
4947 wmi_vdev_param_drop_unencry,
4948 wmi_vdev_param_tx_encap_type,
4949 wmi_vdev_param_ap_detect_out_of_sync_sleeping_sta_time_secs,
4950 wmi_vdev_param_cabq_maxdur,
4951 wmi_vdev_param_mfptest_set,
4952 wmi_vdev_param_rts_fixed_rate,
4953 wmi_vdev_param_vht_sgimask,
4954 wmi_vdev_param_vht80_ratemask,
4955 wmi_vdev_param_early_rx_adjust_enable,
4956 wmi_vdev_param_early_rx_tgt_bmiss_num,
4957 wmi_vdev_param_early_rx_bmiss_sample_cycle,
4958 wmi_vdev_param_early_rx_slop_step,
4959 wmi_vdev_param_early_rx_init_slop,
4960 wmi_vdev_param_early_rx_adjust_pause,
4961 wmi_vdev_param_proxy_sta,
4962 wmi_vdev_param_meru_vc,
4963 wmi_vdev_param_rx_decap_type,
4964 wmi_vdev_param_bw_nss_ratemask,
4965 wmi_vdev_param_sensor_ap,
4966 wmi_vdev_param_beacon_rate,
4967 wmi_vdev_param_dtim_enable_cts,
4968 wmi_vdev_param_sta_kickout,
4969 wmi_vdev_param_tx_pwrlimit,
4970 wmi_vdev_param_snr_num_for_cal,
4971 wmi_vdev_param_roam_fw_offload,
4972 wmi_vdev_param_enable_rmc,
4973 wmi_vdev_param_ibss_max_bcn_lost_ms,
4974 wmi_vdev_param_max_rate,
4975 wmi_vdev_param_early_rx_drift_sample,
4976 wmi_vdev_param_set_ibss_tx_fail_cnt_thr,
4977 wmi_vdev_param_ebt_resync_timeout,
4978 wmi_vdev_param_aggr_trig_event_enable,
4979 wmi_vdev_param_is_ibss_power_save_allowed,
4980 wmi_vdev_param_is_power_collapse_allowed,
4981 wmi_vdev_param_is_awake_on_txrx_enabled,
4982 wmi_vdev_param_inactivity_cnt,
4983 wmi_vdev_param_txsp_end_inactivity_time_ms,
4984 wmi_vdev_param_dtim_policy,
4985 wmi_vdev_param_ibss_ps_warmup_time_secs,
4986 wmi_vdev_param_ibss_ps_1rx_chain_in_atim_window_enable,
4987 wmi_vdev_param_rx_leak_window,
4988 wmi_vdev_param_stats_avg_factor,
4989 wmi_vdev_param_disconnect_th,
4990 wmi_vdev_param_rtscts_rate,
4991 wmi_vdev_param_mcc_rtscts_protection_enable,
4992 wmi_vdev_param_mcc_broadcast_probe_enable,
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05304993 wmi_vdev_param_capabilities,
Govind Singh89727882016-04-15 13:58:27 +05304994
4995 wmi_vdev_param_max,
4996} wmi_conv_vdev_param_id;
4997
4998/**
4999 * Host based ENUM IDs for service bits to abstract target enums
5000 */
5001typedef enum {
5002 wmi_service_beacon_offload = 0,
5003 wmi_service_scan_offload,
5004 wmi_service_roam_offload,
5005 wmi_service_bcn_miss_offload,
5006 wmi_service_sta_pwrsave,
5007 wmi_service_sta_advanced_pwrsave,
5008 wmi_service_ap_uapsd,
5009 wmi_service_ap_dfs,
5010 wmi_service_11ac,
5011 wmi_service_blockack,
5012 wmi_service_phyerr,
5013 wmi_service_bcn_filter,
5014 wmi_service_rtt,
5015 wmi_service_ratectrl,
5016 wmi_service_wow,
5017 wmi_service_ratectrl_cache,
5018 wmi_service_iram_tids,
5019 wmi_service_burst,
5020 wmi_service_smart_antenna_sw_support,
5021 wmi_service_gtk_offload,
5022 wmi_service_scan_sch,
5023 wmi_service_csa_offload,
5024 wmi_service_chatter,
5025 wmi_service_coex_freqavoid,
5026 wmi_service_packet_power_save,
5027 wmi_service_force_fw_hang,
5028 wmi_service_smart_antenna_hw_support,
5029 wmi_service_gpio,
5030 wmi_sta_uapsd_basic_auto_trig,
5031 wmi_sta_uapsd_var_auto_trig,
5032 wmi_service_sta_keep_alive,
5033 wmi_service_tx_encap,
5034 wmi_service_ap_ps_detect_out_of_sync,
5035 wmi_service_early_rx,
5036 wmi_service_enhanced_proxy_sta,
5037 wmi_service_tt,
5038 wmi_service_atf,
5039 wmi_service_peer_caching,
5040 wmi_service_coex_gpio,
5041 wmi_service_aux_spectral_intf,
5042 wmi_service_aux_chan_load_intf,
5043 wmi_service_bss_channel_info_64,
5044 wmi_service_ext_res_cfg_support,
5045 wmi_service_mesh,
5046 wmi_service_restrt_chnl_support,
5047 wmi_service_roam_scan_offload,
5048 wmi_service_arpns_offload,
5049 wmi_service_nlo,
5050 wmi_service_sta_dtim_ps_modulated_dtim,
5051 wmi_service_sta_smps,
5052 wmi_service_fwtest,
5053 wmi_service_sta_wmmac,
5054 wmi_service_tdls,
5055 wmi_service_mcc_bcn_interval_change,
5056 wmi_service_adaptive_ocs,
5057 wmi_service_ba_ssn_support,
5058 wmi_service_filter_ipsec_natkeepalive,
5059 wmi_service_wlan_hb,
5060 wmi_service_lte_ant_share_support,
5061 wmi_service_batch_scan,
5062 wmi_service_qpower,
5063 wmi_service_plmreq,
5064 wmi_service_thermal_mgmt,
5065 wmi_service_rmc,
5066 wmi_service_mhf_offload,
5067 wmi_service_coex_sar,
5068 wmi_service_bcn_txrate_override,
5069 wmi_service_nan,
5070 wmi_service_l1ss_stat,
5071 wmi_service_estimate_linkspeed,
5072 wmi_service_obss_scan,
5073 wmi_service_tdls_offchan,
5074 wmi_service_tdls_uapsd_buffer_sta,
5075 wmi_service_tdls_uapsd_sleep_sta,
5076 wmi_service_ibss_pwrsave,
5077 wmi_service_lpass,
5078 wmi_service_extscan,
5079 wmi_service_d0wow,
5080 wmi_service_hsoffload,
5081 wmi_service_roam_ho_offload,
5082 wmi_service_rx_full_reorder,
5083 wmi_service_dhcp_offload,
5084 wmi_service_sta_rx_ipa_offload_support,
5085 wmi_service_mdns_offload,
5086 wmi_service_sap_auth_offload,
5087 wmi_service_dual_band_simultaneous_support,
5088 wmi_service_ocb,
5089 wmi_service_ap_arpns_offload,
5090 wmi_service_per_band_chainmask_support,
5091 wmi_service_packet_filter_offload,
5092 wmi_service_mgmt_tx_htt,
5093 wmi_service_mgmt_tx_wmi,
5094 wmi_service_ext_msg,
5095 wmi_service_mawc,
5096
5097 wmi_service_peer_stats,
5098 wmi_service_mesh_11s,
5099 wmi_service_periodic_chan_stat_support,
5100 wmi_service_tx_mode_push_only,
5101 wmi_service_tx_mode_push_pull,
5102 wmi_service_tx_mode_dynamic,
5103
5104 wmi_services_max,
5105} wmi_conv_service_ids;
5106#define WMI_SERVICE_UNAVAILABLE 0xFFFF
5107
5108/**
5109 * struct target_capability_info - Target capabilities in service ready
5110 * @phy_capability: PHY capabilities
5111 * @max_frag_entry: Maximum frag entries
5112 * @num_rf_chains: Number of RF chains supported
5113 * @ht_cap_info: HT cap info
5114 * @vht_cap_info: VHT cap info
5115 * @vht_supp_mcs: VHT Supported MCS
5116 * @hw_min_tx_power: HW minimum tx power
5117 * @hw_max_tx_power: HW maximum tx power
5118 * @sys_cap_info: sys capability info
5119 * @min_pkt_size_enable: Enterprise mode short pkt enable
5120 * @max_bcn_ie_size: Max beacon and probe rsp IE offload size
5121 * @max_num_scan_channels: Max scan channels
5122 * @max_supported_macs: max supported MCS
5123 * @wmi_fw_sub_feat_caps: FW sub feature capabilities
5124 * @txrx_chainmask: TXRX chain mask
5125 * @default_dbs_hw_mode_index: DBS hw mode index
5126 * @num_msdu_desc: number of msdu desc
5127 */
5128typedef struct {
5129 uint32_t phy_capability;
5130 uint32_t max_frag_entry;
5131 uint32_t num_rf_chains;
5132 uint32_t ht_cap_info;
5133 uint32_t vht_cap_info;
5134 uint32_t vht_supp_mcs;
5135 uint32_t hw_min_tx_power;
5136 uint32_t hw_max_tx_power;
5137 uint32_t sys_cap_info;
5138 uint32_t min_pkt_size_enable;
5139 uint32_t max_bcn_ie_size;
5140 uint32_t max_num_scan_channels;
5141 uint32_t max_supported_macs;
5142 uint32_t wmi_fw_sub_feat_caps;
5143 uint32_t txrx_chainmask;
5144 uint32_t default_dbs_hw_mode_index;
5145 uint32_t num_msdu_desc;
5146} target_capability_info;
5147
5148/**
5149 * struct wmi_host_fw_ver - FW version in non-tlv target
5150 * @sw_version: Versin info
5151 * @sw_version_1: Second dword of version
5152 */
5153struct wmi_host_fw_ver {
5154 uint32_t sw_version;
5155 uint32_t sw_version_1;
5156};
5157
5158/**
5159 * struct wmi_host_fw_abi_ver - FW version in non-tlv target
5160 * @sw_version: Versin info
5161 * @abi_version: ABI version
5162 */
5163struct wmi_host_fw_abi_ver {
5164 uint32_t sw_version;
5165 uint32_t abi_version;
5166};
5167
5168/**
5169 * struct target_resource_config - Resource config sent from host to target
5170 * abstracted out to include union of both configs
5171 * @num_vdevs: Number vdevs configured
5172 * @num_peers: Number of peers
5173 * @num_active_peers: Number of active peers for peer cache
5174 * @num_offload_peers: Number of offload peers
5175 * @num_offload_reorder_buffs: number of offload reorder buffs
5176 * @num_peer_keys: number of peer keys
5177 * @num_tids: number of tids
5178 * @ast_skid_limit: AST skid limit
5179 * @tx_chain_mask: TX chain mask
5180 * @rx_chain_mask: RX chain mask
5181 * @rx_timeout_pri: RX reorder timeout per AC
5182 * @rx_decap_mode: RX decap mode
5183 * @scan_max_pending_req: Scan mac pending req
5184 * @bmiss_offload_max_vdev: Beacom miss offload max vdevs
5185 * @roam_offload_max_vdev: Roam offload max vdevs
5186 * @roam_offload_max_ap_profiles: roam offload max ap profiles
5187 * @num_mcast_groups: num mcast groups
5188 * @num_mcast_table_elems: number of macst table elems
5189 * @mcast2ucast_mode: mcast enhance mode
5190 * @tx_dbg_log_size: DBG log buf size
5191 * @num_wds_entries: number of WDS entries
5192 * @dma_burst_size: DMA burst size.
5193 * @mac_aggr_delim: Mac aggr delim
5194 * @rx_skip_defrag_timeout_dup_detection_check: Defrag dup check in host?
5195 * @vow_config: vow configuration
5196 * @gtk_offload_max_vdev: Max vdevs for GTK offload
5197 * @num_msdu_desc: Number of msdu desc
5198 * @max_frag_entries: Max frag entries
5199 * End common
5200 * @max_peer_ext_stats: Max peer EXT stats
5201 * @smart_ant_cap: Smart antenna capabilities
5202 * @BK_Minfree: BIN configuration for BK traffic
5203 * @BE_Minfree: BIN configuration for BE traffic
5204 * @VI_Minfree: BIN configuration for VI traffic
5205 * @VO_Minfree: BIN configuration for VO traffic
5206 * @rx_batchmode: RX batch mode
5207 * @tt_support: Thermal throttling support
5208 * @atf_config: ATF config
5209 * @iphdr_pad_config: ipheader pad config
5210 * @qwrap_config: Qwrap configuration
5211 * @alloc_frag_desc_for_data_pkt: Frag desc for data
5212 * Added in MCL
5213 * @num_tdls_vdevs:
5214 * @num_tdls_conn_table_entries:
5215 * @beacon_tx_offload_max_vdev:
5216 * @num_multicast_filter_entries:
5217 * @num_wow_filters:
5218 * @num_keep_alive_pattern:
5219 * @keep_alive_pattern_size:
5220 * @max_tdls_concurrent_sleep_sta:
5221 * @max_tdls_concurrent_buffer_sta:
5222 * @wmi_send_separate:
5223 * @num_ocb_vdevs:
5224 * @num_ocb_channels:
5225 * @num_ocb_schedules:
5226 */
5227typedef struct {
5228 uint32_t num_vdevs;
5229 uint32_t num_peers;
5230 uint32_t num_active_peers;
5231 uint32_t num_offload_peers;
5232 uint32_t num_offload_reorder_buffs;
5233 uint32_t num_peer_keys;
5234 uint32_t num_tids;
5235 uint32_t ast_skid_limit;
5236 uint32_t tx_chain_mask;
5237 uint32_t rx_chain_mask;
5238 uint32_t rx_timeout_pri[4];
5239 uint32_t rx_decap_mode;
5240 uint32_t scan_max_pending_req;
5241 uint32_t bmiss_offload_max_vdev;
5242 uint32_t roam_offload_max_vdev;
5243 uint32_t roam_offload_max_ap_profiles;
5244 uint32_t num_mcast_groups;
5245 uint32_t num_mcast_table_elems;
5246 uint32_t mcast2ucast_mode;
5247 uint32_t tx_dbg_log_size;
5248 uint32_t num_wds_entries;
5249 uint32_t dma_burst_size;
5250 uint32_t mac_aggr_delim;
5251 uint32_t rx_skip_defrag_timeout_dup_detection_check;
5252 uint32_t vow_config;
5253 uint32_t gtk_offload_max_vdev;
5254 uint32_t num_msdu_desc; /* Number of msdu desc */
5255 uint32_t max_frag_entries;
5256 /* End common */
5257
5258 /* Added for Beeliner */
5259 uint32_t max_peer_ext_stats;
5260 uint32_t smart_ant_cap;
5261 uint32_t BK_Minfree;
5262 uint32_t BE_Minfree;
5263 uint32_t VI_Minfree;
5264 uint32_t VO_Minfree;
5265 uint32_t rx_batchmode;
5266 uint32_t tt_support;
5267 uint32_t atf_config;
5268 uint32_t iphdr_pad_config;
5269 uint32_t
5270 qwrap_config:16,
5271 alloc_frag_desc_for_data_pkt:16;
5272
5273 /* Added in MCL */
5274 uint32_t num_tdls_vdevs;
5275 uint32_t num_tdls_conn_table_entries;
5276 uint32_t beacon_tx_offload_max_vdev;
5277 uint32_t num_multicast_filter_entries;
5278 uint32_t num_wow_filters;
5279 uint32_t num_keep_alive_pattern;
5280 uint32_t keep_alive_pattern_size;
5281 uint32_t max_tdls_concurrent_sleep_sta;
5282 uint32_t max_tdls_concurrent_buffer_sta;
5283 uint32_t wmi_send_separate;
5284 uint32_t num_ocb_vdevs;
5285 uint32_t num_ocb_channels;
5286 uint32_t num_ocb_schedules;
5287} target_resource_config;
5288
5289/**
5290 * struct wds_addr_event - WDS addr event structure
5291 * @event_type: event type add/delete
5292 * @peer_mac: peer mac
5293 * @dest_mac: destination mac address
5294 */
5295typedef struct {
5296 uint32_t event_type[4];
5297 u_int8_t peer_mac[IEEE80211_ADDR_LEN];
5298 u_int8_t dest_mac[IEEE80211_ADDR_LEN];
5299} wds_addr_event_t;
5300/**
5301 * Enum replicated for host abstraction with FW
5302 */
5303typedef enum {
5304 /* Event respose of START CMD */
5305 WMI_HOST_VDEV_START_RESP_EVENT = 0,
5306 /* Event respose of RESTART CMD */
5307 WMI_HOST_VDEV_RESTART_RESP_EVENT,
5308} WMI_HOST_START_EVENT_PARAM;
5309
5310/**
5311 * struct wmi_host_vdev_start_resp - VDEV start response
5312 * @vdev_id: vdev id
5313 * @requestor_id: requestor id that requested the VDEV start request
5314 * @resp_type: Respose of Event type START/RESTART
5315 * @status: status of the response
5316 * @chain_mask: Vdev chain mask
5317 * @smps_mode: Vdev mimo power save mode
5318 * @mac_id: mac_id field contains the MAC identifier that the
5319 * VDEV is bound to. The valid range is 0 to (num_macs-1).
5320 * @cfgd_tx_streams: Configured Transmit Streams
5321 * @cfgd_rx_streams: Configured Receive Streams
5322 */
5323typedef struct {
5324 uint32_t vdev_id;
5325 uint32_t requestor_id;
5326 WMI_HOST_START_EVENT_PARAM resp_type;
5327 uint32_t status;
5328 uint32_t chain_mask;
5329 uint32_t smps_mode;
5330 uint32_t mac_id;
5331 uint32_t cfgd_tx_streams;
5332 uint32_t cfgd_rx_streams;
5333} wmi_host_vdev_start_resp;
5334
5335#define WMI_HOST_ATH_MAX_ANTENNA 4
5336/**
5337 * struct wmi_host_mgmt_rx_hdr - host mgmt header params
5338 * @channel: channel on which this frame is received
5339 * @snr: snr information used to cal rssi
5340 * @rssi_ctl[WMI_HOST_ATH_MAX_ANTENNA]: RSSI of PRI 20MHz for each chain.
5341 * @rate: Rate kbps
5342 * @phy_mode: rx phy mode WLAN_PHY_MODE
5343 * @buf_len: length of the frame
5344 * @status: rx status
5345 * @flags: information about the management frame e.g. can give a
5346 * scan source for a scan result mgmt frame
5347 * @rssi: combined RSSI, i.e. the sum of the snr + noise floor (dBm units)
5348 * @tsf_delta:
5349 */
5350typedef struct {
5351 uint32_t channel;
5352 uint32_t snr;
5353 uint8_t rssi_ctl[WMI_HOST_ATH_MAX_ANTENNA];
5354 uint32_t rate;
5355 uint32_t phy_mode;
5356 uint32_t buf_len;
5357 uint32_t status;
5358 uint32_t flags;
5359 int32_t rssi;
5360 uint32_t tsf_delta;
5361} wmi_host_mgmt_rx_hdr;
5362
5363/**
5364 * struct wmi_host_roam_event - host roam event param
5365 * @vdev_id: vdev id
5366 * @reason: roam reason
5367 * @rssi: RSSI
5368 */
5369typedef struct {
5370 uint32_t vdev_id;
5371 uint32_t reason;
5372 uint32_t rssi;
5373} wmi_host_roam_event;
5374
5375/**
5376 * ENUM wmi_host_scan_event_type - Scan event type
5377 */
5378enum wmi_host_scan_event_type {
5379 WMI_HOST_SCAN_EVENT_STARTED = 0x1,
5380 WMI_HOST_SCAN_EVENT_COMPLETED = 0x2,
5381 WMI_HOST_SCAN_EVENT_BSS_CHANNEL = 0x4,
5382 WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
5383 WMI_HOST_SCAN_EVENT_DEQUEUED = 0x10,
5384 WMI_HOST_SCAN_EVENT_PREEMPTED = 0x20,
5385 WMI_HOST_SCAN_EVENT_START_FAILED = 0x40,
5386 WMI_HOST_SCAN_EVENT_RESTARTED = 0x80,
5387 WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
5388 WMI_HOST_SCAN_EVENT_INVALID = 0x200,
5389 WMI_HOST_SCAN_EVENT_MAX = 0x8000
5390};
5391
5392/**
5393 * ENUM wmi_host_scan_completion_reason - Scan completion event type
5394 */
5395enum wmi_host_scan_completion_reason {
5396 /** scan related events */
5397 WMI_HOST_SCAN_REASON_NONE = 0xFF,
5398 WMI_HOST_SCAN_REASON_COMPLETED = 0,
5399 WMI_HOST_SCAN_REASON_CANCELLED = 1,
5400 WMI_HOST_SCAN_REASON_PREEMPTED = 2,
5401 WMI_HOST_SCAN_REASON_TIMEDOUT = 3,
5402 WMI_HOST_SCAN_REASON_INTERNAL_FAILURE = 4,
5403 WMI_HOST_SCAN_REASON_MAX,
5404};
5405
5406/**
5407 * struct wmi_host_scan_event - Scan event response from target
5408 * @event: event type
5409 * @reason: Reason for event
5410 * @channel_freq: channel frequency
5411 * @requestor: requestor id
5412 * @scan_id: scan id
5413 * @vdev_id: vdev id
5414 */
5415typedef struct {
5416 uint32_t event;
5417 uint32_t reason;
5418 uint32_t channel_freq;
5419 uint32_t requestor;
5420 uint32_t scan_id;
5421 uint32_t vdev_id;
5422} wmi_host_scan_event;
5423
5424/**
5425 * struct wmi_host_pdev_reserve_ast_entry_event - Reserve AST entry
5426 * @result: result
5427 */
5428typedef struct {
5429 uint32_t result;
5430} wmi_host_pdev_reserve_ast_entry_event;
5431
5432/**
5433 * struct wmi_host_mcast_ageout_entry - mcast aged-out entry
5434 * @grp_addr: IPv4/6 mcast group addr
5435 * @vdev_id: vdev id
5436 */
5437typedef struct {
5438 uint8_t grp_addr[16];
5439 uint32_t vdev_id;
5440} wmi_host_mcast_ageout_entry;
5441
5442/**
5443 * struct wmi_host_mcast_list_ageout_event - List of mcast entry aged-out
5444 * @num_entry: Number of mcast entries timed-out
5445 * @entry: List of wmi_host_mcast_ageout_entry
5446 */
5447typedef struct {
5448 uint32_t num_entry;
5449 wmi_host_mcast_ageout_entry entry[1];
5450} wmi_host_mcast_list_ageout_event;
5451
5452/**
5453 * struct wmi_host_pdev_nfcal_power_all_channels_event - NF cal event data
5454 * @nfdBr:
5455 * chan0: {NFCalPower_chain0, NFCalPower_chain1,
5456 * NFCalPower_chain2, NFCalPower_chain3},
5457 * chan1: {NFCalPower_chain0, NFCalPower_chain1,
5458 * NFCalPower_chain2, NFCalPower_chain3},
5459 * chan2: {NFCalPower_chain0, NFCalPower_chain1,
5460 * NFCalPower_chain2, NFCalPower_chain3},
5461 * chan3: {NFCalPower_chain0, NFCalPower_chain1,
5462 * NFCalPower_chain2, NFCalPower_chain3},
5463 * @nfdBr:
5464 * chan0: {NFCalPower_chain0, NFCalPower_chain1,
5465 * NFCalPower_chain2, NFCalPower_chain3},
5466 * chan1: {NFCalPower_chain0, NFCalPower_chain1,
5467 * NFCalPower_chain2, NFCalPower_chain3},
5468 * chan2: {NFCalPower_chain0, NFCalPower_chain1,
5469 * NFCalPower_chain2, NFCalPower_chain3},
5470 * chan3: {NFCalPower_chain0, NFCalPower_chain1,
5471 * NFCalPower_chain2, NFCalPower_chain3},
5472 * @freqNum: frequency number
5473 */
5474typedef struct {
5475 int8_t nfdBr[WMI_HOST_RXG_CAL_CHAN_MAX * WMI_HOST_MAX_NUM_CHAINS];
5476 int8_t nfdBm[WMI_HOST_RXG_CAL_CHAN_MAX * WMI_HOST_MAX_NUM_CHAINS];
5477 uint32_t freqNum[WMI_HOST_RXG_CAL_CHAN_MAX];
5478} wmi_host_pdev_nfcal_power_all_channels_event;
5479
5480/**
5481 * struct wmi_host_pdev_tpc_event - WMI host pdev TPC event
5482 * @tpc:
5483 */
5484typedef struct {
5485 uint32_t tpc[1];
5486} wmi_host_pdev_tpc_event;
5487
5488/**
5489 * struct wmi_host_pdev_generic_buffer_event
5490 * @buf_type: Buffer type
5491 * @frag_id: Frag id
5492 * @more_frag: more frags pending
5493 * @buf_len: buffer length
5494 * @buf_info: variable length buffer
5495 */
5496typedef struct {
5497 uint32_t buf_type;
5498 uint32_t frag_id;
5499 uint32_t more_frag;
5500 uint32_t buf_len;
5501 uint32_t buf_info[1];
5502} wmi_host_pdev_generic_buffer_event;
5503/**
5504 * Enum for host buffer event
5505 */
5506enum {
5507 WMI_HOST_BUFFER_TYPE_RATEPWR_TABLE,
5508 WMI_HOST_BUFFER_TYPE_CTL_TABLE,
5509};
5510
5511/**
5512 * struct wmi_host_pdev_tpc_config_event - host pdev tpc config event
5513 * @regDomain:
5514 * @chanFreq:
5515 * @phyMode:
5516 * @twiceAntennaReduction:
5517 * @twiceMaxRDPower:
5518 * @twiceAntennaGain:
5519 * @powerLimit:
5520 * @rateMax:
5521 * @numTxChain:
5522 * @ctl:
5523 * @flags:
5524 * @maxRegAllowedPower:
5525 * @maxRegAllowedPowerAGCDD:
5526 * @maxRegAllowedPowerAGSTBC:
5527 * @maxRegAllowedPowerAGTXBF:
5528 * @ratesArray:
5529 */
5530typedef struct {
5531 uint32_t regDomain;
5532 uint32_t chanFreq;
5533 uint32_t phyMode;
5534 uint32_t twiceAntennaReduction;
5535 uint32_t twiceMaxRDPower;
5536 int32_t twiceAntennaGain;
5537 uint32_t powerLimit;
5538 uint32_t rateMax;
5539 uint32_t numTxChain;
5540 uint32_t ctl;
5541 uint32_t flags;
5542 int8_t maxRegAllowedPower[WMI_HOST_TPC_TX_NUM_CHAIN];
5543 int8_t maxRegAllowedPowerAGCDD[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN];
5544 int8_t maxRegAllowedPowerAGSTBC[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN];
5545 int8_t maxRegAllowedPowerAGTXBF[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN];
5546 uint8_t ratesArray[WMI_HOST_TPC_RATE_MAX];
5547} wmi_host_pdev_tpc_config_event;
5548/**
5549 * Enums for TPC event
5550 */
5551typedef enum {
5552 WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
5553 WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
5554 WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
5555} WMI_HOST_TPC_CONFIG_EVENT_FLAG;
5556
5557/**
5558 * Medium Utilization evaluation algorithms
5559 * These algorithms can be complementary rather than exclusive.
5560 */
5561typedef enum {
5562 WMI_HOST_MU_BASIC_ALGO = 0x1,
5563 WMI_HOST_MU_PER_BSSID_ALGO = 0x2,
5564 WMI_HOST_MU_HIDDEN_NODE_ALGO = 0x4,
5565} WMI_HOST_MU_ALGO_TYPE;
5566/* max MU alg combinations supported by target */
5567#define WMI_HOST_MU_MAX_ALGO_TYPE 3
5568
5569/**
5570 * struct wmi_host_mu_report_event - WMI_MU_REPORT_EVENTID
5571 * @mu_request_id: request id
5572 * @status_reason: MU_STATUS_REASON
5573 * @total_mu: MU_ALG_TYPE combinations
5574 * @num_active_bssid: number of active bssid
5575 */
5576typedef struct {
5577 uint32_t mu_request_id;
5578 uint32_t status_reason;
5579 uint32_t total_mu[WMI_HOST_MU_MAX_ALGO_TYPE];
5580 uint32_t num_active_bssid;
5581} wmi_host_mu_report_event;
5582
5583/**
5584 * struct wmi_host_mgmt_tx_compl_event - TX completion event
5585 * @desc_id: from tx_send_cmd
5586 * @status: WMI_MGMT_TX_COMP_STATUS_TYPE
5587 */
5588typedef struct {
5589 uint32_t desc_id;
5590 uint32_t status;
5591} wmi_host_mgmt_tx_compl_event;
5592
5593#define WMI_HOST_TIM_BITMAP_ARRAY_SIZE 17
5594
5595/**
5596 * struct wmi_host_tim_info - TIM info in SWBA event
5597 * @tim_len: TIM length
5598 * @tim_mcast:
5599 * @tim_bitmap: TIM bitmap
5600 * @tim_changed: TIM changed
5601 * @tim_num_ps_pending: TIM num PS sta pending
5602 */
5603typedef struct {
5604 uint32_t tim_len;
5605 uint32_t tim_mcast;
5606 uint32_t tim_bitmap[WMI_HOST_TIM_BITMAP_ARRAY_SIZE];
5607 uint32_t tim_changed;
5608 uint32_t tim_num_ps_pending;
5609} wmi_host_tim_info;
5610
5611/**
5612 * struct wmi_host_p2p_noa_descriptor - NoA desc in SWBA event
5613 * @type_count: Absence count
5614 * @duration: NoA duration
5615 * @interval: NoA interval
5616 * @start_time: start time
5617 */
5618typedef struct {
5619 uint32_t type_count;
5620 uint32_t duration;
5621 uint32_t interval;
5622 uint32_t start_time;
5623} wmi_host_p2p_noa_descriptor;
5624/* Maximum number of NOA Descriptors supported */
5625#define WMI_HOST_P2P_MAX_NOA_DESCRIPTORS 4
5626/**
5627 * struct wmi_host_p2p_noa_info - p2p noa information
5628 * @modified: NoA modified
5629 * @index: Index
5630 * @oppPS: Oppurtunstic ps
5631 * @ctwindow: CT window
5632 * @num_descriptors: number of descriptors
5633 * @noa_descriptors: noa descriptors
5634 */
5635typedef struct {
5636 uint8_t modified;
5637 uint8_t index;
5638 uint8_t oppPS;
5639 uint8_t ctwindow;
5640 uint8_t num_descriptors;
5641 wmi_host_p2p_noa_descriptor
5642 noa_descriptors[WMI_HOST_P2P_MAX_NOA_DESCRIPTORS];
5643} wmi_host_p2p_noa_info;
5644
5645/**
5646 * struct wmi_host_peer_sta_kickout_event
5647 * @peer_macaddr: peer mac address
5648 * @reason: kickout reason
5649 * @rssi: rssi
5650 */
5651typedef struct {
5652 uint8_t peer_macaddr[IEEE80211_ADDR_LEN];
5653 uint32_t reason;
5654 uint32_t rssi;
5655} wmi_host_peer_sta_kickout_event;
5656
5657/**
5658 * struct wmi_host_peer_sta_ps_statechange_event - ST ps state change event
5659 * @peer_macaddr: peer mac address
5660 * @peer_ps_stats: peer PS state
5661 */
5662typedef struct {
5663 uint8_t peer_macaddr[IEEE80211_ADDR_LEN];
5664 uint32_t peer_ps_state;
5665} wmi_host_peer_sta_ps_statechange_event;
5666
5667/* Maximum CCK, OFDM rates supported */
5668#define WMI_SA_MAX_CCK_OFDM_RATES 12
5669/* Maximum MCS rates supported; 4 rates in each dword */
5670#define WMI_SA_MAX_MCS_RATES 40
5671#define WMI_SA_MAX_RATE_COUNTERS 4
5672/* Maximum rate series used for transmission */
5673#define SA_MAX_RATE_SERIES 2
5674
5675#define SA_MAX_LEGACY_RATE_DWORDS 3
5676#define SA_MAX_HT_RATE_DWORDS 10
5677#define SA_BYTES_IN_DWORD 4
5678#define SA_MASK_BYTE 0xff
5679/* TODO: ratecode_160 needs to add for future chips */
5680/**
5681 * struct wmi_sa_rate_cap - smart antenna rat capabilities
5682 * @ratecode_legacy: Rate code array for CCK OFDM
5683 * @ratecode_20: Rate code array for 20MHz BW
5684 * @ratecode_40: Rate code array for 40MHz BW
5685 * @ratecode_80: Rate code array for 80MHz BW
5686 * @ratecount: Max Rate count for each mode
5687 */
5688typedef struct {
5689 uint8_t ratecode_legacy[WMI_SA_MAX_CCK_OFDM_RATES];
5690 uint8_t ratecode_20[WMI_SA_MAX_MCS_RATES];
5691 uint8_t ratecode_40[WMI_SA_MAX_MCS_RATES];
5692 uint8_t ratecode_80[WMI_SA_MAX_MCS_RATES];
5693 uint8_t ratecount[WMI_SA_MAX_RATE_COUNTERS];
5694} wmi_sa_rate_cap;
5695
5696/** Preamble types to be used with VDEV fixed rate configuration */
5697typedef enum {
5698 WMI_HOST_RATE_PREAMBLE_OFDM,
5699 WMI_HOST_RATE_PREAMBLE_CCK,
5700 WMI_HOST_RATE_PREAMBLE_HT,
5701 WMI_HOST_RATE_PREAMBLE_VHT,
5702} WMI_HOST_RATE_PREAMBLE;
5703
5704#define WMI_HOST_FIXED_RATE_NONE (0xff)
5705
5706/** slot time long */
5707#define WMI_HOST_VDEV_SLOT_TIME_LONG 0x1
5708/** slot time short */
5709#define WMI_HOST_VDEV_SLOT_TIME_SHORT 0x2
5710/** preablbe long */
5711#define WMI_HOST_VDEV_PREAMBLE_LONG 0x1
5712/** preablbe short */
5713#define WMI_HOST_VDEV_PREAMBLE_SHORT 0x2
5714/** found a better AP */
5715#define WMI_HOST_ROAM_REASON_BETTER_AP 0x1
5716/** beacon miss detected */
5717#define WMI_HOST_ROAM_REASON_BMISS 0x2
5718/** deauth/disassoc received */
5719#define WMI_HOST_ROAM_REASON_DEAUTH 0x2
5720/** connected AP's low rssi condition detected */
5721#define WMI_HOST_ROAM_REASON_LOW_RSSI 0x3
5722/** found another AP that matches SSID and Security profile in
5723 * WMI_ROAM_AP_PROFILE, found during scan triggered upon FINAL_BMISS
5724 */
5725#define WMI_HOST_ROAM_REASON_SUITABLE_AP 0x4
5726/** LFR3.0 roaming failed, indicate the disconnection to host */
5727#define WMI_HOST_ROAM_REASON_HO_FAILED 0x5
5728
5729/** values for vdev_type */
5730#define WMI_HOST_VDEV_TYPE_AP 0x1
5731#define WMI_HOST_VDEV_TYPE_STA 0x2
5732#define WMI_HOST_VDEV_TYPE_IBSS 0x3
5733#define WMI_HOST_VDEV_TYPE_MONITOR 0x4
5734
5735/** values for vdev_subtype */
5736#define WMI_HOST_VDEV_SUBTYPE_P2P_DEVICE 0x1
5737#define WMI_HOST_VDEV_SUBTYPE_P2P_CLIENT 0x2
5738#define WMI_HOST_VDEV_SUBTYPE_P2P_GO 0x3
5739#define WMI_HOST_VDEV_SUBTYPE_PROXY_STA 0x4
5740#define WMI_HOST_VDEV_SUBTYPE_MESH 0x5
5741
5742#define WMI_HOST_MGMT_TID 17
5743/* Disable aging & learning */
5744#define WMI_HOST_WDS_FLAG_STATIC 0x1
5745
5746/**
5747 * Peer param enum abstracted from target
5748 */
5749typedef enum {
5750 /** mimo powersave state */
5751 WMI_HOST_PEER_MIMO_PS_STATE = 0x1,
5752 /** enable/disable AMPDU . initial value (enabled) */
5753 WMI_HOST_PEER_AMPDU = 0x2,
5754 /** authorize/unauthorize peer. initial value is unauthorized (0) */
5755 WMI_HOST_PEER_AUTHORIZE = 0x3,
5756 /** peer channel bandwidth */
5757 WMI_HOST_PEER_CHWIDTH = 0x4,
5758 /** peer NSS */
5759 WMI_HOST_PEER_NSS = 0x5,
5760 /** USE 4 ADDR */
5761 WMI_HOST_PEER_USE_4ADDR = 0x6,
5762 /** Enable extended peer stats */
5763 WMI_HOST_PEER_EXT_STATS_ENABLE = 0x7,
5764 /*Use FIXED Pwr */
5765 WMI_HOST_PEER_USE_FIXED_PWR = 0x8,
5766 /* Set peer fixed rate */
5767 WMI_HOST_PEER_PARAM_FIXED_RATE = 0x9,
5768 /* Whitelist peer TIDs */
5769 WMI_HOST_PEER_SET_MU_WHITELIST = 0xa,
5770 /* set group membership status */
5771 WMI_HOST_PEER_MEMBERSHIP = 0xb,
5772 WMI_HOST_PEER_USERPOS = 0xc,
5773} PEER_PARAM_ENUM;
5774#define WMI_HOST_PEER_MIMO_PS_NONE 0x0
5775#define WMI_HOST_PEER_MIMO_PS_STATIC 0x1
5776#define WMI_HOST_PEER_MIMO_PS_DYNAMIC 0x2
5777typedef enum {
5778 HOST_PLATFORM_HIGH_PERF,
5779 HOST_PLATFORM_LOW_PERF,
5780} HOST_PLATFORM_TYPE;
5781
5782enum wmi_host_sta_ps_mode {
5783 /** enable power save for the given STA VDEV */
5784 WMI_HOST_STA_PS_MODE_DISABLED = 0,
5785 /** disable power save for a given STA VDEV */
5786 WMI_HOST_STA_PS_MODE_ENABLED = 1,
5787};
5788enum wmi_host_sta_powersave_param {
5789 /**
5790 * Controls how frames are retrievd from AP while STA is sleeping
5791 *
5792 * (see enum wmi_sta_ps_param_rx_wake_policy)
5793 */
5794 WMI_HOST_STA_PS_PARAM_RX_WAKE_POLICY = 0,
5795
5796 /**
5797 * The STA will go active after this many TX
5798 *
5799 * (see enum wmi_sta_ps_param_tx_wake_threshold)
5800 */
5801 WMI_HOST_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
5802
5803 /**
5804 * Number of PS-Poll to send before STA wakes up
5805 *
5806 * (see enum wmi_sta_ps_param_pspoll_count)
5807 *
5808 */
5809 WMI_HOST_STA_PS_PARAM_PSPOLL_COUNT = 2,
5810
5811 /**
5812 * TX/RX inactivity time in msec before going to sleep.
5813 *
5814 * The power save SM will monitor tx/rx activity on the VDEV, if no
5815 * activity for the specified msec of the parameter
5816 * the Power save SM will go to sleep.
5817 */
5818 WMI_HOST_STA_PS_PARAM_INACTIVITY_TIME = 3,
5819
5820 /**
5821 * Set uapsd configuration.
5822 *
5823 * (see enum wmi_sta_ps_param_uapsd)
5824 */
5825 WMI_HOST_STA_PS_PARAM_UAPSD = 4,
5826};
5827/* prefix used by scan requestor ids on the host
5828 * replicated here form wmi_unified.h*/
5829#define WMI_HOST_P_SCAN_REQUESTOR_ID_PREFIX 0xA000
5830/* prefix used by scan request ids generated on the host */
5831/* host cycles through the lower 12 bits to generate ids */
5832#define WMI_HOST_P_SCAN_REQ_ID_PREFIX 0xA000
5833
5834#define WMI_HOST_RC_DS_FLAG 0x01 /* Dual stream flag */
5835#define WMI_HOST_RC_CW40_FLAG 0x02 /* CW 40 */
5836#define WMI_HOST_RC_SGI_FLAG 0x04 /* Short Guard Interval */
5837#define WMI_HOST_RC_HT_FLAG 0x08 /* HT */
5838#define WMI_HOST_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
5839#define WMI_HOST_RC_TX_STBC_FLAG 0x20 /* TX STBC */
5840#define WMI_HOST_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
5841#define WMI_HOST_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
5842#define WMI_HOST_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
5843#define WMI_HOST_RC_TS_FLAG 0x200 /* Three stream flag */
5844#define WMI_HOST_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
5845
5846/** HT Capabilities*/
5847#define WMI_HOST_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
5848/* Short Guard Interval with HT20 */
5849#define WMI_HOST_HT_CAP_HT20_SGI 0x0002
5850#define WMI_HOST_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
5851#define WMI_HOST_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
5852#define WMI_HOST_HT_CAP_TX_STBC_MASK_SHIFT 3
5853#define WMI_HOST_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
5854#define WMI_HOST_HT_CAP_RX_STBC_MASK_SHIFT 4
5855#define WMI_HOST_HT_CAP_LDPC 0x0040 /* LDPC supported */
5856#define WMI_HOST_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
5857#define WMI_HOST_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
5858#define WMI_HOST_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
5859#define WMI_HOST_HT_CAP_HT40_SGI 0x0800
5860#define WMI_HOST_HT_CAP_IBF_BFER 0x1000
5861
5862/* These macros should be used when we wish to advertise STBC support for
5863 * only 1SS or 2SS or 3SS. */
5864#define WMI_HOST_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
5865#define WMI_HOST_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
5866#define WMI_HOST_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
5867
5868
5869#define WMI_HOST_HT_CAP_DEFAULT_ALL (WMI_HOST_HT_CAP_ENABLED | \
5870 WMI_HOST_HT_CAP_HT20_SGI | \
5871 WMI_HOST_HT_CAP_HT40_SGI | \
5872 WMI_HOST_HT_CAP_TX_STBC | \
5873 WMI_HOST_HT_CAP_RX_STBC | \
5874 WMI_HOST_HT_CAP_LDPC)
5875
5876/* WMI_HOST_VHT_CAP_* these maps to ieee 802.11ac vht capability information
5877 field. The fields not defined here are not supported, or reserved.
5878 Do not change these masks and if you have to add new one follow the
5879 bitmask as specified by 802.11ac draft.
5880*/
5881
5882#define WMI_HOST_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
5883#define WMI_HOST_VHT_CAP_RX_LDPC 0x00000010
5884#define WMI_HOST_VHT_CAP_SGI_80MHZ 0x00000020
5885#define WMI_HOST_VHT_CAP_SGI_160MHZ 0x00000040
5886#define WMI_HOST_VHT_CAP_TX_STBC 0x00000080
5887#define WMI_HOST_VHT_CAP_RX_STBC_MASK 0x00000300
5888#define WMI_HOST_VHT_CAP_RX_STBC_MASK_SHIFT 8
5889#define WMI_HOST_VHT_CAP_SU_BFER 0x00000800
5890#define WMI_HOST_VHT_CAP_SU_BFEE 0x00001000
5891#define WMI_HOST_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
5892#define WMI_HOST_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
5893#define WMI_HOST_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
5894#define WMI_HOST_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
5895#define WMI_HOST_VHT_CAP_MU_BFER 0x00080000
5896#define WMI_HOST_VHT_CAP_MU_BFEE 0x00100000
5897#define WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
5898#define WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT 23
5899#define WMI_HOST_VHT_CAP_RX_FIXED_ANT 0x10000000
5900#define WMI_HOST_VHT_CAP_TX_FIXED_ANT 0x20000000
5901
5902#define WMI_HOST_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
5903
5904/* These macros should be used when we wish to advertise STBC support for
5905 * only 1SS or 2SS or 3SS. */
5906#define WMI_HOST_VHT_CAP_RX_STBC_1SS 0x00000100
5907#define WMI_HOST_VHT_CAP_RX_STBC_2SS 0x00000200
5908#define WMI_HOST_VHT_CAP_RX_STBC_3SS 0x00000300
5909
5910#define WMI_HOST_VHT_CAP_DEFAULT_ALL (WMI_HOST_VHT_CAP_MAX_MPDU_LEN_11454 | \
5911 WMI_HOST_VHT_CAP_SGI_80MHZ | \
5912 WMI_HOST_VHT_CAP_TX_STBC | \
5913 WMI_HOST_VHT_CAP_RX_STBC_MASK | \
5914 WMI_HOST_VHT_CAP_RX_LDPC | \
5915 WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP | \
5916 WMI_HOST_VHT_CAP_RX_FIXED_ANT | \
5917 WMI_HOST_VHT_CAP_TX_FIXED_ANT)
5918
5919/* Interested readers refer to Rx/Tx MCS Map definition as defined in
5920 802.11ac
5921*/
5922#define WMI_HOST_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
5923#define WMI_HOST_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
5924#define WMI_HOST_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
5925
5926/** U-APSD configuration of peer station from (re)assoc request and TSPECs */
5927enum wmi_host_ap_ps_param_uapsd {
5928 WMI_HOST_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
5929 WMI_HOST_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
5930 WMI_HOST_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
5931 WMI_HOST_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
5932 WMI_HOST_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
5933 WMI_HOST_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
5934 WMI_HOST_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
5935 WMI_HOST_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
5936};
5937/** U-APSD maximum service period of peer station */
5938enum wmi_host_ap_ps_peer_param_max_sp {
5939 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
5940 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
5941 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
5942 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
5943
5944 /* keep last! */
5945 MAX_HOST_WMI_AP_PS_PEER_PARAM_MAX_SP,
5946};
5947
5948#define WMI_HOST_UAPSD_AC_TYPE_DELI 0
5949#define WMI_HOST_UAPSD_AC_TYPE_TRIG 1
5950
5951#define WMI_HOST_UAPSD_AC_BIT_MASK(ac, type) \
5952 ((type == WMI_HOST_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) :\
5953 (1<<((ac<<1)+1)))
5954
5955enum wmi_host_ap_ps_peer_param_wnm_sleep {
5956 WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP_ENABLE,
5957 WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP_DISABLE,
5958};
5959
5960enum wmi_host_ap_ps_peer_param {
5961 /** Set uapsd configuration for a given peer.
5962 *
5963 * This will include the delivery and trigger enabled state for every AC.
5964 * The host MLME needs to set this based on AP capability and stations
5965 * request Set in the association request received from the station.
5966 *
5967 * Lower 8 bits of the value specify the UAPSD configuration.
5968 *
5969 * (see enum wmi_ap_ps_param_uapsd)
5970 * The default value is 0.
5971 */
5972 WMI_HOST_AP_PS_PEER_PARAM_UAPSD = 0,
5973
5974 /**
5975 * Set the service period for a UAPSD capable station
5976 *
5977 * The service period from wme ie in the (re)assoc request frame.
5978 *
5979 * (see enum wmi_ap_ps_peer_param_max_sp)
5980 */
5981 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP = 1,
5982
5983 /** Time in seconds for aging out buffered frames
5984 * for STA in power save */
5985 WMI_HOST_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
5986
5987 /** Specify frame types that are considered SIFS
5988 * RESP trigger frame */
5989 WMI_HOST_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
5990
5991 /** Specifies the trigger state of TID.
5992 * Valid only for UAPSD frame type */
5993 WMI_HOST_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
5994
5995 /** Specifies the WNM sleep state of a STA */
5996 WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
5997};
5998#define WMI_HOST_RXERR_CRC 0x01 /* CRC error on frame */
5999#define WMI_HOST_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
6000#define WMI_HOST_RXERR_MIC 0x10 /* Michael MIC decrypt error */
6001#define WMI_HOST_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
6002
6003enum wmi_host_sta_ps_param_uapsd {
6004 WMI_HOST_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
6005 WMI_HOST_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
6006 WMI_HOST_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
6007 WMI_HOST_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
6008 WMI_HOST_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
6009 WMI_HOST_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
6010 WMI_HOST_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
6011 WMI_HOST_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
6012};
6013
6014enum wmi_host_sta_ps_param_rx_wake_policy {
6015 /* Wake up when ever there is an RX activity on the VDEV. In this mode
6016 * the Power save SM(state machine) will come out of sleep by either
6017 * sending null frame (or) a data frame (with PS==0) in response to TIM
6018 * bit set in the received beacon frame from AP.
6019 */
6020 WMI_HOST_STA_PS_RX_WAKE_POLICY_WAKE = 0,
6021
6022 /* Here the power save state machine will not wakeup in response to TIM
6023 * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
6024 * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
6025 * access categories are delivery-enabled, the station will send a UAPSD
6026 * trigger frame, otherwise it will send a PS-Poll.
6027 */
6028 WMI_HOST_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
6029};
6030enum wmi_host_sta_ps_param_pspoll_count {
6031 WMI_HOST_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
6032 /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
6033 * will send before waking up.
6034 */
6035};
6036/** Number of tx frames/beacon that cause the power save SM to wake up.
6037 *
6038 * Value 1 causes the SM to wake up for every TX. Value 0 has a special
6039 * meaning, It will cause the SM to never wake up. This is useful if you want
6040 * to keep the system to sleep all the time for some kind of test mode . host
6041 * can change this parameter any time. It will affect at the next tx frame.
6042 */
6043enum wmi_host_sta_ps_param_tx_wake_threshold {
6044 WMI_HOST_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
6045 WMI_HOST_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
6046
6047 /* Values greater than one indicate that many TX attempts per beacon
6048 * interval before the STA will wake up
6049 */
6050};
6051/*
6052 * Transmit power scale factor.
6053 *
6054 */
6055typedef enum {
6056 WMI_HOST_TP_SCALE_MAX = 0, /* no scaling (default) */
6057 WMI_HOST_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
6058 WMI_HOST_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
6059 WMI_HOST_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
6060 WMI_HOST_TP_SCALE_MIN = 4, /* min, but still on */
6061 WMI_HOST_TP_SCALE_SIZE = 5, /* max num of enum */
6062} WMI_HOST_TP_SCALE;
6063enum {
6064 WMI_HOST_RATEPWR_TABLE_OPS_SET,
6065 WMI_HOST_RATEPWR_TABLE_OPS_GET,
6066};
6067/* reserved up through 0xF */
6068/**
6069 * struct wmi_host_dcs_mib_stats - WLAN IM stats from target to host
6070 * Below statistics are sent from target to host periodically.
6071 * These are collected at target as long as target is running
6072 * and target chip is not in sleep.
6073 * @listen_time:
6074 * @reg_tx_frame_cnt:
6075 * @reg_rx_frame_cnt:
6076 * @reg_rxclr_cnt:
6077 * @reg_cycle_cnt: delta cycle count
6078 * @reg_rxclr_ext_cnt:
6079 * @reg_ofdm_phyerr_cnt:
6080 * @reg_cck_phyerr_cnt: CCK err count since last reset, read from register
6081 */
6082typedef struct _hp_dcs_mib_stats {
6083 int32_t listen_time;
6084 uint32_t reg_tx_frame_cnt;
6085 uint32_t reg_rx_frame_cnt;
6086 uint32_t reg_rxclr_cnt;
6087 uint32_t reg_cycle_cnt;
6088 uint32_t reg_rxclr_ext_cnt;
6089 uint32_t reg_ofdm_phyerr_cnt;
6090 uint32_t reg_cck_phyerr_cnt;
6091} wmi_host_dcs_mib_stats_t;
6092
6093/**
6094 * struct wmi_host_dcs_im_tgt_stats - DCS IM target stats
6095 * @reg_tsf32: current running TSF from the TSF-1
6096 * @last_ack_rssi: Known last frame rssi, in case of multiple stations, if
6097 * and at different ranges, this would not gaurantee that
6098 * this is the least rssi.
6099 * @tx_waste_time: Sum of all the failed durations in the last
6100 * one second interval.
6101 * @rx_time: count how many times the hal_rxerr_phy is marked, in this
6102 * time period
6103 * @phyerr_cnt:
6104 * @mib_stats: wmi_host_dcs_mib_stats_t - collected mib stats as explained
6105 * in mib structure
6106 */
6107typedef struct _wmi_host_dcs_im_tgt_stats {
6108 uint32_t reg_tsf32;
6109 uint32_t last_ack_rssi;
6110 uint32_t tx_waste_time;
6111 uint32_t rx_time;
6112 uint32_t phyerr_cnt;
6113 wmi_host_dcs_mib_stats_t mib_stats;
6114} wmi_host_dcs_im_tgt_stats_t;
6115
6116/**
6117 * Enum for pktlog req
6118 */
6119typedef enum {
6120 WMI_HOST_PKTLOG_EVENT_RX = 0x1,
6121 WMI_HOST_PKTLOG_EVENT_TX = 0x2,
6122 WMI_HOST_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
6123 WMI_HOST_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
6124 WMI_HOST_PKTLOG_EVENT_DBG_PRINT = 0x10, /* DEBUG prints */
6125 /* To support Smart Antenna */
6126 WMI_HOST_PKTLOG_EVENT_SMART_ANTENNA = 0x20,
6127 WMI_HOST_PKTLOG_EVENT_H_INFO = 0x40,
6128 WMI_HOST_PKTLOG_EVENT_STEERING = 0x80,
6129} WMI_HOST_PKTLOG_EVENT;
6130
6131/**
6132 * wmi_host_phyerr
6133 *
6134 */
6135#define WMI_HOST_PHY_ERROR_SPECTRAL_SCAN 0x26
6136#define WMI_HOST_PHY_ERROR_FALSE_RADAR_EXT 0x24
6137
6138#define WMI_HOST_AR900B_DFS_PHYERR_MASK 0x4
6139#define WMI_HOST_AR900B_SPECTRAL_PHYERR_MASK 0x4000000
6140
6141/**
6142 * struct wmi_host_perchain_rssi_info - per chain RSSI info
6143 * @rssi_pri20: RSSI on primary 20
6144 * @rssi_sec20: RSSI on secomdary 20
6145 * @rssi_sec40: RSSI secondary 40
6146 * @rssi_sec80: RSSI secondary 80
6147 */
6148typedef struct wmi_host_perchain_rssi_info {
6149 int8_t rssi_pri20;
6150 int8_t rssi_sec20;
6151 int8_t rssi_sec40;
6152 int8_t rssi_sec80;
6153} wmi_host_perchain_rssi_info_t;
6154
6155/**
6156 * struct _wmi_host_rf_info - RF measurement information
6157 * @rssi_comb: RSSI Information
6158 * @pc_rssi_info[4]: For now, we know we are getting information
6159 * for only 4 chains at max. For future extensions
6160 * use a define
6161 * @noise_floor: Noise floor information
6162 */
6163typedef struct _wmi_host_rf_info {
6164 int8_t rssi_comb;
6165 wmi_host_perchain_rssi_info_t pc_rssi_info[4];
6166 int16_t noise_floor[4];
6167} wmi_host_rf_info_t;
6168
6169/**
6170 * struct _wmi_host_chan_info
6171 * @center_freq1: center frequency 1 in MHz
6172 * @center_freq2: center frequency 2 in MHz -valid only for
6173 * 11ACVHT 80PLUS80 mode
6174 * @chan_width: channel width in MHz
6175 */
6176typedef struct _wmi_host_chan_info {
6177 u_int16_t center_freq1;
6178 u_int16_t center_freq2;
6179 u_int8_t chan_width;
6180} wmi_host_chan_info_t;
6181
6182/**
6183 * struct wmi_host_phyerr
6184 * @rf_info:
6185 * @chan_info:
6186 * @tsf64:
6187 * @phy_err_code:
6188 * @tsf_timestamp:
6189 * @bufp:
6190 * @buf_len:
6191 * @phy_err_mask0:
6192 * @phy_err_mask1:
6193 */
6194typedef struct _wmi_host_phyerr {
6195 wmi_host_rf_info_t rf_info;
6196 wmi_host_chan_info_t chan_info;
6197 uint64_t tsf64;
6198 int32_t phy_err_code;
6199 uint32_t tsf_timestamp;
6200 uint8_t *bufp;
6201 uint32_t buf_len;
6202 uint32_t phy_err_mask0;
6203 uint32_t phy_err_mask1;
6204} wmi_host_phyerr_t;
6205
6206/**
6207 * struct wmi_host_rtt_event_hdr
6208 * @req_id: request id
6209 * @status: status
6210 * @meas_done: measurement done flag
6211 * @meas_type: measurement type
6212 * @report_type: report type
6213 * @v3_status: v2 status
6214 * @v3_finish:
6215 * @v3_tm_start:
6216 * @num_ap: number of AP
6217 * @result: resuult
6218 * @dest_mac: destination mac
6219 */
6220typedef struct {
6221 uint16_t req_id;
6222 uint16_t status:1,
6223 meas_done:1,
6224 meas_type:3,
6225 report_type:3,
6226 v3_status:2,
6227 v3_finish:1,
6228 v3_tm_start:1,
6229 num_ap:4;
6230 uint16_t result;
6231 uint8_t dest_mac[IEEE80211_ADDR_LEN];
6232} wmi_host_rtt_event_hdr;
6233
6234/**
6235 * struct wmi_host_rtt_meas_event - RTT measurement event
6236 * @chain_mask:
6237 * @bw:
6238 * @rsvd:
6239 * @txrxchain_mask: Bit:0-3:chain mask
6240 * Bit 4-5: band width info
6241 * 00 --Legacy 20, 01 --HT/VHT20
6242 * 10 --HT/VHT40, 11 -- VHT80
6243 * @tod: resolution of 0.1ns
6244 * @toa: resolution of 0.1ns
6245 * @t3:
6246 * @t4:
6247 * @rssi0:
6248 * @rssi1:
6249 * @rssi2:
6250 * @rssi3:
6251 */
6252typedef struct {
6253 uint32_t chain_mask:3,
6254 bw:2,
6255 rsvd:27;
6256 uint32_t txrxchain_mask;
6257 uint64_t tod;
6258 uint64_t toa;
6259 uint64_t t3;
6260 uint64_t t4;
6261 uint32_t rssi0;
6262 uint32_t rssi1;
6263 uint32_t rssi2;
6264 uint32_t rssi3;
6265} wmi_host_rtt_meas_event;
6266
6267/*----RTT Report event definition ----*/
6268typedef enum {
6269 /* rtt cmd header parsing error --terminate */
6270 WMI_HOST_RTT_COMMAND_HEADER_ERROR = 0,
6271 /* rtt body parsing error -- skip current STA REQ */
6272 WMI_HOST_RTT_COMMAND_ERROR,
6273 /* rtt no resource -- terminate */
6274 WMI_HOST_RTT_MODULE_BUSY,
6275 /* STA exceed the support limit -- only server the first n STA */
6276 WMI_HOST_RTT_TOO_MANY_STA,
6277 /* any allocate failure */
6278 WMI_HOST_RTT_NO_RESOURCE,
6279 /* can not find vdev with vdev ID - skip current STA REQ */
6280 WMI_HOST_RTT_VDEV_ERROR,
6281 /* Tx failure -- continiue and measure number */
6282 WMI_HOST_RTT_TRANSIMISSION_ERROR,
6283 /* wait for first TM timer expire-terminate current STA measurement */
6284 WMI_HOST_RTT_TM_TIMER_EXPIRE,
6285 /* we do not support RTT measurement with this type of frame */
6286 WMI_HOST_RTT_FRAME_TYPE_NOSUPPORT,
6287 /* whole RTT measurement timer expire-terminate
6288 ** current STA measurement */
6289 WMI_HOST_RTT_TIMER_EXPIRE,
6290 /* channel swicth failed */
6291 WMI_HOST_RTT_CHAN_SWITCH_ERROR,
6292 /* TMR trans error, this dest peer will be skipped */
6293 WMI_HOST_RTT_TMR_TRANS_ERROR,
6294 /* V3 only. If both CFR and Token mismatch, do not report */
6295 WMI_HOST_RTT_NO_REPORT_BAD_CFR_TOKEN,
6296 /* For First TM, if CFR is bad, then do not report */
6297 WMI_HOST_RTT_NO_REPORT_FIRST_TM_BAD_CFR,
6298 /* do not allow report type2 mix with type 0, 1 */
6299 WMI_HOST_RTT_REPORT_TYPE2_MIX,
6300 /* LCI Configuration OK. - Responder only */
6301 WMI_HOST_RTT_LCI_CFG_OK,
6302 /* LCR configuration OK. - Responder only */
6303 WMI_HOST_RTT_LCR_CFG_OK,
6304 /* Bad configuration LCI (or) LCR request - Responder only */
6305 WMI_HOST_RTT_CFG_ERROR,
6306 WMI_HOST_WMI_RTT_REJECT_MAX,
6307} WMI_HOST_RTT_ERROR_INDICATOR;
6308typedef struct {
6309 wmi_host_rtt_event_hdr hdr;
6310 WMI_HOST_RTT_ERROR_INDICATOR reject_reason;
6311} wmi_host_rtt_error_report_event;
6312
6313#if defined(AR9888)
6314typedef enum {
6315 WMI_HOST_PROF_CPU_IDLE,
6316 WMI_HOST_PROF_PPDU_PROC,
6317 WMI_HOST_PROF_PPDU_POST,
6318 WMI_HOST_PROF_HTT_TX_INPUT,
6319 WMI_HOST_PROF_MSDU_ENQ,
6320 WMI_HOST_PROF_PPDU_POST_HAL,
6321 WMI_HOST_PROF_COMPUTE_TX_TIME,
6322
6323 /* Add new ID's above this. */
6324 WMI_HOST_PROF_MAX_ID,
6325} wmi_host_profile_id_t;
6326#endif
6327
6328#define WMI_HOST_WLAN_PROFILE_MAX_HIST 3
6329#define WMI_HOST_WLAN_PROFILE_MAX_BIN_CNT 32
6330
6331#if defined(AR9888)
6332#define WMI_HOST_MAX_PROFILE WMI_HOST_PROF_MAX_ID
6333#else
6334#define WMI_HOST_MAX_PROFILE WMI_HOST_WLAN_PROFILE_MAX_BIN_CNT
6335#endif
6336
6337/**
6338 * struct wmi_host_wlan_profile - Host profile param
6339 * @id: profile id
6340 * @cnt: Count
6341 * @tot:
6342 * @min: minimum
6343 * @max: Mac
6344 * @hist_intvl: history interval
6345 * @hist: profile data history
6346 */
6347typedef struct {
6348 uint32_t id;
6349 uint32_t cnt;
6350 uint32_t tot;
6351 uint32_t min;
6352 uint32_t max;
6353 uint32_t hist_intvl;
6354 uint32_t hist[WMI_HOST_WLAN_PROFILE_MAX_HIST];
6355} wmi_host_wlan_profile_t;
6356
6357/**
6358 * struct wmi_host_wlan_profile_ctx_t - profile context
6359 * @tot: time in us
6360 * @tx_msdu_cnt: MSDU TX count
6361 * @tx_mpdu_cnt: MPDU tx count
6362 * @tx_ppdu_cnt: PPDU tx count
6363 * @rx_msdu_cnt: MSDU RX count
6364 * @rx_mpdu_cnt: MPDU RXcount
6365 * @bin_count: Bin count
6366 */
6367typedef struct {
6368 uint32_t tot;
6369 uint32_t tx_msdu_cnt;
6370 uint32_t tx_mpdu_cnt;
6371 uint32_t tx_ppdu_cnt;
6372 uint32_t rx_msdu_cnt;
6373 uint32_t rx_mpdu_cnt;
6374 uint32_t bin_count;
6375} wmi_host_wlan_profile_ctx_t;
6376
6377/**
Govind Singh89727882016-04-15 13:58:27 +05306378 * struct wmi_host_chan_info_event - Channel info WMI event
6379 * @err_code: Error code
6380 * @freq: Channel freq
6381 * @cmd_flags: Read flags
6382 * @noise_floor: Noise Floor value
6383 * @rx_clear_count: rx clear count
6384 * @cycle_count: cycle count
6385 * @chan_tx_pwr_range: channel tx power per range
6386 * @chan_tx_pwr_tp: channel tx power per throughput
6387 * @rx_frame_count: rx frame count
6388 * @rx_11b_mode_data_duration: 11b mode data duration
6389 */
6390typedef struct {
6391 uint32_t err_code;
6392 uint32_t freq;
6393 uint32_t cmd_flags;
6394 uint32_t noise_floor;
6395 uint32_t rx_clear_count;
6396 uint32_t cycle_count;
6397 uint32_t chan_tx_pwr_range;
6398 uint32_t chan_tx_pwr_tp;
6399 uint32_t rx_frame_count;
6400 uint32_t rx_11b_mode_data_duration;
6401} wmi_host_chan_info_event;
6402
6403/**
6404 * struct wmi_host_pdev_channel_hopping_event
6405 * @noise_floor_report_iter: Noise threshold iterations with high values
6406 * @noise_floor_total_iter: Total noise threshold iterations
6407 */
6408typedef struct {
6409 uint32_t noise_floor_report_iter;
6410 uint32_t noise_floor_total_iter;
6411} wmi_host_pdev_channel_hopping_event;
6412
6413/**
6414 * struct wmi_host_pdev_bss_chan_info_event
6415 * @freq: Units in MHz
6416 * @noise_floor: units are dBm
6417 * @rx_clear_count_low:
6418 * @rx_clear_count_high:
6419 * @cycle_count_low:
6420 * @cycle_count_high:
6421 * @tx_cycle_count_low:
6422 * @tx_cycle_count_high:
6423 * @rx_cycle_count_low:
6424 * @rx_cycle_count_high:
6425 * @rx_bss_cycle_count_low:
6426 * @rx_bss_cycle_count_high:
6427 * @reserved:
6428 */
6429typedef struct {
6430 uint32_t freq;
6431 uint32_t noise_floor;
6432 uint32_t rx_clear_count_low;
6433 uint32_t rx_clear_count_high;
6434 uint32_t cycle_count_low;
6435 uint32_t cycle_count_high;
6436 uint32_t tx_cycle_count_low;
6437 uint32_t tx_cycle_count_high;
6438 uint32_t rx_cycle_count_low;
6439 uint32_t rx_cycle_count_high;
6440 uint32_t rx_bss_cycle_count_low;
6441 uint32_t rx_bss_cycle_count_high;
6442 uint32_t reserved;
6443} wmi_host_pdev_bss_chan_info_event;
6444
6445#define WMI_HOST_INST_STATS_INVALID_RSSI 0
6446/**
6447 * struct wmi_host_inst_stats_resp
6448 * @iRSSI: Instantaneous RSSI
6449 * @peer_macaddr: peer mac address
6450 */
6451typedef struct {
6452 uint32_t iRSSI;
6453 wmi_host_mac_addr peer_macaddr;
6454} wmi_host_inst_stats_resp;
6455
6456/* Event definition and new structure addition to send event
6457 * to host to block/unblock tx data traffic based on peer_ast_idx or vdev id
6458 */
6459#define WMI_HOST_INVALID_PEER_AST_INDEX 0xffff
6460#define WMI_HOST_TX_DATA_TRAFFIC_CTRL_BLOCK 0x1
6461#define WMI_HOST_TX_DATA_TRAFFIC_CTRL_UNBLOCK 0x2
6462/**
6463 * struct wmi_host_tx_data_traffic_ctrl_event
6464 * @peer_ast_idx: For vdev based control, peer_ast_idx will be
6465 * WMI_INVALID_PEER_AST_INDEX
6466 * @vdev_id: only applies if peer_ast_idx == INVALID
6467 * @ctrl_cmd: WMI_TX_DATA_TRAFFIC_CTRL_BLOCK or
6468 * WMI_TX_DATA_TRAFFIC_CTRL_UNBLOCK
6469 */
6470typedef struct {
6471 uint32_t peer_ast_idx;
6472 uint32_t vdev_id;
6473 uint32_t ctrl_cmd;
6474} wmi_host_tx_data_traffic_ctrl_event;
6475
6476/**
6477 * struct wmi_host_ath_dcs_cw_int
6478 * @channel: either number or freq in mhz
6479 */
6480typedef struct {
6481 uint32_t channel;
6482} wmi_host_ath_dcs_cw_int;
Govind Singhc10bde82016-05-02 17:59:24 +05306483
6484#define WMI_MAX_POWER_DBG_ARGS 8
6485
6486/**
6487 * struct wmi_power_dbg_params - power debug command parameter
6488 * @pdev_id: subsystem identifier
6489 * @module_id: parameter id
6490 * @num_arg: no of arguments
6491 * @args: arguments
6492 */
6493struct wmi_power_dbg_params {
6494 uint32_t pdev_id;
6495 uint32_t module_id;
6496 uint32_t num_args;
6497 uint32_t args[WMI_MAX_POWER_DBG_ARGS];
6498};
6499
Gupta, Kapil7b768002016-04-25 19:14:19 +05306500/**
6501 * struct wmi_adaptive_dwelltime_params - the adaptive dwelltime params
6502 * @vdev_id: vdev id
6503 * @is_enabled: Adaptive dwell time is enabled/disabled
6504 * @dwelltime_mode: global default adaptive dwell mode
6505 * @lpf_weight: weight to calculate the average low pass
6506 * filter for channel congestion
6507 * @passive_mon_intval: intval to monitor wifi activity in passive scan in msec
6508 * @wifi_act_threshold: % of wifi activity used in passive scan 0-100
6509 *
6510 */
6511struct wmi_adaptive_dwelltime_params {
6512 uint32_t vdev_id;
6513 bool is_enabled;
6514 enum wmi_dwelltime_adaptive_mode dwelltime_mode;
6515 uint8_t lpf_weight;
6516 uint8_t passive_mon_intval;
6517 uint8_t wifi_act_threshold;
6518};
Govind Singhc7cd2d62016-06-21 14:33:26 +05306519
6520/**
6521 * struct wmi_fw_dump_seg_req - individual segment details
6522 * @seg_id - segment id.
6523 * @seg_start_addr_lo - lower address of the segment.
6524 * @seg_start_addr_hi - higher address of the segment.
6525 * @seg_length - length of the segment.
6526 * @dst_addr_lo - lower address of the destination buffer.
6527 * @dst_addr_hi - higher address of the destination buffer.
6528 *
6529 * This structure carries the information to firmware about the
6530 * individual segments. This structure is part of firmware memory
6531 * dump request.
6532 */
6533struct wmi_fw_dump_seg_req {
6534 uint8_t seg_id;
6535 uint32_t seg_start_addr_lo;
6536 uint32_t seg_start_addr_hi;
6537 uint32_t seg_length;
6538 uint32_t dst_addr_lo;
6539 uint32_t dst_addr_hi;
6540};
6541
6542/**
6543 * enum wmi_userspace_log_level - Log level at userspace
6544 * @WMI_LOG_LEVEL_NO_COLLECTION: verbose_level 0 corresponds to no collection
6545 * @WMI_LOG_LEVEL_NORMAL_COLLECT: verbose_level 1 correspond to normal log
6546 * level with minimal user impact. This is the default value.
6547 * @WMI_LOG_LEVEL_ISSUE_REPRO: verbose_level 2 are enabled when user is lazily
6548 * trying to reproduce a problem, wifi performances and power can be impacted
6549 * but device should not otherwise be significantly impacted
6550 * @WMI_LOG_LEVEL_ACTIVE: verbose_level 3+ are used when trying to
6551 * actively debug a problem
6552 *
6553 * Various log levels defined in the userspace for logging applications
6554 */
6555enum wmi_userspace_log_level {
6556 WMI_LOG_LEVEL_NO_COLLECTION,
6557 WMI_LOG_LEVEL_NORMAL_COLLECT,
6558 WMI_LOG_LEVEL_ISSUE_REPRO,
6559 WMI_LOG_LEVEL_ACTIVE,
6560};
6561
Govind Singh3ddda1f2016-03-09 11:34:12 +05306562#endif /* _WMI_UNIFIED_PARAM_H_ */
6563