blob: 8097bd55f2c0fb00ac5f248a1cf1611648d573b9 [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;
Govind Singhae855362016-03-07 14:24:22 +05302601 uint8_t *data;
2602};
2603
2604#define WMI_MAX_NUM_FW_SEGMENTS 4
2605
2606/**
2607 * struct fw_dump_seg_req_param - individual segment details
2608 * @seg_id - segment id.
2609 * @seg_start_addr_lo - lower address of the segment.
2610 * @seg_start_addr_hi - higher address of the segment.
2611 * @seg_length - length of the segment.
2612 * @dst_addr_lo - lower address of the destination buffer.
2613 * @dst_addr_hi - higher address of the destination buffer.
2614 *
2615 * This structure carries the information to firmware about the
2616 * individual segments. This structure is part of firmware memory
2617 * dump request.
2618 */
2619struct fw_dump_seg_req_param {
2620 uint8_t seg_id;
2621 uint32_t seg_start_addr_lo;
2622 uint32_t seg_start_addr_hi;
2623 uint32_t seg_length;
2624 uint32_t dst_addr_lo;
2625 uint32_t dst_addr_hi;
2626};
2627
2628/**
2629 * struct fw_dump_req_param - firmware memory dump request details.
2630 * @request_id - request id.
2631 * @num_seg - requested number of segments.
2632 * @fw_dump_seg_req - individual segment information.
2633 *
2634 * This structure carries information about the firmware
2635 * memory dump request.
2636 */
2637struct fw_dump_req_param {
2638 uint32_t request_id;
2639 uint32_t num_seg;
2640 struct fw_dump_seg_req_param segment[WMI_MAX_NUM_FW_SEGMENTS];
2641};
2642
2643#define WMI_TDLS_MAX_SUPP_CHANNELS 128
2644#define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
2645#define WMI_2_4_GHZ_MAX_FREQ 3000
2646
2647/**
2648 * struct tdls_update_ch_params - channel parameters
2649 * @chanId: ID of the channel
2650 * @pwr: power level
2651 * @dfsSet: is dfs supported or not
2652 * @half_rate: is the channel operating at 10MHz
2653 * @quarter_rate: is the channel operating at 5MHz
2654 */
2655struct tdls_update_ch_params {
2656 uint8_t chanId;
2657 uint8_t pwr;
2658 bool dfsSet;
2659 bool half_rate;
2660 bool quarter_rate;
2661};
2662
2663/**
2664 * struct tdls_peer_cap_params - TDLS peer capablities parameters
2665 * @isPeerResponder: is peer responder or not
2666 * @peerUapsdQueue: peer uapsd queue
2667 * @peerMaxSp: peer max SP value
2668 * @peerBuffStaSupport: peer buffer sta supported or not
2669 * @peerOffChanSupport: peer offchannel support
2670 * @peerCurrOperClass: peer current operating class
2671 * @selfCurrOperClass: self current operating class
2672 * @peerChanLen: peer channel length
2673 * @peerChan: peer channel list
2674 * @peerOperClassLen: peer operating class length
2675 * @peerOperClass: peer operating class
2676 * @prefOffChanNum: peer offchannel number
2677 * @prefOffChanBandwidth: peer offchannel bandwidth
2678 * @opClassForPrefOffChan: operating class for offchannel
2679 */
2680struct tdls_peer_cap_params {
2681 uint8_t isPeerResponder;
2682 uint8_t peerUapsdQueue;
2683 uint8_t peerMaxSp;
2684 uint8_t peerBuffStaSupport;
2685 uint8_t peerOffChanSupport;
2686 uint8_t peerCurrOperClass;
2687 uint8_t selfCurrOperClass;
2688 uint8_t peerChanLen;
2689 struct tdls_update_ch_params peerChan[WMI_TDLS_MAX_SUPP_CHANNELS];
2690 uint8_t peerOperClassLen;
2691 uint8_t peerOperClass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
2692 uint8_t prefOffChanNum;
2693 uint8_t prefOffChanBandwidth;
2694 uint8_t opClassForPrefOffChan;
2695};
2696
2697/**
2698 * struct tdls_peer_state_params - TDLS peer state parameters
2699 * @vdevId: vdev id
2700 * @peerMacAddr: peer mac address
2701 * @peerCap: peer capabality
2702 */
2703struct tdls_peer_state_params {
2704 uint32_t vdevId;
Govind Singh8675b862016-03-28 22:09:18 +05302705 uint8_t peerMacAddr[IEEE80211_ADDR_LEN];
Govind Singhae855362016-03-07 14:24:22 +05302706 uint32_t peerState;
2707 struct tdls_peer_cap_params peerCap;
2708};
2709
2710/**
2711 * struct wmi_tdls_params - TDLS parameters
2712 * @vdev_id: vdev id
2713 * @tdls_state: TDLS state
2714 * @notification_interval_ms: notification inerval
2715 * @tx_discovery_threshold: tx discovery threshold
2716 * @tx_teardown_threshold: tx teardown threashold
2717 * @rssi_teardown_threshold: RSSI teardown threshold
2718 * @rssi_delta: RSSI delta
2719 * @tdls_options: TDLS options
2720 * @peer_traffic_ind_window: raffic indication window
2721 * @peer_traffic_response_timeout: traffic response timeout
2722 * @puapsd_mask: uapsd mask
2723 * @puapsd_inactivity_time: uapsd inactivity time
2724 * @puapsd_rx_frame_threshold: uapsd rx frame threshold
2725 * @teardown_notification_ms: tdls teardown notification interval
2726 * @tdls_peer_kickout_threshold: tdls packet threshold for
2727 * peer kickout operation
2728 */
2729struct wmi_tdls_params {
2730 uint32_t vdev_id;
2731 uint32_t tdls_state;
2732 uint32_t notification_interval_ms;
2733 uint32_t tx_discovery_threshold;
2734 uint32_t tx_teardown_threshold;
2735 int32_t rssi_teardown_threshold;
2736 int32_t rssi_delta;
2737 uint32_t tdls_options;
2738 uint32_t peer_traffic_ind_window;
2739 uint32_t peer_traffic_response_timeout;
2740 uint32_t puapsd_mask;
2741 uint32_t puapsd_inactivity_time;
2742 uint32_t puapsd_rx_frame_threshold;
2743 uint32_t teardown_notification_ms;
2744 uint32_t tdls_peer_kickout_threshold;
2745};
2746
2747/**
2748 * struct tdls_chan_switch_params - channel switch parameter structure
2749 * @vdev_id: vdev ID
2750 * @peer_mac_addr: Peer mac address
2751 * @tdls_off_ch_bw_offset: Target off-channel bandwitdh offset
2752 * @tdls_off_ch: Target Off Channel
2753 * @oper_class: Operating class for target channel
2754 * @is_responder: Responder or initiator
2755 */
2756struct tdls_channel_switch_params {
2757 uint32_t vdev_id;
Govind Singh8675b862016-03-28 22:09:18 +05302758 uint8_t peer_mac_addr[IEEE80211_ADDR_LEN];
Govind Singhae855362016-03-07 14:24:22 +05302759 uint16_t tdls_off_ch_bw_offset;
2760 uint8_t tdls_off_ch;
2761 uint8_t tdls_sw_mode;
2762 uint8_t oper_class;
2763 uint8_t is_responder;
2764};
2765
2766/**
2767 * struct dhcp_offload_info_params - dhcp offload parameters
2768 * @vdev_id: request data length
2769 * @dhcpSrvOffloadEnabled: dhcp offload enabled
2770 * @dhcpClientNum: dhcp client no
2771 * @dhcpSrvIP: dhcp server ip
2772 */
2773struct dhcp_offload_info_params {
2774 uint32_t vdev_id;
2775 uint32_t dhcpSrvOffloadEnabled;
2776 uint32_t dhcpClientNum;
2777 uint32_t dhcpSrvIP;
2778};
2779
2780/**
2781 * struct nan_req_params - NAN request params
2782 * @request_data_len: request data length
2783 * @request_data: request data
2784 */
2785struct nan_req_params {
2786 uint16_t request_data_len;
2787 uint8_t request_data[];
2788};
2789
2790
2791/**
2792 * struct app_type2_params - app type2parameter
2793 * @vdev_id: vdev id
2794 * @rc4_key: rc4 key
2795 * @rc4_key_len: rc4 key length
2796 * @ip_id: NC id
2797 * @ip_device_ip: NC IP addres
2798 * @ip_server_ip: Push server IP address
2799 * @tcp_src_port: NC TCP port
2800 * @tcp_dst_port: Push server TCP port
2801 * @tcp_seq: tcp sequence
2802 * @tcp_ack_seq: tcp ack sequence
2803 * @keepalive_init: Initial ping interval
2804 * @keepalive_min: Minimum ping interval
2805 * @keepalive_max: Maximum ping interval
2806 * @keepalive_inc: Increment of ping interval
2807 * @gateway_mac: gateway mac address
2808 * @tcp_tx_timeout_val: tcp tx timeout value
2809 * @tcp_rx_timeout_val: tcp rx timeout value
2810 */
2811struct app_type2_params {
2812 uint8_t vdev_id;
2813 uint8_t rc4_key[16];
2814 uint32_t rc4_key_len;
2815 /** ip header parameter */
2816 uint32_t ip_id;
2817 uint32_t ip_device_ip;
2818 uint32_t ip_server_ip;
2819 /** tcp header parameter */
2820 uint16_t tcp_src_port;
2821 uint16_t tcp_dst_port;
2822 uint32_t tcp_seq;
2823 uint32_t tcp_ack_seq;
2824 uint32_t keepalive_init;
2825 uint32_t keepalive_min;
2826 uint32_t keepalive_max;
2827 uint32_t keepalive_inc;
Govind Singhd7468a52016-03-09 14:32:57 +05302828 struct qdf_mac_addr gateway_mac;
Govind Singhae855362016-03-07 14:24:22 +05302829 uint32_t tcp_tx_timeout_val;
2830 uint32_t tcp_rx_timeout_val;
2831};
2832
2833/**
2834 * struct app_type1_params - app type1 parameter
2835 * @vdev_id: vdev id
2836 * @wakee_mac_addr: mac address
2837 * @identification_id: identification id
2838 * @password: password
2839 * @id_length: id length
2840 * @pass_length: password length
2841 */
2842struct app_type1_params {
2843 uint8_t vdev_id;
Govind Singhd7468a52016-03-09 14:32:57 +05302844 struct qdf_mac_addr wakee_mac_addr;
Govind Singhae855362016-03-07 14:24:22 +05302845 uint8_t identification_id[8];
2846 uint8_t password[16];
2847 uint32_t id_length;
2848 uint32_t pass_length;
2849};
2850
2851/**
2852 * enum wmi_ext_wow_type - wow type
2853 * @WMI_EXT_WOW_TYPE_APP_TYPE1: only enable wakeup for app type1
2854 * @WMI_EXT_WOW_TYPE_APP_TYPE2: only enable wakeup for app type2
2855 * @WMI_EXT_WOW_TYPE_APP_TYPE1_2: enable wakeup for app type1&2
2856 */
2857enum wmi_ext_wow_type {
2858 WMI_EXT_WOW_TYPE_APP_TYPE1,
2859 WMI_EXT_WOW_TYPE_APP_TYPE2,
2860 WMI_EXT_WOW_TYPE_APP_TYPE1_2,
2861};
2862
2863/**
2864 * struct ext_wow_params - ext wow parameters
2865 * @vdev_id: vdev id
2866 * @type: wow type
2867 * @wakeup_pin_num: wake up gpio no
2868 */
2869struct ext_wow_params {
2870 uint8_t vdev_id;
2871 enum wmi_ext_wow_type type;
2872 uint32_t wakeup_pin_num;
2873};
2874
2875/**
2876 * struct stats_ext_params - ext stats request
2877 * @vdev_id: vdev id
2878 * @request_data_len: request data length
2879 * @request_data: request data
2880 */
2881struct stats_ext_params {
2882 uint32_t vdev_id;
2883 uint32_t request_data_len;
2884 uint8_t request_data[];
2885};
2886
2887#define WMI_PERIODIC_TX_PTRN_MAX_SIZE 1536
2888/**
2889 * struct periodic_tx_pattern - periodic tx pattern
2890 * @mac_address: MAC Address for the adapter
2891 * @ucPtrnId: Pattern ID
2892 * @ucPtrnSize: Pattern size
2893 * @usPtrnIntervalMs: in ms
2894 * @ucPattern: Pattern buffer
2895 */
2896struct periodic_tx_pattern {
Govind Singhd7468a52016-03-09 14:32:57 +05302897 struct qdf_mac_addr mac_address;
Govind Singhae855362016-03-07 14:24:22 +05302898 uint8_t ucPtrnId;
2899 uint16_t ucPtrnSize;
2900 uint32_t usPtrnIntervalMs;
2901 uint8_t ucPattern[WMI_PERIODIC_TX_PTRN_MAX_SIZE];
2902};
2903
2904#define WMI_GTK_OFFLOAD_KEK_BYTES 16
2905#define WMI_GTK_OFFLOAD_KCK_BYTES 16
Siddarth Poddard9221542016-04-01 17:45:06 +05302906#define WMI_GTK_OFFLOAD_ENABLE 0
2907#define WMI_GTK_OFFLOAD_DISABLE 1
Govind Singhae855362016-03-07 14:24:22 +05302908
2909/**
2910 * struct gtk_offload_params - gtk offload parameters
2911 * @ulFlags: optional flags
2912 * @aKCK: Key confirmation key
2913 * @aKEK: key encryption key
2914 * @ullKeyReplayCounter: replay counter
2915 * @bssid: bss id
2916 */
2917struct gtk_offload_params {
2918 uint32_t ulFlags;
2919 uint8_t aKCK[WMI_GTK_OFFLOAD_KCK_BYTES];
2920 uint8_t aKEK[WMI_GTK_OFFLOAD_KEK_BYTES];
2921 uint64_t ullKeyReplayCounter;
Govind Singhd7468a52016-03-09 14:32:57 +05302922 struct qdf_mac_addr bssid;
Govind Singhae855362016-03-07 14:24:22 +05302923};
2924
2925/**
2926 * struct flashing_req_params - led flashing parameter
2927 * @reqId: request id
2928 * @pattern_id: pattern identifier. 0: disconnected 1: connected
2929 * @led_x0: led flashing parameter0
2930 * @led_x1: led flashing parameter1
2931 */
2932struct flashing_req_params {
2933 uint32_t req_id;
2934 uint32_t pattern_id;
2935 uint32_t led_x0;
2936 uint32_t led_x1;
2937};
2938
Govind Singh89727882016-04-15 13:58:27 +05302939#define MAX_MEM_CHUNKS 32
2940/**
2941 * struct wmi_host_mem_chunk - host memory chunk structure
2942 * @vaddr: Pointer to virtual address
2943 * @paddr: Physical address
2944 * @memctx: qdf memory context for mapped address.
2945 * @len: length of chunk
2946 * @req_id: request id from target
2947 */
Govind Singhae855362016-03-07 14:24:22 +05302948struct wmi_host_mem_chunk {
2949 uint32_t *vaddr;
2950 uint32_t paddr;
Govind Singhd7468a52016-03-09 14:32:57 +05302951 qdf_dma_mem_context(memctx);
Govind Singhae855362016-03-07 14:24:22 +05302952 uint32_t len;
2953 uint32_t req_id;
2954};
2955
Govind Singh89727882016-04-15 13:58:27 +05302956/**
2957 * struct target_resource_config - Resource config given to target
2958 * This structure is union of wmi_resource_config defined
2959 * by both TLV and non-TLV target.
2960 */
Govind Singhae855362016-03-07 14:24:22 +05302961struct target_resource_config {
2962 uint32_t num_vdevs;
2963 uint32_t num_peers;
2964 uint32_t num_active_peers;
2965 uint32_t num_offload_peers;
2966 uint32_t num_offload_reorder_buffs;
2967 uint32_t num_peer_keys;
2968 uint32_t num_tids;
2969 uint32_t ast_skid_limit;
2970 uint32_t tx_chain_mask;
2971 uint32_t rx_chain_mask;
2972 uint32_t rx_timeout_pri[4];
2973 uint32_t rx_decap_mode;
2974 uint32_t scan_max_pending_req;
2975 uint32_t bmiss_offload_max_vdev;
2976 uint32_t roam_offload_max_vdev;
2977 uint32_t roam_offload_max_ap_profiles;
2978 uint32_t num_mcast_groups;
2979 uint32_t num_mcast_table_elems;
2980 uint32_t mcast2ucast_mode;
2981 uint32_t tx_dbg_log_size;
2982 uint32_t num_wds_entries;
2983 uint32_t dma_burst_size;
2984 uint32_t mac_aggr_delim;
2985 uint32_t rx_skip_defrag_timeout_dup_detection_check;
2986 uint32_t vow_config;
2987 uint32_t gtk_offload_max_vdev;
2988 uint32_t num_msdu_desc; /* Number of msdu desc */
2989 uint32_t max_frag_entries;
2990 /* End common */
2991
2992 /* Added in MCL */
2993 uint32_t num_tdls_vdevs;
2994 uint32_t num_tdls_conn_table_entries;
2995 uint32_t beacon_tx_offload_max_vdev;
2996 uint32_t num_multicast_filter_entries;
2997 uint32_t num_wow_filters;
2998 uint32_t num_keep_alive_pattern;
2999 uint32_t keep_alive_pattern_size;
3000 uint32_t max_tdls_concurrent_sleep_sta;
3001 uint32_t max_tdls_concurrent_buffer_sta;
3002 uint32_t wmi_send_separate;
3003 uint32_t num_ocb_vdevs;
3004 uint32_t num_ocb_channels;
3005 uint32_t num_ocb_schedules;
3006};
3007
3008/**
3009 * struct wmi_wifi_start_log - Structure to store the params sent to start/
3010 * stop logging
3011 * @name: Attribute which indicates the type of logging like per packet
3012 * statistics, connectivity etc.
3013 * @verbose_level: Verbose level which can be 0,1,2,3
3014 * @flag: Flag field for future use
3015 */
3016struct wmi_wifi_start_log {
3017 uint32_t ring_id;
3018 uint32_t verbose_level;
3019 uint32_t flag;
3020};
3021
3022/**
3023 * struct wmi_pcl_list - Format of PCL
3024 * @pcl_list: List of preferred channels
Manishekar Chandrasekaranb8c59382016-04-21 19:16:32 +05303025 * @weight_list: Weights of the PCL
Govind Singhae855362016-03-07 14:24:22 +05303026 * @pcl_len: Number of channels in the PCL
3027 */
3028struct wmi_pcl_list {
3029 uint8_t pcl_list[128];
Manishekar Chandrasekaranb8c59382016-04-21 19:16:32 +05303030 uint8_t weight_list[128];
Govind Singhae855362016-03-07 14:24:22 +05303031 uint32_t pcl_len;
3032};
3033
3034/**
Manishekar Chandrasekaranb8c59382016-04-21 19:16:32 +05303035 * struct wmi_pcl_chan_weights - Params to get the valid weighed list
3036 * @pcl_list: Preferred channel list already sorted in the order of preference
3037 * @pcl_len: Length of the PCL
3038 * @saved_chan_list: Valid channel list updated as part of
3039 * WMA_UPDATE_CHAN_LIST_REQ
3040 * @saved_num_chan: Length of the valid channel list
3041 * @weighed_valid_list: Weights of the valid channel list. This will have one
3042 * to one mapping with valid_chan_list. FW expects channel order and size to be
3043 * as per the list provided in WMI_SCAN_CHAN_LIST_CMDID.
3044 * @weight_list: Weights assigned by policy manager
3045 */
3046struct wmi_pcl_chan_weights {
3047 uint8_t pcl_list[MAX_NUM_CHAN];
3048 uint32_t pcl_len;
3049 uint8_t saved_chan_list[MAX_NUM_CHAN];
3050 uint32_t saved_num_chan;
3051 uint8_t weighed_valid_list[MAX_NUM_CHAN];
3052 uint8_t weight_list[MAX_NUM_CHAN];
3053};
3054
3055/**
Govind Singhae855362016-03-07 14:24:22 +05303056 * struct wmi_hw_mode_params - HW mode params
3057 * @mac0_tx_ss: MAC0 Tx spatial stream
3058 * @mac0_rx_ss: MAC0 Rx spatial stream
3059 * @mac1_tx_ss: MAC1 Tx spatial stream
3060 * @mac1_rx_ss: MAC1 Rx spatial stream
3061 * @mac0_bw: MAC0 bandwidth
3062 * @mac1_bw: MAC1 bandwidth
3063 * @dbs_cap: DBS capabality
3064 * @agile_dfs_cap: Agile DFS capabality
3065 */
3066struct wmi_hw_mode_params {
3067 uint8_t mac0_tx_ss;
3068 uint8_t mac0_rx_ss;
3069 uint8_t mac1_tx_ss;
3070 uint8_t mac1_rx_ss;
3071 uint8_t mac0_bw;
3072 uint8_t mac1_bw;
3073 uint8_t dbs_cap;
3074 uint8_t agile_dfs_cap;
3075};
3076
3077/**
3078 * struct wmi_dual_mac_config - Dual MAC configuration
3079 * @scan_config: Scan configuration
3080 * @fw_mode_config: FW mode configuration
3081 * @set_dual_mac_cb: Callback function to be executed on response to the command
3082 */
3083struct wmi_dual_mac_config {
3084 uint32_t scan_config;
3085 uint32_t fw_mode_config;
3086 void *set_dual_mac_cb;
3087};
3088
3089#ifdef WLAN_NS_OFFLOAD
3090/**
3091 * struct ns_offload_req_params - ns offload request paramter
3092 * @srcIPv6Addr: src ipv6 address
3093 * @selfIPv6Addr: self ipv6 address
3094 * @targetIPv6Addr: target ipv6 address
3095 * @self_macaddr: self mac address
3096 * @srcIPv6AddrValid: src ipv6 address valid flag
3097 * @targetIPv6AddrValid: target ipv6 address valid flag
Sravan Kumar Kairam33b95492016-07-26 17:59:59 +05303098 * @target_ipv6_addr_ac_type: target ipv6 address type
Govind Singhae855362016-03-07 14:24:22 +05303099 * @slotIdx: slot index
3100 */
3101struct ns_offload_req_params {
3102 uint8_t srcIPv6Addr[WMI_MAC_IPV6_ADDR_LEN];
3103 uint8_t selfIPv6Addr[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][WMI_MAC_IPV6_ADDR_LEN];
3104 uint8_t targetIPv6Addr[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][WMI_MAC_IPV6_ADDR_LEN];
Govind Singhd7468a52016-03-09 14:32:57 +05303105 struct qdf_mac_addr self_macaddr;
Govind Singhae855362016-03-07 14:24:22 +05303106 uint8_t srcIPv6AddrValid;
3107 uint8_t targetIPv6AddrValid[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
Sravan Kumar Kairam33b95492016-07-26 17:59:59 +05303108 uint8_t target_ipv6_addr_ac_type[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
Govind Singhae855362016-03-07 14:24:22 +05303109 uint8_t slotIdx;
3110};
3111#endif /* WLAN_NS_OFFLOAD */
3112
3113/**
3114 * struct host_offload_req_param - arp offload parameter
3115 * @offloadType: offload type
3116 * @enableOrDisable: enable or disable
3117 * @num_ns_offload_count: offload count
3118 */
3119struct host_offload_req_param {
3120 uint8_t offloadType;
3121 uint8_t enableOrDisable;
3122 uint32_t num_ns_offload_count;
3123 union {
3124 uint8_t hostIpv4Addr[WMI_IPV4_ADDR_LEN];
3125 uint8_t hostIpv6Addr[WMI_MAC_IPV6_ADDR_LEN];
3126 } params;
3127#ifdef WLAN_NS_OFFLOAD
3128 struct ns_offload_req_params nsOffloadInfo;
3129#endif /* WLAN_NS_OFFLOAD */
Govind Singhd7468a52016-03-09 14:32:57 +05303130 struct qdf_mac_addr bssid;
Govind Singhae855362016-03-07 14:24:22 +05303131};
3132
3133/**
3134 * struct ssid_hotlist_param - param for SSID Hotlist
3135 * @ssid: SSID which is being hotlisted
3136 * @band: Band in which the given SSID should be scanned
3137 * @rssi_low: Low bound on RSSI
3138 * @rssi_high: High bound on RSSI
3139 */
3140struct ssid_hotlist_param {
3141 struct mac_ssid ssid;
3142 uint8_t band;
3143 int32_t rssi_low;
3144 int32_t rssi_high;
3145};
3146
3147/**
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05303148 * struct roam_scan_filter_params - Structure holding roaming scan
3149 * parameters
3150 * @len: length
3151 * @op_bitmap: bitmap to determine reason of roaming
3152 * @session_id: vdev id
3153 * @num_bssid_black_list: The number of BSSID's that we should
3154 * avoid connecting to. It is like a
3155 * blacklist of BSSID's.
3156 * @num_ssid_white_list: The number of SSID profiles that are
3157 * in the Whitelist. When roaming, we
3158 * consider the BSSID's with this SSID
3159 * also for roaming apart from the connected one's
3160 * @num_bssid_preferred_list: Number of BSSID's which have a preference over
3161 * others
3162 * @bssid_avoid_list: Blacklist SSID's
3163 * @ssid_allowed_list: Whitelist SSID's
3164 * @bssid_favored: Favorable BSSID's
3165 * @bssid_favored_factor: RSSI to be added to this BSSID to prefer it
3166 *
3167 * This structure holds all the key parameters related to
3168 * initial connection and roaming connections.
3169 */
3170
3171struct roam_scan_filter_params {
3172 uint32_t len;
3173 uint32_t op_bitmap;
3174 uint8_t session_id;
3175 uint32_t num_bssid_black_list;
3176 uint32_t num_ssid_white_list;
3177 uint32_t num_bssid_preferred_list;
3178 struct qdf_mac_addr bssid_avoid_list[MAX_BSSID_AVOID_LIST];
3179 struct mac_ssid ssid_allowed_list[MAX_SSID_ALLOWED_LIST];
3180 struct qdf_mac_addr bssid_favored[MAX_BSSID_FAVORED];
3181 uint8_t bssid_favored_factor[MAX_BSSID_FAVORED];
3182};
3183
3184/**
Govind Singhae855362016-03-07 14:24:22 +05303185 * struct ssid_hotlist_request_params - set SSID hotlist request struct
3186 * @request_id: ID of the request
3187 * @session_id: ID of the session
3188 * @lost_ssid_sample_size: Number of consecutive scans in which the SSID
3189 * must not be seen in order to consider the SSID "lost"
3190 * @ssid_count: Number of valid entries in the @ssids array
3191 * @ssids: Array that defines the SSIDs that are in the hotlist
3192 */
3193struct ssid_hotlist_request_params {
3194 uint32_t request_id;
3195 uint8_t session_id;
3196 uint32_t lost_ssid_sample_size;
3197 uint32_t ssid_count;
3198 struct ssid_hotlist_param ssids[WMI_EXTSCAN_MAX_HOTLIST_SSIDS];
3199};
3200
3201/**
3202 * struct wmi_unit_test_cmd - unit test command parameters
3203 * @vdev_id: vdev id
3204 * @module_id: module id
3205 * @num_args: number of arguments
3206 * @args: arguments
3207 */
3208struct wmi_unit_test_cmd {
3209 uint32_t vdev_id;
Govind Singh89727882016-04-15 13:58:27 +05303210 uint32_t module_id;
Govind Singhae855362016-03-07 14:24:22 +05303211 uint32_t num_args;
3212 uint32_t args[WMI_MAX_NUM_ARGS];
3213};
3214
3215/**
3216 * struct wmi_roam_invoke_cmd - roam invoke command
3217 * @vdev_id: vdev id
3218 * @bssid: mac address
3219 * @channel: channel
3220 */
3221struct wmi_roam_invoke_cmd {
3222 uint32_t vdev_id;
3223 uint8_t bssid[IEEE80211_ADDR_LEN];
3224 uint32_t channel;
3225};
3226
3227/**
3228 * struct ext_scan_setbssi_hotlist_params - set hotlist request
3229 * @requestId: request identifier
3230 * @sessionId: session identifier
3231 * @lost_ap_sample_size: number of samples to confirm AP loss
3232 * @numAp: Number of hotlist APs
3233 * @ap: hotlist APs
3234 */
3235struct ext_scan_setbssi_hotlist_params {
3236 uint32_t requestId;
3237 uint8_t sessionId;
3238
3239 uint32_t lost_ap_sample_size;
3240 uint32_t numAp;
3241 struct ap_threshold_params ap[WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS];
3242};
Govind Singh89727882016-04-15 13:58:27 +05303243
3244/**
3245 * struct TARGET_HAL_REG_CAPABILITIES - This is replication of REG table
3246 * structure defined by target. This is added here to remove dependency
3247 * on FW headers so that host can be agnostic to different defintions in
3248 * both the targets.
3249 */
3250typedef struct {
3251 uint32_t eeprom_rd; /* regdomain value specified in EEPROM */
3252 uint32_t eeprom_rd_ext; /* regdomain */
3253 uint32_t regcap1; /* CAP1 capabilities bit map */
3254 uint32_t regcap2; /* REGDMN EEPROM CAP */
3255 uint32_t wireless_modes; /* REGDMN MODE */
3256 uint32_t low_2ghz_chan;
3257 uint32_t high_2ghz_chan;
3258 uint32_t low_5ghz_chan;
3259 uint32_t high_5ghz_chan;
3260} TARGET_HAL_REG_CAPABILITIES;
3261
3262/**
3263 * struct host_mem_req - Host memory request paramseters request by target
3264 * @req_id: Request id to identify the request.
3265 * @unit_size: Size of single unit requested.
3266 * @num_unit_info: Memory chunk info
3267 * @num_units: number of units requested.
3268 */
3269typedef struct {
3270 uint32_t req_id;
3271 uint32_t unit_size;
3272 uint32_t num_unit_info;
3273 uint32_t num_units;
3274} host_mem_req;
3275
3276#define WMI_HOST_DSCP_MAP_MAX (64)
3277
3278/**
3279 * struct wmi_host_ext_resource_config - Extended resource config
3280 * @host_platform_config: Host plaform configuration.
3281 * @fw_featuew_bitmap: FW feature requested bitmap.
3282 */
3283typedef struct {
3284 uint32_t host_platform_config;
3285
3286#define WMI_HOST_FW_FEATURE_LTEU_SUPPORT 0x0001
3287#define WMI_HOST_FW_FEATURE_COEX_GPIO_SUPPORT 0x0002
3288#define WMI_HOST_FW_FEATURE_AUX_RADIO_SPECTRAL_INTF 0x0004
3289#define WMI_HOST_FW_FEATURE_AUX_RADIO_CHAN_LOAD_INTF 0x0008
3290#define WMI_HOST_FW_FEATURE_BSS_CHANNEL_INFO_64 0x0010
3291#define WMI_HOST_FW_FEATURE_PEER_STATS 0x0020
3292#define WMI_HOST_FW_FEATURE_VDEV_STATS 0x0040
3293 /**
3294 * @brief fw_feature_bitmask - Enable/Disable features in FW
3295 * @details
3296 * The bits in fw_feature_bitmask are used as shown by the masks below:
3297 * 0x0001 - LTEU Config enable/disable
3298 * 0x0002 - COEX GPIO Config enable/disable
3299 * 0x0004 - Aux Radio enhancement for spectral scan enable/disable
3300 * 0x0008 - Aux Radio enhancement for chan load scan enable/disable
3301 * 0x0010 - BSS channel info stats enable/disable
3302 * The features in question are enabled by setting
3303 * the feature's bit to 1,
3304 * or disabled by setting the feature's bit to 0.
3305 */
3306 uint32_t fw_feature_bitmap;
3307
3308 /* add new members here */
3309} wmi_host_ext_resource_config;
3310
3311/**
3312 * struct set_neighbour_rx_params - Neighbour RX params
3313 * @vdev_id: vdev id
3314 * @idx: index of param
3315 * @action: action
3316 * @type: Type of param
3317 */
3318struct set_neighbour_rx_params {
3319 uint8_t vdev_id;
3320 uint32_t idx;
3321 uint32_t action;
3322 uint32_t type;
3323};
3324
3325/**
3326 * struct set_fwtest_params - FW test params
3327 * @arg: FW param id
3328 * @value: value
3329 */
3330struct set_fwtest_params {
3331 uint32_t arg;
3332 uint32_t value;
3333};
3334
3335/**
3336 * struct config_ratemask_params - ratemask config parameters
3337 * @vdev_id: vdev id
3338 * @type: Type
3339 * @lower32: Lower 32 bits
3340 * @higher32: Hogher 32 bits
3341 */
3342struct config_ratemask_params {
3343 uint8_t vdev_id;
3344 uint8_t type;
3345 uint32_t lower32;
3346 uint32_t higher32;
3347};
3348
3349/**
3350 * struct peer_add_wds_entry_params - WDS peer entry add params
3351 * @dest_addr: Pointer to destination macaddr
3352 * @peer_addr: Pointer to peer mac addr
3353 * @flags: flags
3354 */
3355struct peer_add_wds_entry_params {
3356 const uint8_t *dest_addr;
3357 uint8_t *peer_addr;
3358 uint32_t flags;
3359};
3360
3361/**
3362 * struct peer_del_wds_entry_params - WDS peer entry del params
3363 * @dest_addr: Pointer to destination macaddr
3364 */
3365struct peer_del_wds_entry_params {
3366 uint8_t *dest_addr;
3367};
3368
3369/**
3370 * struct peer_updatewds_entry_params - WDS peer entry update params
3371 * @wds_macaddr: Pointer to destination macaddr
3372 * @peer_add: Pointer to peer mac addr
3373 * @flags: flags
3374 */
3375struct peer_update_wds_entry_params {
3376 uint8_t *wds_macaddr;
3377 uint8_t *peer_macaddr;
3378 uint32_t flags;
3379};
3380
3381/**
3382 * struct set_ps_mode_params - PS mode params
3383 * @vdev_id: vdev id
3384 * @psmode: PS mode
3385 */
3386struct set_ps_mode_params {
3387 uint8_t vdev_id;
3388 uint8_t psmode;
3389};
3390
3391/**
3392 * @struct tt_level_config - Set Thermal throttlling config
3393 * @tmplwm: Temperature low water mark
3394 * @tmphwm: Temperature high water mark
3395 * @dcoffpercent: dc off percentage
3396 * @priority: priority
3397 */
3398typedef struct {
3399 uint32_t tmplwm;
3400 uint32_t tmphwm;
3401 uint32_t dcoffpercent;
3402 uint32_t priority;
3403} tt_level_config;
3404
3405/**
3406 * struct thermal_mitigation_params - Thermal mitigation params
3407 * @enable: Enable/Disable Thermal mitigation
3408 * @dc: DC
3409 * @dc_per_event: DC per event
3410 * @tt_level_config: TT level config params
3411 */
3412struct thermal_mitigation_params {
3413 uint32_t enable;
3414 uint32_t dc;
3415 uint32_t dc_per_event;
3416 tt_level_config levelconf[THERMAL_LEVELS];
3417};
3418
3419/**
3420 * struct smart_ant_enable_params - Smart antenna params
3421 * @enable: Enable/Disable
3422 * @mode: SA mode
3423 * @rx_antenna: RX antenna config
Govind Singh41da3152016-05-06 20:20:25 +05303424 * @gpio_pin : GPIO pin config
3425 * @gpio_func : GPIO function config
Govind Singh89727882016-04-15 13:58:27 +05303426 */
3427struct smart_ant_enable_params {
3428 uint32_t enable;
3429 uint32_t mode;
3430 uint32_t rx_antenna;
Govind Singh41da3152016-05-06 20:20:25 +05303431 uint32_t gpio_pin[WMI_HAL_MAX_SANTENNA];
3432 uint32_t gpio_func[WMI_HAL_MAX_SANTENNA];
Govind Singh89727882016-04-15 13:58:27 +05303433};
3434
3435/**
3436 * struct smart_ant_rx_ant_params - RX antenna params
3437 * @antenna: RX antenna
3438 */
3439struct smart_ant_rx_ant_params {
3440 uint32_t antenna;
3441};
3442
3443/**
3444 * struct smart_ant_tx_ant_params - TX antenna param
3445 * @antenna_array: Antenna arry
3446 * @vdev_id: VDEV id
3447 */
3448struct smart_ant_tx_ant_params {
3449 uint32_t *antenna_array;
3450 uint8_t vdev_id;
3451};
3452
3453/**
3454 * struct smart_ant_training_info_params - SA training params
3455 * @vdev_id: VDEV id
3456 * @rate_array: Rates array
3457 * @antenna_array: Antenna array
3458 * @numpkts: num packets for training
3459 */
3460struct smart_ant_training_info_params {
3461 uint8_t vdev_id;
3462 uint32_t *rate_array;
3463 uint32_t *antenna_array;
3464 uint32_t numpkts;
3465};
3466
3467/**
3468 * struct smart_ant_node_config_params - SA node config params
3469 * @vdev_id: VDEV id
3470 * @cmd_id: Command id
3471 * @args_count: Arguments count
3472 */
3473struct smart_ant_node_config_params {
3474 uint8_t vdev_id;
3475 uint32_t cmd_id;
3476 uint16_t args_count;
3477 uint32_t *args_arr;
3478};
3479/**
3480 * struct smart_ant_enable_tx_feedback_params - SA tx feeback params
3481 * @enable: Enable TX feedback for SA
3482 */
3483struct smart_ant_enable_tx_feedback_params {
3484 int enable;
3485};
3486
3487/**
3488 * struct vdev_spectral_configure_params - SPectral config params
3489 * @vdev_id: VDEV id
3490 * @count: count
3491 * @period: period
3492 * @spectral_pri: Spectral priority
3493 * @fft_size: FFT size
3494 * @gc_enable: GC enable
3495 * @restart_enable: restart enabled
3496 * @noise_floor_ref: Noise floor reference
3497 * @init_delay: Init delays
3498 * @nb_tone_thr: NB tone threshold
3499 * @str_bin_thr: STR BIN threshold
3500 * @wb_rpt_mode: WB BIN threshold
3501 * @rssi_rpt_mode: RSSI report mode
3502 * @rssi_thr: RSSI threshold
3503 * @pwr_format: Power format
3504 * @rpt_mode: Report mdoe
3505 * @bin_scale: BIN scale
3506 * @dBm_adj: DBM adjust
3507 * @chn_mask: chain mask
3508 */
3509struct vdev_spectral_configure_params {
3510 uint8_t vdev_id;
3511 uint16_t count;
3512 uint16_t period;
3513 uint16_t spectral_pri;
3514 uint16_t fft_size;
3515 uint16_t gc_enable;
3516 uint16_t restart_enable;
3517 uint16_t noise_floor_ref;
3518 uint16_t init_delay;
3519 uint16_t nb_tone_thr;
3520 uint16_t str_bin_thr;
3521 uint16_t wb_rpt_mode;
3522 uint16_t rssi_rpt_mode;
3523 uint16_t rssi_thr;
3524 uint16_t pwr_format;
3525 uint16_t rpt_mode;
3526 uint16_t bin_scale;
3527 uint16_t dBm_adj;
3528 uint16_t chn_mask;
3529};
3530
3531/**
3532 * struct vdev_spectral_enable_params - Spectral enabled params
3533 * @vdev_id: VDEV id
3534 * @active_valid: Active valid
3535 * @active: active
3536 * @enabled_valid: Enabled valid
3537 * @enabled: enabled
3538 */
3539struct vdev_spectral_enable_params {
3540 uint8_t vdev_id;
3541 uint8_t active_valid;
3542 uint8_t active;
3543 uint8_t enabled_valid;
3544 uint8_t enabled;
3545};
3546
3547/**
3548 * struct pdev_set_regdomain_params - PDEV set reg domain params
3549 * @currentRDinuse: Current Reg domain
3550 * @currentRD2G: Current Reg domain 2G
3551 * @currentRD5G: Current Reg domain 5G
3552 * @ctl_2G: CTL 2G
3553 * @ctl_5G: CTL 5G
3554 * @dfsDomain: DFS domain
3555 */
3556struct pdev_set_regdomain_params {
3557 uint16_t currentRDinuse;
3558 uint16_t currentRD2G;
3559 uint16_t currentRD5G;
3560 uint32_t ctl_2G;
3561 uint32_t ctl_5G;
3562 uint8_t dfsDomain;
3563};
3564
3565/**
3566 * struct set_quiet_mode_params - Set quiet mode params
3567 * @enabled: Enabled
3568 * @period: Quite period
3569 * @intval: Quite interval
3570 * @duration: Quite duration
3571 * @offset: offset
3572 */
3573struct set_quiet_mode_params {
3574 uint8_t enabled;
3575 uint8_t period;
3576 uint16_t intval;
3577 uint16_t duration;
3578 uint16_t offset;
3579};
3580
3581/**
3582 * struct set_beacon_filter_params - Set beacon filter params
3583 * @vdev_id: VDEV id
3584 * @ie: Pointer to IE fields
3585 */
3586struct set_beacon_filter_params {
3587 uint8_t vdev_id;
3588 uint32_t *ie;
3589};
3590
3591/**
3592 * struct remove_beacon_filter_params - Remove beacon filter params
3593 * @vdev_id: VDEV id
3594 */
3595struct remove_beacon_filter_params {
3596 uint8_t vdev_id;
3597};
3598
3599/**
3600 * struct mgmt_params - Mgmt params
3601 * @vdev_id: vdev id
3602 * @buf_len: lenght of frame buffer
3603 * @wbuf: frame buffer
3604 */
3605struct mgmt_params {
3606 int vdev_id;
3607 uint32_t buf_len;
3608 qdf_nbuf_t wbuf;
3609};
3610
3611/**
3612 * struct addba_clearresponse_params - Addba clear response params
3613 * @vdev_id: VDEV id
3614 */
3615struct addba_clearresponse_params {
3616 uint8_t vdev_id;
3617};
3618
3619/**
3620 * struct addba_send_params - ADDBA send params
3621 * @vdev_id: vdev id
3622 * @tidno: TID
3623 * @buffersize: buffer size
3624 */
3625struct addba_send_params {
3626 uint8_t vdev_id;
3627 uint8_t tidno;
3628 uint16_t buffersize;
3629};
3630
3631/**
3632 * struct delba_send_params - DELBA send params
3633 * @vdev_id: vdev id
3634 * @tidno: TID
3635 * @initiator: initiator
3636 * @reasoncode: reason code
3637 */
3638struct delba_send_params {
3639 uint8_t vdev_id;
3640 uint8_t tidno;
3641 uint8_t initiator;
3642 uint16_t reasoncode;
3643};
3644/**
3645 * struct addba_setresponse_arams - Set ADDBA response params
3646 * @vdev_id: vdev id
3647 * @tidno: TID
3648 * @statuscode: status code in response
3649 */
3650struct addba_setresponse_params {
3651 uint8_t vdev_id;
3652 uint8_t tidno;
3653 uint16_t statuscode;
3654};
3655
3656/**
3657 * struct singleamsdu_params - Single AMSDU params
3658 * @vdev_id: vdev is
3659 * @tidno: TID
3660 */
3661struct singleamsdu_params {
3662 uint8_t vdev_id;
3663 uint8_t tidno;
3664};
3665
3666/**
3667 * struct set_qbosst_params - Set QBOOST params
3668 * @vdev_id: vdev id
3669 * @value: value
3670 */
3671struct set_qboost_params {
3672 uint8_t vdev_id;
3673 uint32_t value;
3674};
3675
3676/**
3677 * struct mu_scan_params - MU scan params
3678 * @id: id
3679 * @type: type
3680 * @duration: Duration
3681 * @lteu_tx_power: LTEU tx power
3682 */
3683struct mu_scan_params {
3684 uint8_t id;
3685 uint8_t type;
3686 uint32_t duration;
3687 uint32_t lteu_tx_power;
3688};
3689
3690/**
3691 * struct lteu_config_params - LTEU config params
3692 * @lteu_gpio_start: start MU/AP scan after GPIO toggle
3693 * @lteu_num_bins: no. of elements in the following arrays
3694 * @use_actual_nf: whether to use the actual NF obtained or a hardcoded one
3695 * @lteu_weight: weights for MU algo
3696 * @lteu_thresh: thresholds for MU algo
3697 * @lteu_gamma: gamma's for MU algo
3698 * @lteu_scan_timeout: timeout in ms to gpio toggle
3699 * @alpha_num_ssid: alpha for num active bssid calculation
3700 * @wifi_tx_power: Wifi Tx power
3701 */
3702struct lteu_config_params {
3703 uint8_t lteu_gpio_start;
3704 uint8_t lteu_num_bins;
3705 uint8_t use_actual_nf;
3706 uint32_t lteu_weight[LTEU_MAX_BINS];
3707 uint32_t lteu_thresh[LTEU_MAX_BINS];
3708 uint32_t lteu_gamma[LTEU_MAX_BINS];
3709 uint32_t lteu_scan_timeout;
3710 uint32_t alpha_num_bssid;
3711 uint32_t wifi_tx_power;
3712};
3713
3714struct wmi_macaddr_t {
3715 /** upper 4 bytes of MAC address */
3716 uint32_t mac_addr31to0;
3717 /** lower 2 bytes of MAC address */
3718 uint32_t mac_addr47to32;
3719};
3720
3721/**
3722 * struct atf_peer_info - ATF peer info params
3723 * @peer_macaddr: peer mac addr
3724 * @percentage_peer: percentage of air time for this peer
3725 */
3726typedef struct {
3727 struct wmi_macaddr_t peer_macaddr;
3728 uint32_t percentage_peer;
3729} atf_peer_info;
3730
3731/**
Sathish Kumar50232d72016-08-09 16:50:46 +05303732 * struct bwf_peer_info_t - BWF peer info params
3733 * @peer_macaddr: peer mac addr
3734 * @throughput: Throughput
3735 * @max_airtime: Max airtime
3736 * @priority: Priority level
3737 * @reserved: Reserved array
3738 */
3739typedef struct {
3740 struct wmi_macaddr_t peer_macaddr;
3741 uint32_t throughput;
3742 uint32_t max_airtime;
3743 uint32_t priority;
3744 uint32_t reserved[4];
3745} bwf_peer_info;
3746
3747/**
3748 * struct set_bwf_params - BWF params
3749 * @num_peers: number of peers
3750 * @atf_peer_info: BWF peer info
3751 */
3752struct set_bwf_params {
3753 uint32_t num_peers;
3754 bwf_peer_info peer_info[1];
3755};
3756
3757/**
Govind Singh89727882016-04-15 13:58:27 +05303758 * struct set_atf_params - ATF params
3759 * @num_peers: number of peers
3760 * @atf_peer_info: ATF peer info
3761 */
3762struct set_atf_params {
3763 uint32_t num_peers;
3764 atf_peer_info peer_info[ATF_ACTIVED_MAX_CLIENTS];
3765};
3766
3767/**
3768 * struct atf_peer_ext_info - ATF peer ext info params
3769 * @peer_macaddr: peer mac address
3770 * @group_index: group index
3771 * @atf_index_reserved: ATF index rsvd
3772 */
3773typedef struct {
3774 struct wmi_macaddr_t peer_macaddr;
3775 uint32_t group_index;
3776 uint32_t atf_index_reserved;
3777} atf_peer_ext_info;
3778
3779/**
3780 * struct atf_peer_request_params - ATF peer req params
3781 * @num_peers: number of peers
3782 * @atf_peer_ext_info: ATF peer ext info
3783 */
3784struct atf_peer_request_params {
3785 uint32_t num_peers;
3786 atf_peer_ext_info peer_ext_info[ATF_ACTIVED_MAX_CLIENTS];
3787};
3788
3789/**
3790 * struct atf_group_info - ATF group info params
3791 * @percentage_group: Percentage AT for group
3792 * @atf_group_units_reserved: ATF group information
3793 */
3794typedef struct {
3795 uint32_t percentage_group;
3796 uint32_t atf_group_units_reserved;
3797} atf_group_info;
3798
3799/**
3800 * struct atf_grouping_params - ATF grouping params
3801 * @num_groups: number of groups
3802 * @group_inf: Group informaition
3803 */
3804struct atf_grouping_params {
3805 uint32_t num_groups;
3806 atf_group_info group_info[ATF_ACTIVED_MAX_ATFGROUPS];
3807};
3808
3809/**
3810 * struct wlan_profile_params - WLAN profile params
3811 * @param_id: param id
3812 * @profile_id: profile id
3813 * @enable: enable
3814 */
3815struct wlan_profile_params {
3816 uint32_t param_id;
3817 uint32_t profile_id;
3818 uint32_t enable;
3819};
3820
3821/* struct ht_ie_params - HT IE params
3822 * @ie_len: IE length
3823 * @ie_data: pointer to IE data
3824 */
3825struct ht_ie_params {
3826 uint32_t ie_len;
3827 uint8_t *ie_data;
3828};
3829
3830/* struct vht_ie_params - VHT IE params
3831 * @ie_len: IE length
3832 * @ie_data: pointer to IE data
3833 */
3834struct vht_ie_params {
3835 uint32_t ie_len;
3836 uint8_t *ie_data;
3837};
3838
3839/**
3840 * struct wmi_host_wmeParams - WME params
3841 * @wmep_acm: ACM paramete
3842 * @wmep_aifsn: AIFSN parameters
3843 * @wmep_logcwmin: cwmin in exponential form
3844 * @wmep_logcwmax: cwmax in exponential form
3845 * @wmep_txopLimit: txopLimit
3846 * @wmep_noackPolicy: No-Ack Policy: 0=ack, 1=no-ack
3847 */
3848struct wmi_host_wmeParams {
3849 u_int8_t wmep_acm;
3850 u_int8_t wmep_aifsn;
3851 u_int8_t wmep_logcwmin;
3852 u_int8_t wmep_logcwmax;
3853 u_int16_t wmep_txopLimit;
3854 u_int8_t wmep_noackPolicy;
3855};
3856
3857/**
3858 * struct wmm_update_params - WMM update params
3859 * @wmep_array: WME params for each AC
3860 */
3861struct wmm_update_params {
3862 struct wmi_host_wmeParams *wmep_array;
3863};
3864
3865/**
3866 * struct ant_switch_tbl_params - Antenna switch table params
3867 * @ant_ctrl_common1: ANtenna control common param 1
3868 * @ant_ctrl_common2: Antenna control commn param 2
3869 */
3870struct ant_switch_tbl_params {
3871 uint32_t ant_ctrl_common1;
3872 uint32_t ant_ctrl_common2;
3873};
3874
3875/**
3876 * struct ratepwr_table_params - Rate power table params
3877 * @ratepwr_tbl: pointer to rate power table
3878 * @ratepwr_len: rate power table len
3879 */
3880struct ratepwr_table_params {
3881 uint8_t *ratepwr_tbl;
3882 uint16_t ratepwr_len;
3883};
3884
3885/**
3886 * struct ctl_table_params - Ctl table params
3887 * @ctl_array: pointer to ctl array
3888 * @ctl_len: ctl length
3889 * @is_acfg_ctl: is acfg_ctl table
3890 */
3891struct ctl_table_params {
3892 uint8_t *ctl_array;
3893 uint16_t ctl_len;
3894 bool is_acfg_ctl;
3895};
3896
3897/**
3898 * struct mimogain_table_params - MIMO gain table params
3899 * @array_gain: pointer to array gain table
3900 * @tbl_len: table length
3901 * @multichain_gain_bypass: bypass multichain gain
3902 */
3903struct mimogain_table_params {
3904 uint8_t *array_gain;
3905 uint16_t tbl_len;
3906 bool multichain_gain_bypass;
3907};
3908
3909/**
3910 * struct ratepwr_chainmask_params - Rate power chainmask params
3911 * @ratepwr_chain_tbl: pointer to ratepwr chain table
3912 * @num_rate: number of rate in table
3913 * @pream_type: preamble type
3914 * @ops: ops
3915 */
3916struct ratepwr_chainmsk_params {
3917 uint32_t *ratepwr_chain_tbl;
3918 uint16_t num_rate;
3919 uint8_t pream_type;
3920 uint8_t ops;
3921};
3922
3923struct macaddr_params {
3924 uint8_t *macaddr;
3925};
3926
3927/**
3928 * struct acparams_params - acparams config structure
3929 * @ac: AC to configure
3930 * @use_rts: Use rts for this AC
3931 * @aggrsize_scaling: Aggregrate size scaling for the AC
3932 * @min_kbps: min kbps req
3933 */
3934struct acparams_params {
3935 uint8_t ac;
3936 uint8_t use_rts;
3937 uint8_t aggrsize_scaling;
3938 uint32_t min_kbps;
3939};
3940
3941/**
3942 * struct vap_dscp_tid_map_params - DSCP tid map params
3943 * @vdev_id: vdev id
3944 * @dscp_to_tid_map: pointer to arry of tid to dscp map table
3945 */
3946struct vap_dscp_tid_map_params {
3947 uint8_t vdev_id;
3948 uint32_t *dscp_to_tid_map;
3949};
3950
3951/**
3952 * struct proxy_ast_reserve_params - Proxy AST reserve params
3953 * @macaddr: macaddr for proxy ast entry
3954 */
3955struct proxy_ast_reserve_params {
3956 uint8_t *macaddr;
3957};
3958
3959/**
3960 * struct fips_params - FIPS params config
3961 * @key: pointer to key
3962 * @key_len: length of key
3963 * @data: pointer data buf
3964 * @data_len: lenght of sata buf
3965 * @mode: mode
3966 * @op: operation
3967 */
3968struct fips_params {
3969 uint8_t *key;
3970 uint32_t key_len;
3971 uint8_t *data;
3972 uint32_t data_len;
3973 uint32_t mode;
3974 uint32_t op;
3975};
3976
3977/**
3978 * struct mcast_group_update_param - Mcast group table update to target
3979 * @action: Addition/deletion
3980 * @wildcard: iwldcard table entry?
3981 * @mcast_ip_addr: mcast ip address to be updated
3982 * @mcast_ip_addr_bytes: mcast ip addr bytes
3983 * @ucast_mac_addr: ucast peer mac subscribed to mcast ip
3984 * @filter_mode: filter mode
3985 * @nsrcs: number of entries in source list
3986 * @srcs: source mac accpted
3987 * @mask: mask
3988 * @vap_id: vdev id
3989 * @is_action_delete: is delete
3990 * @is_filter_mode_snoop:
3991 * @is_mcast_addr_len:
3992 */
3993struct mcast_group_update_params {
3994 int action;
3995 int wildcard;
3996 uint8_t *mcast_ip_addr;
3997 int mcast_ip_addr_bytes;
3998 uint8_t *ucast_mac_addr;
3999 uint8_t filter_mode;
4000 uint8_t nsrcs;
4001 uint8_t *srcs;
4002 uint8_t *mask;
4003 uint8_t vap_id;
4004 bool is_action_delete;
4005 bool is_filter_mode_snoop;
4006 bool is_mcast_addr_len;
4007};
4008
4009/**
4010 * struct periodic_chan_stats_param - periodic channel stats req param
4011 * @stats_period: stats period update
4012 * @enable: enable/disable
4013 */
4014struct periodic_chan_stats_params {
4015 uint32_t stats_period;
4016 bool enable;
4017};
4018
4019/**
4020 * struct packet_power_info_params - packet power info params
4021 * @rate_flags: rate flags
4022 * @nss: number of spatial streams
4023 * @preamble: preamble
4024 * @hw_rate:
4025 */
4026struct packet_power_info_params {
4027 uint16_t rate_flags;
4028 uint16_t nss;
4029 uint16_t preamble;
4030 uint16_t hw_rate;
4031};
4032
4033/**
4034 * WMI_GPIO_CONFIG_CMDID
4035 */
4036enum {
4037 WMI_HOST_GPIO_PULL_NONE,
4038 WMI_HOST_GPIO_PULL_UP,
4039 WMI_HOST_GPIO_PULL_DOWN,
4040};
4041
4042/**
4043 * WMI_GPIO_INTTYPE
4044 */
4045enum {
4046 WMI_HOST_GPIO_INTTYPE_DISABLE,
4047 WMI_HOST_GPIO_INTTYPE_RISING_EDGE,
4048 WMI_HOST_GPIO_INTTYPE_FALLING_EDGE,
4049 WMI_HOST_GPIO_INTTYPE_BOTH_EDGE,
4050 WMI_HOST_GPIO_INTTYPE_LEVEL_LOW,
4051 WMI_HOST_GPIO_INTTYPE_LEVEL_HIGH
4052};
4053
4054/**
4055 * struct wmi_host_gpio_input_event - GPIO input event structure
4056 * @gpio_num: GPIO number which changed state
4057 */
4058typedef struct {
4059 uint32_t gpio_num; /* GPIO number which changed state */
4060} wmi_host_gpio_input_event;
4061
4062/**
4063 * struct gpio_config_params - GPIO config params
4064 * @gpio_num: GPIO number to config
4065 * @input: input/output
4066 * @pull_type: pull type
4067 * @intr_mode: int mode
4068 */
4069struct gpio_config_params {
4070 uint32_t gpio_num;
4071 uint32_t input;
4072 uint32_t pull_type;
4073 uint32_t intr_mode;
4074};
4075
4076/**
4077 * struct gpio_output_params - GPIO output params
4078 * @gpio_num: GPIO number to configure
4079 * @set: set/reset
4080 */
4081struct gpio_output_params {
4082 uint32_t gpio_num;
4083 uint32_t set;
4084};
4085
4086#define WMI_HOST_RTT_REPORT_CFR 0
4087#define WMI_HOST_RTT_NO_REPORT_CFR 1
4088#define WMI_HOST_RTT_AGGREGATE_REPORT_NON_CFR 2
4089/**
4090 * struct rtt_meas_req_test_params
4091 * @peer: peer mac address
4092 * @req_frame_type: RTT request frame type
4093 * @req_bw: requested bandwidth
4094 * @req_preamble: Preamble
4095 * @req_num_req: num of requests
4096 * @req_report_type: report type
4097 * @num_measurements: number of measurements
4098 * @asap_mode: priority
4099 * @lci_requested: LCI requested
4100 * @loc_civ_requested:
4101 * @channel_param: channel param
4102 * @req_id: requested id
4103 */
4104struct rtt_meas_req_test_params {
4105 uint8_t peer[IEEE80211_ADDR_LEN];
4106 int req_frame_type;
4107 int req_bw;
4108 int req_preamble;
4109 int req_num_req;
4110 int req_report_type;
4111 uint32_t num_measurements;
4112 uint32_t asap_mode;
4113 uint32_t lci_requested;
4114 uint32_t loc_civ_requested;
4115 struct channel_param channel;
4116 uint8_t req_id;
4117};
4118
4119/**
4120 * struct rtt_meas_req_params - RTT measurement request params
4121 * @req_id: Request id
4122 * @vdev_id: vdev id
4123 * @sta_mac_addr: pointer to station mac address
4124 * @spoof_mac_addr: pointer to spoof mac address
4125 * @is_mode_na: 11NA
4126 * @is_mode_ac: AC
4127 * @is_bw_20: 20
4128 * @is_bw_40: 40
4129 * @is_bw_80: 80
4130 * @num_probe_rqst: number of probe request
4131 * @channel_param: channel param
4132 */
4133struct rtt_meas_req_params {
4134 uint8_t req_id;
4135 uint8_t vdev_id;
4136 uint8_t *sta_mac_addr;
4137 uint8_t *spoof_mac_addr;
4138 bool is_mode_na;
4139 bool is_mode_ac;
4140 bool is_bw_20;
4141 bool is_bw_40;
4142 bool is_bw_80;
4143 uint32_t num_probe_rqst;
4144 struct channel_param channel;
4145};
4146
4147/**
4148 * struct lci_set_params - LCI params
4149 * @lci_data: pointer to LCI data
4150 * @latitude_unc: latitude
4151 * @latitude_0_12: bits 0 to 1 of latitude
4152 * @latitude_2_33: bits 2 to 33 of latitude
4153 * @longitude_unc: longitude
4154 * @longitude_0_1: bits 0 to 1 of longitude
4155 * @longitude_2_33: bits 2 to 33 of longitude
4156 * @altitude_type: altitude type
4157 * @altitude_unc_0_3: altitude bits 0 - 3
4158 * @altitude_unc_4_5: altitude bits 4 - 5
4159 * @altitude: altitude
4160 * @datum: dataum
4161 * @reg_loc_agmt:
4162 * @reg_loc_dse:
4163 * @dep_sta:
4164 * @version: version
4165 */
4166struct lci_set_params {
4167 void *lci_data;
4168 uint8_t latitude_unc:6,
4169 latitude_0_1:2;
4170 uint32_t latitude_2_33;
4171 uint8_t longitude_unc:6,
4172 longitude_0_1:2;
4173 uint32_t longitude_2_33;
4174 uint8_t altitude_type:4,
4175 altitude_unc_0_3:4;
4176 uint32_t altitude_unc_4_5:2,
4177 altitude:30;
4178 uint8_t datum:3,
4179 reg_loc_agmt:1,
4180 reg_loc_dse:1,
4181 dep_sta:1,
4182 version:2;
4183};
4184
4185/**
4186 * struct lcr_set_params - LCR params
4187 * @lcr_data: pointer to lcr data
4188 */
4189struct lcr_set_params {
4190 void *lcr_data;
4191};
4192
4193/**
4194 * struct rtt_keepalive_req_params - RTT keepalive params
4195 * @macaddr: pointer to macaddress
4196 * @req_id: Request id
4197 * @vdev_id: vdev id
4198 * @stop: start/stop
4199 */
4200struct rtt_keepalive_req_params {
4201 uint8_t *macaddr;
4202 uint8_t req_id;
4203 uint8_t vdev_id;
4204 bool stop;
4205};
4206
4207/**
4208 * struct wmi_host_stats_event - Stats event params
4209 * @stats_id: stats id of type wmi_host_stats_event
4210 * @num_pdev_stats: number of pdev stats event structures 0 or 1
4211 * @num_pdev_ext_stats: number of pdev ext stats event structures
4212 * @num_vdev_stats: number of vdev stats
4213 * @num_peer_stats: number of peer stats event structures 0 or max peers
4214 * @num_bcnflt_stats: number of beacon filter stats
4215 * @num_chan_stats: number of channel stats
4216 */
4217typedef struct {
4218 wmi_host_stats_id stats_id;
4219 uint32_t num_pdev_stats;
4220 uint32_t num_pdev_ext_stats;
4221 uint32_t num_vdev_stats;
4222 uint32_t num_peer_stats;
4223 uint32_t num_bcnflt_stats;
4224 uint32_t num_chan_stats;
4225} wmi_host_stats_event;
4226
4227/**
Govind Singh89727882016-04-15 13:58:27 +05304228 * struct wmi_host_peer_extd_stats - peer extd stats event structure
4229 * @peer_macaddr: Peer mac address
4230 * @inactive_time: inactive time in secs
4231 * @peer_chain_rssi: peer rssi
4232 * @rx_duration: RX duration
4233 * @peer_tx_bytes: TX bytes
4234 * @peer_rx_bytes: RX bytes
4235 * @last_tx_rate_code: Tx rate code of last frame
4236 * @last_tx_power: Tx power latest
4237 * @atf_tokens_allocated: atf tokens allocated
4238 * @atf_tokens_utilized: atf tokens utilized
4239 * @reserved: for future use
4240 */
4241typedef struct {
4242 wmi_host_mac_addr peer_macaddr;
4243 uint32_t inactive_time;
4244 uint32_t peer_chain_rssi;
4245 uint32_t rx_duration;
4246 uint32_t peer_tx_bytes;
4247 uint32_t peer_rx_bytes;
4248 uint32_t last_tx_rate_code;
4249 uint32_t last_tx_power;
4250 uint32_t atf_tokens_allocated;
4251 uint32_t atf_tokens_utilized;
4252 uint32_t reserved[4];
4253} wmi_host_peer_extd_stats;
4254
4255/**
4256 * struct wmi_host_pdev_ext_stats - peer ext stats structure
4257 * @rx_rssi_comb: RX rssi
4258 * @rx_rssi_chain0: RX rssi chain 0
4259 * @rx_rssi_chain1: RX rssi chain 1
4260 * @rx_rssi_chain2: RX rssi chain 2
4261 * @rx_rssi_chain3: RX rssi chain 3
4262 * @rx_mcs: RX MCS array
4263 * @tx_mcs: TX MCS array
4264 * @ack_rssi: Ack rssi
4265 */
4266typedef struct {
4267 uint32_t rx_rssi_comb;
4268 uint32_t rx_rssi_chain0;
4269 uint32_t rx_rssi_chain1;
4270 uint32_t rx_rssi_chain2;
4271 uint32_t rx_rssi_chain3;
4272 uint32_t rx_mcs[10];
4273 uint32_t tx_mcs[10];
4274 uint32_t ack_rssi;
4275} wmi_host_pdev_ext_stats;
4276
4277/**
4278 * struct wmi_host_dbg_tx_stats - Debug stats
4279 * @comp_queued: Num HTT cookies queued to dispatch list
4280 * @comp_delivered: Num HTT cookies dispatched
4281 * @msdu_enqued: Num MSDU queued to WAL
4282 * @mpdu_enqued: Num MPDU queue to WAL
4283 * @wmm_drop: Num MSDUs dropped by WMM limit
4284 * @local_enqued: Num Local frames queued
4285 * @local_freed: Num Local frames done
4286 * @hw_queued: Num queued to HW
4287 * @hw_reaped: Num PPDU reaped from HW
4288 * @underrun: Num underruns
4289 * @hw_paused: HW Paused.
4290 * @tx_abort: Num PPDUs cleaned up in TX abort
4291 * @mpdus_requed: Num MPDUs requed by SW
4292 * @tx_ko: excessive retries
4293 * @tx_xretry:
4294 * @data_rc: data hw rate code
4295 * @self_triggers: Scheduler self triggers
4296 * @sw_retry_failure: frames dropped due to excessive sw retries
4297 * @illgl_rate_phy_err: illegal rate phy errors
4298 * @pdev_cont_xretry: wal pdev continous xretry
4299 * @pdev_tx_timeout: wal pdev continous xretry
4300 * @pdev_resets: wal pdev resets
4301 * @stateless_tid_alloc_failure: frames dropped due to non-availability of
4302 * stateless TIDs
4303 * @phy_underrun: PhY/BB underrun
4304 * @txop_ovf: MPDU is more than txop limit
4305 * @seq_posted: Number of Sequences posted
4306 * @seq_failed_queueing: Number of Sequences failed queueing
4307 * @seq_completed: Number of Sequences completed
4308 * @seq_restarted: Number of Sequences restarted
4309 * @mu_seq_posted: Number of MU Sequences posted
4310 * @mpdus_sw_flush: Num MPDUs flushed by SW, HWPAUSED, SW TXABORT
4311 * (Reset,channel change)
4312 * @mpdus_hw_filter: Num MPDUs filtered by HW, all filter condition
4313 * (TTL expired)
4314 * @mpdus_truncated: Num MPDUs truncated by PDG (TXOP, TBTT,
4315 * PPDU_duration based on rate, dyn_bw)
4316 * @mpdus_ack_failed: Num MPDUs that was tried but didn't receive ACK or BA
4317 * @mpdus_expired: Num MPDUs that was dropped du to expiry.
4318 * @mc_dropr: Num mc drops
4319 */
4320typedef struct {
4321 int32_t comp_queued;
4322 int32_t comp_delivered;
4323 int32_t msdu_enqued;
4324 int32_t mpdu_enqued;
4325 int32_t wmm_drop;
4326 int32_t local_enqued;
4327 int32_t local_freed;
4328 int32_t hw_queued;
4329 int32_t hw_reaped;
4330 int32_t underrun;
4331 uint32_t hw_paused;
4332 int32_t tx_abort;
4333 int32_t mpdus_requed;
4334 uint32_t tx_ko;
4335 uint32_t tx_xretry;
4336 uint32_t data_rc;
4337 uint32_t self_triggers;
4338 uint32_t sw_retry_failure;
4339 uint32_t illgl_rate_phy_err;
4340 uint32_t pdev_cont_xretry;
4341 uint32_t pdev_tx_timeout;
4342 uint32_t pdev_resets;
4343 uint32_t stateless_tid_alloc_failure;
4344 uint32_t phy_underrun;
4345 uint32_t txop_ovf;
4346 uint32_t seq_posted;
4347 uint32_t seq_failed_queueing;
4348 uint32_t seq_completed;
4349 uint32_t seq_restarted;
4350 uint32_t mu_seq_posted;
4351 int32_t mpdus_sw_flush;
4352 int32_t mpdus_hw_filter;
4353 int32_t mpdus_truncated;
4354 int32_t mpdus_ack_failed;
4355 int32_t mpdus_expired;
4356 uint32_t mc_drop;
4357} wmi_host_dbg_tx_stats;
4358
4359/**
4360 * struct wmi_host_dbg_rx_stats - RX Debug stats
4361 * @mid_ppdu_route_change: Cnts any change in ring routing mid-ppdu
4362 * @status_rcvd: Total number of statuses processed
4363 * @r0_frags: Extra frags on rings 0
4364 * @r1_frags: Extra frags on rings 1
4365 * @r2_frags: Extra frags on rings 2
4366 * @r3_frags: Extra frags on rings 3
4367 * @htt_msdus: MSDUs delivered to HTT
4368 * @htt_mpdus: MPDUs delivered to HTT
4369 * @loc_msdus: MSDUs delivered to local stack
4370 * @loc_mpdus: MPDUS delivered to local stack
4371 * @oversize_amsdu: AMSDUs that have more MSDUs than the status ring size
4372 * @phy_errs: Number of PHY errors
4373 * @phy_err_drop: Number of PHY errors drops
4374 * @mpdu_errs: Number of mpdu errors - FCS, MIC, ENC etc.
4375 * @pdev_rx_timeout: Number of rx inactivity timeouts
4376 * @rx_ovfl_errs: Number of rx overflow errors.
4377 */
4378typedef struct {
4379 int32_t mid_ppdu_route_change;
4380 int32_t status_rcvd;
4381 int32_t r0_frags;
4382 int32_t r1_frags;
4383 int32_t r2_frags;
4384 int32_t r3_frags;
4385 int32_t htt_msdus;
4386 int32_t htt_mpdus;
4387 int32_t loc_msdus;
4388 int32_t loc_mpdus;
4389 int32_t oversize_amsdu;
4390 int32_t phy_errs;
4391 int32_t phy_err_drop;
4392 int32_t mpdu_errs;
4393 uint32_t pdev_rx_timeout;
4394 int32_t rx_ovfl_errs;
4395} wmi_host_dbg_rx_stats;
4396
4397/** struct wmi_host_dbg_mem_stats - memory stats
4398 * @iram_free_size: IRAM free size on target
4399 * @dram_free_size: DRAM free size on target
4400 * @sram_free_size: SRAM free size on target
4401 */
4402typedef struct {
4403 uint32_t iram_free_size;
4404 uint32_t dram_free_size;
4405 /* Only Non-TLV */
4406 uint32_t sram_free_size;
4407} wmi_host_dbg_mem_stats;
4408
4409typedef struct {
4410 /* Only TLV */
4411 int32_t dummy;/* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */
4412} wmi_host_dbg_peer_stats;
4413
4414/**
4415 * struct wmi_host_dbg_stats - host debug stats
4416 * @tx: TX stats of type wmi_host_dbg_tx_stats
4417 * @rx: RX stats of type wmi_host_dbg_rx_stats
4418 * @mem: Memory stats of type wmi_host_dbg_mem_stats
4419 * @peer: peer stats of type wmi_host_dbg_peer_stats
4420 */
4421typedef struct {
4422 wmi_host_dbg_tx_stats tx;
4423 wmi_host_dbg_rx_stats rx;
4424 wmi_host_dbg_mem_stats mem;
4425 wmi_host_dbg_peer_stats peer;
4426} wmi_host_dbg_stats;
4427
4428/**
4429 * struct wmi_host_pdev_stats - PDEV stats
4430 * @chan_nf: Channel noise floor
4431 * @tx_frame_count: TX frame count
4432 * @rx_frame_count: RX frame count
4433 * @rx_clear_count: rx clear count
4434 * @cycle_count: cycle count
4435 * @phy_err_count: Phy error count
4436 * @chan_tx_pwr: Channel Tx Power
4437 * @pdev_stats: WAL dbg stats
4438 * @ackRcvBad:
4439 * @rtsBad:
4440 * @rtsGood:
4441 * @fcsBad:
4442 * @noBeacons:
4443 * @mib_int_count:
4444 */
4445typedef struct {
4446 int32_t chan_nf;
4447 uint32_t tx_frame_count;
4448 uint32_t rx_frame_count;
4449 uint32_t rx_clear_count;
4450 uint32_t cycle_count;
4451 uint32_t phy_err_count;
4452 uint32_t chan_tx_pwr;
4453 wmi_host_dbg_stats pdev_stats;
4454 uint32_t ackRcvBad;
4455 uint32_t rtsBad;
4456 uint32_t rtsGood;
4457 uint32_t fcsBad;
4458 uint32_t noBeacons;
4459 uint32_t mib_int_count;
4460} wmi_host_pdev_stats;
4461
4462/**
4463 * struct wmi_host_snr_info - WMI host Signal to noise ration info
4464 * @bcn_snr: beacon SNR
4465 * @dat_snr: Data frames SNR
4466 */
4467typedef struct {
4468 int32_t bcn_snr;
4469 int32_t dat_snr;
4470} wmi_host_snr_info;
4471
4472#define WMI_HOST_MAX_TX_RATE_VALUES 10 /*Max Tx Rates */
4473#define WMI_HOST_MAX_RSSI_VALUES 10 /*Max Rssi values */
4474
4475/* The WLAN_MAX_AC macro cannot be changed without breaking
4476 * * WMI compatibility.
4477 * * The maximum value of access category
4478 * */
4479#define WMI_HOST_WLAN_MAX_AC 4
4480
4481/**
4482 * struct wmi_host_vdev_stats - vdev stats structure
4483 * @vdev_id: unique id identifying the VDEV, generated by the caller
4484 * Rest all Only TLV
4485 * @vdev_snr: wmi_host_snr_info
4486 * @tx_frm_cnt: Total number of packets(per AC) that were successfully
4487 * transmitted (with and without retries,
4488 * including multi-cast, broadcast)
4489 * @rx_frm_cnt: Total number of packets that were successfully received
4490 * (after appropriate filter rules including multi-cast, broadcast)
4491 * @multiple_retry_cnt: The number of MSDU packets and MMPDU frames per AC
4492 * that the 802.11 station successfully transmitted after
4493 * more than one retransmission attempt
4494 * @fail_cnt: Total number packets(per AC) failed to transmit
4495 * @rts_fail_cnt: Total number of RTS/CTS sequence failures for transmission
4496 * of a packet
4497 * @rts_succ_cnt: Total number of RTS/CTS sequence success for transmission
4498 * of a packet
4499 * @rx_err_cnt: The receive error count. HAL will provide the
4500 * RxP FCS error global
4501 * @rx_discard_cnt: The sum of the receive error count and
4502 * dropped-receive-buffer error count (FCS error)
4503 * @ack_fail_cnt: Total number packets failed transmit because of no
4504 * ACK from the remote entity
4505 * @tx_rate_history:History of last ten transmit rate, in units of 500 kbit/sec
4506 * @bcn_rssi_history: History of last ten Beacon rssi of the connected Bss
4507 */
4508typedef struct {
4509 uint32_t vdev_id;
4510 /* Rest all Only TLV */
4511 wmi_host_snr_info vdev_snr;
4512 uint32_t tx_frm_cnt[WMI_HOST_WLAN_MAX_AC];
4513 uint32_t rx_frm_cnt;
4514 uint32_t multiple_retry_cnt[WMI_HOST_WLAN_MAX_AC];
4515 uint32_t fail_cnt[WMI_HOST_WLAN_MAX_AC];
4516 uint32_t rts_fail_cnt;
4517 uint32_t rts_succ_cnt;
4518 uint32_t rx_err_cnt;
4519 uint32_t rx_discard_cnt;
4520 uint32_t ack_fail_cnt;
4521 uint32_t tx_rate_history[WMI_HOST_MAX_TX_RATE_VALUES];
4522 uint32_t bcn_rssi_history[WMI_HOST_MAX_RSSI_VALUES];
4523} wmi_host_vdev_stats;
4524
4525/**
4526 * struct wmi_host_vdev_extd_stats - VDEV extended stats
4527 * @vdev_id: unique id identifying the VDEV, generated by the caller
4528 * @ppdu_aggr_cnt: No of Aggrs Queued to HW
4529 * @ppdu_noack: No of PPDU's not Acked includes both aggr and nonaggr's
4530 * @mpdu_queued: No of MPDU/Subframes's queued to HW in Aggregates
4531 * @ppdu_nonaggr_cnt: No of NonAggr/MPDU/Subframes's queued to HW
4532 * in Legacy NonAggregates
4533 * @mpdu_sw_requed: No of MPDU/Subframes's SW requeued includes
4534 * both Aggr and NonAggr
4535 * @mpdu_suc_retry: No of MPDU/Subframes's transmitted Successfully
4536 * after Single/mul HW retry
4537 * @mpdu_suc_multitry: No of MPDU/Subframes's transmitted Success
4538 * after Multiple HW retry
4539 * @mpdu_fail_retry: No of MPDU/Subframes's failed transmission
4540 * after Multiple HW retry
4541 * @reserved[13]: for future extensions set to 0x0
4542 */
4543typedef struct {
4544 uint32_t vdev_id;
4545 uint32_t ppdu_aggr_cnt;
4546 uint32_t ppdu_noack;
4547 uint32_t mpdu_queued;
4548 uint32_t ppdu_nonaggr_cnt;
4549 uint32_t mpdu_sw_requed;
4550 uint32_t mpdu_suc_retry;
4551 uint32_t mpdu_suc_multitry;
4552 uint32_t mpdu_fail_retry;
4553 uint32_t reserved[13];
4554} wmi_host_vdev_extd_stats;
4555
4556/**
4557 * struct wmi_host_peer_stats - peer stats
4558 * @peer_macaddr: peer MAC address
4559 * @peer_rssi: rssi
4560 * @peer_rssi_seq_num: rssi sequence number
4561 * @peer_tx_rate: last tx data rate used for peer
4562 * @peer_rx_rate: last rx data rate used for peer
4563 * @currentper: Current PER
4564 * @retries: Retries happend during transmission
4565 * @txratecount: Maximum Aggregation Size
4566 * @max4msframelen: Max4msframelen of tx rates used
4567 * @totalsubframes: Total no of subframes
4568 * @txbytes: No of bytes transmitted to the client
4569 * @nobuffs[4]: Packet Loss due to buffer overflows
4570 * @excretries[4]: Packet Loss due to excessive retries
4571 * @peer_rssi_changed: how many times peer's RSSI changed by a
4572 * non-negligible amount
4573 */
4574typedef struct {
4575 wmi_host_mac_addr peer_macaddr;
4576 uint32_t peer_rssi;
4577 uint32_t peer_rssi_seq_num;
4578 uint32_t peer_tx_rate;
4579 uint32_t peer_rx_rate;
4580 uint32_t currentper;
4581 uint32_t retries;
4582 uint32_t txratecount;
4583 uint32_t max4msframelen;
4584 uint32_t totalsubframes;
4585 uint32_t txbytes;
4586 uint32_t nobuffs[4];
4587 uint32_t excretries[4];
4588 uint32_t peer_rssi_changed;
4589} wmi_host_peer_stats;
4590
4591typedef struct {
4592 uint32_t dummy;
4593} wmi_host_bcnflt_stats;
4594
4595/**
4596 * struct wmi_host_chan_stats - WMI chan stats
4597 * @chan_mhz: Primary channel freq of the channel for which stats are sent
4598 * @sampling_period_us: Time spent on the channel
4599 * @rx_clear_count: Aggregate duration over a sampling period for
4600 * which channel activity was observed
4601 * @tx_duration_us: Accumalation of the TX PPDU duration over a sampling period
4602 * @rx_duration_us: Accumalation of the RX PPDU duration over a sampling period
4603 */
4604typedef struct {
4605 uint32_t chan_mhz;
4606 uint32_t sampling_period_us;
4607 uint32_t rx_clear_count;
4608 uint32_t tx_duration_us;
4609 uint32_t rx_duration_us;
4610} wmi_host_chan_stats;
4611
4612#define WMI_EVENT_ID_INVALID 0
4613/**
4614 * Host based ENUM IDs for events to abstract target enums for event_id
4615 */
4616typedef enum {
4617 wmi_service_ready_event_id = 0,
4618 wmi_ready_event_id,
4619 wmi_dbg_msg_event_id,
4620 wmi_scan_event_id,
4621 wmi_echo_event_id,
4622 wmi_update_stats_event_id,
4623 wmi_inst_rssi_stats_event_id,
4624 wmi_vdev_start_resp_event_id,
4625 wmi_vdev_standby_req_event_id,
4626 wmi_vdev_resume_req_event_id,
4627 wmi_vdev_stopped_event_id,
4628 wmi_peer_sta_kickout_event_id,
4629 wmi_host_swba_event_id,
4630 wmi_tbttoffset_update_event_id,
4631 wmi_mgmt_rx_event_id,
4632 wmi_chan_info_event_id,
4633 wmi_phyerr_event_id,
4634 wmi_roam_event_id,
4635 wmi_profile_match,
4636 wmi_debug_print_event_id,
4637 wmi_pdev_qvit_event_id,
4638 wmi_wlan_profile_data_event_id,
4639 wmi_rtt_meas_report_event_id,
4640 wmi_tsf_meas_report_event_id,
4641 wmi_rtt_error_report_event_id,
4642 wmi_rtt_keepalive_event_id,
4643 wmi_oem_cap_event_id,
4644 wmi_oem_meas_report_event_id,
4645 wmi_oem_report_event_id,
4646 wmi_nan_event_id,
4647 wmi_wow_wakeup_host_event_id,
4648 wmi_gtk_offload_status_event_id,
4649 wmi_gtk_rekey_fail_event_id,
4650 wmi_dcs_interference_event_id,
4651 wmi_pdev_tpc_config_event_id,
4652 wmi_csa_handling_event_id,
4653 wmi_gpio_input_event_id,
4654 wmi_peer_ratecode_list_event_id,
4655 wmi_generic_buffer_event_id,
4656 wmi_mcast_buf_release_event_id,
4657 wmi_mcast_list_ageout_event_id,
4658 wmi_vdev_get_keepalive_event_id,
4659 wmi_wds_peer_event_id,
4660 wmi_peer_sta_ps_statechg_event_id,
4661 wmi_pdev_fips_event_id,
4662 wmi_tt_stats_event_id,
4663 wmi_pdev_channel_hopping_event_id,
4664 wmi_pdev_ani_cck_level_event_id,
4665 wmi_pdev_ani_ofdm_level_event_id,
4666 wmi_pdev_reserve_ast_entry_event_id,
4667 wmi_pdev_nfcal_power_event_id,
4668 wmi_pdev_tpc_event_id,
4669 wmi_pdev_get_ast_info_event_id,
4670 wmi_pdev_temperature_event_id,
4671 wmi_pdev_nfcal_power_all_channels_event_id,
4672 wmi_pdev_bss_chan_info_event_id,
4673 wmi_mu_report_event_id,
4674 wmi_pdev_utf_event_id,
4675 wmi_pdev_dump_event_id,
4676 wmi_tx_pause_event_id,
4677 wmi_dfs_radar_event_id,
4678 wmi_pdev_l1ss_track_event_id,
4679 wmi_service_ready_ext_event_id,
4680 wmi_vdev_install_key_complete_event_id,
4681 wmi_vdev_mcc_bcn_intvl_change_req_event_id,
4682 wmi_vdev_tsf_report_event_id,
4683 wmi_peer_info_event_id,
4684 wmi_peer_tx_fail_cnt_thr_event_id,
4685 wmi_peer_estimated_linkspeed_event_id,
4686 wmi_peer_state_event_id,
4687 wmi_offload_bcn_tx_status_event_id,
4688 wmi_offload_prob_resp_tx_status_event_id,
4689 wmi_mgmt_tx_completion_event_id,
4690 wmi_tx_delba_complete_event_id,
4691 wmi_tx_addba_complete_event_id,
4692 wmi_ba_rsp_ssn_event_id,
4693 wmi_aggr_state_trig_event_id,
4694 wmi_roam_synch_event_id,
4695 wmi_p2p_disc_event_id,
4696 wmi_p2p_noa_event_id,
4697 wmi_pdev_resume_event_id,
4698 wmi_do_wow_disable_ack_event_id,
4699 wmi_wow_initial_wakeup_event_id,
4700 wmi_stats_ext_event_id,
4701 wmi_iface_link_stats_event_id,
4702 wmi_peer_link_stats_event_id,
4703 wmi_radio_link_stats_link,
4704 wmi_update_fw_mem_dump_event_id,
4705 wmi_diag_event_id_log_supported_event_id,
4706 wmi_nlo_match_event_id,
4707 wmi_nlo_scan_complete_event_id,
4708 wmi_apfind_event_id,
4709 wmi_passpoint_match_event_id,
4710 wmi_chatter_pc_query_event_id,
4711 wmi_pdev_ftm_intg_event_id,
4712 wmi_wlan_freq_avoid_event_id,
4713 wmi_thermal_mgmt_event_id,
4714 wmi_diag_container_event_id,
4715 wmi_host_auto_shutdown_event_id,
4716 wmi_update_whal_mib_stats_event_id,
4717 wmi_update_vdev_rate_stats_event_id,
4718 wmi_diag_event_id,
4719 wmi_ocb_set_sched_event_id,
4720 wmi_dbg_mesg_flush_complete_event_id,
4721 wmi_rssi_breach_event_id,
4722 wmi_uploadh_event_id,
4723 wmi_captureh_event_id,
4724 wmi_rfkill_state_change_event_id,
4725 wmi_tdls_peer_event_id,
4726 wmi_batch_scan_enabled_event_id,
4727 wmi_batch_scan_result_event_id,
4728 wmi_lpi_result_event_id,
4729 wmi_lpi_status_event_id,
4730 wmi_lpi_handoff_event_id,
4731 wmi_extscan_start_stop_event_id,
4732 wmi_extscan_operation_event_id,
4733 wmi_extscan_table_usage_event_id,
4734 wmi_extscan_cached_results_event_id,
4735 wmi_extscan_wlan_change_results_event_id,
4736 wmi_extscan_hotlist_match_event_id,
4737 wmi_extscan_capabilities_event_id,
4738 wmi_extscan_hotlist_ssid_match_event_id,
4739 wmi_mdns_stats_event_id,
4740 wmi_sap_ofl_add_sta_event_id,
4741 wmi_sap_ofl_del_sta_event_id,
4742 wmi_ocb_set_config_resp_event_id,
4743 wmi_ocb_get_tsf_timer_resp_event_id,
4744 wmi_dcc_get_stats_resp_event_id,
4745 wmi_dcc_update_ndl_resp_event_id,
4746 wmi_dcc_stats_event_id,
4747 wmi_soc_set_hw_mode_resp_event_id,
4748 wmi_soc_hw_mode_transition_event_id,
4749 wmi_soc_set_dual_mac_config_resp_event_id,
4750 wmi_tx_data_traffic_ctrl_event_id,
4751
4752 wmi_events_max,
4753} wmi_conv_event_id;
4754
4755#define WMI_UNAVAILABLE_PARAM 0
4756/**
4757 * Host based ENUM IDs for PDEV params to abstract target enums
4758 */
4759typedef enum {
4760 wmi_pdev_param_tx_chain_mask = 0,
4761 wmi_pdev_param_rx_chain_mask,
4762 wmi_pdev_param_txpower_limit2g,
4763 wmi_pdev_param_txpower_limit5g,
4764 wmi_pdev_param_txpower_scale,
4765 wmi_pdev_param_beacon_gen_mode,
4766 wmi_pdev_param_beacon_tx_mode,
4767 wmi_pdev_param_resmgr_offchan_mode,
4768 wmi_pdev_param_protection_mode,
4769 wmi_pdev_param_dynamic_bw,
4770 wmi_pdev_param_non_agg_sw_retry_th,
4771 wmi_pdev_param_agg_sw_retry_th,
4772 wmi_pdev_param_sta_kickout_th,
4773 wmi_pdev_param_ac_aggrsize_scaling,
4774 wmi_pdev_param_ltr_enable,
4775 wmi_pdev_param_ltr_ac_latency_be,
4776 wmi_pdev_param_ltr_ac_latency_bk,
4777 wmi_pdev_param_ltr_ac_latency_vi,
4778 wmi_pdev_param_ltr_ac_latency_vo,
4779 wmi_pdev_param_ltr_ac_latency_timeout,
4780 wmi_pdev_param_ltr_sleep_override,
4781 wmi_pdev_param_ltr_rx_override,
4782 wmi_pdev_param_ltr_tx_activity_timeout,
4783 wmi_pdev_param_l1ss_enable,
4784 wmi_pdev_param_dsleep_enable,
4785 wmi_pdev_param_pcielp_txbuf_flush,
4786 wmi_pdev_param_pcielp_txbuf_watermark,
4787 wmi_pdev_param_pcielp_txbuf_tmo_en,
4788 wmi_pdev_param_pcielp_txbuf_tmo_value,
4789 wmi_pdev_param_pdev_stats_update_period,
4790 wmi_pdev_param_vdev_stats_update_period,
4791 wmi_pdev_param_peer_stats_update_period,
4792 wmi_pdev_param_bcnflt_stats_update_period,
4793 wmi_pdev_param_pmf_qos,
4794 wmi_pdev_param_arp_ac_override,
4795 wmi_pdev_param_dcs,
4796 wmi_pdev_param_ani_enable,
4797 wmi_pdev_param_ani_poll_period,
4798 wmi_pdev_param_ani_listen_period,
4799 wmi_pdev_param_ani_ofdm_level,
4800 wmi_pdev_param_ani_cck_level,
4801 wmi_pdev_param_dyntxchain,
4802 wmi_pdev_param_proxy_sta,
4803 wmi_pdev_param_idle_ps_config,
4804 wmi_pdev_param_power_gating_sleep,
4805 wmi_pdev_param_aggr_burst,
4806 wmi_pdev_param_rx_decap_mode,
4807 wmi_pdev_param_fast_channel_reset,
4808 wmi_pdev_param_burst_dur,
4809 wmi_pdev_param_burst_enable,
4810 wmi_pdev_param_smart_antenna_default_antenna,
4811 wmi_pdev_param_igmpmld_override,
4812 wmi_pdev_param_igmpmld_tid,
4813 wmi_pdev_param_antenna_gain,
4814 wmi_pdev_param_rx_filter,
4815 wmi_pdev_set_mcast_to_ucast_tid,
4816 wmi_pdev_param_proxy_sta_mode,
4817 wmi_pdev_param_set_mcast2ucast_mode,
4818 wmi_pdev_param_set_mcast2ucast_buffer,
4819 wmi_pdev_param_remove_mcast2ucast_buffer,
4820 wmi_pdev_peer_sta_ps_statechg_enable,
4821 wmi_pdev_param_igmpmld_ac_override,
4822 wmi_pdev_param_block_interbss,
4823 wmi_pdev_param_set_disable_reset_cmdid,
4824 wmi_pdev_param_set_msdu_ttl_cmdid,
4825 wmi_pdev_param_set_ppdu_duration_cmdid,
4826 wmi_pdev_param_txbf_sound_period_cmdid,
4827 wmi_pdev_param_set_promisc_mode_cmdid,
4828 wmi_pdev_param_set_burst_mode_cmdid,
4829 wmi_pdev_param_en_stats,
4830 wmi_pdev_param_mu_group_policy,
4831 wmi_pdev_param_noise_detection,
4832 wmi_pdev_param_noise_threshold,
4833 wmi_pdev_param_dpd_enable,
4834 wmi_pdev_param_set_mcast_bcast_echo,
4835 wmi_pdev_param_atf_strict_sch,
4836 wmi_pdev_param_atf_sched_duration,
4837 wmi_pdev_param_ant_plzn,
4838 wmi_pdev_param_mgmt_retry_limit,
4839 wmi_pdev_param_sensitivity_level,
4840 wmi_pdev_param_signed_txpower_2g,
4841 wmi_pdev_param_signed_txpower_5g,
4842 wmi_pdev_param_enable_per_tid_amsdu,
4843 wmi_pdev_param_enable_per_tid_ampdu,
4844 wmi_pdev_param_cca_threshold,
4845 wmi_pdev_param_rts_fixed_rate,
4846 wmi_pdev_param_cal_period,
4847 wmi_pdev_param_pdev_reset,
4848 wmi_pdev_param_wapi_mbssid_offset,
4849 wmi_pdev_param_arp_srcaddr,
4850 wmi_pdev_param_arp_dstaddr,
4851 wmi_pdev_param_txpower_decr_db,
4852 wmi_pdev_param_rx_batchmode,
4853 wmi_pdev_param_packet_aggr_delay,
4854 wmi_pdev_param_atf_obss_noise_sch,
4855 wmi_pdev_param_atf_obss_noise_scaling_factor,
4856 wmi_pdev_param_cust_txpower_scale,
4857 wmi_pdev_param_atf_dynamic_enable,
4858 wmi_pdev_param_atf_ssid_group_policy,
4859 wmi_pdev_param_rfkill_enable,
4860 wmi_pdev_param_hw_rfkill_config,
4861 wmi_pdev_param_low_power_rf_enable,
4862 wmi_pdev_param_l1ss_track,
4863 wmi_pdev_param_hyst_en,
4864 wmi_pdev_param_power_collapse_enable,
4865 wmi_pdev_param_led_sys_state,
4866 wmi_pdev_param_led_enable,
4867 wmi_pdev_param_audio_over_wlan_latency,
4868 wmi_pdev_param_audio_over_wlan_enable,
4869 wmi_pdev_param_whal_mib_stats_update_enable,
4870 wmi_pdev_param_vdev_rate_stats_update_period,
4871 wmi_pdev_param_cts_cbw,
4872 wmi_pdev_param_wnts_config,
4873 wmi_pdev_param_adaptive_early_rx_enable,
4874 wmi_pdev_param_adaptive_early_rx_min_sleep_slop,
4875 wmi_pdev_param_adaptive_early_rx_inc_dec_step,
4876 wmi_pdev_param_early_rx_fix_sleep_slop,
4877 wmi_pdev_param_bmiss_based_adaptive_bto_enable,
4878 wmi_pdev_param_bmiss_bto_min_bcn_timeout,
4879 wmi_pdev_param_bmiss_bto_inc_dec_step,
4880 wmi_pdev_param_bto_fix_bcn_timeout,
4881 wmi_pdev_param_ce_based_adaptive_bto_enable,
4882 wmi_pdev_param_ce_bto_combo_ce_value,
4883 wmi_pdev_param_tx_chain_mask_2g,
4884 wmi_pdev_param_rx_chain_mask_2g,
4885 wmi_pdev_param_tx_chain_mask_5g,
4886 wmi_pdev_param_rx_chain_mask_5g,
4887 wmi_pdev_param_tx_chain_mask_cck,
4888 wmi_pdev_param_tx_chain_mask_1ss,
4889
4890 wmi_pdev_param_max,
4891} wmi_conv_pdev_params_id;
4892
4893
4894/**
4895 * Host based ENUM IDs for VDEV params to abstract target enums
4896 */
4897typedef enum {
4898 wmi_vdev_param_rts_threshold = 0,
4899 wmi_vdev_param_fragmentation_threshold,
4900 wmi_vdev_param_beacon_interval,
4901 wmi_vdev_param_listen_interval,
4902 wmi_vdev_param_multicast_rate,
4903 wmi_vdev_param_mgmt_tx_rate,
4904 wmi_vdev_param_slot_time,
4905 wmi_vdev_param_preamble,
4906 wmi_vdev_param_swba_time,
4907 wmi_vdev_stats_update_period,
4908 wmi_vdev_pwrsave_ageout_time,
4909 wmi_vdev_host_swba_interval,
4910 wmi_vdev_param_dtim_period,
4911 wmi_vdev_oc_scheduler_air_time_limit,
4912 wmi_vdev_param_wds,
4913 wmi_vdev_param_atim_window,
4914 wmi_vdev_param_bmiss_count_max,
4915 wmi_vdev_param_bmiss_first_bcnt,
4916 wmi_vdev_param_bmiss_final_bcnt,
4917 wmi_vdev_param_feature_wmm,
4918 wmi_vdev_param_chwidth,
4919 wmi_vdev_param_chextoffset,
4920 wmi_vdev_param_disable_htprotection,
4921 wmi_vdev_param_sta_quickkickout,
4922 wmi_vdev_param_mgmt_rate,
4923 wmi_vdev_param_protection_mode,
4924 wmi_vdev_param_fixed_rate,
4925 wmi_vdev_param_sgi,
4926 wmi_vdev_param_ldpc,
4927 wmi_vdev_param_tx_stbc,
4928 wmi_vdev_param_rx_stbc,
4929 wmi_vdev_param_intra_bss_fwd,
4930 wmi_vdev_param_def_keyid,
4931 wmi_vdev_param_nss,
4932 wmi_vdev_param_bcast_data_rate,
4933 wmi_vdev_param_mcast_data_rate,
4934 wmi_vdev_param_mcast_indicate,
4935 wmi_vdev_param_dhcp_indicate,
4936 wmi_vdev_param_unknown_dest_indicate,
4937 wmi_vdev_param_ap_keepalive_min_idle_inactive_time_secs,
4938 wmi_vdev_param_ap_keepalive_max_idle_inactive_time_secs,
4939 wmi_vdev_param_ap_keepalive_max_unresponsive_time_secs,
4940 wmi_vdev_param_ap_enable_nawds,
4941 wmi_vdev_param_mcast2ucast_set,
4942 wmi_vdev_param_enable_rtscts,
4943 wmi_vdev_param_rc_num_retries,
4944 wmi_vdev_param_txbf,
4945 wmi_vdev_param_packet_powersave,
4946 wmi_vdev_param_drop_unencry,
4947 wmi_vdev_param_tx_encap_type,
4948 wmi_vdev_param_ap_detect_out_of_sync_sleeping_sta_time_secs,
4949 wmi_vdev_param_cabq_maxdur,
4950 wmi_vdev_param_mfptest_set,
4951 wmi_vdev_param_rts_fixed_rate,
4952 wmi_vdev_param_vht_sgimask,
4953 wmi_vdev_param_vht80_ratemask,
4954 wmi_vdev_param_early_rx_adjust_enable,
4955 wmi_vdev_param_early_rx_tgt_bmiss_num,
4956 wmi_vdev_param_early_rx_bmiss_sample_cycle,
4957 wmi_vdev_param_early_rx_slop_step,
4958 wmi_vdev_param_early_rx_init_slop,
4959 wmi_vdev_param_early_rx_adjust_pause,
4960 wmi_vdev_param_proxy_sta,
4961 wmi_vdev_param_meru_vc,
4962 wmi_vdev_param_rx_decap_type,
4963 wmi_vdev_param_bw_nss_ratemask,
4964 wmi_vdev_param_sensor_ap,
4965 wmi_vdev_param_beacon_rate,
4966 wmi_vdev_param_dtim_enable_cts,
4967 wmi_vdev_param_sta_kickout,
4968 wmi_vdev_param_tx_pwrlimit,
4969 wmi_vdev_param_snr_num_for_cal,
4970 wmi_vdev_param_roam_fw_offload,
4971 wmi_vdev_param_enable_rmc,
4972 wmi_vdev_param_ibss_max_bcn_lost_ms,
4973 wmi_vdev_param_max_rate,
4974 wmi_vdev_param_early_rx_drift_sample,
4975 wmi_vdev_param_set_ibss_tx_fail_cnt_thr,
4976 wmi_vdev_param_ebt_resync_timeout,
4977 wmi_vdev_param_aggr_trig_event_enable,
4978 wmi_vdev_param_is_ibss_power_save_allowed,
4979 wmi_vdev_param_is_power_collapse_allowed,
4980 wmi_vdev_param_is_awake_on_txrx_enabled,
4981 wmi_vdev_param_inactivity_cnt,
4982 wmi_vdev_param_txsp_end_inactivity_time_ms,
4983 wmi_vdev_param_dtim_policy,
4984 wmi_vdev_param_ibss_ps_warmup_time_secs,
4985 wmi_vdev_param_ibss_ps_1rx_chain_in_atim_window_enable,
4986 wmi_vdev_param_rx_leak_window,
4987 wmi_vdev_param_stats_avg_factor,
4988 wmi_vdev_param_disconnect_th,
4989 wmi_vdev_param_rtscts_rate,
4990 wmi_vdev_param_mcc_rtscts_protection_enable,
4991 wmi_vdev_param_mcc_broadcast_probe_enable,
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05304992 wmi_vdev_param_capabilities,
Govind Singh89727882016-04-15 13:58:27 +05304993
4994 wmi_vdev_param_max,
4995} wmi_conv_vdev_param_id;
4996
4997/**
4998 * Host based ENUM IDs for service bits to abstract target enums
4999 */
5000typedef enum {
5001 wmi_service_beacon_offload = 0,
5002 wmi_service_scan_offload,
5003 wmi_service_roam_offload,
5004 wmi_service_bcn_miss_offload,
5005 wmi_service_sta_pwrsave,
5006 wmi_service_sta_advanced_pwrsave,
5007 wmi_service_ap_uapsd,
5008 wmi_service_ap_dfs,
5009 wmi_service_11ac,
5010 wmi_service_blockack,
5011 wmi_service_phyerr,
5012 wmi_service_bcn_filter,
5013 wmi_service_rtt,
5014 wmi_service_ratectrl,
5015 wmi_service_wow,
5016 wmi_service_ratectrl_cache,
5017 wmi_service_iram_tids,
5018 wmi_service_burst,
5019 wmi_service_smart_antenna_sw_support,
5020 wmi_service_gtk_offload,
5021 wmi_service_scan_sch,
5022 wmi_service_csa_offload,
5023 wmi_service_chatter,
5024 wmi_service_coex_freqavoid,
5025 wmi_service_packet_power_save,
5026 wmi_service_force_fw_hang,
5027 wmi_service_smart_antenna_hw_support,
5028 wmi_service_gpio,
5029 wmi_sta_uapsd_basic_auto_trig,
5030 wmi_sta_uapsd_var_auto_trig,
5031 wmi_service_sta_keep_alive,
5032 wmi_service_tx_encap,
5033 wmi_service_ap_ps_detect_out_of_sync,
5034 wmi_service_early_rx,
5035 wmi_service_enhanced_proxy_sta,
5036 wmi_service_tt,
5037 wmi_service_atf,
5038 wmi_service_peer_caching,
5039 wmi_service_coex_gpio,
5040 wmi_service_aux_spectral_intf,
5041 wmi_service_aux_chan_load_intf,
5042 wmi_service_bss_channel_info_64,
5043 wmi_service_ext_res_cfg_support,
5044 wmi_service_mesh,
5045 wmi_service_restrt_chnl_support,
5046 wmi_service_roam_scan_offload,
5047 wmi_service_arpns_offload,
5048 wmi_service_nlo,
5049 wmi_service_sta_dtim_ps_modulated_dtim,
5050 wmi_service_sta_smps,
5051 wmi_service_fwtest,
5052 wmi_service_sta_wmmac,
5053 wmi_service_tdls,
5054 wmi_service_mcc_bcn_interval_change,
5055 wmi_service_adaptive_ocs,
5056 wmi_service_ba_ssn_support,
5057 wmi_service_filter_ipsec_natkeepalive,
5058 wmi_service_wlan_hb,
5059 wmi_service_lte_ant_share_support,
5060 wmi_service_batch_scan,
5061 wmi_service_qpower,
5062 wmi_service_plmreq,
5063 wmi_service_thermal_mgmt,
5064 wmi_service_rmc,
5065 wmi_service_mhf_offload,
5066 wmi_service_coex_sar,
5067 wmi_service_bcn_txrate_override,
5068 wmi_service_nan,
5069 wmi_service_l1ss_stat,
5070 wmi_service_estimate_linkspeed,
5071 wmi_service_obss_scan,
5072 wmi_service_tdls_offchan,
5073 wmi_service_tdls_uapsd_buffer_sta,
5074 wmi_service_tdls_uapsd_sleep_sta,
5075 wmi_service_ibss_pwrsave,
5076 wmi_service_lpass,
5077 wmi_service_extscan,
5078 wmi_service_d0wow,
5079 wmi_service_hsoffload,
5080 wmi_service_roam_ho_offload,
5081 wmi_service_rx_full_reorder,
5082 wmi_service_dhcp_offload,
5083 wmi_service_sta_rx_ipa_offload_support,
5084 wmi_service_mdns_offload,
5085 wmi_service_sap_auth_offload,
5086 wmi_service_dual_band_simultaneous_support,
5087 wmi_service_ocb,
5088 wmi_service_ap_arpns_offload,
5089 wmi_service_per_band_chainmask_support,
5090 wmi_service_packet_filter_offload,
5091 wmi_service_mgmt_tx_htt,
5092 wmi_service_mgmt_tx_wmi,
5093 wmi_service_ext_msg,
5094 wmi_service_mawc,
5095
5096 wmi_service_peer_stats,
5097 wmi_service_mesh_11s,
5098 wmi_service_periodic_chan_stat_support,
5099 wmi_service_tx_mode_push_only,
5100 wmi_service_tx_mode_push_pull,
5101 wmi_service_tx_mode_dynamic,
5102
5103 wmi_services_max,
5104} wmi_conv_service_ids;
5105#define WMI_SERVICE_UNAVAILABLE 0xFFFF
5106
5107/**
5108 * struct target_capability_info - Target capabilities in service ready
5109 * @phy_capability: PHY capabilities
5110 * @max_frag_entry: Maximum frag entries
5111 * @num_rf_chains: Number of RF chains supported
5112 * @ht_cap_info: HT cap info
5113 * @vht_cap_info: VHT cap info
5114 * @vht_supp_mcs: VHT Supported MCS
5115 * @hw_min_tx_power: HW minimum tx power
5116 * @hw_max_tx_power: HW maximum tx power
5117 * @sys_cap_info: sys capability info
5118 * @min_pkt_size_enable: Enterprise mode short pkt enable
5119 * @max_bcn_ie_size: Max beacon and probe rsp IE offload size
5120 * @max_num_scan_channels: Max scan channels
5121 * @max_supported_macs: max supported MCS
5122 * @wmi_fw_sub_feat_caps: FW sub feature capabilities
5123 * @txrx_chainmask: TXRX chain mask
5124 * @default_dbs_hw_mode_index: DBS hw mode index
5125 * @num_msdu_desc: number of msdu desc
5126 */
5127typedef struct {
5128 uint32_t phy_capability;
5129 uint32_t max_frag_entry;
5130 uint32_t num_rf_chains;
5131 uint32_t ht_cap_info;
5132 uint32_t vht_cap_info;
5133 uint32_t vht_supp_mcs;
5134 uint32_t hw_min_tx_power;
5135 uint32_t hw_max_tx_power;
5136 uint32_t sys_cap_info;
5137 uint32_t min_pkt_size_enable;
5138 uint32_t max_bcn_ie_size;
5139 uint32_t max_num_scan_channels;
5140 uint32_t max_supported_macs;
5141 uint32_t wmi_fw_sub_feat_caps;
5142 uint32_t txrx_chainmask;
5143 uint32_t default_dbs_hw_mode_index;
5144 uint32_t num_msdu_desc;
5145} target_capability_info;
5146
5147/**
5148 * struct wmi_host_fw_ver - FW version in non-tlv target
5149 * @sw_version: Versin info
5150 * @sw_version_1: Second dword of version
5151 */
5152struct wmi_host_fw_ver {
5153 uint32_t sw_version;
5154 uint32_t sw_version_1;
5155};
5156
5157/**
5158 * struct wmi_host_fw_abi_ver - FW version in non-tlv target
5159 * @sw_version: Versin info
5160 * @abi_version: ABI version
5161 */
5162struct wmi_host_fw_abi_ver {
5163 uint32_t sw_version;
5164 uint32_t abi_version;
5165};
5166
5167/**
5168 * struct target_resource_config - Resource config sent from host to target
5169 * abstracted out to include union of both configs
5170 * @num_vdevs: Number vdevs configured
5171 * @num_peers: Number of peers
5172 * @num_active_peers: Number of active peers for peer cache
5173 * @num_offload_peers: Number of offload peers
5174 * @num_offload_reorder_buffs: number of offload reorder buffs
5175 * @num_peer_keys: number of peer keys
5176 * @num_tids: number of tids
5177 * @ast_skid_limit: AST skid limit
5178 * @tx_chain_mask: TX chain mask
5179 * @rx_chain_mask: RX chain mask
5180 * @rx_timeout_pri: RX reorder timeout per AC
5181 * @rx_decap_mode: RX decap mode
5182 * @scan_max_pending_req: Scan mac pending req
5183 * @bmiss_offload_max_vdev: Beacom miss offload max vdevs
5184 * @roam_offload_max_vdev: Roam offload max vdevs
5185 * @roam_offload_max_ap_profiles: roam offload max ap profiles
5186 * @num_mcast_groups: num mcast groups
5187 * @num_mcast_table_elems: number of macst table elems
5188 * @mcast2ucast_mode: mcast enhance mode
5189 * @tx_dbg_log_size: DBG log buf size
5190 * @num_wds_entries: number of WDS entries
5191 * @dma_burst_size: DMA burst size.
5192 * @mac_aggr_delim: Mac aggr delim
5193 * @rx_skip_defrag_timeout_dup_detection_check: Defrag dup check in host?
5194 * @vow_config: vow configuration
5195 * @gtk_offload_max_vdev: Max vdevs for GTK offload
5196 * @num_msdu_desc: Number of msdu desc
5197 * @max_frag_entries: Max frag entries
5198 * End common
5199 * @max_peer_ext_stats: Max peer EXT stats
5200 * @smart_ant_cap: Smart antenna capabilities
5201 * @BK_Minfree: BIN configuration for BK traffic
5202 * @BE_Minfree: BIN configuration for BE traffic
5203 * @VI_Minfree: BIN configuration for VI traffic
5204 * @VO_Minfree: BIN configuration for VO traffic
5205 * @rx_batchmode: RX batch mode
5206 * @tt_support: Thermal throttling support
5207 * @atf_config: ATF config
5208 * @iphdr_pad_config: ipheader pad config
5209 * @qwrap_config: Qwrap configuration
5210 * @alloc_frag_desc_for_data_pkt: Frag desc for data
5211 * Added in MCL
5212 * @num_tdls_vdevs:
5213 * @num_tdls_conn_table_entries:
5214 * @beacon_tx_offload_max_vdev:
5215 * @num_multicast_filter_entries:
5216 * @num_wow_filters:
5217 * @num_keep_alive_pattern:
5218 * @keep_alive_pattern_size:
5219 * @max_tdls_concurrent_sleep_sta:
5220 * @max_tdls_concurrent_buffer_sta:
5221 * @wmi_send_separate:
5222 * @num_ocb_vdevs:
5223 * @num_ocb_channels:
5224 * @num_ocb_schedules:
5225 */
5226typedef struct {
5227 uint32_t num_vdevs;
5228 uint32_t num_peers;
5229 uint32_t num_active_peers;
5230 uint32_t num_offload_peers;
5231 uint32_t num_offload_reorder_buffs;
5232 uint32_t num_peer_keys;
5233 uint32_t num_tids;
5234 uint32_t ast_skid_limit;
5235 uint32_t tx_chain_mask;
5236 uint32_t rx_chain_mask;
5237 uint32_t rx_timeout_pri[4];
5238 uint32_t rx_decap_mode;
5239 uint32_t scan_max_pending_req;
5240 uint32_t bmiss_offload_max_vdev;
5241 uint32_t roam_offload_max_vdev;
5242 uint32_t roam_offload_max_ap_profiles;
5243 uint32_t num_mcast_groups;
5244 uint32_t num_mcast_table_elems;
5245 uint32_t mcast2ucast_mode;
5246 uint32_t tx_dbg_log_size;
5247 uint32_t num_wds_entries;
5248 uint32_t dma_burst_size;
5249 uint32_t mac_aggr_delim;
5250 uint32_t rx_skip_defrag_timeout_dup_detection_check;
5251 uint32_t vow_config;
5252 uint32_t gtk_offload_max_vdev;
5253 uint32_t num_msdu_desc; /* Number of msdu desc */
5254 uint32_t max_frag_entries;
5255 /* End common */
5256
5257 /* Added for Beeliner */
5258 uint32_t max_peer_ext_stats;
5259 uint32_t smart_ant_cap;
5260 uint32_t BK_Minfree;
5261 uint32_t BE_Minfree;
5262 uint32_t VI_Minfree;
5263 uint32_t VO_Minfree;
5264 uint32_t rx_batchmode;
5265 uint32_t tt_support;
5266 uint32_t atf_config;
5267 uint32_t iphdr_pad_config;
5268 uint32_t
5269 qwrap_config:16,
5270 alloc_frag_desc_for_data_pkt:16;
5271
5272 /* Added in MCL */
5273 uint32_t num_tdls_vdevs;
5274 uint32_t num_tdls_conn_table_entries;
5275 uint32_t beacon_tx_offload_max_vdev;
5276 uint32_t num_multicast_filter_entries;
5277 uint32_t num_wow_filters;
5278 uint32_t num_keep_alive_pattern;
5279 uint32_t keep_alive_pattern_size;
5280 uint32_t max_tdls_concurrent_sleep_sta;
5281 uint32_t max_tdls_concurrent_buffer_sta;
5282 uint32_t wmi_send_separate;
5283 uint32_t num_ocb_vdevs;
5284 uint32_t num_ocb_channels;
5285 uint32_t num_ocb_schedules;
5286} target_resource_config;
5287
5288/**
5289 * struct wds_addr_event - WDS addr event structure
5290 * @event_type: event type add/delete
5291 * @peer_mac: peer mac
5292 * @dest_mac: destination mac address
5293 */
5294typedef struct {
5295 uint32_t event_type[4];
5296 u_int8_t peer_mac[IEEE80211_ADDR_LEN];
5297 u_int8_t dest_mac[IEEE80211_ADDR_LEN];
5298} wds_addr_event_t;
5299/**
5300 * Enum replicated for host abstraction with FW
5301 */
5302typedef enum {
5303 /* Event respose of START CMD */
5304 WMI_HOST_VDEV_START_RESP_EVENT = 0,
5305 /* Event respose of RESTART CMD */
5306 WMI_HOST_VDEV_RESTART_RESP_EVENT,
5307} WMI_HOST_START_EVENT_PARAM;
5308
5309/**
5310 * struct wmi_host_vdev_start_resp - VDEV start response
5311 * @vdev_id: vdev id
5312 * @requestor_id: requestor id that requested the VDEV start request
5313 * @resp_type: Respose of Event type START/RESTART
5314 * @status: status of the response
5315 * @chain_mask: Vdev chain mask
5316 * @smps_mode: Vdev mimo power save mode
5317 * @mac_id: mac_id field contains the MAC identifier that the
5318 * VDEV is bound to. The valid range is 0 to (num_macs-1).
5319 * @cfgd_tx_streams: Configured Transmit Streams
5320 * @cfgd_rx_streams: Configured Receive Streams
5321 */
5322typedef struct {
5323 uint32_t vdev_id;
5324 uint32_t requestor_id;
5325 WMI_HOST_START_EVENT_PARAM resp_type;
5326 uint32_t status;
5327 uint32_t chain_mask;
5328 uint32_t smps_mode;
5329 uint32_t mac_id;
5330 uint32_t cfgd_tx_streams;
5331 uint32_t cfgd_rx_streams;
5332} wmi_host_vdev_start_resp;
5333
5334#define WMI_HOST_ATH_MAX_ANTENNA 4
5335/**
5336 * struct wmi_host_mgmt_rx_hdr - host mgmt header params
5337 * @channel: channel on which this frame is received
5338 * @snr: snr information used to cal rssi
5339 * @rssi_ctl[WMI_HOST_ATH_MAX_ANTENNA]: RSSI of PRI 20MHz for each chain.
5340 * @rate: Rate kbps
5341 * @phy_mode: rx phy mode WLAN_PHY_MODE
5342 * @buf_len: length of the frame
5343 * @status: rx status
5344 * @flags: information about the management frame e.g. can give a
5345 * scan source for a scan result mgmt frame
5346 * @rssi: combined RSSI, i.e. the sum of the snr + noise floor (dBm units)
5347 * @tsf_delta:
5348 */
5349typedef struct {
5350 uint32_t channel;
5351 uint32_t snr;
5352 uint8_t rssi_ctl[WMI_HOST_ATH_MAX_ANTENNA];
5353 uint32_t rate;
5354 uint32_t phy_mode;
5355 uint32_t buf_len;
5356 uint32_t status;
5357 uint32_t flags;
5358 int32_t rssi;
5359 uint32_t tsf_delta;
5360} wmi_host_mgmt_rx_hdr;
5361
5362/**
5363 * struct wmi_host_roam_event - host roam event param
5364 * @vdev_id: vdev id
5365 * @reason: roam reason
5366 * @rssi: RSSI
5367 */
5368typedef struct {
5369 uint32_t vdev_id;
5370 uint32_t reason;
5371 uint32_t rssi;
5372} wmi_host_roam_event;
5373
5374/**
5375 * ENUM wmi_host_scan_event_type - Scan event type
5376 */
5377enum wmi_host_scan_event_type {
5378 WMI_HOST_SCAN_EVENT_STARTED = 0x1,
5379 WMI_HOST_SCAN_EVENT_COMPLETED = 0x2,
5380 WMI_HOST_SCAN_EVENT_BSS_CHANNEL = 0x4,
5381 WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
5382 WMI_HOST_SCAN_EVENT_DEQUEUED = 0x10,
5383 WMI_HOST_SCAN_EVENT_PREEMPTED = 0x20,
5384 WMI_HOST_SCAN_EVENT_START_FAILED = 0x40,
5385 WMI_HOST_SCAN_EVENT_RESTARTED = 0x80,
5386 WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
5387 WMI_HOST_SCAN_EVENT_INVALID = 0x200,
5388 WMI_HOST_SCAN_EVENT_MAX = 0x8000
5389};
5390
5391/**
5392 * ENUM wmi_host_scan_completion_reason - Scan completion event type
5393 */
5394enum wmi_host_scan_completion_reason {
5395 /** scan related events */
5396 WMI_HOST_SCAN_REASON_NONE = 0xFF,
5397 WMI_HOST_SCAN_REASON_COMPLETED = 0,
5398 WMI_HOST_SCAN_REASON_CANCELLED = 1,
5399 WMI_HOST_SCAN_REASON_PREEMPTED = 2,
5400 WMI_HOST_SCAN_REASON_TIMEDOUT = 3,
5401 WMI_HOST_SCAN_REASON_INTERNAL_FAILURE = 4,
5402 WMI_HOST_SCAN_REASON_MAX,
5403};
5404
5405/**
5406 * struct wmi_host_scan_event - Scan event response from target
5407 * @event: event type
5408 * @reason: Reason for event
5409 * @channel_freq: channel frequency
5410 * @requestor: requestor id
5411 * @scan_id: scan id
5412 * @vdev_id: vdev id
5413 */
5414typedef struct {
5415 uint32_t event;
5416 uint32_t reason;
5417 uint32_t channel_freq;
5418 uint32_t requestor;
5419 uint32_t scan_id;
5420 uint32_t vdev_id;
5421} wmi_host_scan_event;
5422
5423/**
5424 * struct wmi_host_pdev_reserve_ast_entry_event - Reserve AST entry
5425 * @result: result
5426 */
5427typedef struct {
5428 uint32_t result;
5429} wmi_host_pdev_reserve_ast_entry_event;
5430
5431/**
5432 * struct wmi_host_mcast_ageout_entry - mcast aged-out entry
5433 * @grp_addr: IPv4/6 mcast group addr
5434 * @vdev_id: vdev id
5435 */
5436typedef struct {
5437 uint8_t grp_addr[16];
5438 uint32_t vdev_id;
5439} wmi_host_mcast_ageout_entry;
5440
5441/**
5442 * struct wmi_host_mcast_list_ageout_event - List of mcast entry aged-out
5443 * @num_entry: Number of mcast entries timed-out
5444 * @entry: List of wmi_host_mcast_ageout_entry
5445 */
5446typedef struct {
5447 uint32_t num_entry;
5448 wmi_host_mcast_ageout_entry entry[1];
5449} wmi_host_mcast_list_ageout_event;
5450
5451/**
5452 * struct wmi_host_pdev_nfcal_power_all_channels_event - NF cal event data
5453 * @nfdBr:
5454 * chan0: {NFCalPower_chain0, NFCalPower_chain1,
5455 * NFCalPower_chain2, NFCalPower_chain3},
5456 * chan1: {NFCalPower_chain0, NFCalPower_chain1,
5457 * NFCalPower_chain2, NFCalPower_chain3},
5458 * chan2: {NFCalPower_chain0, NFCalPower_chain1,
5459 * NFCalPower_chain2, NFCalPower_chain3},
5460 * chan3: {NFCalPower_chain0, NFCalPower_chain1,
5461 * NFCalPower_chain2, NFCalPower_chain3},
5462 * @nfdBr:
5463 * chan0: {NFCalPower_chain0, NFCalPower_chain1,
5464 * NFCalPower_chain2, NFCalPower_chain3},
5465 * chan1: {NFCalPower_chain0, NFCalPower_chain1,
5466 * NFCalPower_chain2, NFCalPower_chain3},
5467 * chan2: {NFCalPower_chain0, NFCalPower_chain1,
5468 * NFCalPower_chain2, NFCalPower_chain3},
5469 * chan3: {NFCalPower_chain0, NFCalPower_chain1,
5470 * NFCalPower_chain2, NFCalPower_chain3},
5471 * @freqNum: frequency number
5472 */
5473typedef struct {
5474 int8_t nfdBr[WMI_HOST_RXG_CAL_CHAN_MAX * WMI_HOST_MAX_NUM_CHAINS];
5475 int8_t nfdBm[WMI_HOST_RXG_CAL_CHAN_MAX * WMI_HOST_MAX_NUM_CHAINS];
5476 uint32_t freqNum[WMI_HOST_RXG_CAL_CHAN_MAX];
5477} wmi_host_pdev_nfcal_power_all_channels_event;
5478
5479/**
5480 * struct wmi_host_pdev_tpc_event - WMI host pdev TPC event
5481 * @tpc:
5482 */
5483typedef struct {
5484 uint32_t tpc[1];
5485} wmi_host_pdev_tpc_event;
5486
5487/**
5488 * struct wmi_host_pdev_generic_buffer_event
5489 * @buf_type: Buffer type
5490 * @frag_id: Frag id
5491 * @more_frag: more frags pending
5492 * @buf_len: buffer length
5493 * @buf_info: variable length buffer
5494 */
5495typedef struct {
5496 uint32_t buf_type;
5497 uint32_t frag_id;
5498 uint32_t more_frag;
5499 uint32_t buf_len;
5500 uint32_t buf_info[1];
5501} wmi_host_pdev_generic_buffer_event;
5502/**
5503 * Enum for host buffer event
5504 */
5505enum {
5506 WMI_HOST_BUFFER_TYPE_RATEPWR_TABLE,
5507 WMI_HOST_BUFFER_TYPE_CTL_TABLE,
5508};
5509
5510/**
5511 * struct wmi_host_pdev_tpc_config_event - host pdev tpc config event
5512 * @regDomain:
5513 * @chanFreq:
5514 * @phyMode:
5515 * @twiceAntennaReduction:
5516 * @twiceMaxRDPower:
5517 * @twiceAntennaGain:
5518 * @powerLimit:
5519 * @rateMax:
5520 * @numTxChain:
5521 * @ctl:
5522 * @flags:
5523 * @maxRegAllowedPower:
5524 * @maxRegAllowedPowerAGCDD:
5525 * @maxRegAllowedPowerAGSTBC:
5526 * @maxRegAllowedPowerAGTXBF:
5527 * @ratesArray:
5528 */
5529typedef struct {
5530 uint32_t regDomain;
5531 uint32_t chanFreq;
5532 uint32_t phyMode;
5533 uint32_t twiceAntennaReduction;
5534 uint32_t twiceMaxRDPower;
5535 int32_t twiceAntennaGain;
5536 uint32_t powerLimit;
5537 uint32_t rateMax;
5538 uint32_t numTxChain;
5539 uint32_t ctl;
5540 uint32_t flags;
5541 int8_t maxRegAllowedPower[WMI_HOST_TPC_TX_NUM_CHAIN];
5542 int8_t maxRegAllowedPowerAGCDD[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN];
5543 int8_t maxRegAllowedPowerAGSTBC[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN];
5544 int8_t maxRegAllowedPowerAGTXBF[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN];
5545 uint8_t ratesArray[WMI_HOST_TPC_RATE_MAX];
5546} wmi_host_pdev_tpc_config_event;
5547/**
5548 * Enums for TPC event
5549 */
5550typedef enum {
5551 WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
5552 WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
5553 WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
5554} WMI_HOST_TPC_CONFIG_EVENT_FLAG;
5555
5556/**
5557 * Medium Utilization evaluation algorithms
5558 * These algorithms can be complementary rather than exclusive.
5559 */
5560typedef enum {
5561 WMI_HOST_MU_BASIC_ALGO = 0x1,
5562 WMI_HOST_MU_PER_BSSID_ALGO = 0x2,
5563 WMI_HOST_MU_HIDDEN_NODE_ALGO = 0x4,
5564} WMI_HOST_MU_ALGO_TYPE;
5565/* max MU alg combinations supported by target */
5566#define WMI_HOST_MU_MAX_ALGO_TYPE 3
5567
5568/**
5569 * struct wmi_host_mu_report_event - WMI_MU_REPORT_EVENTID
5570 * @mu_request_id: request id
5571 * @status_reason: MU_STATUS_REASON
5572 * @total_mu: MU_ALG_TYPE combinations
5573 * @num_active_bssid: number of active bssid
5574 */
5575typedef struct {
5576 uint32_t mu_request_id;
5577 uint32_t status_reason;
5578 uint32_t total_mu[WMI_HOST_MU_MAX_ALGO_TYPE];
5579 uint32_t num_active_bssid;
5580} wmi_host_mu_report_event;
5581
5582/**
5583 * struct wmi_host_mgmt_tx_compl_event - TX completion event
5584 * @desc_id: from tx_send_cmd
5585 * @status: WMI_MGMT_TX_COMP_STATUS_TYPE
5586 */
5587typedef struct {
5588 uint32_t desc_id;
5589 uint32_t status;
5590} wmi_host_mgmt_tx_compl_event;
5591
5592#define WMI_HOST_TIM_BITMAP_ARRAY_SIZE 17
5593
5594/**
5595 * struct wmi_host_tim_info - TIM info in SWBA event
5596 * @tim_len: TIM length
5597 * @tim_mcast:
5598 * @tim_bitmap: TIM bitmap
5599 * @tim_changed: TIM changed
5600 * @tim_num_ps_pending: TIM num PS sta pending
5601 */
5602typedef struct {
5603 uint32_t tim_len;
5604 uint32_t tim_mcast;
5605 uint32_t tim_bitmap[WMI_HOST_TIM_BITMAP_ARRAY_SIZE];
5606 uint32_t tim_changed;
5607 uint32_t tim_num_ps_pending;
5608} wmi_host_tim_info;
5609
5610/**
5611 * struct wmi_host_p2p_noa_descriptor - NoA desc in SWBA event
5612 * @type_count: Absence count
5613 * @duration: NoA duration
5614 * @interval: NoA interval
5615 * @start_time: start time
5616 */
5617typedef struct {
5618 uint32_t type_count;
5619 uint32_t duration;
5620 uint32_t interval;
5621 uint32_t start_time;
5622} wmi_host_p2p_noa_descriptor;
5623/* Maximum number of NOA Descriptors supported */
5624#define WMI_HOST_P2P_MAX_NOA_DESCRIPTORS 4
5625/**
5626 * struct wmi_host_p2p_noa_info - p2p noa information
5627 * @modified: NoA modified
5628 * @index: Index
5629 * @oppPS: Oppurtunstic ps
5630 * @ctwindow: CT window
5631 * @num_descriptors: number of descriptors
5632 * @noa_descriptors: noa descriptors
5633 */
5634typedef struct {
5635 uint8_t modified;
5636 uint8_t index;
5637 uint8_t oppPS;
5638 uint8_t ctwindow;
5639 uint8_t num_descriptors;
5640 wmi_host_p2p_noa_descriptor
5641 noa_descriptors[WMI_HOST_P2P_MAX_NOA_DESCRIPTORS];
5642} wmi_host_p2p_noa_info;
5643
5644/**
5645 * struct wmi_host_peer_sta_kickout_event
5646 * @peer_macaddr: peer mac address
5647 * @reason: kickout reason
5648 * @rssi: rssi
5649 */
5650typedef struct {
5651 uint8_t peer_macaddr[IEEE80211_ADDR_LEN];
5652 uint32_t reason;
5653 uint32_t rssi;
5654} wmi_host_peer_sta_kickout_event;
5655
5656/**
5657 * struct wmi_host_peer_sta_ps_statechange_event - ST ps state change event
5658 * @peer_macaddr: peer mac address
5659 * @peer_ps_stats: peer PS state
5660 */
5661typedef struct {
5662 uint8_t peer_macaddr[IEEE80211_ADDR_LEN];
5663 uint32_t peer_ps_state;
5664} wmi_host_peer_sta_ps_statechange_event;
5665
5666/* Maximum CCK, OFDM rates supported */
5667#define WMI_SA_MAX_CCK_OFDM_RATES 12
5668/* Maximum MCS rates supported; 4 rates in each dword */
5669#define WMI_SA_MAX_MCS_RATES 40
5670#define WMI_SA_MAX_RATE_COUNTERS 4
5671/* Maximum rate series used for transmission */
5672#define SA_MAX_RATE_SERIES 2
5673
5674#define SA_MAX_LEGACY_RATE_DWORDS 3
5675#define SA_MAX_HT_RATE_DWORDS 10
5676#define SA_BYTES_IN_DWORD 4
5677#define SA_MASK_BYTE 0xff
5678/* TODO: ratecode_160 needs to add for future chips */
5679/**
5680 * struct wmi_sa_rate_cap - smart antenna rat capabilities
5681 * @ratecode_legacy: Rate code array for CCK OFDM
5682 * @ratecode_20: Rate code array for 20MHz BW
5683 * @ratecode_40: Rate code array for 40MHz BW
5684 * @ratecode_80: Rate code array for 80MHz BW
5685 * @ratecount: Max Rate count for each mode
5686 */
5687typedef struct {
5688 uint8_t ratecode_legacy[WMI_SA_MAX_CCK_OFDM_RATES];
5689 uint8_t ratecode_20[WMI_SA_MAX_MCS_RATES];
5690 uint8_t ratecode_40[WMI_SA_MAX_MCS_RATES];
5691 uint8_t ratecode_80[WMI_SA_MAX_MCS_RATES];
5692 uint8_t ratecount[WMI_SA_MAX_RATE_COUNTERS];
5693} wmi_sa_rate_cap;
5694
5695/** Preamble types to be used with VDEV fixed rate configuration */
5696typedef enum {
5697 WMI_HOST_RATE_PREAMBLE_OFDM,
5698 WMI_HOST_RATE_PREAMBLE_CCK,
5699 WMI_HOST_RATE_PREAMBLE_HT,
5700 WMI_HOST_RATE_PREAMBLE_VHT,
5701} WMI_HOST_RATE_PREAMBLE;
5702
5703#define WMI_HOST_FIXED_RATE_NONE (0xff)
5704
5705/** slot time long */
5706#define WMI_HOST_VDEV_SLOT_TIME_LONG 0x1
5707/** slot time short */
5708#define WMI_HOST_VDEV_SLOT_TIME_SHORT 0x2
5709/** preablbe long */
5710#define WMI_HOST_VDEV_PREAMBLE_LONG 0x1
5711/** preablbe short */
5712#define WMI_HOST_VDEV_PREAMBLE_SHORT 0x2
5713/** found a better AP */
5714#define WMI_HOST_ROAM_REASON_BETTER_AP 0x1
5715/** beacon miss detected */
5716#define WMI_HOST_ROAM_REASON_BMISS 0x2
5717/** deauth/disassoc received */
5718#define WMI_HOST_ROAM_REASON_DEAUTH 0x2
5719/** connected AP's low rssi condition detected */
5720#define WMI_HOST_ROAM_REASON_LOW_RSSI 0x3
5721/** found another AP that matches SSID and Security profile in
5722 * WMI_ROAM_AP_PROFILE, found during scan triggered upon FINAL_BMISS
5723 */
5724#define WMI_HOST_ROAM_REASON_SUITABLE_AP 0x4
5725/** LFR3.0 roaming failed, indicate the disconnection to host */
5726#define WMI_HOST_ROAM_REASON_HO_FAILED 0x5
5727
5728/** values for vdev_type */
5729#define WMI_HOST_VDEV_TYPE_AP 0x1
5730#define WMI_HOST_VDEV_TYPE_STA 0x2
5731#define WMI_HOST_VDEV_TYPE_IBSS 0x3
5732#define WMI_HOST_VDEV_TYPE_MONITOR 0x4
5733
5734/** values for vdev_subtype */
5735#define WMI_HOST_VDEV_SUBTYPE_P2P_DEVICE 0x1
5736#define WMI_HOST_VDEV_SUBTYPE_P2P_CLIENT 0x2
5737#define WMI_HOST_VDEV_SUBTYPE_P2P_GO 0x3
5738#define WMI_HOST_VDEV_SUBTYPE_PROXY_STA 0x4
5739#define WMI_HOST_VDEV_SUBTYPE_MESH 0x5
5740
5741#define WMI_HOST_MGMT_TID 17
5742/* Disable aging & learning */
5743#define WMI_HOST_WDS_FLAG_STATIC 0x1
5744
5745/**
5746 * Peer param enum abstracted from target
5747 */
5748typedef enum {
5749 /** mimo powersave state */
5750 WMI_HOST_PEER_MIMO_PS_STATE = 0x1,
5751 /** enable/disable AMPDU . initial value (enabled) */
5752 WMI_HOST_PEER_AMPDU = 0x2,
5753 /** authorize/unauthorize peer. initial value is unauthorized (0) */
5754 WMI_HOST_PEER_AUTHORIZE = 0x3,
5755 /** peer channel bandwidth */
5756 WMI_HOST_PEER_CHWIDTH = 0x4,
5757 /** peer NSS */
5758 WMI_HOST_PEER_NSS = 0x5,
5759 /** USE 4 ADDR */
5760 WMI_HOST_PEER_USE_4ADDR = 0x6,
5761 /** Enable extended peer stats */
5762 WMI_HOST_PEER_EXT_STATS_ENABLE = 0x7,
5763 /*Use FIXED Pwr */
5764 WMI_HOST_PEER_USE_FIXED_PWR = 0x8,
5765 /* Set peer fixed rate */
5766 WMI_HOST_PEER_PARAM_FIXED_RATE = 0x9,
5767 /* Whitelist peer TIDs */
5768 WMI_HOST_PEER_SET_MU_WHITELIST = 0xa,
5769 /* set group membership status */
5770 WMI_HOST_PEER_MEMBERSHIP = 0xb,
5771 WMI_HOST_PEER_USERPOS = 0xc,
5772} PEER_PARAM_ENUM;
5773#define WMI_HOST_PEER_MIMO_PS_NONE 0x0
5774#define WMI_HOST_PEER_MIMO_PS_STATIC 0x1
5775#define WMI_HOST_PEER_MIMO_PS_DYNAMIC 0x2
5776typedef enum {
5777 HOST_PLATFORM_HIGH_PERF,
5778 HOST_PLATFORM_LOW_PERF,
5779} HOST_PLATFORM_TYPE;
5780
5781enum wmi_host_sta_ps_mode {
5782 /** enable power save for the given STA VDEV */
5783 WMI_HOST_STA_PS_MODE_DISABLED = 0,
5784 /** disable power save for a given STA VDEV */
5785 WMI_HOST_STA_PS_MODE_ENABLED = 1,
5786};
5787enum wmi_host_sta_powersave_param {
5788 /**
5789 * Controls how frames are retrievd from AP while STA is sleeping
5790 *
5791 * (see enum wmi_sta_ps_param_rx_wake_policy)
5792 */
5793 WMI_HOST_STA_PS_PARAM_RX_WAKE_POLICY = 0,
5794
5795 /**
5796 * The STA will go active after this many TX
5797 *
5798 * (see enum wmi_sta_ps_param_tx_wake_threshold)
5799 */
5800 WMI_HOST_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
5801
5802 /**
5803 * Number of PS-Poll to send before STA wakes up
5804 *
5805 * (see enum wmi_sta_ps_param_pspoll_count)
5806 *
5807 */
5808 WMI_HOST_STA_PS_PARAM_PSPOLL_COUNT = 2,
5809
5810 /**
5811 * TX/RX inactivity time in msec before going to sleep.
5812 *
5813 * The power save SM will monitor tx/rx activity on the VDEV, if no
5814 * activity for the specified msec of the parameter
5815 * the Power save SM will go to sleep.
5816 */
5817 WMI_HOST_STA_PS_PARAM_INACTIVITY_TIME = 3,
5818
5819 /**
5820 * Set uapsd configuration.
5821 *
5822 * (see enum wmi_sta_ps_param_uapsd)
5823 */
5824 WMI_HOST_STA_PS_PARAM_UAPSD = 4,
5825};
5826/* prefix used by scan requestor ids on the host
5827 * replicated here form wmi_unified.h*/
5828#define WMI_HOST_P_SCAN_REQUESTOR_ID_PREFIX 0xA000
5829/* prefix used by scan request ids generated on the host */
5830/* host cycles through the lower 12 bits to generate ids */
5831#define WMI_HOST_P_SCAN_REQ_ID_PREFIX 0xA000
5832
5833#define WMI_HOST_RC_DS_FLAG 0x01 /* Dual stream flag */
5834#define WMI_HOST_RC_CW40_FLAG 0x02 /* CW 40 */
5835#define WMI_HOST_RC_SGI_FLAG 0x04 /* Short Guard Interval */
5836#define WMI_HOST_RC_HT_FLAG 0x08 /* HT */
5837#define WMI_HOST_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
5838#define WMI_HOST_RC_TX_STBC_FLAG 0x20 /* TX STBC */
5839#define WMI_HOST_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
5840#define WMI_HOST_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
5841#define WMI_HOST_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
5842#define WMI_HOST_RC_TS_FLAG 0x200 /* Three stream flag */
5843#define WMI_HOST_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
5844
5845/** HT Capabilities*/
5846#define WMI_HOST_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
5847/* Short Guard Interval with HT20 */
5848#define WMI_HOST_HT_CAP_HT20_SGI 0x0002
5849#define WMI_HOST_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
5850#define WMI_HOST_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
5851#define WMI_HOST_HT_CAP_TX_STBC_MASK_SHIFT 3
5852#define WMI_HOST_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
5853#define WMI_HOST_HT_CAP_RX_STBC_MASK_SHIFT 4
5854#define WMI_HOST_HT_CAP_LDPC 0x0040 /* LDPC supported */
5855#define WMI_HOST_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
5856#define WMI_HOST_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
5857#define WMI_HOST_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
5858#define WMI_HOST_HT_CAP_HT40_SGI 0x0800
5859#define WMI_HOST_HT_CAP_IBF_BFER 0x1000
5860
5861/* These macros should be used when we wish to advertise STBC support for
5862 * only 1SS or 2SS or 3SS. */
5863#define WMI_HOST_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
5864#define WMI_HOST_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
5865#define WMI_HOST_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
5866
5867
5868#define WMI_HOST_HT_CAP_DEFAULT_ALL (WMI_HOST_HT_CAP_ENABLED | \
5869 WMI_HOST_HT_CAP_HT20_SGI | \
5870 WMI_HOST_HT_CAP_HT40_SGI | \
5871 WMI_HOST_HT_CAP_TX_STBC | \
5872 WMI_HOST_HT_CAP_RX_STBC | \
5873 WMI_HOST_HT_CAP_LDPC)
5874
5875/* WMI_HOST_VHT_CAP_* these maps to ieee 802.11ac vht capability information
5876 field. The fields not defined here are not supported, or reserved.
5877 Do not change these masks and if you have to add new one follow the
5878 bitmask as specified by 802.11ac draft.
5879*/
5880
5881#define WMI_HOST_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
5882#define WMI_HOST_VHT_CAP_RX_LDPC 0x00000010
5883#define WMI_HOST_VHT_CAP_SGI_80MHZ 0x00000020
5884#define WMI_HOST_VHT_CAP_SGI_160MHZ 0x00000040
5885#define WMI_HOST_VHT_CAP_TX_STBC 0x00000080
5886#define WMI_HOST_VHT_CAP_RX_STBC_MASK 0x00000300
5887#define WMI_HOST_VHT_CAP_RX_STBC_MASK_SHIFT 8
5888#define WMI_HOST_VHT_CAP_SU_BFER 0x00000800
5889#define WMI_HOST_VHT_CAP_SU_BFEE 0x00001000
5890#define WMI_HOST_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
5891#define WMI_HOST_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
5892#define WMI_HOST_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
5893#define WMI_HOST_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
5894#define WMI_HOST_VHT_CAP_MU_BFER 0x00080000
5895#define WMI_HOST_VHT_CAP_MU_BFEE 0x00100000
5896#define WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
5897#define WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT 23
5898#define WMI_HOST_VHT_CAP_RX_FIXED_ANT 0x10000000
5899#define WMI_HOST_VHT_CAP_TX_FIXED_ANT 0x20000000
5900
5901#define WMI_HOST_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
5902
5903/* These macros should be used when we wish to advertise STBC support for
5904 * only 1SS or 2SS or 3SS. */
5905#define WMI_HOST_VHT_CAP_RX_STBC_1SS 0x00000100
5906#define WMI_HOST_VHT_CAP_RX_STBC_2SS 0x00000200
5907#define WMI_HOST_VHT_CAP_RX_STBC_3SS 0x00000300
5908
5909#define WMI_HOST_VHT_CAP_DEFAULT_ALL (WMI_HOST_VHT_CAP_MAX_MPDU_LEN_11454 | \
5910 WMI_HOST_VHT_CAP_SGI_80MHZ | \
5911 WMI_HOST_VHT_CAP_TX_STBC | \
5912 WMI_HOST_VHT_CAP_RX_STBC_MASK | \
5913 WMI_HOST_VHT_CAP_RX_LDPC | \
5914 WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP | \
5915 WMI_HOST_VHT_CAP_RX_FIXED_ANT | \
5916 WMI_HOST_VHT_CAP_TX_FIXED_ANT)
5917
5918/* Interested readers refer to Rx/Tx MCS Map definition as defined in
5919 802.11ac
5920*/
5921#define WMI_HOST_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
5922#define WMI_HOST_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
5923#define WMI_HOST_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
5924
5925/** U-APSD configuration of peer station from (re)assoc request and TSPECs */
5926enum wmi_host_ap_ps_param_uapsd {
5927 WMI_HOST_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
5928 WMI_HOST_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
5929 WMI_HOST_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
5930 WMI_HOST_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
5931 WMI_HOST_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
5932 WMI_HOST_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
5933 WMI_HOST_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
5934 WMI_HOST_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
5935};
5936/** U-APSD maximum service period of peer station */
5937enum wmi_host_ap_ps_peer_param_max_sp {
5938 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
5939 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
5940 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
5941 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
5942
5943 /* keep last! */
5944 MAX_HOST_WMI_AP_PS_PEER_PARAM_MAX_SP,
5945};
5946
5947#define WMI_HOST_UAPSD_AC_TYPE_DELI 0
5948#define WMI_HOST_UAPSD_AC_TYPE_TRIG 1
5949
5950#define WMI_HOST_UAPSD_AC_BIT_MASK(ac, type) \
5951 ((type == WMI_HOST_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) :\
5952 (1<<((ac<<1)+1)))
5953
5954enum wmi_host_ap_ps_peer_param_wnm_sleep {
5955 WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP_ENABLE,
5956 WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP_DISABLE,
5957};
5958
5959enum wmi_host_ap_ps_peer_param {
5960 /** Set uapsd configuration for a given peer.
5961 *
5962 * This will include the delivery and trigger enabled state for every AC.
5963 * The host MLME needs to set this based on AP capability and stations
5964 * request Set in the association request received from the station.
5965 *
5966 * Lower 8 bits of the value specify the UAPSD configuration.
5967 *
5968 * (see enum wmi_ap_ps_param_uapsd)
5969 * The default value is 0.
5970 */
5971 WMI_HOST_AP_PS_PEER_PARAM_UAPSD = 0,
5972
5973 /**
5974 * Set the service period for a UAPSD capable station
5975 *
5976 * The service period from wme ie in the (re)assoc request frame.
5977 *
5978 * (see enum wmi_ap_ps_peer_param_max_sp)
5979 */
5980 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP = 1,
5981
5982 /** Time in seconds for aging out buffered frames
5983 * for STA in power save */
5984 WMI_HOST_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
5985
5986 /** Specify frame types that are considered SIFS
5987 * RESP trigger frame */
5988 WMI_HOST_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
5989
5990 /** Specifies the trigger state of TID.
5991 * Valid only for UAPSD frame type */
5992 WMI_HOST_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
5993
5994 /** Specifies the WNM sleep state of a STA */
5995 WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
5996};
5997#define WMI_HOST_RXERR_CRC 0x01 /* CRC error on frame */
5998#define WMI_HOST_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
5999#define WMI_HOST_RXERR_MIC 0x10 /* Michael MIC decrypt error */
6000#define WMI_HOST_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
6001
6002enum wmi_host_sta_ps_param_uapsd {
6003 WMI_HOST_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
6004 WMI_HOST_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
6005 WMI_HOST_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
6006 WMI_HOST_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
6007 WMI_HOST_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
6008 WMI_HOST_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
6009 WMI_HOST_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
6010 WMI_HOST_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
6011};
6012
6013enum wmi_host_sta_ps_param_rx_wake_policy {
6014 /* Wake up when ever there is an RX activity on the VDEV. In this mode
6015 * the Power save SM(state machine) will come out of sleep by either
6016 * sending null frame (or) a data frame (with PS==0) in response to TIM
6017 * bit set in the received beacon frame from AP.
6018 */
6019 WMI_HOST_STA_PS_RX_WAKE_POLICY_WAKE = 0,
6020
6021 /* Here the power save state machine will not wakeup in response to TIM
6022 * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
6023 * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
6024 * access categories are delivery-enabled, the station will send a UAPSD
6025 * trigger frame, otherwise it will send a PS-Poll.
6026 */
6027 WMI_HOST_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
6028};
6029enum wmi_host_sta_ps_param_pspoll_count {
6030 WMI_HOST_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
6031 /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
6032 * will send before waking up.
6033 */
6034};
6035/** Number of tx frames/beacon that cause the power save SM to wake up.
6036 *
6037 * Value 1 causes the SM to wake up for every TX. Value 0 has a special
6038 * meaning, It will cause the SM to never wake up. This is useful if you want
6039 * to keep the system to sleep all the time for some kind of test mode . host
6040 * can change this parameter any time. It will affect at the next tx frame.
6041 */
6042enum wmi_host_sta_ps_param_tx_wake_threshold {
6043 WMI_HOST_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
6044 WMI_HOST_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
6045
6046 /* Values greater than one indicate that many TX attempts per beacon
6047 * interval before the STA will wake up
6048 */
6049};
6050/*
6051 * Transmit power scale factor.
6052 *
6053 */
6054typedef enum {
6055 WMI_HOST_TP_SCALE_MAX = 0, /* no scaling (default) */
6056 WMI_HOST_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
6057 WMI_HOST_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
6058 WMI_HOST_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
6059 WMI_HOST_TP_SCALE_MIN = 4, /* min, but still on */
6060 WMI_HOST_TP_SCALE_SIZE = 5, /* max num of enum */
6061} WMI_HOST_TP_SCALE;
6062enum {
6063 WMI_HOST_RATEPWR_TABLE_OPS_SET,
6064 WMI_HOST_RATEPWR_TABLE_OPS_GET,
6065};
6066/* reserved up through 0xF */
6067/**
6068 * struct wmi_host_dcs_mib_stats - WLAN IM stats from target to host
6069 * Below statistics are sent from target to host periodically.
6070 * These are collected at target as long as target is running
6071 * and target chip is not in sleep.
6072 * @listen_time:
6073 * @reg_tx_frame_cnt:
6074 * @reg_rx_frame_cnt:
6075 * @reg_rxclr_cnt:
6076 * @reg_cycle_cnt: delta cycle count
6077 * @reg_rxclr_ext_cnt:
6078 * @reg_ofdm_phyerr_cnt:
6079 * @reg_cck_phyerr_cnt: CCK err count since last reset, read from register
6080 */
6081typedef struct _hp_dcs_mib_stats {
6082 int32_t listen_time;
6083 uint32_t reg_tx_frame_cnt;
6084 uint32_t reg_rx_frame_cnt;
6085 uint32_t reg_rxclr_cnt;
6086 uint32_t reg_cycle_cnt;
6087 uint32_t reg_rxclr_ext_cnt;
6088 uint32_t reg_ofdm_phyerr_cnt;
6089 uint32_t reg_cck_phyerr_cnt;
6090} wmi_host_dcs_mib_stats_t;
6091
6092/**
6093 * struct wmi_host_dcs_im_tgt_stats - DCS IM target stats
6094 * @reg_tsf32: current running TSF from the TSF-1
6095 * @last_ack_rssi: Known last frame rssi, in case of multiple stations, if
6096 * and at different ranges, this would not gaurantee that
6097 * this is the least rssi.
6098 * @tx_waste_time: Sum of all the failed durations in the last
6099 * one second interval.
6100 * @rx_time: count how many times the hal_rxerr_phy is marked, in this
6101 * time period
6102 * @phyerr_cnt:
6103 * @mib_stats: wmi_host_dcs_mib_stats_t - collected mib stats as explained
6104 * in mib structure
6105 */
6106typedef struct _wmi_host_dcs_im_tgt_stats {
6107 uint32_t reg_tsf32;
6108 uint32_t last_ack_rssi;
6109 uint32_t tx_waste_time;
6110 uint32_t rx_time;
6111 uint32_t phyerr_cnt;
6112 wmi_host_dcs_mib_stats_t mib_stats;
6113} wmi_host_dcs_im_tgt_stats_t;
6114
6115/**
6116 * Enum for pktlog req
6117 */
6118typedef enum {
6119 WMI_HOST_PKTLOG_EVENT_RX = 0x1,
6120 WMI_HOST_PKTLOG_EVENT_TX = 0x2,
6121 WMI_HOST_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
6122 WMI_HOST_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
6123 WMI_HOST_PKTLOG_EVENT_DBG_PRINT = 0x10, /* DEBUG prints */
6124 /* To support Smart Antenna */
6125 WMI_HOST_PKTLOG_EVENT_SMART_ANTENNA = 0x20,
6126 WMI_HOST_PKTLOG_EVENT_H_INFO = 0x40,
6127 WMI_HOST_PKTLOG_EVENT_STEERING = 0x80,
6128} WMI_HOST_PKTLOG_EVENT;
6129
6130/**
6131 * wmi_host_phyerr
6132 *
6133 */
6134#define WMI_HOST_PHY_ERROR_SPECTRAL_SCAN 0x26
6135#define WMI_HOST_PHY_ERROR_FALSE_RADAR_EXT 0x24
6136
6137#define WMI_HOST_AR900B_DFS_PHYERR_MASK 0x4
6138#define WMI_HOST_AR900B_SPECTRAL_PHYERR_MASK 0x4000000
6139
6140/**
6141 * struct wmi_host_perchain_rssi_info - per chain RSSI info
6142 * @rssi_pri20: RSSI on primary 20
6143 * @rssi_sec20: RSSI on secomdary 20
6144 * @rssi_sec40: RSSI secondary 40
6145 * @rssi_sec80: RSSI secondary 80
6146 */
6147typedef struct wmi_host_perchain_rssi_info {
6148 int8_t rssi_pri20;
6149 int8_t rssi_sec20;
6150 int8_t rssi_sec40;
6151 int8_t rssi_sec80;
6152} wmi_host_perchain_rssi_info_t;
6153
6154/**
6155 * struct _wmi_host_rf_info - RF measurement information
6156 * @rssi_comb: RSSI Information
6157 * @pc_rssi_info[4]: For now, we know we are getting information
6158 * for only 4 chains at max. For future extensions
6159 * use a define
6160 * @noise_floor: Noise floor information
6161 */
6162typedef struct _wmi_host_rf_info {
6163 int8_t rssi_comb;
6164 wmi_host_perchain_rssi_info_t pc_rssi_info[4];
6165 int16_t noise_floor[4];
6166} wmi_host_rf_info_t;
6167
6168/**
6169 * struct _wmi_host_chan_info
6170 * @center_freq1: center frequency 1 in MHz
6171 * @center_freq2: center frequency 2 in MHz -valid only for
6172 * 11ACVHT 80PLUS80 mode
6173 * @chan_width: channel width in MHz
6174 */
6175typedef struct _wmi_host_chan_info {
6176 u_int16_t center_freq1;
6177 u_int16_t center_freq2;
6178 u_int8_t chan_width;
6179} wmi_host_chan_info_t;
6180
6181/**
6182 * struct wmi_host_phyerr
6183 * @rf_info:
6184 * @chan_info:
6185 * @tsf64:
6186 * @phy_err_code:
6187 * @tsf_timestamp:
6188 * @bufp:
6189 * @buf_len:
6190 * @phy_err_mask0:
6191 * @phy_err_mask1:
6192 */
6193typedef struct _wmi_host_phyerr {
6194 wmi_host_rf_info_t rf_info;
6195 wmi_host_chan_info_t chan_info;
6196 uint64_t tsf64;
6197 int32_t phy_err_code;
6198 uint32_t tsf_timestamp;
6199 uint8_t *bufp;
6200 uint32_t buf_len;
6201 uint32_t phy_err_mask0;
6202 uint32_t phy_err_mask1;
6203} wmi_host_phyerr_t;
6204
6205/**
6206 * struct wmi_host_rtt_event_hdr
6207 * @req_id: request id
6208 * @status: status
6209 * @meas_done: measurement done flag
6210 * @meas_type: measurement type
6211 * @report_type: report type
6212 * @v3_status: v2 status
6213 * @v3_finish:
6214 * @v3_tm_start:
6215 * @num_ap: number of AP
6216 * @result: resuult
6217 * @dest_mac: destination mac
6218 */
6219typedef struct {
6220 uint16_t req_id;
6221 uint16_t status:1,
6222 meas_done:1,
6223 meas_type:3,
6224 report_type:3,
6225 v3_status:2,
6226 v3_finish:1,
6227 v3_tm_start:1,
6228 num_ap:4;
6229 uint16_t result;
6230 uint8_t dest_mac[IEEE80211_ADDR_LEN];
6231} wmi_host_rtt_event_hdr;
6232
6233/**
6234 * struct wmi_host_rtt_meas_event - RTT measurement event
6235 * @chain_mask:
6236 * @bw:
6237 * @rsvd:
6238 * @txrxchain_mask: Bit:0-3:chain mask
6239 * Bit 4-5: band width info
6240 * 00 --Legacy 20, 01 --HT/VHT20
6241 * 10 --HT/VHT40, 11 -- VHT80
6242 * @tod: resolution of 0.1ns
6243 * @toa: resolution of 0.1ns
6244 * @t3:
6245 * @t4:
6246 * @rssi0:
6247 * @rssi1:
6248 * @rssi2:
6249 * @rssi3:
6250 */
6251typedef struct {
6252 uint32_t chain_mask:3,
6253 bw:2,
6254 rsvd:27;
6255 uint32_t txrxchain_mask;
6256 uint64_t tod;
6257 uint64_t toa;
6258 uint64_t t3;
6259 uint64_t t4;
6260 uint32_t rssi0;
6261 uint32_t rssi1;
6262 uint32_t rssi2;
6263 uint32_t rssi3;
6264} wmi_host_rtt_meas_event;
6265
6266/*----RTT Report event definition ----*/
6267typedef enum {
6268 /* rtt cmd header parsing error --terminate */
6269 WMI_HOST_RTT_COMMAND_HEADER_ERROR = 0,
6270 /* rtt body parsing error -- skip current STA REQ */
6271 WMI_HOST_RTT_COMMAND_ERROR,
6272 /* rtt no resource -- terminate */
6273 WMI_HOST_RTT_MODULE_BUSY,
6274 /* STA exceed the support limit -- only server the first n STA */
6275 WMI_HOST_RTT_TOO_MANY_STA,
6276 /* any allocate failure */
6277 WMI_HOST_RTT_NO_RESOURCE,
6278 /* can not find vdev with vdev ID - skip current STA REQ */
6279 WMI_HOST_RTT_VDEV_ERROR,
6280 /* Tx failure -- continiue and measure number */
6281 WMI_HOST_RTT_TRANSIMISSION_ERROR,
6282 /* wait for first TM timer expire-terminate current STA measurement */
6283 WMI_HOST_RTT_TM_TIMER_EXPIRE,
6284 /* we do not support RTT measurement with this type of frame */
6285 WMI_HOST_RTT_FRAME_TYPE_NOSUPPORT,
6286 /* whole RTT measurement timer expire-terminate
6287 ** current STA measurement */
6288 WMI_HOST_RTT_TIMER_EXPIRE,
6289 /* channel swicth failed */
6290 WMI_HOST_RTT_CHAN_SWITCH_ERROR,
6291 /* TMR trans error, this dest peer will be skipped */
6292 WMI_HOST_RTT_TMR_TRANS_ERROR,
6293 /* V3 only. If both CFR and Token mismatch, do not report */
6294 WMI_HOST_RTT_NO_REPORT_BAD_CFR_TOKEN,
6295 /* For First TM, if CFR is bad, then do not report */
6296 WMI_HOST_RTT_NO_REPORT_FIRST_TM_BAD_CFR,
6297 /* do not allow report type2 mix with type 0, 1 */
6298 WMI_HOST_RTT_REPORT_TYPE2_MIX,
6299 /* LCI Configuration OK. - Responder only */
6300 WMI_HOST_RTT_LCI_CFG_OK,
6301 /* LCR configuration OK. - Responder only */
6302 WMI_HOST_RTT_LCR_CFG_OK,
6303 /* Bad configuration LCI (or) LCR request - Responder only */
6304 WMI_HOST_RTT_CFG_ERROR,
6305 WMI_HOST_WMI_RTT_REJECT_MAX,
6306} WMI_HOST_RTT_ERROR_INDICATOR;
6307typedef struct {
6308 wmi_host_rtt_event_hdr hdr;
6309 WMI_HOST_RTT_ERROR_INDICATOR reject_reason;
6310} wmi_host_rtt_error_report_event;
6311
6312#if defined(AR9888)
6313typedef enum {
6314 WMI_HOST_PROF_CPU_IDLE,
6315 WMI_HOST_PROF_PPDU_PROC,
6316 WMI_HOST_PROF_PPDU_POST,
6317 WMI_HOST_PROF_HTT_TX_INPUT,
6318 WMI_HOST_PROF_MSDU_ENQ,
6319 WMI_HOST_PROF_PPDU_POST_HAL,
6320 WMI_HOST_PROF_COMPUTE_TX_TIME,
6321
6322 /* Add new ID's above this. */
6323 WMI_HOST_PROF_MAX_ID,
6324} wmi_host_profile_id_t;
6325#endif
6326
6327#define WMI_HOST_WLAN_PROFILE_MAX_HIST 3
6328#define WMI_HOST_WLAN_PROFILE_MAX_BIN_CNT 32
6329
6330#if defined(AR9888)
6331#define WMI_HOST_MAX_PROFILE WMI_HOST_PROF_MAX_ID
6332#else
6333#define WMI_HOST_MAX_PROFILE WMI_HOST_WLAN_PROFILE_MAX_BIN_CNT
6334#endif
6335
6336/**
6337 * struct wmi_host_wlan_profile - Host profile param
6338 * @id: profile id
6339 * @cnt: Count
6340 * @tot:
6341 * @min: minimum
6342 * @max: Mac
6343 * @hist_intvl: history interval
6344 * @hist: profile data history
6345 */
6346typedef struct {
6347 uint32_t id;
6348 uint32_t cnt;
6349 uint32_t tot;
6350 uint32_t min;
6351 uint32_t max;
6352 uint32_t hist_intvl;
6353 uint32_t hist[WMI_HOST_WLAN_PROFILE_MAX_HIST];
6354} wmi_host_wlan_profile_t;
6355
6356/**
6357 * struct wmi_host_wlan_profile_ctx_t - profile context
6358 * @tot: time in us
6359 * @tx_msdu_cnt: MSDU TX count
6360 * @tx_mpdu_cnt: MPDU tx count
6361 * @tx_ppdu_cnt: PPDU tx count
6362 * @rx_msdu_cnt: MSDU RX count
6363 * @rx_mpdu_cnt: MPDU RXcount
6364 * @bin_count: Bin count
6365 */
6366typedef struct {
6367 uint32_t tot;
6368 uint32_t tx_msdu_cnt;
6369 uint32_t tx_mpdu_cnt;
6370 uint32_t tx_ppdu_cnt;
6371 uint32_t rx_msdu_cnt;
6372 uint32_t rx_mpdu_cnt;
6373 uint32_t bin_count;
6374} wmi_host_wlan_profile_ctx_t;
6375
6376/**
Govind Singh89727882016-04-15 13:58:27 +05306377 * struct wmi_host_chan_info_event - Channel info WMI event
6378 * @err_code: Error code
6379 * @freq: Channel freq
6380 * @cmd_flags: Read flags
6381 * @noise_floor: Noise Floor value
6382 * @rx_clear_count: rx clear count
6383 * @cycle_count: cycle count
6384 * @chan_tx_pwr_range: channel tx power per range
6385 * @chan_tx_pwr_tp: channel tx power per throughput
6386 * @rx_frame_count: rx frame count
6387 * @rx_11b_mode_data_duration: 11b mode data duration
6388 */
6389typedef struct {
6390 uint32_t err_code;
6391 uint32_t freq;
6392 uint32_t cmd_flags;
6393 uint32_t noise_floor;
6394 uint32_t rx_clear_count;
6395 uint32_t cycle_count;
6396 uint32_t chan_tx_pwr_range;
6397 uint32_t chan_tx_pwr_tp;
6398 uint32_t rx_frame_count;
6399 uint32_t rx_11b_mode_data_duration;
6400} wmi_host_chan_info_event;
6401
6402/**
6403 * struct wmi_host_pdev_channel_hopping_event
6404 * @noise_floor_report_iter: Noise threshold iterations with high values
6405 * @noise_floor_total_iter: Total noise threshold iterations
6406 */
6407typedef struct {
6408 uint32_t noise_floor_report_iter;
6409 uint32_t noise_floor_total_iter;
6410} wmi_host_pdev_channel_hopping_event;
6411
6412/**
6413 * struct wmi_host_pdev_bss_chan_info_event
6414 * @freq: Units in MHz
6415 * @noise_floor: units are dBm
6416 * @rx_clear_count_low:
6417 * @rx_clear_count_high:
6418 * @cycle_count_low:
6419 * @cycle_count_high:
6420 * @tx_cycle_count_low:
6421 * @tx_cycle_count_high:
6422 * @rx_cycle_count_low:
6423 * @rx_cycle_count_high:
6424 * @rx_bss_cycle_count_low:
6425 * @rx_bss_cycle_count_high:
6426 * @reserved:
6427 */
6428typedef struct {
6429 uint32_t freq;
6430 uint32_t noise_floor;
6431 uint32_t rx_clear_count_low;
6432 uint32_t rx_clear_count_high;
6433 uint32_t cycle_count_low;
6434 uint32_t cycle_count_high;
6435 uint32_t tx_cycle_count_low;
6436 uint32_t tx_cycle_count_high;
6437 uint32_t rx_cycle_count_low;
6438 uint32_t rx_cycle_count_high;
6439 uint32_t rx_bss_cycle_count_low;
6440 uint32_t rx_bss_cycle_count_high;
6441 uint32_t reserved;
6442} wmi_host_pdev_bss_chan_info_event;
6443
6444#define WMI_HOST_INST_STATS_INVALID_RSSI 0
6445/**
6446 * struct wmi_host_inst_stats_resp
6447 * @iRSSI: Instantaneous RSSI
6448 * @peer_macaddr: peer mac address
6449 */
6450typedef struct {
6451 uint32_t iRSSI;
6452 wmi_host_mac_addr peer_macaddr;
6453} wmi_host_inst_stats_resp;
6454
6455/* Event definition and new structure addition to send event
6456 * to host to block/unblock tx data traffic based on peer_ast_idx or vdev id
6457 */
6458#define WMI_HOST_INVALID_PEER_AST_INDEX 0xffff
6459#define WMI_HOST_TX_DATA_TRAFFIC_CTRL_BLOCK 0x1
6460#define WMI_HOST_TX_DATA_TRAFFIC_CTRL_UNBLOCK 0x2
6461/**
6462 * struct wmi_host_tx_data_traffic_ctrl_event
6463 * @peer_ast_idx: For vdev based control, peer_ast_idx will be
6464 * WMI_INVALID_PEER_AST_INDEX
6465 * @vdev_id: only applies if peer_ast_idx == INVALID
6466 * @ctrl_cmd: WMI_TX_DATA_TRAFFIC_CTRL_BLOCK or
6467 * WMI_TX_DATA_TRAFFIC_CTRL_UNBLOCK
6468 */
6469typedef struct {
6470 uint32_t peer_ast_idx;
6471 uint32_t vdev_id;
6472 uint32_t ctrl_cmd;
6473} wmi_host_tx_data_traffic_ctrl_event;
6474
6475/**
6476 * struct wmi_host_ath_dcs_cw_int
6477 * @channel: either number or freq in mhz
6478 */
6479typedef struct {
6480 uint32_t channel;
6481} wmi_host_ath_dcs_cw_int;
Govind Singhc10bde82016-05-02 17:59:24 +05306482
6483#define WMI_MAX_POWER_DBG_ARGS 8
6484
6485/**
6486 * struct wmi_power_dbg_params - power debug command parameter
6487 * @pdev_id: subsystem identifier
6488 * @module_id: parameter id
6489 * @num_arg: no of arguments
6490 * @args: arguments
6491 */
6492struct wmi_power_dbg_params {
6493 uint32_t pdev_id;
6494 uint32_t module_id;
6495 uint32_t num_args;
6496 uint32_t args[WMI_MAX_POWER_DBG_ARGS];
6497};
6498
Gupta, Kapil7b768002016-04-25 19:14:19 +05306499/**
6500 * struct wmi_adaptive_dwelltime_params - the adaptive dwelltime params
6501 * @vdev_id: vdev id
6502 * @is_enabled: Adaptive dwell time is enabled/disabled
6503 * @dwelltime_mode: global default adaptive dwell mode
6504 * @lpf_weight: weight to calculate the average low pass
6505 * filter for channel congestion
6506 * @passive_mon_intval: intval to monitor wifi activity in passive scan in msec
6507 * @wifi_act_threshold: % of wifi activity used in passive scan 0-100
6508 *
6509 */
6510struct wmi_adaptive_dwelltime_params {
6511 uint32_t vdev_id;
6512 bool is_enabled;
6513 enum wmi_dwelltime_adaptive_mode dwelltime_mode;
6514 uint8_t lpf_weight;
6515 uint8_t passive_mon_intval;
6516 uint8_t wifi_act_threshold;
6517};
Govind Singhc7cd2d62016-06-21 14:33:26 +05306518
6519/**
6520 * struct wmi_fw_dump_seg_req - individual segment details
6521 * @seg_id - segment id.
6522 * @seg_start_addr_lo - lower address of the segment.
6523 * @seg_start_addr_hi - higher address of the segment.
6524 * @seg_length - length of the segment.
6525 * @dst_addr_lo - lower address of the destination buffer.
6526 * @dst_addr_hi - higher address of the destination buffer.
6527 *
6528 * This structure carries the information to firmware about the
6529 * individual segments. This structure is part of firmware memory
6530 * dump request.
6531 */
6532struct wmi_fw_dump_seg_req {
6533 uint8_t seg_id;
6534 uint32_t seg_start_addr_lo;
6535 uint32_t seg_start_addr_hi;
6536 uint32_t seg_length;
6537 uint32_t dst_addr_lo;
6538 uint32_t dst_addr_hi;
6539};
6540
6541/**
6542 * enum wmi_userspace_log_level - Log level at userspace
6543 * @WMI_LOG_LEVEL_NO_COLLECTION: verbose_level 0 corresponds to no collection
6544 * @WMI_LOG_LEVEL_NORMAL_COLLECT: verbose_level 1 correspond to normal log
6545 * level with minimal user impact. This is the default value.
6546 * @WMI_LOG_LEVEL_ISSUE_REPRO: verbose_level 2 are enabled when user is lazily
6547 * trying to reproduce a problem, wifi performances and power can be impacted
6548 * but device should not otherwise be significantly impacted
6549 * @WMI_LOG_LEVEL_ACTIVE: verbose_level 3+ are used when trying to
6550 * actively debug a problem
6551 *
6552 * Various log levels defined in the userspace for logging applications
6553 */
6554enum wmi_userspace_log_level {
6555 WMI_LOG_LEVEL_NO_COLLECTION,
6556 WMI_LOG_LEVEL_NORMAL_COLLECT,
6557 WMI_LOG_LEVEL_ISSUE_REPRO,
6558 WMI_LOG_LEVEL_ACTIVE,
6559};
6560
Govind Singh3ddda1f2016-03-09 11:34:12 +05306561#endif /* _WMI_UNIFIED_PARAM_H_ */
6562