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