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