blob: 5f106114b40031bfa7bc3993c833b474b4e15ea6 [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;
Kiran Venkatappa9da7e042016-08-09 22:52:35 +0530460#ifndef CONFIG_MCL
Govind Singh89727882016-04-15 13:58:27 +0530461 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;
Kiran Venkatappa9da7e042016-08-09 22:52:35 +0530637#ifndef CONFIG_MCL
Govind Singh89727882016-04-15 13:58:27 +0530638 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;
Kiran Venkatappa9da7e042016-08-09 22:52:35 +0530896#ifndef CONFIG_MCL
Govind Singh89727882016-04-15 13:58:27 +0530897 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];
Kiran Venkatappa9da7e042016-08-09 22:52:35 +05301022#ifndef CONFIG_MCL
Govind Singh89727882016-04-15 13:58:27 +05301023 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;
Kiran Venkatappa9da7e042016-08-09 22:52:35 +05301054#ifndef CONFIG_MCL
Govind Singh89727882016-04-15 13:58:27 +05301055 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 {
Govind Singh89727882016-04-15 13:58:27 +05301099 uint16_t nallchans;
1100 struct channel_param ch_param[1];
1101};
1102#endif
Govind Singh3ddda1f2016-03-09 11:34:12 +05301103
1104/**
1105 * struct fw_hang_params - fw hang command parameters
1106 * @type: 0:unused 1: ASSERT, 2:not respond detect command, 3:simulate ep-full
1107 * @delay_time_ms: 0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)
1108 */
1109struct fw_hang_params {
1110 uint32_t type;
1111 uint32_t delay_time_ms;
1112};
1113
1114/**
1115 * struct pdev_utf_params - pdev utf command parameters
1116 * @utf_payload:
1117 * @len:
Govind Singh89727882016-04-15 13:58:27 +05301118 * @is_ar900b: is it 900b target
Govind Singh3ddda1f2016-03-09 11:34:12 +05301119 */
1120struct pdev_utf_params {
1121 uint8_t *utf_payload;
1122 uint32_t len;
Kiran Venkatappa9da7e042016-08-09 22:52:35 +05301123#ifndef CONFIG_MCL
Govind Singh89727882016-04-15 13:58:27 +05301124 bool is_ar900b;
1125#endif
Govind Singh3ddda1f2016-03-09 11:34:12 +05301126};
1127
Govind Singh89727882016-04-15 13:58:27 +05301128/*Adding this due to dependency on wmi_unified.h
1129 */
1130typedef struct {
1131 uint32_t len;
1132 uint32_t msgref;
1133 uint32_t segmentInfo;
1134} QVIT_SEG_HDR_INFO_STRUCT;
1135
1136struct pdev_qvit_params {
1137 uint8_t *utf_payload;
1138 uint32_t len;
1139};
Govind Singh3ddda1f2016-03-09 11:34:12 +05301140/**
1141 * struct crash_inject - crash inject command parameters
1142 * @type: crash inject type
1143 * @delay_time_ms: time in milliseconds for FW to delay the crash
1144 */
1145struct crash_inject {
1146 uint32_t type;
1147 uint32_t delay_time_ms;
1148};
1149
1150/**
1151 * struct dbglog_params - fw deboglog command parameters
1152 * @param: command parameter
1153 * @val: parameter value
1154 * @module_id_bitmap: fixed length module id bitmap
1155 * @bitmap_len: module id bitmap length
Govind Singh89727882016-04-15 13:58:27 +05301156 * @cfgvalid: cfgvalid
Govind Singh3ddda1f2016-03-09 11:34:12 +05301157 */
1158struct dbglog_params {
1159 uint32_t param;
1160 uint32_t val;
1161 uint32_t *module_id_bitmap;
1162 uint32_t bitmap_len;
Kiran Venkatappa9da7e042016-08-09 22:52:35 +05301163#ifndef CONFIG_MCL
Govind Singh89727882016-04-15 13:58:27 +05301164 uint32_t cfgvalid[2];
1165#endif
Govind Singh3ddda1f2016-03-09 11:34:12 +05301166};
1167
1168/**
1169 * struct seg_hdr_info - header info
1170 * @len: length
1171 * @msgref: message refrence
1172 * @segmentInfo: segment info
1173 * @pad: padding
1174 */
1175struct seg_hdr_info {
1176 uint32_t len;
1177 uint32_t msgref;
1178 uint32_t segmentInfo;
1179 uint32_t pad;
1180};
1181
1182/**
1183 * struct wmi_mgmt_params - wmi mgmt cmd paramters
1184 * @tx_frame: management tx frame
Govind Singh89727882016-04-15 13:58:27 +05301185 * @frm_len: frame length
Govind Singh3ddda1f2016-03-09 11:34:12 +05301186 * @vdev_id: vdev id
1187 * @tx_complete_cb: tx download callback handler
1188 * @tx_ota_post_proc_cb: OTA complition handler
1189 * @chanfreq: channel frequency
1190 * @pdata: frame data
1191 * @wmi_desc: command descriptor
Govind Singh89727882016-04-15 13:58:27 +05301192 * @desc_id: descriptor id relyaed back by target
1193 * @macaddr - macaddr of peer
Govind Singh3ddda1f2016-03-09 11:34:12 +05301194 */
1195struct wmi_mgmt_params {
1196 void *tx_frame;
1197 uint16_t frm_len;
1198 uint8_t vdev_id;
Govind Singh3ddda1f2016-03-09 11:34:12 +05301199 uint16_t chanfreq;
1200 void *pdata;
Govind Singh89727882016-04-15 13:58:27 +05301201 uint16_t desc_id;
1202 uint8_t *macaddr;
Govind Singhd7468a52016-03-09 14:32:57 +05301203 void *qdf_ctx;
Govind Singh3ddda1f2016-03-09 11:34:12 +05301204};
Govind Singhbffe4de2016-02-26 17:50:39 +05301205
1206/**
1207 * struct p2p_ps_params - P2P powersave related params
1208 * @opp_ps: opportunistic power save
1209 * @ctwindow: CT window
1210 * @count: count
1211 * @duration: duration
1212 * @interval: interval
1213 * @single_noa_duration: single shot noa duration
1214 * @ps_selection: power save selection
1215 * @session_id: session id
1216 */
1217struct p2p_ps_params {
1218 uint8_t opp_ps;
1219 uint32_t ctwindow;
1220 uint8_t count;
1221 uint32_t duration;
1222 uint32_t interval;
1223 uint32_t single_noa_duration;
1224 uint8_t ps_selection;
1225 uint8_t session_id;
1226};
1227
1228
1229/**
1230 * struct ta_uapsd_trig_params - uapsd trigger parameter
1231 * @vdevid: vdev id
1232 * @peer_addr: peer address
1233 * @auto_triggerparam: trigger parameters
1234 * @num_ac: no of access category
1235 */
1236struct sta_uapsd_trig_params {
1237 uint32_t vdevid;
1238 uint8_t peer_addr[IEEE80211_ADDR_LEN];
1239 uint8_t *auto_triggerparam;
1240 uint32_t num_ac;
1241};
Govind Singhe7b800c2016-03-01 15:30:53 +05301242
1243/**
1244 * struct ocb_utc_param
1245 * @vdev_id: session id
1246 * @utc_time: number of nanoseconds from Jan 1st 1958
1247 * @time_error: the error in the UTC time. All 1's for unknown
1248 */
1249struct ocb_utc_param {
1250 uint32_t vdev_id;
1251 uint8_t utc_time[WMI_SIZE_UTC_TIME];
1252 uint8_t time_error[WMI_SIZE_UTC_TIME_ERROR];
1253};
1254
1255/**
1256 * struct ocb_timing_advert_param
1257 * @vdev_id: session id
1258 * @chan_freq: frequency on which to advertise
1259 * @repeat_rate: the number of times it will send TA in 5 seconds
1260 * @timestamp_offset: offset of the timestamp field in the TA frame
1261 * @time_value_offset: offset of the time_value field in the TA frame
1262 * @template_length: size in bytes of the TA frame
1263 * @template_value: the TA frame
1264 */
1265struct ocb_timing_advert_param {
1266 uint32_t vdev_id;
1267 uint32_t chan_freq;
1268 uint32_t repeat_rate;
1269 uint32_t timestamp_offset;
1270 uint32_t time_value_offset;
1271 uint32_t template_length;
1272 uint8_t *template_value;
1273};
1274
1275/**
1276 * struct dcc_get_stats_param
1277 * @vdev_id: session id
1278 * @channel_count: number of dcc channels
1279 * @request_array_len: size in bytes of the request array
1280 * @request_array: the request array
1281 */
1282struct dcc_get_stats_param {
1283 uint32_t vdev_id;
1284 uint32_t channel_count;
1285 uint32_t request_array_len;
1286 void *request_array;
1287};
1288
1289/**
1290 * struct dcc_update_ndl_param
1291 * @vdev_id: session id
1292 * @channel_count: number of channels to be updated
1293 * @dcc_ndl_chan_list_len: size in bytes of the ndl_chan array
1294 * @dcc_ndl_chan_list: the ndl_chan array
1295 * @dcc_ndl_active_state_list_len: size in bytes of the active_state array
1296 * @dcc_ndl_active_state_list: the active state array
1297 */
1298struct dcc_update_ndl_param {
1299 uint32_t vdev_id;
1300 uint32_t channel_count;
1301 uint32_t dcc_ndl_chan_list_len;
1302 void *dcc_ndl_chan_list;
1303 uint32_t dcc_ndl_active_state_list_len;
1304 void *dcc_ndl_active_state_list;
1305};
1306
1307/**
1308 * struct ocb_config_sched
1309 * @chan_freq: frequency of the channel
1310 * @total_duration: duration of the schedule
1311 * @guard_interval: guard interval on the start of the schedule
1312 */
1313struct ocb_config_sched {
1314 uint32_t chan_freq;
1315 uint32_t total_duration;
1316 uint32_t guard_interval;
1317};
1318
1319/**
1320 * OCB structures
1321 */
1322
1323#define WMI_NUM_AC (4)
1324#define WMI_OCB_CHANNEL_MAX (5)
1325#define WMI_MAX_NUM_AC 4
1326struct wmi_ocb_qos_params {
1327 uint8_t aifsn;
1328 uint8_t cwmin;
1329 uint8_t cwmax;
1330};
1331/**
1332 * struct ocb_config_channel
1333 * @chan_freq: frequency of the channel
1334 * @bandwidth: bandwidth of the channel, either 10 or 20 MHz
1335 * @mac_address: MAC address assigned to this channel
1336 * @qos_params: QoS parameters
1337 * @max_pwr: maximum transmit power of the channel (dBm)
1338 * @min_pwr: minimum transmit power of the channel (dBm)
1339 * @reg_pwr: maximum transmit power specified by the regulatory domain (dBm)
1340 * @antenna_max: maximum antenna gain specified by the regulatory domain (dB)
1341 */
1342struct ocb_config_channel {
1343 uint32_t chan_freq;
1344 uint32_t bandwidth;
Govind Singhd7468a52016-03-09 14:32:57 +05301345 struct qdf_mac_addr mac_address;
Govind Singhe7b800c2016-03-01 15:30:53 +05301346 struct wmi_ocb_qos_params qos_params[WMI_MAX_NUM_AC];
1347 uint32_t max_pwr;
1348 uint32_t min_pwr;
1349 uint8_t reg_pwr;
1350 uint8_t antenna_max;
1351 uint16_t flags;
1352};
1353
1354/**
1355 * struct ocb_config_param
1356 * @session_id: session id
1357 * @channel_count: number of channels
1358 * @schedule_size: size of the channel schedule
1359 * @flags: reserved
1360 * @channels: array of OCB channels
1361 * @schedule: array of OCB schedule elements
1362 * @dcc_ndl_chan_list_len: size of the ndl_chan array
1363 * @dcc_ndl_chan_list: array of dcc channel info
1364 * @dcc_ndl_active_state_list_len: size of the active state array
1365 * @dcc_ndl_active_state_list: array of active states
1366 * @adapter: the OCB adapter
1367 * @dcc_stats_callback: callback for the response event
1368 */
1369struct ocb_config_param {
1370 uint8_t session_id;
1371 uint32_t channel_count;
1372 uint32_t schedule_size;
1373 uint32_t flags;
1374 struct ocb_config_channel *channels;
1375 struct ocb_config_sched *schedule;
1376 uint32_t dcc_ndl_chan_list_len;
1377 void *dcc_ndl_chan_list;
1378 uint32_t dcc_ndl_active_state_list_len;
1379 void *dcc_ndl_active_state_list;
1380};
Govind Singh9bad0002016-03-01 15:54:59 +05301381
Poddar, Siddarth794b9962016-04-28 15:49:11 +05301382enum wmi_peer_rate_report_cond_phy_type {
1383 WMI_PEER_RATE_REPORT_COND_11B = 0,
1384 WMI_PEER_RATE_REPORT_COND_11A_G,
1385 WMI_PEER_RATE_REPORT_COND_11N,
1386 WMI_PEER_RATE_REPORT_COND_11AC,
1387 WMI_PEER_RATE_REPORT_COND_MAX_NUM
1388};
1389
1390/**
1391 * struct report_rate_delta - peer specific parameters
1392 * @percent: percentage
1393 * @delta_min: rate min delta
1394 */
1395struct report_rate_delta {
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301396 uint32_t percent; /* in unit of 12.5% */
1397 uint32_t delta_min; /* in unit of Mbps */
Poddar, Siddarth794b9962016-04-28 15:49:11 +05301398};
1399
1400/**
1401 * struct report_rate_per_phy - per phy report parameters
1402 * @cond_flags: condition flag val
1403 * @delta: rate delta
1404 * @report_rate_threshold: rate threshold
1405 */
1406struct report_rate_per_phy {
1407 /*
1408 * PEER_RATE_REPORT_COND_FLAG_DELTA,
1409 * PEER_RATE_REPORT_COND_FLAG_THRESHOLD
1410 * Any of these two conditions or both of
1411 * them can be set.
1412 */
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301413 uint32_t cond_flags;
Poddar, Siddarth794b9962016-04-28 15:49:11 +05301414 struct report_rate_delta delta;
1415 /*
1416 * In unit of Mbps. There are at most 4 thresholds
1417 * If the threshold count is less than 4, set zero to
1418 * the one following the last threshold
1419 */
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301420 uint32_t report_rate_threshold[WMI_MAX_NUM_OF_RATE_THRESH];
Poddar, Siddarth794b9962016-04-28 15:49:11 +05301421};
1422
1423/**
1424 * struct peer_rate_report_params - peer rate report parameters
1425 * @rate_report_enable: enable rate report param
1426 * @backoff_time: backoff time
1427 * @timer_period: timer
1428 * @report_per_phy: report per phy type
1429 */
1430struct wmi_peer_rate_report_params {
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301431 uint32_t rate_report_enable;
1432 uint32_t backoff_time; /* in unit of msecond */
1433 uint32_t timer_period; /* in unit of msecond */
Poddar, Siddarth794b9962016-04-28 15:49:11 +05301434 /*
1435 *In the following field, the array index means the phy type,
1436 * please see enum wmi_peer_rate_report_cond_phy_type for detail
1437 */
1438 struct report_rate_per_phy report_per_phy[
1439 WMI_PEER_RATE_REPORT_COND_MAX_NUM];
1440
1441};
1442
Govind Singh9bad0002016-03-01 15:54:59 +05301443/**
1444 * struct t_thermal_cmd_params - thermal command parameters
1445 * @min_temp: minimum temprature
1446 * @max_temp: maximum temprature
1447 * @thermal_enable: thermal enable
1448 */
1449struct thermal_cmd_params {
1450 uint16_t min_temp;
1451 uint16_t max_temp;
1452 uint8_t thermal_enable;
1453};
1454
1455#define WMI_LRO_IPV4_SEED_ARR_SZ 5
1456#define WMI_LRO_IPV6_SEED_ARR_SZ 11
1457
1458/**
1459 * struct wmi_lro_config_cmd_t - set LRO init parameters
1460 * @lro_enable: indicates whether lro is enabled
1461 * @tcp_flag: If the TCP flags from the packet do not match
1462 * the values in this field after masking with TCP flags mask
1463 * below, packet is not LRO eligible
1464 * @tcp_flag_mask: field for comparing the TCP values provided
1465 * above with the TCP flags field in the received packet
1466 * @toeplitz_hash_ipv4: contains seed needed to compute the flow id
1467 * 5-tuple toeplitz hash for ipv4 packets
1468 * @toeplitz_hash_ipv6: contains seed needed to compute the flow id
1469 * 5-tuple toeplitz hash for ipv6 packets
1470 */
1471struct wmi_lro_config_cmd_t {
1472 uint32_t lro_enable;
1473 uint32_t tcp_flag:9,
1474 tcp_flag_mask:9;
1475 uint32_t toeplitz_hash_ipv4[WMI_LRO_IPV4_SEED_ARR_SZ];
1476 uint32_t toeplitz_hash_ipv6[WMI_LRO_IPV6_SEED_ARR_SZ];
1477};
Govind Singhae855362016-03-07 14:24:22 +05301478
1479/**
1480 * struct gtx_config_t - GTX config
1481 * @gtx_rt_mask: for HT and VHT rate masks
1482 * @gtx_usrcfg: host request for GTX mask
1483 * @gtx_threshold: PER Threshold (default: 10%)
1484 * @gtx_margin: PER margin (default: 2%)
1485 * @gtx_tcpstep: TCP step (default: 1)
1486 * @gtx_tpcMin: TCP min (default: 5)
1487 * @gtx_bwmask: BW mask (20/40/80/160 Mhz)
1488 */
1489struct wmi_gtx_config {
1490 uint32_t gtx_rt_mask[2];
1491 uint32_t gtx_usrcfg;
1492 uint32_t gtx_threshold;
1493 uint32_t gtx_margin;
1494 uint32_t gtx_tpcstep;
1495 uint32_t gtx_tpcmin;
1496 uint32_t gtx_bwmask;
1497};
1498
1499/**
1500 * struct wmi_probe_resp_params - send probe response parameters
1501 * @bssId: BSSID
1502 * @pProbeRespTemplate: probe response template
1503 * @probeRespTemplateLen: probe response template length
1504 * @ucProxyProbeReqValidIEBmap: valid IE bitmap
1505 */
1506struct wmi_probe_resp_params {
Govind Singh8675b862016-03-28 22:09:18 +05301507 uint8_t bssId[IEEE80211_ADDR_LEN];
Govind Singhae855362016-03-07 14:24:22 +05301508 uint8_t *pProbeRespTemplate;
1509 uint32_t probeRespTemplateLen;
1510 uint32_t ucProxyProbeReqValidIEBmap[8];
1511};
1512
Himanshu Agarwal9efd9bf2016-03-09 18:49:18 +05301513/* struct set_key_params: structure containing
1514 * installation key parameters
1515 * @vdev_id: vdev id
1516 * @key_len: key length
1517 * @key_idx: key index
1518 * @peer_mac: peer mac address
1519 * @key_flags: key flags, 0:pairwise key, 1:group key, 2:static key
1520 * @key_cipher: key cipher based on security mode
1521 * @key_txmic_len: tx mic length
1522 * @key_rxmic_len: rx mic length
1523 * @rx_iv: receive IV, applicable only in case of WAPI
1524 * @tx_iv: transmit IV, applicable only in case of WAPI
1525 * @key_data: key data
1526 */
1527struct set_key_params {
1528 uint8_t vdev_id;
1529 uint16_t key_len;
1530 uint32_t key_idx;
1531 uint8_t peer_mac[IEEE80211_ADDR_LEN];
1532 uint32_t key_flags;
1533 uint32_t key_cipher;
1534 uint32_t key_txmic_len;
1535 uint32_t key_rxmic_len;
1536#ifdef FEATURE_WLAN_WAPI
1537 uint8_t rx_iv[16];
1538 uint8_t tx_iv[16];
1539#endif
1540 uint8_t key_data[WMI_MAC_MAX_KEY_LENGTH];
1541};
1542
Govind Singhae855362016-03-07 14:24:22 +05301543/**
1544 * struct sta_params - sta keep alive parameters
1545 * @vdev_id: vdev id
1546 * @method: keep alive method
1547 * @timeperiod: time to keep alive
1548 * @hostv4addr: host ipv4 address
1549 * @destv4addr: destination ipv4 address
1550 * @destmac: destination mac address
1551 */
1552struct sta_params {
1553 uint8_t vdev_id;
1554 uint32_t method;
1555 uint32_t timeperiod;
1556 uint8_t *hostv4addr;
1557 uint8_t *destv4addr;
1558 uint8_t *destmac;
1559};
1560
1561/**
1562 * struct gateway_update_req_param - gateway parameter update request
1563 * @request_id: request id
1564 * @session_id: session id
1565 * @max_retries: Max ARP/NS retry attempts
1566 * @timeout: Retry interval
1567 * @ipv4_addr_type: on ipv4 network
1568 * @ipv6_addr_type: on ipv6 network
1569 * @gw_mac_addr: gateway mac addr
1570 * @ipv4_addr: ipv4 addr
1571 * @ipv6_addr: ipv6 addr
1572 */
1573struct gateway_update_req_param {
1574 uint32_t request_id;
1575 uint32_t session_id;
1576 uint32_t max_retries;
1577 uint32_t timeout;
1578 uint32_t ipv4_addr_type;
1579 uint32_t ipv6_addr_type;
Govind Singhd7468a52016-03-09 14:32:57 +05301580 struct qdf_mac_addr gw_mac_addr;
1581 uint8_t ipv4_addr[QDF_IPV4_ADDR_SIZE];
1582 uint8_t ipv6_addr[QDF_IPV6_ADDR_SIZE];
Govind Singhae855362016-03-07 14:24:22 +05301583};
1584
1585/**
1586 * struct rssi_monitor_param - rssi monitoring
1587 * @request_id: request id
1588 * @session_id: session id
1589 * @min_rssi: minimum rssi
1590 * @max_rssi: maximum rssi
1591 * @control: flag to indicate start or stop
1592 */
1593struct rssi_monitor_param {
1594 uint32_t request_id;
1595 uint32_t session_id;
1596 int8_t min_rssi;
1597 int8_t max_rssi;
1598 bool control;
1599};
1600
1601/**
1602 * struct scan_mac_oui - oui paramters
1603 * @oui: oui parameters
1604 */
1605struct scan_mac_oui {
1606 uint8_t oui[WMI_WIFI_SCANNING_MAC_OUI_LENGTH];
1607};
1608
1609#define WMI_PASSPOINT_REALM_LEN 256
1610#define WMI_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
1611#define WMI_PASSPOINT_PLMN_LEN 3
1612/**
1613 * struct wifi_passpoint_network_param - passpoint network block
1614 * @id: identifier of this network block
1615 * @realm: null terminated UTF8 encoded realm, 0 if unspecified
1616 * @roaming_consortium_ids: roaming consortium ids to match, 0s if unspecified
1617 * @plmn: mcc/mnc combination as per rules, 0s if unspecified
1618 */
1619struct wifi_passpoint_network_param {
1620 uint32_t id;
1621 uint8_t realm[WMI_PASSPOINT_REALM_LEN];
1622 int64_t roaming_consortium_ids[WMI_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM];
1623 uint8_t plmn[WMI_PASSPOINT_PLMN_LEN];
1624};
1625
1626/**
1627 * struct wifi_passpoint_req_param - passpoint request
1628 * @request_id: request identifier
1629 * @num_networks: number of networks
1630 * @networks: passpoint networks
1631 */
1632struct wifi_passpoint_req_param {
1633 uint32_t request_id;
1634 uint32_t session_id;
1635 uint32_t num_networks;
1636 struct wifi_passpoint_network_param networks[];
1637};
1638
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301639/* struct mobility_domain_info - structure containing
1640 * mobility domain info
1641 * @mdie_present: mobility domain present or not
1642 * @mobility_domain: mobility domain
1643 */
1644struct mobility_domain_info {
1645 uint8_t mdie_present;
1646 uint16_t mobility_domain;
1647};
1648
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301649#define WMI_HOST_ROAM_OFFLOAD_NUM_MCS_SET (16)
1650
1651/* This TLV will be filled only in case roam offload
1652 * for wpa2-psk/okc/ese/11r is enabled */
1653typedef struct {
1654 /*
1655 * TLV tag and len; tag equals
1656 * WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param
1657 */
1658 uint32_t tlv_header;
1659 uint32_t rssi_cat_gap; /* gap for every category bucket */
1660 uint32_t prefer_5g; /* prefer select 5G candidate */
1661 uint32_t select_5g_margin;
1662 uint32_t reassoc_failure_timeout; /* reassoc failure timeout */
1663 uint32_t capability;
1664 uint32_t ht_caps_info;
1665 uint32_t ampdu_param;
1666 uint32_t ht_ext_cap;
1667 uint32_t ht_txbf;
1668 uint32_t asel_cap;
1669 uint32_t qos_enabled;
1670 uint32_t qos_caps;
1671 uint32_t wmm_caps;
1672 /* since this is 4 byte aligned, we don't declare it as tlv array */
1673 uint32_t mcsset[WMI_HOST_ROAM_OFFLOAD_NUM_MCS_SET >> 2];
1674} roam_offload_param;
1675
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301676/* struct roam_offload_scan_params - structure
1677 * containing roaming offload scan parameters
1678 * @is_roam_req_valid: flag to tell whether roam req
1679 * is valid or NULL
1680 * @mode: stores flags for scan
1681 * @vdev_id: vdev id
1682 * @roam_offload_enabled: flag for offload enable
1683 * @psk_pmk: pre shared key/pairwise master key
1684 * @pmk_len: length of PMK
1685 * @prefer_5ghz: prefer select 5G candidate
1686 * @roam_rssi_cat_gap: gap for every category bucket
1687 * @select_5ghz_margin: select 5 Ghz margin
1688 * @krk: KRK
1689 * @btk: BTK
1690 * @reassoc_failure_timeout: reassoc failure timeout
1691 * @rokh_id_length: r0kh id length
1692 * @rokh_id: r0kh id
1693 * @roam_key_mgmt_offload_enabled: roam offload flag
1694 * @auth_mode: authentication mode
Deepak Dhamdhere3ae33a32016-08-22 18:04:00 -07001695 * @okc_enabled: enable opportunistic key caching
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301696 * @is_ese_assoc: flag to determine ese assoc
1697 * @mdid: mobility domain info
1698 * @roam_offload_params: roam offload tlv params
1699 */
1700struct roam_offload_scan_params {
1701 uint8_t is_roam_req_valid;
1702 uint32_t mode;
1703 uint32_t vdev_id;
1704#ifdef WLAN_FEATURE_ROAM_OFFLOAD
1705 uint8_t roam_offload_enabled;
1706 uint8_t psk_pmk[WMI_ROAM_SCAN_PSK_SIZE];
1707 uint32_t pmk_len;
1708 uint8_t prefer_5ghz;
1709 uint8_t roam_rssi_cat_gap;
1710 uint8_t select_5ghz_margin;
1711 uint8_t krk[WMI_KRK_KEY_LEN];
1712 uint8_t btk[WMI_BTK_KEY_LEN];
1713 uint32_t reassoc_failure_timeout;
1714 uint32_t rokh_id_length;
1715 uint8_t rokh_id[WMI_ROAM_R0KH_ID_MAX_LEN];
1716 uint8_t roam_key_mgmt_offload_enabled;
1717 int auth_mode;
Deepak Dhamdhere3ae33a32016-08-22 18:04:00 -07001718 bool okc_enabled;
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301719#endif
1720 bool is_ese_assoc;
1721 struct mobility_domain_info mdid;
Kiran Venkatappa9da7e042016-08-09 22:52:35 +05301722#ifdef CONFIG_MCL
Govind Singh89727882016-04-15 13:58:27 +05301723 /* THis is not available in non tlv target.
1724 * please remove this and replace with a host based
1725 * structure */
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301726 roam_offload_param roam_offload_params;
Govind Singh89727882016-04-15 13:58:27 +05301727#endif
Selvaraj, Sridhar0a1427f2016-07-04 21:40:23 +05301728 uint32_t assoc_ie_length;
1729 uint8_t assoc_ie[MAX_ASSOC_IE_LENGTH];
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301730};
1731
1732/* struct roam_offload_scan_rssi_params - structure containing
1733 * parameters for roam offload scan based on RSSI
1734 * @rssi_thresh: rssi threshold
1735 * @rssi_thresh_diff: difference in rssi threshold
1736 * @hi_rssi_scan_max_count: 5G scan max count
1737 * @hi_rssi_scan_rssi_delta: 5G scan rssi change threshold value
1738 * @hi_rssi_scan_rssi_ub: 5G scan upper bound
1739 * @raise_rssi_thresh_5g: flag to determine penalty and boost thresholds
1740 * @session_id: vdev id
1741 * @penalty_threshold_5g: RSSI threshold below which 5GHz RSSI is penalized
1742 * @boost_threshold_5g: RSSI threshold above which 5GHz RSSI is favored
1743 * @raise_factor_5g: factor by which 5GHz RSSI is boosted
1744 * @drop_factor_5g: factor by which 5GHz RSSI is penalized
1745 * @max_raise_rssi_5g: maximum boost that can be applied to a 5GHz RSSI
1746 * @max_drop_rssi_5g: maximum penalty that can be applied to a 5GHz RSSI
1747 * @good_rssi_threshold: RSSI below which roam is kicked in by background
1748 * scan although rssi is still good
1749 * @roam_earlystop_thres_min: Minimum RSSI threshold value for early stop,
1750 * unit is dB above NF
1751 * @roam_earlystop_thres_max: Maximum RSSI threshold value for early stop,
1752 * unit is dB above NF
Gupta, Kapil1f4a4c32016-04-12 15:02:00 +05301753 * @dense_rssi_thresh_offset: dense roam RSSI threshold difference
1754 * @dense_min_aps_cnt: dense roam minimum APs
1755 * @initial_dense_status: dense status detected by host
1756 * @traffic_threshold: dense roam RSSI threshold
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301757 */
1758struct roam_offload_scan_rssi_params {
1759 int8_t rssi_thresh;
1760 uint8_t rssi_thresh_diff;
1761 uint32_t hi_rssi_scan_max_count;
1762 uint32_t hi_rssi_scan_rssi_delta;
1763 int32_t hi_rssi_scan_rssi_ub;
1764 int raise_rssi_thresh_5g;
1765 uint8_t session_id;
1766 uint32_t penalty_threshold_5g;
1767 uint32_t boost_threshold_5g;
1768 uint8_t raise_factor_5g;
1769 uint8_t drop_factor_5g;
1770 int max_raise_rssi_5g;
1771 int max_drop_rssi_5g;
1772 uint32_t good_rssi_threshold;
1773 uint32_t roam_earlystop_thres_min;
1774 uint32_t roam_earlystop_thres_max;
Gupta, Kapil1f4a4c32016-04-12 15:02:00 +05301775 int dense_rssi_thresh_offset;
1776 int dense_min_aps_cnt;
1777 int initial_dense_status;
1778 int traffic_threshold;
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301779};
1780
Govind Singhae855362016-03-07 14:24:22 +05301781/**
1782 * struct wifi_epno_network - enhanced pno network block
1783 * @ssid: ssid
1784 * @rssi_threshold: threshold for considering this SSID as found, required
1785 * granularity for this threshold is 4dBm to 8dBm
1786 * @flags: WIFI_PNO_FLAG_XXX
1787 * @auth_bit_field: auth bit field for matching WPA IE
1788 */
1789struct wifi_epno_network_params {
1790 struct mac_ssid ssid;
1791 int8_t rssi_threshold;
1792 uint8_t flags;
1793 uint8_t auth_bit_field;
1794};
1795
1796/**
1797 * struct wifi_enhanched_pno_params - enhanced pno network params
1798 * @num_networks: number of ssids
1799 * @networks: PNO networks
1800 */
1801struct wifi_enhanched_pno_params {
1802 uint32_t request_id;
1803 uint32_t session_id;
1804 uint32_t num_networks;
1805 struct wifi_epno_network_params networks[];
1806};
1807
1808enum {
1809 WMI_AP_RX_DATA_OFFLOAD = 0x00,
1810 WMI_STA_RX_DATA_OFFLOAD = 0x01,
1811};
1812
1813/**
Govind Singhc7cd2d62016-06-21 14:33:26 +05301814 * enum extscan_configuration_flags - extscan config flags
1815 * @WMI_EXTSCAN_LP_EXTENDED_BATCHING: extended batching
1816 */
1817enum wmi_extscan_configuration_flags {
1818 WMI_EXTSCAN_LP_EXTENDED_BATCHING = 0x00000001,
1819};
1820
1821/**
Govind Singhae855362016-03-07 14:24:22 +05301822 * enum extscan_report_events_type - extscan report events type
1823 * @EXTSCAN_REPORT_EVENTS_BUFFER_FULL: report only when scan history is % full
1824 * @EXTSCAN_REPORT_EVENTS_EACH_SCAN: report a scan completion event after scan
1825 * @EXTSCAN_REPORT_EVENTS_FULL_RESULTS: forward scan results
1826 * (beacons/probe responses + IEs)
1827 * in real time to HAL, in addition to completion events.
1828 * Note: To keep backward compatibility,
1829 * fire completion events regardless of REPORT_EVENTS_EACH_SCAN.
1830 * @EXTSCAN_REPORT_EVENTS_NO_BATCH: controls batching,
1831 * 0 => batching, 1 => no batching
1832 */
1833enum wmi_extscan_report_events_type {
1834 WMI_EXTSCAN_REPORT_EVENTS_BUFFER_FULL = 0x00,
1835 WMI_EXTSCAN_REPORT_EVENTS_EACH_SCAN = 0x01,
1836 WMI_EXTSCAN_REPORT_EVENTS_FULL_RESULTS = 0x02,
1837 WMI_EXTSCAN_REPORT_EVENTS_NO_BATCH = 0x04,
1838};
1839
1840/**
1841 * struct ipa_offload_control_params - ipa offload parameters
1842 * @offload_type: ipa offload type
1843 * @vdev_id: vdev id
1844 * @enable: ipa offload enable/disable
1845 */
1846struct ipa_offload_control_params {
1847 uint32_t offload_type;
1848 uint32_t vdev_id;
1849 uint32_t enable;
1850};
1851
1852/**
1853 * struct extscan_capabilities_params - ext scan capablities
1854 * @request_id: request_id
1855 * @session_id: session_id
1856 */
1857struct extscan_capabilities_params {
1858 uint32_t request_id;
1859 uint8_t session_id;
1860};
1861
1862/**
1863 * struct extscan_capabilities_reset_params - ext scan capablities reset parameter
1864 * @request_id: request_id
1865 * @session_id: session_id
1866 */
1867struct extscan_capabilities_reset_params {
1868 uint32_t request_id;
1869 uint8_t session_id;
1870};
1871
1872/**
1873 * struct extscan_bssid_hotlist_reset_params - ext scan hotlist reset parameter
1874 * @request_id: request_id
1875 * @session_id: session_id
1876 */
1877struct extscan_bssid_hotlist_reset_params {
1878 uint32_t request_id;
1879 uint8_t session_id;
1880};
1881
1882/**
1883 * struct extscan_stop_req_params - ext scan stop parameter
1884 * @request_id: request_id
1885 * @session_id: session_id
1886 */
1887struct extscan_stop_req_params {
1888 uint32_t request_id;
1889 uint8_t session_id;
1890};
1891
1892/**
1893 * struct ap_threshold_params - ap threshold parameter
1894 * @bssid: mac address
1895 * @low: low threshold
1896 * @high: high threshold
1897 */
1898struct ap_threshold_params {
Govind Singhd7468a52016-03-09 14:32:57 +05301899 struct qdf_mac_addr bssid;
Govind Singhae855362016-03-07 14:24:22 +05301900 int32_t low;
1901 int32_t high;
1902};
1903
1904/**
1905 * struct extscan_set_sig_changereq_params - ext scan channel parameter
1906 * @request_id: mac address
1907 * @session_id: low threshold
1908 * @rssi_sample_size: Number of samples for averaging RSSI
1909 * @lostap_sample_size: Number of missed samples to confirm AP loss
1910 * @min_breaching: Number of APs breaching threshold required for firmware
1911 * @num_ap: no of scanned ap
1912 * @ap: ap threshold parameter
1913 */
1914struct extscan_set_sig_changereq_params {
1915 uint32_t request_id;
1916 uint8_t session_id;
1917 uint32_t rssi_sample_size;
1918 uint32_t lostap_sample_size;
1919 uint32_t min_breaching;
1920 uint32_t num_ap;
1921 struct ap_threshold_params ap[WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS];
1922};
1923
1924/**
1925 * struct extscan_cached_result_params - ext scan cached parameter
1926 * @request_id: mac address
1927 * @session_id: low threshold
1928 * @flush: cached results flush
1929 */
1930struct extscan_cached_result_params {
1931 uint32_t request_id;
1932 uint8_t session_id;
1933 bool flush;
1934};
1935
Govind Singhae855362016-03-07 14:24:22 +05301936/* Set PNO */
1937#define WMI_PNO_MAX_NETW_CHANNELS 26
1938#define WMI_PNO_MAX_NETW_CHANNELS_EX 60
1939#define WMI_PNO_MAX_SUPP_NETWORKS 16
1940
1941/*
1942 * size based of dot11 declaration without extra IEs as we will not carry those
1943 * for PNO
1944 */
1945#define WMI_PNO_MAX_PB_REQ_SIZE 450
1946
1947#define WMI_PNO_24G_DEFAULT_CH 1
1948#define WMI_PNO_5G_DEFAULT_CH 36
1949
1950/**
1951 * enum pno_mode - pno mode types
1952 * @WMI_PNO_MODE_IMMEDIATE: immidiate mode
1953 * @WMI_PNO_MODE_ON_SUSPEND: suspend on mode
1954 * @WMI_PNO_MODE_ON_RESUME: resume on mode
1955 * @WMI_PNO_MODE_MAX: max range
1956 */
1957enum pno_mode {
1958 WMI_PNO_MODE_IMMEDIATE,
1959 WMI_PNO_MODE_ON_SUSPEND,
1960 WMI_PNO_MODE_ON_RESUME,
1961 WMI_PNO_MODE_MAX
1962};
1963
1964/**
1965 * struct pno_nw_type - pno nw type
1966 * @ssid: mac ssid
1967 * @authentication: authentication type
1968 * @encryption: encryption type
1969 * @bcastNetwType: broadcast nw type
1970 * @ucChannelCount: uc channel count
1971 * @aChannels: pno channel
1972 * @rssiThreshold: rssi threshold
1973 */
1974struct pno_nw_type {
1975 struct mac_ssid ssid;
1976 uint32_t authentication;
1977 uint32_t encryption;
1978 uint32_t bcastNetwType;
1979 uint8_t ucChannelCount;
1980 uint8_t aChannels[WMI_PNO_MAX_NETW_CHANNELS_EX];
1981 int32_t rssiThreshold;
1982};
1983
1984/**
1985 * struct pno_scan_req_params - PNO Scan request structure
1986 * @enable: flag to enable or disable
1987 * @modePNO: PNO Mode
1988 * @ucNetworksCount: Number of networks
1989 * @aNetworks: Preferred network list
1990 * @sessionId: Session identifier
1991 * @fast_scan_period: Fast Scan period
1992 * @slow_scan_period: Slow scan period
1993 * @fast_scan_max_cycles: Fast scan max cycles
1994 * @us24GProbeTemplateLen: 2.4G probe template length
1995 * @p24GProbeTemplate: 2.4G probe template
1996 * @us5GProbeTemplateLen: 5G probe template length
1997 * @p5GProbeTemplate: 5G probe template
Gupta, Kapil7b768002016-04-25 19:14:19 +05301998 * @pno_channel_prediction: PNO channel prediction feature status
1999 * @top_k_num_of_channels: top K number of channels are used for tanimoto
2000 * distance calculation.
2001 * @stationary_thresh: threshold value to determine that the STA is stationary.
2002 * @pnoscan_adaptive_dwell_mode: adaptive dwelltime mode for pno scan
2003 * @channel_prediction_full_scan: periodic timer upon which a full scan needs
2004 * to be triggered.
Govind Singhae855362016-03-07 14:24:22 +05302005 */
2006struct pno_scan_req_params {
2007 uint8_t enable;
2008 enum pno_mode modePNO;
2009 uint8_t ucNetworksCount;
2010 struct pno_nw_type aNetworks[WMI_PNO_MAX_SUPP_NETWORKS];
2011 uint8_t sessionId;
2012 uint32_t fast_scan_period;
2013 uint32_t slow_scan_period;
2014 uint8_t fast_scan_max_cycles;
2015 uint32_t active_min_time;
2016 uint32_t active_max_time;
2017 uint32_t passive_min_time;
2018 uint32_t passive_max_time;
2019 uint16_t us24GProbeTemplateLen;
2020 uint8_t p24GProbeTemplate[WMI_PNO_MAX_PB_REQ_SIZE];
2021 uint16_t us5GProbeTemplateLen;
2022 uint8_t p5GProbeTemplate[WMI_PNO_MAX_PB_REQ_SIZE];
2023#ifdef FEATURE_WLAN_SCAN_PNO
2024 bool pno_channel_prediction;
2025 uint8_t top_k_num_of_channels;
2026 uint8_t stationary_thresh;
Gupta, Kapil7b768002016-04-25 19:14:19 +05302027 enum wmi_dwelltime_adaptive_mode pnoscan_adaptive_dwell_mode;
Govind Singhae855362016-03-07 14:24:22 +05302028 uint32_t channel_prediction_full_scan;
2029#endif
2030};
2031
Govind Singhae855362016-03-07 14:24:22 +05302032
2033#define WMI_WLAN_EXTSCAN_MAX_CHANNELS 36
2034#define WMI_WLAN_EXTSCAN_MAX_BUCKETS 16
2035#define WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS 128
2036#define WMI_WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64
2037#define WMI_EXTSCAN_MAX_HOTLIST_SSIDS 8
2038
2039/**
2040 * struct wifi_scan_channelspec_params - wifi scan channel parameter
2041 * @channel: Frequency in MHz
2042 * @dwellTimeMs: dwell time
2043 * @flush: cached results flush
2044 * @passive: passive scan
2045 * @chnlClass: channel class
2046 */
2047struct wifi_scan_channelspec_params {
2048 uint32_t channel;
2049 uint32_t dwellTimeMs;
2050 bool passive;
2051 uint8_t chnlClass;
2052};
2053
2054/**
2055 * enum wmi_wifi_band - wifi band
2056 * @WMI_WIFI_BAND_UNSPECIFIED: unspecified band
2057 * @WMI_WIFI_BAND_BG: 2.4 GHz
2058 * @WMI_WIFI_BAND_A: 5 GHz without DFS
2059 * @WMI_WIFI_BAND_ABG: 2.4 GHz + 5 GHz; no DFS
2060 * @WMI_WIFI_BAND_A_DFS_ONLY: 5 GHz DFS only
2061 * @WMI_WIFI_BAND_A_WITH_DFS: 5 GHz with DFS
2062 * @WMI_WIFI_BAND_ABG_WITH_DFS: 2.4 GHz + 5 GHz with DFS
2063 * @WMI_WIFI_BAND_MAX: max range
2064 */
2065enum wmi_wifi_band {
2066 WMI_WIFI_BAND_UNSPECIFIED,
2067 WMI_WIFI_BAND_BG = 1,
2068 WMI_WIFI_BAND_A = 2,
2069 WMI_WIFI_BAND_ABG = 3,
2070 WMI_WIFI_BAND_A_DFS_ONLY = 4,
2071 /* 5 is reserved */
2072 WMI_WIFI_BAND_A_WITH_DFS = 6,
2073 WMI_WIFI_BAND_ABG_WITH_DFS = 7,
2074 /* Keep it last */
2075 WMI_WIFI_BAND_MAX
2076};
2077
2078/**
2079 * struct wifi_scan_bucket_params - wifi scan bucket spec
2080 * @bucket: bucket identifier
2081 * @band: wifi band
2082 * @period: Desired period, in millisecond; if this is too
2083 * low, the firmware should choose to generate results as fast as
2084 * it can instead of failing the command byte
2085 * for exponential backoff bucket this is the min_period
2086 * @reportEvents: 0 => normal reporting (reporting rssi history
2087 * only, when rssi history buffer is % full)
2088 * 1 => same as 0 + report a scan completion event after scanning
2089 * this bucket
2090 * 2 => same as 1 + forward scan results
2091 * (beacons/probe responses + IEs) in real time to HAL
2092 * @max_period: if max_period is non zero or different than period,
2093 * then this bucket is an exponential backoff bucket and
2094 * the scan period will grow exponentially as per formula:
2095 * actual_period(N) = period ^ (N/(step_count+1)) to a
2096 * maximum period of max_period
2097 * @exponent: for exponential back off bucket: multiplier:
2098 * new_period = old_period * exponent
2099 * @step_count: for exponential back off bucket, number of scans performed
2100 * at a given period and until the exponent is applied
2101 * @numChannels: channels to scan; these may include DFS channels
2102 * Note that a given channel may appear in multiple buckets
2103 * @min_dwell_time_active: per bucket minimum active dwell time
2104 * @max_dwell_time_active: per bucket maximum active dwell time
2105 * @min_dwell_time_passive: per bucket minimum passive dwell time
2106 * @max_dwell_time_passive: per bucket maximum passive dwell time
2107 * @channels: Channel list
2108 */
2109struct wifi_scan_bucket_params {
2110 uint8_t bucket;
2111 enum wmi_wifi_band band;
2112 uint32_t period;
2113 uint32_t reportEvents;
2114 uint32_t max_period;
2115 uint32_t exponent;
2116 uint32_t step_count;
2117 uint32_t numChannels;
2118 uint32_t min_dwell_time_active;
2119 uint32_t max_dwell_time_active;
2120 uint32_t min_dwell_time_passive;
2121 uint32_t max_dwell_time_passive;
2122 struct wifi_scan_channelspec_params channels[WMI_WLAN_EXTSCAN_MAX_CHANNELS];
2123};
2124
2125/**
2126 * struct wifi_scan_cmd_req_params - wifi scan command request params
2127 * @basePeriod: base timer period
2128 * @maxAPperScan: max ap per scan
2129 * @report_threshold_percent: report threshold
2130 * in %, when buffer is this much full, wake up host
2131 * @report_threshold_num_scans: report threshold number of scans
2132 * in number of scans, wake up host after these many scans
2133 * @requestId: request id
2134 * @sessionId: session id
2135 * @numBuckets: number of buckets
2136 * @min_dwell_time_active: per bucket minimum active dwell time
2137 * @max_dwell_time_active: per bucket maximum active dwell time
2138 * @min_dwell_time_passive: per bucket minimum passive dwell time
2139 * @max_dwell_time_passive: per bucket maximum passive dwell time
2140 * @configuration_flags: configuration flags
Gupta, Kapil7b768002016-04-25 19:14:19 +05302141 * @extscan_adaptive_dwell_mode: adaptive dwelltime mode for extscan
Govind Singhae855362016-03-07 14:24:22 +05302142 * @buckets: buckets array
2143 */
2144struct wifi_scan_cmd_req_params {
2145 uint32_t basePeriod;
2146 uint32_t maxAPperScan;
2147
2148 uint32_t report_threshold_percent;
2149 uint32_t report_threshold_num_scans;
2150
2151 uint32_t requestId;
2152 uint8_t sessionId;
2153 uint32_t numBuckets;
2154
2155 uint32_t min_dwell_time_active;
2156 uint32_t max_dwell_time_active;
2157 uint32_t min_dwell_time_passive;
2158 uint32_t max_dwell_time_passive;
2159 uint32_t configuration_flags;
Gupta, Kapil7b768002016-04-25 19:14:19 +05302160 enum wmi_dwelltime_adaptive_mode extscan_adaptive_dwell_mode;
Govind Singhae855362016-03-07 14:24:22 +05302161 struct wifi_scan_bucket_params buckets[WMI_WLAN_EXTSCAN_MAX_BUCKETS];
2162};
2163
Govind Singhae855362016-03-07 14:24:22 +05302164#define WMI_CFG_VALID_CHANNEL_LIST_LEN 100
Govind Singhc7cd2d62016-06-21 14:33:26 +05302165/* Occupied channel list remains static */
2166#define WMI_CHANNEL_LIST_STATIC 1
2167/* Occupied channel list can be learnt after init */
2168#define WMI_CHANNEL_LIST_DYNAMIC_INIT 2
2169/* Occupied channel list can be learnt after flush */
2170#define WMI_CHANNEL_LIST_DYNAMIC_FLUSH 3
2171/* Occupied channel list can be learnt after update */
2172#define WMI_CHANNEL_LIST_DYNAMIC_UPDATE 4
Govind Singhae855362016-03-07 14:24:22 +05302173
2174/**
2175 * struct plm_req_params - plm req parameter
2176 * @diag_token: Dialog token
2177 * @meas_token: measurement token
2178 * @num_bursts: total number of bursts
2179 * @burst_int: burst interval in seconds
2180 * @meas_duration:in TU's,STA goes off-ch
2181 * @burst_len: no of times the STA should cycle through PLM ch list
2182 * @desired_tx_pwr: desired tx power
2183 * @mac_addr: MC dest addr
2184 * @plm_num_ch: channel numbers
2185 * @plm_ch_list: channel list
2186 * @session_id: session id
2187 * @enable: enable/disable
2188 */
2189struct plm_req_params {
2190 uint16_t diag_token;
2191 uint16_t meas_token;
2192 uint16_t num_bursts;
2193 uint16_t burst_int;
2194 uint16_t meas_duration;
2195 /* no of times the STA should cycle through PLM ch list */
2196 uint8_t burst_len;
2197 int8_t desired_tx_pwr;
Govind Singhd7468a52016-03-09 14:32:57 +05302198 struct qdf_mac_addr mac_addr;
Govind Singhae855362016-03-07 14:24:22 +05302199 /* no of channels */
2200 uint8_t plm_num_ch;
2201 /* channel numbers */
2202 uint8_t plm_ch_list[WMI_CFG_VALID_CHANNEL_LIST_LEN];
2203 uint8_t session_id;
2204 bool enable;
2205};
Naveen Rawatd5ffe152016-04-14 23:42:46 -07002206
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05302207#define MAX_SSID_ALLOWED_LIST 4
2208#define MAX_BSSID_AVOID_LIST 16
2209#define MAX_BSSID_FAVORED 16
Govind Singhae855362016-03-07 14:24:22 +05302210
2211
2212/**
2213 * struct mac_ts_info_tfc - mac ts info parameters
2214 * @burstSizeDefn: burst size
2215 * @reserved: reserved
2216 * @ackPolicy: ack policy
2217 * @psb: psb
2218 * @aggregation: aggregation
2219 * @accessPolicy: access policy
2220 * @direction: direction
2221 * @tsid: direction
2222 * @trafficType: traffic type
2223 */
2224struct mac_ts_info_tfc {
2225#ifndef ANI_LITTLE_BIT_ENDIAN
2226 uint8_t burstSizeDefn:1;
2227 uint8_t reserved:7;
2228#else
2229 uint8_t reserved:7;
2230 uint8_t burstSizeDefn:1;
2231#endif
2232
2233#ifndef ANI_LITTLE_BIT_ENDIAN
2234 uint16_t ackPolicy:2;
2235 uint16_t userPrio:3;
2236 uint16_t psb:1;
2237 uint16_t aggregation:1;
2238 uint16_t accessPolicy:2;
2239 uint16_t direction:2;
2240 uint16_t tsid:4;
2241 uint16_t trafficType:1;
2242#else
2243 uint16_t trafficType:1;
2244 uint16_t tsid:4;
2245 uint16_t direction:2;
2246 uint16_t accessPolicy:2;
2247 uint16_t aggregation:1;
2248 uint16_t psb:1;
2249 uint16_t userPrio:3;
2250 uint16_t ackPolicy:2;
2251#endif
Govind Singhd7468a52016-03-09 14:32:57 +05302252} qdf_packed;
Govind Singhae855362016-03-07 14:24:22 +05302253
2254/**
2255 * struct mac_ts_info_sch - mac ts info schedule parameters
2256 * @rsvd: reserved
2257 * @schedule: schedule bit
2258 */
2259struct mac_ts_info_sch {
2260#ifndef ANI_LITTLE_BIT_ENDIAN
2261 uint8_t rsvd:7;
2262 uint8_t schedule:1;
2263#else
2264 uint8_t schedule:1;
2265 uint8_t rsvd:7;
2266#endif
Govind Singhd7468a52016-03-09 14:32:57 +05302267} qdf_packed;
Govind Singhae855362016-03-07 14:24:22 +05302268
2269/**
2270 * struct mac_ts_info_sch - mac ts info schedule parameters
2271 * @traffic: mac tfc parameter
2272 * @schedule: mac schedule parameters
2273 */
2274struct mac_ts_info {
2275 struct mac_ts_info_tfc traffic;
2276 struct mac_ts_info_sch schedule;
Govind Singhd7468a52016-03-09 14:32:57 +05302277} qdf_packed;
Govind Singhae855362016-03-07 14:24:22 +05302278
2279/**
2280 * struct mac_tspec_ie - mac ts spec
2281 * @type: type
2282 * @length: length
2283 * @tsinfo: tsinfo
2284 * @nomMsduSz: nomMsduSz
2285 * @maxMsduSz: maxMsduSz
2286 * @minSvcInterval: minSvcInterval
2287 * @maxSvcInterval: maxSvcInterval
2288 * @inactInterval: inactInterval
2289 * @suspendInterval: suspendInterval
2290 * @svcStartTime: svcStartTime
2291 * @minDataRate: minDataRate
2292 * @meanDataRate: meanDataRate
2293 * @peakDataRate: peakDataRate
2294 * @maxBurstSz: maxBurstSz
2295 * @delayBound: delayBound
2296 * @minPhyRate: minPhyRate
2297 * @surplusBw: surplusBw
2298 * @mediumTime: mediumTime
2299 */
2300struct mac_tspec_ie {
2301 uint8_t type;
2302 uint8_t length;
2303 struct mac_ts_info tsinfo;
2304 uint16_t nomMsduSz;
2305 uint16_t maxMsduSz;
2306 uint32_t minSvcInterval;
2307 uint32_t maxSvcInterval;
2308 uint32_t inactInterval;
2309 uint32_t suspendInterval;
2310 uint32_t svcStartTime;
2311 uint32_t minDataRate;
2312 uint32_t meanDataRate;
2313 uint32_t peakDataRate;
2314 uint32_t maxBurstSz;
2315 uint32_t delayBound;
2316 uint32_t minPhyRate;
2317 uint16_t surplusBw;
2318 uint16_t mediumTime;
Govind Singhd7468a52016-03-09 14:32:57 +05302319} qdf_packed;
Govind Singhae855362016-03-07 14:24:22 +05302320
2321/**
2322 * struct add_ts_param - ADDTS related parameters
2323 * @staIdx: station index
2324 * @tspecIdx: TSPEC handler uniquely identifying a TSPEC for a STA in a BSS
2325 * @tspec: tspec value
2326 * @status: CDF status
2327 * @sessionId: session id
Govind Singhd7468a52016-03-09 14:32:57 +05302328 * @tsm_interval: TSM interval period passed from UMAC to WMI
Govind Singhae855362016-03-07 14:24:22 +05302329 * @setRICparams: RIC parameters
2330 * @sme_session_id: sme session id
2331 */
2332struct add_ts_param {
2333 uint16_t staIdx;
2334 uint16_t tspecIdx;
2335 struct mac_tspec_ie tspec;
Govind Singhd7468a52016-03-09 14:32:57 +05302336 QDF_STATUS status;
Govind Singhae855362016-03-07 14:24:22 +05302337 uint8_t sessionId;
2338#ifdef FEATURE_WLAN_ESE
2339 uint16_t tsm_interval;
2340#endif /* FEATURE_WLAN_ESE */
2341#ifdef WLAN_FEATURE_ROAM_OFFLOAD
2342 uint8_t setRICparams;
2343#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
2344 uint8_t sme_session_id;
2345};
2346
2347/**
2348 * struct delts_req_info - DELTS request parameter
2349 * @tsinfo: ts info
2350 * @tspec: ts spec
2351 * @wmeTspecPresent: wme ts spec flag
2352 * @wsmTspecPresent: wsm ts spec flag
2353 * @lleTspecPresent: lle ts spec flag
2354 */
2355struct delts_req_info {
2356 struct mac_ts_info tsinfo;
2357 struct mac_tspec_ie tspec;
2358 uint8_t wmeTspecPresent:1;
2359 uint8_t wsmTspecPresent:1;
2360 uint8_t lleTspecPresent:1;
2361};
2362
2363/**
2364 * struct del_ts_params - DELTS related parameters
2365 * @staIdx: station index
2366 * @tspecIdx: TSPEC identifier uniquely identifying a TSPEC for a STA in a BSS
2367 * @bssId: BSSID
2368 * @sessionId: session id
2369 * @userPrio: user priority
2370 * @delTsInfo: DELTS info
2371 * @setRICparams: RIC parameters
2372 */
2373struct del_ts_params {
2374 uint16_t staIdx;
2375 uint16_t tspecIdx;
Govind Singh8675b862016-03-28 22:09:18 +05302376 uint8_t bssId[IEEE80211_ADDR_LEN];
Govind Singhae855362016-03-07 14:24:22 +05302377 uint8_t sessionId;
2378 uint8_t userPrio;
2379#ifdef WLAN_FEATURE_ROAM_OFFLOAD
2380 struct delts_req_info delTsInfo;
2381 uint8_t setRICparams;
2382#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
2383};
2384
2385/**
2386 * struct ll_stats_clear_params - ll stats clear parameter
2387 * @req_id: request id
2388 * @sta_id: sta id
2389 * @stats_clear_mask: stats clear mask
2390 * @stop_req: stop request
2391 */
2392struct ll_stats_clear_params {
2393 uint32_t req_id;
2394 uint8_t sta_id;
2395 uint32_t stats_clear_mask;
2396 uint8_t stop_req;
2397};
2398
2399/**
2400 * struct ll_stats_set_params - ll stats get parameter
2401 * @req_id: request id
2402 * @sta_id: sta id
2403 * @mpdu_size_threshold: mpdu sixe threshold
2404 * @aggressive_statistics_gathering: aggressive_statistics_gathering
2405 */
2406struct ll_stats_set_params {
2407 uint32_t req_id;
2408 uint8_t sta_id;
2409 uint32_t mpdu_size_threshold;
2410 uint32_t aggressive_statistics_gathering;
2411};
2412
2413/**
2414 * struct ll_stats_get_params - ll stats parameter
2415 * @req_id: request id
2416 * @sta_id: sta id
2417 * @param_id_mask: param is mask
2418 */
2419struct ll_stats_get_params {
2420 uint32_t req_id;
2421 uint8_t sta_id;
2422 uint32_t param_id_mask;
2423};
2424
2425/**
2426 * struct pe_stats_req - pe stats parameter
2427 * @msg_type: message type is same as the request type
2428 * @msg_len: length of the entire request
2429 * @sta_id: Per STA stats request must contain valid
2430 * @stats_mask: categories of stats requested
2431 * @session_id: wsm ts spec flag
2432 */
2433struct pe_stats_req {
2434 /* Common for all types are requests */
2435 uint16_t msg_type;
2436 uint16_t msg_len;
2437 uint32_t sta_id;
2438 /* categories of stats requested. look at ePEStatsMask */
2439 uint32_t stats_mask;
2440 uint8_t session_id;
2441};
2442
2443/**
2444 * struct link_status_params - link stats parameter
2445 * @msg_type: message type is same as the request type
2446 * @msg_len: length of the entire request
2447 * @link_status: wme ts spec flag
2448 * @session_id: wsm ts spec flag
2449 */
2450struct link_status_params {
2451 uint16_t msg_type;
2452 uint16_t msg_len;
2453 uint8_t link_status;
2454 uint8_t session_id;
2455};
2456
2457/**
2458 * struct dhcp_stop_ind_params - DHCP Stop indication message
2459 * @msgtype: message type is same as the request type
2460 * @msglen: length of the entire request
2461 * @device_mode: Mode of the device(ex:STA, AP)
2462 * @adapter_macaddr: MAC address of the adapter
2463 * @peer_macaddr: MAC address of the connected peer
2464 */
2465struct dhcp_stop_ind_params {
2466 uint16_t msgtype;
2467 uint16_t msglen;
2468 uint8_t device_mode;
Govind Singhd7468a52016-03-09 14:32:57 +05302469 struct qdf_mac_addr adapter_macaddr;
2470 struct qdf_mac_addr peer_macaddr;
Govind Singhae855362016-03-07 14:24:22 +05302471};
2472
2473/**
2474 * struct aggr_add_ts_param - ADDTS parameters
2475 * @staIdx: station index
2476 * @tspecIdx: TSPEC handler uniquely identifying a TSPEC for a STA in a BSS
2477 * @tspec: tspec value
2478 * @status: CDF status
2479 * @sessionId: session id
2480 */
2481struct aggr_add_ts_param {
2482 uint16_t staIdx;
2483 uint16_t tspecIdx;
2484 struct mac_tspec_ie tspec[WMI_QOS_NUM_AC_MAX];
Govind Singhd7468a52016-03-09 14:32:57 +05302485 QDF_STATUS status[WMI_QOS_NUM_AC_MAX];
Govind Singhae855362016-03-07 14:24:22 +05302486 uint8_t sessionId;
2487};
2488
2489#define WMI_MAX_FILTER_TEST_DATA_LEN 8
2490#define WMI_MAX_NUM_MULTICAST_ADDRESS 240
2491#define WMI_MAX_NUM_FILTERS 20
2492#define WMI_MAX_NUM_TESTS_PER_FILTER 10
2493
2494/**
2495 * enum packet_filter_type - packet filter type
2496 * @WMI_RCV_FILTER_TYPE_INVALID: invalid type
2497 * @WMI_RCV_FILTER_TYPE_FILTER_PKT: filter packet type
2498 * @WMI_RCV_FILTER_TYPE_BUFFER_PKT: buffer packet type
2499 * @WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE: max enum size
2500 */
2501enum packet_filter_type {
2502 WMI_RCV_FILTER_TYPE_INVALID,
2503 WMI_RCV_FILTER_TYPE_FILTER_PKT,
2504 WMI_RCV_FILTER_TYPE_BUFFER_PKT,
2505 WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE
2506};
2507
2508/**
2509 * enum packet_protocol_type - packet protocol type
2510 * @WMI_FILTER_HDR_TYPE_INVALID: invalid type
2511 * @WMI_FILTER_HDR_TYPE_MAC: mac type
2512 * @WMI_FILTER_HDR_TYPE_ARP: trp type
2513 * @WMI_FILTER_HDR_TYPE_IPV4: ipv4 type
2514 * @WMI_FILTER_HDR_TYPE_IPV6: ipv6 type
2515 * @WMI_FILTER_HDR_TYPE_UDP: udp type
2516 * @WMI_FILTER_HDR_TYPE_MAX: max type
2517 */
2518enum packet_protocol_type {
2519 WMI_FILTER_HDR_TYPE_INVALID,
2520 WMI_FILTER_HDR_TYPE_MAC,
2521 WMI_FILTER_HDR_TYPE_ARP,
2522 WMI_FILTER_HDR_TYPE_IPV4,
2523 WMI_FILTER_HDR_TYPE_IPV6,
2524 WMI_FILTER_HDR_TYPE_UDP,
2525 WMI_FILTER_HDR_TYPE_MAX
2526};
2527
2528/**
2529 * enum packet_filter_comp_type - packet filter comparison type
2530 * @WMI_FILTER_CMP_TYPE_INVALID: invalid type
2531 * @WMI_FILTER_CMP_TYPE_EQUAL: type equal
2532 * @WMI_FILTER_CMP_TYPE_MASK_EQUAL: mask equal
2533 * @WMI_FILTER_CMP_TYPE_NOT_EQUAL: type not equal
2534 * @WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL: mask not equal
2535 * @WMI_FILTER_CMP_TYPE_MAX: max type
2536 */
2537enum packet_filter_comp_type {
2538 WMI_FILTER_CMP_TYPE_INVALID,
2539 WMI_FILTER_CMP_TYPE_EQUAL,
2540 WMI_FILTER_CMP_TYPE_MASK_EQUAL,
2541 WMI_FILTER_CMP_TYPE_NOT_EQUAL,
2542 WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
2543 WMI_FILTER_CMP_TYPE_MAX
2544};
2545
2546/**
2547 * struct rcv_pkt_filter_params - recieve packet filter parameters
2548 * @protocolLayer - protocol layer
2549 * @cmpFlag - comparison flag
2550 * @dataLength - data length
2551 * @dataOffset - data offset
2552 * @reserved - resserved
2553 * @compareData - compare data
2554 * @dataMask - data mask
2555 */
2556struct rcv_pkt_filter_params {
2557 enum packet_protocol_type protocolLayer;
2558 enum packet_filter_comp_type cmpFlag;
2559 uint16_t dataLength;
2560 uint8_t dataOffset;
2561 uint8_t reserved;
2562 uint8_t compareData[WMI_MAX_FILTER_TEST_DATA_LEN];
2563 uint8_t dataMask[WMI_MAX_FILTER_TEST_DATA_LEN];
2564};
2565
2566/**
2567 * struct rcv_pkt_filter_config - recieve packet filter info
2568 * @filterId - filter id
2569 * @filterType - filter type
2570 * @numFieldParams - no of fields
2571 * @coalesceTime - reserved parameter
2572 * @self_macaddr - self mac address
2573 * @bssid - Bssid of the connected AP
2574 * @paramsData - data parameter
2575 */
2576struct rcv_pkt_filter_config {
2577 uint8_t filterId;
2578 enum packet_filter_type filterType;
2579 uint32_t numFieldParams;
2580 uint32_t coalesceTime;
Govind Singhd7468a52016-03-09 14:32:57 +05302581 struct qdf_mac_addr self_macaddr;
2582 struct qdf_mac_addr bssid;
Govind Singhae855362016-03-07 14:24:22 +05302583 struct rcv_pkt_filter_params paramsData[WMI_MAX_NUM_TESTS_PER_FILTER];
2584};
2585
2586/**
2587 * struct vdev_ie_info_param - IE info
2588 * @vdev_id - vdev for which the IE is being sent
2589 * @ie_id - ID of the IE
2590 * @length - length of the IE data
2591 * @data - IE data
2592 *
2593 * This structure is used to store the IE information.
2594 */
2595struct vdev_ie_info_param {
2596 uint32_t vdev_id;
2597 uint32_t ie_id;
2598 uint32_t length;
Selvaraj, Sridharce064292016-07-25 16:25:14 +05302599 uint32_t ie_source;
Naveen Rawat71268882016-08-03 16:41:33 -07002600 uint32_t band;
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,
Kiran Venkatappa9da7e042016-08-09 22:52:35 +05305772 WMI_HOST_PEER_CRIT_PROTO_HINT_ENABLED = 0xd,
5773 WMI_HOST_PEER_TX_FAIL_CNT_THR = 0xe,
5774 WMI_HOST_PEER_SET_HW_RETRY_CTS2S = 0xf,
5775 WMI_HOST_PEER_IBSS_ATIM_WINDOW_LENGTH = 0x10,
5776 WMI_HOST_PEER_PHYMODE = 0x11,
5777 WMI_HOST_PEER_SET_MAC_TX_RATE = 0x12,
5778 /* Set default Rx routing */
5779 WMI_HOST_PEER_SET_DEFAULT_ROUTING = 0x13,
5780 WMI_HOST_PEER_SET_MIN_TX_RATE = 0x14,
Govind Singh89727882016-04-15 13:58:27 +05305781} PEER_PARAM_ENUM;
5782#define WMI_HOST_PEER_MIMO_PS_NONE 0x0
5783#define WMI_HOST_PEER_MIMO_PS_STATIC 0x1
5784#define WMI_HOST_PEER_MIMO_PS_DYNAMIC 0x2
5785typedef enum {
5786 HOST_PLATFORM_HIGH_PERF,
5787 HOST_PLATFORM_LOW_PERF,
5788} HOST_PLATFORM_TYPE;
5789
5790enum wmi_host_sta_ps_mode {
5791 /** enable power save for the given STA VDEV */
5792 WMI_HOST_STA_PS_MODE_DISABLED = 0,
5793 /** disable power save for a given STA VDEV */
5794 WMI_HOST_STA_PS_MODE_ENABLED = 1,
5795};
5796enum wmi_host_sta_powersave_param {
5797 /**
5798 * Controls how frames are retrievd from AP while STA is sleeping
5799 *
5800 * (see enum wmi_sta_ps_param_rx_wake_policy)
5801 */
5802 WMI_HOST_STA_PS_PARAM_RX_WAKE_POLICY = 0,
5803
5804 /**
5805 * The STA will go active after this many TX
5806 *
5807 * (see enum wmi_sta_ps_param_tx_wake_threshold)
5808 */
5809 WMI_HOST_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
5810
5811 /**
5812 * Number of PS-Poll to send before STA wakes up
5813 *
5814 * (see enum wmi_sta_ps_param_pspoll_count)
5815 *
5816 */
5817 WMI_HOST_STA_PS_PARAM_PSPOLL_COUNT = 2,
5818
5819 /**
5820 * TX/RX inactivity time in msec before going to sleep.
5821 *
5822 * The power save SM will monitor tx/rx activity on the VDEV, if no
5823 * activity for the specified msec of the parameter
5824 * the Power save SM will go to sleep.
5825 */
5826 WMI_HOST_STA_PS_PARAM_INACTIVITY_TIME = 3,
5827
5828 /**
5829 * Set uapsd configuration.
5830 *
5831 * (see enum wmi_sta_ps_param_uapsd)
5832 */
5833 WMI_HOST_STA_PS_PARAM_UAPSD = 4,
5834};
5835/* prefix used by scan requestor ids on the host
5836 * replicated here form wmi_unified.h*/
5837#define WMI_HOST_P_SCAN_REQUESTOR_ID_PREFIX 0xA000
5838/* prefix used by scan request ids generated on the host */
5839/* host cycles through the lower 12 bits to generate ids */
5840#define WMI_HOST_P_SCAN_REQ_ID_PREFIX 0xA000
5841
5842#define WMI_HOST_RC_DS_FLAG 0x01 /* Dual stream flag */
5843#define WMI_HOST_RC_CW40_FLAG 0x02 /* CW 40 */
5844#define WMI_HOST_RC_SGI_FLAG 0x04 /* Short Guard Interval */
5845#define WMI_HOST_RC_HT_FLAG 0x08 /* HT */
5846#define WMI_HOST_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
5847#define WMI_HOST_RC_TX_STBC_FLAG 0x20 /* TX STBC */
5848#define WMI_HOST_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
5849#define WMI_HOST_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
5850#define WMI_HOST_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
5851#define WMI_HOST_RC_TS_FLAG 0x200 /* Three stream flag */
5852#define WMI_HOST_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
5853
5854/** HT Capabilities*/
5855#define WMI_HOST_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
5856/* Short Guard Interval with HT20 */
5857#define WMI_HOST_HT_CAP_HT20_SGI 0x0002
5858#define WMI_HOST_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
5859#define WMI_HOST_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
5860#define WMI_HOST_HT_CAP_TX_STBC_MASK_SHIFT 3
5861#define WMI_HOST_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
5862#define WMI_HOST_HT_CAP_RX_STBC_MASK_SHIFT 4
5863#define WMI_HOST_HT_CAP_LDPC 0x0040 /* LDPC supported */
5864#define WMI_HOST_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
5865#define WMI_HOST_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
5866#define WMI_HOST_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
5867#define WMI_HOST_HT_CAP_HT40_SGI 0x0800
5868#define WMI_HOST_HT_CAP_IBF_BFER 0x1000
5869
5870/* These macros should be used when we wish to advertise STBC support for
5871 * only 1SS or 2SS or 3SS. */
5872#define WMI_HOST_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
5873#define WMI_HOST_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
5874#define WMI_HOST_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
5875
5876
5877#define WMI_HOST_HT_CAP_DEFAULT_ALL (WMI_HOST_HT_CAP_ENABLED | \
5878 WMI_HOST_HT_CAP_HT20_SGI | \
5879 WMI_HOST_HT_CAP_HT40_SGI | \
5880 WMI_HOST_HT_CAP_TX_STBC | \
5881 WMI_HOST_HT_CAP_RX_STBC | \
5882 WMI_HOST_HT_CAP_LDPC)
5883
5884/* WMI_HOST_VHT_CAP_* these maps to ieee 802.11ac vht capability information
5885 field. The fields not defined here are not supported, or reserved.
5886 Do not change these masks and if you have to add new one follow the
5887 bitmask as specified by 802.11ac draft.
5888*/
5889
5890#define WMI_HOST_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
5891#define WMI_HOST_VHT_CAP_RX_LDPC 0x00000010
5892#define WMI_HOST_VHT_CAP_SGI_80MHZ 0x00000020
5893#define WMI_HOST_VHT_CAP_SGI_160MHZ 0x00000040
5894#define WMI_HOST_VHT_CAP_TX_STBC 0x00000080
5895#define WMI_HOST_VHT_CAP_RX_STBC_MASK 0x00000300
5896#define WMI_HOST_VHT_CAP_RX_STBC_MASK_SHIFT 8
5897#define WMI_HOST_VHT_CAP_SU_BFER 0x00000800
5898#define WMI_HOST_VHT_CAP_SU_BFEE 0x00001000
5899#define WMI_HOST_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
5900#define WMI_HOST_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
5901#define WMI_HOST_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
5902#define WMI_HOST_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
5903#define WMI_HOST_VHT_CAP_MU_BFER 0x00080000
5904#define WMI_HOST_VHT_CAP_MU_BFEE 0x00100000
5905#define WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
5906#define WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT 23
5907#define WMI_HOST_VHT_CAP_RX_FIXED_ANT 0x10000000
5908#define WMI_HOST_VHT_CAP_TX_FIXED_ANT 0x20000000
5909
5910#define WMI_HOST_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
5911
5912/* These macros should be used when we wish to advertise STBC support for
5913 * only 1SS or 2SS or 3SS. */
5914#define WMI_HOST_VHT_CAP_RX_STBC_1SS 0x00000100
5915#define WMI_HOST_VHT_CAP_RX_STBC_2SS 0x00000200
5916#define WMI_HOST_VHT_CAP_RX_STBC_3SS 0x00000300
5917
5918#define WMI_HOST_VHT_CAP_DEFAULT_ALL (WMI_HOST_VHT_CAP_MAX_MPDU_LEN_11454 | \
5919 WMI_HOST_VHT_CAP_SGI_80MHZ | \
5920 WMI_HOST_VHT_CAP_TX_STBC | \
5921 WMI_HOST_VHT_CAP_RX_STBC_MASK | \
5922 WMI_HOST_VHT_CAP_RX_LDPC | \
5923 WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP | \
5924 WMI_HOST_VHT_CAP_RX_FIXED_ANT | \
5925 WMI_HOST_VHT_CAP_TX_FIXED_ANT)
5926
5927/* Interested readers refer to Rx/Tx MCS Map definition as defined in
5928 802.11ac
5929*/
5930#define WMI_HOST_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
5931#define WMI_HOST_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
5932#define WMI_HOST_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
5933
5934/** U-APSD configuration of peer station from (re)assoc request and TSPECs */
5935enum wmi_host_ap_ps_param_uapsd {
5936 WMI_HOST_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
5937 WMI_HOST_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
5938 WMI_HOST_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
5939 WMI_HOST_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
5940 WMI_HOST_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
5941 WMI_HOST_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
5942 WMI_HOST_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
5943 WMI_HOST_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
5944};
5945/** U-APSD maximum service period of peer station */
5946enum wmi_host_ap_ps_peer_param_max_sp {
5947 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
5948 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
5949 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
5950 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
5951
5952 /* keep last! */
5953 MAX_HOST_WMI_AP_PS_PEER_PARAM_MAX_SP,
5954};
5955
5956#define WMI_HOST_UAPSD_AC_TYPE_DELI 0
5957#define WMI_HOST_UAPSD_AC_TYPE_TRIG 1
5958
5959#define WMI_HOST_UAPSD_AC_BIT_MASK(ac, type) \
5960 ((type == WMI_HOST_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) :\
5961 (1<<((ac<<1)+1)))
5962
5963enum wmi_host_ap_ps_peer_param_wnm_sleep {
5964 WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP_ENABLE,
5965 WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP_DISABLE,
5966};
5967
5968enum wmi_host_ap_ps_peer_param {
5969 /** Set uapsd configuration for a given peer.
5970 *
5971 * This will include the delivery and trigger enabled state for every AC.
5972 * The host MLME needs to set this based on AP capability and stations
5973 * request Set in the association request received from the station.
5974 *
5975 * Lower 8 bits of the value specify the UAPSD configuration.
5976 *
5977 * (see enum wmi_ap_ps_param_uapsd)
5978 * The default value is 0.
5979 */
5980 WMI_HOST_AP_PS_PEER_PARAM_UAPSD = 0,
5981
5982 /**
5983 * Set the service period for a UAPSD capable station
5984 *
5985 * The service period from wme ie in the (re)assoc request frame.
5986 *
5987 * (see enum wmi_ap_ps_peer_param_max_sp)
5988 */
5989 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP = 1,
5990
5991 /** Time in seconds for aging out buffered frames
5992 * for STA in power save */
5993 WMI_HOST_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
5994
5995 /** Specify frame types that are considered SIFS
5996 * RESP trigger frame */
5997 WMI_HOST_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
5998
5999 /** Specifies the trigger state of TID.
6000 * Valid only for UAPSD frame type */
6001 WMI_HOST_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
6002
6003 /** Specifies the WNM sleep state of a STA */
6004 WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
6005};
6006#define WMI_HOST_RXERR_CRC 0x01 /* CRC error on frame */
6007#define WMI_HOST_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
6008#define WMI_HOST_RXERR_MIC 0x10 /* Michael MIC decrypt error */
6009#define WMI_HOST_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
6010
6011enum wmi_host_sta_ps_param_uapsd {
6012 WMI_HOST_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
6013 WMI_HOST_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
6014 WMI_HOST_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
6015 WMI_HOST_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
6016 WMI_HOST_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
6017 WMI_HOST_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
6018 WMI_HOST_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
6019 WMI_HOST_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
6020};
6021
6022enum wmi_host_sta_ps_param_rx_wake_policy {
6023 /* Wake up when ever there is an RX activity on the VDEV. In this mode
6024 * the Power save SM(state machine) will come out of sleep by either
6025 * sending null frame (or) a data frame (with PS==0) in response to TIM
6026 * bit set in the received beacon frame from AP.
6027 */
6028 WMI_HOST_STA_PS_RX_WAKE_POLICY_WAKE = 0,
6029
6030 /* Here the power save state machine will not wakeup in response to TIM
6031 * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
6032 * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
6033 * access categories are delivery-enabled, the station will send a UAPSD
6034 * trigger frame, otherwise it will send a PS-Poll.
6035 */
6036 WMI_HOST_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
6037};
6038enum wmi_host_sta_ps_param_pspoll_count {
6039 WMI_HOST_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
6040 /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
6041 * will send before waking up.
6042 */
6043};
6044/** Number of tx frames/beacon that cause the power save SM to wake up.
6045 *
6046 * Value 1 causes the SM to wake up for every TX. Value 0 has a special
6047 * meaning, It will cause the SM to never wake up. This is useful if you want
6048 * to keep the system to sleep all the time for some kind of test mode . host
6049 * can change this parameter any time. It will affect at the next tx frame.
6050 */
6051enum wmi_host_sta_ps_param_tx_wake_threshold {
6052 WMI_HOST_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
6053 WMI_HOST_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
6054
6055 /* Values greater than one indicate that many TX attempts per beacon
6056 * interval before the STA will wake up
6057 */
6058};
6059/*
6060 * Transmit power scale factor.
6061 *
6062 */
6063typedef enum {
6064 WMI_HOST_TP_SCALE_MAX = 0, /* no scaling (default) */
6065 WMI_HOST_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
6066 WMI_HOST_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
6067 WMI_HOST_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
6068 WMI_HOST_TP_SCALE_MIN = 4, /* min, but still on */
6069 WMI_HOST_TP_SCALE_SIZE = 5, /* max num of enum */
6070} WMI_HOST_TP_SCALE;
6071enum {
6072 WMI_HOST_RATEPWR_TABLE_OPS_SET,
6073 WMI_HOST_RATEPWR_TABLE_OPS_GET,
6074};
6075/* reserved up through 0xF */
6076/**
6077 * struct wmi_host_dcs_mib_stats - WLAN IM stats from target to host
6078 * Below statistics are sent from target to host periodically.
6079 * These are collected at target as long as target is running
6080 * and target chip is not in sleep.
6081 * @listen_time:
6082 * @reg_tx_frame_cnt:
6083 * @reg_rx_frame_cnt:
6084 * @reg_rxclr_cnt:
6085 * @reg_cycle_cnt: delta cycle count
6086 * @reg_rxclr_ext_cnt:
6087 * @reg_ofdm_phyerr_cnt:
6088 * @reg_cck_phyerr_cnt: CCK err count since last reset, read from register
6089 */
6090typedef struct _hp_dcs_mib_stats {
6091 int32_t listen_time;
6092 uint32_t reg_tx_frame_cnt;
6093 uint32_t reg_rx_frame_cnt;
6094 uint32_t reg_rxclr_cnt;
6095 uint32_t reg_cycle_cnt;
6096 uint32_t reg_rxclr_ext_cnt;
6097 uint32_t reg_ofdm_phyerr_cnt;
6098 uint32_t reg_cck_phyerr_cnt;
6099} wmi_host_dcs_mib_stats_t;
6100
6101/**
6102 * struct wmi_host_dcs_im_tgt_stats - DCS IM target stats
6103 * @reg_tsf32: current running TSF from the TSF-1
6104 * @last_ack_rssi: Known last frame rssi, in case of multiple stations, if
6105 * and at different ranges, this would not gaurantee that
6106 * this is the least rssi.
6107 * @tx_waste_time: Sum of all the failed durations in the last
6108 * one second interval.
6109 * @rx_time: count how many times the hal_rxerr_phy is marked, in this
6110 * time period
6111 * @phyerr_cnt:
6112 * @mib_stats: wmi_host_dcs_mib_stats_t - collected mib stats as explained
6113 * in mib structure
6114 */
6115typedef struct _wmi_host_dcs_im_tgt_stats {
6116 uint32_t reg_tsf32;
6117 uint32_t last_ack_rssi;
6118 uint32_t tx_waste_time;
6119 uint32_t rx_time;
6120 uint32_t phyerr_cnt;
6121 wmi_host_dcs_mib_stats_t mib_stats;
6122} wmi_host_dcs_im_tgt_stats_t;
6123
6124/**
6125 * Enum for pktlog req
6126 */
6127typedef enum {
6128 WMI_HOST_PKTLOG_EVENT_RX = 0x1,
6129 WMI_HOST_PKTLOG_EVENT_TX = 0x2,
6130 WMI_HOST_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
6131 WMI_HOST_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
6132 WMI_HOST_PKTLOG_EVENT_DBG_PRINT = 0x10, /* DEBUG prints */
6133 /* To support Smart Antenna */
6134 WMI_HOST_PKTLOG_EVENT_SMART_ANTENNA = 0x20,
6135 WMI_HOST_PKTLOG_EVENT_H_INFO = 0x40,
6136 WMI_HOST_PKTLOG_EVENT_STEERING = 0x80,
6137} WMI_HOST_PKTLOG_EVENT;
6138
6139/**
6140 * wmi_host_phyerr
6141 *
6142 */
6143#define WMI_HOST_PHY_ERROR_SPECTRAL_SCAN 0x26
6144#define WMI_HOST_PHY_ERROR_FALSE_RADAR_EXT 0x24
6145
6146#define WMI_HOST_AR900B_DFS_PHYERR_MASK 0x4
6147#define WMI_HOST_AR900B_SPECTRAL_PHYERR_MASK 0x4000000
6148
6149/**
6150 * struct wmi_host_perchain_rssi_info - per chain RSSI info
6151 * @rssi_pri20: RSSI on primary 20
6152 * @rssi_sec20: RSSI on secomdary 20
6153 * @rssi_sec40: RSSI secondary 40
6154 * @rssi_sec80: RSSI secondary 80
6155 */
6156typedef struct wmi_host_perchain_rssi_info {
6157 int8_t rssi_pri20;
6158 int8_t rssi_sec20;
6159 int8_t rssi_sec40;
6160 int8_t rssi_sec80;
6161} wmi_host_perchain_rssi_info_t;
6162
6163/**
6164 * struct _wmi_host_rf_info - RF measurement information
6165 * @rssi_comb: RSSI Information
6166 * @pc_rssi_info[4]: For now, we know we are getting information
6167 * for only 4 chains at max. For future extensions
6168 * use a define
6169 * @noise_floor: Noise floor information
6170 */
6171typedef struct _wmi_host_rf_info {
6172 int8_t rssi_comb;
6173 wmi_host_perchain_rssi_info_t pc_rssi_info[4];
6174 int16_t noise_floor[4];
6175} wmi_host_rf_info_t;
6176
6177/**
6178 * struct _wmi_host_chan_info
6179 * @center_freq1: center frequency 1 in MHz
6180 * @center_freq2: center frequency 2 in MHz -valid only for
6181 * 11ACVHT 80PLUS80 mode
6182 * @chan_width: channel width in MHz
6183 */
6184typedef struct _wmi_host_chan_info {
6185 u_int16_t center_freq1;
6186 u_int16_t center_freq2;
6187 u_int8_t chan_width;
6188} wmi_host_chan_info_t;
6189
6190/**
6191 * struct wmi_host_phyerr
6192 * @rf_info:
6193 * @chan_info:
6194 * @tsf64:
6195 * @phy_err_code:
6196 * @tsf_timestamp:
6197 * @bufp:
6198 * @buf_len:
6199 * @phy_err_mask0:
6200 * @phy_err_mask1:
6201 */
6202typedef struct _wmi_host_phyerr {
6203 wmi_host_rf_info_t rf_info;
6204 wmi_host_chan_info_t chan_info;
6205 uint64_t tsf64;
6206 int32_t phy_err_code;
6207 uint32_t tsf_timestamp;
6208 uint8_t *bufp;
6209 uint32_t buf_len;
6210 uint32_t phy_err_mask0;
6211 uint32_t phy_err_mask1;
6212} wmi_host_phyerr_t;
6213
6214/**
6215 * struct wmi_host_rtt_event_hdr
6216 * @req_id: request id
6217 * @status: status
6218 * @meas_done: measurement done flag
6219 * @meas_type: measurement type
6220 * @report_type: report type
6221 * @v3_status: v2 status
6222 * @v3_finish:
6223 * @v3_tm_start:
6224 * @num_ap: number of AP
6225 * @result: resuult
6226 * @dest_mac: destination mac
6227 */
6228typedef struct {
6229 uint16_t req_id;
6230 uint16_t status:1,
6231 meas_done:1,
6232 meas_type:3,
6233 report_type:3,
6234 v3_status:2,
6235 v3_finish:1,
6236 v3_tm_start:1,
6237 num_ap:4;
6238 uint16_t result;
6239 uint8_t dest_mac[IEEE80211_ADDR_LEN];
6240} wmi_host_rtt_event_hdr;
6241
6242/**
6243 * struct wmi_host_rtt_meas_event - RTT measurement event
6244 * @chain_mask:
6245 * @bw:
6246 * @rsvd:
6247 * @txrxchain_mask: Bit:0-3:chain mask
6248 * Bit 4-5: band width info
6249 * 00 --Legacy 20, 01 --HT/VHT20
6250 * 10 --HT/VHT40, 11 -- VHT80
6251 * @tod: resolution of 0.1ns
6252 * @toa: resolution of 0.1ns
6253 * @t3:
6254 * @t4:
6255 * @rssi0:
6256 * @rssi1:
6257 * @rssi2:
6258 * @rssi3:
6259 */
6260typedef struct {
6261 uint32_t chain_mask:3,
6262 bw:2,
6263 rsvd:27;
6264 uint32_t txrxchain_mask;
6265 uint64_t tod;
6266 uint64_t toa;
6267 uint64_t t3;
6268 uint64_t t4;
6269 uint32_t rssi0;
6270 uint32_t rssi1;
6271 uint32_t rssi2;
6272 uint32_t rssi3;
6273} wmi_host_rtt_meas_event;
6274
6275/*----RTT Report event definition ----*/
6276typedef enum {
6277 /* rtt cmd header parsing error --terminate */
6278 WMI_HOST_RTT_COMMAND_HEADER_ERROR = 0,
6279 /* rtt body parsing error -- skip current STA REQ */
6280 WMI_HOST_RTT_COMMAND_ERROR,
6281 /* rtt no resource -- terminate */
6282 WMI_HOST_RTT_MODULE_BUSY,
6283 /* STA exceed the support limit -- only server the first n STA */
6284 WMI_HOST_RTT_TOO_MANY_STA,
6285 /* any allocate failure */
6286 WMI_HOST_RTT_NO_RESOURCE,
6287 /* can not find vdev with vdev ID - skip current STA REQ */
6288 WMI_HOST_RTT_VDEV_ERROR,
6289 /* Tx failure -- continiue and measure number */
6290 WMI_HOST_RTT_TRANSIMISSION_ERROR,
6291 /* wait for first TM timer expire-terminate current STA measurement */
6292 WMI_HOST_RTT_TM_TIMER_EXPIRE,
6293 /* we do not support RTT measurement with this type of frame */
6294 WMI_HOST_RTT_FRAME_TYPE_NOSUPPORT,
6295 /* whole RTT measurement timer expire-terminate
6296 ** current STA measurement */
6297 WMI_HOST_RTT_TIMER_EXPIRE,
6298 /* channel swicth failed */
6299 WMI_HOST_RTT_CHAN_SWITCH_ERROR,
6300 /* TMR trans error, this dest peer will be skipped */
6301 WMI_HOST_RTT_TMR_TRANS_ERROR,
6302 /* V3 only. If both CFR and Token mismatch, do not report */
6303 WMI_HOST_RTT_NO_REPORT_BAD_CFR_TOKEN,
6304 /* For First TM, if CFR is bad, then do not report */
6305 WMI_HOST_RTT_NO_REPORT_FIRST_TM_BAD_CFR,
6306 /* do not allow report type2 mix with type 0, 1 */
6307 WMI_HOST_RTT_REPORT_TYPE2_MIX,
6308 /* LCI Configuration OK. - Responder only */
6309 WMI_HOST_RTT_LCI_CFG_OK,
6310 /* LCR configuration OK. - Responder only */
6311 WMI_HOST_RTT_LCR_CFG_OK,
6312 /* Bad configuration LCI (or) LCR request - Responder only */
6313 WMI_HOST_RTT_CFG_ERROR,
6314 WMI_HOST_WMI_RTT_REJECT_MAX,
6315} WMI_HOST_RTT_ERROR_INDICATOR;
6316typedef struct {
6317 wmi_host_rtt_event_hdr hdr;
6318 WMI_HOST_RTT_ERROR_INDICATOR reject_reason;
6319} wmi_host_rtt_error_report_event;
6320
6321#if defined(AR9888)
6322typedef enum {
6323 WMI_HOST_PROF_CPU_IDLE,
6324 WMI_HOST_PROF_PPDU_PROC,
6325 WMI_HOST_PROF_PPDU_POST,
6326 WMI_HOST_PROF_HTT_TX_INPUT,
6327 WMI_HOST_PROF_MSDU_ENQ,
6328 WMI_HOST_PROF_PPDU_POST_HAL,
6329 WMI_HOST_PROF_COMPUTE_TX_TIME,
6330
6331 /* Add new ID's above this. */
6332 WMI_HOST_PROF_MAX_ID,
6333} wmi_host_profile_id_t;
6334#endif
6335
6336#define WMI_HOST_WLAN_PROFILE_MAX_HIST 3
6337#define WMI_HOST_WLAN_PROFILE_MAX_BIN_CNT 32
6338
6339#if defined(AR9888)
6340#define WMI_HOST_MAX_PROFILE WMI_HOST_PROF_MAX_ID
6341#else
6342#define WMI_HOST_MAX_PROFILE WMI_HOST_WLAN_PROFILE_MAX_BIN_CNT
6343#endif
6344
6345/**
6346 * struct wmi_host_wlan_profile - Host profile param
6347 * @id: profile id
6348 * @cnt: Count
6349 * @tot:
6350 * @min: minimum
6351 * @max: Mac
6352 * @hist_intvl: history interval
6353 * @hist: profile data history
6354 */
6355typedef struct {
6356 uint32_t id;
6357 uint32_t cnt;
6358 uint32_t tot;
6359 uint32_t min;
6360 uint32_t max;
6361 uint32_t hist_intvl;
6362 uint32_t hist[WMI_HOST_WLAN_PROFILE_MAX_HIST];
6363} wmi_host_wlan_profile_t;
6364
6365/**
6366 * struct wmi_host_wlan_profile_ctx_t - profile context
6367 * @tot: time in us
6368 * @tx_msdu_cnt: MSDU TX count
6369 * @tx_mpdu_cnt: MPDU tx count
6370 * @tx_ppdu_cnt: PPDU tx count
6371 * @rx_msdu_cnt: MSDU RX count
6372 * @rx_mpdu_cnt: MPDU RXcount
6373 * @bin_count: Bin count
6374 */
6375typedef struct {
6376 uint32_t tot;
6377 uint32_t tx_msdu_cnt;
6378 uint32_t tx_mpdu_cnt;
6379 uint32_t tx_ppdu_cnt;
6380 uint32_t rx_msdu_cnt;
6381 uint32_t rx_mpdu_cnt;
6382 uint32_t bin_count;
6383} wmi_host_wlan_profile_ctx_t;
6384
6385/**
Govind Singh89727882016-04-15 13:58:27 +05306386 * struct wmi_host_chan_info_event - Channel info WMI event
6387 * @err_code: Error code
6388 * @freq: Channel freq
6389 * @cmd_flags: Read flags
6390 * @noise_floor: Noise Floor value
6391 * @rx_clear_count: rx clear count
6392 * @cycle_count: cycle count
6393 * @chan_tx_pwr_range: channel tx power per range
6394 * @chan_tx_pwr_tp: channel tx power per throughput
6395 * @rx_frame_count: rx frame count
6396 * @rx_11b_mode_data_duration: 11b mode data duration
6397 */
6398typedef struct {
6399 uint32_t err_code;
6400 uint32_t freq;
6401 uint32_t cmd_flags;
6402 uint32_t noise_floor;
6403 uint32_t rx_clear_count;
6404 uint32_t cycle_count;
6405 uint32_t chan_tx_pwr_range;
6406 uint32_t chan_tx_pwr_tp;
6407 uint32_t rx_frame_count;
6408 uint32_t rx_11b_mode_data_duration;
6409} wmi_host_chan_info_event;
6410
6411/**
6412 * struct wmi_host_pdev_channel_hopping_event
6413 * @noise_floor_report_iter: Noise threshold iterations with high values
6414 * @noise_floor_total_iter: Total noise threshold iterations
6415 */
6416typedef struct {
6417 uint32_t noise_floor_report_iter;
6418 uint32_t noise_floor_total_iter;
6419} wmi_host_pdev_channel_hopping_event;
6420
6421/**
6422 * struct wmi_host_pdev_bss_chan_info_event
6423 * @freq: Units in MHz
6424 * @noise_floor: units are dBm
6425 * @rx_clear_count_low:
6426 * @rx_clear_count_high:
6427 * @cycle_count_low:
6428 * @cycle_count_high:
6429 * @tx_cycle_count_low:
6430 * @tx_cycle_count_high:
6431 * @rx_cycle_count_low:
6432 * @rx_cycle_count_high:
6433 * @rx_bss_cycle_count_low:
6434 * @rx_bss_cycle_count_high:
6435 * @reserved:
6436 */
6437typedef struct {
6438 uint32_t freq;
6439 uint32_t noise_floor;
6440 uint32_t rx_clear_count_low;
6441 uint32_t rx_clear_count_high;
6442 uint32_t cycle_count_low;
6443 uint32_t cycle_count_high;
6444 uint32_t tx_cycle_count_low;
6445 uint32_t tx_cycle_count_high;
6446 uint32_t rx_cycle_count_low;
6447 uint32_t rx_cycle_count_high;
6448 uint32_t rx_bss_cycle_count_low;
6449 uint32_t rx_bss_cycle_count_high;
6450 uint32_t reserved;
6451} wmi_host_pdev_bss_chan_info_event;
6452
6453#define WMI_HOST_INST_STATS_INVALID_RSSI 0
6454/**
6455 * struct wmi_host_inst_stats_resp
6456 * @iRSSI: Instantaneous RSSI
6457 * @peer_macaddr: peer mac address
6458 */
6459typedef struct {
6460 uint32_t iRSSI;
6461 wmi_host_mac_addr peer_macaddr;
6462} wmi_host_inst_stats_resp;
6463
6464/* Event definition and new structure addition to send event
6465 * to host to block/unblock tx data traffic based on peer_ast_idx or vdev id
6466 */
6467#define WMI_HOST_INVALID_PEER_AST_INDEX 0xffff
6468#define WMI_HOST_TX_DATA_TRAFFIC_CTRL_BLOCK 0x1
6469#define WMI_HOST_TX_DATA_TRAFFIC_CTRL_UNBLOCK 0x2
6470/**
6471 * struct wmi_host_tx_data_traffic_ctrl_event
6472 * @peer_ast_idx: For vdev based control, peer_ast_idx will be
6473 * WMI_INVALID_PEER_AST_INDEX
6474 * @vdev_id: only applies if peer_ast_idx == INVALID
6475 * @ctrl_cmd: WMI_TX_DATA_TRAFFIC_CTRL_BLOCK or
6476 * WMI_TX_DATA_TRAFFIC_CTRL_UNBLOCK
6477 */
6478typedef struct {
6479 uint32_t peer_ast_idx;
6480 uint32_t vdev_id;
6481 uint32_t ctrl_cmd;
6482} wmi_host_tx_data_traffic_ctrl_event;
6483
6484/**
6485 * struct wmi_host_ath_dcs_cw_int
6486 * @channel: either number or freq in mhz
6487 */
6488typedef struct {
6489 uint32_t channel;
6490} wmi_host_ath_dcs_cw_int;
Govind Singhc10bde82016-05-02 17:59:24 +05306491
6492#define WMI_MAX_POWER_DBG_ARGS 8
6493
6494/**
6495 * struct wmi_power_dbg_params - power debug command parameter
6496 * @pdev_id: subsystem identifier
6497 * @module_id: parameter id
6498 * @num_arg: no of arguments
6499 * @args: arguments
6500 */
6501struct wmi_power_dbg_params {
6502 uint32_t pdev_id;
6503 uint32_t module_id;
6504 uint32_t num_args;
6505 uint32_t args[WMI_MAX_POWER_DBG_ARGS];
6506};
6507
Gupta, Kapil7b768002016-04-25 19:14:19 +05306508/**
6509 * struct wmi_adaptive_dwelltime_params - the adaptive dwelltime params
6510 * @vdev_id: vdev id
6511 * @is_enabled: Adaptive dwell time is enabled/disabled
6512 * @dwelltime_mode: global default adaptive dwell mode
6513 * @lpf_weight: weight to calculate the average low pass
6514 * filter for channel congestion
6515 * @passive_mon_intval: intval to monitor wifi activity in passive scan in msec
6516 * @wifi_act_threshold: % of wifi activity used in passive scan 0-100
6517 *
6518 */
6519struct wmi_adaptive_dwelltime_params {
6520 uint32_t vdev_id;
6521 bool is_enabled;
6522 enum wmi_dwelltime_adaptive_mode dwelltime_mode;
6523 uint8_t lpf_weight;
6524 uint8_t passive_mon_intval;
6525 uint8_t wifi_act_threshold;
6526};
Govind Singhc7cd2d62016-06-21 14:33:26 +05306527
6528/**
6529 * struct wmi_fw_dump_seg_req - individual segment details
6530 * @seg_id - segment id.
6531 * @seg_start_addr_lo - lower address of the segment.
6532 * @seg_start_addr_hi - higher address of the segment.
6533 * @seg_length - length of the segment.
6534 * @dst_addr_lo - lower address of the destination buffer.
6535 * @dst_addr_hi - higher address of the destination buffer.
6536 *
6537 * This structure carries the information to firmware about the
6538 * individual segments. This structure is part of firmware memory
6539 * dump request.
6540 */
6541struct wmi_fw_dump_seg_req {
6542 uint8_t seg_id;
6543 uint32_t seg_start_addr_lo;
6544 uint32_t seg_start_addr_hi;
6545 uint32_t seg_length;
6546 uint32_t dst_addr_lo;
6547 uint32_t dst_addr_hi;
6548};
6549
6550/**
6551 * enum wmi_userspace_log_level - Log level at userspace
6552 * @WMI_LOG_LEVEL_NO_COLLECTION: verbose_level 0 corresponds to no collection
6553 * @WMI_LOG_LEVEL_NORMAL_COLLECT: verbose_level 1 correspond to normal log
6554 * level with minimal user impact. This is the default value.
6555 * @WMI_LOG_LEVEL_ISSUE_REPRO: verbose_level 2 are enabled when user is lazily
6556 * trying to reproduce a problem, wifi performances and power can be impacted
6557 * but device should not otherwise be significantly impacted
6558 * @WMI_LOG_LEVEL_ACTIVE: verbose_level 3+ are used when trying to
6559 * actively debug a problem
6560 *
6561 * Various log levels defined in the userspace for logging applications
6562 */
6563enum wmi_userspace_log_level {
6564 WMI_LOG_LEVEL_NO_COLLECTION,
6565 WMI_LOG_LEVEL_NORMAL_COLLECT,
6566 WMI_LOG_LEVEL_ISSUE_REPRO,
6567 WMI_LOG_LEVEL_ACTIVE,
6568};
6569
Govind Singh3ddda1f2016-03-09 11:34:12 +05306570#endif /* _WMI_UNIFIED_PARAM_H_ */
6571