blob: cd6c539c1cc4b5493bcb2df822907e095f51b216 [file] [log] [blame]
Govind Singh3ddda1f2016-03-09 11:34:12 +05301/*
Nachiket Kukadee42cd4b2017-12-20 17:28:29 +05302 * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
Govind Singh3ddda1f2016-03-09 11:34:12 +05303 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
28/*
29 * This file contains the API definitions for the Unified Wireless Module
30 * Interface (WMI).
31 */
32
33#ifndef _WMI_UNIFIED_PARAM_H_
34#define _WMI_UNIFIED_PARAM_H_
Padma, Santhosh Kumar73524052016-09-11 18:24:59 +053035
Om Prakash Tripathi91452bf2017-02-25 15:53:30 +053036#include <wlan_scan_public_structs.h>
Frank Liu0ba573b2017-03-15 17:51:43 +080037#ifdef CONVERGED_TDLS_ENABLE
38#include <wlan_tdls_public_structs.h>
39#endif
Om Prakash Tripathi91452bf2017-02-25 15:53:30 +053040
Padma, Santhosh Kumar73524052016-09-11 18:24:59 +053041#define MAC_MAX_KEY_LENGTH 32
42#define MAC_PN_LENGTH 8
43#define MAX_MAC_HEADER_LEN 32
44#define MIN_MAC_HEADER_LEN 24
45#define QOS_CONTROL_LEN 2
46
Govind Singh3ddda1f2016-03-09 11:34:12 +053047#define IEEE80211_ADDR_LEN 6 /* size of 802.11 address */
Govind Singh3ddda1f2016-03-09 11:34:12 +053048#define WMI_MAC_MAX_SSID_LENGTH 32
49#define WMI_SCAN_MAX_NUM_SSID 0x0A
50#define mgmt_tx_dl_frm_len 64
51#define WMI_SMPS_MASK_LOWER_16BITS 0xFF
52#define WMI_SMPS_MASK_UPPER_3BITS 0x7
53#define WMI_SMPS_PARAM_VALUE_S 29
Shaakir Mohamede2bc1b32018-01-19 15:49:23 -080054#define WMI_UNIT_TEST_MAX_NUM_ARGS 100
Govind Singhe7b800c2016-03-01 15:30:53 +053055/* The size of the utc time in bytes. */
56#define WMI_SIZE_UTC_TIME (10)
57/* The size of the utc time error in bytes. */
58#define WMI_SIZE_UTC_TIME_ERROR (5)
Govind Singh9bad0002016-03-01 15:54:59 +053059#define WMI_MCC_MIN_CHANNEL_QUOTA 20
60#define WMI_MCC_MAX_CHANNEL_QUOTA 80
61#define WMI_MCC_MIN_NON_ZERO_CHANNEL_LATENCY 30
62#define WMI_BEACON_TX_BUFFER_SIZE (512)
63#define WMI_WIFI_SCANNING_MAC_OUI_LENGTH 3
64#define WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64
65#define WMI_RSSI_THOLD_DEFAULT -300
66#define WMI_NLO_FREQ_THRESH 1000
67#define WMI_SEC_TO_MSEC(sec) (sec * 1000)
68#define WMI_MSEC_TO_USEC(msec) (msec * 1000)
69#define WMI_ETH_LEN 64
70#define WMI_QOS_NUM_TSPEC_MAX 2
71#define WMI_QOS_NUM_AC_MAX 4
Govind Singhae855362016-03-07 14:24:22 +053072#define WMI_IPV4_ADDR_LEN 4
73#define WMI_KEEP_ALIVE_NULL_PKT 1
74#define WMI_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
Himanshu Agarwal9efd9bf2016-03-09 18:49:18 +053075#define WMI_MAC_MAX_KEY_LENGTH 32
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +053076#define WMI_KRK_KEY_LEN 16
77#ifdef WLAN_FEATURE_ROAM_OFFLOAD
78#define WMI_BTK_KEY_LEN 32
79#define WMI_ROAM_R0KH_ID_MAX_LEN 48
80#define WMI_ROAM_SCAN_PSK_SIZE 32
81#endif
82#define WMI_NOISE_FLOOR_DBM_DEFAULT (-96)
Govind Singhae855362016-03-07 14:24:22 +053083#define WMI_EXTSCAN_MAX_HOTLIST_SSIDS 8
84#define WMI_ROAM_MAX_CHANNELS 80
Govind Singhd7468a52016-03-09 14:32:57 +053085#ifdef FEATURE_WLAN_EXTSCAN
86#define WMI_MAX_EXTSCAN_MSG_SIZE 1536
87#define WMI_EXTSCAN_REST_TIME 100
88#define WMI_EXTSCAN_MAX_SCAN_TIME 50000
89#define WMI_EXTSCAN_BURST_DURATION 150
90#endif
91#define WMI_SCAN_NPROBES_DEFAULT (2)
92#define WMI_SEC_TO_MSEC(sec) (sec * 1000) /* sec to msec */
93#define WMI_MSEC_TO_USEC(msec) (msec * 1000) /* msec to usec */
94#define WMI_NLO_FREQ_THRESH 1000 /* in MHz */
Govind Singh89727882016-04-15 13:58:27 +053095
Varun Reddy Yeturu1aa91d92017-08-20 13:41:02 -070096#define WMI_SVC_MSG_MAX_SIZE 1536
Govind Singh89727882016-04-15 13:58:27 +053097#define MAX_UTF_EVENT_LENGTH 2048
98#define MAX_WMI_UTF_LEN 252
99#define MAX_WMI_QVIT_LEN 252
100#define THERMAL_LEVELS 4
101#define WMI_HOST_BCN_FLT_MAX_SUPPORTED_IES 256
102#define WMI_HOST_BCN_FLT_MAX_ELEMS_IE_LIST \
103 (WMI_HOST_BCN_FLT_MAX_SUPPORTED_IES/32)
104#define LTEU_MAX_BINS 10
105#define ATF_ACTIVED_MAX_CLIENTS 50
106#define ATF_ACTIVED_MAX_ATFGROUPS 8
107#define CTL_5G_SIZE 1536
108#define CTL_2G_SIZE 684
109#define MAX_CTL_SIZE (CTL_5G_SIZE > CTL_2G_SIZE ? CTL_5G_SIZE : CTL_2G_SIZE)
110#define IEEE80211_MICBUF_SIZE (8+8)
111#define IEEE80211_TID_SIZE 17
112#define WME_NUM_AC 4
113#define SMART_ANT_MODE_SERIAL 0
114#define SMART_ANT_MODE_PARALLEL 1
115#define IEEE80211_WEP_NKID 4 /* number of key ids */
116#define WPI_IV_LEN 16
117#define WMI_SCAN_MAX_NUM_BSSID 10
118#define MAX_CHANS 1023
119#define TARGET_OEM_CONFIGURE_LCI 0x0A
120#define RTT_LCI_ALTITUDE_MASK 0x3FFFFFFF
121#define TARGET_OEM_CONFIGURE_LCR 0x09
122#define RTT_TIMEOUT_MS 180
123#define MAX_SUPPORTED_RATES 128
124#define WMI_HOST_MAX_BUFFER_SIZE 1712
Govind Singh41da3152016-05-06 20:20:25 +0530125#define WMI_HAL_MAX_SANTENNA 4
Sathish Kumar7e2eaed2016-11-14 17:44:29 +0530126#define WMI_HOST_PDEV_VI_PRIORITY_BIT (1<<2)
127#define WMI_HOST_PDEV_BEACON_PRIORITY_BIT (1<<4)
128#define WMI_HOST_PDEV_MGMT_PRIORITY_BIT (1<<5)
Surabhi Vishnoib1a06b72018-02-20 18:08:35 +0530129#define WMI_MAX_CMDS 1024
Govind Singh89727882016-04-15 13:58:27 +0530130
Govind Singhec1401a2016-07-08 19:00:56 +0530131#define FIPS_ALIGN 4
Kiran Venkatappa9f5fcc02016-12-29 22:07:14 +0530132#define FIPS_ALIGNTO(__addr, __to) \
133 ((((unsigned long int)(__addr)) + (__to) - 1) & ~((__to) - 1))
134#define FIPS_IS_ALIGNED(__addr, __to) \
135 (!(((unsigned long int)(__addr)) & ((__to)-1)))
Govind Singhec1401a2016-07-08 19:00:56 +0530136
Sathish Kumardcc75292017-03-01 14:02:36 +0530137#define WMI_HOST_MAX_SERIAL_ANTENNA 2
138#define WMI_SMART_ANT_MAX_RATE_SERIES 2
139
Govind Singh89727882016-04-15 13:58:27 +0530140#define WMI_HOST_F_MS(_v, _f) \
141 (((_v) & (_f)) >> (_f##_S))
142
143#define WMI_HOST_F_RMW(_var, _v, _f) \
144 do { \
145 (_var) &= ~(_f); \
146 (_var) |= (((_v) << (_f##_S)) & (_f)); \
147 } while (0)
148
Sathish Kumar7e2eaed2016-11-14 17:44:29 +0530149/* vdev capabilities bit mask */
150#define WMI_HOST_VDEV_BEACON_SUPPORT 0x1
151#define WMI_HOST_VDEV_WDS_LRN_ENABLED 0x2
152#define WMI_HOST_VDEV_VOW_ENABLED 0x4
153#define WMI_HOST_VDEV_IS_BEACON_SUPPORTED(param) \
154 ((param) & WMI_HOST_VDEV_BEACON_SUPPORT)
155#define WMI_HOST_VDEV_IS_WDS_LRN_ENABLED(param) \
156 ((param) & WMI_HOST_VDEV_WDS_LRN_ENABLED)
157#define WMI_HOST_VDEV_IS_VOW_ENABLED(param) \
158 ((param) & WMI_HOST_VDEV_VOW_ENABLED)
159
Govind Singh89727882016-04-15 13:58:27 +0530160/* TXBF capabilities masks */
161#define WMI_HOST_TXBF_CONF_SU_TX_BFEE_S 0
162#define WMI_HOST_TXBF_CONF_SU_TX_BFEE_M 0x1
163#define WMI_HOST_TXBF_CONF_SU_TX_BFEE \
164 (WMI_HOST_TXBF_CONF_SU_TX_BFEE_M << WMI_HOST_TXBF_CONF_SU_TX_BFEE_S)
165#define WMI_HOST_TXBF_CONF_SU_TX_BFEE_GET(x) \
166 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_SU_TX_BFEE)
167#define WMI_HOST_TXBF_CONF_SU_TX_BFEE_SET(x, z) \
168 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_SU_TX_BFEE)
169
Gyanranjan Hazarika0378c0e2017-10-13 16:04:39 -0700170
Govind Singh89727882016-04-15 13:58:27 +0530171#define WMI_HOST_TXBF_CONF_MU_TX_BFEE_S 1
172#define WMI_HOST_TXBF_CONF_MU_TX_BFEE_M 0x1
173#define WMI_HOST_TXBF_CONF_MU_TX_BFEE \
174 (WMI_HOST_TXBF_CONF_MU_TX_BFEE_M << WMI_HOST_TXBF_CONF_MU_TX_BFEE_S)
175#define WMI_HOST_TXBF_CONF_MU_TX_BFEE_GET(x) \
176 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_MU_TX_BFEE)
177#define WMI_HOST_TXBF_CONF_MU_TX_BFEE_SET(x, z) \
178 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_MU_TX_BFEE)
179
180#define WMI_HOST_TXBF_CONF_SU_TX_BFER_S 2
181#define WMI_HOST_TXBF_CONF_SU_TX_BFER_M 0x1
182#define WMI_HOST_TXBF_CONF_SU_TX_BFER \
183 (WMI_HOST_TXBF_CONF_SU_TX_BFER_M << WMI_HOST_TXBF_CONF_SU_TX_BFER_S)
184#define WMI_HOST_TXBF_CONF_SU_TX_BFER_GET(x) \
185 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_SU_TX_BFER)
186#define WMI_HOST_TXBF_CONF_SU_TX_BFER_SET(x, z) \
187 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_SU_TX_BFER)
188
189#define WMI_HOST_TXBF_CONF_MU_TX_BFER_S 3
190#define WMI_HOST_TXBF_CONF_MU_TX_BFER_M 0x1
191#define WMI_HOST_TXBF_CONF_MU_TX_BFER \
192 (WMI_HOST_TXBF_CONF_MU_TX_BFER_M << WMI_HOST_TXBF_CONF_MU_TX_BFER_S)
193#define WMI_HOST_TXBF_CONF_MU_TX_BFER_GET(x) \
194 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_MU_TX_BFER)
195#define WMI_HOST_TXBF_CONF_MU_TX_BFER_SET(x, z) \
196 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_MU_TX_BFER)
197
198#define WMI_HOST_TXBF_CONF_STS_CAP_S 4
199#define WMI_HOST_TXBF_CONF_STS_CAP_M 0x7
200#define WMI_HOST_TXBF_CONF_STS_CAP \
201 (WMI_HOST_TXBF_CONF_STS_CAP_M << WMI_HOST_TXBF_CONF_STS_CAP_S)
202#define WMI_HOST_TXBF_CONF_STS_CAP_GET(x) \
203 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_STS_CAP);
204#define WMI_HOST_TXBF_CONF_STS_CAP_SET(x, z) \
205 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_STS_CAP)
206
207#define WMI_HOST_TXBF_CONF_IMPLICIT_BF_S 7
208#define WMI_HOST_TXBF_CONF_IMPLICIT_BF_M 0x1
209#define WMI_HOST_TXBF_CONF_IMPLICIT_BF \
210 (WMI_HOST_TXBF_CONF_IMPLICIT_BF_M << WMI_HOST_TXBF_CONF_IMPLICIT_BF_S)
211#define WMI_HOST_TXBF_CONF_IMPLICIT_BF_GET(x) \
212 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_IMPLICIT_BF)
213#define WMI_HOST_TXBF_CONF_IMPLICIT_BF_SET(x, z) \
214 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_IMPLICIT_BF)
215
216#define WMI_HOST_TXBF_CONF_BF_SND_DIM_S 8
217#define WMI_HOST_TXBF_CONF_BF_SND_DIM_M 0x7
218#define WMI_HOST_TXBF_CONF_BF_SND_DIM \
219 (WMI_HOST_TXBF_CONF_BF_SND_DIM_M << WMI_HOST_TXBF_CONF_BF_SND_DIM_S)
220#define WMI_HOST_TXBF_CONF_BF_SND_DIM_GET(x) \
221 WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_BF_SND_DIM)
222#define WMI_HOST_TXBF_CONF_BF_SND_DIM_SET(x, z) \
223 WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_BF_SND_DIM)
224
Gyanranjan Hazarika0378c0e2017-10-13 16:04:39 -0700225/* HE BF capabilities mask */
226#define WMI_HOST_HE_BF_CONF_SU_BFEE_S 0
227#define WMI_HOST_HE_BF_CONF_SU_BFEE_M 0x1
228#define WMI_HOST_HE_BF_CONF_SU_BFEE \
229 (WMI_HOST_HE_BF_CONF_SU_BFEE_M << WMI_HOST_HE_BF_CONF_SU_BFEE_S)
230#define WMI_HOST_HE_BF_CONF_SU_BFEE_GET(x) \
231 WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_SU_BFEE)
232#define WMI_HOST_HE_BF_CONF_SU_BFEE_SET(x, z) \
233 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_SU_BFEE)
234
235#define WMI_HOST_HE_BF_CONF_SU_BFER_S 1
236#define WMI_HOST_HE_BF_CONF_SU_BFER_M 0x1
237#define WMI_HOST_HE_BF_CONF_SU_BFER \
238 (WMI_HOST_HE_BF_CONF_SU_BFER_M << WMI_HOST_HE_BF_CONF_SU_BFER_S)
239#define WMI_HOST_HE_BF_CONF_SU_BFER_GET(x) \
240 WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_SU_BFER)
241#define WMI_HOST_HE_BF_CONF_SU_BFER_SET(x, z) \
242 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_SU_BFER)
243
244#define WMI_HOST_HE_BF_CONF_MU_BFEE_S 2
245#define WMI_HOST_HE_BF_CONF_MU_BFEE_M 0x1
246#define WMI_HOST_HE_BF_CONF_MU_BFEE \
247 (WMI_HOST_HE_BF_CONF_MU_BFEE_M << WMI_HOST_HE_BF_CONF_MU_BFEE_S)
248#define WMI_HOST_HE_BF_CONF_MU_BFEE_GET(x) \
249 WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_MU_BFEE)
250#define WMI_HOST_HE_BF_CONF_MU_BFEE_SET(x, z) \
251 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_MU_BFEE)
252
253#define WMI_HOST_HE_BF_CONF_MU_BFER_S 3
254#define WMI_HOST_HE_BF_CONF_MU_BFER_M 0x1
255#define WMI_HOST_HE_BF_CONF_MU_BFER \
256 (WMI_HOST_HE_BF_CONF_MU_BFER_M << WMI_HOST_HE_BF_CONF_MU_BFER_S)
257#define WMI_HOST_HE_BF_CONF_MU_BFER_GET(x) \
258 WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_MU_BFER)
259#define WMI_HOST_HE_BF_CONF_MU_BFER_SET(x, z) \
260 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_MU_BFER)
261
262#define WMI_HOST_HE_BF_CONF_DL_OFDMA_S 4
263#define WMI_HOST_HE_BF_CONF_DL_OFDMA_M 0x1
264#define WMI_HOST_HE_BF_CONF_DL_OFDMA \
265 (WMI_HOST_HE_BF_CONF_DL_OFDMA_M << WMI_HOST_HE_BF_CONF_DL_OFDMA_S)
266#define WMI_HOST_HE_BF_CONF_DL_OFDMA_GET(x) \
267 WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_DL_OFDMA)
268#define WMI_HOST_HE_BF_CONF_DL_OFDMA_SET(x, z) \
269 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_DL_OFDMA)
270
271#define WMI_HOST_HE_BF_CONF_UL_OFDMA_S 5
272#define WMI_HOST_HE_BF_CONF_UL_OFDMA_M 0x1
273#define WMI_HOST_HE_BF_CONF_UL_OFDMA \
274 (WMI_HOST_HE_BF_CONF_UL_OFDMA_M << WMI_HOST_HE_BF_CONF_UL_OFDMA_S)
275#define WMI_HOST_HE_BF_CONF_UL_OFDMA_GET(x) \
276 WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_UL_OFDMA)
277#define WMI_HOST_HE_BF_CONF_UL_OFDMA_SET(x, z) \
278 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_UL_OFDMA)
279
280#define WMI_HOST_HE_BF_CONF_UL_MUMIMO_S 6
281#define WMI_HOST_HE_BF_CONF_UL_MUMIMO_M 0x1
282#define WMI_HOST_HE_BF_CONF_UL_MUMIMO \
283 (WMI_HOST_HE_BF_CONF_UL_MUMIMO_M << WMI_HOST_HE_BF_CONF_UL_MUMIMO_S)
284#define WMI_HOST_HE_BF_CONF_UL_MUMIMO_GET(x) \
285 WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_UL_MUMIMO)
286#define WMI_HOST_HE_BF_CONF_UL_MUMIMO_SET(x, z) \
287 WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_UL_MUMIMO)
288
Govind Singh89727882016-04-15 13:58:27 +0530289#define WMI_HOST_TPC_RATE_MAX 160
290#define WMI_HOST_TPC_TX_NUM_CHAIN 4
nobeljd9c2dc82018-01-25 16:35:36 -0800291#define WMI_HOST_RXG_CAL_CHAN_MAX 8
292#define WMI_HOST_MAX_NUM_CHAINS 8
Poddar, Siddarth794b9962016-04-28 15:49:11 +0530293#define WMI_MAX_NUM_OF_RATE_THRESH 4
Govind Singh89727882016-04-15 13:58:27 +0530294
Sathish Kumar907a7462017-02-27 10:35:40 +0530295#define WMI_HOST_PDEV_MAX_VDEVS 17
296
Sathish Kumardcc75292017-03-01 14:02:36 +0530297/* for QC98XX only */
298/*6 modes (A, HT20, HT40, VHT20, VHT40, VHT80) * 3 reg dommains
299 */
300#define WMI_HOST_NUM_CTLS_5G 18
301/*6 modes (B, G, HT20, HT40, VHT20, VHT40) * 3 reg domains */
302#define WMI_HOST_NUM_CTLS_2G 18
303#define WMI_HOST_NUM_BAND_EDGES_5G 8
304#define WMI_HOST_NUM_BAND_EDGES_2G 4
305
306/*Beelinier 5G*/
307#define WMI_HOST_NUM_CTLS_5G_11A 9
308#define WMI_HOST_NUM_BAND_EDGES_5G_11A 25
309#define WMI_HOST_NUM_CTLS_5G_HT20 24
310#define WMI_HOST_NUM_BAND_EDGES_5G_HT20 25
311#define WMI_HOST_NUM_CTLS_5G_HT40 18
312#define WMI_HOST_NUM_BAND_EDGES_5G_HT40 12
313#define WMI_HOST_NUM_CTLS_5G_HT80 18
314#define WMI_HOST_NUM_BAND_EDGES_5G_HT80 6
315#define WMI_HOST_NUM_CTLS_5G_HT160 9
316#define WMI_HOST_NUM_BAND_EDGES_5G_HT160 2
317
318/* Beeliner 2G */
319#define WMI_HOST_NUM_CTLS_2G_11B 6
320#define WMI_HOST_NUM_BAND_EDGES_2G_11B 9
321#define WMI_HOST_NUM_CTLS_2G_20MHZ 30
322#define WMI_HOST_NUM_BAND_EDGES_2G_20MHZ 11
323#define WMI_HOST_NUM_CTLS_2G_40MHZ 18
324#define WMI_HOST_NUM_BAND_EDGES_2G_40MHZ 6
325
326/* for QC98XX only */
327#define WMI_HOST_TX_NUM_CHAIN 0x3
328#define WMI_HOST_TPC_REGINDEX_MAX 4
329#define WMI_HOST_ARRAY_GAIN_NUM_STREAMS 2
330
Himanshu Agarwal7e4f4bc2016-03-09 16:49:38 +0530331#include "qdf_atomic.h"
Govind Singhd7468a52016-03-09 14:32:57 +0530332
Govind Singh89727882016-04-15 13:58:27 +0530333#ifdef BIG_ENDIAN_HOST
334 /* This API is used in copying in elements to WMI message,
335 since WMI message uses multilpes of 4 bytes, This API
336 converts length into multiples of 4 bytes, and performs copy
337 */
338#define WMI_HOST_IF_MSG_COPY_CHAR_ARRAY(destp, srcp, len) do { \
339 int j; \
340 u_int32_t *src, *dest; \
341 src = (u_int32_t *)srcp; \
342 dest = (u_int32_t *)destp; \
343 for (j = 0; j < roundup(len, sizeof(u_int32_t))/4; j++) { \
344 *(dest+j) = qdf_le32_to_cpu(*(src+j)); \
345 } \
346} while (0)
347#else
348
349#define WMI_HOST_IF_MSG_COPY_CHAR_ARRAY(destp, srcp, len) OS_MEMCPY(destp,\
350 srcp, len)
351
352#endif
353
354/** macro to convert MAC address from WMI word format to char array */
355#define WMI_HOST_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr, c_macaddr) do { \
356 (c_macaddr)[0] = ((pwmi_mac_addr)->mac_addr31to0) & 0xff; \
357 (c_macaddr)[1] = (((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \
358 (c_macaddr)[2] = (((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \
359 (c_macaddr)[3] = (((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff; \
360 (c_macaddr)[4] = ((pwmi_mac_addr)->mac_addr47to32) & 0xff; \
361 (c_macaddr)[5] = (((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \
362 } while (0)
363
364#define TARGET_INIT_STATUS_SUCCESS 0x0
365#define TARGET_INIT_STATUS_GEN_FAILED 0x1
366#define TARGET_GET_INIT_STATUS_REASON(status) ((status) & 0xffff)
367#define TARGET_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
Selvaraj, Sridhar0a1427f2016-07-04 21:40:23 +0530368
369#define MAX_ASSOC_IE_LENGTH 1024
Govind Singh89727882016-04-15 13:58:27 +0530370typedef uint32_t TARGET_INIT_STATUS;
371
Govind Singh33aab8e2017-03-21 12:49:10 +0530372/**
373 * @brief Opaque handle of wmi structure
374 */
375struct wmi_unified;
376typedef struct wmi_unified *wmi_unified_t;
377
378typedef void *ol_scn_t;
379/**
380 * @wmi_event_handler function prototype
381 */
382typedef int (*wmi_unified_event_handler)(ol_scn_t scn_handle,
383 uint8_t *event_buf, uint32_t len);
384
Govind Singh89727882016-04-15 13:58:27 +0530385typedef enum {
386 WMI_HOST_MODE_11A = 0, /* 11a Mode */
387 WMI_HOST_MODE_11G = 1, /* 11b/g Mode */
388 WMI_HOST_MODE_11B = 2, /* 11b Mode */
389 WMI_HOST_MODE_11GONLY = 3, /* 11g only Mode */
390 WMI_HOST_MODE_11NA_HT20 = 4, /* 11a HT20 mode */
391 WMI_HOST_MODE_11NG_HT20 = 5, /* 11g HT20 mode */
392 WMI_HOST_MODE_11NA_HT40 = 6, /* 11a HT40 mode */
393 WMI_HOST_MODE_11NG_HT40 = 7, /* 11g HT40 mode */
394 WMI_HOST_MODE_11AC_VHT20 = 8,
395 WMI_HOST_MODE_11AC_VHT40 = 9,
396 WMI_HOST_MODE_11AC_VHT80 = 10,
397 WMI_HOST_MODE_11AC_VHT20_2G = 11,
398 WMI_HOST_MODE_11AC_VHT40_2G = 12,
399 WMI_HOST_MODE_11AC_VHT80_2G = 13,
400 WMI_HOST_MODE_11AC_VHT80_80 = 14,
401 WMI_HOST_MODE_11AC_VHT160 = 15,
Krishna Raoc5a97ba2017-01-12 18:05:02 +0530402 WMI_HOST_MODE_11AX_HE20 = 16,
403 WMI_HOST_MODE_11AX_HE40 = 17,
404 WMI_HOST_MODE_11AX_HE80 = 18,
405 WMI_HOST_MODE_11AX_HE80_80 = 19,
406 WMI_HOST_MODE_11AX_HE160 = 20,
407 WMI_HOST_MODE_11AX_HE20_2G = 21,
408 WMI_HOST_MODE_11AX_HE40_2G = 22,
409 WMI_HOST_MODE_11AX_HE80_2G = 23,
410 WMI_HOST_MODE_UNKNOWN = 24,
411 WMI_HOST_MODE_MAX = 24
Govind Singh89727882016-04-15 13:58:27 +0530412} WMI_HOST_WLAN_PHY_MODE;
413
Sathish Kumar753eb7d2016-10-25 18:47:52 +0530414typedef enum {
415 WMI_HOST_VDEV_START_OK = 0,
416 WMI_HOST_VDEV_START_CHAN_INVALID,
417} WMI_HOST_VDEV_START_STATUS;
418
419/*
420 * Needs to be removed and use channel_param based
421 * on how it is processed
422 */
423typedef struct {
424 /** primary 20 MHz channel frequency in mhz */
425 uint32_t mhz;
426 /** Center frequency 1 in MHz*/
427 uint32_t band_center_freq1;
428 /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
429 uint32_t band_center_freq2;
430 /** channel info described below */
431 uint32_t info;
432 /** contains min power, max power, reg power and reg class id. */
433 uint32_t reg_info_1;
434 /** contains antennamax */
435 uint32_t reg_info_2;
436} wmi_host_channel;
Govind Singh89727882016-04-15 13:58:27 +0530437
Gupta, Kapil7b768002016-04-25 19:14:19 +0530438/**
Pratik Gandhi74ff2e52017-01-05 19:38:41 +0530439 * enum WMI_HOST_REGDMN_MODE:
440 * @WMI_HOST_REGDMN_MODE_11A: 11a channels
441 * @WMI_HOST_REGDMN_MODE_TURBO: 11a turbo-only channels
442 * @WMI_HOST_REGDMN_MODE_11B: 11b channels
443 * @WMI_HOST_REGDMN_MODE_PUREG: 11g channels (OFDM only)
444 * @WMI_HOST_REGDMN_MODE_11G: historical
445 * @WMI_HOST_REGDMN_MODE_108G: 11g+Turbo channels
446 * @WMI_HOST_REGDMN_MODE_108A: 11a+Turbo channels
447 * @WMI_HOST_REGDMN_MODE_XR: XR channels
448 * @WMI_HOST_REGDMN_MODE_11A_HALF_RATE: 11a half rate channels
449 * @WMI_HOST_REGDMN_MODE_11A_QUARTER_RATE: 11a quarter rate channels
450 * @WMI_HOST_REGDMN_MODE_11NG_HT20: 11ng HT20 channels
451 * @WMI_HOST_REGDMN_MODE_11NA_HT20: 11na HT20 channels
452 * @WMI_HOST_REGDMN_MODE_11NG_HT40PLUS: 11ng HT40+ channels
453 * @WMI_HOST_REGDMN_MODE_11NG_HT40MINUS: 11ng HT40- channels
454 * @WMI_HOST_REGDMN_MODE_11NA_HT40PLUS: 11na HT40+ channels
455 * @WMI_HOST_REGDMN_MODE_11NA_HT40MINUS: 11na HT40- channels
456 * @WMI_HOST_REGDMN_MODE_11AC_VHT20: 5GHz, VHT20
457 * @WMI_HOST_REGDMN_MODE_11AC_VHT40PLUS: 5GHz, VHT40+ channels
458 * @WMI_HOST_REGDMN_MODE_11AC_VHT40MINUS: 5GHz, VHT40- channels
459 * @WMI_HOST_REGDMN_MODE_11AC_VHT80: 5GHz, VHT80 channels
460 * @WMI_HOST_REGDMN_MODE_11AC_VHT160: 5GHz, VHT160 channels
461 * @WMI_HOST_REGDMN_MODE_11AC_VHT80_80: 5GHz, VHT80+80 channels
462 * @WMI_HOST_REGDMN_MODE_11AXG_HE20: 11ax 2.4GHz, HE20 channels
463 * @WMI_HOST_REGDMN_MODE_11AXA_HE20: 11ax 5GHz, HE20 channels
464 * @WMI_HOST_REGDMN_MODE_11AXG_HE40PLUS: 11ax 2.4GHz, HE40+ channels
465 * @WMI_HOST_REGDMN_MODE_11AXG_HE40MINUS: 11ax 2.4GHz, HE40- channels
466 * @WMI_HOST_REGDMN_MODE_11AXA_HE40PLUS: 11ax 5GHz, HE40+ channels
467 * @WMI_HOST_REGDMN_MODE_11AXA_HE40MINUS: 11ax 5GHz, HE40- channels
468 * @WMI_HOST_REGDMN_MODE_11AXA_HE80: 11ax 5GHz, HE80 channels
469 * @WMI_HOST_REGDMN_MODE_11AXA_HE160: 11ax 5GHz, HE160 channels
470 * @WMI_HOST_REGDMN_MODE_11AXA_HE80_80: 11ax 5GHz, HE80+80 channels
471 */
472typedef enum {
473 WMI_HOST_REGDMN_MODE_11A = 0x00000001,
474 WMI_HOST_REGDMN_MODE_TURBO = 0x00000002,
475 WMI_HOST_REGDMN_MODE_11B = 0x00000004,
476 WMI_HOST_REGDMN_MODE_PUREG = 0x00000008,
477 WMI_HOST_REGDMN_MODE_11G = 0x00000008,
478 WMI_HOST_REGDMN_MODE_108G = 0x00000020,
479 WMI_HOST_REGDMN_MODE_108A = 0x00000040,
480 WMI_HOST_REGDMN_MODE_XR = 0x00000100,
481 WMI_HOST_REGDMN_MODE_11A_HALF_RATE = 0x00000200,
482 WMI_HOST_REGDMN_MODE_11A_QUARTER_RATE = 0x00000400,
483 WMI_HOST_REGDMN_MODE_11NG_HT20 = 0x00000800,
484 WMI_HOST_REGDMN_MODE_11NA_HT20 = 0x00001000,
485 WMI_HOST_REGDMN_MODE_11NG_HT40PLUS = 0x00002000,
486 WMI_HOST_REGDMN_MODE_11NG_HT40MINUS = 0x00004000,
487 WMI_HOST_REGDMN_MODE_11NA_HT40PLUS = 0x00008000,
488 WMI_HOST_REGDMN_MODE_11NA_HT40MINUS = 0x00010000,
489 WMI_HOST_REGDMN_MODE_11AC_VHT20 = 0x00020000,
490 WMI_HOST_REGDMN_MODE_11AC_VHT40PLUS = 0x00040000,
491 WMI_HOST_REGDMN_MODE_11AC_VHT40MINUS = 0x00080000,
492 WMI_HOST_REGDMN_MODE_11AC_VHT80 = 0x00100000,
493 WMI_HOST_REGDMN_MODE_11AC_VHT160 = 0x00200000,
494 WMI_HOST_REGDMN_MODE_11AC_VHT80_80 = 0x00400000,
495 WMI_HOST_REGDMN_MODE_11AXG_HE20 = 0x00800000,
496 WMI_HOST_REGDMN_MODE_11AXA_HE20 = 0x01000000,
497 WMI_HOST_REGDMN_MODE_11AXG_HE40PLUS = 0x02000000,
498 WMI_HOST_REGDMN_MODE_11AXG_HE40MINUS = 0x04000000,
499 WMI_HOST_REGDMN_MODE_11AXA_HE40PLUS = 0x08000000,
500 WMI_HOST_REGDMN_MODE_11AXA_HE40MINUS = 0x10000000,
501 WMI_HOST_REGDMN_MODE_11AXA_HE80 = 0x20000000,
502 WMI_HOST_REGDMN_MODE_11AXA_HE160 = 0x40000000,
503 WMI_HOST_REGDMN_MODE_11AXA_HE80_80 = 0x80000000,
504 WMI_HOST_REGDMN_MODE_ALL = 0xffffffff
505} WMI_HOST_REGDMN_MODE;
506
507/**
Krishna Rao7462a8a2017-02-13 15:14:11 +0530508 * enum WMI_HOST_WLAN_BAND_CAPABILITY: Band capability (2.4 GHz, 5 GHz). Maps to
509 * WLAN_BAND_CAPABILITY used in firmware header file(s).
510 * @WMI_HOST_WLAN_2G_CAPABILITY: 2.4 GHz capable
511 * @WMI_HOST_WLAN_5G_CAPABILITY: 5 GHz capable
512 */
513typedef enum {
514 WMI_HOST_WLAN_2G_CAPABILITY = 0x1,
515 WMI_HOST_WLAN_5G_CAPABILITY = 0x2,
516} WMI_HOST_WLAN_BAND_CAPABILITY;
517
518/**
519 * enum wmi_host_channel_width: Channel operating width. Maps to
520 * wmi_channel_width used in firmware header file(s).
521 * @WMI_HOST_CHAN_WIDTH_20: 20 MHz channel operating width
522 * @WMI_HOST_CHAN_WIDTH_40: 40 MHz channel operating width
523 * @WMI_HOST_CHAN_WIDTH_80: 80 MHz channel operating width
524 * @WMI_HOST_CHAN_WIDTH_160: 160 MHz channel operating width
525 * @WMI_HOST_CHAN_WIDTH_80P80: 80+80 MHz channel operating width
526 * @WMI_HOST_CHAN_WIDTH_5: 5 MHz channel operating width
527 * @WMI_HOST_CHAN_WIDTH_10: 10 MHz channel operating width
528 */
529typedef enum {
530 WMI_HOST_CHAN_WIDTH_20 = 0,
531 WMI_HOST_CHAN_WIDTH_40 = 1,
532 WMI_HOST_CHAN_WIDTH_80 = 2,
533 WMI_HOST_CHAN_WIDTH_160 = 3,
534 WMI_HOST_CHAN_WIDTH_80P80 = 4,
535 WMI_HOST_CHAN_WIDTH_5 = 5,
536 WMI_HOST_CHAN_WIDTH_10 = 6,
537} wmi_host_channel_width;
538
539/**
Gupta, Kapil7b768002016-04-25 19:14:19 +0530540 * enum wmi_dwelltime_adaptive_mode: dwelltime_mode
541 * @WMI_DWELL_MODE_DEFAULT: Use firmware default mode
542 * @WMI_DWELL_MODE_CONSERVATIVE: Conservative adaptive mode
543 * @WMI_DWELL_MODE_MODERATE: Moderate adaptive mode
544 * @WMI_DWELL_MODE_AGGRESSIVE: Aggressive adaptive mode
545 * @WMI_DWELL_MODE_STATIC: static adaptive mode
546 */
547enum wmi_dwelltime_adaptive_mode {
548 WMI_DWELL_MODE_DEFAULT = 0,
549 WMI_DWELL_MODE_CONSERVATIVE = 1,
550 WMI_DWELL_MODE_MODERATE = 2,
551 WMI_DWELL_MODE_AGGRESSIVE = 3,
552 WMI_DWELL_MODE_STATIC = 4
553};
554
Manishekar Chandrasekaranb8c59382016-04-21 19:16:32 +0530555#define MAX_NUM_CHAN 128
556
Sathish Kumar376aebc2017-03-21 17:37:50 +0530557#define ATH_EXPONENT_TO_VALUE(v) ((1<<v)-1)
558#define ATH_TXOP_TO_US(v) (v<<5)
Govind Singhc7cd2d62016-06-21 14:33:26 +0530559/* WME stream classes */
Himanshu Agarwal56c292f2016-07-19 15:41:51 +0530560#define WMI_HOST_AC_BE 0 /* best effort */
561#define WMI_HOST_AC_BK 1 /* background */
562#define WMI_HOST_AC_VI 2 /* video */
563#define WMI_HOST_AC_VO 3 /* voice */
Govind Singhc7cd2d62016-06-21 14:33:26 +0530564#define WMI_TID_TO_AC(_tid) (\
Himanshu Agarwal56c292f2016-07-19 15:41:51 +0530565 (((_tid) == 0) || ((_tid) == 3)) ? WMI_HOST_AC_BE : \
566 (((_tid) == 1) || ((_tid) == 2)) ? WMI_HOST_AC_BK : \
567 (((_tid) == 4) || ((_tid) == 5)) ? WMI_HOST_AC_VI : \
568 WMI_HOST_AC_VO)
Govind Singhc7cd2d62016-06-21 14:33:26 +0530569
Govind Singh3ddda1f2016-03-09 11:34:12 +0530570/**
571 * struct vdev_create_params - vdev create cmd parameter
572 * @if_id: interface id
573 * @type: interface type
574 * @subtype: interface subtype
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +0530575 * @nss_2g: NSS for 2G
576 * @nss_5g: NSS for 5G
577 * @pdev_id: pdev id on pdev for this vdev
Govind Singh3ddda1f2016-03-09 11:34:12 +0530578 */
579struct vdev_create_params {
580 uint8_t if_id;
581 uint32_t type;
582 uint32_t subtype;
Kiran Kumar Lokere0ae9fb92016-05-02 12:32:27 -0700583 uint8_t nss_2g;
584 uint8_t nss_5g;
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +0530585 uint32_t pdev_id;
Govind Singh3ddda1f2016-03-09 11:34:12 +0530586};
587
588/**
589 * struct vdev_delete_params - vdev delete cmd parameter
590 * @if_id: interface id
591 */
592struct vdev_delete_params {
593 uint8_t if_id;
594};
595
596/**
Govind Singh89727882016-04-15 13:58:27 +0530597 * struct channel_param - Channel paramters with all
598 * info required by target.
599 * @chan_id: channel id
600 * @pwr: channel power
601 * @mhz: channel frequency
602 * @half_rate: is half rate
603 * @quarter_rate: is quarter rate
604 * @dfs_set: is dfs channel
605 * @dfs_set_cfreq2: is secondary freq dfs channel
606 * @is_chan_passive: is this passive channel
607 * @allow_ht: HT allowed in chan
608 * @allow_vht: VHT allowed on chan
Nandha Kishore Easwaran3f1115a2016-11-10 16:01:07 +0530609 * @set_agile: is agile mode
Govind Singh89727882016-04-15 13:58:27 +0530610 * @phy_mode: phymode (vht80 or ht40 or ...)
611 * @cfreq1: centre frequency on primary
612 * @cfreq2: centre frequency on secondary
613 * @maxpower: max power for channel
614 * @minpower: min power for channel
615 * @maxreqpower: Max regulatory power
616 * @antennamac: Max antenna
617 * @reg_class_id: Regulatory class id.
618 */
619
620struct channel_param {
621 uint8_t chan_id;
622 uint8_t pwr;
623 uint32_t mhz;
624 uint32_t half_rate:1,
625 quarter_rate:1,
626 dfs_set:1,
627 dfs_set_cfreq2:1,
628 is_chan_passive:1,
629 allow_ht:1,
Nandha Kishore Easwaran5bee1432016-10-18 10:30:14 +0530630 allow_vht:1,
Nandha Kishore Easwaran3f1115a2016-11-10 16:01:07 +0530631 set_agile:1;
Govind Singh89727882016-04-15 13:58:27 +0530632 uint32_t phy_mode;
633 uint32_t cfreq1;
634 uint32_t cfreq2;
635 int8_t maxpower;
636 int8_t minpower;
637 int8_t maxregpower;
638 uint8_t antennamax;
639 uint8_t reg_class_id;
640};
641
642/**
Govind Singh3ddda1f2016-03-09 11:34:12 +0530643 * struct vdev_stop_params - vdev stop cmd parameter
644 * @vdev_id: vdev id
645 */
646struct vdev_stop_params {
647 uint8_t vdev_id;
648};
649
650/**
651 * struct vdev_up_params - vdev up cmd parameter
652 * @vdev_id: vdev id
653 * @assoc_id: association id
654 */
655struct vdev_up_params {
656 uint8_t vdev_id;
657 uint16_t assoc_id;
658};
659
660/**
661 * struct vdev_down_params - vdev down cmd parameter
662 * @vdev_id: vdev id
663 */
664struct vdev_down_params {
665 uint8_t vdev_id;
666};
667
668/**
Himanshu Agarwal7e4f4bc2016-03-09 16:49:38 +0530669 * struct mac_ssid - mac ssid structure
670 * @length:
671 * @mac_ssid[WMI_MAC_MAX_SSID_LENGTH]:
672 */
673struct mac_ssid {
674 uint8_t length;
675 uint8_t mac_ssid[WMI_MAC_MAX_SSID_LENGTH];
676} qdf_packed;
677
678/**
Jiachao Wu40d6b112017-08-23 15:27:11 +0800679 * enum wmi_bcn_tx_rate_code - beacon tx rate code
680 */
681enum wmi_bcn_tx_rate_code {
682 WMI_BCN_TX_RATE_CODE_1_M = 0x43,
683 WMI_BCN_TX_RATE_CODE_2_M = 0x42,
684 WMI_BCN_TX_RATE_CODE_5_5_M = 0x41,
685 WMI_BCN_TX_RATE_CODE_6_M = 0x03,
686 WMI_BCN_TX_RATE_CODE_9_M = 0x07,
687 WMI_BCN_TX_RATE_CODE_11M = 0x40,
688 WMI_BCN_TX_RATE_CODE_12_M = 0x02,
689 WMI_BCN_TX_RATE_CODE_18_M = 0x06,
690 WMI_BCN_TX_RATE_CODE_24_M = 0x01,
691 WMI_BCN_TX_RATE_CODE_36_M = 0x05,
692 WMI_BCN_TX_RATE_CODE_48_M = 0x00,
693 WMI_BCN_TX_RATE_CODE_54_M = 0x04,
694};
695
696/**
Himanshu Agarwal7e4f4bc2016-03-09 16:49:38 +0530697 * struct vdev_start_params - vdev start cmd parameter
698 * @vdev_id: vdev id
699 * @chan_freq: channel frequency
700 * @chan_mode: channel mode
701 * @band_center_freq1: center freq 1
702 * @band_center_freq2: center freq 2
703 * @flags: flags to set like pmf_enabled etc.
704 * @is_dfs: flag to check if dfs enabled
705 * @beacon_intval: beacon interval
706 * @dtim_period: dtim period
707 * @max_txpow: max tx power
708 * @is_restart: flag to check if it is vdev
709 * @ssid: ssid and ssid length info
710 * @preferred_tx_streams: preferred tx streams
711 * @preferred_rx_streams: preferred rx streams
712 * @intr_update: flag to check if need to update
713 * required wma interface params
714 * @intr_ssid: pointer to wma interface ssid
715 * @intr_flags: poiter to wma interface flags
716 * @requestor_id: to update requestor id
717 * @disable_hw_ack: to update disable hw ack flag
718 * @info: to update channel info
719 * @reg_info_1: to update min power, max power,
720 * reg power and reg class id
721 * @reg_info_2: to update antennamax
Arif Hussain29b78212017-03-13 15:42:20 -0700722 * @cac_duration_ms: cac duration in milliseconds
723 * @regdomain: Regulatory domain
Govind Singh89727882016-04-15 13:58:27 +0530724 * @oper_mode: Operating mode
725 * @dfs_pri_multiplier: DFS primary multiplier
726 * allow pulse if they are within multiple of PRI for the radar type
727 * @dot11_mode: Phy mode (VHT20/VHT80...)
728 * @disable_hw_ack: Disable hw ack if chan is dfs channel for cac
729 * @channel_param: Channel params required by target.
Jiachao Wu40d6b112017-08-23 15:27:11 +0800730 * @bcn_tx_rate_code: Beacon tx rate code.
Varun Reddy Yeturu5fe013d2017-03-20 17:28:42 -0700731 * @ldpc_rx_enabled: Enable/Disable LDPC RX for this vdev
Himanshu Agarwal7e4f4bc2016-03-09 16:49:38 +0530732 */
733struct vdev_start_params {
734 uint8_t vdev_id;
735 uint32_t chan_freq;
736 uint32_t chan_mode;
737 uint32_t band_center_freq1;
738 uint32_t band_center_freq2;
739 uint32_t flags;
740 bool is_dfs;
741 uint32_t beacon_intval;
742 uint32_t dtim_period;
743 int32_t max_txpow;
744 bool is_restart;
Siddarth Poddar466963e2016-03-29 15:13:26 +0530745 bool is_half_rate;
746 bool is_quarter_rate;
747 uint32_t dis_hw_ack;
748 uint32_t flag_dfs;
749 uint8_t hidden_ssid;
750 uint8_t pmf_enabled;
Himanshu Agarwal7e4f4bc2016-03-09 16:49:38 +0530751 struct mac_ssid ssid;
Siddarth Poddar466963e2016-03-29 15:13:26 +0530752 uint32_t num_noa_descriptors;
Himanshu Agarwal7e4f4bc2016-03-09 16:49:38 +0530753 uint32_t preferred_rx_streams;
754 uint32_t preferred_tx_streams;
Arif Hussain29b78212017-03-13 15:42:20 -0700755 uint32_t cac_duration_ms;
756 uint32_t regdomain;
Krishna Kumaar Natarajan3f301ca2016-09-29 14:20:54 -0700757 uint32_t he_ops;
Kiran Venkatappa9da7e042016-08-09 22:52:35 +0530758#ifndef CONFIG_MCL
Govind Singh89727882016-04-15 13:58:27 +0530759 uint8_t oper_mode;
760 int32_t dfs_pri_multiplier;
761 uint8_t dot11_mode;
762 uint8_t disable_hw_ack;
763 struct channel_param channel;
764#endif
Jiachao Wu40d6b112017-08-23 15:27:11 +0800765 enum wmi_bcn_tx_rate_code bcn_tx_rate_code;
Varun Reddy Yeturu5fe013d2017-03-20 17:28:42 -0700766 bool ldpc_rx_enabled;
Himanshu Agarwal7e4f4bc2016-03-09 16:49:38 +0530767};
768
769/**
Chaithanya Garrepalli140a0532018-01-18 14:19:41 +0530770 * struct vdev_scan_nac_rssi_params - NAC_RSSI cmd parameter
771 * @vdev_id: vdev id
772 * @bssid_addr: BSSID address
773 * @client_addr: client address
774 * @chan_num: channel number
775 * @action:NAC_RSSI action,
776 */
777struct vdev_scan_nac_rssi_params {
778 uint32_t vdev_id;
779 uint8_t bssid_addr[IEEE80211_ADDR_LEN];
780 uint8_t client_addr[IEEE80211_ADDR_LEN];
781 uint32_t chan_num;
782 uint32_t action; /* WMI_FILTER_NAC_RSSI_ACTION */
783};
784
785/**
Himanshu Agarwal7e4f4bc2016-03-09 16:49:38 +0530786 * struct hidden_ssid_vdev_restart_params -
787 * vdev restart cmd parameter
788 * @session_id: session id
789 * @ssid_len: ssid length
790 * @ssid: ssid
791 * @flags: flags
792 * @requestor_id: requestor id
793 * @disable_hw_ack: flag to disable hw ack feature
794 * @mhz: channel frequency
795 * @band_center_freq1: center freq 1
796 * @band_center_freq2: center freq 2
797 * @info: channel info
798 * @reg_info_1: contains min power, max power,
799 * reg power and reg class id
800 * @reg_info_2: contains antennamax
801 * @hidden_ssid_restart_in_progress:
802 * flag to check if restart is in progress
803 */
804struct hidden_ssid_vdev_restart_params {
805 uint8_t session_id;
806 uint32_t ssid_len;
807 uint32_t ssid[8];
808 uint32_t flags;
809 uint32_t requestor_id;
810 uint32_t disable_hw_ack;
811 uint32_t mhz;
812 uint32_t band_center_freq1;
813 uint32_t band_center_freq2;
814 uint32_t info;
815 uint32_t reg_info_1;
816 uint32_t reg_info_2;
817 qdf_atomic_t hidden_ssid_restart_in_progress;
818};
819
820/**
Govind Singh3ddda1f2016-03-09 11:34:12 +0530821 * struct vdev_set_params - vdev set cmd parameter
822 * @if_id: vdev id
823 * @param_id: parameter id
824 * @param_value: parameter value
825 */
826struct vdev_set_params {
827 uint32_t if_id;
828 uint32_t param_id;
829 uint32_t param_value;
830};
831
Govind Singh89727882016-04-15 13:58:27 +0530832
833/**
Govind Singh3ddda1f2016-03-09 11:34:12 +0530834 * struct peer_delete_params - peer delete cmd parameter
835 * @vdev_id: vdev id
836 */
837struct peer_delete_params {
838 uint8_t vdev_id;
839};
840
841/**
842 * struct peer_flush_params - peer flush cmd parameter
843 * @peer_tid_bitmap: peer tid bitmap
844 * @vdev_id: vdev id
845 */
846struct peer_flush_params {
847 uint32_t peer_tid_bitmap;
848 uint8_t vdev_id;
849};
850
851/**
852 * struct peer_set_params - peer set cmd parameter
853 * @param_id: parameter id
854 * @param_value: parameter value
855 * @vdev_id: vdev id
856 */
857struct peer_set_params {
858 uint32_t param_id;
859 uint32_t param_value;
860 uint32_t vdev_id;
861};
862
863/**
864 * struct peer_create_params - peer create cmd parameter
865 * @peer_addr: peer mac addr
866 * @peer_type: peer type
867 * @vdev_id: vdev id
868 */
869struct peer_create_params {
870 const uint8_t *peer_addr;
871 uint32_t peer_type;
872 uint32_t vdev_id;
873};
874
875/**
876 * struct peer_remove_params - peer remove cmd parameter
877 * @bssid: bss id
878 * @vdev_id: vdev id
879 * @roam_synch_in_progress: flag to indicate if roaming is in progress
880 */
881struct peer_remove_params {
882 uint8_t *bssid;
883 uint8_t vdev_id;
884 bool roam_synch_in_progress;
885};
886
887/**
Govind Singh89727882016-04-15 13:58:27 +0530888 * Stats ID enums defined in host
889 */
890typedef enum {
891 WMI_HOST_REQUEST_PEER_STAT = 0x01,
892 WMI_HOST_REQUEST_AP_STAT = 0x02,
893 WMI_HOST_REQUEST_PDEV_STAT = 0x04,
894 WMI_HOST_REQUEST_VDEV_STAT = 0x08,
895 WMI_HOST_REQUEST_BCNFLT_STAT = 0x10,
896 WMI_HOST_REQUEST_VDEV_RATE_STAT = 0x20,
897 WMI_HOST_REQUEST_INST_STAT = 0x40,
898 WMI_HOST_REQUEST_PEER_EXTD_STAT = 0x80,
899 WMI_HOST_REQUEST_VDEV_EXTD_STAT = 0x100,
Chaithanya Garrepalli140a0532018-01-18 14:19:41 +0530900 WMI_HOST_REQUEST_NAC_RSSI = 0x200,
Gurumoorthi Gnanasambandhan18977552017-11-06 22:04:17 +0530901 WMI_HOST_REQUEST_BCN_STAT = 0x800,
Govind Singh89727882016-04-15 13:58:27 +0530902} wmi_host_stats_id;
903
Gurumoorthi Gnanasambandhan0a0e7272017-10-13 12:40:06 +0530904typedef struct {
905 uint16_t cfg_retry_count;
906 uint16_t retry_count;
907} wmi_host_inst_rssi_args;
Govind Singh89727882016-04-15 13:58:27 +0530908
909/**
Govind Singh3ddda1f2016-03-09 11:34:12 +0530910 * struct stats_request_params - stats_request cmd parameter
Gurumoorthi Gnanasambandhan7e23dd52017-08-10 22:12:36 +0530911 * @stats_id: Bit mask of all the STATS request are specified with values from wmi_host_stats_id
Govind Singh3ddda1f2016-03-09 11:34:12 +0530912 * @vdev_id: vdev id
Gurumoorthi Gnanasambandhan7e23dd52017-08-10 22:12:36 +0530913 * @pdev_id: pdev_id
Gurumoorthi Gnanasambandhan0a0e7272017-10-13 12:40:06 +0530914 * @wmi_host_inst_rssi_args: Instantaneous rssi stats args
Govind Singh3ddda1f2016-03-09 11:34:12 +0530915 */
916struct stats_request_params {
917 uint32_t stats_id;
Gurumoorthi Gnanasambandhan7e23dd52017-08-10 22:12:36 +0530918 uint8_t vdev_id;
919 uint8_t pdev_id;
Gurumoorthi Gnanasambandhan0a0e7272017-10-13 12:40:06 +0530920 wmi_host_inst_rssi_args rssi_args;
Govind Singh89727882016-04-15 13:58:27 +0530921};
922
923/**
924 * struct bss_chan_info_request_params - BSS chan info params
925 * @param: parameter value
926 */
927struct bss_chan_info_request_params {
928 uint32_t param;
Govind Singh3ddda1f2016-03-09 11:34:12 +0530929};
930
931/**
Govind Singh3ddda1f2016-03-09 11:34:12 +0530932 * struct wow_cmd_params - wow cmd parameter
933 * @enable: wow enable or disable flag
934 * @can_suspend_link: flag to indicate if link can be suspended
935 * @pause_iface_config: interface config
936 */
937struct wow_cmd_params {
938 bool enable;
939 bool can_suspend_link;
940 uint8_t pause_iface_config;
Dustin Browndee95c72016-11-10 11:25:36 -0800941 uint32_t flags;
Govind Singh3ddda1f2016-03-09 11:34:12 +0530942};
943
944/**
Govind Singh89727882016-04-15 13:58:27 +0530945 * struct wow_add_wakeup_params - wow wakeup parameter
946 * @type: param type
947 */
948struct wow_add_wakeup_params {
949 uint32_t type;
950};
951
952/**
953 * struct wow_add_wakeup_pattern_params - Add WoW pattern params
954 * @pattern_bytes: pointer to pattern bytes
955 * @mask_bytes: pointer to mask bytes
956 * @pattern_len: pattern length
957 * @pattern_id: pattern id
958 */
959struct wow_add_wakeup_pattern_params {
960 uint8_t *pattern_bytes;
961 uint8_t *mask_bytes;
962 uint32_t pattern_len;
963 uint32_t pattern_id;
964};
965
966/**
967 * struct wow_remove_wakeup_pattern params - WoW remove pattern param
968 * @pattern_bytes: pointer to pattern bytes
969 * @mask_bytes: Mask bytes
970 * @pattern_id: pattern identifier
971 */
972struct wow_remove_wakeup_pattern_params {
973 uint32_t *pattern_bytes;
974 uint32_t *mask_bytes;
975 uint32_t pattern_id;
976};
977
978
979/**
Govind Singh3ddda1f2016-03-09 11:34:12 +0530980 * struct packet_enable_params - packet enable cmd parameter
981 * @vdev_id: vdev id
982 * @enable: flag to indicate if parameter can be enabled or disabled
983 */
984struct packet_enable_params {
985 uint8_t vdev_id;
986 bool enable;
987};
988
989/**
990 * struct suspend_params - suspend cmd parameter
991 * @disable_target_intr: disable target interrupt
992 */
993struct suspend_params {
994 uint8_t disable_target_intr;
995};
996
997/**
998 * struct pdev_params - pdev set cmd parameter
999 * @param_id: parameter id
1000 * @param_value: parameter value
1001 */
1002struct pdev_params {
1003 uint32_t param_id;
1004 uint32_t param_value;
1005};
1006
1007/**
Govind Singh89727882016-04-15 13:58:27 +05301008 * struct beacon_tmpl_params - beacon template cmd parameter
1009 * @vdev_id: vdev id
1010 * @tim_ie_offset: tim ie offset
1011 * @tmpl_len: beacon template length
1012 * @tmpl_len_aligned: beacon template alignment
Sathish Kumar907a7462017-02-27 10:35:40 +05301013 * @csa_switch_count_offset: CSA swith count offset in beacon frame
1014 * @ext_csa_switch_count_offset: ECSA switch count offset in beacon frame
Govind Singh89727882016-04-15 13:58:27 +05301015 * @frm: beacon template parameter
1016 */
1017struct beacon_tmpl_params {
1018 uint8_t vdev_id;
1019 uint32_t tim_ie_offset;
1020 uint32_t tmpl_len;
1021 uint32_t tmpl_len_aligned;
Sathish Kumar907a7462017-02-27 10:35:40 +05301022 uint32_t csa_switch_count_offset;
1023 uint32_t ext_csa_switch_count_offset;
Govind Singh89727882016-04-15 13:58:27 +05301024 uint8_t *frm;
1025};
1026
Govind Singh89727882016-04-15 13:58:27 +05301027/**
1028 * struct beacon_params - beacon cmd parameter
1029 * @vdev_id: vdev id
1030 * @beaconInterval: Beacon interval
1031 * @wbuf: beacon buffer
1032 * @frame_ctrl: frame control field
1033 * @bcn_txant: beacon antenna
1034 * @is_dtim_count_zero: is it dtim beacon
1035 * @is_bitctl_reqd: is Bit control required
1036 * @is_high_latency: Is this high latency target
1037 */
1038struct beacon_params {
1039 uint8_t vdev_id;
1040 uint16_t beaconInterval;
1041 qdf_nbuf_t wbuf;
1042 uint16_t frame_ctrl;
1043 uint32_t bcn_txant;
1044 bool is_dtim_count_zero;
1045 bool is_bitctl_reqd;
1046 bool is_high_latency;
1047};
Govind Singh89727882016-04-15 13:58:27 +05301048
1049/**
Subrat Mishra7c9427e2017-09-27 14:41:20 +05301050 * struct fd_params - FD cmd parameter
1051 * @vdev_id: vdev id
1052 * @wbuf: FD buffer
1053 * @frame_ctrl: frame control field
1054 */
1055struct fd_params {
1056 uint8_t vdev_id;
1057 qdf_nbuf_t wbuf;
1058 uint16_t frame_ctrl;
1059};
1060
1061/**
Govind Singh89727882016-04-15 13:58:27 +05301062 * struct bcn_prb_template_params - beacon probe template parameter
1063 * @vdev_id: vdev id
1064 * @buf_len: Template length
1065 * @caps: capabilities field
1066 * @erp: ERP field
1067 */
1068struct bcn_prb_template_params {
1069 uint8_t vdev_id;
1070 int buf_len;
1071 uint16_t caps;
1072 uint8_t erp;
1073};
1074
1075#define WMI_MAX_SUPPORTED_RATES 128
1076/**
1077 * struct target_rate_set - Rate set bitmap
1078 * @num_rate: number of rates in rates bitmap
1079 * @rates: rates (each 8bit value) packed into a 32 bit word.
1080 * the rates are filled from least significant byte to most
1081 * significant byte.
1082 */
1083typedef struct {
1084 uint32_t num_rates;
1085 uint32_t rates[(WMI_MAX_SUPPORTED_RATES / 4) + 1];
1086} target_rate_set;
Govind Singh3ddda1f2016-03-09 11:34:12 +05301087
Kris Muthusamy1499bac2017-02-20 02:35:47 -08001088
Kris Muthusamyf575e2e2017-03-28 12:03:50 -07001089#define WMI_HOST_MAX_NUM_SS 8
1090#define WMI_HOST_MAX_HECAP_PHY_SIZE 3
Gyanranjan Hazarikaef7ebfe2017-08-29 03:52:18 -07001091#define WMI_HOST_MAX_HE_RATE_SET 3
Kris Muthusamy1499bac2017-02-20 02:35:47 -08001092/**
Krishna Kumaar Natarajan3f301ca2016-09-29 14:20:54 -07001093 * struct wmi_host_ppe_threshold -PPE threshold
1094 * @numss_m1: NSS - 1
1095 * @ru_bit_mask: RU bit mask indicating the supported RU's
1096 * @ppet16_ppet8_ru3_ru0: ppet8 and ppet16 for max num ss
Kris Muthusamy1499bac2017-02-20 02:35:47 -08001097 */
1098struct wmi_host_ppe_threshold {
1099 uint32_t numss_m1;
Krishna Kumaar Natarajan3f301ca2016-09-29 14:20:54 -07001100 uint32_t ru_bit_mask;
Kris Muthusamy1499bac2017-02-20 02:35:47 -08001101 uint32_t ppet16_ppet8_ru3_ru0[WMI_HOST_MAX_NUM_SS];
1102};
1103
Govind Singh3ddda1f2016-03-09 11:34:12 +05301104/**
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301105 * struct wmi_host_mac_addr - host mac addr 2 word representation of MAC addr
1106 * @mac_addr31to0: upper 4 bytes of MAC address
1107 * @mac_addr47to32: lower 2 bytes of MAC address
1108 */
1109typedef struct {
1110 uint32_t mac_addr31to0;
1111 uint32_t mac_addr47to32;
1112} wmi_host_mac_addr;
1113
1114/**
Govind Singh3ddda1f2016-03-09 11:34:12 +05301115 * struct peer_assoc_params - peer assoc cmd parameter
1116 * @peer_macaddr: peer mac address
1117 * @vdev_id: vdev id
1118 * @peer_new_assoc: peer association type
1119 * @peer_associd: peer association id
1120 * @peer_flags: peer flags
1121 * @peer_caps: peer capabalities
1122 * @peer_listen_intval: peer listen interval
1123 * @peer_ht_caps: HT capabalities
1124 * @peer_max_mpdu: 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k
1125 * @peer_mpdu_density: 3 : 0~7 : 2^(11nAMPDUdensity -4)
1126 * @peer_rate_caps: peer rate capabalities
1127 * @peer_nss: peer nss
1128 * @peer_phymode: peer phymode
1129 * @peer_ht_info: peer HT info
1130 * @peer_legacy_rates: peer legacy rates
1131 * @peer_ht_rates: peer ht rates
Govind Singh3ddda1f2016-03-09 11:34:12 +05301132 * @rx_max_rate: max rx rates
1133 * @rx_mcs_set: rx mcs
1134 * @tx_max_rate: max tx rates
1135 * @tx_mcs_set: tx mcs
1136 * @vht_capable: VHT capabalities
Govind Singh89727882016-04-15 13:58:27 +05301137 * @tx_max_mcs_nss: max tx MCS and NSS
1138 * @peer_bw_rxnss_override: Peer BW RX NSS overriden or not.
1139 * @is_pmf_enabled: PMF enabled
1140 * @is_wme_set: WME enabled
1141 * @qos_flag: QoS Flags
1142 * @apsd_flag: APSD flags
1143 * @ht_flag: HT flags
1144 * @bw_40: 40 capabale
1145 * @bw_80: 80 capabale
1146 * @bw_160: 160 capabale
1147 * @stbc_flag: STBC flag
1148 * @ldpc_flag: LDPC flag
1149 * @static_mimops_flag: statis MIMO PS flags
1150 * @dynamic_mimops_flag: Dynamic MIMO PS flags
1151 * @spatial_mux_flag: spatial MUX flags
1152 * @vht_flag: VHT flags
1153 * @vht_ng_flag: VHT on 11N/G flags
1154 * @need_ptk_4_way: Needs 4 way handshake
1155 * @need_gtk_2_way: Needs 2 way GTK
1156 * @auth_flag: Is peer authenticated
1157 * @safe_mode_enabled: Safe enabled for this peer
1158 * @amsdu_disable: AMSDU disble
1159 * @peer_mac: Peer mac address
Kris Muthusamye66c6bf2017-02-20 20:21:04 -08001160 * @he_flag: HE flags
Kris Muthusamy1499bac2017-02-20 02:35:47 -08001161 * @peer_he_cap_macinfo: Peer HE Cap MAC info
1162 * @peer_he_ops: Peer HE operation info
1163 * @peer_he_cap_phyinfo: Peer HE Cap PHY info
Kris Muthusamyf575e2e2017-03-28 12:03:50 -07001164 * @peer_he_mcs_count: Peer HE MCS TX/RX MAP count
1165 * @peer_he_rx_mcs_set: Peer HE RX MCS MAP
1166 * @peer_he_tx_mcs_set: Peer HE TX MCS MAP
Kris Muthusamy1499bac2017-02-20 02:35:47 -08001167 * @peer_ppet: Peer HE PPET info
Govind Singh3ddda1f2016-03-09 11:34:12 +05301168 */
1169struct peer_assoc_params {
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301170 wmi_host_mac_addr peer_macaddr;
Govind Singh3ddda1f2016-03-09 11:34:12 +05301171 uint32_t vdev_id;
1172 uint32_t peer_new_assoc;
1173 uint32_t peer_associd;
1174 uint32_t peer_flags;
1175 uint32_t peer_caps;
1176 uint32_t peer_listen_intval;
1177 uint32_t peer_ht_caps;
1178 uint32_t peer_max_mpdu;
1179 uint32_t peer_mpdu_density;
1180 uint32_t peer_rate_caps;
1181 uint32_t peer_nss;
1182 uint32_t peer_vht_caps;
1183 uint32_t peer_phymode;
1184 uint32_t peer_ht_info[2];
Govind Singh89727882016-04-15 13:58:27 +05301185 target_rate_set peer_legacy_rates;
1186 target_rate_set peer_ht_rates;
Govind Singh3ddda1f2016-03-09 11:34:12 +05301187 uint32_t rx_max_rate;
1188 uint32_t rx_mcs_set;
1189 uint32_t tx_max_rate;
1190 uint32_t tx_mcs_set;
1191 uint8_t vht_capable;
Krishna Rao938daa82017-03-20 13:30:10 +05301192 uint32_t peer_bw_rxnss_override;
Kiran Venkatappa9da7e042016-08-09 22:52:35 +05301193#ifndef CONFIG_MCL
Govind Singh89727882016-04-15 13:58:27 +05301194 uint32_t tx_max_mcs_nss;
Govind Singh89727882016-04-15 13:58:27 +05301195 bool is_pmf_enabled;
1196 bool is_wme_set;
1197 bool qos_flag;
1198 bool apsd_flag;
1199 bool ht_flag;
1200 bool bw_40;
1201 bool bw_80;
1202 bool bw_160;
1203 bool stbc_flag;
1204 bool ldpc_flag;
1205 bool static_mimops_flag;
1206 bool dynamic_mimops_flag;
1207 bool spatial_mux_flag;
1208 bool vht_flag;
1209 bool vht_ng_flag;
1210 bool need_ptk_4_way;
1211 bool need_gtk_2_way;
1212 bool auth_flag;
1213 bool safe_mode_enabled;
1214 bool amsdu_disable;
1215 /* Use common structure */
1216 uint8_t peer_mac[IEEE80211_ADDR_LEN];
1217#endif
Kris Muthusamye66c6bf2017-02-20 20:21:04 -08001218 bool he_flag;
Kris Muthusamy1499bac2017-02-20 02:35:47 -08001219 uint32_t peer_he_cap_macinfo;
1220 uint32_t peer_he_ops;
Kris Muthusamye66c6bf2017-02-20 20:21:04 -08001221 uint32_t peer_he_cap_phyinfo[WMI_HOST_MAX_HECAP_PHY_SIZE];
Kris Muthusamyf575e2e2017-03-28 12:03:50 -07001222 uint32_t peer_he_mcs_count;
1223 uint32_t peer_he_rx_mcs_set[WMI_HOST_MAX_HE_RATE_SET];
1224 uint32_t peer_he_tx_mcs_set[WMI_HOST_MAX_HE_RATE_SET];
Kris Muthusamy1499bac2017-02-20 02:35:47 -08001225 struct wmi_host_ppe_threshold peer_ppet;
Govind Singh3ddda1f2016-03-09 11:34:12 +05301226};
1227
1228/**
1229 * struct sta_ps_params - sta ps cmd parameter
1230 * @vdev_id: vdev id
1231 * @param: sta ps paramter
1232 * @value: sta ps parameter value
1233 */
1234struct sta_ps_params {
1235 uint32_t vdev_id;
1236 uint32_t param;
1237 uint32_t value;
1238};
1239
1240/**
1241 * struct ap_ps_params - ap ps cmd parameter
1242 * @vdev_id: vdev id
1243 * @param: ap ps paramter
1244 * @value: ap ps paramter value
1245 */
1246struct ap_ps_params {
1247 uint32_t vdev_id;
1248 uint32_t param;
1249 uint32_t value;
1250};
1251
Govind Singh89727882016-04-15 13:58:27 +05301252#define WMI_HOST_SCAN_CHAN_FREQ_SHIFT 0
1253#define WMI_HOST_SCAN_CHAN_FREQ_MASK 0xffff
1254#define WMI_HOST_SCAN_CHAN_MODE_SHIFT 16
1255#define WMI_HOST_SCAN_CHAN_MODE_MASK 0xff
1256
Om Prakash Tripathi0d0976b2017-12-15 17:29:55 +05301257#define WMI_HOST_MAX_CHANS_PER_WMI_CMD 58
1258
Govind Singh3ddda1f2016-03-09 11:34:12 +05301259/**
Govind Singh3ddda1f2016-03-09 11:34:12 +05301260 * struct scan_chan_list_params - scan channel list cmd parameter
1261 * @num_scan_chans: no of scan channels
1262 * @chan_info: pointer to wmi channel info
1263 */
Govind Singhfa201d92016-06-08 19:40:11 +05301264#ifdef CONFIG_MCL
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301265/* TODO: This needs clean-up based on how its processed. */
1266typedef struct {
1267 /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */
1268 uint32_t tlv_header;
1269 /** primary 20 MHz channel frequency in mhz */
1270 uint32_t mhz;
1271 /** Center frequency 1 in MHz*/
1272 uint32_t band_center_freq1;
1273 /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
1274 uint32_t band_center_freq2;
1275 /** channel info described below */
1276 uint32_t info;
1277 /** contains min power, max power, reg power and reg class id. */
1278 uint32_t reg_info_1;
1279 /** contains antennamax */
1280 uint32_t reg_info_2;
1281} wmi_channel_param;
1282
Govind Singh3ddda1f2016-03-09 11:34:12 +05301283struct scan_chan_list_params {
Anish Nataraj61e4f4c2017-03-20 12:49:08 +05301284 uint32_t pdev_id;
Govind Singh3ddda1f2016-03-09 11:34:12 +05301285 uint8_t num_scan_chans;
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301286 wmi_channel_param *chan_info;
Govind Singh3ddda1f2016-03-09 11:34:12 +05301287};
Govind Singh89727882016-04-15 13:58:27 +05301288#else
1289/**
1290 * struct scan_chan_list_params - scan channel list cmd parameter
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05301291 * @pdev_id: pdev_id
Govind Singh89727882016-04-15 13:58:27 +05301292 * @num_chan: no of scan channels
1293 * @nallchans: nall chans
Om Prakash Tripathi0d0976b2017-12-15 17:29:55 +05301294 * @append: append to existing chan list
Govind Singh89727882016-04-15 13:58:27 +05301295 * @ch_param: pointer to channel_paramw
1296 */
1297struct scan_chan_list_params {
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05301298 uint32_t pdev_id;
Govind Singh89727882016-04-15 13:58:27 +05301299 uint16_t nallchans;
Om Prakash Tripathi0d0976b2017-12-15 17:29:55 +05301300 bool append;
Govind Singh89727882016-04-15 13:58:27 +05301301 struct channel_param ch_param[1];
1302};
1303#endif
Govind Singh3ddda1f2016-03-09 11:34:12 +05301304
1305/**
Sathish Kumar907a7462017-02-27 10:35:40 +05301306 * struct multiple_vdev_restart_params - Multiple vdev restart cmd parameter
1307 * @pdev_id: Pdev identifier
1308 * @requestor_id: Unique id identifying the module
1309 * @disable_hw_ack: Flag to indicate disabling HW ACK during CAC
1310 * @cac_duration_ms: CAC duration on the given channel
1311 * @num_vdevs: No. of vdevs that need to be restarted
1312 * @ch_param: Pointer to channel_param
1313 * @vdev_ids: Pointer to array of vdev_ids
1314 */
1315struct multiple_vdev_restart_params {
1316 uint32_t pdev_id;
1317 uint32_t requestor_id;
1318 uint32_t disable_hw_ack;
1319 uint32_t cac_duration_ms;
1320 uint32_t num_vdevs;
1321 struct channel_param ch_param;
1322 uint32_t vdev_ids[WMI_HOST_PDEV_MAX_VDEVS];
1323};
1324/**
Govind Singh3ddda1f2016-03-09 11:34:12 +05301325 * struct fw_hang_params - fw hang command parameters
1326 * @type: 0:unused 1: ASSERT, 2:not respond detect command, 3:simulate ep-full
1327 * @delay_time_ms: 0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)
1328 */
1329struct fw_hang_params {
1330 uint32_t type;
1331 uint32_t delay_time_ms;
1332};
1333
1334/**
1335 * struct pdev_utf_params - pdev utf command parameters
1336 * @utf_payload:
1337 * @len:
Govind Singh89727882016-04-15 13:58:27 +05301338 * @is_ar900b: is it 900b target
Govind Singh3ddda1f2016-03-09 11:34:12 +05301339 */
1340struct pdev_utf_params {
1341 uint8_t *utf_payload;
1342 uint32_t len;
Kiran Venkatappa9da7e042016-08-09 22:52:35 +05301343#ifndef CONFIG_MCL
Govind Singh89727882016-04-15 13:58:27 +05301344 bool is_ar900b;
1345#endif
Govind Singh3ddda1f2016-03-09 11:34:12 +05301346};
1347
Govind Singh89727882016-04-15 13:58:27 +05301348/*Adding this due to dependency on wmi_unified.h
1349 */
1350typedef struct {
1351 uint32_t len;
1352 uint32_t msgref;
1353 uint32_t segmentInfo;
1354} QVIT_SEG_HDR_INFO_STRUCT;
1355
1356struct pdev_qvit_params {
1357 uint8_t *utf_payload;
1358 uint32_t len;
1359};
Govind Singh3ddda1f2016-03-09 11:34:12 +05301360/**
1361 * struct crash_inject - crash inject command parameters
1362 * @type: crash inject type
1363 * @delay_time_ms: time in milliseconds for FW to delay the crash
1364 */
1365struct crash_inject {
1366 uint32_t type;
1367 uint32_t delay_time_ms;
1368};
1369
1370/**
1371 * struct dbglog_params - fw deboglog command parameters
1372 * @param: command parameter
1373 * @val: parameter value
1374 * @module_id_bitmap: fixed length module id bitmap
1375 * @bitmap_len: module id bitmap length
Govind Singh89727882016-04-15 13:58:27 +05301376 * @cfgvalid: cfgvalid
Govind Singh3ddda1f2016-03-09 11:34:12 +05301377 */
1378struct dbglog_params {
1379 uint32_t param;
1380 uint32_t val;
1381 uint32_t *module_id_bitmap;
1382 uint32_t bitmap_len;
Kiran Venkatappa9da7e042016-08-09 22:52:35 +05301383#ifndef CONFIG_MCL
Govind Singh89727882016-04-15 13:58:27 +05301384 uint32_t cfgvalid[2];
1385#endif
Govind Singh3ddda1f2016-03-09 11:34:12 +05301386};
1387
1388/**
1389 * struct seg_hdr_info - header info
1390 * @len: length
1391 * @msgref: message refrence
1392 * @segmentInfo: segment info
1393 * @pad: padding
1394 */
1395struct seg_hdr_info {
1396 uint32_t len;
1397 uint32_t msgref;
1398 uint32_t segmentInfo;
1399 uint32_t pad;
1400};
1401
1402/**
Sathish Kumare10a1c52017-06-28 14:40:32 +05301403 * struct tx_send_params - TX parameters
1404 * @pwr: Tx frame transmission power
1405 * @mcs_mask: Modulation and coding index mask for transmission
1406 * bit 0 -> CCK 1 Mbps rate is allowed
1407 * bit 1 -> CCK 2 Mbps rate is allowed
1408 * bit 2 -> CCK 5.5 Mbps rate is allowed
1409 * bit 3 -> CCK 11 Mbps rate is allowed
1410 * bit 4 -> OFDM BPSK modulation, 1/2 coding rate is allowed
1411 * bit 5 -> OFDM BPSK modulation, 3/4 coding rate is allowed
1412 * bit 6 -> OFDM QPSK modulation, 1/2 coding rate is allowed
1413 * bit 7 -> OFDM QPSK modulation, 3/4 coding rate is allowed
1414 * bit 8 -> OFDM 16-QAM modulation, 1/2 coding rate is allowed
1415 * bit 9 -> OFDM 16-QAM modulation, 3/4 coding rate is allowed
1416 * bit 10 -> OFDM 64-QAM modulation, 2/3 coding rate is allowed
1417 * bit 11 -> OFDM 64-QAM modulation, 3/4 coding rate is allowed
1418 * @nss_mask: Spatial streams permitted
1419 * bit 0: if set, Nss = 1 (non-MIMO) is permitted
1420 * bit 1: if set, Nss = 2 (2x2 MIMO) is permitted
1421 * bit 2: if set, Nss = 3 (3x3 MIMO) is permitted
1422 * bit 3: if set, Nss = 4 (4x4 MIMO) is permitted
1423 * bit 4: if set, Nss = 5 (5x5 MIMO) is permitted
1424 * bit 5: if set, Nss = 6 (6x6 MIMO) is permitted
1425 * bit 6: if set, Nss = 7 (7x7 MIMO) is permitted
1426 * bit 7: if set, Nss = 8 (8x8 MIMO) is permitted
1427 * If no bits are set, target will choose what NSS type to use
1428 * @retry_limit: Maximum number of retries before ACK
1429 * @chain_mask: Chains to be used for transmission
1430 * @bw_mask: Bandwidth to be used for transmission
1431 * bit 0 -> 5MHz
1432 * bit 1 -> 10MHz
1433 * bit 2 -> 20MHz
1434 * bit 3 -> 40MHz
1435 * bit 4 -> 80MHz
1436 * bit 5 -> 160MHz
1437 * bit 6 -> 80_80MHz
1438 * @preamble_type: Preamble types for transmission
1439 * bit 0: if set, OFDM
1440 * bit 1: if set, CCK
1441 * bit 2: if set, HT
1442 * bit 3: if set, VHT
1443 * bit 4: if set, HE
1444 * @frame_type: Data or Management frame
1445 * Data:1 Mgmt:0
1446 */
1447struct tx_send_params {
1448 uint32_t pwr:8,
1449 mcs_mask:12,
1450 nss_mask:8,
1451 retry_limit:4;
1452 uint32_t chain_mask:8,
1453 bw_mask:7,
1454 preamble_type:5,
1455 frame_type:1,
1456 reserved:11;
1457};
1458
1459/**
Govind Singh3ddda1f2016-03-09 11:34:12 +05301460 * struct wmi_mgmt_params - wmi mgmt cmd paramters
1461 * @tx_frame: management tx frame
Govind Singh89727882016-04-15 13:58:27 +05301462 * @frm_len: frame length
Govind Singh3ddda1f2016-03-09 11:34:12 +05301463 * @vdev_id: vdev id
Govind Singh3ddda1f2016-03-09 11:34:12 +05301464 * @chanfreq: channel frequency
1465 * @pdata: frame data
Govind Singh89727882016-04-15 13:58:27 +05301466 * @desc_id: descriptor id relyaed back by target
Sravan Kumar Kairam290dc362017-07-19 17:38:20 +05301467 * @macaddr: macaddr of peer
Kiran Venkatappa25c47022017-03-19 22:58:09 +05301468 * @qdf_ctx: qdf context for qdf_nbuf_map
Sathish Kumare10a1c52017-06-28 14:40:32 +05301469 * @tx_param: TX send parameters
1470 * @tx_params_valid: Flag that indicates if TX params are valid
Sravan Kumar Kairam290dc362017-07-19 17:38:20 +05301471 * @use_6mbps: specify whether management frame to transmit should
1472 * use 6 Mbps rather than 1 Mbps min rate(for 5GHz band or P2P)
1473 * @tx_type: type of managment frame (determines what callback to use)
Govind Singh3ddda1f2016-03-09 11:34:12 +05301474 */
1475struct wmi_mgmt_params {
1476 void *tx_frame;
1477 uint16_t frm_len;
1478 uint8_t vdev_id;
Govind Singh3ddda1f2016-03-09 11:34:12 +05301479 uint16_t chanfreq;
1480 void *pdata;
Govind Singh89727882016-04-15 13:58:27 +05301481 uint16_t desc_id;
1482 uint8_t *macaddr;
Govind Singhd7468a52016-03-09 14:32:57 +05301483 void *qdf_ctx;
Sathish Kumare10a1c52017-06-28 14:40:32 +05301484 struct tx_send_params tx_param;
1485 bool tx_params_valid;
Sravan Kumar Kairam290dc362017-07-19 17:38:20 +05301486 uint8_t use_6mbps;
1487 uint8_t tx_type;
Govind Singh3ddda1f2016-03-09 11:34:12 +05301488};
Govind Singhbffe4de2016-02-26 17:50:39 +05301489
1490/**
Kiran Venkatappa25c47022017-03-19 22:58:09 +05301491 * struct wmi_offchan_data_tx_params - wmi offchan data tx cmd paramters
1492 * @tx_frame: management tx frame
1493 * @frm_len: frame length
1494 * @vdev_id: vdev id
1495 * @chanfreq: channel frequency
1496 * @pdata: frame data
1497 * @desc_id: descriptor id relyaed back by target
1498 * @macaddr: macaddr of peer
1499 * @qdf_ctx: qdf context for qdf_nbuf_map
Sathish Kumare10a1c52017-06-28 14:40:32 +05301500 * @tx_param: TX send parameters
1501 * @tx_params_valid: Flag that indicates if TX params are valid
Kiran Venkatappa25c47022017-03-19 22:58:09 +05301502 */
1503struct wmi_offchan_data_tx_params {
1504 void *tx_frame;
1505 uint16_t frm_len;
1506 uint8_t vdev_id;
1507 uint16_t chanfreq;
1508 void *pdata;
1509 uint16_t desc_id;
1510 uint8_t *macaddr;
1511 void *qdf_ctx;
Sathish Kumare10a1c52017-06-28 14:40:32 +05301512 struct tx_send_params tx_param;
1513 bool tx_params_valid;
Kiran Venkatappa25c47022017-03-19 22:58:09 +05301514};
1515
1516/**
Govind Singhbffe4de2016-02-26 17:50:39 +05301517 * struct p2p_ps_params - P2P powersave related params
1518 * @opp_ps: opportunistic power save
1519 * @ctwindow: CT window
1520 * @count: count
1521 * @duration: duration
1522 * @interval: interval
1523 * @single_noa_duration: single shot noa duration
1524 * @ps_selection: power save selection
1525 * @session_id: session id
1526 */
1527struct p2p_ps_params {
1528 uint8_t opp_ps;
1529 uint32_t ctwindow;
1530 uint8_t count;
1531 uint32_t duration;
1532 uint32_t interval;
1533 uint32_t single_noa_duration;
1534 uint8_t ps_selection;
1535 uint8_t session_id;
1536};
1537
Frank Liu0ba573b2017-03-15 17:51:43 +08001538#ifndef CONVERGED_TDLS_ENABLE
1539/**
1540 * struct sta_uapsd_params - uapsd auto trig params
1541 * @wmm_ac: WMM access category from 0 to 3
1542 * @user_priority: User priority to use in trigger frames
1543 * @service_interval: service interval
1544 * @suspend_interval: suspend interval
1545 * @delay_interval: delay interval
1546 */
1547struct sta_uapsd_params {
1548 uint32_t wmm_ac;
1549 uint32_t user_priority;
1550 uint32_t service_interval;
1551 uint32_t suspend_interval;
1552 uint32_t delay_interval;
1553};
Govind Singhbffe4de2016-02-26 17:50:39 +05301554
1555/**
1556 * struct ta_uapsd_trig_params - uapsd trigger parameter
1557 * @vdevid: vdev id
1558 * @peer_addr: peer address
1559 * @auto_triggerparam: trigger parameters
1560 * @num_ac: no of access category
1561 */
1562struct sta_uapsd_trig_params {
1563 uint32_t vdevid;
1564 uint8_t peer_addr[IEEE80211_ADDR_LEN];
Frank Liu0ba573b2017-03-15 17:51:43 +08001565 struct sta_uapsd_params *auto_triggerparam;
Govind Singhbffe4de2016-02-26 17:50:39 +05301566 uint32_t num_ac;
1567};
Frank Liu0ba573b2017-03-15 17:51:43 +08001568#endif
Govind Singhe7b800c2016-03-01 15:30:53 +05301569
Zhang Qian74a66aa2018-01-05 16:50:53 +08001570#define WMI_NUM_AC (4)
Govind Singhe7b800c2016-03-01 15:30:53 +05301571#define WMI_MAX_NUM_AC 4
Govind Singhe7b800c2016-03-01 15:30:53 +05301572
Govind Singh9bad0002016-03-01 15:54:59 +05301573
Poddar, Siddarth794b9962016-04-28 15:49:11 +05301574enum wmi_peer_rate_report_cond_phy_type {
1575 WMI_PEER_RATE_REPORT_COND_11B = 0,
1576 WMI_PEER_RATE_REPORT_COND_11A_G,
1577 WMI_PEER_RATE_REPORT_COND_11N,
1578 WMI_PEER_RATE_REPORT_COND_11AC,
1579 WMI_PEER_RATE_REPORT_COND_MAX_NUM
1580};
1581
1582/**
1583 * struct report_rate_delta - peer specific parameters
1584 * @percent: percentage
1585 * @delta_min: rate min delta
1586 */
1587struct report_rate_delta {
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301588 uint32_t percent; /* in unit of 12.5% */
1589 uint32_t delta_min; /* in unit of Mbps */
Poddar, Siddarth794b9962016-04-28 15:49:11 +05301590};
1591
1592/**
1593 * struct report_rate_per_phy - per phy report parameters
1594 * @cond_flags: condition flag val
1595 * @delta: rate delta
1596 * @report_rate_threshold: rate threshold
1597 */
1598struct report_rate_per_phy {
1599 /*
1600 * PEER_RATE_REPORT_COND_FLAG_DELTA,
1601 * PEER_RATE_REPORT_COND_FLAG_THRESHOLD
1602 * Any of these two conditions or both of
1603 * them can be set.
1604 */
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301605 uint32_t cond_flags;
Poddar, Siddarth794b9962016-04-28 15:49:11 +05301606 struct report_rate_delta delta;
1607 /*
1608 * In unit of Mbps. There are at most 4 thresholds
1609 * If the threshold count is less than 4, set zero to
1610 * the one following the last threshold
1611 */
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301612 uint32_t report_rate_threshold[WMI_MAX_NUM_OF_RATE_THRESH];
Poddar, Siddarth794b9962016-04-28 15:49:11 +05301613};
1614
1615/**
1616 * struct peer_rate_report_params - peer rate report parameters
1617 * @rate_report_enable: enable rate report param
1618 * @backoff_time: backoff time
1619 * @timer_period: timer
1620 * @report_per_phy: report per phy type
1621 */
1622struct wmi_peer_rate_report_params {
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301623 uint32_t rate_report_enable;
1624 uint32_t backoff_time; /* in unit of msecond */
1625 uint32_t timer_period; /* in unit of msecond */
Poddar, Siddarth794b9962016-04-28 15:49:11 +05301626 /*
1627 *In the following field, the array index means the phy type,
1628 * please see enum wmi_peer_rate_report_cond_phy_type for detail
1629 */
1630 struct report_rate_per_phy report_per_phy[
1631 WMI_PEER_RATE_REPORT_COND_MAX_NUM];
1632
1633};
1634
Govind Singh9bad0002016-03-01 15:54:59 +05301635/**
1636 * struct t_thermal_cmd_params - thermal command parameters
1637 * @min_temp: minimum temprature
1638 * @max_temp: maximum temprature
1639 * @thermal_enable: thermal enable
1640 */
1641struct thermal_cmd_params {
1642 uint16_t min_temp;
1643 uint16_t max_temp;
1644 uint8_t thermal_enable;
1645};
1646
1647#define WMI_LRO_IPV4_SEED_ARR_SZ 5
1648#define WMI_LRO_IPV6_SEED_ARR_SZ 11
1649
1650/**
1651 * struct wmi_lro_config_cmd_t - set LRO init parameters
1652 * @lro_enable: indicates whether lro is enabled
1653 * @tcp_flag: If the TCP flags from the packet do not match
1654 * the values in this field after masking with TCP flags mask
1655 * below, packet is not LRO eligible
1656 * @tcp_flag_mask: field for comparing the TCP values provided
1657 * above with the TCP flags field in the received packet
1658 * @toeplitz_hash_ipv4: contains seed needed to compute the flow id
1659 * 5-tuple toeplitz hash for ipv4 packets
1660 * @toeplitz_hash_ipv6: contains seed needed to compute the flow id
1661 * 5-tuple toeplitz hash for ipv6 packets
1662 */
1663struct wmi_lro_config_cmd_t {
1664 uint32_t lro_enable;
1665 uint32_t tcp_flag:9,
1666 tcp_flag_mask:9;
1667 uint32_t toeplitz_hash_ipv4[WMI_LRO_IPV4_SEED_ARR_SZ];
1668 uint32_t toeplitz_hash_ipv6[WMI_LRO_IPV6_SEED_ARR_SZ];
1669};
Govind Singhae855362016-03-07 14:24:22 +05301670
1671/**
1672 * struct gtx_config_t - GTX config
1673 * @gtx_rt_mask: for HT and VHT rate masks
1674 * @gtx_usrcfg: host request for GTX mask
1675 * @gtx_threshold: PER Threshold (default: 10%)
1676 * @gtx_margin: PER margin (default: 2%)
1677 * @gtx_tcpstep: TCP step (default: 1)
1678 * @gtx_tpcMin: TCP min (default: 5)
1679 * @gtx_bwmask: BW mask (20/40/80/160 Mhz)
1680 */
1681struct wmi_gtx_config {
1682 uint32_t gtx_rt_mask[2];
1683 uint32_t gtx_usrcfg;
1684 uint32_t gtx_threshold;
1685 uint32_t gtx_margin;
1686 uint32_t gtx_tpcstep;
1687 uint32_t gtx_tpcmin;
1688 uint32_t gtx_bwmask;
1689};
1690
1691/**
1692 * struct wmi_probe_resp_params - send probe response parameters
Krunal Soni36f17d42017-11-14 15:42:48 -08001693 * @prb_rsp_template_frm: pointer to template probe response template
1694 * @prb_rsp_template_len: length of probe response template
Govind Singhae855362016-03-07 14:24:22 +05301695 */
1696struct wmi_probe_resp_params {
Krunal Soni36f17d42017-11-14 15:42:48 -08001697 uint8_t *prb_rsp_template_frm;
1698 uint32_t prb_rsp_template_len;
Govind Singhae855362016-03-07 14:24:22 +05301699};
1700
Himanshu Agarwal9efd9bf2016-03-09 18:49:18 +05301701/* struct set_key_params: structure containing
1702 * installation key parameters
1703 * @vdev_id: vdev id
1704 * @key_len: key length
1705 * @key_idx: key index
1706 * @peer_mac: peer mac address
1707 * @key_flags: key flags, 0:pairwise key, 1:group key, 2:static key
1708 * @key_cipher: key cipher based on security mode
1709 * @key_txmic_len: tx mic length
1710 * @key_rxmic_len: rx mic length
Gurumoorthi Gnanasambandhan0d283282017-01-10 20:51:02 +05301711 * @key_tsc_counter: key tx sc counter
1712 * @key_rsc_counter: key rx sc counter
Himanshu Agarwal9efd9bf2016-03-09 18:49:18 +05301713 * @rx_iv: receive IV, applicable only in case of WAPI
1714 * @tx_iv: transmit IV, applicable only in case of WAPI
1715 * @key_data: key data
1716 */
1717struct set_key_params {
1718 uint8_t vdev_id;
1719 uint16_t key_len;
1720 uint32_t key_idx;
1721 uint8_t peer_mac[IEEE80211_ADDR_LEN];
1722 uint32_t key_flags;
1723 uint32_t key_cipher;
1724 uint32_t key_txmic_len;
1725 uint32_t key_rxmic_len;
Gurumoorthi Gnanasambandhan0d283282017-01-10 20:51:02 +05301726 uint64_t key_tsc_counter;
1727 uint64_t *key_rsc_counter;
1728#if defined(ATH_SUPPORT_WAPI) || defined(FEATURE_WLAN_WAPI)
Himanshu Agarwal9efd9bf2016-03-09 18:49:18 +05301729 uint8_t rx_iv[16];
1730 uint8_t tx_iv[16];
1731#endif
1732 uint8_t key_data[WMI_MAC_MAX_KEY_LENGTH];
1733};
1734
Govind Singhae855362016-03-07 14:24:22 +05301735/**
1736 * struct sta_params - sta keep alive parameters
1737 * @vdev_id: vdev id
1738 * @method: keep alive method
1739 * @timeperiod: time to keep alive
1740 * @hostv4addr: host ipv4 address
1741 * @destv4addr: destination ipv4 address
1742 * @destmac: destination mac address
1743 */
1744struct sta_params {
1745 uint8_t vdev_id;
1746 uint32_t method;
1747 uint32_t timeperiod;
1748 uint8_t *hostv4addr;
1749 uint8_t *destv4addr;
1750 uint8_t *destmac;
1751};
1752
1753/**
1754 * struct gateway_update_req_param - gateway parameter update request
1755 * @request_id: request id
1756 * @session_id: session id
1757 * @max_retries: Max ARP/NS retry attempts
1758 * @timeout: Retry interval
1759 * @ipv4_addr_type: on ipv4 network
1760 * @ipv6_addr_type: on ipv6 network
1761 * @gw_mac_addr: gateway mac addr
1762 * @ipv4_addr: ipv4 addr
1763 * @ipv6_addr: ipv6 addr
1764 */
1765struct gateway_update_req_param {
1766 uint32_t request_id;
1767 uint32_t session_id;
1768 uint32_t max_retries;
1769 uint32_t timeout;
1770 uint32_t ipv4_addr_type;
1771 uint32_t ipv6_addr_type;
Govind Singhd7468a52016-03-09 14:32:57 +05301772 struct qdf_mac_addr gw_mac_addr;
1773 uint8_t ipv4_addr[QDF_IPV4_ADDR_SIZE];
1774 uint8_t ipv6_addr[QDF_IPV6_ADDR_SIZE];
Govind Singhae855362016-03-07 14:24:22 +05301775};
1776
1777/**
1778 * struct rssi_monitor_param - rssi monitoring
1779 * @request_id: request id
1780 * @session_id: session id
1781 * @min_rssi: minimum rssi
1782 * @max_rssi: maximum rssi
1783 * @control: flag to indicate start or stop
1784 */
1785struct rssi_monitor_param {
1786 uint32_t request_id;
1787 uint32_t session_id;
1788 int8_t min_rssi;
1789 int8_t max_rssi;
1790 bool control;
1791};
1792
1793/**
1794 * struct scan_mac_oui - oui paramters
1795 * @oui: oui parameters
Rajeev Kumar Sirasanagandlad84e7e92017-06-08 18:12:50 +05301796 * @vdev_id: interface id
1797 * @enb_probe_req_sno_randomization: control probe req sequence no randomization
Rajeev Kumar Sirasanagandlaf3aaa332017-06-21 12:01:22 +05301798 * @ie_whitelist: probe req IE whitelist attrs
Govind Singhae855362016-03-07 14:24:22 +05301799 */
1800struct scan_mac_oui {
1801 uint8_t oui[WMI_WIFI_SCANNING_MAC_OUI_LENGTH];
Rajeev Kumar Sirasanagandlad84e7e92017-06-08 18:12:50 +05301802 uint32_t vdev_id;
1803 bool enb_probe_req_sno_randomization;
Rajeev Kumar Sirasanagandlaf3aaa332017-06-21 12:01:22 +05301804 struct probe_req_whitelist_attr ie_whitelist;
Govind Singhae855362016-03-07 14:24:22 +05301805};
1806
1807#define WMI_PASSPOINT_REALM_LEN 256
1808#define WMI_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
1809#define WMI_PASSPOINT_PLMN_LEN 3
1810/**
1811 * struct wifi_passpoint_network_param - passpoint network block
1812 * @id: identifier of this network block
1813 * @realm: null terminated UTF8 encoded realm, 0 if unspecified
1814 * @roaming_consortium_ids: roaming consortium ids to match, 0s if unspecified
1815 * @plmn: mcc/mnc combination as per rules, 0s if unspecified
1816 */
1817struct wifi_passpoint_network_param {
1818 uint32_t id;
1819 uint8_t realm[WMI_PASSPOINT_REALM_LEN];
1820 int64_t roaming_consortium_ids[WMI_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM];
1821 uint8_t plmn[WMI_PASSPOINT_PLMN_LEN];
1822};
1823
1824/**
1825 * struct wifi_passpoint_req_param - passpoint request
1826 * @request_id: request identifier
1827 * @num_networks: number of networks
1828 * @networks: passpoint networks
1829 */
1830struct wifi_passpoint_req_param {
1831 uint32_t request_id;
1832 uint32_t session_id;
1833 uint32_t num_networks;
1834 struct wifi_passpoint_network_param networks[];
1835};
1836
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301837/* struct mobility_domain_info - structure containing
1838 * mobility domain info
1839 * @mdie_present: mobility domain present or not
1840 * @mobility_domain: mobility domain
1841 */
1842struct mobility_domain_info {
1843 uint8_t mdie_present;
1844 uint16_t mobility_domain;
1845};
1846
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301847#define WMI_HOST_ROAM_OFFLOAD_NUM_MCS_SET (16)
1848
1849/* This TLV will be filled only in case roam offload
Deepak Dhamdherea65998e2017-02-09 19:40:26 -08001850 * for wpa2-psk/pmkid/ese/11r is enabled */
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301851typedef struct {
1852 /*
1853 * TLV tag and len; tag equals
1854 * WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param
1855 */
1856 uint32_t tlv_header;
1857 uint32_t rssi_cat_gap; /* gap for every category bucket */
1858 uint32_t prefer_5g; /* prefer select 5G candidate */
1859 uint32_t select_5g_margin;
1860 uint32_t reassoc_failure_timeout; /* reassoc failure timeout */
1861 uint32_t capability;
1862 uint32_t ht_caps_info;
1863 uint32_t ampdu_param;
1864 uint32_t ht_ext_cap;
1865 uint32_t ht_txbf;
1866 uint32_t asel_cap;
1867 uint32_t qos_enabled;
1868 uint32_t qos_caps;
1869 uint32_t wmm_caps;
1870 /* since this is 4 byte aligned, we don't declare it as tlv array */
1871 uint32_t mcsset[WMI_HOST_ROAM_OFFLOAD_NUM_MCS_SET >> 2];
1872} roam_offload_param;
1873
Vignesh Viswanathan90cd7742017-09-25 14:36:38 +05301874#define WMI_FILS_MAX_RRK_LENGTH 64
1875#define WMI_FILS_MAX_RIK_LENGTH WMI_FILS_MAX_RRK_LENGTH
1876#define WMI_FILS_MAX_REALM_LENGTH 256
1877#define WMI_FILS_MAX_USERNAME_LENGTH 16
1878
1879/**
1880 * struct roam_fils_params - Roam FILS params
1881 * @username: username
1882 * @username_length: username length
1883 * @next_erp_seq_num: next ERP sequence number
1884 * @rrk: RRK
1885 * @rrk_length: length of @rrk
1886 * @rik: RIK
1887 * @rik_length: length of @rik
1888 * @realm: realm
1889 * @realm_len: length of @realm
1890 */
1891struct roam_fils_params {
1892 uint8_t username[WMI_FILS_MAX_USERNAME_LENGTH];
1893 uint32_t username_length;
1894 uint32_t next_erp_seq_num;
1895 uint8_t rrk[WMI_FILS_MAX_RRK_LENGTH];
1896 uint32_t rrk_length;
1897 uint8_t rik[WMI_FILS_MAX_RIK_LENGTH];
1898 uint32_t rik_length;
1899 uint8_t realm[WMI_FILS_MAX_REALM_LENGTH];
1900 uint32_t realm_len;
1901};
1902
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301903/* struct roam_offload_scan_params - structure
1904 * containing roaming offload scan parameters
1905 * @is_roam_req_valid: flag to tell whether roam req
1906 * is valid or NULL
1907 * @mode: stores flags for scan
1908 * @vdev_id: vdev id
1909 * @roam_offload_enabled: flag for offload enable
1910 * @psk_pmk: pre shared key/pairwise master key
1911 * @pmk_len: length of PMK
1912 * @prefer_5ghz: prefer select 5G candidate
1913 * @roam_rssi_cat_gap: gap for every category bucket
1914 * @select_5ghz_margin: select 5 Ghz margin
1915 * @krk: KRK
1916 * @btk: BTK
1917 * @reassoc_failure_timeout: reassoc failure timeout
1918 * @rokh_id_length: r0kh id length
1919 * @rokh_id: r0kh id
1920 * @roam_key_mgmt_offload_enabled: roam offload flag
1921 * @auth_mode: authentication mode
Deepak Dhamdherea65998e2017-02-09 19:40:26 -08001922 * @fw_okc: use OKC in firmware
1923 * @fw_pmksa_cache: use PMKSA cache in firmware
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301924 * @is_ese_assoc: flag to determine ese assoc
1925 * @mdid: mobility domain info
1926 * @roam_offload_params: roam offload tlv params
Vignesh Viswanathan90cd7742017-09-25 14:36:38 +05301927 * @assoc_ie_length: Assoc IE length
1928 * @assoc_ie: Assoc IE buffer
1929 * @add_fils_tlv: add FILS TLV boolean
1930 * @roam_fils_params: roam fils params
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301931 */
1932struct roam_offload_scan_params {
1933 uint8_t is_roam_req_valid;
1934 uint32_t mode;
1935 uint32_t vdev_id;
1936#ifdef WLAN_FEATURE_ROAM_OFFLOAD
1937 uint8_t roam_offload_enabled;
1938 uint8_t psk_pmk[WMI_ROAM_SCAN_PSK_SIZE];
1939 uint32_t pmk_len;
1940 uint8_t prefer_5ghz;
1941 uint8_t roam_rssi_cat_gap;
1942 uint8_t select_5ghz_margin;
1943 uint8_t krk[WMI_KRK_KEY_LEN];
1944 uint8_t btk[WMI_BTK_KEY_LEN];
1945 uint32_t reassoc_failure_timeout;
1946 uint32_t rokh_id_length;
1947 uint8_t rokh_id[WMI_ROAM_R0KH_ID_MAX_LEN];
1948 uint8_t roam_key_mgmt_offload_enabled;
1949 int auth_mode;
Deepak Dhamdherea65998e2017-02-09 19:40:26 -08001950 bool fw_okc;
1951 bool fw_pmksa_cache;
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301952#endif
1953 bool is_ese_assoc;
1954 struct mobility_domain_info mdid;
Kiran Venkatappa9da7e042016-08-09 22:52:35 +05301955#ifdef CONFIG_MCL
Govind Singh89727882016-04-15 13:58:27 +05301956 /* THis is not available in non tlv target.
1957 * please remove this and replace with a host based
1958 * structure */
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05301959 roam_offload_param roam_offload_params;
Govind Singh89727882016-04-15 13:58:27 +05301960#endif
Selvaraj, Sridhar0a1427f2016-07-04 21:40:23 +05301961 uint32_t assoc_ie_length;
1962 uint8_t assoc_ie[MAX_ASSOC_IE_LENGTH];
Vignesh Viswanathan90cd7742017-09-25 14:36:38 +05301963 bool add_fils_tlv;
1964#ifdef WLAN_FEATURE_FILS_SK
1965 struct roam_fils_params roam_fils_params;
1966#endif
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301967};
1968
1969/* struct roam_offload_scan_rssi_params - structure containing
1970 * parameters for roam offload scan based on RSSI
1971 * @rssi_thresh: rssi threshold
1972 * @rssi_thresh_diff: difference in rssi threshold
1973 * @hi_rssi_scan_max_count: 5G scan max count
1974 * @hi_rssi_scan_rssi_delta: 5G scan rssi change threshold value
1975 * @hi_rssi_scan_rssi_ub: 5G scan upper bound
1976 * @raise_rssi_thresh_5g: flag to determine penalty and boost thresholds
1977 * @session_id: vdev id
1978 * @penalty_threshold_5g: RSSI threshold below which 5GHz RSSI is penalized
1979 * @boost_threshold_5g: RSSI threshold above which 5GHz RSSI is favored
1980 * @raise_factor_5g: factor by which 5GHz RSSI is boosted
1981 * @drop_factor_5g: factor by which 5GHz RSSI is penalized
1982 * @max_raise_rssi_5g: maximum boost that can be applied to a 5GHz RSSI
1983 * @max_drop_rssi_5g: maximum penalty that can be applied to a 5GHz RSSI
1984 * @good_rssi_threshold: RSSI below which roam is kicked in by background
1985 * scan although rssi is still good
1986 * @roam_earlystop_thres_min: Minimum RSSI threshold value for early stop,
1987 * unit is dB above NF
1988 * @roam_earlystop_thres_max: Maximum RSSI threshold value for early stop,
1989 * unit is dB above NF
Gupta, Kapil1f4a4c32016-04-12 15:02:00 +05301990 * @dense_rssi_thresh_offset: dense roam RSSI threshold difference
1991 * @dense_min_aps_cnt: dense roam minimum APs
1992 * @initial_dense_status: dense status detected by host
1993 * @traffic_threshold: dense roam RSSI threshold
Varun Reddy Yeturu05c775b2017-07-26 10:59:39 -07001994 * @bg_scan_bad_rssi_thresh: Bad RSSI threshold to perform bg scan
Vignesh Viswanathan1384bb02017-09-07 18:58:08 +05301995 * @roam_bad_rssi_thresh_offset_2g: Offset from Bad RSSI threshold for 2G to 5G Roam
Varun Reddy Yeturu05c775b2017-07-26 10:59:39 -07001996 * @bg_scan_client_bitmap: Bitmap used to identify the client scans to snoop
Vignesh Viswanathan1384bb02017-09-07 18:58:08 +05301997 * @flags: Flags for Background Roaming
1998 * Bit 0 : BG roaming enabled when we connect to 2G AP only and roaming to 5G AP only.
1999 * Bit 1-31: Reserved
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05302000 */
2001struct roam_offload_scan_rssi_params {
2002 int8_t rssi_thresh;
2003 uint8_t rssi_thresh_diff;
2004 uint32_t hi_rssi_scan_max_count;
2005 uint32_t hi_rssi_scan_rssi_delta;
2006 int32_t hi_rssi_scan_rssi_ub;
2007 int raise_rssi_thresh_5g;
2008 uint8_t session_id;
2009 uint32_t penalty_threshold_5g;
2010 uint32_t boost_threshold_5g;
2011 uint8_t raise_factor_5g;
2012 uint8_t drop_factor_5g;
2013 int max_raise_rssi_5g;
2014 int max_drop_rssi_5g;
2015 uint32_t good_rssi_threshold;
2016 uint32_t roam_earlystop_thres_min;
2017 uint32_t roam_earlystop_thres_max;
Gupta, Kapil1f4a4c32016-04-12 15:02:00 +05302018 int dense_rssi_thresh_offset;
2019 int dense_min_aps_cnt;
2020 int initial_dense_status;
2021 int traffic_threshold;
Varun Reddy Yeturu51d211b2017-06-26 13:53:17 -07002022 int32_t rssi_thresh_offset_5g;
Varun Reddy Yeturu05c775b2017-07-26 10:59:39 -07002023 int8_t bg_scan_bad_rssi_thresh;
Vignesh Viswanathan1384bb02017-09-07 18:58:08 +05302024 uint8_t roam_bad_rssi_thresh_offset_2g;
Varun Reddy Yeturu05c775b2017-07-26 10:59:39 -07002025 uint32_t bg_scan_client_bitmap;
Vignesh Viswanathan1384bb02017-09-07 18:58:08 +05302026 uint32_t flags;
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05302027};
2028
Govind Singhae855362016-03-07 14:24:22 +05302029/**
Himanshu Agarwalf9524e12017-09-28 11:51:35 +05302030 * struct ap_profile - Structure ap profile to match candidate
2031 * @flags: flags
2032 * @rssi_threshold: the value of the the candidate AP should higher by this
2033 * threshold than the rssi of the currrently associated AP
2034 * @ssid: ssid vlaue to be matched
2035 * @rsn_authmode: security params to be matched
2036 * @rsn_ucastcipherset: unicast cipher set
2037 * @rsn_mcastcipherset: mcast/group cipher set
2038 * @rsn_mcastmgmtcipherset: mcast/group management frames cipher set
2039 * @rssi_abs_thresh: the value of the candidate AP should higher than this
2040 * absolute RSSI threshold. Zero means no absolute minimum
2041 * RSSI is required. units are the offset from the noise
2042 * floor in dB
2043 */
2044struct ap_profile {
2045 uint32_t flags;
2046 uint32_t rssi_threshold;
2047 struct mac_ssid ssid;
2048 uint32_t rsn_authmode;
2049 uint32_t rsn_ucastcipherset;
2050 uint32_t rsn_mcastcipherset;
2051 uint32_t rsn_mcastmgmtcipherset;
2052 uint32_t rssi_abs_thresh;
2053};
2054
2055/**
2056 * struct rssi_scoring - rssi scoring param to sortlist selected AP
2057 * @best_rssi_threshold: Roamable AP RSSI equal or better than this threshold,
2058 * full rssi score 100. Units in dBm.
2059 * @good_rssi_threshold: Below threshold, scoring linear percentage between
2060 * rssi_good_pnt and 100. Units in dBm.
2061 * @bad_rssi_threshold: Between good and bad rssi threshold, scoring linear
2062 * % between rssi_bad_pcnt and rssi_good_pct in dBm.
2063 * @good_rssi_pcnt: Used to assigned scoring percentage of each slot between
2064 * best to good rssi threshold. Units in percentage.
2065 * @bad_rssi_pcnt: Used to assigned scoring percentage of each slot between good
2066 * to bad rssi threshold. Unites in percentage.
2067 * @good_bucket_size : bucket size of slot in good zone
2068 * @bad_bucket_size : bucket size of slot in bad zone
2069 * @rssi_pref_5g_rssi_thresh: Below rssi threshold, 5G AP have given preference
2070 * of band percentage. Units in dBm.
2071 */
2072struct rssi_scoring {
2073 int32_t best_rssi_threshold;
2074 int32_t good_rssi_threshold;
2075 int32_t bad_rssi_threshold;
2076 uint32_t good_rssi_pcnt;
2077 uint32_t bad_rssi_pcnt;
2078 uint32_t good_bucket_size;
2079 uint32_t bad_bucket_size;
2080 int32_t rssi_pref_5g_rssi_thresh;
2081};
2082
2083/**
2084 * struct param_slot_scoring - define % score for differents slots for a
2085 * scoring param.
2086 * @num_slot: number of slots in which the param will be divided.
2087 * Max 15. index 0 is used for 'not_present. Num_slot will
2088 * equally divide 100. e.g, if num_slot = 4 slot 0 = 0-25%, slot
2089 * 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
2090 * @score_pcnt3_to_0: Conatins score percentage for slot 0-3
2091 * BITS 0-7 :- the scoring pcnt when not present
2092 * BITS 8-15 :- SLOT_1
2093 * BITS 16-23 :- SLOT_2
2094 * BITS 24-31 :- SLOT_3
2095 * @score_pcnt7_to_4: Conatins score percentage for slot 4-7
2096 * BITS 0-7 :- SLOT_4
2097 * BITS 8-15 :- SLOT_5
2098 * BITS 16-23 :- SLOT_6
2099 * BITS 24-31 :- SLOT_7
2100 * @score_pcnt11_to_8: Conatins score percentage for slot 8-11
2101 * BITS 0-7 :- SLOT_8
2102 * BITS 8-15 :- SLOT_9
2103 * BITS 16-23 :- SLOT_10
2104 * BITS 24-31 :- SLOT_11
2105 * @score_pcnt15_to_12: Conatins score percentage for slot 12-15
2106 * BITS 0-7 :- SLOT_12
2107 * BITS 8-15 :- SLOT_13
2108 * BITS 16-23 :- SLOT_14
2109 * BITS 24-31 :- SLOT_15
2110 */
2111struct param_slot_scoring {
2112 uint32_t num_slot;
2113 uint32_t score_pcnt3_to_0;
2114 uint32_t score_pcnt7_to_4;
2115 uint32_t score_pcnt11_to_8;
2116 uint32_t score_pcnt15_to_12;
2117};
2118
2119/**
2120 * struct scoring_param - scoring param to sortlist selected AP
2121 * @disable_bitmap: Each bit will be either allow(0)/disallow(1) to
2122 * considered the roam score param.
2123 * @rssi_weightage: RSSI weightage out of total score in %
2124 * @ht_weightage: HT weightage out of total score in %.
2125 * @vht_weightage: VHT weightage out of total score in %.
2126 * @he_weightaget: 11ax weightage out of total score in %.
2127 * @bw_weightage: Bandwidth weightage out of total score in %.
2128 * @band_weightage: Band(2G/5G) weightage out of total score in %.
2129 * @nss_weightage: NSS(1x1 / 2x2)weightage out of total score in %.
2130 * @esp_qbss_weightage: ESP/QBSS weightage out of total score in %.
2131 * @beamforming_weightage: Beamforming weightage out of total score in %.
2132 * @pcl_weightage: PCL weightage out of total score in %.
2133 * @oce_wan_weightage OCE WAN metrics weightage out of total score in %.
2134 * @bw_index_score: channel BW scoring percentage information.
2135 * BITS 0-7 :- It contains scoring percentage of 20MHz BW
2136 * BITS 8-15 :- It contains scoring percentage of 40MHz BW
2137 * BITS 16-23 :- It contains scoring percentage of 80MHz BW
2138 * BITS 24-31 :- It contains scoring percentage of 1600MHz BW
2139 * The value of each index must be 0-100
2140 * @band_index_score: band scording percentage information.
2141 * BITS 0-7 :- It contains scoring percentage of 2G
2142 * BITS 8-15 :- It contains scoring percentage of 5G
2143 * BITS 16-23 :- reserved
2144 * BITS 24-31 :- reserved
2145 * The value of each index must be 0-100
2146 * @nss_index_score: NSS scoring percentage information.
2147 * BITS 0-7 :- It contains scoring percentage of 1x1
2148 * BITS 8-15 :- It contains scoring percentage of 2x2
2149 * BITS 16-23 :- It contains scoring percentage of 3x3
2150 * BITS 24-31 :- It contains scoring percentage of 4x4
2151 * The value of each index must be 0-100
2152 * @rssi_scoring: RSSI scoring information.
2153 * @esp_qbss_scoring: ESP/QBSS scoring percentage information
2154 * @oce_wan_scoring: OCE WAN metrics percentage information
2155*/
2156struct scoring_param {
2157 uint32_t disable_bitmap;
2158 int32_t rssi_weightage;
2159 int32_t ht_weightage;
2160 int32_t vht_weightage;
2161 int32_t he_weightage;
2162 int32_t bw_weightage;
2163 int32_t band_weightage;
2164 int32_t nss_weightage;
2165 int32_t esp_qbss_weightage;
2166 int32_t beamforming_weightage;
2167 int32_t pcl_weightage;
2168 int32_t oce_wan_weightage;
2169 uint32_t bw_index_score;
2170 uint32_t band_index_score;
2171 uint32_t nss_index_score;
2172 struct rssi_scoring rssi_scoring;
2173 struct param_slot_scoring esp_qbss_scoring;
2174 struct param_slot_scoring oce_wan_scoring;
2175};
2176
2177/**
2178 * struct ap_profile_params - ap profile params
2179 * @vdev_id: vdev id
2180 * @profile: ap profile to match candidate
2181 * @param: scoring params to short candidate
2182 */
2183struct ap_profile_params {
2184 uint8_t vdev_id;
2185 struct ap_profile profile;
2186 struct scoring_param param;
2187};
2188
2189/**
Govind Singhae855362016-03-07 14:24:22 +05302190 * struct wifi_epno_network - enhanced pno network block
2191 * @ssid: ssid
2192 * @rssi_threshold: threshold for considering this SSID as found, required
2193 * granularity for this threshold is 4dBm to 8dBm
2194 * @flags: WIFI_PNO_FLAG_XXX
2195 * @auth_bit_field: auth bit field for matching WPA IE
2196 */
2197struct wifi_epno_network_params {
2198 struct mac_ssid ssid;
2199 int8_t rssi_threshold;
2200 uint8_t flags;
2201 uint8_t auth_bit_field;
2202};
2203
2204/**
2205 * struct wifi_enhanched_pno_params - enhanced pno network params
Mukul Sharma90bc73b2016-10-03 15:04:20 +05302206 * @request_id: request id number
2207 * @session_id: session_id number
2208 * @min_5ghz_rssi: minimum 5GHz RSSI for a BSSID to be considered
2209 * @min_24ghz_rssi: minimum 2.4GHz RSSI for a BSSID to be considered
2210 * @initial_score_max: maximum score that a network can have before bonuses
2211 * @current_connection_bonus: only report when there is a network's score this
2212 * much higher than the current connection
2213 * @same_network_bonus: score bonus for all n/w with the same network flag
2214 * @secure_bonus: score bonus for networks that are not open
2215 * @band_5ghz_bonus: 5GHz RSSI score bonus (applied to all 5GHz networks)
Govind Singhae855362016-03-07 14:24:22 +05302216 * @num_networks: number of ssids
Mukul Sharma90bc73b2016-10-03 15:04:20 +05302217 * @networks: EPNO networks
Govind Singhae855362016-03-07 14:24:22 +05302218 */
2219struct wifi_enhanched_pno_params {
2220 uint32_t request_id;
2221 uint32_t session_id;
Mukul Sharma90bc73b2016-10-03 15:04:20 +05302222 uint32_t min_5ghz_rssi;
2223 uint32_t min_24ghz_rssi;
2224 uint32_t initial_score_max;
2225 uint32_t current_connection_bonus;
2226 uint32_t same_network_bonus;
2227 uint32_t secure_bonus;
2228 uint32_t band_5ghz_bonus;
Govind Singhae855362016-03-07 14:24:22 +05302229 uint32_t num_networks;
2230 struct wifi_epno_network_params networks[];
2231};
2232
2233enum {
2234 WMI_AP_RX_DATA_OFFLOAD = 0x00,
2235 WMI_STA_RX_DATA_OFFLOAD = 0x01,
2236};
2237
2238/**
Govind Singhc7cd2d62016-06-21 14:33:26 +05302239 * enum extscan_configuration_flags - extscan config flags
2240 * @WMI_EXTSCAN_LP_EXTENDED_BATCHING: extended batching
2241 */
2242enum wmi_extscan_configuration_flags {
2243 WMI_EXTSCAN_LP_EXTENDED_BATCHING = 0x00000001,
2244};
2245
2246/**
Govind Singhae855362016-03-07 14:24:22 +05302247 * enum extscan_report_events_type - extscan report events type
2248 * @EXTSCAN_REPORT_EVENTS_BUFFER_FULL: report only when scan history is % full
2249 * @EXTSCAN_REPORT_EVENTS_EACH_SCAN: report a scan completion event after scan
2250 * @EXTSCAN_REPORT_EVENTS_FULL_RESULTS: forward scan results
2251 * (beacons/probe responses + IEs)
2252 * in real time to HAL, in addition to completion events.
2253 * Note: To keep backward compatibility,
2254 * fire completion events regardless of REPORT_EVENTS_EACH_SCAN.
2255 * @EXTSCAN_REPORT_EVENTS_NO_BATCH: controls batching,
2256 * 0 => batching, 1 => no batching
2257 */
2258enum wmi_extscan_report_events_type {
2259 WMI_EXTSCAN_REPORT_EVENTS_BUFFER_FULL = 0x00,
2260 WMI_EXTSCAN_REPORT_EVENTS_EACH_SCAN = 0x01,
2261 WMI_EXTSCAN_REPORT_EVENTS_FULL_RESULTS = 0x02,
2262 WMI_EXTSCAN_REPORT_EVENTS_NO_BATCH = 0x04,
2263};
2264
2265/**
Govind Singhae855362016-03-07 14:24:22 +05302266 * struct extscan_capabilities_params - ext scan capablities
2267 * @request_id: request_id
2268 * @session_id: session_id
2269 */
2270struct extscan_capabilities_params {
2271 uint32_t request_id;
2272 uint8_t session_id;
2273};
2274
2275/**
2276 * struct extscan_capabilities_reset_params - ext scan capablities reset parameter
2277 * @request_id: request_id
2278 * @session_id: session_id
2279 */
2280struct extscan_capabilities_reset_params {
2281 uint32_t request_id;
2282 uint8_t session_id;
2283};
2284
2285/**
2286 * struct extscan_bssid_hotlist_reset_params - ext scan hotlist reset parameter
2287 * @request_id: request_id
2288 * @session_id: session_id
2289 */
2290struct extscan_bssid_hotlist_reset_params {
2291 uint32_t request_id;
2292 uint8_t session_id;
2293};
2294
2295/**
2296 * struct extscan_stop_req_params - ext scan stop parameter
2297 * @request_id: request_id
2298 * @session_id: session_id
2299 */
2300struct extscan_stop_req_params {
2301 uint32_t request_id;
2302 uint8_t session_id;
2303};
2304
2305/**
2306 * struct ap_threshold_params - ap threshold parameter
2307 * @bssid: mac address
2308 * @low: low threshold
2309 * @high: high threshold
2310 */
2311struct ap_threshold_params {
Govind Singhd7468a52016-03-09 14:32:57 +05302312 struct qdf_mac_addr bssid;
Govind Singhae855362016-03-07 14:24:22 +05302313 int32_t low;
2314 int32_t high;
2315};
2316
2317/**
2318 * struct extscan_set_sig_changereq_params - ext scan channel parameter
2319 * @request_id: mac address
2320 * @session_id: low threshold
2321 * @rssi_sample_size: Number of samples for averaging RSSI
2322 * @lostap_sample_size: Number of missed samples to confirm AP loss
2323 * @min_breaching: Number of APs breaching threshold required for firmware
2324 * @num_ap: no of scanned ap
2325 * @ap: ap threshold parameter
2326 */
2327struct extscan_set_sig_changereq_params {
2328 uint32_t request_id;
2329 uint8_t session_id;
2330 uint32_t rssi_sample_size;
2331 uint32_t lostap_sample_size;
2332 uint32_t min_breaching;
2333 uint32_t num_ap;
2334 struct ap_threshold_params ap[WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS];
2335};
2336
2337/**
2338 * struct extscan_cached_result_params - ext scan cached parameter
2339 * @request_id: mac address
2340 * @session_id: low threshold
2341 * @flush: cached results flush
2342 */
2343struct extscan_cached_result_params {
2344 uint32_t request_id;
2345 uint8_t session_id;
2346 bool flush;
2347};
2348
Govind Singhae855362016-03-07 14:24:22 +05302349#define WMI_WLAN_EXTSCAN_MAX_CHANNELS 36
2350#define WMI_WLAN_EXTSCAN_MAX_BUCKETS 16
2351#define WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS 128
2352#define WMI_WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64
2353#define WMI_EXTSCAN_MAX_HOTLIST_SSIDS 8
2354
2355/**
2356 * struct wifi_scan_channelspec_params - wifi scan channel parameter
2357 * @channel: Frequency in MHz
2358 * @dwellTimeMs: dwell time
2359 * @flush: cached results flush
2360 * @passive: passive scan
2361 * @chnlClass: channel class
2362 */
2363struct wifi_scan_channelspec_params {
2364 uint32_t channel;
2365 uint32_t dwellTimeMs;
2366 bool passive;
2367 uint8_t chnlClass;
2368};
2369
2370/**
2371 * enum wmi_wifi_band - wifi band
2372 * @WMI_WIFI_BAND_UNSPECIFIED: unspecified band
2373 * @WMI_WIFI_BAND_BG: 2.4 GHz
2374 * @WMI_WIFI_BAND_A: 5 GHz without DFS
2375 * @WMI_WIFI_BAND_ABG: 2.4 GHz + 5 GHz; no DFS
2376 * @WMI_WIFI_BAND_A_DFS_ONLY: 5 GHz DFS only
2377 * @WMI_WIFI_BAND_A_WITH_DFS: 5 GHz with DFS
2378 * @WMI_WIFI_BAND_ABG_WITH_DFS: 2.4 GHz + 5 GHz with DFS
2379 * @WMI_WIFI_BAND_MAX: max range
2380 */
2381enum wmi_wifi_band {
2382 WMI_WIFI_BAND_UNSPECIFIED,
2383 WMI_WIFI_BAND_BG = 1,
2384 WMI_WIFI_BAND_A = 2,
2385 WMI_WIFI_BAND_ABG = 3,
2386 WMI_WIFI_BAND_A_DFS_ONLY = 4,
2387 /* 5 is reserved */
2388 WMI_WIFI_BAND_A_WITH_DFS = 6,
2389 WMI_WIFI_BAND_ABG_WITH_DFS = 7,
2390 /* Keep it last */
2391 WMI_WIFI_BAND_MAX
2392};
2393
2394/**
2395 * struct wifi_scan_bucket_params - wifi scan bucket spec
2396 * @bucket: bucket identifier
2397 * @band: wifi band
2398 * @period: Desired period, in millisecond; if this is too
2399 * low, the firmware should choose to generate results as fast as
2400 * it can instead of failing the command byte
2401 * for exponential backoff bucket this is the min_period
2402 * @reportEvents: 0 => normal reporting (reporting rssi history
2403 * only, when rssi history buffer is % full)
2404 * 1 => same as 0 + report a scan completion event after scanning
2405 * this bucket
2406 * 2 => same as 1 + forward scan results
2407 * (beacons/probe responses + IEs) in real time to HAL
2408 * @max_period: if max_period is non zero or different than period,
2409 * then this bucket is an exponential backoff bucket and
2410 * the scan period will grow exponentially as per formula:
2411 * actual_period(N) = period ^ (N/(step_count+1)) to a
2412 * maximum period of max_period
2413 * @exponent: for exponential back off bucket: multiplier:
2414 * new_period = old_period * exponent
2415 * @step_count: for exponential back off bucket, number of scans performed
2416 * at a given period and until the exponent is applied
2417 * @numChannels: channels to scan; these may include DFS channels
2418 * Note that a given channel may appear in multiple buckets
2419 * @min_dwell_time_active: per bucket minimum active dwell time
2420 * @max_dwell_time_active: per bucket maximum active dwell time
2421 * @min_dwell_time_passive: per bucket minimum passive dwell time
2422 * @max_dwell_time_passive: per bucket maximum passive dwell time
2423 * @channels: Channel list
2424 */
2425struct wifi_scan_bucket_params {
2426 uint8_t bucket;
2427 enum wmi_wifi_band band;
2428 uint32_t period;
2429 uint32_t reportEvents;
2430 uint32_t max_period;
2431 uint32_t exponent;
2432 uint32_t step_count;
2433 uint32_t numChannels;
2434 uint32_t min_dwell_time_active;
2435 uint32_t max_dwell_time_active;
2436 uint32_t min_dwell_time_passive;
2437 uint32_t max_dwell_time_passive;
2438 struct wifi_scan_channelspec_params channels[WMI_WLAN_EXTSCAN_MAX_CHANNELS];
2439};
2440
2441/**
2442 * struct wifi_scan_cmd_req_params - wifi scan command request params
2443 * @basePeriod: base timer period
2444 * @maxAPperScan: max ap per scan
2445 * @report_threshold_percent: report threshold
2446 * in %, when buffer is this much full, wake up host
2447 * @report_threshold_num_scans: report threshold number of scans
2448 * in number of scans, wake up host after these many scans
2449 * @requestId: request id
2450 * @sessionId: session id
2451 * @numBuckets: number of buckets
2452 * @min_dwell_time_active: per bucket minimum active dwell time
2453 * @max_dwell_time_active: per bucket maximum active dwell time
2454 * @min_dwell_time_passive: per bucket minimum passive dwell time
2455 * @max_dwell_time_passive: per bucket maximum passive dwell time
2456 * @configuration_flags: configuration flags
Gupta, Kapil7b768002016-04-25 19:14:19 +05302457 * @extscan_adaptive_dwell_mode: adaptive dwelltime mode for extscan
Govind Singhae855362016-03-07 14:24:22 +05302458 * @buckets: buckets array
2459 */
2460struct wifi_scan_cmd_req_params {
2461 uint32_t basePeriod;
2462 uint32_t maxAPperScan;
2463
2464 uint32_t report_threshold_percent;
2465 uint32_t report_threshold_num_scans;
2466
2467 uint32_t requestId;
2468 uint8_t sessionId;
2469 uint32_t numBuckets;
2470
2471 uint32_t min_dwell_time_active;
2472 uint32_t max_dwell_time_active;
2473 uint32_t min_dwell_time_passive;
2474 uint32_t max_dwell_time_passive;
2475 uint32_t configuration_flags;
Gupta, Kapil7b768002016-04-25 19:14:19 +05302476 enum wmi_dwelltime_adaptive_mode extscan_adaptive_dwell_mode;
Govind Singhae855362016-03-07 14:24:22 +05302477 struct wifi_scan_bucket_params buckets[WMI_WLAN_EXTSCAN_MAX_BUCKETS];
2478};
2479
Govind Singhae855362016-03-07 14:24:22 +05302480#define WMI_CFG_VALID_CHANNEL_LIST_LEN 100
Govind Singhc7cd2d62016-06-21 14:33:26 +05302481/* Occupied channel list remains static */
2482#define WMI_CHANNEL_LIST_STATIC 1
2483/* Occupied channel list can be learnt after init */
2484#define WMI_CHANNEL_LIST_DYNAMIC_INIT 2
2485/* Occupied channel list can be learnt after flush */
2486#define WMI_CHANNEL_LIST_DYNAMIC_FLUSH 3
2487/* Occupied channel list can be learnt after update */
2488#define WMI_CHANNEL_LIST_DYNAMIC_UPDATE 4
Govind Singhae855362016-03-07 14:24:22 +05302489
2490/**
2491 * struct plm_req_params - plm req parameter
2492 * @diag_token: Dialog token
2493 * @meas_token: measurement token
2494 * @num_bursts: total number of bursts
2495 * @burst_int: burst interval in seconds
2496 * @meas_duration:in TU's,STA goes off-ch
2497 * @burst_len: no of times the STA should cycle through PLM ch list
2498 * @desired_tx_pwr: desired tx power
2499 * @mac_addr: MC dest addr
2500 * @plm_num_ch: channel numbers
2501 * @plm_ch_list: channel list
2502 * @session_id: session id
2503 * @enable: enable/disable
2504 */
2505struct plm_req_params {
2506 uint16_t diag_token;
2507 uint16_t meas_token;
2508 uint16_t num_bursts;
2509 uint16_t burst_int;
2510 uint16_t meas_duration;
2511 /* no of times the STA should cycle through PLM ch list */
2512 uint8_t burst_len;
2513 int8_t desired_tx_pwr;
Govind Singhd7468a52016-03-09 14:32:57 +05302514 struct qdf_mac_addr mac_addr;
Govind Singhae855362016-03-07 14:24:22 +05302515 /* no of channels */
2516 uint8_t plm_num_ch;
2517 /* channel numbers */
2518 uint8_t plm_ch_list[WMI_CFG_VALID_CHANNEL_LIST_LEN];
2519 uint8_t session_id;
2520 bool enable;
2521};
Naveen Rawatd5ffe152016-04-14 23:42:46 -07002522
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05302523#define MAX_SSID_ALLOWED_LIST 4
2524#define MAX_BSSID_AVOID_LIST 16
2525#define MAX_BSSID_FAVORED 16
Abhishek Singh5fa02552017-07-05 11:21:32 +05302526#define MAX_RSSI_AVOID_BSSID_LIST 10
Govind Singhae855362016-03-07 14:24:22 +05302527
2528/**
2529 * struct mac_ts_info_tfc - mac ts info parameters
2530 * @burstSizeDefn: burst size
2531 * @reserved: reserved
2532 * @ackPolicy: ack policy
2533 * @psb: psb
2534 * @aggregation: aggregation
2535 * @accessPolicy: access policy
2536 * @direction: direction
2537 * @tsid: direction
2538 * @trafficType: traffic type
2539 */
2540struct mac_ts_info_tfc {
2541#ifndef ANI_LITTLE_BIT_ENDIAN
2542 uint8_t burstSizeDefn:1;
2543 uint8_t reserved:7;
2544#else
2545 uint8_t reserved:7;
2546 uint8_t burstSizeDefn:1;
2547#endif
2548
2549#ifndef ANI_LITTLE_BIT_ENDIAN
2550 uint16_t ackPolicy:2;
2551 uint16_t userPrio:3;
2552 uint16_t psb:1;
2553 uint16_t aggregation:1;
2554 uint16_t accessPolicy:2;
2555 uint16_t direction:2;
2556 uint16_t tsid:4;
2557 uint16_t trafficType:1;
2558#else
2559 uint16_t trafficType:1;
2560 uint16_t tsid:4;
2561 uint16_t direction:2;
2562 uint16_t accessPolicy:2;
2563 uint16_t aggregation:1;
2564 uint16_t psb:1;
2565 uint16_t userPrio:3;
2566 uint16_t ackPolicy:2;
2567#endif
Govind Singhd7468a52016-03-09 14:32:57 +05302568} qdf_packed;
Govind Singhae855362016-03-07 14:24:22 +05302569
2570/**
2571 * struct mac_ts_info_sch - mac ts info schedule parameters
2572 * @rsvd: reserved
2573 * @schedule: schedule bit
2574 */
2575struct mac_ts_info_sch {
2576#ifndef ANI_LITTLE_BIT_ENDIAN
2577 uint8_t rsvd:7;
2578 uint8_t schedule:1;
2579#else
2580 uint8_t schedule:1;
2581 uint8_t rsvd:7;
2582#endif
Govind Singhd7468a52016-03-09 14:32:57 +05302583} qdf_packed;
Govind Singhae855362016-03-07 14:24:22 +05302584
2585/**
2586 * struct mac_ts_info_sch - mac ts info schedule parameters
2587 * @traffic: mac tfc parameter
2588 * @schedule: mac schedule parameters
2589 */
2590struct mac_ts_info {
2591 struct mac_ts_info_tfc traffic;
2592 struct mac_ts_info_sch schedule;
Govind Singhd7468a52016-03-09 14:32:57 +05302593} qdf_packed;
Govind Singhae855362016-03-07 14:24:22 +05302594
2595/**
2596 * struct mac_tspec_ie - mac ts spec
2597 * @type: type
2598 * @length: length
2599 * @tsinfo: tsinfo
2600 * @nomMsduSz: nomMsduSz
2601 * @maxMsduSz: maxMsduSz
2602 * @minSvcInterval: minSvcInterval
2603 * @maxSvcInterval: maxSvcInterval
2604 * @inactInterval: inactInterval
2605 * @suspendInterval: suspendInterval
2606 * @svcStartTime: svcStartTime
2607 * @minDataRate: minDataRate
2608 * @meanDataRate: meanDataRate
2609 * @peakDataRate: peakDataRate
2610 * @maxBurstSz: maxBurstSz
2611 * @delayBound: delayBound
2612 * @minPhyRate: minPhyRate
2613 * @surplusBw: surplusBw
2614 * @mediumTime: mediumTime
2615 */
2616struct mac_tspec_ie {
2617 uint8_t type;
2618 uint8_t length;
2619 struct mac_ts_info tsinfo;
2620 uint16_t nomMsduSz;
2621 uint16_t maxMsduSz;
2622 uint32_t minSvcInterval;
2623 uint32_t maxSvcInterval;
2624 uint32_t inactInterval;
2625 uint32_t suspendInterval;
2626 uint32_t svcStartTime;
2627 uint32_t minDataRate;
2628 uint32_t meanDataRate;
2629 uint32_t peakDataRate;
2630 uint32_t maxBurstSz;
2631 uint32_t delayBound;
2632 uint32_t minPhyRate;
2633 uint16_t surplusBw;
2634 uint16_t mediumTime;
Govind Singhd7468a52016-03-09 14:32:57 +05302635} qdf_packed;
Govind Singhae855362016-03-07 14:24:22 +05302636
2637/**
2638 * struct add_ts_param - ADDTS related parameters
2639 * @staIdx: station index
2640 * @tspecIdx: TSPEC handler uniquely identifying a TSPEC for a STA in a BSS
2641 * @tspec: tspec value
2642 * @status: CDF status
2643 * @sessionId: session id
Govind Singhd7468a52016-03-09 14:32:57 +05302644 * @tsm_interval: TSM interval period passed from UMAC to WMI
Govind Singhae855362016-03-07 14:24:22 +05302645 * @setRICparams: RIC parameters
2646 * @sme_session_id: sme session id
2647 */
2648struct add_ts_param {
2649 uint16_t staIdx;
2650 uint16_t tspecIdx;
2651 struct mac_tspec_ie tspec;
Govind Singhd7468a52016-03-09 14:32:57 +05302652 QDF_STATUS status;
Govind Singhae855362016-03-07 14:24:22 +05302653 uint8_t sessionId;
2654#ifdef FEATURE_WLAN_ESE
2655 uint16_t tsm_interval;
2656#endif /* FEATURE_WLAN_ESE */
2657#ifdef WLAN_FEATURE_ROAM_OFFLOAD
2658 uint8_t setRICparams;
2659#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
2660 uint8_t sme_session_id;
2661};
2662
2663/**
2664 * struct delts_req_info - DELTS request parameter
2665 * @tsinfo: ts info
2666 * @tspec: ts spec
2667 * @wmeTspecPresent: wme ts spec flag
2668 * @wsmTspecPresent: wsm ts spec flag
2669 * @lleTspecPresent: lle ts spec flag
2670 */
2671struct delts_req_info {
2672 struct mac_ts_info tsinfo;
2673 struct mac_tspec_ie tspec;
2674 uint8_t wmeTspecPresent:1;
2675 uint8_t wsmTspecPresent:1;
2676 uint8_t lleTspecPresent:1;
2677};
2678
2679/**
2680 * struct del_ts_params - DELTS related parameters
2681 * @staIdx: station index
2682 * @tspecIdx: TSPEC identifier uniquely identifying a TSPEC for a STA in a BSS
2683 * @bssId: BSSID
2684 * @sessionId: session id
2685 * @userPrio: user priority
2686 * @delTsInfo: DELTS info
2687 * @setRICparams: RIC parameters
2688 */
2689struct del_ts_params {
2690 uint16_t staIdx;
2691 uint16_t tspecIdx;
Govind Singh8675b862016-03-28 22:09:18 +05302692 uint8_t bssId[IEEE80211_ADDR_LEN];
Govind Singhae855362016-03-07 14:24:22 +05302693 uint8_t sessionId;
2694 uint8_t userPrio;
2695#ifdef WLAN_FEATURE_ROAM_OFFLOAD
2696 struct delts_req_info delTsInfo;
2697 uint8_t setRICparams;
2698#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
2699};
2700
2701/**
2702 * struct ll_stats_clear_params - ll stats clear parameter
2703 * @req_id: request id
2704 * @sta_id: sta id
2705 * @stats_clear_mask: stats clear mask
2706 * @stop_req: stop request
2707 */
2708struct ll_stats_clear_params {
2709 uint32_t req_id;
2710 uint8_t sta_id;
2711 uint32_t stats_clear_mask;
2712 uint8_t stop_req;
2713};
2714
2715/**
2716 * struct ll_stats_set_params - ll stats get parameter
2717 * @req_id: request id
2718 * @sta_id: sta id
2719 * @mpdu_size_threshold: mpdu sixe threshold
2720 * @aggressive_statistics_gathering: aggressive_statistics_gathering
2721 */
2722struct ll_stats_set_params {
2723 uint32_t req_id;
2724 uint8_t sta_id;
2725 uint32_t mpdu_size_threshold;
2726 uint32_t aggressive_statistics_gathering;
2727};
2728
2729/**
2730 * struct ll_stats_get_params - ll stats parameter
2731 * @req_id: request id
2732 * @sta_id: sta id
2733 * @param_id_mask: param is mask
2734 */
2735struct ll_stats_get_params {
2736 uint32_t req_id;
2737 uint8_t sta_id;
2738 uint32_t param_id_mask;
2739};
2740
Govind Singhae855362016-03-07 14:24:22 +05302741
2742/**
2743 * struct link_status_params - link stats parameter
2744 * @msg_type: message type is same as the request type
2745 * @msg_len: length of the entire request
2746 * @link_status: wme ts spec flag
2747 * @session_id: wsm ts spec flag
2748 */
2749struct link_status_params {
2750 uint16_t msg_type;
2751 uint16_t msg_len;
2752 uint8_t link_status;
2753 uint8_t session_id;
2754};
2755
2756/**
2757 * struct dhcp_stop_ind_params - DHCP Stop indication message
2758 * @msgtype: message type is same as the request type
2759 * @msglen: length of the entire request
2760 * @device_mode: Mode of the device(ex:STA, AP)
2761 * @adapter_macaddr: MAC address of the adapter
2762 * @peer_macaddr: MAC address of the connected peer
2763 */
2764struct dhcp_stop_ind_params {
2765 uint16_t msgtype;
2766 uint16_t msglen;
2767 uint8_t device_mode;
Govind Singhd7468a52016-03-09 14:32:57 +05302768 struct qdf_mac_addr adapter_macaddr;
2769 struct qdf_mac_addr peer_macaddr;
Govind Singhae855362016-03-07 14:24:22 +05302770};
2771
2772/**
2773 * struct aggr_add_ts_param - ADDTS parameters
2774 * @staIdx: station index
2775 * @tspecIdx: TSPEC handler uniquely identifying a TSPEC for a STA in a BSS
2776 * @tspec: tspec value
2777 * @status: CDF status
2778 * @sessionId: session id
2779 */
2780struct aggr_add_ts_param {
2781 uint16_t staIdx;
2782 uint16_t tspecIdx;
2783 struct mac_tspec_ie tspec[WMI_QOS_NUM_AC_MAX];
Govind Singhd7468a52016-03-09 14:32:57 +05302784 QDF_STATUS status[WMI_QOS_NUM_AC_MAX];
Govind Singhae855362016-03-07 14:24:22 +05302785 uint8_t sessionId;
2786};
2787
Paul Zhang6a857a92017-12-08 16:08:00 +08002788
2789/**
2790 * struct wlm_latency_level_param - WLM parameters
2791 * @wlm_latency_level: wlm latency level to set
2792 * 0 - normal, 1 - moderate, 2 - low, 3 - ultralow
2793 * @wlm_latency_flags: wlm latency flags to set
2794 * |31 12| 11 | 10 |9 8|7 6|5 4|3 2| 1 | 0 |
2795 * +------+------+------+------+------+------+------+-----+-----+
2796 * | RSVD | SSLP | CSLP | RSVD | Roam | RSVD | DWLT | DFS | SUP |
2797 * +------+-------------+-------------+-------------------------+
2798 * | WAL | PS | Roam | Scan |
2799 *
2800 * bit 0: Avoid scan request from HLOS if setting
2801 * bit 1: Skip DFS channel SCAN if setting
2802 * bit 2-3: Define policy of dwell time/duration for each foreign channel
2803 * (b2 b3)
2804 * (0 0 ): Default scan dwell time
2805 * (0 1 ): Reserve
2806 * (1 0 ): Shrink off channel dwell time
2807 * (1 1 ): Reserve
2808 * bit 4-5: Reserve for scan
2809 * bit 6-7: Define roaming policy
2810 * (b6 b7)
2811 * (0 0 ): Default roaming behavior, allow roaming in all scenarios
2812 * (0 1 ): Disallow all roaming
2813 * (1 0 ): Allow roaming when final bmissed
2814 * (1 1 ): Reserve
2815 * bit 8-9: Reserve for roaming
2816 * bit 10: Disable css power collapse if setting
2817 * bit 11: Disable sys sleep if setting
2818 * bit 12-31: Reserve for future useage
2819 * @vdev_id: vdev id
2820 */
2821struct wlm_latency_level_param {
2822 uint16_t wlm_latency_level;
2823 uint32_t wlm_latency_flags;
2824 uint16_t vdev_id;
2825};
2826
Govind Singhae855362016-03-07 14:24:22 +05302827#define WMI_MAX_FILTER_TEST_DATA_LEN 8
2828#define WMI_MAX_NUM_MULTICAST_ADDRESS 240
2829#define WMI_MAX_NUM_FILTERS 20
2830#define WMI_MAX_NUM_TESTS_PER_FILTER 10
2831
2832/**
2833 * enum packet_filter_type - packet filter type
2834 * @WMI_RCV_FILTER_TYPE_INVALID: invalid type
2835 * @WMI_RCV_FILTER_TYPE_FILTER_PKT: filter packet type
2836 * @WMI_RCV_FILTER_TYPE_BUFFER_PKT: buffer packet type
2837 * @WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE: max enum size
2838 */
2839enum packet_filter_type {
2840 WMI_RCV_FILTER_TYPE_INVALID,
2841 WMI_RCV_FILTER_TYPE_FILTER_PKT,
2842 WMI_RCV_FILTER_TYPE_BUFFER_PKT,
2843 WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE
2844};
2845
2846/**
2847 * enum packet_protocol_type - packet protocol type
2848 * @WMI_FILTER_HDR_TYPE_INVALID: invalid type
2849 * @WMI_FILTER_HDR_TYPE_MAC: mac type
2850 * @WMI_FILTER_HDR_TYPE_ARP: trp type
2851 * @WMI_FILTER_HDR_TYPE_IPV4: ipv4 type
2852 * @WMI_FILTER_HDR_TYPE_IPV6: ipv6 type
2853 * @WMI_FILTER_HDR_TYPE_UDP: udp type
2854 * @WMI_FILTER_HDR_TYPE_MAX: max type
2855 */
2856enum packet_protocol_type {
2857 WMI_FILTER_HDR_TYPE_INVALID,
2858 WMI_FILTER_HDR_TYPE_MAC,
2859 WMI_FILTER_HDR_TYPE_ARP,
2860 WMI_FILTER_HDR_TYPE_IPV4,
2861 WMI_FILTER_HDR_TYPE_IPV6,
2862 WMI_FILTER_HDR_TYPE_UDP,
2863 WMI_FILTER_HDR_TYPE_MAX
2864};
2865
2866/**
2867 * enum packet_filter_comp_type - packet filter comparison type
2868 * @WMI_FILTER_CMP_TYPE_INVALID: invalid type
2869 * @WMI_FILTER_CMP_TYPE_EQUAL: type equal
2870 * @WMI_FILTER_CMP_TYPE_MASK_EQUAL: mask equal
2871 * @WMI_FILTER_CMP_TYPE_NOT_EQUAL: type not equal
2872 * @WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL: mask not equal
2873 * @WMI_FILTER_CMP_TYPE_MAX: max type
2874 */
2875enum packet_filter_comp_type {
2876 WMI_FILTER_CMP_TYPE_INVALID,
2877 WMI_FILTER_CMP_TYPE_EQUAL,
2878 WMI_FILTER_CMP_TYPE_MASK_EQUAL,
2879 WMI_FILTER_CMP_TYPE_NOT_EQUAL,
2880 WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
2881 WMI_FILTER_CMP_TYPE_MAX
2882};
2883
2884/**
2885 * struct rcv_pkt_filter_params - recieve packet filter parameters
2886 * @protocolLayer - protocol layer
2887 * @cmpFlag - comparison flag
2888 * @dataLength - data length
2889 * @dataOffset - data offset
2890 * @reserved - resserved
2891 * @compareData - compare data
2892 * @dataMask - data mask
2893 */
2894struct rcv_pkt_filter_params {
2895 enum packet_protocol_type protocolLayer;
2896 enum packet_filter_comp_type cmpFlag;
2897 uint16_t dataLength;
2898 uint8_t dataOffset;
2899 uint8_t reserved;
2900 uint8_t compareData[WMI_MAX_FILTER_TEST_DATA_LEN];
2901 uint8_t dataMask[WMI_MAX_FILTER_TEST_DATA_LEN];
2902};
2903
2904/**
2905 * struct rcv_pkt_filter_config - recieve packet filter info
2906 * @filterId - filter id
2907 * @filterType - filter type
2908 * @numFieldParams - no of fields
2909 * @coalesceTime - reserved parameter
2910 * @self_macaddr - self mac address
2911 * @bssid - Bssid of the connected AP
2912 * @paramsData - data parameter
2913 */
2914struct rcv_pkt_filter_config {
2915 uint8_t filterId;
2916 enum packet_filter_type filterType;
2917 uint32_t numFieldParams;
2918 uint32_t coalesceTime;
Govind Singhd7468a52016-03-09 14:32:57 +05302919 struct qdf_mac_addr self_macaddr;
2920 struct qdf_mac_addr bssid;
Govind Singhae855362016-03-07 14:24:22 +05302921 struct rcv_pkt_filter_params paramsData[WMI_MAX_NUM_TESTS_PER_FILTER];
2922};
2923
2924/**
2925 * struct vdev_ie_info_param - IE info
2926 * @vdev_id - vdev for which the IE is being sent
2927 * @ie_id - ID of the IE
2928 * @length - length of the IE data
2929 * @data - IE data
2930 *
2931 * This structure is used to store the IE information.
2932 */
2933struct vdev_ie_info_param {
2934 uint32_t vdev_id;
2935 uint32_t ie_id;
2936 uint32_t length;
Selvaraj, Sridharce064292016-07-25 16:25:14 +05302937 uint32_t ie_source;
Naveen Rawat71268882016-08-03 16:41:33 -07002938 uint32_t band;
Govind Singhae855362016-03-07 14:24:22 +05302939 uint8_t *data;
2940};
2941
2942#define WMI_MAX_NUM_FW_SEGMENTS 4
2943
2944/**
2945 * struct fw_dump_seg_req_param - individual segment details
2946 * @seg_id - segment id.
2947 * @seg_start_addr_lo - lower address of the segment.
2948 * @seg_start_addr_hi - higher address of the segment.
2949 * @seg_length - length of the segment.
2950 * @dst_addr_lo - lower address of the destination buffer.
2951 * @dst_addr_hi - higher address of the destination buffer.
2952 *
2953 * This structure carries the information to firmware about the
2954 * individual segments. This structure is part of firmware memory
2955 * dump request.
2956 */
2957struct fw_dump_seg_req_param {
2958 uint8_t seg_id;
2959 uint32_t seg_start_addr_lo;
2960 uint32_t seg_start_addr_hi;
2961 uint32_t seg_length;
2962 uint32_t dst_addr_lo;
2963 uint32_t dst_addr_hi;
2964};
2965
2966/**
2967 * struct fw_dump_req_param - firmware memory dump request details.
2968 * @request_id - request id.
2969 * @num_seg - requested number of segments.
2970 * @fw_dump_seg_req - individual segment information.
2971 *
2972 * This structure carries information about the firmware
2973 * memory dump request.
2974 */
2975struct fw_dump_req_param {
2976 uint32_t request_id;
2977 uint32_t num_seg;
2978 struct fw_dump_seg_req_param segment[WMI_MAX_NUM_FW_SEGMENTS];
2979};
2980
2981#define WMI_TDLS_MAX_SUPP_CHANNELS 128
2982#define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
2983#define WMI_2_4_GHZ_MAX_FREQ 3000
2984
2985/**
2986 * struct tdls_update_ch_params - channel parameters
2987 * @chanId: ID of the channel
2988 * @pwr: power level
2989 * @dfsSet: is dfs supported or not
2990 * @half_rate: is the channel operating at 10MHz
2991 * @quarter_rate: is the channel operating at 5MHz
2992 */
2993struct tdls_update_ch_params {
2994 uint8_t chanId;
2995 uint8_t pwr;
2996 bool dfsSet;
2997 bool half_rate;
2998 bool quarter_rate;
2999};
3000
3001/**
3002 * struct tdls_peer_cap_params - TDLS peer capablities parameters
3003 * @isPeerResponder: is peer responder or not
3004 * @peerUapsdQueue: peer uapsd queue
3005 * @peerMaxSp: peer max SP value
3006 * @peerBuffStaSupport: peer buffer sta supported or not
3007 * @peerOffChanSupport: peer offchannel support
3008 * @peerCurrOperClass: peer current operating class
3009 * @selfCurrOperClass: self current operating class
3010 * @peerChanLen: peer channel length
3011 * @peerChan: peer channel list
3012 * @peerOperClassLen: peer operating class length
3013 * @peerOperClass: peer operating class
3014 * @prefOffChanNum: peer offchannel number
3015 * @prefOffChanBandwidth: peer offchannel bandwidth
3016 * @opClassForPrefOffChan: operating class for offchannel
3017 */
3018struct tdls_peer_cap_params {
3019 uint8_t isPeerResponder;
3020 uint8_t peerUapsdQueue;
3021 uint8_t peerMaxSp;
3022 uint8_t peerBuffStaSupport;
3023 uint8_t peerOffChanSupport;
3024 uint8_t peerCurrOperClass;
3025 uint8_t selfCurrOperClass;
3026 uint8_t peerChanLen;
3027 struct tdls_update_ch_params peerChan[WMI_TDLS_MAX_SUPP_CHANNELS];
3028 uint8_t peerOperClassLen;
3029 uint8_t peerOperClass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
3030 uint8_t prefOffChanNum;
3031 uint8_t prefOffChanBandwidth;
3032 uint8_t opClassForPrefOffChan;
3033};
3034
3035/**
3036 * struct tdls_peer_state_params - TDLS peer state parameters
3037 * @vdevId: vdev id
3038 * @peerMacAddr: peer mac address
3039 * @peerCap: peer capabality
3040 */
3041struct tdls_peer_state_params {
3042 uint32_t vdevId;
Govind Singh8675b862016-03-28 22:09:18 +05303043 uint8_t peerMacAddr[IEEE80211_ADDR_LEN];
Govind Singhae855362016-03-07 14:24:22 +05303044 uint32_t peerState;
3045 struct tdls_peer_cap_params peerCap;
3046};
3047
3048/**
3049 * struct wmi_tdls_params - TDLS parameters
3050 * @vdev_id: vdev id
3051 * @tdls_state: TDLS state
3052 * @notification_interval_ms: notification inerval
3053 * @tx_discovery_threshold: tx discovery threshold
3054 * @tx_teardown_threshold: tx teardown threashold
3055 * @rssi_teardown_threshold: RSSI teardown threshold
3056 * @rssi_delta: RSSI delta
3057 * @tdls_options: TDLS options
3058 * @peer_traffic_ind_window: raffic indication window
3059 * @peer_traffic_response_timeout: traffic response timeout
3060 * @puapsd_mask: uapsd mask
3061 * @puapsd_inactivity_time: uapsd inactivity time
3062 * @puapsd_rx_frame_threshold: uapsd rx frame threshold
3063 * @teardown_notification_ms: tdls teardown notification interval
3064 * @tdls_peer_kickout_threshold: tdls packet threshold for
3065 * peer kickout operation
3066 */
3067struct wmi_tdls_params {
3068 uint32_t vdev_id;
3069 uint32_t tdls_state;
3070 uint32_t notification_interval_ms;
3071 uint32_t tx_discovery_threshold;
3072 uint32_t tx_teardown_threshold;
3073 int32_t rssi_teardown_threshold;
3074 int32_t rssi_delta;
3075 uint32_t tdls_options;
3076 uint32_t peer_traffic_ind_window;
3077 uint32_t peer_traffic_response_timeout;
3078 uint32_t puapsd_mask;
3079 uint32_t puapsd_inactivity_time;
3080 uint32_t puapsd_rx_frame_threshold;
3081 uint32_t teardown_notification_ms;
3082 uint32_t tdls_peer_kickout_threshold;
3083};
3084
Frank Liu0ba573b2017-03-15 17:51:43 +08003085#ifndef CONVERGED_TDLS_ENABLE
Govind Singhae855362016-03-07 14:24:22 +05303086/**
3087 * struct tdls_chan_switch_params - channel switch parameter structure
3088 * @vdev_id: vdev ID
3089 * @peer_mac_addr: Peer mac address
3090 * @tdls_off_ch_bw_offset: Target off-channel bandwitdh offset
3091 * @tdls_off_ch: Target Off Channel
3092 * @oper_class: Operating class for target channel
3093 * @is_responder: Responder or initiator
3094 */
3095struct tdls_channel_switch_params {
3096 uint32_t vdev_id;
Govind Singh8675b862016-03-28 22:09:18 +05303097 uint8_t peer_mac_addr[IEEE80211_ADDR_LEN];
Govind Singhae855362016-03-07 14:24:22 +05303098 uint16_t tdls_off_ch_bw_offset;
3099 uint8_t tdls_off_ch;
3100 uint8_t tdls_sw_mode;
3101 uint8_t oper_class;
3102 uint8_t is_responder;
3103};
Frank Liu0ba573b2017-03-15 17:51:43 +08003104#endif
Govind Singhae855362016-03-07 14:24:22 +05303105
3106/**
3107 * struct dhcp_offload_info_params - dhcp offload parameters
3108 * @vdev_id: request data length
Jeff Johnson645f7a12017-10-04 19:19:20 -07003109 * @dhcp_offload_enabled: dhcp offload enabled
3110 * @dhcp_client_num: dhcp client no
3111 * @dhcp_srv_addr: dhcp server ip
Govind Singhae855362016-03-07 14:24:22 +05303112 */
3113struct dhcp_offload_info_params {
3114 uint32_t vdev_id;
Jeff Johnson645f7a12017-10-04 19:19:20 -07003115 bool dhcp_offload_enabled;
3116 uint32_t dhcp_client_num;
3117 uint32_t dhcp_srv_addr;
Govind Singhae855362016-03-07 14:24:22 +05303118};
3119
3120/**
3121 * struct nan_req_params - NAN request params
3122 * @request_data_len: request data length
3123 * @request_data: request data
3124 */
3125struct nan_req_params {
3126 uint16_t request_data_len;
3127 uint8_t request_data[];
3128};
3129
3130
3131/**
3132 * struct app_type2_params - app type2parameter
3133 * @vdev_id: vdev id
3134 * @rc4_key: rc4 key
3135 * @rc4_key_len: rc4 key length
3136 * @ip_id: NC id
3137 * @ip_device_ip: NC IP addres
3138 * @ip_server_ip: Push server IP address
3139 * @tcp_src_port: NC TCP port
3140 * @tcp_dst_port: Push server TCP port
3141 * @tcp_seq: tcp sequence
3142 * @tcp_ack_seq: tcp ack sequence
3143 * @keepalive_init: Initial ping interval
3144 * @keepalive_min: Minimum ping interval
3145 * @keepalive_max: Maximum ping interval
3146 * @keepalive_inc: Increment of ping interval
3147 * @gateway_mac: gateway mac address
3148 * @tcp_tx_timeout_val: tcp tx timeout value
3149 * @tcp_rx_timeout_val: tcp rx timeout value
3150 */
3151struct app_type2_params {
3152 uint8_t vdev_id;
3153 uint8_t rc4_key[16];
3154 uint32_t rc4_key_len;
3155 /** ip header parameter */
3156 uint32_t ip_id;
3157 uint32_t ip_device_ip;
3158 uint32_t ip_server_ip;
3159 /** tcp header parameter */
3160 uint16_t tcp_src_port;
3161 uint16_t tcp_dst_port;
3162 uint32_t tcp_seq;
3163 uint32_t tcp_ack_seq;
3164 uint32_t keepalive_init;
3165 uint32_t keepalive_min;
3166 uint32_t keepalive_max;
3167 uint32_t keepalive_inc;
Govind Singhd7468a52016-03-09 14:32:57 +05303168 struct qdf_mac_addr gateway_mac;
Govind Singhae855362016-03-07 14:24:22 +05303169 uint32_t tcp_tx_timeout_val;
3170 uint32_t tcp_rx_timeout_val;
3171};
3172
3173/**
3174 * struct app_type1_params - app type1 parameter
3175 * @vdev_id: vdev id
3176 * @wakee_mac_addr: mac address
3177 * @identification_id: identification id
3178 * @password: password
3179 * @id_length: id length
3180 * @pass_length: password length
3181 */
3182struct app_type1_params {
3183 uint8_t vdev_id;
Govind Singhd7468a52016-03-09 14:32:57 +05303184 struct qdf_mac_addr wakee_mac_addr;
Govind Singhae855362016-03-07 14:24:22 +05303185 uint8_t identification_id[8];
3186 uint8_t password[16];
3187 uint32_t id_length;
3188 uint32_t pass_length;
3189};
3190
3191/**
3192 * enum wmi_ext_wow_type - wow type
3193 * @WMI_EXT_WOW_TYPE_APP_TYPE1: only enable wakeup for app type1
3194 * @WMI_EXT_WOW_TYPE_APP_TYPE2: only enable wakeup for app type2
3195 * @WMI_EXT_WOW_TYPE_APP_TYPE1_2: enable wakeup for app type1&2
3196 */
3197enum wmi_ext_wow_type {
3198 WMI_EXT_WOW_TYPE_APP_TYPE1,
3199 WMI_EXT_WOW_TYPE_APP_TYPE2,
3200 WMI_EXT_WOW_TYPE_APP_TYPE1_2,
3201};
3202
3203/**
3204 * struct ext_wow_params - ext wow parameters
3205 * @vdev_id: vdev id
3206 * @type: wow type
3207 * @wakeup_pin_num: wake up gpio no
3208 */
3209struct ext_wow_params {
3210 uint8_t vdev_id;
3211 enum wmi_ext_wow_type type;
3212 uint32_t wakeup_pin_num;
3213};
3214
3215/**
3216 * struct stats_ext_params - ext stats request
3217 * @vdev_id: vdev id
3218 * @request_data_len: request data length
3219 * @request_data: request data
3220 */
3221struct stats_ext_params {
3222 uint32_t vdev_id;
3223 uint32_t request_data_len;
3224 uint8_t request_data[];
3225};
3226
3227#define WMI_PERIODIC_TX_PTRN_MAX_SIZE 1536
3228/**
3229 * struct periodic_tx_pattern - periodic tx pattern
3230 * @mac_address: MAC Address for the adapter
3231 * @ucPtrnId: Pattern ID
3232 * @ucPtrnSize: Pattern size
3233 * @usPtrnIntervalMs: in ms
3234 * @ucPattern: Pattern buffer
3235 */
3236struct periodic_tx_pattern {
Govind Singhd7468a52016-03-09 14:32:57 +05303237 struct qdf_mac_addr mac_address;
Govind Singhae855362016-03-07 14:24:22 +05303238 uint8_t ucPtrnId;
3239 uint16_t ucPtrnSize;
3240 uint32_t usPtrnIntervalMs;
3241 uint8_t ucPattern[WMI_PERIODIC_TX_PTRN_MAX_SIZE];
3242};
3243
Vignesh Viswanathan90cd7742017-09-25 14:36:38 +05303244#define WMI_GTK_OFFLOAD_KEK_BYTES 64
3245#define WMI_GTK_OFFLOAD_KCK_BYTES 16
3246#define WMI_GTK_OFFLOAD_ENABLE 0
3247#define WMI_GTK_OFFLOAD_DISABLE 1
3248
Govind Singhae855362016-03-07 14:24:22 +05303249/**
3250 * struct flashing_req_params - led flashing parameter
3251 * @reqId: request id
3252 * @pattern_id: pattern identifier. 0: disconnected 1: connected
3253 * @led_x0: led flashing parameter0
3254 * @led_x1: led flashing parameter1
3255 */
3256struct flashing_req_params {
3257 uint32_t req_id;
3258 uint32_t pattern_id;
3259 uint32_t led_x0;
3260 uint32_t led_x1;
3261};
3262
Govind Singh89727882016-04-15 13:58:27 +05303263#define MAX_MEM_CHUNKS 32
3264/**
3265 * struct wmi_host_mem_chunk - host memory chunk structure
3266 * @vaddr: Pointer to virtual address
3267 * @paddr: Physical address
3268 * @memctx: qdf memory context for mapped address.
3269 * @len: length of chunk
3270 * @req_id: request id from target
3271 */
Govind Singhae855362016-03-07 14:24:22 +05303272struct wmi_host_mem_chunk {
3273 uint32_t *vaddr;
3274 uint32_t paddr;
Govind Singhd7468a52016-03-09 14:32:57 +05303275 qdf_dma_mem_context(memctx);
Govind Singhae855362016-03-07 14:24:22 +05303276 uint32_t len;
3277 uint32_t req_id;
3278};
3279
Govind Singh89727882016-04-15 13:58:27 +05303280/**
Govind Singhae855362016-03-07 14:24:22 +05303281 * struct wmi_wifi_start_log - Structure to store the params sent to start/
3282 * stop logging
3283 * @name: Attribute which indicates the type of logging like per packet
3284 * statistics, connectivity etc.
3285 * @verbose_level: Verbose level which can be 0,1,2,3
3286 * @flag: Flag field for future use
3287 */
3288struct wmi_wifi_start_log {
3289 uint32_t ring_id;
3290 uint32_t verbose_level;
3291 uint32_t flag;
3292};
3293
3294/**
3295 * struct wmi_pcl_list - Format of PCL
3296 * @pcl_list: List of preferred channels
Manishekar Chandrasekaranb8c59382016-04-21 19:16:32 +05303297 * @weight_list: Weights of the PCL
Govind Singhae855362016-03-07 14:24:22 +05303298 * @pcl_len: Number of channels in the PCL
3299 */
3300struct wmi_pcl_list {
3301 uint8_t pcl_list[128];
Manishekar Chandrasekaranb8c59382016-04-21 19:16:32 +05303302 uint8_t weight_list[128];
Govind Singhae855362016-03-07 14:24:22 +05303303 uint32_t pcl_len;
3304};
3305
3306/**
Manishekar Chandrasekaranb8c59382016-04-21 19:16:32 +05303307 * struct wmi_pcl_chan_weights - Params to get the valid weighed list
3308 * @pcl_list: Preferred channel list already sorted in the order of preference
3309 * @pcl_len: Length of the PCL
3310 * @saved_chan_list: Valid channel list updated as part of
3311 * WMA_UPDATE_CHAN_LIST_REQ
3312 * @saved_num_chan: Length of the valid channel list
3313 * @weighed_valid_list: Weights of the valid channel list. This will have one
3314 * to one mapping with valid_chan_list. FW expects channel order and size to be
3315 * as per the list provided in WMI_SCAN_CHAN_LIST_CMDID.
3316 * @weight_list: Weights assigned by policy manager
3317 */
3318struct wmi_pcl_chan_weights {
3319 uint8_t pcl_list[MAX_NUM_CHAN];
3320 uint32_t pcl_len;
3321 uint8_t saved_chan_list[MAX_NUM_CHAN];
3322 uint32_t saved_num_chan;
3323 uint8_t weighed_valid_list[MAX_NUM_CHAN];
3324 uint8_t weight_list[MAX_NUM_CHAN];
3325};
3326
3327/**
Govind Singhae855362016-03-07 14:24:22 +05303328 * struct wmi_hw_mode_params - HW mode params
3329 * @mac0_tx_ss: MAC0 Tx spatial stream
3330 * @mac0_rx_ss: MAC0 Rx spatial stream
3331 * @mac1_tx_ss: MAC1 Tx spatial stream
3332 * @mac1_rx_ss: MAC1 Rx spatial stream
3333 * @mac0_bw: MAC0 bandwidth
3334 * @mac1_bw: MAC1 bandwidth
3335 * @dbs_cap: DBS capabality
3336 * @agile_dfs_cap: Agile DFS capabality
3337 */
3338struct wmi_hw_mode_params {
3339 uint8_t mac0_tx_ss;
3340 uint8_t mac0_rx_ss;
3341 uint8_t mac1_tx_ss;
3342 uint8_t mac1_rx_ss;
3343 uint8_t mac0_bw;
3344 uint8_t mac1_bw;
3345 uint8_t dbs_cap;
3346 uint8_t agile_dfs_cap;
3347};
3348
3349/**
3350 * struct wmi_dual_mac_config - Dual MAC configuration
3351 * @scan_config: Scan configuration
3352 * @fw_mode_config: FW mode configuration
3353 * @set_dual_mac_cb: Callback function to be executed on response to the command
3354 */
3355struct wmi_dual_mac_config {
3356 uint32_t scan_config;
3357 uint32_t fw_mode_config;
3358 void *set_dual_mac_cb;
3359};
3360
Govind Singhae855362016-03-07 14:24:22 +05303361/**
3362 * struct ssid_hotlist_param - param for SSID Hotlist
3363 * @ssid: SSID which is being hotlisted
3364 * @band: Band in which the given SSID should be scanned
3365 * @rssi_low: Low bound on RSSI
3366 * @rssi_high: High bound on RSSI
3367 */
3368struct ssid_hotlist_param {
3369 struct mac_ssid ssid;
3370 uint8_t band;
3371 int32_t rssi_low;
3372 int32_t rssi_high;
3373};
3374
3375/**
Abhishek Singh5fa02552017-07-05 11:21:32 +05303376 * struct rssi_disallow_bssid - Structure holding Rssi based avoid candidate
3377 * @bssid: BSSID of the AP
3378 * @remaining_duration: remaining disallow duration in ms
3379 * @expected_rssi: RSSI at which STA can initate in dBm
3380 */
3381struct rssi_disallow_bssid {
3382 struct qdf_mac_addr bssid;
3383 uint32_t remaining_duration;
3384 int8_t expected_rssi;
3385};
3386
3387
3388/**
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05303389 * struct roam_scan_filter_params - Structure holding roaming scan
3390 * parameters
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05303391 * @op_bitmap: bitmap to determine reason of roaming
3392 * @session_id: vdev id
3393 * @num_bssid_black_list: The number of BSSID's that we should
3394 * avoid connecting to. It is like a
3395 * blacklist of BSSID's.
3396 * @num_ssid_white_list: The number of SSID profiles that are
3397 * in the Whitelist. When roaming, we
3398 * consider the BSSID's with this SSID
3399 * also for roaming apart from the connected one's
3400 * @num_bssid_preferred_list: Number of BSSID's which have a preference over
3401 * others
3402 * @bssid_avoid_list: Blacklist SSID's
3403 * @ssid_allowed_list: Whitelist SSID's
3404 * @bssid_favored: Favorable BSSID's
3405 * @bssid_favored_factor: RSSI to be added to this BSSID to prefer it
Selvaraj, Sridhar6edc08b2017-05-29 18:38:52 +05303406 * @lca_disallow_config_present: LCA [Last Connected AP] disallow config present
3407 * @disallow_duration: How long LCA AP will be disallowed before it
3408 * can be a roaming candidate again, in seconds
3409 * @rssi_channel_penalization:How much RSSI will be penalized if candidate(s)
3410 * are found in the same channel as disallowed AP's,
3411 * in units of db
3412 * @num_disallowed_aps: How many APs the target should maintain in its
3413 * LCA list
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05303414 *
3415 * This structure holds all the key parameters related to
3416 * initial connection and roaming connections.
3417 */
3418
3419struct roam_scan_filter_params {
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05303420 uint32_t op_bitmap;
3421 uint8_t session_id;
3422 uint32_t num_bssid_black_list;
3423 uint32_t num_ssid_white_list;
3424 uint32_t num_bssid_preferred_list;
3425 struct qdf_mac_addr bssid_avoid_list[MAX_BSSID_AVOID_LIST];
3426 struct mac_ssid ssid_allowed_list[MAX_SSID_ALLOWED_LIST];
3427 struct qdf_mac_addr bssid_favored[MAX_BSSID_FAVORED];
3428 uint8_t bssid_favored_factor[MAX_BSSID_FAVORED];
Selvaraj, Sridhar6edc08b2017-05-29 18:38:52 +05303429 uint8_t lca_disallow_config_present;
3430 uint32_t disallow_duration;
3431 uint32_t rssi_channel_penalization;
3432 uint32_t num_disallowed_aps;
Abhishek Singh5fa02552017-07-05 11:21:32 +05303433 uint32_t num_rssi_rejection_ap;
3434 struct rssi_disallow_bssid rssi_rejection_ap[MAX_RSSI_AVOID_BSSID_LIST];
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05303435};
3436
Vignesh Viswanathan90cd7742017-09-25 14:36:38 +05303437#define WMI_MAX_HLP_IE_LEN 2048
3438/**
3439 * struct hlp_params - HLP info params
3440 * @vdev_id: vdev id
3441 * @hlp_ie_len: HLP IE length
3442 * @hlp_ie: HLP IE
3443 */
3444struct hlp_params {
3445 uint8_t vdev_id;
3446 uint32_t hlp_ie_len;
3447 uint8_t hlp_ie[WMI_MAX_HLP_IE_LEN];
3448};
3449
3450#define WMI_UNIFIED_MAX_PMKID_LEN 16
3451#define WMI_UNIFIED_MAX_PMK_LEN 64
3452
3453/**
3454 * struct wmi_unified_pmk_cache - used to set del pmkid cache
3455 * @tlv_header: TLV header, TLV tag and len; tag equals WMITLV_TAG_ARRAY_UINT32
3456 * @pmk_len: PMK len
3457 * for big-endian hosts, manual endian conversion will be needed to keep
3458 * the array values in their original order in spite of the automatic
3459 * byte-swap applied to WMI messages during download
3460 * @pmk: PMK array
3461 * @pmkid_len: PMK ID Len
3462 * @pmkid: PMK ID Array
3463 * @bssid: BSSID
3464 * @ssid: SSID
3465 * @cache_id: PMK Cache ID
3466 * @cat_flag: whether (bssid) or (ssid,cache_id) is valid
3467 * @action_flag: add/delete the entry
3468 */
3469struct wmi_unified_pmk_cache {
Vivek73465282018-03-22 23:27:21 +05303470 uint32_t tlv_header;
3471 uint32_t pmk_len;
3472 uint8_t session_id;
3473 uint8_t pmk[WMI_UNIFIED_MAX_PMK_LEN];
3474 uint32_t pmkid_len;
3475 uint8_t pmkid[WMI_UNIFIED_MAX_PMKID_LEN];
Vignesh Viswanathan90cd7742017-09-25 14:36:38 +05303476 wmi_host_mac_addr bssid;
3477 struct mac_ssid ssid;
Vivek73465282018-03-22 23:27:21 +05303478 uint32_t cache_id;
3479 uint32_t cat_flag;
3480 uint32_t action_flag;
Vignesh Viswanathan90cd7742017-09-25 14:36:38 +05303481};
3482
3483
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05303484/**
Govind Singhae855362016-03-07 14:24:22 +05303485 * struct ssid_hotlist_request_params - set SSID hotlist request struct
3486 * @request_id: ID of the request
3487 * @session_id: ID of the session
3488 * @lost_ssid_sample_size: Number of consecutive scans in which the SSID
3489 * must not be seen in order to consider the SSID "lost"
3490 * @ssid_count: Number of valid entries in the @ssids array
3491 * @ssids: Array that defines the SSIDs that are in the hotlist
3492 */
3493struct ssid_hotlist_request_params {
3494 uint32_t request_id;
3495 uint8_t session_id;
3496 uint32_t lost_ssid_sample_size;
3497 uint32_t ssid_count;
3498 struct ssid_hotlist_param ssids[WMI_EXTSCAN_MAX_HOTLIST_SSIDS];
3499};
3500
3501/**
3502 * struct wmi_unit_test_cmd - unit test command parameters
3503 * @vdev_id: vdev id
3504 * @module_id: module id
3505 * @num_args: number of arguments
Adil Saeed Musthafa0b6c7602017-08-23 17:32:11 -07003506 * @diag_token: dialog token, which identifies the transaction.
3507 * this number is generated by wifitool and may be used to
3508 * identify the transaction in the event path
Govind Singhae855362016-03-07 14:24:22 +05303509 * @args: arguments
3510 */
3511struct wmi_unit_test_cmd {
3512 uint32_t vdev_id;
Govind Singh89727882016-04-15 13:58:27 +05303513 uint32_t module_id;
Govind Singhae855362016-03-07 14:24:22 +05303514 uint32_t num_args;
Adil Saeed Musthafa0b6c7602017-08-23 17:32:11 -07003515 uint32_t diag_token;
Shaakir Mohamede2bc1b32018-01-19 15:49:23 -08003516 uint32_t args[WMI_UNIT_TEST_MAX_NUM_ARGS];
Govind Singhae855362016-03-07 14:24:22 +05303517};
3518
3519/**
3520 * struct wmi_roam_invoke_cmd - roam invoke command
3521 * @vdev_id: vdev id
3522 * @bssid: mac address
3523 * @channel: channel
Naveen Rawatccc1b072017-01-20 17:00:07 -08003524 * @frame_len: frame length, includs mac header, fixed params and ies
3525 * @frame_buf: buffer contaning probe response or beacon
Krunal Sonib46f48b2017-07-25 11:23:44 -07003526 * @is_same_bssid: flag to indicate if roaming is requested for same bssid
Govind Singhae855362016-03-07 14:24:22 +05303527 */
3528struct wmi_roam_invoke_cmd {
3529 uint32_t vdev_id;
3530 uint8_t bssid[IEEE80211_ADDR_LEN];
3531 uint32_t channel;
Naveen Rawatccc1b072017-01-20 17:00:07 -08003532 uint32_t frame_len;
3533 uint8_t *frame_buf;
Krunal Sonib46f48b2017-07-25 11:23:44 -07003534 uint8_t is_same_bssid;
Govind Singhae855362016-03-07 14:24:22 +05303535};
3536
3537/**
3538 * struct ext_scan_setbssi_hotlist_params - set hotlist request
3539 * @requestId: request identifier
3540 * @sessionId: session identifier
3541 * @lost_ap_sample_size: number of samples to confirm AP loss
3542 * @numAp: Number of hotlist APs
3543 * @ap: hotlist APs
3544 */
3545struct ext_scan_setbssi_hotlist_params {
3546 uint32_t requestId;
3547 uint8_t sessionId;
3548
3549 uint32_t lost_ap_sample_size;
3550 uint32_t numAp;
3551 struct ap_threshold_params ap[WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS];
3552};
Govind Singh89727882016-04-15 13:58:27 +05303553
3554/**
Govind Singh89727882016-04-15 13:58:27 +05303555 * struct host_mem_req - Host memory request paramseters request by target
3556 * @req_id: Request id to identify the request.
3557 * @unit_size: Size of single unit requested.
3558 * @num_unit_info: Memory chunk info
3559 * @num_units: number of units requested.
3560 */
3561typedef struct {
3562 uint32_t req_id;
3563 uint32_t unit_size;
3564 uint32_t num_unit_info;
3565 uint32_t num_units;
3566} host_mem_req;
3567
3568#define WMI_HOST_DSCP_MAP_MAX (64)
3569
3570/**
3571 * struct wmi_host_ext_resource_config - Extended resource config
3572 * @host_platform_config: Host plaform configuration.
3573 * @fw_featuew_bitmap: FW feature requested bitmap.
3574 */
3575typedef struct {
3576 uint32_t host_platform_config;
3577
3578#define WMI_HOST_FW_FEATURE_LTEU_SUPPORT 0x0001
3579#define WMI_HOST_FW_FEATURE_COEX_GPIO_SUPPORT 0x0002
3580#define WMI_HOST_FW_FEATURE_AUX_RADIO_SPECTRAL_INTF 0x0004
3581#define WMI_HOST_FW_FEATURE_AUX_RADIO_CHAN_LOAD_INTF 0x0008
3582#define WMI_HOST_FW_FEATURE_BSS_CHANNEL_INFO_64 0x0010
3583#define WMI_HOST_FW_FEATURE_PEER_STATS 0x0020
3584#define WMI_HOST_FW_FEATURE_VDEV_STATS 0x0040
3585 /**
3586 * @brief fw_feature_bitmask - Enable/Disable features in FW
3587 * @details
3588 * The bits in fw_feature_bitmask are used as shown by the masks below:
3589 * 0x0001 - LTEU Config enable/disable
3590 * 0x0002 - COEX GPIO Config enable/disable
3591 * 0x0004 - Aux Radio enhancement for spectral scan enable/disable
3592 * 0x0008 - Aux Radio enhancement for chan load scan enable/disable
3593 * 0x0010 - BSS channel info stats enable/disable
3594 * The features in question are enabled by setting
3595 * the feature's bit to 1,
3596 * or disabled by setting the feature's bit to 0.
3597 */
3598 uint32_t fw_feature_bitmap;
3599
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05303600 /* WLAN priority GPIO number
3601 * The target uses a GPIO pin to indicate when it is transmitting
3602 * high-priority traffic (e.g. beacon, management, or AC_VI) or
3603 * low-priority traffic (e.g. AC_BE, AC_BK). The HW uses this
3604 * WLAN GPIO pin to determine whether to abort WLAN tx in favor of
3605 * BT activity.
3606 * Which GPIO is used for this WLAN tx traffic priority specification
3607 * varies between platforms, so the host needs to indicate to the
3608 * target which GPIO to use.
3609 */
3610 uint32_t wlan_priority_gpio;
3611
Sathish Kumar612d0c22017-01-19 14:57:37 +05303612 /* Host will notify target which coex algorithm has to be
3613 * enabled based on HW, FW capability and device tree config.
3614 * Till now the coex algorithms were target specific. Now the
3615 * same target can choose between multiple coex algorithms
3616 * depending on device tree config on host. For backward
3617 * compatibility, version support will have option 0 and will
3618 * rely on FW compile time flags to decide the coex version
3619 * between VERSION_1, VERSION_2 and VERSION_3. Version info is
3620 * mandatory from VERSION_4 onwards for any new coex algorithms.
3621 *
3622 * 0 = no version support
3623 * 1 = COEX_VERSION_1 (3 wire coex)
3624 * 2 = COEX_VERSION_2 (2.5 wire coex)
3625 * 3 = COEX_VERSION_3 (2.5 wire coex+duty cycle)
3626 * 4 = COEX_VERSION_4 (4 wire coex)
3627 */
3628 uint32_t coex_version;
3629
3630 /* There are multiple coex implementations on FW to support different
3631 * hardwares. Since the coex algos are mutually exclusive, host will
3632 * use below fields to send GPIO info to FW and these GPIO pins will
3633 * have different usages depending on the feature enabled. This is to
3634 * avoid adding multiple GPIO fields here for different features.
3635 *
3636 * COEX VERSION_4 (4 wire coex) :
3637 * 4 wire coex feature uses 1 common input request line from BT/ZB/
3638 * Thread which interrupts the WLAN target processor directly, 1 input
3639 * priority line from BT and ZB each, 1 output line to grant access to
3640 * requesting IOT subsystem. WLAN uses the input priority line to
3641 * identify the requesting IOT subsystem. Request is granted based on
3642 * IOT interface priority and WLAN traffic. GPIO pin usage is as below:
3643 * coex_gpio_pin_1 = BT PRIORITY INPUT GPIO
3644 * coex_gpio_pin_2 = ZIGBEE PRIORITY INPUT GPIO
3645 * coex_gpio_pin_3 = GRANT OUTPUT GPIO
3646 * when a BT active interrupt is raised, WLAN reads
3647 * BT and ZB priority input GPIO pins to compare against the coex
3648 * priority table and accordingly sets the grant output GPIO to give
3649 * access to requesting IOT subsystem.
3650 */
3651 uint32_t coex_gpio_pin_1;
3652 uint32_t coex_gpio_pin_2;
3653 uint32_t coex_gpio_pin_3;
3654
Govind Singh89727882016-04-15 13:58:27 +05303655 /* add new members here */
3656} wmi_host_ext_resource_config;
3657
3658/**
3659 * struct set_neighbour_rx_params - Neighbour RX params
3660 * @vdev_id: vdev id
3661 * @idx: index of param
3662 * @action: action
3663 * @type: Type of param
3664 */
3665struct set_neighbour_rx_params {
3666 uint8_t vdev_id;
3667 uint32_t idx;
3668 uint32_t action;
3669 uint32_t type;
3670};
3671
3672/**
3673 * struct set_fwtest_params - FW test params
3674 * @arg: FW param id
3675 * @value: value
3676 */
3677struct set_fwtest_params {
3678 uint32_t arg;
3679 uint32_t value;
3680};
3681
3682/**
Sathish Kumar6190e772017-11-08 14:49:58 +05303683 * struct set_custom_aggr_size_params - custom aggr size params
3684 * @vdev_id : vdev id
3685 * @tx_aggr_size : TX aggr size
3686 * @rx_aggr_size : RX aggr size
3687 * @enable_bitmap: Bitmap for aggr size check
3688 */
3689struct set_custom_aggr_size_params {
3690 uint32_t vdev_id;
3691 uint32_t tx_aggr_size;
3692 uint32_t rx_aggr_size;
3693 uint32_t ac:2,
3694 aggr_type:1,
3695 tx_aggr_size_disable:1,
3696 rx_aggr_size_disable:1,
3697 tx_ac_enable:1,
3698 reserved:26;
3699};
3700
3701/**
3702 * enum wmi_host_custom_aggr_type_t: custon aggregate type
3703 * @WMI_HOST_CUSTOM_AGGR_TYPE_AMPDU: A-MPDU aggregation
3704 * @WMI_HOST_CUSTOM_AGGR_TYPE_AMSDU: A-MSDU aggregation
3705 * @WMI_HOST_CUSTOM_AGGR_TYPE_MAX: Max type
3706 */
3707enum wmi_host_custom_aggr_type_t {
3708 WMI_HOST_CUSTOM_AGGR_TYPE_AMPDU = 0,
3709 WMI_HOST_CUSTOM_AGGR_TYPE_AMSDU = 1,
3710 WMI_HOST_CUSTOM_AGGR_TYPE_MAX,
3711};
3712
Venkateswara Swamy Bandaru81f40dc2017-12-22 17:16:19 +05303713/*
3714 * msduq_update_params - MSDUQ update param structure
3715 * @tid_num: TID number
3716 * @msduq_update_mask: update bit mask
3717 * @qdepth_thresh_value: threshold value for the queue depth
3718 */
3719
3720#define QDEPTH_THRESH_MAX_UPDATES 1
3721
3722typedef struct {
3723 uint32_t tid_num;
3724 uint32_t msduq_update_mask;
3725 uint32_t qdepth_thresh_value;
3726} msduq_update_params;
3727
3728/**
3729 * struct set_qdepth_thresh_params - MSDU Queue Depth Threshold Params
3730 * @vdev_id: vdev id
3731 * @pdev_id: pdev id
3732 * @mac_addr: MAC address
3733 * @num_of_msduq_updates: holds the number of tid updates
3734 */
3735
3736struct set_qdepth_thresh_params {
3737 uint32_t pdev_id;
3738 uint32_t vdev_id;
3739 uint8_t mac_addr[IEEE80211_ADDR_LEN];
3740 uint32_t num_of_msduq_updates;
3741 msduq_update_params update_params[QDEPTH_THRESH_MAX_UPDATES];
3742};
3743
3744
3745
Sathish Kumar6190e772017-11-08 14:49:58 +05303746/**
Govind Singh89727882016-04-15 13:58:27 +05303747 * struct config_ratemask_params - ratemask config parameters
3748 * @vdev_id: vdev id
3749 * @type: Type
3750 * @lower32: Lower 32 bits
3751 * @higher32: Hogher 32 bits
3752 */
3753struct config_ratemask_params {
3754 uint8_t vdev_id;
3755 uint8_t type;
3756 uint32_t lower32;
3757 uint32_t higher32;
3758};
3759
3760/**
Subrat Mishra7c9427e2017-09-27 14:41:20 +05303761 * struct config_fils_params - FILS config params
3762 * @vdev_id: vdev id
3763 * @fd_period: 0 - Disabled, non-zero - Period in ms (mili seconds)
3764 */
3765struct config_fils_params {
3766 uint8_t vdev_id;
3767 uint32_t fd_period;
3768};
3769
3770/**
Govind Singh89727882016-04-15 13:58:27 +05303771 * struct peer_add_wds_entry_params - WDS peer entry add params
3772 * @dest_addr: Pointer to destination macaddr
3773 * @peer_addr: Pointer to peer mac addr
3774 * @flags: flags
Sathish Kumar79fdae42017-02-22 17:28:28 +05303775 * @vdev_id: Vdev id
Govind Singh89727882016-04-15 13:58:27 +05303776 */
3777struct peer_add_wds_entry_params {
3778 const uint8_t *dest_addr;
3779 uint8_t *peer_addr;
3780 uint32_t flags;
Sathish Kumar79fdae42017-02-22 17:28:28 +05303781 uint32_t vdev_id;
Govind Singh89727882016-04-15 13:58:27 +05303782};
3783
3784/**
3785 * struct peer_del_wds_entry_params - WDS peer entry del params
3786 * @dest_addr: Pointer to destination macaddr
Sathish Kumar79fdae42017-02-22 17:28:28 +05303787 * @vdev_id: Vdev id
Govind Singh89727882016-04-15 13:58:27 +05303788 */
3789struct peer_del_wds_entry_params {
3790 uint8_t *dest_addr;
Sathish Kumar79fdae42017-02-22 17:28:28 +05303791 uint32_t vdev_id;
Govind Singh89727882016-04-15 13:58:27 +05303792};
3793
3794/**
Jeevan Kukkalli28e8a162017-06-16 18:07:28 +05303795 * struct set_bridge_mac_addr_params - set bridge MAC addr params
3796 * @dest_addr: Pointer to bridge macaddr
3797 */
3798struct set_bridge_mac_addr_params {
3799 uint8_t *bridge_addr;
3800};
3801
3802/**
Govind Singh89727882016-04-15 13:58:27 +05303803 * struct peer_updatewds_entry_params - WDS peer entry update params
3804 * @wds_macaddr: Pointer to destination macaddr
3805 * @peer_add: Pointer to peer mac addr
3806 * @flags: flags
Sathish Kumar79fdae42017-02-22 17:28:28 +05303807 * @vdev_id: Vdev id
Govind Singh89727882016-04-15 13:58:27 +05303808 */
3809struct peer_update_wds_entry_params {
3810 uint8_t *wds_macaddr;
3811 uint8_t *peer_macaddr;
3812 uint32_t flags;
Sathish Kumardcc75292017-03-01 14:02:36 +05303813 uint32_t vdev_id;
Govind Singh89727882016-04-15 13:58:27 +05303814};
3815
3816/**
3817 * struct set_ps_mode_params - PS mode params
3818 * @vdev_id: vdev id
3819 * @psmode: PS mode
3820 */
3821struct set_ps_mode_params {
3822 uint8_t vdev_id;
3823 uint8_t psmode;
3824};
3825
3826/**
3827 * @struct tt_level_config - Set Thermal throttlling config
3828 * @tmplwm: Temperature low water mark
3829 * @tmphwm: Temperature high water mark
3830 * @dcoffpercent: dc off percentage
3831 * @priority: priority
3832 */
3833typedef struct {
3834 uint32_t tmplwm;
3835 uint32_t tmphwm;
3836 uint32_t dcoffpercent;
3837 uint32_t priority;
3838} tt_level_config;
3839
3840/**
3841 * struct thermal_mitigation_params - Thermal mitigation params
3842 * @enable: Enable/Disable Thermal mitigation
3843 * @dc: DC
3844 * @dc_per_event: DC per event
3845 * @tt_level_config: TT level config params
3846 */
3847struct thermal_mitigation_params {
Om Prakash Tripathi2f54fbb2017-04-19 16:57:31 +05303848 uint32_t pdev_id;
Govind Singh89727882016-04-15 13:58:27 +05303849 uint32_t enable;
3850 uint32_t dc;
3851 uint32_t dc_per_event;
3852 tt_level_config levelconf[THERMAL_LEVELS];
3853};
3854
3855/**
3856 * struct smart_ant_enable_params - Smart antenna params
3857 * @enable: Enable/Disable
3858 * @mode: SA mode
3859 * @rx_antenna: RX antenna config
Govind Singh41da3152016-05-06 20:20:25 +05303860 * @gpio_pin : GPIO pin config
3861 * @gpio_func : GPIO function config
Govind Singh89727882016-04-15 13:58:27 +05303862 */
3863struct smart_ant_enable_params {
3864 uint32_t enable;
3865 uint32_t mode;
3866 uint32_t rx_antenna;
Govind Singh41da3152016-05-06 20:20:25 +05303867 uint32_t gpio_pin[WMI_HAL_MAX_SANTENNA];
3868 uint32_t gpio_func[WMI_HAL_MAX_SANTENNA];
Sathish Kumardcc75292017-03-01 14:02:36 +05303869 uint32_t pdev_id;
Govind Singh89727882016-04-15 13:58:27 +05303870};
3871
3872/**
3873 * struct smart_ant_rx_ant_params - RX antenna params
3874 * @antenna: RX antenna
3875 */
3876struct smart_ant_rx_ant_params {
3877 uint32_t antenna;
Sathish Kumardcc75292017-03-01 14:02:36 +05303878 uint32_t pdev_id;
Govind Singh89727882016-04-15 13:58:27 +05303879};
3880
3881/**
3882 * struct smart_ant_tx_ant_params - TX antenna param
3883 * @antenna_array: Antenna arry
3884 * @vdev_id: VDEV id
3885 */
3886struct smart_ant_tx_ant_params {
3887 uint32_t *antenna_array;
3888 uint8_t vdev_id;
3889};
3890
3891/**
3892 * struct smart_ant_training_info_params - SA training params
3893 * @vdev_id: VDEV id
3894 * @rate_array: Rates array
3895 * @antenna_array: Antenna array
3896 * @numpkts: num packets for training
3897 */
3898struct smart_ant_training_info_params {
3899 uint8_t vdev_id;
3900 uint32_t *rate_array;
3901 uint32_t *antenna_array;
3902 uint32_t numpkts;
3903};
3904
3905/**
3906 * struct smart_ant_node_config_params - SA node config params
3907 * @vdev_id: VDEV id
3908 * @cmd_id: Command id
3909 * @args_count: Arguments count
3910 */
3911struct smart_ant_node_config_params {
3912 uint8_t vdev_id;
3913 uint32_t cmd_id;
3914 uint16_t args_count;
3915 uint32_t *args_arr;
3916};
3917/**
3918 * struct smart_ant_enable_tx_feedback_params - SA tx feeback params
3919 * @enable: Enable TX feedback for SA
3920 */
3921struct smart_ant_enable_tx_feedback_params {
3922 int enable;
3923};
3924
3925/**
3926 * struct vdev_spectral_configure_params - SPectral config params
3927 * @vdev_id: VDEV id
3928 * @count: count
3929 * @period: period
3930 * @spectral_pri: Spectral priority
3931 * @fft_size: FFT size
3932 * @gc_enable: GC enable
3933 * @restart_enable: restart enabled
3934 * @noise_floor_ref: Noise floor reference
3935 * @init_delay: Init delays
3936 * @nb_tone_thr: NB tone threshold
3937 * @str_bin_thr: STR BIN threshold
3938 * @wb_rpt_mode: WB BIN threshold
3939 * @rssi_rpt_mode: RSSI report mode
3940 * @rssi_thr: RSSI threshold
3941 * @pwr_format: Power format
3942 * @rpt_mode: Report mdoe
3943 * @bin_scale: BIN scale
Shiva Krishna Pittala84073602017-12-18 16:39:20 +05303944 * @dbm_adj: DBM adjust
Govind Singh89727882016-04-15 13:58:27 +05303945 * @chn_mask: chain mask
3946 */
3947struct vdev_spectral_configure_params {
3948 uint8_t vdev_id;
3949 uint16_t count;
3950 uint16_t period;
3951 uint16_t spectral_pri;
3952 uint16_t fft_size;
3953 uint16_t gc_enable;
3954 uint16_t restart_enable;
3955 uint16_t noise_floor_ref;
3956 uint16_t init_delay;
3957 uint16_t nb_tone_thr;
3958 uint16_t str_bin_thr;
3959 uint16_t wb_rpt_mode;
3960 uint16_t rssi_rpt_mode;
3961 uint16_t rssi_thr;
3962 uint16_t pwr_format;
3963 uint16_t rpt_mode;
3964 uint16_t bin_scale;
Shiva Krishna Pittala84073602017-12-18 16:39:20 +05303965 uint16_t dbm_adj;
Govind Singh89727882016-04-15 13:58:27 +05303966 uint16_t chn_mask;
3967};
3968
3969/**
3970 * struct vdev_spectral_enable_params - Spectral enabled params
3971 * @vdev_id: VDEV id
3972 * @active_valid: Active valid
3973 * @active: active
3974 * @enabled_valid: Enabled valid
3975 * @enabled: enabled
3976 */
3977struct vdev_spectral_enable_params {
3978 uint8_t vdev_id;
3979 uint8_t active_valid;
3980 uint8_t active;
3981 uint8_t enabled_valid;
3982 uint8_t enabled;
3983};
3984
3985/**
3986 * struct pdev_set_regdomain_params - PDEV set reg domain params
3987 * @currentRDinuse: Current Reg domain
3988 * @currentRD2G: Current Reg domain 2G
3989 * @currentRD5G: Current Reg domain 5G
3990 * @ctl_2G: CTL 2G
3991 * @ctl_5G: CTL 5G
3992 * @dfsDomain: DFS domain
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05303993 * @pdev_id: pdev_id
Govind Singh89727882016-04-15 13:58:27 +05303994 */
3995struct pdev_set_regdomain_params {
3996 uint16_t currentRDinuse;
3997 uint16_t currentRD2G;
3998 uint16_t currentRD5G;
3999 uint32_t ctl_2G;
4000 uint32_t ctl_5G;
4001 uint8_t dfsDomain;
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05304002 uint32_t pdev_id;
Govind Singh89727882016-04-15 13:58:27 +05304003};
4004
4005/**
4006 * struct set_quiet_mode_params - Set quiet mode params
4007 * @enabled: Enabled
4008 * @period: Quite period
4009 * @intval: Quite interval
4010 * @duration: Quite duration
4011 * @offset: offset
4012 */
4013struct set_quiet_mode_params {
4014 uint8_t enabled;
4015 uint8_t period;
4016 uint16_t intval;
4017 uint16_t duration;
4018 uint16_t offset;
4019};
4020
4021/**
4022 * struct set_beacon_filter_params - Set beacon filter params
4023 * @vdev_id: VDEV id
4024 * @ie: Pointer to IE fields
4025 */
4026struct set_beacon_filter_params {
4027 uint8_t vdev_id;
4028 uint32_t *ie;
4029};
4030
4031/**
4032 * struct remove_beacon_filter_params - Remove beacon filter params
4033 * @vdev_id: VDEV id
4034 */
4035struct remove_beacon_filter_params {
4036 uint8_t vdev_id;
4037};
4038
4039/**
4040 * struct mgmt_params - Mgmt params
4041 * @vdev_id: vdev id
4042 * @buf_len: lenght of frame buffer
4043 * @wbuf: frame buffer
4044 */
4045struct mgmt_params {
4046 int vdev_id;
4047 uint32_t buf_len;
4048 qdf_nbuf_t wbuf;
4049};
4050
4051/**
4052 * struct addba_clearresponse_params - Addba clear response params
4053 * @vdev_id: VDEV id
4054 */
4055struct addba_clearresponse_params {
4056 uint8_t vdev_id;
4057};
4058
4059/**
4060 * struct addba_send_params - ADDBA send params
4061 * @vdev_id: vdev id
4062 * @tidno: TID
4063 * @buffersize: buffer size
4064 */
4065struct addba_send_params {
4066 uint8_t vdev_id;
4067 uint8_t tidno;
4068 uint16_t buffersize;
4069};
4070
4071/**
4072 * struct delba_send_params - DELBA send params
4073 * @vdev_id: vdev id
4074 * @tidno: TID
4075 * @initiator: initiator
4076 * @reasoncode: reason code
4077 */
4078struct delba_send_params {
4079 uint8_t vdev_id;
4080 uint8_t tidno;
4081 uint8_t initiator;
4082 uint16_t reasoncode;
4083};
4084/**
4085 * struct addba_setresponse_arams - Set ADDBA response params
4086 * @vdev_id: vdev id
4087 * @tidno: TID
4088 * @statuscode: status code in response
4089 */
4090struct addba_setresponse_params {
4091 uint8_t vdev_id;
4092 uint8_t tidno;
4093 uint16_t statuscode;
4094};
4095
4096/**
4097 * struct singleamsdu_params - Single AMSDU params
4098 * @vdev_id: vdev is
4099 * @tidno: TID
4100 */
4101struct singleamsdu_params {
4102 uint8_t vdev_id;
4103 uint8_t tidno;
4104};
4105
4106/**
4107 * struct set_qbosst_params - Set QBOOST params
4108 * @vdev_id: vdev id
4109 * @value: value
4110 */
4111struct set_qboost_params {
4112 uint8_t vdev_id;
4113 uint32_t value;
4114};
4115
4116/**
4117 * struct mu_scan_params - MU scan params
4118 * @id: id
4119 * @type: type
4120 * @duration: Duration
4121 * @lteu_tx_power: LTEU tx power
4122 */
4123struct mu_scan_params {
4124 uint8_t id;
4125 uint8_t type;
4126 uint32_t duration;
4127 uint32_t lteu_tx_power;
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05304128 uint32_t rssi_thr_bssid;
4129 uint32_t rssi_thr_sta;
4130 uint32_t rssi_thr_sc;
4131 uint32_t plmn_id;
4132 uint32_t alpha_num_bssid;
Govind Singh89727882016-04-15 13:58:27 +05304133};
4134
4135/**
4136 * struct lteu_config_params - LTEU config params
4137 * @lteu_gpio_start: start MU/AP scan after GPIO toggle
4138 * @lteu_num_bins: no. of elements in the following arrays
4139 * @use_actual_nf: whether to use the actual NF obtained or a hardcoded one
4140 * @lteu_weight: weights for MU algo
4141 * @lteu_thresh: thresholds for MU algo
4142 * @lteu_gamma: gamma's for MU algo
4143 * @lteu_scan_timeout: timeout in ms to gpio toggle
4144 * @alpha_num_ssid: alpha for num active bssid calculation
4145 * @wifi_tx_power: Wifi Tx power
4146 */
4147struct lteu_config_params {
4148 uint8_t lteu_gpio_start;
4149 uint8_t lteu_num_bins;
4150 uint8_t use_actual_nf;
4151 uint32_t lteu_weight[LTEU_MAX_BINS];
4152 uint32_t lteu_thresh[LTEU_MAX_BINS];
4153 uint32_t lteu_gamma[LTEU_MAX_BINS];
4154 uint32_t lteu_scan_timeout;
4155 uint32_t alpha_num_bssid;
4156 uint32_t wifi_tx_power;
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05304157 uint32_t allow_err_packets;
Govind Singh89727882016-04-15 13:58:27 +05304158};
4159
4160struct wmi_macaddr_t {
4161 /** upper 4 bytes of MAC address */
4162 uint32_t mac_addr31to0;
4163 /** lower 2 bytes of MAC address */
4164 uint32_t mac_addr47to32;
4165};
4166
4167/**
4168 * struct atf_peer_info - ATF peer info params
4169 * @peer_macaddr: peer mac addr
4170 * @percentage_peer: percentage of air time for this peer
Subrat Mishraf02ed8b2017-04-03 12:32:42 +05304171 * @vdev_id: Associated vdev id
4172 * @pdev_id: Associated pdev id
Govind Singh89727882016-04-15 13:58:27 +05304173 */
4174typedef struct {
4175 struct wmi_macaddr_t peer_macaddr;
4176 uint32_t percentage_peer;
Subrat Mishraf02ed8b2017-04-03 12:32:42 +05304177 uint32_t vdev_id;
4178 uint32_t pdev_id;
Govind Singh89727882016-04-15 13:58:27 +05304179} atf_peer_info;
4180
4181/**
Sathish Kumar50232d72016-08-09 16:50:46 +05304182 * struct bwf_peer_info_t - BWF peer info params
4183 * @peer_macaddr: peer mac addr
4184 * @throughput: Throughput
4185 * @max_airtime: Max airtime
4186 * @priority: Priority level
4187 * @reserved: Reserved array
Subrat Mishraf02ed8b2017-04-03 12:32:42 +05304188 * @vdev_id: Associated vdev id
4189 * @pdev_id: Associated pdev id
Sathish Kumar50232d72016-08-09 16:50:46 +05304190 */
4191typedef struct {
4192 struct wmi_macaddr_t peer_macaddr;
4193 uint32_t throughput;
4194 uint32_t max_airtime;
4195 uint32_t priority;
4196 uint32_t reserved[4];
Subrat Mishraf02ed8b2017-04-03 12:32:42 +05304197 uint32_t vdev_id;
4198 uint32_t pdev_id;
Sathish Kumar50232d72016-08-09 16:50:46 +05304199} bwf_peer_info;
4200
4201/**
4202 * struct set_bwf_params - BWF params
4203 * @num_peers: number of peers
4204 * @atf_peer_info: BWF peer info
4205 */
4206struct set_bwf_params {
4207 uint32_t num_peers;
4208 bwf_peer_info peer_info[1];
4209};
4210
4211/**
Govind Singh89727882016-04-15 13:58:27 +05304212 * struct atf_peer_ext_info - ATF peer ext info params
4213 * @peer_macaddr: peer mac address
4214 * @group_index: group index
4215 * @atf_index_reserved: ATF index rsvd
Subrat Mishraf02ed8b2017-04-03 12:32:42 +05304216 * @vdev_id: Associated vdev id
4217 * @pdev_id: Associated pdev id
Govind Singh89727882016-04-15 13:58:27 +05304218 */
4219typedef struct {
4220 struct wmi_macaddr_t peer_macaddr;
4221 uint32_t group_index;
4222 uint32_t atf_index_reserved;
Subrat Mishraf02ed8b2017-04-03 12:32:42 +05304223 uint16_t vdev_id;
4224 uint16_t pdev_id;
Govind Singh89727882016-04-15 13:58:27 +05304225} atf_peer_ext_info;
4226
4227/**
Sathish Kumarb597ba42017-02-22 17:24:45 +05304228 * struct set_atf_params - ATF params
4229 * @num_peers: number of peers
4230 * @atf_peer_info: ATF peer info
4231 */
4232struct set_atf_params {
4233 uint32_t num_peers;
4234 atf_peer_info peer_info[ATF_ACTIVED_MAX_CLIENTS];
4235};
4236
4237/**
Govind Singh89727882016-04-15 13:58:27 +05304238 * struct atf_peer_request_params - ATF peer req params
4239 * @num_peers: number of peers
4240 * @atf_peer_ext_info: ATF peer ext info
4241 */
4242struct atf_peer_request_params {
4243 uint32_t num_peers;
4244 atf_peer_ext_info peer_ext_info[ATF_ACTIVED_MAX_CLIENTS];
4245};
4246
4247/**
4248 * struct atf_group_info - ATF group info params
4249 * @percentage_group: Percentage AT for group
4250 * @atf_group_units_reserved: ATF group information
Subrat Mishraf02ed8b2017-04-03 12:32:42 +05304251 * @pdev_id: Associated pdev id
Govind Singh89727882016-04-15 13:58:27 +05304252 */
4253typedef struct {
4254 uint32_t percentage_group;
4255 uint32_t atf_group_units_reserved;
Subrat Mishraf02ed8b2017-04-03 12:32:42 +05304256 uint32_t pdev_id;
Govind Singh89727882016-04-15 13:58:27 +05304257} atf_group_info;
4258
4259/**
4260 * struct atf_grouping_params - ATF grouping params
4261 * @num_groups: number of groups
4262 * @group_inf: Group informaition
4263 */
4264struct atf_grouping_params {
4265 uint32_t num_groups;
4266 atf_group_info group_info[ATF_ACTIVED_MAX_ATFGROUPS];
4267};
4268
4269/**
4270 * struct wlan_profile_params - WLAN profile params
4271 * @param_id: param id
4272 * @profile_id: profile id
4273 * @enable: enable
4274 */
4275struct wlan_profile_params {
4276 uint32_t param_id;
4277 uint32_t profile_id;
4278 uint32_t enable;
4279};
4280
4281/* struct ht_ie_params - HT IE params
4282 * @ie_len: IE length
4283 * @ie_data: pointer to IE data
Sathish Kumar79fdae42017-02-22 17:28:28 +05304284 * @tx_streams: Tx streams supported for this HT IE
4285 * @rx_streams: Rx streams supported for this HT IE
Govind Singh89727882016-04-15 13:58:27 +05304286 */
4287struct ht_ie_params {
4288 uint32_t ie_len;
4289 uint8_t *ie_data;
Sathish Kumar79fdae42017-02-22 17:28:28 +05304290 uint32_t tx_streams;
4291 uint32_t rx_streams;
Govind Singh89727882016-04-15 13:58:27 +05304292};
4293
4294/* struct vht_ie_params - VHT IE params
4295 * @ie_len: IE length
4296 * @ie_data: pointer to IE data
Sathish Kumar79fdae42017-02-22 17:28:28 +05304297 * @tx_streams: Tx streams supported for this VHT IE
4298 * @rx_streams: Rx streams supported for this VHT IE
Govind Singh89727882016-04-15 13:58:27 +05304299 */
4300struct vht_ie_params {
4301 uint32_t ie_len;
4302 uint8_t *ie_data;
Sathish Kumar79fdae42017-02-22 17:28:28 +05304303 uint32_t tx_streams;
4304 uint32_t rx_streams;
Govind Singh89727882016-04-15 13:58:27 +05304305};
4306
4307/**
4308 * struct wmi_host_wmeParams - WME params
4309 * @wmep_acm: ACM paramete
4310 * @wmep_aifsn: AIFSN parameters
4311 * @wmep_logcwmin: cwmin in exponential form
4312 * @wmep_logcwmax: cwmax in exponential form
4313 * @wmep_txopLimit: txopLimit
4314 * @wmep_noackPolicy: No-Ack Policy: 0=ack, 1=no-ack
4315 */
4316struct wmi_host_wmeParams {
4317 u_int8_t wmep_acm;
4318 u_int8_t wmep_aifsn;
4319 u_int8_t wmep_logcwmin;
4320 u_int8_t wmep_logcwmax;
4321 u_int16_t wmep_txopLimit;
4322 u_int8_t wmep_noackPolicy;
4323};
4324
4325/**
4326 * struct wmm_update_params - WMM update params
4327 * @wmep_array: WME params for each AC
4328 */
4329struct wmm_update_params {
4330 struct wmi_host_wmeParams *wmep_array;
4331};
4332
4333/**
Vikram Kandukurid2e75802017-06-01 16:47:51 +05304334 * struct wmi_host_wmevParams - WME params
4335 * @wmep_acm: ACM paramete
4336 * @wmep_aifsn: AIFSN parameters
4337 * @wmep_logcwmin: cwmin in exponential form
4338 * @wmep_logcwmax: cwmax in exponential form
4339 * @wmep_txopLimit: txopLimit
4340 * @wmep_noackPolicy: No-Ack Policy: 0=ack, 1=no-ack
4341 */
4342struct wmi_host_wme_vparams {
4343 u_int32_t acm;
4344 u_int32_t aifs;
4345 u_int32_t cwmin;
4346 u_int32_t cwmax;
4347 union {
4348 u_int32_t txoplimit;
4349 u_int32_t mu_edca_timer;
4350 };
4351 u_int32_t noackpolicy;
4352};
4353
4354/**
Govind Singh89727882016-04-15 13:58:27 +05304355 * struct ant_switch_tbl_params - Antenna switch table params
4356 * @ant_ctrl_common1: ANtenna control common param 1
4357 * @ant_ctrl_common2: Antenna control commn param 2
4358 */
4359struct ant_switch_tbl_params {
4360 uint32_t ant_ctrl_common1;
4361 uint32_t ant_ctrl_common2;
Sathish Kumarb597ba42017-02-22 17:24:45 +05304362 uint32_t pdev_id;
4363 uint32_t antCtrlChain;
Govind Singh89727882016-04-15 13:58:27 +05304364};
4365
4366/**
4367 * struct ratepwr_table_params - Rate power table params
4368 * @ratepwr_tbl: pointer to rate power table
4369 * @ratepwr_len: rate power table len
4370 */
4371struct ratepwr_table_params {
4372 uint8_t *ratepwr_tbl;
4373 uint16_t ratepwr_len;
4374};
4375
4376/**
4377 * struct ctl_table_params - Ctl table params
4378 * @ctl_array: pointer to ctl array
Sathish Kumar990089f2016-11-09 11:44:50 +05304379 * @ctl_cmd_len: ctl command length
Govind Singh89727882016-04-15 13:58:27 +05304380 * @is_acfg_ctl: is acfg_ctl table
4381 */
4382struct ctl_table_params {
4383 uint8_t *ctl_array;
Sathish Kumar990089f2016-11-09 11:44:50 +05304384 uint16_t ctl_cmd_len;
Nandha Kishore Easwaranda8e13c2016-10-14 15:22:05 +05304385 uint32_t target_type;
4386 bool is_2g;
Sathish Kumar990089f2016-11-09 11:44:50 +05304387 uint32_t ctl_band;
Sathish Kumardcc75292017-03-01 14:02:36 +05304388 uint32_t pdev_id;
Govind Singh89727882016-04-15 13:58:27 +05304389};
4390
4391/**
4392 * struct mimogain_table_params - MIMO gain table params
4393 * @array_gain: pointer to array gain table
4394 * @tbl_len: table length
4395 * @multichain_gain_bypass: bypass multichain gain
4396 */
4397struct mimogain_table_params {
4398 uint8_t *array_gain;
4399 uint16_t tbl_len;
4400 bool multichain_gain_bypass;
Sathish Kumardcc75292017-03-01 14:02:36 +05304401 uint32_t pdev_id;
Govind Singh89727882016-04-15 13:58:27 +05304402};
4403
4404/**
4405 * struct ratepwr_chainmask_params - Rate power chainmask params
4406 * @ratepwr_chain_tbl: pointer to ratepwr chain table
4407 * @num_rate: number of rate in table
4408 * @pream_type: preamble type
4409 * @ops: ops
4410 */
4411struct ratepwr_chainmsk_params {
4412 uint32_t *ratepwr_chain_tbl;
4413 uint16_t num_rate;
4414 uint8_t pream_type;
4415 uint8_t ops;
4416};
4417
4418struct macaddr_params {
4419 uint8_t *macaddr;
4420};
4421
4422/**
4423 * struct acparams_params - acparams config structure
4424 * @ac: AC to configure
4425 * @use_rts: Use rts for this AC
4426 * @aggrsize_scaling: Aggregrate size scaling for the AC
4427 * @min_kbps: min kbps req
4428 */
4429struct acparams_params {
4430 uint8_t ac;
4431 uint8_t use_rts;
4432 uint8_t aggrsize_scaling;
4433 uint32_t min_kbps;
4434};
4435
4436/**
4437 * struct vap_dscp_tid_map_params - DSCP tid map params
4438 * @vdev_id: vdev id
4439 * @dscp_to_tid_map: pointer to arry of tid to dscp map table
4440 */
4441struct vap_dscp_tid_map_params {
4442 uint8_t vdev_id;
4443 uint32_t *dscp_to_tid_map;
4444};
4445
4446/**
4447 * struct proxy_ast_reserve_params - Proxy AST reserve params
4448 * @macaddr: macaddr for proxy ast entry
4449 */
4450struct proxy_ast_reserve_params {
4451 uint8_t *macaddr;
4452};
4453
4454/**
4455 * struct fips_params - FIPS params config
4456 * @key: pointer to key
4457 * @key_len: length of key
4458 * @data: pointer data buf
Nandha Kishore Easwaran2ccd4242017-01-09 21:33:00 +05304459 * @data_len: lenght of data buf
Govind Singh89727882016-04-15 13:58:27 +05304460 * @mode: mode
4461 * @op: operation
Nandha Kishore Easwaran2ccd4242017-01-09 21:33:00 +05304462 * @pdev_id: pdev_id for identifying the MAC
Govind Singh89727882016-04-15 13:58:27 +05304463 */
4464struct fips_params {
4465 uint8_t *key;
4466 uint32_t key_len;
4467 uint8_t *data;
4468 uint32_t data_len;
4469 uint32_t mode;
4470 uint32_t op;
Nandha Kishore Easwaran2ccd4242017-01-09 21:33:00 +05304471 uint32_t pdev_id;
Govind Singh89727882016-04-15 13:58:27 +05304472};
4473
4474/**
4475 * struct mcast_group_update_param - Mcast group table update to target
4476 * @action: Addition/deletion
4477 * @wildcard: iwldcard table entry?
4478 * @mcast_ip_addr: mcast ip address to be updated
4479 * @mcast_ip_addr_bytes: mcast ip addr bytes
4480 * @ucast_mac_addr: ucast peer mac subscribed to mcast ip
4481 * @filter_mode: filter mode
4482 * @nsrcs: number of entries in source list
4483 * @srcs: source mac accpted
4484 * @mask: mask
4485 * @vap_id: vdev id
4486 * @is_action_delete: is delete
4487 * @is_filter_mode_snoop:
4488 * @is_mcast_addr_len:
4489 */
4490struct mcast_group_update_params {
4491 int action;
4492 int wildcard;
4493 uint8_t *mcast_ip_addr;
4494 int mcast_ip_addr_bytes;
4495 uint8_t *ucast_mac_addr;
4496 uint8_t filter_mode;
4497 uint8_t nsrcs;
4498 uint8_t *srcs;
4499 uint8_t *mask;
4500 uint8_t vap_id;
4501 bool is_action_delete;
4502 bool is_filter_mode_snoop;
4503 bool is_mcast_addr_len;
4504};
4505
4506/**
4507 * struct periodic_chan_stats_param - periodic channel stats req param
4508 * @stats_period: stats period update
4509 * @enable: enable/disable
4510 */
4511struct periodic_chan_stats_params {
4512 uint32_t stats_period;
4513 bool enable;
Sathish Kumard1bb0202017-11-02 10:44:39 +05304514 uint32_t pdev_id;
Govind Singh89727882016-04-15 13:58:27 +05304515};
4516
4517/**
Om Prakash Tripathi4331e422017-09-06 15:22:04 +05304518 * enum wmi_host_packet_power_rate_flags: packer power rate flags
4519 * @WMI_HOST_FLAG_RTSENA: RTS enabled
4520 * @WMI_HOST_FLAG_CTSENA: CTS enabled
4521 * @WMI_HOST_FLAG_STBC: STBC is set
4522 * @WMI_HOST_FLAG_LDPC: LDPC is set
4523 * @WMI_HOST_FLAG_TXBF: Tx Bf enabled
4524 * @WMI_HOST_FLAG_MU2: MU2 data
4525 * @WMI_HOST_FLAG_MU3: MU3 data
4526 * @WMI_HOST_FLAG_SERIES1: Rate series 1
4527 * @WMI_HOST_FLAG_SGI: Short gaurd interval
4528 */
4529enum wmi_host_packet_power_rate_flags {
4530 WMI_HOST_FLAG_RTSENA = 0x0001,
4531 WMI_HOST_FLAG_CTSENA = 0x0002,
4532 WMI_HOST_FLAG_STBC = 0x0004,
4533 WMI_HOST_FLAG_LDPC = 0x0008,
4534 WMI_HOST_FLAG_TXBF = 0x0010,
4535 WMI_HOST_FLAG_MU2 = 0x0020,
4536 WMI_HOST_FLAG_MU3 = 0x0040,
4537 WMI_HOST_FLAG_SERIES1 = 0x0080,
4538 WMI_HOST_FLAG_SGI = 0x0100,
4539};
4540
4541/**
4542 * enum wmi_host_su_mu_ofdma_flags: packer power su mu ofdma flags
4543 * @WMI_HOST_FLAG_SU: SU Data
4544 * @WMI_HOST_FLAG_DL_MU_MIMO_AC: DL AC MU data
4545 * @WMI_HOST_FLAG_DL_MU_MIMO_AX: DL AX MU data
4546 * @WMI_HOST_FLAG_DL_OFDMA: DL OFDMA data
4547 * @WMI_HOST_FLAG_UL_OFDMA: UL OFDMA data
4548 * @WMI_HOST_FLAG_UL_MU_MIMO: UL MU data
4549 */
4550enum wmi_host_su_mu_ofdma_flags {
4551 WMI_HOST_FLAG_SU = 0x0001,
4552 WMI_HOST_FLAG_DL_MU_MIMO_AC = 0x0002,
4553 WMI_HOST_FLAG_DL_MU_MIMO_AX = 0x0003,
4554 WMI_HOST_FLAG_DL_OFDMA = 0x0004,
4555 WMI_HOST_FLAG_UL_OFDMA = 0x0005,
4556 WMI_HOST_FLAG_UL_MU_MIMO = 0x0006,
4557};
4558
4559/**
4560 * enum wmi_host_preamble_type: preamble type
4561 * @WMI_HOST_PREAMBLE_OFDM: ofdm rate
4562 * @WMI_HOST_PREAMBLE_CCK: cck rate
4563 * @WMI_HOST_PREAMBLE_HT: ht rate
4564 * @WMI_HOST_PREAMBLE_VHT: vht rate
4565 * @WMI_HOST_PREAMBLE_HE: 11ax he rate
4566 */
4567enum wmi_host_preamble_type {
4568 WMI_HOST_PREAMBLE_OFDM = 0,
4569 WMI_HOST_PREAMBLE_CCK = 1,
4570 WMI_HOST_PREAMBLE_HT = 2,
4571 WMI_HOST_PREAMBLE_VHT = 3,
4572 WMI_HOST_PREAMBLE_HE = 4,
4573};
4574
4575/**
Govind Singh89727882016-04-15 13:58:27 +05304576 * struct packet_power_info_params - packet power info params
Om Prakash Tripathi4331e422017-09-06 15:22:04 +05304577 * @chainmask: chain mask
4578 * @chan_width: channel bandwidth
Govind Singh89727882016-04-15 13:58:27 +05304579 * @rate_flags: rate flags
Om Prakash Tripathi4331e422017-09-06 15:22:04 +05304580 * @su_mu_ofdma: su/mu/ofdma flags
Govind Singh89727882016-04-15 13:58:27 +05304581 * @nss: number of spatial streams
4582 * @preamble: preamble
4583 * @hw_rate:
4584 */
4585struct packet_power_info_params {
Om Prakash Tripathi4331e422017-09-06 15:22:04 +05304586 uint16_t chainmask;
4587 uint16_t chan_width;
Govind Singh89727882016-04-15 13:58:27 +05304588 uint16_t rate_flags;
Om Prakash Tripathi4331e422017-09-06 15:22:04 +05304589 uint16_t su_mu_ofdma;
Govind Singh89727882016-04-15 13:58:27 +05304590 uint16_t nss;
4591 uint16_t preamble;
4592 uint16_t hw_rate;
Sathish Kumardcc75292017-03-01 14:02:36 +05304593 uint32_t pdev_id;
Govind Singh89727882016-04-15 13:58:27 +05304594};
4595
4596/**
4597 * WMI_GPIO_CONFIG_CMDID
4598 */
4599enum {
4600 WMI_HOST_GPIO_PULL_NONE,
4601 WMI_HOST_GPIO_PULL_UP,
4602 WMI_HOST_GPIO_PULL_DOWN,
4603};
4604
4605/**
4606 * WMI_GPIO_INTTYPE
4607 */
4608enum {
4609 WMI_HOST_GPIO_INTTYPE_DISABLE,
4610 WMI_HOST_GPIO_INTTYPE_RISING_EDGE,
4611 WMI_HOST_GPIO_INTTYPE_FALLING_EDGE,
4612 WMI_HOST_GPIO_INTTYPE_BOTH_EDGE,
4613 WMI_HOST_GPIO_INTTYPE_LEVEL_LOW,
4614 WMI_HOST_GPIO_INTTYPE_LEVEL_HIGH
4615};
4616
4617/**
4618 * struct wmi_host_gpio_input_event - GPIO input event structure
4619 * @gpio_num: GPIO number which changed state
4620 */
4621typedef struct {
4622 uint32_t gpio_num; /* GPIO number which changed state */
4623} wmi_host_gpio_input_event;
4624
4625/**
4626 * struct gpio_config_params - GPIO config params
4627 * @gpio_num: GPIO number to config
4628 * @input: input/output
4629 * @pull_type: pull type
4630 * @intr_mode: int mode
4631 */
4632struct gpio_config_params {
4633 uint32_t gpio_num;
4634 uint32_t input;
4635 uint32_t pull_type;
4636 uint32_t intr_mode;
4637};
4638
4639/**
4640 * struct gpio_output_params - GPIO output params
4641 * @gpio_num: GPIO number to configure
4642 * @set: set/reset
4643 */
4644struct gpio_output_params {
4645 uint32_t gpio_num;
4646 uint32_t set;
4647};
4648
Sathish Kumar7e566c52016-11-10 15:30:22 +05304649/* flags bit 0: to configure wlan priority bitmap */
4650#define WMI_HOST_BTCOEX_PARAM_FLAGS_WLAN_PRIORITY_BITMAP_BIT (1<<0)
4651/* flags bit 1: to configure both period and wlan duration */
4652#define WMI_HOST_BTCOEX_PARAM_FLAGS_DUTY_CYCLE_BIT (1<<1)
4653struct btcoex_cfg_params {
4654 /* WLAN priority bitmask for different frame types */
4655 uint32_t btcoex_wlan_priority_bitmap;
4656 /* This command is used to configure different btcoex params
4657 * in different situations.The host sets the appropriate bit(s)
4658 * in btcoex_param_flags to indicate which configuration parameters
4659 * are valid within a particular BT coex config message, so that one
4660 * BT configuration parameter can be configured without affecting
4661 * other BT configuration parameters.E.g. if the host wants to
4662 * configure only btcoex_wlan_priority_bitmap it sets only
4663 * WMI_BTCOEX_PARAM_FLAGS_WLAN_PRIORITY_BITMAP_BIT in
4664 * btcoex_param_flags so that firmware will not overwrite
4665 * other params with default value passed in the command.
4666 * Host can also set multiple bits in btcoex_param_flags
4667 * to configure more than one param in single message.
4668 */
4669 uint32_t btcoex_param_flags;
4670 /* period denotes the total time in milliseconds which WLAN and BT share
4671 * configured percentage for transmission and reception.
4672 */
4673 uint32_t period;
4674 /* wlan duration is the time in milliseconds given for wlan
4675 * in above period.
4676 */
4677 uint32_t wlan_duration;
4678};
4679
Sathish Kumar612d0c22017-01-19 14:57:37 +05304680#define WMI_HOST_COEX_CONFIG_BUF_MAX_LEN 32 /* 128 bytes */
4681/**
4682 * coex_ver_cfg_t
4683 * @coex_version: Version for 4 wire coex
4684 * @length: Length of payload buffer based on version
4685 * @config_buf: Payload Buffer
4686 */
4687typedef struct {
4688 /* VERSION_4 (4 wire coex) */
4689 uint32_t coex_version;
4690
Vivek73465282018-03-22 23:27:21 +05304691 /* No. of uint32_t elements in payload buffer. Will depend on the coex
Sathish Kumar612d0c22017-01-19 14:57:37 +05304692 * version
4693 */
4694 uint32_t length;
4695
4696 /* Payload buffer */
4697 uint32_t config_buf[WMI_HOST_COEX_CONFIG_BUF_MAX_LEN];
4698} coex_ver_cfg_t;
Sathish Kumar7e566c52016-11-10 15:30:22 +05304699
Govind Singh89727882016-04-15 13:58:27 +05304700#define WMI_HOST_RTT_REPORT_CFR 0
4701#define WMI_HOST_RTT_NO_REPORT_CFR 1
4702#define WMI_HOST_RTT_AGGREGATE_REPORT_NON_CFR 2
4703/**
4704 * struct rtt_meas_req_test_params
4705 * @peer: peer mac address
4706 * @req_frame_type: RTT request frame type
4707 * @req_bw: requested bandwidth
4708 * @req_preamble: Preamble
4709 * @req_num_req: num of requests
4710 * @req_report_type: report type
4711 * @num_measurements: number of measurements
4712 * @asap_mode: priority
4713 * @lci_requested: LCI requested
4714 * @loc_civ_requested:
4715 * @channel_param: channel param
4716 * @req_id: requested id
4717 */
4718struct rtt_meas_req_test_params {
4719 uint8_t peer[IEEE80211_ADDR_LEN];
4720 int req_frame_type;
4721 int req_bw;
4722 int req_preamble;
4723 int req_num_req;
4724 int req_report_type;
4725 uint32_t num_measurements;
4726 uint32_t asap_mode;
4727 uint32_t lci_requested;
4728 uint32_t loc_civ_requested;
4729 struct channel_param channel;
4730 uint8_t req_id;
4731};
4732
4733/**
4734 * struct rtt_meas_req_params - RTT measurement request params
4735 * @req_id: Request id
4736 * @vdev_id: vdev id
4737 * @sta_mac_addr: pointer to station mac address
4738 * @spoof_mac_addr: pointer to spoof mac address
4739 * @is_mode_na: 11NA
4740 * @is_mode_ac: AC
4741 * @is_bw_20: 20
4742 * @is_bw_40: 40
4743 * @is_bw_80: 80
4744 * @num_probe_rqst: number of probe request
4745 * @channel_param: channel param
4746 */
4747struct rtt_meas_req_params {
4748 uint8_t req_id;
4749 uint8_t vdev_id;
4750 uint8_t *sta_mac_addr;
4751 uint8_t *spoof_mac_addr;
4752 bool is_mode_na;
4753 bool is_mode_ac;
4754 bool is_bw_20;
4755 bool is_bw_40;
4756 bool is_bw_80;
4757 uint32_t num_probe_rqst;
4758 struct channel_param channel;
4759};
4760
4761/**
4762 * struct lci_set_params - LCI params
4763 * @lci_data: pointer to LCI data
4764 * @latitude_unc: latitude
4765 * @latitude_0_12: bits 0 to 1 of latitude
4766 * @latitude_2_33: bits 2 to 33 of latitude
4767 * @longitude_unc: longitude
4768 * @longitude_0_1: bits 0 to 1 of longitude
4769 * @longitude_2_33: bits 2 to 33 of longitude
4770 * @altitude_type: altitude type
4771 * @altitude_unc_0_3: altitude bits 0 - 3
4772 * @altitude_unc_4_5: altitude bits 4 - 5
4773 * @altitude: altitude
4774 * @datum: dataum
4775 * @reg_loc_agmt:
4776 * @reg_loc_dse:
4777 * @dep_sta:
4778 * @version: version
4779 */
4780struct lci_set_params {
4781 void *lci_data;
4782 uint8_t latitude_unc:6,
4783 latitude_0_1:2;
4784 uint32_t latitude_2_33;
4785 uint8_t longitude_unc:6,
4786 longitude_0_1:2;
4787 uint32_t longitude_2_33;
4788 uint8_t altitude_type:4,
4789 altitude_unc_0_3:4;
4790 uint32_t altitude_unc_4_5:2,
4791 altitude:30;
4792 uint8_t datum:3,
4793 reg_loc_agmt:1,
4794 reg_loc_dse:1,
4795 dep_sta:1,
4796 version:2;
Sathish Kumar38bf0d82016-10-20 14:07:21 +05304797 uint8_t *colocated_bss;
4798 int msg_len;
Govind Singh89727882016-04-15 13:58:27 +05304799};
4800
4801/**
4802 * struct lcr_set_params - LCR params
4803 * @lcr_data: pointer to lcr data
4804 */
4805struct lcr_set_params {
4806 void *lcr_data;
Sathish Kumar38bf0d82016-10-20 14:07:21 +05304807 int msg_len;
Govind Singh89727882016-04-15 13:58:27 +05304808};
4809
4810/**
4811 * struct rtt_keepalive_req_params - RTT keepalive params
4812 * @macaddr: pointer to macaddress
4813 * @req_id: Request id
4814 * @vdev_id: vdev id
4815 * @stop: start/stop
4816 */
4817struct rtt_keepalive_req_params {
4818 uint8_t *macaddr;
4819 uint8_t req_id;
4820 uint8_t vdev_id;
4821 bool stop;
4822};
4823
4824/**
Leo Chang8184e9c2016-09-28 13:43:36 -07004825 * struct rx_reorder_queue_setup_params - Reorder queue setup params
4826 * @peer_mac_addr: Peer mac address
4827 * @tid: TID
4828 * @vdev_id: vdev id
4829 * @hw_qdesc_paddr_lo: lower 32 bits of queue desc adddress
4830 * @hw_qdesc_paddr_hi: upper 32 bits of queue desc adddress
4831 * @queue_no: 16-bit number assigned by host for queue
4832 */
4833struct rx_reorder_queue_setup_params {
4834 uint8_t *peer_macaddr;
4835 uint16_t tid;
4836 uint16_t vdev_id;
4837 uint32_t hw_qdesc_paddr_lo;
4838 uint32_t hw_qdesc_paddr_hi;
4839 uint16_t queue_no;
4840};
4841
4842/**
4843 * struct rx_reorder_queue_remove_params - Reorder queue setup params
4844 * @peer_mac_addr: Peer mac address
4845 * @vdev_id: vdev id
4846 * @peer_tid_bitmap: peer tid bitmap
4847 */
4848struct rx_reorder_queue_remove_params {
4849 uint8_t *peer_macaddr;
4850 uint16_t vdev_id;
4851 uint32_t peer_tid_bitmap;
4852};
4853
4854/**
Govind Singh89727882016-04-15 13:58:27 +05304855 * struct wmi_host_stats_event - Stats event params
4856 * @stats_id: stats id of type wmi_host_stats_event
4857 * @num_pdev_stats: number of pdev stats event structures 0 or 1
4858 * @num_pdev_ext_stats: number of pdev ext stats event structures
4859 * @num_vdev_stats: number of vdev stats
4860 * @num_peer_stats: number of peer stats event structures 0 or max peers
4861 * @num_bcnflt_stats: number of beacon filter stats
4862 * @num_chan_stats: number of channel stats
Gurumoorthi Gnanasambandhan18977552017-11-06 22:04:17 +05304863 * @pdev_id: device id for the radio
4864 * @num_bcn_stats: number of beacon stats
Govind Singh89727882016-04-15 13:58:27 +05304865 */
4866typedef struct {
4867 wmi_host_stats_id stats_id;
4868 uint32_t num_pdev_stats;
4869 uint32_t num_pdev_ext_stats;
4870 uint32_t num_vdev_stats;
4871 uint32_t num_peer_stats;
4872 uint32_t num_bcnflt_stats;
4873 uint32_t num_chan_stats;
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05304874 uint32_t pdev_id;
Gurumoorthi Gnanasambandhan18977552017-11-06 22:04:17 +05304875 uint32_t num_bcn_stats;
Govind Singh89727882016-04-15 13:58:27 +05304876} wmi_host_stats_event;
4877
4878/**
Govind Singh89727882016-04-15 13:58:27 +05304879 * struct wmi_host_peer_extd_stats - peer extd stats event structure
4880 * @peer_macaddr: Peer mac address
4881 * @inactive_time: inactive time in secs
4882 * @peer_chain_rssi: peer rssi
4883 * @rx_duration: RX duration
4884 * @peer_tx_bytes: TX bytes
4885 * @peer_rx_bytes: RX bytes
4886 * @last_tx_rate_code: Tx rate code of last frame
4887 * @last_tx_power: Tx power latest
4888 * @atf_tokens_allocated: atf tokens allocated
4889 * @atf_tokens_utilized: atf tokens utilized
4890 * @reserved: for future use
4891 */
4892typedef struct {
4893 wmi_host_mac_addr peer_macaddr;
4894 uint32_t inactive_time;
4895 uint32_t peer_chain_rssi;
4896 uint32_t rx_duration;
4897 uint32_t peer_tx_bytes;
4898 uint32_t peer_rx_bytes;
4899 uint32_t last_tx_rate_code;
4900 uint32_t last_tx_power;
4901 uint32_t atf_tokens_allocated;
4902 uint32_t atf_tokens_utilized;
4903 uint32_t reserved[4];
4904} wmi_host_peer_extd_stats;
4905
4906/**
4907 * struct wmi_host_pdev_ext_stats - peer ext stats structure
4908 * @rx_rssi_comb: RX rssi
4909 * @rx_rssi_chain0: RX rssi chain 0
4910 * @rx_rssi_chain1: RX rssi chain 1
4911 * @rx_rssi_chain2: RX rssi chain 2
4912 * @rx_rssi_chain3: RX rssi chain 3
4913 * @rx_mcs: RX MCS array
4914 * @tx_mcs: TX MCS array
4915 * @ack_rssi: Ack rssi
4916 */
4917typedef struct {
4918 uint32_t rx_rssi_comb;
4919 uint32_t rx_rssi_chain0;
4920 uint32_t rx_rssi_chain1;
4921 uint32_t rx_rssi_chain2;
4922 uint32_t rx_rssi_chain3;
4923 uint32_t rx_mcs[10];
4924 uint32_t tx_mcs[10];
4925 uint32_t ack_rssi;
4926} wmi_host_pdev_ext_stats;
4927
4928/**
4929 * struct wmi_host_dbg_tx_stats - Debug stats
4930 * @comp_queued: Num HTT cookies queued to dispatch list
4931 * @comp_delivered: Num HTT cookies dispatched
4932 * @msdu_enqued: Num MSDU queued to WAL
4933 * @mpdu_enqued: Num MPDU queue to WAL
4934 * @wmm_drop: Num MSDUs dropped by WMM limit
4935 * @local_enqued: Num Local frames queued
4936 * @local_freed: Num Local frames done
4937 * @hw_queued: Num queued to HW
4938 * @hw_reaped: Num PPDU reaped from HW
4939 * @underrun: Num underruns
4940 * @hw_paused: HW Paused.
4941 * @tx_abort: Num PPDUs cleaned up in TX abort
4942 * @mpdus_requed: Num MPDUs requed by SW
4943 * @tx_ko: excessive retries
4944 * @tx_xretry:
4945 * @data_rc: data hw rate code
4946 * @self_triggers: Scheduler self triggers
4947 * @sw_retry_failure: frames dropped due to excessive sw retries
4948 * @illgl_rate_phy_err: illegal rate phy errors
4949 * @pdev_cont_xretry: wal pdev continous xretry
4950 * @pdev_tx_timeout: wal pdev continous xretry
4951 * @pdev_resets: wal pdev resets
4952 * @stateless_tid_alloc_failure: frames dropped due to non-availability of
4953 * stateless TIDs
4954 * @phy_underrun: PhY/BB underrun
4955 * @txop_ovf: MPDU is more than txop limit
4956 * @seq_posted: Number of Sequences posted
4957 * @seq_failed_queueing: Number of Sequences failed queueing
4958 * @seq_completed: Number of Sequences completed
4959 * @seq_restarted: Number of Sequences restarted
4960 * @mu_seq_posted: Number of MU Sequences posted
4961 * @mpdus_sw_flush: Num MPDUs flushed by SW, HWPAUSED, SW TXABORT
4962 * (Reset,channel change)
4963 * @mpdus_hw_filter: Num MPDUs filtered by HW, all filter condition
4964 * (TTL expired)
4965 * @mpdus_truncated: Num MPDUs truncated by PDG (TXOP, TBTT,
4966 * PPDU_duration based on rate, dyn_bw)
4967 * @mpdus_ack_failed: Num MPDUs that was tried but didn't receive ACK or BA
4968 * @mpdus_expired: Num MPDUs that was dropped du to expiry.
4969 * @mc_dropr: Num mc drops
4970 */
4971typedef struct {
4972 int32_t comp_queued;
4973 int32_t comp_delivered;
4974 int32_t msdu_enqued;
4975 int32_t mpdu_enqued;
4976 int32_t wmm_drop;
4977 int32_t local_enqued;
4978 int32_t local_freed;
4979 int32_t hw_queued;
4980 int32_t hw_reaped;
4981 int32_t underrun;
4982 uint32_t hw_paused;
4983 int32_t tx_abort;
4984 int32_t mpdus_requed;
4985 uint32_t tx_ko;
4986 uint32_t tx_xretry;
4987 uint32_t data_rc;
4988 uint32_t self_triggers;
4989 uint32_t sw_retry_failure;
4990 uint32_t illgl_rate_phy_err;
4991 uint32_t pdev_cont_xretry;
4992 uint32_t pdev_tx_timeout;
4993 uint32_t pdev_resets;
4994 uint32_t stateless_tid_alloc_failure;
4995 uint32_t phy_underrun;
4996 uint32_t txop_ovf;
4997 uint32_t seq_posted;
4998 uint32_t seq_failed_queueing;
4999 uint32_t seq_completed;
5000 uint32_t seq_restarted;
5001 uint32_t mu_seq_posted;
5002 int32_t mpdus_sw_flush;
5003 int32_t mpdus_hw_filter;
5004 int32_t mpdus_truncated;
5005 int32_t mpdus_ack_failed;
5006 int32_t mpdus_expired;
5007 uint32_t mc_drop;
5008} wmi_host_dbg_tx_stats;
5009
5010/**
5011 * struct wmi_host_dbg_rx_stats - RX Debug stats
5012 * @mid_ppdu_route_change: Cnts any change in ring routing mid-ppdu
5013 * @status_rcvd: Total number of statuses processed
5014 * @r0_frags: Extra frags on rings 0
5015 * @r1_frags: Extra frags on rings 1
5016 * @r2_frags: Extra frags on rings 2
5017 * @r3_frags: Extra frags on rings 3
5018 * @htt_msdus: MSDUs delivered to HTT
5019 * @htt_mpdus: MPDUs delivered to HTT
5020 * @loc_msdus: MSDUs delivered to local stack
5021 * @loc_mpdus: MPDUS delivered to local stack
5022 * @oversize_amsdu: AMSDUs that have more MSDUs than the status ring size
5023 * @phy_errs: Number of PHY errors
5024 * @phy_err_drop: Number of PHY errors drops
5025 * @mpdu_errs: Number of mpdu errors - FCS, MIC, ENC etc.
5026 * @pdev_rx_timeout: Number of rx inactivity timeouts
5027 * @rx_ovfl_errs: Number of rx overflow errors.
5028 */
5029typedef struct {
5030 int32_t mid_ppdu_route_change;
5031 int32_t status_rcvd;
5032 int32_t r0_frags;
5033 int32_t r1_frags;
5034 int32_t r2_frags;
5035 int32_t r3_frags;
5036 int32_t htt_msdus;
5037 int32_t htt_mpdus;
5038 int32_t loc_msdus;
5039 int32_t loc_mpdus;
5040 int32_t oversize_amsdu;
5041 int32_t phy_errs;
5042 int32_t phy_err_drop;
5043 int32_t mpdu_errs;
5044 uint32_t pdev_rx_timeout;
5045 int32_t rx_ovfl_errs;
5046} wmi_host_dbg_rx_stats;
5047
5048/** struct wmi_host_dbg_mem_stats - memory stats
5049 * @iram_free_size: IRAM free size on target
5050 * @dram_free_size: DRAM free size on target
5051 * @sram_free_size: SRAM free size on target
5052 */
5053typedef struct {
5054 uint32_t iram_free_size;
5055 uint32_t dram_free_size;
5056 /* Only Non-TLV */
5057 uint32_t sram_free_size;
5058} wmi_host_dbg_mem_stats;
5059
5060typedef struct {
5061 /* Only TLV */
5062 int32_t dummy;/* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */
5063} wmi_host_dbg_peer_stats;
5064
5065/**
5066 * struct wmi_host_dbg_stats - host debug stats
5067 * @tx: TX stats of type wmi_host_dbg_tx_stats
5068 * @rx: RX stats of type wmi_host_dbg_rx_stats
5069 * @mem: Memory stats of type wmi_host_dbg_mem_stats
5070 * @peer: peer stats of type wmi_host_dbg_peer_stats
5071 */
5072typedef struct {
5073 wmi_host_dbg_tx_stats tx;
5074 wmi_host_dbg_rx_stats rx;
5075 wmi_host_dbg_mem_stats mem;
5076 wmi_host_dbg_peer_stats peer;
5077} wmi_host_dbg_stats;
5078
5079/**
5080 * struct wmi_host_pdev_stats - PDEV stats
5081 * @chan_nf: Channel noise floor
5082 * @tx_frame_count: TX frame count
5083 * @rx_frame_count: RX frame count
5084 * @rx_clear_count: rx clear count
5085 * @cycle_count: cycle count
5086 * @phy_err_count: Phy error count
5087 * @chan_tx_pwr: Channel Tx Power
5088 * @pdev_stats: WAL dbg stats
5089 * @ackRcvBad:
5090 * @rtsBad:
5091 * @rtsGood:
5092 * @fcsBad:
5093 * @noBeacons:
5094 * @mib_int_count:
5095 */
5096typedef struct {
5097 int32_t chan_nf;
5098 uint32_t tx_frame_count;
5099 uint32_t rx_frame_count;
5100 uint32_t rx_clear_count;
5101 uint32_t cycle_count;
5102 uint32_t phy_err_count;
5103 uint32_t chan_tx_pwr;
5104 wmi_host_dbg_stats pdev_stats;
5105 uint32_t ackRcvBad;
5106 uint32_t rtsBad;
5107 uint32_t rtsGood;
5108 uint32_t fcsBad;
5109 uint32_t noBeacons;
5110 uint32_t mib_int_count;
5111} wmi_host_pdev_stats;
5112
Adil Saeed Musthafa0b6c7602017-08-23 17:32:11 -07005113
5114/**
5115 * struct wmi_unit_test_event - Structure corresponding to WMI Unit test event
5116 * @vdev_id: VDEV ID
5117 * @module_id: MODULE ID
5118 * @diag_token: Diag Token (the number that was generated in the unit-test cmd)
5119 * @flag: flag has 2 bits 0x1 indicates status, and 0x2 indicates done-bit
5120 * @payload_len: payload_len (blindly copied from payload_len field in WMI)
5121 * @buffer_len: actual number of data bytes in the variable data size TLV
5122 * buffer_len is likely to be the nearest multiple of 4 (from
5123 * payload_len). both buffer_len and payload_len need to be
5124 * passed to wifitool so that the driver can be agnostic
5125 * regarding these differences.
5126 * @buffer: data buffer
5127 */
5128typedef struct {
5129 uint32_t vdev_id;
5130 uint32_t module_id;
5131 uint32_t diag_token;
5132 uint32_t flag;
5133 uint32_t payload_len;
5134 uint32_t buffer_len;
5135 uint8_t buffer[1];
5136} wmi_unit_test_event;
5137
5138
Govind Singh89727882016-04-15 13:58:27 +05305139/**
5140 * struct wmi_host_snr_info - WMI host Signal to noise ration info
5141 * @bcn_snr: beacon SNR
5142 * @dat_snr: Data frames SNR
5143 */
5144typedef struct {
5145 int32_t bcn_snr;
5146 int32_t dat_snr;
5147} wmi_host_snr_info;
5148
5149#define WMI_HOST_MAX_TX_RATE_VALUES 10 /*Max Tx Rates */
5150#define WMI_HOST_MAX_RSSI_VALUES 10 /*Max Rssi values */
5151
5152/* The WLAN_MAX_AC macro cannot be changed without breaking
5153 * * WMI compatibility.
5154 * * The maximum value of access category
5155 * */
5156#define WMI_HOST_WLAN_MAX_AC 4
5157
5158/**
5159 * struct wmi_host_vdev_stats - vdev stats structure
5160 * @vdev_id: unique id identifying the VDEV, generated by the caller
5161 * Rest all Only TLV
5162 * @vdev_snr: wmi_host_snr_info
5163 * @tx_frm_cnt: Total number of packets(per AC) that were successfully
5164 * transmitted (with and without retries,
5165 * including multi-cast, broadcast)
5166 * @rx_frm_cnt: Total number of packets that were successfully received
5167 * (after appropriate filter rules including multi-cast, broadcast)
5168 * @multiple_retry_cnt: The number of MSDU packets and MMPDU frames per AC
5169 * that the 802.11 station successfully transmitted after
5170 * more than one retransmission attempt
5171 * @fail_cnt: Total number packets(per AC) failed to transmit
5172 * @rts_fail_cnt: Total number of RTS/CTS sequence failures for transmission
5173 * of a packet
5174 * @rts_succ_cnt: Total number of RTS/CTS sequence success for transmission
5175 * of a packet
5176 * @rx_err_cnt: The receive error count. HAL will provide the
5177 * RxP FCS error global
5178 * @rx_discard_cnt: The sum of the receive error count and
5179 * dropped-receive-buffer error count (FCS error)
5180 * @ack_fail_cnt: Total number packets failed transmit because of no
5181 * ACK from the remote entity
5182 * @tx_rate_history:History of last ten transmit rate, in units of 500 kbit/sec
5183 * @bcn_rssi_history: History of last ten Beacon rssi of the connected Bss
5184 */
5185typedef struct {
5186 uint32_t vdev_id;
5187 /* Rest all Only TLV */
5188 wmi_host_snr_info vdev_snr;
5189 uint32_t tx_frm_cnt[WMI_HOST_WLAN_MAX_AC];
5190 uint32_t rx_frm_cnt;
5191 uint32_t multiple_retry_cnt[WMI_HOST_WLAN_MAX_AC];
5192 uint32_t fail_cnt[WMI_HOST_WLAN_MAX_AC];
5193 uint32_t rts_fail_cnt;
5194 uint32_t rts_succ_cnt;
5195 uint32_t rx_err_cnt;
5196 uint32_t rx_discard_cnt;
5197 uint32_t ack_fail_cnt;
5198 uint32_t tx_rate_history[WMI_HOST_MAX_TX_RATE_VALUES];
5199 uint32_t bcn_rssi_history[WMI_HOST_MAX_RSSI_VALUES];
5200} wmi_host_vdev_stats;
5201
5202/**
Gurumoorthi Gnanasambandhan18977552017-11-06 22:04:17 +05305203 * struct wmi_host_vdev_stats - vdev stats structure
5204 * @vdev_id: unique id identifying the VDEV, generated by the caller
5205 * @tx_bcn_succ_cnt: Total number of beacon frame transmitted successfully
5206 * @tx_bcn_outage_cnt: Total number of failed beacons
5207 */
5208typedef struct {
5209 uint32_t vdev_id;
5210 uint32_t tx_bcn_succ_cnt;
5211 uint32_t tx_bcn_outage_cnt;
5212} wmi_host_bcn_stats;
5213
5214/**
Govind Singh89727882016-04-15 13:58:27 +05305215 * struct wmi_host_vdev_extd_stats - VDEV extended stats
5216 * @vdev_id: unique id identifying the VDEV, generated by the caller
5217 * @ppdu_aggr_cnt: No of Aggrs Queued to HW
5218 * @ppdu_noack: No of PPDU's not Acked includes both aggr and nonaggr's
5219 * @mpdu_queued: No of MPDU/Subframes's queued to HW in Aggregates
5220 * @ppdu_nonaggr_cnt: No of NonAggr/MPDU/Subframes's queued to HW
5221 * in Legacy NonAggregates
5222 * @mpdu_sw_requed: No of MPDU/Subframes's SW requeued includes
5223 * both Aggr and NonAggr
5224 * @mpdu_suc_retry: No of MPDU/Subframes's transmitted Successfully
5225 * after Single/mul HW retry
5226 * @mpdu_suc_multitry: No of MPDU/Subframes's transmitted Success
5227 * after Multiple HW retry
5228 * @mpdu_fail_retry: No of MPDU/Subframes's failed transmission
5229 * after Multiple HW retry
5230 * @reserved[13]: for future extensions set to 0x0
5231 */
5232typedef struct {
5233 uint32_t vdev_id;
5234 uint32_t ppdu_aggr_cnt;
5235 uint32_t ppdu_noack;
5236 uint32_t mpdu_queued;
5237 uint32_t ppdu_nonaggr_cnt;
5238 uint32_t mpdu_sw_requed;
5239 uint32_t mpdu_suc_retry;
5240 uint32_t mpdu_suc_multitry;
5241 uint32_t mpdu_fail_retry;
5242 uint32_t reserved[13];
5243} wmi_host_vdev_extd_stats;
5244
5245/**
Chaithanya Garrepalli140a0532018-01-18 14:19:41 +05305246 * struct wmi_host_vdev_nac_rssi_event - VDEV nac rssi stats
5247 * @vdev_id: unique id identifying the VDEV, generated by the caller
5248 * @last_rssi: rssi
5249 * @avg_rssi: averge rssi
5250 * @rssi_seq_num: rssi sequence number
5251 */
5252struct wmi_host_vdev_nac_rssi_event {
5253 uint32_t vdev_id;
5254 uint32_t last_rssi;
5255 uint32_t avg_rssi;
5256 uint32_t rssi_seq_num;
5257};
5258
5259/**
Govind Singh89727882016-04-15 13:58:27 +05305260 * struct wmi_host_peer_stats - peer stats
5261 * @peer_macaddr: peer MAC address
5262 * @peer_rssi: rssi
5263 * @peer_rssi_seq_num: rssi sequence number
5264 * @peer_tx_rate: last tx data rate used for peer
5265 * @peer_rx_rate: last rx data rate used for peer
5266 * @currentper: Current PER
5267 * @retries: Retries happend during transmission
5268 * @txratecount: Maximum Aggregation Size
5269 * @max4msframelen: Max4msframelen of tx rates used
5270 * @totalsubframes: Total no of subframes
5271 * @txbytes: No of bytes transmitted to the client
5272 * @nobuffs[4]: Packet Loss due to buffer overflows
5273 * @excretries[4]: Packet Loss due to excessive retries
5274 * @peer_rssi_changed: how many times peer's RSSI changed by a
5275 * non-negligible amount
5276 */
5277typedef struct {
5278 wmi_host_mac_addr peer_macaddr;
5279 uint32_t peer_rssi;
5280 uint32_t peer_rssi_seq_num;
5281 uint32_t peer_tx_rate;
5282 uint32_t peer_rx_rate;
5283 uint32_t currentper;
5284 uint32_t retries;
5285 uint32_t txratecount;
5286 uint32_t max4msframelen;
5287 uint32_t totalsubframes;
5288 uint32_t txbytes;
5289 uint32_t nobuffs[4];
5290 uint32_t excretries[4];
5291 uint32_t peer_rssi_changed;
5292} wmi_host_peer_stats;
5293
5294typedef struct {
5295 uint32_t dummy;
5296} wmi_host_bcnflt_stats;
5297
5298/**
5299 * struct wmi_host_chan_stats - WMI chan stats
5300 * @chan_mhz: Primary channel freq of the channel for which stats are sent
5301 * @sampling_period_us: Time spent on the channel
5302 * @rx_clear_count: Aggregate duration over a sampling period for
5303 * which channel activity was observed
5304 * @tx_duration_us: Accumalation of the TX PPDU duration over a sampling period
5305 * @rx_duration_us: Accumalation of the RX PPDU duration over a sampling period
5306 */
5307typedef struct {
5308 uint32_t chan_mhz;
5309 uint32_t sampling_period_us;
5310 uint32_t rx_clear_count;
5311 uint32_t tx_duration_us;
5312 uint32_t rx_duration_us;
5313} wmi_host_chan_stats;
5314
5315#define WMI_EVENT_ID_INVALID 0
5316/**
5317 * Host based ENUM IDs for events to abstract target enums for event_id
5318 */
5319typedef enum {
5320 wmi_service_ready_event_id = 0,
5321 wmi_ready_event_id,
5322 wmi_dbg_msg_event_id,
5323 wmi_scan_event_id,
5324 wmi_echo_event_id,
5325 wmi_update_stats_event_id,
5326 wmi_inst_rssi_stats_event_id,
5327 wmi_vdev_start_resp_event_id,
5328 wmi_vdev_standby_req_event_id,
5329 wmi_vdev_resume_req_event_id,
5330 wmi_vdev_stopped_event_id,
5331 wmi_peer_sta_kickout_event_id,
5332 wmi_host_swba_event_id,
5333 wmi_tbttoffset_update_event_id,
5334 wmi_mgmt_rx_event_id,
5335 wmi_chan_info_event_id,
5336 wmi_phyerr_event_id,
5337 wmi_roam_event_id,
5338 wmi_profile_match,
5339 wmi_debug_print_event_id,
5340 wmi_pdev_qvit_event_id,
5341 wmi_wlan_profile_data_event_id,
5342 wmi_rtt_meas_report_event_id,
5343 wmi_tsf_meas_report_event_id,
5344 wmi_rtt_error_report_event_id,
5345 wmi_rtt_keepalive_event_id,
5346 wmi_oem_cap_event_id,
5347 wmi_oem_meas_report_event_id,
5348 wmi_oem_report_event_id,
5349 wmi_nan_event_id,
5350 wmi_wow_wakeup_host_event_id,
5351 wmi_gtk_offload_status_event_id,
5352 wmi_gtk_rekey_fail_event_id,
5353 wmi_dcs_interference_event_id,
5354 wmi_pdev_tpc_config_event_id,
5355 wmi_csa_handling_event_id,
5356 wmi_gpio_input_event_id,
5357 wmi_peer_ratecode_list_event_id,
5358 wmi_generic_buffer_event_id,
5359 wmi_mcast_buf_release_event_id,
5360 wmi_mcast_list_ageout_event_id,
5361 wmi_vdev_get_keepalive_event_id,
5362 wmi_wds_peer_event_id,
5363 wmi_peer_sta_ps_statechg_event_id,
5364 wmi_pdev_fips_event_id,
5365 wmi_tt_stats_event_id,
5366 wmi_pdev_channel_hopping_event_id,
5367 wmi_pdev_ani_cck_level_event_id,
5368 wmi_pdev_ani_ofdm_level_event_id,
5369 wmi_pdev_reserve_ast_entry_event_id,
5370 wmi_pdev_nfcal_power_event_id,
5371 wmi_pdev_tpc_event_id,
5372 wmi_pdev_get_ast_info_event_id,
5373 wmi_pdev_temperature_event_id,
5374 wmi_pdev_nfcal_power_all_channels_event_id,
5375 wmi_pdev_bss_chan_info_event_id,
5376 wmi_mu_report_event_id,
5377 wmi_pdev_utf_event_id,
5378 wmi_pdev_dump_event_id,
5379 wmi_tx_pause_event_id,
5380 wmi_dfs_radar_event_id,
5381 wmi_pdev_l1ss_track_event_id,
5382 wmi_service_ready_ext_event_id,
5383 wmi_vdev_install_key_complete_event_id,
5384 wmi_vdev_mcc_bcn_intvl_change_req_event_id,
5385 wmi_vdev_tsf_report_event_id,
5386 wmi_peer_info_event_id,
5387 wmi_peer_tx_fail_cnt_thr_event_id,
5388 wmi_peer_estimated_linkspeed_event_id,
5389 wmi_peer_state_event_id,
5390 wmi_offload_bcn_tx_status_event_id,
5391 wmi_offload_prob_resp_tx_status_event_id,
5392 wmi_mgmt_tx_completion_event_id,
5393 wmi_tx_delba_complete_event_id,
5394 wmi_tx_addba_complete_event_id,
5395 wmi_ba_rsp_ssn_event_id,
5396 wmi_aggr_state_trig_event_id,
5397 wmi_roam_synch_event_id,
Padma, Santhosh Kumare0784da2017-10-06 15:42:00 +05305398 wmi_roam_synch_frame_event_id,
Govind Singh89727882016-04-15 13:58:27 +05305399 wmi_p2p_disc_event_id,
5400 wmi_p2p_noa_event_id,
Wu Gaoaf2196b2017-03-15 19:12:20 +08005401 wmi_p2p_lo_stop_event_id,
Govind Singh89727882016-04-15 13:58:27 +05305402 wmi_pdev_resume_event_id,
Will Huang5e78f762017-12-19 10:10:05 +08005403 wmi_d0_wow_disable_ack_event_id,
Govind Singh89727882016-04-15 13:58:27 +05305404 wmi_wow_initial_wakeup_event_id,
5405 wmi_stats_ext_event_id,
5406 wmi_iface_link_stats_event_id,
5407 wmi_peer_link_stats_event_id,
5408 wmi_radio_link_stats_link,
5409 wmi_update_fw_mem_dump_event_id,
5410 wmi_diag_event_id_log_supported_event_id,
5411 wmi_nlo_match_event_id,
5412 wmi_nlo_scan_complete_event_id,
5413 wmi_apfind_event_id,
5414 wmi_passpoint_match_event_id,
5415 wmi_chatter_pc_query_event_id,
5416 wmi_pdev_ftm_intg_event_id,
5417 wmi_wlan_freq_avoid_event_id,
5418 wmi_thermal_mgmt_event_id,
5419 wmi_diag_container_event_id,
5420 wmi_host_auto_shutdown_event_id,
5421 wmi_update_whal_mib_stats_event_id,
5422 wmi_update_vdev_rate_stats_event_id,
5423 wmi_diag_event_id,
Adil Saeed Musthafa0b6c7602017-08-23 17:32:11 -07005424 wmi_unit_test_event_id,
Govind Singh89727882016-04-15 13:58:27 +05305425 wmi_ocb_set_sched_event_id,
5426 wmi_dbg_mesg_flush_complete_event_id,
5427 wmi_rssi_breach_event_id,
5428 wmi_uploadh_event_id,
5429 wmi_captureh_event_id,
5430 wmi_rfkill_state_change_event_id,
5431 wmi_tdls_peer_event_id,
5432 wmi_batch_scan_enabled_event_id,
5433 wmi_batch_scan_result_event_id,
5434 wmi_lpi_result_event_id,
5435 wmi_lpi_status_event_id,
5436 wmi_lpi_handoff_event_id,
5437 wmi_extscan_start_stop_event_id,
5438 wmi_extscan_operation_event_id,
5439 wmi_extscan_table_usage_event_id,
5440 wmi_extscan_cached_results_event_id,
5441 wmi_extscan_wlan_change_results_event_id,
5442 wmi_extscan_hotlist_match_event_id,
5443 wmi_extscan_capabilities_event_id,
5444 wmi_extscan_hotlist_ssid_match_event_id,
5445 wmi_mdns_stats_event_id,
5446 wmi_sap_ofl_add_sta_event_id,
5447 wmi_sap_ofl_del_sta_event_id,
5448 wmi_ocb_set_config_resp_event_id,
5449 wmi_ocb_get_tsf_timer_resp_event_id,
5450 wmi_dcc_get_stats_resp_event_id,
5451 wmi_dcc_update_ndl_resp_event_id,
5452 wmi_dcc_stats_event_id,
5453 wmi_soc_set_hw_mode_resp_event_id,
5454 wmi_soc_hw_mode_transition_event_id,
5455 wmi_soc_set_dual_mac_config_resp_event_id,
5456 wmi_tx_data_traffic_ctrl_event_id,
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05305457 wmi_peer_tx_mu_txmit_count_event_id,
5458 wmi_peer_gid_userpos_list_event_id,
5459 wmi_pdev_check_cal_version_event_id,
5460 wmi_atf_peer_stats_event_id,
Vijay Pamidipatiadd0ba72017-01-17 12:53:05 +05305461 wmi_peer_delete_response_event_id,
Sathish Kumar907a7462017-02-27 10:35:40 +05305462 wmi_pdev_csa_switch_count_status_event_id,
Baila, Shashikala Prabhu6bad1972017-03-17 10:21:14 +05305463 wmi_reg_chan_list_cc_event_id,
Kiran Venkatappa25c47022017-03-19 22:58:09 +05305464 wmi_offchan_data_tx_completion_event,
Arif Hussaine542fe12017-04-09 01:03:19 -07005465 wmi_dfs_cac_complete_id,
5466 wmi_dfs_radar_detection_event_id,
Sathish Kumar744fbf72017-05-17 18:05:15 +05305467 wmi_ext_tbttoffset_update_event_id,
Amar Singhal1efb08e2017-05-19 16:39:34 -07005468 wmi_11d_new_country_event_id,
Anurag Chouhanc1705422017-09-11 14:56:30 +05305469 wmi_get_arp_stats_req_id,
Kiran Venkatappa34bea522017-09-01 17:02:34 +05305470 wmi_service_available_event_id,
Rajeev Kumar Sirasanagandlacddf6fe2016-11-22 21:28:54 +05305471 wmi_update_rcpi_event_id,
Rathees kumar Chinannanaff64b02017-11-22 17:03:57 +05305472 wmi_pdev_wds_entry_list_event_id,
Mukul Sharma6faf5a82017-11-03 19:26:54 +05305473 wmi_ndp_initiator_rsp_event_id,
5474 wmi_ndp_indication_event_id,
5475 wmi_ndp_confirm_event_id,
5476 wmi_ndp_responder_rsp_event_id,
5477 wmi_ndp_end_indication_event_id,
5478 wmi_ndp_end_rsp_event_id,
5479 wmi_oem_response_event_id,
5480 wmi_peer_stats_info_event_id,
5481 wmi_pdev_chip_power_stats_event_id,
5482 wmi_ap_ps_egap_info_event_id,
5483 wmi_peer_assoc_conf_event_id,
5484 wmi_vdev_delete_resp_event_id,
5485 wmi_bpf_capability_info_event_id,
5486 wmi_vdev_encrypt_decrypt_data_rsp_event_id,
5487 wmi_report_rx_aggr_failure_event_id,
5488 wmi_pdev_chip_pwr_save_failure_detect_event_id,
5489 wmi_peer_antdiv_info_event_id,
5490 wmi_pdev_set_hw_mode_rsp_event_id,
5491 wmi_pdev_hw_mode_transition_event_id,
5492 wmi_pdev_set_mac_config_resp_event_id,
5493 wmi_coex_bt_activity_event_id,
5494 wmi_mgmt_tx_bundle_completion_event_id,
5495 wmi_radio_tx_power_level_stats_event_id,
5496 wmi_report_stats_event_id,
Sathish Kumar3d3cf4f2017-11-17 17:30:41 +05305497 wmi_dma_buf_release_event_id,
Arif Hussain2cfde1d2017-12-27 16:23:45 -08005498 wmi_sap_obss_detection_report_event_id,
Arif Hussainb4da3472018-01-22 01:19:36 -08005499 wmi_obss_color_collision_report_event_id,
Subrat Mishra7c9427e2017-09-27 14:41:20 +05305500 wmi_host_swfda_event_id,
Jeff Johnsonefb43392017-12-14 15:50:16 -08005501 wmi_sar_get_limits_event_id,
Govind Singh89727882016-04-15 13:58:27 +05305502
5503 wmi_events_max,
5504} wmi_conv_event_id;
5505
5506#define WMI_UNAVAILABLE_PARAM 0
5507/**
5508 * Host based ENUM IDs for PDEV params to abstract target enums
5509 */
5510typedef enum {
5511 wmi_pdev_param_tx_chain_mask = 0,
5512 wmi_pdev_param_rx_chain_mask,
5513 wmi_pdev_param_txpower_limit2g,
5514 wmi_pdev_param_txpower_limit5g,
5515 wmi_pdev_param_txpower_scale,
5516 wmi_pdev_param_beacon_gen_mode,
5517 wmi_pdev_param_beacon_tx_mode,
5518 wmi_pdev_param_resmgr_offchan_mode,
5519 wmi_pdev_param_protection_mode,
5520 wmi_pdev_param_dynamic_bw,
5521 wmi_pdev_param_non_agg_sw_retry_th,
5522 wmi_pdev_param_agg_sw_retry_th,
5523 wmi_pdev_param_sta_kickout_th,
5524 wmi_pdev_param_ac_aggrsize_scaling,
5525 wmi_pdev_param_ltr_enable,
5526 wmi_pdev_param_ltr_ac_latency_be,
5527 wmi_pdev_param_ltr_ac_latency_bk,
5528 wmi_pdev_param_ltr_ac_latency_vi,
5529 wmi_pdev_param_ltr_ac_latency_vo,
5530 wmi_pdev_param_ltr_ac_latency_timeout,
5531 wmi_pdev_param_ltr_sleep_override,
5532 wmi_pdev_param_ltr_rx_override,
5533 wmi_pdev_param_ltr_tx_activity_timeout,
5534 wmi_pdev_param_l1ss_enable,
5535 wmi_pdev_param_dsleep_enable,
5536 wmi_pdev_param_pcielp_txbuf_flush,
5537 wmi_pdev_param_pcielp_txbuf_watermark,
5538 wmi_pdev_param_pcielp_txbuf_tmo_en,
5539 wmi_pdev_param_pcielp_txbuf_tmo_value,
5540 wmi_pdev_param_pdev_stats_update_period,
5541 wmi_pdev_param_vdev_stats_update_period,
5542 wmi_pdev_param_peer_stats_update_period,
5543 wmi_pdev_param_bcnflt_stats_update_period,
5544 wmi_pdev_param_pmf_qos,
5545 wmi_pdev_param_arp_ac_override,
5546 wmi_pdev_param_dcs,
5547 wmi_pdev_param_ani_enable,
5548 wmi_pdev_param_ani_poll_period,
5549 wmi_pdev_param_ani_listen_period,
5550 wmi_pdev_param_ani_ofdm_level,
5551 wmi_pdev_param_ani_cck_level,
5552 wmi_pdev_param_dyntxchain,
5553 wmi_pdev_param_proxy_sta,
5554 wmi_pdev_param_idle_ps_config,
5555 wmi_pdev_param_power_gating_sleep,
5556 wmi_pdev_param_aggr_burst,
5557 wmi_pdev_param_rx_decap_mode,
5558 wmi_pdev_param_fast_channel_reset,
5559 wmi_pdev_param_burst_dur,
5560 wmi_pdev_param_burst_enable,
5561 wmi_pdev_param_smart_antenna_default_antenna,
5562 wmi_pdev_param_igmpmld_override,
5563 wmi_pdev_param_igmpmld_tid,
5564 wmi_pdev_param_antenna_gain,
5565 wmi_pdev_param_rx_filter,
5566 wmi_pdev_set_mcast_to_ucast_tid,
5567 wmi_pdev_param_proxy_sta_mode,
5568 wmi_pdev_param_set_mcast2ucast_mode,
5569 wmi_pdev_param_set_mcast2ucast_buffer,
5570 wmi_pdev_param_remove_mcast2ucast_buffer,
5571 wmi_pdev_peer_sta_ps_statechg_enable,
5572 wmi_pdev_param_igmpmld_ac_override,
5573 wmi_pdev_param_block_interbss,
5574 wmi_pdev_param_set_disable_reset_cmdid,
5575 wmi_pdev_param_set_msdu_ttl_cmdid,
5576 wmi_pdev_param_set_ppdu_duration_cmdid,
5577 wmi_pdev_param_txbf_sound_period_cmdid,
5578 wmi_pdev_param_set_promisc_mode_cmdid,
5579 wmi_pdev_param_set_burst_mode_cmdid,
5580 wmi_pdev_param_en_stats,
5581 wmi_pdev_param_mu_group_policy,
5582 wmi_pdev_param_noise_detection,
5583 wmi_pdev_param_noise_threshold,
5584 wmi_pdev_param_dpd_enable,
5585 wmi_pdev_param_set_mcast_bcast_echo,
5586 wmi_pdev_param_atf_strict_sch,
5587 wmi_pdev_param_atf_sched_duration,
5588 wmi_pdev_param_ant_plzn,
5589 wmi_pdev_param_mgmt_retry_limit,
5590 wmi_pdev_param_sensitivity_level,
5591 wmi_pdev_param_signed_txpower_2g,
5592 wmi_pdev_param_signed_txpower_5g,
5593 wmi_pdev_param_enable_per_tid_amsdu,
5594 wmi_pdev_param_enable_per_tid_ampdu,
5595 wmi_pdev_param_cca_threshold,
5596 wmi_pdev_param_rts_fixed_rate,
5597 wmi_pdev_param_cal_period,
5598 wmi_pdev_param_pdev_reset,
5599 wmi_pdev_param_wapi_mbssid_offset,
5600 wmi_pdev_param_arp_srcaddr,
5601 wmi_pdev_param_arp_dstaddr,
5602 wmi_pdev_param_txpower_decr_db,
5603 wmi_pdev_param_rx_batchmode,
5604 wmi_pdev_param_packet_aggr_delay,
5605 wmi_pdev_param_atf_obss_noise_sch,
5606 wmi_pdev_param_atf_obss_noise_scaling_factor,
5607 wmi_pdev_param_cust_txpower_scale,
5608 wmi_pdev_param_atf_dynamic_enable,
5609 wmi_pdev_param_atf_ssid_group_policy,
5610 wmi_pdev_param_rfkill_enable,
5611 wmi_pdev_param_hw_rfkill_config,
5612 wmi_pdev_param_low_power_rf_enable,
5613 wmi_pdev_param_l1ss_track,
5614 wmi_pdev_param_hyst_en,
5615 wmi_pdev_param_power_collapse_enable,
5616 wmi_pdev_param_led_sys_state,
5617 wmi_pdev_param_led_enable,
5618 wmi_pdev_param_audio_over_wlan_latency,
5619 wmi_pdev_param_audio_over_wlan_enable,
5620 wmi_pdev_param_whal_mib_stats_update_enable,
5621 wmi_pdev_param_vdev_rate_stats_update_period,
5622 wmi_pdev_param_cts_cbw,
5623 wmi_pdev_param_wnts_config,
5624 wmi_pdev_param_adaptive_early_rx_enable,
5625 wmi_pdev_param_adaptive_early_rx_min_sleep_slop,
5626 wmi_pdev_param_adaptive_early_rx_inc_dec_step,
5627 wmi_pdev_param_early_rx_fix_sleep_slop,
5628 wmi_pdev_param_bmiss_based_adaptive_bto_enable,
5629 wmi_pdev_param_bmiss_bto_min_bcn_timeout,
5630 wmi_pdev_param_bmiss_bto_inc_dec_step,
5631 wmi_pdev_param_bto_fix_bcn_timeout,
5632 wmi_pdev_param_ce_based_adaptive_bto_enable,
5633 wmi_pdev_param_ce_bto_combo_ce_value,
5634 wmi_pdev_param_tx_chain_mask_2g,
5635 wmi_pdev_param_rx_chain_mask_2g,
5636 wmi_pdev_param_tx_chain_mask_5g,
5637 wmi_pdev_param_rx_chain_mask_5g,
5638 wmi_pdev_param_tx_chain_mask_cck,
5639 wmi_pdev_param_tx_chain_mask_1ss,
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05305640 wmi_pdev_param_enable_btcoex,
5641 wmi_pdev_param_atf_peer_stats,
Sathish Kumar612d0c22017-01-19 14:57:37 +05305642 wmi_pdev_param_btcoex_cfg,
Venkateswara Swamy Bandarud8ac3e72017-02-24 17:09:46 +05305643 wmi_pdev_param_mesh_mcast_enable,
Sathish Kumar262d54a2017-10-04 09:58:00 +05305644 wmi_pdev_param_tx_ack_timeout,
Anirban Sirkhelld40d18f2017-09-26 18:43:06 +05305645 wmi_pdev_param_soft_tx_chain_mask,
Shiva Krishna Pittalaf302c5c2018-02-16 21:28:40 +05305646 wmi_pdev_param_cck_tx_enable,
Govind Singh89727882016-04-15 13:58:27 +05305647
5648 wmi_pdev_param_max,
5649} wmi_conv_pdev_params_id;
5650
5651
5652/**
5653 * Host based ENUM IDs for VDEV params to abstract target enums
5654 */
5655typedef enum {
5656 wmi_vdev_param_rts_threshold = 0,
5657 wmi_vdev_param_fragmentation_threshold,
5658 wmi_vdev_param_beacon_interval,
5659 wmi_vdev_param_listen_interval,
5660 wmi_vdev_param_multicast_rate,
5661 wmi_vdev_param_mgmt_tx_rate,
5662 wmi_vdev_param_slot_time,
5663 wmi_vdev_param_preamble,
5664 wmi_vdev_param_swba_time,
5665 wmi_vdev_stats_update_period,
5666 wmi_vdev_pwrsave_ageout_time,
5667 wmi_vdev_host_swba_interval,
5668 wmi_vdev_param_dtim_period,
5669 wmi_vdev_oc_scheduler_air_time_limit,
5670 wmi_vdev_param_wds,
5671 wmi_vdev_param_atim_window,
5672 wmi_vdev_param_bmiss_count_max,
5673 wmi_vdev_param_bmiss_first_bcnt,
5674 wmi_vdev_param_bmiss_final_bcnt,
5675 wmi_vdev_param_feature_wmm,
5676 wmi_vdev_param_chwidth,
5677 wmi_vdev_param_chextoffset,
5678 wmi_vdev_param_disable_htprotection,
5679 wmi_vdev_param_sta_quickkickout,
5680 wmi_vdev_param_mgmt_rate,
5681 wmi_vdev_param_protection_mode,
5682 wmi_vdev_param_fixed_rate,
5683 wmi_vdev_param_sgi,
5684 wmi_vdev_param_ldpc,
5685 wmi_vdev_param_tx_stbc,
5686 wmi_vdev_param_rx_stbc,
5687 wmi_vdev_param_intra_bss_fwd,
5688 wmi_vdev_param_def_keyid,
5689 wmi_vdev_param_nss,
5690 wmi_vdev_param_bcast_data_rate,
5691 wmi_vdev_param_mcast_data_rate,
5692 wmi_vdev_param_mcast_indicate,
5693 wmi_vdev_param_dhcp_indicate,
5694 wmi_vdev_param_unknown_dest_indicate,
5695 wmi_vdev_param_ap_keepalive_min_idle_inactive_time_secs,
5696 wmi_vdev_param_ap_keepalive_max_idle_inactive_time_secs,
5697 wmi_vdev_param_ap_keepalive_max_unresponsive_time_secs,
5698 wmi_vdev_param_ap_enable_nawds,
5699 wmi_vdev_param_mcast2ucast_set,
5700 wmi_vdev_param_enable_rtscts,
5701 wmi_vdev_param_rc_num_retries,
5702 wmi_vdev_param_txbf,
5703 wmi_vdev_param_packet_powersave,
5704 wmi_vdev_param_drop_unencry,
5705 wmi_vdev_param_tx_encap_type,
5706 wmi_vdev_param_ap_detect_out_of_sync_sleeping_sta_time_secs,
5707 wmi_vdev_param_cabq_maxdur,
5708 wmi_vdev_param_mfptest_set,
5709 wmi_vdev_param_rts_fixed_rate,
5710 wmi_vdev_param_vht_sgimask,
5711 wmi_vdev_param_vht80_ratemask,
5712 wmi_vdev_param_early_rx_adjust_enable,
5713 wmi_vdev_param_early_rx_tgt_bmiss_num,
5714 wmi_vdev_param_early_rx_bmiss_sample_cycle,
5715 wmi_vdev_param_early_rx_slop_step,
5716 wmi_vdev_param_early_rx_init_slop,
5717 wmi_vdev_param_early_rx_adjust_pause,
5718 wmi_vdev_param_proxy_sta,
5719 wmi_vdev_param_meru_vc,
5720 wmi_vdev_param_rx_decap_type,
5721 wmi_vdev_param_bw_nss_ratemask,
5722 wmi_vdev_param_sensor_ap,
5723 wmi_vdev_param_beacon_rate,
5724 wmi_vdev_param_dtim_enable_cts,
5725 wmi_vdev_param_sta_kickout,
5726 wmi_vdev_param_tx_pwrlimit,
5727 wmi_vdev_param_snr_num_for_cal,
5728 wmi_vdev_param_roam_fw_offload,
5729 wmi_vdev_param_enable_rmc,
5730 wmi_vdev_param_ibss_max_bcn_lost_ms,
5731 wmi_vdev_param_max_rate,
5732 wmi_vdev_param_early_rx_drift_sample,
5733 wmi_vdev_param_set_ibss_tx_fail_cnt_thr,
5734 wmi_vdev_param_ebt_resync_timeout,
5735 wmi_vdev_param_aggr_trig_event_enable,
5736 wmi_vdev_param_is_ibss_power_save_allowed,
5737 wmi_vdev_param_is_power_collapse_allowed,
5738 wmi_vdev_param_is_awake_on_txrx_enabled,
5739 wmi_vdev_param_inactivity_cnt,
5740 wmi_vdev_param_txsp_end_inactivity_time_ms,
5741 wmi_vdev_param_dtim_policy,
5742 wmi_vdev_param_ibss_ps_warmup_time_secs,
5743 wmi_vdev_param_ibss_ps_1rx_chain_in_atim_window_enable,
5744 wmi_vdev_param_rx_leak_window,
5745 wmi_vdev_param_stats_avg_factor,
5746 wmi_vdev_param_disconnect_th,
5747 wmi_vdev_param_rtscts_rate,
5748 wmi_vdev_param_mcc_rtscts_protection_enable,
5749 wmi_vdev_param_mcc_broadcast_probe_enable,
Himanshu Agarwal56c292f2016-07-19 15:41:51 +05305750 wmi_vdev_param_capabilities,
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05305751 wmi_vdev_param_mgmt_tx_power,
5752 wmi_vdev_param_atf_ssid_sched_policy,
5753 wmi_vdev_param_disable_dyn_bw_rts,
Nandha Kishore Easwaranb3da4222017-02-01 10:59:00 +05305754 wmi_vdev_param_ampdu_subframe_size_per_ac,
Kris Muthusamye66c6bf2017-02-20 20:21:04 -08005755 wmi_vdev_param_he_dcm_enable,
5756 wmi_vdev_param_he_bss_color,
5757 wmi_vdev_param_he_range_ext_enable,
5758 wmi_vdev_param_set_hemu_mode,
Gyanranjan Hazarika9ecfb552017-09-18 15:59:34 -07005759 wmi_vdev_param_set_he_ltf,
Gyanranjan Hazarika9e893852017-10-13 12:36:24 -07005760 wmi_vdev_param_set_heop,
Anirban Sirkhell3c299ba2017-03-01 10:32:33 +08005761 wmi_vdev_param_disable_cabq,
Sathish Kumar6190e772017-11-08 14:49:58 +05305762 wmi_vdev_param_rate_dropdown_bmap,
Anirban Sirkhell679a7102017-04-14 10:02:39 +08005763 wmi_vdev_param_tx_power,
Rhythm Patwa2f088b72018-02-15 13:22:39 -08005764 wmi_vdev_param_set_ba_mode,
Govind Singh89727882016-04-15 13:58:27 +05305765 wmi_vdev_param_max,
5766} wmi_conv_vdev_param_id;
5767
5768/**
5769 * Host based ENUM IDs for service bits to abstract target enums
5770 */
5771typedef enum {
5772 wmi_service_beacon_offload = 0,
5773 wmi_service_scan_offload,
5774 wmi_service_roam_offload,
5775 wmi_service_bcn_miss_offload,
5776 wmi_service_sta_pwrsave,
5777 wmi_service_sta_advanced_pwrsave,
5778 wmi_service_ap_uapsd,
5779 wmi_service_ap_dfs,
5780 wmi_service_11ac,
5781 wmi_service_blockack,
5782 wmi_service_phyerr,
5783 wmi_service_bcn_filter,
5784 wmi_service_rtt,
5785 wmi_service_ratectrl,
5786 wmi_service_wow,
5787 wmi_service_ratectrl_cache,
5788 wmi_service_iram_tids,
5789 wmi_service_burst,
5790 wmi_service_smart_antenna_sw_support,
5791 wmi_service_gtk_offload,
5792 wmi_service_scan_sch,
5793 wmi_service_csa_offload,
5794 wmi_service_chatter,
5795 wmi_service_coex_freqavoid,
5796 wmi_service_packet_power_save,
5797 wmi_service_force_fw_hang,
5798 wmi_service_smart_antenna_hw_support,
5799 wmi_service_gpio,
5800 wmi_sta_uapsd_basic_auto_trig,
5801 wmi_sta_uapsd_var_auto_trig,
5802 wmi_service_sta_keep_alive,
5803 wmi_service_tx_encap,
5804 wmi_service_ap_ps_detect_out_of_sync,
5805 wmi_service_early_rx,
5806 wmi_service_enhanced_proxy_sta,
5807 wmi_service_tt,
5808 wmi_service_atf,
5809 wmi_service_peer_caching,
5810 wmi_service_coex_gpio,
5811 wmi_service_aux_spectral_intf,
5812 wmi_service_aux_chan_load_intf,
5813 wmi_service_bss_channel_info_64,
5814 wmi_service_ext_res_cfg_support,
5815 wmi_service_mesh,
5816 wmi_service_restrt_chnl_support,
5817 wmi_service_roam_scan_offload,
5818 wmi_service_arpns_offload,
5819 wmi_service_nlo,
5820 wmi_service_sta_dtim_ps_modulated_dtim,
5821 wmi_service_sta_smps,
5822 wmi_service_fwtest,
5823 wmi_service_sta_wmmac,
5824 wmi_service_tdls,
5825 wmi_service_mcc_bcn_interval_change,
5826 wmi_service_adaptive_ocs,
5827 wmi_service_ba_ssn_support,
5828 wmi_service_filter_ipsec_natkeepalive,
5829 wmi_service_wlan_hb,
5830 wmi_service_lte_ant_share_support,
5831 wmi_service_batch_scan,
5832 wmi_service_qpower,
5833 wmi_service_plmreq,
5834 wmi_service_thermal_mgmt,
5835 wmi_service_rmc,
5836 wmi_service_mhf_offload,
5837 wmi_service_coex_sar,
5838 wmi_service_bcn_txrate_override,
5839 wmi_service_nan,
5840 wmi_service_l1ss_stat,
5841 wmi_service_estimate_linkspeed,
5842 wmi_service_obss_scan,
5843 wmi_service_tdls_offchan,
5844 wmi_service_tdls_uapsd_buffer_sta,
5845 wmi_service_tdls_uapsd_sleep_sta,
5846 wmi_service_ibss_pwrsave,
5847 wmi_service_lpass,
5848 wmi_service_extscan,
5849 wmi_service_d0wow,
5850 wmi_service_hsoffload,
5851 wmi_service_roam_ho_offload,
5852 wmi_service_rx_full_reorder,
5853 wmi_service_dhcp_offload,
5854 wmi_service_sta_rx_ipa_offload_support,
5855 wmi_service_mdns_offload,
5856 wmi_service_sap_auth_offload,
5857 wmi_service_dual_band_simultaneous_support,
5858 wmi_service_ocb,
5859 wmi_service_ap_arpns_offload,
5860 wmi_service_per_band_chainmask_support,
5861 wmi_service_packet_filter_offload,
5862 wmi_service_mgmt_tx_htt,
5863 wmi_service_mgmt_tx_wmi,
5864 wmi_service_ext_msg,
5865 wmi_service_mawc,
5866
5867 wmi_service_peer_stats,
5868 wmi_service_mesh_11s,
5869 wmi_service_periodic_chan_stat_support,
5870 wmi_service_tx_mode_push_only,
5871 wmi_service_tx_mode_push_pull,
5872 wmi_service_tx_mode_dynamic,
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05305873 wmi_service_check_cal_version,
Sathish Kumar7e566c52016-11-10 15:30:22 +05305874 wmi_service_btcoex_duty_cycle,
Sathish Kumar612d0c22017-01-19 14:57:37 +05305875 wmi_service_4_wire_coex_support,
Sathish Kumar907a7462017-02-27 10:35:40 +05305876 wmi_service_multiple_vdev_restart,
Kiran Venkatappa4a56b462017-05-10 14:34:17 +05305877 wmi_service_peer_assoc_conf,
5878 wmi_service_egap,
5879 wmi_service_sta_pmf_offload,
5880 wmi_service_unified_wow_capability,
5881 wmi_service_enterprise_mesh,
5882 wmi_service_bpf_offload,
5883 wmi_service_sync_delete_cmds,
5884 wmi_service_ratectrl_limit_max_min_rates,
5885 wmi_service_nan_data,
5886 wmi_service_nan_rtt,
5887 wmi_service_11ax,
5888 wmi_service_deprecated_replace,
5889 wmi_service_tdls_conn_tracker_in_host_mode,
5890 wmi_service_enhanced_mcast_filter,
5891 wmi_service_half_rate_quarter_rate_support,
5892 wmi_service_vdev_rx_filter,
5893 wmi_service_p2p_listen_offload_support,
5894 wmi_service_mark_first_wakeup_packet,
5895 wmi_service_multiple_mcast_filter_set,
5896 wmi_service_host_managed_rx_reorder,
5897 wmi_service_flash_rdwr_support,
5898 wmi_service_wlan_stats_report,
5899 wmi_service_tx_msdu_id_new_partition_support,
5900 wmi_service_dfs_phyerr_offload,
5901 wmi_service_rcpi_support,
5902 wmi_service_fw_mem_dump_support,
5903 wmi_service_peer_stats_info,
5904 wmi_service_regulatory_db,
5905 wmi_service_11d_offload,
5906 wmi_service_hw_data_filtering,
5907 wmi_service_pkt_routing,
5908 wmi_service_offchan_tx_wmi,
Venkateswara Swamy Bandarufdf80262017-06-07 20:57:28 +05305909 wmi_service_chan_load_info,
Soumya Bhatd2759c62017-08-29 18:49:13 +05305910 wmi_service_extended_nss_support,
Sathish Kumar262d54a2017-10-04 09:58:00 +05305911 wmi_service_ack_timeout,
Om Prakash Tripathi4a4242b2017-11-03 16:11:11 +05305912 wmi_service_widebw_scan,
Kiran Venkatappaf9b1de32017-11-08 19:32:23 +05305913 wmi_service_bcn_offload_start_stop_support,
Kiran Venkatappa24d38452017-11-17 17:08:02 +05305914 wmi_service_offchan_data_tid_support,
Sathish Kumar3d3cf4f2017-11-17 17:30:41 +05305915 wmi_service_support_dma,
Sourav Mohapatra0e1c2a82017-12-03 11:44:44 +05305916 wmi_service_8ss_tx_bfee,
5917 wmi_service_fils_support,
5918 wmi_service_mawc_support,
5919 wmi_service_wow_wakeup_by_timer_pattern,
Arunk Khandavalli2604ed12018-02-08 11:52:23 +05305920 wmi_service_11k_neighbour_report_support,
Arif Hussain97fd3e62018-02-09 16:42:05 -08005921 wmi_service_ap_obss_detection_offload,
5922 wmi_service_bss_color_offload,
Padma, Santhosh Kumarcc2eea02018-02-02 18:18:34 +05305923 wmi_service_gmac_offload_support,
Govind Singh89727882016-04-15 13:58:27 +05305924
5925 wmi_services_max,
5926} wmi_conv_service_ids;
5927#define WMI_SERVICE_UNAVAILABLE 0xFFFF
5928
5929/**
Sandeep Puligilla82b95ca2017-01-04 16:45:45 -08005930 * enum WMI_DBG_PARAM - Debug params
5931 * @WMI_DBGLOG_LOG_LEVEL: Set the loglevel
5932 * @WMI_DBGLOG_VAP_ENABLE: Enable VAP level debug
5933 * @WMI_DBGLOG_VAP_DISABLE: Disable VAP level debug
5934 * @WMI_DBGLOG_MODULE_ENABLE: Enable MODULE level debug
5935 * @WMI_DBGLOG_MODULE_DISABLE: Disable MODULE level debug
5936 * @WMI_DBGLOG_MOD_LOG_LEVEL: Enable MODULE level debug
5937 * @WMI_DBGLOG_TYPE: set type of the debug output
5938 * @WMI_DBGLOG_REPORT_ENABLE: Enable Disable debug
5939 */
5940typedef enum {
5941 WMI_DBGLOG_LOG_LEVEL = 0x1,
5942 WMI_DBGLOG_VAP_ENABLE,
5943 WMI_DBGLOG_VAP_DISABLE,
5944 WMI_DBGLOG_MODULE_ENABLE,
5945 WMI_DBGLOG_MODULE_DISABLE,
5946 WMI_DBGLOG_MOD_LOG_LEVEL,
5947 WMI_DBGLOG_TYPE,
5948 WMI_DBGLOG_REPORT_ENABLE
5949} WMI_DBG_PARAM;
5950
5951/**
Govind Singh89727882016-04-15 13:58:27 +05305952 * struct wmi_host_fw_ver - FW version in non-tlv target
5953 * @sw_version: Versin info
5954 * @sw_version_1: Second dword of version
5955 */
5956struct wmi_host_fw_ver {
5957 uint32_t sw_version;
5958 uint32_t sw_version_1;
5959};
5960
5961/**
5962 * struct wmi_host_fw_abi_ver - FW version in non-tlv target
5963 * @sw_version: Versin info
5964 * @abi_version: ABI version
5965 */
5966struct wmi_host_fw_abi_ver {
5967 uint32_t sw_version;
5968 uint32_t abi_version;
5969};
5970
5971/**
5972 * struct target_resource_config - Resource config sent from host to target
5973 * abstracted out to include union of both configs
5974 * @num_vdevs: Number vdevs configured
5975 * @num_peers: Number of peers
5976 * @num_active_peers: Number of active peers for peer cache
5977 * @num_offload_peers: Number of offload peers
5978 * @num_offload_reorder_buffs: number of offload reorder buffs
5979 * @num_peer_keys: number of peer keys
5980 * @num_tids: number of tids
5981 * @ast_skid_limit: AST skid limit
5982 * @tx_chain_mask: TX chain mask
5983 * @rx_chain_mask: RX chain mask
5984 * @rx_timeout_pri: RX reorder timeout per AC
5985 * @rx_decap_mode: RX decap mode
5986 * @scan_max_pending_req: Scan mac pending req
5987 * @bmiss_offload_max_vdev: Beacom miss offload max vdevs
5988 * @roam_offload_max_vdev: Roam offload max vdevs
5989 * @roam_offload_max_ap_profiles: roam offload max ap profiles
5990 * @num_mcast_groups: num mcast groups
5991 * @num_mcast_table_elems: number of macst table elems
5992 * @mcast2ucast_mode: mcast enhance mode
5993 * @tx_dbg_log_size: DBG log buf size
5994 * @num_wds_entries: number of WDS entries
5995 * @dma_burst_size: DMA burst size.
5996 * @mac_aggr_delim: Mac aggr delim
5997 * @rx_skip_defrag_timeout_dup_detection_check: Defrag dup check in host?
5998 * @vow_config: vow configuration
5999 * @gtk_offload_max_vdev: Max vdevs for GTK offload
6000 * @num_msdu_desc: Number of msdu desc
6001 * @max_frag_entries: Max frag entries
6002 * End common
6003 * @max_peer_ext_stats: Max peer EXT stats
6004 * @smart_ant_cap: Smart antenna capabilities
6005 * @BK_Minfree: BIN configuration for BK traffic
6006 * @BE_Minfree: BIN configuration for BE traffic
6007 * @VI_Minfree: BIN configuration for VI traffic
6008 * @VO_Minfree: BIN configuration for VO traffic
6009 * @rx_batchmode: RX batch mode
6010 * @tt_support: Thermal throttling support
6011 * @atf_config: ATF config
Mukul Sharma7b7b15e2017-11-02 17:42:36 +05306012 * @mgmt_comp_evt_bundle_support: bundle support required for mgmt complete evt
6013 * @tx_msdu_new_partition_id_support: new partiition id support for tx msdu
Govind Singh89727882016-04-15 13:58:27 +05306014 * @iphdr_pad_config: ipheader pad config
6015 * @qwrap_config: Qwrap configuration
6016 * @alloc_frag_desc_for_data_pkt: Frag desc for data
6017 * Added in MCL
6018 * @num_tdls_vdevs:
6019 * @num_tdls_conn_table_entries:
6020 * @beacon_tx_offload_max_vdev:
6021 * @num_multicast_filter_entries:
6022 * @num_wow_filters:
6023 * @num_keep_alive_pattern:
6024 * @keep_alive_pattern_size:
6025 * @max_tdls_concurrent_sleep_sta:
6026 * @max_tdls_concurrent_buffer_sta:
6027 * @wmi_send_separate:
6028 * @num_ocb_vdevs:
6029 * @num_ocb_channels:
6030 * @num_ocb_schedules:
Dustin Brown29c4cbf2018-03-07 11:48:14 -08006031 * @num_packet_filters: maximum number of packet filter rules to support
6032 * @num_max_sta_vdevs: maximum number of concurrent station vdevs to support
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05306033 * @num_ns_ext_tuples_cfg:
6034 * @bpf_instruction_size:
6035 * @max_bssid_rx_filters:
6036 * @use_pdev_id:
Mukul Sharma7b7b15e2017-11-02 17:42:36 +05306037 * @max_num_dbs_scan_duty_cycle: max dbs can duty cycle value
Ruchi, Agrawalbd55f8e2017-11-21 14:39:02 +05306038 * @cce_disable: disable cce component
Govind Singh89727882016-04-15 13:58:27 +05306039 */
6040typedef struct {
6041 uint32_t num_vdevs;
6042 uint32_t num_peers;
6043 uint32_t num_active_peers;
6044 uint32_t num_offload_peers;
6045 uint32_t num_offload_reorder_buffs;
6046 uint32_t num_peer_keys;
6047 uint32_t num_tids;
6048 uint32_t ast_skid_limit;
6049 uint32_t tx_chain_mask;
6050 uint32_t rx_chain_mask;
6051 uint32_t rx_timeout_pri[4];
6052 uint32_t rx_decap_mode;
6053 uint32_t scan_max_pending_req;
6054 uint32_t bmiss_offload_max_vdev;
6055 uint32_t roam_offload_max_vdev;
6056 uint32_t roam_offload_max_ap_profiles;
6057 uint32_t num_mcast_groups;
6058 uint32_t num_mcast_table_elems;
6059 uint32_t mcast2ucast_mode;
6060 uint32_t tx_dbg_log_size;
6061 uint32_t num_wds_entries;
6062 uint32_t dma_burst_size;
6063 uint32_t mac_aggr_delim;
6064 uint32_t rx_skip_defrag_timeout_dup_detection_check;
6065 uint32_t vow_config;
6066 uint32_t gtk_offload_max_vdev;
6067 uint32_t num_msdu_desc; /* Number of msdu desc */
6068 uint32_t max_frag_entries;
Kris Muthusamya34dfff2017-11-30 01:40:46 -08006069 uint32_t scheduler_params;
Govind Singh89727882016-04-15 13:58:27 +05306070 /* End common */
6071
6072 /* Added for Beeliner */
6073 uint32_t max_peer_ext_stats;
6074 uint32_t smart_ant_cap;
6075 uint32_t BK_Minfree;
6076 uint32_t BE_Minfree;
6077 uint32_t VI_Minfree;
6078 uint32_t VO_Minfree;
6079 uint32_t rx_batchmode;
6080 uint32_t tt_support;
Mukul Sharma7b7b15e2017-11-02 17:42:36 +05306081 uint32_t atf_config:1,
6082 mgmt_comp_evt_bundle_support:1,
6083 tx_msdu_new_partition_id_support:1;
Govind Singh89727882016-04-15 13:58:27 +05306084 uint32_t iphdr_pad_config;
6085 uint32_t
6086 qwrap_config:16,
6087 alloc_frag_desc_for_data_pkt:16;
6088
6089 /* Added in MCL */
6090 uint32_t num_tdls_vdevs;
6091 uint32_t num_tdls_conn_table_entries;
6092 uint32_t beacon_tx_offload_max_vdev;
6093 uint32_t num_multicast_filter_entries;
6094 uint32_t num_wow_filters;
6095 uint32_t num_keep_alive_pattern;
6096 uint32_t keep_alive_pattern_size;
6097 uint32_t max_tdls_concurrent_sleep_sta;
6098 uint32_t max_tdls_concurrent_buffer_sta;
6099 uint32_t wmi_send_separate;
6100 uint32_t num_ocb_vdevs;
6101 uint32_t num_ocb_channels;
6102 uint32_t num_ocb_schedules;
Dustin Brown29c4cbf2018-03-07 11:48:14 -08006103 uint32_t num_packet_filters;
6104 uint32_t num_max_sta_vdevs;
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05306105 uint32_t num_ns_ext_tuples_cfg;
6106 uint32_t bpf_instruction_size;
6107 uint32_t max_bssid_rx_filters;
6108 uint32_t use_pdev_id;
Mukul Sharma7b7b15e2017-11-02 17:42:36 +05306109 uint32_t max_num_dbs_scan_duty_cycle;
Ruchi, Agrawalbd55f8e2017-11-21 14:39:02 +05306110 bool cce_disable;
Govind Singh89727882016-04-15 13:58:27 +05306111} target_resource_config;
6112
6113/**
6114 * struct wds_addr_event - WDS addr event structure
6115 * @event_type: event type add/delete
6116 * @peer_mac: peer mac
6117 * @dest_mac: destination mac address
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05306118 * @vdev_id: vdev id
Govind Singh89727882016-04-15 13:58:27 +05306119 */
6120typedef struct {
6121 uint32_t event_type[4];
6122 u_int8_t peer_mac[IEEE80211_ADDR_LEN];
6123 u_int8_t dest_mac[IEEE80211_ADDR_LEN];
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05306124 uint32_t vdev_id;
Govind Singh89727882016-04-15 13:58:27 +05306125} wds_addr_event_t;
6126/**
6127 * Enum replicated for host abstraction with FW
6128 */
6129typedef enum {
6130 /* Event respose of START CMD */
6131 WMI_HOST_VDEV_START_RESP_EVENT = 0,
6132 /* Event respose of RESTART CMD */
6133 WMI_HOST_VDEV_RESTART_RESP_EVENT,
6134} WMI_HOST_START_EVENT_PARAM;
6135
6136/**
6137 * struct wmi_host_vdev_start_resp - VDEV start response
6138 * @vdev_id: vdev id
6139 * @requestor_id: requestor id that requested the VDEV start request
6140 * @resp_type: Respose of Event type START/RESTART
6141 * @status: status of the response
6142 * @chain_mask: Vdev chain mask
6143 * @smps_mode: Vdev mimo power save mode
6144 * @mac_id: mac_id field contains the MAC identifier that the
6145 * VDEV is bound to. The valid range is 0 to (num_macs-1).
6146 * @cfgd_tx_streams: Configured Transmit Streams
6147 * @cfgd_rx_streams: Configured Receive Streams
6148 */
6149typedef struct {
6150 uint32_t vdev_id;
6151 uint32_t requestor_id;
6152 WMI_HOST_START_EVENT_PARAM resp_type;
6153 uint32_t status;
6154 uint32_t chain_mask;
6155 uint32_t smps_mode;
6156 uint32_t mac_id;
6157 uint32_t cfgd_tx_streams;
6158 uint32_t cfgd_rx_streams;
6159} wmi_host_vdev_start_resp;
6160
Govind Singh89727882016-04-15 13:58:27 +05306161/**
Om Prakash Tripathi105b04b2017-11-24 16:53:07 +05306162 * struct wmi_host_vdev_delete_resp - VDEV delete response
6163 * @vdev_id: vdev id
6164 */
6165struct wmi_host_vdev_delete_resp {
6166 uint32_t vdev_id;
6167};
6168
6169/**
Govind Singh89727882016-04-15 13:58:27 +05306170 * struct wmi_host_roam_event - host roam event param
6171 * @vdev_id: vdev id
6172 * @reason: roam reason
6173 * @rssi: RSSI
6174 */
6175typedef struct {
6176 uint32_t vdev_id;
6177 uint32_t reason;
6178 uint32_t rssi;
6179} wmi_host_roam_event;
6180
6181/**
6182 * ENUM wmi_host_scan_event_type - Scan event type
6183 */
6184enum wmi_host_scan_event_type {
6185 WMI_HOST_SCAN_EVENT_STARTED = 0x1,
6186 WMI_HOST_SCAN_EVENT_COMPLETED = 0x2,
6187 WMI_HOST_SCAN_EVENT_BSS_CHANNEL = 0x4,
6188 WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
6189 WMI_HOST_SCAN_EVENT_DEQUEUED = 0x10,
6190 WMI_HOST_SCAN_EVENT_PREEMPTED = 0x20,
6191 WMI_HOST_SCAN_EVENT_START_FAILED = 0x40,
6192 WMI_HOST_SCAN_EVENT_RESTARTED = 0x80,
6193 WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
6194 WMI_HOST_SCAN_EVENT_INVALID = 0x200,
Sathish Kumar753eb7d2016-10-25 18:47:52 +05306195 WMI_HOST_SCAN_EVENT_GPIO_TIMEOUT = 0x400,
Govind Singh89727882016-04-15 13:58:27 +05306196 WMI_HOST_SCAN_EVENT_MAX = 0x8000
6197};
6198
6199/**
6200 * ENUM wmi_host_scan_completion_reason - Scan completion event type
6201 */
6202enum wmi_host_scan_completion_reason {
6203 /** scan related events */
6204 WMI_HOST_SCAN_REASON_NONE = 0xFF,
6205 WMI_HOST_SCAN_REASON_COMPLETED = 0,
6206 WMI_HOST_SCAN_REASON_CANCELLED = 1,
6207 WMI_HOST_SCAN_REASON_PREEMPTED = 2,
6208 WMI_HOST_SCAN_REASON_TIMEDOUT = 3,
6209 WMI_HOST_SCAN_REASON_INTERNAL_FAILURE = 4,
6210 WMI_HOST_SCAN_REASON_MAX,
6211};
6212
6213/**
6214 * struct wmi_host_scan_event - Scan event response from target
6215 * @event: event type
6216 * @reason: Reason for event
6217 * @channel_freq: channel frequency
6218 * @requestor: requestor id
6219 * @scan_id: scan id
6220 * @vdev_id: vdev id
6221 */
6222typedef struct {
6223 uint32_t event;
6224 uint32_t reason;
6225 uint32_t channel_freq;
6226 uint32_t requestor;
6227 uint32_t scan_id;
6228 uint32_t vdev_id;
6229} wmi_host_scan_event;
6230
6231/**
6232 * struct wmi_host_pdev_reserve_ast_entry_event - Reserve AST entry
6233 * @result: result
6234 */
6235typedef struct {
6236 uint32_t result;
6237} wmi_host_pdev_reserve_ast_entry_event;
6238
6239/**
6240 * struct wmi_host_mcast_ageout_entry - mcast aged-out entry
6241 * @grp_addr: IPv4/6 mcast group addr
6242 * @vdev_id: vdev id
6243 */
6244typedef struct {
6245 uint8_t grp_addr[16];
6246 uint32_t vdev_id;
6247} wmi_host_mcast_ageout_entry;
6248
6249/**
6250 * struct wmi_host_mcast_list_ageout_event - List of mcast entry aged-out
6251 * @num_entry: Number of mcast entries timed-out
6252 * @entry: List of wmi_host_mcast_ageout_entry
6253 */
6254typedef struct {
6255 uint32_t num_entry;
6256 wmi_host_mcast_ageout_entry entry[1];
6257} wmi_host_mcast_list_ageout_event;
6258
6259/**
6260 * struct wmi_host_pdev_nfcal_power_all_channels_event - NF cal event data
nobeljd9c2dc82018-01-25 16:35:36 -08006261 * @nfdbr:
6262 * chan[0 ~ 7]: {NFCalPower_chain0, NFCalPower_chain1,
6263 * NFCalPower_chain2, NFCalPower_chain3,
6264 * NFCalPower_chain4, NFCalPower_chain5,
6265 * NFCalPower_chain6, NFCalPower_chain7},
6266 * @nfdbm:
6267 * chan[0 ~ 7]: {NFCalPower_chain0, NFCalPower_chain1,
6268 * NFCalPower_chain2, NFCalPower_chain3,
6269 * NFCalPower_chain4, NFCalPower_chain5,
6270 * NFCalPower_chain6, NFCalPower_chain7},
6271 * @freqnum:
6272 * chan[0 ~ 7]: frequency number
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05306273 * @pdev_id: pdev_id
Govind Singh89727882016-04-15 13:58:27 +05306274 */
6275typedef struct {
nobeljd9c2dc82018-01-25 16:35:36 -08006276 int8_t nfdbr[WMI_HOST_RXG_CAL_CHAN_MAX * WMI_HOST_MAX_NUM_CHAINS];
6277 int8_t nfdbm[WMI_HOST_RXG_CAL_CHAN_MAX * WMI_HOST_MAX_NUM_CHAINS];
6278 uint32_t freqnum[WMI_HOST_RXG_CAL_CHAN_MAX];
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05306279 uint32_t pdev_id;
Govind Singh89727882016-04-15 13:58:27 +05306280} wmi_host_pdev_nfcal_power_all_channels_event;
6281
6282/**
Om Prakash Tripathi4331e422017-09-06 15:22:04 +05306283 * enum wmi_host_pdev_tpc_event_offset: offsets of TPC events
6284 * @WMI_HOST_TX_POWER_MAX: offset of max tx power
6285 * @WMI_HOST_TX_POWER_MIN: offset of min tx power
6286 * @WMI_HOST_TX_POWER_LEN: size of tpc values
6287 */
6288enum wmi_host_pdev_tpc_event_offset {
6289 WMI_HOST_TX_POWER_MAX,
6290 WMI_HOST_TX_POWER_MIN,
6291 WMI_HOST_TX_POWER_LEN,
6292};
6293
6294/**
Govind Singh89727882016-04-15 13:58:27 +05306295 * struct wmi_host_pdev_tpc_event - WMI host pdev TPC event
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05306296 * @pdev_id: pdev_id
Govind Singh89727882016-04-15 13:58:27 +05306297 * @tpc:
6298 */
6299typedef struct {
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05306300 uint32_t pdev_id;
Om Prakash Tripathi4331e422017-09-06 15:22:04 +05306301 int32_t tpc[WMI_HOST_TX_POWER_LEN];
Govind Singh89727882016-04-15 13:58:27 +05306302} wmi_host_pdev_tpc_event;
6303
6304/**
6305 * struct wmi_host_pdev_generic_buffer_event
6306 * @buf_type: Buffer type
6307 * @frag_id: Frag id
6308 * @more_frag: more frags pending
6309 * @buf_len: buffer length
6310 * @buf_info: variable length buffer
6311 */
6312typedef struct {
6313 uint32_t buf_type;
6314 uint32_t frag_id;
6315 uint32_t more_frag;
6316 uint32_t buf_len;
6317 uint32_t buf_info[1];
6318} wmi_host_pdev_generic_buffer_event;
6319/**
6320 * Enum for host buffer event
6321 */
6322enum {
6323 WMI_HOST_BUFFER_TYPE_RATEPWR_TABLE,
6324 WMI_HOST_BUFFER_TYPE_CTL_TABLE,
6325};
6326
6327/**
6328 * struct wmi_host_pdev_tpc_config_event - host pdev tpc config event
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05306329 * @pdev_id: pdev_id
Govind Singh89727882016-04-15 13:58:27 +05306330 * @regDomain:
6331 * @chanFreq:
6332 * @phyMode:
6333 * @twiceAntennaReduction:
6334 * @twiceMaxRDPower:
6335 * @twiceAntennaGain:
6336 * @powerLimit:
6337 * @rateMax:
6338 * @numTxChain:
6339 * @ctl:
6340 * @flags:
6341 * @maxRegAllowedPower:
6342 * @maxRegAllowedPowerAGCDD:
6343 * @maxRegAllowedPowerAGSTBC:
6344 * @maxRegAllowedPowerAGTXBF:
6345 * @ratesArray:
6346 */
6347typedef struct {
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05306348 uint32_t pdev_id;
Govind Singh89727882016-04-15 13:58:27 +05306349 uint32_t regDomain;
6350 uint32_t chanFreq;
6351 uint32_t phyMode;
6352 uint32_t twiceAntennaReduction;
6353 uint32_t twiceMaxRDPower;
6354 int32_t twiceAntennaGain;
6355 uint32_t powerLimit;
6356 uint32_t rateMax;
6357 uint32_t numTxChain;
6358 uint32_t ctl;
6359 uint32_t flags;
6360 int8_t maxRegAllowedPower[WMI_HOST_TPC_TX_NUM_CHAIN];
6361 int8_t maxRegAllowedPowerAGCDD[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN];
6362 int8_t maxRegAllowedPowerAGSTBC[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN];
6363 int8_t maxRegAllowedPowerAGTXBF[WMI_HOST_TPC_TX_NUM_CHAIN][WMI_HOST_TPC_TX_NUM_CHAIN];
6364 uint8_t ratesArray[WMI_HOST_TPC_RATE_MAX];
6365} wmi_host_pdev_tpc_config_event;
6366/**
6367 * Enums for TPC event
6368 */
6369typedef enum {
6370 WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
6371 WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
6372 WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
6373} WMI_HOST_TPC_CONFIG_EVENT_FLAG;
6374
6375/**
6376 * Medium Utilization evaluation algorithms
6377 * These algorithms can be complementary rather than exclusive.
6378 */
6379typedef enum {
6380 WMI_HOST_MU_BASIC_ALGO = 0x1,
6381 WMI_HOST_MU_PER_BSSID_ALGO = 0x2,
6382 WMI_HOST_MU_HIDDEN_NODE_ALGO = 0x4,
6383} WMI_HOST_MU_ALGO_TYPE;
6384/* max MU alg combinations supported by target */
6385#define WMI_HOST_MU_MAX_ALGO_TYPE 3
6386
6387/**
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05306388 * struct wmi_host_mu_db_entry
6389 * @event_type: 0=AP, 1=STA, 2=Small Cell(SC)
6390 * @bssid_mac_addr: Transmitter MAC if entry is WiFi node. PLMNID if SC
6391 * @tx_addr: Transmitter MAC if entry is WiFi node. PLMNID if SC
6392 * @avg_duration_us: Avg. duration for which node was transmitting
6393 * @avg_rssi: Avg. RSSI of all TX packets by node. Unit dBm
6394 * @mu_percent: % medium utilization by node
6395 */
6396typedef struct {
6397 uint32_t entry_type;
6398 wmi_host_mac_addr bssid_mac_addr;
6399 wmi_host_mac_addr tx_addr;
6400 uint32_t avg_duration_us;
6401 uint32_t avg_rssi;
6402 uint32_t mu_percent;
6403} wmi_host_mu_db_entry;
6404
6405/**
Govind Singh89727882016-04-15 13:58:27 +05306406 * struct wmi_host_mu_report_event - WMI_MU_REPORT_EVENTID
6407 * @mu_request_id: request id
6408 * @status_reason: MU_STATUS_REASON
6409 * @total_mu: MU_ALG_TYPE combinations
6410 * @num_active_bssid: number of active bssid
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05306411 * @hidden_node_mu : hidden node algo MU per bin
6412 * @num_TA_entries : No. of entries found in MU db report
Govind Singh89727882016-04-15 13:58:27 +05306413 */
6414typedef struct {
6415 uint32_t mu_request_id;
6416 uint32_t status_reason;
6417 uint32_t total_mu[WMI_HOST_MU_MAX_ALGO_TYPE];
6418 uint32_t num_active_bssid;
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05306419 uint32_t hidden_node_mu[LTEU_MAX_BINS];
6420 uint32_t num_TA_entries;
Govind Singh89727882016-04-15 13:58:27 +05306421} wmi_host_mu_report_event;
6422
6423/**
6424 * struct wmi_host_mgmt_tx_compl_event - TX completion event
6425 * @desc_id: from tx_send_cmd
6426 * @status: WMI_MGMT_TX_COMP_STATUS_TYPE
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05306427 * @pdev_id: pdev_id
Govind Singh89727882016-04-15 13:58:27 +05306428 */
6429typedef struct {
6430 uint32_t desc_id;
6431 uint32_t status;
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05306432 uint32_t pdev_id;
Govind Singh89727882016-04-15 13:58:27 +05306433} wmi_host_mgmt_tx_compl_event;
6434
Kiran Venkatappa25c47022017-03-19 22:58:09 +05306435/**
6436 * struct wmi_host_offchan_data_tx_compl_event - TX completion event
6437 * @desc_id: from tx_send_cmd
6438 * @status: VWMI_MGMT_TX_COMP_STATUS_TYPE
6439 * @pdev_id: pdev_id
6440 */
6441struct wmi_host_offchan_data_tx_compl_event {
6442 uint32_t desc_id;
6443 uint32_t status;
6444 uint32_t pdev_id;
6445};
6446
Govind Singh89727882016-04-15 13:58:27 +05306447#define WMI_HOST_TIM_BITMAP_ARRAY_SIZE 17
6448
6449/**
6450 * struct wmi_host_tim_info - TIM info in SWBA event
6451 * @tim_len: TIM length
6452 * @tim_mcast:
6453 * @tim_bitmap: TIM bitmap
6454 * @tim_changed: TIM changed
6455 * @tim_num_ps_pending: TIM num PS sta pending
Sathish Kumar744fbf72017-05-17 18:05:15 +05306456 * @vdev_id: Vdev id
Govind Singh89727882016-04-15 13:58:27 +05306457 */
6458typedef struct {
6459 uint32_t tim_len;
6460 uint32_t tim_mcast;
6461 uint32_t tim_bitmap[WMI_HOST_TIM_BITMAP_ARRAY_SIZE];
6462 uint32_t tim_changed;
6463 uint32_t tim_num_ps_pending;
Sathish Kumar744fbf72017-05-17 18:05:15 +05306464 uint32_t vdev_id;
Govind Singh89727882016-04-15 13:58:27 +05306465} wmi_host_tim_info;
6466
6467/**
6468 * struct wmi_host_p2p_noa_descriptor - NoA desc in SWBA event
6469 * @type_count: Absence count
6470 * @duration: NoA duration
6471 * @interval: NoA interval
6472 * @start_time: start time
6473 */
6474typedef struct {
6475 uint32_t type_count;
6476 uint32_t duration;
6477 uint32_t interval;
6478 uint32_t start_time;
6479} wmi_host_p2p_noa_descriptor;
6480/* Maximum number of NOA Descriptors supported */
6481#define WMI_HOST_P2P_MAX_NOA_DESCRIPTORS 4
6482/**
6483 * struct wmi_host_p2p_noa_info - p2p noa information
6484 * @modified: NoA modified
6485 * @index: Index
6486 * @oppPS: Oppurtunstic ps
6487 * @ctwindow: CT window
6488 * @num_descriptors: number of descriptors
6489 * @noa_descriptors: noa descriptors
Sathish Kumar744fbf72017-05-17 18:05:15 +05306490 * @vdev_id: Vdev id
Govind Singh89727882016-04-15 13:58:27 +05306491 */
6492typedef struct {
6493 uint8_t modified;
6494 uint8_t index;
6495 uint8_t oppPS;
6496 uint8_t ctwindow;
6497 uint8_t num_descriptors;
6498 wmi_host_p2p_noa_descriptor
6499 noa_descriptors[WMI_HOST_P2P_MAX_NOA_DESCRIPTORS];
Sathish Kumar744fbf72017-05-17 18:05:15 +05306500 uint32_t vdev_id;
Govind Singh89727882016-04-15 13:58:27 +05306501} wmi_host_p2p_noa_info;
6502
6503/**
6504 * struct wmi_host_peer_sta_kickout_event
6505 * @peer_macaddr: peer mac address
6506 * @reason: kickout reason
6507 * @rssi: rssi
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05306508 * @pdev_id: pdev_id
Govind Singh89727882016-04-15 13:58:27 +05306509 */
6510typedef struct {
6511 uint8_t peer_macaddr[IEEE80211_ADDR_LEN];
6512 uint32_t reason;
6513 uint32_t rssi;
6514} wmi_host_peer_sta_kickout_event;
6515
6516/**
6517 * struct wmi_host_peer_sta_ps_statechange_event - ST ps state change event
6518 * @peer_macaddr: peer mac address
6519 * @peer_ps_stats: peer PS state
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05306520 * @pdev_id: pdev_id
Govind Singh89727882016-04-15 13:58:27 +05306521 */
6522typedef struct {
6523 uint8_t peer_macaddr[IEEE80211_ADDR_LEN];
6524 uint32_t peer_ps_state;
6525} wmi_host_peer_sta_ps_statechange_event;
6526
6527/* Maximum CCK, OFDM rates supported */
6528#define WMI_SA_MAX_CCK_OFDM_RATES 12
6529/* Maximum MCS rates supported; 4 rates in each dword */
6530#define WMI_SA_MAX_MCS_RATES 40
6531#define WMI_SA_MAX_RATE_COUNTERS 4
6532/* Maximum rate series used for transmission */
6533#define SA_MAX_RATE_SERIES 2
6534
6535#define SA_MAX_LEGACY_RATE_DWORDS 3
6536#define SA_MAX_HT_RATE_DWORDS 10
6537#define SA_BYTES_IN_DWORD 4
6538#define SA_MASK_BYTE 0xff
6539/* TODO: ratecode_160 needs to add for future chips */
6540/**
6541 * struct wmi_sa_rate_cap - smart antenna rat capabilities
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05306542 * @pdev_id: pdev_id
Govind Singh89727882016-04-15 13:58:27 +05306543 * @ratecode_legacy: Rate code array for CCK OFDM
6544 * @ratecode_20: Rate code array for 20MHz BW
6545 * @ratecode_40: Rate code array for 40MHz BW
6546 * @ratecode_80: Rate code array for 80MHz BW
6547 * @ratecount: Max Rate count for each mode
6548 */
6549typedef struct {
6550 uint8_t ratecode_legacy[WMI_SA_MAX_CCK_OFDM_RATES];
6551 uint8_t ratecode_20[WMI_SA_MAX_MCS_RATES];
6552 uint8_t ratecode_40[WMI_SA_MAX_MCS_RATES];
6553 uint8_t ratecode_80[WMI_SA_MAX_MCS_RATES];
6554 uint8_t ratecount[WMI_SA_MAX_RATE_COUNTERS];
6555} wmi_sa_rate_cap;
6556
6557/** Preamble types to be used with VDEV fixed rate configuration */
6558typedef enum {
6559 WMI_HOST_RATE_PREAMBLE_OFDM,
6560 WMI_HOST_RATE_PREAMBLE_CCK,
6561 WMI_HOST_RATE_PREAMBLE_HT,
6562 WMI_HOST_RATE_PREAMBLE_VHT,
Kris Muthusamye66c6bf2017-02-20 20:21:04 -08006563 WMI_HOST_RATE_PREAMBLE_HE,
Govind Singh89727882016-04-15 13:58:27 +05306564} WMI_HOST_RATE_PREAMBLE;
6565
6566#define WMI_HOST_FIXED_RATE_NONE (0xff)
6567
6568/** slot time long */
6569#define WMI_HOST_VDEV_SLOT_TIME_LONG 0x1
6570/** slot time short */
6571#define WMI_HOST_VDEV_SLOT_TIME_SHORT 0x2
6572/** preablbe long */
6573#define WMI_HOST_VDEV_PREAMBLE_LONG 0x1
6574/** preablbe short */
6575#define WMI_HOST_VDEV_PREAMBLE_SHORT 0x2
6576/** found a better AP */
6577#define WMI_HOST_ROAM_REASON_BETTER_AP 0x1
6578/** beacon miss detected */
6579#define WMI_HOST_ROAM_REASON_BMISS 0x2
6580/** deauth/disassoc received */
6581#define WMI_HOST_ROAM_REASON_DEAUTH 0x2
6582/** connected AP's low rssi condition detected */
6583#define WMI_HOST_ROAM_REASON_LOW_RSSI 0x3
6584/** found another AP that matches SSID and Security profile in
6585 * WMI_ROAM_AP_PROFILE, found during scan triggered upon FINAL_BMISS
6586 */
6587#define WMI_HOST_ROAM_REASON_SUITABLE_AP 0x4
6588/** LFR3.0 roaming failed, indicate the disconnection to host */
6589#define WMI_HOST_ROAM_REASON_HO_FAILED 0x5
6590
6591/** values for vdev_type */
6592#define WMI_HOST_VDEV_TYPE_AP 0x1
6593#define WMI_HOST_VDEV_TYPE_STA 0x2
6594#define WMI_HOST_VDEV_TYPE_IBSS 0x3
6595#define WMI_HOST_VDEV_TYPE_MONITOR 0x4
6596
6597/** values for vdev_subtype */
6598#define WMI_HOST_VDEV_SUBTYPE_P2P_DEVICE 0x1
6599#define WMI_HOST_VDEV_SUBTYPE_P2P_CLIENT 0x2
6600#define WMI_HOST_VDEV_SUBTYPE_P2P_GO 0x3
6601#define WMI_HOST_VDEV_SUBTYPE_PROXY_STA 0x4
6602#define WMI_HOST_VDEV_SUBTYPE_MESH 0x5
6603
6604#define WMI_HOST_MGMT_TID 17
6605/* Disable aging & learning */
6606#define WMI_HOST_WDS_FLAG_STATIC 0x1
6607
6608/**
6609 * Peer param enum abstracted from target
6610 */
6611typedef enum {
6612 /** mimo powersave state */
6613 WMI_HOST_PEER_MIMO_PS_STATE = 0x1,
6614 /** enable/disable AMPDU . initial value (enabled) */
6615 WMI_HOST_PEER_AMPDU = 0x2,
6616 /** authorize/unauthorize peer. initial value is unauthorized (0) */
6617 WMI_HOST_PEER_AUTHORIZE = 0x3,
6618 /** peer channel bandwidth */
6619 WMI_HOST_PEER_CHWIDTH = 0x4,
6620 /** peer NSS */
6621 WMI_HOST_PEER_NSS = 0x5,
6622 /** USE 4 ADDR */
6623 WMI_HOST_PEER_USE_4ADDR = 0x6,
6624 /** Enable extended peer stats */
6625 WMI_HOST_PEER_EXT_STATS_ENABLE = 0x7,
6626 /*Use FIXED Pwr */
6627 WMI_HOST_PEER_USE_FIXED_PWR = 0x8,
6628 /* Set peer fixed rate */
6629 WMI_HOST_PEER_PARAM_FIXED_RATE = 0x9,
6630 /* Whitelist peer TIDs */
6631 WMI_HOST_PEER_SET_MU_WHITELIST = 0xa,
6632 /* set group membership status */
6633 WMI_HOST_PEER_MEMBERSHIP = 0xb,
6634 WMI_HOST_PEER_USERPOS = 0xc,
Kiran Venkatappa9da7e042016-08-09 22:52:35 +05306635 WMI_HOST_PEER_CRIT_PROTO_HINT_ENABLED = 0xd,
6636 WMI_HOST_PEER_TX_FAIL_CNT_THR = 0xe,
6637 WMI_HOST_PEER_SET_HW_RETRY_CTS2S = 0xf,
6638 WMI_HOST_PEER_IBSS_ATIM_WINDOW_LENGTH = 0x10,
6639 WMI_HOST_PEER_PHYMODE = 0x11,
6640 WMI_HOST_PEER_SET_MAC_TX_RATE = 0x12,
6641 /* Set default Rx routing */
6642 WMI_HOST_PEER_SET_DEFAULT_ROUTING = 0x13,
6643 WMI_HOST_PEER_SET_MIN_TX_RATE = 0x14,
Soumya Bhatd2759c62017-08-29 18:49:13 +05306644 /* peer NSS for 160Mhx */
6645 WMI_HOST_PEER_NSS_VHT160 = 0x15,
6646 /* peer NSS for 160Mhx */
6647 WMI_HOST_PEER_NSS_VHT80_80 = 0x16,
Venkateswara Swamy Bandarud037ca72018-01-09 15:52:37 +05306648 /* Set SU sounding interval */
6649 WMI_HOST_PEER_PARAM_SU_TXBF_SOUNDING_INTERVAL = 0x17,
6650 /* Set MU sounding interval */
6651 WMI_HOST_PEER_PARAM_MU_TXBF_SOUNDING_INTERVAL = 0x18,
6652 /* Enable sounding interval set */
6653 WMI_HOST_PEER_PARAM_TXBF_SOUNDING_ENABLE = 0x19,
Venkateswara Swamy Bandaru36dfb3f2018-01-09 15:56:56 +05306654 /* Enable MU support */
6655 WMI_HOST_PEER_PARAM_MU_ENABLE = 0x1a,
6656 /* Enable OFDMA support */
6657 WMI_HOST_PEER_PARAM_OFDMA_ENABLE = 0x1b,
Govind Singh89727882016-04-15 13:58:27 +05306658} PEER_PARAM_ENUM;
6659#define WMI_HOST_PEER_MIMO_PS_NONE 0x0
6660#define WMI_HOST_PEER_MIMO_PS_STATIC 0x1
6661#define WMI_HOST_PEER_MIMO_PS_DYNAMIC 0x2
6662typedef enum {
6663 HOST_PLATFORM_HIGH_PERF,
6664 HOST_PLATFORM_LOW_PERF,
Sathish Kumar41eca492016-09-16 16:55:35 +05306665 HOST_PLATFORM_LOW_PERF_NO_FETCH,
Govind Singh89727882016-04-15 13:58:27 +05306666} HOST_PLATFORM_TYPE;
6667
6668enum wmi_host_sta_ps_mode {
6669 /** enable power save for the given STA VDEV */
6670 WMI_HOST_STA_PS_MODE_DISABLED = 0,
6671 /** disable power save for a given STA VDEV */
6672 WMI_HOST_STA_PS_MODE_ENABLED = 1,
6673};
6674enum wmi_host_sta_powersave_param {
6675 /**
6676 * Controls how frames are retrievd from AP while STA is sleeping
6677 *
6678 * (see enum wmi_sta_ps_param_rx_wake_policy)
6679 */
6680 WMI_HOST_STA_PS_PARAM_RX_WAKE_POLICY = 0,
6681
6682 /**
6683 * The STA will go active after this many TX
6684 *
6685 * (see enum wmi_sta_ps_param_tx_wake_threshold)
6686 */
6687 WMI_HOST_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
6688
6689 /**
6690 * Number of PS-Poll to send before STA wakes up
6691 *
6692 * (see enum wmi_sta_ps_param_pspoll_count)
6693 *
6694 */
6695 WMI_HOST_STA_PS_PARAM_PSPOLL_COUNT = 2,
6696
6697 /**
6698 * TX/RX inactivity time in msec before going to sleep.
6699 *
6700 * The power save SM will monitor tx/rx activity on the VDEV, if no
6701 * activity for the specified msec of the parameter
6702 * the Power save SM will go to sleep.
6703 */
6704 WMI_HOST_STA_PS_PARAM_INACTIVITY_TIME = 3,
6705
6706 /**
6707 * Set uapsd configuration.
6708 *
6709 * (see enum wmi_sta_ps_param_uapsd)
6710 */
6711 WMI_HOST_STA_PS_PARAM_UAPSD = 4,
6712};
6713/* prefix used by scan requestor ids on the host
6714 * replicated here form wmi_unified.h*/
6715#define WMI_HOST_P_SCAN_REQUESTOR_ID_PREFIX 0xA000
6716/* prefix used by scan request ids generated on the host */
6717/* host cycles through the lower 12 bits to generate ids */
6718#define WMI_HOST_P_SCAN_REQ_ID_PREFIX 0xA000
6719
6720#define WMI_HOST_RC_DS_FLAG 0x01 /* Dual stream flag */
6721#define WMI_HOST_RC_CW40_FLAG 0x02 /* CW 40 */
6722#define WMI_HOST_RC_SGI_FLAG 0x04 /* Short Guard Interval */
6723#define WMI_HOST_RC_HT_FLAG 0x08 /* HT */
6724#define WMI_HOST_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
6725#define WMI_HOST_RC_TX_STBC_FLAG 0x20 /* TX STBC */
6726#define WMI_HOST_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
6727#define WMI_HOST_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
6728#define WMI_HOST_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
6729#define WMI_HOST_RC_TS_FLAG 0x200 /* Three stream flag */
6730#define WMI_HOST_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */
6731
6732/** HT Capabilities*/
6733#define WMI_HOST_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
6734/* Short Guard Interval with HT20 */
6735#define WMI_HOST_HT_CAP_HT20_SGI 0x0002
6736#define WMI_HOST_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
6737#define WMI_HOST_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
6738#define WMI_HOST_HT_CAP_TX_STBC_MASK_SHIFT 3
6739#define WMI_HOST_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
6740#define WMI_HOST_HT_CAP_RX_STBC_MASK_SHIFT 4
6741#define WMI_HOST_HT_CAP_LDPC 0x0040 /* LDPC supported */
6742#define WMI_HOST_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
6743#define WMI_HOST_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
6744#define WMI_HOST_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
6745#define WMI_HOST_HT_CAP_HT40_SGI 0x0800
Nandha Kishore Easwaran903b5542017-06-15 10:29:29 +05306746#define WMI_HOST_HT_CAP_RX_LDPC 0x1000
6747#define WMI_HOST_HT_CAP_TX_LDPC 0x2000
6748#define WMI_HOST_HT_CAP_IBF_BFER 0x4000
Govind Singh89727882016-04-15 13:58:27 +05306749
6750/* These macros should be used when we wish to advertise STBC support for
6751 * only 1SS or 2SS or 3SS. */
6752#define WMI_HOST_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */
6753#define WMI_HOST_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */
6754#define WMI_HOST_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */
6755
6756
6757#define WMI_HOST_HT_CAP_DEFAULT_ALL (WMI_HOST_HT_CAP_ENABLED | \
6758 WMI_HOST_HT_CAP_HT20_SGI | \
6759 WMI_HOST_HT_CAP_HT40_SGI | \
6760 WMI_HOST_HT_CAP_TX_STBC | \
6761 WMI_HOST_HT_CAP_RX_STBC | \
6762 WMI_HOST_HT_CAP_LDPC)
6763
6764/* WMI_HOST_VHT_CAP_* these maps to ieee 802.11ac vht capability information
6765 field. The fields not defined here are not supported, or reserved.
6766 Do not change these masks and if you have to add new one follow the
6767 bitmask as specified by 802.11ac draft.
6768*/
6769
6770#define WMI_HOST_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
6771#define WMI_HOST_VHT_CAP_RX_LDPC 0x00000010
6772#define WMI_HOST_VHT_CAP_SGI_80MHZ 0x00000020
6773#define WMI_HOST_VHT_CAP_SGI_160MHZ 0x00000040
6774#define WMI_HOST_VHT_CAP_TX_STBC 0x00000080
6775#define WMI_HOST_VHT_CAP_RX_STBC_MASK 0x00000300
6776#define WMI_HOST_VHT_CAP_RX_STBC_MASK_SHIFT 8
6777#define WMI_HOST_VHT_CAP_SU_BFER 0x00000800
6778#define WMI_HOST_VHT_CAP_SU_BFEE 0x00001000
6779#define WMI_HOST_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000
6780#define WMI_HOST_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13
6781#define WMI_HOST_VHT_CAP_MAX_SND_DIM_MASK 0x00070000
6782#define WMI_HOST_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16
6783#define WMI_HOST_VHT_CAP_MU_BFER 0x00080000
6784#define WMI_HOST_VHT_CAP_MU_BFEE 0x00100000
6785#define WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
6786#define WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT 23
6787#define WMI_HOST_VHT_CAP_RX_FIXED_ANT 0x10000000
6788#define WMI_HOST_VHT_CAP_TX_FIXED_ANT 0x20000000
6789
6790#define WMI_HOST_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
6791
6792/* These macros should be used when we wish to advertise STBC support for
6793 * only 1SS or 2SS or 3SS. */
6794#define WMI_HOST_VHT_CAP_RX_STBC_1SS 0x00000100
6795#define WMI_HOST_VHT_CAP_RX_STBC_2SS 0x00000200
6796#define WMI_HOST_VHT_CAP_RX_STBC_3SS 0x00000300
6797
6798#define WMI_HOST_VHT_CAP_DEFAULT_ALL (WMI_HOST_VHT_CAP_MAX_MPDU_LEN_11454 | \
6799 WMI_HOST_VHT_CAP_SGI_80MHZ | \
6800 WMI_HOST_VHT_CAP_TX_STBC | \
6801 WMI_HOST_VHT_CAP_RX_STBC_MASK | \
6802 WMI_HOST_VHT_CAP_RX_LDPC | \
6803 WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP | \
6804 WMI_HOST_VHT_CAP_RX_FIXED_ANT | \
6805 WMI_HOST_VHT_CAP_TX_FIXED_ANT)
6806
6807/* Interested readers refer to Rx/Tx MCS Map definition as defined in
6808 802.11ac
6809*/
6810#define WMI_HOST_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
6811#define WMI_HOST_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
6812#define WMI_HOST_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
6813
6814/** U-APSD configuration of peer station from (re)assoc request and TSPECs */
6815enum wmi_host_ap_ps_param_uapsd {
6816 WMI_HOST_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
6817 WMI_HOST_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
6818 WMI_HOST_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
6819 WMI_HOST_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
6820 WMI_HOST_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
6821 WMI_HOST_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
6822 WMI_HOST_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
6823 WMI_HOST_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
6824};
6825/** U-APSD maximum service period of peer station */
6826enum wmi_host_ap_ps_peer_param_max_sp {
6827 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
6828 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
6829 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
6830 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
6831
6832 /* keep last! */
6833 MAX_HOST_WMI_AP_PS_PEER_PARAM_MAX_SP,
6834};
6835
6836#define WMI_HOST_UAPSD_AC_TYPE_DELI 0
6837#define WMI_HOST_UAPSD_AC_TYPE_TRIG 1
6838
6839#define WMI_HOST_UAPSD_AC_BIT_MASK(ac, type) \
6840 ((type == WMI_HOST_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) :\
6841 (1<<((ac<<1)+1)))
6842
6843enum wmi_host_ap_ps_peer_param_wnm_sleep {
6844 WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP_ENABLE,
6845 WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP_DISABLE,
6846};
6847
6848enum wmi_host_ap_ps_peer_param {
6849 /** Set uapsd configuration for a given peer.
6850 *
6851 * This will include the delivery and trigger enabled state for every AC.
6852 * The host MLME needs to set this based on AP capability and stations
6853 * request Set in the association request received from the station.
6854 *
6855 * Lower 8 bits of the value specify the UAPSD configuration.
6856 *
6857 * (see enum wmi_ap_ps_param_uapsd)
6858 * The default value is 0.
6859 */
6860 WMI_HOST_AP_PS_PEER_PARAM_UAPSD = 0,
6861
6862 /**
6863 * Set the service period for a UAPSD capable station
6864 *
6865 * The service period from wme ie in the (re)assoc request frame.
6866 *
6867 * (see enum wmi_ap_ps_peer_param_max_sp)
6868 */
6869 WMI_HOST_AP_PS_PEER_PARAM_MAX_SP = 1,
6870
6871 /** Time in seconds for aging out buffered frames
6872 * for STA in power save */
6873 WMI_HOST_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
6874
6875 /** Specify frame types that are considered SIFS
6876 * RESP trigger frame */
6877 WMI_HOST_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
6878
6879 /** Specifies the trigger state of TID.
6880 * Valid only for UAPSD frame type */
6881 WMI_HOST_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
6882
6883 /** Specifies the WNM sleep state of a STA */
6884 WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
6885};
6886#define WMI_HOST_RXERR_CRC 0x01 /* CRC error on frame */
6887#define WMI_HOST_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
6888#define WMI_HOST_RXERR_MIC 0x10 /* Michael MIC decrypt error */
6889#define WMI_HOST_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
6890
6891enum wmi_host_sta_ps_param_uapsd {
6892 WMI_HOST_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
6893 WMI_HOST_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
6894 WMI_HOST_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
6895 WMI_HOST_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
6896 WMI_HOST_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
6897 WMI_HOST_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
6898 WMI_HOST_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
6899 WMI_HOST_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
6900};
6901
6902enum wmi_host_sta_ps_param_rx_wake_policy {
6903 /* Wake up when ever there is an RX activity on the VDEV. In this mode
6904 * the Power save SM(state machine) will come out of sleep by either
6905 * sending null frame (or) a data frame (with PS==0) in response to TIM
6906 * bit set in the received beacon frame from AP.
6907 */
6908 WMI_HOST_STA_PS_RX_WAKE_POLICY_WAKE = 0,
6909
6910 /* Here the power save state machine will not wakeup in response to TIM
6911 * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
6912 * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
6913 * access categories are delivery-enabled, the station will send a UAPSD
6914 * trigger frame, otherwise it will send a PS-Poll.
6915 */
6916 WMI_HOST_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
6917};
6918enum wmi_host_sta_ps_param_pspoll_count {
6919 WMI_HOST_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
6920 /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
6921 * will send before waking up.
6922 */
6923};
6924/** Number of tx frames/beacon that cause the power save SM to wake up.
6925 *
6926 * Value 1 causes the SM to wake up for every TX. Value 0 has a special
6927 * meaning, It will cause the SM to never wake up. This is useful if you want
6928 * to keep the system to sleep all the time for some kind of test mode . host
6929 * can change this parameter any time. It will affect at the next tx frame.
6930 */
6931enum wmi_host_sta_ps_param_tx_wake_threshold {
6932 WMI_HOST_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
6933 WMI_HOST_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
6934
6935 /* Values greater than one indicate that many TX attempts per beacon
6936 * interval before the STA will wake up
6937 */
6938};
6939/*
6940 * Transmit power scale factor.
6941 *
6942 */
6943typedef enum {
6944 WMI_HOST_TP_SCALE_MAX = 0, /* no scaling (default) */
6945 WMI_HOST_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
6946 WMI_HOST_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
6947 WMI_HOST_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
6948 WMI_HOST_TP_SCALE_MIN = 4, /* min, but still on */
6949 WMI_HOST_TP_SCALE_SIZE = 5, /* max num of enum */
6950} WMI_HOST_TP_SCALE;
6951enum {
6952 WMI_HOST_RATEPWR_TABLE_OPS_SET,
6953 WMI_HOST_RATEPWR_TABLE_OPS_GET,
6954};
6955/* reserved up through 0xF */
6956/**
6957 * struct wmi_host_dcs_mib_stats - WLAN IM stats from target to host
6958 * Below statistics are sent from target to host periodically.
6959 * These are collected at target as long as target is running
6960 * and target chip is not in sleep.
6961 * @listen_time:
6962 * @reg_tx_frame_cnt:
6963 * @reg_rx_frame_cnt:
6964 * @reg_rxclr_cnt:
6965 * @reg_cycle_cnt: delta cycle count
6966 * @reg_rxclr_ext_cnt:
6967 * @reg_ofdm_phyerr_cnt:
6968 * @reg_cck_phyerr_cnt: CCK err count since last reset, read from register
6969 */
6970typedef struct _hp_dcs_mib_stats {
6971 int32_t listen_time;
6972 uint32_t reg_tx_frame_cnt;
6973 uint32_t reg_rx_frame_cnt;
6974 uint32_t reg_rxclr_cnt;
6975 uint32_t reg_cycle_cnt;
6976 uint32_t reg_rxclr_ext_cnt;
6977 uint32_t reg_ofdm_phyerr_cnt;
6978 uint32_t reg_cck_phyerr_cnt;
6979} wmi_host_dcs_mib_stats_t;
6980
6981/**
6982 * struct wmi_host_dcs_im_tgt_stats - DCS IM target stats
6983 * @reg_tsf32: current running TSF from the TSF-1
6984 * @last_ack_rssi: Known last frame rssi, in case of multiple stations, if
6985 * and at different ranges, this would not gaurantee that
6986 * this is the least rssi.
6987 * @tx_waste_time: Sum of all the failed durations in the last
6988 * one second interval.
6989 * @rx_time: count how many times the hal_rxerr_phy is marked, in this
6990 * time period
6991 * @phyerr_cnt:
6992 * @mib_stats: wmi_host_dcs_mib_stats_t - collected mib stats as explained
6993 * in mib structure
Sathish Kumarba2b5da2016-11-08 14:58:29 +05306994 * @chan_nf: Channel noise floor (Units are in dBm)
6995 * @my_bss_rx_cycle_count: BSS rx cycle count
Govind Singh89727882016-04-15 13:58:27 +05306996 */
6997typedef struct _wmi_host_dcs_im_tgt_stats {
6998 uint32_t reg_tsf32;
6999 uint32_t last_ack_rssi;
7000 uint32_t tx_waste_time;
7001 uint32_t rx_time;
7002 uint32_t phyerr_cnt;
7003 wmi_host_dcs_mib_stats_t mib_stats;
Sathish Kumarba2b5da2016-11-08 14:58:29 +05307004 uint32_t chan_nf;
7005 uint32_t my_bss_rx_cycle_count;
Govind Singh89727882016-04-15 13:58:27 +05307006} wmi_host_dcs_im_tgt_stats_t;
7007
7008/**
7009 * Enum for pktlog req
7010 */
7011typedef enum {
7012 WMI_HOST_PKTLOG_EVENT_RX = 0x1,
7013 WMI_HOST_PKTLOG_EVENT_TX = 0x2,
7014 WMI_HOST_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */
7015 WMI_HOST_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */
7016 WMI_HOST_PKTLOG_EVENT_DBG_PRINT = 0x10, /* DEBUG prints */
7017 /* To support Smart Antenna */
7018 WMI_HOST_PKTLOG_EVENT_SMART_ANTENNA = 0x20,
7019 WMI_HOST_PKTLOG_EVENT_H_INFO = 0x40,
7020 WMI_HOST_PKTLOG_EVENT_STEERING = 0x80,
Sathish Kumar657402a2016-09-26 14:48:09 +05307021 /* To support Tx data Capture */
7022 WMI_HOST_PKTLOG_EVENT_TX_DATA_CAPTURE = 0x100,
Govind Singh89727882016-04-15 13:58:27 +05307023} WMI_HOST_PKTLOG_EVENT;
7024
7025/**
7026 * wmi_host_phyerr
7027 *
7028 */
7029#define WMI_HOST_PHY_ERROR_SPECTRAL_SCAN 0x26
7030#define WMI_HOST_PHY_ERROR_FALSE_RADAR_EXT 0x24
7031
7032#define WMI_HOST_AR900B_DFS_PHYERR_MASK 0x4
7033#define WMI_HOST_AR900B_SPECTRAL_PHYERR_MASK 0x4000000
7034
7035/**
7036 * struct wmi_host_perchain_rssi_info - per chain RSSI info
7037 * @rssi_pri20: RSSI on primary 20
7038 * @rssi_sec20: RSSI on secomdary 20
7039 * @rssi_sec40: RSSI secondary 40
7040 * @rssi_sec80: RSSI secondary 80
7041 */
7042typedef struct wmi_host_perchain_rssi_info {
7043 int8_t rssi_pri20;
7044 int8_t rssi_sec20;
7045 int8_t rssi_sec40;
7046 int8_t rssi_sec80;
7047} wmi_host_perchain_rssi_info_t;
7048
7049/**
7050 * struct _wmi_host_rf_info - RF measurement information
7051 * @rssi_comb: RSSI Information
7052 * @pc_rssi_info[4]: For now, we know we are getting information
7053 * for only 4 chains at max. For future extensions
7054 * use a define
7055 * @noise_floor: Noise floor information
7056 */
7057typedef struct _wmi_host_rf_info {
7058 int8_t rssi_comb;
7059 wmi_host_perchain_rssi_info_t pc_rssi_info[4];
7060 int16_t noise_floor[4];
7061} wmi_host_rf_info_t;
7062
7063/**
7064 * struct _wmi_host_chan_info
7065 * @center_freq1: center frequency 1 in MHz
7066 * @center_freq2: center frequency 2 in MHz -valid only for
7067 * 11ACVHT 80PLUS80 mode
7068 * @chan_width: channel width in MHz
7069 */
7070typedef struct _wmi_host_chan_info {
7071 u_int16_t center_freq1;
7072 u_int16_t center_freq2;
7073 u_int8_t chan_width;
7074} wmi_host_chan_info_t;
7075
7076/**
7077 * struct wmi_host_phyerr
7078 * @rf_info:
7079 * @chan_info:
7080 * @tsf64:
7081 * @phy_err_code:
7082 * @tsf_timestamp:
7083 * @bufp:
7084 * @buf_len:
7085 * @phy_err_mask0:
7086 * @phy_err_mask1:
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05307087 * @pdev_id: pdev_id
Govind Singh89727882016-04-15 13:58:27 +05307088 */
7089typedef struct _wmi_host_phyerr {
7090 wmi_host_rf_info_t rf_info;
7091 wmi_host_chan_info_t chan_info;
7092 uint64_t tsf64;
7093 int32_t phy_err_code;
7094 uint32_t tsf_timestamp;
7095 uint8_t *bufp;
7096 uint32_t buf_len;
7097 uint32_t phy_err_mask0;
7098 uint32_t phy_err_mask1;
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05307099 uint32_t pdev_id;
Govind Singh89727882016-04-15 13:58:27 +05307100} wmi_host_phyerr_t;
7101
7102/**
7103 * struct wmi_host_rtt_event_hdr
7104 * @req_id: request id
7105 * @status: status
7106 * @meas_done: measurement done flag
7107 * @meas_type: measurement type
7108 * @report_type: report type
7109 * @v3_status: v2 status
7110 * @v3_finish:
7111 * @v3_tm_start:
7112 * @num_ap: number of AP
7113 * @result: resuult
7114 * @dest_mac: destination mac
7115 */
7116typedef struct {
7117 uint16_t req_id;
7118 uint16_t status:1,
7119 meas_done:1,
7120 meas_type:3,
7121 report_type:3,
7122 v3_status:2,
7123 v3_finish:1,
7124 v3_tm_start:1,
7125 num_ap:4;
7126 uint16_t result;
7127 uint8_t dest_mac[IEEE80211_ADDR_LEN];
7128} wmi_host_rtt_event_hdr;
7129
7130/**
7131 * struct wmi_host_rtt_meas_event - RTT measurement event
7132 * @chain_mask:
7133 * @bw:
7134 * @rsvd:
7135 * @txrxchain_mask: Bit:0-3:chain mask
7136 * Bit 4-5: band width info
7137 * 00 --Legacy 20, 01 --HT/VHT20
7138 * 10 --HT/VHT40, 11 -- VHT80
7139 * @tod: resolution of 0.1ns
7140 * @toa: resolution of 0.1ns
7141 * @t3:
7142 * @t4:
7143 * @rssi0:
7144 * @rssi1:
7145 * @rssi2:
7146 * @rssi3:
7147 */
7148typedef struct {
7149 uint32_t chain_mask:3,
7150 bw:2,
7151 rsvd:27;
7152 uint32_t txrxchain_mask;
7153 uint64_t tod;
7154 uint64_t toa;
7155 uint64_t t3;
7156 uint64_t t4;
7157 uint32_t rssi0;
7158 uint32_t rssi1;
7159 uint32_t rssi2;
7160 uint32_t rssi3;
7161} wmi_host_rtt_meas_event;
7162
7163/*----RTT Report event definition ----*/
7164typedef enum {
7165 /* rtt cmd header parsing error --terminate */
7166 WMI_HOST_RTT_COMMAND_HEADER_ERROR = 0,
7167 /* rtt body parsing error -- skip current STA REQ */
7168 WMI_HOST_RTT_COMMAND_ERROR,
7169 /* rtt no resource -- terminate */
7170 WMI_HOST_RTT_MODULE_BUSY,
7171 /* STA exceed the support limit -- only server the first n STA */
7172 WMI_HOST_RTT_TOO_MANY_STA,
7173 /* any allocate failure */
7174 WMI_HOST_RTT_NO_RESOURCE,
7175 /* can not find vdev with vdev ID - skip current STA REQ */
7176 WMI_HOST_RTT_VDEV_ERROR,
7177 /* Tx failure -- continiue and measure number */
7178 WMI_HOST_RTT_TRANSIMISSION_ERROR,
7179 /* wait for first TM timer expire-terminate current STA measurement */
7180 WMI_HOST_RTT_TM_TIMER_EXPIRE,
7181 /* we do not support RTT measurement with this type of frame */
7182 WMI_HOST_RTT_FRAME_TYPE_NOSUPPORT,
7183 /* whole RTT measurement timer expire-terminate
7184 ** current STA measurement */
7185 WMI_HOST_RTT_TIMER_EXPIRE,
7186 /* channel swicth failed */
7187 WMI_HOST_RTT_CHAN_SWITCH_ERROR,
7188 /* TMR trans error, this dest peer will be skipped */
7189 WMI_HOST_RTT_TMR_TRANS_ERROR,
7190 /* V3 only. If both CFR and Token mismatch, do not report */
7191 WMI_HOST_RTT_NO_REPORT_BAD_CFR_TOKEN,
7192 /* For First TM, if CFR is bad, then do not report */
7193 WMI_HOST_RTT_NO_REPORT_FIRST_TM_BAD_CFR,
7194 /* do not allow report type2 mix with type 0, 1 */
7195 WMI_HOST_RTT_REPORT_TYPE2_MIX,
7196 /* LCI Configuration OK. - Responder only */
7197 WMI_HOST_RTT_LCI_CFG_OK,
7198 /* LCR configuration OK. - Responder only */
7199 WMI_HOST_RTT_LCR_CFG_OK,
7200 /* Bad configuration LCI (or) LCR request - Responder only */
7201 WMI_HOST_RTT_CFG_ERROR,
7202 WMI_HOST_WMI_RTT_REJECT_MAX,
7203} WMI_HOST_RTT_ERROR_INDICATOR;
7204typedef struct {
7205 wmi_host_rtt_event_hdr hdr;
7206 WMI_HOST_RTT_ERROR_INDICATOR reject_reason;
7207} wmi_host_rtt_error_report_event;
7208
7209#if defined(AR9888)
7210typedef enum {
7211 WMI_HOST_PROF_CPU_IDLE,
7212 WMI_HOST_PROF_PPDU_PROC,
7213 WMI_HOST_PROF_PPDU_POST,
7214 WMI_HOST_PROF_HTT_TX_INPUT,
7215 WMI_HOST_PROF_MSDU_ENQ,
7216 WMI_HOST_PROF_PPDU_POST_HAL,
7217 WMI_HOST_PROF_COMPUTE_TX_TIME,
7218
7219 /* Add new ID's above this. */
7220 WMI_HOST_PROF_MAX_ID,
7221} wmi_host_profile_id_t;
7222#endif
7223
7224#define WMI_HOST_WLAN_PROFILE_MAX_HIST 3
7225#define WMI_HOST_WLAN_PROFILE_MAX_BIN_CNT 32
7226
7227#if defined(AR9888)
7228#define WMI_HOST_MAX_PROFILE WMI_HOST_PROF_MAX_ID
7229#else
7230#define WMI_HOST_MAX_PROFILE WMI_HOST_WLAN_PROFILE_MAX_BIN_CNT
7231#endif
7232
7233/**
7234 * struct wmi_host_wlan_profile - Host profile param
7235 * @id: profile id
7236 * @cnt: Count
7237 * @tot:
7238 * @min: minimum
7239 * @max: Mac
7240 * @hist_intvl: history interval
7241 * @hist: profile data history
7242 */
7243typedef struct {
7244 uint32_t id;
7245 uint32_t cnt;
7246 uint32_t tot;
7247 uint32_t min;
7248 uint32_t max;
7249 uint32_t hist_intvl;
7250 uint32_t hist[WMI_HOST_WLAN_PROFILE_MAX_HIST];
7251} wmi_host_wlan_profile_t;
7252
7253/**
7254 * struct wmi_host_wlan_profile_ctx_t - profile context
7255 * @tot: time in us
7256 * @tx_msdu_cnt: MSDU TX count
7257 * @tx_mpdu_cnt: MPDU tx count
7258 * @tx_ppdu_cnt: PPDU tx count
7259 * @rx_msdu_cnt: MSDU RX count
7260 * @rx_mpdu_cnt: MPDU RXcount
7261 * @bin_count: Bin count
7262 */
7263typedef struct {
7264 uint32_t tot;
7265 uint32_t tx_msdu_cnt;
7266 uint32_t tx_mpdu_cnt;
7267 uint32_t tx_ppdu_cnt;
7268 uint32_t rx_msdu_cnt;
7269 uint32_t rx_mpdu_cnt;
7270 uint32_t bin_count;
7271} wmi_host_wlan_profile_ctx_t;
7272
7273/**
Govind Singh89727882016-04-15 13:58:27 +05307274 * struct wmi_host_chan_info_event - Channel info WMI event
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05307275 * @pdev_id: pdev_id
Govind Singh89727882016-04-15 13:58:27 +05307276 * @err_code: Error code
7277 * @freq: Channel freq
7278 * @cmd_flags: Read flags
7279 * @noise_floor: Noise Floor value
7280 * @rx_clear_count: rx clear count
7281 * @cycle_count: cycle count
7282 * @chan_tx_pwr_range: channel tx power per range
7283 * @chan_tx_pwr_tp: channel tx power per throughput
7284 * @rx_frame_count: rx frame count
7285 * @rx_11b_mode_data_duration: 11b mode data duration
Kiran Venkatappa8747f622017-08-10 17:48:37 +05307286 * @my_bss_rx_cycle_count: BSS rx cycle count
7287 * @tx_frame_cnt: tx frame count
7288 * @mac_clk_mhz: mac clock
7289 * @vdev_id: unique id identifying the VDEV
Govind Singh89727882016-04-15 13:58:27 +05307290 */
7291typedef struct {
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05307292 uint32_t pdev_id;
Govind Singh89727882016-04-15 13:58:27 +05307293 uint32_t err_code;
7294 uint32_t freq;
7295 uint32_t cmd_flags;
7296 uint32_t noise_floor;
7297 uint32_t rx_clear_count;
7298 uint32_t cycle_count;
7299 uint32_t chan_tx_pwr_range;
7300 uint32_t chan_tx_pwr_tp;
7301 uint32_t rx_frame_count;
7302 uint32_t rx_11b_mode_data_duration;
Kiran Venkatappa8747f622017-08-10 17:48:37 +05307303 uint32_t my_bss_rx_cycle_count;
7304 uint32_t tx_frame_cnt;
7305 uint32_t mac_clk_mhz;
7306 uint32_t vdev_id;
Govind Singh89727882016-04-15 13:58:27 +05307307} wmi_host_chan_info_event;
7308
7309/**
7310 * struct wmi_host_pdev_channel_hopping_event
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05307311 * @pdev_id: pdev_id
Govind Singh89727882016-04-15 13:58:27 +05307312 * @noise_floor_report_iter: Noise threshold iterations with high values
7313 * @noise_floor_total_iter: Total noise threshold iterations
7314 */
7315typedef struct {
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05307316 uint32_t pdev_id;
Govind Singh89727882016-04-15 13:58:27 +05307317 uint32_t noise_floor_report_iter;
7318 uint32_t noise_floor_total_iter;
7319} wmi_host_pdev_channel_hopping_event;
7320
7321/**
7322 * struct wmi_host_pdev_bss_chan_info_event
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05307323 * @pdev_id: pdev_id
Govind Singh89727882016-04-15 13:58:27 +05307324 * @freq: Units in MHz
7325 * @noise_floor: units are dBm
7326 * @rx_clear_count_low:
7327 * @rx_clear_count_high:
7328 * @cycle_count_low:
7329 * @cycle_count_high:
7330 * @tx_cycle_count_low:
7331 * @tx_cycle_count_high:
7332 * @rx_cycle_count_low:
7333 * @rx_cycle_count_high:
7334 * @rx_bss_cycle_count_low:
7335 * @rx_bss_cycle_count_high:
7336 * @reserved:
7337 */
7338typedef struct {
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05307339 uint32_t pdev_id;
Govind Singh89727882016-04-15 13:58:27 +05307340 uint32_t freq;
7341 uint32_t noise_floor;
7342 uint32_t rx_clear_count_low;
7343 uint32_t rx_clear_count_high;
7344 uint32_t cycle_count_low;
7345 uint32_t cycle_count_high;
7346 uint32_t tx_cycle_count_low;
7347 uint32_t tx_cycle_count_high;
7348 uint32_t rx_cycle_count_low;
7349 uint32_t rx_cycle_count_high;
7350 uint32_t rx_bss_cycle_count_low;
7351 uint32_t rx_bss_cycle_count_high;
7352 uint32_t reserved;
7353} wmi_host_pdev_bss_chan_info_event;
7354
7355#define WMI_HOST_INST_STATS_INVALID_RSSI 0
7356/**
7357 * struct wmi_host_inst_stats_resp
7358 * @iRSSI: Instantaneous RSSI
7359 * @peer_macaddr: peer mac address
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05307360 * @pdev_id: pdev_id
Govind Singh89727882016-04-15 13:58:27 +05307361 */
7362typedef struct {
7363 uint32_t iRSSI;
7364 wmi_host_mac_addr peer_macaddr;
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05307365 uint32_t pdev_id;
Govind Singh89727882016-04-15 13:58:27 +05307366} wmi_host_inst_stats_resp;
7367
7368/* Event definition and new structure addition to send event
7369 * to host to block/unblock tx data traffic based on peer_ast_idx or vdev id
7370 */
7371#define WMI_HOST_INVALID_PEER_AST_INDEX 0xffff
7372#define WMI_HOST_TX_DATA_TRAFFIC_CTRL_BLOCK 0x1
7373#define WMI_HOST_TX_DATA_TRAFFIC_CTRL_UNBLOCK 0x2
7374/**
7375 * struct wmi_host_tx_data_traffic_ctrl_event
7376 * @peer_ast_idx: For vdev based control, peer_ast_idx will be
7377 * WMI_INVALID_PEER_AST_INDEX
7378 * @vdev_id: only applies if peer_ast_idx == INVALID
7379 * @ctrl_cmd: WMI_TX_DATA_TRAFFIC_CTRL_BLOCK or
7380 * WMI_TX_DATA_TRAFFIC_CTRL_UNBLOCK
7381 */
7382typedef struct {
7383 uint32_t peer_ast_idx;
7384 uint32_t vdev_id;
7385 uint32_t ctrl_cmd;
7386} wmi_host_tx_data_traffic_ctrl_event;
7387
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05307388enum {
7389 WMI_HOST_ATF_PEER_STATS_DISABLED = 0,
7390 WMI_HOST_ATF_PEER_STATS_ENABLED = 1,
7391};
7392
7393#define WMI_HOST_ATF_PEER_STATS_GET_PEER_AST_IDX(token_info) \
7394 (token_info.field1 & 0xffff)
7395
7396#define WMI_HOST_ATF_PEER_STATS_GET_USED_TOKENS(token_info) \
7397 ((token_info.field2 & 0xffff0000) >> 16)
7398
7399#define WMI_HOST_ATF_PEER_STATS_GET_UNUSED_TOKENS(token_info) \
7400 (token_info.field2 & 0xffff)
7401
7402#define WMI_HOST_ATF_PEER_STATS_SET_PEER_AST_IDX(token_info, peer_ast_idx) \
7403 do { \
7404 token_info.field1 &= 0xffff0000; \
7405 token_info.field1 |= ((peer_ast_idx) & 0xffff); \
7406 } while (0)
7407
7408#define WMI_HOST_ATF_PEER_STATS_SET_USED_TOKENS(token_info, used_token) \
7409 do { \
7410 token_info.field2 &= 0x0000ffff; \
7411 token_info.field2 |= (((used_token) & 0xffff) << 16); \
7412 } while (0)
7413
7414#define WMI_HOST_ATF_PEER_STATS_SET_UNUSED_TOKENS(token_info, unused_token) \
7415 do { \
7416 token_info.field2 &= 0xffff0000; \
7417 token_info.field2 |= ((unused_token) & 0xffff); \
7418 } while (0)
7419
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05307420/**
7421 * struct wmi_host_atf_peer_stats_info
7422 * @field1: bits 15:0 peer_ast_index WMI_ATF_PEER_STATS_GET_PEER_AST_IDX
7423 * bits 31:16 reserved
7424 * @field2: bits 15:0 used tokens WMI_ATF_PEER_STATS_GET_USED_TOKENS
7425 * bits 31:16 unused tokens WMI_ATF_PEER_STATS_GET_UNUSED_TOKENS
7426 * @field3: for future use
7427 */
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05307428typedef struct {
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05307429 uint32_t field1;
7430 uint32_t field2;
7431 uint32_t field3;
7432} wmi_host_atf_peer_stats_info;
7433
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05307434/**
7435 * struct wmi_host_atf_peer_stats_event
7436 * @pdev_id: pdev_id
7437 * @num_atf_peers: number of peers in token_info_list
7438 * @comp_usable_airtime: computed usable airtime in tokens
7439 * @reserved[4]: reserved for future use
7440 * @wmi_host_atf_peer_stats_info token_info_list: list of num_atf_peers
7441 */
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05307442typedef struct {
Kiran Venkatappa6e7bb5e2017-02-08 14:51:13 +05307443 uint32_t pdev_id;
7444 uint32_t num_atf_peers;
7445 uint32_t comp_usable_airtime;
7446 uint32_t reserved[4];
7447 wmi_host_atf_peer_stats_info token_info_list[1];
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05307448} wmi_host_atf_peer_stats_event;
7449
Govind Singh89727882016-04-15 13:58:27 +05307450/**
7451 * struct wmi_host_ath_dcs_cw_int
7452 * @channel: either number or freq in mhz
7453 */
7454typedef struct {
7455 uint32_t channel;
7456} wmi_host_ath_dcs_cw_int;
Govind Singhc10bde82016-05-02 17:59:24 +05307457
7458#define WMI_MAX_POWER_DBG_ARGS 8
7459
7460/**
7461 * struct wmi_power_dbg_params - power debug command parameter
7462 * @pdev_id: subsystem identifier
7463 * @module_id: parameter id
7464 * @num_arg: no of arguments
7465 * @args: arguments
7466 */
7467struct wmi_power_dbg_params {
7468 uint32_t pdev_id;
7469 uint32_t module_id;
7470 uint32_t num_args;
7471 uint32_t args[WMI_MAX_POWER_DBG_ARGS];
7472};
7473
Gupta, Kapil7b768002016-04-25 19:14:19 +05307474/**
7475 * struct wmi_adaptive_dwelltime_params - the adaptive dwelltime params
7476 * @vdev_id: vdev id
7477 * @is_enabled: Adaptive dwell time is enabled/disabled
7478 * @dwelltime_mode: global default adaptive dwell mode
7479 * @lpf_weight: weight to calculate the average low pass
7480 * filter for channel congestion
7481 * @passive_mon_intval: intval to monitor wifi activity in passive scan in msec
7482 * @wifi_act_threshold: % of wifi activity used in passive scan 0-100
7483 *
7484 */
7485struct wmi_adaptive_dwelltime_params {
7486 uint32_t vdev_id;
7487 bool is_enabled;
7488 enum wmi_dwelltime_adaptive_mode dwelltime_mode;
7489 uint8_t lpf_weight;
7490 uint8_t passive_mon_intval;
7491 uint8_t wifi_act_threshold;
7492};
Govind Singhc7cd2d62016-06-21 14:33:26 +05307493
7494/**
Kapil Guptaf6eb7312017-02-24 15:50:03 +05307495 * struct wmi_per_roam_config - per based roaming parameters
7496 * @enable: if PER based roaming is enabled/disabled
7497 * @tx_high_rate_thresh: high rate threshold at which PER based
7498 * roam will stop in tx path
7499 * @rx_high_rate_thresh: high rate threshold at which PER based
7500 * roam will stop in rx path
7501 * @tx_low_rate_thresh: rate below which traffic will be considered
7502 * for PER based roaming in Tx path
7503 * @rx_low_rate_thresh: rate below which traffic will be considered
7504 * for PER based roaming in Tx path
7505 * @tx_rate_thresh_percnt: % above which when traffic is below low_rate_thresh
7506 * will be considered for PER based scan in tx path
7507 * @rx_rate_thresh_percnt: % above which when traffic is below low_rate_thresh
7508 * will be considered for PER based scan in rx path
7509 * @per_rest_time: time for which PER based roam will wait once it
7510 * issues a roam scan.
Kapil Gupta7dae4262017-02-13 15:51:52 +05307511 * @tx_per_mon_time: Minimum time required to be considered as valid scenario
7512 * for PER based roam in tx path
7513 * @rx_per_mon_time: Minimum time required to be considered as valid scenario
7514 * for PER based roam in rx path
Selvaraj, Sridharc1a80d02017-05-17 16:05:15 +05307515 * @min_candidate_rssi: Minimum RSSI threshold for candidate AP to be used for
7516 * PER based roaming
Kapil Guptaf6eb7312017-02-24 15:50:03 +05307517 */
7518struct wmi_per_roam_config {
7519 uint32_t enable;
7520 uint32_t tx_high_rate_thresh;
7521 uint32_t rx_high_rate_thresh;
7522 uint32_t tx_low_rate_thresh;
7523 uint32_t rx_low_rate_thresh;
7524 uint32_t tx_rate_thresh_percnt;
7525 uint32_t rx_rate_thresh_percnt;
7526 uint32_t per_rest_time;
Kapil Gupta7dae4262017-02-13 15:51:52 +05307527 uint32_t tx_per_mon_time;
7528 uint32_t rx_per_mon_time;
Selvaraj, Sridharc1a80d02017-05-17 16:05:15 +05307529 uint32_t min_candidate_rssi;
Kapil Guptaf6eb7312017-02-24 15:50:03 +05307530};
7531
7532/**
7533 * struct wmi_per_roam_config_req: PER based roaming config request
7534 * @vdev_id: vdev id on which config needs to be set
7535 * @per_config: PER config
7536 */
7537struct wmi_per_roam_config_req {
7538 uint8_t vdev_id;
7539 struct wmi_per_roam_config per_config;
7540};
7541
7542/**
Govind Singhc7cd2d62016-06-21 14:33:26 +05307543 * struct wmi_fw_dump_seg_req - individual segment details
7544 * @seg_id - segment id.
7545 * @seg_start_addr_lo - lower address of the segment.
7546 * @seg_start_addr_hi - higher address of the segment.
7547 * @seg_length - length of the segment.
7548 * @dst_addr_lo - lower address of the destination buffer.
7549 * @dst_addr_hi - higher address of the destination buffer.
7550 *
7551 * This structure carries the information to firmware about the
7552 * individual segments. This structure is part of firmware memory
7553 * dump request.
7554 */
7555struct wmi_fw_dump_seg_req {
7556 uint8_t seg_id;
7557 uint32_t seg_start_addr_lo;
7558 uint32_t seg_start_addr_hi;
7559 uint32_t seg_length;
7560 uint32_t dst_addr_lo;
7561 uint32_t dst_addr_hi;
7562};
7563
7564/**
7565 * enum wmi_userspace_log_level - Log level at userspace
7566 * @WMI_LOG_LEVEL_NO_COLLECTION: verbose_level 0 corresponds to no collection
7567 * @WMI_LOG_LEVEL_NORMAL_COLLECT: verbose_level 1 correspond to normal log
7568 * level with minimal user impact. This is the default value.
7569 * @WMI_LOG_LEVEL_ISSUE_REPRO: verbose_level 2 are enabled when user is lazily
7570 * trying to reproduce a problem, wifi performances and power can be impacted
7571 * but device should not otherwise be significantly impacted
7572 * @WMI_LOG_LEVEL_ACTIVE: verbose_level 3+ are used when trying to
7573 * actively debug a problem
7574 *
7575 * Various log levels defined in the userspace for logging applications
7576 */
7577enum wmi_userspace_log_level {
7578 WMI_LOG_LEVEL_NO_COLLECTION,
7579 WMI_LOG_LEVEL_NORMAL_COLLECT,
7580 WMI_LOG_LEVEL_ISSUE_REPRO,
7581 WMI_LOG_LEVEL_ACTIVE,
7582};
7583
Padma, Santhosh Kumar73524052016-09-11 18:24:59 +05307584/**
Kiran Venkatappa176fe6c2016-12-26 15:38:06 +05307585 * HW mode config type replicated from FW header
7586 * @WMI_HOST_HW_MODE_SINGLE: Only one PHY is active.
7587 * @WMI_HOST_HW_MODE_DBS: Both PHYs are active in different bands,
7588 * one in 2G and another in 5G.
7589 * @WMI_HOST_HW_MODE_SBS_PASSIVE: Both PHYs are in passive mode (only rx) in
7590 * same band; no tx allowed.
7591 * @WMI_HOST_HW_MODE_SBS: Both PHYs are active in the same band.
7592 * Support for both PHYs within one band is planned
7593 * for 5G only(as indicated in WMI_MAC_PHY_CAPABILITIES),
7594 * but could be extended to other bands in the future.
7595 * The separation of the band between the two PHYs needs
7596 * to be communicated separately.
7597 * @WMI_HOST_HW_MODE_DBS_SBS: 3 PHYs, with 2 on the same band doing SBS
7598 * as in WMI_HW_MODE_SBS, and 3rd on the other band
Kiran Venkatappa29d4ef02017-08-02 12:11:09 +05307599 * @WMI_HOST_HW_MODE_DBS_OR_SBS: Two PHY with one PHY capabale of both 2G and
7600 * 5G. It can support SBS (5G + 5G) OR DBS (5G + 2G).
Kiran Venkatappaaf1dae32016-12-23 19:58:54 +05307601 * @WMI_HOST_HW_MODE_MAX: Max hw_mode_id. Used to indicate invalid mode.
Kiran Venkatappa176fe6c2016-12-26 15:38:06 +05307602 */
7603enum wmi_host_hw_mode_config_type {
7604 WMI_HOST_HW_MODE_SINGLE = 0,
7605 WMI_HOST_HW_MODE_DBS = 1,
7606 WMI_HOST_HW_MODE_SBS_PASSIVE = 2,
7607 WMI_HOST_HW_MODE_SBS = 3,
7608 WMI_HOST_HW_MODE_DBS_SBS = 4,
Kiran Venkatappa29d4ef02017-08-02 12:11:09 +05307609 WMI_HOST_HW_MODE_DBS_OR_SBS = 5,
Kiran Venkatappaaf1dae32016-12-23 19:58:54 +05307610 WMI_HOST_HW_MODE_MAX,
Kiran Venkatappa176fe6c2016-12-26 15:38:06 +05307611};
7612
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05307613/*
7614 * struct wmi_host_peer_txmu_cnt_event
7615 * @tx_mu_transmitted - MU-MIMO tx count
7616 */
7617typedef struct {
7618 uint32_t tx_mu_transmitted;
7619} wmi_host_peer_txmu_cnt_event;
7620
Manikandan Mohan7e5ad482016-12-13 13:14:06 -08007621#define MAX_SAR_LIMIT_ROWS_SUPPORTED 64
7622/**
Jeff Johnsonefb43392017-12-14 15:50:16 -08007623 * struct sar_limit_cmd_row - sar limits row
Manikandan Mohan7e5ad482016-12-13 13:14:06 -08007624 * @band_id: Optional param for frequency band
Jeff Johnsonefb43392017-12-14 15:50:16 -08007625 * See %enum wmi_sar_band_id_flags for possible values
Manikandan Mohan7e5ad482016-12-13 13:14:06 -08007626 * @chain_id: Optional param for antenna chain id
7627 * @mod_id: Optional param for modulation scheme
Jeff Johnsonefb43392017-12-14 15:50:16 -08007628 * See %enum wmi_sar_mod_id_flags for possible values
Manikandan Mohan7e5ad482016-12-13 13:14:06 -08007629 * @limit_value: Mandatory param providing power limits in steps of 0.5 dbm
7630 * @validity_bitmap: bitmap of valid optional params in sar_limit_cmd_row struct
Jeff Johnsonefb43392017-12-14 15:50:16 -08007631 * See WMI_SAR_*_VALID_MASK for possible values
Manikandan Mohan7e5ad482016-12-13 13:14:06 -08007632 */
7633struct sar_limit_cmd_row {
7634 uint32_t band_id;
7635 uint32_t chain_id;
7636 uint32_t mod_id;
7637 uint32_t limit_value;
7638 uint32_t validity_bitmap;
7639};
7640
7641/**
Jeff Johnsonefb43392017-12-14 15:50:16 -08007642 * struct sar_limit_cmd_params - sar limits params
Manikandan Mohan7e5ad482016-12-13 13:14:06 -08007643 * @sar_enable: flag to enable SAR
Jeff Johnsonefb43392017-12-14 15:50:16 -08007644 * See %enum wmi_sar_feature_state_flags for possible values
Manikandan Mohan7e5ad482016-12-13 13:14:06 -08007645 * @num_limit_rows: number of items in sar_limits
7646 * @commit_limits: indicates firmware to start apply new SAR values
7647 * @sar_limit_row_list: pointer to array of sar limit rows
7648 */
7649struct sar_limit_cmd_params {
7650 uint32_t sar_enable;
7651 uint32_t num_limit_rows;
7652 uint32_t commit_limits;
7653 struct sar_limit_cmd_row *sar_limit_row_list;
7654};
7655
Jeff Johnsonefb43392017-12-14 15:50:16 -08007656/**
7657 * struct sar_limit_event_row - sar limits row
7658 * @band_id: Frequency band.
7659 * See %enum wmi_sar_band_id_flags for possible values
7660 * @chain_id: Chain id
7661 * @mod_id: Modulation scheme
7662 * See %enum wmi_sar_mod_id_flags for possible values
7663 * @limit_value: Power limits in steps of 0.5 dbm that is currently active for
7664 * the given @band_id, @chain_id, and @mod_id
7665 */
7666struct sar_limit_event_row {
7667 uint32_t band_id;
7668 uint32_t chain_id;
7669 uint32_t mod_id;
7670 uint32_t limit_value;
7671};
7672
7673/**
7674 * struct sar_limit_event - sar limits params
7675 * @sar_enable: Current status of SAR enablement.
7676 * See %enum wmi_sar_feature_state_flags for possible values
7677 * @num_limit_rows: number of items in sar_limits
7678 * @sar_limit_row: array of sar limit rows. Only @num_limit_rows
7679 * should be considered valid.
7680 */
7681struct sar_limit_event {
7682 uint32_t sar_enable;
7683 uint32_t num_limit_rows;
7684 struct sar_limit_event_row
7685 sar_limit_row[MAX_SAR_LIMIT_ROWS_SUPPORTED];
7686};
7687
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05307688/*
7689 * struct wmi_peer_gid_userpos_list_event
7690 * @usr_list - User list
7691 */
7692#define GID_OVERLOAD_GROUP_COUNT 15
7693typedef struct {
7694 uint32_t usr_list[GID_OVERLOAD_GROUP_COUNT];
7695} wmi_host_peer_gid_userpos_list_event;
7696
Rajeev Kumar Sirasanagandlacddf6fe2016-11-22 21:28:54 +05307697/**
7698 * enum rcpi_measurement_type - for identifying type of rcpi measurement
7699 * @RCPI_MEASUREMENT_TYPE_AVG_MGMT: avg rcpi of mgmt frames
7700 * @RCPI_MEASUREMENT_TYPE_AVG_DATA: avg rcpi of data frames
7701 * @RCPI_MEASUREMENT_TYPE_LAST_MGMT: rcpi of last mgmt frame
7702 * @RCPI_MEASUREMENT_TYPE_LAST_DATA: rcpi of last data frame
7703 * @RCPI_MEASUREMENT_TYPE_INVALID: invalid rcpi measurement type
7704 */
7705enum rcpi_measurement_type {
7706 RCPI_MEASUREMENT_TYPE_AVG_MGMT = 0x1,
7707 RCPI_MEASUREMENT_TYPE_AVG_DATA = 0x2,
7708 RCPI_MEASUREMENT_TYPE_LAST_MGMT = 0x3,
7709 RCPI_MEASUREMENT_TYPE_LAST_DATA = 0x4,
7710 RCPI_MEASUREMENT_TYPE_INVALID = 0x5,
7711};
7712
7713/**
7714 * struct rcpi_req - RCPI req parameter
7715 * @vdev_id: virtual device id
7716 * @measurement_type: type of rcpi from enum wmi_rcpi_measurement_type
7717 * @mac_addr: peer mac addr for which measurement is required
7718 */
7719struct rcpi_req {
7720 uint32_t vdev_id;
7721 enum rcpi_measurement_type measurement_type;
7722 uint8_t mac_addr[IEEE80211_ADDR_LEN];
7723};
7724
7725/**
7726 * struct rcpi_res - RCPI response parameter
7727 * @vdev_id: virtual device id
7728 * @measurement_type: type of rcpi from enum wmi_rcpi_measurement_type
7729 * @mac_addr: peer mac addr for which measurement is required
7730 * @rcpi_value: value of RCPI computed by firmware
7731 */
7732struct rcpi_res {
7733 uint32_t vdev_id;
7734 enum rcpi_measurement_type measurement_type;
7735 uint8_t mac_addr[IEEE80211_ADDR_LEN];
7736 int32_t rcpi_value;
7737};
7738
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05307739#define WMI_HOST_BOARD_MCN_STRING_MAX_SIZE 19
7740#define WMI_HOST_BOARD_MCN_STRING_BUF_SIZE \
7741 (WMI_HOST_BOARD_MCN_STRING_MAX_SIZE+1) /* null-terminator */
7742
7743typedef struct {
7744 uint32_t software_cal_version;
7745 uint32_t board_cal_version;
7746 /* board_mcn_detail:
7747 * Provide a calibration message string for the host to display.
Vivek73465282018-03-22 23:27:21 +05307748 * Note: on a big-endian host, the 4 bytes within each uint32_t portion
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05307749 * of a WMI message will be automatically byteswapped by the copy engine
7750 * as the messages are transferred between host and target, to convert
7751 * between the target's little-endianness and the host's big-endianness.
7752 * Consequently, a big-endian host should manually unswap the bytes
7753 * within the board_mcn_detail string buffer to get the bytes back into
7754 * the desired natural order.
7755 */
7756 uint8_t board_mcn_detail[WMI_HOST_BOARD_MCN_STRING_BUF_SIZE];
7757 uint32_t cal_ok; /* filled with CALIBRATION_STATUS enum value */
7758} wmi_host_pdev_check_cal_version_event;
7759
Kiran Venkatappa4110f0a2016-12-27 22:51:29 +05307760/**
7761 * enum WMI_HOST_CALIBRATION_STATUS - Host defined Enums for cal status
7762 * @WMI_HOST_NO_FEATURE: The board was calibrated with a meta
7763 * which did not have this feature
7764 * @WMI_HOST_CALIBRATION_OK: The calibration status is OK
7765 * @WMI_HOST_CALIBRATION_NOT_OK: The calibration status is NOT OK
7766 */
7767enum WMI_HOST_CALIBRATION_STATUS {
7768 WMI_HOST_NO_FEATURE = 0,
7769 WMI_HOST_CALIBRATION_OK,
7770 WMI_HOST_CALIBRATION_NOT_OK,
7771};
7772
Sathish Kumar617535c2017-01-24 17:51:26 +05307773/**
7774 * struct wmi_host_pdev_utf_event - Host defined struct to hold utf event data
7775 * @data: Pointer to data
7776 * @datalen: Data length
Kiran Venkatappac98badb2017-06-01 16:08:17 +05307777 * @pdev_id: Pdev_id of data
Sathish Kumar617535c2017-01-24 17:51:26 +05307778 *
7779 */
7780struct wmi_host_pdev_utf_event {
7781 uint8_t *data;
7782 uint16_t datalen;
Kiran Venkatappa2a93f6f2017-02-28 12:42:36 +05307783 uint32_t pdev_id;
Sathish Kumar617535c2017-01-24 17:51:26 +05307784};
7785
Kiran Venkatappa9b7a9592016-12-29 18:09:32 +05307786/**
Kiran Venkatappac98badb2017-06-01 16:08:17 +05307787 * struct wmi_host_utf_seg_header_info - Host defined struct to map seg info in
7788 * UTF event
7789 * @len: segment length
7790 * @msgref: message reference
7791 * @segment_info: segment info
7792 * @pdev_id: pdev_id
7793 *
7794 */
7795struct wmi_host_utf_seg_header_info {
7796 uint32_t len;
7797 uint32_t msgref;
7798 uint32_t segment_info;
7799 uint32_t pdev_id;
7800};
7801
7802/**
Kiran Venkatappa3d514982017-02-28 14:19:17 +05307803 * struct wmi_host_pdev_qvit_event - Host defined struct to hold qvit event data
7804 * @data: Pointer to data
7805 * @datalen: Data length
7806 *
7807 */
7808struct wmi_host_pdev_qvit_event {
7809 uint8_t *data;
7810 uint16_t datalen;
7811 uint32_t pdev_id;
7812};
7813
7814/**
Vijay Pamidipatiadd0ba72017-01-17 12:53:05 +05307815 * struct wmi_host_peer_delete_response_event - Peer Delete response event param
7816 * @vdev_id: vdev id
7817 * @mac_address: Peer Mac Address
7818 *
7819 */
7820struct wmi_host_peer_delete_response_event {
7821 uint32_t vdev_id;
7822 struct qdf_mac_addr mac_address;
7823};
7824
7825/**
Kiran Venkatappa9b7a9592016-12-29 18:09:32 +05307826 * @struct wmi_host_dcs_interference_param
7827 * @interference_type: Type of DCS Interference
7828 * @uint32_t pdev_id: pdev id
7829 */
7830struct wmi_host_dcs_interference_param {
7831 uint32_t interference_type;
7832 uint32_t pdev_id;
7833};
7834
Kiran Venkatappa9f5fcc02016-12-29 22:07:14 +05307835/*
7836 * struct wmi_host_fips_event_param: FIPS event param
7837 * @pdev_id: pdev id
7838 * @error_status: Error status: 0 (no err), 1, or OPER_TIMEOUR
7839 * @data_len: FIPS data lenght
7840 * @data: pointer to data
7841 */
7842struct wmi_host_fips_event_param {
7843 uint32_t pdev_id;
7844 uint32_t error_status;
7845 uint32_t data_len;
7846 uint32_t *data;
7847};
Kiran Venkatappa3f061a92017-02-08 14:57:16 +05307848
7849/**
7850 * struct wmi_host_proxy_ast_reserve_param
7851 * @pdev_id: pdev id
7852 * @result: result
7853 */
7854struct wmi_host_proxy_ast_reserve_param {
7855 uint32_t pdev_id;
7856 uint32_t result;
7857};
Kiran Venkatappaaf1dae32016-12-23 19:58:54 +05307858
7859/**
7860 * struct wmi_host_pdev_band_to_mac - freq range for mac
7861 * @pdev_id: PDEV ID to identifiy mac
7862 * @start_freq: start frequency value
7863 * @end_freq: end frequency value
7864 */
7865struct wmi_host_pdev_band_to_mac {
7866 uint32_t pdev_id;
7867 uint32_t start_freq;
7868 uint32_t end_freq;
7869};
7870#define WMI_HOST_MAX_PDEV 3
7871
7872/**
7873 * struct wmi_init_cmd_param - INIT command params
7874 * @target_resource_config: pointer to resource config
7875 * @num_mem_chunks: number of memory chunks
7876 * @struct wmi_host_mem_chunk: pointer to memory chunks
7877 * @hw_mode_index: HW mode index chosen
7878 * @num_band_to_mac: Number of band to mac setting
7879 * @struct wmi_host_pdev_band_to_mac: band to mac setting
7880 */
7881struct wmi_init_cmd_param {
7882 target_resource_config *res_cfg;
7883 uint8_t num_mem_chunks;
7884 struct wmi_host_mem_chunk *mem_chunks;
7885 uint32_t hw_mode_id;
7886 uint32_t num_band_to_mac;
7887 struct wmi_host_pdev_band_to_mac band_to_mac[WMI_HOST_MAX_PDEV];
7888};
Sathish Kumar907a7462017-02-27 10:35:40 +05307889
7890/**
7891 * struct pdev_csa_switch_count_status - CSA switch count status event param
7892 * @pdev_id: Physical device identifier
7893 * @current_switch_count: Current CSA switch count
7894 * @num_vdevs: Number of vdevs that need restart
7895 * @vdev_ids: Array containing the vdev ids that need restart
7896 */
7897struct pdev_csa_switch_count_status {
7898 uint32_t pdev_id;
7899 uint32_t current_switch_count;
7900 uint32_t num_vdevs;
7901 uint32_t *vdev_ids;
7902};
7903
Dustin Brown4def3162017-01-13 15:24:07 -08007904/**
7905 * enum wmi_host_active-bpf_mode - FW_ACTIVE_BPF_MODE, replicated from FW header
7906 * @WMI_HOST_ACTIVE_BPF_DISABLED: BPF is disabled for all packets in active mode
7907 * @WMI_HOST_ACTIVE_BPF_ENABLED: BPF is enabled for all packets in active mode
7908 * @WMI_HOST_ACTIVE_BPF_ADAPTIVE: BPF is enabled for packets up to some
7909 * threshold in active mode
7910 */
7911enum wmi_host_active_bpf_mode {
7912 WMI_HOST_ACTIVE_BPF_DISABLED = (1 << 1),
7913 WMI_HOST_ACTIVE_BPF_ENABLED = (1 << 2),
7914 WMI_HOST_ACTIVE_BPF_ADAPTIVE = (1 << 3)
7915};
7916
Sathish Kumar125754e2017-04-24 11:36:00 +05307917/**
7918 * struct coex_config_params - Coex config command params
7919 * @vdev_id: Virtual AP device identifier
7920 * @config_type: Configuration type - wmi_coex_config_type enum
7921 * @config_arg1: Configuration argument based on config type
7922 * @config_arg2: Configuration argument based on config type
7923 * @config_arg3: Configuration argument based on config type
7924 * @config_arg4: Configuration argument based on config type
7925 * @config_arg5: Configuration argument based on config type
7926 * @config_arg6: Configuration argument based on config type
7927 */
7928struct coex_config_params {
7929 uint32_t vdev_id;
7930 uint32_t config_type;
7931 uint32_t config_arg1;
7932 uint32_t config_arg2;
7933 uint32_t config_arg3;
7934 uint32_t config_arg4;
7935 uint32_t config_arg5;
7936 uint32_t config_arg6;
7937};
7938
Kiran Venkatappa49341042017-05-10 16:24:51 +05307939#define WMI_HOST_PDEV_ID_SOC 0xFF
7940#define WMI_HOST_PDEV_ID_0 0
7941#define WMI_HOST_PDEV_ID_1 1
7942#define WMI_HOST_PDEV_ID_2 2
Sathish Kumar744fbf72017-05-17 18:05:15 +05307943
7944/**
7945 * struct tbttoffset_params - Tbttoffset event params
7946 * @vdev_id: Virtual AP device identifier
7947 * @tbttoffset : Tbttoffset for the virtual AP device
7948 */
7949struct tbttoffset_params {
7950 uint32_t vdev_id;
7951 uint32_t tbttoffset;
7952};
7953
Nitesh Shahfb9e88b2017-05-22 15:49:00 +05307954#define WMI_SCAN_CLIENT_MAX 7
7955
7956/**
7957 * struct wmi_dbs_scan_sel_params - DBS scan selection params
7958 * @num_clients: Number of scan clients dutycycle
7959 * @pdev_id: pdev_id for identifying the MAC
7960 * @module_id: scan client module id
7961 * @num_dbs_scans: number of DBS scans
7962 * @num_non_dbs_scans: number of non-DBS scans
7963 */
7964struct wmi_dbs_scan_sel_params {
7965 uint32_t num_clients;
7966 uint32_t pdev_id;
7967 uint32_t module_id[WMI_SCAN_CLIENT_MAX];
7968 uint32_t num_dbs_scans[WMI_SCAN_CLIENT_MAX];
7969 uint32_t num_non_dbs_scans[WMI_SCAN_CLIENT_MAX];
7970};
7971
Ganesh Kondabattini20b086b2017-07-10 11:54:11 +05307972/**
7973 * struct wmi_limit_off_chan_param - limit off channel parameters
7974 * @vdev_id: vdev id
7975 * @status: status of the command (enable/disable)
7976 * @max_offchan_time: max off channel time
7977 * @rest_time: home channel time
7978 * @skip_dfs_chans: skip dfs channels during scan
7979 */
7980struct wmi_limit_off_chan_param {
7981 uint32_t vdev_id;
7982 bool status;
7983 uint32_t max_offchan_time;
7984 uint32_t rest_time;
7985 bool skip_dfs_chans;
7986};
7987
Varun Reddy Yeturu4cae4292017-07-20 09:45:01 -07007988/**
7989 * struct wmi_mawc_roam_params - Motion Aided wireless connectivity params
7990 * @vdev_id: VDEV on which the parameters should be applied
7991 * @enable: MAWC roaming feature enable/disable
7992 * @traffic_load_threshold: Traffic threshold in kBps for MAWC roaming
7993 * @best_ap_rssi_threshold: AP RSSI Threshold for MAWC roaming
7994 * @rssi_stationary_high_adjust: High RSSI adjustment value to suppress scan
7995 * @rssi_stationary_low_adjust: Low RSSI adjustment value to suppress scan
7996 */
7997struct wmi_mawc_roam_params {
7998 uint8_t vdev_id;
7999 bool enable;
8000 uint32_t traffic_load_threshold;
8001 uint32_t best_ap_rssi_threshold;
8002 uint8_t rssi_stationary_high_adjust;
8003 uint8_t rssi_stationary_low_adjust;
8004};
yeshwanth sriram guntuka230af892017-09-01 17:56:07 +05308005/**
8006 * struct wmi_btm_config - BSS Transition Management offload params
8007 * @vdev_id: VDEV on which the parameters should be applied
8008 * @btm_offload_config: BTM config
Jiachao Wu26f55de2018-01-08 16:45:09 +08008009 * @btm_solicited_timeout: Timeout value for waiting BTM request
8010 * @btm_max_attempt_cnt: Maximum attempt for sending BTM query to ESS
8011 * @btm_sticky_time: Stick time after roaming to new AP by BTM
yeshwanth sriram guntuka230af892017-09-01 17:56:07 +05308012 */
8013struct wmi_btm_config {
8014 uint8_t vdev_id;
8015 uint32_t btm_offload_config;
Jiachao Wu26f55de2018-01-08 16:45:09 +08008016 uint32_t btm_solicited_timeout;
8017 uint32_t btm_max_attempt_cnt;
8018 uint32_t btm_sticky_time;
yeshwanth sriram guntuka230af892017-09-01 17:56:07 +05308019};
Varun Reddy Yeturu4cae4292017-07-20 09:45:01 -07008020
Anurag Chouhanc1705422017-09-11 14:56:30 +05308021/**
8022 * struct set_arp_stats - set/reset arp stats
8023 * @vdev_id: session id
8024 * @flag: enable/disable stats
8025 * @pkt_type: type of packet(1 - arp)
8026 * @ip_addr: subnet ipv4 address in case of encrypted packets
Poddar, Siddartha11db812018-01-29 17:19:46 +05308027 * @pkt_type_bitmap: pkt bitmap
8028 * @tcp_src_port: tcp src port for pkt tracking
8029 * @tcp_dst_port: tcp dst port for pkt tracking
8030 * @icmp_ipv4: target ipv4 address to track ping packets
8031 * @reserved: reserved
Anurag Chouhanc1705422017-09-11 14:56:30 +05308032 */
8033struct set_arp_stats {
8034 uint32_t vdev_id;
8035 uint8_t flag;
8036 uint8_t pkt_type;
8037 uint32_t ip_addr;
Poddar, Siddartha11db812018-01-29 17:19:46 +05308038 uint32_t pkt_type_bitmap;
8039 uint32_t tcp_src_port;
8040 uint32_t tcp_dst_port;
8041 uint32_t icmp_ipv4;
8042 uint32_t reserved;
Anurag Chouhanc1705422017-09-11 14:56:30 +05308043};
8044
8045/**
8046 * struct get_arp_stats - get arp stats from firmware
8047 * @pkt_type: packet type(1 - ARP)
8048 * @vdev_id: session id
8049 */
8050struct get_arp_stats {
8051 uint8_t pkt_type;
8052 uint32_t vdev_id;
8053};
8054
Kiran Venkatappaa40870a2017-11-10 20:50:12 +05308055/**
8056 * struct wmi_host_ready_ev_param - Data revieved in ready event
Kiran Venkatappae27364f2017-11-28 12:23:24 +05308057 * @status: FW init status. Success or Failure.
Kiran Venkatappaa40870a2017-11-10 20:50:12 +05308058 * @num_dscp_table: Number of DSCP table supported in FW
8059 * @num_extra_mac_addr: Extra mac address present in ready event. Used
8060 * in DBDC mode to provide multiple mac per pdev.
8061 * @num_total_peer: Total number of peers FW could allocate. Zero means
8062 * FW could allocate num peers requested by host in init.
8063 * Otherwise, host need update it max_peer to this value.
Kiran Venkatappae27364f2017-11-28 12:23:24 +05308064 * @num_extra_peer: Number of extra peers created and used within FW. Host
8065 * should expect peer_id can be num_total_peer + num_extra_peer
8066 * but it can create only upto num_total_peer.
Kiran Venkatappaa40870a2017-11-10 20:50:12 +05308067 * @agile_capability: Boolean specification of whether the target supports
8068 * agile DFS, by means of using one 80 MHz radio chain for
8069 * radar detection, concurrently with using another radio
8070 * chain for non-160 MHz regular operation.
8071 */
8072struct wmi_host_ready_ev_param {
Kiran Venkatappae27364f2017-11-28 12:23:24 +05308073 uint32_t status;
Kiran Venkatappaa40870a2017-11-10 20:50:12 +05308074 uint32_t num_dscp_table;
8075 uint32_t num_extra_mac_addr;
8076 uint32_t num_total_peer;
Kiran Venkatappae27364f2017-11-28 12:23:24 +05308077 uint32_t num_extra_peer;
Kiran Venkatappaa40870a2017-11-10 20:50:12 +05308078 bool agile_capability;
8079};
Kiran Venkatappaf9b1de32017-11-08 19:32:23 +05308080
8081/**
8082 * struct bcn_offload_control - Beacon offload control params
8083 * @vdev_id: vdev identifer of VAP to control beacon tx
8084 * @bcn_tx_enable: Enable or Disable beacon TX in offload mode
8085 */
8086struct bcn_offload_control {
8087 uint32_t vdev_id;
8088 bool bcn_tx_enable;
8089};
8090
Rathees kumar Chinannanaff64b02017-11-22 17:03:57 +05308091/**
8092 * struct wds_entry - WDS entry structure
8093 * @peer_mac: peer mac
8094 * @wds_mac: wds mac address
8095 * @flags: flags
8096 */
8097struct wdsentry {
8098 u_int8_t peer_mac[IEEE80211_ADDR_LEN];
8099 u_int8_t wds_mac[IEEE80211_ADDR_LEN];
Vivek73465282018-03-22 23:27:21 +05308100 uint32_t flags;
Rathees kumar Chinannanaff64b02017-11-22 17:03:57 +05308101};
8102
Sathish Kumar3d3cf4f2017-11-17 17:30:41 +05308103#define WMI_HOST_DBR_RING_ADDR_LO_S 0
8104#define WMI_HOST_DBR_RING_ADDR_LO 0xffffffff
8105
8106#define WMI_HOST_DBR_RING_ADDR_LO_GET(dword) \
8107 WMI_HOST_F_MS(dword, WMI_HOST_DBR_RING_ADDR_LO)
8108#define WMI_HOST_DBR_RING_ADDR_LO_SET(dword, val) \
8109 WMI_HOST_F_RMW(dword, val, WMI_HOST_DBR_RING_ADDR_LO)
8110
8111#define WMI_HOST_DBR_RING_ADDR_HI_S 0
8112#define WMI_HOST_DBR_RING_ADDR_HI 0xf
8113
8114#define WMI_HOST_DBR_RING_ADDR_HI_GET(dword) \
8115 WMI_HOST_F_MS(dword, WMI_HOST_DBR_RING_ADDR_HI)
8116#define WMI_HOST_DBR_RING_ADDR_HI_SET(dword, val) \
8117 WMI_HOST_F_RMW(dword, val, WMI_HOST_DBR_RING_ADDR_HI)
8118
8119#define WMI_HOST_DBR_DATA_ADDR_LO_S 0
8120#define WMI_HOST_DBR_DATA_ADDR_LO 0xffffffff
8121
8122#define WMI_HOST_DBR_DATA_ADDR_LO_GET(dword) \
8123 WMI_HOST_F_MS(dword, WMI_HOST_DBR_DATA_ADDR_LO)
8124#define WMI_HOST_DBR_DATA_ADDR_LO_SET(dword, val) \
8125 WMI_HOST_F_RMW(dword, val, WMI_HOST_DBR_DATA_ADDR_LO)
8126
8127#define WMI_HOST_DBR_DATA_ADDR_HI_S 0
8128#define WMI_HOST_DBR_DATA_ADDR_HI 0xf
8129
8130#define WMI_HOST_DBR_DATA_ADDR_HI_GET(dword) \
8131 WMI_HOST_F_MS(dword, WMI_HOST_DBR_DATA_ADDR_HI)
8132#define WMI_HOST_DBR_DATA_ADDR_HI_SET(dword, val) \
8133 WMI_HOST_F_RMW(dword, val, WMI_HOST_DBR_DATA_ADDR_HI)
8134
8135#define WMI_HOST_DBR_DATA_ADDR_HI_HOST_DATA_S 12
8136#define WMI_HOST_DBR_DATA_ADDR_HI_HOST_DATA 0xfffff
8137
8138#define WMI_HOST_DBR_DATA_ADDR_HI_HOST_DATA_GET(dword) \
8139 WMI_HOST_F_MS(dword, WMI_HOST_DBR_DATA_ADDR_HI_HOST_DATA)
8140#define WMI_HOST_DBR_DATA_ADDR_HI_HOST_DATA_SET(dword, val) \
8141 WMI_HOST_F_RMW(dword, val, WMI_HOST_DBR_DATA_ADDR_HI_HOST_DATA)
8142
8143/**
8144 * struct direct_buf_rx_entry: direct buffer rx release entry structure
8145 *
8146 * @addr_lo: LSB 32-bits of the buffer
8147 * @addr_hi: MSB 32-bits of the buffer
8148 * @len: Length of the buffer
8149 */
8150struct direct_buf_rx_entry {
8151 uint32_t paddr_lo;
8152 uint32_t paddr_hi;
8153 uint32_t len;
8154};
8155
8156/**
8157 * struct direct_buf_rx_rsp: direct buffer rx response structure
8158 *
8159 * @pdev_id: Index of the pdev for which response is received
8160 * @mod_mod: Index of the module for which respone is received
8161 * @num_buf_release_entry: Number of buffers released through event
8162 * @dbr_entries: Pointer to direct buffer rx entry struct
8163 */
8164struct direct_buf_rx_rsp {
8165 uint32_t pdev_id;
8166 uint32_t mod_id;
8167 uint32_t num_buf_release_entry;
8168 struct direct_buf_rx_entry *dbr_entries;
8169};
8170
8171/**
8172 * struct direct_buf_rx_cfg_req: direct buffer rx config request structure
8173 *
8174 * @pdev_id: Index of the pdev for which response is received
8175 * @mod_id: Index of the module for which respone is received
8176 * @base_paddr_lo: Lower 32bits of ring base address
8177 * @base_paddr_hi: Higher 32bits of ring base address
8178 * @head_idx_paddr_lo: Lower 32bits of head idx register address
8179 * @head_idx_paddr_hi: Higher 32bits of head idx register address
8180 * @tail_idx_paddr_lo: Lower 32bits of tail idx register address
8181 * @tail_idx_paddr_hi: Higher 32bits of tail idx register address
8182 * @buf_size: Size of the buffer for each pointer in the ring
8183 * @num_elems: Number of pointers allocated and part of the source ring
8184 */
8185struct direct_buf_rx_cfg_req {
8186 uint32_t pdev_id;
8187 uint32_t mod_id;
8188 uint32_t base_paddr_lo;
8189 uint32_t base_paddr_hi;
8190 uint32_t head_idx_paddr_lo;
8191 uint32_t head_idx_paddr_hi;
8192 uint32_t tail_idx_paddr_hi;
8193 uint32_t tail_idx_paddr_lo;
8194 uint32_t buf_size;
8195 uint32_t num_elems;
8196 uint32_t event_timeout_ms;
8197 uint32_t num_resp_per_event;
8198};
8199
Arif Hussain2cfde1d2017-12-27 16:23:45 -08008200/**
8201 * struct wmi_obss_detection_cfg_param - obss detection cfg
8202 * @vdev_id: vdev id
8203 * @obss_detect_period_ms: detection period in ms
8204 * @obss_11b_ap_detect_mode: detect whether there is 11b ap/ibss
8205 * @obss_11b_sta_detect_mode: detect whether there is 11b sta
8206 * connected with other APs
8207 * @obss_11g_ap_detect_mode: detect whether there is 11g AP
8208 * @obss_11a_detect_mode: detect whether there is legacy 11a traffic
8209 * @obss_ht_legacy_detect_mode: detect whether there is ap which is
8210 * ht legacy mode
8211 * @obss_ht_mixed_detect_mode: detect whether there is ap which is ht mixed mode
8212 * @obss_ht_20mhz_detect_mode: detect whether there is ap which has 20M only
8213 * station
8214 */
8215struct wmi_obss_detection_cfg_param {
8216 uint32_t vdev_id;
8217 uint32_t obss_detect_period_ms;
8218 uint32_t obss_11b_ap_detect_mode;
8219 uint32_t obss_11b_sta_detect_mode;
8220 uint32_t obss_11g_ap_detect_mode;
8221 uint32_t obss_11a_detect_mode;
8222 uint32_t obss_ht_legacy_detect_mode;
8223 uint32_t obss_ht_mixed_detect_mode;
8224 uint32_t obss_ht_20mhz_detect_mode;
8225};
8226
Arif Hussainf9f26b52018-01-12 13:15:04 -08008227/**
Arif Hussainb4da3472018-01-22 01:19:36 -08008228 * enum wmi_obss_detection_reason - obss detection event reasons
Arif Hussainf9f26b52018-01-12 13:15:04 -08008229 * @OBSS_OFFLOAD_DETECTION_DISABLED: OBSS detection disabled
8230 * @OBSS_OFFLOAD_DETECTION_PRESENT: OBSS present detection
8231 * @OBSS_OFFLOAD_DETECTION_ABSENT: OBSS absent detection
8232 *
8233 * Defines different types of reasons for obss detection event from firmware.
8234 */
8235enum wmi_obss_detection_reason {
8236 OBSS_OFFLOAD_DETECTION_DISABLED = 0,
8237 OBSS_OFFLOAD_DETECTION_PRESENT = 1,
8238 OBSS_OFFLOAD_DETECTION_ABSENT = 2,
8239};
8240
8241/**
8242 * struct wmi_obss_detect_info - OBSS detection info from firmware
Arif Hussainb4da3472018-01-22 01:19:36 -08008243 * @vdev_id: ID of the vdev to which this info belongs.
Arif Hussainf9f26b52018-01-12 13:15:04 -08008244 * @reason: Indicate if present or Absent detection,
8245 * also if not supported offload for this vdev.
8246 * @matched_detection_masks: Detection bit map.
8247 * @matched_bssid_addr: MAC address valid for only if info is present detection.
8248 */
8249struct wmi_obss_detect_info {
8250 uint32_t vdev_id;
8251 enum wmi_obss_detection_reason reason;
8252 uint32_t matched_detection_masks;
8253 uint8_t matched_bssid_addr[IEEE80211_ADDR_LEN];
8254};
8255
Vignesh Viswanathan51994e32018-01-18 19:06:40 +05308256/**
8257 * @time_offset: time offset after 11k offload command to trigger a neighbor
8258 * report request (in seconds)
8259 * @low_rssi_offset: Offset from rssi threshold to trigger a neighbor
8260 * report request (in dBm)
8261 * @bmiss_count_trigger: Number of beacon miss events to trigger neighbor
8262 * report request
8263 * @per_threshold_offset: offset from PER threshold to trigger neighbor
8264 * report request (in %)
8265 * @neighbor_report_cache_timeout: timeout after which new trigger can enable
8266 * sending of a neighbor report request (in seconds)
8267 * @max_neighbor_report_req_cap: max number of neighbor report requests that
8268 * can be sent to the peer in the current session
8269 * @ssid: Current connect SSID info
8270 */
8271struct wmi_11k_offload_neighbor_report_params {
8272 uint32_t time_offset;
8273 uint32_t low_rssi_offset;
8274 uint32_t bmiss_count_trigger;
8275 uint32_t per_threshold_offset;
8276 uint32_t neighbor_report_cache_timeout;
8277 uint32_t max_neighbor_report_req_cap;
8278 struct mac_ssid ssid;
8279};
8280
8281/**
8282 * struct wmi_11k_offload_params - offload 11k features to FW
8283 * @vdev_id: vdev id
8284 * @offload_11k_bitmask: bitmask to specify offloaded features
8285 * B0: Neighbor Report Request offload
8286 * B1-B31: Reserved
8287 * @neighbor_report_params: neighbor report offload params
8288 */
8289struct wmi_11k_offload_params {
8290 uint32_t vdev_id;
8291 uint32_t offload_11k_bitmask;
8292 struct wmi_11k_offload_neighbor_report_params neighbor_report_params;
8293};
8294
8295/**
8296 * struct wmi_invoke_neighbor_report_params - Invoke neighbor report request
8297 * from IW to FW
8298 * @vdev_id: vdev id
8299 * @send_resp_to_host: bool to send response to host or not
8300 * @ssid: ssid given from the IW command
8301 */
8302struct wmi_invoke_neighbor_report_params {
8303 uint32_t vdev_id;
8304 uint32_t send_resp_to_host;
8305 struct mac_ssid ssid;
8306};
8307
Arif Hussainb4da3472018-01-22 01:19:36 -08008308/**
8309 * enum wmi_obss_color_collision_evt_type - bss color collision event type
8310 * @OBSS_COLOR_COLLISION_DETECTION_DISABLE: OBSS color detection disabled
8311 * @OBSS_COLOR_COLLISION_DETECTION: OBSS color collision detection
8312 * @OBSS_COLOR_FREE_SLOT_TIMER_EXPIRY: OBSS free slot detection with
8313 * within expiry period
8314 * @OBSS_COLOR_FREE_SLOT_AVAILABLE: OBSS free slot detection
8315 *
8316 * Defines different types of type for obss color collision event type.
8317 */
8318enum wmi_obss_color_collision_evt_type {
8319 OBSS_COLOR_COLLISION_DETECTION_DISABLE = 0,
8320 OBSS_COLOR_COLLISION_DETECTION = 1,
8321 OBSS_COLOR_FREE_SLOT_TIMER_EXPIRY = 2,
8322 OBSS_COLOR_FREE_SLOT_AVAILABLE = 3,
8323};
8324
8325/**
8326 * struct wmi_obss_color_collision_cfg_param - obss color collision cfg
8327 * @vdev_id: vdev id
8328 * @flags: proposed for future use cases, currently not used.
8329 * @evt_type: bss color collision event.
8330 * @current_bss_color: current bss color.
8331 * @detection_period_ms: scan interval for both AP and STA mode.
8332 * @scan_period_ms: scan period for passive scan to detect collision.
8333 * @free_slot_expiry_time_ms: FW to notify host at timer expiry after
8334 * which Host will disable the bss color.
8335 */
8336struct wmi_obss_color_collision_cfg_param {
8337 uint32_t vdev_id;
8338 uint32_t flags;
8339 enum wmi_obss_color_collision_evt_type evt_type;
8340 uint32_t current_bss_color;
8341 uint32_t detection_period_ms;
8342 uint32_t scan_period_ms;
8343 uint32_t free_slot_expiry_time_ms;
8344};
8345
8346/**
8347 * struct wmi_obss_color_collision_info - bss color detection info from firmware
8348 * @vdev_id: ID of the vdev to which this info belongs.
8349 * @evt_type: bss color collision event.
8350 * @obss_color_bitmap_bit0to31: Bit set indicating BSS color present.
8351 * @obss_color_bitmap_bit32to63: Bit set indicating BSS color present.
8352 */
8353struct wmi_obss_color_collision_info {
8354 uint32_t vdev_id;
8355 enum wmi_obss_color_collision_evt_type evt_type;
8356 uint32_t obss_color_bitmap_bit0to31;
8357 uint32_t obss_color_bitmap_bit32to63;
8358};
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05308359#endif /* _WMI_UNIFIED_PARAM_H_ */