xref: /openbmc/linux/drivers/net/wireless/ath/wil6210/wmi.h (revision 6a363e8aa3828621eb4bc5e506f35f6ca9016d57)
12be7d22fSVladimir Kondratiev /*
28a4fa214SAhmad Masri  * Copyright (c) 2018, The Linux Foundation. All rights reserved.
3849a564bSDedy Lansky  * Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
4b874ddecSLior David  * Copyright (c) 2006-2012 Wilocity
52be7d22fSVladimir Kondratiev  *
62be7d22fSVladimir Kondratiev  * Permission to use, copy, modify, and/or distribute this software for any
72be7d22fSVladimir Kondratiev  * purpose with or without fee is hereby granted, provided that the above
82be7d22fSVladimir Kondratiev  * copyright notice and this permission notice appear in all copies.
92be7d22fSVladimir Kondratiev  *
102be7d22fSVladimir Kondratiev  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
112be7d22fSVladimir Kondratiev  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
122be7d22fSVladimir Kondratiev  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
132be7d22fSVladimir Kondratiev  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
142be7d22fSVladimir Kondratiev  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
152be7d22fSVladimir Kondratiev  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
162be7d22fSVladimir Kondratiev  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
172be7d22fSVladimir Kondratiev  */
182be7d22fSVladimir Kondratiev 
192be7d22fSVladimir Kondratiev /*
202be7d22fSVladimir Kondratiev  * This file contains the definitions of the WMI protocol specified in the
21b874ddecSLior David  * Wireless Module Interface (WMI) for the Qualcomm
22b874ddecSLior David  * 60 GHz wireless solution.
232be7d22fSVladimir Kondratiev  * It includes definitions of all the commands and events.
242be7d22fSVladimir Kondratiev  * Commands are messages from the host to the WM.
252be7d22fSVladimir Kondratiev  * Events are messages from the WM to the host.
26b874ddecSLior David  *
27b874ddecSLior David  * This is an automatically generated file.
282be7d22fSVladimir Kondratiev  */
292be7d22fSVladimir Kondratiev 
302be7d22fSVladimir Kondratiev #ifndef __WILOCITY_WMI_H__
312be7d22fSVladimir Kondratiev #define __WILOCITY_WMI_H__
322be7d22fSVladimir Kondratiev 
33b874ddecSLior David #define WMI_DEFAULT_ASSOC_STA		(1)
342be7d22fSVladimir Kondratiev #define WMI_MAC_LEN			(6)
352be7d22fSVladimir Kondratiev #define WMI_PROX_RANGE_NUM		(3)
36b874ddecSLior David #define WMI_MAX_LOSS_DMG_BEACONS	(20)
378ae5d62cSLior David #define MAX_NUM_OF_SECTORS		(128)
38761f8e4dSLazar Alexei #define WMI_SCHED_MAX_ALLOCS_PER_CMD	(4)
39761f8e4dSLazar Alexei #define WMI_RF_DTYPE_LENGTH		(3)
40761f8e4dSLazar Alexei #define WMI_RF_ETYPE_LENGTH		(3)
41761f8e4dSLazar Alexei #define WMI_RF_RX2TX_LENGTH		(3)
42761f8e4dSLazar Alexei #define WMI_RF_ETYPE_VAL_PER_RANGE	(5)
438a4fa214SAhmad Masri /* DTYPE configuration array size
448a4fa214SAhmad Masri  * must always be kept equal to (WMI_RF_DTYPE_LENGTH+1)
458a4fa214SAhmad Masri  */
468a4fa214SAhmad Masri #define WMI_RF_DTYPE_CONF_LENGTH	(4)
478a4fa214SAhmad Masri /* ETYPE configuration array size
488a4fa214SAhmad Masri  * must always be kept equal to
498a4fa214SAhmad Masri  * (WMI_RF_ETYPE_LENGTH+WMI_RF_ETYPE_VAL_PER_RANGE)
508a4fa214SAhmad Masri  */
518a4fa214SAhmad Masri #define WMI_RF_ETYPE_CONF_LENGTH	(8)
528a4fa214SAhmad Masri /* RX2TX configuration array size
538a4fa214SAhmad Masri  * must always be kept equal to (WMI_RF_RX2TX_LENGTH+1)
548a4fa214SAhmad Masri  */
558a4fa214SAhmad Masri #define WMI_RF_RX2TX_CONF_LENGTH	(4)
56b5aeff16SDedy Lansky /* Qos configuration */
57b5aeff16SDedy Lansky #define WMI_QOS_NUM_OF_PRIORITY		(4)
58b5aeff16SDedy Lansky #define WMI_QOS_MIN_DEFAULT_WEIGHT	(10)
59b5aeff16SDedy Lansky #define WMI_QOS_VRING_SLOT_MIN_MS	(2)
60b5aeff16SDedy Lansky #define WMI_QOS_VRING_SLOT_MAX_MS	(10)
61b5aeff16SDedy Lansky /* (WMI_QOS_MIN_DEFAULT_WEIGHT * WMI_QOS_VRING_SLOT_MAX_MS /
62b5aeff16SDedy Lansky  * WMI_QOS_VRING_SLOT_MIN_MS)
63b5aeff16SDedy Lansky  */
64b5aeff16SDedy Lansky #define WMI_QOS_MAX_WEIGHT		50
65b5aeff16SDedy Lansky #define WMI_QOS_SET_VIF_PRIORITY	(0xFF)
66b5aeff16SDedy Lansky #define WMI_QOS_DEFAULT_PRIORITY	(WMI_QOS_NUM_OF_PRIORITY)
67b874ddecSLior David 
68b874ddecSLior David /* Mailbox interface
69b874ddecSLior David  * used for commands and events
70b874ddecSLior David  */
71b874ddecSLior David enum wmi_mid {
72b874ddecSLior David 	MID_DEFAULT		= 0x00,
73b874ddecSLior David 	FIRST_DBG_MID_ID	= 0x10,
74b874ddecSLior David 	LAST_DBG_MID_ID		= 0xFE,
75b874ddecSLior David 	MID_BROADCAST		= 0xFF,
76b874ddecSLior David };
77b874ddecSLior David 
7808989f96SLior David /* FW capability IDs
7908989f96SLior David  * Each ID maps to a bit in a 32-bit bitmask value provided by the FW to
8008989f96SLior David  * the host
8108989f96SLior David  */
8208989f96SLior David enum wmi_fw_capability {
8308989f96SLior David 	WMI_FW_CAPABILITY_FTM				= 0,
8408989f96SLior David 	WMI_FW_CAPABILITY_PS_CONFIG			= 1,
85cbf795c1SLior David 	WMI_FW_CAPABILITY_RF_SECTORS			= 2,
86cbf795c1SLior David 	WMI_FW_CAPABILITY_MGMT_RETRY_LIMIT		= 3,
878a4fa214SAhmad Masri 	WMI_FW_CAPABILITY_AP_SME_OFFLOAD_PARTIAL	= 4,
880d2370e9SDedy Lansky 	WMI_FW_CAPABILITY_WMI_ONLY			= 5,
8990ffabb0SDedy Lansky 	WMI_FW_CAPABILITY_THERMAL_THROTTLING		= 7,
90fe9ee51eSMaya Erez 	WMI_FW_CAPABILITY_D3_SUSPEND			= 8,
91761f8e4dSLazar Alexei 	WMI_FW_CAPABILITY_LONG_RANGE			= 9,
92761f8e4dSLazar Alexei 	WMI_FW_CAPABILITY_FIXED_SCHEDULING		= 10,
93761f8e4dSLazar Alexei 	WMI_FW_CAPABILITY_MULTI_DIRECTED_OMNIS		= 11,
9430868f5dSDedy Lansky 	WMI_FW_CAPABILITY_RSSI_REPORTING		= 12,
95761f8e4dSLazar Alexei 	WMI_FW_CAPABILITY_SET_SILENT_RSSI_TABLE		= 13,
96761f8e4dSLazar Alexei 	WMI_FW_CAPABILITY_LO_POWER_CALIB_FROM_OTP	= 14,
97a5dc6883SDedy Lansky 	WMI_FW_CAPABILITY_PNO				= 15,
98594b59ecSMaya Erez 	WMI_FW_CAPABILITY_REF_CLOCK_CONTROL		= 18,
998a4fa214SAhmad Masri 	WMI_FW_CAPABILITY_AP_SME_OFFLOAD_NONE		= 19,
100b5aeff16SDedy Lansky 	WMI_FW_CAPABILITY_MULTI_VIFS			= 20,
101b5aeff16SDedy Lansky 	WMI_FW_CAPABILITY_FT_ROAMING			= 21,
1021b99197dSMaya Erez 	WMI_FW_CAPABILITY_BACK_WIN_SIZE_64		= 22,
1037be13fc3SGidon Studinski 	WMI_FW_CAPABILITY_AMSDU				= 23,
104*6a363e8aSAhmad Masri 	WMI_FW_CAPABILITY_RAW_MODE			= 24,
105*6a363e8aSAhmad Masri 	WMI_FW_CAPABILITY_TX_REQ_EXT			= 25,
10608989f96SLior David 	WMI_FW_CAPABILITY_MAX,
10708989f96SLior David };
10808989f96SLior David 
109b874ddecSLior David /* WMI_CMD_HDR */
110b874ddecSLior David struct wmi_cmd_hdr {
111b874ddecSLior David 	u8 mid;
112b874ddecSLior David 	u8 reserved;
113b874ddecSLior David 	__le16 command_id;
114b874ddecSLior David 	__le32 fw_timestamp;
115b874ddecSLior David } __packed;
1162be7d22fSVladimir Kondratiev 
1172be7d22fSVladimir Kondratiev /* List of Commands */
1182be7d22fSVladimir Kondratiev enum wmi_command_id {
119b874ddecSLior David 	WMI_CONNECT_CMDID				= 0x01,
120b874ddecSLior David 	WMI_DISCONNECT_CMDID				= 0x03,
121b874ddecSLior David 	WMI_DISCONNECT_STA_CMDID			= 0x04,
122a5dc6883SDedy Lansky 	WMI_START_SCHED_SCAN_CMDID			= 0x05,
123a5dc6883SDedy Lansky 	WMI_STOP_SCHED_SCAN_CMDID			= 0x06,
124b874ddecSLior David 	WMI_START_SCAN_CMDID				= 0x07,
125b874ddecSLior David 	WMI_SET_BSS_FILTER_CMDID			= 0x09,
126b874ddecSLior David 	WMI_SET_PROBED_SSID_CMDID			= 0x0A,
127761f8e4dSLazar Alexei 	/* deprecated */
128b874ddecSLior David 	WMI_SET_LISTEN_INT_CMDID			= 0x0B,
129b5aeff16SDedy Lansky 	WMI_FT_AUTH_CMDID				= 0x0C,
130b5aeff16SDedy Lansky 	WMI_FT_REASSOC_CMDID				= 0x0D,
131b5aeff16SDedy Lansky 	WMI_UPDATE_FT_IES_CMDID				= 0x0E,
132b874ddecSLior David 	WMI_BCON_CTRL_CMDID				= 0x0F,
133b874ddecSLior David 	WMI_ADD_CIPHER_KEY_CMDID			= 0x16,
134b874ddecSLior David 	WMI_DELETE_CIPHER_KEY_CMDID			= 0x17,
135b874ddecSLior David 	WMI_PCP_CONF_CMDID				= 0x18,
136b874ddecSLior David 	WMI_SET_APPIE_CMDID				= 0x3F,
137b874ddecSLior David 	WMI_SET_WSC_STATUS_CMDID			= 0x41,
138b874ddecSLior David 	WMI_PXMT_RANGE_CFG_CMDID			= 0x42,
139b874ddecSLior David 	WMI_PXMT_SNR2_RANGE_CFG_CMDID			= 0x43,
140*6a363e8aSAhmad Masri 	WMI_RADAR_GENERAL_CONFIG_CMDID			= 0x100,
141*6a363e8aSAhmad Masri 	WMI_RADAR_CONFIG_SELECT_CMDID			= 0x101,
142*6a363e8aSAhmad Masri 	WMI_RADAR_PARAMS_CONFIG_CMDID			= 0x102,
143*6a363e8aSAhmad Masri 	WMI_RADAR_SET_MODE_CMDID			= 0x103,
144*6a363e8aSAhmad Masri 	WMI_RADAR_CONTROL_CMDID				= 0x104,
145*6a363e8aSAhmad Masri 	WMI_RADAR_PCI_CONTROL_CMDID			= 0x105,
146b874ddecSLior David 	WMI_MEM_READ_CMDID				= 0x800,
147b874ddecSLior David 	WMI_MEM_WR_CMDID				= 0x801,
148b874ddecSLior David 	WMI_ECHO_CMDID					= 0x803,
149b874ddecSLior David 	WMI_DEEP_ECHO_CMDID				= 0x804,
150b874ddecSLior David 	WMI_CONFIG_MAC_CMDID				= 0x805,
151761f8e4dSLazar Alexei 	/* deprecated */
152b874ddecSLior David 	WMI_CONFIG_PHY_DEBUG_CMDID			= 0x806,
153b874ddecSLior David 	WMI_ADD_DEBUG_TX_PCKT_CMDID			= 0x808,
154b874ddecSLior David 	WMI_PHY_GET_STATISTICS_CMDID			= 0x809,
155761f8e4dSLazar Alexei 	/* deprecated */
156b874ddecSLior David 	WMI_FS_TUNE_CMDID				= 0x80A,
157761f8e4dSLazar Alexei 	/* deprecated */
158b874ddecSLior David 	WMI_CORR_MEASURE_CMDID				= 0x80B,
159b874ddecSLior David 	WMI_READ_RSSI_CMDID				= 0x80C,
160b874ddecSLior David 	WMI_TEMP_SENSE_CMDID				= 0x80E,
161b874ddecSLior David 	WMI_DC_CALIB_CMDID				= 0x80F,
162761f8e4dSLazar Alexei 	/* deprecated */
163b874ddecSLior David 	WMI_SEND_TONE_CMDID				= 0x810,
164761f8e4dSLazar Alexei 	/* deprecated */
165b874ddecSLior David 	WMI_IQ_TX_CALIB_CMDID				= 0x811,
166761f8e4dSLazar Alexei 	/* deprecated */
167b874ddecSLior David 	WMI_IQ_RX_CALIB_CMDID				= 0x812,
168b874ddecSLior David 	WMI_SET_WORK_MODE_CMDID				= 0x815,
169b874ddecSLior David 	WMI_LO_LEAKAGE_CALIB_CMDID			= 0x816,
170761f8e4dSLazar Alexei 	WMI_LO_POWER_CALIB_FROM_OTP_CMDID		= 0x817,
171b874ddecSLior David 	WMI_SILENT_RSSI_CALIB_CMDID			= 0x81D,
172761f8e4dSLazar Alexei 	/* deprecated */
173b874ddecSLior David 	WMI_RF_RX_TEST_CMDID				= 0x81E,
174b874ddecSLior David 	WMI_CFG_RX_CHAIN_CMDID				= 0x820,
175b874ddecSLior David 	WMI_VRING_CFG_CMDID				= 0x821,
176b874ddecSLior David 	WMI_BCAST_VRING_CFG_CMDID			= 0x822,
17796c93589SGidon Studinski 	WMI_RING_BA_EN_CMDID				= 0x823,
17896c93589SGidon Studinski 	WMI_RING_BA_DIS_CMDID				= 0x824,
179b874ddecSLior David 	WMI_RCP_ADDBA_RESP_CMDID			= 0x825,
180b874ddecSLior David 	WMI_RCP_DELBA_CMDID				= 0x826,
181b874ddecSLior David 	WMI_SET_SSID_CMDID				= 0x827,
182b874ddecSLior David 	WMI_GET_SSID_CMDID				= 0x828,
183b874ddecSLior David 	WMI_SET_PCP_CHANNEL_CMDID			= 0x829,
184b874ddecSLior David 	WMI_GET_PCP_CHANNEL_CMDID			= 0x82A,
185b874ddecSLior David 	WMI_SW_TX_REQ_CMDID				= 0x82B,
186*6a363e8aSAhmad Masri 	/* Event is shared between WMI_SW_TX_REQ_CMDID and
187*6a363e8aSAhmad Masri 	 * WMI_SW_TX_REQ_EXT_CMDID
188*6a363e8aSAhmad Masri 	 */
189*6a363e8aSAhmad Masri 	WMI_SW_TX_REQ_EXT_CMDID				= 0x82C,
190b874ddecSLior David 	WMI_MLME_PUSH_CMDID				= 0x835,
191b874ddecSLior David 	WMI_BEAMFORMING_MGMT_CMDID			= 0x836,
192b874ddecSLior David 	WMI_BF_TXSS_MGMT_CMDID				= 0x837,
193b874ddecSLior David 	WMI_BF_SM_MGMT_CMDID				= 0x838,
194b874ddecSLior David 	WMI_BF_RXSS_MGMT_CMDID				= 0x839,
195b874ddecSLior David 	WMI_BF_TRIG_CMDID				= 0x83A,
19696c93589SGidon Studinski 	WMI_RCP_ADDBA_RESP_EDMA_CMDID			= 0x83B,
1970163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_WRITE_CMDID		= 0x842,
1980163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_READ_CMDID		= 0x843,
199b874ddecSLior David 	WMI_SET_SECTORS_CMDID				= 0x849,
200b874ddecSLior David 	WMI_MAINTAIN_PAUSE_CMDID			= 0x850,
201b874ddecSLior David 	WMI_MAINTAIN_RESUME_CMDID			= 0x851,
202b874ddecSLior David 	WMI_RS_MGMT_CMDID				= 0x852,
203b874ddecSLior David 	WMI_RF_MGMT_CMDID				= 0x853,
204761f8e4dSLazar Alexei 	WMI_RF_XPM_READ_CMDID				= 0x856,
205761f8e4dSLazar Alexei 	WMI_RF_XPM_WRITE_CMDID				= 0x857,
20610d599adSMaya Erez 	WMI_LED_CFG_CMDID				= 0x858,
207761f8e4dSLazar Alexei 	WMI_SET_CONNECT_SNR_THR_CMDID			= 0x85B,
208761f8e4dSLazar Alexei 	WMI_SET_ACTIVE_SILENT_RSSI_TABLE_CMDID		= 0x85C,
209761f8e4dSLazar Alexei 	WMI_RF_PWR_ON_DELAY_CMDID			= 0x85D,
210761f8e4dSLazar Alexei 	WMI_SET_HIGH_POWER_TABLE_PARAMS_CMDID		= 0x85E,
2118a4fa214SAhmad Masri 	WMI_FIXED_SCHEDULING_UL_CONFIG_CMDID		= 0x85F,
2122be7d22fSVladimir Kondratiev 	/* Performance monitoring commands */
213b874ddecSLior David 	WMI_BF_CTRL_CMDID				= 0x862,
214b874ddecSLior David 	WMI_NOTIFY_REQ_CMDID				= 0x863,
215b874ddecSLior David 	WMI_GET_STATUS_CMDID				= 0x864,
2160163b031SMaya Erez 	WMI_GET_RF_STATUS_CMDID				= 0x866,
2170163b031SMaya Erez 	WMI_GET_BASEBAND_TYPE_CMDID			= 0x867,
2188a4fa214SAhmad Masri 	WMI_VRING_SWITCH_TIMING_CONFIG_CMDID		= 0x868,
219b874ddecSLior David 	WMI_UNIT_TEST_CMDID				= 0x900,
220b874ddecSLior David 	WMI_FLASH_READ_CMDID				= 0x902,
221b874ddecSLior David 	WMI_FLASH_WRITE_CMDID				= 0x903,
2220163b031SMaya Erez 	/* Power management */
223fe9ee51eSMaya Erez 	WMI_TRAFFIC_SUSPEND_CMDID			= 0x904,
2240163b031SMaya Erez 	WMI_TRAFFIC_RESUME_CMDID			= 0x905,
225b8023177SVladimir Kondratiev 	/* P2P */
226b874ddecSLior David 	WMI_P2P_CFG_CMDID				= 0x910,
227b874ddecSLior David 	WMI_PORT_ALLOCATE_CMDID				= 0x911,
228b874ddecSLior David 	WMI_PORT_DELETE_CMDID				= 0x912,
229b874ddecSLior David 	WMI_POWER_MGMT_CFG_CMDID			= 0x913,
230b874ddecSLior David 	WMI_START_LISTEN_CMDID				= 0x914,
231b874ddecSLior David 	WMI_START_SEARCH_CMDID				= 0x915,
232b874ddecSLior David 	WMI_DISCOVERY_START_CMDID			= 0x916,
233b874ddecSLior David 	WMI_DISCOVERY_STOP_CMDID			= 0x917,
234b874ddecSLior David 	WMI_PCP_START_CMDID				= 0x918,
235b874ddecSLior David 	WMI_PCP_STOP_CMDID				= 0x919,
236b874ddecSLior David 	WMI_GET_PCP_FACTOR_CMDID			= 0x91B,
2370163b031SMaya Erez 	/* Power Save Configuration Commands */
2380163b031SMaya Erez 	WMI_PS_DEV_PROFILE_CFG_CMDID			= 0x91C,
239b5aeff16SDedy Lansky 	WMI_RS_ENABLE_CMDID				= 0x91E,
240b5aeff16SDedy Lansky 	WMI_RS_CFG_EX_CMDID				= 0x91F,
241b5aeff16SDedy Lansky 	WMI_GET_DETAILED_RS_RES_EX_CMDID		= 0x920,
242b5aeff16SDedy Lansky 	/* deprecated */
2430163b031SMaya Erez 	WMI_RS_CFG_CMDID				= 0x921,
244b5aeff16SDedy Lansky 	/* deprecated */
24508989f96SLior David 	WMI_GET_DETAILED_RS_RES_CMDID			= 0x922,
24608989f96SLior David 	WMI_AOA_MEAS_CMDID				= 0x923,
247a52fb913SLior David 	WMI_BRP_SET_ANT_LIMIT_CMDID			= 0x924,
248cbf795c1SLior David 	WMI_SET_MGMT_RETRY_LIMIT_CMDID			= 0x930,
249cbf795c1SLior David 	WMI_GET_MGMT_RETRY_LIMIT_CMDID			= 0x931,
250849a564bSDedy Lansky 	WMI_NEW_STA_CMDID				= 0x935,
251849a564bSDedy Lansky 	WMI_DEL_STA_CMDID				= 0x936,
25290ffabb0SDedy Lansky 	WMI_SET_THERMAL_THROTTLING_CFG_CMDID		= 0x940,
25390ffabb0SDedy Lansky 	WMI_GET_THERMAL_THROTTLING_CFG_CMDID		= 0x941,
254761f8e4dSLazar Alexei 	/* Read Power Save profile type */
255761f8e4dSLazar Alexei 	WMI_PS_DEV_PROFILE_CFG_READ_CMDID		= 0x942,
2568a4fa214SAhmad Masri 	WMI_TSF_SYNC_CMDID				= 0x973,
25708989f96SLior David 	WMI_TOF_SESSION_START_CMDID			= 0x991,
25808989f96SLior David 	WMI_TOF_GET_CAPABILITIES_CMDID			= 0x992,
25908989f96SLior David 	WMI_TOF_SET_LCR_CMDID				= 0x993,
26008989f96SLior David 	WMI_TOF_SET_LCI_CMDID				= 0x994,
261761f8e4dSLazar Alexei 	WMI_TOF_CFG_RESPONDER_CMDID			= 0x996,
2628ae5d62cSLior David 	WMI_TOF_SET_TX_RX_OFFSET_CMDID			= 0x997,
2638ae5d62cSLior David 	WMI_TOF_GET_TX_RX_OFFSET_CMDID			= 0x998,
264761f8e4dSLazar Alexei 	WMI_TOF_CHANNEL_INFO_CMDID			= 0x999,
265cbf795c1SLior David 	WMI_GET_RF_SECTOR_PARAMS_CMDID			= 0x9A0,
266cbf795c1SLior David 	WMI_SET_RF_SECTOR_PARAMS_CMDID			= 0x9A1,
267cbf795c1SLior David 	WMI_GET_SELECTED_RF_SECTOR_INDEX_CMDID		= 0x9A2,
268cbf795c1SLior David 	WMI_SET_SELECTED_RF_SECTOR_INDEX_CMDID		= 0x9A3,
269cbf795c1SLior David 	WMI_SET_RF_SECTOR_ON_CMDID			= 0x9A4,
2708ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_ORDER_CMDID			= 0x9A5,
2718ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_NUMBER_CMDID		= 0x9A6,
2728ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID	= 0x9A7,
273b5aeff16SDedy Lansky 	/* deprecated */
2748a4fa214SAhmad Masri 	WMI_BF_CONTROL_CMDID				= 0x9AA,
275b5aeff16SDedy Lansky 	WMI_BF_CONTROL_EX_CMDID				= 0x9AB,
27696c93589SGidon Studinski 	WMI_TX_STATUS_RING_ADD_CMDID			= 0x9C0,
27796c93589SGidon Studinski 	WMI_RX_STATUS_RING_ADD_CMDID			= 0x9C1,
27896c93589SGidon Studinski 	WMI_TX_DESC_RING_ADD_CMDID			= 0x9C2,
27996c93589SGidon Studinski 	WMI_RX_DESC_RING_ADD_CMDID			= 0x9C3,
28096c93589SGidon Studinski 	WMI_BCAST_DESC_RING_ADD_CMDID			= 0x9C4,
28196c93589SGidon Studinski 	WMI_CFG_DEF_RX_OFFLOAD_CMDID			= 0x9C5,
282761f8e4dSLazar Alexei 	WMI_SCHEDULING_SCHEME_CMDID			= 0xA01,
283761f8e4dSLazar Alexei 	WMI_FIXED_SCHEDULING_CONFIG_CMDID		= 0xA02,
284761f8e4dSLazar Alexei 	WMI_ENABLE_FIXED_SCHEDULING_CMDID		= 0xA03,
285761f8e4dSLazar Alexei 	WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_CMDID	= 0xA04,
286761f8e4dSLazar Alexei 	WMI_SET_LONG_RANGE_CONFIG_CMDID			= 0xA05,
2878a4fa214SAhmad Masri 	WMI_GET_ASSOC_LIST_CMDID			= 0xA06,
2888a4fa214SAhmad Masri 	WMI_GET_CCA_INDICATIONS_CMDID			= 0xA07,
2898a4fa214SAhmad Masri 	WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_CMDID	= 0xA08,
2908a4fa214SAhmad Masri 	WMI_INTERNAL_FW_IOCTL_CMDID			= 0xA0B,
291b5aeff16SDedy Lansky 	WMI_LINK_STATS_CMDID				= 0xA0C,
292b5aeff16SDedy Lansky 	WMI_SET_GRANT_MCS_CMDID				= 0xA0E,
293b5aeff16SDedy Lansky 	WMI_SET_AP_SLOT_SIZE_CMDID			= 0xA0F,
294b5aeff16SDedy Lansky 	WMI_SET_VRING_PRIORITY_WEIGHT_CMDID		= 0xA10,
295b5aeff16SDedy Lansky 	WMI_SET_VRING_PRIORITY_CMDID			= 0xA11,
296b874ddecSLior David 	WMI_SET_MAC_ADDRESS_CMDID			= 0xF003,
297b874ddecSLior David 	WMI_ABORT_SCAN_CMDID				= 0xF007,
298b874ddecSLior David 	WMI_SET_PROMISCUOUS_MODE_CMDID			= 0xF041,
299761f8e4dSLazar Alexei 	/* deprecated */
300b874ddecSLior David 	WMI_GET_PMK_CMDID				= 0xF048,
301b874ddecSLior David 	WMI_SET_PASSPHRASE_CMDID			= 0xF049,
302761f8e4dSLazar Alexei 	/* deprecated */
303b874ddecSLior David 	WMI_SEND_ASSOC_RES_CMDID			= 0xF04A,
304761f8e4dSLazar Alexei 	/* deprecated */
305b874ddecSLior David 	WMI_SET_ASSOC_REQ_RELAY_CMDID			= 0xF04B,
306b874ddecSLior David 	WMI_MAC_ADDR_REQ_CMDID				= 0xF04D,
307b874ddecSLior David 	WMI_FW_VER_CMDID				= 0xF04E,
308b874ddecSLior David 	WMI_PMC_CMDID					= 0xF04F,
3092be7d22fSVladimir Kondratiev };
3102be7d22fSVladimir Kondratiev 
311b874ddecSLior David /* WMI_CONNECT_CMDID */
3122be7d22fSVladimir Kondratiev enum wmi_network_type {
3132be7d22fSVladimir Kondratiev 	WMI_NETTYPE_INFRA		= 0x01,
3142be7d22fSVladimir Kondratiev 	WMI_NETTYPE_ADHOC		= 0x02,
3152be7d22fSVladimir Kondratiev 	WMI_NETTYPE_ADHOC_CREATOR	= 0x04,
3162be7d22fSVladimir Kondratiev 	WMI_NETTYPE_AP			= 0x10,
3172be7d22fSVladimir Kondratiev 	WMI_NETTYPE_P2P			= 0x20,
318b874ddecSLior David 	/* PCIE over 60g */
319b874ddecSLior David 	WMI_NETTYPE_WBE			= 0x40,
3202be7d22fSVladimir Kondratiev };
3212be7d22fSVladimir Kondratiev 
3222be7d22fSVladimir Kondratiev enum wmi_dot11_auth_mode {
3232be7d22fSVladimir Kondratiev 	WMI_AUTH11_OPEN		= 0x01,
3242be7d22fSVladimir Kondratiev 	WMI_AUTH11_SHARED	= 0x02,
3252be7d22fSVladimir Kondratiev 	WMI_AUTH11_LEAP		= 0x04,
3262be7d22fSVladimir Kondratiev 	WMI_AUTH11_WSC		= 0x08,
3272be7d22fSVladimir Kondratiev };
3282be7d22fSVladimir Kondratiev 
3292be7d22fSVladimir Kondratiev enum wmi_auth_mode {
3302be7d22fSVladimir Kondratiev 	WMI_AUTH_NONE		= 0x01,
3312be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA		= 0x02,
3322be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA2		= 0x04,
3332be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA_PSK	= 0x08,
3342be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA2_PSK	= 0x10,
3352be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA_CCKM	= 0x20,
3362be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA2_CCKM	= 0x40,
3372be7d22fSVladimir Kondratiev };
3382be7d22fSVladimir Kondratiev 
3392be7d22fSVladimir Kondratiev enum wmi_crypto_type {
3402be7d22fSVladimir Kondratiev 	WMI_CRYPT_NONE		= 0x01,
3412be7d22fSVladimir Kondratiev 	WMI_CRYPT_AES_GCMP	= 0x20,
3422be7d22fSVladimir Kondratiev };
3432be7d22fSVladimir Kondratiev 
3442be7d22fSVladimir Kondratiev enum wmi_connect_ctrl_flag_bits {
345b874ddecSLior David 	WMI_CONNECT_ASSOC_POLICY_USER		= 0x01,
346b874ddecSLior David 	WMI_CONNECT_SEND_REASSOC		= 0x02,
347b874ddecSLior David 	WMI_CONNECT_IGNORE_WPA_GROUP_CIPHER	= 0x04,
348b874ddecSLior David 	WMI_CONNECT_PROFILE_MATCH_DONE		= 0x08,
349b874ddecSLior David 	WMI_CONNECT_IGNORE_AAC_BEACON		= 0x10,
350b874ddecSLior David 	WMI_CONNECT_CSA_FOLLOW_BSS		= 0x20,
351b874ddecSLior David 	WMI_CONNECT_DO_WPA_OFFLOAD		= 0x40,
352b874ddecSLior David 	WMI_CONNECT_DO_NOT_DEAUTH		= 0x80,
3532be7d22fSVladimir Kondratiev };
3542be7d22fSVladimir Kondratiev 
3552be7d22fSVladimir Kondratiev #define WMI_MAX_SSID_LEN	(32)
3562be7d22fSVladimir Kondratiev 
357b874ddecSLior David /* WMI_CONNECT_CMDID */
3582be7d22fSVladimir Kondratiev struct wmi_connect_cmd {
3592be7d22fSVladimir Kondratiev 	u8 network_type;
3602be7d22fSVladimir Kondratiev 	u8 dot11_auth_mode;
3612be7d22fSVladimir Kondratiev 	u8 auth_mode;
3622be7d22fSVladimir Kondratiev 	u8 pairwise_crypto_type;
3632be7d22fSVladimir Kondratiev 	u8 pairwise_crypto_len;
3642be7d22fSVladimir Kondratiev 	u8 group_crypto_type;
3652be7d22fSVladimir Kondratiev 	u8 group_crypto_len;
3662be7d22fSVladimir Kondratiev 	u8 ssid_len;
3672be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
3682be7d22fSVladimir Kondratiev 	u8 channel;
3692be7d22fSVladimir Kondratiev 	u8 reserved0;
3702be7d22fSVladimir Kondratiev 	u8 bssid[WMI_MAC_LEN];
3712be7d22fSVladimir Kondratiev 	__le32 ctrl_flags;
3722be7d22fSVladimir Kondratiev 	u8 dst_mac[WMI_MAC_LEN];
3732be7d22fSVladimir Kondratiev 	u8 reserved1[2];
3742be7d22fSVladimir Kondratiev } __packed;
3752be7d22fSVladimir Kondratiev 
376b874ddecSLior David /* WMI_DISCONNECT_STA_CMDID */
377b8023177SVladimir Kondratiev struct wmi_disconnect_sta_cmd {
378b8023177SVladimir Kondratiev 	u8 dst_mac[WMI_MAC_LEN];
379b8023177SVladimir Kondratiev 	__le16 disconnect_reason;
380b8023177SVladimir Kondratiev } __packed;
3812be7d22fSVladimir Kondratiev 
3822be7d22fSVladimir Kondratiev #define WMI_MAX_KEY_INDEX	(3)
3832be7d22fSVladimir Kondratiev #define WMI_MAX_KEY_LEN		(32)
3842be7d22fSVladimir Kondratiev #define WMI_PASSPHRASE_LEN	(64)
3852be7d22fSVladimir Kondratiev 
386b874ddecSLior David /* WMI_SET_PASSPHRASE_CMDID */
3872be7d22fSVladimir Kondratiev struct wmi_set_passphrase_cmd {
3882be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
3892be7d22fSVladimir Kondratiev 	u8 passphrase[WMI_PASSPHRASE_LEN];
3902be7d22fSVladimir Kondratiev 	u8 ssid_len;
3912be7d22fSVladimir Kondratiev 	u8 passphrase_len;
3922be7d22fSVladimir Kondratiev } __packed;
3932be7d22fSVladimir Kondratiev 
394b874ddecSLior David /* WMI_ADD_CIPHER_KEY_CMDID */
3952be7d22fSVladimir Kondratiev enum wmi_key_usage {
396b874ddecSLior David 	WMI_KEY_USE_PAIRWISE	= 0x00,
397b874ddecSLior David 	WMI_KEY_USE_RX_GROUP	= 0x01,
398b874ddecSLior David 	WMI_KEY_USE_TX_GROUP	= 0x02,
3992be7d22fSVladimir Kondratiev };
4002be7d22fSVladimir Kondratiev 
4012be7d22fSVladimir Kondratiev struct wmi_add_cipher_key_cmd {
4022be7d22fSVladimir Kondratiev 	u8 key_index;
4032be7d22fSVladimir Kondratiev 	u8 key_type;
404b874ddecSLior David 	/* enum wmi_key_usage */
405b874ddecSLior David 	u8 key_usage;
4062be7d22fSVladimir Kondratiev 	u8 key_len;
407b874ddecSLior David 	/* key replay sequence counter */
408b874ddecSLior David 	u8 key_rsc[8];
4092be7d22fSVladimir Kondratiev 	u8 key[WMI_MAX_KEY_LEN];
410b874ddecSLior David 	/* Additional Key Control information */
411b874ddecSLior David 	u8 key_op_ctrl;
4122be7d22fSVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
4132be7d22fSVladimir Kondratiev } __packed;
4142be7d22fSVladimir Kondratiev 
415b874ddecSLior David /* WMI_DELETE_CIPHER_KEY_CMDID */
4162be7d22fSVladimir Kondratiev struct wmi_delete_cipher_key_cmd {
4172be7d22fSVladimir Kondratiev 	u8 key_index;
4182be7d22fSVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
4192be7d22fSVladimir Kondratiev } __packed;
4202be7d22fSVladimir Kondratiev 
421b874ddecSLior David /* WMI_START_SCAN_CMDID
4222be7d22fSVladimir Kondratiev  *
4232be7d22fSVladimir Kondratiev  * Start L1 scan operation
4242be7d22fSVladimir Kondratiev  *
4252be7d22fSVladimir Kondratiev  * Returned events:
4262be7d22fSVladimir Kondratiev  * - WMI_RX_MGMT_PACKET_EVENTID - for every probe resp.
4272be7d22fSVladimir Kondratiev  * - WMI_SCAN_COMPLETE_EVENTID
4282be7d22fSVladimir Kondratiev  */
4292be7d22fSVladimir Kondratiev enum wmi_scan_type {
430b874ddecSLior David 	WMI_ACTIVE_SCAN		= 0x00,
431b874ddecSLior David 	WMI_SHORT_SCAN		= 0x01,
432b874ddecSLior David 	WMI_PASSIVE_SCAN	= 0x02,
433b874ddecSLior David 	WMI_DIRECT_SCAN		= 0x03,
434b874ddecSLior David 	WMI_LONG_SCAN		= 0x04,
4352be7d22fSVladimir Kondratiev };
4362be7d22fSVladimir Kondratiev 
437b874ddecSLior David /* WMI_START_SCAN_CMDID */
4382be7d22fSVladimir Kondratiev struct wmi_start_scan_cmd {
439b874ddecSLior David 	u8 direct_scan_mac_addr[WMI_MAC_LEN];
4400163b031SMaya Erez 	/* run scan with discovery beacon. Relevant for ACTIVE scan only. */
44174997a53SLior David 	u8 discovery_mode;
44274997a53SLior David 	u8 reserved;
443b874ddecSLior David 	/* Max duration in the home channel(ms) */
444b874ddecSLior David 	__le32 dwell_time;
445b874ddecSLior David 	/* Time interval between scans (ms) */
446b874ddecSLior David 	__le32 force_scan_interval;
447b874ddecSLior David 	/* enum wmi_scan_type */
448b874ddecSLior David 	u8 scan_type;
449b874ddecSLior David 	/* how many channels follow */
450b874ddecSLior David 	u8 num_channels;
451b874ddecSLior David 	/* channels ID's:
452b874ddecSLior David 	 * 0 - 58320 MHz
453b874ddecSLior David 	 * 1 - 60480 MHz
454b874ddecSLior David 	 * 2 - 62640 MHz
455b874ddecSLior David 	 */
4562be7d22fSVladimir Kondratiev 	struct {
4572be7d22fSVladimir Kondratiev 		u8 channel;
4582be7d22fSVladimir Kondratiev 		u8 reserved;
459b874ddecSLior David 	} channel_list[0];
4602be7d22fSVladimir Kondratiev } __packed;
4612be7d22fSVladimir Kondratiev 
462a5dc6883SDedy Lansky #define WMI_MAX_PNO_SSID_NUM	(16)
463a5dc6883SDedy Lansky #define WMI_MAX_CHANNEL_NUM	(6)
464a5dc6883SDedy Lansky #define WMI_MAX_PLANS_NUM	(2)
465a5dc6883SDedy Lansky 
466a5dc6883SDedy Lansky /* WMI_START_SCHED_SCAN_CMDID */
467a5dc6883SDedy Lansky struct wmi_sched_scan_ssid_match {
468a5dc6883SDedy Lansky 	u8 ssid_len;
469a5dc6883SDedy Lansky 	u8 ssid[WMI_MAX_SSID_LEN];
470a5dc6883SDedy Lansky 	s8 rssi_threshold;
471a5dc6883SDedy Lansky 	/* boolean */
472a5dc6883SDedy Lansky 	u8 add_ssid_to_probe;
473a5dc6883SDedy Lansky 	u8 reserved;
474a5dc6883SDedy Lansky } __packed;
475a5dc6883SDedy Lansky 
476a5dc6883SDedy Lansky /* WMI_START_SCHED_SCAN_CMDID */
477a5dc6883SDedy Lansky struct wmi_sched_scan_plan {
478a5dc6883SDedy Lansky 	__le16 interval_sec;
479a5dc6883SDedy Lansky 	__le16 num_of_iterations;
480a5dc6883SDedy Lansky } __packed;
481a5dc6883SDedy Lansky 
482a5dc6883SDedy Lansky /* WMI_START_SCHED_SCAN_CMDID */
483a5dc6883SDedy Lansky struct wmi_start_sched_scan_cmd {
484a5dc6883SDedy Lansky 	struct wmi_sched_scan_ssid_match ssid_for_match[WMI_MAX_PNO_SSID_NUM];
485a5dc6883SDedy Lansky 	u8 num_of_ssids;
486a5dc6883SDedy Lansky 	s8 min_rssi_threshold;
487a5dc6883SDedy Lansky 	u8 channel_list[WMI_MAX_CHANNEL_NUM];
488a5dc6883SDedy Lansky 	u8 num_of_channels;
489a5dc6883SDedy Lansky 	u8 reserved;
490a5dc6883SDedy Lansky 	__le16 initial_delay_sec;
491a5dc6883SDedy Lansky 	struct wmi_sched_scan_plan scan_plans[WMI_MAX_PLANS_NUM];
492a5dc6883SDedy Lansky } __packed;
493a5dc6883SDedy Lansky 
494b5aeff16SDedy Lansky /* WMI_FT_AUTH_CMDID */
495b5aeff16SDedy Lansky struct wmi_ft_auth_cmd {
496b5aeff16SDedy Lansky 	u8 bssid[WMI_MAC_LEN];
497b5aeff16SDedy Lansky 	/* enum wmi_channel */
498b5aeff16SDedy Lansky 	u8 channel;
499b5aeff16SDedy Lansky 	/* enum wmi_channel */
500b5aeff16SDedy Lansky 	u8 edmg_channel;
501b5aeff16SDedy Lansky 	u8 reserved[4];
502b5aeff16SDedy Lansky } __packed;
503b5aeff16SDedy Lansky 
504b5aeff16SDedy Lansky /* WMI_FT_REASSOC_CMDID */
505b5aeff16SDedy Lansky struct wmi_ft_reassoc_cmd {
506b5aeff16SDedy Lansky 	u8 bssid[WMI_MAC_LEN];
507b5aeff16SDedy Lansky 	u8 reserved[2];
508b5aeff16SDedy Lansky } __packed;
509b5aeff16SDedy Lansky 
510b5aeff16SDedy Lansky /* WMI_UPDATE_FT_IES_CMDID */
511b5aeff16SDedy Lansky struct wmi_update_ft_ies_cmd {
512b5aeff16SDedy Lansky 	/* Length of the FT IEs */
513b5aeff16SDedy Lansky 	__le16 ie_len;
514b5aeff16SDedy Lansky 	u8 reserved[2];
515b5aeff16SDedy Lansky 	u8 ie_info[0];
516b5aeff16SDedy Lansky } __packed;
517b5aeff16SDedy Lansky 
518b874ddecSLior David /* WMI_SET_PROBED_SSID_CMDID */
519b8023177SVladimir Kondratiev #define MAX_PROBED_SSID_INDEX	(3)
5202be7d22fSVladimir Kondratiev 
5212be7d22fSVladimir Kondratiev enum wmi_ssid_flag {
522b874ddecSLior David 	/* disables entry */
523b874ddecSLior David 	WMI_SSID_FLAG_DISABLE	= 0x00,
524b874ddecSLior David 	/* probes specified ssid */
525b874ddecSLior David 	WMI_SSID_FLAG_SPECIFIC	= 0x01,
526b874ddecSLior David 	/* probes for any ssid */
527b874ddecSLior David 	WMI_SSID_FLAG_ANY	= 0x02,
5282be7d22fSVladimir Kondratiev };
5292be7d22fSVladimir Kondratiev 
5302be7d22fSVladimir Kondratiev struct wmi_probed_ssid_cmd {
531b874ddecSLior David 	/* 0 to MAX_PROBED_SSID_INDEX */
532b874ddecSLior David 	u8 entry_index;
533b874ddecSLior David 	/* enum wmi_ssid_flag */
534b874ddecSLior David 	u8 flag;
5352be7d22fSVladimir Kondratiev 	u8 ssid_len;
5362be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
5372be7d22fSVladimir Kondratiev } __packed;
5382be7d22fSVladimir Kondratiev 
539b874ddecSLior David /* WMI_SET_APPIE_CMDID
5402be7d22fSVladimir Kondratiev  * Add Application specified IE to a management frame
5412be7d22fSVladimir Kondratiev  */
542b8023177SVladimir Kondratiev #define WMI_MAX_IE_LEN	(1024)
543b8023177SVladimir Kondratiev 
544b874ddecSLior David /* Frame Types */
545b8023177SVladimir Kondratiev enum wmi_mgmt_frame_type {
546b874ddecSLior David 	WMI_FRAME_BEACON	= 0x00,
547b874ddecSLior David 	WMI_FRAME_PROBE_REQ	= 0x01,
548b874ddecSLior David 	WMI_FRAME_PROBE_RESP	= 0x02,
549b874ddecSLior David 	WMI_FRAME_ASSOC_REQ	= 0x03,
550b874ddecSLior David 	WMI_FRAME_ASSOC_RESP	= 0x04,
551b874ddecSLior David 	WMI_NUM_MGMT_FRAME	= 0x05,
552b8023177SVladimir Kondratiev };
553b8023177SVladimir Kondratiev 
5542be7d22fSVladimir Kondratiev struct wmi_set_appie_cmd {
555b874ddecSLior David 	/* enum wmi_mgmt_frame_type */
556b874ddecSLior David 	u8 mgmt_frm_type;
5572be7d22fSVladimir Kondratiev 	u8 reserved;
558b874ddecSLior David 	/* Length of the IE to be added to MGMT frame */
559b874ddecSLior David 	__le16 ie_len;
5602be7d22fSVladimir Kondratiev 	u8 ie_info[0];
5612be7d22fSVladimir Kondratiev } __packed;
5622be7d22fSVladimir Kondratiev 
563b874ddecSLior David /* WMI_PXMT_RANGE_CFG_CMDID */
5642be7d22fSVladimir Kondratiev struct wmi_pxmt_range_cfg_cmd {
5652be7d22fSVladimir Kondratiev 	u8 dst_mac[WMI_MAC_LEN];
5662be7d22fSVladimir Kondratiev 	__le16 range;
5672be7d22fSVladimir Kondratiev } __packed;
5682be7d22fSVladimir Kondratiev 
569b874ddecSLior David /* WMI_PXMT_SNR2_RANGE_CFG_CMDID */
5702be7d22fSVladimir Kondratiev struct wmi_pxmt_snr2_range_cfg_cmd {
571b874ddecSLior David 	s8 snr2range_arr[2];
5722be7d22fSVladimir Kondratiev } __packed;
5732be7d22fSVladimir Kondratiev 
574*6a363e8aSAhmad Masri /* WMI_RADAR_GENERAL_CONFIG_CMDID */
575*6a363e8aSAhmad Masri struct wmi_radar_general_config_cmd {
576*6a363e8aSAhmad Masri 	/* Number of pulses (CIRs) in FW FIFO to initiate pulses transfer
577*6a363e8aSAhmad Masri 	 * from FW to Host
578*6a363e8aSAhmad Masri 	 */
579*6a363e8aSAhmad Masri 	__le32 fifo_watermark;
580*6a363e8aSAhmad Masri 	/* In unit of us, in the range [100, 1000000] */
581*6a363e8aSAhmad Masri 	__le32 t_burst;
582*6a363e8aSAhmad Masri 	/* Valid in the range [1, 32768], 0xFFFF means infinite */
583*6a363e8aSAhmad Masri 	__le32 n_bursts;
584*6a363e8aSAhmad Masri 	/* In unit of 330Mhz clk, in the range [4, 2000]*330 */
585*6a363e8aSAhmad Masri 	__le32 t_pulse;
586*6a363e8aSAhmad Masri 	/* In the range of [1,4096] */
587*6a363e8aSAhmad Masri 	__le16 n_pulses;
588*6a363e8aSAhmad Masri 	/* Number of taps after cTap per CIR */
589*6a363e8aSAhmad Masri 	__le16 n_samples;
590*6a363e8aSAhmad Masri 	/* Offset from the main tap (0 = zero-distance). In the range of [0,
591*6a363e8aSAhmad Masri 	 * 255]
592*6a363e8aSAhmad Masri 	 */
593*6a363e8aSAhmad Masri 	u8 first_sample_offset;
594*6a363e8aSAhmad Masri 	/* Number of Pulses to average, 1, 2, 4, 8 */
595*6a363e8aSAhmad Masri 	u8 pulses_to_avg;
596*6a363e8aSAhmad Masri 	/* Number of adjacent taps to average, 1, 2, 4, 8 */
597*6a363e8aSAhmad Masri 	u8 samples_to_avg;
598*6a363e8aSAhmad Masri 	/* The index to config general params */
599*6a363e8aSAhmad Masri 	u8 general_index;
600*6a363e8aSAhmad Masri 	u8 reserved[4];
601*6a363e8aSAhmad Masri } __packed;
602*6a363e8aSAhmad Masri 
603*6a363e8aSAhmad Masri /* WMI_RADAR_CONFIG_SELECT_CMDID */
604*6a363e8aSAhmad Masri struct wmi_radar_config_select_cmd {
605*6a363e8aSAhmad Masri 	/* Select the general params index to use */
606*6a363e8aSAhmad Masri 	u8 general_index;
607*6a363e8aSAhmad Masri 	u8 reserved[3];
608*6a363e8aSAhmad Masri 	/* 0 means don't update burst_active_vector */
609*6a363e8aSAhmad Masri 	__le32 burst_active_vector;
610*6a363e8aSAhmad Masri 	/* 0 means don't update pulse_active_vector */
611*6a363e8aSAhmad Masri 	__le32 pulse_active_vector;
612*6a363e8aSAhmad Masri } __packed;
613*6a363e8aSAhmad Masri 
614*6a363e8aSAhmad Masri /* WMI_RADAR_PARAMS_CONFIG_CMDID */
615*6a363e8aSAhmad Masri struct wmi_radar_params_config_cmd {
616*6a363e8aSAhmad Masri 	/* The burst index selected to config */
617*6a363e8aSAhmad Masri 	u8 burst_index;
618*6a363e8aSAhmad Masri 	/* 0-not active, 1-active */
619*6a363e8aSAhmad Masri 	u8 burst_en;
620*6a363e8aSAhmad Masri 	/* The pulse index selected to config */
621*6a363e8aSAhmad Masri 	u8 pulse_index;
622*6a363e8aSAhmad Masri 	/* 0-not active, 1-active */
623*6a363e8aSAhmad Masri 	u8 pulse_en;
624*6a363e8aSAhmad Masri 	/* TX RF to use on current pulse */
625*6a363e8aSAhmad Masri 	u8 tx_rfc_idx;
626*6a363e8aSAhmad Masri 	u8 tx_sector;
627*6a363e8aSAhmad Masri 	/* Offset from calibrated value.(expected to be 0)(value is row in
628*6a363e8aSAhmad Masri 	 * Gain-LUT, not dB)
629*6a363e8aSAhmad Masri 	 */
630*6a363e8aSAhmad Masri 	s8 tx_rf_gain_comp;
631*6a363e8aSAhmad Masri 	/* expected to be 0 */
632*6a363e8aSAhmad Masri 	s8 tx_bb_gain_comp;
633*6a363e8aSAhmad Masri 	/* RX RF to use on current pulse */
634*6a363e8aSAhmad Masri 	u8 rx_rfc_idx;
635*6a363e8aSAhmad Masri 	u8 rx_sector;
636*6a363e8aSAhmad Masri 	/* Offset from calibrated value.(expected to be 0)(value is row in
637*6a363e8aSAhmad Masri 	 * Gain-LUT, not dB)
638*6a363e8aSAhmad Masri 	 */
639*6a363e8aSAhmad Masri 	s8 rx_rf_gain_comp;
640*6a363e8aSAhmad Masri 	/* Value in dB.(expected to be 0) */
641*6a363e8aSAhmad Masri 	s8 rx_bb_gain_comp;
642*6a363e8aSAhmad Masri 	/* Offset from calibrated value.(expected to be 0) */
643*6a363e8aSAhmad Masri 	s8 rx_timing_offset;
644*6a363e8aSAhmad Masri 	u8 reserved[3];
645*6a363e8aSAhmad Masri } __packed;
646*6a363e8aSAhmad Masri 
647*6a363e8aSAhmad Masri /* WMI_RADAR_SET_MODE_CMDID */
648*6a363e8aSAhmad Masri struct wmi_radar_set_mode_cmd {
649*6a363e8aSAhmad Masri 	/* 0-disable/1-enable */
650*6a363e8aSAhmad Masri 	u8 enable;
651*6a363e8aSAhmad Masri 	/* enum wmi_channel */
652*6a363e8aSAhmad Masri 	u8 channel;
653*6a363e8aSAhmad Masri 	/* In the range of [0,7], 0xff means use default */
654*6a363e8aSAhmad Masri 	u8 tx_rfc_idx;
655*6a363e8aSAhmad Masri 	/* In the range of [0,7], 0xff means use default */
656*6a363e8aSAhmad Masri 	u8 rx_rfc_idx;
657*6a363e8aSAhmad Masri } __packed;
658*6a363e8aSAhmad Masri 
659*6a363e8aSAhmad Masri /* WMI_RADAR_CONTROL_CMDID */
660*6a363e8aSAhmad Masri struct wmi_radar_control_cmd {
661*6a363e8aSAhmad Masri 	/* 0-stop/1-start */
662*6a363e8aSAhmad Masri 	u8 start;
663*6a363e8aSAhmad Masri 	u8 reserved[3];
664*6a363e8aSAhmad Masri } __packed;
665*6a363e8aSAhmad Masri 
666*6a363e8aSAhmad Masri /* WMI_RADAR_PCI_CONTROL_CMDID */
667*6a363e8aSAhmad Masri struct wmi_radar_pci_control_cmd {
668*6a363e8aSAhmad Masri 	/* pcie host buffer start address */
669*6a363e8aSAhmad Masri 	__le64 base_addr;
670*6a363e8aSAhmad Masri 	/* pcie host control block address */
671*6a363e8aSAhmad Masri 	__le64 control_block_addr;
672*6a363e8aSAhmad Masri 	/* pcie host buffer size */
673*6a363e8aSAhmad Masri 	__le32 buffer_size;
674*6a363e8aSAhmad Masri 	__le32 reserved;
675*6a363e8aSAhmad Masri } __packed;
676*6a363e8aSAhmad Masri 
677b874ddecSLior David /* WMI_RF_MGMT_CMDID */
6782be7d22fSVladimir Kondratiev enum wmi_rf_mgmt_type {
679b874ddecSLior David 	WMI_RF_MGMT_W_DISABLE	= 0x00,
680b874ddecSLior David 	WMI_RF_MGMT_W_ENABLE	= 0x01,
681b874ddecSLior David 	WMI_RF_MGMT_GET_STATUS	= 0x02,
6822be7d22fSVladimir Kondratiev };
6832be7d22fSVladimir Kondratiev 
6848a4fa214SAhmad Masri /* WMI_BF_CONTROL_CMDID */
6858a4fa214SAhmad Masri enum wmi_bf_triggers {
6868a4fa214SAhmad Masri 	WMI_BF_TRIGGER_RS_MCS1_TH_FAILURE		= 0x01,
6878a4fa214SAhmad Masri 	WMI_BF_TRIGGER_RS_MCS1_NO_BACK_FAILURE		= 0x02,
6888a4fa214SAhmad Masri 	WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP		= 0x04,
6898a4fa214SAhmad Masri 	WMI_BF_TRIGGER_MAX_BACK_FAILURE			= 0x08,
6908a4fa214SAhmad Masri 	WMI_BF_TRIGGER_FW				= 0x10,
6918a4fa214SAhmad Masri 	WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_KEEP_ALIVE	= 0x20,
6928a4fa214SAhmad Masri 	WMI_BF_TRIGGER_AOA				= 0x40,
6938a4fa214SAhmad Masri 	WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_UPM		= 0x80,
6948a4fa214SAhmad Masri };
6958a4fa214SAhmad Masri 
696b874ddecSLior David /* WMI_RF_MGMT_CMDID */
6972be7d22fSVladimir Kondratiev struct wmi_rf_mgmt_cmd {
6982be7d22fSVladimir Kondratiev 	__le32 rf_mgmt_type;
6992be7d22fSVladimir Kondratiev } __packed;
7002be7d22fSVladimir Kondratiev 
701b874ddecSLior David /* WMI_CORR_MEASURE_CMDID */
702b8023177SVladimir Kondratiev struct wmi_corr_measure_cmd {
703b874ddecSLior David 	__le32 freq_mhz;
704b8023177SVladimir Kondratiev 	__le32 length_samples;
705b8023177SVladimir Kondratiev 	__le32 iterations;
706b8023177SVladimir Kondratiev } __packed;
707b8023177SVladimir Kondratiev 
708b874ddecSLior David /* WMI_SET_SSID_CMDID */
7092be7d22fSVladimir Kondratiev struct wmi_set_ssid_cmd {
7102be7d22fSVladimir Kondratiev 	__le32 ssid_len;
7112be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
7122be7d22fSVladimir Kondratiev } __packed;
7132be7d22fSVladimir Kondratiev 
714b874ddecSLior David /* WMI_SET_PCP_CHANNEL_CMDID */
7152be7d22fSVladimir Kondratiev struct wmi_set_pcp_channel_cmd {
7162be7d22fSVladimir Kondratiev 	u8 channel;
7172be7d22fSVladimir Kondratiev 	u8 reserved[3];
7182be7d22fSVladimir Kondratiev } __packed;
7192be7d22fSVladimir Kondratiev 
720b874ddecSLior David /* WMI_BCON_CTRL_CMDID */
7212be7d22fSVladimir Kondratiev struct wmi_bcon_ctrl_cmd {
7222be7d22fSVladimir Kondratiev 	__le16 bcon_interval;
7232be7d22fSVladimir Kondratiev 	__le16 frag_num;
7242be7d22fSVladimir Kondratiev 	__le64 ss_mask;
7252be7d22fSVladimir Kondratiev 	u8 network_type;
7266c2faf09SVladimir Kondratiev 	u8 pcp_max_assoc_sta;
7272be7d22fSVladimir Kondratiev 	u8 disable_sec_offload;
7282be7d22fSVladimir Kondratiev 	u8 disable_sec;
729b874ddecSLior David 	u8 hidden_ssid;
730b874ddecSLior David 	u8 is_go;
7318a4fa214SAhmad Masri 	/* A-BFT length override if non-0 */
7328a4fa214SAhmad Masri 	u8 abft_len;
7338a4fa214SAhmad Masri 	u8 reserved;
7342be7d22fSVladimir Kondratiev } __packed;
7352be7d22fSVladimir Kondratiev 
736b874ddecSLior David /* WMI_PORT_ALLOCATE_CMDID */
737b8023177SVladimir Kondratiev enum wmi_port_role {
738b874ddecSLior David 	WMI_PORT_STA		= 0x00,
739b874ddecSLior David 	WMI_PORT_PCP		= 0x01,
740b874ddecSLior David 	WMI_PORT_AP		= 0x02,
741b874ddecSLior David 	WMI_PORT_P2P_DEV	= 0x03,
742b874ddecSLior David 	WMI_PORT_P2P_CLIENT	= 0x04,
743b874ddecSLior David 	WMI_PORT_P2P_GO		= 0x05,
744b8023177SVladimir Kondratiev };
745b8023177SVladimir Kondratiev 
746b874ddecSLior David /* WMI_PORT_ALLOCATE_CMDID */
747b8023177SVladimir Kondratiev struct wmi_port_allocate_cmd {
748b8023177SVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
749b8023177SVladimir Kondratiev 	u8 port_role;
7506c2faf09SVladimir Kondratiev 	u8 mid;
751b8023177SVladimir Kondratiev } __packed;
752b8023177SVladimir Kondratiev 
753b874ddecSLior David /* WMI_PORT_DELETE_CMDID */
754b874ddecSLior David struct wmi_port_delete_cmd {
755b8023177SVladimir Kondratiev 	u8 mid;
756b8023177SVladimir Kondratiev 	u8 reserved[3];
757b8023177SVladimir Kondratiev } __packed;
758b8023177SVladimir Kondratiev 
759fe9ee51eSMaya Erez /* WMI_TRAFFIC_SUSPEND_CMD wakeup trigger bit mask values */
760fe9ee51eSMaya Erez enum wmi_wakeup_trigger {
761fe9ee51eSMaya Erez 	WMI_WAKEUP_TRIGGER_UCAST	= 0x01,
762fe9ee51eSMaya Erez 	WMI_WAKEUP_TRIGGER_BCAST	= 0x02,
763fe9ee51eSMaya Erez };
764fe9ee51eSMaya Erez 
765fe9ee51eSMaya Erez /* WMI_TRAFFIC_SUSPEND_CMDID */
766fe9ee51eSMaya Erez struct wmi_traffic_suspend_cmd {
7670163b031SMaya Erez 	/* Bit vector: bit[0] - wake on Unicast, bit[1] - wake on Broadcast */
7680163b031SMaya Erez 	u8 wakeup_trigger;
7690163b031SMaya Erez } __packed;
7700163b031SMaya Erez 
771b874ddecSLior David /* WMI_P2P_CFG_CMDID */
772b8023177SVladimir Kondratiev enum wmi_discovery_mode {
773b874ddecSLior David 	WMI_DISCOVERY_MODE_NON_OFFLOAD	= 0x00,
774b874ddecSLior David 	WMI_DISCOVERY_MODE_OFFLOAD	= 0x01,
775b874ddecSLior David 	WMI_DISCOVERY_MODE_PEER2PEER	= 0x02,
776b8023177SVladimir Kondratiev };
777b8023177SVladimir Kondratiev 
778b8023177SVladimir Kondratiev struct wmi_p2p_cfg_cmd {
779b874ddecSLior David 	/* enum wmi_discovery_mode */
780b874ddecSLior David 	u8 discovery_mode;
781b8023177SVladimir Kondratiev 	u8 channel;
782b874ddecSLior David 	/* base to listen/search duration calculation */
783b874ddecSLior David 	__le16 bcon_interval;
784b8023177SVladimir Kondratiev } __packed;
785b8023177SVladimir Kondratiev 
786b874ddecSLior David /* WMI_POWER_MGMT_CFG_CMDID */
787b8023177SVladimir Kondratiev enum wmi_power_source_type {
788b874ddecSLior David 	WMI_POWER_SOURCE_BATTERY	= 0x00,
789b874ddecSLior David 	WMI_POWER_SOURCE_OTHER		= 0x01,
790b8023177SVladimir Kondratiev };
791b8023177SVladimir Kondratiev 
792b8023177SVladimir Kondratiev struct wmi_power_mgmt_cfg_cmd {
793b874ddecSLior David 	/* enum wmi_power_source_type */
794b874ddecSLior David 	u8 power_source;
795b8023177SVladimir Kondratiev 	u8 reserved[3];
796b8023177SVladimir Kondratiev } __packed;
797b8023177SVladimir Kondratiev 
798b874ddecSLior David /* WMI_PCP_START_CMDID */
7998a4fa214SAhmad Masri enum wmi_ap_sme_offload_mode {
8008a4fa214SAhmad Masri 	/* Full AP SME in FW */
8018a4fa214SAhmad Masri 	WMI_AP_SME_OFFLOAD_FULL		= 0x00,
8028a4fa214SAhmad Masri 	/* Probe AP SME in FW */
8038a4fa214SAhmad Masri 	WMI_AP_SME_OFFLOAD_PARTIAL	= 0x01,
8048a4fa214SAhmad Masri 	/* AP SME in host */
8058a4fa214SAhmad Masri 	WMI_AP_SME_OFFLOAD_NONE		= 0x02,
8068a4fa214SAhmad Masri };
8078a4fa214SAhmad Masri 
8088a4fa214SAhmad Masri /* WMI_PCP_START_CMDID */
809b8023177SVladimir Kondratiev struct wmi_pcp_start_cmd {
810b8023177SVladimir Kondratiev 	__le16 bcon_interval;
8116c2faf09SVladimir Kondratiev 	u8 pcp_max_assoc_sta;
8128e52fe30SHamad Kadmany 	u8 hidden_ssid;
813b874ddecSLior David 	u8 is_go;
814*6a363e8aSAhmad Masri 	/* enum wmi_channel WMI_CHANNEL_9..WMI_CHANNEL_12 */
815*6a363e8aSAhmad Masri 	u8 edmg_channel;
816*6a363e8aSAhmad Masri 	u8 raw_mode;
817*6a363e8aSAhmad Masri 	u8 reserved[3];
81890ffabb0SDedy Lansky 	/* A-BFT length override if non-0 */
819a52fb913SLior David 	u8 abft_len;
8208a4fa214SAhmad Masri 	/* enum wmi_ap_sme_offload_mode_e */
8218a4fa214SAhmad Masri 	u8 ap_sme_offload_mode;
822b8023177SVladimir Kondratiev 	u8 network_type;
823*6a363e8aSAhmad Masri 	/* enum wmi_channel WMI_CHANNEL_1..WMI_CHANNEL_6; for EDMG this is
824*6a363e8aSAhmad Masri 	 * the primary channel number
825*6a363e8aSAhmad Masri 	 */
826b8023177SVladimir Kondratiev 	u8 channel;
827b8023177SVladimir Kondratiev 	u8 disable_sec_offload;
828b8023177SVladimir Kondratiev 	u8 disable_sec;
829b8023177SVladimir Kondratiev } __packed;
830b8023177SVladimir Kondratiev 
831b874ddecSLior David /* WMI_SW_TX_REQ_CMDID */
8322be7d22fSVladimir Kondratiev struct wmi_sw_tx_req_cmd {
8332be7d22fSVladimir Kondratiev 	u8 dst_mac[WMI_MAC_LEN];
8342be7d22fSVladimir Kondratiev 	__le16 len;
8352be7d22fSVladimir Kondratiev 	u8 payload[0];
8362be7d22fSVladimir Kondratiev } __packed;
8372be7d22fSVladimir Kondratiev 
838*6a363e8aSAhmad Masri /* WMI_SW_TX_REQ_EXT_CMDID */
839*6a363e8aSAhmad Masri struct wmi_sw_tx_req_ext_cmd {
840*6a363e8aSAhmad Masri 	u8 dst_mac[WMI_MAC_LEN];
841*6a363e8aSAhmad Masri 	__le16 len;
842*6a363e8aSAhmad Masri 	__le16 duration_ms;
843*6a363e8aSAhmad Masri 	/* Channel to use, 0xFF for currently active channel */
844*6a363e8aSAhmad Masri 	u8 channel;
845*6a363e8aSAhmad Masri 	u8 reserved[5];
846*6a363e8aSAhmad Masri 	u8 payload[0];
847*6a363e8aSAhmad Masri } __packed;
848*6a363e8aSAhmad Masri 
8498a4fa214SAhmad Masri /* WMI_VRING_SWITCH_TIMING_CONFIG_CMDID */
8508a4fa214SAhmad Masri struct wmi_vring_switch_timing_config_cmd {
8518a4fa214SAhmad Masri 	/* Set vring timing configuration:
8528a4fa214SAhmad Masri 	 *
8538a4fa214SAhmad Masri 	 * defined interval for vring switch
8548a4fa214SAhmad Masri 	 */
8558a4fa214SAhmad Masri 	__le32 interval_usec;
8568a4fa214SAhmad Masri 	/* vring inactivity threshold */
8578a4fa214SAhmad Masri 	__le32 idle_th_usec;
8588a4fa214SAhmad Masri } __packed;
8598a4fa214SAhmad Masri 
8602be7d22fSVladimir Kondratiev struct wmi_sw_ring_cfg {
8612be7d22fSVladimir Kondratiev 	__le64 ring_mem_base;
8622be7d22fSVladimir Kondratiev 	__le16 ring_size;
8632be7d22fSVladimir Kondratiev 	__le16 max_mpdu_size;
8642be7d22fSVladimir Kondratiev } __packed;
8652be7d22fSVladimir Kondratiev 
866b874ddecSLior David /* wmi_vring_cfg_schd */
8672be7d22fSVladimir Kondratiev struct wmi_vring_cfg_schd {
8682be7d22fSVladimir Kondratiev 	__le16 priority;
8692be7d22fSVladimir Kondratiev 	__le16 timeslot_us;
8702be7d22fSVladimir Kondratiev } __packed;
8712be7d22fSVladimir Kondratiev 
8722be7d22fSVladimir Kondratiev enum wmi_vring_cfg_encap_trans_type {
873b874ddecSLior David 	WMI_VRING_ENC_TYPE_802_3	= 0x00,
874b874ddecSLior David 	WMI_VRING_ENC_TYPE_NATIVE_WIFI	= 0x01,
875*6a363e8aSAhmad Masri 	WMI_VRING_ENC_TYPE_NONE		= 0x02,
8762be7d22fSVladimir Kondratiev };
8772be7d22fSVladimir Kondratiev 
8782be7d22fSVladimir Kondratiev enum wmi_vring_cfg_ds_cfg {
879b874ddecSLior David 	WMI_VRING_DS_PBSS	= 0x00,
880b874ddecSLior David 	WMI_VRING_DS_STATION	= 0x01,
881b874ddecSLior David 	WMI_VRING_DS_AP		= 0x02,
882b874ddecSLior David 	WMI_VRING_DS_ADDR4	= 0x03,
8832be7d22fSVladimir Kondratiev };
8842be7d22fSVladimir Kondratiev 
8852be7d22fSVladimir Kondratiev enum wmi_vring_cfg_nwifi_ds_trans_type {
886b874ddecSLior David 	WMI_NWIFI_TX_TRANS_MODE_NO		= 0x00,
887b874ddecSLior David 	WMI_NWIFI_TX_TRANS_MODE_AP2PBSS		= 0x01,
888b874ddecSLior David 	WMI_NWIFI_TX_TRANS_MODE_STA2PBSS	= 0x02,
8892be7d22fSVladimir Kondratiev };
8902be7d22fSVladimir Kondratiev 
8912be7d22fSVladimir Kondratiev enum wmi_vring_cfg_schd_params_priority {
892b874ddecSLior David 	WMI_SCH_PRIO_REGULAR	= 0x00,
893b874ddecSLior David 	WMI_SCH_PRIO_HIGH	= 0x01,
8942be7d22fSVladimir Kondratiev };
8952be7d22fSVladimir Kondratiev 
8968a4fa214SAhmad Masri #define CIDXTID_EXTENDED_CID_TID		(0xFF)
8972be7d22fSVladimir Kondratiev #define CIDXTID_CID_POS				(0)
8982be7d22fSVladimir Kondratiev #define CIDXTID_CID_LEN				(4)
8992be7d22fSVladimir Kondratiev #define CIDXTID_CID_MSK				(0xF)
9002be7d22fSVladimir Kondratiev #define CIDXTID_TID_POS				(4)
9012be7d22fSVladimir Kondratiev #define CIDXTID_TID_LEN				(4)
9022be7d22fSVladimir Kondratiev #define CIDXTID_TID_MSK				(0xF0)
9032be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_LIFETIME_EN_POS	(0)
9042be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_LIFETIME_EN_LEN	(1)
9052be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_LIFETIME_EN_MSK	(0x1)
9062be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_AGGR_EN_POS		(1)
9072be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_AGGR_EN_LEN		(1)
9082be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_AGGR_EN_MSK		(0x2)
9092be7d22fSVladimir Kondratiev #define VRING_CFG_TO_RESOLUTION_VALUE_POS	(0)
9102be7d22fSVladimir Kondratiev #define VRING_CFG_TO_RESOLUTION_VALUE_LEN	(6)
9112be7d22fSVladimir Kondratiev #define VRING_CFG_TO_RESOLUTION_VALUE_MSK	(0x3F)
912b874ddecSLior David 
913b874ddecSLior David struct wmi_vring_cfg {
914b874ddecSLior David 	struct wmi_sw_ring_cfg tx_sw_ring;
915b874ddecSLior David 	/* 0-23 vrings */
916b874ddecSLior David 	u8 ringid;
9178a4fa214SAhmad Masri 	/* Used for cid less than 8. For higher cid set
9188a4fa214SAhmad Masri 	 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
9198a4fa214SAhmad Masri 	 */
920b874ddecSLior David 	u8 cidxtid;
921b874ddecSLior David 	u8 encap_trans_type;
922b874ddecSLior David 	/* 802.3 DS cfg */
923b874ddecSLior David 	u8 ds_cfg;
924b874ddecSLior David 	u8 nwifi_ds_trans_type;
925b874ddecSLior David 	u8 mac_ctrl;
9262be7d22fSVladimir Kondratiev 	u8 to_resolution;
9272be7d22fSVladimir Kondratiev 	u8 agg_max_wsize;
9282be7d22fSVladimir Kondratiev 	struct wmi_vring_cfg_schd schd_params;
9298a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
9308a4fa214SAhmad Masri 	u8 cid;
9318a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
9328a4fa214SAhmad Masri 	u8 tid;
933b5aeff16SDedy Lansky 	/* Update the vring's priority for Qos purpose. Set to
934b5aeff16SDedy Lansky 	 * WMI_QOS_DEFAULT_PRIORITY to use MID's QoS priority
935b5aeff16SDedy Lansky 	 */
936b5aeff16SDedy Lansky 	u8 qos_priority;
937b5aeff16SDedy Lansky 	u8 reserved;
9382be7d22fSVladimir Kondratiev } __packed;
9392be7d22fSVladimir Kondratiev 
9402be7d22fSVladimir Kondratiev enum wmi_vring_cfg_cmd_action {
941b874ddecSLior David 	WMI_VRING_CMD_ADD	= 0x00,
942b874ddecSLior David 	WMI_VRING_CMD_MODIFY	= 0x01,
943b874ddecSLior David 	WMI_VRING_CMD_DELETE	= 0x02,
9442be7d22fSVladimir Kondratiev };
9452be7d22fSVladimir Kondratiev 
946b874ddecSLior David /* WMI_VRING_CFG_CMDID */
9472be7d22fSVladimir Kondratiev struct wmi_vring_cfg_cmd {
9482be7d22fSVladimir Kondratiev 	__le32 action;
9492be7d22fSVladimir Kondratiev 	struct wmi_vring_cfg vring_cfg;
9502be7d22fSVladimir Kondratiev } __packed;
9512be7d22fSVladimir Kondratiev 
95262bfd300SVladimir Kondratiev struct wmi_bcast_vring_cfg {
95362bfd300SVladimir Kondratiev 	struct wmi_sw_ring_cfg tx_sw_ring;
954b874ddecSLior David 	/* 0-23 vrings */
955b874ddecSLior David 	u8 ringid;
95662bfd300SVladimir Kondratiev 	u8 encap_trans_type;
957b874ddecSLior David 	/* 802.3 DS cfg */
958b874ddecSLior David 	u8 ds_cfg;
95962bfd300SVladimir Kondratiev 	u8 nwifi_ds_trans_type;
96062bfd300SVladimir Kondratiev } __packed;
96162bfd300SVladimir Kondratiev 
962b874ddecSLior David /* WMI_BCAST_VRING_CFG_CMDID */
96362bfd300SVladimir Kondratiev struct wmi_bcast_vring_cfg_cmd {
96462bfd300SVladimir Kondratiev 	__le32 action;
96562bfd300SVladimir Kondratiev 	struct wmi_bcast_vring_cfg vring_cfg;
96662bfd300SVladimir Kondratiev } __packed;
96762bfd300SVladimir Kondratiev 
96896c93589SGidon Studinski struct wmi_edma_ring_cfg {
96996c93589SGidon Studinski 	__le64 ring_mem_base;
97096c93589SGidon Studinski 	/* size in number of items */
97196c93589SGidon Studinski 	__le16 ring_size;
97296c93589SGidon Studinski 	u8 ring_id;
97396c93589SGidon Studinski 	u8 reserved;
97496c93589SGidon Studinski } __packed;
97596c93589SGidon Studinski 
97696c93589SGidon Studinski enum wmi_rx_msg_type {
97796c93589SGidon Studinski 	WMI_RX_MSG_TYPE_COMPRESSED	= 0x00,
97896c93589SGidon Studinski 	WMI_RX_MSG_TYPE_EXTENDED	= 0x01,
97996c93589SGidon Studinski };
98096c93589SGidon Studinski 
98196c93589SGidon Studinski struct wmi_tx_status_ring_add_cmd {
98296c93589SGidon Studinski 	struct wmi_edma_ring_cfg ring_cfg;
98396c93589SGidon Studinski 	u8 irq_index;
98496c93589SGidon Studinski 	u8 reserved[3];
98596c93589SGidon Studinski } __packed;
98696c93589SGidon Studinski 
98796c93589SGidon Studinski struct wmi_rx_status_ring_add_cmd {
98896c93589SGidon Studinski 	struct wmi_edma_ring_cfg ring_cfg;
98996c93589SGidon Studinski 	u8 irq_index;
99096c93589SGidon Studinski 	/* wmi_rx_msg_type */
99196c93589SGidon Studinski 	u8 rx_msg_type;
99296c93589SGidon Studinski 	u8 reserved[2];
99396c93589SGidon Studinski } __packed;
99496c93589SGidon Studinski 
99596c93589SGidon Studinski struct wmi_cfg_def_rx_offload_cmd {
99696c93589SGidon Studinski 	__le16 max_msdu_size;
99796c93589SGidon Studinski 	__le16 max_rx_pl_per_desc;
99896c93589SGidon Studinski 	u8 decap_trans_type;
99996c93589SGidon Studinski 	u8 l2_802_3_offload_ctrl;
100096c93589SGidon Studinski 	u8 l2_nwifi_offload_ctrl;
100196c93589SGidon Studinski 	u8 vlan_id;
100296c93589SGidon Studinski 	u8 nwifi_ds_trans_type;
100396c93589SGidon Studinski 	u8 l3_l4_ctrl;
100496c93589SGidon Studinski 	u8 reserved[6];
100596c93589SGidon Studinski } __packed;
100696c93589SGidon Studinski 
100796c93589SGidon Studinski struct wmi_tx_desc_ring_add_cmd {
100896c93589SGidon Studinski 	struct wmi_edma_ring_cfg ring_cfg;
100996c93589SGidon Studinski 	__le16 max_msdu_size;
101096c93589SGidon Studinski 	/* Correlated status ring (0-63) */
101196c93589SGidon Studinski 	u8 status_ring_id;
101296c93589SGidon Studinski 	u8 cid;
101396c93589SGidon Studinski 	u8 tid;
101496c93589SGidon Studinski 	u8 encap_trans_type;
101596c93589SGidon Studinski 	u8 mac_ctrl;
101696c93589SGidon Studinski 	u8 to_resolution;
101796c93589SGidon Studinski 	u8 agg_max_wsize;
101896c93589SGidon Studinski 	u8 reserved[3];
101996c93589SGidon Studinski 	struct wmi_vring_cfg_schd schd_params;
102096c93589SGidon Studinski } __packed;
102196c93589SGidon Studinski 
102296c93589SGidon Studinski struct wmi_rx_desc_ring_add_cmd {
102396c93589SGidon Studinski 	struct wmi_edma_ring_cfg ring_cfg;
102496c93589SGidon Studinski 	u8 irq_index;
102596c93589SGidon Studinski 	/* 0-63 status rings */
102696c93589SGidon Studinski 	u8 status_ring_id;
102796c93589SGidon Studinski 	u8 reserved[2];
102896c93589SGidon Studinski 	__le64 sw_tail_host_addr;
102996c93589SGidon Studinski } __packed;
103096c93589SGidon Studinski 
103196c93589SGidon Studinski struct wmi_bcast_desc_ring_add_cmd {
103296c93589SGidon Studinski 	struct wmi_edma_ring_cfg ring_cfg;
103396c93589SGidon Studinski 	__le16 max_msdu_size;
103496c93589SGidon Studinski 	/* Correlated status ring (0-63) */
103596c93589SGidon Studinski 	u8 status_ring_id;
103696c93589SGidon Studinski 	u8 encap_trans_type;
103796c93589SGidon Studinski 	u8 reserved[4];
103896c93589SGidon Studinski } __packed;
103996c93589SGidon Studinski 
1040b5aeff16SDedy Lansky /* WMI_LO_POWER_CALIB_FROM_OTP_CMDID */
1041b5aeff16SDedy Lansky struct wmi_lo_power_calib_from_otp_cmd {
1042b5aeff16SDedy Lansky 	/* index to read from OTP. zero based */
1043b5aeff16SDedy Lansky 	u8 index;
1044b5aeff16SDedy Lansky 	u8 reserved[3];
1045b5aeff16SDedy Lansky } __packed;
1046b5aeff16SDedy Lansky 
1047b5aeff16SDedy Lansky /* WMI_LO_POWER_CALIB_FROM_OTP_EVENTID */
1048b5aeff16SDedy Lansky struct wmi_lo_power_calib_from_otp_event {
1049b5aeff16SDedy Lansky 	/* wmi_fw_status */
1050b5aeff16SDedy Lansky 	u8 status;
1051b5aeff16SDedy Lansky 	u8 reserved[3];
1052b5aeff16SDedy Lansky } __packed;
1053b5aeff16SDedy Lansky 
105496c93589SGidon Studinski /* WMI_RING_BA_EN_CMDID */
105596c93589SGidon Studinski struct wmi_ring_ba_en_cmd {
105696c93589SGidon Studinski 	u8 ring_id;
10572be7d22fSVladimir Kondratiev 	u8 agg_max_wsize;
10582be7d22fSVladimir Kondratiev 	__le16 ba_timeout;
1059cbcf5866SVladimir Kondratiev 	u8 amsdu;
1060b874ddecSLior David 	u8 reserved[3];
10612be7d22fSVladimir Kondratiev } __packed;
10622be7d22fSVladimir Kondratiev 
106396c93589SGidon Studinski /* WMI_RING_BA_DIS_CMDID */
106496c93589SGidon Studinski struct wmi_ring_ba_dis_cmd {
106596c93589SGidon Studinski 	u8 ring_id;
10662be7d22fSVladimir Kondratiev 	u8 reserved;
10672be7d22fSVladimir Kondratiev 	__le16 reason;
10682be7d22fSVladimir Kondratiev } __packed;
10692be7d22fSVladimir Kondratiev 
1070b874ddecSLior David /* WMI_NOTIFY_REQ_CMDID */
10712be7d22fSVladimir Kondratiev struct wmi_notify_req_cmd {
10722be7d22fSVladimir Kondratiev 	u8 cid;
1073b8023177SVladimir Kondratiev 	u8 year;
1074b8023177SVladimir Kondratiev 	u8 month;
1075b8023177SVladimir Kondratiev 	u8 day;
10762be7d22fSVladimir Kondratiev 	__le32 interval_usec;
1077b8023177SVladimir Kondratiev 	u8 hour;
1078b8023177SVladimir Kondratiev 	u8 minute;
1079b8023177SVladimir Kondratiev 	u8 second;
1080b8023177SVladimir Kondratiev 	u8 miliseconds;
10812be7d22fSVladimir Kondratiev } __packed;
10822be7d22fSVladimir Kondratiev 
1083b874ddecSLior David /* WMI_CFG_RX_CHAIN_CMDID */
10842be7d22fSVladimir Kondratiev enum wmi_sniffer_cfg_mode {
1085b874ddecSLior David 	WMI_SNIFFER_OFF	= 0x00,
1086b874ddecSLior David 	WMI_SNIFFER_ON	= 0x01,
10872be7d22fSVladimir Kondratiev };
10882be7d22fSVladimir Kondratiev 
1089761f8e4dSLazar Alexei /* WMI_SILENT_RSSI_TABLE */
1090761f8e4dSLazar Alexei enum wmi_silent_rssi_table {
1091761f8e4dSLazar Alexei 	RF_TEMPERATURE_CALIB_DEFAULT_DB		= 0x00,
1092761f8e4dSLazar Alexei 	RF_TEMPERATURE_CALIB_HIGH_POWER_DB	= 0x01,
1093761f8e4dSLazar Alexei };
1094761f8e4dSLazar Alexei 
1095761f8e4dSLazar Alexei /* WMI_SILENT_RSSI_STATUS */
1096761f8e4dSLazar Alexei enum wmi_silent_rssi_status {
1097761f8e4dSLazar Alexei 	SILENT_RSSI_SUCCESS	= 0x00,
1098761f8e4dSLazar Alexei 	SILENT_RSSI_FAILURE	= 0x01,
1099761f8e4dSLazar Alexei };
1100761f8e4dSLazar Alexei 
1101761f8e4dSLazar Alexei /* WMI_SET_ACTIVE_SILENT_RSSI_TABLE_CMDID */
1102761f8e4dSLazar Alexei struct wmi_set_active_silent_rssi_table_cmd {
1103761f8e4dSLazar Alexei 	/* enum wmi_silent_rssi_table */
1104761f8e4dSLazar Alexei 	__le32 table;
1105761f8e4dSLazar Alexei } __packed;
1106761f8e4dSLazar Alexei 
11072be7d22fSVladimir Kondratiev enum wmi_sniffer_cfg_phy_info_mode {
1108b874ddecSLior David 	WMI_SNIFFER_PHY_INFO_DISABLED	= 0x00,
1109b874ddecSLior David 	WMI_SNIFFER_PHY_INFO_ENABLED	= 0x01,
11102be7d22fSVladimir Kondratiev };
11112be7d22fSVladimir Kondratiev 
11122be7d22fSVladimir Kondratiev enum wmi_sniffer_cfg_phy_support {
1113b874ddecSLior David 	WMI_SNIFFER_CP		= 0x00,
1114b874ddecSLior David 	WMI_SNIFFER_DP		= 0x01,
1115b874ddecSLior David 	WMI_SNIFFER_BOTH_PHYS	= 0x02,
11162be7d22fSVladimir Kondratiev };
11172be7d22fSVladimir Kondratiev 
1118b874ddecSLior David /* wmi_sniffer_cfg */
11192be7d22fSVladimir Kondratiev struct wmi_sniffer_cfg {
1120b874ddecSLior David 	/* enum wmi_sniffer_cfg_mode */
1121b874ddecSLior David 	__le32 mode;
1122b874ddecSLior David 	/* enum wmi_sniffer_cfg_phy_info_mode */
1123b874ddecSLior David 	__le32 phy_info_mode;
1124b874ddecSLior David 	/* enum wmi_sniffer_cfg_phy_support */
1125b874ddecSLior David 	__le32 phy_support;
11262be7d22fSVladimir Kondratiev 	u8 channel;
11272be7d22fSVladimir Kondratiev 	u8 reserved[3];
11282be7d22fSVladimir Kondratiev } __packed;
11292be7d22fSVladimir Kondratiev 
11302be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_action {
1131b874ddecSLior David 	WMI_RX_CHAIN_ADD	= 0x00,
1132b874ddecSLior David 	WMI_RX_CHAIN_DEL	= 0x01,
11332be7d22fSVladimir Kondratiev };
11342be7d22fSVladimir Kondratiev 
11352be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_decap_trans_type {
1136b874ddecSLior David 	WMI_DECAP_TYPE_802_3		= 0x00,
1137b874ddecSLior David 	WMI_DECAP_TYPE_NATIVE_WIFI	= 0x01,
1138b874ddecSLior David 	WMI_DECAP_TYPE_NONE		= 0x02,
11392be7d22fSVladimir Kondratiev };
11402be7d22fSVladimir Kondratiev 
11412be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_nwifi_ds_trans_type {
1142b874ddecSLior David 	WMI_NWIFI_RX_TRANS_MODE_NO		= 0x00,
1143b874ddecSLior David 	WMI_NWIFI_RX_TRANS_MODE_PBSS2AP		= 0x01,
1144b874ddecSLior David 	WMI_NWIFI_RX_TRANS_MODE_PBSS2STA	= 0x02,
11452be7d22fSVladimir Kondratiev };
11462be7d22fSVladimir Kondratiev 
1147b8023177SVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_reorder_type {
1148b874ddecSLior David 	WMI_RX_HW_REORDER	= 0x00,
1149b874ddecSLior David 	WMI_RX_SW_REORDER	= 0x01,
1150b8023177SVladimir Kondratiev };
1151b8023177SVladimir Kondratiev 
11522be7d22fSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_POS	(0)
11532be7d22fSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_LEN	(1)
11542be7d22fSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_MSK	(0x1)
1155c406ea7cSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_POS		(1)
1156c406ea7cSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_LEN		(1)
1157c406ea7cSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_MSK		(0x2)
11582be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_POS		(0)
11592be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_LEN		(1)
11602be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_MSK		(0x1)
11612be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_POS		(1)
11622be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_LEN		(1)
11632be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_MSK		(0x2)
11642be7d22fSVladimir Kondratiev #define L3_L4_CTRL_IPV4_CHECKSUM_EN_POS			(0)
11652be7d22fSVladimir Kondratiev #define L3_L4_CTRL_IPV4_CHECKSUM_EN_LEN			(1)
11662be7d22fSVladimir Kondratiev #define L3_L4_CTRL_IPV4_CHECKSUM_EN_MSK			(0x1)
11672be7d22fSVladimir Kondratiev #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_POS		(1)
11682be7d22fSVladimir Kondratiev #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_LEN		(1)
11692be7d22fSVladimir Kondratiev #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_MSK		(0x2)
11702be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_POS		(0)
11712be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_LEN		(1)
11722be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_MSK		(0x1)
11732be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_WB_THRSH_POS			(1)
11742be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_WB_THRSH_LEN			(1)
11752be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_WB_THRSH_MSK			(0x2)
11762be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_ITR_THRSH_POS		(2)
11772be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_ITR_THRSH_LEN		(1)
11782be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_ITR_THRSH_MSK		(0x4)
11792be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_HOST_THRSH_POS		(3)
11802be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_HOST_THRSH_LEN		(1)
11812be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_HOST_THRSH_MSK		(0x8)
11822be7d22fSVladimir Kondratiev 
1183b874ddecSLior David /* WMI_CFG_RX_CHAIN_CMDID */
1184b874ddecSLior David struct wmi_cfg_rx_chain_cmd {
1185b874ddecSLior David 	__le32 action;
1186b874ddecSLior David 	struct wmi_sw_ring_cfg rx_sw_ring;
1187b874ddecSLior David 	u8 mid;
1188b874ddecSLior David 	u8 decap_trans_type;
1189b874ddecSLior David 	u8 l2_802_3_offload_ctrl;
1190b874ddecSLior David 	u8 l2_nwifi_offload_ctrl;
1191b874ddecSLior David 	u8 vlan_id;
1192b874ddecSLior David 	u8 nwifi_ds_trans_type;
1193b874ddecSLior David 	u8 l3_l4_ctrl;
1194b874ddecSLior David 	u8 ring_ctrl;
11952be7d22fSVladimir Kondratiev 	__le16 prefetch_thrsh;
11962be7d22fSVladimir Kondratiev 	__le16 wb_thrsh;
11972be7d22fSVladimir Kondratiev 	__le32 itr_value;
11982be7d22fSVladimir Kondratiev 	__le16 host_thrsh;
1199b8023177SVladimir Kondratiev 	u8 reorder_type;
1200b8023177SVladimir Kondratiev 	u8 reserved;
12012be7d22fSVladimir Kondratiev 	struct wmi_sniffer_cfg sniffer_cfg;
1202b874ddecSLior David 	__le16 max_rx_pl_per_desc;
12032be7d22fSVladimir Kondratiev } __packed;
12042be7d22fSVladimir Kondratiev 
1205b874ddecSLior David /* WMI_RCP_ADDBA_RESP_CMDID */
12062be7d22fSVladimir Kondratiev struct wmi_rcp_addba_resp_cmd {
12078a4fa214SAhmad Masri 	/* Used for cid less than 8. For higher cid set
12088a4fa214SAhmad Masri 	 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
12098a4fa214SAhmad Masri 	 */
12102be7d22fSVladimir Kondratiev 	u8 cidxtid;
12112be7d22fSVladimir Kondratiev 	u8 dialog_token;
12122be7d22fSVladimir Kondratiev 	__le16 status_code;
1213b874ddecSLior David 	/* ieee80211_ba_parameterset field to send */
1214b874ddecSLior David 	__le16 ba_param_set;
12152be7d22fSVladimir Kondratiev 	__le16 ba_timeout;
12168a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
12178a4fa214SAhmad Masri 	u8 cid;
12188a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
12198a4fa214SAhmad Masri 	u8 tid;
12208a4fa214SAhmad Masri 	u8 reserved[2];
12212be7d22fSVladimir Kondratiev } __packed;
12222be7d22fSVladimir Kondratiev 
122396c93589SGidon Studinski /* WMI_RCP_ADDBA_RESP_EDMA_CMDID */
122496c93589SGidon Studinski struct wmi_rcp_addba_resp_edma_cmd {
122596c93589SGidon Studinski 	u8 cid;
122696c93589SGidon Studinski 	u8 tid;
122796c93589SGidon Studinski 	u8 dialog_token;
122896c93589SGidon Studinski 	u8 reserved;
122996c93589SGidon Studinski 	__le16 status_code;
123096c93589SGidon Studinski 	/* ieee80211_ba_parameterset field to send */
123196c93589SGidon Studinski 	__le16 ba_param_set;
123296c93589SGidon Studinski 	__le16 ba_timeout;
123396c93589SGidon Studinski 	u8 status_ring_id;
123496c93589SGidon Studinski 	/* wmi_cfg_rx_chain_cmd_reorder_type */
123596c93589SGidon Studinski 	u8 reorder_type;
123696c93589SGidon Studinski } __packed;
123796c93589SGidon Studinski 
1238b874ddecSLior David /* WMI_RCP_DELBA_CMDID */
12392be7d22fSVladimir Kondratiev struct wmi_rcp_delba_cmd {
12408a4fa214SAhmad Masri 	/* Used for cid less than 8. For higher cid set
12418a4fa214SAhmad Masri 	 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
12428a4fa214SAhmad Masri 	 */
12432be7d22fSVladimir Kondratiev 	u8 cidxtid;
12442be7d22fSVladimir Kondratiev 	u8 reserved;
12452be7d22fSVladimir Kondratiev 	__le16 reason;
12468a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
12478a4fa214SAhmad Masri 	u8 cid;
12488a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
12498a4fa214SAhmad Masri 	u8 tid;
12508a4fa214SAhmad Masri 	u8 reserved2[2];
12512be7d22fSVladimir Kondratiev } __packed;
12522be7d22fSVladimir Kondratiev 
1253b874ddecSLior David /* WMI_RCP_ADDBA_REQ_CMDID */
12542be7d22fSVladimir Kondratiev struct wmi_rcp_addba_req_cmd {
12558a4fa214SAhmad Masri 	/* Used for cid less than 8. For higher cid set
12568a4fa214SAhmad Masri 	 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
12578a4fa214SAhmad Masri 	 */
12582be7d22fSVladimir Kondratiev 	u8 cidxtid;
12592be7d22fSVladimir Kondratiev 	u8 dialog_token;
12602be7d22fSVladimir Kondratiev 	/* ieee80211_ba_parameterset field as it received */
12612be7d22fSVladimir Kondratiev 	__le16 ba_param_set;
12622be7d22fSVladimir Kondratiev 	__le16 ba_timeout;
12632be7d22fSVladimir Kondratiev 	/* ieee80211_ba_seqstrl field as it received */
12642be7d22fSVladimir Kondratiev 	__le16 ba_seq_ctrl;
12658a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
12668a4fa214SAhmad Masri 	u8 cid;
12678a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
12688a4fa214SAhmad Masri 	u8 tid;
12698a4fa214SAhmad Masri 	u8 reserved[2];
12702be7d22fSVladimir Kondratiev } __packed;
12712be7d22fSVladimir Kondratiev 
1272b874ddecSLior David /* WMI_SET_MAC_ADDRESS_CMDID */
12732be7d22fSVladimir Kondratiev struct wmi_set_mac_address_cmd {
12742be7d22fSVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
12752be7d22fSVladimir Kondratiev 	u8 reserved[2];
12762be7d22fSVladimir Kondratiev } __packed;
12772be7d22fSVladimir Kondratiev 
1278b874ddecSLior David /* WMI_ECHO_CMDID
12792be7d22fSVladimir Kondratiev  * Check FW is alive
12802be7d22fSVladimir Kondratiev  * Returned event: WMI_ECHO_RSP_EVENTID
12812be7d22fSVladimir Kondratiev  */
12822be7d22fSVladimir Kondratiev struct wmi_echo_cmd {
12832be7d22fSVladimir Kondratiev 	__le32 value;
12842be7d22fSVladimir Kondratiev } __packed;
12852be7d22fSVladimir Kondratiev 
12868a4fa214SAhmad Masri /* WMI_DEEP_ECHO_CMDID
1287*6a363e8aSAhmad Masri  * Check FW and uCode is alive
1288*6a363e8aSAhmad Masri  * Returned event: WMI_DEEP_ECHO_RSP_EVENTID
12898a4fa214SAhmad Masri  */
12908a4fa214SAhmad Masri struct wmi_deep_echo_cmd {
12918a4fa214SAhmad Masri 	__le32 value;
12928a4fa214SAhmad Masri } __packed;
12938a4fa214SAhmad Masri 
1294761f8e4dSLazar Alexei /* WMI_RF_PWR_ON_DELAY_CMDID
1295761f8e4dSLazar Alexei  * set FW time parameters used through RF resetting
1296761f8e4dSLazar Alexei  *  RF reset consists of bringing its power down for a period of time, then
1297761f8e4dSLazar Alexei  * bringing the power up
1298761f8e4dSLazar Alexei  * Returned event: WMI_RF_PWR_ON_DELAY_RSP_EVENTID
1299761f8e4dSLazar Alexei  */
1300761f8e4dSLazar Alexei struct wmi_rf_pwr_on_delay_cmd {
1301761f8e4dSLazar Alexei 	/* time in usec the FW waits after bringing the RF PWR down,
1302761f8e4dSLazar Alexei 	 * set 0 for default
1303761f8e4dSLazar Alexei 	 */
1304761f8e4dSLazar Alexei 	__le16 down_delay_usec;
1305761f8e4dSLazar Alexei 	/* time in usec the FW waits after bringing the RF PWR up,
1306761f8e4dSLazar Alexei 	 * set 0 for default
1307761f8e4dSLazar Alexei 	 */
1308761f8e4dSLazar Alexei 	__le16 up_delay_usec;
1309b874ddecSLior David } __packed;
1310b874ddecSLior David 
13118a4fa214SAhmad Masri /* WMI_SET_HIGH_POWER_TABLE_PARAMS_CMDID
1312761f8e4dSLazar Alexei  * This API controls the Tx and Rx gain over temperature.
1313761f8e4dSLazar Alexei  * It controls the Tx D-type, Rx D-type and Rx E-type amplifiers.
1314761f8e4dSLazar Alexei  * It also controls the Tx gain index, by controlling the Rx to Tx gain index
1315761f8e4dSLazar Alexei  * offset.
1316761f8e4dSLazar Alexei  * The control is divided by 3 temperature values to 4 temperature ranges.
1317761f8e4dSLazar Alexei  * Each parameter uses its own temperature values.
1318761f8e4dSLazar Alexei  * Returned event: WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID
1319761f8e4dSLazar Alexei  */
1320761f8e4dSLazar Alexei struct wmi_set_high_power_table_params_cmd {
1321761f8e4dSLazar Alexei 	/* Temperature range for Tx D-type parameters */
1322761f8e4dSLazar Alexei 	u8 tx_dtype_temp[WMI_RF_DTYPE_LENGTH];
1323761f8e4dSLazar Alexei 	u8 reserved0;
1324761f8e4dSLazar Alexei 	/* Tx D-type values to be used for each temperature range */
13258a4fa214SAhmad Masri 	__le32 tx_dtype_conf[WMI_RF_DTYPE_CONF_LENGTH];
13268a4fa214SAhmad Masri 	/* Temperature range for Tx E-type parameters */
13278a4fa214SAhmad Masri 	u8 tx_etype_temp[WMI_RF_ETYPE_LENGTH];
13288a4fa214SAhmad Masri 	u8 reserved1;
13298a4fa214SAhmad Masri 	/* Tx E-type values to be used for each temperature range.
13308a4fa214SAhmad Masri 	 * The last 4 values of any range are the first 4 values of the next
13318a4fa214SAhmad Masri 	 * range and so on
13328a4fa214SAhmad Masri 	 */
13338a4fa214SAhmad Masri 	__le32 tx_etype_conf[WMI_RF_ETYPE_CONF_LENGTH];
1334761f8e4dSLazar Alexei 	/* Temperature range for Rx D-type parameters */
1335761f8e4dSLazar Alexei 	u8 rx_dtype_temp[WMI_RF_DTYPE_LENGTH];
13368a4fa214SAhmad Masri 	u8 reserved2;
1337761f8e4dSLazar Alexei 	/* Rx D-type values to be used for each temperature range */
13388a4fa214SAhmad Masri 	__le32 rx_dtype_conf[WMI_RF_DTYPE_CONF_LENGTH];
1339761f8e4dSLazar Alexei 	/* Temperature range for Rx E-type parameters */
1340761f8e4dSLazar Alexei 	u8 rx_etype_temp[WMI_RF_ETYPE_LENGTH];
13418a4fa214SAhmad Masri 	u8 reserved3;
1342761f8e4dSLazar Alexei 	/* Rx E-type values to be used for each temperature range.
1343761f8e4dSLazar Alexei 	 * The last 4 values of any range are the first 4 values of the next
1344761f8e4dSLazar Alexei 	 * range and so on
1345761f8e4dSLazar Alexei 	 */
13468a4fa214SAhmad Masri 	__le32 rx_etype_conf[WMI_RF_ETYPE_CONF_LENGTH];
1347761f8e4dSLazar Alexei 	/* Temperature range for rx_2_tx_offs parameters */
1348761f8e4dSLazar Alexei 	u8 rx_2_tx_temp[WMI_RF_RX2TX_LENGTH];
13498a4fa214SAhmad Masri 	u8 reserved4;
1350761f8e4dSLazar Alexei 	/* Rx to Tx gain index offset */
13518a4fa214SAhmad Masri 	s8 rx_2_tx_offs[WMI_RF_RX2TX_CONF_LENGTH];
13528a4fa214SAhmad Masri } __packed;
13538a4fa214SAhmad Masri 
13548a4fa214SAhmad Masri /* WMI_FIXED_SCHEDULING_UL_CONFIG_CMDID
13558a4fa214SAhmad Masri  * This API sets rd parameter per mcs.
13568a4fa214SAhmad Masri  * Relevant only in Fixed Scheduling mode.
13578a4fa214SAhmad Masri  * Returned event: WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID
13588a4fa214SAhmad Masri  */
13598a4fa214SAhmad Masri struct wmi_fixed_scheduling_ul_config_cmd {
13608a4fa214SAhmad Masri 	/* Use mcs -1 to set for every mcs */
13618a4fa214SAhmad Masri 	s8 mcs;
13628a4fa214SAhmad Masri 	/* Number of frames with rd bit set in a single virtual slot */
13638a4fa214SAhmad Masri 	u8 rd_count_per_slot;
13648a4fa214SAhmad Masri 	u8 reserved[2];
1365761f8e4dSLazar Alexei } __packed;
1366761f8e4dSLazar Alexei 
1367761f8e4dSLazar Alexei /* CMD: WMI_RF_XPM_READ_CMDID */
1368761f8e4dSLazar Alexei struct wmi_rf_xpm_read_cmd {
1369761f8e4dSLazar Alexei 	u8 rf_id;
1370761f8e4dSLazar Alexei 	u8 reserved[3];
1371761f8e4dSLazar Alexei 	/* XPM bit start address in range [0,8191]bits - rounded by FW to
1372761f8e4dSLazar Alexei 	 * multiple of 8bits
1373761f8e4dSLazar Alexei 	 */
1374761f8e4dSLazar Alexei 	__le32 xpm_bit_address;
1375761f8e4dSLazar Alexei 	__le32 num_bytes;
1376761f8e4dSLazar Alexei } __packed;
1377761f8e4dSLazar Alexei 
1378761f8e4dSLazar Alexei /* CMD: WMI_RF_XPM_WRITE_CMDID */
1379761f8e4dSLazar Alexei struct wmi_rf_xpm_write_cmd {
1380761f8e4dSLazar Alexei 	u8 rf_id;
1381761f8e4dSLazar Alexei 	u8 reserved0[3];
1382761f8e4dSLazar Alexei 	/* XPM bit start address in range [0,8191]bits - rounded by FW to
1383761f8e4dSLazar Alexei 	 * multiple of 8bits
1384761f8e4dSLazar Alexei 	 */
1385761f8e4dSLazar Alexei 	__le32 xpm_bit_address;
1386761f8e4dSLazar Alexei 	__le32 num_bytes;
1387761f8e4dSLazar Alexei 	/* boolean flag indicating whether FW should verify the write
1388761f8e4dSLazar Alexei 	 * operation
1389761f8e4dSLazar Alexei 	 */
1390761f8e4dSLazar Alexei 	u8 verify;
1391761f8e4dSLazar Alexei 	u8 reserved1[3];
1392761f8e4dSLazar Alexei 	/* actual size=num_bytes */
1393761f8e4dSLazar Alexei 	u8 data_bytes[0];
1394b874ddecSLior David } __packed;
1395b874ddecSLior David 
1396b874ddecSLior David /* WMI_TEMP_SENSE_CMDID
1397b8023177SVladimir Kondratiev  *
1398b8023177SVladimir Kondratiev  * Measure MAC and radio temperatures
1399b874ddecSLior David  *
1400b874ddecSLior David  * Possible modes for temperature measurement
1401b8023177SVladimir Kondratiev  */
14028c679675SVladimir Kondratiev enum wmi_temperature_measure_mode {
1403b874ddecSLior David 	TEMPERATURE_USE_OLD_VALUE	= 0x01,
1404b874ddecSLior David 	TEMPERATURE_MEASURE_NOW		= 0x02,
14058c679675SVladimir Kondratiev };
14068c679675SVladimir Kondratiev 
1407b874ddecSLior David /* WMI_TEMP_SENSE_CMDID */
1408b8023177SVladimir Kondratiev struct wmi_temp_sense_cmd {
14098c679675SVladimir Kondratiev 	__le32 measure_baseband_en;
14108c679675SVladimir Kondratiev 	__le32 measure_rf_en;
14118c679675SVladimir Kondratiev 	__le32 measure_mode;
1412b8023177SVladimir Kondratiev } __packed;
1413b8023177SVladimir Kondratiev 
1414b874ddecSLior David enum wmi_pmc_op {
1415b874ddecSLior David 	WMI_PMC_ALLOCATE	= 0x00,
1416b874ddecSLior David 	WMI_PMC_RELEASE		= 0x01,
1417dc16427bSVladimir Kondratiev };
1418dc16427bSVladimir Kondratiev 
1419b874ddecSLior David /* WMI_PMC_CMDID */
1420dc16427bSVladimir Kondratiev struct wmi_pmc_cmd {
1421b874ddecSLior David 	/* enum wmi_pmc_cmd_op_type */
1422b874ddecSLior David 	u8 op;
1423dc16427bSVladimir Kondratiev 	u8 reserved;
1424dc16427bSVladimir Kondratiev 	__le16 ring_size;
1425dc16427bSVladimir Kondratiev 	__le64 mem_base;
1426dc16427bSVladimir Kondratiev } __packed;
1427dc16427bSVladimir Kondratiev 
142808989f96SLior David enum wmi_aoa_meas_type {
142908989f96SLior David 	WMI_AOA_PHASE_MEAS	= 0x00,
143008989f96SLior David 	WMI_AOA_PHASE_AMP_MEAS	= 0x01,
143108989f96SLior David };
143208989f96SLior David 
143308989f96SLior David /* WMI_AOA_MEAS_CMDID */
143408989f96SLior David struct wmi_aoa_meas_cmd {
143508989f96SLior David 	u8 mac_addr[WMI_MAC_LEN];
143608989f96SLior David 	/* channels IDs:
143708989f96SLior David 	 * 0 - 58320 MHz
143808989f96SLior David 	 * 1 - 60480 MHz
143908989f96SLior David 	 * 2 - 62640 MHz
144008989f96SLior David 	 */
144108989f96SLior David 	u8 channel;
144208989f96SLior David 	/* enum wmi_aoa_meas_type */
144308989f96SLior David 	u8 aoa_meas_type;
144408989f96SLior David 	__le32 meas_rf_mask;
144508989f96SLior David } __packed;
144608989f96SLior David 
1447cbf795c1SLior David /* WMI_SET_MGMT_RETRY_LIMIT_CMDID */
1448cbf795c1SLior David struct wmi_set_mgmt_retry_limit_cmd {
1449cbf795c1SLior David 	/* MAC retransmit limit for mgmt frames */
1450cbf795c1SLior David 	u8 mgmt_retry_limit;
1451cbf795c1SLior David 	/* alignment to 32b */
1452cbf795c1SLior David 	u8 reserved[3];
1453cbf795c1SLior David } __packed;
1454cbf795c1SLior David 
145590ffabb0SDedy Lansky /* Zones: HIGH, MAX, CRITICAL */
145690ffabb0SDedy Lansky #define WMI_NUM_OF_TT_ZONES	(3)
145790ffabb0SDedy Lansky 
145890ffabb0SDedy Lansky struct wmi_tt_zone_limits {
145990ffabb0SDedy Lansky 	/* Above this temperature this zone is active */
146090ffabb0SDedy Lansky 	u8 temperature_high;
146190ffabb0SDedy Lansky 	/* Below this temperature the adjacent lower zone is active */
146290ffabb0SDedy Lansky 	u8 temperature_low;
146390ffabb0SDedy Lansky 	u8 reserved[2];
146490ffabb0SDedy Lansky } __packed;
146590ffabb0SDedy Lansky 
146690ffabb0SDedy Lansky /* Struct used for both configuration and status commands of thermal
146790ffabb0SDedy Lansky  * throttling
146890ffabb0SDedy Lansky  */
146990ffabb0SDedy Lansky struct wmi_tt_data {
147090ffabb0SDedy Lansky 	/* Enable/Disable TT algorithm for baseband */
147190ffabb0SDedy Lansky 	u8 bb_enabled;
147290ffabb0SDedy Lansky 	u8 reserved0[3];
147390ffabb0SDedy Lansky 	/* Define zones for baseband */
147490ffabb0SDedy Lansky 	struct wmi_tt_zone_limits bb_zones[WMI_NUM_OF_TT_ZONES];
147590ffabb0SDedy Lansky 	/* Enable/Disable TT algorithm for radio */
147690ffabb0SDedy Lansky 	u8 rf_enabled;
147790ffabb0SDedy Lansky 	u8 reserved1[3];
147890ffabb0SDedy Lansky 	/* Define zones for all radio chips */
147990ffabb0SDedy Lansky 	struct wmi_tt_zone_limits rf_zones[WMI_NUM_OF_TT_ZONES];
148090ffabb0SDedy Lansky } __packed;
148190ffabb0SDedy Lansky 
148290ffabb0SDedy Lansky /* WMI_SET_THERMAL_THROTTLING_CFG_CMDID */
148390ffabb0SDedy Lansky struct wmi_set_thermal_throttling_cfg_cmd {
148490ffabb0SDedy Lansky 	/* Command data */
148590ffabb0SDedy Lansky 	struct wmi_tt_data tt_data;
148690ffabb0SDedy Lansky } __packed;
148790ffabb0SDedy Lansky 
1488849a564bSDedy Lansky /* WMI_NEW_STA_CMDID */
1489849a564bSDedy Lansky struct wmi_new_sta_cmd {
1490849a564bSDedy Lansky 	u8 dst_mac[WMI_MAC_LEN];
1491849a564bSDedy Lansky 	u8 aid;
1492849a564bSDedy Lansky } __packed;
1493849a564bSDedy Lansky 
1494849a564bSDedy Lansky /* WMI_DEL_STA_CMDID */
1495849a564bSDedy Lansky struct wmi_del_sta_cmd {
1496849a564bSDedy Lansky 	u8 dst_mac[WMI_MAC_LEN];
1497849a564bSDedy Lansky 	__le16 disconnect_reason;
1498849a564bSDedy Lansky } __packed;
1499849a564bSDedy Lansky 
150008989f96SLior David enum wmi_tof_burst_duration {
150108989f96SLior David 	WMI_TOF_BURST_DURATION_250_USEC		= 2,
150208989f96SLior David 	WMI_TOF_BURST_DURATION_500_USEC		= 3,
150308989f96SLior David 	WMI_TOF_BURST_DURATION_1_MSEC		= 4,
150408989f96SLior David 	WMI_TOF_BURST_DURATION_2_MSEC		= 5,
150508989f96SLior David 	WMI_TOF_BURST_DURATION_4_MSEC		= 6,
150608989f96SLior David 	WMI_TOF_BURST_DURATION_8_MSEC		= 7,
150708989f96SLior David 	WMI_TOF_BURST_DURATION_16_MSEC		= 8,
150808989f96SLior David 	WMI_TOF_BURST_DURATION_32_MSEC		= 9,
150908989f96SLior David 	WMI_TOF_BURST_DURATION_64_MSEC		= 10,
151008989f96SLior David 	WMI_TOF_BURST_DURATION_128_MSEC		= 11,
151108989f96SLior David 	WMI_TOF_BURST_DURATION_NO_PREFERENCES	= 15,
151208989f96SLior David };
151308989f96SLior David 
151408989f96SLior David enum wmi_tof_session_start_flags {
151508989f96SLior David 	WMI_TOF_SESSION_START_FLAG_SECURED	= 0x1,
151608989f96SLior David 	WMI_TOF_SESSION_START_FLAG_ASAP		= 0x2,
151708989f96SLior David 	WMI_TOF_SESSION_START_FLAG_LCI_REQ	= 0x4,
151808989f96SLior David 	WMI_TOF_SESSION_START_FLAG_LCR_REQ	= 0x8,
151908989f96SLior David };
152008989f96SLior David 
152108989f96SLior David /* WMI_TOF_SESSION_START_CMDID */
152208989f96SLior David struct wmi_ftm_dest_info {
152308989f96SLior David 	u8 channel;
152408989f96SLior David 	/* wmi_tof_session_start_flags_e */
152508989f96SLior David 	u8 flags;
152608989f96SLior David 	u8 initial_token;
152708989f96SLior David 	u8 num_of_ftm_per_burst;
152808989f96SLior David 	u8 num_of_bursts_exp;
152908989f96SLior David 	/* wmi_tof_burst_duration_e */
153008989f96SLior David 	u8 burst_duration;
153108989f96SLior David 	/* Burst Period indicate interval between two consecutive burst
153208989f96SLior David 	 * instances, in units of 100 ms
153308989f96SLior David 	 */
153408989f96SLior David 	__le16 burst_period;
153508989f96SLior David 	u8 dst_mac[WMI_MAC_LEN];
1536761f8e4dSLazar Alexei 	u8 reserved;
1537761f8e4dSLazar Alexei 	u8 num_burst_per_aoa_meas;
153808989f96SLior David } __packed;
153908989f96SLior David 
154008989f96SLior David /* WMI_TOF_SESSION_START_CMDID */
154108989f96SLior David struct wmi_tof_session_start_cmd {
154208989f96SLior David 	__le32 session_id;
1543761f8e4dSLazar Alexei 	u8 reserved1;
154408989f96SLior David 	u8 aoa_type;
154508989f96SLior David 	__le16 num_of_dest;
154608989f96SLior David 	u8 reserved[4];
154708989f96SLior David 	struct wmi_ftm_dest_info ftm_dest_info[0];
154808989f96SLior David } __packed;
154908989f96SLior David 
1550761f8e4dSLazar Alexei /* WMI_TOF_CFG_RESPONDER_CMDID */
1551761f8e4dSLazar Alexei struct wmi_tof_cfg_responder_cmd {
1552761f8e4dSLazar Alexei 	u8 enable;
1553761f8e4dSLazar Alexei 	u8 reserved[3];
1554761f8e4dSLazar Alexei } __packed;
1555761f8e4dSLazar Alexei 
155608989f96SLior David enum wmi_tof_channel_info_report_type {
155708989f96SLior David 	WMI_TOF_CHANNEL_INFO_TYPE_CIR			= 0x1,
155808989f96SLior David 	WMI_TOF_CHANNEL_INFO_TYPE_RSSI			= 0x2,
155908989f96SLior David 	WMI_TOF_CHANNEL_INFO_TYPE_SNR			= 0x4,
156008989f96SLior David 	WMI_TOF_CHANNEL_INFO_TYPE_DEBUG_DATA		= 0x8,
156108989f96SLior David 	WMI_TOF_CHANNEL_INFO_TYPE_VENDOR_SPECIFIC	= 0x10,
156208989f96SLior David };
156308989f96SLior David 
156408989f96SLior David /* WMI_TOF_CHANNEL_INFO_CMDID */
156508989f96SLior David struct wmi_tof_channel_info_cmd {
156608989f96SLior David 	/* wmi_tof_channel_info_report_type_e */
156708989f96SLior David 	__le32 channel_info_report_request;
156808989f96SLior David } __packed;
156908989f96SLior David 
15708ae5d62cSLior David /* WMI_TOF_SET_TX_RX_OFFSET_CMDID */
15718ae5d62cSLior David struct wmi_tof_set_tx_rx_offset_cmd {
15728ae5d62cSLior David 	/* TX delay offset */
15738ae5d62cSLior David 	__le32 tx_offset;
15748ae5d62cSLior David 	/* RX delay offset */
15758ae5d62cSLior David 	__le32 rx_offset;
1576761f8e4dSLazar Alexei 	/* Mask to define which RFs to configure. 0 means all RFs */
1577761f8e4dSLazar Alexei 	__le32 rf_mask;
1578761f8e4dSLazar Alexei 	/* Offset to strongest tap of CIR */
1579761f8e4dSLazar Alexei 	__le32 precursor;
1580761f8e4dSLazar Alexei } __packed;
1581761f8e4dSLazar Alexei 
1582761f8e4dSLazar Alexei /* WMI_TOF_GET_TX_RX_OFFSET_CMDID */
1583761f8e4dSLazar Alexei struct wmi_tof_get_tx_rx_offset_cmd {
1584761f8e4dSLazar Alexei 	/* rf index to read offsets from */
1585761f8e4dSLazar Alexei 	u8 rf_index;
1586761f8e4dSLazar Alexei 	u8 reserved[3];
1587761f8e4dSLazar Alexei } __packed;
1588761f8e4dSLazar Alexei 
1589761f8e4dSLazar Alexei /* WMI_FIXED_SCHEDULING_CONFIG_CMDID */
1590761f8e4dSLazar Alexei struct wmi_map_mcs_to_schd_params {
1591761f8e4dSLazar Alexei 	u8 mcs;
1592761f8e4dSLazar Alexei 	/* time in usec from start slot to start tx flow - default 15 */
1593761f8e4dSLazar Alexei 	u8 time_in_usec_before_initiate_tx;
1594761f8e4dSLazar Alexei 	/* RD enable - if yes consider RD according to STA mcs */
1595761f8e4dSLazar Alexei 	u8 rd_enabled;
1596761f8e4dSLazar Alexei 	u8 reserved;
1597761f8e4dSLazar Alexei 	/* time in usec from start slot to stop vring */
1598761f8e4dSLazar Alexei 	__le16 time_in_usec_to_stop_vring;
1599761f8e4dSLazar Alexei 	/* timeout to force flush from start of slot */
1600761f8e4dSLazar Alexei 	__le16 flush_to_in_usec;
1601761f8e4dSLazar Alexei 	/* per mcs the mac buffer limit size in bytes */
1602761f8e4dSLazar Alexei 	__le32 mac_buff_size_in_bytes;
1603761f8e4dSLazar Alexei } __packed;
1604761f8e4dSLazar Alexei 
1605761f8e4dSLazar Alexei /* WMI_FIXED_SCHEDULING_CONFIG_COMPLETE_EVENTID */
1606761f8e4dSLazar Alexei struct wmi_fixed_scheduling_config_complete_event {
1607761f8e4dSLazar Alexei 	/* wmi_fw_status */
1608761f8e4dSLazar Alexei 	u8 status;
1609761f8e4dSLazar Alexei 	u8 reserved[3];
1610761f8e4dSLazar Alexei } __packed;
1611761f8e4dSLazar Alexei 
1612b5aeff16SDedy Lansky /* This value exists for backwards compatibility only.
1613b5aeff16SDedy Lansky  * Do not use it in new commands.
1614b5aeff16SDedy Lansky  * Use dynamic arrays where possible.
1615b5aeff16SDedy Lansky  */
1616761f8e4dSLazar Alexei #define WMI_NUM_MCS	(13)
1617761f8e4dSLazar Alexei 
1618761f8e4dSLazar Alexei /* WMI_FIXED_SCHEDULING_CONFIG_CMDID */
1619761f8e4dSLazar Alexei struct wmi_fixed_scheduling_config_cmd {
1620761f8e4dSLazar Alexei 	/* defaults in the SAS table */
1621761f8e4dSLazar Alexei 	struct wmi_map_mcs_to_schd_params mcs_to_schd_params_map[WMI_NUM_MCS];
1622761f8e4dSLazar Alexei 	/* default 150 uSec */
1623761f8e4dSLazar Alexei 	__le16 max_sta_rd_ppdu_duration_in_usec;
1624761f8e4dSLazar Alexei 	/* default 300 uSec */
1625761f8e4dSLazar Alexei 	__le16 max_sta_grant_ppdu_duration_in_usec;
1626761f8e4dSLazar Alexei 	/* default 1000 uSec */
1627761f8e4dSLazar Alexei 	__le16 assoc_slot_duration_in_usec;
1628761f8e4dSLazar Alexei 	/* default 360 uSec */
1629761f8e4dSLazar Alexei 	__le16 virtual_slot_duration_in_usec;
1630761f8e4dSLazar Alexei 	/* each this field value slots start with grant frame to the station
1631761f8e4dSLazar Alexei 	 * - default 2
1632761f8e4dSLazar Alexei 	 */
1633761f8e4dSLazar Alexei 	u8 number_of_ap_slots_for_initiate_grant;
1634761f8e4dSLazar Alexei 	u8 reserved[3];
1635761f8e4dSLazar Alexei } __packed;
1636761f8e4dSLazar Alexei 
1637761f8e4dSLazar Alexei /* WMI_ENABLE_FIXED_SCHEDULING_CMDID */
1638761f8e4dSLazar Alexei struct wmi_enable_fixed_scheduling_cmd {
1639761f8e4dSLazar Alexei 	__le32 reserved;
1640761f8e4dSLazar Alexei } __packed;
1641761f8e4dSLazar Alexei 
1642761f8e4dSLazar Alexei /* WMI_ENABLE_FIXED_SCHEDULING_COMPLETE_EVENTID */
1643761f8e4dSLazar Alexei struct wmi_enable_fixed_scheduling_complete_event {
1644761f8e4dSLazar Alexei 	/* wmi_fw_status */
1645761f8e4dSLazar Alexei 	u8 status;
1646761f8e4dSLazar Alexei 	u8 reserved[3];
1647761f8e4dSLazar Alexei } __packed;
1648761f8e4dSLazar Alexei 
1649761f8e4dSLazar Alexei /* WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_CMDID */
1650761f8e4dSLazar Alexei struct wmi_set_multi_directed_omnis_config_cmd {
1651761f8e4dSLazar Alexei 	/* number of directed omnis at destination AP */
1652761f8e4dSLazar Alexei 	u8 dest_ap_num_directed_omnis;
1653761f8e4dSLazar Alexei 	u8 reserved[3];
1654761f8e4dSLazar Alexei } __packed;
1655761f8e4dSLazar Alexei 
1656761f8e4dSLazar Alexei /* WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_EVENTID */
1657761f8e4dSLazar Alexei struct wmi_set_multi_directed_omnis_config_event {
1658761f8e4dSLazar Alexei 	/* wmi_fw_status */
1659761f8e4dSLazar Alexei 	u8 status;
1660761f8e4dSLazar Alexei 	u8 reserved[3];
1661761f8e4dSLazar Alexei } __packed;
1662761f8e4dSLazar Alexei 
1663*6a363e8aSAhmad Masri /* WMI_RADAR_GENERAL_CONFIG_EVENTID */
1664*6a363e8aSAhmad Masri struct wmi_radar_general_config_event {
1665*6a363e8aSAhmad Masri 	/* wmi_fw_status */
1666*6a363e8aSAhmad Masri 	u8 status;
1667*6a363e8aSAhmad Masri 	u8 reserved[3];
1668*6a363e8aSAhmad Masri } __packed;
1669*6a363e8aSAhmad Masri 
1670*6a363e8aSAhmad Masri /* WMI_RADAR_CONFIG_SELECT_EVENTID */
1671*6a363e8aSAhmad Masri struct wmi_radar_config_select_event {
1672*6a363e8aSAhmad Masri 	/* wmi_fw_status */
1673*6a363e8aSAhmad Masri 	u8 status;
1674*6a363e8aSAhmad Masri 	u8 reserved[3];
1675*6a363e8aSAhmad Masri 	/* In unit of bytes */
1676*6a363e8aSAhmad Masri 	__le32 fifo_size;
1677*6a363e8aSAhmad Masri 	/* In unit of bytes */
1678*6a363e8aSAhmad Masri 	__le32 pulse_size;
1679*6a363e8aSAhmad Masri } __packed;
1680*6a363e8aSAhmad Masri 
1681*6a363e8aSAhmad Masri /* WMI_RADAR_PARAMS_CONFIG_EVENTID */
1682*6a363e8aSAhmad Masri struct wmi_radar_params_config_event {
1683*6a363e8aSAhmad Masri 	/* wmi_fw_status */
1684*6a363e8aSAhmad Masri 	u8 status;
1685*6a363e8aSAhmad Masri 	u8 reserved[3];
1686*6a363e8aSAhmad Masri } __packed;
1687*6a363e8aSAhmad Masri 
1688*6a363e8aSAhmad Masri /* WMI_RADAR_SET_MODE_EVENTID */
1689*6a363e8aSAhmad Masri struct wmi_radar_set_mode_event {
1690*6a363e8aSAhmad Masri 	/* wmi_fw_status */
1691*6a363e8aSAhmad Masri 	u8 status;
1692*6a363e8aSAhmad Masri 	u8 reserved[3];
1693*6a363e8aSAhmad Masri } __packed;
1694*6a363e8aSAhmad Masri 
1695*6a363e8aSAhmad Masri /* WMI_RADAR_CONTROL_EVENTID */
1696*6a363e8aSAhmad Masri struct wmi_radar_control_event {
1697*6a363e8aSAhmad Masri 	/* wmi_fw_status */
1698*6a363e8aSAhmad Masri 	u8 status;
1699*6a363e8aSAhmad Masri 	u8 reserved[3];
1700*6a363e8aSAhmad Masri } __packed;
1701*6a363e8aSAhmad Masri 
1702*6a363e8aSAhmad Masri /* WMI_RADAR_PCI_CONTROL_EVENTID */
1703*6a363e8aSAhmad Masri struct wmi_radar_pci_control_event {
1704*6a363e8aSAhmad Masri 	/* wmi_fw_status */
1705*6a363e8aSAhmad Masri 	u8 status;
1706*6a363e8aSAhmad Masri 	u8 reserved[3];
1707*6a363e8aSAhmad Masri } __packed;
1708*6a363e8aSAhmad Masri 
1709761f8e4dSLazar Alexei /* WMI_SET_LONG_RANGE_CONFIG_CMDID */
1710761f8e4dSLazar Alexei struct wmi_set_long_range_config_cmd {
1711761f8e4dSLazar Alexei 	__le32 reserved;
1712761f8e4dSLazar Alexei } __packed;
1713761f8e4dSLazar Alexei 
1714761f8e4dSLazar Alexei /* WMI_SET_LONG_RANGE_CONFIG_COMPLETE_EVENTID */
1715761f8e4dSLazar Alexei struct wmi_set_long_range_config_complete_event {
1716761f8e4dSLazar Alexei 	/* wmi_fw_status */
1717761f8e4dSLazar Alexei 	u8 status;
1718761f8e4dSLazar Alexei 	u8 reserved[3];
17198ae5d62cSLior David } __packed;
17208ae5d62cSLior David 
1721b5aeff16SDedy Lansky /* payload max size is 1024 bytes: max event buffer size (1044) - WMI headers
17228a4fa214SAhmad Masri  * (16) - prev struct field size (4)
17238a4fa214SAhmad Masri  */
1724b5aeff16SDedy Lansky #define WMI_MAX_IOCTL_PAYLOAD_SIZE		(1024)
1725b5aeff16SDedy Lansky #define WMI_MAX_IOCTL_REPLY_PAYLOAD_SIZE	(1024)
1726b5aeff16SDedy Lansky #define WMI_MAX_INTERNAL_EVENT_PAYLOAD_SIZE	(1024)
17278a4fa214SAhmad Masri 
17288a4fa214SAhmad Masri enum wmi_internal_fw_ioctl_code {
17298a4fa214SAhmad Masri 	WMI_INTERNAL_FW_CODE_NONE	= 0x0,
17308a4fa214SAhmad Masri 	WMI_INTERNAL_FW_CODE_QCOM	= 0x1,
17318a4fa214SAhmad Masri };
17328a4fa214SAhmad Masri 
17338a4fa214SAhmad Masri /* WMI_INTERNAL_FW_IOCTL_CMDID */
17348a4fa214SAhmad Masri struct wmi_internal_fw_ioctl_cmd {
17358a4fa214SAhmad Masri 	/* enum wmi_internal_fw_ioctl_code */
17368a4fa214SAhmad Masri 	__le16 code;
17378a4fa214SAhmad Masri 	__le16 length;
17388a4fa214SAhmad Masri 	/* payload max size is WMI_MAX_IOCTL_PAYLOAD_SIZE
17398a4fa214SAhmad Masri 	 * Must be the last member of the struct
17408a4fa214SAhmad Masri 	 */
17418a4fa214SAhmad Masri 	__le32 payload[0];
17428a4fa214SAhmad Masri } __packed;
17438a4fa214SAhmad Masri 
17448a4fa214SAhmad Masri /* WMI_INTERNAL_FW_IOCTL_EVENTID */
17458a4fa214SAhmad Masri struct wmi_internal_fw_ioctl_event {
17468a4fa214SAhmad Masri 	/* wmi_fw_status */
17478a4fa214SAhmad Masri 	u8 status;
17488a4fa214SAhmad Masri 	u8 reserved;
17498a4fa214SAhmad Masri 	__le16 length;
17508a4fa214SAhmad Masri 	/* payload max size is WMI_MAX_IOCTL_REPLY_PAYLOAD_SIZE
17518a4fa214SAhmad Masri 	 * Must be the last member of the struct
17528a4fa214SAhmad Masri 	 */
17538a4fa214SAhmad Masri 	__le32 payload[0];
17548a4fa214SAhmad Masri } __packed;
17558a4fa214SAhmad Masri 
17568a4fa214SAhmad Masri /* WMI_INTERNAL_FW_EVENT_EVENTID */
17578a4fa214SAhmad Masri struct wmi_internal_fw_event_event {
17588a4fa214SAhmad Masri 	__le16 id;
17598a4fa214SAhmad Masri 	__le16 length;
17608a4fa214SAhmad Masri 	/* payload max size is WMI_MAX_INTERNAL_EVENT_PAYLOAD_SIZE
17618a4fa214SAhmad Masri 	 * Must be the last member of the struct
17628a4fa214SAhmad Masri 	 */
17638a4fa214SAhmad Masri 	__le32 payload[0];
17648a4fa214SAhmad Masri } __packed;
17658a4fa214SAhmad Masri 
1766b5aeff16SDedy Lansky /* WMI_SET_VRING_PRIORITY_WEIGHT_CMDID */
1767b5aeff16SDedy Lansky struct wmi_set_vring_priority_weight_cmd {
1768b5aeff16SDedy Lansky 	/* Array of weights. Valid values are
1769b5aeff16SDedy Lansky 	 * WMI_QOS_MIN_DEFAULT_WEIGHT...WMI_QOS_MAX_WEIGHT. Weight #0 is
1770b5aeff16SDedy Lansky 	 * hard-coded WMI_QOS_MIN_WEIGHT. This array provide the weights
1771b5aeff16SDedy Lansky 	 * #1..#3
1772b5aeff16SDedy Lansky 	 */
1773b5aeff16SDedy Lansky 	u8 weight[3];
1774b5aeff16SDedy Lansky 	u8 reserved;
1775b5aeff16SDedy Lansky } __packed;
1776b5aeff16SDedy Lansky 
1777b5aeff16SDedy Lansky /* WMI_SET_VRING_PRIORITY_CMDID */
1778b5aeff16SDedy Lansky struct wmi_vring_priority {
1779b5aeff16SDedy Lansky 	u8 vring_idx;
1780b5aeff16SDedy Lansky 	/* Weight index. Valid value is 0-3 */
1781b5aeff16SDedy Lansky 	u8 priority;
1782b5aeff16SDedy Lansky 	u8 reserved[2];
1783b5aeff16SDedy Lansky } __packed;
1784b5aeff16SDedy Lansky 
1785b5aeff16SDedy Lansky /* WMI_SET_VRING_PRIORITY_CMDID */
1786b5aeff16SDedy Lansky struct wmi_set_vring_priority_cmd {
1787b5aeff16SDedy Lansky 	/* number of entries in vring_priority. Set to
1788b5aeff16SDedy Lansky 	 * WMI_QOS_SET_VIF_PRIORITY to update the VIF's priority, and there
1789b5aeff16SDedy Lansky 	 * will be only one entry in vring_priority
1790b5aeff16SDedy Lansky 	 */
1791b5aeff16SDedy Lansky 	u8 num_of_vrings;
1792b5aeff16SDedy Lansky 	u8 reserved[3];
1793b5aeff16SDedy Lansky 	struct wmi_vring_priority vring_priority[0];
1794b5aeff16SDedy Lansky } __packed;
1795b5aeff16SDedy Lansky 
1796b5aeff16SDedy Lansky /* WMI_BF_CONTROL_CMDID - deprecated */
17978a4fa214SAhmad Masri struct wmi_bf_control_cmd {
17988a4fa214SAhmad Masri 	/* wmi_bf_triggers */
17998a4fa214SAhmad Masri 	__le32 triggers;
18008a4fa214SAhmad Masri 	u8 cid;
18018a4fa214SAhmad Masri 	/* DISABLED = 0, ENABLED = 1 , DRY_RUN = 2 */
18028a4fa214SAhmad Masri 	u8 txss_mode;
18038a4fa214SAhmad Masri 	/* DISABLED = 0, ENABLED = 1, DRY_RUN = 2 */
18048a4fa214SAhmad Masri 	u8 brp_mode;
18058a4fa214SAhmad Masri 	/* Max cts threshold (correspond to
18068a4fa214SAhmad Masri 	 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP)
18078a4fa214SAhmad Masri 	 */
18088a4fa214SAhmad Masri 	u8 bf_trigger_max_cts_failure_thr;
18098a4fa214SAhmad Masri 	/* Max cts threshold in dense (correspond to
18108a4fa214SAhmad Masri 	 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP)
18118a4fa214SAhmad Masri 	 */
18128a4fa214SAhmad Masri 	u8 bf_trigger_max_cts_failure_dense_thr;
18138a4fa214SAhmad Masri 	/* Max b-ack threshold (correspond to
18148a4fa214SAhmad Masri 	 * WMI_BF_TRIGGER_MAX_BACK_FAILURE)
18158a4fa214SAhmad Masri 	 */
18168a4fa214SAhmad Masri 	u8 bf_trigger_max_back_failure_thr;
18178a4fa214SAhmad Masri 	/* Max b-ack threshold in dense (correspond to
18188a4fa214SAhmad Masri 	 * WMI_BF_TRIGGER_MAX_BACK_FAILURE)
18198a4fa214SAhmad Masri 	 */
18208a4fa214SAhmad Masri 	u8 bf_trigger_max_back_failure_dense_thr;
18218a4fa214SAhmad Masri 	u8 reserved0;
18228a4fa214SAhmad Masri 	/* Wrong sectors threshold */
18238a4fa214SAhmad Masri 	__le32 wrong_sector_bis_thr;
18248a4fa214SAhmad Masri 	/* BOOL to enable/disable long term trigger */
18258a4fa214SAhmad Masri 	u8 long_term_enable;
18268a4fa214SAhmad Masri 	/* 1 = Update long term thresholds from the long_term_mbps_th_tbl and
18278a4fa214SAhmad Masri 	 * long_term_trig_timeout_per_mcs arrays, 0 = Ignore
18288a4fa214SAhmad Masri 	 */
18298a4fa214SAhmad Masri 	u8 long_term_update_thr;
18308a4fa214SAhmad Masri 	/* Long term throughput threshold [Mbps] */
18318a4fa214SAhmad Masri 	u8 long_term_mbps_th_tbl[WMI_NUM_MCS];
18328a4fa214SAhmad Masri 	u8 reserved1;
18338a4fa214SAhmad Masri 	/* Long term timeout threshold table [msec] */
18348a4fa214SAhmad Masri 	__le16 long_term_trig_timeout_per_mcs[WMI_NUM_MCS];
18358a4fa214SAhmad Masri 	u8 reserved2[2];
18368a4fa214SAhmad Masri } __packed;
18378a4fa214SAhmad Masri 
1838b5aeff16SDedy Lansky /* BF configuration for each MCS */
1839b5aeff16SDedy Lansky struct wmi_bf_control_ex_mcs {
1840b5aeff16SDedy Lansky 	/* Long term throughput threshold [Mbps] */
1841b5aeff16SDedy Lansky 	u8 long_term_mbps_th_tbl;
1842b5aeff16SDedy Lansky 	u8 reserved;
1843b5aeff16SDedy Lansky 	/* Long term timeout threshold table [msec] */
1844b5aeff16SDedy Lansky 	__le16 long_term_trig_timeout_per_mcs;
1845b5aeff16SDedy Lansky } __packed;
1846b5aeff16SDedy Lansky 
1847b5aeff16SDedy Lansky /* WMI_BF_CONTROL_EX_CMDID */
1848b5aeff16SDedy Lansky struct wmi_bf_control_ex_cmd {
1849b5aeff16SDedy Lansky 	/* wmi_bf_triggers */
1850b5aeff16SDedy Lansky 	__le32 triggers;
1851b5aeff16SDedy Lansky 	/* enum wmi_edmg_tx_mode */
1852b5aeff16SDedy Lansky 	u8 tx_mode;
1853b5aeff16SDedy Lansky 	/* DISABLED = 0, ENABLED = 1 , DRY_RUN = 2 */
1854b5aeff16SDedy Lansky 	u8 txss_mode;
1855b5aeff16SDedy Lansky 	/* DISABLED = 0, ENABLED = 1, DRY_RUN = 2 */
1856b5aeff16SDedy Lansky 	u8 brp_mode;
1857b5aeff16SDedy Lansky 	/* Max cts threshold (correspond to
1858b5aeff16SDedy Lansky 	 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP)
1859b5aeff16SDedy Lansky 	 */
1860b5aeff16SDedy Lansky 	u8 bf_trigger_max_cts_failure_thr;
1861b5aeff16SDedy Lansky 	/* Max cts threshold in dense (correspond to
1862b5aeff16SDedy Lansky 	 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP)
1863b5aeff16SDedy Lansky 	 */
1864b5aeff16SDedy Lansky 	u8 bf_trigger_max_cts_failure_dense_thr;
1865b5aeff16SDedy Lansky 	/* Max b-ack threshold (correspond to
1866b5aeff16SDedy Lansky 	 * WMI_BF_TRIGGER_MAX_BACK_FAILURE)
1867b5aeff16SDedy Lansky 	 */
1868b5aeff16SDedy Lansky 	u8 bf_trigger_max_back_failure_thr;
1869b5aeff16SDedy Lansky 	/* Max b-ack threshold in dense (correspond to
1870b5aeff16SDedy Lansky 	 * WMI_BF_TRIGGER_MAX_BACK_FAILURE)
1871b5aeff16SDedy Lansky 	 */
1872b5aeff16SDedy Lansky 	u8 bf_trigger_max_back_failure_dense_thr;
1873b5aeff16SDedy Lansky 	u8 reserved0;
1874b5aeff16SDedy Lansky 	/* Wrong sectors threshold */
1875b5aeff16SDedy Lansky 	__le32 wrong_sector_bis_thr;
1876b5aeff16SDedy Lansky 	/* BOOL to enable/disable long term trigger */
1877b5aeff16SDedy Lansky 	u8 long_term_enable;
1878b5aeff16SDedy Lansky 	/* 1 = Update long term thresholds from the long_term_mbps_th_tbl and
1879b5aeff16SDedy Lansky 	 * long_term_trig_timeout_per_mcs arrays, 0 = Ignore
1880b5aeff16SDedy Lansky 	 */
1881b5aeff16SDedy Lansky 	u8 long_term_update_thr;
1882b5aeff16SDedy Lansky 	u8 each_mcs_cfg_size;
1883b5aeff16SDedy Lansky 	u8 reserved1;
1884b5aeff16SDedy Lansky 	/* Configuration for each MCS */
1885b5aeff16SDedy Lansky 	struct wmi_bf_control_ex_mcs each_mcs_cfg[0];
1886b5aeff16SDedy Lansky } __packed;
1887b5aeff16SDedy Lansky 
1888b5aeff16SDedy Lansky /* WMI_LINK_STATS_CMD */
1889b5aeff16SDedy Lansky enum wmi_link_stats_action {
1890b5aeff16SDedy Lansky 	WMI_LINK_STATS_SNAPSHOT		= 0x00,
1891b5aeff16SDedy Lansky 	WMI_LINK_STATS_PERIODIC		= 0x01,
1892b5aeff16SDedy Lansky 	WMI_LINK_STATS_STOP_PERIODIC	= 0x02,
1893b5aeff16SDedy Lansky };
1894b5aeff16SDedy Lansky 
1895b5aeff16SDedy Lansky /* WMI_LINK_STATS_EVENT record identifiers */
1896b5aeff16SDedy Lansky enum wmi_link_stats_record_type {
1897b5aeff16SDedy Lansky 	WMI_LINK_STATS_TYPE_BASIC	= 0x01,
18980c936b3cSDedy Lansky 	WMI_LINK_STATS_TYPE_GLOBAL	= 0x02,
1899b5aeff16SDedy Lansky };
1900b5aeff16SDedy Lansky 
1901b5aeff16SDedy Lansky /* WMI_LINK_STATS_CMDID */
1902b5aeff16SDedy Lansky struct wmi_link_stats_cmd {
1903b5aeff16SDedy Lansky 	/* bitmask of required record types
1904b5aeff16SDedy Lansky 	 * (wmi_link_stats_record_type_e)
1905b5aeff16SDedy Lansky 	 */
1906b5aeff16SDedy Lansky 	__le32 record_type_mask;
1907b5aeff16SDedy Lansky 	/* 0xff for all cids */
1908b5aeff16SDedy Lansky 	u8 cid;
1909b5aeff16SDedy Lansky 	/* wmi_link_stats_action_e */
1910b5aeff16SDedy Lansky 	u8 action;
1911b5aeff16SDedy Lansky 	u8 reserved[6];
19120c936b3cSDedy Lansky 	/* range = 100 - 10000 */
1913b5aeff16SDedy Lansky 	__le32 interval_msec;
1914b5aeff16SDedy Lansky } __packed;
1915b5aeff16SDedy Lansky 
1916b5aeff16SDedy Lansky /* WMI_SET_GRANT_MCS_CMDID */
1917b5aeff16SDedy Lansky struct wmi_set_grant_mcs_cmd {
1918b5aeff16SDedy Lansky 	u8 mcs;
1919b5aeff16SDedy Lansky 	u8 reserved[3];
1920b5aeff16SDedy Lansky } __packed;
1921b5aeff16SDedy Lansky 
1922b5aeff16SDedy Lansky /* WMI_SET_AP_SLOT_SIZE_CMDID */
1923b5aeff16SDedy Lansky struct wmi_set_ap_slot_size_cmd {
1924b5aeff16SDedy Lansky 	__le32 slot_size;
1925b5aeff16SDedy Lansky } __packed;
1926b5aeff16SDedy Lansky 
1927b874ddecSLior David /* WMI Events
19282be7d22fSVladimir Kondratiev  * List of Events (target to host)
19292be7d22fSVladimir Kondratiev  */
19302be7d22fSVladimir Kondratiev enum wmi_event_id {
19312be7d22fSVladimir Kondratiev 	WMI_READY_EVENTID				= 0x1001,
19322be7d22fSVladimir Kondratiev 	WMI_CONNECT_EVENTID				= 0x1002,
19332be7d22fSVladimir Kondratiev 	WMI_DISCONNECT_EVENTID				= 0x1003,
1934a5dc6883SDedy Lansky 	WMI_START_SCHED_SCAN_EVENTID			= 0x1005,
1935a5dc6883SDedy Lansky 	WMI_STOP_SCHED_SCAN_EVENTID			= 0x1006,
1936a5dc6883SDedy Lansky 	WMI_SCHED_SCAN_RESULT_EVENTID			= 0x1007,
1937b874ddecSLior David 	WMI_SCAN_COMPLETE_EVENTID			= 0x100A,
1938b874ddecSLior David 	WMI_REPORT_STATISTICS_EVENTID			= 0x100B,
1939b5aeff16SDedy Lansky 	WMI_FT_AUTH_STATUS_EVENTID			= 0x100C,
1940b5aeff16SDedy Lansky 	WMI_FT_REASSOC_STATUS_EVENTID			= 0x100D,
1941*6a363e8aSAhmad Masri 	WMI_RADAR_GENERAL_CONFIG_EVENTID		= 0x1100,
1942*6a363e8aSAhmad Masri 	WMI_RADAR_CONFIG_SELECT_EVENTID			= 0x1101,
1943*6a363e8aSAhmad Masri 	WMI_RADAR_PARAMS_CONFIG_EVENTID			= 0x1102,
1944*6a363e8aSAhmad Masri 	WMI_RADAR_SET_MODE_EVENTID			= 0x1103,
1945*6a363e8aSAhmad Masri 	WMI_RADAR_CONTROL_EVENTID			= 0x1104,
1946*6a363e8aSAhmad Masri 	WMI_RADAR_PCI_CONTROL_EVENTID			= 0x1105,
19472be7d22fSVladimir Kondratiev 	WMI_RD_MEM_RSP_EVENTID				= 0x1800,
19482be7d22fSVladimir Kondratiev 	WMI_FW_READY_EVENTID				= 0x1801,
1949b874ddecSLior David 	WMI_EXIT_FAST_MEM_ACC_MODE_EVENTID		= 0x200,
19502be7d22fSVladimir Kondratiev 	WMI_ECHO_RSP_EVENTID				= 0x1803,
1951*6a363e8aSAhmad Masri 	WMI_DEEP_ECHO_RSP_EVENTID			= 0x1804,
1952761f8e4dSLazar Alexei 	/* deprecated */
1953b874ddecSLior David 	WMI_FS_TUNE_DONE_EVENTID			= 0x180A,
1954761f8e4dSLazar Alexei 	/* deprecated */
1955b874ddecSLior David 	WMI_CORR_MEASURE_EVENTID			= 0x180B,
1956b874ddecSLior David 	WMI_READ_RSSI_EVENTID				= 0x180C,
1957b874ddecSLior David 	WMI_TEMP_SENSE_DONE_EVENTID			= 0x180E,
1958b874ddecSLior David 	WMI_DC_CALIB_DONE_EVENTID			= 0x180F,
1959761f8e4dSLazar Alexei 	/* deprecated */
19602be7d22fSVladimir Kondratiev 	WMI_IQ_TX_CALIB_DONE_EVENTID			= 0x1811,
1961761f8e4dSLazar Alexei 	/* deprecated */
19622be7d22fSVladimir Kondratiev 	WMI_IQ_RX_CALIB_DONE_EVENTID			= 0x1812,
19632be7d22fSVladimir Kondratiev 	WMI_SET_WORK_MODE_DONE_EVENTID			= 0x1815,
19642be7d22fSVladimir Kondratiev 	WMI_LO_LEAKAGE_CALIB_DONE_EVENTID		= 0x1816,
1965761f8e4dSLazar Alexei 	WMI_LO_POWER_CALIB_FROM_OTP_EVENTID		= 0x1817,
1966b874ddecSLior David 	WMI_SILENT_RSSI_CALIB_DONE_EVENTID		= 0x181D,
1967761f8e4dSLazar Alexei 	/* deprecated */
1968b874ddecSLior David 	WMI_RF_RX_TEST_DONE_EVENTID			= 0x181E,
19692be7d22fSVladimir Kondratiev 	WMI_CFG_RX_CHAIN_DONE_EVENTID			= 0x1820,
19702be7d22fSVladimir Kondratiev 	WMI_VRING_CFG_DONE_EVENTID			= 0x1821,
19712be7d22fSVladimir Kondratiev 	WMI_BA_STATUS_EVENTID				= 0x1823,
19722be7d22fSVladimir Kondratiev 	WMI_RCP_ADDBA_REQ_EVENTID			= 0x1824,
1973230d8442SVladimir Kondratiev 	WMI_RCP_ADDBA_RESP_SENT_EVENTID			= 0x1825,
19742be7d22fSVladimir Kondratiev 	WMI_DELBA_EVENTID				= 0x1826,
19752be7d22fSVladimir Kondratiev 	WMI_GET_SSID_EVENTID				= 0x1828,
1976b874ddecSLior David 	WMI_GET_PCP_CHANNEL_EVENTID			= 0x182A,
1977*6a363e8aSAhmad Masri 	/* Event is shared between WMI_SW_TX_REQ_CMDID and
1978*6a363e8aSAhmad Masri 	 * WMI_SW_TX_REQ_EXT_CMDID
1979*6a363e8aSAhmad Masri 	 */
1980b874ddecSLior David 	WMI_SW_TX_COMPLETE_EVENTID			= 0x182B,
1981230d8442SVladimir Kondratiev 	WMI_BEAMFORMING_MGMT_DONE_EVENTID		= 0x1836,
19822be7d22fSVladimir Kondratiev 	WMI_BF_TXSS_MGMT_DONE_EVENTID			= 0x1837,
19832be7d22fSVladimir Kondratiev 	WMI_BF_RXSS_MGMT_DONE_EVENTID			= 0x1839,
19842be7d22fSVladimir Kondratiev 	WMI_RS_MGMT_DONE_EVENTID			= 0x1852,
19852be7d22fSVladimir Kondratiev 	WMI_RF_MGMT_STATUS_EVENTID			= 0x1853,
19862be7d22fSVladimir Kondratiev 	WMI_BF_SM_MGMT_DONE_EVENTID			= 0x1838,
19872be7d22fSVladimir Kondratiev 	WMI_RX_MGMT_PACKET_EVENTID			= 0x1840,
19886c2faf09SVladimir Kondratiev 	WMI_TX_MGMT_PACKET_EVENTID			= 0x1841,
19890163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID	= 0x1842,
19900163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENTID		= 0x1843,
1991761f8e4dSLazar Alexei 	WMI_RF_XPM_READ_RESULT_EVENTID			= 0x1856,
1992761f8e4dSLazar Alexei 	WMI_RF_XPM_WRITE_RESULT_EVENTID			= 0x1857,
199310d599adSMaya Erez 	WMI_LED_CFG_DONE_EVENTID			= 0x1858,
1994761f8e4dSLazar Alexei 	WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID		= 0x185C,
1995761f8e4dSLazar Alexei 	WMI_RF_PWR_ON_DELAY_RSP_EVENTID			= 0x185D,
1996761f8e4dSLazar Alexei 	WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID		= 0x185E,
19978a4fa214SAhmad Masri 	WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID		= 0x185F,
19982be7d22fSVladimir Kondratiev 	/* Performance monitoring events */
19992be7d22fSVladimir Kondratiev 	WMI_DATA_PORT_OPEN_EVENTID			= 0x1860,
2000230d8442SVladimir Kondratiev 	WMI_WBE_LINK_DOWN_EVENTID			= 0x1861,
20012be7d22fSVladimir Kondratiev 	WMI_BF_CTRL_DONE_EVENTID			= 0x1862,
20022be7d22fSVladimir Kondratiev 	WMI_NOTIFY_REQ_DONE_EVENTID			= 0x1863,
20032be7d22fSVladimir Kondratiev 	WMI_GET_STATUS_DONE_EVENTID			= 0x1864,
200496c93589SGidon Studinski 	WMI_RING_EN_EVENTID				= 0x1865,
20050163b031SMaya Erez 	WMI_GET_RF_STATUS_EVENTID			= 0x1866,
20060163b031SMaya Erez 	WMI_GET_BASEBAND_TYPE_EVENTID			= 0x1867,
20078a4fa214SAhmad Masri 	WMI_VRING_SWITCH_TIMING_CONFIG_EVENTID		= 0x1868,
20082be7d22fSVladimir Kondratiev 	WMI_UNIT_TEST_EVENTID				= 0x1900,
20092be7d22fSVladimir Kondratiev 	WMI_FLASH_READ_DONE_EVENTID			= 0x1902,
20102be7d22fSVladimir Kondratiev 	WMI_FLASH_WRITE_DONE_EVENTID			= 0x1903,
20110163b031SMaya Erez 	/* Power management */
2012fe9ee51eSMaya Erez 	WMI_TRAFFIC_SUSPEND_EVENTID			= 0x1904,
20130163b031SMaya Erez 	WMI_TRAFFIC_RESUME_EVENTID			= 0x1905,
2014b8023177SVladimir Kondratiev 	/* P2P */
20158c679675SVladimir Kondratiev 	WMI_P2P_CFG_DONE_EVENTID			= 0x1910,
2016b8023177SVladimir Kondratiev 	WMI_PORT_ALLOCATED_EVENTID			= 0x1911,
2017b8023177SVladimir Kondratiev 	WMI_PORT_DELETED_EVENTID			= 0x1912,
2018b8023177SVladimir Kondratiev 	WMI_LISTEN_STARTED_EVENTID			= 0x1914,
2019b8023177SVladimir Kondratiev 	WMI_SEARCH_STARTED_EVENTID			= 0x1915,
2020b8023177SVladimir Kondratiev 	WMI_DISCOVERY_STARTED_EVENTID			= 0x1916,
2021b8023177SVladimir Kondratiev 	WMI_DISCOVERY_STOPPED_EVENTID			= 0x1917,
2022b8023177SVladimir Kondratiev 	WMI_PCP_STARTED_EVENTID				= 0x1918,
2023b8023177SVladimir Kondratiev 	WMI_PCP_STOPPED_EVENTID				= 0x1919,
2024b874ddecSLior David 	WMI_PCP_FACTOR_EVENTID				= 0x191A,
20250163b031SMaya Erez 	/* Power Save Configuration Events */
20260163b031SMaya Erez 	WMI_PS_DEV_PROFILE_CFG_EVENTID			= 0x191C,
2027b5aeff16SDedy Lansky 	WMI_RS_ENABLE_EVENTID				= 0x191E,
2028b5aeff16SDedy Lansky 	WMI_RS_CFG_EX_EVENTID				= 0x191F,
2029b5aeff16SDedy Lansky 	WMI_GET_DETAILED_RS_RES_EX_EVENTID		= 0x1920,
2030b5aeff16SDedy Lansky 	/* deprecated */
20310163b031SMaya Erez 	WMI_RS_CFG_DONE_EVENTID				= 0x1921,
2032b5aeff16SDedy Lansky 	/* deprecated */
203308989f96SLior David 	WMI_GET_DETAILED_RS_RES_EVENTID			= 0x1922,
203408989f96SLior David 	WMI_AOA_MEAS_EVENTID				= 0x1923,
2035a52fb913SLior David 	WMI_BRP_SET_ANT_LIMIT_EVENTID			= 0x1924,
2036cbf795c1SLior David 	WMI_SET_MGMT_RETRY_LIMIT_EVENTID		= 0x1930,
2037cbf795c1SLior David 	WMI_GET_MGMT_RETRY_LIMIT_EVENTID		= 0x1931,
203890ffabb0SDedy Lansky 	WMI_SET_THERMAL_THROTTLING_CFG_EVENTID		= 0x1940,
203990ffabb0SDedy Lansky 	WMI_GET_THERMAL_THROTTLING_CFG_EVENTID		= 0x1941,
2040761f8e4dSLazar Alexei 	/* return the Power Save profile */
2041761f8e4dSLazar Alexei 	WMI_PS_DEV_PROFILE_CFG_READ_EVENTID		= 0x1942,
20428a4fa214SAhmad Masri 	WMI_TSF_SYNC_STATUS_EVENTID			= 0x1973,
204308989f96SLior David 	WMI_TOF_SESSION_END_EVENTID			= 0x1991,
204408989f96SLior David 	WMI_TOF_GET_CAPABILITIES_EVENTID		= 0x1992,
204508989f96SLior David 	WMI_TOF_SET_LCR_EVENTID				= 0x1993,
204608989f96SLior David 	WMI_TOF_SET_LCI_EVENTID				= 0x1994,
204708989f96SLior David 	WMI_TOF_FTM_PER_DEST_RES_EVENTID		= 0x1995,
2048761f8e4dSLazar Alexei 	WMI_TOF_CFG_RESPONDER_EVENTID			= 0x1996,
20498ae5d62cSLior David 	WMI_TOF_SET_TX_RX_OFFSET_EVENTID		= 0x1997,
20508ae5d62cSLior David 	WMI_TOF_GET_TX_RX_OFFSET_EVENTID		= 0x1998,
2051761f8e4dSLazar Alexei 	WMI_TOF_CHANNEL_INFO_EVENTID			= 0x1999,
2052cbf795c1SLior David 	WMI_GET_RF_SECTOR_PARAMS_DONE_EVENTID		= 0x19A0,
2053cbf795c1SLior David 	WMI_SET_RF_SECTOR_PARAMS_DONE_EVENTID		= 0x19A1,
2054cbf795c1SLior David 	WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID	= 0x19A2,
2055cbf795c1SLior David 	WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID	= 0x19A3,
2056cbf795c1SLior David 	WMI_SET_RF_SECTOR_ON_DONE_EVENTID		= 0x19A4,
20578ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_ORDER_EVENTID		= 0x19A5,
20588ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_NUMBER_EVENTID		= 0x19A6,
20598ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID	= 0x19A7,
2060b5aeff16SDedy Lansky 	/* deprecated */
20618a4fa214SAhmad Masri 	WMI_BF_CONTROL_EVENTID				= 0x19AA,
2062b5aeff16SDedy Lansky 	WMI_BF_CONTROL_EX_EVENTID			= 0x19AB,
206396c93589SGidon Studinski 	WMI_TX_STATUS_RING_CFG_DONE_EVENTID		= 0x19C0,
206496c93589SGidon Studinski 	WMI_RX_STATUS_RING_CFG_DONE_EVENTID		= 0x19C1,
206596c93589SGidon Studinski 	WMI_TX_DESC_RING_CFG_DONE_EVENTID		= 0x19C2,
206696c93589SGidon Studinski 	WMI_RX_DESC_RING_CFG_DONE_EVENTID		= 0x19C3,
206796c93589SGidon Studinski 	WMI_CFG_DEF_RX_OFFLOAD_DONE_EVENTID		= 0x19C5,
2068761f8e4dSLazar Alexei 	WMI_SCHEDULING_SCHEME_EVENTID			= 0x1A01,
2069761f8e4dSLazar Alexei 	WMI_FIXED_SCHEDULING_CONFIG_COMPLETE_EVENTID	= 0x1A02,
2070761f8e4dSLazar Alexei 	WMI_ENABLE_FIXED_SCHEDULING_COMPLETE_EVENTID	= 0x1A03,
2071761f8e4dSLazar Alexei 	WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_EVENTID	= 0x1A04,
2072761f8e4dSLazar Alexei 	WMI_SET_LONG_RANGE_CONFIG_COMPLETE_EVENTID	= 0x1A05,
20738a4fa214SAhmad Masri 	WMI_GET_ASSOC_LIST_RES_EVENTID			= 0x1A06,
20748a4fa214SAhmad Masri 	WMI_GET_CCA_INDICATIONS_EVENTID			= 0x1A07,
20758a4fa214SAhmad Masri 	WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_EVENTID	= 0x1A08,
20768a4fa214SAhmad Masri 	WMI_INTERNAL_FW_EVENT_EVENTID			= 0x1A0A,
20778a4fa214SAhmad Masri 	WMI_INTERNAL_FW_IOCTL_EVENTID			= 0x1A0B,
2078b5aeff16SDedy Lansky 	WMI_LINK_STATS_CONFIG_DONE_EVENTID		= 0x1A0C,
2079b5aeff16SDedy Lansky 	WMI_LINK_STATS_EVENTID				= 0x1A0D,
2080b5aeff16SDedy Lansky 	WMI_SET_GRANT_MCS_EVENTID			= 0x1A0E,
2081b5aeff16SDedy Lansky 	WMI_SET_AP_SLOT_SIZE_EVENTID			= 0x1A0F,
2082b5aeff16SDedy Lansky 	WMI_SET_VRING_PRIORITY_WEIGHT_EVENTID		= 0x1A10,
2083b5aeff16SDedy Lansky 	WMI_SET_VRING_PRIORITY_EVENTID			= 0x1A11,
20842be7d22fSVladimir Kondratiev 	WMI_SET_CHANNEL_EVENTID				= 0x9000,
20852be7d22fSVladimir Kondratiev 	WMI_ASSOC_REQ_EVENTID				= 0x9001,
20862be7d22fSVladimir Kondratiev 	WMI_EAPOL_RX_EVENTID				= 0x9002,
20872be7d22fSVladimir Kondratiev 	WMI_MAC_ADDR_RESP_EVENTID			= 0x9003,
20882be7d22fSVladimir Kondratiev 	WMI_FW_VER_EVENTID				= 0x9004,
2089b874ddecSLior David 	WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENTID		= 0x9005,
20908a4fa214SAhmad Masri 	WMI_INTERNAL_FW_SET_CHANNEL			= 0x9006,
2091761f8e4dSLazar Alexei 	WMI_COMMAND_NOT_SUPPORTED_EVENTID		= 0xFFFF,
20922be7d22fSVladimir Kondratiev };
20932be7d22fSVladimir Kondratiev 
2094b874ddecSLior David /* Events data structures */
2095b8023177SVladimir Kondratiev enum wmi_fw_status {
2096b874ddecSLior David 	WMI_FW_STATUS_SUCCESS	= 0x00,
2097b874ddecSLior David 	WMI_FW_STATUS_FAILURE	= 0x01,
2098b8023177SVladimir Kondratiev };
2099b8023177SVladimir Kondratiev 
2100b874ddecSLior David /* WMI_RF_MGMT_STATUS_EVENTID */
21012be7d22fSVladimir Kondratiev enum wmi_rf_status {
2102b874ddecSLior David 	WMI_RF_ENABLED		= 0x00,
2103b874ddecSLior David 	WMI_RF_DISABLED_HW	= 0x01,
2104b874ddecSLior David 	WMI_RF_DISABLED_SW	= 0x02,
2105b874ddecSLior David 	WMI_RF_DISABLED_HW_SW	= 0x03,
21062be7d22fSVladimir Kondratiev };
21072be7d22fSVladimir Kondratiev 
2108b874ddecSLior David /* WMI_RF_MGMT_STATUS_EVENTID */
21092be7d22fSVladimir Kondratiev struct wmi_rf_mgmt_status_event {
21102be7d22fSVladimir Kondratiev 	__le32 rf_status;
21112be7d22fSVladimir Kondratiev } __packed;
21122be7d22fSVladimir Kondratiev 
2113b874ddecSLior David /* WMI_GET_STATUS_DONE_EVENTID */
21142be7d22fSVladimir Kondratiev struct wmi_get_status_done_event {
21152be7d22fSVladimir Kondratiev 	__le32 is_associated;
21162be7d22fSVladimir Kondratiev 	u8 cid;
21172be7d22fSVladimir Kondratiev 	u8 reserved0[3];
21182be7d22fSVladimir Kondratiev 	u8 bssid[WMI_MAC_LEN];
21192be7d22fSVladimir Kondratiev 	u8 channel;
21202be7d22fSVladimir Kondratiev 	u8 reserved1;
21212be7d22fSVladimir Kondratiev 	u8 network_type;
21222be7d22fSVladimir Kondratiev 	u8 reserved2[3];
21232be7d22fSVladimir Kondratiev 	__le32 ssid_len;
21242be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
21252be7d22fSVladimir Kondratiev 	__le32 rf_status;
21262be7d22fSVladimir Kondratiev 	__le32 is_secured;
21272be7d22fSVladimir Kondratiev } __packed;
21282be7d22fSVladimir Kondratiev 
2129b874ddecSLior David /* WMI_FW_VER_EVENTID */
21302be7d22fSVladimir Kondratiev struct wmi_fw_ver_event {
21310163b031SMaya Erez 	/* FW image version */
21320163b031SMaya Erez 	__le32 fw_major;
21330163b031SMaya Erez 	__le32 fw_minor;
21340163b031SMaya Erez 	__le32 fw_subminor;
21350163b031SMaya Erez 	__le32 fw_build;
21360163b031SMaya Erez 	/* FW image build time stamp */
21370163b031SMaya Erez 	__le32 hour;
21380163b031SMaya Erez 	__le32 minute;
21390163b031SMaya Erez 	__le32 second;
21400163b031SMaya Erez 	__le32 day;
21410163b031SMaya Erez 	__le32 month;
21420163b031SMaya Erez 	__le32 year;
21430163b031SMaya Erez 	/* Boot Loader image version */
21440163b031SMaya Erez 	__le32 bl_major;
21450163b031SMaya Erez 	__le32 bl_minor;
21460163b031SMaya Erez 	__le32 bl_subminor;
21470163b031SMaya Erez 	__le32 bl_build;
2148761f8e4dSLazar Alexei 	/* The number of entries in the FW capabilities array */
214908989f96SLior David 	u8 fw_capabilities_len;
215008989f96SLior David 	u8 reserved[3];
215108989f96SLior David 	/* FW capabilities info
215208989f96SLior David 	 * Must be the last member of the struct
215308989f96SLior David 	 */
215408989f96SLior David 	__le32 fw_capabilities[0];
21550163b031SMaya Erez } __packed;
21560163b031SMaya Erez 
21570163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */
21580163b031SMaya Erez enum rf_type {
21590163b031SMaya Erez 	RF_UNKNOWN	= 0x00,
21600163b031SMaya Erez 	RF_MARLON	= 0x01,
21610163b031SMaya Erez 	RF_SPARROW	= 0x02,
21628a4fa214SAhmad Masri 	RF_TALYNA1	= 0x03,
21638a4fa214SAhmad Masri 	RF_TALYNA2	= 0x04,
21640163b031SMaya Erez };
21650163b031SMaya Erez 
21660163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */
21670163b031SMaya Erez enum board_file_rf_type {
21680163b031SMaya Erez 	BF_RF_MARLON	= 0x00,
21690163b031SMaya Erez 	BF_RF_SPARROW	= 0x01,
21708a4fa214SAhmad Masri 	BF_RF_TALYNA1	= 0x02,
21718a4fa214SAhmad Masri 	BF_RF_TALYNA2	= 0x03,
21720163b031SMaya Erez };
21730163b031SMaya Erez 
21740163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */
21750163b031SMaya Erez enum rf_status {
21760163b031SMaya Erez 	RF_OK			= 0x00,
21770163b031SMaya Erez 	RF_NO_COMM		= 0x01,
21780163b031SMaya Erez 	RF_WRONG_BOARD_FILE	= 0x02,
21790163b031SMaya Erez };
21800163b031SMaya Erez 
21810163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */
21820163b031SMaya Erez struct wmi_get_rf_status_event {
21830163b031SMaya Erez 	/* enum rf_type */
21840163b031SMaya Erez 	__le32 rf_type;
21850163b031SMaya Erez 	/* attached RFs bit vector */
21860163b031SMaya Erez 	__le32 attached_rf_vector;
21870163b031SMaya Erez 	/* enabled RFs bit vector */
21880163b031SMaya Erez 	__le32 enabled_rf_vector;
21890163b031SMaya Erez 	/* enum rf_status, refers to enabled RFs */
21900163b031SMaya Erez 	u8 rf_status[32];
21910163b031SMaya Erez 	/* enum board file RF type */
21920163b031SMaya Erez 	__le32 board_file_rf_type;
21930163b031SMaya Erez 	/* board file platform type */
21940163b031SMaya Erez 	__le32 board_file_platform_type;
21950163b031SMaya Erez 	/* board file version */
21960163b031SMaya Erez 	__le32 board_file_version;
2197761f8e4dSLazar Alexei 	/* enabled XIFs bit vector */
2198761f8e4dSLazar Alexei 	__le32 enabled_xif_vector;
2199761f8e4dSLazar Alexei 	__le32 reserved;
22000163b031SMaya Erez } __packed;
22010163b031SMaya Erez 
22020163b031SMaya Erez /* WMI_GET_BASEBAND_TYPE_EVENTID */
22030163b031SMaya Erez enum baseband_type {
22040163b031SMaya Erez 	BASEBAND_UNKNOWN	= 0x00,
22050163b031SMaya Erez 	BASEBAND_SPARROW_M_A0	= 0x03,
22060163b031SMaya Erez 	BASEBAND_SPARROW_M_A1	= 0x04,
22070163b031SMaya Erez 	BASEBAND_SPARROW_M_B0	= 0x05,
22080163b031SMaya Erez 	BASEBAND_SPARROW_M_C0	= 0x06,
22090163b031SMaya Erez 	BASEBAND_SPARROW_M_D0	= 0x07,
22108ae5d62cSLior David 	BASEBAND_TALYN_M_A0	= 0x08,
22118a4fa214SAhmad Masri 	BASEBAND_TALYN_M_B0	= 0x09,
22120163b031SMaya Erez };
22130163b031SMaya Erez 
22140163b031SMaya Erez /* WMI_GET_BASEBAND_TYPE_EVENTID */
22150163b031SMaya Erez struct wmi_get_baseband_type_event {
22160163b031SMaya Erez 	/* enum baseband_type */
22170163b031SMaya Erez 	__le32 baseband_type;
22182be7d22fSVladimir Kondratiev } __packed;
22192be7d22fSVladimir Kondratiev 
2220b874ddecSLior David /* WMI_MAC_ADDR_RESP_EVENTID */
22212be7d22fSVladimir Kondratiev struct wmi_mac_addr_resp_event {
22222be7d22fSVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
22232be7d22fSVladimir Kondratiev 	u8 auth_mode;
22242be7d22fSVladimir Kondratiev 	u8 crypt_mode;
22252be7d22fSVladimir Kondratiev 	__le32 offload_mode;
22262be7d22fSVladimir Kondratiev } __packed;
22272be7d22fSVladimir Kondratiev 
2228b874ddecSLior David /* WMI_EAPOL_RX_EVENTID */
22292be7d22fSVladimir Kondratiev struct wmi_eapol_rx_event {
22302be7d22fSVladimir Kondratiev 	u8 src_mac[WMI_MAC_LEN];
22312be7d22fSVladimir Kondratiev 	__le16 eapol_len;
22322be7d22fSVladimir Kondratiev 	u8 eapol[0];
22332be7d22fSVladimir Kondratiev } __packed;
22342be7d22fSVladimir Kondratiev 
2235b874ddecSLior David /* WMI_READY_EVENTID */
22362be7d22fSVladimir Kondratiev enum wmi_phy_capability {
2237b874ddecSLior David 	WMI_11A_CAPABILITY		= 0x01,
2238b874ddecSLior David 	WMI_11G_CAPABILITY		= 0x02,
2239b874ddecSLior David 	WMI_11AG_CAPABILITY		= 0x03,
2240b874ddecSLior David 	WMI_11NA_CAPABILITY		= 0x04,
2241b874ddecSLior David 	WMI_11NG_CAPABILITY		= 0x05,
2242b874ddecSLior David 	WMI_11NAG_CAPABILITY		= 0x06,
2243b874ddecSLior David 	WMI_11AD_CAPABILITY		= 0x07,
2244b874ddecSLior David 	WMI_11N_CAPABILITY_OFFSET	= 0x03,
22452be7d22fSVladimir Kondratiev };
22462be7d22fSVladimir Kondratiev 
22472be7d22fSVladimir Kondratiev struct wmi_ready_event {
22482be7d22fSVladimir Kondratiev 	__le32 sw_version;
22492be7d22fSVladimir Kondratiev 	__le32 abi_version;
22502be7d22fSVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
2251b874ddecSLior David 	/* enum wmi_phy_capability */
2252b874ddecSLior David 	u8 phy_capability;
2253b8023177SVladimir Kondratiev 	u8 numof_additional_mids;
2254761f8e4dSLazar Alexei 	/* rfc read calibration result. 5..15 */
2255eb4c0215SDedy Lansky 	u8 rfc_read_calib_result;
22568a4fa214SAhmad Masri 	/* Max associated STAs supported by FW in AP mode (default 0 means 8
22578a4fa214SAhmad Masri 	 * STA)
22588a4fa214SAhmad Masri 	 */
22598a4fa214SAhmad Masri 	u8 max_assoc_sta;
22608a4fa214SAhmad Masri 	u8 reserved[2];
22612be7d22fSVladimir Kondratiev } __packed;
22622be7d22fSVladimir Kondratiev 
2263b874ddecSLior David /* WMI_NOTIFY_REQ_DONE_EVENTID */
22642be7d22fSVladimir Kondratiev struct wmi_notify_req_done_event {
2265b874ddecSLior David 	/* beamforming status, 0: fail; 1: OK; 2: retrying */
2266b874ddecSLior David 	__le32 status;
22672be7d22fSVladimir Kondratiev 	__le64 tsf;
226830868f5dSDedy Lansky 	s8 rssi;
226930868f5dSDedy Lansky 	u8 reserved0[3];
22702be7d22fSVladimir Kondratiev 	__le32 tx_tpt;
22712be7d22fSVladimir Kondratiev 	__le32 tx_goodput;
22722be7d22fSVladimir Kondratiev 	__le32 rx_goodput;
22732be7d22fSVladimir Kondratiev 	__le16 bf_mcs;
22742be7d22fSVladimir Kondratiev 	__le16 my_rx_sector;
22752be7d22fSVladimir Kondratiev 	__le16 my_tx_sector;
22762be7d22fSVladimir Kondratiev 	__le16 other_rx_sector;
22772be7d22fSVladimir Kondratiev 	__le16 other_tx_sector;
22782be7d22fSVladimir Kondratiev 	__le16 range;
2279b8023177SVladimir Kondratiev 	u8 sqi;
2280b8023177SVladimir Kondratiev 	u8 reserved[3];
22812be7d22fSVladimir Kondratiev } __packed;
22822be7d22fSVladimir Kondratiev 
2283b874ddecSLior David /* WMI_CONNECT_EVENTID */
22842be7d22fSVladimir Kondratiev struct wmi_connect_event {
22852be7d22fSVladimir Kondratiev 	u8 channel;
22862be7d22fSVladimir Kondratiev 	u8 reserved0;
22872be7d22fSVladimir Kondratiev 	u8 bssid[WMI_MAC_LEN];
22882be7d22fSVladimir Kondratiev 	__le16 listen_interval;
22892be7d22fSVladimir Kondratiev 	__le16 beacon_interval;
22902be7d22fSVladimir Kondratiev 	u8 network_type;
22912be7d22fSVladimir Kondratiev 	u8 reserved1[3];
22922be7d22fSVladimir Kondratiev 	u8 beacon_ie_len;
22932be7d22fSVladimir Kondratiev 	u8 assoc_req_len;
22942be7d22fSVladimir Kondratiev 	u8 assoc_resp_len;
22952be7d22fSVladimir Kondratiev 	u8 cid;
2296a52fb913SLior David 	u8 aid;
2297a52fb913SLior David 	u8 reserved2[2];
2298b874ddecSLior David 	/* not in use */
22992be7d22fSVladimir Kondratiev 	u8 assoc_info[0];
23002be7d22fSVladimir Kondratiev } __packed;
23012be7d22fSVladimir Kondratiev 
2302849a564bSDedy Lansky /* disconnect_reason */
23032be7d22fSVladimir Kondratiev enum wmi_disconnect_reason {
2304b874ddecSLior David 	WMI_DIS_REASON_NO_NETWORK_AVAIL		= 0x01,
2305b874ddecSLior David 	/* bmiss */
2306b874ddecSLior David 	WMI_DIS_REASON_LOST_LINK		= 0x02,
2307b874ddecSLior David 	WMI_DIS_REASON_DISCONNECT_CMD		= 0x03,
2308b874ddecSLior David 	WMI_DIS_REASON_BSS_DISCONNECTED		= 0x04,
2309b874ddecSLior David 	WMI_DIS_REASON_AUTH_FAILED		= 0x05,
2310b874ddecSLior David 	WMI_DIS_REASON_ASSOC_FAILED		= 0x06,
2311b874ddecSLior David 	WMI_DIS_REASON_NO_RESOURCES_AVAIL	= 0x07,
2312b874ddecSLior David 	WMI_DIS_REASON_CSERV_DISCONNECT		= 0x08,
2313b874ddecSLior David 	WMI_DIS_REASON_INVALID_PROFILE		= 0x0A,
2314b874ddecSLior David 	WMI_DIS_REASON_DOT11H_CHANNEL_SWITCH	= 0x0B,
2315b874ddecSLior David 	WMI_DIS_REASON_PROFILE_MISMATCH		= 0x0C,
2316b874ddecSLior David 	WMI_DIS_REASON_CONNECTION_EVICTED	= 0x0D,
2317b874ddecSLior David 	WMI_DIS_REASON_IBSS_MERGE		= 0x0E,
23182be7d22fSVladimir Kondratiev };
23192be7d22fSVladimir Kondratiev 
2320849a564bSDedy Lansky /* WMI_DISCONNECT_EVENTID */
23212be7d22fSVladimir Kondratiev struct wmi_disconnect_event {
2322b874ddecSLior David 	/* reason code, see 802.11 spec. */
2323b874ddecSLior David 	__le16 protocol_reason_status;
2324b874ddecSLior David 	/* set if known */
2325b874ddecSLior David 	u8 bssid[WMI_MAC_LEN];
2326b874ddecSLior David 	/* see enum wmi_disconnect_reason */
2327b874ddecSLior David 	u8 disconnect_reason;
2328b874ddecSLior David 	/* last assoc req may passed to host - not in used */
2329b874ddecSLior David 	u8 assoc_resp_len;
2330b874ddecSLior David 	/* last assoc req may passed to host - not in used */
2331b874ddecSLior David 	u8 assoc_info[0];
23322be7d22fSVladimir Kondratiev } __packed;
23332be7d22fSVladimir Kondratiev 
2334b874ddecSLior David /* WMI_SCAN_COMPLETE_EVENTID */
23356c2faf09SVladimir Kondratiev enum scan_status {
2336b874ddecSLior David 	WMI_SCAN_SUCCESS	= 0x00,
2337b874ddecSLior David 	WMI_SCAN_FAILED		= 0x01,
2338b874ddecSLior David 	WMI_SCAN_ABORTED	= 0x02,
2339b874ddecSLior David 	WMI_SCAN_REJECTED	= 0x03,
2340b874ddecSLior David 	WMI_SCAN_ABORT_REJECTED	= 0x04,
23416c2faf09SVladimir Kondratiev };
23426c2faf09SVladimir Kondratiev 
23432be7d22fSVladimir Kondratiev struct wmi_scan_complete_event {
2344b874ddecSLior David 	/* enum scan_status */
2345b874ddecSLior David 	__le32 status;
23462be7d22fSVladimir Kondratiev } __packed;
23472be7d22fSVladimir Kondratiev 
2348b5aeff16SDedy Lansky /* WMI_FT_AUTH_STATUS_EVENTID */
2349b5aeff16SDedy Lansky struct wmi_ft_auth_status_event {
2350b5aeff16SDedy Lansky 	/* enum wmi_fw_status */
2351b5aeff16SDedy Lansky 	u8 status;
2352b5aeff16SDedy Lansky 	u8 reserved[3];
2353b5aeff16SDedy Lansky 	u8 mac_addr[WMI_MAC_LEN];
2354b5aeff16SDedy Lansky 	__le16 ie_len;
2355b5aeff16SDedy Lansky 	u8 ie_info[0];
2356b5aeff16SDedy Lansky } __packed;
2357b5aeff16SDedy Lansky 
2358b5aeff16SDedy Lansky /* WMI_FT_REASSOC_STATUS_EVENTID */
2359b5aeff16SDedy Lansky struct wmi_ft_reassoc_status_event {
2360b5aeff16SDedy Lansky 	/* enum wmi_fw_status */
2361b5aeff16SDedy Lansky 	u8 status;
2362b5aeff16SDedy Lansky 	/* association id received from new AP */
2363b5aeff16SDedy Lansky 	u8 aid;
2364b5aeff16SDedy Lansky 	/* enum wmi_channel */
2365b5aeff16SDedy Lansky 	u8 channel;
2366b5aeff16SDedy Lansky 	/* enum wmi_channel */
2367b5aeff16SDedy Lansky 	u8 edmg_channel;
2368b5aeff16SDedy Lansky 	u8 mac_addr[WMI_MAC_LEN];
2369b5aeff16SDedy Lansky 	__le16 beacon_ie_len;
2370b5aeff16SDedy Lansky 	__le16 reassoc_req_ie_len;
2371b5aeff16SDedy Lansky 	__le16 reassoc_resp_ie_len;
2372b5aeff16SDedy Lansky 	u8 ie_info[0];
2373b5aeff16SDedy Lansky } __packed;
2374b5aeff16SDedy Lansky 
2375a5dc6883SDedy Lansky /* wmi_rx_mgmt_info */
2376a5dc6883SDedy Lansky struct wmi_rx_mgmt_info {
2377a5dc6883SDedy Lansky 	u8 mcs;
2378a5dc6883SDedy Lansky 	s8 rssi;
2379a5dc6883SDedy Lansky 	u8 range;
2380a5dc6883SDedy Lansky 	u8 sqi;
2381a5dc6883SDedy Lansky 	__le16 stype;
2382a5dc6883SDedy Lansky 	__le16 status;
2383a5dc6883SDedy Lansky 	__le32 len;
2384a5dc6883SDedy Lansky 	/* Not resolved when == 0xFFFFFFFF == > Broadcast to all MIDS */
2385a5dc6883SDedy Lansky 	u8 qid;
2386a5dc6883SDedy Lansky 	/* Not resolved when == 0xFFFFFFFF == > Broadcast to all MIDS */
2387a5dc6883SDedy Lansky 	u8 mid;
2388a5dc6883SDedy Lansky 	u8 cid;
2389a5dc6883SDedy Lansky 	/* From Radio MNGR */
2390a5dc6883SDedy Lansky 	u8 channel;
2391a5dc6883SDedy Lansky } __packed;
2392a5dc6883SDedy Lansky 
2393a5dc6883SDedy Lansky /* WMI_START_SCHED_SCAN_EVENTID */
2394a5dc6883SDedy Lansky enum wmi_pno_result {
2395a5dc6883SDedy Lansky 	WMI_PNO_SUCCESS			= 0x00,
2396a5dc6883SDedy Lansky 	WMI_PNO_REJECT			= 0x01,
2397a5dc6883SDedy Lansky 	WMI_PNO_INVALID_PARAMETERS	= 0x02,
2398a5dc6883SDedy Lansky 	WMI_PNO_NOT_ENABLED		= 0x03,
2399a5dc6883SDedy Lansky };
2400a5dc6883SDedy Lansky 
2401a5dc6883SDedy Lansky struct wmi_start_sched_scan_event {
24028a4fa214SAhmad Masri 	/* wmi_pno_result */
2403a5dc6883SDedy Lansky 	u8 result;
2404a5dc6883SDedy Lansky 	u8 reserved[3];
2405a5dc6883SDedy Lansky } __packed;
2406a5dc6883SDedy Lansky 
2407a5dc6883SDedy Lansky struct wmi_stop_sched_scan_event {
24088a4fa214SAhmad Masri 	/* wmi_pno_result */
2409a5dc6883SDedy Lansky 	u8 result;
2410a5dc6883SDedy Lansky 	u8 reserved[3];
2411a5dc6883SDedy Lansky } __packed;
2412a5dc6883SDedy Lansky 
2413a5dc6883SDedy Lansky struct wmi_sched_scan_result_event {
2414a5dc6883SDedy Lansky 	struct wmi_rx_mgmt_info info;
2415a5dc6883SDedy Lansky 	u8 payload[0];
2416a5dc6883SDedy Lansky } __packed;
2417a5dc6883SDedy Lansky 
2418b874ddecSLior David /* WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENT */
2419b874ddecSLior David enum wmi_acs_info_bitmask {
2420b874ddecSLior David 	WMI_ACS_INFO_BITMASK_BEACON_FOUND	= 0x01,
2421b874ddecSLior David 	WMI_ACS_INFO_BITMASK_BUSY_TIME		= 0x02,
2422b874ddecSLior David 	WMI_ACS_INFO_BITMASK_TX_TIME		= 0x04,
2423b874ddecSLior David 	WMI_ACS_INFO_BITMASK_RX_TIME		= 0x08,
2424b874ddecSLior David 	WMI_ACS_INFO_BITMASK_NOISE		= 0x10,
24252be7d22fSVladimir Kondratiev };
24262be7d22fSVladimir Kondratiev 
2427b874ddecSLior David struct scan_acs_info {
2428b874ddecSLior David 	u8 channel;
2429b874ddecSLior David 	u8 beacon_found;
2430b874ddecSLior David 	/* msec */
2431b874ddecSLior David 	__le16 busy_time;
2432b874ddecSLior David 	__le16 tx_time;
2433b874ddecSLior David 	__le16 rx_time;
2434b874ddecSLior David 	u8 noise;
2435b874ddecSLior David 	u8 reserved[3];
2436b874ddecSLior David } __packed;
2437b874ddecSLior David 
2438b874ddecSLior David struct wmi_acs_passive_scan_complete_event {
2439b874ddecSLior David 	__le32 dwell_time;
2440b874ddecSLior David 	/* valid fields within channel info according to
2441b874ddecSLior David 	 * their appearance in struct order
2442b874ddecSLior David 	 */
2443b874ddecSLior David 	__le16 filled;
2444b874ddecSLior David 	u8 num_scanned_channels;
2445b874ddecSLior David 	u8 reserved;
2446b874ddecSLior David 	struct scan_acs_info scan_info_list[0];
2447b874ddecSLior David } __packed;
2448b874ddecSLior David 
2449b874ddecSLior David /* WMI_BA_STATUS_EVENTID */
2450b874ddecSLior David enum wmi_vring_ba_status {
2451b874ddecSLior David 	WMI_BA_AGREED			= 0x00,
2452b874ddecSLior David 	WMI_BA_NON_AGREED		= 0x01,
2453b874ddecSLior David 	/* BA_EN in middle of teardown flow */
2454b874ddecSLior David 	WMI_BA_TD_WIP			= 0x02,
2455b874ddecSLior David 	/* BA_DIS or BA_EN in middle of BA SETUP flow */
2456b874ddecSLior David 	WMI_BA_SETUP_WIP		= 0x03,
2457b874ddecSLior David 	/* BA_EN when the BA session is already active */
2458b874ddecSLior David 	WMI_BA_SESSION_ACTIVE		= 0x04,
2459b874ddecSLior David 	/* BA_DIS when the BA session is not active */
2460b874ddecSLior David 	WMI_BA_SESSION_NOT_ACTIVE	= 0x05,
2461b874ddecSLior David };
2462b874ddecSLior David 
2463b874ddecSLior David struct wmi_ba_status_event {
2464b874ddecSLior David 	/* enum wmi_vring_ba_status */
2465b874ddecSLior David 	__le16 status;
24662be7d22fSVladimir Kondratiev 	u8 reserved[2];
24672be7d22fSVladimir Kondratiev 	u8 ringid;
24682be7d22fSVladimir Kondratiev 	u8 agg_wsize;
24692be7d22fSVladimir Kondratiev 	__le16 ba_timeout;
2470cbcf5866SVladimir Kondratiev 	u8 amsdu;
24712be7d22fSVladimir Kondratiev } __packed;
24722be7d22fSVladimir Kondratiev 
2473b874ddecSLior David /* WMI_DELBA_EVENTID */
24742be7d22fSVladimir Kondratiev struct wmi_delba_event {
24758a4fa214SAhmad Masri 	/* Used for cid less than 8. For higher cid set
24768a4fa214SAhmad Masri 	 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
24778a4fa214SAhmad Masri 	 */
24782be7d22fSVladimir Kondratiev 	u8 cidxtid;
24792be7d22fSVladimir Kondratiev 	u8 from_initiator;
24802be7d22fSVladimir Kondratiev 	__le16 reason;
24818a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
24828a4fa214SAhmad Masri 	u8 cid;
24838a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
24848a4fa214SAhmad Masri 	u8 tid;
24858a4fa214SAhmad Masri 	u8 reserved[2];
24862be7d22fSVladimir Kondratiev } __packed;
24872be7d22fSVladimir Kondratiev 
2488b874ddecSLior David /* WMI_VRING_CFG_DONE_EVENTID */
24892be7d22fSVladimir Kondratiev struct wmi_vring_cfg_done_event {
24902be7d22fSVladimir Kondratiev 	u8 ringid;
24912be7d22fSVladimir Kondratiev 	u8 status;
24922be7d22fSVladimir Kondratiev 	u8 reserved[2];
24932be7d22fSVladimir Kondratiev 	__le32 tx_vring_tail_ptr;
24942be7d22fSVladimir Kondratiev } __packed;
24952be7d22fSVladimir Kondratiev 
2496b874ddecSLior David /* WMI_RCP_ADDBA_RESP_SENT_EVENTID */
24972be7d22fSVladimir Kondratiev struct wmi_rcp_addba_resp_sent_event {
24988a4fa214SAhmad Masri 	/* Used for cid less than 8. For higher cid set
24998a4fa214SAhmad Masri 	 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
25008a4fa214SAhmad Masri 	 */
25012be7d22fSVladimir Kondratiev 	u8 cidxtid;
25022be7d22fSVladimir Kondratiev 	u8 reserved;
25032be7d22fSVladimir Kondratiev 	__le16 status;
25048a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
25058a4fa214SAhmad Masri 	u8 cid;
25068a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
25078a4fa214SAhmad Masri 	u8 tid;
25088a4fa214SAhmad Masri 	u8 reserved2[2];
25092be7d22fSVladimir Kondratiev } __packed;
25102be7d22fSVladimir Kondratiev 
251196c93589SGidon Studinski /* WMI_TX_STATUS_RING_CFG_DONE_EVENTID */
251296c93589SGidon Studinski struct wmi_tx_status_ring_cfg_done_event {
251396c93589SGidon Studinski 	u8 ring_id;
251496c93589SGidon Studinski 	/* wmi_fw_status */
251596c93589SGidon Studinski 	u8 status;
251696c93589SGidon Studinski 	u8 reserved[2];
251796c93589SGidon Studinski 	__le32 ring_tail_ptr;
251896c93589SGidon Studinski } __packed;
251996c93589SGidon Studinski 
252096c93589SGidon Studinski /* WMI_RX_STATUS_RING_CFG_DONE_EVENTID */
252196c93589SGidon Studinski struct wmi_rx_status_ring_cfg_done_event {
252296c93589SGidon Studinski 	u8 ring_id;
252396c93589SGidon Studinski 	/* wmi_fw_status */
252496c93589SGidon Studinski 	u8 status;
252596c93589SGidon Studinski 	u8 reserved[2];
252696c93589SGidon Studinski 	__le32 ring_tail_ptr;
252796c93589SGidon Studinski } __packed;
252896c93589SGidon Studinski 
252996c93589SGidon Studinski /* WMI_CFG_DEF_RX_OFFLOAD_DONE_EVENTID */
253096c93589SGidon Studinski struct wmi_cfg_def_rx_offload_done_event {
253196c93589SGidon Studinski 	/* wmi_fw_status */
253296c93589SGidon Studinski 	u8 status;
253396c93589SGidon Studinski 	u8 reserved[3];
253496c93589SGidon Studinski } __packed;
253596c93589SGidon Studinski 
253696c93589SGidon Studinski /* WMI_TX_DESC_RING_CFG_DONE_EVENTID */
253796c93589SGidon Studinski struct wmi_tx_desc_ring_cfg_done_event {
253896c93589SGidon Studinski 	u8 ring_id;
253996c93589SGidon Studinski 	/* wmi_fw_status */
254096c93589SGidon Studinski 	u8 status;
254196c93589SGidon Studinski 	u8 reserved[2];
254296c93589SGidon Studinski 	__le32 ring_tail_ptr;
254396c93589SGidon Studinski } __packed;
254496c93589SGidon Studinski 
254596c93589SGidon Studinski /* WMI_RX_DESC_RING_CFG_DONE_EVENTID */
254696c93589SGidon Studinski struct wmi_rx_desc_ring_cfg_done_event {
254796c93589SGidon Studinski 	u8 ring_id;
254896c93589SGidon Studinski 	/* wmi_fw_status */
254996c93589SGidon Studinski 	u8 status;
255096c93589SGidon Studinski 	u8 reserved[2];
255196c93589SGidon Studinski 	__le32 ring_tail_ptr;
255296c93589SGidon Studinski } __packed;
255396c93589SGidon Studinski 
2554b874ddecSLior David /* WMI_RCP_ADDBA_REQ_EVENTID */
25552be7d22fSVladimir Kondratiev struct wmi_rcp_addba_req_event {
25568a4fa214SAhmad Masri 	/* Used for cid less than 8. For higher cid set
25578a4fa214SAhmad Masri 	 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
25588a4fa214SAhmad Masri 	 */
25592be7d22fSVladimir Kondratiev 	u8 cidxtid;
25602be7d22fSVladimir Kondratiev 	u8 dialog_token;
2561b874ddecSLior David 	/* ieee80211_ba_parameterset as it received */
2562b874ddecSLior David 	__le16 ba_param_set;
25632be7d22fSVladimir Kondratiev 	__le16 ba_timeout;
2564b874ddecSLior David 	/* ieee80211_ba_seqstrl field as it received */
2565b874ddecSLior David 	__le16 ba_seq_ctrl;
25668a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
25678a4fa214SAhmad Masri 	u8 cid;
25688a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
25698a4fa214SAhmad Masri 	u8 tid;
25708a4fa214SAhmad Masri 	u8 reserved[2];
25712be7d22fSVladimir Kondratiev } __packed;
25722be7d22fSVladimir Kondratiev 
2573b874ddecSLior David /* WMI_CFG_RX_CHAIN_DONE_EVENTID */
25742be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_done_event_status {
2575b874ddecSLior David 	WMI_CFG_RX_CHAIN_SUCCESS	= 0x01,
25762be7d22fSVladimir Kondratiev };
25772be7d22fSVladimir Kondratiev 
25782be7d22fSVladimir Kondratiev struct wmi_cfg_rx_chain_done_event {
2579b874ddecSLior David 	/* V-Ring Tail pointer */
2580b874ddecSLior David 	__le32 rx_ring_tail_ptr;
25812be7d22fSVladimir Kondratiev 	__le32 status;
25822be7d22fSVladimir Kondratiev } __packed;
25832be7d22fSVladimir Kondratiev 
2584b874ddecSLior David /* WMI_WBE_LINK_DOWN_EVENTID */
25852be7d22fSVladimir Kondratiev enum wmi_wbe_link_down_event_reason {
2586b874ddecSLior David 	WMI_WBE_REASON_USER_REQUEST	= 0x00,
2587b874ddecSLior David 	WMI_WBE_REASON_RX_DISASSOC	= 0x01,
2588b874ddecSLior David 	WMI_WBE_REASON_BAD_PHY_LINK	= 0x02,
25892be7d22fSVladimir Kondratiev };
25902be7d22fSVladimir Kondratiev 
2591b874ddecSLior David /* WMI_WBE_LINK_DOWN_EVENTID */
25922be7d22fSVladimir Kondratiev struct wmi_wbe_link_down_event {
25932be7d22fSVladimir Kondratiev 	u8 cid;
25942be7d22fSVladimir Kondratiev 	u8 reserved[3];
25952be7d22fSVladimir Kondratiev 	__le32 reason;
25962be7d22fSVladimir Kondratiev } __packed;
25972be7d22fSVladimir Kondratiev 
2598b874ddecSLior David /* WMI_DATA_PORT_OPEN_EVENTID */
25992be7d22fSVladimir Kondratiev struct wmi_data_port_open_event {
26002be7d22fSVladimir Kondratiev 	u8 cid;
26012be7d22fSVladimir Kondratiev 	u8 reserved[3];
26022be7d22fSVladimir Kondratiev } __packed;
26032be7d22fSVladimir Kondratiev 
260496c93589SGidon Studinski /* WMI_RING_EN_EVENTID */
260596c93589SGidon Studinski struct wmi_ring_en_event {
260696c93589SGidon Studinski 	u8 ring_index;
2607230d8442SVladimir Kondratiev 	u8 reserved[3];
2608230d8442SVladimir Kondratiev } __packed;
2609230d8442SVladimir Kondratiev 
2610b874ddecSLior David /* WMI_GET_PCP_CHANNEL_EVENTID */
26112be7d22fSVladimir Kondratiev struct wmi_get_pcp_channel_event {
26122be7d22fSVladimir Kondratiev 	u8 channel;
26132be7d22fSVladimir Kondratiev 	u8 reserved[3];
26142be7d22fSVladimir Kondratiev } __packed;
26152be7d22fSVladimir Kondratiev 
2616b874ddecSLior David /* WMI_P2P_CFG_DONE_EVENTID */
26178c679675SVladimir Kondratiev struct wmi_p2p_cfg_done_event {
2618b874ddecSLior David 	/* wmi_fw_status */
2619b874ddecSLior David 	u8 status;
26208c679675SVladimir Kondratiev 	u8 reserved[3];
26218c679675SVladimir Kondratiev } __packed;
26228c679675SVladimir Kondratiev 
2623b874ddecSLior David /* WMI_PORT_ALLOCATED_EVENTID */
2624b8023177SVladimir Kondratiev struct wmi_port_allocated_event {
2625b874ddecSLior David 	/* wmi_fw_status */
2626b874ddecSLior David 	u8 status;
2627b8023177SVladimir Kondratiev 	u8 reserved[3];
2628b8023177SVladimir Kondratiev } __packed;
2629b8023177SVladimir Kondratiev 
2630b874ddecSLior David /* WMI_PORT_DELETED_EVENTID */
2631b8023177SVladimir Kondratiev struct wmi_port_deleted_event {
2632b874ddecSLior David 	/* wmi_fw_status */
2633b874ddecSLior David 	u8 status;
2634b8023177SVladimir Kondratiev 	u8 reserved[3];
2635b8023177SVladimir Kondratiev } __packed;
2636b8023177SVladimir Kondratiev 
2637b874ddecSLior David /* WMI_LISTEN_STARTED_EVENTID */
2638b8023177SVladimir Kondratiev struct wmi_listen_started_event {
2639b874ddecSLior David 	/* wmi_fw_status */
2640b874ddecSLior David 	u8 status;
2641b8023177SVladimir Kondratiev 	u8 reserved[3];
2642b8023177SVladimir Kondratiev } __packed;
2643b8023177SVladimir Kondratiev 
2644b874ddecSLior David /* WMI_SEARCH_STARTED_EVENTID */
2645b8023177SVladimir Kondratiev struct wmi_search_started_event {
2646b874ddecSLior David 	/* wmi_fw_status */
2647b874ddecSLior David 	u8 status;
2648b8023177SVladimir Kondratiev 	u8 reserved[3];
2649b8023177SVladimir Kondratiev } __packed;
2650b8023177SVladimir Kondratiev 
2651b874ddecSLior David /* WMI_PCP_STARTED_EVENTID */
2652b8023177SVladimir Kondratiev struct wmi_pcp_started_event {
2653b874ddecSLior David 	/* wmi_fw_status */
2654b874ddecSLior David 	u8 status;
2655b8023177SVladimir Kondratiev 	u8 reserved[3];
2656b8023177SVladimir Kondratiev } __packed;
2657b8023177SVladimir Kondratiev 
2658b874ddecSLior David /* WMI_PCP_FACTOR_EVENTID */
2659b8023177SVladimir Kondratiev struct wmi_pcp_factor_event {
2660b8023177SVladimir Kondratiev 	__le32 pcp_factor;
2661b8023177SVladimir Kondratiev } __packed;
2662b8023177SVladimir Kondratiev 
26632be7d22fSVladimir Kondratiev enum wmi_sw_tx_status {
2664b874ddecSLior David 	WMI_TX_SW_STATUS_SUCCESS		= 0x00,
2665b874ddecSLior David 	WMI_TX_SW_STATUS_FAILED_NO_RESOURCES	= 0x01,
2666b874ddecSLior David 	WMI_TX_SW_STATUS_FAILED_TX		= 0x02,
26672be7d22fSVladimir Kondratiev };
26682be7d22fSVladimir Kondratiev 
2669b874ddecSLior David /* WMI_SW_TX_COMPLETE_EVENTID */
26702be7d22fSVladimir Kondratiev struct wmi_sw_tx_complete_event {
2671b874ddecSLior David 	/* enum wmi_sw_tx_status */
2672b874ddecSLior David 	u8 status;
26732be7d22fSVladimir Kondratiev 	u8 reserved[3];
26742be7d22fSVladimir Kondratiev } __packed;
26752be7d22fSVladimir Kondratiev 
2676761f8e4dSLazar Alexei /* WMI_CORR_MEASURE_EVENTID - deprecated */
2677b8023177SVladimir Kondratiev struct wmi_corr_measure_event {
2678b874ddecSLior David 	/* signed */
2679b874ddecSLior David 	__le32 i;
2680b874ddecSLior David 	/* signed */
2681b874ddecSLior David 	__le32 q;
2682b874ddecSLior David 	/* signed */
2683b874ddecSLior David 	__le32 image_i;
2684b874ddecSLior David 	/* signed */
2685b874ddecSLior David 	__le32 image_q;
2686b8023177SVladimir Kondratiev } __packed;
2687b8023177SVladimir Kondratiev 
2688b874ddecSLior David /* WMI_READ_RSSI_EVENTID */
2689b8023177SVladimir Kondratiev struct wmi_read_rssi_event {
2690b8023177SVladimir Kondratiev 	__le32 ina_rssi_adc_dbm;
2691b8023177SVladimir Kondratiev } __packed;
2692b8023177SVladimir Kondratiev 
2693b874ddecSLior David /* WMI_GET_SSID_EVENTID */
26942be7d22fSVladimir Kondratiev struct wmi_get_ssid_event {
26952be7d22fSVladimir Kondratiev 	__le32 ssid_len;
26962be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
26972be7d22fSVladimir Kondratiev } __packed;
26982be7d22fSVladimir Kondratiev 
2699761f8e4dSLazar Alexei /* EVENT: WMI_RF_XPM_READ_RESULT_EVENTID */
2700761f8e4dSLazar Alexei struct wmi_rf_xpm_read_result_event {
2701761f8e4dSLazar Alexei 	/* enum wmi_fw_status_e - success=0 or fail=1 */
2702761f8e4dSLazar Alexei 	u8 status;
2703761f8e4dSLazar Alexei 	u8 reserved[3];
2704761f8e4dSLazar Alexei 	/* requested num_bytes of data */
2705761f8e4dSLazar Alexei 	u8 data_bytes[0];
2706b874ddecSLior David } __packed;
2707b874ddecSLior David 
2708761f8e4dSLazar Alexei /* EVENT: WMI_RF_XPM_WRITE_RESULT_EVENTID */
2709761f8e4dSLazar Alexei struct wmi_rf_xpm_write_result_event {
2710761f8e4dSLazar Alexei 	/* enum wmi_fw_status_e - success=0 or fail=1 */
2711761f8e4dSLazar Alexei 	u8 status;
2712761f8e4dSLazar Alexei 	u8 reserved[3];
2713b874ddecSLior David } __packed;
2714b874ddecSLior David 
2715b874ddecSLior David /* WMI_TX_MGMT_PACKET_EVENTID */
27166c2faf09SVladimir Kondratiev struct wmi_tx_mgmt_packet_event {
27176c2faf09SVladimir Kondratiev 	u8 payload[0];
27186c2faf09SVladimir Kondratiev } __packed;
27196c2faf09SVladimir Kondratiev 
2720b874ddecSLior David /* WMI_RX_MGMT_PACKET_EVENTID */
27212be7d22fSVladimir Kondratiev struct wmi_rx_mgmt_packet_event {
27222be7d22fSVladimir Kondratiev 	struct wmi_rx_mgmt_info info;
27232be7d22fSVladimir Kondratiev 	u8 payload[0];
27242be7d22fSVladimir Kondratiev } __packed;
27252be7d22fSVladimir Kondratiev 
2726b874ddecSLior David /* WMI_ECHO_RSP_EVENTID */
2727b874ddecSLior David struct wmi_echo_rsp_event {
27282be7d22fSVladimir Kondratiev 	__le32 echoed_value;
27292be7d22fSVladimir Kondratiev } __packed;
27302be7d22fSVladimir Kondratiev 
2731*6a363e8aSAhmad Masri /* WMI_DEEP_ECHO_RSP_EVENTID */
2732*6a363e8aSAhmad Masri struct wmi_deep_echo_rsp_event {
2733*6a363e8aSAhmad Masri 	__le32 echoed_value;
2734*6a363e8aSAhmad Masri } __packed;
2735*6a363e8aSAhmad Masri 
2736761f8e4dSLazar Alexei /* WMI_RF_PWR_ON_DELAY_RSP_EVENTID */
2737761f8e4dSLazar Alexei struct wmi_rf_pwr_on_delay_rsp_event {
2738761f8e4dSLazar Alexei 	/* wmi_fw_status */
2739761f8e4dSLazar Alexei 	u8 status;
2740761f8e4dSLazar Alexei 	u8 reserved[3];
2741761f8e4dSLazar Alexei } __packed;
2742761f8e4dSLazar Alexei 
2743761f8e4dSLazar Alexei /* WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID */
2744761f8e4dSLazar Alexei struct wmi_set_high_power_table_params_event {
2745761f8e4dSLazar Alexei 	/* wmi_fw_status */
2746761f8e4dSLazar Alexei 	u8 status;
2747761f8e4dSLazar Alexei 	u8 reserved[3];
2748761f8e4dSLazar Alexei } __packed;
2749761f8e4dSLazar Alexei 
27508a4fa214SAhmad Masri /* WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID */
27518a4fa214SAhmad Masri struct wmi_fixed_scheduling_ul_config_event {
27528a4fa214SAhmad Masri 	/* wmi_fw_status */
27538a4fa214SAhmad Masri 	u8 status;
27548a4fa214SAhmad Masri 	u8 reserved[3];
27558a4fa214SAhmad Masri } __packed;
27568a4fa214SAhmad Masri 
2757b874ddecSLior David /* WMI_TEMP_SENSE_DONE_EVENTID
2758b8023177SVladimir Kondratiev  *
2759b8023177SVladimir Kondratiev  * Measure MAC and radio temperatures
2760b8023177SVladimir Kondratiev  */
2761b8023177SVladimir Kondratiev struct wmi_temp_sense_done_event {
2762b874ddecSLior David 	/* Temperature times 1000 (actual temperature will be achieved by
2763b874ddecSLior David 	 * dividing the value by 1000)
2764b874ddecSLior David 	 */
27658c679675SVladimir Kondratiev 	__le32 baseband_t1000;
2766b874ddecSLior David 	/* Temperature times 1000 (actual temperature will be achieved by
2767b874ddecSLior David 	 * dividing the value by 1000)
2768b874ddecSLior David 	 */
27698c679675SVladimir Kondratiev 	__le32 rf_t1000;
2770b8023177SVladimir Kondratiev } __packed;
2771b8023177SVladimir Kondratiev 
2772b874ddecSLior David #define WMI_SCAN_DWELL_TIME_MS	(100)
2773b874ddecSLior David #define WMI_SURVEY_TIMEOUT_MS	(10000)
2774b874ddecSLior David 
2775b874ddecSLior David enum wmi_hidden_ssid {
2776b874ddecSLior David 	WMI_HIDDEN_SSID_DISABLED	= 0x00,
2777b874ddecSLior David 	WMI_HIDDEN_SSID_SEND_EMPTY	= 0x10,
2778b874ddecSLior David 	WMI_HIDDEN_SSID_CLEAR		= 0xFE,
2779b874ddecSLior David };
2780b874ddecSLior David 
278110d599adSMaya Erez /* WMI_LED_CFG_CMDID
278210d599adSMaya Erez  *
278310d599adSMaya Erez  * Configure LED On\Off\Blinking operation
278410d599adSMaya Erez  *
278510d599adSMaya Erez  * Returned events:
278610d599adSMaya Erez  * - WMI_LED_CFG_DONE_EVENTID
278710d599adSMaya Erez  */
278810d599adSMaya Erez enum led_mode {
278910d599adSMaya Erez 	LED_DISABLE	= 0x00,
279010d599adSMaya Erez 	LED_ENABLE	= 0x01,
279110d599adSMaya Erez };
279210d599adSMaya Erez 
279310d599adSMaya Erez /* The names of the led as
279410d599adSMaya Erez  * described on HW schemes.
279510d599adSMaya Erez  */
279610d599adSMaya Erez enum wmi_led_id {
279710d599adSMaya Erez 	WMI_LED_WLAN	= 0x00,
279810d599adSMaya Erez 	WMI_LED_WPAN	= 0x01,
279910d599adSMaya Erez 	WMI_LED_WWAN	= 0x02,
280010d599adSMaya Erez };
280110d599adSMaya Erez 
280210d599adSMaya Erez /* Led polarity mode. */
280310d599adSMaya Erez enum wmi_led_polarity {
280410d599adSMaya Erez 	LED_POLARITY_HIGH_ACTIVE	= 0x00,
280510d599adSMaya Erez 	LED_POLARITY_LOW_ACTIVE		= 0x01,
280610d599adSMaya Erez };
280710d599adSMaya Erez 
280810d599adSMaya Erez /* Combination of on and off
280910d599adSMaya Erez  * creates the blinking period
281010d599adSMaya Erez  */
281110d599adSMaya Erez struct wmi_led_blink_mode {
281210d599adSMaya Erez 	__le32 blink_on;
281310d599adSMaya Erez 	__le32 blink_off;
281410d599adSMaya Erez } __packed;
281510d599adSMaya Erez 
281610d599adSMaya Erez /* WMI_LED_CFG_CMDID */
281710d599adSMaya Erez struct wmi_led_cfg_cmd {
281810d599adSMaya Erez 	/* enum led_mode_e */
281910d599adSMaya Erez 	u8 led_mode;
282010d599adSMaya Erez 	/* enum wmi_led_id_e */
282110d599adSMaya Erez 	u8 id;
282210d599adSMaya Erez 	/* slow speed blinking combination */
282310d599adSMaya Erez 	struct wmi_led_blink_mode slow_blink_cfg;
282410d599adSMaya Erez 	/* medium speed blinking combination */
282510d599adSMaya Erez 	struct wmi_led_blink_mode medium_blink_cfg;
282610d599adSMaya Erez 	/* high speed blinking combination */
282710d599adSMaya Erez 	struct wmi_led_blink_mode fast_blink_cfg;
282810d599adSMaya Erez 	/* polarity of the led */
282910d599adSMaya Erez 	u8 led_polarity;
283010d599adSMaya Erez 	/* reserved */
283110d599adSMaya Erez 	u8 reserved;
283210d599adSMaya Erez } __packed;
283310d599adSMaya Erez 
2834761f8e4dSLazar Alexei /* \WMI_SET_CONNECT_SNR_THR_CMDID */
2835761f8e4dSLazar Alexei struct wmi_set_connect_snr_thr_cmd {
2836761f8e4dSLazar Alexei 	u8 enable;
2837761f8e4dSLazar Alexei 	u8 reserved;
2838761f8e4dSLazar Alexei 	/* 1/4 Db units */
2839761f8e4dSLazar Alexei 	__le16 omni_snr_thr;
2840761f8e4dSLazar Alexei 	/* 1/4 Db units */
2841761f8e4dSLazar Alexei 	__le16 direct_snr_thr;
2842761f8e4dSLazar Alexei } __packed;
2843761f8e4dSLazar Alexei 
284410d599adSMaya Erez /* WMI_LED_CFG_DONE_EVENTID */
284510d599adSMaya Erez struct wmi_led_cfg_done_event {
284610d599adSMaya Erez 	/* led config status */
284710d599adSMaya Erez 	__le32 status;
284810d599adSMaya Erez } __packed;
284910d599adSMaya Erez 
28500163b031SMaya Erez /* Rate search parameters configuration per connection */
28510163b031SMaya Erez struct wmi_rs_cfg {
28520163b031SMaya Erez 	/* The maximal allowed PER for each MCS
28530163b031SMaya Erez 	 * MCS will be considered as failed if PER during RS is higher
28540163b031SMaya Erez 	 */
28550163b031SMaya Erez 	u8 per_threshold[WMI_NUM_MCS];
28560163b031SMaya Erez 	/* Number of MPDUs for each MCS
28570163b031SMaya Erez 	 * this is the minimal statistic required to make an educated
28580163b031SMaya Erez 	 * decision
28590163b031SMaya Erez 	 */
28600163b031SMaya Erez 	u8 min_frame_cnt[WMI_NUM_MCS];
28610163b031SMaya Erez 	/* stop threshold [0-100] */
28620163b031SMaya Erez 	u8 stop_th;
28630163b031SMaya Erez 	/* MCS1 stop threshold [0-100] */
28640163b031SMaya Erez 	u8 mcs1_fail_th;
28650163b031SMaya Erez 	u8 max_back_failure_th;
28660163b031SMaya Erez 	/* Debug feature for disabling internal RS trigger (which is
28670163b031SMaya Erez 	 * currently triggered by BF Done)
28680163b031SMaya Erez 	 */
28690163b031SMaya Erez 	u8 dbg_disable_internal_trigger;
28700163b031SMaya Erez 	__le32 back_failure_mask;
28710163b031SMaya Erez 	__le32 mcs_en_vec;
28720163b031SMaya Erez } __packed;
28730163b031SMaya Erez 
2874b5aeff16SDedy Lansky enum wmi_edmg_tx_mode {
2875b5aeff16SDedy Lansky 	WMI_TX_MODE_DMG			= 0x0,
2876b5aeff16SDedy Lansky 	WMI_TX_MODE_EDMG_CB1		= 0x1,
2877b5aeff16SDedy Lansky 	WMI_TX_MODE_EDMG_CB2		= 0x2,
2878b5aeff16SDedy Lansky 	WMI_TX_MODE_EDMG_CB1_LONG_LDPC	= 0x3,
2879b5aeff16SDedy Lansky 	WMI_TX_MODE_EDMG_CB2_LONG_LDPC	= 0x4,
2880b5aeff16SDedy Lansky 	WMI_TX_MODE_MAX,
2881b5aeff16SDedy Lansky };
2882b5aeff16SDedy Lansky 
2883b5aeff16SDedy Lansky /* Rate search parameters common configuration */
2884b5aeff16SDedy Lansky struct wmi_rs_cfg_ex_common {
2885b5aeff16SDedy Lansky 	/* enum wmi_edmg_tx_mode */
2886b5aeff16SDedy Lansky 	u8 mode;
2887b5aeff16SDedy Lansky 	/* stop threshold [0-100] */
2888b5aeff16SDedy Lansky 	u8 stop_th;
2889b5aeff16SDedy Lansky 	/* MCS1 stop threshold [0-100] */
2890b5aeff16SDedy Lansky 	u8 mcs1_fail_th;
2891b5aeff16SDedy Lansky 	u8 max_back_failure_th;
2892b5aeff16SDedy Lansky 	/* Debug feature for disabling internal RS trigger (which is
2893b5aeff16SDedy Lansky 	 * currently triggered by BF Done)
2894b5aeff16SDedy Lansky 	 */
2895b5aeff16SDedy Lansky 	u8 dbg_disable_internal_trigger;
2896b5aeff16SDedy Lansky 	u8 reserved[3];
2897b5aeff16SDedy Lansky 	__le32 back_failure_mask;
2898b5aeff16SDedy Lansky } __packed;
2899b5aeff16SDedy Lansky 
2900b5aeff16SDedy Lansky /* Rate search parameters configuration per MCS */
2901b5aeff16SDedy Lansky struct wmi_rs_cfg_ex_mcs {
2902b5aeff16SDedy Lansky 	/* The maximal allowed PER for each MCS
2903b5aeff16SDedy Lansky 	 * MCS will be considered as failed if PER during RS is higher
2904b5aeff16SDedy Lansky 	 */
2905b5aeff16SDedy Lansky 	u8 per_threshold;
2906b5aeff16SDedy Lansky 	/* Number of MPDUs for each MCS
2907b5aeff16SDedy Lansky 	 * this is the minimal statistic required to make an educated
2908b5aeff16SDedy Lansky 	 * decision
2909b5aeff16SDedy Lansky 	 */
2910b5aeff16SDedy Lansky 	u8 min_frame_cnt;
2911b5aeff16SDedy Lansky 	u8 reserved[2];
2912b5aeff16SDedy Lansky } __packed;
2913b5aeff16SDedy Lansky 
2914b5aeff16SDedy Lansky /* WMI_RS_CFG_EX_CMDID */
2915b5aeff16SDedy Lansky struct wmi_rs_cfg_ex_cmd {
2916b5aeff16SDedy Lansky 	/* Configuration for all MCSs */
2917b5aeff16SDedy Lansky 	struct wmi_rs_cfg_ex_common common_cfg;
2918b5aeff16SDedy Lansky 	u8 each_mcs_cfg_size;
2919b5aeff16SDedy Lansky 	u8 reserved[3];
2920b5aeff16SDedy Lansky 	/* Configuration for each MCS */
2921b5aeff16SDedy Lansky 	struct wmi_rs_cfg_ex_mcs each_mcs_cfg[0];
2922b5aeff16SDedy Lansky } __packed;
2923b5aeff16SDedy Lansky 
2924b5aeff16SDedy Lansky /* WMI_RS_CFG_EX_EVENTID */
2925b5aeff16SDedy Lansky struct wmi_rs_cfg_ex_event {
2926b5aeff16SDedy Lansky 	/* enum wmi_edmg_tx_mode */
2927b5aeff16SDedy Lansky 	u8 mode;
2928b5aeff16SDedy Lansky 	/* enum wmi_fw_status */
2929b5aeff16SDedy Lansky 	u8 status;
2930b5aeff16SDedy Lansky 	u8 reserved[2];
2931b5aeff16SDedy Lansky } __packed;
2932b5aeff16SDedy Lansky 
2933b5aeff16SDedy Lansky /* WMI_RS_ENABLE_CMDID */
2934b5aeff16SDedy Lansky struct wmi_rs_enable_cmd {
2935b5aeff16SDedy Lansky 	u8 cid;
2936b5aeff16SDedy Lansky 	/* enable or disable rate search */
2937b5aeff16SDedy Lansky 	u8 rs_enable;
2938b5aeff16SDedy Lansky 	u8 reserved[2];
2939b5aeff16SDedy Lansky 	__le32 mcs_en_vec;
2940b5aeff16SDedy Lansky } __packed;
2941b5aeff16SDedy Lansky 
2942b5aeff16SDedy Lansky /* WMI_RS_ENABLE_EVENTID */
2943b5aeff16SDedy Lansky struct wmi_rs_enable_event {
2944b5aeff16SDedy Lansky 	/* enum wmi_fw_status */
2945b5aeff16SDedy Lansky 	u8 status;
2946b5aeff16SDedy Lansky 	u8 reserved[3];
2947b5aeff16SDedy Lansky } __packed;
2948b5aeff16SDedy Lansky 
2949761f8e4dSLazar Alexei /* Slot types */
2950761f8e4dSLazar Alexei enum wmi_sched_scheme_slot_type {
2951761f8e4dSLazar Alexei 	WMI_SCHED_SLOT_SP		= 0x0,
2952761f8e4dSLazar Alexei 	WMI_SCHED_SLOT_CBAP		= 0x1,
2953761f8e4dSLazar Alexei 	WMI_SCHED_SLOT_IDLE		= 0x2,
2954761f8e4dSLazar Alexei 	WMI_SCHED_SLOT_ANNOUNCE_NO_ACK	= 0x3,
2955761f8e4dSLazar Alexei 	WMI_SCHED_SLOT_DISCOVERY	= 0x4,
2956761f8e4dSLazar Alexei };
2957761f8e4dSLazar Alexei 
2958761f8e4dSLazar Alexei enum wmi_sched_scheme_slot_flags {
2959761f8e4dSLazar Alexei 	WMI_SCHED_SCHEME_SLOT_PERIODIC	= 0x1,
2960761f8e4dSLazar Alexei };
2961761f8e4dSLazar Alexei 
2962761f8e4dSLazar Alexei struct wmi_sched_scheme_slot {
2963761f8e4dSLazar Alexei 	/* in microsecond */
2964761f8e4dSLazar Alexei 	__le32 tbtt_offset;
2965761f8e4dSLazar Alexei 	/* wmi_sched_scheme_slot_flags */
2966761f8e4dSLazar Alexei 	u8 flags;
2967761f8e4dSLazar Alexei 	/* wmi_sched_scheme_slot_type */
2968761f8e4dSLazar Alexei 	u8 type;
2969761f8e4dSLazar Alexei 	/* in microsecond */
2970761f8e4dSLazar Alexei 	__le16 duration;
2971761f8e4dSLazar Alexei 	/* frame_exchange_sequence_duration */
2972761f8e4dSLazar Alexei 	__le16 tx_op;
2973761f8e4dSLazar Alexei 	/* time in microseconds between two consecutive slots
2974761f8e4dSLazar Alexei 	 * relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set
2975761f8e4dSLazar Alexei 	 */
2976761f8e4dSLazar Alexei 	__le16 period;
2977761f8e4dSLazar Alexei 	/* relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set
2978761f8e4dSLazar Alexei 	 * number of times to repeat allocation
2979761f8e4dSLazar Alexei 	 */
2980761f8e4dSLazar Alexei 	u8 num_of_blocks;
2981761f8e4dSLazar Alexei 	/* relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set
2982761f8e4dSLazar Alexei 	 * every idle_period allocation will be idle
2983761f8e4dSLazar Alexei 	 */
2984761f8e4dSLazar Alexei 	u8 idle_period;
2985761f8e4dSLazar Alexei 	u8 src_aid;
2986761f8e4dSLazar Alexei 	u8 dest_aid;
2987761f8e4dSLazar Alexei 	__le32 reserved;
2988761f8e4dSLazar Alexei } __packed;
2989761f8e4dSLazar Alexei 
2990761f8e4dSLazar Alexei enum wmi_sched_scheme_flags {
2991761f8e4dSLazar Alexei 	/* should not be set when clearing scheduling scheme */
2992761f8e4dSLazar Alexei 	WMI_SCHED_SCHEME_ENABLE		= 0x01,
2993761f8e4dSLazar Alexei 	WMI_SCHED_PROTECTED_SP		= 0x02,
2994761f8e4dSLazar Alexei 	/* should be set only on first WMI fragment of scheme */
2995761f8e4dSLazar Alexei 	WMI_SCHED_FIRST			= 0x04,
2996761f8e4dSLazar Alexei 	/* should be set only on last WMI fragment of scheme */
2997761f8e4dSLazar Alexei 	WMI_SCHED_LAST			= 0x08,
2998761f8e4dSLazar Alexei 	WMI_SCHED_IMMEDIATE_START	= 0x10,
2999761f8e4dSLazar Alexei };
3000761f8e4dSLazar Alexei 
3001761f8e4dSLazar Alexei enum wmi_sched_scheme_advertisment {
3002761f8e4dSLazar Alexei 	/* ESE is not advertised at all, STA has to be configured with WMI
3003761f8e4dSLazar Alexei 	 * also
3004761f8e4dSLazar Alexei 	 */
3005761f8e4dSLazar Alexei 	WMI_ADVERTISE_ESE_DISABLED		= 0x0,
3006761f8e4dSLazar Alexei 	WMI_ADVERTISE_ESE_IN_BEACON		= 0x1,
3007761f8e4dSLazar Alexei 	WMI_ADVERTISE_ESE_IN_ANNOUNCE_FRAME	= 0x2,
3008761f8e4dSLazar Alexei };
3009761f8e4dSLazar Alexei 
3010761f8e4dSLazar Alexei /* WMI_SCHEDULING_SCHEME_CMD */
3011761f8e4dSLazar Alexei struct wmi_scheduling_scheme_cmd {
3012761f8e4dSLazar Alexei 	u8 serial_num;
3013761f8e4dSLazar Alexei 	/* wmi_sched_scheme_advertisment */
3014761f8e4dSLazar Alexei 	u8 ese_advertisment;
3015761f8e4dSLazar Alexei 	/* wmi_sched_scheme_flags */
3016761f8e4dSLazar Alexei 	__le16 flags;
3017761f8e4dSLazar Alexei 	u8 num_allocs;
3018761f8e4dSLazar Alexei 	u8 reserved[3];
3019761f8e4dSLazar Alexei 	__le64 start_tbtt;
3020761f8e4dSLazar Alexei 	/* allocations list */
3021761f8e4dSLazar Alexei 	struct wmi_sched_scheme_slot allocs[WMI_SCHED_MAX_ALLOCS_PER_CMD];
3022761f8e4dSLazar Alexei } __packed;
3023761f8e4dSLazar Alexei 
3024761f8e4dSLazar Alexei enum wmi_sched_scheme_failure_type {
3025761f8e4dSLazar Alexei 	WMI_SCHED_SCHEME_FAILURE_NO_ERROR		= 0x00,
3026761f8e4dSLazar Alexei 	WMI_SCHED_SCHEME_FAILURE_OLD_START_TSF_ERR	= 0x01,
3027761f8e4dSLazar Alexei };
3028761f8e4dSLazar Alexei 
3029761f8e4dSLazar Alexei /* WMI_SCHEDULING_SCHEME_EVENTID */
3030761f8e4dSLazar Alexei struct wmi_scheduling_scheme_event {
3031761f8e4dSLazar Alexei 	/* wmi_fw_status_e */
3032761f8e4dSLazar Alexei 	u8 status;
3033761f8e4dSLazar Alexei 	/* serial number given in command */
3034761f8e4dSLazar Alexei 	u8 serial_num;
3035761f8e4dSLazar Alexei 	/* wmi_sched_scheme_failure_type */
3036761f8e4dSLazar Alexei 	u8 failure_type;
3037761f8e4dSLazar Alexei 	/* alignment to 32b */
3038761f8e4dSLazar Alexei 	u8 reserved[1];
3039761f8e4dSLazar Alexei } __packed;
3040761f8e4dSLazar Alexei 
3041b5aeff16SDedy Lansky /* WMI_RS_CFG_CMDID - deprecated */
30420163b031SMaya Erez struct wmi_rs_cfg_cmd {
30430163b031SMaya Erez 	/* connection id */
30440163b031SMaya Erez 	u8 cid;
30450163b031SMaya Erez 	/* enable or disable rate search */
30460163b031SMaya Erez 	u8 rs_enable;
30470163b031SMaya Erez 	/* rate search configuration */
30480163b031SMaya Erez 	struct wmi_rs_cfg rs_cfg;
30490163b031SMaya Erez } __packed;
30500163b031SMaya Erez 
3051b5aeff16SDedy Lansky /* WMI_RS_CFG_DONE_EVENTID - deprecated */
30520163b031SMaya Erez struct wmi_rs_cfg_done_event {
30530163b031SMaya Erez 	u8 cid;
30540163b031SMaya Erez 	/* enum wmi_fw_status */
30550163b031SMaya Erez 	u8 status;
30560163b031SMaya Erez 	u8 reserved[2];
30570163b031SMaya Erez } __packed;
30580163b031SMaya Erez 
3059b5aeff16SDedy Lansky /* WMI_GET_DETAILED_RS_RES_CMDID - deprecated */
306008989f96SLior David struct wmi_get_detailed_rs_res_cmd {
306108989f96SLior David 	/* connection id */
306208989f96SLior David 	u8 cid;
306308989f96SLior David 	u8 reserved[3];
306408989f96SLior David } __packed;
306508989f96SLior David 
306608989f96SLior David /* RS results status */
306708989f96SLior David enum wmi_rs_results_status {
306808989f96SLior David 	WMI_RS_RES_VALID	= 0x00,
306908989f96SLior David 	WMI_RS_RES_INVALID	= 0x01,
307008989f96SLior David };
307108989f96SLior David 
307208989f96SLior David /* Rate search results */
307308989f96SLior David struct wmi_rs_results {
307408989f96SLior David 	/* number of sent MPDUs */
307508989f96SLior David 	u8 num_of_tx_pkt[WMI_NUM_MCS];
307608989f96SLior David 	/* number of non-acked MPDUs */
307708989f96SLior David 	u8 num_of_non_acked_pkt[WMI_NUM_MCS];
307808989f96SLior David 	/* RS timestamp */
307908989f96SLior David 	__le32 tsf;
308008989f96SLior David 	/* RS selected MCS */
308108989f96SLior David 	u8 mcs;
308208989f96SLior David } __packed;
308308989f96SLior David 
3084b5aeff16SDedy Lansky /* WMI_GET_DETAILED_RS_RES_EVENTID - deprecated */
308508989f96SLior David struct wmi_get_detailed_rs_res_event {
308608989f96SLior David 	u8 cid;
308708989f96SLior David 	/* enum wmi_rs_results_status */
308808989f96SLior David 	u8 status;
308908989f96SLior David 	/* detailed rs results */
309008989f96SLior David 	struct wmi_rs_results rs_results;
309108989f96SLior David 	u8 reserved[3];
309208989f96SLior David } __packed;
309308989f96SLior David 
3094b5aeff16SDedy Lansky /* WMI_GET_DETAILED_RS_RES_EX_CMDID */
3095b5aeff16SDedy Lansky struct wmi_get_detailed_rs_res_ex_cmd {
3096b5aeff16SDedy Lansky 	u8 cid;
3097b5aeff16SDedy Lansky 	u8 reserved[3];
3098b5aeff16SDedy Lansky } __packed;
3099b5aeff16SDedy Lansky 
3100b5aeff16SDedy Lansky /* Rate search results */
3101b5aeff16SDedy Lansky struct wmi_rs_results_ex_common {
3102b5aeff16SDedy Lansky 	/* RS timestamp */
3103b5aeff16SDedy Lansky 	__le32 tsf;
3104b5aeff16SDedy Lansky 	/* RS selected MCS */
3105b5aeff16SDedy Lansky 	u8 mcs;
3106b5aeff16SDedy Lansky 	/* enum wmi_edmg_tx_mode */
3107b5aeff16SDedy Lansky 	u8 mode;
3108b5aeff16SDedy Lansky 	u8 reserved[2];
3109b5aeff16SDedy Lansky } __packed;
3110b5aeff16SDedy Lansky 
3111b5aeff16SDedy Lansky /* Rate search results */
3112b5aeff16SDedy Lansky struct wmi_rs_results_ex_mcs {
3113b5aeff16SDedy Lansky 	/* number of sent MPDUs */
3114b5aeff16SDedy Lansky 	u8 num_of_tx_pkt;
3115b5aeff16SDedy Lansky 	/* number of non-acked MPDUs */
3116b5aeff16SDedy Lansky 	u8 num_of_non_acked_pkt;
3117b5aeff16SDedy Lansky 	u8 reserved[2];
3118b5aeff16SDedy Lansky } __packed;
3119b5aeff16SDedy Lansky 
3120b5aeff16SDedy Lansky /* WMI_GET_DETAILED_RS_RES_EX_EVENTID */
3121b5aeff16SDedy Lansky struct wmi_get_detailed_rs_res_ex_event {
3122b5aeff16SDedy Lansky 	u8 cid;
3123b5aeff16SDedy Lansky 	/* enum wmi_rs_results_status */
3124b5aeff16SDedy Lansky 	u8 status;
3125b5aeff16SDedy Lansky 	u8 reserved0[2];
3126b5aeff16SDedy Lansky 	struct wmi_rs_results_ex_common common_rs_results;
3127b5aeff16SDedy Lansky 	u8 each_mcs_results_size;
3128b5aeff16SDedy Lansky 	u8 reserved1[3];
3129b5aeff16SDedy Lansky 	/* Results for each MCS */
3130b5aeff16SDedy Lansky 	struct wmi_rs_results_ex_mcs each_mcs_results[0];
3131b5aeff16SDedy Lansky } __packed;
3132b5aeff16SDedy Lansky 
3133a52fb913SLior David /* BRP antenna limit mode */
3134a52fb913SLior David enum wmi_brp_ant_limit_mode {
3135a52fb913SLior David 	/* Disable BRP force antenna limit */
3136a52fb913SLior David 	WMI_BRP_ANT_LIMIT_MODE_DISABLE		= 0x00,
3137a52fb913SLior David 	/* Define maximal antennas limit. Only effective antennas will be
3138a52fb913SLior David 	 * actually used
3139a52fb913SLior David 	 */
3140a52fb913SLior David 	WMI_BRP_ANT_LIMIT_MODE_EFFECTIVE	= 0x01,
3141a52fb913SLior David 	/* Force a specific number of antennas */
3142a52fb913SLior David 	WMI_BRP_ANT_LIMIT_MODE_FORCE		= 0x02,
3143a52fb913SLior David 	/* number of BRP antenna limit modes */
3144a52fb913SLior David 	WMI_BRP_ANT_LIMIT_MODES_NUM		= 0x03,
3145a52fb913SLior David };
3146a52fb913SLior David 
3147a52fb913SLior David /* WMI_BRP_SET_ANT_LIMIT_CMDID */
3148a52fb913SLior David struct wmi_brp_set_ant_limit_cmd {
3149a52fb913SLior David 	/* connection id */
3150a52fb913SLior David 	u8 cid;
3151a52fb913SLior David 	/* enum wmi_brp_ant_limit_mode */
3152a52fb913SLior David 	u8 limit_mode;
3153a52fb913SLior David 	/* antenna limit count, 1-27
3154a52fb913SLior David 	 * disable_mode - ignored
3155a52fb913SLior David 	 * effective_mode - upper limit to number of antennas to be used
3156a52fb913SLior David 	 * force_mode - exact number of antennas to be used
3157a52fb913SLior David 	 */
3158a52fb913SLior David 	u8 ant_limit;
3159a52fb913SLior David 	u8 reserved;
3160a52fb913SLior David } __packed;
3161a52fb913SLior David 
3162a52fb913SLior David /* WMI_BRP_SET_ANT_LIMIT_EVENTID */
3163a52fb913SLior David struct wmi_brp_set_ant_limit_event {
3164a52fb913SLior David 	/* wmi_fw_status */
3165a52fb913SLior David 	u8 status;
3166a52fb913SLior David 	u8 reserved[3];
3167a52fb913SLior David } __packed;
3168a52fb913SLior David 
31690163b031SMaya Erez /* broadcast connection ID */
31700163b031SMaya Erez #define WMI_LINK_MAINTAIN_CFG_CID_BROADCAST	(0xFFFFFFFF)
31710163b031SMaya Erez 
31720163b031SMaya Erez /* Types wmi_link_maintain_cfg presets for WMI_LINK_MAINTAIN_CFG_WRITE_CMD */
31730163b031SMaya Erez enum wmi_link_maintain_cfg_type {
31740163b031SMaya Erez 	/* AP/PCP default normal (non-FST) configuration settings */
31750163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_AP	= 0x00,
31760163b031SMaya Erez 	/* AP/PCP  default FST configuration settings */
31770163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_AP	= 0x01,
31780163b031SMaya Erez 	/* STA default normal (non-FST) configuration settings */
31790163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_STA	= 0x02,
31800163b031SMaya Erez 	/* STA default FST configuration settings */
31810163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_STA	= 0x03,
31820163b031SMaya Erez 	/* custom configuration settings */
31830163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM		= 0x04,
31840163b031SMaya Erez 	/* number of defined configuration types */
31850163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPES_NUM			= 0x05,
31860163b031SMaya Erez };
31870163b031SMaya Erez 
31880163b031SMaya Erez /* Response status codes for WMI_LINK_MAINTAIN_CFG_WRITE/READ commands */
31890163b031SMaya Erez enum wmi_link_maintain_cfg_response_status {
31900163b031SMaya Erez 	/* WMI_LINK_MAINTAIN_CFG_WRITE/READ command successfully accomplished
31910163b031SMaya Erez 	 */
31920163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_OK		= 0x00,
31930163b031SMaya Erez 	/* ERROR due to bad argument in WMI_LINK_MAINTAIN_CFG_WRITE/READ
31940163b031SMaya Erez 	 * command request
31950163b031SMaya Erez 	 */
31960163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_BAD_ARGUMENT	= 0x01,
31970163b031SMaya Erez };
31980163b031SMaya Erez 
31990163b031SMaya Erez /* Link Loss and Keep Alive configuration */
32000163b031SMaya Erez struct wmi_link_maintain_cfg {
32010163b031SMaya Erez 	/* link_loss_enable_detectors_vec */
32020163b031SMaya Erez 	__le32 link_loss_enable_detectors_vec;
32030163b031SMaya Erez 	/* detectors check period usec */
32040163b031SMaya Erez 	__le32 check_link_loss_period_usec;
32050163b031SMaya Erez 	/* max allowed tx ageing */
32060163b031SMaya Erez 	__le32 tx_ageing_threshold_usec;
32070163b031SMaya Erez 	/* keep alive period for high SNR */
32080163b031SMaya Erez 	__le32 keep_alive_period_usec_high_snr;
32090163b031SMaya Erez 	/* keep alive period for low SNR */
32100163b031SMaya Erez 	__le32 keep_alive_period_usec_low_snr;
32110163b031SMaya Erez 	/* lower snr limit for keep alive period update */
32120163b031SMaya Erez 	__le32 keep_alive_snr_threshold_low_db;
32130163b031SMaya Erez 	/* upper snr limit for keep alive period update */
32140163b031SMaya Erez 	__le32 keep_alive_snr_threshold_high_db;
32150163b031SMaya Erez 	/* num of successive bad bcons causing link-loss */
32160163b031SMaya Erez 	__le32 bad_beacons_num_threshold;
32170163b031SMaya Erez 	/* SNR limit for bad_beacons_detector */
32180163b031SMaya Erez 	__le32 bad_beacons_snr_threshold_db;
32198a4fa214SAhmad Masri 	/* timeout for disassoc response frame in uSec */
32208a4fa214SAhmad Masri 	__le32 disconnect_timeout;
32210163b031SMaya Erez } __packed;
32220163b031SMaya Erez 
32230163b031SMaya Erez /* WMI_LINK_MAINTAIN_CFG_WRITE_CMDID */
32240163b031SMaya Erez struct wmi_link_maintain_cfg_write_cmd {
32250163b031SMaya Erez 	/* enum wmi_link_maintain_cfg_type_e - type of requested default
32260163b031SMaya Erez 	 * configuration to be applied
32270163b031SMaya Erez 	 */
32280163b031SMaya Erez 	__le32 cfg_type;
32290163b031SMaya Erez 	/* requested connection ID or WMI_LINK_MAINTAIN_CFG_CID_BROADCAST */
32300163b031SMaya Erez 	__le32 cid;
32310163b031SMaya Erez 	/* custom configuration settings to be applied (relevant only if
32320163b031SMaya Erez 	 * cfg_type==WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM)
32330163b031SMaya Erez 	 */
32340163b031SMaya Erez 	struct wmi_link_maintain_cfg lm_cfg;
32350163b031SMaya Erez } __packed;
32360163b031SMaya Erez 
32370163b031SMaya Erez /* WMI_LINK_MAINTAIN_CFG_READ_CMDID */
32380163b031SMaya Erez struct wmi_link_maintain_cfg_read_cmd {
32390163b031SMaya Erez 	/* connection ID which configuration settings are requested */
32400163b031SMaya Erez 	__le32 cid;
32410163b031SMaya Erez } __packed;
32420163b031SMaya Erez 
32430163b031SMaya Erez /* WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID */
32440163b031SMaya Erez struct wmi_link_maintain_cfg_write_done_event {
32450163b031SMaya Erez 	/* requested connection ID */
32460163b031SMaya Erez 	__le32 cid;
32470163b031SMaya Erez 	/* wmi_link_maintain_cfg_response_status_e - write status */
32480163b031SMaya Erez 	__le32 status;
32490163b031SMaya Erez } __packed;
32500163b031SMaya Erez 
32510163b031SMaya Erez /* \WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENT */
32520163b031SMaya Erez struct wmi_link_maintain_cfg_read_done_event {
32530163b031SMaya Erez 	/* requested connection ID */
32540163b031SMaya Erez 	__le32 cid;
32550163b031SMaya Erez 	/* wmi_link_maintain_cfg_response_status_e - read status */
32560163b031SMaya Erez 	__le32 status;
32570163b031SMaya Erez 	/* Retrieved configuration settings */
32580163b031SMaya Erez 	struct wmi_link_maintain_cfg lm_cfg;
32590163b031SMaya Erez } __packed;
32600163b031SMaya Erez 
3261fe9ee51eSMaya Erez enum wmi_traffic_suspend_status {
3262fe9ee51eSMaya Erez 	WMI_TRAFFIC_SUSPEND_APPROVED			= 0x0,
32636804cd10SLazar Alexei 	WMI_TRAFFIC_SUSPEND_REJECTED_LINK_NOT_IDLE	= 0x1,
32640163b031SMaya Erez };
32650163b031SMaya Erez 
3266fe9ee51eSMaya Erez /* WMI_TRAFFIC_SUSPEND_EVENTID */
3267fe9ee51eSMaya Erez struct wmi_traffic_suspend_event {
3268fe9ee51eSMaya Erez 	/* enum wmi_traffic_suspend_status_e */
32690163b031SMaya Erez 	u8 status;
32700163b031SMaya Erez } __packed;
32710163b031SMaya Erez 
32720163b031SMaya Erez enum wmi_traffic_resume_status {
32730163b031SMaya Erez 	WMI_TRAFFIC_RESUME_SUCCESS	= 0x0,
32740163b031SMaya Erez 	WMI_TRAFFIC_RESUME_FAILED	= 0x1,
32750163b031SMaya Erez };
32760163b031SMaya Erez 
32776804cd10SLazar Alexei enum wmi_resume_trigger {
32786804cd10SLazar Alexei 	WMI_RESUME_TRIGGER_UNKNOWN	= 0x0,
32796804cd10SLazar Alexei 	WMI_RESUME_TRIGGER_HOST		= 0x1,
32806804cd10SLazar Alexei 	WMI_RESUME_TRIGGER_UCAST_RX	= 0x2,
32816804cd10SLazar Alexei 	WMI_RESUME_TRIGGER_BCAST_RX	= 0x4,
32826804cd10SLazar Alexei 	WMI_RESUME_TRIGGER_WMI_EVT	= 0x8,
32836804cd10SLazar Alexei };
32846804cd10SLazar Alexei 
32850163b031SMaya Erez /* WMI_TRAFFIC_RESUME_EVENTID */
32860163b031SMaya Erez struct wmi_traffic_resume_event {
32876804cd10SLazar Alexei 	/* enum wmi_traffic_resume_status */
32880163b031SMaya Erez 	u8 status;
32896804cd10SLazar Alexei 	u8 reserved[3];
32906804cd10SLazar Alexei 	/* enum wmi_resume_trigger bitmap */
32916804cd10SLazar Alexei 	__le32 resume_triggers;
32920163b031SMaya Erez } __packed;
32930163b031SMaya Erez 
32940163b031SMaya Erez /* Power Save command completion status codes */
32950163b031SMaya Erez enum wmi_ps_cfg_cmd_status {
32960163b031SMaya Erez 	WMI_PS_CFG_CMD_STATUS_SUCCESS	= 0x00,
32970163b031SMaya Erez 	WMI_PS_CFG_CMD_STATUS_BAD_PARAM	= 0x01,
32980163b031SMaya Erez 	/* other error */
32990163b031SMaya Erez 	WMI_PS_CFG_CMD_STATUS_ERROR	= 0x02,
33000163b031SMaya Erez };
33010163b031SMaya Erez 
33020163b031SMaya Erez /* Device Power Save Profiles */
33030163b031SMaya Erez enum wmi_ps_profile_type {
33040163b031SMaya Erez 	WMI_PS_PROFILE_TYPE_DEFAULT		= 0x00,
33050163b031SMaya Erez 	WMI_PS_PROFILE_TYPE_PS_DISABLED		= 0x01,
33060163b031SMaya Erez 	WMI_PS_PROFILE_TYPE_MAX_PS		= 0x02,
33070163b031SMaya Erez 	WMI_PS_PROFILE_TYPE_LOW_LATENCY_PS	= 0x03,
33080163b031SMaya Erez };
33090163b031SMaya Erez 
3310761f8e4dSLazar Alexei /* WMI_PS_DEV_PROFILE_CFG_READ_CMDID */
3311761f8e4dSLazar Alexei struct wmi_ps_dev_profile_cfg_read_cmd {
3312761f8e4dSLazar Alexei 	/* reserved */
3313761f8e4dSLazar Alexei 	__le32 reserved;
3314761f8e4dSLazar Alexei } __packed;
3315761f8e4dSLazar Alexei 
3316761f8e4dSLazar Alexei /* WMI_PS_DEV_PROFILE_CFG_READ_EVENTID */
3317761f8e4dSLazar Alexei struct wmi_ps_dev_profile_cfg_read_event {
3318761f8e4dSLazar Alexei 	/* wmi_ps_profile_type_e */
3319761f8e4dSLazar Alexei 	u8 ps_profile;
3320761f8e4dSLazar Alexei 	u8 reserved[3];
3321761f8e4dSLazar Alexei } __packed;
3322761f8e4dSLazar Alexei 
33230163b031SMaya Erez /* WMI_PS_DEV_PROFILE_CFG_CMDID
33240163b031SMaya Erez  *
33250163b031SMaya Erez  * Power save profile to be used by the device
33260163b031SMaya Erez  *
33270163b031SMaya Erez  * Returned event:
33280163b031SMaya Erez  * - WMI_PS_DEV_PROFILE_CFG_EVENTID
33290163b031SMaya Erez  */
33300163b031SMaya Erez struct wmi_ps_dev_profile_cfg_cmd {
33310163b031SMaya Erez 	/* wmi_ps_profile_type_e */
33320163b031SMaya Erez 	u8 ps_profile;
33330163b031SMaya Erez 	u8 reserved[3];
33340163b031SMaya Erez } __packed;
33350163b031SMaya Erez 
33360163b031SMaya Erez /* WMI_PS_DEV_PROFILE_CFG_EVENTID */
33370163b031SMaya Erez struct wmi_ps_dev_profile_cfg_event {
33380163b031SMaya Erez 	/* wmi_ps_cfg_cmd_status_e */
33390163b031SMaya Erez 	__le32 status;
33400163b031SMaya Erez } __packed;
33410163b031SMaya Erez 
33420163b031SMaya Erez enum wmi_ps_level {
33430163b031SMaya Erez 	WMI_PS_LEVEL_DEEP_SLEEP		= 0x00,
33440163b031SMaya Erez 	WMI_PS_LEVEL_SHALLOW_SLEEP	= 0x01,
33450163b031SMaya Erez 	/* awake = all PS mechanisms are disabled */
33460163b031SMaya Erez 	WMI_PS_LEVEL_AWAKE		= 0x02,
33470163b031SMaya Erez };
33480163b031SMaya Erez 
33490163b031SMaya Erez enum wmi_ps_deep_sleep_clk_level {
33500163b031SMaya Erez 	/* 33k */
33510163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC		= 0x00,
33520163b031SMaya Erez 	/* 10k */
33530163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_OSC		= 0x01,
33540163b031SMaya Erez 	/* @RTC Low latency */
33550163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC_LT	= 0x02,
33560163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_XTAL	= 0x03,
33570163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_SYSCLK	= 0x04,
33580163b031SMaya Erez 	/* Not Applicable */
33590163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_N_A		= 0xFF,
33600163b031SMaya Erez };
33610163b031SMaya Erez 
33620163b031SMaya Erez /* Response by the FW to a D3 entry request */
33630163b031SMaya Erez enum wmi_ps_d3_resp_policy {
33640163b031SMaya Erez 	WMI_PS_D3_RESP_POLICY_DEFAULT	= 0x00,
33650163b031SMaya Erez 	/* debug -D3 req is always denied */
33660163b031SMaya Erez 	WMI_PS_D3_RESP_POLICY_DENIED	= 0x01,
33670163b031SMaya Erez 	/* debug -D3 req is always approved */
33680163b031SMaya Erez 	WMI_PS_D3_RESP_POLICY_APPROVED	= 0x02,
33690163b031SMaya Erez };
33700163b031SMaya Erez 
337108989f96SLior David #define WMI_AOA_MAX_DATA_SIZE	(128)
337208989f96SLior David 
337308989f96SLior David enum wmi_aoa_meas_status {
337408989f96SLior David 	WMI_AOA_MEAS_SUCCESS		= 0x00,
337508989f96SLior David 	WMI_AOA_MEAS_PEER_INCAPABLE	= 0x01,
337608989f96SLior David 	WMI_AOA_MEAS_FAILURE		= 0x02,
337708989f96SLior David };
337808989f96SLior David 
337908989f96SLior David /* WMI_AOA_MEAS_EVENTID */
338008989f96SLior David struct wmi_aoa_meas_event {
338108989f96SLior David 	u8 mac_addr[WMI_MAC_LEN];
338208989f96SLior David 	/* channels IDs:
338308989f96SLior David 	 * 0 - 58320 MHz
338408989f96SLior David 	 * 1 - 60480 MHz
338508989f96SLior David 	 * 2 - 62640 MHz
338608989f96SLior David 	 */
338708989f96SLior David 	u8 channel;
338808989f96SLior David 	/* enum wmi_aoa_meas_type */
338908989f96SLior David 	u8 aoa_meas_type;
339008989f96SLior David 	/* Measurments are from RFs, defined by the mask */
339108989f96SLior David 	__le32 meas_rf_mask;
339208989f96SLior David 	/* enum wmi_aoa_meas_status */
339308989f96SLior David 	u8 meas_status;
339408989f96SLior David 	u8 reserved;
339508989f96SLior David 	/* Length of meas_data in bytes */
339608989f96SLior David 	__le16 length;
339708989f96SLior David 	u8 meas_data[WMI_AOA_MAX_DATA_SIZE];
339808989f96SLior David } __packed;
339908989f96SLior David 
3400cbf795c1SLior David /* WMI_SET_MGMT_RETRY_LIMIT_EVENTID */
3401cbf795c1SLior David struct wmi_set_mgmt_retry_limit_event {
3402cbf795c1SLior David 	/* enum wmi_fw_status */
3403cbf795c1SLior David 	u8 status;
3404cbf795c1SLior David 	/* alignment to 32b */
3405cbf795c1SLior David 	u8 reserved[3];
3406cbf795c1SLior David } __packed;
3407cbf795c1SLior David 
3408cbf795c1SLior David /* WMI_GET_MGMT_RETRY_LIMIT_EVENTID */
3409cbf795c1SLior David struct wmi_get_mgmt_retry_limit_event {
3410cbf795c1SLior David 	/* MAC retransmit limit for mgmt frames */
3411cbf795c1SLior David 	u8 mgmt_retry_limit;
3412cbf795c1SLior David 	/* alignment to 32b */
3413cbf795c1SLior David 	u8 reserved[3];
3414cbf795c1SLior David } __packed;
3415cbf795c1SLior David 
341608989f96SLior David /* WMI_TOF_GET_CAPABILITIES_EVENTID */
341708989f96SLior David struct wmi_tof_get_capabilities_event {
341808989f96SLior David 	u8 ftm_capability;
341908989f96SLior David 	/* maximum supported number of destination to start TOF */
342008989f96SLior David 	u8 max_num_of_dest;
342108989f96SLior David 	/* maximum supported number of measurements per burst */
342208989f96SLior David 	u8 max_num_of_meas_per_burst;
342308989f96SLior David 	u8 reserved;
342408989f96SLior David 	/* maximum supported multi bursts */
342508989f96SLior David 	__le16 max_multi_bursts_sessions;
342608989f96SLior David 	/* maximum supported FTM burst duration , wmi_tof_burst_duration_e */
342708989f96SLior David 	__le16 max_ftm_burst_duration;
342808989f96SLior David 	/* AOA supported types */
342908989f96SLior David 	__le32 aoa_supported_types;
343008989f96SLior David } __packed;
343108989f96SLior David 
343290ffabb0SDedy Lansky /* WMI_SET_THERMAL_THROTTLING_CFG_EVENTID */
343390ffabb0SDedy Lansky struct wmi_set_thermal_throttling_cfg_event {
343490ffabb0SDedy Lansky 	/* wmi_fw_status */
343590ffabb0SDedy Lansky 	u8 status;
343690ffabb0SDedy Lansky 	u8 reserved[3];
343790ffabb0SDedy Lansky } __packed;
343890ffabb0SDedy Lansky 
343990ffabb0SDedy Lansky /* WMI_GET_THERMAL_THROTTLING_CFG_EVENTID */
344090ffabb0SDedy Lansky struct wmi_get_thermal_throttling_cfg_event {
344190ffabb0SDedy Lansky 	/* Status data */
344290ffabb0SDedy Lansky 	struct wmi_tt_data tt_data;
344390ffabb0SDedy Lansky } __packed;
344490ffabb0SDedy Lansky 
344508989f96SLior David enum wmi_tof_session_end_status {
344608989f96SLior David 	WMI_TOF_SESSION_END_NO_ERROR		= 0x00,
344708989f96SLior David 	WMI_TOF_SESSION_END_FAIL		= 0x01,
344808989f96SLior David 	WMI_TOF_SESSION_END_PARAMS_ERROR	= 0x02,
344908989f96SLior David 	WMI_TOF_SESSION_END_ABORTED		= 0x03,
34508a4fa214SAhmad Masri 	WMI_TOF_SESSION_END_BUSY		= 0x04,
345108989f96SLior David };
345208989f96SLior David 
345308989f96SLior David /* WMI_TOF_SESSION_END_EVENTID */
345408989f96SLior David struct wmi_tof_session_end_event {
345508989f96SLior David 	/* FTM session ID */
345608989f96SLior David 	__le32 session_id;
345708989f96SLior David 	/* wmi_tof_session_end_status_e */
345808989f96SLior David 	u8 status;
345908989f96SLior David 	u8 reserved[3];
346008989f96SLior David } __packed;
346108989f96SLior David 
3462761f8e4dSLazar Alexei /* WMI_TOF_SET_LCI_EVENTID */
3463761f8e4dSLazar Alexei struct wmi_tof_set_lci_event {
3464761f8e4dSLazar Alexei 	/* enum wmi_fw_status */
3465761f8e4dSLazar Alexei 	u8 status;
3466761f8e4dSLazar Alexei 	u8 reserved[3];
3467761f8e4dSLazar Alexei } __packed;
3468761f8e4dSLazar Alexei 
3469761f8e4dSLazar Alexei /* WMI_TOF_SET_LCR_EVENTID */
3470761f8e4dSLazar Alexei struct wmi_tof_set_lcr_event {
3471761f8e4dSLazar Alexei 	/* enum wmi_fw_status */
3472761f8e4dSLazar Alexei 	u8 status;
3473761f8e4dSLazar Alexei 	u8 reserved[3];
3474761f8e4dSLazar Alexei } __packed;
3475761f8e4dSLazar Alexei 
347608989f96SLior David /* Responder FTM Results */
347708989f96SLior David struct wmi_responder_ftm_res {
347808989f96SLior David 	u8 t1[6];
347908989f96SLior David 	u8 t2[6];
348008989f96SLior David 	u8 t3[6];
348108989f96SLior David 	u8 t4[6];
348208989f96SLior David 	__le16 tod_err;
348308989f96SLior David 	__le16 toa_err;
348408989f96SLior David 	__le16 tod_err_initiator;
348508989f96SLior David 	__le16 toa_err_initiator;
348608989f96SLior David } __packed;
348708989f96SLior David 
348808989f96SLior David enum wmi_tof_ftm_per_dest_res_status {
348908989f96SLior David 	WMI_PER_DEST_RES_NO_ERROR		= 0x00,
349008989f96SLior David 	WMI_PER_DEST_RES_TX_RX_FAIL		= 0x01,
349108989f96SLior David 	WMI_PER_DEST_RES_PARAM_DONT_MATCH	= 0x02,
349208989f96SLior David };
349308989f96SLior David 
349408989f96SLior David enum wmi_tof_ftm_per_dest_res_flags {
349508989f96SLior David 	WMI_PER_DEST_RES_REQ_START		= 0x01,
349608989f96SLior David 	WMI_PER_DEST_RES_BURST_REPORT_END	= 0x02,
349708989f96SLior David 	WMI_PER_DEST_RES_REQ_END		= 0x04,
349808989f96SLior David 	WMI_PER_DEST_RES_PARAM_UPDATE		= 0x08,
349908989f96SLior David };
350008989f96SLior David 
350108989f96SLior David /* WMI_TOF_FTM_PER_DEST_RES_EVENTID */
350208989f96SLior David struct wmi_tof_ftm_per_dest_res_event {
350308989f96SLior David 	/* FTM session ID */
350408989f96SLior David 	__le32 session_id;
350508989f96SLior David 	/* destination MAC address */
350608989f96SLior David 	u8 dst_mac[WMI_MAC_LEN];
350708989f96SLior David 	/* wmi_tof_ftm_per_dest_res_flags_e */
350808989f96SLior David 	u8 flags;
350908989f96SLior David 	/* wmi_tof_ftm_per_dest_res_status_e */
351008989f96SLior David 	u8 status;
351108989f96SLior David 	/* responder ASAP */
351208989f96SLior David 	u8 responder_asap;
351308989f96SLior David 	/* responder number of FTM per burst */
351408989f96SLior David 	u8 responder_num_ftm_per_burst;
351508989f96SLior David 	/* responder number of FTM burst exponent */
351608989f96SLior David 	u8 responder_num_ftm_bursts_exp;
351708989f96SLior David 	/* responder burst duration ,wmi_tof_burst_duration_e */
351808989f96SLior David 	u8 responder_burst_duration;
351908989f96SLior David 	/* responder burst period, indicate interval between two consecutive
352008989f96SLior David 	 * burst instances, in units of 100 ms
352108989f96SLior David 	 */
352208989f96SLior David 	__le16 responder_burst_period;
352308989f96SLior David 	/* receive burst counter */
352408989f96SLior David 	__le16 bursts_cnt;
352508989f96SLior David 	/* tsf of responder start burst */
352608989f96SLior David 	__le32 tsf_sync;
352708989f96SLior David 	/* actual received ftm per burst */
352808989f96SLior David 	u8 actual_ftm_per_burst;
3529761f8e4dSLazar Alexei 	/* Measurments are from RFs, defined by the mask */
3530761f8e4dSLazar Alexei 	__le32 meas_rf_mask;
3531761f8e4dSLazar Alexei 	u8 reserved0[3];
353208989f96SLior David 	struct wmi_responder_ftm_res responder_ftm_res[0];
353308989f96SLior David } __packed;
353408989f96SLior David 
3535761f8e4dSLazar Alexei /* WMI_TOF_CFG_RESPONDER_EVENTID */
3536761f8e4dSLazar Alexei struct wmi_tof_cfg_responder_event {
3537761f8e4dSLazar Alexei 	/* enum wmi_fw_status */
3538761f8e4dSLazar Alexei 	u8 status;
3539761f8e4dSLazar Alexei 	u8 reserved[3];
3540761f8e4dSLazar Alexei } __packed;
3541761f8e4dSLazar Alexei 
354208989f96SLior David enum wmi_tof_channel_info_type {
354308989f96SLior David 	WMI_TOF_CHANNEL_INFO_AOA		= 0x00,
354408989f96SLior David 	WMI_TOF_CHANNEL_INFO_LCI		= 0x01,
354508989f96SLior David 	WMI_TOF_CHANNEL_INFO_LCR		= 0x02,
354608989f96SLior David 	WMI_TOF_CHANNEL_INFO_VENDOR_SPECIFIC	= 0x03,
354708989f96SLior David 	WMI_TOF_CHANNEL_INFO_CIR		= 0x04,
354808989f96SLior David 	WMI_TOF_CHANNEL_INFO_RSSI		= 0x05,
354908989f96SLior David 	WMI_TOF_CHANNEL_INFO_SNR		= 0x06,
355008989f96SLior David 	WMI_TOF_CHANNEL_INFO_DEBUG		= 0x07,
355108989f96SLior David };
355208989f96SLior David 
355308989f96SLior David /* WMI_TOF_CHANNEL_INFO_EVENTID */
355408989f96SLior David struct wmi_tof_channel_info_event {
355508989f96SLior David 	/* FTM session ID */
355608989f96SLior David 	__le32 session_id;
355708989f96SLior David 	/* destination MAC address */
355808989f96SLior David 	u8 dst_mac[WMI_MAC_LEN];
355908989f96SLior David 	/* wmi_tof_channel_info_type_e */
356008989f96SLior David 	u8 type;
356108989f96SLior David 	/* data report length */
356208989f96SLior David 	u8 len;
356308989f96SLior David 	/* data report payload */
356408989f96SLior David 	u8 report[0];
356508989f96SLior David } __packed;
356608989f96SLior David 
35678ae5d62cSLior David /* WMI_TOF_SET_TX_RX_OFFSET_EVENTID */
35688ae5d62cSLior David struct wmi_tof_set_tx_rx_offset_event {
35698ae5d62cSLior David 	/* enum wmi_fw_status */
35708ae5d62cSLior David 	u8 status;
35718ae5d62cSLior David 	u8 reserved[3];
35728ae5d62cSLior David } __packed;
35738ae5d62cSLior David 
35748ae5d62cSLior David /* WMI_TOF_GET_TX_RX_OFFSET_EVENTID */
35758ae5d62cSLior David struct wmi_tof_get_tx_rx_offset_event {
35768ae5d62cSLior David 	/* enum wmi_fw_status */
35778ae5d62cSLior David 	u8 status;
3578761f8e4dSLazar Alexei 	/* RF index used to read the offsets */
3579761f8e4dSLazar Alexei 	u8 rf_index;
3580761f8e4dSLazar Alexei 	u8 reserved1[2];
35818ae5d62cSLior David 	/* TX delay offset */
35828ae5d62cSLior David 	__le32 tx_offset;
35838ae5d62cSLior David 	/* RX delay offset */
35848ae5d62cSLior David 	__le32 rx_offset;
3585761f8e4dSLazar Alexei 	/* Offset to strongest tap of CIR */
3586761f8e4dSLazar Alexei 	__le32 precursor;
35878ae5d62cSLior David } __packed;
35888ae5d62cSLior David 
3589cbf795c1SLior David /* Result status codes for WMI commands */
3590cbf795c1SLior David enum wmi_rf_sector_status {
3591cbf795c1SLior David 	WMI_RF_SECTOR_STATUS_SUCCESS			= 0x00,
3592cbf795c1SLior David 	WMI_RF_SECTOR_STATUS_BAD_PARAMETERS_ERROR	= 0x01,
3593cbf795c1SLior David 	WMI_RF_SECTOR_STATUS_BUSY_ERROR			= 0x02,
3594cbf795c1SLior David 	WMI_RF_SECTOR_STATUS_NOT_SUPPORTED_ERROR	= 0x03,
3595cbf795c1SLior David };
3596cbf795c1SLior David 
3597cbf795c1SLior David /* Types of the RF sector (TX,RX) */
3598cbf795c1SLior David enum wmi_rf_sector_type {
3599cbf795c1SLior David 	WMI_RF_SECTOR_TYPE_RX	= 0x00,
3600cbf795c1SLior David 	WMI_RF_SECTOR_TYPE_TX	= 0x01,
3601cbf795c1SLior David };
3602cbf795c1SLior David 
3603cbf795c1SLior David /* Content of RF Sector (six 32-bits registers) */
3604cbf795c1SLior David struct wmi_rf_sector_info {
3605cbf795c1SLior David 	/* Phase values for RF Chains[15-0] (2bits per RF chain) */
3606cbf795c1SLior David 	__le32 psh_hi;
3607cbf795c1SLior David 	/* Phase values for RF Chains[31-16] (2bits per RF chain) */
3608cbf795c1SLior David 	__le32 psh_lo;
3609cbf795c1SLior David 	/* ETYPE Bit0 for all RF chains[31-0] - bit0 of Edge amplifier gain
3610cbf795c1SLior David 	 * index
3611cbf795c1SLior David 	 */
3612cbf795c1SLior David 	__le32 etype0;
3613cbf795c1SLior David 	/* ETYPE Bit1 for all RF chains[31-0] - bit1 of Edge amplifier gain
3614cbf795c1SLior David 	 * index
3615cbf795c1SLior David 	 */
3616cbf795c1SLior David 	__le32 etype1;
3617cbf795c1SLior David 	/* ETYPE Bit2 for all RF chains[31-0] - bit2 of Edge amplifier gain
3618cbf795c1SLior David 	 * index
3619cbf795c1SLior David 	 */
3620cbf795c1SLior David 	__le32 etype2;
3621cbf795c1SLior David 	/* D-Type values (3bits each) for 8 Distribution amplifiers + X16
3622cbf795c1SLior David 	 * switch bits
3623cbf795c1SLior David 	 */
3624cbf795c1SLior David 	__le32 dtype_swch_off;
3625cbf795c1SLior David } __packed;
3626cbf795c1SLior David 
3627cbf795c1SLior David #define WMI_INVALID_RF_SECTOR_INDEX	(0xFFFF)
3628cbf795c1SLior David #define WMI_MAX_RF_MODULES_NUM		(8)
3629cbf795c1SLior David 
3630cbf795c1SLior David /* WMI_GET_RF_SECTOR_PARAMS_CMD */
3631cbf795c1SLior David struct wmi_get_rf_sector_params_cmd {
3632cbf795c1SLior David 	/* Sector number to be retrieved */
3633cbf795c1SLior David 	__le16 sector_idx;
3634cbf795c1SLior David 	/* enum wmi_rf_sector_type - type of requested RF sector */
3635cbf795c1SLior David 	u8 sector_type;
3636cbf795c1SLior David 	/* bitmask vector specifying destination RF modules */
3637cbf795c1SLior David 	u8 rf_modules_vec;
3638cbf795c1SLior David } __packed;
3639cbf795c1SLior David 
3640cbf795c1SLior David /* \WMI_GET_RF_SECTOR_PARAMS_DONE_EVENT */
3641cbf795c1SLior David struct wmi_get_rf_sector_params_done_event {
3642cbf795c1SLior David 	/* result status of WMI_GET_RF_SECTOR_PARAMS_CMD (enum
3643cbf795c1SLior David 	 * wmi_rf_sector_status)
3644cbf795c1SLior David 	 */
3645cbf795c1SLior David 	u8 status;
3646cbf795c1SLior David 	/* align next field to U64 boundary */
3647cbf795c1SLior David 	u8 reserved[7];
3648cbf795c1SLior David 	/* TSF timestamp when RF sectors where retrieved */
3649cbf795c1SLior David 	__le64 tsf;
3650cbf795c1SLior David 	/* Content of RF sector retrieved from each RF module */
3651cbf795c1SLior David 	struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM];
3652cbf795c1SLior David } __packed;
3653cbf795c1SLior David 
3654cbf795c1SLior David /* WMI_SET_RF_SECTOR_PARAMS_CMD */
3655cbf795c1SLior David struct wmi_set_rf_sector_params_cmd {
3656cbf795c1SLior David 	/* Sector number to be retrieved */
3657cbf795c1SLior David 	__le16 sector_idx;
3658cbf795c1SLior David 	/* enum wmi_rf_sector_type - type of requested RF sector */
3659cbf795c1SLior David 	u8 sector_type;
3660cbf795c1SLior David 	/* bitmask vector specifying destination RF modules */
3661cbf795c1SLior David 	u8 rf_modules_vec;
3662cbf795c1SLior David 	/* Content of RF sector to be written to each RF module */
3663cbf795c1SLior David 	struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM];
3664cbf795c1SLior David } __packed;
3665cbf795c1SLior David 
3666cbf795c1SLior David /* \WMI_SET_RF_SECTOR_PARAMS_DONE_EVENT */
3667cbf795c1SLior David struct wmi_set_rf_sector_params_done_event {
3668cbf795c1SLior David 	/* result status of WMI_SET_RF_SECTOR_PARAMS_CMD (enum
3669cbf795c1SLior David 	 * wmi_rf_sector_status)
3670cbf795c1SLior David 	 */
3671cbf795c1SLior David 	u8 status;
3672cbf795c1SLior David } __packed;
3673cbf795c1SLior David 
3674cbf795c1SLior David /* WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD - Get RF sector index selected by
3675cbf795c1SLior David  * TXSS/BRP for communication with specified CID
3676cbf795c1SLior David  */
3677cbf795c1SLior David struct wmi_get_selected_rf_sector_index_cmd {
3678cbf795c1SLior David 	/* Connection/Station ID in [0:7] range */
3679cbf795c1SLior David 	u8 cid;
3680cbf795c1SLior David 	/* type of requested RF sector (enum wmi_rf_sector_type) */
3681cbf795c1SLior David 	u8 sector_type;
3682cbf795c1SLior David 	/* align to U32 boundary */
3683cbf795c1SLior David 	u8 reserved[2];
3684cbf795c1SLior David } __packed;
3685cbf795c1SLior David 
3686cbf795c1SLior David /* \WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Returns retrieved RF sector
3687cbf795c1SLior David  * index selected by TXSS/BRP for communication with specified CID
3688cbf795c1SLior David  */
3689cbf795c1SLior David struct wmi_get_selected_rf_sector_index_done_event {
3690cbf795c1SLior David 	/* Retrieved sector index selected in TXSS (for TX sector request) or
3691cbf795c1SLior David 	 * BRP (for RX sector request)
3692cbf795c1SLior David 	 */
3693cbf795c1SLior David 	__le16 sector_idx;
3694cbf795c1SLior David 	/* result status of WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD (enum
3695cbf795c1SLior David 	 * wmi_rf_sector_status)
3696cbf795c1SLior David 	 */
3697cbf795c1SLior David 	u8 status;
3698cbf795c1SLior David 	/* align next field to U64 boundary */
3699cbf795c1SLior David 	u8 reserved[5];
3700cbf795c1SLior David 	/* TSF timestamp when result was retrieved */
3701cbf795c1SLior David 	__le64 tsf;
3702cbf795c1SLior David } __packed;
3703cbf795c1SLior David 
3704cbf795c1SLior David /* WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD - Force RF sector index for
3705cbf795c1SLior David  * communication with specified CID. Assumes that TXSS/BRP is disabled by
3706cbf795c1SLior David  * other command
3707cbf795c1SLior David  */
3708cbf795c1SLior David struct wmi_set_selected_rf_sector_index_cmd {
3709cbf795c1SLior David 	/* Connection/Station ID in [0:7] range */
3710cbf795c1SLior David 	u8 cid;
3711cbf795c1SLior David 	/* type of requested RF sector (enum wmi_rf_sector_type) */
3712cbf795c1SLior David 	u8 sector_type;
3713cbf795c1SLior David 	/* Forced sector index */
3714cbf795c1SLior David 	__le16 sector_idx;
3715cbf795c1SLior David } __packed;
3716cbf795c1SLior David 
3717cbf795c1SLior David /* \WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Success/Fail status for
3718cbf795c1SLior David  * WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD
3719cbf795c1SLior David  */
3720cbf795c1SLior David struct wmi_set_selected_rf_sector_index_done_event {
3721cbf795c1SLior David 	/* result status of WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD (enum
3722cbf795c1SLior David 	 * wmi_rf_sector_status)
3723cbf795c1SLior David 	 */
3724cbf795c1SLior David 	u8 status;
3725cbf795c1SLior David 	/* align to U32 boundary */
3726cbf795c1SLior David 	u8 reserved[3];
3727cbf795c1SLior David } __packed;
3728cbf795c1SLior David 
3729cbf795c1SLior David /* WMI_SET_RF_SECTOR_ON_CMD - Activates specified sector for specified rf
3730cbf795c1SLior David  * modules
3731cbf795c1SLior David  */
3732cbf795c1SLior David struct wmi_set_rf_sector_on_cmd {
3733cbf795c1SLior David 	/* Sector index to be activated */
3734cbf795c1SLior David 	__le16 sector_idx;
3735cbf795c1SLior David 	/* type of requested RF sector (enum wmi_rf_sector_type) */
3736cbf795c1SLior David 	u8 sector_type;
3737cbf795c1SLior David 	/* bitmask vector specifying destination RF modules */
3738cbf795c1SLior David 	u8 rf_modules_vec;
3739cbf795c1SLior David } __packed;
3740cbf795c1SLior David 
3741cbf795c1SLior David /* \WMI_SET_RF_SECTOR_ON_DONE_EVENT - Success/Fail status for
3742cbf795c1SLior David  * WMI_SET_RF_SECTOR_ON_CMD
3743cbf795c1SLior David  */
3744cbf795c1SLior David struct wmi_set_rf_sector_on_done_event {
3745cbf795c1SLior David 	/* result status of WMI_SET_RF_SECTOR_ON_CMD (enum
3746cbf795c1SLior David 	 * wmi_rf_sector_status)
3747cbf795c1SLior David 	 */
3748cbf795c1SLior David 	u8 status;
3749cbf795c1SLior David 	/* align to U32 boundary */
3750cbf795c1SLior David 	u8 reserved[3];
3751cbf795c1SLior David } __packed;
3752cbf795c1SLior David 
37538ae5d62cSLior David enum wmi_sector_sweep_type {
37548ae5d62cSLior David 	WMI_SECTOR_SWEEP_TYPE_TXSS		= 0x00,
37558ae5d62cSLior David 	WMI_SECTOR_SWEEP_TYPE_BCON		= 0x01,
37568ae5d62cSLior David 	WMI_SECTOR_SWEEP_TYPE_TXSS_AND_BCON	= 0x02,
37578ae5d62cSLior David 	WMI_SECTOR_SWEEP_TYPE_NUM		= 0x03,
37588ae5d62cSLior David };
37598ae5d62cSLior David 
37608ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_ORDER_CMDID
37618ae5d62cSLior David  *
37628ae5d62cSLior David  * Set the order of TX sectors in TXSS and/or Beacon(AP).
37638ae5d62cSLior David  *
37648ae5d62cSLior David  * Returned event:
37658ae5d62cSLior David  * - WMI_PRIO_TX_SECTORS_ORDER_EVENTID
37668ae5d62cSLior David  */
37678ae5d62cSLior David struct wmi_prio_tx_sectors_order_cmd {
37688ae5d62cSLior David 	/* tx sectors order to be applied, 0xFF for end of array */
37698ae5d62cSLior David 	u8 tx_sectors_priority_array[MAX_NUM_OF_SECTORS];
37708ae5d62cSLior David 	/* enum wmi_sector_sweep_type, TXSS and/or Beacon */
37718ae5d62cSLior David 	u8 sector_sweep_type;
37728ae5d62cSLior David 	/* needed only for TXSS configuration */
37738ae5d62cSLior David 	u8 cid;
37748ae5d62cSLior David 	/* alignment to 32b */
37758ae5d62cSLior David 	u8 reserved[2];
37768ae5d62cSLior David } __packed;
37778ae5d62cSLior David 
37788ae5d62cSLior David /* completion status codes */
37798ae5d62cSLior David enum wmi_prio_tx_sectors_cmd_status {
37808ae5d62cSLior David 	WMI_PRIO_TX_SECT_CMD_STATUS_SUCCESS	= 0x00,
37818ae5d62cSLior David 	WMI_PRIO_TX_SECT_CMD_STATUS_BAD_PARAM	= 0x01,
37828ae5d62cSLior David 	/* other error */
37838ae5d62cSLior David 	WMI_PRIO_TX_SECT_CMD_STATUS_ERROR	= 0x02,
37848ae5d62cSLior David };
37858ae5d62cSLior David 
37868ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_ORDER_EVENTID */
37878ae5d62cSLior David struct wmi_prio_tx_sectors_order_event {
37888ae5d62cSLior David 	/* enum wmi_prio_tx_sectors_cmd_status */
37898ae5d62cSLior David 	u8 status;
37908ae5d62cSLior David 	/* alignment to 32b */
37918ae5d62cSLior David 	u8 reserved[3];
37928ae5d62cSLior David } __packed;
37938ae5d62cSLior David 
37948ae5d62cSLior David struct wmi_prio_tx_sectors_num_cmd {
37958ae5d62cSLior David 	/* [0-128], 0 = No changes */
37968ae5d62cSLior David 	u8 beacon_number_of_sectors;
37978ae5d62cSLior David 	/* [0-128], 0 = No changes */
37988ae5d62cSLior David 	u8 txss_number_of_sectors;
37998ae5d62cSLior David 	/* [0-8] needed only for TXSS configuration */
38008ae5d62cSLior David 	u8 cid;
38018ae5d62cSLior David } __packed;
38028ae5d62cSLior David 
38038ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_NUMBER_CMDID
38048ae5d62cSLior David  *
38058ae5d62cSLior David  * Set the number of active sectors in TXSS and/or Beacon.
38068ae5d62cSLior David  *
38078ae5d62cSLior David  * Returned event:
38088ae5d62cSLior David  * - WMI_PRIO_TX_SECTORS_NUMBER_EVENTID
38098ae5d62cSLior David  */
38108ae5d62cSLior David struct wmi_prio_tx_sectors_number_cmd {
38118ae5d62cSLior David 	struct wmi_prio_tx_sectors_num_cmd active_sectors_num;
38128ae5d62cSLior David 	/* alignment to 32b */
38138ae5d62cSLior David 	u8 reserved;
38148ae5d62cSLior David } __packed;
38158ae5d62cSLior David 
38168ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_NUMBER_EVENTID */
38178ae5d62cSLior David struct wmi_prio_tx_sectors_number_event {
38188ae5d62cSLior David 	/* enum wmi_prio_tx_sectors_cmd_status */
38198ae5d62cSLior David 	u8 status;
38208ae5d62cSLior David 	/* alignment to 32b */
38218ae5d62cSLior David 	u8 reserved[3];
38228ae5d62cSLior David } __packed;
38238ae5d62cSLior David 
38248ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID
38258ae5d62cSLior David  *
38268ae5d62cSLior David  * Set default sectors order and number (hard coded in board file)
38278ae5d62cSLior David  * in TXSS and/or Beacon.
38288ae5d62cSLior David  *
38298ae5d62cSLior David  * Returned event:
38308ae5d62cSLior David  * - WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID
38318ae5d62cSLior David  */
38328ae5d62cSLior David struct wmi_prio_tx_sectors_set_default_cfg_cmd {
38338ae5d62cSLior David 	/* enum wmi_sector_sweep_type, TXSS and/or Beacon */
38348ae5d62cSLior David 	u8 sector_sweep_type;
38358ae5d62cSLior David 	/* needed only for TXSS configuration */
38368ae5d62cSLior David 	u8 cid;
38378ae5d62cSLior David 	/* alignment to 32b */
38388ae5d62cSLior David 	u8 reserved[2];
38398ae5d62cSLior David } __packed;
38408ae5d62cSLior David 
38418ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID */
38428ae5d62cSLior David struct wmi_prio_tx_sectors_set_default_cfg_event {
38438ae5d62cSLior David 	/* enum wmi_prio_tx_sectors_cmd_status */
38448ae5d62cSLior David 	u8 status;
38458ae5d62cSLior David 	/* alignment to 32b */
38468ae5d62cSLior David 	u8 reserved[3];
38478ae5d62cSLior David } __packed;
38488ae5d62cSLior David 
3849761f8e4dSLazar Alexei /* WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID */
3850761f8e4dSLazar Alexei struct wmi_set_silent_rssi_table_done_event {
3851761f8e4dSLazar Alexei 	/* enum wmi_silent_rssi_status */
3852761f8e4dSLazar Alexei 	__le32 status;
3853761f8e4dSLazar Alexei 	/* enum wmi_silent_rssi_table */
3854761f8e4dSLazar Alexei 	__le32 table;
3855761f8e4dSLazar Alexei } __packed;
3856761f8e4dSLazar Alexei 
38578a4fa214SAhmad Masri /* WMI_VRING_SWITCH_TIMING_CONFIG_EVENTID */
38588a4fa214SAhmad Masri struct wmi_vring_switch_timing_config_event {
38598a4fa214SAhmad Masri 	/* enum wmi_fw_status */
38608a4fa214SAhmad Masri 	u8 status;
38618a4fa214SAhmad Masri 	u8 reserved[3];
38628a4fa214SAhmad Masri } __packed;
38638a4fa214SAhmad Masri 
38648a4fa214SAhmad Masri /* WMI_GET_ASSOC_LIST_RES_EVENTID */
38658a4fa214SAhmad Masri struct wmi_assoc_sta_info {
38668a4fa214SAhmad Masri 	u8 mac[WMI_MAC_LEN];
38678a4fa214SAhmad Masri 	u8 omni_index_address;
38688a4fa214SAhmad Masri 	u8 reserved;
38698a4fa214SAhmad Masri } __packed;
38708a4fa214SAhmad Masri 
38718a4fa214SAhmad Masri #define WMI_GET_ASSOC_LIST_SIZE	(8)
38728a4fa214SAhmad Masri 
38738a4fa214SAhmad Masri /* WMI_GET_ASSOC_LIST_RES_EVENTID
38748a4fa214SAhmad Masri  * Returns up to MAX_ASSOC_STA_LIST_SIZE associated STAs
38758a4fa214SAhmad Masri  */
38768a4fa214SAhmad Masri struct wmi_get_assoc_list_res_event {
38778a4fa214SAhmad Masri 	struct wmi_assoc_sta_info assoc_sta_list[WMI_GET_ASSOC_LIST_SIZE];
38788a4fa214SAhmad Masri 	/* STA count */
38798a4fa214SAhmad Masri 	u8 count;
38808a4fa214SAhmad Masri 	u8 reserved[3];
38818a4fa214SAhmad Masri } __packed;
38828a4fa214SAhmad Masri 
3883b5aeff16SDedy Lansky /* WMI_BF_CONTROL_EVENTID - deprecated */
38848a4fa214SAhmad Masri struct wmi_bf_control_event {
38858a4fa214SAhmad Masri 	/* wmi_fw_status */
38868a4fa214SAhmad Masri 	u8 status;
38878a4fa214SAhmad Masri 	u8 reserved[3];
38888a4fa214SAhmad Masri } __packed;
38898a4fa214SAhmad Masri 
3890b5aeff16SDedy Lansky /* WMI_BF_CONTROL_EX_EVENTID */
3891b5aeff16SDedy Lansky struct wmi_bf_control_ex_event {
3892b5aeff16SDedy Lansky 	/* wmi_fw_status */
3893b5aeff16SDedy Lansky 	u8 status;
3894b5aeff16SDedy Lansky 	u8 reserved[3];
3895b5aeff16SDedy Lansky } __packed;
3896b5aeff16SDedy Lansky 
38978a4fa214SAhmad Masri /* WMI_COMMAND_NOT_SUPPORTED_EVENTID */
3898761f8e4dSLazar Alexei struct wmi_command_not_supported_event {
3899761f8e4dSLazar Alexei 	/* device id */
3900761f8e4dSLazar Alexei 	u8 mid;
3901761f8e4dSLazar Alexei 	u8 reserved0;
3902761f8e4dSLazar Alexei 	__le16 command_id;
3903761f8e4dSLazar Alexei 	/* for UT command only, otherwise reserved */
3904761f8e4dSLazar Alexei 	__le16 command_subtype;
3905761f8e4dSLazar Alexei 	__le16 reserved1;
3906761f8e4dSLazar Alexei } __packed;
3907761f8e4dSLazar Alexei 
39088a4fa214SAhmad Masri /* WMI_TSF_SYNC_CMDID */
39098a4fa214SAhmad Masri struct wmi_tsf_sync_cmd {
39108a4fa214SAhmad Masri 	/* The time interval to send announce frame in one BI */
39118a4fa214SAhmad Masri 	u8 interval_ms;
39128a4fa214SAhmad Masri 	/* The mcs to send announce frame */
39138a4fa214SAhmad Masri 	u8 mcs;
39148a4fa214SAhmad Masri 	u8 reserved[6];
39158a4fa214SAhmad Masri } __packed;
39168a4fa214SAhmad Masri 
39178a4fa214SAhmad Masri /* WMI_TSF_SYNC_STATUS_EVENTID */
39188a4fa214SAhmad Masri enum wmi_tsf_sync_status {
39198a4fa214SAhmad Masri 	WMI_TSF_SYNC_SUCCESS	= 0x00,
39208a4fa214SAhmad Masri 	WMI_TSF_SYNC_FAILED	= 0x01,
39218a4fa214SAhmad Masri 	WMI_TSF_SYNC_REJECTED	= 0x02,
39228a4fa214SAhmad Masri };
39238a4fa214SAhmad Masri 
39248a4fa214SAhmad Masri /* WMI_TSF_SYNC_STATUS_EVENTID */
39258a4fa214SAhmad Masri struct wmi_tsf_sync_status_event {
39268a4fa214SAhmad Masri 	/* enum wmi_tsf_sync_status */
39278a4fa214SAhmad Masri 	u8 status;
39288a4fa214SAhmad Masri 	u8 reserved[3];
39298a4fa214SAhmad Masri } __packed;
39308a4fa214SAhmad Masri 
39318a4fa214SAhmad Masri /* WMI_GET_CCA_INDICATIONS_EVENTID */
39328a4fa214SAhmad Masri struct wmi_get_cca_indications_event {
39338a4fa214SAhmad Masri 	/* wmi_fw_status */
39348a4fa214SAhmad Masri 	u8 status;
39358a4fa214SAhmad Masri 	/* CCA-Energy Detect in percentage over last BI (0..100) */
39368a4fa214SAhmad Masri 	u8 cca_ed_percent;
39378a4fa214SAhmad Masri 	/* Averaged CCA-Energy Detect in percent over number of BIs (0..100) */
39388a4fa214SAhmad Masri 	u8 cca_ed_avg_percent;
39398a4fa214SAhmad Masri 	/* NAV percent over last BI (0..100) */
39408a4fa214SAhmad Masri 	u8 nav_percent;
39418a4fa214SAhmad Masri 	/* Averaged NAV percent over number of BIs (0..100) */
39428a4fa214SAhmad Masri 	u8 nav_avg_percent;
39438a4fa214SAhmad Masri 	u8 reserved[3];
39448a4fa214SAhmad Masri } __packed;
39458a4fa214SAhmad Masri 
39468a4fa214SAhmad Masri /* WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_CMDID */
39478a4fa214SAhmad Masri struct wmi_set_cca_indications_bi_avg_num_cmd {
39488a4fa214SAhmad Masri 	/* set the number of bis to average cca_ed (0..255) */
39498a4fa214SAhmad Masri 	u8 bi_number;
39508a4fa214SAhmad Masri 	u8 reserved[3];
39518a4fa214SAhmad Masri } __packed;
39528a4fa214SAhmad Masri 
39538a4fa214SAhmad Masri /* WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_EVENTID */
39548a4fa214SAhmad Masri struct wmi_set_cca_indications_bi_avg_num_event {
39558a4fa214SAhmad Masri 	/* wmi_fw_status */
39568a4fa214SAhmad Masri 	u8 status;
39578a4fa214SAhmad Masri 	u8 reserved[3];
39588a4fa214SAhmad Masri } __packed;
39598a4fa214SAhmad Masri 
39608a4fa214SAhmad Masri /* WMI_INTERNAL_FW_SET_CHANNEL */
39618a4fa214SAhmad Masri struct wmi_internal_fw_set_channel_event {
39628a4fa214SAhmad Masri 	u8 channel_num;
39638a4fa214SAhmad Masri 	u8 reserved[3];
39648a4fa214SAhmad Masri } __packed;
39658a4fa214SAhmad Masri 
3966b5aeff16SDedy Lansky /* WMI_LINK_STATS_CONFIG_DONE_EVENTID */
3967b5aeff16SDedy Lansky struct wmi_link_stats_config_done_event {
3968b5aeff16SDedy Lansky 	/* wmi_fw_status_e */
3969b5aeff16SDedy Lansky 	u8 status;
3970b5aeff16SDedy Lansky 	u8 reserved[3];
3971b5aeff16SDedy Lansky } __packed;
3972b5aeff16SDedy Lansky 
3973b5aeff16SDedy Lansky /* WMI_LINK_STATS_EVENTID */
3974b5aeff16SDedy Lansky struct wmi_link_stats_event {
39750c936b3cSDedy Lansky 	__le64 tsf;
3976b5aeff16SDedy Lansky 	__le16 payload_size;
3977b5aeff16SDedy Lansky 	u8 has_next;
3978b5aeff16SDedy Lansky 	u8 reserved[5];
39790c936b3cSDedy Lansky 	/* a stream of wmi_link_stats_record_s */
3980b5aeff16SDedy Lansky 	u8 payload[0];
3981b5aeff16SDedy Lansky } __packed;
3982b5aeff16SDedy Lansky 
39830c936b3cSDedy Lansky /* WMI_LINK_STATS_EVENT */
39840c936b3cSDedy Lansky struct wmi_link_stats_record {
39850c936b3cSDedy Lansky 	/* wmi_link_stats_record_type_e */
3986b5aeff16SDedy Lansky 	u8 record_type_id;
39870c936b3cSDedy Lansky 	u8 reserved;
39880c936b3cSDedy Lansky 	__le16 record_size;
39890c936b3cSDedy Lansky 	u8 record[0];
39900c936b3cSDedy Lansky } __packed;
39910c936b3cSDedy Lansky 
39920c936b3cSDedy Lansky /* WMI_LINK_STATS_TYPE_BASIC */
39930c936b3cSDedy Lansky struct wmi_link_stats_basic {
3994b5aeff16SDedy Lansky 	u8 cid;
3995b5aeff16SDedy Lansky 	s8 rssi;
3996b5aeff16SDedy Lansky 	u8 sqi;
39970c936b3cSDedy Lansky 	u8 bf_mcs;
39980c936b3cSDedy Lansky 	u8 per_average;
3999b5aeff16SDedy Lansky 	u8 selected_rfc;
40000c936b3cSDedy Lansky 	u8 rx_effective_ant_num;
40010c936b3cSDedy Lansky 	u8 my_rx_sector;
40020c936b3cSDedy Lansky 	u8 my_tx_sector;
40030c936b3cSDedy Lansky 	u8 other_rx_sector;
40040c936b3cSDedy Lansky 	u8 other_tx_sector;
40050c936b3cSDedy Lansky 	u8 reserved[7];
40060c936b3cSDedy Lansky 	/* 1/4 Db units */
40070c936b3cSDedy Lansky 	__le16 snr;
4008b5aeff16SDedy Lansky 	__le32 tx_tpt;
4009b5aeff16SDedy Lansky 	__le32 tx_goodput;
4010b5aeff16SDedy Lansky 	__le32 rx_goodput;
40110c936b3cSDedy Lansky 	__le32 bf_count;
40120c936b3cSDedy Lansky 	__le32 rx_bcast_frames;
40130c936b3cSDedy Lansky } __packed;
40140c936b3cSDedy Lansky 
40150c936b3cSDedy Lansky /* WMI_LINK_STATS_TYPE_GLOBAL */
40160c936b3cSDedy Lansky struct wmi_link_stats_global {
40170c936b3cSDedy Lansky 	/* all ack-able frames */
40180c936b3cSDedy Lansky 	__le32 rx_frames;
40190c936b3cSDedy Lansky 	/* all ack-able frames */
40200c936b3cSDedy Lansky 	__le32 tx_frames;
40210c936b3cSDedy Lansky 	__le32 rx_ba_frames;
40220c936b3cSDedy Lansky 	__le32 tx_ba_frames;
40230c936b3cSDedy Lansky 	__le32 tx_beacons;
40240c936b3cSDedy Lansky 	__le32 rx_mic_errors;
40250c936b3cSDedy Lansky 	__le32 rx_crc_errors;
40260c936b3cSDedy Lansky 	__le32 tx_fail_no_ack;
40270c936b3cSDedy Lansky 	u8 reserved[8];
4028b5aeff16SDedy Lansky } __packed;
4029b5aeff16SDedy Lansky 
4030b5aeff16SDedy Lansky /* WMI_SET_GRANT_MCS_EVENTID */
4031b5aeff16SDedy Lansky struct wmi_set_grant_mcs_event {
4032b5aeff16SDedy Lansky 	/* wmi_fw_status */
4033b5aeff16SDedy Lansky 	u8 status;
4034b5aeff16SDedy Lansky 	u8 reserved[3];
4035b5aeff16SDedy Lansky } __packed;
4036b5aeff16SDedy Lansky 
4037b5aeff16SDedy Lansky /* WMI_SET_AP_SLOT_SIZE_EVENTID */
4038b5aeff16SDedy Lansky struct wmi_set_ap_slot_size_event {
4039b5aeff16SDedy Lansky 	/* wmi_fw_status */
4040b5aeff16SDedy Lansky 	u8 status;
4041b5aeff16SDedy Lansky 	u8 reserved[3];
4042b5aeff16SDedy Lansky } __packed;
4043b5aeff16SDedy Lansky 
4044b5aeff16SDedy Lansky /* WMI_SET_VRING_PRIORITY_WEIGHT_EVENTID */
4045b5aeff16SDedy Lansky struct wmi_set_vring_priority_weight_event {
4046b5aeff16SDedy Lansky 	/* wmi_fw_status */
4047b5aeff16SDedy Lansky 	u8 status;
4048b5aeff16SDedy Lansky 	u8 reserved[3];
4049b5aeff16SDedy Lansky } __packed;
4050b5aeff16SDedy Lansky 
4051b5aeff16SDedy Lansky /* WMI_SET_VRING_PRIORITY_EVENTID */
4052b5aeff16SDedy Lansky struct wmi_set_vring_priority_event {
4053b5aeff16SDedy Lansky 	/* wmi_fw_status */
4054b5aeff16SDedy Lansky 	u8 status;
4055b5aeff16SDedy Lansky 	u8 reserved[3];
4056b5aeff16SDedy Lansky } __packed;
4057b5aeff16SDedy Lansky 
40582be7d22fSVladimir Kondratiev #endif /* __WILOCITY_WMI_H__ */
4059