xref: /openbmc/linux/drivers/net/wireless/ath/wil6210/wmi.h (revision b5aeff16b20f65e6bb9ebafd06c1c96c2b503089)
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)
56*b5aeff16SDedy Lansky /* Qos configuration */
57*b5aeff16SDedy Lansky #define WMI_QOS_NUM_OF_PRIORITY		(4)
58*b5aeff16SDedy Lansky #define WMI_QOS_MIN_DEFAULT_WEIGHT	(10)
59*b5aeff16SDedy Lansky #define WMI_QOS_VRING_SLOT_MIN_MS	(2)
60*b5aeff16SDedy Lansky #define WMI_QOS_VRING_SLOT_MAX_MS	(10)
61*b5aeff16SDedy Lansky /* (WMI_QOS_MIN_DEFAULT_WEIGHT * WMI_QOS_VRING_SLOT_MAX_MS /
62*b5aeff16SDedy Lansky  * WMI_QOS_VRING_SLOT_MIN_MS)
63*b5aeff16SDedy Lansky  */
64*b5aeff16SDedy Lansky #define WMI_QOS_MAX_WEIGHT		50
65*b5aeff16SDedy Lansky #define WMI_QOS_SET_VIF_PRIORITY	(0xFF)
66*b5aeff16SDedy 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,
100*b5aeff16SDedy Lansky 	WMI_FW_CAPABILITY_MULTI_VIFS			= 20,
101*b5aeff16SDedy Lansky 	WMI_FW_CAPABILITY_FT_ROAMING			= 21,
1027be13fc3SGidon Studinski 	WMI_FW_CAPABILITY_AMSDU				= 23,
10308989f96SLior David 	WMI_FW_CAPABILITY_MAX,
10408989f96SLior David };
10508989f96SLior David 
106b874ddecSLior David /* WMI_CMD_HDR */
107b874ddecSLior David struct wmi_cmd_hdr {
108b874ddecSLior David 	u8 mid;
109b874ddecSLior David 	u8 reserved;
110b874ddecSLior David 	__le16 command_id;
111b874ddecSLior David 	__le32 fw_timestamp;
112b874ddecSLior David } __packed;
1132be7d22fSVladimir Kondratiev 
1142be7d22fSVladimir Kondratiev /* List of Commands */
1152be7d22fSVladimir Kondratiev enum wmi_command_id {
116b874ddecSLior David 	WMI_CONNECT_CMDID				= 0x01,
117b874ddecSLior David 	WMI_DISCONNECT_CMDID				= 0x03,
118b874ddecSLior David 	WMI_DISCONNECT_STA_CMDID			= 0x04,
119a5dc6883SDedy Lansky 	WMI_START_SCHED_SCAN_CMDID			= 0x05,
120a5dc6883SDedy Lansky 	WMI_STOP_SCHED_SCAN_CMDID			= 0x06,
121b874ddecSLior David 	WMI_START_SCAN_CMDID				= 0x07,
122b874ddecSLior David 	WMI_SET_BSS_FILTER_CMDID			= 0x09,
123b874ddecSLior David 	WMI_SET_PROBED_SSID_CMDID			= 0x0A,
124761f8e4dSLazar Alexei 	/* deprecated */
125b874ddecSLior David 	WMI_SET_LISTEN_INT_CMDID			= 0x0B,
126*b5aeff16SDedy Lansky 	WMI_FT_AUTH_CMDID				= 0x0C,
127*b5aeff16SDedy Lansky 	WMI_FT_REASSOC_CMDID				= 0x0D,
128*b5aeff16SDedy Lansky 	WMI_UPDATE_FT_IES_CMDID				= 0x0E,
129b874ddecSLior David 	WMI_BCON_CTRL_CMDID				= 0x0F,
130b874ddecSLior David 	WMI_ADD_CIPHER_KEY_CMDID			= 0x16,
131b874ddecSLior David 	WMI_DELETE_CIPHER_KEY_CMDID			= 0x17,
132b874ddecSLior David 	WMI_PCP_CONF_CMDID				= 0x18,
133b874ddecSLior David 	WMI_SET_APPIE_CMDID				= 0x3F,
134b874ddecSLior David 	WMI_SET_WSC_STATUS_CMDID			= 0x41,
135b874ddecSLior David 	WMI_PXMT_RANGE_CFG_CMDID			= 0x42,
136b874ddecSLior David 	WMI_PXMT_SNR2_RANGE_CFG_CMDID			= 0x43,
137b874ddecSLior David 	WMI_MEM_READ_CMDID				= 0x800,
138b874ddecSLior David 	WMI_MEM_WR_CMDID				= 0x801,
139b874ddecSLior David 	WMI_ECHO_CMDID					= 0x803,
140b874ddecSLior David 	WMI_DEEP_ECHO_CMDID				= 0x804,
141b874ddecSLior David 	WMI_CONFIG_MAC_CMDID				= 0x805,
142761f8e4dSLazar Alexei 	/* deprecated */
143b874ddecSLior David 	WMI_CONFIG_PHY_DEBUG_CMDID			= 0x806,
144b874ddecSLior David 	WMI_ADD_DEBUG_TX_PCKT_CMDID			= 0x808,
145b874ddecSLior David 	WMI_PHY_GET_STATISTICS_CMDID			= 0x809,
146761f8e4dSLazar Alexei 	/* deprecated */
147b874ddecSLior David 	WMI_FS_TUNE_CMDID				= 0x80A,
148761f8e4dSLazar Alexei 	/* deprecated */
149b874ddecSLior David 	WMI_CORR_MEASURE_CMDID				= 0x80B,
150b874ddecSLior David 	WMI_READ_RSSI_CMDID				= 0x80C,
151b874ddecSLior David 	WMI_TEMP_SENSE_CMDID				= 0x80E,
152b874ddecSLior David 	WMI_DC_CALIB_CMDID				= 0x80F,
153761f8e4dSLazar Alexei 	/* deprecated */
154b874ddecSLior David 	WMI_SEND_TONE_CMDID				= 0x810,
155761f8e4dSLazar Alexei 	/* deprecated */
156b874ddecSLior David 	WMI_IQ_TX_CALIB_CMDID				= 0x811,
157761f8e4dSLazar Alexei 	/* deprecated */
158b874ddecSLior David 	WMI_IQ_RX_CALIB_CMDID				= 0x812,
159b874ddecSLior David 	WMI_SET_WORK_MODE_CMDID				= 0x815,
160b874ddecSLior David 	WMI_LO_LEAKAGE_CALIB_CMDID			= 0x816,
161761f8e4dSLazar Alexei 	WMI_LO_POWER_CALIB_FROM_OTP_CMDID		= 0x817,
162b874ddecSLior David 	WMI_SILENT_RSSI_CALIB_CMDID			= 0x81D,
163761f8e4dSLazar Alexei 	/* deprecated */
164b874ddecSLior David 	WMI_RF_RX_TEST_CMDID				= 0x81E,
165b874ddecSLior David 	WMI_CFG_RX_CHAIN_CMDID				= 0x820,
166b874ddecSLior David 	WMI_VRING_CFG_CMDID				= 0x821,
167b874ddecSLior David 	WMI_BCAST_VRING_CFG_CMDID			= 0x822,
16896c93589SGidon Studinski 	WMI_RING_BA_EN_CMDID				= 0x823,
16996c93589SGidon Studinski 	WMI_RING_BA_DIS_CMDID				= 0x824,
170b874ddecSLior David 	WMI_RCP_ADDBA_RESP_CMDID			= 0x825,
171b874ddecSLior David 	WMI_RCP_DELBA_CMDID				= 0x826,
172b874ddecSLior David 	WMI_SET_SSID_CMDID				= 0x827,
173b874ddecSLior David 	WMI_GET_SSID_CMDID				= 0x828,
174b874ddecSLior David 	WMI_SET_PCP_CHANNEL_CMDID			= 0x829,
175b874ddecSLior David 	WMI_GET_PCP_CHANNEL_CMDID			= 0x82A,
176b874ddecSLior David 	WMI_SW_TX_REQ_CMDID				= 0x82B,
177b874ddecSLior David 	WMI_MLME_PUSH_CMDID				= 0x835,
178b874ddecSLior David 	WMI_BEAMFORMING_MGMT_CMDID			= 0x836,
179b874ddecSLior David 	WMI_BF_TXSS_MGMT_CMDID				= 0x837,
180b874ddecSLior David 	WMI_BF_SM_MGMT_CMDID				= 0x838,
181b874ddecSLior David 	WMI_BF_RXSS_MGMT_CMDID				= 0x839,
182b874ddecSLior David 	WMI_BF_TRIG_CMDID				= 0x83A,
18396c93589SGidon Studinski 	WMI_RCP_ADDBA_RESP_EDMA_CMDID			= 0x83B,
1840163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_WRITE_CMDID		= 0x842,
1850163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_READ_CMDID		= 0x843,
186b874ddecSLior David 	WMI_SET_SECTORS_CMDID				= 0x849,
187b874ddecSLior David 	WMI_MAINTAIN_PAUSE_CMDID			= 0x850,
188b874ddecSLior David 	WMI_MAINTAIN_RESUME_CMDID			= 0x851,
189b874ddecSLior David 	WMI_RS_MGMT_CMDID				= 0x852,
190b874ddecSLior David 	WMI_RF_MGMT_CMDID				= 0x853,
191761f8e4dSLazar Alexei 	WMI_RF_XPM_READ_CMDID				= 0x856,
192761f8e4dSLazar Alexei 	WMI_RF_XPM_WRITE_CMDID				= 0x857,
19310d599adSMaya Erez 	WMI_LED_CFG_CMDID				= 0x858,
194761f8e4dSLazar Alexei 	WMI_SET_CONNECT_SNR_THR_CMDID			= 0x85B,
195761f8e4dSLazar Alexei 	WMI_SET_ACTIVE_SILENT_RSSI_TABLE_CMDID		= 0x85C,
196761f8e4dSLazar Alexei 	WMI_RF_PWR_ON_DELAY_CMDID			= 0x85D,
197761f8e4dSLazar Alexei 	WMI_SET_HIGH_POWER_TABLE_PARAMS_CMDID		= 0x85E,
1988a4fa214SAhmad Masri 	WMI_FIXED_SCHEDULING_UL_CONFIG_CMDID		= 0x85F,
1992be7d22fSVladimir Kondratiev 	/* Performance monitoring commands */
200b874ddecSLior David 	WMI_BF_CTRL_CMDID				= 0x862,
201b874ddecSLior David 	WMI_NOTIFY_REQ_CMDID				= 0x863,
202b874ddecSLior David 	WMI_GET_STATUS_CMDID				= 0x864,
2030163b031SMaya Erez 	WMI_GET_RF_STATUS_CMDID				= 0x866,
2040163b031SMaya Erez 	WMI_GET_BASEBAND_TYPE_CMDID			= 0x867,
2058a4fa214SAhmad Masri 	WMI_VRING_SWITCH_TIMING_CONFIG_CMDID		= 0x868,
206b874ddecSLior David 	WMI_UNIT_TEST_CMDID				= 0x900,
207b874ddecSLior David 	WMI_FLASH_READ_CMDID				= 0x902,
208b874ddecSLior David 	WMI_FLASH_WRITE_CMDID				= 0x903,
2090163b031SMaya Erez 	/* Power management */
210fe9ee51eSMaya Erez 	WMI_TRAFFIC_SUSPEND_CMDID			= 0x904,
2110163b031SMaya Erez 	WMI_TRAFFIC_RESUME_CMDID			= 0x905,
212b8023177SVladimir Kondratiev 	/* P2P */
213b874ddecSLior David 	WMI_P2P_CFG_CMDID				= 0x910,
214b874ddecSLior David 	WMI_PORT_ALLOCATE_CMDID				= 0x911,
215b874ddecSLior David 	WMI_PORT_DELETE_CMDID				= 0x912,
216b874ddecSLior David 	WMI_POWER_MGMT_CFG_CMDID			= 0x913,
217b874ddecSLior David 	WMI_START_LISTEN_CMDID				= 0x914,
218b874ddecSLior David 	WMI_START_SEARCH_CMDID				= 0x915,
219b874ddecSLior David 	WMI_DISCOVERY_START_CMDID			= 0x916,
220b874ddecSLior David 	WMI_DISCOVERY_STOP_CMDID			= 0x917,
221b874ddecSLior David 	WMI_PCP_START_CMDID				= 0x918,
222b874ddecSLior David 	WMI_PCP_STOP_CMDID				= 0x919,
223b874ddecSLior David 	WMI_GET_PCP_FACTOR_CMDID			= 0x91B,
2240163b031SMaya Erez 	/* Power Save Configuration Commands */
2250163b031SMaya Erez 	WMI_PS_DEV_PROFILE_CFG_CMDID			= 0x91C,
226*b5aeff16SDedy Lansky 	WMI_RS_ENABLE_CMDID				= 0x91E,
227*b5aeff16SDedy Lansky 	WMI_RS_CFG_EX_CMDID				= 0x91F,
228*b5aeff16SDedy Lansky 	WMI_GET_DETAILED_RS_RES_EX_CMDID		= 0x920,
229*b5aeff16SDedy Lansky 	/* deprecated */
2300163b031SMaya Erez 	WMI_RS_CFG_CMDID				= 0x921,
231*b5aeff16SDedy Lansky 	/* deprecated */
23208989f96SLior David 	WMI_GET_DETAILED_RS_RES_CMDID			= 0x922,
23308989f96SLior David 	WMI_AOA_MEAS_CMDID				= 0x923,
234a52fb913SLior David 	WMI_BRP_SET_ANT_LIMIT_CMDID			= 0x924,
235cbf795c1SLior David 	WMI_SET_MGMT_RETRY_LIMIT_CMDID			= 0x930,
236cbf795c1SLior David 	WMI_GET_MGMT_RETRY_LIMIT_CMDID			= 0x931,
237849a564bSDedy Lansky 	WMI_NEW_STA_CMDID				= 0x935,
238849a564bSDedy Lansky 	WMI_DEL_STA_CMDID				= 0x936,
23990ffabb0SDedy Lansky 	WMI_SET_THERMAL_THROTTLING_CFG_CMDID		= 0x940,
24090ffabb0SDedy Lansky 	WMI_GET_THERMAL_THROTTLING_CFG_CMDID		= 0x941,
241761f8e4dSLazar Alexei 	/* Read Power Save profile type */
242761f8e4dSLazar Alexei 	WMI_PS_DEV_PROFILE_CFG_READ_CMDID		= 0x942,
2438a4fa214SAhmad Masri 	WMI_TSF_SYNC_CMDID				= 0x973,
24408989f96SLior David 	WMI_TOF_SESSION_START_CMDID			= 0x991,
24508989f96SLior David 	WMI_TOF_GET_CAPABILITIES_CMDID			= 0x992,
24608989f96SLior David 	WMI_TOF_SET_LCR_CMDID				= 0x993,
24708989f96SLior David 	WMI_TOF_SET_LCI_CMDID				= 0x994,
248761f8e4dSLazar Alexei 	WMI_TOF_CFG_RESPONDER_CMDID			= 0x996,
2498ae5d62cSLior David 	WMI_TOF_SET_TX_RX_OFFSET_CMDID			= 0x997,
2508ae5d62cSLior David 	WMI_TOF_GET_TX_RX_OFFSET_CMDID			= 0x998,
251761f8e4dSLazar Alexei 	WMI_TOF_CHANNEL_INFO_CMDID			= 0x999,
252cbf795c1SLior David 	WMI_GET_RF_SECTOR_PARAMS_CMDID			= 0x9A0,
253cbf795c1SLior David 	WMI_SET_RF_SECTOR_PARAMS_CMDID			= 0x9A1,
254cbf795c1SLior David 	WMI_GET_SELECTED_RF_SECTOR_INDEX_CMDID		= 0x9A2,
255cbf795c1SLior David 	WMI_SET_SELECTED_RF_SECTOR_INDEX_CMDID		= 0x9A3,
256cbf795c1SLior David 	WMI_SET_RF_SECTOR_ON_CMDID			= 0x9A4,
2578ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_ORDER_CMDID			= 0x9A5,
2588ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_NUMBER_CMDID		= 0x9A6,
2598ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID	= 0x9A7,
260*b5aeff16SDedy Lansky 	/* deprecated */
2618a4fa214SAhmad Masri 	WMI_BF_CONTROL_CMDID				= 0x9AA,
262*b5aeff16SDedy Lansky 	WMI_BF_CONTROL_EX_CMDID				= 0x9AB,
26396c93589SGidon Studinski 	WMI_TX_STATUS_RING_ADD_CMDID			= 0x9C0,
26496c93589SGidon Studinski 	WMI_RX_STATUS_RING_ADD_CMDID			= 0x9C1,
26596c93589SGidon Studinski 	WMI_TX_DESC_RING_ADD_CMDID			= 0x9C2,
26696c93589SGidon Studinski 	WMI_RX_DESC_RING_ADD_CMDID			= 0x9C3,
26796c93589SGidon Studinski 	WMI_BCAST_DESC_RING_ADD_CMDID			= 0x9C4,
26896c93589SGidon Studinski 	WMI_CFG_DEF_RX_OFFLOAD_CMDID			= 0x9C5,
269761f8e4dSLazar Alexei 	WMI_SCHEDULING_SCHEME_CMDID			= 0xA01,
270761f8e4dSLazar Alexei 	WMI_FIXED_SCHEDULING_CONFIG_CMDID		= 0xA02,
271761f8e4dSLazar Alexei 	WMI_ENABLE_FIXED_SCHEDULING_CMDID		= 0xA03,
272761f8e4dSLazar Alexei 	WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_CMDID	= 0xA04,
273761f8e4dSLazar Alexei 	WMI_SET_LONG_RANGE_CONFIG_CMDID			= 0xA05,
2748a4fa214SAhmad Masri 	WMI_GET_ASSOC_LIST_CMDID			= 0xA06,
2758a4fa214SAhmad Masri 	WMI_GET_CCA_INDICATIONS_CMDID			= 0xA07,
2768a4fa214SAhmad Masri 	WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_CMDID	= 0xA08,
2778a4fa214SAhmad Masri 	WMI_INTERNAL_FW_IOCTL_CMDID			= 0xA0B,
278*b5aeff16SDedy Lansky 	WMI_LINK_STATS_CMDID				= 0xA0C,
279*b5aeff16SDedy Lansky 	WMI_SET_GRANT_MCS_CMDID				= 0xA0E,
280*b5aeff16SDedy Lansky 	WMI_SET_AP_SLOT_SIZE_CMDID			= 0xA0F,
281*b5aeff16SDedy Lansky 	WMI_SET_VRING_PRIORITY_WEIGHT_CMDID		= 0xA10,
282*b5aeff16SDedy Lansky 	WMI_SET_VRING_PRIORITY_CMDID			= 0xA11,
283b874ddecSLior David 	WMI_SET_MAC_ADDRESS_CMDID			= 0xF003,
284b874ddecSLior David 	WMI_ABORT_SCAN_CMDID				= 0xF007,
285b874ddecSLior David 	WMI_SET_PROMISCUOUS_MODE_CMDID			= 0xF041,
286761f8e4dSLazar Alexei 	/* deprecated */
287b874ddecSLior David 	WMI_GET_PMK_CMDID				= 0xF048,
288b874ddecSLior David 	WMI_SET_PASSPHRASE_CMDID			= 0xF049,
289761f8e4dSLazar Alexei 	/* deprecated */
290b874ddecSLior David 	WMI_SEND_ASSOC_RES_CMDID			= 0xF04A,
291761f8e4dSLazar Alexei 	/* deprecated */
292b874ddecSLior David 	WMI_SET_ASSOC_REQ_RELAY_CMDID			= 0xF04B,
293b874ddecSLior David 	WMI_MAC_ADDR_REQ_CMDID				= 0xF04D,
294b874ddecSLior David 	WMI_FW_VER_CMDID				= 0xF04E,
295b874ddecSLior David 	WMI_PMC_CMDID					= 0xF04F,
2962be7d22fSVladimir Kondratiev };
2972be7d22fSVladimir Kondratiev 
298b874ddecSLior David /* WMI_CONNECT_CMDID */
2992be7d22fSVladimir Kondratiev enum wmi_network_type {
3002be7d22fSVladimir Kondratiev 	WMI_NETTYPE_INFRA		= 0x01,
3012be7d22fSVladimir Kondratiev 	WMI_NETTYPE_ADHOC		= 0x02,
3022be7d22fSVladimir Kondratiev 	WMI_NETTYPE_ADHOC_CREATOR	= 0x04,
3032be7d22fSVladimir Kondratiev 	WMI_NETTYPE_AP			= 0x10,
3042be7d22fSVladimir Kondratiev 	WMI_NETTYPE_P2P			= 0x20,
305b874ddecSLior David 	/* PCIE over 60g */
306b874ddecSLior David 	WMI_NETTYPE_WBE			= 0x40,
3072be7d22fSVladimir Kondratiev };
3082be7d22fSVladimir Kondratiev 
3092be7d22fSVladimir Kondratiev enum wmi_dot11_auth_mode {
3102be7d22fSVladimir Kondratiev 	WMI_AUTH11_OPEN		= 0x01,
3112be7d22fSVladimir Kondratiev 	WMI_AUTH11_SHARED	= 0x02,
3122be7d22fSVladimir Kondratiev 	WMI_AUTH11_LEAP		= 0x04,
3132be7d22fSVladimir Kondratiev 	WMI_AUTH11_WSC		= 0x08,
3142be7d22fSVladimir Kondratiev };
3152be7d22fSVladimir Kondratiev 
3162be7d22fSVladimir Kondratiev enum wmi_auth_mode {
3172be7d22fSVladimir Kondratiev 	WMI_AUTH_NONE		= 0x01,
3182be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA		= 0x02,
3192be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA2		= 0x04,
3202be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA_PSK	= 0x08,
3212be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA2_PSK	= 0x10,
3222be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA_CCKM	= 0x20,
3232be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA2_CCKM	= 0x40,
3242be7d22fSVladimir Kondratiev };
3252be7d22fSVladimir Kondratiev 
3262be7d22fSVladimir Kondratiev enum wmi_crypto_type {
3272be7d22fSVladimir Kondratiev 	WMI_CRYPT_NONE		= 0x01,
3282be7d22fSVladimir Kondratiev 	WMI_CRYPT_AES_GCMP	= 0x20,
3292be7d22fSVladimir Kondratiev };
3302be7d22fSVladimir Kondratiev 
3312be7d22fSVladimir Kondratiev enum wmi_connect_ctrl_flag_bits {
332b874ddecSLior David 	WMI_CONNECT_ASSOC_POLICY_USER		= 0x01,
333b874ddecSLior David 	WMI_CONNECT_SEND_REASSOC		= 0x02,
334b874ddecSLior David 	WMI_CONNECT_IGNORE_WPA_GROUP_CIPHER	= 0x04,
335b874ddecSLior David 	WMI_CONNECT_PROFILE_MATCH_DONE		= 0x08,
336b874ddecSLior David 	WMI_CONNECT_IGNORE_AAC_BEACON		= 0x10,
337b874ddecSLior David 	WMI_CONNECT_CSA_FOLLOW_BSS		= 0x20,
338b874ddecSLior David 	WMI_CONNECT_DO_WPA_OFFLOAD		= 0x40,
339b874ddecSLior David 	WMI_CONNECT_DO_NOT_DEAUTH		= 0x80,
3402be7d22fSVladimir Kondratiev };
3412be7d22fSVladimir Kondratiev 
3422be7d22fSVladimir Kondratiev #define WMI_MAX_SSID_LEN	(32)
3432be7d22fSVladimir Kondratiev 
344b874ddecSLior David /* WMI_CONNECT_CMDID */
3452be7d22fSVladimir Kondratiev struct wmi_connect_cmd {
3462be7d22fSVladimir Kondratiev 	u8 network_type;
3472be7d22fSVladimir Kondratiev 	u8 dot11_auth_mode;
3482be7d22fSVladimir Kondratiev 	u8 auth_mode;
3492be7d22fSVladimir Kondratiev 	u8 pairwise_crypto_type;
3502be7d22fSVladimir Kondratiev 	u8 pairwise_crypto_len;
3512be7d22fSVladimir Kondratiev 	u8 group_crypto_type;
3522be7d22fSVladimir Kondratiev 	u8 group_crypto_len;
3532be7d22fSVladimir Kondratiev 	u8 ssid_len;
3542be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
3552be7d22fSVladimir Kondratiev 	u8 channel;
3562be7d22fSVladimir Kondratiev 	u8 reserved0;
3572be7d22fSVladimir Kondratiev 	u8 bssid[WMI_MAC_LEN];
3582be7d22fSVladimir Kondratiev 	__le32 ctrl_flags;
3592be7d22fSVladimir Kondratiev 	u8 dst_mac[WMI_MAC_LEN];
3602be7d22fSVladimir Kondratiev 	u8 reserved1[2];
3612be7d22fSVladimir Kondratiev } __packed;
3622be7d22fSVladimir Kondratiev 
363b874ddecSLior David /* WMI_DISCONNECT_STA_CMDID */
364b8023177SVladimir Kondratiev struct wmi_disconnect_sta_cmd {
365b8023177SVladimir Kondratiev 	u8 dst_mac[WMI_MAC_LEN];
366b8023177SVladimir Kondratiev 	__le16 disconnect_reason;
367b8023177SVladimir Kondratiev } __packed;
3682be7d22fSVladimir Kondratiev 
3692be7d22fSVladimir Kondratiev #define WMI_MAX_KEY_INDEX	(3)
3702be7d22fSVladimir Kondratiev #define WMI_MAX_KEY_LEN		(32)
3712be7d22fSVladimir Kondratiev #define WMI_PASSPHRASE_LEN	(64)
3722be7d22fSVladimir Kondratiev 
373b874ddecSLior David /* WMI_SET_PASSPHRASE_CMDID */
3742be7d22fSVladimir Kondratiev struct wmi_set_passphrase_cmd {
3752be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
3762be7d22fSVladimir Kondratiev 	u8 passphrase[WMI_PASSPHRASE_LEN];
3772be7d22fSVladimir Kondratiev 	u8 ssid_len;
3782be7d22fSVladimir Kondratiev 	u8 passphrase_len;
3792be7d22fSVladimir Kondratiev } __packed;
3802be7d22fSVladimir Kondratiev 
381b874ddecSLior David /* WMI_ADD_CIPHER_KEY_CMDID */
3822be7d22fSVladimir Kondratiev enum wmi_key_usage {
383b874ddecSLior David 	WMI_KEY_USE_PAIRWISE	= 0x00,
384b874ddecSLior David 	WMI_KEY_USE_RX_GROUP	= 0x01,
385b874ddecSLior David 	WMI_KEY_USE_TX_GROUP	= 0x02,
3862be7d22fSVladimir Kondratiev };
3872be7d22fSVladimir Kondratiev 
3882be7d22fSVladimir Kondratiev struct wmi_add_cipher_key_cmd {
3892be7d22fSVladimir Kondratiev 	u8 key_index;
3902be7d22fSVladimir Kondratiev 	u8 key_type;
391b874ddecSLior David 	/* enum wmi_key_usage */
392b874ddecSLior David 	u8 key_usage;
3932be7d22fSVladimir Kondratiev 	u8 key_len;
394b874ddecSLior David 	/* key replay sequence counter */
395b874ddecSLior David 	u8 key_rsc[8];
3962be7d22fSVladimir Kondratiev 	u8 key[WMI_MAX_KEY_LEN];
397b874ddecSLior David 	/* Additional Key Control information */
398b874ddecSLior David 	u8 key_op_ctrl;
3992be7d22fSVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
4002be7d22fSVladimir Kondratiev } __packed;
4012be7d22fSVladimir Kondratiev 
402b874ddecSLior David /* WMI_DELETE_CIPHER_KEY_CMDID */
4032be7d22fSVladimir Kondratiev struct wmi_delete_cipher_key_cmd {
4042be7d22fSVladimir Kondratiev 	u8 key_index;
4052be7d22fSVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
4062be7d22fSVladimir Kondratiev } __packed;
4072be7d22fSVladimir Kondratiev 
408b874ddecSLior David /* WMI_START_SCAN_CMDID
4092be7d22fSVladimir Kondratiev  *
4102be7d22fSVladimir Kondratiev  * Start L1 scan operation
4112be7d22fSVladimir Kondratiev  *
4122be7d22fSVladimir Kondratiev  * Returned events:
4132be7d22fSVladimir Kondratiev  * - WMI_RX_MGMT_PACKET_EVENTID - for every probe resp.
4142be7d22fSVladimir Kondratiev  * - WMI_SCAN_COMPLETE_EVENTID
4152be7d22fSVladimir Kondratiev  */
4162be7d22fSVladimir Kondratiev enum wmi_scan_type {
417b874ddecSLior David 	WMI_ACTIVE_SCAN		= 0x00,
418b874ddecSLior David 	WMI_SHORT_SCAN		= 0x01,
419b874ddecSLior David 	WMI_PASSIVE_SCAN	= 0x02,
420b874ddecSLior David 	WMI_DIRECT_SCAN		= 0x03,
421b874ddecSLior David 	WMI_LONG_SCAN		= 0x04,
4222be7d22fSVladimir Kondratiev };
4232be7d22fSVladimir Kondratiev 
424b874ddecSLior David /* WMI_START_SCAN_CMDID */
4252be7d22fSVladimir Kondratiev struct wmi_start_scan_cmd {
426b874ddecSLior David 	u8 direct_scan_mac_addr[WMI_MAC_LEN];
4270163b031SMaya Erez 	/* run scan with discovery beacon. Relevant for ACTIVE scan only. */
42874997a53SLior David 	u8 discovery_mode;
42974997a53SLior David 	u8 reserved;
430b874ddecSLior David 	/* Max duration in the home channel(ms) */
431b874ddecSLior David 	__le32 dwell_time;
432b874ddecSLior David 	/* Time interval between scans (ms) */
433b874ddecSLior David 	__le32 force_scan_interval;
434b874ddecSLior David 	/* enum wmi_scan_type */
435b874ddecSLior David 	u8 scan_type;
436b874ddecSLior David 	/* how many channels follow */
437b874ddecSLior David 	u8 num_channels;
438b874ddecSLior David 	/* channels ID's:
439b874ddecSLior David 	 * 0 - 58320 MHz
440b874ddecSLior David 	 * 1 - 60480 MHz
441b874ddecSLior David 	 * 2 - 62640 MHz
442b874ddecSLior David 	 */
4432be7d22fSVladimir Kondratiev 	struct {
4442be7d22fSVladimir Kondratiev 		u8 channel;
4452be7d22fSVladimir Kondratiev 		u8 reserved;
446b874ddecSLior David 	} channel_list[0];
4472be7d22fSVladimir Kondratiev } __packed;
4482be7d22fSVladimir Kondratiev 
449a5dc6883SDedy Lansky #define WMI_MAX_PNO_SSID_NUM	(16)
450a5dc6883SDedy Lansky #define WMI_MAX_CHANNEL_NUM	(6)
451a5dc6883SDedy Lansky #define WMI_MAX_PLANS_NUM	(2)
452a5dc6883SDedy Lansky 
453a5dc6883SDedy Lansky /* WMI_START_SCHED_SCAN_CMDID */
454a5dc6883SDedy Lansky struct wmi_sched_scan_ssid_match {
455a5dc6883SDedy Lansky 	u8 ssid_len;
456a5dc6883SDedy Lansky 	u8 ssid[WMI_MAX_SSID_LEN];
457a5dc6883SDedy Lansky 	s8 rssi_threshold;
458a5dc6883SDedy Lansky 	/* boolean */
459a5dc6883SDedy Lansky 	u8 add_ssid_to_probe;
460a5dc6883SDedy Lansky 	u8 reserved;
461a5dc6883SDedy Lansky } __packed;
462a5dc6883SDedy Lansky 
463a5dc6883SDedy Lansky /* WMI_START_SCHED_SCAN_CMDID */
464a5dc6883SDedy Lansky struct wmi_sched_scan_plan {
465a5dc6883SDedy Lansky 	__le16 interval_sec;
466a5dc6883SDedy Lansky 	__le16 num_of_iterations;
467a5dc6883SDedy Lansky } __packed;
468a5dc6883SDedy Lansky 
469a5dc6883SDedy Lansky /* WMI_START_SCHED_SCAN_CMDID */
470a5dc6883SDedy Lansky struct wmi_start_sched_scan_cmd {
471a5dc6883SDedy Lansky 	struct wmi_sched_scan_ssid_match ssid_for_match[WMI_MAX_PNO_SSID_NUM];
472a5dc6883SDedy Lansky 	u8 num_of_ssids;
473a5dc6883SDedy Lansky 	s8 min_rssi_threshold;
474a5dc6883SDedy Lansky 	u8 channel_list[WMI_MAX_CHANNEL_NUM];
475a5dc6883SDedy Lansky 	u8 num_of_channels;
476a5dc6883SDedy Lansky 	u8 reserved;
477a5dc6883SDedy Lansky 	__le16 initial_delay_sec;
478a5dc6883SDedy Lansky 	struct wmi_sched_scan_plan scan_plans[WMI_MAX_PLANS_NUM];
479a5dc6883SDedy Lansky } __packed;
480a5dc6883SDedy Lansky 
481*b5aeff16SDedy Lansky /* WMI_FT_AUTH_CMDID */
482*b5aeff16SDedy Lansky struct wmi_ft_auth_cmd {
483*b5aeff16SDedy Lansky 	u8 bssid[WMI_MAC_LEN];
484*b5aeff16SDedy Lansky 	/* enum wmi_channel */
485*b5aeff16SDedy Lansky 	u8 channel;
486*b5aeff16SDedy Lansky 	/* enum wmi_channel */
487*b5aeff16SDedy Lansky 	u8 edmg_channel;
488*b5aeff16SDedy Lansky 	u8 reserved[4];
489*b5aeff16SDedy Lansky } __packed;
490*b5aeff16SDedy Lansky 
491*b5aeff16SDedy Lansky /* WMI_FT_REASSOC_CMDID */
492*b5aeff16SDedy Lansky struct wmi_ft_reassoc_cmd {
493*b5aeff16SDedy Lansky 	u8 bssid[WMI_MAC_LEN];
494*b5aeff16SDedy Lansky 	u8 reserved[2];
495*b5aeff16SDedy Lansky } __packed;
496*b5aeff16SDedy Lansky 
497*b5aeff16SDedy Lansky /* WMI_UPDATE_FT_IES_CMDID */
498*b5aeff16SDedy Lansky struct wmi_update_ft_ies_cmd {
499*b5aeff16SDedy Lansky 	/* Length of the FT IEs */
500*b5aeff16SDedy Lansky 	__le16 ie_len;
501*b5aeff16SDedy Lansky 	u8 reserved[2];
502*b5aeff16SDedy Lansky 	u8 ie_info[0];
503*b5aeff16SDedy Lansky } __packed;
504*b5aeff16SDedy Lansky 
505b874ddecSLior David /* WMI_SET_PROBED_SSID_CMDID */
506b8023177SVladimir Kondratiev #define MAX_PROBED_SSID_INDEX	(3)
5072be7d22fSVladimir Kondratiev 
5082be7d22fSVladimir Kondratiev enum wmi_ssid_flag {
509b874ddecSLior David 	/* disables entry */
510b874ddecSLior David 	WMI_SSID_FLAG_DISABLE	= 0x00,
511b874ddecSLior David 	/* probes specified ssid */
512b874ddecSLior David 	WMI_SSID_FLAG_SPECIFIC	= 0x01,
513b874ddecSLior David 	/* probes for any ssid */
514b874ddecSLior David 	WMI_SSID_FLAG_ANY	= 0x02,
5152be7d22fSVladimir Kondratiev };
5162be7d22fSVladimir Kondratiev 
5172be7d22fSVladimir Kondratiev struct wmi_probed_ssid_cmd {
518b874ddecSLior David 	/* 0 to MAX_PROBED_SSID_INDEX */
519b874ddecSLior David 	u8 entry_index;
520b874ddecSLior David 	/* enum wmi_ssid_flag */
521b874ddecSLior David 	u8 flag;
5222be7d22fSVladimir Kondratiev 	u8 ssid_len;
5232be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
5242be7d22fSVladimir Kondratiev } __packed;
5252be7d22fSVladimir Kondratiev 
526b874ddecSLior David /* WMI_SET_APPIE_CMDID
5272be7d22fSVladimir Kondratiev  * Add Application specified IE to a management frame
5282be7d22fSVladimir Kondratiev  */
529b8023177SVladimir Kondratiev #define WMI_MAX_IE_LEN	(1024)
530b8023177SVladimir Kondratiev 
531b874ddecSLior David /* Frame Types */
532b8023177SVladimir Kondratiev enum wmi_mgmt_frame_type {
533b874ddecSLior David 	WMI_FRAME_BEACON	= 0x00,
534b874ddecSLior David 	WMI_FRAME_PROBE_REQ	= 0x01,
535b874ddecSLior David 	WMI_FRAME_PROBE_RESP	= 0x02,
536b874ddecSLior David 	WMI_FRAME_ASSOC_REQ	= 0x03,
537b874ddecSLior David 	WMI_FRAME_ASSOC_RESP	= 0x04,
538b874ddecSLior David 	WMI_NUM_MGMT_FRAME	= 0x05,
539b8023177SVladimir Kondratiev };
540b8023177SVladimir Kondratiev 
5412be7d22fSVladimir Kondratiev struct wmi_set_appie_cmd {
542b874ddecSLior David 	/* enum wmi_mgmt_frame_type */
543b874ddecSLior David 	u8 mgmt_frm_type;
5442be7d22fSVladimir Kondratiev 	u8 reserved;
545b874ddecSLior David 	/* Length of the IE to be added to MGMT frame */
546b874ddecSLior David 	__le16 ie_len;
5472be7d22fSVladimir Kondratiev 	u8 ie_info[0];
5482be7d22fSVladimir Kondratiev } __packed;
5492be7d22fSVladimir Kondratiev 
550b874ddecSLior David /* WMI_PXMT_RANGE_CFG_CMDID */
5512be7d22fSVladimir Kondratiev struct wmi_pxmt_range_cfg_cmd {
5522be7d22fSVladimir Kondratiev 	u8 dst_mac[WMI_MAC_LEN];
5532be7d22fSVladimir Kondratiev 	__le16 range;
5542be7d22fSVladimir Kondratiev } __packed;
5552be7d22fSVladimir Kondratiev 
556b874ddecSLior David /* WMI_PXMT_SNR2_RANGE_CFG_CMDID */
5572be7d22fSVladimir Kondratiev struct wmi_pxmt_snr2_range_cfg_cmd {
558b874ddecSLior David 	s8 snr2range_arr[2];
5592be7d22fSVladimir Kondratiev } __packed;
5602be7d22fSVladimir Kondratiev 
561b874ddecSLior David /* WMI_RF_MGMT_CMDID */
5622be7d22fSVladimir Kondratiev enum wmi_rf_mgmt_type {
563b874ddecSLior David 	WMI_RF_MGMT_W_DISABLE	= 0x00,
564b874ddecSLior David 	WMI_RF_MGMT_W_ENABLE	= 0x01,
565b874ddecSLior David 	WMI_RF_MGMT_GET_STATUS	= 0x02,
5662be7d22fSVladimir Kondratiev };
5672be7d22fSVladimir Kondratiev 
5688a4fa214SAhmad Masri /* WMI_BF_CONTROL_CMDID */
5698a4fa214SAhmad Masri enum wmi_bf_triggers {
5708a4fa214SAhmad Masri 	WMI_BF_TRIGGER_RS_MCS1_TH_FAILURE		= 0x01,
5718a4fa214SAhmad Masri 	WMI_BF_TRIGGER_RS_MCS1_NO_BACK_FAILURE		= 0x02,
5728a4fa214SAhmad Masri 	WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP		= 0x04,
5738a4fa214SAhmad Masri 	WMI_BF_TRIGGER_MAX_BACK_FAILURE			= 0x08,
5748a4fa214SAhmad Masri 	WMI_BF_TRIGGER_FW				= 0x10,
5758a4fa214SAhmad Masri 	WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_KEEP_ALIVE	= 0x20,
5768a4fa214SAhmad Masri 	WMI_BF_TRIGGER_AOA				= 0x40,
5778a4fa214SAhmad Masri 	WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_UPM		= 0x80,
5788a4fa214SAhmad Masri };
5798a4fa214SAhmad Masri 
580b874ddecSLior David /* WMI_RF_MGMT_CMDID */
5812be7d22fSVladimir Kondratiev struct wmi_rf_mgmt_cmd {
5822be7d22fSVladimir Kondratiev 	__le32 rf_mgmt_type;
5832be7d22fSVladimir Kondratiev } __packed;
5842be7d22fSVladimir Kondratiev 
585b874ddecSLior David /* WMI_CORR_MEASURE_CMDID */
586b8023177SVladimir Kondratiev struct wmi_corr_measure_cmd {
587b874ddecSLior David 	__le32 freq_mhz;
588b8023177SVladimir Kondratiev 	__le32 length_samples;
589b8023177SVladimir Kondratiev 	__le32 iterations;
590b8023177SVladimir Kondratiev } __packed;
591b8023177SVladimir Kondratiev 
592b874ddecSLior David /* WMI_SET_SSID_CMDID */
5932be7d22fSVladimir Kondratiev struct wmi_set_ssid_cmd {
5942be7d22fSVladimir Kondratiev 	__le32 ssid_len;
5952be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
5962be7d22fSVladimir Kondratiev } __packed;
5972be7d22fSVladimir Kondratiev 
598b874ddecSLior David /* WMI_SET_PCP_CHANNEL_CMDID */
5992be7d22fSVladimir Kondratiev struct wmi_set_pcp_channel_cmd {
6002be7d22fSVladimir Kondratiev 	u8 channel;
6012be7d22fSVladimir Kondratiev 	u8 reserved[3];
6022be7d22fSVladimir Kondratiev } __packed;
6032be7d22fSVladimir Kondratiev 
604b874ddecSLior David /* WMI_BCON_CTRL_CMDID */
6052be7d22fSVladimir Kondratiev struct wmi_bcon_ctrl_cmd {
6062be7d22fSVladimir Kondratiev 	__le16 bcon_interval;
6072be7d22fSVladimir Kondratiev 	__le16 frag_num;
6082be7d22fSVladimir Kondratiev 	__le64 ss_mask;
6092be7d22fSVladimir Kondratiev 	u8 network_type;
6106c2faf09SVladimir Kondratiev 	u8 pcp_max_assoc_sta;
6112be7d22fSVladimir Kondratiev 	u8 disable_sec_offload;
6122be7d22fSVladimir Kondratiev 	u8 disable_sec;
613b874ddecSLior David 	u8 hidden_ssid;
614b874ddecSLior David 	u8 is_go;
6158a4fa214SAhmad Masri 	/* A-BFT length override if non-0 */
6168a4fa214SAhmad Masri 	u8 abft_len;
6178a4fa214SAhmad Masri 	u8 reserved;
6182be7d22fSVladimir Kondratiev } __packed;
6192be7d22fSVladimir Kondratiev 
620b874ddecSLior David /* WMI_PORT_ALLOCATE_CMDID */
621b8023177SVladimir Kondratiev enum wmi_port_role {
622b874ddecSLior David 	WMI_PORT_STA		= 0x00,
623b874ddecSLior David 	WMI_PORT_PCP		= 0x01,
624b874ddecSLior David 	WMI_PORT_AP		= 0x02,
625b874ddecSLior David 	WMI_PORT_P2P_DEV	= 0x03,
626b874ddecSLior David 	WMI_PORT_P2P_CLIENT	= 0x04,
627b874ddecSLior David 	WMI_PORT_P2P_GO		= 0x05,
628b8023177SVladimir Kondratiev };
629b8023177SVladimir Kondratiev 
630b874ddecSLior David /* WMI_PORT_ALLOCATE_CMDID */
631b8023177SVladimir Kondratiev struct wmi_port_allocate_cmd {
632b8023177SVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
633b8023177SVladimir Kondratiev 	u8 port_role;
6346c2faf09SVladimir Kondratiev 	u8 mid;
635b8023177SVladimir Kondratiev } __packed;
636b8023177SVladimir Kondratiev 
637b874ddecSLior David /* WMI_PORT_DELETE_CMDID */
638b874ddecSLior David struct wmi_port_delete_cmd {
639b8023177SVladimir Kondratiev 	u8 mid;
640b8023177SVladimir Kondratiev 	u8 reserved[3];
641b8023177SVladimir Kondratiev } __packed;
642b8023177SVladimir Kondratiev 
643fe9ee51eSMaya Erez /* WMI_TRAFFIC_SUSPEND_CMD wakeup trigger bit mask values */
644fe9ee51eSMaya Erez enum wmi_wakeup_trigger {
645fe9ee51eSMaya Erez 	WMI_WAKEUP_TRIGGER_UCAST	= 0x01,
646fe9ee51eSMaya Erez 	WMI_WAKEUP_TRIGGER_BCAST	= 0x02,
647fe9ee51eSMaya Erez };
648fe9ee51eSMaya Erez 
649fe9ee51eSMaya Erez /* WMI_TRAFFIC_SUSPEND_CMDID */
650fe9ee51eSMaya Erez struct wmi_traffic_suspend_cmd {
6510163b031SMaya Erez 	/* Bit vector: bit[0] - wake on Unicast, bit[1] - wake on Broadcast */
6520163b031SMaya Erez 	u8 wakeup_trigger;
6530163b031SMaya Erez } __packed;
6540163b031SMaya Erez 
655b874ddecSLior David /* WMI_P2P_CFG_CMDID */
656b8023177SVladimir Kondratiev enum wmi_discovery_mode {
657b874ddecSLior David 	WMI_DISCOVERY_MODE_NON_OFFLOAD	= 0x00,
658b874ddecSLior David 	WMI_DISCOVERY_MODE_OFFLOAD	= 0x01,
659b874ddecSLior David 	WMI_DISCOVERY_MODE_PEER2PEER	= 0x02,
660b8023177SVladimir Kondratiev };
661b8023177SVladimir Kondratiev 
662b8023177SVladimir Kondratiev struct wmi_p2p_cfg_cmd {
663b874ddecSLior David 	/* enum wmi_discovery_mode */
664b874ddecSLior David 	u8 discovery_mode;
665b8023177SVladimir Kondratiev 	u8 channel;
666b874ddecSLior David 	/* base to listen/search duration calculation */
667b874ddecSLior David 	__le16 bcon_interval;
668b8023177SVladimir Kondratiev } __packed;
669b8023177SVladimir Kondratiev 
670b874ddecSLior David /* WMI_POWER_MGMT_CFG_CMDID */
671b8023177SVladimir Kondratiev enum wmi_power_source_type {
672b874ddecSLior David 	WMI_POWER_SOURCE_BATTERY	= 0x00,
673b874ddecSLior David 	WMI_POWER_SOURCE_OTHER		= 0x01,
674b8023177SVladimir Kondratiev };
675b8023177SVladimir Kondratiev 
676b8023177SVladimir Kondratiev struct wmi_power_mgmt_cfg_cmd {
677b874ddecSLior David 	/* enum wmi_power_source_type */
678b874ddecSLior David 	u8 power_source;
679b8023177SVladimir Kondratiev 	u8 reserved[3];
680b8023177SVladimir Kondratiev } __packed;
681b8023177SVladimir Kondratiev 
682b874ddecSLior David /* WMI_PCP_START_CMDID */
6838a4fa214SAhmad Masri enum wmi_ap_sme_offload_mode {
6848a4fa214SAhmad Masri 	/* Full AP SME in FW */
6858a4fa214SAhmad Masri 	WMI_AP_SME_OFFLOAD_FULL		= 0x00,
6868a4fa214SAhmad Masri 	/* Probe AP SME in FW */
6878a4fa214SAhmad Masri 	WMI_AP_SME_OFFLOAD_PARTIAL	= 0x01,
6888a4fa214SAhmad Masri 	/* AP SME in host */
6898a4fa214SAhmad Masri 	WMI_AP_SME_OFFLOAD_NONE		= 0x02,
6908a4fa214SAhmad Masri };
6918a4fa214SAhmad Masri 
6928a4fa214SAhmad Masri /* WMI_PCP_START_CMDID */
693b8023177SVladimir Kondratiev struct wmi_pcp_start_cmd {
694b8023177SVladimir Kondratiev 	__le16 bcon_interval;
6956c2faf09SVladimir Kondratiev 	u8 pcp_max_assoc_sta;
6968e52fe30SHamad Kadmany 	u8 hidden_ssid;
697b874ddecSLior David 	u8 is_go;
698a52fb913SLior David 	u8 reserved0[5];
69990ffabb0SDedy Lansky 	/* A-BFT length override if non-0 */
700a52fb913SLior David 	u8 abft_len;
7018a4fa214SAhmad Masri 	/* enum wmi_ap_sme_offload_mode_e */
7028a4fa214SAhmad Masri 	u8 ap_sme_offload_mode;
703b8023177SVladimir Kondratiev 	u8 network_type;
704b8023177SVladimir Kondratiev 	u8 channel;
705b8023177SVladimir Kondratiev 	u8 disable_sec_offload;
706b8023177SVladimir Kondratiev 	u8 disable_sec;
707b8023177SVladimir Kondratiev } __packed;
708b8023177SVladimir Kondratiev 
709b874ddecSLior David /* WMI_SW_TX_REQ_CMDID */
7102be7d22fSVladimir Kondratiev struct wmi_sw_tx_req_cmd {
7112be7d22fSVladimir Kondratiev 	u8 dst_mac[WMI_MAC_LEN];
7122be7d22fSVladimir Kondratiev 	__le16 len;
7132be7d22fSVladimir Kondratiev 	u8 payload[0];
7142be7d22fSVladimir Kondratiev } __packed;
7152be7d22fSVladimir Kondratiev 
7168a4fa214SAhmad Masri /* WMI_VRING_SWITCH_TIMING_CONFIG_CMDID */
7178a4fa214SAhmad Masri struct wmi_vring_switch_timing_config_cmd {
7188a4fa214SAhmad Masri 	/* Set vring timing configuration:
7198a4fa214SAhmad Masri 	 *
7208a4fa214SAhmad Masri 	 * defined interval for vring switch
7218a4fa214SAhmad Masri 	 */
7228a4fa214SAhmad Masri 	__le32 interval_usec;
7238a4fa214SAhmad Masri 	/* vring inactivity threshold */
7248a4fa214SAhmad Masri 	__le32 idle_th_usec;
7258a4fa214SAhmad Masri } __packed;
7268a4fa214SAhmad Masri 
7272be7d22fSVladimir Kondratiev struct wmi_sw_ring_cfg {
7282be7d22fSVladimir Kondratiev 	__le64 ring_mem_base;
7292be7d22fSVladimir Kondratiev 	__le16 ring_size;
7302be7d22fSVladimir Kondratiev 	__le16 max_mpdu_size;
7312be7d22fSVladimir Kondratiev } __packed;
7322be7d22fSVladimir Kondratiev 
733b874ddecSLior David /* wmi_vring_cfg_schd */
7342be7d22fSVladimir Kondratiev struct wmi_vring_cfg_schd {
7352be7d22fSVladimir Kondratiev 	__le16 priority;
7362be7d22fSVladimir Kondratiev 	__le16 timeslot_us;
7372be7d22fSVladimir Kondratiev } __packed;
7382be7d22fSVladimir Kondratiev 
7392be7d22fSVladimir Kondratiev enum wmi_vring_cfg_encap_trans_type {
740b874ddecSLior David 	WMI_VRING_ENC_TYPE_802_3	= 0x00,
741b874ddecSLior David 	WMI_VRING_ENC_TYPE_NATIVE_WIFI	= 0x01,
7422be7d22fSVladimir Kondratiev };
7432be7d22fSVladimir Kondratiev 
7442be7d22fSVladimir Kondratiev enum wmi_vring_cfg_ds_cfg {
745b874ddecSLior David 	WMI_VRING_DS_PBSS	= 0x00,
746b874ddecSLior David 	WMI_VRING_DS_STATION	= 0x01,
747b874ddecSLior David 	WMI_VRING_DS_AP		= 0x02,
748b874ddecSLior David 	WMI_VRING_DS_ADDR4	= 0x03,
7492be7d22fSVladimir Kondratiev };
7502be7d22fSVladimir Kondratiev 
7512be7d22fSVladimir Kondratiev enum wmi_vring_cfg_nwifi_ds_trans_type {
752b874ddecSLior David 	WMI_NWIFI_TX_TRANS_MODE_NO		= 0x00,
753b874ddecSLior David 	WMI_NWIFI_TX_TRANS_MODE_AP2PBSS		= 0x01,
754b874ddecSLior David 	WMI_NWIFI_TX_TRANS_MODE_STA2PBSS	= 0x02,
7552be7d22fSVladimir Kondratiev };
7562be7d22fSVladimir Kondratiev 
7572be7d22fSVladimir Kondratiev enum wmi_vring_cfg_schd_params_priority {
758b874ddecSLior David 	WMI_SCH_PRIO_REGULAR	= 0x00,
759b874ddecSLior David 	WMI_SCH_PRIO_HIGH	= 0x01,
7602be7d22fSVladimir Kondratiev };
7612be7d22fSVladimir Kondratiev 
7628a4fa214SAhmad Masri #define CIDXTID_EXTENDED_CID_TID		(0xFF)
7632be7d22fSVladimir Kondratiev #define CIDXTID_CID_POS				(0)
7642be7d22fSVladimir Kondratiev #define CIDXTID_CID_LEN				(4)
7652be7d22fSVladimir Kondratiev #define CIDXTID_CID_MSK				(0xF)
7662be7d22fSVladimir Kondratiev #define CIDXTID_TID_POS				(4)
7672be7d22fSVladimir Kondratiev #define CIDXTID_TID_LEN				(4)
7682be7d22fSVladimir Kondratiev #define CIDXTID_TID_MSK				(0xF0)
7692be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_LIFETIME_EN_POS	(0)
7702be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_LIFETIME_EN_LEN	(1)
7712be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_LIFETIME_EN_MSK	(0x1)
7722be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_AGGR_EN_POS		(1)
7732be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_AGGR_EN_LEN		(1)
7742be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_AGGR_EN_MSK		(0x2)
7752be7d22fSVladimir Kondratiev #define VRING_CFG_TO_RESOLUTION_VALUE_POS	(0)
7762be7d22fSVladimir Kondratiev #define VRING_CFG_TO_RESOLUTION_VALUE_LEN	(6)
7772be7d22fSVladimir Kondratiev #define VRING_CFG_TO_RESOLUTION_VALUE_MSK	(0x3F)
778b874ddecSLior David 
779b874ddecSLior David struct wmi_vring_cfg {
780b874ddecSLior David 	struct wmi_sw_ring_cfg tx_sw_ring;
781b874ddecSLior David 	/* 0-23 vrings */
782b874ddecSLior David 	u8 ringid;
7838a4fa214SAhmad Masri 	/* Used for cid less than 8. For higher cid set
7848a4fa214SAhmad Masri 	 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
7858a4fa214SAhmad Masri 	 */
786b874ddecSLior David 	u8 cidxtid;
787b874ddecSLior David 	u8 encap_trans_type;
788b874ddecSLior David 	/* 802.3 DS cfg */
789b874ddecSLior David 	u8 ds_cfg;
790b874ddecSLior David 	u8 nwifi_ds_trans_type;
791b874ddecSLior David 	u8 mac_ctrl;
7922be7d22fSVladimir Kondratiev 	u8 to_resolution;
7932be7d22fSVladimir Kondratiev 	u8 agg_max_wsize;
7942be7d22fSVladimir Kondratiev 	struct wmi_vring_cfg_schd schd_params;
7958a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
7968a4fa214SAhmad Masri 	u8 cid;
7978a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
7988a4fa214SAhmad Masri 	u8 tid;
799*b5aeff16SDedy Lansky 	/* Update the vring's priority for Qos purpose. Set to
800*b5aeff16SDedy Lansky 	 * WMI_QOS_DEFAULT_PRIORITY to use MID's QoS priority
801*b5aeff16SDedy Lansky 	 */
802*b5aeff16SDedy Lansky 	u8 qos_priority;
803*b5aeff16SDedy Lansky 	u8 reserved;
8042be7d22fSVladimir Kondratiev } __packed;
8052be7d22fSVladimir Kondratiev 
8062be7d22fSVladimir Kondratiev enum wmi_vring_cfg_cmd_action {
807b874ddecSLior David 	WMI_VRING_CMD_ADD	= 0x00,
808b874ddecSLior David 	WMI_VRING_CMD_MODIFY	= 0x01,
809b874ddecSLior David 	WMI_VRING_CMD_DELETE	= 0x02,
8102be7d22fSVladimir Kondratiev };
8112be7d22fSVladimir Kondratiev 
812b874ddecSLior David /* WMI_VRING_CFG_CMDID */
8132be7d22fSVladimir Kondratiev struct wmi_vring_cfg_cmd {
8142be7d22fSVladimir Kondratiev 	__le32 action;
8152be7d22fSVladimir Kondratiev 	struct wmi_vring_cfg vring_cfg;
8162be7d22fSVladimir Kondratiev } __packed;
8172be7d22fSVladimir Kondratiev 
81862bfd300SVladimir Kondratiev struct wmi_bcast_vring_cfg {
81962bfd300SVladimir Kondratiev 	struct wmi_sw_ring_cfg tx_sw_ring;
820b874ddecSLior David 	/* 0-23 vrings */
821b874ddecSLior David 	u8 ringid;
82262bfd300SVladimir Kondratiev 	u8 encap_trans_type;
823b874ddecSLior David 	/* 802.3 DS cfg */
824b874ddecSLior David 	u8 ds_cfg;
82562bfd300SVladimir Kondratiev 	u8 nwifi_ds_trans_type;
82662bfd300SVladimir Kondratiev } __packed;
82762bfd300SVladimir Kondratiev 
828b874ddecSLior David /* WMI_BCAST_VRING_CFG_CMDID */
82962bfd300SVladimir Kondratiev struct wmi_bcast_vring_cfg_cmd {
83062bfd300SVladimir Kondratiev 	__le32 action;
83162bfd300SVladimir Kondratiev 	struct wmi_bcast_vring_cfg vring_cfg;
83262bfd300SVladimir Kondratiev } __packed;
83362bfd300SVladimir Kondratiev 
83496c93589SGidon Studinski struct wmi_edma_ring_cfg {
83596c93589SGidon Studinski 	__le64 ring_mem_base;
83696c93589SGidon Studinski 	/* size in number of items */
83796c93589SGidon Studinski 	__le16 ring_size;
83896c93589SGidon Studinski 	u8 ring_id;
83996c93589SGidon Studinski 	u8 reserved;
84096c93589SGidon Studinski } __packed;
84196c93589SGidon Studinski 
84296c93589SGidon Studinski enum wmi_rx_msg_type {
84396c93589SGidon Studinski 	WMI_RX_MSG_TYPE_COMPRESSED	= 0x00,
84496c93589SGidon Studinski 	WMI_RX_MSG_TYPE_EXTENDED	= 0x01,
84596c93589SGidon Studinski };
84696c93589SGidon Studinski 
84796c93589SGidon Studinski struct wmi_tx_status_ring_add_cmd {
84896c93589SGidon Studinski 	struct wmi_edma_ring_cfg ring_cfg;
84996c93589SGidon Studinski 	u8 irq_index;
85096c93589SGidon Studinski 	u8 reserved[3];
85196c93589SGidon Studinski } __packed;
85296c93589SGidon Studinski 
85396c93589SGidon Studinski struct wmi_rx_status_ring_add_cmd {
85496c93589SGidon Studinski 	struct wmi_edma_ring_cfg ring_cfg;
85596c93589SGidon Studinski 	u8 irq_index;
85696c93589SGidon Studinski 	/* wmi_rx_msg_type */
85796c93589SGidon Studinski 	u8 rx_msg_type;
85896c93589SGidon Studinski 	u8 reserved[2];
85996c93589SGidon Studinski } __packed;
86096c93589SGidon Studinski 
86196c93589SGidon Studinski struct wmi_cfg_def_rx_offload_cmd {
86296c93589SGidon Studinski 	__le16 max_msdu_size;
86396c93589SGidon Studinski 	__le16 max_rx_pl_per_desc;
86496c93589SGidon Studinski 	u8 decap_trans_type;
86596c93589SGidon Studinski 	u8 l2_802_3_offload_ctrl;
86696c93589SGidon Studinski 	u8 l2_nwifi_offload_ctrl;
86796c93589SGidon Studinski 	u8 vlan_id;
86896c93589SGidon Studinski 	u8 nwifi_ds_trans_type;
86996c93589SGidon Studinski 	u8 l3_l4_ctrl;
87096c93589SGidon Studinski 	u8 reserved[6];
87196c93589SGidon Studinski } __packed;
87296c93589SGidon Studinski 
87396c93589SGidon Studinski struct wmi_tx_desc_ring_add_cmd {
87496c93589SGidon Studinski 	struct wmi_edma_ring_cfg ring_cfg;
87596c93589SGidon Studinski 	__le16 max_msdu_size;
87696c93589SGidon Studinski 	/* Correlated status ring (0-63) */
87796c93589SGidon Studinski 	u8 status_ring_id;
87896c93589SGidon Studinski 	u8 cid;
87996c93589SGidon Studinski 	u8 tid;
88096c93589SGidon Studinski 	u8 encap_trans_type;
88196c93589SGidon Studinski 	u8 mac_ctrl;
88296c93589SGidon Studinski 	u8 to_resolution;
88396c93589SGidon Studinski 	u8 agg_max_wsize;
88496c93589SGidon Studinski 	u8 reserved[3];
88596c93589SGidon Studinski 	struct wmi_vring_cfg_schd schd_params;
88696c93589SGidon Studinski } __packed;
88796c93589SGidon Studinski 
88896c93589SGidon Studinski struct wmi_rx_desc_ring_add_cmd {
88996c93589SGidon Studinski 	struct wmi_edma_ring_cfg ring_cfg;
89096c93589SGidon Studinski 	u8 irq_index;
89196c93589SGidon Studinski 	/* 0-63 status rings */
89296c93589SGidon Studinski 	u8 status_ring_id;
89396c93589SGidon Studinski 	u8 reserved[2];
89496c93589SGidon Studinski 	__le64 sw_tail_host_addr;
89596c93589SGidon Studinski } __packed;
89696c93589SGidon Studinski 
89796c93589SGidon Studinski struct wmi_bcast_desc_ring_add_cmd {
89896c93589SGidon Studinski 	struct wmi_edma_ring_cfg ring_cfg;
89996c93589SGidon Studinski 	__le16 max_msdu_size;
90096c93589SGidon Studinski 	/* Correlated status ring (0-63) */
90196c93589SGidon Studinski 	u8 status_ring_id;
90296c93589SGidon Studinski 	u8 encap_trans_type;
90396c93589SGidon Studinski 	u8 reserved[4];
90496c93589SGidon Studinski } __packed;
90596c93589SGidon Studinski 
906*b5aeff16SDedy Lansky /* WMI_LO_POWER_CALIB_FROM_OTP_CMDID */
907*b5aeff16SDedy Lansky struct wmi_lo_power_calib_from_otp_cmd {
908*b5aeff16SDedy Lansky 	/* index to read from OTP. zero based */
909*b5aeff16SDedy Lansky 	u8 index;
910*b5aeff16SDedy Lansky 	u8 reserved[3];
911*b5aeff16SDedy Lansky } __packed;
912*b5aeff16SDedy Lansky 
913*b5aeff16SDedy Lansky /* WMI_LO_POWER_CALIB_FROM_OTP_EVENTID */
914*b5aeff16SDedy Lansky struct wmi_lo_power_calib_from_otp_event {
915*b5aeff16SDedy Lansky 	/* wmi_fw_status */
916*b5aeff16SDedy Lansky 	u8 status;
917*b5aeff16SDedy Lansky 	u8 reserved[3];
918*b5aeff16SDedy Lansky } __packed;
919*b5aeff16SDedy Lansky 
92096c93589SGidon Studinski /* WMI_RING_BA_EN_CMDID */
92196c93589SGidon Studinski struct wmi_ring_ba_en_cmd {
92296c93589SGidon Studinski 	u8 ring_id;
9232be7d22fSVladimir Kondratiev 	u8 agg_max_wsize;
9242be7d22fSVladimir Kondratiev 	__le16 ba_timeout;
925cbcf5866SVladimir Kondratiev 	u8 amsdu;
926b874ddecSLior David 	u8 reserved[3];
9272be7d22fSVladimir Kondratiev } __packed;
9282be7d22fSVladimir Kondratiev 
92996c93589SGidon Studinski /* WMI_RING_BA_DIS_CMDID */
93096c93589SGidon Studinski struct wmi_ring_ba_dis_cmd {
93196c93589SGidon Studinski 	u8 ring_id;
9322be7d22fSVladimir Kondratiev 	u8 reserved;
9332be7d22fSVladimir Kondratiev 	__le16 reason;
9342be7d22fSVladimir Kondratiev } __packed;
9352be7d22fSVladimir Kondratiev 
936b874ddecSLior David /* WMI_NOTIFY_REQ_CMDID */
9372be7d22fSVladimir Kondratiev struct wmi_notify_req_cmd {
9382be7d22fSVladimir Kondratiev 	u8 cid;
939b8023177SVladimir Kondratiev 	u8 year;
940b8023177SVladimir Kondratiev 	u8 month;
941b8023177SVladimir Kondratiev 	u8 day;
9422be7d22fSVladimir Kondratiev 	__le32 interval_usec;
943b8023177SVladimir Kondratiev 	u8 hour;
944b8023177SVladimir Kondratiev 	u8 minute;
945b8023177SVladimir Kondratiev 	u8 second;
946b8023177SVladimir Kondratiev 	u8 miliseconds;
9472be7d22fSVladimir Kondratiev } __packed;
9482be7d22fSVladimir Kondratiev 
949b874ddecSLior David /* WMI_CFG_RX_CHAIN_CMDID */
9502be7d22fSVladimir Kondratiev enum wmi_sniffer_cfg_mode {
951b874ddecSLior David 	WMI_SNIFFER_OFF	= 0x00,
952b874ddecSLior David 	WMI_SNIFFER_ON	= 0x01,
9532be7d22fSVladimir Kondratiev };
9542be7d22fSVladimir Kondratiev 
955761f8e4dSLazar Alexei /* WMI_SILENT_RSSI_TABLE */
956761f8e4dSLazar Alexei enum wmi_silent_rssi_table {
957761f8e4dSLazar Alexei 	RF_TEMPERATURE_CALIB_DEFAULT_DB		= 0x00,
958761f8e4dSLazar Alexei 	RF_TEMPERATURE_CALIB_HIGH_POWER_DB	= 0x01,
959761f8e4dSLazar Alexei };
960761f8e4dSLazar Alexei 
961761f8e4dSLazar Alexei /* WMI_SILENT_RSSI_STATUS */
962761f8e4dSLazar Alexei enum wmi_silent_rssi_status {
963761f8e4dSLazar Alexei 	SILENT_RSSI_SUCCESS	= 0x00,
964761f8e4dSLazar Alexei 	SILENT_RSSI_FAILURE	= 0x01,
965761f8e4dSLazar Alexei };
966761f8e4dSLazar Alexei 
967761f8e4dSLazar Alexei /* WMI_SET_ACTIVE_SILENT_RSSI_TABLE_CMDID */
968761f8e4dSLazar Alexei struct wmi_set_active_silent_rssi_table_cmd {
969761f8e4dSLazar Alexei 	/* enum wmi_silent_rssi_table */
970761f8e4dSLazar Alexei 	__le32 table;
971761f8e4dSLazar Alexei } __packed;
972761f8e4dSLazar Alexei 
9732be7d22fSVladimir Kondratiev enum wmi_sniffer_cfg_phy_info_mode {
974b874ddecSLior David 	WMI_SNIFFER_PHY_INFO_DISABLED	= 0x00,
975b874ddecSLior David 	WMI_SNIFFER_PHY_INFO_ENABLED	= 0x01,
9762be7d22fSVladimir Kondratiev };
9772be7d22fSVladimir Kondratiev 
9782be7d22fSVladimir Kondratiev enum wmi_sniffer_cfg_phy_support {
979b874ddecSLior David 	WMI_SNIFFER_CP		= 0x00,
980b874ddecSLior David 	WMI_SNIFFER_DP		= 0x01,
981b874ddecSLior David 	WMI_SNIFFER_BOTH_PHYS	= 0x02,
9822be7d22fSVladimir Kondratiev };
9832be7d22fSVladimir Kondratiev 
984b874ddecSLior David /* wmi_sniffer_cfg */
9852be7d22fSVladimir Kondratiev struct wmi_sniffer_cfg {
986b874ddecSLior David 	/* enum wmi_sniffer_cfg_mode */
987b874ddecSLior David 	__le32 mode;
988b874ddecSLior David 	/* enum wmi_sniffer_cfg_phy_info_mode */
989b874ddecSLior David 	__le32 phy_info_mode;
990b874ddecSLior David 	/* enum wmi_sniffer_cfg_phy_support */
991b874ddecSLior David 	__le32 phy_support;
9922be7d22fSVladimir Kondratiev 	u8 channel;
9932be7d22fSVladimir Kondratiev 	u8 reserved[3];
9942be7d22fSVladimir Kondratiev } __packed;
9952be7d22fSVladimir Kondratiev 
9962be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_action {
997b874ddecSLior David 	WMI_RX_CHAIN_ADD	= 0x00,
998b874ddecSLior David 	WMI_RX_CHAIN_DEL	= 0x01,
9992be7d22fSVladimir Kondratiev };
10002be7d22fSVladimir Kondratiev 
10012be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_decap_trans_type {
1002b874ddecSLior David 	WMI_DECAP_TYPE_802_3		= 0x00,
1003b874ddecSLior David 	WMI_DECAP_TYPE_NATIVE_WIFI	= 0x01,
1004b874ddecSLior David 	WMI_DECAP_TYPE_NONE		= 0x02,
10052be7d22fSVladimir Kondratiev };
10062be7d22fSVladimir Kondratiev 
10072be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_nwifi_ds_trans_type {
1008b874ddecSLior David 	WMI_NWIFI_RX_TRANS_MODE_NO		= 0x00,
1009b874ddecSLior David 	WMI_NWIFI_RX_TRANS_MODE_PBSS2AP		= 0x01,
1010b874ddecSLior David 	WMI_NWIFI_RX_TRANS_MODE_PBSS2STA	= 0x02,
10112be7d22fSVladimir Kondratiev };
10122be7d22fSVladimir Kondratiev 
1013b8023177SVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_reorder_type {
1014b874ddecSLior David 	WMI_RX_HW_REORDER	= 0x00,
1015b874ddecSLior David 	WMI_RX_SW_REORDER	= 0x01,
1016b8023177SVladimir Kondratiev };
1017b8023177SVladimir Kondratiev 
10182be7d22fSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_POS	(0)
10192be7d22fSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_LEN	(1)
10202be7d22fSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_MSK	(0x1)
1021c406ea7cSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_POS		(1)
1022c406ea7cSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_LEN		(1)
1023c406ea7cSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_MSK		(0x2)
10242be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_POS		(0)
10252be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_LEN		(1)
10262be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_MSK		(0x1)
10272be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_POS		(1)
10282be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_LEN		(1)
10292be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_MSK		(0x2)
10302be7d22fSVladimir Kondratiev #define L3_L4_CTRL_IPV4_CHECKSUM_EN_POS			(0)
10312be7d22fSVladimir Kondratiev #define L3_L4_CTRL_IPV4_CHECKSUM_EN_LEN			(1)
10322be7d22fSVladimir Kondratiev #define L3_L4_CTRL_IPV4_CHECKSUM_EN_MSK			(0x1)
10332be7d22fSVladimir Kondratiev #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_POS		(1)
10342be7d22fSVladimir Kondratiev #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_LEN		(1)
10352be7d22fSVladimir Kondratiev #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_MSK		(0x2)
10362be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_POS		(0)
10372be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_LEN		(1)
10382be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_MSK		(0x1)
10392be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_WB_THRSH_POS			(1)
10402be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_WB_THRSH_LEN			(1)
10412be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_WB_THRSH_MSK			(0x2)
10422be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_ITR_THRSH_POS		(2)
10432be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_ITR_THRSH_LEN		(1)
10442be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_ITR_THRSH_MSK		(0x4)
10452be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_HOST_THRSH_POS		(3)
10462be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_HOST_THRSH_LEN		(1)
10472be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_HOST_THRSH_MSK		(0x8)
10482be7d22fSVladimir Kondratiev 
1049b874ddecSLior David /* WMI_CFG_RX_CHAIN_CMDID */
1050b874ddecSLior David struct wmi_cfg_rx_chain_cmd {
1051b874ddecSLior David 	__le32 action;
1052b874ddecSLior David 	struct wmi_sw_ring_cfg rx_sw_ring;
1053b874ddecSLior David 	u8 mid;
1054b874ddecSLior David 	u8 decap_trans_type;
1055b874ddecSLior David 	u8 l2_802_3_offload_ctrl;
1056b874ddecSLior David 	u8 l2_nwifi_offload_ctrl;
1057b874ddecSLior David 	u8 vlan_id;
1058b874ddecSLior David 	u8 nwifi_ds_trans_type;
1059b874ddecSLior David 	u8 l3_l4_ctrl;
1060b874ddecSLior David 	u8 ring_ctrl;
10612be7d22fSVladimir Kondratiev 	__le16 prefetch_thrsh;
10622be7d22fSVladimir Kondratiev 	__le16 wb_thrsh;
10632be7d22fSVladimir Kondratiev 	__le32 itr_value;
10642be7d22fSVladimir Kondratiev 	__le16 host_thrsh;
1065b8023177SVladimir Kondratiev 	u8 reorder_type;
1066b8023177SVladimir Kondratiev 	u8 reserved;
10672be7d22fSVladimir Kondratiev 	struct wmi_sniffer_cfg sniffer_cfg;
1068b874ddecSLior David 	__le16 max_rx_pl_per_desc;
10692be7d22fSVladimir Kondratiev } __packed;
10702be7d22fSVladimir Kondratiev 
1071b874ddecSLior David /* WMI_RCP_ADDBA_RESP_CMDID */
10722be7d22fSVladimir Kondratiev struct wmi_rcp_addba_resp_cmd {
10738a4fa214SAhmad Masri 	/* Used for cid less than 8. For higher cid set
10748a4fa214SAhmad Masri 	 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
10758a4fa214SAhmad Masri 	 */
10762be7d22fSVladimir Kondratiev 	u8 cidxtid;
10772be7d22fSVladimir Kondratiev 	u8 dialog_token;
10782be7d22fSVladimir Kondratiev 	__le16 status_code;
1079b874ddecSLior David 	/* ieee80211_ba_parameterset field to send */
1080b874ddecSLior David 	__le16 ba_param_set;
10812be7d22fSVladimir Kondratiev 	__le16 ba_timeout;
10828a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
10838a4fa214SAhmad Masri 	u8 cid;
10848a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
10858a4fa214SAhmad Masri 	u8 tid;
10868a4fa214SAhmad Masri 	u8 reserved[2];
10872be7d22fSVladimir Kondratiev } __packed;
10882be7d22fSVladimir Kondratiev 
108996c93589SGidon Studinski /* WMI_RCP_ADDBA_RESP_EDMA_CMDID */
109096c93589SGidon Studinski struct wmi_rcp_addba_resp_edma_cmd {
109196c93589SGidon Studinski 	u8 cid;
109296c93589SGidon Studinski 	u8 tid;
109396c93589SGidon Studinski 	u8 dialog_token;
109496c93589SGidon Studinski 	u8 reserved;
109596c93589SGidon Studinski 	__le16 status_code;
109696c93589SGidon Studinski 	/* ieee80211_ba_parameterset field to send */
109796c93589SGidon Studinski 	__le16 ba_param_set;
109896c93589SGidon Studinski 	__le16 ba_timeout;
109996c93589SGidon Studinski 	u8 status_ring_id;
110096c93589SGidon Studinski 	/* wmi_cfg_rx_chain_cmd_reorder_type */
110196c93589SGidon Studinski 	u8 reorder_type;
110296c93589SGidon Studinski } __packed;
110396c93589SGidon Studinski 
1104b874ddecSLior David /* WMI_RCP_DELBA_CMDID */
11052be7d22fSVladimir Kondratiev struct wmi_rcp_delba_cmd {
11068a4fa214SAhmad Masri 	/* Used for cid less than 8. For higher cid set
11078a4fa214SAhmad Masri 	 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
11088a4fa214SAhmad Masri 	 */
11092be7d22fSVladimir Kondratiev 	u8 cidxtid;
11102be7d22fSVladimir Kondratiev 	u8 reserved;
11112be7d22fSVladimir Kondratiev 	__le16 reason;
11128a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
11138a4fa214SAhmad Masri 	u8 cid;
11148a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
11158a4fa214SAhmad Masri 	u8 tid;
11168a4fa214SAhmad Masri 	u8 reserved2[2];
11172be7d22fSVladimir Kondratiev } __packed;
11182be7d22fSVladimir Kondratiev 
1119b874ddecSLior David /* WMI_RCP_ADDBA_REQ_CMDID */
11202be7d22fSVladimir Kondratiev struct wmi_rcp_addba_req_cmd {
11218a4fa214SAhmad Masri 	/* Used for cid less than 8. For higher cid set
11228a4fa214SAhmad Masri 	 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
11238a4fa214SAhmad Masri 	 */
11242be7d22fSVladimir Kondratiev 	u8 cidxtid;
11252be7d22fSVladimir Kondratiev 	u8 dialog_token;
11262be7d22fSVladimir Kondratiev 	/* ieee80211_ba_parameterset field as it received */
11272be7d22fSVladimir Kondratiev 	__le16 ba_param_set;
11282be7d22fSVladimir Kondratiev 	__le16 ba_timeout;
11292be7d22fSVladimir Kondratiev 	/* ieee80211_ba_seqstrl field as it received */
11302be7d22fSVladimir Kondratiev 	__le16 ba_seq_ctrl;
11318a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
11328a4fa214SAhmad Masri 	u8 cid;
11338a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
11348a4fa214SAhmad Masri 	u8 tid;
11358a4fa214SAhmad Masri 	u8 reserved[2];
11362be7d22fSVladimir Kondratiev } __packed;
11372be7d22fSVladimir Kondratiev 
1138b874ddecSLior David /* WMI_SET_MAC_ADDRESS_CMDID */
11392be7d22fSVladimir Kondratiev struct wmi_set_mac_address_cmd {
11402be7d22fSVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
11412be7d22fSVladimir Kondratiev 	u8 reserved[2];
11422be7d22fSVladimir Kondratiev } __packed;
11432be7d22fSVladimir Kondratiev 
1144b874ddecSLior David /* WMI_ECHO_CMDID
11452be7d22fSVladimir Kondratiev  * Check FW is alive
11462be7d22fSVladimir Kondratiev  * Returned event: WMI_ECHO_RSP_EVENTID
11472be7d22fSVladimir Kondratiev  */
11482be7d22fSVladimir Kondratiev struct wmi_echo_cmd {
11492be7d22fSVladimir Kondratiev 	__le32 value;
11502be7d22fSVladimir Kondratiev } __packed;
11512be7d22fSVladimir Kondratiev 
11528a4fa214SAhmad Masri /* WMI_DEEP_ECHO_CMDID
11538a4fa214SAhmad Masri  * Check FW and ucode are alive
11548a4fa214SAhmad Masri  * Returned event: WMI_ECHO_RSP_EVENTID
11558a4fa214SAhmad Masri  */
11568a4fa214SAhmad Masri struct wmi_deep_echo_cmd {
11578a4fa214SAhmad Masri 	__le32 value;
11588a4fa214SAhmad Masri } __packed;
11598a4fa214SAhmad Masri 
1160761f8e4dSLazar Alexei /* WMI_RF_PWR_ON_DELAY_CMDID
1161761f8e4dSLazar Alexei  * set FW time parameters used through RF resetting
1162761f8e4dSLazar Alexei  *  RF reset consists of bringing its power down for a period of time, then
1163761f8e4dSLazar Alexei  * bringing the power up
1164761f8e4dSLazar Alexei  * Returned event: WMI_RF_PWR_ON_DELAY_RSP_EVENTID
1165761f8e4dSLazar Alexei  */
1166761f8e4dSLazar Alexei struct wmi_rf_pwr_on_delay_cmd {
1167761f8e4dSLazar Alexei 	/* time in usec the FW waits after bringing the RF PWR down,
1168761f8e4dSLazar Alexei 	 * set 0 for default
1169761f8e4dSLazar Alexei 	 */
1170761f8e4dSLazar Alexei 	__le16 down_delay_usec;
1171761f8e4dSLazar Alexei 	/* time in usec the FW waits after bringing the RF PWR up,
1172761f8e4dSLazar Alexei 	 * set 0 for default
1173761f8e4dSLazar Alexei 	 */
1174761f8e4dSLazar Alexei 	__le16 up_delay_usec;
1175b874ddecSLior David } __packed;
1176b874ddecSLior David 
11778a4fa214SAhmad Masri /* WMI_SET_HIGH_POWER_TABLE_PARAMS_CMDID
1178761f8e4dSLazar Alexei  * This API controls the Tx and Rx gain over temperature.
1179761f8e4dSLazar Alexei  * It controls the Tx D-type, Rx D-type and Rx E-type amplifiers.
1180761f8e4dSLazar Alexei  * It also controls the Tx gain index, by controlling the Rx to Tx gain index
1181761f8e4dSLazar Alexei  * offset.
1182761f8e4dSLazar Alexei  * The control is divided by 3 temperature values to 4 temperature ranges.
1183761f8e4dSLazar Alexei  * Each parameter uses its own temperature values.
1184761f8e4dSLazar Alexei  * Returned event: WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID
1185761f8e4dSLazar Alexei  */
1186761f8e4dSLazar Alexei struct wmi_set_high_power_table_params_cmd {
1187761f8e4dSLazar Alexei 	/* Temperature range for Tx D-type parameters */
1188761f8e4dSLazar Alexei 	u8 tx_dtype_temp[WMI_RF_DTYPE_LENGTH];
1189761f8e4dSLazar Alexei 	u8 reserved0;
1190761f8e4dSLazar Alexei 	/* Tx D-type values to be used for each temperature range */
11918a4fa214SAhmad Masri 	__le32 tx_dtype_conf[WMI_RF_DTYPE_CONF_LENGTH];
11928a4fa214SAhmad Masri 	/* Temperature range for Tx E-type parameters */
11938a4fa214SAhmad Masri 	u8 tx_etype_temp[WMI_RF_ETYPE_LENGTH];
11948a4fa214SAhmad Masri 	u8 reserved1;
11958a4fa214SAhmad Masri 	/* Tx E-type values to be used for each temperature range.
11968a4fa214SAhmad Masri 	 * The last 4 values of any range are the first 4 values of the next
11978a4fa214SAhmad Masri 	 * range and so on
11988a4fa214SAhmad Masri 	 */
11998a4fa214SAhmad Masri 	__le32 tx_etype_conf[WMI_RF_ETYPE_CONF_LENGTH];
1200761f8e4dSLazar Alexei 	/* Temperature range for Rx D-type parameters */
1201761f8e4dSLazar Alexei 	u8 rx_dtype_temp[WMI_RF_DTYPE_LENGTH];
12028a4fa214SAhmad Masri 	u8 reserved2;
1203761f8e4dSLazar Alexei 	/* Rx D-type values to be used for each temperature range */
12048a4fa214SAhmad Masri 	__le32 rx_dtype_conf[WMI_RF_DTYPE_CONF_LENGTH];
1205761f8e4dSLazar Alexei 	/* Temperature range for Rx E-type parameters */
1206761f8e4dSLazar Alexei 	u8 rx_etype_temp[WMI_RF_ETYPE_LENGTH];
12078a4fa214SAhmad Masri 	u8 reserved3;
1208761f8e4dSLazar Alexei 	/* Rx E-type values to be used for each temperature range.
1209761f8e4dSLazar Alexei 	 * The last 4 values of any range are the first 4 values of the next
1210761f8e4dSLazar Alexei 	 * range and so on
1211761f8e4dSLazar Alexei 	 */
12128a4fa214SAhmad Masri 	__le32 rx_etype_conf[WMI_RF_ETYPE_CONF_LENGTH];
1213761f8e4dSLazar Alexei 	/* Temperature range for rx_2_tx_offs parameters */
1214761f8e4dSLazar Alexei 	u8 rx_2_tx_temp[WMI_RF_RX2TX_LENGTH];
12158a4fa214SAhmad Masri 	u8 reserved4;
1216761f8e4dSLazar Alexei 	/* Rx to Tx gain index offset */
12178a4fa214SAhmad Masri 	s8 rx_2_tx_offs[WMI_RF_RX2TX_CONF_LENGTH];
12188a4fa214SAhmad Masri } __packed;
12198a4fa214SAhmad Masri 
12208a4fa214SAhmad Masri /* WMI_FIXED_SCHEDULING_UL_CONFIG_CMDID
12218a4fa214SAhmad Masri  * This API sets rd parameter per mcs.
12228a4fa214SAhmad Masri  * Relevant only in Fixed Scheduling mode.
12238a4fa214SAhmad Masri  * Returned event: WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID
12248a4fa214SAhmad Masri  */
12258a4fa214SAhmad Masri struct wmi_fixed_scheduling_ul_config_cmd {
12268a4fa214SAhmad Masri 	/* Use mcs -1 to set for every mcs */
12278a4fa214SAhmad Masri 	s8 mcs;
12288a4fa214SAhmad Masri 	/* Number of frames with rd bit set in a single virtual slot */
12298a4fa214SAhmad Masri 	u8 rd_count_per_slot;
12308a4fa214SAhmad Masri 	u8 reserved[2];
1231761f8e4dSLazar Alexei } __packed;
1232761f8e4dSLazar Alexei 
1233761f8e4dSLazar Alexei /* CMD: WMI_RF_XPM_READ_CMDID */
1234761f8e4dSLazar Alexei struct wmi_rf_xpm_read_cmd {
1235761f8e4dSLazar Alexei 	u8 rf_id;
1236761f8e4dSLazar Alexei 	u8 reserved[3];
1237761f8e4dSLazar Alexei 	/* XPM bit start address in range [0,8191]bits - rounded by FW to
1238761f8e4dSLazar Alexei 	 * multiple of 8bits
1239761f8e4dSLazar Alexei 	 */
1240761f8e4dSLazar Alexei 	__le32 xpm_bit_address;
1241761f8e4dSLazar Alexei 	__le32 num_bytes;
1242761f8e4dSLazar Alexei } __packed;
1243761f8e4dSLazar Alexei 
1244761f8e4dSLazar Alexei /* CMD: WMI_RF_XPM_WRITE_CMDID */
1245761f8e4dSLazar Alexei struct wmi_rf_xpm_write_cmd {
1246761f8e4dSLazar Alexei 	u8 rf_id;
1247761f8e4dSLazar Alexei 	u8 reserved0[3];
1248761f8e4dSLazar Alexei 	/* XPM bit start address in range [0,8191]bits - rounded by FW to
1249761f8e4dSLazar Alexei 	 * multiple of 8bits
1250761f8e4dSLazar Alexei 	 */
1251761f8e4dSLazar Alexei 	__le32 xpm_bit_address;
1252761f8e4dSLazar Alexei 	__le32 num_bytes;
1253761f8e4dSLazar Alexei 	/* boolean flag indicating whether FW should verify the write
1254761f8e4dSLazar Alexei 	 * operation
1255761f8e4dSLazar Alexei 	 */
1256761f8e4dSLazar Alexei 	u8 verify;
1257761f8e4dSLazar Alexei 	u8 reserved1[3];
1258761f8e4dSLazar Alexei 	/* actual size=num_bytes */
1259761f8e4dSLazar Alexei 	u8 data_bytes[0];
1260b874ddecSLior David } __packed;
1261b874ddecSLior David 
1262b874ddecSLior David /* WMI_TEMP_SENSE_CMDID
1263b8023177SVladimir Kondratiev  *
1264b8023177SVladimir Kondratiev  * Measure MAC and radio temperatures
1265b874ddecSLior David  *
1266b874ddecSLior David  * Possible modes for temperature measurement
1267b8023177SVladimir Kondratiev  */
12688c679675SVladimir Kondratiev enum wmi_temperature_measure_mode {
1269b874ddecSLior David 	TEMPERATURE_USE_OLD_VALUE	= 0x01,
1270b874ddecSLior David 	TEMPERATURE_MEASURE_NOW		= 0x02,
12718c679675SVladimir Kondratiev };
12728c679675SVladimir Kondratiev 
1273b874ddecSLior David /* WMI_TEMP_SENSE_CMDID */
1274b8023177SVladimir Kondratiev struct wmi_temp_sense_cmd {
12758c679675SVladimir Kondratiev 	__le32 measure_baseband_en;
12768c679675SVladimir Kondratiev 	__le32 measure_rf_en;
12778c679675SVladimir Kondratiev 	__le32 measure_mode;
1278b8023177SVladimir Kondratiev } __packed;
1279b8023177SVladimir Kondratiev 
1280b874ddecSLior David enum wmi_pmc_op {
1281b874ddecSLior David 	WMI_PMC_ALLOCATE	= 0x00,
1282b874ddecSLior David 	WMI_PMC_RELEASE		= 0x01,
1283dc16427bSVladimir Kondratiev };
1284dc16427bSVladimir Kondratiev 
1285b874ddecSLior David /* WMI_PMC_CMDID */
1286dc16427bSVladimir Kondratiev struct wmi_pmc_cmd {
1287b874ddecSLior David 	/* enum wmi_pmc_cmd_op_type */
1288b874ddecSLior David 	u8 op;
1289dc16427bSVladimir Kondratiev 	u8 reserved;
1290dc16427bSVladimir Kondratiev 	__le16 ring_size;
1291dc16427bSVladimir Kondratiev 	__le64 mem_base;
1292dc16427bSVladimir Kondratiev } __packed;
1293dc16427bSVladimir Kondratiev 
129408989f96SLior David enum wmi_aoa_meas_type {
129508989f96SLior David 	WMI_AOA_PHASE_MEAS	= 0x00,
129608989f96SLior David 	WMI_AOA_PHASE_AMP_MEAS	= 0x01,
129708989f96SLior David };
129808989f96SLior David 
129908989f96SLior David /* WMI_AOA_MEAS_CMDID */
130008989f96SLior David struct wmi_aoa_meas_cmd {
130108989f96SLior David 	u8 mac_addr[WMI_MAC_LEN];
130208989f96SLior David 	/* channels IDs:
130308989f96SLior David 	 * 0 - 58320 MHz
130408989f96SLior David 	 * 1 - 60480 MHz
130508989f96SLior David 	 * 2 - 62640 MHz
130608989f96SLior David 	 */
130708989f96SLior David 	u8 channel;
130808989f96SLior David 	/* enum wmi_aoa_meas_type */
130908989f96SLior David 	u8 aoa_meas_type;
131008989f96SLior David 	__le32 meas_rf_mask;
131108989f96SLior David } __packed;
131208989f96SLior David 
1313cbf795c1SLior David /* WMI_SET_MGMT_RETRY_LIMIT_CMDID */
1314cbf795c1SLior David struct wmi_set_mgmt_retry_limit_cmd {
1315cbf795c1SLior David 	/* MAC retransmit limit for mgmt frames */
1316cbf795c1SLior David 	u8 mgmt_retry_limit;
1317cbf795c1SLior David 	/* alignment to 32b */
1318cbf795c1SLior David 	u8 reserved[3];
1319cbf795c1SLior David } __packed;
1320cbf795c1SLior David 
132190ffabb0SDedy Lansky /* Zones: HIGH, MAX, CRITICAL */
132290ffabb0SDedy Lansky #define WMI_NUM_OF_TT_ZONES	(3)
132390ffabb0SDedy Lansky 
132490ffabb0SDedy Lansky struct wmi_tt_zone_limits {
132590ffabb0SDedy Lansky 	/* Above this temperature this zone is active */
132690ffabb0SDedy Lansky 	u8 temperature_high;
132790ffabb0SDedy Lansky 	/* Below this temperature the adjacent lower zone is active */
132890ffabb0SDedy Lansky 	u8 temperature_low;
132990ffabb0SDedy Lansky 	u8 reserved[2];
133090ffabb0SDedy Lansky } __packed;
133190ffabb0SDedy Lansky 
133290ffabb0SDedy Lansky /* Struct used for both configuration and status commands of thermal
133390ffabb0SDedy Lansky  * throttling
133490ffabb0SDedy Lansky  */
133590ffabb0SDedy Lansky struct wmi_tt_data {
133690ffabb0SDedy Lansky 	/* Enable/Disable TT algorithm for baseband */
133790ffabb0SDedy Lansky 	u8 bb_enabled;
133890ffabb0SDedy Lansky 	u8 reserved0[3];
133990ffabb0SDedy Lansky 	/* Define zones for baseband */
134090ffabb0SDedy Lansky 	struct wmi_tt_zone_limits bb_zones[WMI_NUM_OF_TT_ZONES];
134190ffabb0SDedy Lansky 	/* Enable/Disable TT algorithm for radio */
134290ffabb0SDedy Lansky 	u8 rf_enabled;
134390ffabb0SDedy Lansky 	u8 reserved1[3];
134490ffabb0SDedy Lansky 	/* Define zones for all radio chips */
134590ffabb0SDedy Lansky 	struct wmi_tt_zone_limits rf_zones[WMI_NUM_OF_TT_ZONES];
134690ffabb0SDedy Lansky } __packed;
134790ffabb0SDedy Lansky 
134890ffabb0SDedy Lansky /* WMI_SET_THERMAL_THROTTLING_CFG_CMDID */
134990ffabb0SDedy Lansky struct wmi_set_thermal_throttling_cfg_cmd {
135090ffabb0SDedy Lansky 	/* Command data */
135190ffabb0SDedy Lansky 	struct wmi_tt_data tt_data;
135290ffabb0SDedy Lansky } __packed;
135390ffabb0SDedy Lansky 
1354849a564bSDedy Lansky /* WMI_NEW_STA_CMDID */
1355849a564bSDedy Lansky struct wmi_new_sta_cmd {
1356849a564bSDedy Lansky 	u8 dst_mac[WMI_MAC_LEN];
1357849a564bSDedy Lansky 	u8 aid;
1358849a564bSDedy Lansky } __packed;
1359849a564bSDedy Lansky 
1360849a564bSDedy Lansky /* WMI_DEL_STA_CMDID */
1361849a564bSDedy Lansky struct wmi_del_sta_cmd {
1362849a564bSDedy Lansky 	u8 dst_mac[WMI_MAC_LEN];
1363849a564bSDedy Lansky 	__le16 disconnect_reason;
1364849a564bSDedy Lansky } __packed;
1365849a564bSDedy Lansky 
136608989f96SLior David enum wmi_tof_burst_duration {
136708989f96SLior David 	WMI_TOF_BURST_DURATION_250_USEC		= 2,
136808989f96SLior David 	WMI_TOF_BURST_DURATION_500_USEC		= 3,
136908989f96SLior David 	WMI_TOF_BURST_DURATION_1_MSEC		= 4,
137008989f96SLior David 	WMI_TOF_BURST_DURATION_2_MSEC		= 5,
137108989f96SLior David 	WMI_TOF_BURST_DURATION_4_MSEC		= 6,
137208989f96SLior David 	WMI_TOF_BURST_DURATION_8_MSEC		= 7,
137308989f96SLior David 	WMI_TOF_BURST_DURATION_16_MSEC		= 8,
137408989f96SLior David 	WMI_TOF_BURST_DURATION_32_MSEC		= 9,
137508989f96SLior David 	WMI_TOF_BURST_DURATION_64_MSEC		= 10,
137608989f96SLior David 	WMI_TOF_BURST_DURATION_128_MSEC		= 11,
137708989f96SLior David 	WMI_TOF_BURST_DURATION_NO_PREFERENCES	= 15,
137808989f96SLior David };
137908989f96SLior David 
138008989f96SLior David enum wmi_tof_session_start_flags {
138108989f96SLior David 	WMI_TOF_SESSION_START_FLAG_SECURED	= 0x1,
138208989f96SLior David 	WMI_TOF_SESSION_START_FLAG_ASAP		= 0x2,
138308989f96SLior David 	WMI_TOF_SESSION_START_FLAG_LCI_REQ	= 0x4,
138408989f96SLior David 	WMI_TOF_SESSION_START_FLAG_LCR_REQ	= 0x8,
138508989f96SLior David };
138608989f96SLior David 
138708989f96SLior David /* WMI_TOF_SESSION_START_CMDID */
138808989f96SLior David struct wmi_ftm_dest_info {
138908989f96SLior David 	u8 channel;
139008989f96SLior David 	/* wmi_tof_session_start_flags_e */
139108989f96SLior David 	u8 flags;
139208989f96SLior David 	u8 initial_token;
139308989f96SLior David 	u8 num_of_ftm_per_burst;
139408989f96SLior David 	u8 num_of_bursts_exp;
139508989f96SLior David 	/* wmi_tof_burst_duration_e */
139608989f96SLior David 	u8 burst_duration;
139708989f96SLior David 	/* Burst Period indicate interval between two consecutive burst
139808989f96SLior David 	 * instances, in units of 100 ms
139908989f96SLior David 	 */
140008989f96SLior David 	__le16 burst_period;
140108989f96SLior David 	u8 dst_mac[WMI_MAC_LEN];
1402761f8e4dSLazar Alexei 	u8 reserved;
1403761f8e4dSLazar Alexei 	u8 num_burst_per_aoa_meas;
140408989f96SLior David } __packed;
140508989f96SLior David 
140608989f96SLior David /* WMI_TOF_SESSION_START_CMDID */
140708989f96SLior David struct wmi_tof_session_start_cmd {
140808989f96SLior David 	__le32 session_id;
1409761f8e4dSLazar Alexei 	u8 reserved1;
141008989f96SLior David 	u8 aoa_type;
141108989f96SLior David 	__le16 num_of_dest;
141208989f96SLior David 	u8 reserved[4];
141308989f96SLior David 	struct wmi_ftm_dest_info ftm_dest_info[0];
141408989f96SLior David } __packed;
141508989f96SLior David 
1416761f8e4dSLazar Alexei /* WMI_TOF_CFG_RESPONDER_CMDID */
1417761f8e4dSLazar Alexei struct wmi_tof_cfg_responder_cmd {
1418761f8e4dSLazar Alexei 	u8 enable;
1419761f8e4dSLazar Alexei 	u8 reserved[3];
1420761f8e4dSLazar Alexei } __packed;
1421761f8e4dSLazar Alexei 
142208989f96SLior David enum wmi_tof_channel_info_report_type {
142308989f96SLior David 	WMI_TOF_CHANNEL_INFO_TYPE_CIR			= 0x1,
142408989f96SLior David 	WMI_TOF_CHANNEL_INFO_TYPE_RSSI			= 0x2,
142508989f96SLior David 	WMI_TOF_CHANNEL_INFO_TYPE_SNR			= 0x4,
142608989f96SLior David 	WMI_TOF_CHANNEL_INFO_TYPE_DEBUG_DATA		= 0x8,
142708989f96SLior David 	WMI_TOF_CHANNEL_INFO_TYPE_VENDOR_SPECIFIC	= 0x10,
142808989f96SLior David };
142908989f96SLior David 
143008989f96SLior David /* WMI_TOF_CHANNEL_INFO_CMDID */
143108989f96SLior David struct wmi_tof_channel_info_cmd {
143208989f96SLior David 	/* wmi_tof_channel_info_report_type_e */
143308989f96SLior David 	__le32 channel_info_report_request;
143408989f96SLior David } __packed;
143508989f96SLior David 
14368ae5d62cSLior David /* WMI_TOF_SET_TX_RX_OFFSET_CMDID */
14378ae5d62cSLior David struct wmi_tof_set_tx_rx_offset_cmd {
14388ae5d62cSLior David 	/* TX delay offset */
14398ae5d62cSLior David 	__le32 tx_offset;
14408ae5d62cSLior David 	/* RX delay offset */
14418ae5d62cSLior David 	__le32 rx_offset;
1442761f8e4dSLazar Alexei 	/* Mask to define which RFs to configure. 0 means all RFs */
1443761f8e4dSLazar Alexei 	__le32 rf_mask;
1444761f8e4dSLazar Alexei 	/* Offset to strongest tap of CIR */
1445761f8e4dSLazar Alexei 	__le32 precursor;
1446761f8e4dSLazar Alexei } __packed;
1447761f8e4dSLazar Alexei 
1448761f8e4dSLazar Alexei /* WMI_TOF_GET_TX_RX_OFFSET_CMDID */
1449761f8e4dSLazar Alexei struct wmi_tof_get_tx_rx_offset_cmd {
1450761f8e4dSLazar Alexei 	/* rf index to read offsets from */
1451761f8e4dSLazar Alexei 	u8 rf_index;
1452761f8e4dSLazar Alexei 	u8 reserved[3];
1453761f8e4dSLazar Alexei } __packed;
1454761f8e4dSLazar Alexei 
1455761f8e4dSLazar Alexei /* WMI_FIXED_SCHEDULING_CONFIG_CMDID */
1456761f8e4dSLazar Alexei struct wmi_map_mcs_to_schd_params {
1457761f8e4dSLazar Alexei 	u8 mcs;
1458761f8e4dSLazar Alexei 	/* time in usec from start slot to start tx flow - default 15 */
1459761f8e4dSLazar Alexei 	u8 time_in_usec_before_initiate_tx;
1460761f8e4dSLazar Alexei 	/* RD enable - if yes consider RD according to STA mcs */
1461761f8e4dSLazar Alexei 	u8 rd_enabled;
1462761f8e4dSLazar Alexei 	u8 reserved;
1463761f8e4dSLazar Alexei 	/* time in usec from start slot to stop vring */
1464761f8e4dSLazar Alexei 	__le16 time_in_usec_to_stop_vring;
1465761f8e4dSLazar Alexei 	/* timeout to force flush from start of slot */
1466761f8e4dSLazar Alexei 	__le16 flush_to_in_usec;
1467761f8e4dSLazar Alexei 	/* per mcs the mac buffer limit size in bytes */
1468761f8e4dSLazar Alexei 	__le32 mac_buff_size_in_bytes;
1469761f8e4dSLazar Alexei } __packed;
1470761f8e4dSLazar Alexei 
1471761f8e4dSLazar Alexei /* WMI_FIXED_SCHEDULING_CONFIG_COMPLETE_EVENTID */
1472761f8e4dSLazar Alexei struct wmi_fixed_scheduling_config_complete_event {
1473761f8e4dSLazar Alexei 	/* wmi_fw_status */
1474761f8e4dSLazar Alexei 	u8 status;
1475761f8e4dSLazar Alexei 	u8 reserved[3];
1476761f8e4dSLazar Alexei } __packed;
1477761f8e4dSLazar Alexei 
1478*b5aeff16SDedy Lansky /* This value exists for backwards compatibility only.
1479*b5aeff16SDedy Lansky  * Do not use it in new commands.
1480*b5aeff16SDedy Lansky  * Use dynamic arrays where possible.
1481*b5aeff16SDedy Lansky  */
1482761f8e4dSLazar Alexei #define WMI_NUM_MCS	(13)
1483761f8e4dSLazar Alexei 
1484761f8e4dSLazar Alexei /* WMI_FIXED_SCHEDULING_CONFIG_CMDID */
1485761f8e4dSLazar Alexei struct wmi_fixed_scheduling_config_cmd {
1486761f8e4dSLazar Alexei 	/* defaults in the SAS table */
1487761f8e4dSLazar Alexei 	struct wmi_map_mcs_to_schd_params mcs_to_schd_params_map[WMI_NUM_MCS];
1488761f8e4dSLazar Alexei 	/* default 150 uSec */
1489761f8e4dSLazar Alexei 	__le16 max_sta_rd_ppdu_duration_in_usec;
1490761f8e4dSLazar Alexei 	/* default 300 uSec */
1491761f8e4dSLazar Alexei 	__le16 max_sta_grant_ppdu_duration_in_usec;
1492761f8e4dSLazar Alexei 	/* default 1000 uSec */
1493761f8e4dSLazar Alexei 	__le16 assoc_slot_duration_in_usec;
1494761f8e4dSLazar Alexei 	/* default 360 uSec */
1495761f8e4dSLazar Alexei 	__le16 virtual_slot_duration_in_usec;
1496761f8e4dSLazar Alexei 	/* each this field value slots start with grant frame to the station
1497761f8e4dSLazar Alexei 	 * - default 2
1498761f8e4dSLazar Alexei 	 */
1499761f8e4dSLazar Alexei 	u8 number_of_ap_slots_for_initiate_grant;
1500761f8e4dSLazar Alexei 	u8 reserved[3];
1501761f8e4dSLazar Alexei } __packed;
1502761f8e4dSLazar Alexei 
1503761f8e4dSLazar Alexei /* WMI_ENABLE_FIXED_SCHEDULING_CMDID */
1504761f8e4dSLazar Alexei struct wmi_enable_fixed_scheduling_cmd {
1505761f8e4dSLazar Alexei 	__le32 reserved;
1506761f8e4dSLazar Alexei } __packed;
1507761f8e4dSLazar Alexei 
1508761f8e4dSLazar Alexei /* WMI_ENABLE_FIXED_SCHEDULING_COMPLETE_EVENTID */
1509761f8e4dSLazar Alexei struct wmi_enable_fixed_scheduling_complete_event {
1510761f8e4dSLazar Alexei 	/* wmi_fw_status */
1511761f8e4dSLazar Alexei 	u8 status;
1512761f8e4dSLazar Alexei 	u8 reserved[3];
1513761f8e4dSLazar Alexei } __packed;
1514761f8e4dSLazar Alexei 
1515761f8e4dSLazar Alexei /* WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_CMDID */
1516761f8e4dSLazar Alexei struct wmi_set_multi_directed_omnis_config_cmd {
1517761f8e4dSLazar Alexei 	/* number of directed omnis at destination AP */
1518761f8e4dSLazar Alexei 	u8 dest_ap_num_directed_omnis;
1519761f8e4dSLazar Alexei 	u8 reserved[3];
1520761f8e4dSLazar Alexei } __packed;
1521761f8e4dSLazar Alexei 
1522761f8e4dSLazar Alexei /* WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_EVENTID */
1523761f8e4dSLazar Alexei struct wmi_set_multi_directed_omnis_config_event {
1524761f8e4dSLazar Alexei 	/* wmi_fw_status */
1525761f8e4dSLazar Alexei 	u8 status;
1526761f8e4dSLazar Alexei 	u8 reserved[3];
1527761f8e4dSLazar Alexei } __packed;
1528761f8e4dSLazar Alexei 
1529761f8e4dSLazar Alexei /* WMI_SET_LONG_RANGE_CONFIG_CMDID */
1530761f8e4dSLazar Alexei struct wmi_set_long_range_config_cmd {
1531761f8e4dSLazar Alexei 	__le32 reserved;
1532761f8e4dSLazar Alexei } __packed;
1533761f8e4dSLazar Alexei 
1534761f8e4dSLazar Alexei /* WMI_SET_LONG_RANGE_CONFIG_COMPLETE_EVENTID */
1535761f8e4dSLazar Alexei struct wmi_set_long_range_config_complete_event {
1536761f8e4dSLazar Alexei 	/* wmi_fw_status */
1537761f8e4dSLazar Alexei 	u8 status;
1538761f8e4dSLazar Alexei 	u8 reserved[3];
15398ae5d62cSLior David } __packed;
15408ae5d62cSLior David 
1541*b5aeff16SDedy Lansky /* payload max size is 1024 bytes: max event buffer size (1044) - WMI headers
15428a4fa214SAhmad Masri  * (16) - prev struct field size (4)
15438a4fa214SAhmad Masri  */
1544*b5aeff16SDedy Lansky #define WMI_MAX_IOCTL_PAYLOAD_SIZE		(1024)
1545*b5aeff16SDedy Lansky #define WMI_MAX_IOCTL_REPLY_PAYLOAD_SIZE	(1024)
1546*b5aeff16SDedy Lansky #define WMI_MAX_INTERNAL_EVENT_PAYLOAD_SIZE	(1024)
15478a4fa214SAhmad Masri 
15488a4fa214SAhmad Masri enum wmi_internal_fw_ioctl_code {
15498a4fa214SAhmad Masri 	WMI_INTERNAL_FW_CODE_NONE	= 0x0,
15508a4fa214SAhmad Masri 	WMI_INTERNAL_FW_CODE_QCOM	= 0x1,
15518a4fa214SAhmad Masri };
15528a4fa214SAhmad Masri 
15538a4fa214SAhmad Masri /* WMI_INTERNAL_FW_IOCTL_CMDID */
15548a4fa214SAhmad Masri struct wmi_internal_fw_ioctl_cmd {
15558a4fa214SAhmad Masri 	/* enum wmi_internal_fw_ioctl_code */
15568a4fa214SAhmad Masri 	__le16 code;
15578a4fa214SAhmad Masri 	__le16 length;
15588a4fa214SAhmad Masri 	/* payload max size is WMI_MAX_IOCTL_PAYLOAD_SIZE
15598a4fa214SAhmad Masri 	 * Must be the last member of the struct
15608a4fa214SAhmad Masri 	 */
15618a4fa214SAhmad Masri 	__le32 payload[0];
15628a4fa214SAhmad Masri } __packed;
15638a4fa214SAhmad Masri 
15648a4fa214SAhmad Masri /* WMI_INTERNAL_FW_IOCTL_EVENTID */
15658a4fa214SAhmad Masri struct wmi_internal_fw_ioctl_event {
15668a4fa214SAhmad Masri 	/* wmi_fw_status */
15678a4fa214SAhmad Masri 	u8 status;
15688a4fa214SAhmad Masri 	u8 reserved;
15698a4fa214SAhmad Masri 	__le16 length;
15708a4fa214SAhmad Masri 	/* payload max size is WMI_MAX_IOCTL_REPLY_PAYLOAD_SIZE
15718a4fa214SAhmad Masri 	 * Must be the last member of the struct
15728a4fa214SAhmad Masri 	 */
15738a4fa214SAhmad Masri 	__le32 payload[0];
15748a4fa214SAhmad Masri } __packed;
15758a4fa214SAhmad Masri 
15768a4fa214SAhmad Masri /* WMI_INTERNAL_FW_EVENT_EVENTID */
15778a4fa214SAhmad Masri struct wmi_internal_fw_event_event {
15788a4fa214SAhmad Masri 	__le16 id;
15798a4fa214SAhmad Masri 	__le16 length;
15808a4fa214SAhmad Masri 	/* payload max size is WMI_MAX_INTERNAL_EVENT_PAYLOAD_SIZE
15818a4fa214SAhmad Masri 	 * Must be the last member of the struct
15828a4fa214SAhmad Masri 	 */
15838a4fa214SAhmad Masri 	__le32 payload[0];
15848a4fa214SAhmad Masri } __packed;
15858a4fa214SAhmad Masri 
1586*b5aeff16SDedy Lansky /* WMI_SET_VRING_PRIORITY_WEIGHT_CMDID */
1587*b5aeff16SDedy Lansky struct wmi_set_vring_priority_weight_cmd {
1588*b5aeff16SDedy Lansky 	/* Array of weights. Valid values are
1589*b5aeff16SDedy Lansky 	 * WMI_QOS_MIN_DEFAULT_WEIGHT...WMI_QOS_MAX_WEIGHT. Weight #0 is
1590*b5aeff16SDedy Lansky 	 * hard-coded WMI_QOS_MIN_WEIGHT. This array provide the weights
1591*b5aeff16SDedy Lansky 	 * #1..#3
1592*b5aeff16SDedy Lansky 	 */
1593*b5aeff16SDedy Lansky 	u8 weight[3];
1594*b5aeff16SDedy Lansky 	u8 reserved;
1595*b5aeff16SDedy Lansky } __packed;
1596*b5aeff16SDedy Lansky 
1597*b5aeff16SDedy Lansky /* WMI_SET_VRING_PRIORITY_CMDID */
1598*b5aeff16SDedy Lansky struct wmi_vring_priority {
1599*b5aeff16SDedy Lansky 	u8 vring_idx;
1600*b5aeff16SDedy Lansky 	/* Weight index. Valid value is 0-3 */
1601*b5aeff16SDedy Lansky 	u8 priority;
1602*b5aeff16SDedy Lansky 	u8 reserved[2];
1603*b5aeff16SDedy Lansky } __packed;
1604*b5aeff16SDedy Lansky 
1605*b5aeff16SDedy Lansky /* WMI_SET_VRING_PRIORITY_CMDID */
1606*b5aeff16SDedy Lansky struct wmi_set_vring_priority_cmd {
1607*b5aeff16SDedy Lansky 	/* number of entries in vring_priority. Set to
1608*b5aeff16SDedy Lansky 	 * WMI_QOS_SET_VIF_PRIORITY to update the VIF's priority, and there
1609*b5aeff16SDedy Lansky 	 * will be only one entry in vring_priority
1610*b5aeff16SDedy Lansky 	 */
1611*b5aeff16SDedy Lansky 	u8 num_of_vrings;
1612*b5aeff16SDedy Lansky 	u8 reserved[3];
1613*b5aeff16SDedy Lansky 	struct wmi_vring_priority vring_priority[0];
1614*b5aeff16SDedy Lansky } __packed;
1615*b5aeff16SDedy Lansky 
1616*b5aeff16SDedy Lansky /* WMI_BF_CONTROL_CMDID - deprecated */
16178a4fa214SAhmad Masri struct wmi_bf_control_cmd {
16188a4fa214SAhmad Masri 	/* wmi_bf_triggers */
16198a4fa214SAhmad Masri 	__le32 triggers;
16208a4fa214SAhmad Masri 	u8 cid;
16218a4fa214SAhmad Masri 	/* DISABLED = 0, ENABLED = 1 , DRY_RUN = 2 */
16228a4fa214SAhmad Masri 	u8 txss_mode;
16238a4fa214SAhmad Masri 	/* DISABLED = 0, ENABLED = 1, DRY_RUN = 2 */
16248a4fa214SAhmad Masri 	u8 brp_mode;
16258a4fa214SAhmad Masri 	/* Max cts threshold (correspond to
16268a4fa214SAhmad Masri 	 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP)
16278a4fa214SAhmad Masri 	 */
16288a4fa214SAhmad Masri 	u8 bf_trigger_max_cts_failure_thr;
16298a4fa214SAhmad Masri 	/* Max cts threshold in dense (correspond to
16308a4fa214SAhmad Masri 	 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP)
16318a4fa214SAhmad Masri 	 */
16328a4fa214SAhmad Masri 	u8 bf_trigger_max_cts_failure_dense_thr;
16338a4fa214SAhmad Masri 	/* Max b-ack threshold (correspond to
16348a4fa214SAhmad Masri 	 * WMI_BF_TRIGGER_MAX_BACK_FAILURE)
16358a4fa214SAhmad Masri 	 */
16368a4fa214SAhmad Masri 	u8 bf_trigger_max_back_failure_thr;
16378a4fa214SAhmad Masri 	/* Max b-ack threshold in dense (correspond to
16388a4fa214SAhmad Masri 	 * WMI_BF_TRIGGER_MAX_BACK_FAILURE)
16398a4fa214SAhmad Masri 	 */
16408a4fa214SAhmad Masri 	u8 bf_trigger_max_back_failure_dense_thr;
16418a4fa214SAhmad Masri 	u8 reserved0;
16428a4fa214SAhmad Masri 	/* Wrong sectors threshold */
16438a4fa214SAhmad Masri 	__le32 wrong_sector_bis_thr;
16448a4fa214SAhmad Masri 	/* BOOL to enable/disable long term trigger */
16458a4fa214SAhmad Masri 	u8 long_term_enable;
16468a4fa214SAhmad Masri 	/* 1 = Update long term thresholds from the long_term_mbps_th_tbl and
16478a4fa214SAhmad Masri 	 * long_term_trig_timeout_per_mcs arrays, 0 = Ignore
16488a4fa214SAhmad Masri 	 */
16498a4fa214SAhmad Masri 	u8 long_term_update_thr;
16508a4fa214SAhmad Masri 	/* Long term throughput threshold [Mbps] */
16518a4fa214SAhmad Masri 	u8 long_term_mbps_th_tbl[WMI_NUM_MCS];
16528a4fa214SAhmad Masri 	u8 reserved1;
16538a4fa214SAhmad Masri 	/* Long term timeout threshold table [msec] */
16548a4fa214SAhmad Masri 	__le16 long_term_trig_timeout_per_mcs[WMI_NUM_MCS];
16558a4fa214SAhmad Masri 	u8 reserved2[2];
16568a4fa214SAhmad Masri } __packed;
16578a4fa214SAhmad Masri 
1658*b5aeff16SDedy Lansky /* BF configuration for each MCS */
1659*b5aeff16SDedy Lansky struct wmi_bf_control_ex_mcs {
1660*b5aeff16SDedy Lansky 	/* Long term throughput threshold [Mbps] */
1661*b5aeff16SDedy Lansky 	u8 long_term_mbps_th_tbl;
1662*b5aeff16SDedy Lansky 	u8 reserved;
1663*b5aeff16SDedy Lansky 	/* Long term timeout threshold table [msec] */
1664*b5aeff16SDedy Lansky 	__le16 long_term_trig_timeout_per_mcs;
1665*b5aeff16SDedy Lansky } __packed;
1666*b5aeff16SDedy Lansky 
1667*b5aeff16SDedy Lansky /* WMI_BF_CONTROL_EX_CMDID */
1668*b5aeff16SDedy Lansky struct wmi_bf_control_ex_cmd {
1669*b5aeff16SDedy Lansky 	/* wmi_bf_triggers */
1670*b5aeff16SDedy Lansky 	__le32 triggers;
1671*b5aeff16SDedy Lansky 	/* enum wmi_edmg_tx_mode */
1672*b5aeff16SDedy Lansky 	u8 tx_mode;
1673*b5aeff16SDedy Lansky 	/* DISABLED = 0, ENABLED = 1 , DRY_RUN = 2 */
1674*b5aeff16SDedy Lansky 	u8 txss_mode;
1675*b5aeff16SDedy Lansky 	/* DISABLED = 0, ENABLED = 1, DRY_RUN = 2 */
1676*b5aeff16SDedy Lansky 	u8 brp_mode;
1677*b5aeff16SDedy Lansky 	/* Max cts threshold (correspond to
1678*b5aeff16SDedy Lansky 	 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP)
1679*b5aeff16SDedy Lansky 	 */
1680*b5aeff16SDedy Lansky 	u8 bf_trigger_max_cts_failure_thr;
1681*b5aeff16SDedy Lansky 	/* Max cts threshold in dense (correspond to
1682*b5aeff16SDedy Lansky 	 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP)
1683*b5aeff16SDedy Lansky 	 */
1684*b5aeff16SDedy Lansky 	u8 bf_trigger_max_cts_failure_dense_thr;
1685*b5aeff16SDedy Lansky 	/* Max b-ack threshold (correspond to
1686*b5aeff16SDedy Lansky 	 * WMI_BF_TRIGGER_MAX_BACK_FAILURE)
1687*b5aeff16SDedy Lansky 	 */
1688*b5aeff16SDedy Lansky 	u8 bf_trigger_max_back_failure_thr;
1689*b5aeff16SDedy Lansky 	/* Max b-ack threshold in dense (correspond to
1690*b5aeff16SDedy Lansky 	 * WMI_BF_TRIGGER_MAX_BACK_FAILURE)
1691*b5aeff16SDedy Lansky 	 */
1692*b5aeff16SDedy Lansky 	u8 bf_trigger_max_back_failure_dense_thr;
1693*b5aeff16SDedy Lansky 	u8 reserved0;
1694*b5aeff16SDedy Lansky 	/* Wrong sectors threshold */
1695*b5aeff16SDedy Lansky 	__le32 wrong_sector_bis_thr;
1696*b5aeff16SDedy Lansky 	/* BOOL to enable/disable long term trigger */
1697*b5aeff16SDedy Lansky 	u8 long_term_enable;
1698*b5aeff16SDedy Lansky 	/* 1 = Update long term thresholds from the long_term_mbps_th_tbl and
1699*b5aeff16SDedy Lansky 	 * long_term_trig_timeout_per_mcs arrays, 0 = Ignore
1700*b5aeff16SDedy Lansky 	 */
1701*b5aeff16SDedy Lansky 	u8 long_term_update_thr;
1702*b5aeff16SDedy Lansky 	u8 each_mcs_cfg_size;
1703*b5aeff16SDedy Lansky 	u8 reserved1;
1704*b5aeff16SDedy Lansky 	/* Configuration for each MCS */
1705*b5aeff16SDedy Lansky 	struct wmi_bf_control_ex_mcs each_mcs_cfg[0];
1706*b5aeff16SDedy Lansky } __packed;
1707*b5aeff16SDedy Lansky 
1708*b5aeff16SDedy Lansky /* WMI_LINK_STATS_CMD */
1709*b5aeff16SDedy Lansky enum wmi_link_stats_action {
1710*b5aeff16SDedy Lansky 	WMI_LINK_STATS_SNAPSHOT		= 0x00,
1711*b5aeff16SDedy Lansky 	WMI_LINK_STATS_PERIODIC		= 0x01,
1712*b5aeff16SDedy Lansky 	WMI_LINK_STATS_STOP_PERIODIC	= 0x02,
1713*b5aeff16SDedy Lansky };
1714*b5aeff16SDedy Lansky 
1715*b5aeff16SDedy Lansky /* WMI_LINK_STATS_EVENT record identifiers */
1716*b5aeff16SDedy Lansky enum wmi_link_stats_record_type {
1717*b5aeff16SDedy Lansky 	WMI_LINK_STATS_TYPE_BASIC	= 0x01,
1718*b5aeff16SDedy Lansky 	WMI_LINK_STATS_TYPE_MAC		= 0x02,
1719*b5aeff16SDedy Lansky 	WMI_LINK_STATS_TYPE_PHY		= 0x04,
1720*b5aeff16SDedy Lansky 	WMI_LINK_STATS_TYPE_OTA		= 0x08,
1721*b5aeff16SDedy Lansky };
1722*b5aeff16SDedy Lansky 
1723*b5aeff16SDedy Lansky /* WMI_LINK_STATS_CMDID */
1724*b5aeff16SDedy Lansky struct wmi_link_stats_cmd {
1725*b5aeff16SDedy Lansky 	/* bitmask of required record types
1726*b5aeff16SDedy Lansky 	 * (wmi_link_stats_record_type_e)
1727*b5aeff16SDedy Lansky 	 */
1728*b5aeff16SDedy Lansky 	__le32 record_type_mask;
1729*b5aeff16SDedy Lansky 	/* 0xff for all cids */
1730*b5aeff16SDedy Lansky 	u8 cid;
1731*b5aeff16SDedy Lansky 	/* wmi_link_stats_action_e */
1732*b5aeff16SDedy Lansky 	u8 action;
1733*b5aeff16SDedy Lansky 	u8 reserved[6];
1734*b5aeff16SDedy Lansky 	/* for WMI_LINK_STATS_PERIODIC */
1735*b5aeff16SDedy Lansky 	__le32 interval_msec;
1736*b5aeff16SDedy Lansky } __packed;
1737*b5aeff16SDedy Lansky 
1738*b5aeff16SDedy Lansky /* WMI_SET_GRANT_MCS_CMDID */
1739*b5aeff16SDedy Lansky struct wmi_set_grant_mcs_cmd {
1740*b5aeff16SDedy Lansky 	u8 mcs;
1741*b5aeff16SDedy Lansky 	u8 reserved[3];
1742*b5aeff16SDedy Lansky } __packed;
1743*b5aeff16SDedy Lansky 
1744*b5aeff16SDedy Lansky /* WMI_SET_AP_SLOT_SIZE_CMDID */
1745*b5aeff16SDedy Lansky struct wmi_set_ap_slot_size_cmd {
1746*b5aeff16SDedy Lansky 	__le32 slot_size;
1747*b5aeff16SDedy Lansky } __packed;
1748*b5aeff16SDedy Lansky 
1749b874ddecSLior David /* WMI Events
17502be7d22fSVladimir Kondratiev  * List of Events (target to host)
17512be7d22fSVladimir Kondratiev  */
17522be7d22fSVladimir Kondratiev enum wmi_event_id {
17532be7d22fSVladimir Kondratiev 	WMI_READY_EVENTID				= 0x1001,
17542be7d22fSVladimir Kondratiev 	WMI_CONNECT_EVENTID				= 0x1002,
17552be7d22fSVladimir Kondratiev 	WMI_DISCONNECT_EVENTID				= 0x1003,
1756a5dc6883SDedy Lansky 	WMI_START_SCHED_SCAN_EVENTID			= 0x1005,
1757a5dc6883SDedy Lansky 	WMI_STOP_SCHED_SCAN_EVENTID			= 0x1006,
1758a5dc6883SDedy Lansky 	WMI_SCHED_SCAN_RESULT_EVENTID			= 0x1007,
1759b874ddecSLior David 	WMI_SCAN_COMPLETE_EVENTID			= 0x100A,
1760b874ddecSLior David 	WMI_REPORT_STATISTICS_EVENTID			= 0x100B,
1761*b5aeff16SDedy Lansky 	WMI_FT_AUTH_STATUS_EVENTID			= 0x100C,
1762*b5aeff16SDedy Lansky 	WMI_FT_REASSOC_STATUS_EVENTID			= 0x100D,
17632be7d22fSVladimir Kondratiev 	WMI_RD_MEM_RSP_EVENTID				= 0x1800,
17642be7d22fSVladimir Kondratiev 	WMI_FW_READY_EVENTID				= 0x1801,
1765b874ddecSLior David 	WMI_EXIT_FAST_MEM_ACC_MODE_EVENTID		= 0x200,
17662be7d22fSVladimir Kondratiev 	WMI_ECHO_RSP_EVENTID				= 0x1803,
1767761f8e4dSLazar Alexei 	/* deprecated */
1768b874ddecSLior David 	WMI_FS_TUNE_DONE_EVENTID			= 0x180A,
1769761f8e4dSLazar Alexei 	/* deprecated */
1770b874ddecSLior David 	WMI_CORR_MEASURE_EVENTID			= 0x180B,
1771b874ddecSLior David 	WMI_READ_RSSI_EVENTID				= 0x180C,
1772b874ddecSLior David 	WMI_TEMP_SENSE_DONE_EVENTID			= 0x180E,
1773b874ddecSLior David 	WMI_DC_CALIB_DONE_EVENTID			= 0x180F,
1774761f8e4dSLazar Alexei 	/* deprecated */
17752be7d22fSVladimir Kondratiev 	WMI_IQ_TX_CALIB_DONE_EVENTID			= 0x1811,
1776761f8e4dSLazar Alexei 	/* deprecated */
17772be7d22fSVladimir Kondratiev 	WMI_IQ_RX_CALIB_DONE_EVENTID			= 0x1812,
17782be7d22fSVladimir Kondratiev 	WMI_SET_WORK_MODE_DONE_EVENTID			= 0x1815,
17792be7d22fSVladimir Kondratiev 	WMI_LO_LEAKAGE_CALIB_DONE_EVENTID		= 0x1816,
1780761f8e4dSLazar Alexei 	WMI_LO_POWER_CALIB_FROM_OTP_EVENTID		= 0x1817,
1781b874ddecSLior David 	WMI_SILENT_RSSI_CALIB_DONE_EVENTID		= 0x181D,
1782761f8e4dSLazar Alexei 	/* deprecated */
1783b874ddecSLior David 	WMI_RF_RX_TEST_DONE_EVENTID			= 0x181E,
17842be7d22fSVladimir Kondratiev 	WMI_CFG_RX_CHAIN_DONE_EVENTID			= 0x1820,
17852be7d22fSVladimir Kondratiev 	WMI_VRING_CFG_DONE_EVENTID			= 0x1821,
17862be7d22fSVladimir Kondratiev 	WMI_BA_STATUS_EVENTID				= 0x1823,
17872be7d22fSVladimir Kondratiev 	WMI_RCP_ADDBA_REQ_EVENTID			= 0x1824,
1788230d8442SVladimir Kondratiev 	WMI_RCP_ADDBA_RESP_SENT_EVENTID			= 0x1825,
17892be7d22fSVladimir Kondratiev 	WMI_DELBA_EVENTID				= 0x1826,
17902be7d22fSVladimir Kondratiev 	WMI_GET_SSID_EVENTID				= 0x1828,
1791b874ddecSLior David 	WMI_GET_PCP_CHANNEL_EVENTID			= 0x182A,
1792b874ddecSLior David 	WMI_SW_TX_COMPLETE_EVENTID			= 0x182B,
1793230d8442SVladimir Kondratiev 	WMI_BEAMFORMING_MGMT_DONE_EVENTID		= 0x1836,
17942be7d22fSVladimir Kondratiev 	WMI_BF_TXSS_MGMT_DONE_EVENTID			= 0x1837,
17952be7d22fSVladimir Kondratiev 	WMI_BF_RXSS_MGMT_DONE_EVENTID			= 0x1839,
17962be7d22fSVladimir Kondratiev 	WMI_RS_MGMT_DONE_EVENTID			= 0x1852,
17972be7d22fSVladimir Kondratiev 	WMI_RF_MGMT_STATUS_EVENTID			= 0x1853,
17982be7d22fSVladimir Kondratiev 	WMI_BF_SM_MGMT_DONE_EVENTID			= 0x1838,
17992be7d22fSVladimir Kondratiev 	WMI_RX_MGMT_PACKET_EVENTID			= 0x1840,
18006c2faf09SVladimir Kondratiev 	WMI_TX_MGMT_PACKET_EVENTID			= 0x1841,
18010163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID	= 0x1842,
18020163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENTID		= 0x1843,
1803761f8e4dSLazar Alexei 	WMI_RF_XPM_READ_RESULT_EVENTID			= 0x1856,
1804761f8e4dSLazar Alexei 	WMI_RF_XPM_WRITE_RESULT_EVENTID			= 0x1857,
180510d599adSMaya Erez 	WMI_LED_CFG_DONE_EVENTID			= 0x1858,
1806761f8e4dSLazar Alexei 	WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID		= 0x185C,
1807761f8e4dSLazar Alexei 	WMI_RF_PWR_ON_DELAY_RSP_EVENTID			= 0x185D,
1808761f8e4dSLazar Alexei 	WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID		= 0x185E,
18098a4fa214SAhmad Masri 	WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID		= 0x185F,
18102be7d22fSVladimir Kondratiev 	/* Performance monitoring events */
18112be7d22fSVladimir Kondratiev 	WMI_DATA_PORT_OPEN_EVENTID			= 0x1860,
1812230d8442SVladimir Kondratiev 	WMI_WBE_LINK_DOWN_EVENTID			= 0x1861,
18132be7d22fSVladimir Kondratiev 	WMI_BF_CTRL_DONE_EVENTID			= 0x1862,
18142be7d22fSVladimir Kondratiev 	WMI_NOTIFY_REQ_DONE_EVENTID			= 0x1863,
18152be7d22fSVladimir Kondratiev 	WMI_GET_STATUS_DONE_EVENTID			= 0x1864,
181696c93589SGidon Studinski 	WMI_RING_EN_EVENTID				= 0x1865,
18170163b031SMaya Erez 	WMI_GET_RF_STATUS_EVENTID			= 0x1866,
18180163b031SMaya Erez 	WMI_GET_BASEBAND_TYPE_EVENTID			= 0x1867,
18198a4fa214SAhmad Masri 	WMI_VRING_SWITCH_TIMING_CONFIG_EVENTID		= 0x1868,
18202be7d22fSVladimir Kondratiev 	WMI_UNIT_TEST_EVENTID				= 0x1900,
18212be7d22fSVladimir Kondratiev 	WMI_FLASH_READ_DONE_EVENTID			= 0x1902,
18222be7d22fSVladimir Kondratiev 	WMI_FLASH_WRITE_DONE_EVENTID			= 0x1903,
18230163b031SMaya Erez 	/* Power management */
1824fe9ee51eSMaya Erez 	WMI_TRAFFIC_SUSPEND_EVENTID			= 0x1904,
18250163b031SMaya Erez 	WMI_TRAFFIC_RESUME_EVENTID			= 0x1905,
1826b8023177SVladimir Kondratiev 	/* P2P */
18278c679675SVladimir Kondratiev 	WMI_P2P_CFG_DONE_EVENTID			= 0x1910,
1828b8023177SVladimir Kondratiev 	WMI_PORT_ALLOCATED_EVENTID			= 0x1911,
1829b8023177SVladimir Kondratiev 	WMI_PORT_DELETED_EVENTID			= 0x1912,
1830b8023177SVladimir Kondratiev 	WMI_LISTEN_STARTED_EVENTID			= 0x1914,
1831b8023177SVladimir Kondratiev 	WMI_SEARCH_STARTED_EVENTID			= 0x1915,
1832b8023177SVladimir Kondratiev 	WMI_DISCOVERY_STARTED_EVENTID			= 0x1916,
1833b8023177SVladimir Kondratiev 	WMI_DISCOVERY_STOPPED_EVENTID			= 0x1917,
1834b8023177SVladimir Kondratiev 	WMI_PCP_STARTED_EVENTID				= 0x1918,
1835b8023177SVladimir Kondratiev 	WMI_PCP_STOPPED_EVENTID				= 0x1919,
1836b874ddecSLior David 	WMI_PCP_FACTOR_EVENTID				= 0x191A,
18370163b031SMaya Erez 	/* Power Save Configuration Events */
18380163b031SMaya Erez 	WMI_PS_DEV_PROFILE_CFG_EVENTID			= 0x191C,
1839*b5aeff16SDedy Lansky 	WMI_RS_ENABLE_EVENTID				= 0x191E,
1840*b5aeff16SDedy Lansky 	WMI_RS_CFG_EX_EVENTID				= 0x191F,
1841*b5aeff16SDedy Lansky 	WMI_GET_DETAILED_RS_RES_EX_EVENTID		= 0x1920,
1842*b5aeff16SDedy Lansky 	/* deprecated */
18430163b031SMaya Erez 	WMI_RS_CFG_DONE_EVENTID				= 0x1921,
1844*b5aeff16SDedy Lansky 	/* deprecated */
184508989f96SLior David 	WMI_GET_DETAILED_RS_RES_EVENTID			= 0x1922,
184608989f96SLior David 	WMI_AOA_MEAS_EVENTID				= 0x1923,
1847a52fb913SLior David 	WMI_BRP_SET_ANT_LIMIT_EVENTID			= 0x1924,
1848cbf795c1SLior David 	WMI_SET_MGMT_RETRY_LIMIT_EVENTID		= 0x1930,
1849cbf795c1SLior David 	WMI_GET_MGMT_RETRY_LIMIT_EVENTID		= 0x1931,
185090ffabb0SDedy Lansky 	WMI_SET_THERMAL_THROTTLING_CFG_EVENTID		= 0x1940,
185190ffabb0SDedy Lansky 	WMI_GET_THERMAL_THROTTLING_CFG_EVENTID		= 0x1941,
1852761f8e4dSLazar Alexei 	/* return the Power Save profile */
1853761f8e4dSLazar Alexei 	WMI_PS_DEV_PROFILE_CFG_READ_EVENTID		= 0x1942,
18548a4fa214SAhmad Masri 	WMI_TSF_SYNC_STATUS_EVENTID			= 0x1973,
185508989f96SLior David 	WMI_TOF_SESSION_END_EVENTID			= 0x1991,
185608989f96SLior David 	WMI_TOF_GET_CAPABILITIES_EVENTID		= 0x1992,
185708989f96SLior David 	WMI_TOF_SET_LCR_EVENTID				= 0x1993,
185808989f96SLior David 	WMI_TOF_SET_LCI_EVENTID				= 0x1994,
185908989f96SLior David 	WMI_TOF_FTM_PER_DEST_RES_EVENTID		= 0x1995,
1860761f8e4dSLazar Alexei 	WMI_TOF_CFG_RESPONDER_EVENTID			= 0x1996,
18618ae5d62cSLior David 	WMI_TOF_SET_TX_RX_OFFSET_EVENTID		= 0x1997,
18628ae5d62cSLior David 	WMI_TOF_GET_TX_RX_OFFSET_EVENTID		= 0x1998,
1863761f8e4dSLazar Alexei 	WMI_TOF_CHANNEL_INFO_EVENTID			= 0x1999,
1864cbf795c1SLior David 	WMI_GET_RF_SECTOR_PARAMS_DONE_EVENTID		= 0x19A0,
1865cbf795c1SLior David 	WMI_SET_RF_SECTOR_PARAMS_DONE_EVENTID		= 0x19A1,
1866cbf795c1SLior David 	WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID	= 0x19A2,
1867cbf795c1SLior David 	WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID	= 0x19A3,
1868cbf795c1SLior David 	WMI_SET_RF_SECTOR_ON_DONE_EVENTID		= 0x19A4,
18698ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_ORDER_EVENTID		= 0x19A5,
18708ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_NUMBER_EVENTID		= 0x19A6,
18718ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID	= 0x19A7,
1872*b5aeff16SDedy Lansky 	/* deprecated */
18738a4fa214SAhmad Masri 	WMI_BF_CONTROL_EVENTID				= 0x19AA,
1874*b5aeff16SDedy Lansky 	WMI_BF_CONTROL_EX_EVENTID			= 0x19AB,
187596c93589SGidon Studinski 	WMI_TX_STATUS_RING_CFG_DONE_EVENTID		= 0x19C0,
187696c93589SGidon Studinski 	WMI_RX_STATUS_RING_CFG_DONE_EVENTID		= 0x19C1,
187796c93589SGidon Studinski 	WMI_TX_DESC_RING_CFG_DONE_EVENTID		= 0x19C2,
187896c93589SGidon Studinski 	WMI_RX_DESC_RING_CFG_DONE_EVENTID		= 0x19C3,
187996c93589SGidon Studinski 	WMI_CFG_DEF_RX_OFFLOAD_DONE_EVENTID		= 0x19C5,
1880761f8e4dSLazar Alexei 	WMI_SCHEDULING_SCHEME_EVENTID			= 0x1A01,
1881761f8e4dSLazar Alexei 	WMI_FIXED_SCHEDULING_CONFIG_COMPLETE_EVENTID	= 0x1A02,
1882761f8e4dSLazar Alexei 	WMI_ENABLE_FIXED_SCHEDULING_COMPLETE_EVENTID	= 0x1A03,
1883761f8e4dSLazar Alexei 	WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_EVENTID	= 0x1A04,
1884761f8e4dSLazar Alexei 	WMI_SET_LONG_RANGE_CONFIG_COMPLETE_EVENTID	= 0x1A05,
18858a4fa214SAhmad Masri 	WMI_GET_ASSOC_LIST_RES_EVENTID			= 0x1A06,
18868a4fa214SAhmad Masri 	WMI_GET_CCA_INDICATIONS_EVENTID			= 0x1A07,
18878a4fa214SAhmad Masri 	WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_EVENTID	= 0x1A08,
18888a4fa214SAhmad Masri 	WMI_INTERNAL_FW_EVENT_EVENTID			= 0x1A0A,
18898a4fa214SAhmad Masri 	WMI_INTERNAL_FW_IOCTL_EVENTID			= 0x1A0B,
1890*b5aeff16SDedy Lansky 	WMI_LINK_STATS_CONFIG_DONE_EVENTID		= 0x1A0C,
1891*b5aeff16SDedy Lansky 	WMI_LINK_STATS_EVENTID				= 0x1A0D,
1892*b5aeff16SDedy Lansky 	WMI_SET_GRANT_MCS_EVENTID			= 0x1A0E,
1893*b5aeff16SDedy Lansky 	WMI_SET_AP_SLOT_SIZE_EVENTID			= 0x1A0F,
1894*b5aeff16SDedy Lansky 	WMI_SET_VRING_PRIORITY_WEIGHT_EVENTID		= 0x1A10,
1895*b5aeff16SDedy Lansky 	WMI_SET_VRING_PRIORITY_EVENTID			= 0x1A11,
18962be7d22fSVladimir Kondratiev 	WMI_SET_CHANNEL_EVENTID				= 0x9000,
18972be7d22fSVladimir Kondratiev 	WMI_ASSOC_REQ_EVENTID				= 0x9001,
18982be7d22fSVladimir Kondratiev 	WMI_EAPOL_RX_EVENTID				= 0x9002,
18992be7d22fSVladimir Kondratiev 	WMI_MAC_ADDR_RESP_EVENTID			= 0x9003,
19002be7d22fSVladimir Kondratiev 	WMI_FW_VER_EVENTID				= 0x9004,
1901b874ddecSLior David 	WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENTID		= 0x9005,
19028a4fa214SAhmad Masri 	WMI_INTERNAL_FW_SET_CHANNEL			= 0x9006,
1903761f8e4dSLazar Alexei 	WMI_COMMAND_NOT_SUPPORTED_EVENTID		= 0xFFFF,
19042be7d22fSVladimir Kondratiev };
19052be7d22fSVladimir Kondratiev 
1906b874ddecSLior David /* Events data structures */
1907b8023177SVladimir Kondratiev enum wmi_fw_status {
1908b874ddecSLior David 	WMI_FW_STATUS_SUCCESS	= 0x00,
1909b874ddecSLior David 	WMI_FW_STATUS_FAILURE	= 0x01,
1910b8023177SVladimir Kondratiev };
1911b8023177SVladimir Kondratiev 
1912b874ddecSLior David /* WMI_RF_MGMT_STATUS_EVENTID */
19132be7d22fSVladimir Kondratiev enum wmi_rf_status {
1914b874ddecSLior David 	WMI_RF_ENABLED		= 0x00,
1915b874ddecSLior David 	WMI_RF_DISABLED_HW	= 0x01,
1916b874ddecSLior David 	WMI_RF_DISABLED_SW	= 0x02,
1917b874ddecSLior David 	WMI_RF_DISABLED_HW_SW	= 0x03,
19182be7d22fSVladimir Kondratiev };
19192be7d22fSVladimir Kondratiev 
1920b874ddecSLior David /* WMI_RF_MGMT_STATUS_EVENTID */
19212be7d22fSVladimir Kondratiev struct wmi_rf_mgmt_status_event {
19222be7d22fSVladimir Kondratiev 	__le32 rf_status;
19232be7d22fSVladimir Kondratiev } __packed;
19242be7d22fSVladimir Kondratiev 
1925b874ddecSLior David /* WMI_GET_STATUS_DONE_EVENTID */
19262be7d22fSVladimir Kondratiev struct wmi_get_status_done_event {
19272be7d22fSVladimir Kondratiev 	__le32 is_associated;
19282be7d22fSVladimir Kondratiev 	u8 cid;
19292be7d22fSVladimir Kondratiev 	u8 reserved0[3];
19302be7d22fSVladimir Kondratiev 	u8 bssid[WMI_MAC_LEN];
19312be7d22fSVladimir Kondratiev 	u8 channel;
19322be7d22fSVladimir Kondratiev 	u8 reserved1;
19332be7d22fSVladimir Kondratiev 	u8 network_type;
19342be7d22fSVladimir Kondratiev 	u8 reserved2[3];
19352be7d22fSVladimir Kondratiev 	__le32 ssid_len;
19362be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
19372be7d22fSVladimir Kondratiev 	__le32 rf_status;
19382be7d22fSVladimir Kondratiev 	__le32 is_secured;
19392be7d22fSVladimir Kondratiev } __packed;
19402be7d22fSVladimir Kondratiev 
1941b874ddecSLior David /* WMI_FW_VER_EVENTID */
19422be7d22fSVladimir Kondratiev struct wmi_fw_ver_event {
19430163b031SMaya Erez 	/* FW image version */
19440163b031SMaya Erez 	__le32 fw_major;
19450163b031SMaya Erez 	__le32 fw_minor;
19460163b031SMaya Erez 	__le32 fw_subminor;
19470163b031SMaya Erez 	__le32 fw_build;
19480163b031SMaya Erez 	/* FW image build time stamp */
19490163b031SMaya Erez 	__le32 hour;
19500163b031SMaya Erez 	__le32 minute;
19510163b031SMaya Erez 	__le32 second;
19520163b031SMaya Erez 	__le32 day;
19530163b031SMaya Erez 	__le32 month;
19540163b031SMaya Erez 	__le32 year;
19550163b031SMaya Erez 	/* Boot Loader image version */
19560163b031SMaya Erez 	__le32 bl_major;
19570163b031SMaya Erez 	__le32 bl_minor;
19580163b031SMaya Erez 	__le32 bl_subminor;
19590163b031SMaya Erez 	__le32 bl_build;
1960761f8e4dSLazar Alexei 	/* The number of entries in the FW capabilities array */
196108989f96SLior David 	u8 fw_capabilities_len;
196208989f96SLior David 	u8 reserved[3];
196308989f96SLior David 	/* FW capabilities info
196408989f96SLior David 	 * Must be the last member of the struct
196508989f96SLior David 	 */
196608989f96SLior David 	__le32 fw_capabilities[0];
19670163b031SMaya Erez } __packed;
19680163b031SMaya Erez 
19690163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */
19700163b031SMaya Erez enum rf_type {
19710163b031SMaya Erez 	RF_UNKNOWN	= 0x00,
19720163b031SMaya Erez 	RF_MARLON	= 0x01,
19730163b031SMaya Erez 	RF_SPARROW	= 0x02,
19748a4fa214SAhmad Masri 	RF_TALYNA1	= 0x03,
19758a4fa214SAhmad Masri 	RF_TALYNA2	= 0x04,
19760163b031SMaya Erez };
19770163b031SMaya Erez 
19780163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */
19790163b031SMaya Erez enum board_file_rf_type {
19800163b031SMaya Erez 	BF_RF_MARLON	= 0x00,
19810163b031SMaya Erez 	BF_RF_SPARROW	= 0x01,
19828a4fa214SAhmad Masri 	BF_RF_TALYNA1	= 0x02,
19838a4fa214SAhmad Masri 	BF_RF_TALYNA2	= 0x03,
19840163b031SMaya Erez };
19850163b031SMaya Erez 
19860163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */
19870163b031SMaya Erez enum rf_status {
19880163b031SMaya Erez 	RF_OK			= 0x00,
19890163b031SMaya Erez 	RF_NO_COMM		= 0x01,
19900163b031SMaya Erez 	RF_WRONG_BOARD_FILE	= 0x02,
19910163b031SMaya Erez };
19920163b031SMaya Erez 
19930163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */
19940163b031SMaya Erez struct wmi_get_rf_status_event {
19950163b031SMaya Erez 	/* enum rf_type */
19960163b031SMaya Erez 	__le32 rf_type;
19970163b031SMaya Erez 	/* attached RFs bit vector */
19980163b031SMaya Erez 	__le32 attached_rf_vector;
19990163b031SMaya Erez 	/* enabled RFs bit vector */
20000163b031SMaya Erez 	__le32 enabled_rf_vector;
20010163b031SMaya Erez 	/* enum rf_status, refers to enabled RFs */
20020163b031SMaya Erez 	u8 rf_status[32];
20030163b031SMaya Erez 	/* enum board file RF type */
20040163b031SMaya Erez 	__le32 board_file_rf_type;
20050163b031SMaya Erez 	/* board file platform type */
20060163b031SMaya Erez 	__le32 board_file_platform_type;
20070163b031SMaya Erez 	/* board file version */
20080163b031SMaya Erez 	__le32 board_file_version;
2009761f8e4dSLazar Alexei 	/* enabled XIFs bit vector */
2010761f8e4dSLazar Alexei 	__le32 enabled_xif_vector;
2011761f8e4dSLazar Alexei 	__le32 reserved;
20120163b031SMaya Erez } __packed;
20130163b031SMaya Erez 
20140163b031SMaya Erez /* WMI_GET_BASEBAND_TYPE_EVENTID */
20150163b031SMaya Erez enum baseband_type {
20160163b031SMaya Erez 	BASEBAND_UNKNOWN	= 0x00,
20170163b031SMaya Erez 	BASEBAND_SPARROW_M_A0	= 0x03,
20180163b031SMaya Erez 	BASEBAND_SPARROW_M_A1	= 0x04,
20190163b031SMaya Erez 	BASEBAND_SPARROW_M_B0	= 0x05,
20200163b031SMaya Erez 	BASEBAND_SPARROW_M_C0	= 0x06,
20210163b031SMaya Erez 	BASEBAND_SPARROW_M_D0	= 0x07,
20228ae5d62cSLior David 	BASEBAND_TALYN_M_A0	= 0x08,
20238a4fa214SAhmad Masri 	BASEBAND_TALYN_M_B0	= 0x09,
20240163b031SMaya Erez };
20250163b031SMaya Erez 
20260163b031SMaya Erez /* WMI_GET_BASEBAND_TYPE_EVENTID */
20270163b031SMaya Erez struct wmi_get_baseband_type_event {
20280163b031SMaya Erez 	/* enum baseband_type */
20290163b031SMaya Erez 	__le32 baseband_type;
20302be7d22fSVladimir Kondratiev } __packed;
20312be7d22fSVladimir Kondratiev 
2032b874ddecSLior David /* WMI_MAC_ADDR_RESP_EVENTID */
20332be7d22fSVladimir Kondratiev struct wmi_mac_addr_resp_event {
20342be7d22fSVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
20352be7d22fSVladimir Kondratiev 	u8 auth_mode;
20362be7d22fSVladimir Kondratiev 	u8 crypt_mode;
20372be7d22fSVladimir Kondratiev 	__le32 offload_mode;
20382be7d22fSVladimir Kondratiev } __packed;
20392be7d22fSVladimir Kondratiev 
2040b874ddecSLior David /* WMI_EAPOL_RX_EVENTID */
20412be7d22fSVladimir Kondratiev struct wmi_eapol_rx_event {
20422be7d22fSVladimir Kondratiev 	u8 src_mac[WMI_MAC_LEN];
20432be7d22fSVladimir Kondratiev 	__le16 eapol_len;
20442be7d22fSVladimir Kondratiev 	u8 eapol[0];
20452be7d22fSVladimir Kondratiev } __packed;
20462be7d22fSVladimir Kondratiev 
2047b874ddecSLior David /* WMI_READY_EVENTID */
20482be7d22fSVladimir Kondratiev enum wmi_phy_capability {
2049b874ddecSLior David 	WMI_11A_CAPABILITY		= 0x01,
2050b874ddecSLior David 	WMI_11G_CAPABILITY		= 0x02,
2051b874ddecSLior David 	WMI_11AG_CAPABILITY		= 0x03,
2052b874ddecSLior David 	WMI_11NA_CAPABILITY		= 0x04,
2053b874ddecSLior David 	WMI_11NG_CAPABILITY		= 0x05,
2054b874ddecSLior David 	WMI_11NAG_CAPABILITY		= 0x06,
2055b874ddecSLior David 	WMI_11AD_CAPABILITY		= 0x07,
2056b874ddecSLior David 	WMI_11N_CAPABILITY_OFFSET	= 0x03,
20572be7d22fSVladimir Kondratiev };
20582be7d22fSVladimir Kondratiev 
20592be7d22fSVladimir Kondratiev struct wmi_ready_event {
20602be7d22fSVladimir Kondratiev 	__le32 sw_version;
20612be7d22fSVladimir Kondratiev 	__le32 abi_version;
20622be7d22fSVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
2063b874ddecSLior David 	/* enum wmi_phy_capability */
2064b874ddecSLior David 	u8 phy_capability;
2065b8023177SVladimir Kondratiev 	u8 numof_additional_mids;
2066761f8e4dSLazar Alexei 	/* rfc read calibration result. 5..15 */
2067eb4c0215SDedy Lansky 	u8 rfc_read_calib_result;
20688a4fa214SAhmad Masri 	/* Max associated STAs supported by FW in AP mode (default 0 means 8
20698a4fa214SAhmad Masri 	 * STA)
20708a4fa214SAhmad Masri 	 */
20718a4fa214SAhmad Masri 	u8 max_assoc_sta;
20728a4fa214SAhmad Masri 	u8 reserved[2];
20732be7d22fSVladimir Kondratiev } __packed;
20742be7d22fSVladimir Kondratiev 
2075b874ddecSLior David /* WMI_NOTIFY_REQ_DONE_EVENTID */
20762be7d22fSVladimir Kondratiev struct wmi_notify_req_done_event {
2077b874ddecSLior David 	/* beamforming status, 0: fail; 1: OK; 2: retrying */
2078b874ddecSLior David 	__le32 status;
20792be7d22fSVladimir Kondratiev 	__le64 tsf;
208030868f5dSDedy Lansky 	s8 rssi;
208130868f5dSDedy Lansky 	u8 reserved0[3];
20822be7d22fSVladimir Kondratiev 	__le32 tx_tpt;
20832be7d22fSVladimir Kondratiev 	__le32 tx_goodput;
20842be7d22fSVladimir Kondratiev 	__le32 rx_goodput;
20852be7d22fSVladimir Kondratiev 	__le16 bf_mcs;
20862be7d22fSVladimir Kondratiev 	__le16 my_rx_sector;
20872be7d22fSVladimir Kondratiev 	__le16 my_tx_sector;
20882be7d22fSVladimir Kondratiev 	__le16 other_rx_sector;
20892be7d22fSVladimir Kondratiev 	__le16 other_tx_sector;
20902be7d22fSVladimir Kondratiev 	__le16 range;
2091b8023177SVladimir Kondratiev 	u8 sqi;
2092b8023177SVladimir Kondratiev 	u8 reserved[3];
20932be7d22fSVladimir Kondratiev } __packed;
20942be7d22fSVladimir Kondratiev 
2095b874ddecSLior David /* WMI_CONNECT_EVENTID */
20962be7d22fSVladimir Kondratiev struct wmi_connect_event {
20972be7d22fSVladimir Kondratiev 	u8 channel;
20982be7d22fSVladimir Kondratiev 	u8 reserved0;
20992be7d22fSVladimir Kondratiev 	u8 bssid[WMI_MAC_LEN];
21002be7d22fSVladimir Kondratiev 	__le16 listen_interval;
21012be7d22fSVladimir Kondratiev 	__le16 beacon_interval;
21022be7d22fSVladimir Kondratiev 	u8 network_type;
21032be7d22fSVladimir Kondratiev 	u8 reserved1[3];
21042be7d22fSVladimir Kondratiev 	u8 beacon_ie_len;
21052be7d22fSVladimir Kondratiev 	u8 assoc_req_len;
21062be7d22fSVladimir Kondratiev 	u8 assoc_resp_len;
21072be7d22fSVladimir Kondratiev 	u8 cid;
2108a52fb913SLior David 	u8 aid;
2109a52fb913SLior David 	u8 reserved2[2];
2110b874ddecSLior David 	/* not in use */
21112be7d22fSVladimir Kondratiev 	u8 assoc_info[0];
21122be7d22fSVladimir Kondratiev } __packed;
21132be7d22fSVladimir Kondratiev 
2114849a564bSDedy Lansky /* disconnect_reason */
21152be7d22fSVladimir Kondratiev enum wmi_disconnect_reason {
2116b874ddecSLior David 	WMI_DIS_REASON_NO_NETWORK_AVAIL		= 0x01,
2117b874ddecSLior David 	/* bmiss */
2118b874ddecSLior David 	WMI_DIS_REASON_LOST_LINK		= 0x02,
2119b874ddecSLior David 	WMI_DIS_REASON_DISCONNECT_CMD		= 0x03,
2120b874ddecSLior David 	WMI_DIS_REASON_BSS_DISCONNECTED		= 0x04,
2121b874ddecSLior David 	WMI_DIS_REASON_AUTH_FAILED		= 0x05,
2122b874ddecSLior David 	WMI_DIS_REASON_ASSOC_FAILED		= 0x06,
2123b874ddecSLior David 	WMI_DIS_REASON_NO_RESOURCES_AVAIL	= 0x07,
2124b874ddecSLior David 	WMI_DIS_REASON_CSERV_DISCONNECT		= 0x08,
2125b874ddecSLior David 	WMI_DIS_REASON_INVALID_PROFILE		= 0x0A,
2126b874ddecSLior David 	WMI_DIS_REASON_DOT11H_CHANNEL_SWITCH	= 0x0B,
2127b874ddecSLior David 	WMI_DIS_REASON_PROFILE_MISMATCH		= 0x0C,
2128b874ddecSLior David 	WMI_DIS_REASON_CONNECTION_EVICTED	= 0x0D,
2129b874ddecSLior David 	WMI_DIS_REASON_IBSS_MERGE		= 0x0E,
21302be7d22fSVladimir Kondratiev };
21312be7d22fSVladimir Kondratiev 
2132849a564bSDedy Lansky /* WMI_DISCONNECT_EVENTID */
21332be7d22fSVladimir Kondratiev struct wmi_disconnect_event {
2134b874ddecSLior David 	/* reason code, see 802.11 spec. */
2135b874ddecSLior David 	__le16 protocol_reason_status;
2136b874ddecSLior David 	/* set if known */
2137b874ddecSLior David 	u8 bssid[WMI_MAC_LEN];
2138b874ddecSLior David 	/* see enum wmi_disconnect_reason */
2139b874ddecSLior David 	u8 disconnect_reason;
2140b874ddecSLior David 	/* last assoc req may passed to host - not in used */
2141b874ddecSLior David 	u8 assoc_resp_len;
2142b874ddecSLior David 	/* last assoc req may passed to host - not in used */
2143b874ddecSLior David 	u8 assoc_info[0];
21442be7d22fSVladimir Kondratiev } __packed;
21452be7d22fSVladimir Kondratiev 
2146b874ddecSLior David /* WMI_SCAN_COMPLETE_EVENTID */
21476c2faf09SVladimir Kondratiev enum scan_status {
2148b874ddecSLior David 	WMI_SCAN_SUCCESS	= 0x00,
2149b874ddecSLior David 	WMI_SCAN_FAILED		= 0x01,
2150b874ddecSLior David 	WMI_SCAN_ABORTED	= 0x02,
2151b874ddecSLior David 	WMI_SCAN_REJECTED	= 0x03,
2152b874ddecSLior David 	WMI_SCAN_ABORT_REJECTED	= 0x04,
21536c2faf09SVladimir Kondratiev };
21546c2faf09SVladimir Kondratiev 
21552be7d22fSVladimir Kondratiev struct wmi_scan_complete_event {
2156b874ddecSLior David 	/* enum scan_status */
2157b874ddecSLior David 	__le32 status;
21582be7d22fSVladimir Kondratiev } __packed;
21592be7d22fSVladimir Kondratiev 
2160*b5aeff16SDedy Lansky /* WMI_FT_AUTH_STATUS_EVENTID */
2161*b5aeff16SDedy Lansky struct wmi_ft_auth_status_event {
2162*b5aeff16SDedy Lansky 	/* enum wmi_fw_status */
2163*b5aeff16SDedy Lansky 	u8 status;
2164*b5aeff16SDedy Lansky 	u8 reserved[3];
2165*b5aeff16SDedy Lansky 	u8 mac_addr[WMI_MAC_LEN];
2166*b5aeff16SDedy Lansky 	__le16 ie_len;
2167*b5aeff16SDedy Lansky 	u8 ie_info[0];
2168*b5aeff16SDedy Lansky } __packed;
2169*b5aeff16SDedy Lansky 
2170*b5aeff16SDedy Lansky /* WMI_FT_REASSOC_STATUS_EVENTID */
2171*b5aeff16SDedy Lansky struct wmi_ft_reassoc_status_event {
2172*b5aeff16SDedy Lansky 	/* enum wmi_fw_status */
2173*b5aeff16SDedy Lansky 	u8 status;
2174*b5aeff16SDedy Lansky 	/* association id received from new AP */
2175*b5aeff16SDedy Lansky 	u8 aid;
2176*b5aeff16SDedy Lansky 	/* enum wmi_channel */
2177*b5aeff16SDedy Lansky 	u8 channel;
2178*b5aeff16SDedy Lansky 	/* enum wmi_channel */
2179*b5aeff16SDedy Lansky 	u8 edmg_channel;
2180*b5aeff16SDedy Lansky 	u8 mac_addr[WMI_MAC_LEN];
2181*b5aeff16SDedy Lansky 	__le16 beacon_ie_len;
2182*b5aeff16SDedy Lansky 	__le16 reassoc_req_ie_len;
2183*b5aeff16SDedy Lansky 	__le16 reassoc_resp_ie_len;
2184*b5aeff16SDedy Lansky 	u8 ie_info[0];
2185*b5aeff16SDedy Lansky } __packed;
2186*b5aeff16SDedy Lansky 
2187a5dc6883SDedy Lansky /* wmi_rx_mgmt_info */
2188a5dc6883SDedy Lansky struct wmi_rx_mgmt_info {
2189a5dc6883SDedy Lansky 	u8 mcs;
2190a5dc6883SDedy Lansky 	s8 rssi;
2191a5dc6883SDedy Lansky 	u8 range;
2192a5dc6883SDedy Lansky 	u8 sqi;
2193a5dc6883SDedy Lansky 	__le16 stype;
2194a5dc6883SDedy Lansky 	__le16 status;
2195a5dc6883SDedy Lansky 	__le32 len;
2196a5dc6883SDedy Lansky 	/* Not resolved when == 0xFFFFFFFF == > Broadcast to all MIDS */
2197a5dc6883SDedy Lansky 	u8 qid;
2198a5dc6883SDedy Lansky 	/* Not resolved when == 0xFFFFFFFF == > Broadcast to all MIDS */
2199a5dc6883SDedy Lansky 	u8 mid;
2200a5dc6883SDedy Lansky 	u8 cid;
2201a5dc6883SDedy Lansky 	/* From Radio MNGR */
2202a5dc6883SDedy Lansky 	u8 channel;
2203a5dc6883SDedy Lansky } __packed;
2204a5dc6883SDedy Lansky 
2205a5dc6883SDedy Lansky /* WMI_START_SCHED_SCAN_EVENTID */
2206a5dc6883SDedy Lansky enum wmi_pno_result {
2207a5dc6883SDedy Lansky 	WMI_PNO_SUCCESS			= 0x00,
2208a5dc6883SDedy Lansky 	WMI_PNO_REJECT			= 0x01,
2209a5dc6883SDedy Lansky 	WMI_PNO_INVALID_PARAMETERS	= 0x02,
2210a5dc6883SDedy Lansky 	WMI_PNO_NOT_ENABLED		= 0x03,
2211a5dc6883SDedy Lansky };
2212a5dc6883SDedy Lansky 
2213a5dc6883SDedy Lansky struct wmi_start_sched_scan_event {
22148a4fa214SAhmad Masri 	/* wmi_pno_result */
2215a5dc6883SDedy Lansky 	u8 result;
2216a5dc6883SDedy Lansky 	u8 reserved[3];
2217a5dc6883SDedy Lansky } __packed;
2218a5dc6883SDedy Lansky 
2219a5dc6883SDedy Lansky struct wmi_stop_sched_scan_event {
22208a4fa214SAhmad Masri 	/* wmi_pno_result */
2221a5dc6883SDedy Lansky 	u8 result;
2222a5dc6883SDedy Lansky 	u8 reserved[3];
2223a5dc6883SDedy Lansky } __packed;
2224a5dc6883SDedy Lansky 
2225a5dc6883SDedy Lansky struct wmi_sched_scan_result_event {
2226a5dc6883SDedy Lansky 	struct wmi_rx_mgmt_info info;
2227a5dc6883SDedy Lansky 	u8 payload[0];
2228a5dc6883SDedy Lansky } __packed;
2229a5dc6883SDedy Lansky 
2230b874ddecSLior David /* WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENT */
2231b874ddecSLior David enum wmi_acs_info_bitmask {
2232b874ddecSLior David 	WMI_ACS_INFO_BITMASK_BEACON_FOUND	= 0x01,
2233b874ddecSLior David 	WMI_ACS_INFO_BITMASK_BUSY_TIME		= 0x02,
2234b874ddecSLior David 	WMI_ACS_INFO_BITMASK_TX_TIME		= 0x04,
2235b874ddecSLior David 	WMI_ACS_INFO_BITMASK_RX_TIME		= 0x08,
2236b874ddecSLior David 	WMI_ACS_INFO_BITMASK_NOISE		= 0x10,
22372be7d22fSVladimir Kondratiev };
22382be7d22fSVladimir Kondratiev 
2239b874ddecSLior David struct scan_acs_info {
2240b874ddecSLior David 	u8 channel;
2241b874ddecSLior David 	u8 beacon_found;
2242b874ddecSLior David 	/* msec */
2243b874ddecSLior David 	__le16 busy_time;
2244b874ddecSLior David 	__le16 tx_time;
2245b874ddecSLior David 	__le16 rx_time;
2246b874ddecSLior David 	u8 noise;
2247b874ddecSLior David 	u8 reserved[3];
2248b874ddecSLior David } __packed;
2249b874ddecSLior David 
2250b874ddecSLior David struct wmi_acs_passive_scan_complete_event {
2251b874ddecSLior David 	__le32 dwell_time;
2252b874ddecSLior David 	/* valid fields within channel info according to
2253b874ddecSLior David 	 * their appearance in struct order
2254b874ddecSLior David 	 */
2255b874ddecSLior David 	__le16 filled;
2256b874ddecSLior David 	u8 num_scanned_channels;
2257b874ddecSLior David 	u8 reserved;
2258b874ddecSLior David 	struct scan_acs_info scan_info_list[0];
2259b874ddecSLior David } __packed;
2260b874ddecSLior David 
2261b874ddecSLior David /* WMI_BA_STATUS_EVENTID */
2262b874ddecSLior David enum wmi_vring_ba_status {
2263b874ddecSLior David 	WMI_BA_AGREED			= 0x00,
2264b874ddecSLior David 	WMI_BA_NON_AGREED		= 0x01,
2265b874ddecSLior David 	/* BA_EN in middle of teardown flow */
2266b874ddecSLior David 	WMI_BA_TD_WIP			= 0x02,
2267b874ddecSLior David 	/* BA_DIS or BA_EN in middle of BA SETUP flow */
2268b874ddecSLior David 	WMI_BA_SETUP_WIP		= 0x03,
2269b874ddecSLior David 	/* BA_EN when the BA session is already active */
2270b874ddecSLior David 	WMI_BA_SESSION_ACTIVE		= 0x04,
2271b874ddecSLior David 	/* BA_DIS when the BA session is not active */
2272b874ddecSLior David 	WMI_BA_SESSION_NOT_ACTIVE	= 0x05,
2273b874ddecSLior David };
2274b874ddecSLior David 
2275b874ddecSLior David struct wmi_ba_status_event {
2276b874ddecSLior David 	/* enum wmi_vring_ba_status */
2277b874ddecSLior David 	__le16 status;
22782be7d22fSVladimir Kondratiev 	u8 reserved[2];
22792be7d22fSVladimir Kondratiev 	u8 ringid;
22802be7d22fSVladimir Kondratiev 	u8 agg_wsize;
22812be7d22fSVladimir Kondratiev 	__le16 ba_timeout;
2282cbcf5866SVladimir Kondratiev 	u8 amsdu;
22832be7d22fSVladimir Kondratiev } __packed;
22842be7d22fSVladimir Kondratiev 
2285b874ddecSLior David /* WMI_DELBA_EVENTID */
22862be7d22fSVladimir Kondratiev struct wmi_delba_event {
22878a4fa214SAhmad Masri 	/* Used for cid less than 8. For higher cid set
22888a4fa214SAhmad Masri 	 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
22898a4fa214SAhmad Masri 	 */
22902be7d22fSVladimir Kondratiev 	u8 cidxtid;
22912be7d22fSVladimir Kondratiev 	u8 from_initiator;
22922be7d22fSVladimir Kondratiev 	__le16 reason;
22938a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
22948a4fa214SAhmad Masri 	u8 cid;
22958a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
22968a4fa214SAhmad Masri 	u8 tid;
22978a4fa214SAhmad Masri 	u8 reserved[2];
22982be7d22fSVladimir Kondratiev } __packed;
22992be7d22fSVladimir Kondratiev 
2300b874ddecSLior David /* WMI_VRING_CFG_DONE_EVENTID */
23012be7d22fSVladimir Kondratiev struct wmi_vring_cfg_done_event {
23022be7d22fSVladimir Kondratiev 	u8 ringid;
23032be7d22fSVladimir Kondratiev 	u8 status;
23042be7d22fSVladimir Kondratiev 	u8 reserved[2];
23052be7d22fSVladimir Kondratiev 	__le32 tx_vring_tail_ptr;
23062be7d22fSVladimir Kondratiev } __packed;
23072be7d22fSVladimir Kondratiev 
2308b874ddecSLior David /* WMI_RCP_ADDBA_RESP_SENT_EVENTID */
23092be7d22fSVladimir Kondratiev struct wmi_rcp_addba_resp_sent_event {
23108a4fa214SAhmad Masri 	/* Used for cid less than 8. For higher cid set
23118a4fa214SAhmad Masri 	 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
23128a4fa214SAhmad Masri 	 */
23132be7d22fSVladimir Kondratiev 	u8 cidxtid;
23142be7d22fSVladimir Kondratiev 	u8 reserved;
23152be7d22fSVladimir Kondratiev 	__le16 status;
23168a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
23178a4fa214SAhmad Masri 	u8 cid;
23188a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
23198a4fa214SAhmad Masri 	u8 tid;
23208a4fa214SAhmad Masri 	u8 reserved2[2];
23212be7d22fSVladimir Kondratiev } __packed;
23222be7d22fSVladimir Kondratiev 
232396c93589SGidon Studinski /* WMI_TX_STATUS_RING_CFG_DONE_EVENTID */
232496c93589SGidon Studinski struct wmi_tx_status_ring_cfg_done_event {
232596c93589SGidon Studinski 	u8 ring_id;
232696c93589SGidon Studinski 	/* wmi_fw_status */
232796c93589SGidon Studinski 	u8 status;
232896c93589SGidon Studinski 	u8 reserved[2];
232996c93589SGidon Studinski 	__le32 ring_tail_ptr;
233096c93589SGidon Studinski } __packed;
233196c93589SGidon Studinski 
233296c93589SGidon Studinski /* WMI_RX_STATUS_RING_CFG_DONE_EVENTID */
233396c93589SGidon Studinski struct wmi_rx_status_ring_cfg_done_event {
233496c93589SGidon Studinski 	u8 ring_id;
233596c93589SGidon Studinski 	/* wmi_fw_status */
233696c93589SGidon Studinski 	u8 status;
233796c93589SGidon Studinski 	u8 reserved[2];
233896c93589SGidon Studinski 	__le32 ring_tail_ptr;
233996c93589SGidon Studinski } __packed;
234096c93589SGidon Studinski 
234196c93589SGidon Studinski /* WMI_CFG_DEF_RX_OFFLOAD_DONE_EVENTID */
234296c93589SGidon Studinski struct wmi_cfg_def_rx_offload_done_event {
234396c93589SGidon Studinski 	/* wmi_fw_status */
234496c93589SGidon Studinski 	u8 status;
234596c93589SGidon Studinski 	u8 reserved[3];
234696c93589SGidon Studinski } __packed;
234796c93589SGidon Studinski 
234896c93589SGidon Studinski /* WMI_TX_DESC_RING_CFG_DONE_EVENTID */
234996c93589SGidon Studinski struct wmi_tx_desc_ring_cfg_done_event {
235096c93589SGidon Studinski 	u8 ring_id;
235196c93589SGidon Studinski 	/* wmi_fw_status */
235296c93589SGidon Studinski 	u8 status;
235396c93589SGidon Studinski 	u8 reserved[2];
235496c93589SGidon Studinski 	__le32 ring_tail_ptr;
235596c93589SGidon Studinski } __packed;
235696c93589SGidon Studinski 
235796c93589SGidon Studinski /* WMI_RX_DESC_RING_CFG_DONE_EVENTID */
235896c93589SGidon Studinski struct wmi_rx_desc_ring_cfg_done_event {
235996c93589SGidon Studinski 	u8 ring_id;
236096c93589SGidon Studinski 	/* wmi_fw_status */
236196c93589SGidon Studinski 	u8 status;
236296c93589SGidon Studinski 	u8 reserved[2];
236396c93589SGidon Studinski 	__le32 ring_tail_ptr;
236496c93589SGidon Studinski } __packed;
236596c93589SGidon Studinski 
2366b874ddecSLior David /* WMI_RCP_ADDBA_REQ_EVENTID */
23672be7d22fSVladimir Kondratiev struct wmi_rcp_addba_req_event {
23688a4fa214SAhmad Masri 	/* Used for cid less than 8. For higher cid set
23698a4fa214SAhmad Masri 	 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
23708a4fa214SAhmad Masri 	 */
23712be7d22fSVladimir Kondratiev 	u8 cidxtid;
23722be7d22fSVladimir Kondratiev 	u8 dialog_token;
2373b874ddecSLior David 	/* ieee80211_ba_parameterset as it received */
2374b874ddecSLior David 	__le16 ba_param_set;
23752be7d22fSVladimir Kondratiev 	__le16 ba_timeout;
2376b874ddecSLior David 	/* ieee80211_ba_seqstrl field as it received */
2377b874ddecSLior David 	__le16 ba_seq_ctrl;
23788a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
23798a4fa214SAhmad Masri 	u8 cid;
23808a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
23818a4fa214SAhmad Masri 	u8 tid;
23828a4fa214SAhmad Masri 	u8 reserved[2];
23832be7d22fSVladimir Kondratiev } __packed;
23842be7d22fSVladimir Kondratiev 
2385b874ddecSLior David /* WMI_CFG_RX_CHAIN_DONE_EVENTID */
23862be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_done_event_status {
2387b874ddecSLior David 	WMI_CFG_RX_CHAIN_SUCCESS	= 0x01,
23882be7d22fSVladimir Kondratiev };
23892be7d22fSVladimir Kondratiev 
23902be7d22fSVladimir Kondratiev struct wmi_cfg_rx_chain_done_event {
2391b874ddecSLior David 	/* V-Ring Tail pointer */
2392b874ddecSLior David 	__le32 rx_ring_tail_ptr;
23932be7d22fSVladimir Kondratiev 	__le32 status;
23942be7d22fSVladimir Kondratiev } __packed;
23952be7d22fSVladimir Kondratiev 
2396b874ddecSLior David /* WMI_WBE_LINK_DOWN_EVENTID */
23972be7d22fSVladimir Kondratiev enum wmi_wbe_link_down_event_reason {
2398b874ddecSLior David 	WMI_WBE_REASON_USER_REQUEST	= 0x00,
2399b874ddecSLior David 	WMI_WBE_REASON_RX_DISASSOC	= 0x01,
2400b874ddecSLior David 	WMI_WBE_REASON_BAD_PHY_LINK	= 0x02,
24012be7d22fSVladimir Kondratiev };
24022be7d22fSVladimir Kondratiev 
2403b874ddecSLior David /* WMI_WBE_LINK_DOWN_EVENTID */
24042be7d22fSVladimir Kondratiev struct wmi_wbe_link_down_event {
24052be7d22fSVladimir Kondratiev 	u8 cid;
24062be7d22fSVladimir Kondratiev 	u8 reserved[3];
24072be7d22fSVladimir Kondratiev 	__le32 reason;
24082be7d22fSVladimir Kondratiev } __packed;
24092be7d22fSVladimir Kondratiev 
2410b874ddecSLior David /* WMI_DATA_PORT_OPEN_EVENTID */
24112be7d22fSVladimir Kondratiev struct wmi_data_port_open_event {
24122be7d22fSVladimir Kondratiev 	u8 cid;
24132be7d22fSVladimir Kondratiev 	u8 reserved[3];
24142be7d22fSVladimir Kondratiev } __packed;
24152be7d22fSVladimir Kondratiev 
241696c93589SGidon Studinski /* WMI_RING_EN_EVENTID */
241796c93589SGidon Studinski struct wmi_ring_en_event {
241896c93589SGidon Studinski 	u8 ring_index;
2419230d8442SVladimir Kondratiev 	u8 reserved[3];
2420230d8442SVladimir Kondratiev } __packed;
2421230d8442SVladimir Kondratiev 
2422b874ddecSLior David /* WMI_GET_PCP_CHANNEL_EVENTID */
24232be7d22fSVladimir Kondratiev struct wmi_get_pcp_channel_event {
24242be7d22fSVladimir Kondratiev 	u8 channel;
24252be7d22fSVladimir Kondratiev 	u8 reserved[3];
24262be7d22fSVladimir Kondratiev } __packed;
24272be7d22fSVladimir Kondratiev 
2428b874ddecSLior David /* WMI_P2P_CFG_DONE_EVENTID */
24298c679675SVladimir Kondratiev struct wmi_p2p_cfg_done_event {
2430b874ddecSLior David 	/* wmi_fw_status */
2431b874ddecSLior David 	u8 status;
24328c679675SVladimir Kondratiev 	u8 reserved[3];
24338c679675SVladimir Kondratiev } __packed;
24348c679675SVladimir Kondratiev 
2435b874ddecSLior David /* WMI_PORT_ALLOCATED_EVENTID */
2436b8023177SVladimir Kondratiev struct wmi_port_allocated_event {
2437b874ddecSLior David 	/* wmi_fw_status */
2438b874ddecSLior David 	u8 status;
2439b8023177SVladimir Kondratiev 	u8 reserved[3];
2440b8023177SVladimir Kondratiev } __packed;
2441b8023177SVladimir Kondratiev 
2442b874ddecSLior David /* WMI_PORT_DELETED_EVENTID */
2443b8023177SVladimir Kondratiev struct wmi_port_deleted_event {
2444b874ddecSLior David 	/* wmi_fw_status */
2445b874ddecSLior David 	u8 status;
2446b8023177SVladimir Kondratiev 	u8 reserved[3];
2447b8023177SVladimir Kondratiev } __packed;
2448b8023177SVladimir Kondratiev 
2449b874ddecSLior David /* WMI_LISTEN_STARTED_EVENTID */
2450b8023177SVladimir Kondratiev struct wmi_listen_started_event {
2451b874ddecSLior David 	/* wmi_fw_status */
2452b874ddecSLior David 	u8 status;
2453b8023177SVladimir Kondratiev 	u8 reserved[3];
2454b8023177SVladimir Kondratiev } __packed;
2455b8023177SVladimir Kondratiev 
2456b874ddecSLior David /* WMI_SEARCH_STARTED_EVENTID */
2457b8023177SVladimir Kondratiev struct wmi_search_started_event {
2458b874ddecSLior David 	/* wmi_fw_status */
2459b874ddecSLior David 	u8 status;
2460b8023177SVladimir Kondratiev 	u8 reserved[3];
2461b8023177SVladimir Kondratiev } __packed;
2462b8023177SVladimir Kondratiev 
2463b874ddecSLior David /* WMI_PCP_STARTED_EVENTID */
2464b8023177SVladimir Kondratiev struct wmi_pcp_started_event {
2465b874ddecSLior David 	/* wmi_fw_status */
2466b874ddecSLior David 	u8 status;
2467b8023177SVladimir Kondratiev 	u8 reserved[3];
2468b8023177SVladimir Kondratiev } __packed;
2469b8023177SVladimir Kondratiev 
2470b874ddecSLior David /* WMI_PCP_FACTOR_EVENTID */
2471b8023177SVladimir Kondratiev struct wmi_pcp_factor_event {
2472b8023177SVladimir Kondratiev 	__le32 pcp_factor;
2473b8023177SVladimir Kondratiev } __packed;
2474b8023177SVladimir Kondratiev 
24752be7d22fSVladimir Kondratiev enum wmi_sw_tx_status {
2476b874ddecSLior David 	WMI_TX_SW_STATUS_SUCCESS		= 0x00,
2477b874ddecSLior David 	WMI_TX_SW_STATUS_FAILED_NO_RESOURCES	= 0x01,
2478b874ddecSLior David 	WMI_TX_SW_STATUS_FAILED_TX		= 0x02,
24792be7d22fSVladimir Kondratiev };
24802be7d22fSVladimir Kondratiev 
2481b874ddecSLior David /* WMI_SW_TX_COMPLETE_EVENTID */
24822be7d22fSVladimir Kondratiev struct wmi_sw_tx_complete_event {
2483b874ddecSLior David 	/* enum wmi_sw_tx_status */
2484b874ddecSLior David 	u8 status;
24852be7d22fSVladimir Kondratiev 	u8 reserved[3];
24862be7d22fSVladimir Kondratiev } __packed;
24872be7d22fSVladimir Kondratiev 
2488761f8e4dSLazar Alexei /* WMI_CORR_MEASURE_EVENTID - deprecated */
2489b8023177SVladimir Kondratiev struct wmi_corr_measure_event {
2490b874ddecSLior David 	/* signed */
2491b874ddecSLior David 	__le32 i;
2492b874ddecSLior David 	/* signed */
2493b874ddecSLior David 	__le32 q;
2494b874ddecSLior David 	/* signed */
2495b874ddecSLior David 	__le32 image_i;
2496b874ddecSLior David 	/* signed */
2497b874ddecSLior David 	__le32 image_q;
2498b8023177SVladimir Kondratiev } __packed;
2499b8023177SVladimir Kondratiev 
2500b874ddecSLior David /* WMI_READ_RSSI_EVENTID */
2501b8023177SVladimir Kondratiev struct wmi_read_rssi_event {
2502b8023177SVladimir Kondratiev 	__le32 ina_rssi_adc_dbm;
2503b8023177SVladimir Kondratiev } __packed;
2504b8023177SVladimir Kondratiev 
2505b874ddecSLior David /* WMI_GET_SSID_EVENTID */
25062be7d22fSVladimir Kondratiev struct wmi_get_ssid_event {
25072be7d22fSVladimir Kondratiev 	__le32 ssid_len;
25082be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
25092be7d22fSVladimir Kondratiev } __packed;
25102be7d22fSVladimir Kondratiev 
2511761f8e4dSLazar Alexei /* EVENT: WMI_RF_XPM_READ_RESULT_EVENTID */
2512761f8e4dSLazar Alexei struct wmi_rf_xpm_read_result_event {
2513761f8e4dSLazar Alexei 	/* enum wmi_fw_status_e - success=0 or fail=1 */
2514761f8e4dSLazar Alexei 	u8 status;
2515761f8e4dSLazar Alexei 	u8 reserved[3];
2516761f8e4dSLazar Alexei 	/* requested num_bytes of data */
2517761f8e4dSLazar Alexei 	u8 data_bytes[0];
2518b874ddecSLior David } __packed;
2519b874ddecSLior David 
2520761f8e4dSLazar Alexei /* EVENT: WMI_RF_XPM_WRITE_RESULT_EVENTID */
2521761f8e4dSLazar Alexei struct wmi_rf_xpm_write_result_event {
2522761f8e4dSLazar Alexei 	/* enum wmi_fw_status_e - success=0 or fail=1 */
2523761f8e4dSLazar Alexei 	u8 status;
2524761f8e4dSLazar Alexei 	u8 reserved[3];
2525b874ddecSLior David } __packed;
2526b874ddecSLior David 
2527b874ddecSLior David /* WMI_TX_MGMT_PACKET_EVENTID */
25286c2faf09SVladimir Kondratiev struct wmi_tx_mgmt_packet_event {
25296c2faf09SVladimir Kondratiev 	u8 payload[0];
25306c2faf09SVladimir Kondratiev } __packed;
25316c2faf09SVladimir Kondratiev 
2532b874ddecSLior David /* WMI_RX_MGMT_PACKET_EVENTID */
25332be7d22fSVladimir Kondratiev struct wmi_rx_mgmt_packet_event {
25342be7d22fSVladimir Kondratiev 	struct wmi_rx_mgmt_info info;
25352be7d22fSVladimir Kondratiev 	u8 payload[0];
25362be7d22fSVladimir Kondratiev } __packed;
25372be7d22fSVladimir Kondratiev 
2538b874ddecSLior David /* WMI_ECHO_RSP_EVENTID */
2539b874ddecSLior David struct wmi_echo_rsp_event {
25402be7d22fSVladimir Kondratiev 	__le32 echoed_value;
25412be7d22fSVladimir Kondratiev } __packed;
25422be7d22fSVladimir Kondratiev 
2543761f8e4dSLazar Alexei /* WMI_RF_PWR_ON_DELAY_RSP_EVENTID */
2544761f8e4dSLazar Alexei struct wmi_rf_pwr_on_delay_rsp_event {
2545761f8e4dSLazar Alexei 	/* wmi_fw_status */
2546761f8e4dSLazar Alexei 	u8 status;
2547761f8e4dSLazar Alexei 	u8 reserved[3];
2548761f8e4dSLazar Alexei } __packed;
2549761f8e4dSLazar Alexei 
2550761f8e4dSLazar Alexei /* WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID */
2551761f8e4dSLazar Alexei struct wmi_set_high_power_table_params_event {
2552761f8e4dSLazar Alexei 	/* wmi_fw_status */
2553761f8e4dSLazar Alexei 	u8 status;
2554761f8e4dSLazar Alexei 	u8 reserved[3];
2555761f8e4dSLazar Alexei } __packed;
2556761f8e4dSLazar Alexei 
25578a4fa214SAhmad Masri /* WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID */
25588a4fa214SAhmad Masri struct wmi_fixed_scheduling_ul_config_event {
25598a4fa214SAhmad Masri 	/* wmi_fw_status */
25608a4fa214SAhmad Masri 	u8 status;
25618a4fa214SAhmad Masri 	u8 reserved[3];
25628a4fa214SAhmad Masri } __packed;
25638a4fa214SAhmad Masri 
2564b874ddecSLior David /* WMI_TEMP_SENSE_DONE_EVENTID
2565b8023177SVladimir Kondratiev  *
2566b8023177SVladimir Kondratiev  * Measure MAC and radio temperatures
2567b8023177SVladimir Kondratiev  */
2568b8023177SVladimir Kondratiev struct wmi_temp_sense_done_event {
2569b874ddecSLior David 	/* Temperature times 1000 (actual temperature will be achieved by
2570b874ddecSLior David 	 * dividing the value by 1000)
2571b874ddecSLior David 	 */
25728c679675SVladimir Kondratiev 	__le32 baseband_t1000;
2573b874ddecSLior David 	/* Temperature times 1000 (actual temperature will be achieved by
2574b874ddecSLior David 	 * dividing the value by 1000)
2575b874ddecSLior David 	 */
25768c679675SVladimir Kondratiev 	__le32 rf_t1000;
2577b8023177SVladimir Kondratiev } __packed;
2578b8023177SVladimir Kondratiev 
2579b874ddecSLior David #define WMI_SCAN_DWELL_TIME_MS	(100)
2580b874ddecSLior David #define WMI_SURVEY_TIMEOUT_MS	(10000)
2581b874ddecSLior David 
2582b874ddecSLior David enum wmi_hidden_ssid {
2583b874ddecSLior David 	WMI_HIDDEN_SSID_DISABLED	= 0x00,
2584b874ddecSLior David 	WMI_HIDDEN_SSID_SEND_EMPTY	= 0x10,
2585b874ddecSLior David 	WMI_HIDDEN_SSID_CLEAR		= 0xFE,
2586b874ddecSLior David };
2587b874ddecSLior David 
258810d599adSMaya Erez /* WMI_LED_CFG_CMDID
258910d599adSMaya Erez  *
259010d599adSMaya Erez  * Configure LED On\Off\Blinking operation
259110d599adSMaya Erez  *
259210d599adSMaya Erez  * Returned events:
259310d599adSMaya Erez  * - WMI_LED_CFG_DONE_EVENTID
259410d599adSMaya Erez  */
259510d599adSMaya Erez enum led_mode {
259610d599adSMaya Erez 	LED_DISABLE	= 0x00,
259710d599adSMaya Erez 	LED_ENABLE	= 0x01,
259810d599adSMaya Erez };
259910d599adSMaya Erez 
260010d599adSMaya Erez /* The names of the led as
260110d599adSMaya Erez  * described on HW schemes.
260210d599adSMaya Erez  */
260310d599adSMaya Erez enum wmi_led_id {
260410d599adSMaya Erez 	WMI_LED_WLAN	= 0x00,
260510d599adSMaya Erez 	WMI_LED_WPAN	= 0x01,
260610d599adSMaya Erez 	WMI_LED_WWAN	= 0x02,
260710d599adSMaya Erez };
260810d599adSMaya Erez 
260910d599adSMaya Erez /* Led polarity mode. */
261010d599adSMaya Erez enum wmi_led_polarity {
261110d599adSMaya Erez 	LED_POLARITY_HIGH_ACTIVE	= 0x00,
261210d599adSMaya Erez 	LED_POLARITY_LOW_ACTIVE		= 0x01,
261310d599adSMaya Erez };
261410d599adSMaya Erez 
261510d599adSMaya Erez /* Combination of on and off
261610d599adSMaya Erez  * creates the blinking period
261710d599adSMaya Erez  */
261810d599adSMaya Erez struct wmi_led_blink_mode {
261910d599adSMaya Erez 	__le32 blink_on;
262010d599adSMaya Erez 	__le32 blink_off;
262110d599adSMaya Erez } __packed;
262210d599adSMaya Erez 
262310d599adSMaya Erez /* WMI_LED_CFG_CMDID */
262410d599adSMaya Erez struct wmi_led_cfg_cmd {
262510d599adSMaya Erez 	/* enum led_mode_e */
262610d599adSMaya Erez 	u8 led_mode;
262710d599adSMaya Erez 	/* enum wmi_led_id_e */
262810d599adSMaya Erez 	u8 id;
262910d599adSMaya Erez 	/* slow speed blinking combination */
263010d599adSMaya Erez 	struct wmi_led_blink_mode slow_blink_cfg;
263110d599adSMaya Erez 	/* medium speed blinking combination */
263210d599adSMaya Erez 	struct wmi_led_blink_mode medium_blink_cfg;
263310d599adSMaya Erez 	/* high speed blinking combination */
263410d599adSMaya Erez 	struct wmi_led_blink_mode fast_blink_cfg;
263510d599adSMaya Erez 	/* polarity of the led */
263610d599adSMaya Erez 	u8 led_polarity;
263710d599adSMaya Erez 	/* reserved */
263810d599adSMaya Erez 	u8 reserved;
263910d599adSMaya Erez } __packed;
264010d599adSMaya Erez 
2641761f8e4dSLazar Alexei /* \WMI_SET_CONNECT_SNR_THR_CMDID */
2642761f8e4dSLazar Alexei struct wmi_set_connect_snr_thr_cmd {
2643761f8e4dSLazar Alexei 	u8 enable;
2644761f8e4dSLazar Alexei 	u8 reserved;
2645761f8e4dSLazar Alexei 	/* 1/4 Db units */
2646761f8e4dSLazar Alexei 	__le16 omni_snr_thr;
2647761f8e4dSLazar Alexei 	/* 1/4 Db units */
2648761f8e4dSLazar Alexei 	__le16 direct_snr_thr;
2649761f8e4dSLazar Alexei } __packed;
2650761f8e4dSLazar Alexei 
265110d599adSMaya Erez /* WMI_LED_CFG_DONE_EVENTID */
265210d599adSMaya Erez struct wmi_led_cfg_done_event {
265310d599adSMaya Erez 	/* led config status */
265410d599adSMaya Erez 	__le32 status;
265510d599adSMaya Erez } __packed;
265610d599adSMaya Erez 
26570163b031SMaya Erez /* Rate search parameters configuration per connection */
26580163b031SMaya Erez struct wmi_rs_cfg {
26590163b031SMaya Erez 	/* The maximal allowed PER for each MCS
26600163b031SMaya Erez 	 * MCS will be considered as failed if PER during RS is higher
26610163b031SMaya Erez 	 */
26620163b031SMaya Erez 	u8 per_threshold[WMI_NUM_MCS];
26630163b031SMaya Erez 	/* Number of MPDUs for each MCS
26640163b031SMaya Erez 	 * this is the minimal statistic required to make an educated
26650163b031SMaya Erez 	 * decision
26660163b031SMaya Erez 	 */
26670163b031SMaya Erez 	u8 min_frame_cnt[WMI_NUM_MCS];
26680163b031SMaya Erez 	/* stop threshold [0-100] */
26690163b031SMaya Erez 	u8 stop_th;
26700163b031SMaya Erez 	/* MCS1 stop threshold [0-100] */
26710163b031SMaya Erez 	u8 mcs1_fail_th;
26720163b031SMaya Erez 	u8 max_back_failure_th;
26730163b031SMaya Erez 	/* Debug feature for disabling internal RS trigger (which is
26740163b031SMaya Erez 	 * currently triggered by BF Done)
26750163b031SMaya Erez 	 */
26760163b031SMaya Erez 	u8 dbg_disable_internal_trigger;
26770163b031SMaya Erez 	__le32 back_failure_mask;
26780163b031SMaya Erez 	__le32 mcs_en_vec;
26790163b031SMaya Erez } __packed;
26800163b031SMaya Erez 
2681*b5aeff16SDedy Lansky enum wmi_edmg_tx_mode {
2682*b5aeff16SDedy Lansky 	WMI_TX_MODE_DMG			= 0x0,
2683*b5aeff16SDedy Lansky 	WMI_TX_MODE_EDMG_CB1		= 0x1,
2684*b5aeff16SDedy Lansky 	WMI_TX_MODE_EDMG_CB2		= 0x2,
2685*b5aeff16SDedy Lansky 	WMI_TX_MODE_EDMG_CB1_LONG_LDPC	= 0x3,
2686*b5aeff16SDedy Lansky 	WMI_TX_MODE_EDMG_CB2_LONG_LDPC	= 0x4,
2687*b5aeff16SDedy Lansky 	WMI_TX_MODE_MAX,
2688*b5aeff16SDedy Lansky };
2689*b5aeff16SDedy Lansky 
2690*b5aeff16SDedy Lansky /* Rate search parameters common configuration */
2691*b5aeff16SDedy Lansky struct wmi_rs_cfg_ex_common {
2692*b5aeff16SDedy Lansky 	/* enum wmi_edmg_tx_mode */
2693*b5aeff16SDedy Lansky 	u8 mode;
2694*b5aeff16SDedy Lansky 	/* stop threshold [0-100] */
2695*b5aeff16SDedy Lansky 	u8 stop_th;
2696*b5aeff16SDedy Lansky 	/* MCS1 stop threshold [0-100] */
2697*b5aeff16SDedy Lansky 	u8 mcs1_fail_th;
2698*b5aeff16SDedy Lansky 	u8 max_back_failure_th;
2699*b5aeff16SDedy Lansky 	/* Debug feature for disabling internal RS trigger (which is
2700*b5aeff16SDedy Lansky 	 * currently triggered by BF Done)
2701*b5aeff16SDedy Lansky 	 */
2702*b5aeff16SDedy Lansky 	u8 dbg_disable_internal_trigger;
2703*b5aeff16SDedy Lansky 	u8 reserved[3];
2704*b5aeff16SDedy Lansky 	__le32 back_failure_mask;
2705*b5aeff16SDedy Lansky } __packed;
2706*b5aeff16SDedy Lansky 
2707*b5aeff16SDedy Lansky /* Rate search parameters configuration per MCS */
2708*b5aeff16SDedy Lansky struct wmi_rs_cfg_ex_mcs {
2709*b5aeff16SDedy Lansky 	/* The maximal allowed PER for each MCS
2710*b5aeff16SDedy Lansky 	 * MCS will be considered as failed if PER during RS is higher
2711*b5aeff16SDedy Lansky 	 */
2712*b5aeff16SDedy Lansky 	u8 per_threshold;
2713*b5aeff16SDedy Lansky 	/* Number of MPDUs for each MCS
2714*b5aeff16SDedy Lansky 	 * this is the minimal statistic required to make an educated
2715*b5aeff16SDedy Lansky 	 * decision
2716*b5aeff16SDedy Lansky 	 */
2717*b5aeff16SDedy Lansky 	u8 min_frame_cnt;
2718*b5aeff16SDedy Lansky 	u8 reserved[2];
2719*b5aeff16SDedy Lansky } __packed;
2720*b5aeff16SDedy Lansky 
2721*b5aeff16SDedy Lansky /* WMI_RS_CFG_EX_CMDID */
2722*b5aeff16SDedy Lansky struct wmi_rs_cfg_ex_cmd {
2723*b5aeff16SDedy Lansky 	/* Configuration for all MCSs */
2724*b5aeff16SDedy Lansky 	struct wmi_rs_cfg_ex_common common_cfg;
2725*b5aeff16SDedy Lansky 	u8 each_mcs_cfg_size;
2726*b5aeff16SDedy Lansky 	u8 reserved[3];
2727*b5aeff16SDedy Lansky 	/* Configuration for each MCS */
2728*b5aeff16SDedy Lansky 	struct wmi_rs_cfg_ex_mcs each_mcs_cfg[0];
2729*b5aeff16SDedy Lansky } __packed;
2730*b5aeff16SDedy Lansky 
2731*b5aeff16SDedy Lansky /* WMI_RS_CFG_EX_EVENTID */
2732*b5aeff16SDedy Lansky struct wmi_rs_cfg_ex_event {
2733*b5aeff16SDedy Lansky 	/* enum wmi_edmg_tx_mode */
2734*b5aeff16SDedy Lansky 	u8 mode;
2735*b5aeff16SDedy Lansky 	/* enum wmi_fw_status */
2736*b5aeff16SDedy Lansky 	u8 status;
2737*b5aeff16SDedy Lansky 	u8 reserved[2];
2738*b5aeff16SDedy Lansky } __packed;
2739*b5aeff16SDedy Lansky 
2740*b5aeff16SDedy Lansky /* WMI_RS_ENABLE_CMDID */
2741*b5aeff16SDedy Lansky struct wmi_rs_enable_cmd {
2742*b5aeff16SDedy Lansky 	u8 cid;
2743*b5aeff16SDedy Lansky 	/* enable or disable rate search */
2744*b5aeff16SDedy Lansky 	u8 rs_enable;
2745*b5aeff16SDedy Lansky 	u8 reserved[2];
2746*b5aeff16SDedy Lansky 	__le32 mcs_en_vec;
2747*b5aeff16SDedy Lansky } __packed;
2748*b5aeff16SDedy Lansky 
2749*b5aeff16SDedy Lansky /* WMI_RS_ENABLE_EVENTID */
2750*b5aeff16SDedy Lansky struct wmi_rs_enable_event {
2751*b5aeff16SDedy Lansky 	/* enum wmi_fw_status */
2752*b5aeff16SDedy Lansky 	u8 status;
2753*b5aeff16SDedy Lansky 	u8 reserved[3];
2754*b5aeff16SDedy Lansky } __packed;
2755*b5aeff16SDedy Lansky 
2756761f8e4dSLazar Alexei /* Slot types */
2757761f8e4dSLazar Alexei enum wmi_sched_scheme_slot_type {
2758761f8e4dSLazar Alexei 	WMI_SCHED_SLOT_SP		= 0x0,
2759761f8e4dSLazar Alexei 	WMI_SCHED_SLOT_CBAP		= 0x1,
2760761f8e4dSLazar Alexei 	WMI_SCHED_SLOT_IDLE		= 0x2,
2761761f8e4dSLazar Alexei 	WMI_SCHED_SLOT_ANNOUNCE_NO_ACK	= 0x3,
2762761f8e4dSLazar Alexei 	WMI_SCHED_SLOT_DISCOVERY	= 0x4,
2763761f8e4dSLazar Alexei };
2764761f8e4dSLazar Alexei 
2765761f8e4dSLazar Alexei enum wmi_sched_scheme_slot_flags {
2766761f8e4dSLazar Alexei 	WMI_SCHED_SCHEME_SLOT_PERIODIC	= 0x1,
2767761f8e4dSLazar Alexei };
2768761f8e4dSLazar Alexei 
2769761f8e4dSLazar Alexei struct wmi_sched_scheme_slot {
2770761f8e4dSLazar Alexei 	/* in microsecond */
2771761f8e4dSLazar Alexei 	__le32 tbtt_offset;
2772761f8e4dSLazar Alexei 	/* wmi_sched_scheme_slot_flags */
2773761f8e4dSLazar Alexei 	u8 flags;
2774761f8e4dSLazar Alexei 	/* wmi_sched_scheme_slot_type */
2775761f8e4dSLazar Alexei 	u8 type;
2776761f8e4dSLazar Alexei 	/* in microsecond */
2777761f8e4dSLazar Alexei 	__le16 duration;
2778761f8e4dSLazar Alexei 	/* frame_exchange_sequence_duration */
2779761f8e4dSLazar Alexei 	__le16 tx_op;
2780761f8e4dSLazar Alexei 	/* time in microseconds between two consecutive slots
2781761f8e4dSLazar Alexei 	 * relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set
2782761f8e4dSLazar Alexei 	 */
2783761f8e4dSLazar Alexei 	__le16 period;
2784761f8e4dSLazar Alexei 	/* relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set
2785761f8e4dSLazar Alexei 	 * number of times to repeat allocation
2786761f8e4dSLazar Alexei 	 */
2787761f8e4dSLazar Alexei 	u8 num_of_blocks;
2788761f8e4dSLazar Alexei 	/* relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set
2789761f8e4dSLazar Alexei 	 * every idle_period allocation will be idle
2790761f8e4dSLazar Alexei 	 */
2791761f8e4dSLazar Alexei 	u8 idle_period;
2792761f8e4dSLazar Alexei 	u8 src_aid;
2793761f8e4dSLazar Alexei 	u8 dest_aid;
2794761f8e4dSLazar Alexei 	__le32 reserved;
2795761f8e4dSLazar Alexei } __packed;
2796761f8e4dSLazar Alexei 
2797761f8e4dSLazar Alexei enum wmi_sched_scheme_flags {
2798761f8e4dSLazar Alexei 	/* should not be set when clearing scheduling scheme */
2799761f8e4dSLazar Alexei 	WMI_SCHED_SCHEME_ENABLE		= 0x01,
2800761f8e4dSLazar Alexei 	WMI_SCHED_PROTECTED_SP		= 0x02,
2801761f8e4dSLazar Alexei 	/* should be set only on first WMI fragment of scheme */
2802761f8e4dSLazar Alexei 	WMI_SCHED_FIRST			= 0x04,
2803761f8e4dSLazar Alexei 	/* should be set only on last WMI fragment of scheme */
2804761f8e4dSLazar Alexei 	WMI_SCHED_LAST			= 0x08,
2805761f8e4dSLazar Alexei 	WMI_SCHED_IMMEDIATE_START	= 0x10,
2806761f8e4dSLazar Alexei };
2807761f8e4dSLazar Alexei 
2808761f8e4dSLazar Alexei enum wmi_sched_scheme_advertisment {
2809761f8e4dSLazar Alexei 	/* ESE is not advertised at all, STA has to be configured with WMI
2810761f8e4dSLazar Alexei 	 * also
2811761f8e4dSLazar Alexei 	 */
2812761f8e4dSLazar Alexei 	WMI_ADVERTISE_ESE_DISABLED		= 0x0,
2813761f8e4dSLazar Alexei 	WMI_ADVERTISE_ESE_IN_BEACON		= 0x1,
2814761f8e4dSLazar Alexei 	WMI_ADVERTISE_ESE_IN_ANNOUNCE_FRAME	= 0x2,
2815761f8e4dSLazar Alexei };
2816761f8e4dSLazar Alexei 
2817761f8e4dSLazar Alexei /* WMI_SCHEDULING_SCHEME_CMD */
2818761f8e4dSLazar Alexei struct wmi_scheduling_scheme_cmd {
2819761f8e4dSLazar Alexei 	u8 serial_num;
2820761f8e4dSLazar Alexei 	/* wmi_sched_scheme_advertisment */
2821761f8e4dSLazar Alexei 	u8 ese_advertisment;
2822761f8e4dSLazar Alexei 	/* wmi_sched_scheme_flags */
2823761f8e4dSLazar Alexei 	__le16 flags;
2824761f8e4dSLazar Alexei 	u8 num_allocs;
2825761f8e4dSLazar Alexei 	u8 reserved[3];
2826761f8e4dSLazar Alexei 	__le64 start_tbtt;
2827761f8e4dSLazar Alexei 	/* allocations list */
2828761f8e4dSLazar Alexei 	struct wmi_sched_scheme_slot allocs[WMI_SCHED_MAX_ALLOCS_PER_CMD];
2829761f8e4dSLazar Alexei } __packed;
2830761f8e4dSLazar Alexei 
2831761f8e4dSLazar Alexei enum wmi_sched_scheme_failure_type {
2832761f8e4dSLazar Alexei 	WMI_SCHED_SCHEME_FAILURE_NO_ERROR		= 0x00,
2833761f8e4dSLazar Alexei 	WMI_SCHED_SCHEME_FAILURE_OLD_START_TSF_ERR	= 0x01,
2834761f8e4dSLazar Alexei };
2835761f8e4dSLazar Alexei 
2836761f8e4dSLazar Alexei /* WMI_SCHEDULING_SCHEME_EVENTID */
2837761f8e4dSLazar Alexei struct wmi_scheduling_scheme_event {
2838761f8e4dSLazar Alexei 	/* wmi_fw_status_e */
2839761f8e4dSLazar Alexei 	u8 status;
2840761f8e4dSLazar Alexei 	/* serial number given in command */
2841761f8e4dSLazar Alexei 	u8 serial_num;
2842761f8e4dSLazar Alexei 	/* wmi_sched_scheme_failure_type */
2843761f8e4dSLazar Alexei 	u8 failure_type;
2844761f8e4dSLazar Alexei 	/* alignment to 32b */
2845761f8e4dSLazar Alexei 	u8 reserved[1];
2846761f8e4dSLazar Alexei } __packed;
2847761f8e4dSLazar Alexei 
2848*b5aeff16SDedy Lansky /* WMI_RS_CFG_CMDID - deprecated */
28490163b031SMaya Erez struct wmi_rs_cfg_cmd {
28500163b031SMaya Erez 	/* connection id */
28510163b031SMaya Erez 	u8 cid;
28520163b031SMaya Erez 	/* enable or disable rate search */
28530163b031SMaya Erez 	u8 rs_enable;
28540163b031SMaya Erez 	/* rate search configuration */
28550163b031SMaya Erez 	struct wmi_rs_cfg rs_cfg;
28560163b031SMaya Erez } __packed;
28570163b031SMaya Erez 
2858*b5aeff16SDedy Lansky /* WMI_RS_CFG_DONE_EVENTID - deprecated */
28590163b031SMaya Erez struct wmi_rs_cfg_done_event {
28600163b031SMaya Erez 	u8 cid;
28610163b031SMaya Erez 	/* enum wmi_fw_status */
28620163b031SMaya Erez 	u8 status;
28630163b031SMaya Erez 	u8 reserved[2];
28640163b031SMaya Erez } __packed;
28650163b031SMaya Erez 
2866*b5aeff16SDedy Lansky /* WMI_GET_DETAILED_RS_RES_CMDID - deprecated */
286708989f96SLior David struct wmi_get_detailed_rs_res_cmd {
286808989f96SLior David 	/* connection id */
286908989f96SLior David 	u8 cid;
287008989f96SLior David 	u8 reserved[3];
287108989f96SLior David } __packed;
287208989f96SLior David 
287308989f96SLior David /* RS results status */
287408989f96SLior David enum wmi_rs_results_status {
287508989f96SLior David 	WMI_RS_RES_VALID	= 0x00,
287608989f96SLior David 	WMI_RS_RES_INVALID	= 0x01,
287708989f96SLior David };
287808989f96SLior David 
287908989f96SLior David /* Rate search results */
288008989f96SLior David struct wmi_rs_results {
288108989f96SLior David 	/* number of sent MPDUs */
288208989f96SLior David 	u8 num_of_tx_pkt[WMI_NUM_MCS];
288308989f96SLior David 	/* number of non-acked MPDUs */
288408989f96SLior David 	u8 num_of_non_acked_pkt[WMI_NUM_MCS];
288508989f96SLior David 	/* RS timestamp */
288608989f96SLior David 	__le32 tsf;
288708989f96SLior David 	/* RS selected MCS */
288808989f96SLior David 	u8 mcs;
288908989f96SLior David } __packed;
289008989f96SLior David 
2891*b5aeff16SDedy Lansky /* WMI_GET_DETAILED_RS_RES_EVENTID - deprecated */
289208989f96SLior David struct wmi_get_detailed_rs_res_event {
289308989f96SLior David 	u8 cid;
289408989f96SLior David 	/* enum wmi_rs_results_status */
289508989f96SLior David 	u8 status;
289608989f96SLior David 	/* detailed rs results */
289708989f96SLior David 	struct wmi_rs_results rs_results;
289808989f96SLior David 	u8 reserved[3];
289908989f96SLior David } __packed;
290008989f96SLior David 
2901*b5aeff16SDedy Lansky /* WMI_GET_DETAILED_RS_RES_EX_CMDID */
2902*b5aeff16SDedy Lansky struct wmi_get_detailed_rs_res_ex_cmd {
2903*b5aeff16SDedy Lansky 	u8 cid;
2904*b5aeff16SDedy Lansky 	u8 reserved[3];
2905*b5aeff16SDedy Lansky } __packed;
2906*b5aeff16SDedy Lansky 
2907*b5aeff16SDedy Lansky /* Rate search results */
2908*b5aeff16SDedy Lansky struct wmi_rs_results_ex_common {
2909*b5aeff16SDedy Lansky 	/* RS timestamp */
2910*b5aeff16SDedy Lansky 	__le32 tsf;
2911*b5aeff16SDedy Lansky 	/* RS selected MCS */
2912*b5aeff16SDedy Lansky 	u8 mcs;
2913*b5aeff16SDedy Lansky 	/* enum wmi_edmg_tx_mode */
2914*b5aeff16SDedy Lansky 	u8 mode;
2915*b5aeff16SDedy Lansky 	u8 reserved[2];
2916*b5aeff16SDedy Lansky } __packed;
2917*b5aeff16SDedy Lansky 
2918*b5aeff16SDedy Lansky /* Rate search results */
2919*b5aeff16SDedy Lansky struct wmi_rs_results_ex_mcs {
2920*b5aeff16SDedy Lansky 	/* number of sent MPDUs */
2921*b5aeff16SDedy Lansky 	u8 num_of_tx_pkt;
2922*b5aeff16SDedy Lansky 	/* number of non-acked MPDUs */
2923*b5aeff16SDedy Lansky 	u8 num_of_non_acked_pkt;
2924*b5aeff16SDedy Lansky 	u8 reserved[2];
2925*b5aeff16SDedy Lansky } __packed;
2926*b5aeff16SDedy Lansky 
2927*b5aeff16SDedy Lansky /* WMI_GET_DETAILED_RS_RES_EX_EVENTID */
2928*b5aeff16SDedy Lansky struct wmi_get_detailed_rs_res_ex_event {
2929*b5aeff16SDedy Lansky 	u8 cid;
2930*b5aeff16SDedy Lansky 	/* enum wmi_rs_results_status */
2931*b5aeff16SDedy Lansky 	u8 status;
2932*b5aeff16SDedy Lansky 	u8 reserved0[2];
2933*b5aeff16SDedy Lansky 	struct wmi_rs_results_ex_common common_rs_results;
2934*b5aeff16SDedy Lansky 	u8 each_mcs_results_size;
2935*b5aeff16SDedy Lansky 	u8 reserved1[3];
2936*b5aeff16SDedy Lansky 	/* Results for each MCS */
2937*b5aeff16SDedy Lansky 	struct wmi_rs_results_ex_mcs each_mcs_results[0];
2938*b5aeff16SDedy Lansky } __packed;
2939*b5aeff16SDedy Lansky 
2940a52fb913SLior David /* BRP antenna limit mode */
2941a52fb913SLior David enum wmi_brp_ant_limit_mode {
2942a52fb913SLior David 	/* Disable BRP force antenna limit */
2943a52fb913SLior David 	WMI_BRP_ANT_LIMIT_MODE_DISABLE		= 0x00,
2944a52fb913SLior David 	/* Define maximal antennas limit. Only effective antennas will be
2945a52fb913SLior David 	 * actually used
2946a52fb913SLior David 	 */
2947a52fb913SLior David 	WMI_BRP_ANT_LIMIT_MODE_EFFECTIVE	= 0x01,
2948a52fb913SLior David 	/* Force a specific number of antennas */
2949a52fb913SLior David 	WMI_BRP_ANT_LIMIT_MODE_FORCE		= 0x02,
2950a52fb913SLior David 	/* number of BRP antenna limit modes */
2951a52fb913SLior David 	WMI_BRP_ANT_LIMIT_MODES_NUM		= 0x03,
2952a52fb913SLior David };
2953a52fb913SLior David 
2954a52fb913SLior David /* WMI_BRP_SET_ANT_LIMIT_CMDID */
2955a52fb913SLior David struct wmi_brp_set_ant_limit_cmd {
2956a52fb913SLior David 	/* connection id */
2957a52fb913SLior David 	u8 cid;
2958a52fb913SLior David 	/* enum wmi_brp_ant_limit_mode */
2959a52fb913SLior David 	u8 limit_mode;
2960a52fb913SLior David 	/* antenna limit count, 1-27
2961a52fb913SLior David 	 * disable_mode - ignored
2962a52fb913SLior David 	 * effective_mode - upper limit to number of antennas to be used
2963a52fb913SLior David 	 * force_mode - exact number of antennas to be used
2964a52fb913SLior David 	 */
2965a52fb913SLior David 	u8 ant_limit;
2966a52fb913SLior David 	u8 reserved;
2967a52fb913SLior David } __packed;
2968a52fb913SLior David 
2969a52fb913SLior David /* WMI_BRP_SET_ANT_LIMIT_EVENTID */
2970a52fb913SLior David struct wmi_brp_set_ant_limit_event {
2971a52fb913SLior David 	/* wmi_fw_status */
2972a52fb913SLior David 	u8 status;
2973a52fb913SLior David 	u8 reserved[3];
2974a52fb913SLior David } __packed;
2975a52fb913SLior David 
29760163b031SMaya Erez /* broadcast connection ID */
29770163b031SMaya Erez #define WMI_LINK_MAINTAIN_CFG_CID_BROADCAST	(0xFFFFFFFF)
29780163b031SMaya Erez 
29790163b031SMaya Erez /* Types wmi_link_maintain_cfg presets for WMI_LINK_MAINTAIN_CFG_WRITE_CMD */
29800163b031SMaya Erez enum wmi_link_maintain_cfg_type {
29810163b031SMaya Erez 	/* AP/PCP default normal (non-FST) configuration settings */
29820163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_AP	= 0x00,
29830163b031SMaya Erez 	/* AP/PCP  default FST configuration settings */
29840163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_AP	= 0x01,
29850163b031SMaya Erez 	/* STA default normal (non-FST) configuration settings */
29860163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_STA	= 0x02,
29870163b031SMaya Erez 	/* STA default FST configuration settings */
29880163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_STA	= 0x03,
29890163b031SMaya Erez 	/* custom configuration settings */
29900163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM		= 0x04,
29910163b031SMaya Erez 	/* number of defined configuration types */
29920163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPES_NUM			= 0x05,
29930163b031SMaya Erez };
29940163b031SMaya Erez 
29950163b031SMaya Erez /* Response status codes for WMI_LINK_MAINTAIN_CFG_WRITE/READ commands */
29960163b031SMaya Erez enum wmi_link_maintain_cfg_response_status {
29970163b031SMaya Erez 	/* WMI_LINK_MAINTAIN_CFG_WRITE/READ command successfully accomplished
29980163b031SMaya Erez 	 */
29990163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_OK		= 0x00,
30000163b031SMaya Erez 	/* ERROR due to bad argument in WMI_LINK_MAINTAIN_CFG_WRITE/READ
30010163b031SMaya Erez 	 * command request
30020163b031SMaya Erez 	 */
30030163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_BAD_ARGUMENT	= 0x01,
30040163b031SMaya Erez };
30050163b031SMaya Erez 
30060163b031SMaya Erez /* Link Loss and Keep Alive configuration */
30070163b031SMaya Erez struct wmi_link_maintain_cfg {
30080163b031SMaya Erez 	/* link_loss_enable_detectors_vec */
30090163b031SMaya Erez 	__le32 link_loss_enable_detectors_vec;
30100163b031SMaya Erez 	/* detectors check period usec */
30110163b031SMaya Erez 	__le32 check_link_loss_period_usec;
30120163b031SMaya Erez 	/* max allowed tx ageing */
30130163b031SMaya Erez 	__le32 tx_ageing_threshold_usec;
30140163b031SMaya Erez 	/* keep alive period for high SNR */
30150163b031SMaya Erez 	__le32 keep_alive_period_usec_high_snr;
30160163b031SMaya Erez 	/* keep alive period for low SNR */
30170163b031SMaya Erez 	__le32 keep_alive_period_usec_low_snr;
30180163b031SMaya Erez 	/* lower snr limit for keep alive period update */
30190163b031SMaya Erez 	__le32 keep_alive_snr_threshold_low_db;
30200163b031SMaya Erez 	/* upper snr limit for keep alive period update */
30210163b031SMaya Erez 	__le32 keep_alive_snr_threshold_high_db;
30220163b031SMaya Erez 	/* num of successive bad bcons causing link-loss */
30230163b031SMaya Erez 	__le32 bad_beacons_num_threshold;
30240163b031SMaya Erez 	/* SNR limit for bad_beacons_detector */
30250163b031SMaya Erez 	__le32 bad_beacons_snr_threshold_db;
30268a4fa214SAhmad Masri 	/* timeout for disassoc response frame in uSec */
30278a4fa214SAhmad Masri 	__le32 disconnect_timeout;
30280163b031SMaya Erez } __packed;
30290163b031SMaya Erez 
30300163b031SMaya Erez /* WMI_LINK_MAINTAIN_CFG_WRITE_CMDID */
30310163b031SMaya Erez struct wmi_link_maintain_cfg_write_cmd {
30320163b031SMaya Erez 	/* enum wmi_link_maintain_cfg_type_e - type of requested default
30330163b031SMaya Erez 	 * configuration to be applied
30340163b031SMaya Erez 	 */
30350163b031SMaya Erez 	__le32 cfg_type;
30360163b031SMaya Erez 	/* requested connection ID or WMI_LINK_MAINTAIN_CFG_CID_BROADCAST */
30370163b031SMaya Erez 	__le32 cid;
30380163b031SMaya Erez 	/* custom configuration settings to be applied (relevant only if
30390163b031SMaya Erez 	 * cfg_type==WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM)
30400163b031SMaya Erez 	 */
30410163b031SMaya Erez 	struct wmi_link_maintain_cfg lm_cfg;
30420163b031SMaya Erez } __packed;
30430163b031SMaya Erez 
30440163b031SMaya Erez /* WMI_LINK_MAINTAIN_CFG_READ_CMDID */
30450163b031SMaya Erez struct wmi_link_maintain_cfg_read_cmd {
30460163b031SMaya Erez 	/* connection ID which configuration settings are requested */
30470163b031SMaya Erez 	__le32 cid;
30480163b031SMaya Erez } __packed;
30490163b031SMaya Erez 
30500163b031SMaya Erez /* WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID */
30510163b031SMaya Erez struct wmi_link_maintain_cfg_write_done_event {
30520163b031SMaya Erez 	/* requested connection ID */
30530163b031SMaya Erez 	__le32 cid;
30540163b031SMaya Erez 	/* wmi_link_maintain_cfg_response_status_e - write status */
30550163b031SMaya Erez 	__le32 status;
30560163b031SMaya Erez } __packed;
30570163b031SMaya Erez 
30580163b031SMaya Erez /* \WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENT */
30590163b031SMaya Erez struct wmi_link_maintain_cfg_read_done_event {
30600163b031SMaya Erez 	/* requested connection ID */
30610163b031SMaya Erez 	__le32 cid;
30620163b031SMaya Erez 	/* wmi_link_maintain_cfg_response_status_e - read status */
30630163b031SMaya Erez 	__le32 status;
30640163b031SMaya Erez 	/* Retrieved configuration settings */
30650163b031SMaya Erez 	struct wmi_link_maintain_cfg lm_cfg;
30660163b031SMaya Erez } __packed;
30670163b031SMaya Erez 
3068fe9ee51eSMaya Erez enum wmi_traffic_suspend_status {
3069fe9ee51eSMaya Erez 	WMI_TRAFFIC_SUSPEND_APPROVED			= 0x0,
30706804cd10SLazar Alexei 	WMI_TRAFFIC_SUSPEND_REJECTED_LINK_NOT_IDLE	= 0x1,
30710163b031SMaya Erez };
30720163b031SMaya Erez 
3073fe9ee51eSMaya Erez /* WMI_TRAFFIC_SUSPEND_EVENTID */
3074fe9ee51eSMaya Erez struct wmi_traffic_suspend_event {
3075fe9ee51eSMaya Erez 	/* enum wmi_traffic_suspend_status_e */
30760163b031SMaya Erez 	u8 status;
30770163b031SMaya Erez } __packed;
30780163b031SMaya Erez 
30790163b031SMaya Erez enum wmi_traffic_resume_status {
30800163b031SMaya Erez 	WMI_TRAFFIC_RESUME_SUCCESS	= 0x0,
30810163b031SMaya Erez 	WMI_TRAFFIC_RESUME_FAILED	= 0x1,
30820163b031SMaya Erez };
30830163b031SMaya Erez 
30846804cd10SLazar Alexei enum wmi_resume_trigger {
30856804cd10SLazar Alexei 	WMI_RESUME_TRIGGER_UNKNOWN	= 0x0,
30866804cd10SLazar Alexei 	WMI_RESUME_TRIGGER_HOST		= 0x1,
30876804cd10SLazar Alexei 	WMI_RESUME_TRIGGER_UCAST_RX	= 0x2,
30886804cd10SLazar Alexei 	WMI_RESUME_TRIGGER_BCAST_RX	= 0x4,
30896804cd10SLazar Alexei 	WMI_RESUME_TRIGGER_WMI_EVT	= 0x8,
30906804cd10SLazar Alexei };
30916804cd10SLazar Alexei 
30920163b031SMaya Erez /* WMI_TRAFFIC_RESUME_EVENTID */
30930163b031SMaya Erez struct wmi_traffic_resume_event {
30946804cd10SLazar Alexei 	/* enum wmi_traffic_resume_status */
30950163b031SMaya Erez 	u8 status;
30966804cd10SLazar Alexei 	u8 reserved[3];
30976804cd10SLazar Alexei 	/* enum wmi_resume_trigger bitmap */
30986804cd10SLazar Alexei 	__le32 resume_triggers;
30990163b031SMaya Erez } __packed;
31000163b031SMaya Erez 
31010163b031SMaya Erez /* Power Save command completion status codes */
31020163b031SMaya Erez enum wmi_ps_cfg_cmd_status {
31030163b031SMaya Erez 	WMI_PS_CFG_CMD_STATUS_SUCCESS	= 0x00,
31040163b031SMaya Erez 	WMI_PS_CFG_CMD_STATUS_BAD_PARAM	= 0x01,
31050163b031SMaya Erez 	/* other error */
31060163b031SMaya Erez 	WMI_PS_CFG_CMD_STATUS_ERROR	= 0x02,
31070163b031SMaya Erez };
31080163b031SMaya Erez 
31090163b031SMaya Erez /* Device Power Save Profiles */
31100163b031SMaya Erez enum wmi_ps_profile_type {
31110163b031SMaya Erez 	WMI_PS_PROFILE_TYPE_DEFAULT		= 0x00,
31120163b031SMaya Erez 	WMI_PS_PROFILE_TYPE_PS_DISABLED		= 0x01,
31130163b031SMaya Erez 	WMI_PS_PROFILE_TYPE_MAX_PS		= 0x02,
31140163b031SMaya Erez 	WMI_PS_PROFILE_TYPE_LOW_LATENCY_PS	= 0x03,
31150163b031SMaya Erez };
31160163b031SMaya Erez 
3117761f8e4dSLazar Alexei /* WMI_PS_DEV_PROFILE_CFG_READ_CMDID */
3118761f8e4dSLazar Alexei struct wmi_ps_dev_profile_cfg_read_cmd {
3119761f8e4dSLazar Alexei 	/* reserved */
3120761f8e4dSLazar Alexei 	__le32 reserved;
3121761f8e4dSLazar Alexei } __packed;
3122761f8e4dSLazar Alexei 
3123761f8e4dSLazar Alexei /* WMI_PS_DEV_PROFILE_CFG_READ_EVENTID */
3124761f8e4dSLazar Alexei struct wmi_ps_dev_profile_cfg_read_event {
3125761f8e4dSLazar Alexei 	/* wmi_ps_profile_type_e */
3126761f8e4dSLazar Alexei 	u8 ps_profile;
3127761f8e4dSLazar Alexei 	u8 reserved[3];
3128761f8e4dSLazar Alexei } __packed;
3129761f8e4dSLazar Alexei 
31300163b031SMaya Erez /* WMI_PS_DEV_PROFILE_CFG_CMDID
31310163b031SMaya Erez  *
31320163b031SMaya Erez  * Power save profile to be used by the device
31330163b031SMaya Erez  *
31340163b031SMaya Erez  * Returned event:
31350163b031SMaya Erez  * - WMI_PS_DEV_PROFILE_CFG_EVENTID
31360163b031SMaya Erez  */
31370163b031SMaya Erez struct wmi_ps_dev_profile_cfg_cmd {
31380163b031SMaya Erez 	/* wmi_ps_profile_type_e */
31390163b031SMaya Erez 	u8 ps_profile;
31400163b031SMaya Erez 	u8 reserved[3];
31410163b031SMaya Erez } __packed;
31420163b031SMaya Erez 
31430163b031SMaya Erez /* WMI_PS_DEV_PROFILE_CFG_EVENTID */
31440163b031SMaya Erez struct wmi_ps_dev_profile_cfg_event {
31450163b031SMaya Erez 	/* wmi_ps_cfg_cmd_status_e */
31460163b031SMaya Erez 	__le32 status;
31470163b031SMaya Erez } __packed;
31480163b031SMaya Erez 
31490163b031SMaya Erez enum wmi_ps_level {
31500163b031SMaya Erez 	WMI_PS_LEVEL_DEEP_SLEEP		= 0x00,
31510163b031SMaya Erez 	WMI_PS_LEVEL_SHALLOW_SLEEP	= 0x01,
31520163b031SMaya Erez 	/* awake = all PS mechanisms are disabled */
31530163b031SMaya Erez 	WMI_PS_LEVEL_AWAKE		= 0x02,
31540163b031SMaya Erez };
31550163b031SMaya Erez 
31560163b031SMaya Erez enum wmi_ps_deep_sleep_clk_level {
31570163b031SMaya Erez 	/* 33k */
31580163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC		= 0x00,
31590163b031SMaya Erez 	/* 10k */
31600163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_OSC		= 0x01,
31610163b031SMaya Erez 	/* @RTC Low latency */
31620163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC_LT	= 0x02,
31630163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_XTAL	= 0x03,
31640163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_SYSCLK	= 0x04,
31650163b031SMaya Erez 	/* Not Applicable */
31660163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_N_A		= 0xFF,
31670163b031SMaya Erez };
31680163b031SMaya Erez 
31690163b031SMaya Erez /* Response by the FW to a D3 entry request */
31700163b031SMaya Erez enum wmi_ps_d3_resp_policy {
31710163b031SMaya Erez 	WMI_PS_D3_RESP_POLICY_DEFAULT	= 0x00,
31720163b031SMaya Erez 	/* debug -D3 req is always denied */
31730163b031SMaya Erez 	WMI_PS_D3_RESP_POLICY_DENIED	= 0x01,
31740163b031SMaya Erez 	/* debug -D3 req is always approved */
31750163b031SMaya Erez 	WMI_PS_D3_RESP_POLICY_APPROVED	= 0x02,
31760163b031SMaya Erez };
31770163b031SMaya Erez 
317808989f96SLior David #define WMI_AOA_MAX_DATA_SIZE	(128)
317908989f96SLior David 
318008989f96SLior David enum wmi_aoa_meas_status {
318108989f96SLior David 	WMI_AOA_MEAS_SUCCESS		= 0x00,
318208989f96SLior David 	WMI_AOA_MEAS_PEER_INCAPABLE	= 0x01,
318308989f96SLior David 	WMI_AOA_MEAS_FAILURE		= 0x02,
318408989f96SLior David };
318508989f96SLior David 
318608989f96SLior David /* WMI_AOA_MEAS_EVENTID */
318708989f96SLior David struct wmi_aoa_meas_event {
318808989f96SLior David 	u8 mac_addr[WMI_MAC_LEN];
318908989f96SLior David 	/* channels IDs:
319008989f96SLior David 	 * 0 - 58320 MHz
319108989f96SLior David 	 * 1 - 60480 MHz
319208989f96SLior David 	 * 2 - 62640 MHz
319308989f96SLior David 	 */
319408989f96SLior David 	u8 channel;
319508989f96SLior David 	/* enum wmi_aoa_meas_type */
319608989f96SLior David 	u8 aoa_meas_type;
319708989f96SLior David 	/* Measurments are from RFs, defined by the mask */
319808989f96SLior David 	__le32 meas_rf_mask;
319908989f96SLior David 	/* enum wmi_aoa_meas_status */
320008989f96SLior David 	u8 meas_status;
320108989f96SLior David 	u8 reserved;
320208989f96SLior David 	/* Length of meas_data in bytes */
320308989f96SLior David 	__le16 length;
320408989f96SLior David 	u8 meas_data[WMI_AOA_MAX_DATA_SIZE];
320508989f96SLior David } __packed;
320608989f96SLior David 
3207cbf795c1SLior David /* WMI_SET_MGMT_RETRY_LIMIT_EVENTID */
3208cbf795c1SLior David struct wmi_set_mgmt_retry_limit_event {
3209cbf795c1SLior David 	/* enum wmi_fw_status */
3210cbf795c1SLior David 	u8 status;
3211cbf795c1SLior David 	/* alignment to 32b */
3212cbf795c1SLior David 	u8 reserved[3];
3213cbf795c1SLior David } __packed;
3214cbf795c1SLior David 
3215cbf795c1SLior David /* WMI_GET_MGMT_RETRY_LIMIT_EVENTID */
3216cbf795c1SLior David struct wmi_get_mgmt_retry_limit_event {
3217cbf795c1SLior David 	/* MAC retransmit limit for mgmt frames */
3218cbf795c1SLior David 	u8 mgmt_retry_limit;
3219cbf795c1SLior David 	/* alignment to 32b */
3220cbf795c1SLior David 	u8 reserved[3];
3221cbf795c1SLior David } __packed;
3222cbf795c1SLior David 
322308989f96SLior David /* WMI_TOF_GET_CAPABILITIES_EVENTID */
322408989f96SLior David struct wmi_tof_get_capabilities_event {
322508989f96SLior David 	u8 ftm_capability;
322608989f96SLior David 	/* maximum supported number of destination to start TOF */
322708989f96SLior David 	u8 max_num_of_dest;
322808989f96SLior David 	/* maximum supported number of measurements per burst */
322908989f96SLior David 	u8 max_num_of_meas_per_burst;
323008989f96SLior David 	u8 reserved;
323108989f96SLior David 	/* maximum supported multi bursts */
323208989f96SLior David 	__le16 max_multi_bursts_sessions;
323308989f96SLior David 	/* maximum supported FTM burst duration , wmi_tof_burst_duration_e */
323408989f96SLior David 	__le16 max_ftm_burst_duration;
323508989f96SLior David 	/* AOA supported types */
323608989f96SLior David 	__le32 aoa_supported_types;
323708989f96SLior David } __packed;
323808989f96SLior David 
323990ffabb0SDedy Lansky /* WMI_SET_THERMAL_THROTTLING_CFG_EVENTID */
324090ffabb0SDedy Lansky struct wmi_set_thermal_throttling_cfg_event {
324190ffabb0SDedy Lansky 	/* wmi_fw_status */
324290ffabb0SDedy Lansky 	u8 status;
324390ffabb0SDedy Lansky 	u8 reserved[3];
324490ffabb0SDedy Lansky } __packed;
324590ffabb0SDedy Lansky 
324690ffabb0SDedy Lansky /* WMI_GET_THERMAL_THROTTLING_CFG_EVENTID */
324790ffabb0SDedy Lansky struct wmi_get_thermal_throttling_cfg_event {
324890ffabb0SDedy Lansky 	/* Status data */
324990ffabb0SDedy Lansky 	struct wmi_tt_data tt_data;
325090ffabb0SDedy Lansky } __packed;
325190ffabb0SDedy Lansky 
325208989f96SLior David enum wmi_tof_session_end_status {
325308989f96SLior David 	WMI_TOF_SESSION_END_NO_ERROR		= 0x00,
325408989f96SLior David 	WMI_TOF_SESSION_END_FAIL		= 0x01,
325508989f96SLior David 	WMI_TOF_SESSION_END_PARAMS_ERROR	= 0x02,
325608989f96SLior David 	WMI_TOF_SESSION_END_ABORTED		= 0x03,
32578a4fa214SAhmad Masri 	WMI_TOF_SESSION_END_BUSY		= 0x04,
325808989f96SLior David };
325908989f96SLior David 
326008989f96SLior David /* WMI_TOF_SESSION_END_EVENTID */
326108989f96SLior David struct wmi_tof_session_end_event {
326208989f96SLior David 	/* FTM session ID */
326308989f96SLior David 	__le32 session_id;
326408989f96SLior David 	/* wmi_tof_session_end_status_e */
326508989f96SLior David 	u8 status;
326608989f96SLior David 	u8 reserved[3];
326708989f96SLior David } __packed;
326808989f96SLior David 
3269761f8e4dSLazar Alexei /* WMI_TOF_SET_LCI_EVENTID */
3270761f8e4dSLazar Alexei struct wmi_tof_set_lci_event {
3271761f8e4dSLazar Alexei 	/* enum wmi_fw_status */
3272761f8e4dSLazar Alexei 	u8 status;
3273761f8e4dSLazar Alexei 	u8 reserved[3];
3274761f8e4dSLazar Alexei } __packed;
3275761f8e4dSLazar Alexei 
3276761f8e4dSLazar Alexei /* WMI_TOF_SET_LCR_EVENTID */
3277761f8e4dSLazar Alexei struct wmi_tof_set_lcr_event {
3278761f8e4dSLazar Alexei 	/* enum wmi_fw_status */
3279761f8e4dSLazar Alexei 	u8 status;
3280761f8e4dSLazar Alexei 	u8 reserved[3];
3281761f8e4dSLazar Alexei } __packed;
3282761f8e4dSLazar Alexei 
328308989f96SLior David /* Responder FTM Results */
328408989f96SLior David struct wmi_responder_ftm_res {
328508989f96SLior David 	u8 t1[6];
328608989f96SLior David 	u8 t2[6];
328708989f96SLior David 	u8 t3[6];
328808989f96SLior David 	u8 t4[6];
328908989f96SLior David 	__le16 tod_err;
329008989f96SLior David 	__le16 toa_err;
329108989f96SLior David 	__le16 tod_err_initiator;
329208989f96SLior David 	__le16 toa_err_initiator;
329308989f96SLior David } __packed;
329408989f96SLior David 
329508989f96SLior David enum wmi_tof_ftm_per_dest_res_status {
329608989f96SLior David 	WMI_PER_DEST_RES_NO_ERROR		= 0x00,
329708989f96SLior David 	WMI_PER_DEST_RES_TX_RX_FAIL		= 0x01,
329808989f96SLior David 	WMI_PER_DEST_RES_PARAM_DONT_MATCH	= 0x02,
329908989f96SLior David };
330008989f96SLior David 
330108989f96SLior David enum wmi_tof_ftm_per_dest_res_flags {
330208989f96SLior David 	WMI_PER_DEST_RES_REQ_START		= 0x01,
330308989f96SLior David 	WMI_PER_DEST_RES_BURST_REPORT_END	= 0x02,
330408989f96SLior David 	WMI_PER_DEST_RES_REQ_END		= 0x04,
330508989f96SLior David 	WMI_PER_DEST_RES_PARAM_UPDATE		= 0x08,
330608989f96SLior David };
330708989f96SLior David 
330808989f96SLior David /* WMI_TOF_FTM_PER_DEST_RES_EVENTID */
330908989f96SLior David struct wmi_tof_ftm_per_dest_res_event {
331008989f96SLior David 	/* FTM session ID */
331108989f96SLior David 	__le32 session_id;
331208989f96SLior David 	/* destination MAC address */
331308989f96SLior David 	u8 dst_mac[WMI_MAC_LEN];
331408989f96SLior David 	/* wmi_tof_ftm_per_dest_res_flags_e */
331508989f96SLior David 	u8 flags;
331608989f96SLior David 	/* wmi_tof_ftm_per_dest_res_status_e */
331708989f96SLior David 	u8 status;
331808989f96SLior David 	/* responder ASAP */
331908989f96SLior David 	u8 responder_asap;
332008989f96SLior David 	/* responder number of FTM per burst */
332108989f96SLior David 	u8 responder_num_ftm_per_burst;
332208989f96SLior David 	/* responder number of FTM burst exponent */
332308989f96SLior David 	u8 responder_num_ftm_bursts_exp;
332408989f96SLior David 	/* responder burst duration ,wmi_tof_burst_duration_e */
332508989f96SLior David 	u8 responder_burst_duration;
332608989f96SLior David 	/* responder burst period, indicate interval between two consecutive
332708989f96SLior David 	 * burst instances, in units of 100 ms
332808989f96SLior David 	 */
332908989f96SLior David 	__le16 responder_burst_period;
333008989f96SLior David 	/* receive burst counter */
333108989f96SLior David 	__le16 bursts_cnt;
333208989f96SLior David 	/* tsf of responder start burst */
333308989f96SLior David 	__le32 tsf_sync;
333408989f96SLior David 	/* actual received ftm per burst */
333508989f96SLior David 	u8 actual_ftm_per_burst;
3336761f8e4dSLazar Alexei 	/* Measurments are from RFs, defined by the mask */
3337761f8e4dSLazar Alexei 	__le32 meas_rf_mask;
3338761f8e4dSLazar Alexei 	u8 reserved0[3];
333908989f96SLior David 	struct wmi_responder_ftm_res responder_ftm_res[0];
334008989f96SLior David } __packed;
334108989f96SLior David 
3342761f8e4dSLazar Alexei /* WMI_TOF_CFG_RESPONDER_EVENTID */
3343761f8e4dSLazar Alexei struct wmi_tof_cfg_responder_event {
3344761f8e4dSLazar Alexei 	/* enum wmi_fw_status */
3345761f8e4dSLazar Alexei 	u8 status;
3346761f8e4dSLazar Alexei 	u8 reserved[3];
3347761f8e4dSLazar Alexei } __packed;
3348761f8e4dSLazar Alexei 
334908989f96SLior David enum wmi_tof_channel_info_type {
335008989f96SLior David 	WMI_TOF_CHANNEL_INFO_AOA		= 0x00,
335108989f96SLior David 	WMI_TOF_CHANNEL_INFO_LCI		= 0x01,
335208989f96SLior David 	WMI_TOF_CHANNEL_INFO_LCR		= 0x02,
335308989f96SLior David 	WMI_TOF_CHANNEL_INFO_VENDOR_SPECIFIC	= 0x03,
335408989f96SLior David 	WMI_TOF_CHANNEL_INFO_CIR		= 0x04,
335508989f96SLior David 	WMI_TOF_CHANNEL_INFO_RSSI		= 0x05,
335608989f96SLior David 	WMI_TOF_CHANNEL_INFO_SNR		= 0x06,
335708989f96SLior David 	WMI_TOF_CHANNEL_INFO_DEBUG		= 0x07,
335808989f96SLior David };
335908989f96SLior David 
336008989f96SLior David /* WMI_TOF_CHANNEL_INFO_EVENTID */
336108989f96SLior David struct wmi_tof_channel_info_event {
336208989f96SLior David 	/* FTM session ID */
336308989f96SLior David 	__le32 session_id;
336408989f96SLior David 	/* destination MAC address */
336508989f96SLior David 	u8 dst_mac[WMI_MAC_LEN];
336608989f96SLior David 	/* wmi_tof_channel_info_type_e */
336708989f96SLior David 	u8 type;
336808989f96SLior David 	/* data report length */
336908989f96SLior David 	u8 len;
337008989f96SLior David 	/* data report payload */
337108989f96SLior David 	u8 report[0];
337208989f96SLior David } __packed;
337308989f96SLior David 
33748ae5d62cSLior David /* WMI_TOF_SET_TX_RX_OFFSET_EVENTID */
33758ae5d62cSLior David struct wmi_tof_set_tx_rx_offset_event {
33768ae5d62cSLior David 	/* enum wmi_fw_status */
33778ae5d62cSLior David 	u8 status;
33788ae5d62cSLior David 	u8 reserved[3];
33798ae5d62cSLior David } __packed;
33808ae5d62cSLior David 
33818ae5d62cSLior David /* WMI_TOF_GET_TX_RX_OFFSET_EVENTID */
33828ae5d62cSLior David struct wmi_tof_get_tx_rx_offset_event {
33838ae5d62cSLior David 	/* enum wmi_fw_status */
33848ae5d62cSLior David 	u8 status;
3385761f8e4dSLazar Alexei 	/* RF index used to read the offsets */
3386761f8e4dSLazar Alexei 	u8 rf_index;
3387761f8e4dSLazar Alexei 	u8 reserved1[2];
33888ae5d62cSLior David 	/* TX delay offset */
33898ae5d62cSLior David 	__le32 tx_offset;
33908ae5d62cSLior David 	/* RX delay offset */
33918ae5d62cSLior David 	__le32 rx_offset;
3392761f8e4dSLazar Alexei 	/* Offset to strongest tap of CIR */
3393761f8e4dSLazar Alexei 	__le32 precursor;
33948ae5d62cSLior David } __packed;
33958ae5d62cSLior David 
3396cbf795c1SLior David /* Result status codes for WMI commands */
3397cbf795c1SLior David enum wmi_rf_sector_status {
3398cbf795c1SLior David 	WMI_RF_SECTOR_STATUS_SUCCESS			= 0x00,
3399cbf795c1SLior David 	WMI_RF_SECTOR_STATUS_BAD_PARAMETERS_ERROR	= 0x01,
3400cbf795c1SLior David 	WMI_RF_SECTOR_STATUS_BUSY_ERROR			= 0x02,
3401cbf795c1SLior David 	WMI_RF_SECTOR_STATUS_NOT_SUPPORTED_ERROR	= 0x03,
3402cbf795c1SLior David };
3403cbf795c1SLior David 
3404cbf795c1SLior David /* Types of the RF sector (TX,RX) */
3405cbf795c1SLior David enum wmi_rf_sector_type {
3406cbf795c1SLior David 	WMI_RF_SECTOR_TYPE_RX	= 0x00,
3407cbf795c1SLior David 	WMI_RF_SECTOR_TYPE_TX	= 0x01,
3408cbf795c1SLior David };
3409cbf795c1SLior David 
3410cbf795c1SLior David /* Content of RF Sector (six 32-bits registers) */
3411cbf795c1SLior David struct wmi_rf_sector_info {
3412cbf795c1SLior David 	/* Phase values for RF Chains[15-0] (2bits per RF chain) */
3413cbf795c1SLior David 	__le32 psh_hi;
3414cbf795c1SLior David 	/* Phase values for RF Chains[31-16] (2bits per RF chain) */
3415cbf795c1SLior David 	__le32 psh_lo;
3416cbf795c1SLior David 	/* ETYPE Bit0 for all RF chains[31-0] - bit0 of Edge amplifier gain
3417cbf795c1SLior David 	 * index
3418cbf795c1SLior David 	 */
3419cbf795c1SLior David 	__le32 etype0;
3420cbf795c1SLior David 	/* ETYPE Bit1 for all RF chains[31-0] - bit1 of Edge amplifier gain
3421cbf795c1SLior David 	 * index
3422cbf795c1SLior David 	 */
3423cbf795c1SLior David 	__le32 etype1;
3424cbf795c1SLior David 	/* ETYPE Bit2 for all RF chains[31-0] - bit2 of Edge amplifier gain
3425cbf795c1SLior David 	 * index
3426cbf795c1SLior David 	 */
3427cbf795c1SLior David 	__le32 etype2;
3428cbf795c1SLior David 	/* D-Type values (3bits each) for 8 Distribution amplifiers + X16
3429cbf795c1SLior David 	 * switch bits
3430cbf795c1SLior David 	 */
3431cbf795c1SLior David 	__le32 dtype_swch_off;
3432cbf795c1SLior David } __packed;
3433cbf795c1SLior David 
3434cbf795c1SLior David #define WMI_INVALID_RF_SECTOR_INDEX	(0xFFFF)
3435cbf795c1SLior David #define WMI_MAX_RF_MODULES_NUM		(8)
3436cbf795c1SLior David 
3437cbf795c1SLior David /* WMI_GET_RF_SECTOR_PARAMS_CMD */
3438cbf795c1SLior David struct wmi_get_rf_sector_params_cmd {
3439cbf795c1SLior David 	/* Sector number to be retrieved */
3440cbf795c1SLior David 	__le16 sector_idx;
3441cbf795c1SLior David 	/* enum wmi_rf_sector_type - type of requested RF sector */
3442cbf795c1SLior David 	u8 sector_type;
3443cbf795c1SLior David 	/* bitmask vector specifying destination RF modules */
3444cbf795c1SLior David 	u8 rf_modules_vec;
3445cbf795c1SLior David } __packed;
3446cbf795c1SLior David 
3447cbf795c1SLior David /* \WMI_GET_RF_SECTOR_PARAMS_DONE_EVENT */
3448cbf795c1SLior David struct wmi_get_rf_sector_params_done_event {
3449cbf795c1SLior David 	/* result status of WMI_GET_RF_SECTOR_PARAMS_CMD (enum
3450cbf795c1SLior David 	 * wmi_rf_sector_status)
3451cbf795c1SLior David 	 */
3452cbf795c1SLior David 	u8 status;
3453cbf795c1SLior David 	/* align next field to U64 boundary */
3454cbf795c1SLior David 	u8 reserved[7];
3455cbf795c1SLior David 	/* TSF timestamp when RF sectors where retrieved */
3456cbf795c1SLior David 	__le64 tsf;
3457cbf795c1SLior David 	/* Content of RF sector retrieved from each RF module */
3458cbf795c1SLior David 	struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM];
3459cbf795c1SLior David } __packed;
3460cbf795c1SLior David 
3461cbf795c1SLior David /* WMI_SET_RF_SECTOR_PARAMS_CMD */
3462cbf795c1SLior David struct wmi_set_rf_sector_params_cmd {
3463cbf795c1SLior David 	/* Sector number to be retrieved */
3464cbf795c1SLior David 	__le16 sector_idx;
3465cbf795c1SLior David 	/* enum wmi_rf_sector_type - type of requested RF sector */
3466cbf795c1SLior David 	u8 sector_type;
3467cbf795c1SLior David 	/* bitmask vector specifying destination RF modules */
3468cbf795c1SLior David 	u8 rf_modules_vec;
3469cbf795c1SLior David 	/* Content of RF sector to be written to each RF module */
3470cbf795c1SLior David 	struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM];
3471cbf795c1SLior David } __packed;
3472cbf795c1SLior David 
3473cbf795c1SLior David /* \WMI_SET_RF_SECTOR_PARAMS_DONE_EVENT */
3474cbf795c1SLior David struct wmi_set_rf_sector_params_done_event {
3475cbf795c1SLior David 	/* result status of WMI_SET_RF_SECTOR_PARAMS_CMD (enum
3476cbf795c1SLior David 	 * wmi_rf_sector_status)
3477cbf795c1SLior David 	 */
3478cbf795c1SLior David 	u8 status;
3479cbf795c1SLior David } __packed;
3480cbf795c1SLior David 
3481cbf795c1SLior David /* WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD - Get RF sector index selected by
3482cbf795c1SLior David  * TXSS/BRP for communication with specified CID
3483cbf795c1SLior David  */
3484cbf795c1SLior David struct wmi_get_selected_rf_sector_index_cmd {
3485cbf795c1SLior David 	/* Connection/Station ID in [0:7] range */
3486cbf795c1SLior David 	u8 cid;
3487cbf795c1SLior David 	/* type of requested RF sector (enum wmi_rf_sector_type) */
3488cbf795c1SLior David 	u8 sector_type;
3489cbf795c1SLior David 	/* align to U32 boundary */
3490cbf795c1SLior David 	u8 reserved[2];
3491cbf795c1SLior David } __packed;
3492cbf795c1SLior David 
3493cbf795c1SLior David /* \WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Returns retrieved RF sector
3494cbf795c1SLior David  * index selected by TXSS/BRP for communication with specified CID
3495cbf795c1SLior David  */
3496cbf795c1SLior David struct wmi_get_selected_rf_sector_index_done_event {
3497cbf795c1SLior David 	/* Retrieved sector index selected in TXSS (for TX sector request) or
3498cbf795c1SLior David 	 * BRP (for RX sector request)
3499cbf795c1SLior David 	 */
3500cbf795c1SLior David 	__le16 sector_idx;
3501cbf795c1SLior David 	/* result status of WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD (enum
3502cbf795c1SLior David 	 * wmi_rf_sector_status)
3503cbf795c1SLior David 	 */
3504cbf795c1SLior David 	u8 status;
3505cbf795c1SLior David 	/* align next field to U64 boundary */
3506cbf795c1SLior David 	u8 reserved[5];
3507cbf795c1SLior David 	/* TSF timestamp when result was retrieved */
3508cbf795c1SLior David 	__le64 tsf;
3509cbf795c1SLior David } __packed;
3510cbf795c1SLior David 
3511cbf795c1SLior David /* WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD - Force RF sector index for
3512cbf795c1SLior David  * communication with specified CID. Assumes that TXSS/BRP is disabled by
3513cbf795c1SLior David  * other command
3514cbf795c1SLior David  */
3515cbf795c1SLior David struct wmi_set_selected_rf_sector_index_cmd {
3516cbf795c1SLior David 	/* Connection/Station ID in [0:7] range */
3517cbf795c1SLior David 	u8 cid;
3518cbf795c1SLior David 	/* type of requested RF sector (enum wmi_rf_sector_type) */
3519cbf795c1SLior David 	u8 sector_type;
3520cbf795c1SLior David 	/* Forced sector index */
3521cbf795c1SLior David 	__le16 sector_idx;
3522cbf795c1SLior David } __packed;
3523cbf795c1SLior David 
3524cbf795c1SLior David /* \WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Success/Fail status for
3525cbf795c1SLior David  * WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD
3526cbf795c1SLior David  */
3527cbf795c1SLior David struct wmi_set_selected_rf_sector_index_done_event {
3528cbf795c1SLior David 	/* result status of WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD (enum
3529cbf795c1SLior David 	 * wmi_rf_sector_status)
3530cbf795c1SLior David 	 */
3531cbf795c1SLior David 	u8 status;
3532cbf795c1SLior David 	/* align to U32 boundary */
3533cbf795c1SLior David 	u8 reserved[3];
3534cbf795c1SLior David } __packed;
3535cbf795c1SLior David 
3536cbf795c1SLior David /* WMI_SET_RF_SECTOR_ON_CMD - Activates specified sector for specified rf
3537cbf795c1SLior David  * modules
3538cbf795c1SLior David  */
3539cbf795c1SLior David struct wmi_set_rf_sector_on_cmd {
3540cbf795c1SLior David 	/* Sector index to be activated */
3541cbf795c1SLior David 	__le16 sector_idx;
3542cbf795c1SLior David 	/* type of requested RF sector (enum wmi_rf_sector_type) */
3543cbf795c1SLior David 	u8 sector_type;
3544cbf795c1SLior David 	/* bitmask vector specifying destination RF modules */
3545cbf795c1SLior David 	u8 rf_modules_vec;
3546cbf795c1SLior David } __packed;
3547cbf795c1SLior David 
3548cbf795c1SLior David /* \WMI_SET_RF_SECTOR_ON_DONE_EVENT - Success/Fail status for
3549cbf795c1SLior David  * WMI_SET_RF_SECTOR_ON_CMD
3550cbf795c1SLior David  */
3551cbf795c1SLior David struct wmi_set_rf_sector_on_done_event {
3552cbf795c1SLior David 	/* result status of WMI_SET_RF_SECTOR_ON_CMD (enum
3553cbf795c1SLior David 	 * wmi_rf_sector_status)
3554cbf795c1SLior David 	 */
3555cbf795c1SLior David 	u8 status;
3556cbf795c1SLior David 	/* align to U32 boundary */
3557cbf795c1SLior David 	u8 reserved[3];
3558cbf795c1SLior David } __packed;
3559cbf795c1SLior David 
35608ae5d62cSLior David enum wmi_sector_sweep_type {
35618ae5d62cSLior David 	WMI_SECTOR_SWEEP_TYPE_TXSS		= 0x00,
35628ae5d62cSLior David 	WMI_SECTOR_SWEEP_TYPE_BCON		= 0x01,
35638ae5d62cSLior David 	WMI_SECTOR_SWEEP_TYPE_TXSS_AND_BCON	= 0x02,
35648ae5d62cSLior David 	WMI_SECTOR_SWEEP_TYPE_NUM		= 0x03,
35658ae5d62cSLior David };
35668ae5d62cSLior David 
35678ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_ORDER_CMDID
35688ae5d62cSLior David  *
35698ae5d62cSLior David  * Set the order of TX sectors in TXSS and/or Beacon(AP).
35708ae5d62cSLior David  *
35718ae5d62cSLior David  * Returned event:
35728ae5d62cSLior David  * - WMI_PRIO_TX_SECTORS_ORDER_EVENTID
35738ae5d62cSLior David  */
35748ae5d62cSLior David struct wmi_prio_tx_sectors_order_cmd {
35758ae5d62cSLior David 	/* tx sectors order to be applied, 0xFF for end of array */
35768ae5d62cSLior David 	u8 tx_sectors_priority_array[MAX_NUM_OF_SECTORS];
35778ae5d62cSLior David 	/* enum wmi_sector_sweep_type, TXSS and/or Beacon */
35788ae5d62cSLior David 	u8 sector_sweep_type;
35798ae5d62cSLior David 	/* needed only for TXSS configuration */
35808ae5d62cSLior David 	u8 cid;
35818ae5d62cSLior David 	/* alignment to 32b */
35828ae5d62cSLior David 	u8 reserved[2];
35838ae5d62cSLior David } __packed;
35848ae5d62cSLior David 
35858ae5d62cSLior David /* completion status codes */
35868ae5d62cSLior David enum wmi_prio_tx_sectors_cmd_status {
35878ae5d62cSLior David 	WMI_PRIO_TX_SECT_CMD_STATUS_SUCCESS	= 0x00,
35888ae5d62cSLior David 	WMI_PRIO_TX_SECT_CMD_STATUS_BAD_PARAM	= 0x01,
35898ae5d62cSLior David 	/* other error */
35908ae5d62cSLior David 	WMI_PRIO_TX_SECT_CMD_STATUS_ERROR	= 0x02,
35918ae5d62cSLior David };
35928ae5d62cSLior David 
35938ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_ORDER_EVENTID */
35948ae5d62cSLior David struct wmi_prio_tx_sectors_order_event {
35958ae5d62cSLior David 	/* enum wmi_prio_tx_sectors_cmd_status */
35968ae5d62cSLior David 	u8 status;
35978ae5d62cSLior David 	/* alignment to 32b */
35988ae5d62cSLior David 	u8 reserved[3];
35998ae5d62cSLior David } __packed;
36008ae5d62cSLior David 
36018ae5d62cSLior David struct wmi_prio_tx_sectors_num_cmd {
36028ae5d62cSLior David 	/* [0-128], 0 = No changes */
36038ae5d62cSLior David 	u8 beacon_number_of_sectors;
36048ae5d62cSLior David 	/* [0-128], 0 = No changes */
36058ae5d62cSLior David 	u8 txss_number_of_sectors;
36068ae5d62cSLior David 	/* [0-8] needed only for TXSS configuration */
36078ae5d62cSLior David 	u8 cid;
36088ae5d62cSLior David } __packed;
36098ae5d62cSLior David 
36108ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_NUMBER_CMDID
36118ae5d62cSLior David  *
36128ae5d62cSLior David  * Set the number of active sectors in TXSS and/or Beacon.
36138ae5d62cSLior David  *
36148ae5d62cSLior David  * Returned event:
36158ae5d62cSLior David  * - WMI_PRIO_TX_SECTORS_NUMBER_EVENTID
36168ae5d62cSLior David  */
36178ae5d62cSLior David struct wmi_prio_tx_sectors_number_cmd {
36188ae5d62cSLior David 	struct wmi_prio_tx_sectors_num_cmd active_sectors_num;
36198ae5d62cSLior David 	/* alignment to 32b */
36208ae5d62cSLior David 	u8 reserved;
36218ae5d62cSLior David } __packed;
36228ae5d62cSLior David 
36238ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_NUMBER_EVENTID */
36248ae5d62cSLior David struct wmi_prio_tx_sectors_number_event {
36258ae5d62cSLior David 	/* enum wmi_prio_tx_sectors_cmd_status */
36268ae5d62cSLior David 	u8 status;
36278ae5d62cSLior David 	/* alignment to 32b */
36288ae5d62cSLior David 	u8 reserved[3];
36298ae5d62cSLior David } __packed;
36308ae5d62cSLior David 
36318ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID
36328ae5d62cSLior David  *
36338ae5d62cSLior David  * Set default sectors order and number (hard coded in board file)
36348ae5d62cSLior David  * in TXSS and/or Beacon.
36358ae5d62cSLior David  *
36368ae5d62cSLior David  * Returned event:
36378ae5d62cSLior David  * - WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID
36388ae5d62cSLior David  */
36398ae5d62cSLior David struct wmi_prio_tx_sectors_set_default_cfg_cmd {
36408ae5d62cSLior David 	/* enum wmi_sector_sweep_type, TXSS and/or Beacon */
36418ae5d62cSLior David 	u8 sector_sweep_type;
36428ae5d62cSLior David 	/* needed only for TXSS configuration */
36438ae5d62cSLior David 	u8 cid;
36448ae5d62cSLior David 	/* alignment to 32b */
36458ae5d62cSLior David 	u8 reserved[2];
36468ae5d62cSLior David } __packed;
36478ae5d62cSLior David 
36488ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID */
36498ae5d62cSLior David struct wmi_prio_tx_sectors_set_default_cfg_event {
36508ae5d62cSLior David 	/* enum wmi_prio_tx_sectors_cmd_status */
36518ae5d62cSLior David 	u8 status;
36528ae5d62cSLior David 	/* alignment to 32b */
36538ae5d62cSLior David 	u8 reserved[3];
36548ae5d62cSLior David } __packed;
36558ae5d62cSLior David 
3656761f8e4dSLazar Alexei /* WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID */
3657761f8e4dSLazar Alexei struct wmi_set_silent_rssi_table_done_event {
3658761f8e4dSLazar Alexei 	/* enum wmi_silent_rssi_status */
3659761f8e4dSLazar Alexei 	__le32 status;
3660761f8e4dSLazar Alexei 	/* enum wmi_silent_rssi_table */
3661761f8e4dSLazar Alexei 	__le32 table;
3662761f8e4dSLazar Alexei } __packed;
3663761f8e4dSLazar Alexei 
36648a4fa214SAhmad Masri /* WMI_VRING_SWITCH_TIMING_CONFIG_EVENTID */
36658a4fa214SAhmad Masri struct wmi_vring_switch_timing_config_event {
36668a4fa214SAhmad Masri 	/* enum wmi_fw_status */
36678a4fa214SAhmad Masri 	u8 status;
36688a4fa214SAhmad Masri 	u8 reserved[3];
36698a4fa214SAhmad Masri } __packed;
36708a4fa214SAhmad Masri 
36718a4fa214SAhmad Masri /* WMI_GET_ASSOC_LIST_RES_EVENTID */
36728a4fa214SAhmad Masri struct wmi_assoc_sta_info {
36738a4fa214SAhmad Masri 	u8 mac[WMI_MAC_LEN];
36748a4fa214SAhmad Masri 	u8 omni_index_address;
36758a4fa214SAhmad Masri 	u8 reserved;
36768a4fa214SAhmad Masri } __packed;
36778a4fa214SAhmad Masri 
36788a4fa214SAhmad Masri #define WMI_GET_ASSOC_LIST_SIZE	(8)
36798a4fa214SAhmad Masri 
36808a4fa214SAhmad Masri /* WMI_GET_ASSOC_LIST_RES_EVENTID
36818a4fa214SAhmad Masri  * Returns up to MAX_ASSOC_STA_LIST_SIZE associated STAs
36828a4fa214SAhmad Masri  */
36838a4fa214SAhmad Masri struct wmi_get_assoc_list_res_event {
36848a4fa214SAhmad Masri 	struct wmi_assoc_sta_info assoc_sta_list[WMI_GET_ASSOC_LIST_SIZE];
36858a4fa214SAhmad Masri 	/* STA count */
36868a4fa214SAhmad Masri 	u8 count;
36878a4fa214SAhmad Masri 	u8 reserved[3];
36888a4fa214SAhmad Masri } __packed;
36898a4fa214SAhmad Masri 
3690*b5aeff16SDedy Lansky /* WMI_BF_CONTROL_EVENTID - deprecated */
36918a4fa214SAhmad Masri struct wmi_bf_control_event {
36928a4fa214SAhmad Masri 	/* wmi_fw_status */
36938a4fa214SAhmad Masri 	u8 status;
36948a4fa214SAhmad Masri 	u8 reserved[3];
36958a4fa214SAhmad Masri } __packed;
36968a4fa214SAhmad Masri 
3697*b5aeff16SDedy Lansky /* WMI_BF_CONTROL_EX_EVENTID */
3698*b5aeff16SDedy Lansky struct wmi_bf_control_ex_event {
3699*b5aeff16SDedy Lansky 	/* wmi_fw_status */
3700*b5aeff16SDedy Lansky 	u8 status;
3701*b5aeff16SDedy Lansky 	u8 reserved[3];
3702*b5aeff16SDedy Lansky } __packed;
3703*b5aeff16SDedy Lansky 
37048a4fa214SAhmad Masri /* WMI_COMMAND_NOT_SUPPORTED_EVENTID */
3705761f8e4dSLazar Alexei struct wmi_command_not_supported_event {
3706761f8e4dSLazar Alexei 	/* device id */
3707761f8e4dSLazar Alexei 	u8 mid;
3708761f8e4dSLazar Alexei 	u8 reserved0;
3709761f8e4dSLazar Alexei 	__le16 command_id;
3710761f8e4dSLazar Alexei 	/* for UT command only, otherwise reserved */
3711761f8e4dSLazar Alexei 	__le16 command_subtype;
3712761f8e4dSLazar Alexei 	__le16 reserved1;
3713761f8e4dSLazar Alexei } __packed;
3714761f8e4dSLazar Alexei 
37158a4fa214SAhmad Masri /* WMI_TSF_SYNC_CMDID */
37168a4fa214SAhmad Masri struct wmi_tsf_sync_cmd {
37178a4fa214SAhmad Masri 	/* The time interval to send announce frame in one BI */
37188a4fa214SAhmad Masri 	u8 interval_ms;
37198a4fa214SAhmad Masri 	/* The mcs to send announce frame */
37208a4fa214SAhmad Masri 	u8 mcs;
37218a4fa214SAhmad Masri 	u8 reserved[6];
37228a4fa214SAhmad Masri } __packed;
37238a4fa214SAhmad Masri 
37248a4fa214SAhmad Masri /* WMI_TSF_SYNC_STATUS_EVENTID */
37258a4fa214SAhmad Masri enum wmi_tsf_sync_status {
37268a4fa214SAhmad Masri 	WMI_TSF_SYNC_SUCCESS	= 0x00,
37278a4fa214SAhmad Masri 	WMI_TSF_SYNC_FAILED	= 0x01,
37288a4fa214SAhmad Masri 	WMI_TSF_SYNC_REJECTED	= 0x02,
37298a4fa214SAhmad Masri };
37308a4fa214SAhmad Masri 
37318a4fa214SAhmad Masri /* WMI_TSF_SYNC_STATUS_EVENTID */
37328a4fa214SAhmad Masri struct wmi_tsf_sync_status_event {
37338a4fa214SAhmad Masri 	/* enum wmi_tsf_sync_status */
37348a4fa214SAhmad Masri 	u8 status;
37358a4fa214SAhmad Masri 	u8 reserved[3];
37368a4fa214SAhmad Masri } __packed;
37378a4fa214SAhmad Masri 
37388a4fa214SAhmad Masri /* WMI_GET_CCA_INDICATIONS_EVENTID */
37398a4fa214SAhmad Masri struct wmi_get_cca_indications_event {
37408a4fa214SAhmad Masri 	/* wmi_fw_status */
37418a4fa214SAhmad Masri 	u8 status;
37428a4fa214SAhmad Masri 	/* CCA-Energy Detect in percentage over last BI (0..100) */
37438a4fa214SAhmad Masri 	u8 cca_ed_percent;
37448a4fa214SAhmad Masri 	/* Averaged CCA-Energy Detect in percent over number of BIs (0..100) */
37458a4fa214SAhmad Masri 	u8 cca_ed_avg_percent;
37468a4fa214SAhmad Masri 	/* NAV percent over last BI (0..100) */
37478a4fa214SAhmad Masri 	u8 nav_percent;
37488a4fa214SAhmad Masri 	/* Averaged NAV percent over number of BIs (0..100) */
37498a4fa214SAhmad Masri 	u8 nav_avg_percent;
37508a4fa214SAhmad Masri 	u8 reserved[3];
37518a4fa214SAhmad Masri } __packed;
37528a4fa214SAhmad Masri 
37538a4fa214SAhmad Masri /* WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_CMDID */
37548a4fa214SAhmad Masri struct wmi_set_cca_indications_bi_avg_num_cmd {
37558a4fa214SAhmad Masri 	/* set the number of bis to average cca_ed (0..255) */
37568a4fa214SAhmad Masri 	u8 bi_number;
37578a4fa214SAhmad Masri 	u8 reserved[3];
37588a4fa214SAhmad Masri } __packed;
37598a4fa214SAhmad Masri 
37608a4fa214SAhmad Masri /* WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_EVENTID */
37618a4fa214SAhmad Masri struct wmi_set_cca_indications_bi_avg_num_event {
37628a4fa214SAhmad Masri 	/* wmi_fw_status */
37638a4fa214SAhmad Masri 	u8 status;
37648a4fa214SAhmad Masri 	u8 reserved[3];
37658a4fa214SAhmad Masri } __packed;
37668a4fa214SAhmad Masri 
37678a4fa214SAhmad Masri /* WMI_INTERNAL_FW_SET_CHANNEL */
37688a4fa214SAhmad Masri struct wmi_internal_fw_set_channel_event {
37698a4fa214SAhmad Masri 	u8 channel_num;
37708a4fa214SAhmad Masri 	u8 reserved[3];
37718a4fa214SAhmad Masri } __packed;
37728a4fa214SAhmad Masri 
3773*b5aeff16SDedy Lansky /* WMI_LINK_STATS_CONFIG_DONE_EVENTID */
3774*b5aeff16SDedy Lansky struct wmi_link_stats_config_done_event {
3775*b5aeff16SDedy Lansky 	/* wmi_fw_status_e */
3776*b5aeff16SDedy Lansky 	u8 status;
3777*b5aeff16SDedy Lansky 	u8 reserved[3];
3778*b5aeff16SDedy Lansky } __packed;
3779*b5aeff16SDedy Lansky 
3780*b5aeff16SDedy Lansky /* WMI_LINK_STATS_EVENTID */
3781*b5aeff16SDedy Lansky struct wmi_link_stats_event {
3782*b5aeff16SDedy Lansky 	__le16 payload_size;
3783*b5aeff16SDedy Lansky 	u8 has_next;
3784*b5aeff16SDedy Lansky 	u8 reserved[5];
3785*b5aeff16SDedy Lansky 	/* a stream of records, e.g. wmi_link_stats_basic_s */
3786*b5aeff16SDedy Lansky 	u8 payload[0];
3787*b5aeff16SDedy Lansky } __packed;
3788*b5aeff16SDedy Lansky 
3789*b5aeff16SDedy Lansky /* WMI_LINK_STATS_EVENT record struct */
3790*b5aeff16SDedy Lansky struct wmi_link_stats_basic {
3791*b5aeff16SDedy Lansky 	/* WMI_LINK_STATS_TYPE_BASIC */
3792*b5aeff16SDedy Lansky 	u8 record_type_id;
3793*b5aeff16SDedy Lansky 	u8 cid;
3794*b5aeff16SDedy Lansky 	/* 0: fail; 1: OK; 2: retrying */
3795*b5aeff16SDedy Lansky 	u8 bf_status;
3796*b5aeff16SDedy Lansky 	s8 rssi;
3797*b5aeff16SDedy Lansky 	u8 sqi;
3798*b5aeff16SDedy Lansky 	u8 selected_rfc;
3799*b5aeff16SDedy Lansky 	__le16 bf_mcs;
3800*b5aeff16SDedy Lansky 	__le32 tx_tpt;
3801*b5aeff16SDedy Lansky 	__le32 tx_goodput;
3802*b5aeff16SDedy Lansky 	__le32 rx_goodput;
3803*b5aeff16SDedy Lansky 	__le16 my_rx_sector;
3804*b5aeff16SDedy Lansky 	__le16 my_tx_sector;
3805*b5aeff16SDedy Lansky 	__le16 other_rx_sector;
3806*b5aeff16SDedy Lansky 	__le16 other_tx_sector;
3807*b5aeff16SDedy Lansky 	__le32 reserved[2];
3808*b5aeff16SDedy Lansky } __packed;
3809*b5aeff16SDedy Lansky 
3810*b5aeff16SDedy Lansky /* WMI_SET_GRANT_MCS_EVENTID */
3811*b5aeff16SDedy Lansky struct wmi_set_grant_mcs_event {
3812*b5aeff16SDedy Lansky 	/* wmi_fw_status */
3813*b5aeff16SDedy Lansky 	u8 status;
3814*b5aeff16SDedy Lansky 	u8 reserved[3];
3815*b5aeff16SDedy Lansky } __packed;
3816*b5aeff16SDedy Lansky 
3817*b5aeff16SDedy Lansky /* WMI_SET_AP_SLOT_SIZE_EVENTID */
3818*b5aeff16SDedy Lansky struct wmi_set_ap_slot_size_event {
3819*b5aeff16SDedy Lansky 	/* wmi_fw_status */
3820*b5aeff16SDedy Lansky 	u8 status;
3821*b5aeff16SDedy Lansky 	u8 reserved[3];
3822*b5aeff16SDedy Lansky } __packed;
3823*b5aeff16SDedy Lansky 
3824*b5aeff16SDedy Lansky /* WMI_SET_VRING_PRIORITY_WEIGHT_EVENTID */
3825*b5aeff16SDedy Lansky struct wmi_set_vring_priority_weight_event {
3826*b5aeff16SDedy Lansky 	/* wmi_fw_status */
3827*b5aeff16SDedy Lansky 	u8 status;
3828*b5aeff16SDedy Lansky 	u8 reserved[3];
3829*b5aeff16SDedy Lansky } __packed;
3830*b5aeff16SDedy Lansky 
3831*b5aeff16SDedy Lansky /* WMI_SET_VRING_PRIORITY_EVENTID */
3832*b5aeff16SDedy Lansky struct wmi_set_vring_priority_event {
3833*b5aeff16SDedy Lansky 	/* wmi_fw_status */
3834*b5aeff16SDedy Lansky 	u8 status;
3835*b5aeff16SDedy Lansky 	u8 reserved[3];
3836*b5aeff16SDedy Lansky } __packed;
3837*b5aeff16SDedy Lansky 
38382be7d22fSVladimir Kondratiev #endif /* __WILOCITY_WMI_H__ */
3839