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